/* LOVKA face analysis — responsive upload studio */
.fa-page {
    --fa-panel: rgba(24, 24, 29, .88);
    --fa-panel-strong: #19191e;
    --fa-soft-gold: rgba(201, 169, 97, .1);
    --fa-line: rgba(255, 255, 255, .09);
    position: relative;
    isolation: isolate;
    min-height: 76vh;
    padding: clamp(34px, 5vw, 72px) 0 96px;
    overflow: hidden;
}

.fa-container { position: relative; z-index: 2; }

/* Keep this feature on the same typography system as the rest of the storefront.
   Technical values remain tabular, but the visible family stays unified. */
.fa-page,
.fa-processing-overlay {
    font-family: var(--font-fa);
    font-synthesis: none;
    font-kerning: normal;
}

.fa-page :where(button, input, select, textarea, label),
.fa-processing-overlay :where(button, input, select, textarea, label) {
    font-family: inherit;
}

.fa-page :where(.fa-step-circle, .fa-panel-number, .fa-empty-preview small, .fa-metric-value),
.fa-processing-overlay :where(.fa-processing-kicker, .fa-processing-steps) {
    font-family: var(--font-fa);
    font-variant-numeric: tabular-nums;
}

.fa-page .fa-hero-mark small,
.fa-processing-overlay .fa-processing-kicker {
    font-family: var(--font-fa);
}

.fa-ambient {
    position: absolute;
    z-index: -1;
    width: 540px;
    aspect-ratio: 1;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(2px);
    opacity: .5;
}

.fa-ambient--one {
    inset-block-start: -260px;
    inset-inline-end: -220px;
    background: radial-gradient(circle, rgba(201, 169, 97, .13), transparent 69%);
}

.fa-ambient--two {
    inset-block-start: 480px;
    inset-inline-start: -320px;
    background: radial-gradient(circle, rgba(104, 90, 156, .08), transparent 68%);
}

/* Hero */
.fa-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px;
    align-items: center;
    gap: clamp(32px, 7vw, 96px);
    max-width: 1060px;
    margin-inline: auto;
    margin-bottom: clamp(34px, 5vw, 56px);
}

.fa-hero-copy { max-width: 770px; }

.fa-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 12px;
    color: var(--gold-light);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .02em;
}

.fa-eyebrow i { font-size: .95rem; }

.fa-hero h1 {
    max-width: 760px;
    margin: 0;
    color: var(--text);
    font-family: var(--font-fa);
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 700;
    line-height: 1.48;
    letter-spacing: 0;
}

.fa-hero h1 em {
    position: relative;
    display: inline-block;
    color: var(--gold-light);
    font-style: normal;
    white-space: nowrap;
}

.fa-hero h1 em::after {
    content: "";
    position: absolute;
    inset-inline: 4px;
    inset-block-end: 4px;
    height: 7px;
    border-radius: 50%;
    border-top: 1px solid var(--gold-dim);
    opacity: .7;
}

.fa-hero-copy > p {
    max-width: 650px;
    margin: 16px 0 20px;
    color: var(--text-muted);
    font-size: clamp(.92rem, 1.3vw, 1.03rem);
    line-height: 2;
}

.fa-trust-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.fa-trust-row span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 31px;
    padding: 4px 10px;
    border: 1px solid var(--fa-line);
    border-radius: 999px;
    background: rgba(255, 255, 255, .025);
    color: #b8b3a9;
    font-size: .72rem;
}

.fa-trust-row i { color: var(--gold); }

.fa-hero-mark {
    position: relative;
    display: grid;
    place-items: center;
    width: 170px;
    aspect-ratio: 1;
    color: var(--gold);
}

.fa-hero-mark > i {
    position: relative;
    z-index: 2;
    font-size: 3rem;
    filter: drop-shadow(0 7px 18px rgba(201, 169, 97, .2));
    animation: fa-float 4s ease-in-out infinite;
}

.fa-hero-mark small {
    position: absolute;
    inset-block-end: 25px;
    z-index: 2;
    color: var(--gold-dim);
    font-family: var(--font-serif);
    font-size: .55rem;
    letter-spacing: .18em;
}

.fa-hero-ring {
    position: absolute;
    border: 1px solid var(--hairline);
    border-radius: 50%;
}

.fa-hero-ring--one { inset: 9px; }
.fa-hero-ring--two {
    inset: 28px;
    border-style: dashed;
    animation: fa-spin 18s linear infinite;
}

.fa-hero-mark::before,
.fa-hero-mark::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 20px rgba(201, 169, 97, .7);
}

.fa-hero-mark::before { width: 5px; height: 5px; inset-block-start: 28px; inset-inline-start: 28px; }
.fa-hero-mark::after { width: 3px; height: 3px; inset-block-end: 37px; inset-inline-end: 22px; }

/* Stepper */
.fa-steps {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0;
    flex-wrap: nowrap;
    max-width: 820px;
    margin: 0 auto clamp(24px, 3vw, 34px);
    padding: 14px 22px;
    border: 1px solid var(--fa-line);
    border-radius: 18px;
    background: rgba(20, 20, 24, .7);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .14);
    backdrop-filter: blur(12px);
}

.fa-step {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
    color: #767269;
}

.fa-step-circle {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    border: 1px solid var(--fa-line);
    border-radius: 50%;
    background: #202026;
    color: #89847b;
    font-family: var(--font-num);
    font-size: .72rem;
}

.fa-step > span:last-child { display: grid; gap: 1px; }
.fa-step b { color: inherit; font-size: .76rem; font-weight: 700; }
.fa-step small { color: #666159; font-size: .62rem; }
.fa-step.active { color: var(--text); }
.fa-step.active .fa-step-circle {
    border-color: var(--gold);
    background: var(--gold);
    color: #17150f;
    box-shadow: 0 0 0 5px rgba(201, 169, 97, .1);
}
.fa-step.active small { color: var(--gold-dim); }
.fa-step.done .fa-step-circle { border-color: var(--success); background: var(--success); color: #fff; }

.fa-step-line {
    position: relative;
    height: 1px;
    flex: 1 1 70px;
    margin-inline: 16px;
    overflow: hidden;
    background: var(--fa-line);
}

.fa-step-line i {
    position: absolute;
    inset: 0;
    width: 45%;
    background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
    animation: fa-line-glide 3s ease-in-out infinite;
}

/* Alerts */
.fa-alert {
    display: flex;
    align-items: center;
    gap: 13px;
    max-width: 920px;
    margin: 0 auto 18px;
    padding: 13px 16px;
    border: 1px solid rgba(184, 80, 63, .3);
    border-radius: 12px;
    background: rgba(184, 80, 63, .09);
    color: #e5b4a9;
}

.fa-alert > i { font-size: 1.1rem; }
.fa-alert div { display: grid; flex: 1; }
.fa-alert strong { color: #f0d5cf; font-size: .8rem; }
.fa-alert span { font-size: .74rem; }
.fa-alert button { border: 0; background: transparent; color: inherit; cursor: pointer; }

/* Upload studio */
.fa-studio {
    display: grid;
    grid-template-columns: minmax(310px, 380px) minmax(0, 1fr);
    max-width: 1120px;
    margin-inline: auto;
    border: 1px solid var(--fa-line);
    border-radius: 24px;
    background: rgba(19, 19, 23, .74);
    box-shadow: 0 28px 90px rgba(0, 0, 0, .26);
    overflow: hidden;
    backdrop-filter: blur(16px);
}

.fa-control-panel,
.fa-preview-card { padding: clamp(22px, 3vw, 34px); }

.fa-control-panel {
    border-inline-end: 1px solid var(--fa-line);
    background:
        linear-gradient(150deg, rgba(201, 169, 97, .05), transparent 38%),
        var(--fa-panel);
}

.fa-panel-heading,
.fa-preview-head > div {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.fa-panel-number {
    display: grid;
    place-items: center;
    min-width: 30px;
    height: 24px;
    margin-top: 2px;
    border: 1px solid var(--hairline);
    border-radius: 999px;
    color: var(--gold);
    font-family: var(--font-num);
    font-size: .62rem;
    letter-spacing: .05em;
}

.fa-panel-heading h2,
.fa-preview-head h2 {
    margin: 0 0 3px;
    color: var(--text);
    font-size: 1rem;
    font-weight: 700;
}

.fa-panel-heading p,
.fa-preview-head p {
    margin: 0;
    color: var(--text-muted);
    font-size: .71rem;
}

.fa-upload-options { display: grid; gap: 10px; margin-top: 22px; }

.fa-upload-option {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    min-height: 72px;
    padding: 11px 13px;
    border: 1px solid var(--fa-line);
    border-radius: 14px;
    background: rgba(255, 255, 255, .018);
    cursor: pointer;
    transition: transform .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease);
}

.fa-upload-option i {
    display: inline-grid;
    margin: 0;
}

.fa-upload-option:hover {
    transform: translateY(-2px);
    border-color: rgba(201, 169, 97, .45);
    background: rgba(201, 169, 97, .055);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .15);
}

.fa-upload-option:active { transform: translateY(0) scale(.99); }

.fa-option-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--hairline);
    border-radius: 12px;
    background: var(--fa-soft-gold);
    color: var(--gold);
    font-size: 1.12rem;
}

