:root {
    --bg: #f6f4ef;
    --ink: #121826;
    --muted: #667085;
    --card: #ffffff;
    --line: #ded7ca;
    --accent: #9f6f3d;
    --accent-dark: #6d4b27;
    --accent-2: #0f766e;
    --soft: #f0e7d8;
    --soft-2: #e7f2ef;
    --danger: #b42318;
    --success: #027a48;
    --shadow: 0 18px 46px rgba(18, 24, 38, .08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--ink);
    background:
        linear-gradient(135deg, rgba(15, 118, 110, .08), transparent 32%),
        linear-gradient(180deg, #fbfaf6 0%, var(--bg) 100%);
    text-rendering: optimizeLegibility;
}

.page-shell {
    width: min(960px, 100%);
    margin: 0 auto;
    padding: 24px 16px 48px;
}

.public-page {
    min-height: 100vh;
}

.cover-screen {
    min-height: 100svh;
    padding: 16px;
}

.cover-media {
    position: relative;
    display: grid;
    min-height: calc(100svh - 32px);
    align-items: end;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #1f2933;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 24px 70px rgba(18, 24, 38, .2);
}

.cover-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.01);
    transition: transform .8s ease;
}

.cover-media:hover img {
    transform: scale(1.04);
}

.cover-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(18, 24, 38, .02) 20%, rgba(18, 24, 38, .72) 100%),
        linear-gradient(135deg, rgba(15, 118, 110, .22), rgba(159, 111, 61, .12));
}

.cover-content {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 12px;
    width: min(520px, 100%);
    padding: 24px;
}

.cover-content .brand {
    margin-bottom: 0;
    background: rgba(240, 231, 216, .92);
}

.cover-content .brand::before {
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--accent);
}

.cover-content strong {
    font-family: "Fraunces", Georgia, serif;
    font-size: clamp(2.35rem, 12vw, 4.15rem);
    font-weight: 650;
    line-height: 1.02;
}

.cover-content > span:not(.brand):not(.cover-cta) {
    color: rgba(255, 255, 255, .86);
    font-size: 1rem;
    line-height: 1.6;
}

.cover-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 48px;
    margin-top: 4px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    padding: 12px 18px;
    font-weight: 850;
    box-shadow: 0 16px 34px rgba(0, 0, 0, .22);
}

.hero {
    padding: 34px 0 22px;
}

.public-shell {
    width: min(560px, 100%);
    scroll-margin-top: 14px;
}

.public-hero {
    padding: 22px 0 18px;
}

.public-hero h1 {
    max-width: 520px;
    font-family: "Fraunces", Georgia, serif;
    font-size: clamp(2.25rem, 11vw, 3.65rem);
    font-weight: 650;
    line-height: 1.04;
}

.public-hero p {
    max-width: 520px;
    margin-bottom: 0;
    font-size: 1rem;
    line-height: 1.75;
}

.public-hero .brand {
    gap: 10px;
    padding: 7px 12px;
    letter-spacing: .04em;
}

.public-hero .brand::before {
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--accent);
}

.result-brand {
    gap: 10px;
    letter-spacing: .04em;
}

.result-brand::before {
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--accent);
}

.hero.compact {
    padding-bottom: 10px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    margin-bottom: 14px;
    padding: 6px 11px;
    border-radius: 999px;
    background: var(--soft);
    color: var(--accent-dark);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.brand::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-2);
}

h1, h2, h3, p {
    margin-top: 0;
}

h1 {
    max-width: 680px;
    margin-bottom: 12px;
    font-size: clamp(2rem, 7vw, 4rem);
    line-height: 1;
    letter-spacing: 0;
}