.fa-upload-option > span:nth-child(2) { display: grid; gap: 2px; }
.fa-upload-option b { color: var(--text); font-size: .79rem; font-weight: 700; }
.fa-upload-option small { color: var(--text-muted); font-size: .65rem; }
.fa-option-arrow { color: #5f5b54; font-size: .75rem; transition: color .2s var(--ease), transform .2s var(--ease); }
.fa-upload-option:hover .fa-option-arrow { color: var(--gold); transform: translateX(-3px); }

.fa-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 24px 0 16px;
    color: #777168;
    font-size: .65rem;
}
.fa-divider::before,
.fa-divider::after { content: ""; height: 1px; flex: 1; background: var(--fa-line); }

.fa-quality-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.fa-quality-grid > div {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    column-gap: 7px;
    min-height: 55px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 10px;
    background: rgba(255, 255, 255, .015);
}

.fa-quality-icon {
    grid-row: 1 / span 2;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(107, 143, 113, .11);
    color: #83a789;
    font-size: .76rem;
}
.fa-quality-grid b { color: #cbc7bd; font-size: .66rem; font-weight: 600; }
.fa-quality-grid small { color: #716d65; font-size: .55rem; line-height: 1.4; }

.fa-privacy-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 18px;
    margin-bottom: 0;
    padding: 11px 12px;
    border: 1px solid rgba(107, 143, 113, .18);
    border-radius: 11px;
    background: rgba(107, 143, 113, .06);
}
.fa-privacy-note > span { color: #83a789; line-height: 1; }
.fa-privacy-note p { margin: 0; color: #88847b; font-size: .61rem; line-height: 1.7; }
.fa-privacy-note b { display: block; margin-bottom: 1px; color: #aaa69c; font-size: .65rem; }

/* Preview */
.fa-preview-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    background: rgba(14, 14, 17, .46);
}

.fa-preview-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.fa-reset-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 9px;
    border: 1px solid var(--fa-line);
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
    font-size: .64rem;
    cursor: pointer;
    transition: color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
}
.fa-reset-button:hover { border-color: rgba(184, 80, 63, .4); background: rgba(184, 80, 63, .07); color: #d99384; }
.fa-upload-option:focus-within,
.fa-reset-button:focus-visible,
.fa-remove-image:focus-visible,
.fa-analyze-button:focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: 3px;
}

.fa-preview-box {
    position: relative;
    display: flex;
    min-height: 380px;
    flex: 1;
    align-items: center;
    justify-content: center;
    border: 1px dashed rgba(201, 169, 97, .32);
    border-radius: 18px;
    background:
        linear-gradient(rgba(255, 255, 255, .018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .018) 1px, transparent 1px),
        #151519;
    background-size: 32px 32px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color .25s var(--ease), background-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}

.fa-preview-box:hover,
.fa-preview-box:focus-visible,
.fa-preview-box.is-dragging {
    border-color: var(--gold);
    box-shadow: inset 0 0 0 1px rgba(201, 169, 97, .1), 0 14px 42px rgba(0, 0, 0, .16);
}

.fa-preview-box.is-dragging { transform: scale(.995); background-color: rgba(201, 169, 97, .045); }

.fa-empty-preview {
    display: flex;
    align-items: center;
    flex-direction: column;
    padding: 24px;
    text-align: center;
}

.fa-face-guide {
    --fa-idle-scan-travel: 112px;
    position: relative;
    display: grid;
    place-items: center;
    width: 150px;
    height: 178px;
    margin-bottom: 22px;
    overflow: hidden;
}

.fa-face-oval {
    display: grid;
    place-items: center;
    width: 92px;
    height: 126px;
    border: 1px solid rgba(201, 169, 97, .28);
    border-radius: 48% 48% 46% 46% / 43% 43% 57% 57%;
    background: radial-gradient(circle at 50% 30%, rgba(201, 169, 97, .08), transparent 65%);
}

.fa-face-oval i { color: rgba(201, 169, 97, .42); font-size: 3.5rem; }

.fa-guide-corner,
.fa-scan-corner {
    position: absolute;
    width: 23px;
    height: 23px;
    border-color: var(--gold);
    opacity: .7;
}
.fa-guide-corner--one,
.fa-scan-corner--one { inset-block-start: 0; inset-inline-start: 0; border-block-start: 2px solid var(--gold); border-inline-start: 2px solid var(--gold); border-start-start-radius: 7px; }
.fa-guide-corner--two,
.fa-scan-corner--two { inset-block-start: 0; inset-inline-end: 0; border-block-start: 2px solid var(--gold); border-inline-end: 2px solid var(--gold); border-start-end-radius: 7px; }
.fa-guide-corner--three,
.fa-scan-corner--three { inset-block-end: 0; inset-inline-start: 0; border-block-end: 2px solid var(--gold); border-inline-start: 2px solid var(--gold); border-end-start-radius: 7px; }
.fa-guide-corner--four,
.fa-scan-corner--four { inset-block-end: 0; inset-inline-end: 0; border-block-end: 2px solid var(--gold); border-inline-end: 2px solid var(--gold); border-end-end-radius: 7px; }

.fa-idle-scan {
    position: absolute;
    top: 16%;
    inset-inline: 17px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    box-shadow: 0 0 10px rgba(201, 169, 97, .5);
    animation: fa-idle-scan 3.4s ease-in-out infinite;
}

.fa-empty-preview strong { margin-bottom: 3px; color: #d8d4ca; font-size: .9rem; }
.fa-empty-preview > span { color: var(--text-muted); font-size: .74rem; }
.fa-empty-preview small { margin-top: 10px; color: #666159; font-family: var(--font-num); font-size: .6rem; }

.fa-preview-box.has-files {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-auto-rows: minmax(0, 1fr);
    gap: 8px;
    padding: 8px;
    cursor: default;
    background: #111114;
}

.fa-preview-item {
    position: relative;
    grid-column: 1 / -1;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    border-radius: 12px;
    background: #202026;
    animation: fa-preview-in .45s var(--ease) both;
}

.fa-preview-box[data-count="2"] .fa-preview-item { grid-column: span 3; }
.fa-preview-box[data-count="3"] .fa-preview-item { grid-column: span 2; }

.fa-preview-item img { width: 100%; height: 100%; min-height: 280px; object-fit: cover; }
.fa-preview-box[data-count="2"] .fa-preview-item img,
.fa-preview-box[data-count="3"] .fa-preview-item img { min-height: 330px; }

.fa-preview-item::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(0, 0, 0, .32), transparent 24%, transparent 72%, rgba(0, 0, 0, .38));
}

.fa-preview-badge {
    position: absolute;
    inset-block-start: 10px;
    inset-inline-start: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 999px;
    background: rgba(12, 12, 15, .7);
    color: #f0ede5;
    font-size: .58rem;
    backdrop-filter: blur(7px);
}

.fa-remove-image {
    position: absolute;
    inset-block-start: 9px;
    inset-inline-end: 9px;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 50%;
    background: rgba(12, 12, 15, .7);
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(7px);
    transition: background .2s var(--ease), transform .2s var(--ease);
}
.fa-remove-image:hover { transform: scale(1.06); background: rgba(184, 80, 63, .88); }
.fa-remove-image i { color: #fff; }

.fa-file-error {
    margin: 9px 2px 0;
    color: #d98c7c;
    font-size: .7rem;
}
.fa-file-error::before { content: "\F33A"; margin-inline-end: 6px; font-family: "bootstrap-icons"; }

.fa-action-row { margin-top: 16px; }
.fa-analyze-button {
    display: flex;
    width: 100%;
    min-height: 54px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 18px;
    border: 1px solid var(--gold);
    border-radius: 13px;
    background: linear-gradient(115deg, #b8954e, #e0c47f 47%, #c4a259);
    background-size: 200% 100%;
    color: #17140e;
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(201, 169, 97, .14);
    transition: transform .2s var(--ease), filter .2s var(--ease), opacity .2s var(--ease), box-shadow .2s var(--ease);
}
.fa-analyze-button span { display: inline-flex; align-items: center; gap: 8px; }
.fa-analyze-button:not(:disabled):hover { transform: translateY(-2px); filter: brightness(1.08); box-shadow: 0 16px 38px rgba(201, 169, 97, .22); animation: fa-button-shine 2s linear infinite; }
.fa-analyze-button:not(:disabled):active { transform: translateY(0); }
.fa-analyze-button:disabled { border-color: var(--fa-line); background: #242429; color: #706c65; box-shadow: none; cursor: not-allowed; opacity: .75; }
.fa-action-row > p { margin: 7px 2px 0; color: #716d65; font-size: .62rem; text-align: center; }
.fa-action-row > p i { margin-inline-end: 4px; color: var(--gold-dim); }

/* Processing overlay */
.fa-processing-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 20px;
    visibility: hidden;
    background: rgba(8, 8, 10, .9);
    opacity: 0;
    backdrop-filter: blur(15px);
    transition: opacity .35s var(--ease), visibility .35s var(--ease);
}

.fa-processing-overlay.is-active { visibility: visible; opacity: 1; }
.fa-processing-card {
    display: flex;
    width: min(92vw, 470px);
    align-items: center;
    flex-direction: column;
    padding: 40px 30px 32px;
    border: 1px solid var(--hairline);
    border-radius: 24px;
    background: radial-gradient(circle at 50% 0, rgba(201, 169, 97, .09), transparent 42%), #151519;
    box-shadow: 0 30px 100px rgba(0, 0, 0, .55);
    text-align: center;
    transform: translateY(12px) scale(.97);
    transition: transform .4s var(--ease);
}
.fa-processing-overlay.is-active .fa-processing-card { transform: none; }

.fa-scan-frame {
    --fa-active-scan-travel: 144px;
    position: relative;
    display: grid;
    place-items: center;
    width: 150px;
    height: 170px;
    margin-bottom: 24px;
    overflow: hidden;
}
.fa-face-orbit {
    display: grid;
    place-items: center;
    width: 93px;
    height: 124px;
    border: 1px solid rgba(201, 169, 97, .28);
    border-radius: 48% 48% 45% 45% / 40% 40% 58% 58%;
    animation: fa-pulse 2.4s ease-in-out infinite;
}
.fa-face-orbit i { color: var(--gold-dim); font-size: 3.4rem; }
.fa-scan-line {
    position: absolute;
    top: 7%;
    inset-inline: 13px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), #fff1bd, var(--gold), transparent);
    box-shadow: 0 0 16px var(--gold);
    animation: fa-scan-move 2s ease-in-out infinite;
}
.fa-processing-kicker { margin-bottom: 6px; color: var(--gold); font-family: var(--font-serif); font-size: .6rem; letter-spacing: .2em; }
.fa-processing-text { margin: 0; color: var(--text); font-size: 1.08rem; font-weight: 700; }
.fa-processing-sub { min-height: 24px; margin: 6px 0 16px; color: var(--text-muted); font-size: .73rem; }
.fa-processing-progress { width: min(100%, 310px); height: 3px; margin-bottom: 17px; border-radius: 99px; background: #29292e; overflow: hidden; }
.fa-processing-progress span {
    display: block;
    width: 38%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--gold-dim), var(--gold-light));
    box-shadow: 0 0 10px rgba(201, 169, 97, .6);
    animation: fa-progress-indeterminate 1.45s var(--ease) infinite;
    will-change: transform;
}
.fa-processing-steps { display: flex; width: 100%; justify-content: center; gap: 18px; }
.fa-processing-steps span { display: inline-flex; align-items: center; gap: 4px; color: #615d56; font-size: .59rem; transition: color .3s var(--ease); }
.fa-processing-steps span i { display: grid; place-items: center; width: 14px; height: 14px; border: 1px solid #37373d; border-radius: 50%; font-size: .5rem; }
.fa-processing-steps span.is-active { color: var(--gold-light); }
.fa-processing-steps span.is-active i { border-color: var(--gold); background: var(--fa-soft-gold); }
.fa-processing-steps span.is-done { color: #83a789; }
.fa-processing-steps span.is-done i { border-color: var(--success); background: var(--success); color: #fff; }

/* Result experience — customer-facing summary, not a diagnostic dashboard. */
.fa-result-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    max-width: 1120px;
    margin: 0 auto 44px;
    padding: 14px;
    border: 1px solid var(--fa-line);
    border-radius: 24px;
    background: #121216;
    animation: fa-result-enter .42s var(--ease) both;
}

.fa-result-visual,
.fa-result-summary { min-width: 0; }

.fa-result-photo-frame {
    position: relative;
    overflow: hidden;
    min-height: 320px;
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 18px;
    background: #0e0e11;
}

.fa-result-photo {
    width: 100%;
    height: 100%;
    min-height: 320px;
    max-height: 520px;
    object-fit: cover;
    object-position: center 35%;
}

.fa-result-status {
    position: absolute;
    inset-block-start: 14px;
    inset-inline-start: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 5px 10px;
    border: 1px solid rgba(107, 143, 113, .26);
    border-radius: 999px;
    background: rgba(12, 16, 13, .88);
    color: #a9c3ad;
    font-size: .66rem;
    font-weight: 600;
}

.fa-result-summary {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(20px, 3vw, 38px);
}

.fa-result-kicker,
.fa-recommendations-head > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--gold);
    font-family: var(--font-fa);
    font-size: .7rem;
    font-weight: 700;
}

.fa-result-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 12px;
}

.fa-result-eyebrow {
    display: block;
    margin-bottom: 4px;
    color: var(--text-muted);
    font-size: .76rem;
}

.fa-result-shape {
    margin: 0;
    color: var(--text);
    font-family: var(--font-fa);
    font-size: clamp(2rem, 4.2vw, 3.2rem);
    font-weight: 700;
    line-height: 1.34;
    letter-spacing: 0;
}

.fa-result-icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    flex: 0 0 auto;
    border: 1px solid rgba(201, 169, 97, .2);
    border-radius: 18px;
    background: rgba(201, 169, 97, .06);
    color: var(--gold-light);
    font-size: 1.45rem;
}

.fa-result-description {
    max-width: 66ch;
    margin: 20px 0 0;
    color: #b8b3aa;
    font-size: .9rem;
    line-height: 2.05;
}

.fa-result-commerce-note {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--fa-line);
}

.fa-result-commerce-note > span {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: var(--fa-soft-gold);
    color: var(--gold);
    font-size: 1.05rem;
}

.fa-result-commerce-note strong {
    display: block;
    margin-bottom: 3px;
    color: var(--text);
    font-size: .82rem;
    font-weight: 700;
}

.fa-result-commerce-note p {
    margin: 0;
    color: var(--text-muted);
    font-size: .72rem;
    line-height: 1.85;
}

.fa-result-soft-note {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin: 16px 0 0;
    color: #8e897f;
    font-size: .68rem;
    line-height: 1.85;
}

.fa-result-soft-note i { margin-top: 2px; color: var(--gold-dim); }

.fa-result-actions {
    display: flex;
    align-items: stretch;
    gap: 10px;
    margin-top: 24px;
}

.fa-result-primary,
.fa-result-secondary {
    display: inline-flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border-radius: 12px;
    font-size: .76rem;
    font-weight: 700;
    transition: transform .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
}

.fa-result-primary {
    flex: 1 1 auto;
    justify-content: space-between;
    padding: 11px 16px;
    border: 1px solid var(--gold);
    background: var(--gold);
    color: #17140e;
}

.fa-result-secondary {
    flex: 0 0 auto;
    padding: 11px 15px;
    border: 1px solid var(--fa-line);
    background: transparent;
    color: #aaa59b;
}

.fa-result-primary:hover { transform: translateY(-1px); background: var(--gold-light); }
.fa-result-secondary:hover { border-color: rgba(201, 169, 97, .32); color: var(--text); }

.fa-recommendations {
    max-width: 1180px;
    margin: 0 auto 42px;
    scroll-margin-top: 96px;
}

.fa-recommendations-head {
    max-width: 760px;
    margin-bottom: 18px;
}

.fa-recommendations-head h2 {
    margin: 6px 0 4px;
    color: var(--text);
    font-family: var(--font-fa);
    font-size: clamp(1.2rem, 2vw, 1.45rem);
    font-weight: 700;
    line-height: 1.65;
}

.fa-recommendations-head p {
    margin: 0;
    color: var(--text-muted);
    font-size: .74rem;
    line-height: 1.8;
}

/* Keep recommendation commerce typography on the same Persian family.
   Product-card pricing styles in main.css otherwise switch to --font-num. */
.fa-page .fa-recommendations .product-card :where(
    .brand-name, h3, .price, .old-price, .new-price, .discount-badge,
    .countdown, .countdown-text, .rating, .stock-label
) {
    font-family: var(--font-fa);
    letter-spacing: 0;
}

.fa-recommendations--secondary {
    padding-top: 24px;
    border-top: 1px solid var(--fa-line);
}


/* P2D — Commerce card integration
   Reuse the shared catalogue card and keep this page responsible only for
   recommendation layout. Product truth and card behaviour remain shared. */
.fa-recommendation-groups {
    position: relative;
}

/* P2E2 — paint containment keeps image/card work local during scroll and resize. */
.fa-page .fa-result-photo-frame,
.fa-page .fa-preview-item,
.fa-page .fa-recommendation-grid .card-media {
    contain: paint;
}

.fa-page .fa-recommendation-grid .product-card {
    contain: layout paint style;
}

.fa-page .fa-result-primary > i:last-child {
    transition: transform 180ms var(--ease);
}

@media (hover: hover) and (pointer: fine) {
    .fa-page .fa-result-primary:hover > i:last-child { transform: translateY(3px); }
}

.fa-recommendation-grid.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
}

.fa-page .fa-recommendation-grid .product-card {
    min-width: 0;
    height: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas:
        "media"
        "body";
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 14px;
    background: #151519;
    overflow: hidden;
    box-shadow: none;
}

.fa-page .fa-recommendation-grid .card-media-link {
    grid-area: media;
    min-width: 0;
}

.fa-page .fa-recommendation-grid .card-media {
    aspect-ratio: 4 / 3;
    min-height: 0;
    background: #f4f3ef;
}

.fa-page .fa-recommendation-grid .card-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.fa-page .fa-recommendation-grid .card-body {
    grid-area: body;
    min-width: 0;
    padding: 14px 14px 15px;
}

/* Keep the top-left body rail clear for the wishlist control. */
.fa-page .fa-recommendation-grid .card-title-link {
    display: block;
    padding-left: 50px;
}

.fa-page .fa-recommendation-grid .brand-name {
    margin-bottom: 4px;
    color: #918568;
    font-size: .68rem;
    font-weight: 500;
}

.fa-page .fa-recommendation-grid .card-title-link h3 {
    min-height: 2.9em;
    margin: 0 0 8px;
    color: #f2efe8;
    font-size: .88rem;
    font-weight: 600;
    line-height: 1.55;
}

.fa-page .fa-recommendation-grid .card-meta {
    min-height: 20px;
    margin-bottom: 8px;
    gap: 10px;
    flex-wrap: wrap;
}