h2 {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

h3 {
    font-size: 1rem;
    margin-bottom: 12px;
}

p {
    color: var(--muted);
    line-height: 1.65;
}

.card,
.image-card,
.notes {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.card {
    padding: 20px;
}

.notes {
    margin-top: 18px;
    padding: 18px;
}

.compact-note {
    margin-top: 14px;
    padding: 14px;
    box-shadow: none;
}

.compact-note p {
    margin-bottom: 0;
    color: var(--ink);
}

.form-grid {
    display: grid;
    gap: 16px;
}

label,
fieldset {
    margin: 0;
}

label {
    display: block;
    min-width: 0;
}

label span,
legend {
    display: block;
    margin-bottom: 7px;
    color: var(--ink);
    font-size: .92rem;
    font-weight: 750;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="month"],
input[type="file"],
select,
textarea {
    display: block;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fffdf9;
    color: var(--ink);
    padding: 13px 14px;
    font: inherit;
    font-weight: 600;
    line-height: 1.25;
    min-height: 48px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
    appearance: none;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

textarea {
    min-height: 132px;
    resize: vertical;
}

select {
    cursor: pointer;
}

input[type="file"] {
    padding: 12px;
    cursor: pointer;
}

input[type="file"]::file-selector-button {
    margin-right: 12px;
    border: 0;
    border-radius: 999px;
    background: var(--soft-2);
    color: #0f4f4a;
    padding: 9px 12px;
    font: inherit;
    font-size: .9rem;
    font-weight: 800;
    cursor: pointer;
}

input:focus,
textarea:focus,
select:focus {
    border-color: rgba(15, 118, 110, .55);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(15, 118, 110, .12);
    outline: 0;
}

.public-card {
    padding: 16px;
}

.wizard-progress {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 18px;
}

.wizard-progress span {
    display: grid;
    min-height: 36px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fffdf9;
    color: var(--muted);
    font-size: .84rem;
    font-weight: 900;
}

.wizard-progress span.is-active {
    border-color: rgba(15, 118, 110, .32);
    background: var(--soft-2);
    color: #0f4f4a;
}

.wizard-progress span.is-complete {
    border-color: rgba(159, 111, 61, .36);
    background: var(--soft);
    color: var(--accent-dark);
}

.wizard-form {
    display: grid;
    gap: 18px;
}

.wizard-step {
    display: none;
}

.wizard-step.is-active {
    display: grid;
    gap: 16px;
    animation: restore-step-in .34s ease both;
}

.wizard-step h2,
.wizard-step legend {
    margin: 0;
    font-size: 1.55rem;
    line-height: 1.12;
}

@keyframes restore-step-in {
    from {
        opacity: 0;
        transform: translateY(10px);
        filter: blur(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

.step-kicker {
    width: fit-content;
    border-radius: 999px;
    background: var(--soft);
    color: var(--accent-dark);
    padding: 6px 10px;
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.step-note {
    margin: -6px 0 0;
    color: var(--muted);
    font-size: .92rem;
    line-height: 1.5;
}

.contact-grid {
    display: grid;
    gap: 14px;
}

.wizard-actions {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 10px;
    padding-top: 4px;
}

.wizard-actions button {
    width: 100%;
}

.wizard-actions [data-wizard-prev],
.wizard-actions [data-wizard-submit] {
    display: none;
}

.wizard-actions [data-wizard-submit] {
    grid-column: 1 / -1;
}

.upload-status {
    display: none;
    grid-column: 1 / -1;
    align-items: center;
    gap: 10px;
    margin-top: 2px;
    padding: 12px 14px;
    border: 1px solid rgba(15, 118, 110, .18);
    border-radius: 8px;
    background: #f3fbf8;
    color: #0f4f4a;
    font-size: .92rem;
    font-weight: 750;
    line-height: 1.45;
}

.wizard-form.is-submitting .upload-status {
    display: flex;
}

.upload-spinner {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(15, 118, 110, .22);
    border-top-color: #0f4f4a;
    border-radius: 999px;
    animation: upload-spin .8s linear infinite;
}

@keyframes upload-spin {
    to {
        transform: rotate(360deg);
    }
}

.plans {
    display: grid;
    gap: 10px;
    border: 0;
    padding: 0;
}

.full-field,
.terms-field {
    grid-column: 1 / -1;
}

.terms-field {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: start;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fffdf9;
}

.terms-field input {
    margin-top: 3px;
    accent-color: var(--accent-2);
}

.terms-field span {
    margin: 0;
    color: var(--muted);
    font-size: .94rem;
    font-weight: 650;
    line-height: 1.55;
}

.terms-field a {
    color: #0f4f4a;
    font-weight: 850;
}

.plan-option {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: start;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fffdf9;
    cursor: pointer;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.plan-option input {
    margin-top: 4px;
    accent-color: var(--accent);
}

.plan-option:hover,
.plan-option:focus-within {
    border-color: rgba(15, 118, 110, .42);
    box-shadow: 0 10px 24px rgba(18, 24, 38, .07);
    transform: translateY(-1px);
}

.plan-option strong,
.plan-option small {
    display: block;
}

.plan-option small,
.upload-box small {
    color: var(--muted);
    line-height: 1.5;
}

button,
.primary-button,
.link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border-radius: 999px;
    padding: 12px 18px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    line-height: 1.1;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}

button,
.primary-button {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 12px 24px rgba(109, 75, 39, .18);
}

button:hover,
.primary-button:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
}

button:disabled,
button:disabled:hover {
    background: #d7d2c8;
    color: #7a746b;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.link-button {
    border: 1px solid var(--line);
    background: #fffdf9;
    color: var(--ink);
}

.link-button:hover {
    border-color: rgba(15, 118, 110, .38);
    color: #0f4f4a;
    transform: translateY(-1px);
}

.alert {
    margin-bottom: 16px;
    border: 1px solid rgba(180, 35, 24, .24);
    border-radius: 8px;
    background: #fff4f2;
    color: var(--danger);
    padding: 14px 16px;
    font-weight: 650;
}

.alert.small {
    margin: 0 0 12px;
    padding: 10px 12px;
    font-size: .9rem;
}

.status-card {
    margin-bottom: 18px;
}

.summary-grid {
    display: grid;
    gap: 10px;
    margin: 16px 0 6px;
}

.summary-grid span {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfaf6;
    color: var(--muted);
}

.summary-grid strong {
    color: var(--ink);
}

.payment-options {
    display: grid;
    gap: 8px;
    margin: 12px 0 4px;
}

.payment-options span {
    display: block;
    border: 1px solid rgba(15, 118, 110, .18);
    border-radius: 8px;
    background: var(--soft-2);
    color: #0f4f4a;
    padding: 11px 12px;
    font-size: .92rem;
    font-weight: 750;
    line-height: 1.45;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.compact-actions {
    margin-top: 10px;
}

.inline-form {
    display: inline-flex;
    margin: 0;
}

.support-menu {
    margin-top: 18px;
    border: 1px solid rgba(15, 118, 110, .18);
    border-radius: 8px;
    background: #fbfaf6;
    overflow: hidden;
}

.support-menu-footer {
    margin-top: 22px;
}

.support-menu summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 58px;
    padding: 14px 16px;
    color: var(--ink);
    cursor: pointer;
    list-style: none;
}

.support-menu summary::-webkit-details-marker {
    display: none;
}

.support-menu summary::after {
    content: "+";
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #fff;
    color: var(--accent-dark);
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1;
}

.support-menu[open] summary::after {
    content: "-";
}

.support-menu summary strong,
.support-menu summary small {
    display: block;
}

.support-menu summary small {
    margin-top: 3px;
    color: var(--muted);
    font-size: .86rem;
    line-height: 1.4;
}

.support-menu-panel {
    display: grid;
    gap: 12px;
    border-top: 1px solid rgba(15, 118, 110, .14);
    padding: 0 16px 16px;
}

.support-menu-panel p {
    margin: 14px 0 0;
    font-size: .94rem;
}

.support-actions {
    display: grid;
    gap: 10px;
}

.support-action {
    position: relative;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 28px;
    align-items: center;
    column-gap: 12px;
    gap: 3px;
    min-height: 64px;
    padding: 12px 14px 12px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    text-decoration: none;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.support-action:hover {
    border-color: rgba(15, 118, 110, .34);
    box-shadow: 0 10px 22px rgba(18, 24, 38, .07);
    transform: translateY(-1px);
}

.support-action::before,
.support-action::after {
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    font-weight: 900;
}

.support-action::before {
    content: "";
    width: 42px;
    height: 42px;
    grid-row: 1 / span 2;
    border: 1px solid rgba(15, 118, 110, .18);
    background: var(--soft-2);
    color: #0f4f4a;
    font-size: .78rem;
}

.support-action::after {
    content: ">";
    width: 28px;
    height: 28px;
    grid-column: 3;
    grid-row: 1 / span 2;
    border: 1px solid var(--line);
    background: #fffdf9;
    color: var(--accent-dark);
    transition: transform .16s ease, border-color .16s ease;
}

.support-action:hover::after {
    border-color: rgba(159, 111, 61, .34);
    transform: translateX(2px);
}

.support-action span {
    grid-column: 2;
    color: var(--muted);
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.support-action strong {
    grid-column: 2;
    overflow-wrap: anywhere;
    color: var(--ink);
    font-size: .98rem;
}

.support-action.whatsapp {
    border-color: rgba(15, 118, 110, .22);
}

.support-action.whatsapp::before {
    content: "WA";
}

.support-action.email {
    border-color: rgba(159, 111, 61, .24);
}

.support-action.email::before {
    content: "@";
    border-color: rgba(159, 111, 61, .22);
    background: var(--soft);
    color: var(--accent-dark);
    font-size: 1rem;
}

.support-action.instagram {
    border-color: rgba(91, 78, 135, .24);
}

.support-action.instagram::before {
    content: "IG";
    border-color: rgba(91, 78, 135, .22);
    background: #f0edf7;
    color: #5b4e87;
}

.support-action.facebook {
    border-color: rgba(24, 82, 160, .22);
}

.support-action.facebook::before {
    content: "FB";
    border-color: rgba(24, 82, 160, .2);
    background: #edf4ff;
    color: #1852a0;
}

.reprocess-form {
    display: grid;
    width: min(520px, 100%);
    gap: 10px;
    margin: 0;
}

.reprocess-form textarea {
    min-height: 110px;
}

.reprocess-form button {
    width: fit-content;
}

.compare-grid {
    display: grid;
    gap: 16px;
}

.photo-list {
    display: grid;
    gap: 18px;
}

.photo-item {
    padding: 16px;
}

.photo-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.photo-item-head h2 {
    margin: 0;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    border-radius: 999px;
    padding: 5px 10px;
    background: var(--soft-2);
    color: #0f4f4a;
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.image-card {
    padding: 14px;
}

.image-card.flat {
    border: 0;
    box-shadow: none;
    padding: 0;
}

.image-card img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #f8fafc;
}

.placeholder {
    display: grid;
    min-height: 260px;
    place-items: center;
    border: 1px dashed var(--line);
    border-radius: 8px;
    color: var(--muted);
    text-align: center;
    padding: 18px;
}

.debug-pre {
    max-height: 360px;
    overflow: auto;
    border-radius: 8px;
    background: #111827;
    color: #f8fafc;
    padding: 14px;
    white-space: pre-wrap;
}

.processing-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    place-items: center;
    padding: 24px;
    background: rgba(18, 24, 38, .72);
    backdrop-filter: blur(10px);
}

.processing-overlay.is-visible {
    display: grid;
}

.processing-panel {
    width: min(460px, 100%);
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 8px;
    background: #fffdf9;
    box-shadow: 0 28px 70px rgba(0, 0, 0, .24);
    padding: 26px;
    text-align: center;
}

.processing-loader {
    position: relative;
    width: 74px;
    height: 74px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--accent-2), var(--accent), rgba(15, 118, 110, .14), var(--accent-2));
    animation: processing-spin 1s linear infinite;
}

.processing-loader::after {
    content: "";
    position: absolute;
    inset: 9px;
    border-radius: 50%;
    background: #fffdf9;
}

.processing-panel h2 {
    margin-bottom: 8px;
}

.processing-panel p {
    margin-bottom: 0;
}

@keyframes processing-spin {
    to {
        transform: rotate(360deg);
    }
}

.legal-page {
    max-width: 820px;
}

.legal-content {
    display: grid;
    gap: 18px;
}

.legal-content h2 {
    margin: 0 0 6px;
}

.legal-content ul {
    margin: 0;
    padding-left: 20px;
    color: var(--muted);
    line-height: 1.65;
}

.agency-context {
    display: grid;
    gap: 4px;
    border: 1px solid rgba(15, 118, 110, .22);
    border-radius: 8px;
    background: var(--soft-2);
    color: #0f4f4a;
    padding: 14px;
}

.agency-context span {
    color: #38635f;
}

.agency-list {
    display: grid;
    gap: 10px;
}

.agency-card {
    display: grid;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fffdf9;
    color: var(--ink);
    padding: 13px 14px;
    text-decoration: none;
}

.agency-card:hover {
    border-color: rgba(15, 118, 110, .38);
}

.agency-card span {
    color: var(--muted);
    font-size: .92rem;
}

.public-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 14px;
    margin-top: 18px;
    padding: 12px 2px 0;
    border-top: 1px solid rgba(222, 215, 202, .72);
    color: var(--muted);
    font-size: .82rem;
}

.public-footer span:first-child {
    color: var(--accent-dark);
    font-weight: 800;
    letter-spacing: .02em;
}

@media (min-width: 760px) {
    .page-shell {
        padding-top: 42px;
    }

    .public-shell {
        width: min(1040px, 100%);
        display: grid;
        grid-template-columns: minmax(0, .9fr) minmax(420px, 520px);
        gap: 34px;
        align-items: start;
    }

    .public-hero {
        position: sticky;
        top: 34px;
        padding-top: 28px;
    }

    .public-hero h1 {
        font-size: clamp(3rem, 5.5vw, 4.3rem);
    }

    .public-card,
    .public-shell > .alert {
        grid-column: 2;
    }

    .card {
        padding: 24px;
    }

    .public-card {
        padding: 20px;
    }

    .form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .plans,
    .upload-box,
    .form-grid button {
        grid-column: 1 / -1;
    }

    .compare-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .summary-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .support-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .public-shell > .notes {
        grid-column: 1 / -1;
    }

    .contact-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .contact-grid label:last-child {
        grid-column: 1 / -1;
    }
}