.fa-page .fa-recommendation-grid .rating,
.fa-page .fa-recommendation-grid .fast-shipping {
    font-size: .66rem;
}

.fa-page .fa-recommendation-grid .countdown {
    min-height: 24px;
    margin-bottom: 8px;
    padding: 5px 8px;
    border: 1px solid rgba(184, 80, 63, .2);
    border-radius: 8px;
    background: rgba(184, 80, 63, .07);
    font-variant-numeric: tabular-nums;
}

.fa-page .fa-recommendation-grid .card-footer {
    gap: 10px;
    margin-top: auto;
}

.fa-page .fa-recommendation-grid .price {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fa-page .fa-recommendation-grid .discount-badge {
    flex: 0 0 auto;
    margin: 0;
}

.fa-page .fa-recommendation-grid .price-stack {
    min-width: 0;
}

.fa-page .fa-recommendation-grid .old-price {
    font-size: .66rem;
}

.fa-page .fa-recommendation-grid .new-price {
    color: var(--gold-light);
    font-size: .86rem;
    font-weight: 700;
    white-space: nowrap;
}

/* P2D5 — wishlist belongs to the card body, never on product photography. */
.fa-page .fa-recommendation-grid .wishlist-btn {
    grid-area: body;
    position: relative;
    inset: auto;
    inset-inline-start: auto;
    inset-inline-end: auto;
    z-index: 3;
    align-self: start;
    justify-self: left;
    width: 40px;
    height: 40px;
    margin: 14px 0 0 14px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 11px;
    background: rgba(31, 31, 36, .92);
    color: var(--gold);
    backdrop-filter: none;
}

.fa-page .fa-recommendation-grid .wishlist-btn:hover,
.fa-page .fa-recommendation-grid .wishlist-btn.is-active {
    border-color: rgba(201, 169, 97, .28);
    background: rgba(201, 169, 97, .08);
    color: var(--gold-light);
}

.fa-page .fa-recommendation-grid .quick-add-btn {
    width: 36px;
    height: 36px;
    border-radius: 9px;
}

.fa-page .fa-recommendation-empty {
    grid-column: 1 / -1;
}

/* P2E3B — viewport-level wishlist feedback toast.
   Shared product-list.js keeps timing/state authority; Face Shape owns only presentation. */
.fa-product-feedback[hidden] {
    display: none !important;
}

.fa-product-feedback {
    position: fixed;
    top: max(14px, env(safe-area-inset-top));
    left: 50%;
    right: auto;
    bottom: auto;
    z-index: 5000;
    display: flex;
    width: min(420px, calc(100vw - 32px));
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 11px 16px;
    border: 1px solid rgba(201, 169, 97, .24);
    border-radius: 14px;
    background: #17171b;
    color: #f0ede5;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .34);
    direction: rtl;
    font-family: var(--font-fa);
    font-size: .75rem;
    font-weight: 600;
    line-height: 1.8;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate3d(-50%, -12px, 0);
    transition: opacity 180ms var(--ease), transform 180ms var(--ease), visibility 180ms var(--ease);
}

.fa-product-feedback::before {
    display: none;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    place-items: center;
    border-radius: 50%;
    font-size: .8rem;
    font-weight: 700;
    line-height: 1;
}

.fa-product-feedback.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translate3d(-50%, 0, 0);
}

.fa-product-feedback.is-success {
    border-color: rgba(201, 169, 97, .38);
    color: #f3ead4;
}

.fa-product-feedback.is-success::before {
    content: "✓";
    display: grid;
    border: 1px solid rgba(201, 169, 97, .32);
    background: rgba(201, 169, 97, .1);
    color: var(--gold-light);
}

.fa-product-feedback.is-error {
    border-color: rgba(239, 64, 86, .34);
    color: #f3bbc3;
}

.fa-product-feedback.is-error::before {
    content: "!";
    display: grid;
    border: 1px solid rgba(239, 64, 86, .32);
    background: rgba(239, 64, 86, .09);
    color: #f09aa6;
}

@media (hover: hover) and (pointer: fine) {
    .fa-page .fa-recommendation-grid .product-card {
        transition: transform 180ms var(--ease), border-color 180ms var(--ease), box-shadow 180ms var(--ease);
    }
    .fa-page .fa-recommendation-grid .product-card:hover {
        transform: translateY(-3px);
        border-color: rgba(201, 169, 97, .28);
        box-shadow: 0 14px 34px rgba(0, 0, 0, .16);
    }
}

@media (max-width: 1100px) {
    .fa-recommendation-grid.product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 767.98px) {
    .fa-recommendation-grid.product-grid {
        display: flex;
        gap: 12px;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
        margin-inline: -16px;
        padding-inline: 16px;
        padding-bottom: 6px;
    }
    .fa-recommendation-grid.product-grid::-webkit-scrollbar { display: none; }
    .fa-page .fa-recommendation-grid .product-card {
        flex: 0 0 min(78vw, 300px);
        scroll-snap-align: start;
    }
    .fa-page .fa-recommendation-grid .card-media { aspect-ratio: 1 / .78; }
    .fa-page .fa-recommendation-grid .wishlist-btn {
        width: 38px;
        height: 38px;
        margin-top: 12px;
        margin-left: 12px;
    }
    .fa-page .fa-recommendation-grid .card-title-link { padding-left: 46px; }
    .fa-product-feedback {
        top: max(10px, env(safe-area-inset-top));
        bottom: auto;
        width: min(420px, calc(100vw - 24px));
    }
}

@media (prefers-reduced-motion: reduce) {
    .fa-page .fa-recommendation-grid .product-card { transition: none !important; }
}

@keyframes fa-float { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-8px) rotate(2deg); } }
@keyframes fa-spin { to { transform: rotate(360deg); } }
@keyframes fa-line-glide { 0% { transform: translateX(180%); } 50%, 100% { transform: translateX(-280%); } }
@keyframes fa-idle-scan {
    0%, 100% { transform: translate3d(0, 0, 0); opacity: 0; }
    14%, 86% { opacity: .8; }
    50% { transform: translate3d(0, var(--fa-idle-scan-travel), 0); }
}
@keyframes fa-scan-move {
    0%, 100% { transform: translate3d(0, 0, 0); opacity: 0; }
    12%, 88% { opacity: 1; }
    50% { transform: translate3d(0, var(--fa-active-scan-travel), 0); }
}
@keyframes fa-pulse { 0%, 100% { transform: scale(.97); opacity: .75; } 50% { transform: scale(1.03); opacity: 1; } }
@keyframes fa-preview-in { from { opacity: 0; transform: scale(.96) translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fa-button-shine { to { background-position: -200% 0; } }
@keyframes fa-result-enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fa-progress-indeterminate {
    0% { transform: translateX(180%); opacity: .45; }
    45% { opacity: 1; }
    100% { transform: translateX(-180%); opacity: .45; }
}

/* Desktop foundation: one coherent analysis workspace instead of stacked card surfaces.
   Scoped under .fa-page so legacy .fa-* rules in main.css cannot win by accident. */
@media (min-width: 992px) {
    .fa-page {
        padding-top: 38px;
        padding-bottom: 92px;
    }

    .fa-page .fa-container {
        max-width: 1240px;
    }

    .fa-page .fa-ambient--one { opacity: .34; }
    .fa-page .fa-ambient--two { opacity: .22; }

    .fa-page .fa-hero {
        grid-template-columns: minmax(0, 1fr) 148px;
        gap: 40px;
        max-width: 1180px;
        margin-bottom: 28px;
    }

    .fa-page .fa-hero-copy { max-width: 800px; }

    .fa-page .fa-eyebrow {
        margin-bottom: 9px;
        font-size: .74rem;
        font-weight: 700;
        letter-spacing: 0;
    }

    .fa-page .fa-hero h1 {
        max-width: 790px;
        font-size: clamp(2rem, 2.8vw, 2.8rem);
        font-weight: 700;
        line-height: 1.58;
        letter-spacing: 0;
    }

    .fa-page .fa-hero h1 em::after { display: none; }

    .fa-page .fa-hero-copy > p {
        max-width: 720px;
        margin: 12px 0 16px;
        font-size: .92rem;
        line-height: 1.95;
    }

    .fa-page .fa-trust-row { gap: 7px; }

    .fa-page .fa-trust-row span {
        min-height: 30px;
        padding: 4px 9px;
        border-color: rgba(255, 255, 255, .07);
        background: transparent;
        color: #aaa69e;
        font-size: .68rem;
    }

    .fa-page .fa-hero-mark {
        width: 136px;
        opacity: .84;
    }

    .fa-page .fa-hero-mark > i {
        font-size: 2.45rem;
        animation-duration: 6s;
    }

    .fa-page .fa-hero-ring--two { animation-duration: 28s; }

    .fa-page .fa-hero-mark small {
        inset-block-end: 20px;
        font-size: .5rem;
        letter-spacing: .06em;
    }

    .fa-page .fa-steps {
        max-width: 1180px;
        margin-bottom: 18px;
        padding: 0 8px;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        backdrop-filter: none;
    }

    .fa-page .fa-step { gap: 8px; color: #716d66; }

    .fa-page .fa-step-circle {
        width: 30px;
        height: 30px;
        border-color: rgba(255, 255, 255, .08);
        background: #18181d;
        color: #858078;
        font-size: .68rem;
    }

    .fa-page .fa-step b { font-size: .72rem; font-weight: 700; }
    .fa-page .fa-step small { color: #5f5b54; font-size: .59rem; }

    .fa-page .fa-step.active .fa-step-circle {
        border-color: rgba(201, 169, 97, .58);
        background: rgba(201, 169, 97, .12);
        color: var(--gold-light);
        box-shadow: none;
    }

    .fa-page .fa-step.done .fa-step-circle {
        border-color: rgba(107, 143, 113, .5);
        background: rgba(107, 143, 113, .12);
        color: #9fc0a5;
    }

    .fa-page .fa-step-line {
        margin-inline: 13px;
        background: rgba(255, 255, 255, .065);
    }

    .fa-page .fa-step-line i { opacity: .55; }

    .fa-page .fa-studio {
        grid-template-columns: minmax(318px, 350px) minmax(0, 1fr);
        max-width: 1180px;
        border-color: rgba(255, 255, 255, .085);
        border-radius: 20px;
        background: #141418;
        box-shadow: 0 24px 64px rgba(0, 0, 0, .24);
        backdrop-filter: none;
    }

    .fa-page .fa-control-panel,
    .fa-page .fa-preview-card { padding: 28px; }

    .fa-page .fa-control-panel {
        border-inline-end-color: rgba(255, 255, 255, .075);
        background: transparent;
    }

    .fa-page .fa-preview-card { background: transparent; }

    .fa-page .fa-panel-heading,
    .fa-page .fa-preview-head > div { gap: 10px; }

    .fa-page .fa-panel-number {
        min-width: 28px;
        height: 22px;
        margin-top: 1px;
        border: 0;
        background: rgba(201, 169, 97, .08);
        color: #b99a58;
        font-size: .58rem;
        letter-spacing: 0;
    }

    .fa-page .fa-panel-heading h2,
    .fa-page .fa-preview-head h2 {
        margin-bottom: 4px;
        font-size: 1rem;
        font-weight: 700;
    }

    .fa-page .fa-panel-heading p,
    .fa-page .fa-preview-head p {
        max-width: 42ch;
        font-size: .68rem;
        line-height: 1.75;
    }

    .fa-page .fa-upload-options { gap: 9px; margin-top: 20px; }

    .fa-page .fa-upload-option {
        min-height: 68px;
        padding: 10px 12px;
        border-color: rgba(255, 255, 255, .075);
        border-radius: 12px;
        background: rgba(255, 255, 255, .012);
        box-shadow: none;
    }

    .fa-page .fa-upload-option:hover {
        transform: translateY(-1px);
        border-color: rgba(201, 169, 97, .38);
        background: rgba(201, 169, 97, .035);
        box-shadow: none;
    }

    .fa-page .fa-option-icon {
        width: 42px;
        height: 42px;
        border-color: rgba(201, 169, 97, .16);
        border-radius: 11px;
        background: rgba(201, 169, 97, .07);
        font-size: 1rem;
    }

    .fa-page .fa-upload-option b { font-size: .76rem; font-weight: 700; }
    .fa-page .fa-upload-option small { font-size: .62rem; }

    .fa-page .fa-divider {
        margin: 22px 0 15px;
        color: #6d6962;
        font-size: .62rem;
    }

    .fa-page .fa-quality-grid { gap: 7px 16px; }

    .fa-page .fa-quality-grid > div {
        min-height: 44px;
        padding: 3px 0;
        border: 0;
        border-radius: 0;
        background: transparent;
    }

    .fa-page .fa-quality-icon {
        width: 27px;
        height: 27px;
        background: rgba(107, 143, 113, .08);
        font-size: .7rem;
    }

    .fa-page .fa-quality-grid b {
        color: #c4c0b7;
        font-size: .63rem;
        font-weight: 600;
    }

    .fa-page .fa-quality-grid small { color: #6f6b64; font-size: .54rem; }

    .fa-page .fa-privacy-note {
        gap: 8px;
        margin-top: 17px;
        padding: 13px 0 0;
        border: 0;
        border-top: 1px solid rgba(107, 143, 113, .16);
        border-radius: 0;
        background: transparent;
    }

    .fa-page .fa-privacy-note p {
        color: #817d75;
        font-size: .59rem;
        line-height: 1.75;
    }

    .fa-page .fa-privacy-note b { color: #9d9990; font-size: .62rem; }

    .fa-page .fa-preview-head { margin-bottom: 14px; }

    .fa-page .fa-preview-box:not(.has-files) {
        min-height: 430px;
        border-color: rgba(201, 169, 97, .25);
        border-radius: 16px;
        background-color: #121216;
        background-size: 40px 40px;
    }

    .fa-page .fa-preview-box:not(.has-files):hover,
    .fa-page .fa-preview-box:not(.has-files):focus-visible,
    .fa-page .fa-preview-box:not(.has-files).is-dragging {
        border-color: rgba(201, 169, 97, .64);
        box-shadow: inset 0 0 0 1px rgba(201, 169, 97, .055);
    }

    .fa-page .fa-empty-preview { max-width: 420px; padding: 28px; }

    .fa-page .fa-face-guide {
        width: 140px;
        height: 164px;
        margin-bottom: 18px;
    }

    .fa-page .fa-face-oval {
        width: 88px;
        height: 120px;
        background: rgba(201, 169, 97, .025);
    }

    .fa-page .fa-empty-preview strong {
        margin-bottom: 5px;
        font-size: .88rem;
        font-weight: 700;
    }

    .fa-page .fa-empty-preview > span { font-size: .7rem; }

    .fa-page .fa-empty-preview small {
        margin-top: 8px;
        color: #65615b;
        font-size: .57rem;
    }

    .fa-page .fa-action-row { margin-top: 14px; }

    .fa-page .fa-analyze-button {
        min-height: 55px;
        border-radius: 12px;
        font-size: .79rem;
        font-weight: 700;
    }

    .fa-page .fa-analyze-button:not(:disabled):hover {
        animation: none;
        transform: translateY(-1px);
    }

    .fa-page .fa-action-row > p {
        margin-top: 8px;
        color: #6f6b64;
        font-size: .59rem;
    }
}


@media (min-width: 992px) {
    .fa-page .fa-result-shell {
        grid-template-columns: minmax(300px, 390px) minmax(0, 1fr);
        gap: 0;
        padding: 0;
        overflow: hidden;
    }

    .fa-page .fa-result-visual {
        padding: 16px;
        border-inline-end: 1px solid var(--fa-line);
        background: #101014;
    }

    .fa-page .fa-result-photo-frame,
    .fa-page .fa-result-photo {
        height: 100%;
        min-height: 470px;
        max-height: 560px;
    }

    .fa-page .fa-result-summary { min-height: 502px; }
}


/* P2B - selected-photo stability (desktop)
   Keep user photos fully visible and prevent portrait uploads from stretching
   the whole analysis workspace vertically. */
@media (min-width: 992px) {
    .fa-page .fa-preview-box.has-files {
        height: clamp(400px, 42vw, 520px);
        min-height: 400px;
        grid-template-rows: minmax(0, 1fr);
        border-style: solid;
        border-color: rgba(201, 169, 97, .2);
        background: #101014;
    }

    .fa-page .fa-preview-box.has-files .fa-preview-item {
        height: 100%;
        min-height: 0;
        border: 1px solid rgba(255, 255, 255, .055);
        border-radius: 14px;
        background: #0d0d10;
        box-shadow: none;
    }

    .fa-page .fa-preview-box.has-files[data-count="1"] .fa-preview-item {
        width: min(100%, 520px);
        justify-self: center;
    }

    .fa-page .fa-preview-box.has-files .fa-preview-item img,
    .fa-page .fa-preview-box.has-files[data-count="2"] .fa-preview-item img,
    .fa-page .fa-preview-box.has-files[data-count="3"] .fa-preview-item img {
        width: 100%;
        height: 100%;
        min-height: 0;
        object-fit: contain;
        object-position: center;
        background: #0d0d10;
    }

    .fa-page .fa-preview-box.has-files .fa-preview-item::after {
        background: linear-gradient(180deg, rgba(0, 0, 0, .2), transparent 18%, transparent 82%, rgba(0, 0, 0, .2));
    }

    .fa-page .fa-preview-box.has-files .fa-preview-badge,
    .fa-page .fa-preview-box.has-files .fa-remove-image {
        backdrop-filter: none;
    }
}

@media (max-width: 991.98px) {
    .fa-page { padding-top: 30px; }
    .fa-hero { grid-template-columns: minmax(0, 1fr) 135px; gap: 24px; }
    .fa-hero-mark { width: 132px; }
    .fa-studio { grid-template-columns: minmax(280px, 330px) minmax(0, 1fr); }
    .fa-control-panel, .fa-preview-card { padding: 22px; }
    .fa-quality-grid { grid-template-columns: 1fr; }
    .fa-quality-grid > div { min-height: 48px; }
    .fa-preview-box { min-height: 420px; }
    .fa-preview-box[data-count="3"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fa-preview-box[data-count="3"] .fa-preview-item { grid-column: span 1; }
    .fa-preview-box[data-count="3"] .fa-preview-item:last-child { grid-column: 1 / -1; }
    .fa-preview-box[data-count="3"] .fa-preview-item img { min-height: 190px; }
}

@media (max-width: 767.98px) {
    .fa-page { padding: 26px 0 88px; }
    .fa-page .container { padding-inline: 16px; }
    .fa-hero { display: block; margin-bottom: 28px; }
    .fa-hero-mark { display: none; }
    .fa-hero h1 { font-size: clamp(1.85rem, 9vw, 2.55rem); line-height: 1.42; }
    .fa-hero-copy > p { margin: 11px 0 16px; font-size: .86rem; line-height: 1.9; }
    .fa-trust-row { gap: 6px; }
    .fa-trust-row span { padding: 3px 8px; font-size: .64rem; }
    .fa-steps { justify-content: space-between; margin-bottom: 18px; padding: 11px 12px; border-radius: 14px; }
    .fa-step { gap: 6px; }
    .fa-step-circle { width: 28px; height: 28px; font-size: .64rem; }
    .fa-step b { font-size: .63rem; }
    .fa-step small { display: none; }
    .fa-step-line { flex-basis: 30px; margin-inline: 6px; }
    .fa-studio { display: flex; flex-direction: column; border-radius: 18px; overflow: visible; }
    .fa-control-panel { border-inline-end: 0; border-block-end: 1px solid var(--fa-line); border-radius: 18px 18px 0 0; }
    .fa-preview-card { border-radius: 0 0 18px 18px; }
    .fa-quality-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fa-preview-box { min-height: 360px; }
    .fa-face-guide { transform: scale(.9); margin-bottom: 14px; }
    .fa-preview-box[data-count="2"] .fa-preview-item img { min-height: 310px; }
    .fa-preview-box[data-count="3"] .fa-preview-item img { min-height: 165px; }
    .fa-processing-card { padding: 30px 20px 26px; }
    .fa-processing-steps { gap: 10px; }
    .fa-processing-steps span { font-size: .53rem; }
}

@media (max-width: 480px) {
    .fa-eyebrow { font-size: .69rem; }
    .fa-hero h1 { font-size: 1.8rem; }
    .fa-trust-row span:last-child { display: none; }
    .fa-steps { padding-inline: 9px; }
    .fa-step { min-width: 0; }
    .fa-step b { white-space: nowrap; font-size: .57rem; }
    .fa-step-line { min-width: 9px; margin-inline: 4px; }
    .fa-control-panel, .fa-preview-card { padding: 18px 14px; }
    .fa-panel-heading h2, .fa-preview-head h2 { font-size: .9rem; }
    .fa-upload-option { min-height: 67px; padding: 9px; }
    .fa-option-icon { width: 40px; height: 40px; }
    .fa-upload-option b { font-size: .74rem; }
    .fa-upload-option small { font-size: .59rem; }
    .fa-quality-grid { gap: 6px; }
    .fa-quality-grid > div { grid-template-columns: 24px minmax(0, 1fr); column-gap: 5px; padding: 7px 6px; }
    .fa-quality-icon { width: 24px; height: 24px; font-size: .68rem; }
    .fa-quality-grid b { font-size: .61rem; }
    .fa-quality-grid small { font-size: .5rem; }
    .fa-preview-head { align-items: center; }
    .fa-reset-button { width: 31px; height: 31px; justify-content: center; padding: 0; border-radius: 50%; }
    .fa-reset-button { font-size: 0; }
    .fa-reset-button i { font-size: .75rem; }
    .fa-preview-box { min-height: 330px; border-radius: 14px; }
    .fa-empty-preview strong { font-size: .82rem; }
    .fa-empty-preview > span { font-size: .67rem; }
    .fa-empty-preview small { font-size: .52rem; }
    .fa-face-guide { width: 134px; height: 158px; }
    .fa-preview-box.has-files { grid-template-columns: 1fr; grid-auto-rows: auto; min-height: 0; }
    .fa-preview-box[data-count] .fa-preview-item { grid-column: 1; }
    .fa-preview-box[data-count] .fa-preview-item img { height: 300px; min-height: 0; }
    .fa-preview-box[data-count="2"] .fa-preview-item img,
    .fa-preview-box[data-count="3"] .fa-preview-item img { height: 220px; }
    .fa-analyze-button { min-height: 51px; padding-inline: 14px; font-size: .74rem; }
    .fa-action-row > p { font-size: .56rem; }
    .fa-scan-frame { transform: scale(.88); margin-bottom: 10px; }
    .fa-processing-steps span { max-width: 74px; line-height: 1.5; }
}

@media (max-width: 767.98px) {
    .fa-result-shell {
        gap: 0;
        margin-bottom: 34px;
        padding: 0;
        overflow: hidden;
        border-radius: 18px;
    }

    .fa-result-visual { padding: 12px 12px 0; }
    .fa-result-photo-frame { min-height: 300px; border-radius: 14px; }
    .fa-result-photo { min-height: 300px; max-height: 430px; }
    .fa-result-summary { padding: 22px 18px 20px; }
    .fa-result-head { gap: 14px; }
    .fa-result-icon { width: 48px; height: 48px; border-radius: 14px; font-size: 1.2rem; }
    .fa-result-description { margin-top: 15px; font-size: .82rem; line-height: 1.95; }
    .fa-result-commerce-note { margin-top: 18px; padding-top: 17px; }
    .fa-result-actions { flex-direction: column; }
    .fa-result-primary, .fa-result-secondary { width: 100%; min-height: 50px; }
    .fa-result-secondary { order: 2; }
    .fa-recommendations { margin-bottom: 34px; }
}

@media (max-width: 480px) {
    .fa-result-status { inset-block-start: 10px; inset-inline-start: 10px; min-height: 29px; font-size: .61rem; }
    .fa-result-shape { font-size: 2.25rem; }
    .fa-result-kicker { font-size: .65rem; }
    .fa-result-eyebrow { font-size: .7rem; }
    .fa-result-commerce-note { grid-template-columns: 38px minmax(0, 1fr); gap: 10px; }
    .fa-result-commerce-note > span { width: 38px; height: 38px; }
    .fa-result-commerce-note strong { font-size: .76rem; }
    .fa-result-commerce-note p { font-size: .67rem; }
    .fa-recommendations-head h2 { font-size: 1.17rem; }
}

/* P2E1 — mobile-first polish
   Keep the flagship flow compact, touch-friendly and cheap to paint. */
@media (max-width: 767.98px) {
    .fa-page {
        padding-block-start: 22px;
        padding-block-end: calc(88px + env(safe-area-inset-bottom));
    }

    .fa-page .fa-ambient { display: none; }
    .fa-page .fa-container { padding-inline: 14px; }

    .fa-page .fa-hero { margin-bottom: 22px; }
    .fa-page .fa-hero h1 {
        font-size: clamp(1.72rem, 8vw, 2.22rem);
        line-height: 1.5;
    }
    .fa-page .fa-hero-copy > p {
        margin: 9px 0 13px;
        font-size: .82rem;
        line-height: 1.85;
    }

    .fa-page .fa-trust-row {
        flex-wrap: nowrap;
        gap: 7px;
        margin-inline: -14px;
        padding-inline: 14px;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
    }
    .fa-page .fa-trust-row::-webkit-scrollbar { display: none; }
    .fa-page .fa-trust-row span {
        flex: 0 0 auto;
        scroll-snap-align: start;
    }

    .fa-page .fa-steps {
        margin-bottom: 14px;
        padding: 6px 2px 12px;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        backdrop-filter: none;
    }

    .fa-page .fa-studio {
        border-radius: 16px;
        box-shadow: none;
        backdrop-filter: none;
    }
    .fa-page .fa-control-panel,
    .fa-page .fa-preview-card { padding: 18px 14px; }
    .fa-page .fa-upload-option {
        min-height: 64px;
        border-radius: 12px;
        box-shadow: none;
    }
    .fa-page .fa-preview-box:not(.has-files) { min-height: 320px; }

    /* Screenshot QA: keep selected uploads bounded at every mobile width. */
    .fa-page .fa-preview-box.has-files {
        min-height: 0;
    }
    .fa-page .fa-preview-box.has-files[data-count="1"] {
        display: block;
        padding: 7px;
    }
    .fa-page .fa-preview-box.has-files[data-count="1"] .fa-preview-item {
        width: 100%;
        height: clamp(300px, 92vw, 400px);
    }
    /* P2E1B — mirror the approved desktop multi-photo composition on mobile.
       Two or three selected photos stay visible together; no horizontal swipe rail. */
    .fa-page .fa-preview-box.has-files[data-count="2"],
    .fa-page .fa-preview-box.has-files[data-count="3"] {
        display: grid;
        min-height: 0;
        align-items: stretch;
        gap: 6px;
        padding: 7px;
        overflow: hidden;
        overscroll-behavior: auto;
        scroll-snap-type: none;
    }
    .fa-page .fa-preview-box.has-files[data-count="2"] {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .fa-page .fa-preview-box.has-files[data-count="3"] {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .fa-page .fa-preview-box.has-files[data-count="2"] .fa-preview-item,
    .fa-page .fa-preview-box.has-files[data-count="3"] .fa-preview-item {
        width: 100%;
        min-width: 0;
        grid-column: auto;
        scroll-snap-align: none;
    }
    .fa-page .fa-preview-box.has-files[data-count="2"] .fa-preview-item {
        height: clamp(220px, 62vw, 270px);
    }
    .fa-page .fa-preview-box.has-files[data-count="3"] .fa-preview-item {
        height: clamp(180px, 50vw, 220px);
    }
    .fa-page .fa-preview-box.has-files[data-count] .fa-preview-item img {
        width: 100%;
        height: 100%;
        min-height: 0;
        object-fit: contain;
        object-position: center;
    }
    .fa-page .fa-preview-badge,
    .fa-page .fa-remove-image {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(12, 12, 15, .9);
    }

    .fa-processing-overlay {
        background: rgba(8, 8, 10, .96);
        backdrop-filter: none;
    }
    .fa-processing-card {
        width: min(94vw, 430px);
        border-radius: 20px;
        box-shadow: 0 20px 56px rgba(0, 0, 0, .42);
    }

    .fa-page .fa-result-shell {
        margin-bottom: 30px;
        border-radius: 16px;
        box-shadow: none;
    }
    .fa-page .fa-result-visual { padding: 10px 10px 0; }
    .fa-page .fa-result-photo-frame {
        min-height: 0;
        aspect-ratio: 4 / 5;
        border-radius: 13px;
    }
    .fa-page .fa-result-photo {
        min-height: 0;
        max-height: none;
        aspect-ratio: 4 / 5;
        object-position: center 32%;
    }
    .fa-page .fa-result-summary { padding: 20px 16px 18px; }
    .fa-page .fa-result-shape { font-size: clamp(2rem, 10vw, 2.55rem); }
    .fa-page .fa-result-description {
        margin-top: 13px;
        font-size: .8rem;
        line-height: 1.9;
    }
    .fa-page .fa-result-commerce-note {
        margin-top: 16px;
        padding-top: 15px;
    }
    .fa-page .fa-result-actions {
        gap: 8px;
        margin-top: 18px;
    }

    .fa-page .fa-recommendations {
        margin-bottom: 28px;
        scroll-margin-top: 76px;
    }
    .fa-page .fa-recommendations-head { margin-bottom: 14px; }
    .fa-page .fa-recommendations-head h2 {
        margin-top: 5px;
        font-size: 1.13rem;
        line-height: 1.65;
    }
    .fa-page .fa-recommendations-head p {
        font-size: .7rem;
        line-height: 1.75;
    }

    .fa-page .fa-recommendation-grid.product-grid {
        gap: 10px;
        margin-inline: -14px;
        padding-inline: 14px;
        padding-bottom: 8px;
        scroll-padding-inline: 14px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }
    .fa-page .fa-recommendation-grid .product-card {
        flex: 0 0 min(82vw, 286px);
        scroll-snap-align: start;
        border-radius: 13px;
    }
    .fa-page .fa-recommendation-grid .card-body { padding: 12px 12px 13px; }
    .fa-page .fa-recommendation-grid .brand-name { font-size: .64rem; }
    .fa-page .fa-recommendation-grid .card-title-link h3 {
        margin-bottom: 7px;
        font-size: .84rem;
    }
    .fa-page .fa-recommendation-grid .wishlist-btn {
        width: 38px;
        height: 38px;
        margin: 12px 0 0 12px;
    }
    .fa-page .fa-recommendation-grid .card-title-link { padding-left: 44px; }

    .fa-product-feedback {
        top: max(10px, env(safe-area-inset-top));
        bottom: auto;
        width: calc(100vw - 24px);
        max-width: 420px;
        min-height: 46px;
        padding: 10px 13px;
        border-radius: 12px;
        font-size: .7rem;
        box-shadow: 0 10px 28px rgba(0, 0, 0, .32);
    }

    /* Keep global floating controls from covering the flagship flow. */
    body:has(.fa-page) .back-to-top { display: none !important; }
    body:has(.fa-page) #supportNudge.support-nudge { display: none !important; }
    body:has(.fa-page) #supportFab.support-fab {
        inset-inline-start: 8px;
        bottom: calc(76px + env(safe-area-inset-bottom));
        width: 44px;
        min-width: 44px;
        height: 44px;
        min-height: 44px;
        padding: 2px;
        border-radius: 50%;
        box-shadow: 0 7px 22px rgba(0, 0, 0, .34);
    }
    body:has(.fa-page) #supportFab .support-fab-icon {
        width: 38px;
        height: 38px;
    }
    body:has(.fa-page) #supportFab .support-fab-pulse { display: none; }
    body:has(.fa-page) .site-footer { margin-top: 24px; }
}

@media (max-width: 480px) {
    .fa-page .fa-preview-box.has-files[data-count="1"] .fa-preview-item {
        height: clamp(290px, 96vw, 360px);
    }
    .fa-page .fa-preview-box.has-files[data-count="2"] .fa-preview-item {
        height: clamp(210px, 62vw, 245px);
    }
    .fa-page .fa-preview-box.has-files[data-count="3"] .fa-preview-item {
        height: clamp(172px, 49vw, 205px);
    }
}

@supports (content-visibility: auto) {
    .fa-page .fa-recommendations {
        content-visibility: auto;
        contain-intrinsic-size: auto 520px;
    }
}

/* P2E2 — progressive result reveal. JS enables this only when IntersectionObserver
   exists and reduced motion is not requested, so content never depends on animation. */
.fa-page.fa-result-motion .fa-recommendations-head,
.fa-page.fa-result-motion .fa-recommendation-grid {
    opacity: 0;
    transform: translate3d(0, 10px, 0);
}

.fa-page.fa-result-motion .fa-recommendations.is-visible .fa-recommendations-head,
.fa-page.fa-result-motion .fa-recommendations.is-visible .fa-recommendation-grid {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    transition: opacity 320ms var(--ease), transform 320ms var(--ease);
}

.fa-page.fa-result-motion .fa-recommendations.is-visible .fa-recommendation-grid {
    transition-delay: 55ms;
}

@media (hover: none) {
    .fa-upload-option:hover,
    .fa-analyze-button:not(:disabled):hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .fa-hero-mark > i,
    .fa-hero-ring--two,
    .fa-step-line i,
    .fa-idle-scan,
    .fa-face-orbit,
    .fa-scan-line,
    .fa-processing-progress span,
    .fa-result-shell { animation: none !important; }
    .fa-idle-scan, .fa-scan-line { top: 50%; transform: none; opacity: .65; }
    .fa-processing-progress span { width: 72%; transform: none; opacity: .8; }
    .fa-page.fa-result-motion .fa-recommendations-head,
    .fa-page.fa-result-motion .fa-recommendation-grid {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    .fa-product-feedback {
        transition: none !important;
    }
}
