@media (min-width: 1800px) and (min-height: 3000px) and (orientation: portrait) { .modal-shell { box-shadow: 0 0 160px rgba(0,0,0,.84); } }
@media (min-width: 3000px) and (min-height: 1800px) and (orientation: landscape) { .modal-shell { height: 100dvh; width: calc(100dvh * 5 / 9); } }
@media (orientation: portrait) {
    .portrait-dialog { overflow-y: auto; }
    .modal-shell {
        width: min(calc(100vw - 28px), 920px);
        height: auto;
        min-height: calc(100dvh - 28px);
        aspect-ratio: auto;
        max-height: none;
    }
    .modal-header {
        left: clamp(18px, 4vw, 42px);
        right: clamp(18px, 4vw, 42px);
        top: clamp(18px, 4vw, 34px);
        height: 46px;
    }
    .modal-logo { width: clamp(132px, 24vw, 180px); }
    .icon-button {
        width: 42px;
        height: 42px;
        padding: 9px;
        border: 1px solid var(--nanno-border);
        background: rgba(5,5,5,.56);
    }
    .stepper {
        left: 50%;
        top: clamp(76px, 10dvh, 112px);
        width: 160px;
        height: 32px;
    }
    .stepper-line {
        left: 28px;
        right: 28px;
        height: 1px;
    }
    .step {
        width: 32px;
        height: 32px;
        border-width: 1px;
        font-size: 15px;
    }

    [data-screen="capture"].flow-screen.is-active {
        padding-top: clamp(124px, 15dvh, 158px);
    }
    [data-screen="capture"] .flow-title {
        font-size: clamp(34px, 7vw, 60px);
        max-width: 760px;
    }
    [data-screen="capture"] .flow-subtitle {
        font-size: clamp(14px, 2.25vw, 18px);
    }
    [data-screen="capture"] .camera-frame {
        width: min(100%, 70vw, 34dvh, 520px);
    }
    [data-screen="capture"] .screen-actions {
        width: min(100%, 430px);
    }

    .results-screen .eyebrow { top: 27cqw; }
    .results-screen .flow-title { top: 32cqw; font-size: 5cqw; line-height: 1.05; }
    .results-screen .flow-subtitle { top: 44cqw; padding: 0 4cqw; font-size: 3cqw; line-height: 1.15; }
    .result-grid {
        left: 6.2cqw;
        top: 52cqw;
        width: 84.8cqw;
        height: auto;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: repeat(3, 23.8cqw);
        gap: 1.55cqw;
    }
    .result-card {
        height: 23.8cqw;
        display: block;
        border-color: rgba(10,186,181,.62);
        border-radius: 0;
    }
    .result-card-img-wrapper {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        overflow: hidden;
    }
    .result-card img { object-position: center 30%; }
    .result-card-img-wrapper::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 42%;
        z-index: 3;
        pointer-events: none;
        background: linear-gradient(to top, rgba(5,5,5,.98), rgba(5,5,5,.82) 58%, rgba(5,5,5,0));
    }
    .result-caption {
        position: absolute;
        left: 2.7cqw;
        right: 11cqw;
        bottom: 1.55cqw;
        z-index: 5;
        min-height: 0;
        padding: 0 0 0 1.8cqw;
        display: block;
        border: 0;
        border-left: .38cqw solid var(--cyan);
        background: transparent;
        font-size: 2.7cqw;
        line-height: 1;
        text-align: left;
    }
    .result-caption::after {
        content: "NANNOVATIVE AI LAB PORTRAIT";
        display: block;
        margin-top: .55cqw;
        color: var(--cyan);
        font-size: 1.25cqw;
        line-height: 1;
        font-weight: 700;
        letter-spacing: 0;
        text-transform: uppercase;
    }
    .selection-mark {
        width: 7.4cqw;
        height: 7.4cqw;
        font-size: 4.6cqw;
    }
    .section-divider {
        left: 6.5cqw;
        right: 6.5cqw;
        top: 130cqw;
        gap: 1.6cqw;
        font-size: 2.85cqw;
        line-height: .95;
        text-align: center;
    }
    .results-screen form {
        left: 7.5cqw;
        right: 7.5cqw;
        top: 137.5cqw;
        height: 70cqw;
    }
    .field-group { height: 13cqw; }
    .field-group:nth-child(1) { top: 0; }
    .field-group:nth-child(2) { top: 12.8cqw; }
    .field-group:nth-child(3) { top: 25.6cqw; }
    .field-group label { height: 4cqw; font-size: 2.9cqw; line-height: 1; }
    .field-group input { height: 8.2cqw; padding: 0 3cqw; font-size: 2.9cqw; }
    .terms-row { gap: 1.7cqw; padding-right: 0; font-size: 2.05cqw; line-height: 1.12; }
    .terms-row.terms-1 { top: 39.2cqw; }
    .terms-row.terms-2 { top: 50.2cqw; }
    .terms-copy { font-size: 2.5cqw; }
    .custom-checkbox { flex-basis: 4.7cqw; width: 4.7cqw; height: 4.7cqw; font-size: 3.2cqw; }
    .results-screen form > .primary-button { top: 60cqw; height: 10.2cqw; font-size: 3.75cqw; }
    .results-screen form > .primary-button svg { width: 5cqw; height: 5cqw; }
    .back-button { top: 211.8cqw; padding: 0; font-size: 3cqw; }
}

@media (orientation: portrait) and (min-width: 900px) {
    [data-screen="capture"].flow-screen.is-active {
        padding-top: 150px;
        gap: 24px;
    }
    [data-screen="capture"] .flow-title {
        font-size: clamp(58px, 6.4vw, 74px);
    }
    [data-screen="capture"] .flow-subtitle {
        font-size: clamp(17px, 1.9vw, 21px);
        max-width: 700px;
    }
    [data-screen="capture"] .camera-frame {
        width: min(100%, 64vw, 38dvh, 640px);
    }
}

@media (orientation: portrait) and (min-width: 520px) and (max-width: 900px) {
    .experience-shell { padding: 14px; }
    .poster-frame {
        width: min(calc(100vw - 28px), calc(100dvh * .72));
        height: auto;
        aspect-ratio: 3 / 4;
    }
}

@media (min-width: 900px) and (orientation: landscape) {
    .portrait-dialog[open] { display: flex; align-items: center; justify-content: center; padding: 16px; }
    .modal-shell {
        width: min(1760px, calc(100vw - 32px));
        height: min(960px, calc(100dvh - 32px));
        max-height: none;
        aspect-ratio: auto;
        container-type: normal;
        background:
            linear-gradient(90deg, rgba(5,5,5,.98) 0 42%, rgba(5,5,5,.84) 58%, rgba(5,5,5,.42) 100%),
            linear-gradient(180deg, rgba(10,186,181,.1), rgba(5,5,5,.94)),
            var(--nanno-modal-bg-url, url("/static/images/modal-lab-bg.jpg")) right center / 52% 100% no-repeat;
    }
    .modal-shell::before {
        inset: 18px;
        border-left: 1px solid rgba(10,186,181,.54);
        border-right: 1px solid rgba(10,186,181,.24);
        background:
            linear-gradient(rgba(48,55,57,.38) 1px, transparent 1px) 0 80px / 100% 160px,
            linear-gradient(90deg, rgba(48,55,57,.32) 1px, transparent 1px) 120px 0 / 240px 100%;
    }
    .modal-shell::after { display: none; }
    .decorative-layer { opacity: .42; }
    .modal-header { left: 40px; right: 40px; top: 28px; height: 54px; }
    .modal-logo { width: 180px; }
    .icon-button { width: 44px; height: 44px; padding: 10px; border: 1px solid var(--nanno-border); background: rgba(5,5,5,.56); }
    .stepper { left: 50%; top: 48px; width: 168px; height: 34px; }
    .stepper-line { left: 30px; right: 30px; height: 1px; }
    .step { width: 34px; height: 34px; border-width: 1px; font-size: 16px; }
    .flow-title {
        left: 48px;
        right: 52%;
        top: 136px;
        font-size: clamp(48px, 5vw, 76px);
        line-height: .95;
        white-space: normal;
        text-align: left;
    }
    .flow-subtitle {
        left: 52px;
        right: 56%;
        top: 300px;
        font-size: clamp(17px, 1.4vw, 22px);
        line-height: 1.55;
        text-align: left;
        color: var(--nanno-muted);
    }
    [data-screen="capture"].flow-screen.is-active {
        display: grid;
        grid-template-columns: minmax(340px, .9fr) minmax(360px, 1.08fr);
        grid-template-areas:
            "title camera"
            "subtitle camera"
            "status camera"
            "actions camera";
        grid-template-rows: auto auto auto auto;
        align-content: center;
        align-items: center;
        justify-items: start;
        column-gap: clamp(42px, 6vw, 88px);
        row-gap: 18px;
        padding: 112px clamp(48px, 5vw, 72px) 54px;
        overflow: hidden;
    }
    [data-screen="capture"] .flow-title {
        position: relative;
        left: auto;
        right: auto;
        top: auto;
        bottom: auto;
        max-width: 590px;
        font-size: clamp(46px, 4.4vw, 66px);
        line-height: 1.08;
        text-align: left;
        justify-self: stretch;
    }
    [data-screen="capture"] .flow-subtitle {
        position: relative;
        left: auto;
        right: auto;
        top: auto;
        bottom: auto;
        max-width: 500px;
        padding: 0;
        font-size: clamp(16px, 1.2vw, 20px);
        line-height: 1.45;
        text-align: left;
        justify-self: stretch;
    }
    [data-screen="generating"] .flow-title { top: auto; font-size: clamp(44px, 4.2vw, 70px); }
    [data-screen="generating"] .flow-subtitle { top: auto; font-size: clamp(16px, 1.2vw, 20px); padding: 0; }
    [data-screen="capture"] .camera-frame {
        justify-self: end;
        align-self: center;
        width: min(100%, 34vw, 520px);
        max-width: 520px;
        min-width: 340px;
        height: auto;
        max-height: calc(100dvh - 170px);
        padding: 18px;
    }
    .corner { width: 42px; height: 42px; }
    .corner-tl { border-width: 2px 0 0 2px; }
    .corner-tr { border-width: 2px 2px 0 0; }
    .corner-bl { border-width: 0 0 2px 2px; }
    .corner-br { border-width: 0 2px 2px 0; }
    .camera-overlay {
        left: 28px;
        right: 28px;
        bottom: 28px;
        height: auto;
        min-height: 74px;
        gap: 16px;
        padding: 14px 16px;
        font-size: 16px;
    }
    .camera-overlay svg { flex-basis: 34px; width: 34px; }
    .countdown-overlay { font-size: clamp(72px, 8vw, 116px); }
    [data-screen="capture"] .camera-status {
        justify-self: stretch;
        max-width: 500px;
    }
    [data-screen="capture"] .screen-actions {
        justify-self: stretch;
        width: min(100%, 420px);
    }
    .capture-secondary-actions { gap: 10px; margin-top: 16px; }
    .secure-processing-note { max-width: 360px; font-size: 13px; line-height: 1.35; }
    .primary-button { height: 64px; gap: 14px; font-size: 23px; border-width: 1px; }
    .primary-button svg { width: 26px; height: 26px; }
    .text-button { font-size: 16px; }
    .generator-wrap {
        left: auto;
        right: clamp(150px, 20vw, 300px);
        top: 210px;
        width: 250px;
        height: 250px;
        transform: none;
    }
    .generator-ring::before { inset: 20px; }
    .generator-ring::after {
        inset: 6px;
        -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 18px), #000 0);
        mask: radial-gradient(farthest-side, transparent calc(100% - 18px), #000 0);
    }
    .generation-list {
        left: auto;
        right: clamp(80px, 10vw, 170px);
        top: 500px;
        width: 410px;
        gap: 22px;
    }
    .generation-item { gap: 16px; font-size: 19px; }
    .task-icon { flex-basis: 28px; width: 28px; height: 28px; border-width: 2px; }
    .generation-item.is-complete .task-icon::after { font-size: 16px; }
    .privacy-note {
        left: 52px;
        right: auto;
        top: auto;
        bottom: 58px;
        justify-content: flex-start;
        gap: 16px;
        font-size: 18px;
        text-align: left;
    }
    .privacy-note svg { width: 28px; }
    .results-screen .flow-title {
        left: 48px;
        right: 48px;
        top: 104px;
        font-size: clamp(44px, 4vw, 62px);
        text-align: center;
    }
    .results-screen .flow-subtitle {
        left: 22%;
        right: 22%;
        top: 202px;
        padding: 0;
        font-size: 18px;
        text-align: center;
    }
    .result-grid {
        left: 48px;
        top: 270px;
        width: calc(100% - 560px);
        height: calc(100% - 360px);
        min-height: 310px;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 18px;
    }
    .result-card { border-width: 1px; }
    .selection-mark {
        width: 38px;
        height: 38px;
        border-left-width: 1px;
        border-bottom-width: 1px;
        font-size: 22px;
    }
    .result-caption {
        min-height: 72px;
        padding: 14px 12px;
        font-size: clamp(15px, 1.05vw, 18px);
        border-top-width: 1px;
    }
    .section-divider {
        left: auto;
        right: 48px;
        top: 270px;
        width: 430px;
        gap: 12px;
        font-size: 15px;
        letter-spacing: 0;
    }
    .section-divider::before,
    .section-divider::after { height: 1px; }
    .results-screen form {
        left: auto;
        right: 48px;
        top: 318px;
        width: 430px;
        height: auto;
    }
    .field-group { position: relative; height: auto; margin-bottom: 16px; }
    .field-group:nth-child(1),
    .field-group:nth-child(2),
    .field-group:nth-child(3) { top: auto; }
    .field-group label { height: auto; margin-bottom: 8px; font-size: 15px; }
    .field-group input {
        height: 48px;
        padding: 0 16px;
        border-width: 1px;
        font-size: 16px;
    }
    .terms-row {
        position: relative;
        top: auto;
        gap: 12px;
        margin: 14px 0 0;
        font-size: 13px;
        line-height: 1.35;
    }
    .terms-row.terms-1,
    .terms-row.terms-2 { top: auto; }
    .terms-copy { font-size: 13px; }
    .custom-checkbox {
        flex-basis: 24px;
        width: 24px;
        height: 24px;
        border-width: 1px;
        font-size: 16px;
    }
    .results-screen form > .primary-button {
        position: relative;
        top: auto;
        height: 58px;
        margin-top: 18px;
        font-size: 18px;
    }
    .results-screen form > .primary-button svg { width: 23px; height: 23px; }
    .back-button {
        left: 48px;
        right: auto;
        top: auto;
        bottom: 50px;
        font-size: 16px;
    }
    .success-toast {
        width: min(520px, calc(100% - 96px));
        padding: 20px 24px;
        gap: 8px;
        border-width: 1px;
    }
    .success-toast strong { font-size: 16px; letter-spacing: 0; }
    .success-toast span { font-size: 15px; }
}

@media (max-width: 650px) {
    .privacy-modal {
        width: calc(100vw - 20px);
        height: calc(100dvh - 20px);
    }
    .privacy-close-btn {
        top: max(10px, env(safe-area-inset-top));
        right: max(10px, env(safe-area-inset-right));
        width: 42px;
        height: 42px;
    }
    .modal-shell {
        width: 100vw;
        height: auto;
        min-height: 100dvh;
    }
    [data-screen="capture"].flow-screen.is-active {
        padding: 128px 16px 28px;
        gap: 12px;
    }
    [data-screen="capture"] .flow-title {
        font-size: clamp(32px, 9.4vw, 40px);
        max-width: 360px;
    }
    [data-screen="capture"] .flow-subtitle {
        max-width: 340px;
        font-size: 14px;
        line-height: 1.42;
    }
    [data-screen="capture"] .camera-frame {
        width: min(100%, 72vw, 42dvh, 320px);
    }
}

@media (max-width: 1100px) {
    .portrait-dialog,
    .experience-shell,
    .modal-shell,
    .flow-screen,
    [data-screen="capture"].flow-screen.is-active {
        max-width: 100%;
    }
    .flow-title,
    [data-screen="capture"] .flow-title,
    [data-screen="capture"] .flow-subtitle,
    .screen-actions,
    .capture-secondary-actions,
    .secure-processing-note {
        max-width: 100%;
    }
}

@media (min-width: 769px) and (max-width: 1100px) {
    .modal-shell {
        width: min(calc(100vw - 32px), 960px);
        max-width: calc(100vw - 32px);
    }
    [data-screen="capture"].flow-screen.is-active {
        padding-left: clamp(28px, 5vw, 52px);
        padding-right: clamp(28px, 5vw, 52px);
    }
    [data-screen="capture"] .flow-title {
        max-width: min(100%, 720px);
        font-size: clamp(46px, 5.8vw, 64px);
        line-height: 1.05;
    }
    [data-screen="capture"] .flow-subtitle {
        max-width: min(100%, 650px);
    }
}

@media (min-width: 769px) and (max-width: 1100px) and (orientation: portrait) {
    .modal-header {
        top: 28px;
        height: 50px;
    }
    .modal-logo { width: clamp(144px, 20vw, 178px); }
    .stepper {
        top: clamp(88px, 8dvh, 106px);
        width: 158px;
        height: 32px;
    }
    [data-screen="capture"].flow-screen.is-active {
        padding-top: clamp(148px, 12dvh, 166px);
        gap: clamp(16px, 1.9dvh, 24px);
    }
    [data-screen="capture"] .camera-frame {
        width: min(100%, 60vw, 36dvh, 560px);
    }
}

@media (max-width: 768px) {
    .portrait-dialog[open] {
        display: block;
        width: 100%;
        height: 100dvh;
        padding: 0;
        overflow: hidden;
    }
    .modal-shell {
        width: 100%;
        max-width: 100%;
        height: 100dvh;
        min-height: 100dvh;
        aspect-ratio: auto;
        overflow: hidden;
    }
    .modal-header {
        left: clamp(16px, 4vw, 28px);
        right: clamp(16px, 4vw, 28px);
        top: clamp(16px, 3dvh, 24px);
        height: 44px;
    }
    .modal-logo { width: clamp(126px, 23vw, 156px); }
    .icon-button {
        width: 40px;
        height: 40px;
        padding: 8px;
    }
    .stepper {
        top: clamp(72px, 8.8dvh, 92px);
        width: 148px;
        height: 30px;
    }
    .stepper-line { left: 26px; right: 26px; }
    .step {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
    [data-screen="capture"].flow-screen.is-active {
        padding: clamp(132px, 15dvh, 150px) clamp(18px, 4vw, 32px) 30px;
        gap: clamp(12px, 1.7dvh, 18px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    [data-screen="capture"] .flow-title {
        width: min(100%, 640px);
        max-width: min(100%, 640px);
        font-size: clamp(34px, 6.4vw, 50px);
        line-height: 1.05;
    }
    [data-screen="capture"] .flow-subtitle {
        width: min(100%, 560px);
        max-width: min(100%, 560px);
        font-size: clamp(14px, 2.2vw, 16px);
        line-height: 1.45;
    }
    [data-screen="capture"] .camera-frame {
        width: min(100%, 58vw, 36dvh, 440px);
        max-width: 100%;
        padding: clamp(10px, 2.4vw, 16px);
    }
    [data-screen="capture"] .screen-actions {
        width: min(100%, 390px);
    }
    .primary-button {
        min-height: 54px;
        height: clamp(54px, 6dvh, 62px);
        font-size: clamp(18px, 3.6vw, 22px);
    }
    .secure-processing-note {
        max-width: 320px;
    }
}

@media (max-width: 768px) and (orientation: landscape) {
    .modal-shell {
        background:
            linear-gradient(180deg, rgba(5,5,5,.98), rgba(5,5,5,.9)),
            linear-gradient(90deg, rgba(10,186,181,.1), transparent),
            var(--nanno-modal-bg-url, url("/static/images/modal-lab-bg.jpg")) right center / 54% 100% no-repeat;
    }
    [data-screen="capture"].flow-screen.is-active {
        padding-top: clamp(106px, 19dvh, 122px);
        padding-bottom: 28px;
    }
    [data-screen="capture"] .flow-title {
        max-width: min(100%, 560px);
        font-size: clamp(30px, 5.6vw, 42px);
        line-height: 1.05;
    }
    [data-screen="capture"] .flow-subtitle {
        max-width: min(100%, 520px);
        font-size: clamp(13px, 2vw, 15px);
    }
    [data-screen="capture"] .camera-frame {
        width: min(100%, 52vw, 48dvh, 300px);
    }
}

@media (max-width: 540px) {
    .modal-header {
        top: 14px;
        height: 40px;
    }
    .modal-logo { width: clamp(112px, 33vw, 140px); }
    .icon-button {
        width: 38px;
        height: 38px;
        padding: 8px;
    }
    .stepper {
        top: 64px;
        width: 136px;
        height: 30px;
    }
    [data-screen="capture"].flow-screen.is-active {
        padding: 112px 16px 24px;
        gap: 12px;
    }
    [data-screen="capture"] .flow-title {
        width: min(100%, 460px);
        font-size: clamp(30px, 8.8vw, 38px);
        line-height: 1.05;
    }
    [data-screen="capture"] .flow-subtitle {
        width: min(100%, 430px);
        font-size: 14px;
    }
    [data-screen="capture"] .camera-frame {
        width: min(100%, 66vw, 36dvh, 320px);
    }
    .camera-overlay {
        left: 14px;
        right: 14px;
        bottom: 14px;
        min-height: 52px;
        font-size: 12px;
    }
    .screen-actions {
        width: min(100%, 360px);
    }
}

@media (max-width: 380px) {
    .modal-header {
        left: 14px;
        right: 14px;
        top: 12px;
    }
    .modal-logo { width: 112px; }
    .stepper {
        top: 58px;
        width: 128px;
        height: 28px;
    }
    .stepper-line { left: 24px; right: 24px; }
    .step {
        width: 28px;
        height: 28px;
        font-size: 13px;
    }
    [data-screen="capture"].flow-screen.is-active {
        padding: 104px 14px 22px;
        gap: 10px;
    }
    [data-screen="capture"] .flow-title {
        width: min(100%, 340px);
        font-size: clamp(28px, 8.6vw, 34px);
        line-height: 1.06;
    }
    [data-screen="capture"] .flow-subtitle {
        width: min(100%, 330px);
        font-size: 13px;
        line-height: 1.4;
    }
    [data-screen="capture"] .camera-frame {
        width: min(100%, 68vw, 34dvh, 290px);
        padding: 10px;
    }
    .primary-button {
        min-height: 52px;
        height: 52px;
        font-size: 18px;
    }
    .secure-processing-note {
        max-width: 290px;
        font-size: 12px;
    }
}

@media (max-height: 700px) {
    .portrait-dialog[open] {
        display: block;
        width: 100%;
        height: 100dvh;
        padding: 0;
        overflow: hidden;
    }
    .modal-shell {
        width: 100%;
        max-width: 100%;
        height: 100dvh;
        min-height: 100dvh;
        aspect-ratio: auto;
        overflow: hidden;
    }
    .modal-header {
        top: 12px;
        height: 40px;
    }
    .modal-logo { width: clamp(108px, 24vw, 142px); }
    .icon-button {
        width: 38px;
        height: 38px;
        padding: 8px;
    }
    .stepper {
        top: 58px;
        width: 136px;
        height: 30px;
    }
    [data-screen="capture"].flow-screen.is-active {
        padding-top: 104px;
        padding-bottom: 24px;
        gap: 10px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    [data-screen="capture"] .flow-title {
        max-width: min(100%, 560px);
        font-size: clamp(28px, 7.4vw, 36px);
        line-height: 1.05;
    }
    [data-screen="capture"] .flow-subtitle {
        max-width: min(100%, 520px);
        font-size: 13px;
        line-height: 1.38;
    }
    [data-screen="capture"] .camera-frame {
        width: min(100%, 68vw, 42dvh, 320px);
        padding: 10px;
    }
    .camera-overlay {
        left: 12px;
        right: 12px;
        bottom: 12px;
        min-height: 48px;
        padding: 9px 10px;
        font-size: 12px;
    }
    .camera-overlay svg {
        flex-basis: 24px;
        width: 24px;
    }
    .primary-button {
        min-height: 52px;
        height: 52px;
    }
    .capture-secondary-actions {
        gap: 8px;
        margin-top: 10px;
    }
}

@media (max-height: 560px) {
    .modal-header {
        top: 10px;
        height: 36px;
    }
    .modal-logo { width: clamp(102px, 22vw, 132px); }
    .icon-button {
        width: 36px;
        height: 36px;
        padding: 7px;
    }
    .stepper {
        top: 52px;
        width: 128px;
        height: 28px;
    }
    .stepper-line { left: 24px; right: 24px; }
    .step {
        width: 28px;
        height: 28px;
        font-size: 13px;
    }
    [data-screen="capture"].flow-screen.is-active {
        padding-top: 92px;
        gap: 9px;
    }
    [data-screen="capture"] .flow-title {
        font-size: clamp(27px, 5vw, 32px);
        max-width: min(100%, 520px);
    }
    [data-screen="capture"] .flow-subtitle {
        font-size: 12px;
        line-height: 1.35;
    }
    [data-screen="capture"] .camera-frame {
        width: min(100%, 54vw, 46dvh, 280px);
    }
    .primary-button {
        min-height: 50px;
        height: 50px;
        font-size: 17px;
    }
    .text-button { font-size: 14px; }
    .secure-processing-note { font-size: 12px; }
}

@media (max-height: 560px) and (orientation: landscape) {
    [data-screen="capture"] .flow-title {
        max-width: min(100%, 540px);
    }
    [data-screen="capture"] .camera-frame {
        width: min(100%, 52vw, 46dvh, 280px);
    }
}

/* Phase 1.5: result/email step layout hardening */
.results-screen.flow-screen.is-active {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
        "title"
        "subtitle"
        "gallery"
        "divider"
        "form"
        "back";
    align-content: start;
    align-items: start;
    justify-items: center;
    gap: clamp(12px, 1.8dvh, 20px);
    width: 100%;
    max-width: 100%;
    padding: clamp(126px, 14dvh, 156px) clamp(16px, 4vw, 40px) clamp(28px, 5dvh, 56px);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    text-align: center;
}

.results-screen .flow-title {
    position: relative;
    grid-area: title;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    width: min(100%, 940px);
    max-width: 100%;
    font-size: clamp(34px, 7.2vw, 62px);
    line-height: 1.05;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
    text-align: center;
    justify-self: center;
}

.results-screen .flow-title span,
.results-screen .flow-title strong {
    display: inline;
    margin-right: 0;
}

.results-screen .flow-subtitle {
    position: relative;
    grid-area: subtitle;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    width: min(100%, 680px);
    max-width: 100%;
    padding: 0;
    color: var(--nanno-muted);
    font-size: clamp(14px, 2.2vw, 18px);
    line-height: 1.45;
    text-align: center;
    justify-self: center;
}

.result-grid {
    --result-card-min: 154px;
    --result-grid-gap: clamp(12px, 1.8vw, 18px);
    position: relative;
    grid-area: gallery;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    width: min(100%, 800px);
    max-width: 100%;
    height: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    gap: var(--result-grid-gap);
    min-height: calc((var(--result-card-min) * 3) + (var(--result-grid-gap) * 2));
    justify-self: center;
}

.result-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(120px, 34%) minmax(0, 1fr);
    min-height: var(--result-card-min);
    height: auto;
    min-width: 0;
    border: 1px solid var(--nanno-border);
    border-radius: 0;
    background: rgba(2, 9, 12, .92);
    overflow: hidden;
}

.result-card:hover {
    transform: none;
}

.result-card-img-wrapper {
    position: relative;
    inset: auto;
    width: 100%;
    height: 100%;
    min-height: var(--result-card-min);
    aspect-ratio: auto;
    overflow: hidden;
}

.result-card-img-wrapper::after {
    display: none;
}

.result-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 24%;
}

.selection-mark {
    right: 0;
    top: 0;
    width: 38px;
    height: 38px;
    border-left-width: 1px;
    border-bottom-width: 1px;
    font-size: 22px;
}

.result-caption {
    position: relative;
    inset: auto;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
    min-height: 100%;
    padding: 14px 54px 14px 16px;
    border: 0;
    border-left: 1px solid rgba(10, 186, 181, .46);
    background: rgba(5, 5, 5, .88);
    color: #fff;
    font-size: clamp(14px, 2.6vw, 17px);
    line-height: 1.25;
    text-align: left;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
    text-wrap: balance;
}

.result-caption::after {
    display: none;
}

.section-divider {
    position: relative;
    grid-area: divider;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    width: min(100%, 520px);
    max-width: 100%;
    gap: 12px;
    color: var(--cyan);
    font-size: clamp(13px, 2.2vw, 16px);
    letter-spacing: 0;
    line-height: 1.2;
    justify-self: center;
}

.section-divider::before,
.section-divider::after {
    height: 1px;
}

.results-screen form {
    position: relative;
    grid-area: form;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    display: grid;
    gap: 14px;
    width: min(100%, 520px);
    max-width: 100%;
    height: auto;
    justify-self: center;
}

.field-group {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    height: auto;
    margin: 0;
    text-align: left;
}

.field-group:nth-child(1),
.field-group:nth-child(2),
.field-group:nth-child(3) {
    top: auto;
}

.field-group label {
    height: auto;
    margin: 0 0 8px;
    font-size: clamp(13px, 2.2vw, 15px);
    line-height: 1.25;
}

.field-group input {
    width: 100%;
    max-width: 100%;
    height: clamp(46px, 6dvh, 52px);
    padding: 0 14px;
    border-width: 1px;
    font-size: clamp(15px, 2.4vw, 16px);
}

.terms-row {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    display: flex;
    gap: 12px;
    width: 100%;
    margin: 0;
    padding: 0;
    font-size: clamp(12px, 2.2vw, 13px);
    line-height: 1.35;
}

.terms-row.terms-1,
.terms-row.terms-2 {
    top: auto;
}

.terms-copy {
    flex: 1 1 auto;
    min-width: 0;
    font-size: clamp(12px, 2.2vw, 13px);
    overflow-wrap: normal;
    word-break: normal;
}

.custom-checkbox {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    border-width: 1px;
    font-size: 16px;
}

.results-screen form > .primary-button {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    width: 100%;
    height: clamp(54px, 6.4dvh, 60px);
    margin-top: 4px;
    font-size: clamp(17px, 3vw, 20px);
}

.results-screen form > .primary-button svg {
    width: clamp(22px, 4vw, 26px);
    height: clamp(22px, 4vw, 26px);
}

.results-screen form > .primary-button:disabled {
    opacity: .72;
    border-color: rgba(135, 162, 167, .45);
    background: rgba(10, 186, 181, .16);
    color: rgba(232, 245, 246, .76);
}

.back-button {
    position: relative;
    grid-area: back;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    width: auto;
    margin: 0;
    padding: 4px 0;
    font-size: clamp(14px, 2.4vw, 16px);
    justify-self: center;
}

@media (min-width: 1200px) and (min-height: 701px) {
    .results-screen.flow-screen.is-active {
        grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
        grid-template-areas:
            "title title"
            "subtitle subtitle"
            "gallery divider"
            "gallery form"
            "back form";
        grid-template-rows: auto auto auto 1fr auto;
        align-content: start;
        justify-items: stretch;
        column-gap: clamp(30px, 4vw, 56px);
        row-gap: 18px;
        padding: 108px clamp(44px, 4vw, 64px) 44px;
    }

    .results-screen .flow-title {
        width: min(100%, 1120px);
        font-size: clamp(44px, 3.6vw, 64px);
    }

    .results-screen .flow-subtitle {
        width: min(100%, 720px);
        font-size: 18px;
    }

    .result-grid {
        --result-grid-gap: 18px;
        width: 100%;
        max-width: none;
        min-height: min(42dvh, 390px);
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-self: stretch;
    }

    .result-card {
        display: flex;
        flex-direction: column;
        min-height: min(42dvh, 390px);
    }

    .result-card-img-wrapper {
        flex: 1 1 auto;
        min-height: 220px;
        aspect-ratio: auto;
    }

    .result-caption {
        min-height: 74px;
        justify-content: center;
        padding: 14px 46px;
        border-left: 0;
        border-top: 1px solid rgba(10, 186, 181, .46);
        font-size: clamp(15px, 1.05vw, 18px);
        line-height: 1.2;
        text-align: center;
    }

    .section-divider,
    .results-screen form {
        width: 100%;
        max-width: 430px;
        justify-self: stretch;
    }

    .back-button {
        justify-self: start;
        align-self: end;
    }
}

@media (min-width: 700px) and (max-width: 1199px) {
    .results-screen.flow-screen.is-active {
        padding-top: clamp(132px, 13dvh, 166px);
    }

    .results-screen .flow-title {
        width: min(100%, 780px);
        font-size: clamp(42px, 6vw, 62px);
    }

    .result-grid {
        --result-card-min: 168px;
        width: min(100%, 860px);
    }

    .result-card {
        grid-template-columns: minmax(160px, 32%) minmax(0, 1fr);
    }

    .result-card-img-wrapper {
        min-height: var(--result-card-min);
    }
}

@media (max-width: 699px) {
    .results-screen.flow-screen.is-active {
        padding-top: clamp(106px, 14dvh, 132px);
        gap: 12px;
    }

    .results-screen .flow-title {
        width: min(100%, 430px);
        font-size: clamp(31px, 8.8vw, 42px);
        line-height: 1.05;
    }

    .results-screen .flow-subtitle {
        width: min(100%, 390px);
        font-size: 14px;
    }

    .result-grid {
        --result-card-min: 136px;
    }

    .result-card {
        grid-template-columns: minmax(104px, 32%) minmax(0, 1fr);
    }

    .result-card-img-wrapper {
        min-height: var(--result-card-min);
    }

    .result-caption {
        padding: 12px 48px 12px 14px;
        font-size: clamp(13px, 3.5vw, 15px);
    }

    .section-divider {
        font-size: 13px;
    }
}

@media (max-width: 420px) {
    .results-screen.flow-screen.is-active {
        padding-left: 14px;
        padding-right: 14px;
    }

    .results-screen .flow-title {
        font-size: clamp(29px, 8.6vw, 36px);
    }

    .result-grid {
        --result-card-min: 128px;
    }

    .result-card {
        grid-template-columns: minmax(94px, 31%) minmax(0, 1fr);
    }

    .result-card-img-wrapper {
        min-height: var(--result-card-min);
    }
}

@media (max-height: 700px) {
    .results-screen.flow-screen.is-active {
        padding-top: 92px;
        padding-bottom: 26px;
        gap: 10px;
        overflow-y: auto;
    }

    .results-screen .flow-title {
        width: min(100%, 720px);
        font-size: clamp(28px, 5.2vw, 40px);
        line-height: 1.05;
    }

    .results-screen .flow-subtitle {
        width: min(100%, 620px);
        font-size: 13px;
        line-height: 1.35;
    }

    .result-grid {
        --result-card-min: 132px;
        --result-grid-gap: 10px;
        width: min(100%, 820px);
    }

    .result-card {
        min-height: var(--result-card-min);
    }

    .result-card-img-wrapper {
        min-height: var(--result-card-min);
    }

    .section-divider {
        font-size: 13px;
    }

    .results-screen form {
        gap: 10px;
    }

    .field-group input,
    .results-screen form > .primary-button {
        height: 50px;
    }
}

@media (max-height: 700px) and (orientation: landscape) {
    .results-screen .flow-title {
        width: min(100%, 760px);
    }

    .result-card {
        grid-template-columns: minmax(132px, 28%) minmax(0, 1fr);
    }
}

/* Phase 1.7: result review gallery + send details modal */
.send-details-brand {
    display: none;
}

.results-screen.flow-screen.is-active {
    display: block;
    width: 100%;
    max-width: 100%;
    padding: 0;
    overflow: hidden;
    text-align: center;
}

.result-review-stage {
    --review-gap: clamp(8px, 1.5dvh, 16px);
    --review-card-gap: clamp(8px, 1.4vw, 18px);
    --review-footer-h: clamp(32px, 4.5dvh, 48px);
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-areas:
        "header"
        "gallery"
        "actions";
    justify-items: center;
    align-content: stretch;
    gap: var(--review-gap);
    width: 100%;
    max-width: 100%;
    height: 100%;
    min-height: 0;
    padding: clamp(96px, 11dvh, 122px) clamp(16px, 4vw, 58px) clamp(14px, 3dvh, 32px);
    overflow: hidden;
}

.result-review-header {
    grid-area: header;
    display: grid;
    justify-items: center;
    gap: clamp(4px, .8dvh, 8px);
    width: min(100%, 1040px);
    max-width: 100%;
    min-height: 0;
}

.result-review-stage .flow-title {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    width: min(100%, 1040px);
    max-width: 100%;
    margin: 0;
    font-size: clamp(30px, 4.8vw, 58px);
    line-height: .98;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
    text-align: center;
}

.result-review-stage .flow-title span,
.result-review-stage .flow-title strong {
    display: inline;
    margin-right: 0;
}

.result-review-stage .flow-subtitle {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    width: min(100%, 560px);
    max-width: 100%;
    margin: 0;
    padding: 0;
    color: var(--nanno-muted);
    font-size: clamp(13px, 1.45vw, 17px);
    line-height: 1.35;
    text-align: center;
}

.result-review-stage .result-grid {
    position: relative;
    grid-area: gallery;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: minmax(0, 1fr) !important;
    align-items: center;
    justify-items: stretch;
    gap: var(--review-card-gap);
    width: min(100%, 1420px);
    max-width: 100%;
    height: 100% !important;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
}

.result-review-stage .result-card {
    position: relative;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) var(--review-footer-h);
    align-self: center;
    width: 100%;
    max-width: 100%;
    height: min(100%, clamp(170px, 24vw, 360px)) !important;
    min-width: 0;
    min-height: 0;
    border: 1px solid rgba(48,55,57,.95);
    border-radius: 0;
    background: rgba(2,9,12,.92);
    cursor: pointer;
    overflow: hidden;
    transition: border-color .22s ease, box-shadow .22s ease, transform .18s ease;
}

.result-review-stage .result-card:hover,
.result-review-stage .result-card:focus-within {
    border-color: rgba(10,186,181,.68);
    transform: translateY(-2px);
}

.result-review-stage .result-card.is-selected {
    border-color: var(--cyan);
    box-shadow: inset 0 0 0 1px rgba(10,186,181,.86), 0 0 24px rgba(10,186,181,.13);
}

.result-review-stage .result-card-img-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    background:
        linear-gradient(rgba(10,186,181,.08) 1px, transparent 1px) 0 0 / 48px 48px,
        linear-gradient(90deg, rgba(10,186,181,.07) 1px, transparent 1px) 0 0 / 48px 48px,
        #050707;
}

.result-review-stage .result-card-img-wrapper::after {
    display: none;
}

.result-review-stage .result-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.result-review-stage .selection-mark {
    right: 0;
    top: 0;
    width: clamp(30px, 3.5vw, 42px);
    height: clamp(30px, 3.5vw, 42px);
    border-left-width: 1px;
    border-bottom-width: 1px;
    background: rgba(0,8,10,.96);
    font-size: clamp(17px, 2vw, 24px);
}

.result-review-stage .result-caption {
    position: relative;
    inset: auto;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 0;
    height: var(--review-footer-h);
    padding: 0 clamp(36px, 4vw, 50px) 0 clamp(10px, 1.5vw, 16px);
    border: 0;
    border-top: 1px solid rgba(10,186,181,.46);
    background: rgba(5,5,5,.94);
    color: #fff;
    font-size: clamp(11px, 1.05vw, 15px);
    font-weight: 700;
    line-height: 1.12;
    text-align: center;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: none;
}

.result-review-stage .result-caption::after {
    display: none;
}

.result-review-actions {
    grid-area: actions;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: clamp(8px, 1.5vw, 14px);
    width: min(100%, 760px);
    max-width: 100%;
    min-height: 0;
}

.result-review-actions .back-button {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    width: auto;
    min-height: clamp(44px, 6dvh, 54px);
    margin: 0;
    padding: 0 18px;
    justify-self: auto;
}

.result-review-actions .primary-button {
    width: auto;
    min-width: min(100%, 292px);
    max-width: 100%;
    height: clamp(48px, 6.4dvh, 58px);
    padding: 0 22px;
    font-size: clamp(15px, 1.8vw, 20px);
}

.send-details-modal {
    position: absolute;
    inset: 0;
    z-index: 30;
    display: grid;
    place-items: center;
    width: 100%;
    max-width: 100%;
    padding: clamp(14px, 3vw, 34px);
    overflow-x: hidden;
    overflow-y: auto;
    background: rgba(0,4,6,.78);
    backdrop-filter: blur(12px);
    -webkit-overflow-scrolling: touch;
}

.send-details-modal[hidden] {
    display: none !important;
}

.send-details-panel {
    position: relative;
    display: grid;
    gap: clamp(14px, 2dvh, 20px);
    width: min(100%, 640px);
    max-width: 100%;
    max-height: calc(100dvh - clamp(28px, 6vw, 68px));
    padding: clamp(22px, 3vw, 34px);
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid rgba(10,186,181,.46);
    border-radius: 0;
    background:
        linear-gradient(135deg, rgba(10,186,181,.12), transparent 36%),
        linear-gradient(180deg, rgba(16,16,16,.98), rgba(5,5,5,.97));
    box-shadow: 0 30px 90px rgba(0,0,0,.68), inset 0 0 0 1px rgba(255,255,255,.03);
}

.send-details-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(48,55,57,.22) 1px, transparent 1px) 0 0 / 72px 72px,
        linear-gradient(90deg, rgba(48,55,57,.18) 1px, transparent 1px) 0 0 / 72px 72px;
    opacity: .38;
}

.send-details-header,
.send-details-form,
.send-details-back {
    position: relative;
    z-index: 1;
}

.send-details-header {
    display: grid;
    gap: 8px;
    text-align: center;
}

.send-details-kicker {
    margin: 0;
    color: var(--cyan);
    font-family: var(--nanno-font-body);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
}

.send-details-header h2 {
    margin: 0;
    color: #fff;
    font-family: var(--nanno-font-body);
    font-size: clamp(20px, 3vw, 28px);
    font-weight: 700;
    line-height: 1.12;
    text-transform: uppercase;
    overflow-wrap: break-word;
}

.results-screen .send-details-form {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    display: grid;
    gap: 14px;
    width: 100%;
    max-width: 100%;
    height: auto;
    justify-self: stretch;
}

.send-details-form .field-group {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    height: auto;
    margin: 0;
}

.send-details-form .field-group label {
    height: auto;
    margin: 0 0 8px;
    color: #e3e8e9;
    font-size: 14px;
    line-height: 1.25;
}

.send-details-form .field-group input {
    width: 100%;
    max-width: 100%;
    height: 50px;
    padding: 0 14px;
    border: 1px solid rgba(135,162,167,.58);
    border-radius: 0;
    background: rgba(2,9,12,.74);
    color: #fff;
    font-size: 16px;
}

.send-details-form .terms-row {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    margin: 0;
    padding: 0;
    color: #dbe1e2;
    font-size: 13px;
    line-height: 1.35;
    text-align: left;
}

.send-details-form .terms-row.terms-1,
.send-details-form .terms-row.terms-2 {
    top: auto;
}

.send-details-form .terms-copy {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 13px;
    overflow-wrap: break-word;
    word-break: normal;
}

.send-details-form .custom-checkbox {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    border-width: 1px;
    font-size: 16px;
}

.results-screen .send-details-form > .primary-button {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    width: 100%;
    height: 56px;
    margin: 2px 0 0;
    font-size: clamp(17px, 2.4vw, 20px);
}

.results-screen .send-details-form > .primary-button svg {
    width: 24px;
    height: 24px;
}

.send-details-back {
    justify-self: center;
    padding: 4px 0;
}

@media (min-width: 1200px) and (min-height: 701px) {
    .result-review-stage {
        padding: clamp(94px, 9dvh, 112px) clamp(40px, 4.4vw, 72px) clamp(18px, 3.2dvh, 34px);
    }

    .result-review-stage .result-grid {
        width: min(100%, 1480px);
    }

    .result-review-stage .result-card {
        height: min(100%, clamp(220px, 22vw, 360px)) !important;
    }
}

@media (min-width: 900px) and (max-width: 1199px) {
    .result-review-stage {
        padding-top: clamp(92px, 10dvh, 118px);
    }

    .result-review-stage .flow-title {
        font-size: clamp(32px, 4.8vw, 50px);
    }

    .result-review-stage .result-grid {
        width: min(100%, 1080px);
    }

    .result-review-stage .result-card {
        height: min(100%, clamp(178px, 23vw, 280px)) !important;
    }
}

@media (min-width: 700px) and (max-width: 899px) {
    .result-review-stage {
        padding-top: clamp(90px, 10dvh, 118px);
    }

    .result-review-stage .result-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: repeat(2, minmax(0, 1fr)) !important;
        width: min(100%, 760px);
        align-items: stretch;
    }

    .result-review-stage .result-card {
        height: 100% !important;
    }
}

@media (max-width: 699px) {
    .result-review-stage {
        --review-gap: clamp(6px, 1.2dvh, 10px);
        --review-card-gap: clamp(6px, 1.2dvh, 10px);
        --review-footer-h: clamp(30px, 4.4dvh, 36px);
        padding: clamp(82px, 11.4dvh, 104px) 12px clamp(10px, 2dvh, 18px);
    }

    .result-review-stage .flow-title {
        width: min(100%, 430px);
        font-size: clamp(25px, 7.3vw, 34px);
        line-height: .98;
    }

    .result-review-stage .flow-subtitle {
        width: min(100%, 390px);
        font-size: clamp(12px, 3.2vw, 14px);
        line-height: 1.25;
    }

    .result-review-stage .result-grid {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: repeat(3, minmax(0, 1fr)) !important;
        width: min(100%, 430px);
        align-items: stretch;
    }

    .result-review-stage .result-card {
        height: 100% !important;
    }

    .result-review-stage .result-caption {
        padding-right: 36px;
        font-size: clamp(10px, 2.8vw, 13px);
    }

    .result-review-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        width: min(100%, 430px);
        gap: 8px;
    }

    .result-review-actions .primary-button,
    .result-review-actions .back-button {
        width: 100%;
        min-width: 0;
        min-height: 44px;
        height: 44px;
    }

    .send-details-modal {
        align-items: stretch;
        padding: 10px;
    }

    .send-details-panel {
        width: 100%;
        max-height: calc(100dvh - 20px);
        padding: 18px;
    }
}

@media (max-width: 380px) {
    .result-review-stage {
        padding-left: 10px;
        padding-right: 10px;
    }

    .result-review-stage .flow-title {
        font-size: clamp(23px, 7vw, 31px);
    }

    .result-review-stage .result-caption {
        font-size: 10px;
    }

    .send-details-panel {
        padding: 16px;
    }
}

@media (max-height: 700px) {
    .result-review-stage {
        --review-gap: 7px;
        --review-card-gap: 8px;
        --review-footer-h: 32px;
        padding-top: clamp(74px, 13dvh, 92px);
        padding-bottom: 10px;
    }

    .result-review-stage .flow-title {
        width: min(100%, 760px);
        font-size: clamp(24px, 4.2vw, 36px);
    }

    .result-review-stage .flow-subtitle {
        font-size: 12px;
        line-height: 1.2;
    }

    .result-review-actions .primary-button,
    .result-review-actions .back-button {
        min-height: 42px;
        height: 42px;
    }

    .send-details-modal {
        padding: 10px;
    }

    .send-details-panel {
        max-height: calc(100dvh - 20px);
        padding: 16px;
        gap: 12px;
    }

    .send-details-form .field-group input,
    .results-screen .send-details-form > .primary-button {
        height: 48px;
    }
}

@media (max-height: 700px) and (min-width: 700px) and (max-width: 899px) {
    .result-review-stage .result-card {
        height: 100% !important;
    }
}

@media (max-height: 700px) and (min-width: 900px) {
    .result-review-stage {
        --review-gap: 5px;
        --review-card-gap: 6px;
        --review-footer-h: 30px;
        padding-top: 66px;
        padding-bottom: 8px;
    }

    .result-review-stage .flow-title {
        font-size: clamp(22px, 3.5vw, 32px);
    }

    .result-review-stage .flow-subtitle {
        font-size: 11px;
    }

    .result-review-stage .result-card {
        height: min(100%, clamp(140px, 17vw, 190px)) !important;
    }

    .result-review-actions .primary-button,
    .result-review-actions .back-button {
        height: 38px;
        min-height: 38px;
    }
}

@media (max-height: 560px) {
    .result-review-stage {
        --review-gap: 5px;
        --review-card-gap: 6px;
        --review-footer-h: 28px;
        padding-top: 68px;
        padding-bottom: 8px;
    }

    .result-review-stage .flow-title {
        font-size: clamp(22px, 3.8vw, 30px);
    }

    .result-review-stage .flow-subtitle {
        display: none;
    }

    .result-review-actions .primary-button,
    .result-review-actions .back-button {
        height: 38px;
        min-height: 38px;
        font-size: 14px;
    }
}

/* Result review header/action stability after restoring the mobile logo system. */
.results-screen.flow-screen.is-active .result-review-stage {
    isolation: isolate;
}

.result-review-stage .result-review-header,
.result-review-stage .flow-title,
.result-review-stage .flow-subtitle {
    position: static !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;
}

.result-review-stage .result-review-header {
    z-index: 5;
    align-self: start;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(8px, 1.1dvh, 14px);
}

.result-review-stage .flow-title {
    width: min(100%, 1080px);
    max-width: 100%;
    line-height: 1;
    text-wrap: balance;
}

.result-review-stage .flow-subtitle {
    width: min(100%, 620px);
    max-width: 100%;
    order: 2;
}

.result-review-stage .result-grid,
.result-review-stage .result-card,
.result-review-stage .result-card-img-wrapper,
.result-review-stage .result-caption,
.result-review-actions,
.result-review-actions .primary-button,
.result-review-actions .back-button {
    box-sizing: border-box;
    max-width: 100%;
}

@media (min-width: 769px) {
    .result-review-stage {
        padding-top: clamp(118px, 12dvh, 152px);
    }

    .result-review-stage .flow-title {
        font-size: clamp(42px, 4vw, 62px);
    }
}

@media (max-width: 768px) {
    .results-screen.flow-screen.is-active {
        overflow: hidden;
    }

    .result-review-stage {
        --review-gap: clamp(10px, 1.4dvh, 14px);
        --review-card-gap: clamp(10px, 1.35dvh, 14px);
        grid-template-rows: auto auto auto;
        align-content: start;
        height: 100%;
        padding-top: calc(var(--mobile-brand-clearance) + 72px);
        padding-bottom: calc(18px + env(safe-area-inset-bottom));
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .result-review-stage .flow-title {
        width: min(100%, 520px);
        font-size: clamp(30px, 8.3vw, 42px);
        line-height: .98;
    }

    .result-review-stage .flow-subtitle {
        width: min(100%, 440px);
        font-size: clamp(13px, 3.4vw, 15px);
        line-height: 1.28;
    }

    .result-review-stage .result-grid {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: none !important;
        grid-auto-rows: auto;
        align-items: stretch;
        width: min(100%, 560px);
        height: auto !important;
        max-height: none;
        overflow: visible;
    }

    .result-review-stage .result-card {
        height: clamp(166px, 24dvh, 224px) !important;
        min-height: 0;
    }

    .result-review-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        justify-items: stretch;
        width: min(100%, 560px);
        gap: 10px;
        padding-bottom: 4px;
    }

    .result-review-actions .primary-button,
    .result-review-actions .back-button {
        width: 100%;
        min-width: 0;
        min-height: 52px;
        height: auto;
        margin: 0;
        padding: 0 18px;
        text-align: center;
        justify-content: center;
    }

    .result-review-actions .primary-button {
        order: 1;
        font-size: clamp(16px, 4.4vw, 20px);
        line-height: 1.15;
    }

    .result-review-actions .back-button {
        order: 2;
        color: #dce4e5;
    }
}

@media (max-width: 430px) {
    .result-review-stage {
        padding-left: 14px;
        padding-right: 14px;
        padding-top: calc(var(--mobile-brand-clearance) + 64px);
    }

    .result-review-stage .flow-title {
        font-size: clamp(28px, 8.2vw, 36px);
    }

    .result-review-stage .result-card {
        height: clamp(156px, 23dvh, 198px) !important;
    }

    .result-review-stage .result-caption {
        min-height: 36px;
        height: auto;
        padding: 8px 38px 8px 12px;
        font-size: clamp(11px, 3.1vw, 13px);
    }
}

@media (max-width: 380px), (max-width: 768px) and (max-height: 700px) {
    .result-review-stage {
        --review-gap: 8px;
        --review-card-gap: 9px;
        padding-top: calc(var(--mobile-brand-clearance) + 54px);
    }

    .result-review-stage .flow-title {
        font-size: clamp(24px, 7.4vw, 32px);
    }

    .result-review-stage .flow-subtitle {
        font-size: 12px;
    }

    .result-review-stage .result-card {
        height: clamp(134px, 22dvh, 168px) !important;
    }

    .result-review-actions .primary-button,
    .result-review-actions .back-button {
        min-height: 46px;
        font-size: 15px;
    }
}

/* Phase 1.10: approved Cleanroom Console Hero responsive hardening */
.experience-shell,
.lab-hero-final,
.lab-hero-shell,
.lab-hero-copy,
.lab-hero-visual,
.lab-hero-visual-frame,
.lab-hero-picture,
.lab-hero-process,
.lab-hero-actions {
    max-width: 100%;
}

.experience-shell,
.lab-hero-final,
.lab-hero-shell {
    overflow: hidden;
}

.experience-shell {
    height: 100svh;
    max-height: 100svh;
}

.lab-hero-final,
.lab-hero-shell {
    height: 100%;
    max-height: 100%;
}

.lab-hero-title,
.lab-hero-summary,
.lab-hero-process li,
.lab-hero-action {
    overflow-wrap: break-word;
    word-break: normal;
}

@media (min-width: 900px) {
    .lab-hero-visual {
        justify-self: center;
    }

    .lab-hero-visual-frame {
        isolation: isolate;
        border: 0;
        background:
            linear-gradient(90deg, rgba(5,5,5,.22), transparent 48%, rgba(5,5,5,.28)),
            radial-gradient(circle at 56% 46%, rgba(10,186,181,.1), transparent 40%),
            linear-gradient(rgba(10,186,181,.045) 1px, transparent 1px) 0 0 / 54px 54px,
            linear-gradient(90deg, rgba(10,186,181,.04) 1px, transparent 1px) 0 0 / 54px 54px,
            var(--nanno-modal-bg-url, url("/static/images/modal-lab-bg.jpg")) 50% 50% / cover no-repeat,
            rgba(2,9,12,.9);
        box-shadow: 0 28px 76px rgba(0,0,0,.58), 0 0 20px rgba(10,186,181,.06);
    }

    .lab-hero-visual-frame::before {
        display: none;
    }

    .lab-hero-subject {
        width: 100%;
        height: 100%;
        justify-self: stretch;
        align-self: stretch;
        object-fit: cover;
        object-position: 50% 50%;
        border: 0;
        box-shadow: none;
        filter: saturate(1.05) contrast(1.06) brightness(1.02);
        transform: none;
    }

    .lab-hero-annotation {
        display: none;
    }

    .lab-hero-phone-hotspot {
        left: 55.5%;
        right: auto;
        bottom: 6%;
        width: min(32%, 260px);
        height: 66%;
        transform: translateX(-50%);
    }

    .lab-hero-phone-hotspot::after {
        left: 7%;
        right: 7%;
        top: 24%;
        height: 2px;
    }

    .lab-hero-phone-hotspot::before {
        content: "Tap to start";
        position: absolute;
        left: clamp(-118px, -8vw, -88px);
        top: 76%;
        transform: translateY(-50%);
        color: var(--cyan);
        font-family: var(--nanno-font-body);
        font-size: 10px;
        font-weight: 800;
        line-height: 1;
        letter-spacing: .08em;
        text-transform: uppercase;
        padding-right: 34px;
        background: linear-gradient(90deg, rgba(10,186,181,.15), rgba(10,186,181,.86)) right 50% / 28px 1px no-repeat;
        text-shadow: 0 0 10px rgba(10,186,181,.42);
        white-space: nowrap;
        pointer-events: none;
    }

    .lab-hero-corner {
        display: none;
        width: 34px;
        height: 34px;
    }

    .lab-hero-corner-tl {
        border-left-width: 1px;
        border-top-width: 1px;
    }

    .lab-hero-corner-tr {
        border-right-width: 1px;
        border-top-width: 1px;
    }

    .lab-hero-corner-bl {
        border-left-width: 1px;
        border-bottom-width: 1px;
    }

    .lab-hero-corner-br {
        border-right-width: 1px;
        border-bottom-width: 1px;
    }
}

@media (min-width: 1200px) and (max-height: 880px) {
    .lab-hero-shell {
        padding-block: clamp(18px, 2.4vw, 32px);
    }

    .lab-hero-copy {
        gap: clamp(8px, 1.05svh, 13px);
    }

    .lab-hero-logo {
        width: clamp(136px, 12vw, 190px);
    }

    .lab-hero-summary {
        line-height: 1.42;
    }

    .lab-hero-action {
        min-height: 50px;
    }

    .lab-hero-process li {
        min-height: 56px;
        padding: 8px 10px;
    }
}

@media (min-width: 1440px) {
    .lab-hero-shell {
        width: min(100%, 1460px);
        grid-template-columns: minmax(500px, .84fr) minmax(620px, 1.16fr);
        gap: clamp(46px, 5.2vw, 82px);
    }

    .lab-hero-visual-frame {
        width: min(100%, clamp(640px, 44vw, 760px));
        height: min(76svh, 760px);
    }
}

@media (min-width: 1200px) and (max-width: 1439px) {
    .lab-hero-shell {
        width: min(100%, 1340px);
        grid-template-columns: minmax(420px, .9fr) minmax(520px, 1.1fr);
        gap: clamp(26px, 4vw, 54px);
    }

    .lab-hero-title {
        font-size: clamp(56px, 5vw, 82px);
    }

    .lab-hero-visual-frame {
        width: min(100%, clamp(540px, 42vw, 640px));
        height: min(72svh, 660px);
        min-height: min(500px, 60svh);
    }
}

@media (min-width: 900px) and (max-width: 1199px) {
    .experience-shell {
        padding: clamp(18px, 3vw, 34px);
    }

    .lab-hero-shell {
        grid-template-columns: minmax(0, .95fr) minmax(360px, 1.05fr);
        gap: clamp(22px, 3.4vw, 42px);
        min-height: 0;
        padding: clamp(18px, 3vw, 34px);
    }

    .lab-hero-copy {
        gap: clamp(9px, 1.2dvh, 14px);
    }

    .lab-hero-title {
        font-size: clamp(48px, 5.4vw, 70px);
    }

    .lab-hero-summary {
        font-size: clamp(15px, 1.6vw, 18px);
    }

    .lab-hero-process {
        grid-template-columns: minmax(0, 1fr);
        width: min(100%, 460px);
        gap: 8px;
    }

    .lab-hero-process li {
        min-height: 44px;
        padding: 8px 10px;
    }

    .lab-hero-action {
        min-height: 52px;
    }

    .lab-hero-visual-frame {
        width: min(100%, 440px);
        height: min(62svh, 520px);
        min-height: min(390px, 52svh);
    }
}

@media (min-width: 900px) and (max-width: 1199px) and (orientation: portrait) {
    .lab-hero-shell {
        grid-template-columns: minmax(0, 1fr);
        justify-items: stretch;
        gap: clamp(22px, 3vw, 36px);
        width: min(100%, 980px);
    }

    .lab-hero-copy {
        justify-items: center;
        text-align: center;
    }

    .lab-hero-process {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: min(100%, 780px);
    }

    .lab-hero-actions {
        justify-content: center;
    }

    .lab-hero-visual-frame {
        width: min(100%, 620px);
        height: min(34svh, 440px);
        min-height: min(280px, 28svh);
    }
}

@media (max-width: 899px) {
    .experience-shell {
        place-items: center;
        padding: clamp(12px, 2.8vw, 22px);
    }

    .lab-hero-final {
        place-items: center;
        min-height: 0;
    }

    .lab-hero-shell {
        grid-template-columns: minmax(0, 1fr);
        justify-items: center;
        gap: clamp(10px, 1.65dvh, 18px);
        min-height: 0;
        padding: clamp(14px, 3.8vw, 28px);
        overflow: hidden;
    }

    .lab-hero-copy {
        justify-items: center;
        text-align: center;
    }

    .lab-hero-summary {
        width: min(100%, 590px);
        font-size: clamp(16px, 2.4vw, 20px);
    }

    .lab-hero-process {
        width: min(100%, 680px);
    }

    .lab-hero-actions {
        justify-content: center;
    }

    .lab-hero-visual::before {
        display: none;
    }

    .lab-hero-visual-frame {
        width: min(100%, 560px);
        height: min(30svh, 330px);
        min-height: min(240px, 24svh);
        background:
            linear-gradient(90deg, rgba(5,5,5,.56), rgba(5,5,5,.08) 50%, rgba(5,5,5,.5)),
            radial-gradient(circle at 50% 48%, rgba(10,186,181,.16), transparent 44%),
            linear-gradient(rgba(10,186,181,.06) 1px, transparent 1px) 0 0 / 42px 42px,
            linear-gradient(90deg, rgba(10,186,181,.05) 1px, transparent 1px) 0 0 / 42px 42px,
            var(--nanno-modal-bg-url, url("/static/images/modal-lab-bg.jpg")) center / cover no-repeat,
            rgba(2,9,12,.9);
    }

    .lab-hero-subject {
        width: auto;
        max-width: none;
        height: 100%;
        justify-self: center;
        align-self: center;
        object-fit: contain;
        object-position: 50% 48%;
        filter: saturate(1.1) contrast(1.1) brightness(1.14);
    }

    .lab-hero-annotation {
        display: none;
    }
}

@media (max-width: 699px) {
    .experience-shell {
        padding: clamp(8px, 1.6svh, 12px);
        place-items: center;
    }

    .lab-hero-shell {
        position: relative;
        grid-template-rows: minmax(0, auto) minmax(0, auto);
        gap: clamp(4px, .8svh, 7px);
        padding: clamp(7px, 1.45svh, 11px) 8px;
        height: 100%;
        min-height: 0;
        align-content: center;
    }

    .lab-hero-copy {
        gap: clamp(6px, .95svh, 10px);
    }

    .lab-hero-shell::before {
        left: 0;
        right: auto;
        top: 0;
        bottom: 0;
        width: 1px;
        height: auto;
        border: 0;
        background: linear-gradient(180deg, var(--cyan), rgba(10,186,181,.24), var(--cyan));
        opacity: .72;
        pointer-events: none;
    }

    .lab-hero-shell::after {
        right: 0;
        left: auto;
        top: 0;
        bottom: 0;
        width: 1px;
        height: auto;
        background: linear-gradient(180deg, var(--cyan), rgba(10,186,181,.24), var(--cyan));
        opacity: .72;
    }

    .lab-hero-logo {
        width: min(42vw, 132px);
    }

    .lab-hero-brand span {
        display: none;
    }

    .lab-hero-title {
        width: min(100%, 390px);
        font-size: clamp(34px, 10.8vw, 46px);
        line-height: .9;
    }

    .lab-hero-summary {
        width: min(100%, 360px);
        font-size: clamp(12px, 3.45vw, 14px);
        line-height: 1.28;
    }

    .lab-hero-actions {
        order: 2;
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 6px;
        width: min(100%, 360px);
    }

    .lab-hero-process {
        order: 3;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0;
        width: min(100%, 360px);
        min-height: 34px;
        padding: 4px 6px;
        border: 1px solid rgba(48,55,57,.72);
        background: rgba(5,5,5,.42);
    }

    .lab-hero-process li {
        position: relative;
        grid-template-columns: auto minmax(0, auto);
        justify-items: center;
        align-items: center;
        justify-content: center;
        gap: 5px;
        min-height: 24px;
        padding: 2px 4px;
        border: 0;
        font-size: 11px;
        text-align: center;
        background: transparent;
    }

    .lab-hero-process li:not(:last-child)::after {
        content: "";
        position: absolute;
        right: -8px;
        top: 50%;
        width: 16px;
        height: 1px;
        background: linear-gradient(90deg, rgba(10,186,181,.16), rgba(10,186,181,.72), rgba(10,186,181,.16));
        transform: translateY(-50%);
        pointer-events: none;
    }

    .lab-hero-process-index {
        width: auto;
        height: auto;
        border: 0;
        font-size: 10px;
    }

    .lab-hero-process-copy {
        gap: 0;
        justify-items: start;
    }

    .lab-hero-process-copy strong {
        font-size: 10.5px;
    }

    .lab-hero-process-copy em {
        display: none;
    }

    .lab-hero-action {
        width: 100%;
        min-width: 0;
        min-height: 42px;
        padding: 0 18px;
        font-size: 14px;
    }

    .lab-hero-visual {
        order: 4;
        display: grid;
        width: min(100%, 360px);
        justify-self: center;
    }

    .lab-hero-visual-frame {
        width: min(100%, 350px);
        height: min(35svh, 300px);
        min-height: 196px;
        border-color: rgba(10,186,181,.3);
        background:
            linear-gradient(90deg, rgba(5,5,5,.34), rgba(5,5,5,.02) 48%, rgba(5,5,5,.28)),
            radial-gradient(circle at 50% 46%, rgba(10,186,181,.24), transparent 48%),
            linear-gradient(rgba(10,186,181,.08) 1px, transparent 1px) 0 0 / 36px 36px,
            linear-gradient(90deg, rgba(10,186,181,.06) 1px, transparent 1px) 0 0 / 36px 36px,
            var(--nanno-modal-bg-url, url("/static/images/modal-lab-bg.jpg")) center / cover no-repeat,
            rgba(2,9,12,.9);
        box-shadow: 0 16px 42px rgba(0,0,0,.5), 0 0 18px rgba(10,186,181,.1);
    }

    .lab-hero-subject {
        width: auto;
        max-width: none;
        height: 100%;
        justify-self: center;
        align-self: center;
        object-fit: contain;
        object-position: 50% 48%;
        filter: saturate(1.12) contrast(1.1) brightness(1.12);
    }

    .lab-hero-annotation,
    .lab-hero-info-card,
    .lab-hero-floating-card,
    .lab-hero-tooltip {
        display: none;
    }

    .lab-hero-corner {
        width: 26px;
        height: 26px;
    }

    .lab-hero-phone-hotspot {
        left: 52%;
        right: auto;
        bottom: 6%;
        width: min(44%, 154px);
        height: 66%;
        transform: translateX(-50%);
    }

    .lab-hero-phone-hotspot::before {
        content: "Tap to start";
        position: absolute;
        left: clamp(-72px, -18vw, -58px);
        top: 78%;
        transform: translateY(-50%);
        width: max-content;
        max-width: 112px;
        color: var(--cyan);
        font-family: var(--nanno-font-body);
        font-size: 10.5px;
        font-weight: 800;
        line-height: 1.05;
        letter-spacing: .06em;
        text-align: center;
        text-transform: uppercase;
        padding: 4px 7px;
        border: 1px solid rgba(10,186,181,.5);
        background: rgba(2,12,14,.78);
        text-shadow: 0 0 8px rgba(10,186,181,.7), 0 0 18px rgba(10,186,181,.42);
        white-space: nowrap;
        pointer-events: none;
    }

    .lab-hero-phone-hotspot::after {
        left: 9%;
        right: 9%;
        top: 24%;
        height: 2px;
        opacity: .9;
        animation-name: nannoMobileScan;
    }
}

@keyframes nannoMobileScan {
    0% { top: 24%; }
    100% { top: 50%; }
}

@media (max-width: 540px) {
    .lab-hero-shell {
        padding: clamp(8px, 1.6svh, 12px) 8px;
    }

    .lab-hero-title {
        font-size: clamp(34px, 10.7vw, 44px);
    }

    .lab-hero-summary {
        font-size: clamp(12px, 3.25vw, 13px);
    }
}

@media (max-width: 380px) {
    .lab-hero-shell {
        gap: 5px;
        padding: 7px 6px;
    }

    .lab-hero-logo {
        width: min(38vw, 112px);
    }

    .lab-hero-title {
        font-size: clamp(30px, 10vw, 36px);
        line-height: .9;
    }

    .lab-hero-summary {
        font-size: 11px;
    }

    .lab-hero-process li {
        min-height: 24px;
        padding: 2px 3px;
        font-size: 10px;
    }

    .lab-hero-action {
        min-height: 39px;
    }

    .lab-hero-visual-frame {
        height: min(29svh, 192px);
        min-height: 150px;
    }

    .lab-hero-phone-hotspot::before {
        left: clamp(-62px, -16vw, -50px);
        font-size: 9px;
        max-width: 100px;
        padding: 3px 6px;
    }
}

@media (max-height: 700px) {
    .experience-shell {
        place-items: center;
        padding: clamp(8px, 1.6svh, 12px);
    }

    .lab-hero-shell {
        min-height: 0;
        gap: clamp(6px, 1.25svh, 10px);
        padding: clamp(10px, 1.8svh, 18px);
    }

    .lab-hero-copy {
        gap: 10px;
    }

    .lab-hero-logo {
        width: min(28vw, 136px);
    }

    .lab-hero-title {
        font-size: clamp(36px, 7.2vw, 68px);
        line-height: .92;
    }

    .lab-hero-summary {
        font-size: clamp(13px, 1.8vw, 16px);
        line-height: 1.4;
    }

    .lab-hero-process li {
        min-height: 36px;
        padding: 8px 10px;
        font-size: 12px;
    }

    .lab-hero-action {
        min-height: 48px;
    }

    .lab-hero-visual-frame {
        height: min(44svh, 330px);
        min-height: min(210px, 34svh);
    }
}

@media (max-width: 699px) and (max-height: 700px) {
    .experience-shell {
        place-items: center;
    }

    .lab-hero-shell {
        align-content: center;
        gap: 4px;
    }

    .lab-hero-brand span {
        display: none;
    }

    .lab-hero-title {
        font-size: clamp(28px, 9.6vw, 36px);
        line-height: .9;
    }

    .lab-hero-summary {
        font-size: 11px;
        line-height: 1.25;
    }

    .lab-hero-process li {
        min-height: 24px;
        padding: 2px 3px;
    }

    .lab-hero-visual-frame {
        height: min(29svh, 192px);
        min-height: 150px;
    }

    .lab-hero-phone-hotspot::before {
        left: clamp(-62px, -16vw, -50px);
        font-size: 9px;
        max-width: 100px;
        padding: 3px 6px;
    }
}

@media (min-width: 900px) and (max-height: 700px) {
    .lab-hero-shell {
        grid-template-columns: minmax(340px, 1fr) minmax(300px, .68fr);
        align-items: center;
        gap: clamp(18px, 3vw, 36px);
    }

    .lab-hero-title {
        font-size: clamp(42px, 4.8vw, 62px);
    }

    .lab-hero-summary {
        width: min(100%, 460px);
    }

    .lab-hero-process {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: min(100%, 620px);
    }

    .lab-hero-process li {
        grid-template-columns: minmax(0, 1fr);
        justify-items: center;
        gap: 5px;
        text-align: center;
    }

    .lab-hero-process-index {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }

    .lab-hero-visual-frame {
        width: min(100%, 360px);
        height: min(50svh, 320px);
        min-height: min(210px, 36svh);
    }
}

@media (max-height: 560px) {
    .lab-hero-shell {
        gap: 12px;
        padding: 12px;
    }

    .lab-hero-logo {
        width: min(28vw, 132px);
    }

    .lab-hero-title {
        font-size: clamp(34px, 6.2vw, 52px);
    }

    .lab-hero-summary {
        font-size: 13px;
    }

    .lab-hero-visual-frame {
        height: min(36svh, 210px);
        min-height: min(130px, 26svh);
    }
}

@media (max-width: 899px) and (max-height: 560px) {
    .lab-hero-shell {
        align-content: center;
    }

    .lab-hero-visual-frame {
        height: min(18svh, 100px);
        min-height: 70px;
    }

    .lab-hero-annotation,
    .lab-hero-corner {
        display: none;
    }
}

/* Console hero final polish: no process strip, clean asset frame, phone-centered tap cue. */
.lab-hero-process {
    display: none !important;
}

.lab-hero-visual-frame {
    background: transparent !important;
    border: 0 !important;
    box-shadow: 0 26px 68px rgba(0,0,0,.52) !important;
}

.lab-hero-visual-frame::before,
.lab-hero-visual-frame::after {
    content: none !important;
    display: none !important;
    background: none !important;
    border: 0 !important;
    box-shadow: none !important;
}

.lab-hero-corner {
    display: none !important;
}

.lab-hero-subject {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: 50% 50% !important;
    filter: saturate(1.05) contrast(1.04) brightness(1.04) !important;
}

.lab-hero-phone-hotspot {
    left: 55.5% !important;
    right: auto !important;
    bottom: 6% !important;
    width: min(32%, 260px) !important;
    height: 66% !important;
    transform: translateX(-50%) !important;
}

.lab-hero-phone-hotspot::before {
    content: "TAP TO START" !important;
    position: absolute !important;
    left: clamp(-118px, -7.2vw, -88px) !important;
    top: 49% !important;
    transform: translateY(-50%) !important;
    width: clamp(128px, 10.4vw, 168px) !important;
    max-width: none !important;
    min-height: 42px !important;
    display: grid !important;
    place-items: center !important;
    padding: 0 16px 0 20px !important;
    border: 1px solid rgba(10,186,181,.52) !important;
    border-left: 6px solid var(--cyan) !important;
    background:
        linear-gradient(110deg, transparent 18%, rgba(255,255,255,.48) 48%, transparent 76%) -180% 0 / 72% 100% no-repeat,
        linear-gradient(90deg, rgba(10,186,181,.34), rgba(10,186,181,.12) 54%, rgba(5,22,24,.88)),
        rgba(5,30,31,.82) !important;
    color: var(--cyan) !important;
    font-family: var(--nanno-font-body) !important;
    font-size: clamp(13px, 1.05vw, 17px) !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    letter-spacing: .11em !important;
    text-transform: uppercase !important;
    text-shadow: 0 0 8px rgba(10,186,181,.82), 0 0 18px rgba(10,186,181,.46) !important;
    white-space: nowrap !important;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
    box-shadow: 0 14px 38px rgba(0,0,0,.42), 0 0 30px rgba(10,186,181,.28), inset 0 0 20px rgba(10,186,181,.08) !important;
    animation: nannoHeroCtaSignal 2.8s ease-in-out infinite !important;
    transition: color .3s ease, border-color .3s ease, box-shadow .3s ease, transform .3s ease !important;
    pointer-events: none !important;
}

.lab-hero-phone-hotspot:hover::before,
.lab-hero-phone-hotspot:focus-visible::before {
    color: #fff !important;
    border-color: rgba(255,255,255,.82) !important;
    transform: translateY(-50%) translateX(5px) scale(1.035) !important;
    box-shadow: 0 16px 42px rgba(0,0,0,.46), 0 0 42px rgba(10,186,181,.52), inset 0 0 24px rgba(10,186,181,.16) !important;
}

@keyframes nannoHeroCtaSignal {
    0%, 18%, 100% {
        background-position: -180% 0, 0 0;
        filter: brightness(1) drop-shadow(0 0 8px rgba(10,186,181,.28));
    }
    52% {
        background-position: 250% 0, 0 0;
        filter: brightness(1.22) drop-shadow(0 0 14px rgba(10,186,181,.52));
    }
    68% {
        background-position: 250% 0, 0 0;
        filter: brightness(1.04) drop-shadow(0 0 9px rgba(10,186,181,.34));
    }
}

.lab-hero-phone-hotspot::after {
    left: 16% !important;
    right: 16% !important;
    top: 33%;
    height: 2px !important;
    animation: nannoScan 2.8s infinite ease-in-out !important;
}

@media (max-width: 899px) {
    .lab-hero-phone-hotspot {
        left: 52% !important;
        bottom: 6% !important;
        width: min(44%, 154px) !important;
        height: 66% !important;
    }

    .lab-hero-phone-hotspot::before {
        left: clamp(-86px, -20vw, -66px) !important;
        top: 50% !important;
        width: clamp(106px, 28vw, 128px) !important;
        min-height: 34px !important;
        padding: 0 10px 0 14px !important;
        border-left-width: 5px !important;
        font-size: clamp(10px, 3.1vw, 12px) !important;
        letter-spacing: .08em !important;
    }

    .lab-hero-phone-hotspot::after {
        left: 18% !important;
        right: 18% !important;
        top: 32%;
        animation: nannoMobileScan 2.8s infinite ease-in-out !important;
    }
}

/* Shared mobile brand placement for the active single-flow experience. */
@media (max-width: 768px) {
    :root {
        --mobile-brand-left: 24px;
        --mobile-brand-top: 32px;
        --mobile-brand-width: 25vw;
        --mobile-brand-height: calc(var(--mobile-brand-width) * 0.374);
        --mobile-brand-clearance: calc(var(--mobile-brand-top) + var(--mobile-brand-height));
        --mobile-brand-shell-offset: clamp(8px, 1.6svh, 12px);
    }

    .lab-hero-copy {
        position: static;
        width: 100%;
        padding-top: calc(var(--mobile-brand-clearance) + 8px);
    }

    .lab-hero-brand {
        position: absolute;
        left: calc(var(--mobile-brand-left) - var(--mobile-brand-shell-offset));
        top: calc(var(--mobile-brand-top) - var(--mobile-brand-shell-offset));
        z-index: 4;
        justify-items: start;
        width: var(--mobile-brand-width);
        max-width: calc(100vw - (var(--mobile-brand-left) * 2));
        margin: 0;
        text-align: left;
    }

    .lab-hero-logo {
        width: var(--mobile-brand-width);
        max-width: 100%;
    }

    .lab-hero-brand span {
        display: none;
    }

    .lab-hero-title,
    .lab-hero-summary,
    .lab-hero-actions,
    .lab-hero-process,
    .lab-hero-visual {
        max-width: calc(100vw - (var(--mobile-brand-left) * 2));
    }

    .lab-hero-title {
        width: min(100%, 340px);
        font-size: clamp(30px, 9.6vw, 40px);
        white-space: normal;
    }

    .lab-hero-title span,
    .lab-hero-title strong {
        max-width: 100%;
        white-space: normal;
    }

    .modal-header {
        left: var(--mobile-brand-left);
        right: var(--mobile-brand-left);
        top: var(--mobile-brand-top);
        height: var(--mobile-brand-height);
        align-items: flex-start;
    }

    .modal-logo {
        width: var(--mobile-brand-width);
        max-width: calc(100vw - (var(--mobile-brand-left) * 2));
    }

    .stepper {
        top: calc(var(--mobile-brand-clearance) + 14px);
    }

    [data-screen="capture"].flow-screen.is-active {
        padding-top: calc(var(--mobile-brand-clearance) + 58px);
    }

    .result-review-stage {
        padding-top: calc(var(--mobile-brand-clearance) + 54px);
    }

    .send-details-modal {
        align-items: stretch;
        place-items: stretch;
        padding: 0;
    }

    .send-details-panel {
        width: 100%;
        max-width: 100%;
        min-height: 100dvh;
        max-height: 100dvh;
        padding: calc(var(--mobile-brand-clearance) + 24px) var(--mobile-brand-left) 24px;
        border-width: 0;
    }

    .send-details-brand {
        position: absolute;
        left: var(--mobile-brand-left);
        top: var(--mobile-brand-top);
        z-index: 1;
        display: block;
        width: var(--mobile-brand-width);
        max-width: calc(100vw - (var(--mobile-brand-left) * 2));
        pointer-events: none;
    }

    .send-details-logo {
        display: block;
        width: 100%;
        height: auto;
    }
}

@media (max-width: 768px) and (max-height: 700px) {
    :root {
        --mobile-brand-top: 24px;
        --mobile-brand-width: 25vw;
        --mobile-brand-height: calc(var(--mobile-brand-width) * 0.374);
    }

    .lab-hero-copy {
        padding-top: calc(var(--mobile-brand-clearance) + 4px);
    }

    .lab-hero-title {
        width: min(100%, 318px);
        font-size: clamp(28px, 9.4vw, 36px);
    }

    [data-screen="capture"].flow-screen.is-active {
        padding-top: calc(var(--mobile-brand-clearance) + 50px);
    }

    .result-review-stage {
        padding-top: calc(var(--mobile-brand-clearance) + 46px);
    }
}

@media (max-width: 900px) {
    .video-entry-logo {
        left: 24px;
        top: 32px;
        width: 25vw;
        max-width: calc(100vw - 48px);
    }

    .video-entry-copy {
        left: 20px;
        right: 20px;
        top: 55%;
        gap: 12px;
        width: auto;
        max-width: none;
        transform: translateY(-50%);
    }

    .video-entry-title {
        width: min(100%, 620px);
        font-size: clamp(34px, 9.2vw, 58px);
        line-height: 1;
    }

    .video-entry-subtitle {
        width: min(100%, 560px);
        margin-inline: auto;
        font-size: clamp(15px, 3.9vw, 22px);
        line-height: 1.26;
    }

    .video-entry-actions {
        left: 50%;
        right: auto;
        bottom: 24px;
        flex-direction: column;
        justify-content: center;
        gap: 12px;
        width: min(100% - 48px, 440px);
        transform: translateX(-50%);
    }

    .video-entry-button {
        width: 100%;
        min-width: 0;
        min-height: 64px;
        padding: 18px 28px;
        font-size: clamp(18px, 5vw, 28px);
        white-space: normal;
    }

    .video-entry-button[data-open-console],
    .video-entry-button[data-start-experience] {
        order: 1;
    }

    .video-entry-button-secondary {
        order: 2;
        min-width: 0;
        min-height: 56px;
        font-size: clamp(17px, 4.6vw, 24px);
    }

    .video-entry-button:hover,
    .video-entry-button:focus-visible {
        transform: translateY(-2px);
    }
}

@media (max-width: 430px) {
    .video-entry-copy {
        left: 18px;
        right: 18px;
        top: 57%;
        gap: 10px;
    }

    .video-entry-title {
        font-size: clamp(30px, 8.8vw, 40px);
    }

    .video-entry-subtitle {
        font-size: clamp(14px, 3.7vw, 17px);
    }

    .video-entry-actions {
        width: calc(100vw - 48px);
        bottom: 22px;
    }

    .video-entry-button {
        min-height: 58px;
        padding: 15px 20px;
        font-size: clamp(17px, 4.8vw, 22px);
    }

    .video-entry-button-secondary {
        min-height: 50px;
        font-size: clamp(16px, 4.4vw, 20px);
    }
}

@media (max-width: 380px), (max-height: 700px) and (max-width: 900px) {
    .video-entry-logo {
        top: 24px;
        width: 25vw;
    }

    .video-entry-copy {
        left: 16px;
        right: 16px;
        top: 56%;
        gap: 8px;
    }

    .video-entry-title {
        font-size: clamp(28px, 8.2vw, 36px);
        line-height: .98;
    }

    .video-entry-subtitle {
        font-size: clamp(14px, 3.8vw, 18px);
    }

    .video-entry-actions {
        bottom: 18px;
        gap: 10px;
    }

    .video-entry-button {
        min-height: 52px;
        font-size: clamp(16px, 4.4vw, 20px);
        padding: 13px 18px;
    }

    .video-entry-button-secondary {
        min-height: 46px;
        padding: 11px 16px;
        font-size: clamp(15px, 4.1vw, 18px);
    }
}

@media (max-height: 560px) and (orientation: landscape) {
    .video-entry-logo {
        top: 18px;
        width: 25vw;
        max-width: 180px;
    }

    .video-entry-copy {
        top: 50%;
        width: min(56vw, 960px);
        max-width: 56vw;
    }

    .video-entry-title {
        font-size: clamp(38px, 5.2vw, 64px);
    }

    .video-entry-subtitle {
        font-size: clamp(15px, 1.8vw, 20px);
    }

    .video-entry-actions {
        left: 24px;
        right: 24px;
        bottom: 18px;
        flex-direction: row;
        justify-content: space-between;
        gap: 12px;
        width: auto;
        transform: none;
    }

    .video-entry-button {
        width: auto;
        min-width: clamp(180px, 22vw, 300px);
        min-height: 52px;
        padding: 13px 24px;
        font-size: clamp(16px, 2.3vw, 23px);
        transform: none;
    }

    .video-entry-button-secondary {
        min-width: clamp(170px, 20vw, 280px);
        min-height: 52px;
    }
}

@media (min-width: 901px) {
    .video-entry-copy {
        top: auto;
        bottom: calc(clamp(34px, 5vw, 72px) + clamp(74px, 5.1vw, 116px) + 5svh);
        justify-items: center;
        text-align: center;
        transform: none;
    }

    .video-entry-title {
        width: min(100%, 1720px);
        margin-inline: auto;
        text-align: center;
        white-space: nowrap;
        overflow-wrap: normal;
        word-break: normal;
        text-wrap: nowrap;
    }

    .video-entry-subtitle {
        margin-inline: auto;
        text-align: center;
    }
}

/* Final mobile result review override: keep header below logo/stepper and actions readable. */
@media (max-width: 768px) {
    .result-review-stage {
        padding-top: calc(var(--mobile-brand-clearance) + 72px);
        overflow-x: hidden;
        overflow-y: auto;
    }
}

@media (max-width: 430px) {
    .result-review-stage {
        padding-top: calc(var(--mobile-brand-clearance) + 64px);
    }
}

@media (max-width: 380px), (max-width: 768px) and (max-height: 700px) {
    .result-review-stage {
        padding-top: calc(var(--mobile-brand-clearance) + 54px);
    }
}

/* Final send details modal override: form-first focused panel. */
.send-details-open .stepper {
    z-index: 1;
    opacity: 0;
    pointer-events: none;
}

.send-details-open .send-details-modal {
    z-index: 60;
    place-items: center;
    padding: clamp(14px, 2.6vw, 28px);
}

.send-details-open .send-details-panel {
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
        "header"
        "form"
        "back";
    gap: clamp(14px, 1.8dvh, 20px);
    width: min(100%, 920px);
    max-width: calc(100vw - clamp(28px, 5.2vw, 56px));
    max-height: calc(100dvh - clamp(28px, 5.2vw, 56px));
    padding: clamp(18px, 2.6vw, 32px);
}

.send-details-open .send-details-header {
    grid-area: header;
    width: 100%;
    justify-items: stretch;
    text-align: center;
}

.send-details-open .send-details-kicker {
    text-align: center;
}

.send-details-open .send-details-header h2 {
    width: 100%;
    max-width: 100%;
    font-size: clamp(18px, 2.25vw, 30px);
    line-height: 1;
    white-space: nowrap;
    overflow-wrap: normal;
    text-wrap: nowrap;
}

.send-details-open .send-details-form {
    grid-area: form;
    display: grid;
    width: 100%;
    max-width: 100%;
    justify-self: stretch;
    gap: clamp(12px, 1.6dvh, 16px);
}

.send-details-open .send-details-form .field-group,
.send-details-open .send-details-form .field-group input,
.send-details-open .send-details-form .terms-row,
.send-details-open .send-details-form > .primary-button {
    width: 100%;
    max-width: 100%;
}

.send-details-open .send-details-form .field-group input {
    height: clamp(52px, 6.5dvh, 62px);
    font-size: clamp(16px, 1.6vw, 20px);
}

.send-details-open .send-details-form .terms-row {
    align-items: flex-start;
    gap: clamp(12px, 1.5vw, 16px);
}

.send-details-open .send-details-form .terms-copy {
    min-width: 0;
    max-width: 100%;
}

.send-details-open .send-details-form > .primary-button {
    margin-top: 4px;
    min-height: clamp(54px, 6.5dvh, 64px);
    height: auto;
}

.send-details-open .send-details-back {
    grid-area: back;
    justify-self: stretch;
    width: 100%;
    min-height: 44px;
    padding: 8px 12px;
    text-align: center;
}

@media (min-width: 900px) {
    .send-details-open .send-details-panel {
        width: min(100%, 880px);
    }

    .send-details-open .send-details-form {
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .send-details-open .send-details-modal {
        align-items: stretch;
        place-items: stretch;
        padding: 0;
    }

    .send-details-open .send-details-panel {
        width: 100%;
        max-width: 100%;
        min-height: 100dvh;
        max-height: 100dvh;
        padding: calc(var(--mobile-brand-clearance) + 22px) 24px calc(22px + env(safe-area-inset-bottom));
        border-width: 0;
        gap: 14px;
    }

    .send-details-open .send-details-header h2 {
        font-size: clamp(15px, 4.1vw, 20px);
    }

    .send-details-open .send-details-form {
        gap: 13px;
    }

    .send-details-open .send-details-form .field-group label {
        margin-bottom: 7px;
    }

    .send-details-open .send-details-form .field-group input {
        height: 54px;
        font-size: 16px;
    }

    .send-details-open .send-details-form .terms-row {
        font-size: clamp(13px, 3.45vw, 15px);
        line-height: 1.35;
    }

    .send-details-open .send-details-form .terms-copy {
        font-size: inherit;
    }

    .send-details-open .send-details-form > .primary-button {
        min-height: 56px;
        font-size: clamp(17px, 4.5vw, 22px);
    }
}

@media (max-width: 430px) {
    .send-details-open .send-details-panel {
        padding-left: 20px;
        padding-right: 20px;
        gap: 12px;
    }

    .send-details-open .send-details-header h2 {
        font-size: clamp(14px, 3.9vw, 18px);
    }

    .send-details-open .send-details-form .field-group input {
        height: 52px;
    }
}

@media (max-width: 380px), (max-width: 768px) and (max-height: 700px) {
    .send-details-open .send-details-panel {
        padding-top: calc(var(--mobile-brand-clearance) + 16px);
        gap: 10px;
    }

    .send-details-open .send-details-kicker {
        font-size: 10px;
    }

    .send-details-open .send-details-header h2 {
        font-size: clamp(13px, 3.65vw, 16px);
    }

    .send-details-open .send-details-form {
        gap: 10px;
    }

    .send-details-open .send-details-form .field-group input {
        height: 48px;
    }

    .send-details-open .send-details-form .terms-row {
        font-size: 12px;
    }

    .send-details-open .send-details-form > .primary-button {
        min-height: 50px;
    }
}

/* Final result review lock: isolate header, gallery, and actions from legacy absolute rules. */
body[data-flow-state="results"]:not(.send-details-open) .results-screen.flow-screen.is-active {
    overflow: hidden !important;
}

body[data-flow-state="results"]:not(.send-details-open) .result-review-stage {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto minmax(0, 1fr) auto !important;
    grid-template-areas:
        "header"
        "gallery"
        "actions" !important;
    align-content: stretch !important;
    justify-items: center !important;
    gap: clamp(12px, 1.7dvh, 20px) !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    padding: clamp(122px, 13dvh, 156px) clamp(26px, 5vw, 72px) clamp(20px, 3dvh, 34px) !important;
    overflow: hidden !important;
}

body[data-flow-state="results"]:not(.send-details-open) .result-review-header,
body[data-flow-state="results"]:not(.send-details-open) .result-review-stage .flow-title,
body[data-flow-state="results"]:not(.send-details-open) .result-review-stage .flow-subtitle {
    position: static !important;
    inset: auto !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;
}

body[data-flow-state="results"]:not(.send-details-open) .result-review-header {
    grid-area: header !important;
    z-index: 8 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    justify-items: center !important;
    gap: clamp(6px, .9dvh, 10px) !important;
    width: min(100%, 1180px) !important;
    max-width: 100% !important;
    min-height: 0 !important;
    margin: 0 auto !important;
    text-align: center !important;
}

body[data-flow-state="results"]:not(.send-details-open) .result-review-stage .flow-title {
    display: block !important;
    width: min(100%, 1180px) !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #f4f5f5 !important;
    font-size: clamp(38px, 4.1vw, 64px) !important;
    line-height: .96 !important;
    letter-spacing: 0 !important;
    white-space: normal !important;
    overflow: visible !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
    text-align: center !important;
    text-wrap: balance;
}

body[data-flow-state="results"]:not(.send-details-open) .result-review-stage .flow-title span,
body[data-flow-state="results"]:not(.send-details-open) .result-review-stage .flow-title strong {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
}

body[data-flow-state="results"]:not(.send-details-open) .result-review-stage .flow-subtitle {
    display: block !important;
    width: min(100%, 620px) !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    color: var(--nanno-muted) !important;
    font-size: clamp(14px, 1.35vw, 18px) !important;
    line-height: 1.3 !important;
    text-align: center !important;
}

body[data-flow-state="results"]:not(.send-details-open) .result-review-stage .result-grid {
    grid-area: gallery !important;
    position: relative !important;
    inset: auto !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-template-rows: minmax(0, 1fr) !important;
    align-items: center !important;
    justify-items: stretch !important;
    gap: clamp(12px, 1.4vw, 20px) !important;
    width: min(100%, 1420px) !important;
    max-width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    overflow: hidden !important;
}

body[data-flow-state="results"]:not(.send-details-open) .result-review-stage .result-card {
    position: relative !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, 1fr) var(--review-footer-h) !important;
    align-self: center !important;
    width: 100% !important;
    max-width: 100% !important;
    height: min(100%, clamp(210px, 22vw, 360px)) !important;
    min-width: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

body[data-flow-state="results"]:not(.send-details-open) .result-review-stage .result-card-img-wrapper {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
}

body[data-flow-state="results"]:not(.send-details-open) .result-review-stage .result-card img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
}

body[data-flow-state="results"]:not(.send-details-open) .result-review-actions {
    grid-area: actions !important;
    position: relative !important;
    z-index: 9 !important;
    inset: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: clamp(10px, 1.6vw, 16px) !important;
    width: min(100%, 780px) !important;
    max-width: 100% !important;
    min-height: 0 !important;
    margin: 0 auto !important;
    padding: 0 !important;
}

body[data-flow-state="results"]:not(.send-details-open) .result-review-actions .primary-button,
body[data-flow-state="results"]:not(.send-details-open) .result-review-actions .back-button {
    position: relative !important;
    inset: auto !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;
    margin: 0 !important;
}

body[data-flow-state="results"]:not(.send-details-open) .result-review-actions .primary-button {
    width: auto !important;
    min-width: min(100%, 340px) !important;
    max-width: 100% !important;
    min-height: clamp(48px, 6dvh, 58px) !important;
    height: auto !important;
}

body[data-flow-state="results"]:not(.send-details-open) .result-review-actions .back-button {
    width: auto !important;
    min-height: clamp(42px, 5.4dvh, 52px) !important;
    padding: 0 18px !important;
}

@media (max-width: 768px) {
    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage {
        --review-gap: 8px;
        --review-card-gap: 8px;
        --review-footer-h: clamp(30px, 4dvh, 36px);
        grid-template-rows: auto minmax(0, 1fr) auto !important;
        gap: var(--review-gap) !important;
        padding: calc(var(--mobile-brand-clearance) + 46px) 14px calc(12px + env(safe-area-inset-bottom)) !important;
        overflow: hidden !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-header {
        gap: 4px !important;
        width: min(100%, 560px) !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage .flow-title {
        width: min(100%, 560px) !important;
        font-size: clamp(25px, 7.3vw, 34px) !important;
        line-height: .96 !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage .flow-subtitle {
        width: min(100%, 390px) !important;
        font-size: clamp(11px, 3vw, 13px) !important;
        line-height: 1.2 !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage .result-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-rows: none !important;
        grid-auto-rows: auto !important;
        align-content: start !important;
        gap: var(--review-card-gap) !important;
        width: min(100%, 560px) !important;
        height: 100% !important;
        max-height: 100% !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        padding: 0 !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage .result-card {
        height: clamp(122px, 16.5dvh, 154px) !important;
        grid-template-rows: minmax(0, 1fr) var(--review-footer-h) !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage .result-caption {
        min-height: 0 !important;
        height: var(--review-footer-h) !important;
        padding: 0 38px 0 10px !important;
        font-size: clamp(11px, 3vw, 13px) !important;
        line-height: 1.1 !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-actions {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        justify-items: stretch !important;
        gap: 8px !important;
        width: min(100%, 560px) !important;
        padding-top: 2px !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-actions .primary-button,
    body[data-flow-state="results"]:not(.send-details-open) .result-review-actions .back-button {
        width: 100% !important;
        min-width: 0 !important;
        min-height: 44px !important;
        height: auto !important;
        justify-content: center !important;
        text-align: center !important;
        padding: 0 14px !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-actions .primary-button {
        order: 1 !important;
        font-size: clamp(14px, 4vw, 18px) !important;
        line-height: 1.1 !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-actions .back-button {
        order: 2 !important;
        font-size: clamp(13px, 3.7vw, 16px) !important;
    }
}

@media (max-width: 430px) {
    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage {
        padding: calc(var(--mobile-brand-clearance) + 40px) 12px calc(10px + env(safe-area-inset-bottom)) !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage .flow-title {
        font-size: clamp(24px, 7.15vw, 31px) !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage .flow-subtitle {
        font-size: clamp(10.5px, 2.9vw, 12px) !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage .result-card {
        height: clamp(112px, 15.4dvh, 142px) !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-actions .primary-button,
    body[data-flow-state="results"]:not(.send-details-open) .result-review-actions .back-button {
        min-height: 42px !important;
    }
}

/* Quiz report extension for Result Review. Placed last to override the result lock rules above. */
body[data-flow-state="results"]:not(.send-details-open) .result-review-stage.has-quiz-report {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px) !important;
    grid-template-rows: auto minmax(0, 1fr) auto !important;
    grid-template-areas:
        "header header"
        "gallery report"
        "actions actions" !important;
    align-items: stretch !important;
}

body[data-flow-state="results"]:not(.send-details-open) .result-review-stage.has-quiz-report .result-grid {
    width: 100% !important;
}

.quiz-report {
    grid-area: report;
    align-self: stretch;
    min-width: 0;
    max-height: 100%;
    overflow: hidden;
    padding: clamp(16px, 2vw, 24px);
    border: 1px solid rgba(48,55,57,.95);
    border-left: 3px solid var(--cyan);
    background: linear-gradient(180deg, rgba(2,11,13,.92), rgba(5,5,5,.78));
    color: #eef7f7;
    font-family: var(--nanno-font-body);
    text-align: left;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.035);
}

.quiz-report[hidden] {
    display: none !important;
}

.quiz-report-header {
    display: grid;
    gap: 4px;
    margin-bottom: 14px;
}

.quiz-report-header p,
.quiz-report-profile span {
    margin: 0;
    color: var(--cyan);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.quiz-report-header h2 {
    margin: 0;
    color: #fff;
    font: 700 clamp(24px, 3vw, 34px)/.95 var(--nanno-font-display);
    text-transform: uppercase;
}

.quiz-report-profile {
    display: grid;
    gap: 5px;
    padding: 12px 0;
    border-top: 1px solid rgba(255,255,255,.14);
    border-bottom: 1px solid rgba(255,255,255,.14);
}

.quiz-report-profile strong {
    color: #fff;
    font-size: clamp(17px, 1.8vw, 22px);
    line-height: 1.1;
}

.quiz-report-summary,
.quiz-report-congrats,
.quiz-report-strengths,
.quiz-report-secondary,
.quiz-report-disclaimer {
    margin: 12px 0 0;
    color: rgba(236,244,245,.84);
    font-size: clamp(12px, 1.2vw, 14px);
    line-height: 1.45;
}

.quiz-report-strengths,
.quiz-report-secondary {
    color: rgba(10,186,181,.92);
    font-weight: 700;
}

.quiz-report-disclaimer {
    color: rgba(255,255,255,.52);
    font-size: 11px;
}

@media (max-width: 900px), (orientation: portrait) {
    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage.has-quiz-report {
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-rows: auto max-content max-content auto !important;
        grid-template-areas:
            "header"
            "gallery"
            "report"
            "actions" !important;
        overflow-y: auto !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage.has-quiz-report .result-grid {
        min-height: 0 !important;
        height: auto !important;
    }

    .quiz-report {
        width: 100%;
        max-height: none;
        overflow: visible;
    }
}

@media (max-width: 380px), (max-width: 768px) and (max-height: 700px) {
    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage {
        --review-gap: 7px;
        --review-card-gap: 7px;
        --review-footer-h: 28px;
        padding-top: calc(var(--mobile-brand-clearance) + 30px) !important;
        padding-bottom: calc(8px + env(safe-area-inset-bottom)) !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage .flow-title {
        font-size: clamp(22px, 6.9vw, 28px) !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage .flow-subtitle {
        font-size: 10.5px !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage .result-card {
        height: clamp(96px, 14dvh, 118px) !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-actions {
        gap: 6px !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-actions .primary-button,
    body[data-flow-state="results"]:not(.send-details-open) .result-review-actions .back-button {
        min-height: 38px !important;
        font-size: 13px !important;
    }
}

/* Result Review header order lock: title, ready line, subtitle. */
body[data-flow-state="results"]:not(.send-details-open) .result-review-stage .result-review-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: clamp(8px, 1.1dvh, 14px) !important;
    width: min(100%, 1180px) !important;
    margin: 0 auto !important;
    text-align: center !important;
}

body[data-flow-state="results"]:not(.send-details-open) .result-review-stage #resultsTitle.flow-title {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: clamp(8px, 1.2dvh, 14px) !important;
    width: min(100%, 1180px) !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 auto !important;
    padding: 0 !important;
    font-size: clamp(38px, 3.5vw, 58px) !important;
    line-height: .92 !important;
    white-space: normal !important;
    text-align: center !important;
}

body[data-flow-state="results"]:not(.send-details-open) .result-review-stage #resultsTitle.flow-title span,
body[data-flow-state="results"]:not(.send-details-open) .result-review-stage #resultsTitle.flow-title strong {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: .92 !important;
    text-align: center !important;
}

body[data-flow-state="results"]:not(.send-details-open) .result-review-stage #resultsTitle.flow-title span {
    color: #f4f5f5 !important;
}

body[data-flow-state="results"]:not(.send-details-open) .result-review-stage #resultsTitle.flow-title strong {
    color: var(--cyan) !important;
}

body[data-flow-state="results"]:not(.send-details-open) .result-review-stage .result-review-header .flow-subtitle {
    display: block !important;
    width: min(100%, 620px) !important;
    margin: 0 auto !important;
    padding: 0 !important;
    color: var(--nanno-muted) !important;
    font-size: clamp(14px, 1.25vw, 18px) !important;
    line-height: 1.35 !important;
    text-align: center !important;
}

@media (max-width: 768px) {
    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage .result-review-header {
        gap: 7px !important;
        width: min(100%, 560px) !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage #resultsTitle.flow-title {
        width: min(100%, 560px) !important;
        gap: 6px !important;
        font-size: clamp(26px, 7.2vw, 36px) !important;
        line-height: .95 !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage .result-review-header .flow-subtitle {
        width: min(100%, 420px) !important;
        font-size: clamp(12px, 3.2vw, 14px) !important;
        line-height: 1.28 !important;
    }
}

@media (max-width: 430px) {
    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage .result-review-header {
        gap: 6px !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage #resultsTitle.flow-title {
        gap: 5px !important;
        font-size: clamp(24px, 6.8vw, 31px) !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage .result-review-header .flow-subtitle {
        font-size: clamp(11px, 2.9vw, 12.5px) !important;
    }
}

@media (max-height: 700px) {
    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage #resultsTitle.flow-title {
        gap: 4px !important;
        font-size: clamp(22px, 3.1vw, 34px) !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage .result-review-header .flow-subtitle {
        font-size: clamp(10.5px, 1vw, 12px) !important;
        line-height: 1.2 !important;
    }
}

/* Result Review final spacing pass: keep title, subtitle, gallery, and actions in their own rows. */
body[data-flow-state="results"]:not(.send-details-open) .result-review-stage #resultsTitle.flow-title br {
    display: none !important;
}

body[data-flow-state="results"]:not(.send-details-open) .result-review-stage .result-review-header {
    gap: clamp(4px, .6dvh, 8px) !important;
}

body[data-flow-state="results"]:not(.send-details-open) .result-review-stage #resultsTitle.flow-title {
    gap: clamp(2px, .32dvh, 5px) !important;
}

body[data-flow-state="results"]:not(.send-details-open) .result-review-stage .result-review-header .flow-subtitle {
    position: relative !important;
    z-index: 2 !important;
}

@media (min-width: 769px) and (max-width: 1100px) and (orientation: portrait) {
    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage {
        --review-gap: clamp(10px, 1.15dvh, 16px);
        --review-card-gap: clamp(10px, 1.1dvh, 14px);
        --review-footer-h: clamp(36px, 4.1dvh, 46px);
        gap: var(--review-gap) !important;
        padding: clamp(128px, 12dvh, 156px) clamp(24px, 4vw, 40px) clamp(20px, 2.8dvh, 32px) !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage .result-review-header {
        width: min(100%, 720px) !important;
        gap: clamp(4px, .6dvh, 8px) !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage #resultsTitle.flow-title {
        width: min(100%, 720px) !important;
        gap: clamp(2px, .3dvh, 5px) !important;
        font-size: clamp(34px, 5vw, 50px) !important;
        line-height: .92 !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage .result-review-header .flow-subtitle {
        width: min(100%, 560px) !important;
        font-size: clamp(13px, 1.8vw, 16px) !important;
        line-height: 1.25 !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage .result-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-rows: none !important;
        grid-auto-rows: auto !important;
        align-content: start !important;
        gap: var(--review-card-gap) !important;
        width: min(100%, 720px) !important;
        height: 100% !important;
        max-height: 100% !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        padding: 0 !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage .result-card {
        height: clamp(172px, 18.5dvh, 240px) !important;
        grid-template-rows: minmax(0, 1fr) var(--review-footer-h) !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage .result-caption {
        min-height: 0 !important;
        height: var(--review-footer-h) !important;
        padding: 0 42px 0 14px !important;
        font-size: clamp(13px, 1.75vw, 16px) !important;
        line-height: 1.1 !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-actions {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        justify-items: stretch !important;
        align-items: stretch !important;
        gap: 10px !important;
        width: min(100%, 720px) !important;
        margin: 0 auto !important;
        padding: 0 !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-actions .primary-button,
    body[data-flow-state="results"]:not(.send-details-open) .result-review-actions .back-button {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        min-height: 48px !important;
        justify-content: center !important;
        text-align: center !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-actions .primary-button {
        order: 1 !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-actions .back-button {
        order: 2 !important;
    }
}

@media (max-width: 768px) {
    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage .result-review-header {
        gap: 4px !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage #resultsTitle.flow-title {
        gap: 2px !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-actions {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        justify-items: stretch !important;
        align-items: stretch !important;
        width: min(100%, 560px) !important;
        margin: 0 auto !important;
        gap: 8px !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-actions .primary-button,
    body[data-flow-state="results"]:not(.send-details-open) .result-review-actions .back-button {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        justify-content: center !important;
        text-align: center !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-actions .primary-button {
        order: 1 !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-actions .back-button {
        order: 2 !important;
    }
}

/* Result Review mobile/tablet polish: no rogue stepper, full-width cards, stable actions. */
body[data-flow-state="results"]:not(.send-details-open) .modal-shell > .stepper {
    display: none !important;
}

@media (max-width: 1100px), (max-width: 1200px) and (max-height: 700px) {
    body[data-flow-state="results"]:not(.send-details-open) .results-screen.flow-screen.is-active {
        overflow: hidden !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage {
        --review-gap: clamp(8px, 1.1dvh, 13px);
        --review-card-gap: clamp(10px, 1.3dvh, 14px);
        --review-footer-h: clamp(40px, 4.9dvh, 48px);
        grid-template-rows: auto minmax(0, 1fr) auto !important;
        align-content: stretch !important;
        gap: var(--review-gap) !important;
        padding: calc(var(--mobile-brand-clearance) + 22px) clamp(16px, 4vw, 28px) calc(12px + env(safe-area-inset-bottom)) !important;
        overflow: hidden !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage .result-review-header {
        width: min(100%, 760px) !important;
        gap: clamp(3px, .45dvh, 6px) !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage #resultsTitle.flow-title {
        width: min(100%, 760px) !important;
        gap: 1px !important;
        font-size: clamp(27px, 6.4vw, 48px) !important;
        line-height: .9 !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage .result-review-header .flow-subtitle {
        width: min(100%, 560px) !important;
        font-size: clamp(12px, 2.7vw, 16px) !important;
        line-height: 1.18 !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage .result-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-rows: none !important;
        grid-auto-rows: auto !important;
        align-content: start !important;
        align-items: start !important;
        justify-items: stretch !important;
        gap: var(--review-card-gap) !important;
        width: min(100%, 760px) !important;
        height: 100% !important;
        min-height: 0 !important;
        max-height: 100% !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        overscroll-behavior: contain !important;
        -webkit-overflow-scrolling: touch;
        padding: 0 !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage .result-card {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-rows: auto var(--review-footer-h) !important;
        align-self: stretch !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage .result-card-img-wrapper {
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        aspect-ratio: 16 / 9 !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage .result-card img {
        object-fit: cover !important;
        object-position: center !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage .result-caption {
        height: var(--review-footer-h) !important;
        min-height: 0 !important;
        padding: 0 46px 0 14px !important;
        font-size: clamp(13px, 3.1vw, 16px) !important;
        line-height: 1.08 !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-actions {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        align-items: stretch !important;
        justify-items: stretch !important;
        gap: 8px !important;
        width: min(100%, 760px) !important;
        margin: 0 auto !important;
        padding: 0 !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-actions .primary-button,
    body[data-flow-state="results"]:not(.send-details-open) .result-review-actions .back-button {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        min-height: clamp(42px, 5.4dvh, 52px) !important;
        justify-content: center !important;
        text-align: center !important;
        padding: 0 14px !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-actions .primary-button {
        order: 1 !important;
        font-size: clamp(15px, 3.8vw, 18px) !important;
        line-height: 1.08 !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-actions .back-button {
        order: 2 !important;
        font-size: clamp(14px, 3.4vw, 16px) !important;
    }
}

@media (max-width: 430px) {
    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage {
        padding: calc(var(--mobile-brand-clearance) + 18px) 12px calc(10px + env(safe-area-inset-bottom)) !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage #resultsTitle.flow-title {
        font-size: clamp(25px, 7.15vw, 31px) !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage .result-review-header .flow-subtitle {
        font-size: clamp(11.5px, 3vw, 13px) !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-actions .primary-button,
    body[data-flow-state="results"]:not(.send-details-open) .result-review-actions .back-button {
        min-height: 44px !important;
    }
}

/* Result Review mobile actions: center both bottom buttons as elements and text. */
@media (max-width: 768px) {
    body[data-flow-state="results"]:not(.send-details-open) .result-review-actions {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        justify-items: center !important;
        align-items: center !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-inline: auto !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-actions .primary-button,
    body[data-flow-state="results"]:not(.send-details-open) .result-review-actions .back-button {
        grid-area: auto !important;
        grid-column: 1 !important;
        grid-row: auto !important;
        justify-self: center !important;
        width: min(100%, 292px) !important;
        min-width: 0 !important;
        max-width: 100% !important;
        justify-content: center !important;
        text-align: center !important;
        margin-inline: auto !important;
    }
}

/* Quiz report mobile stack: portraits, report, then fully reachable actions. */
@media (max-width: 900px), (orientation: portrait) {
    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage.has-quiz-report {
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-rows: auto minmax(0, 1fr) auto auto !important;
        grid-template-areas:
            "header"
            "gallery"
            "report"
            "actions" !important;
        align-content: stretch !important;
        overflow-x: hidden !important;
        overflow-y: hidden !important;
        padding-bottom: calc(10px + env(safe-area-inset-bottom)) !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage.has-quiz-report .result-grid {
        grid-template-rows: repeat(3, minmax(0, 1fr)) !important;
        grid-auto-rows: 0 !important;
        align-content: stretch !important;
        height: 100% !important;
        min-height: 0 !important;
        max-height: 100% !important;
        overflow: hidden !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage.has-quiz-report .result-card {
        height: 100% !important;
        min-height: 0 !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage.has-quiz-report .result-card-img-wrapper {
        width: 100% !important;
        height: 100% !important;
        min-height: 0 !important;
        aspect-ratio: auto !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage.has-quiz-report .quiz-report {
        width: 100% !important;
        max-height: min(18dvh, 160px) !important;
        overflow: hidden !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage.has-quiz-report .result-review-actions {
        min-height: 0 !important;
        height: auto !important;
        align-content: center !important;
    }
}

/* Keep every public flow state locked to the visible browser viewport. */
body[data-flow-state] {
    width: 100vw;
    height: 100svh;
    height: 100dvh;
    min-height: 100svh;
    min-height: 100dvh;
    max-height: 100svh;
    max-height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
}

body[data-flow-state] .portrait-dialog,
body[data-flow-state] .modal-shell,
body[data-flow-state] .flow-screen.is-active {
    max-height: 100svh;
    max-height: 100dvh;
}

.generation-status-panel .privacy-note {
    align-items: center;
    justify-content: flex-end;
    text-align: right;
}

.generation-status-panel .privacy-note span {
    flex: 0 1 auto;
    width: auto;
    max-width: min(100%, 520px);
    min-width: 0;
    text-align: right;
}

/* Keep the generation workspace inside shorter laptop viewports. */
@media (min-width: 769px) {
    [data-screen="generating"].flow-screen.is-active {
        height: 100%;
        min-height: 0;
        grid-template-rows: auto auto minmax(0, 1fr);
        gap: 8px;
        padding: clamp(88px, 11dvh, 100px) clamp(24px, 4vw, 44px) clamp(12px, 2dvh, 18px);
        overflow: hidden;
    }

    .generating-layout {
        width: min(100%, 1420px);
        height: 100%;
        min-height: 0;
        overflow: hidden;
    }

    .generation-status-panel,
    .quiz-panel {
        height: 100%;
        min-height: 0;
        overflow: hidden;
    }

    .quiz-panel {
        gap: clamp(7px, 1dvh, 11px);
        padding: clamp(14px, 2vw, 24px);
    }

    .quiz-question {
        min-height: 50px;
    }

    .quiz-options {
        grid-template-rows: repeat(4, minmax(0, 1fr));
        height: min(23dvh, 210px);
        min-height: 160px;
        gap: clamp(6px, .9dvh, 9px);
    }

    .quiz-option {
        min-height: 0;
        padding: clamp(9px, 1.4vw, 13px);
    }
}

@media (min-width: 769px) and (max-height: 700px) {
    .stepper {
        top: 20px;
    }

    [data-screen="generating"].flow-screen.is-active {
        gap: 4px;
        padding: 70px 22px 10px;
    }

    [data-screen="generating"] .flow-title {
        font-size: clamp(34px, 4.2vw, 46px) !important;
        line-height: .9;
    }

    [data-screen="generating"] .flow-subtitle {
        font-size: 12px !important;
        line-height: 1.15;
    }

    .generating-layout {
        gap: 12px;
    }

    .generation-status-panel {
        grid-template-columns: 105px minmax(0, 1fr);
        grid-template-areas:
            "ring tasks"
            "ready ready"
            "privacy privacy";
        align-content: center;
        align-items: center;
        justify-items: stretch;
        gap: 6px 10px;
        padding: 10px;
    }

    .generation-status-panel .generator-wrap {
        grid-area: ring;
        width: 100px;
        max-width: 100px;
        justify-self: center;
    }

    .generation-status-panel .generation-list {
        grid-area: tasks;
        gap: 4px;
    }

    .generation-status-panel .generation-item {
        gap: 7px;
        font-size: 11px;
        line-height: 1.15;
    }

    .generation-status-panel .task-icon {
        flex-basis: 20px;
        width: 20px;
        height: 20px;
    }

    .generation-status-panel .generation-ready-message {
        grid-area: ready;
        padding: 6px 8px;
        font-size: 10px;
        line-height: 1.25;
    }

    .generation-status-panel .privacy-note {
        grid-area: privacy;
        grid-column: 1 / -1;
        width: 100%;
        min-width: 0;
        gap: 7px;
        font-size: 9px;
        line-height: 1.2;
    }

    .generation-status-panel .privacy-note span {
        flex: 0 1 auto;
        width: auto;
        max-width: min(100%, 520px);
        min-width: 0;
    }

    .generation-status-panel .privacy-note svg {
        width: 17px;
        flex-basis: 17px;
    }

    .quiz-panel {
        gap: 4px;
        padding: 10px;
    }

    .quiz-kicker {
        font-size: 9px;
    }

    .quiz-title {
        font-size: 19px;
    }

    .quiz-subtitle,
    .quiz-status {
        font-size: 10px;
        line-height: 1.2;
    }

    .quiz-progress-meta {
        font-size: 10px;
    }

    .quiz-question {
        min-height: 32px;
        gap: 2px;
    }

    .quiz-question strong {
        font-size: 15px;
        line-height: 1.08;
    }

    .quiz-options {
        height: min(20dvh, 120px);
        min-height: 104px;
        gap: 4px;
    }

    .quiz-option {
        padding: 4px 8px;
        font-size: 11px;
        line-height: 1.1;
    }

    .quiz-nav-button {
        min-height: 28px;
        padding: 0 10px;
        font-size: 10px;
    }

    .quiz-privacy-note {
        font-size: 9px;
        line-height: 1.15;
    }
}

/* Landing mobile actions: keep bottom buttons inside the viewport. */
@media (max-width: 768px) {
    :root {
        --mobile-brand-width: 37.5vw;
        --mobile-brand-height: calc(var(--mobile-brand-width) * 0.374);
        --mobile-brand-clearance: calc(var(--mobile-brand-top) + var(--mobile-brand-height));
    }

    .video-entry-logo,
    .lab-hero-brand,
    .lab-hero-logo,
    .modal-logo,
    .send-details-brand,
    .send-details-logo {
        width: var(--mobile-brand-width) !important;
        max-width: var(--mobile-brand-width) !important;
        height: auto;
    }

    .video-entry-logo {
        left: var(--mobile-brand-left) !important;
        top: var(--mobile-brand-top) !important;
    }

    .lab-hero-brand {
        left: calc(var(--mobile-brand-left) - var(--mobile-brand-shell-offset));
        top: calc(var(--mobile-brand-top) - var(--mobile-brand-shell-offset));
    }

    .modal-header {
        left: var(--mobile-brand-left);
        right: var(--mobile-brand-left);
        top: var(--mobile-brand-top);
    }

    .send-details-brand {
        left: var(--mobile-brand-left);
        top: var(--mobile-brand-top);
    }

    .portrait-dialog {
        height: 100svh;
        height: 100dvh;
        max-height: 100svh;
        max-height: 100dvh;
        overflow: hidden !important;
    }

    .modal-shell {
        height: 100% !important;
        min-height: 0 !important;
        max-height: 100% !important;
        overflow: hidden !important;
    }

    [data-screen="generating"].flow-screen.is-active {
        height: 100%;
        min-height: 0;
        max-height: 100%;
        grid-template-rows: auto auto minmax(0, 1fr);
        gap: 5px;
        padding: calc(var(--mobile-brand-clearance) + 54px) 12px calc(10px + env(safe-area-inset-bottom));
        overflow: hidden !important;
    }

    [data-screen="generating"] .flow-title {
        width: min(100%, 390px);
        font-size: clamp(27px, 7.2vw, 34px) !important;
        line-height: .92;
    }

    [data-screen="generating"] .flow-subtitle {
        width: min(100%, 390px);
        font-size: clamp(11px, 2.8vw, 13px) !important;
        line-height: 1.2;
    }

    .generating-layout {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto minmax(0, 1fr);
        gap: 7px;
        width: 100%;
        height: 100%;
        min-height: 0;
        overflow: hidden;
    }

    .generation-status-panel {
        grid-template-columns: 76px minmax(0, 1fr);
        grid-template-areas:
            "ring tasks"
            "ready ready"
            "privacy privacy";
        align-content: center;
        align-items: center;
        justify-items: stretch;
        gap: 6px 10px;
        width: 100%;
        min-height: 0;
        max-height: 190px;
        padding: 9px 12px;
        overflow: hidden;
    }

    .generation-status-panel .generator-wrap {
        grid-area: ring;
        width: 72px;
        max-width: 72px;
        justify-self: center;
    }

    .generation-status-panel .generation-list {
        grid-area: tasks;
        gap: 4px;
    }

    .generation-status-panel .generation-item {
        gap: 8px;
        min-height: 24px;
        font-size: clamp(11px, 2.9vw, 13px);
        line-height: 1.15;
    }

    .generation-status-panel .task-icon {
        flex-basis: 20px;
        width: 20px;
        height: 20px;
    }

    .generation-status-panel .generation-item.is-complete .task-icon::after {
        font-size: 12px;
    }

    .generation-status-panel .generation-ready-message {
        grid-area: ready;
        padding: 7px 9px;
        font-size: clamp(10px, 2.65vw, 12px);
        line-height: 1.25;
    }

    .generation-status-panel .privacy-note {
        grid-area: privacy;
        grid-column: 1 / -1;
        width: 100%;
        min-width: 0;
        gap: 7px;
        font-size: clamp(9px, 2.45vw, 11px);
        line-height: 1.2;
    }

    .generation-status-panel .privacy-note span {
        flex: 0 1 auto;
        width: auto;
        max-width: calc(100% - 24px);
        min-width: 0;
        white-space: normal;
    }

    .generation-status-panel .privacy-note svg {
        width: 17px;
        flex-basis: 17px;
    }

    .quiz-panel {
        height: 100%;
        min-height: 0;
        gap: 4px;
        padding: 9px 12px;
        overflow: hidden;
    }

    .quiz-kicker {
        font-size: 9px;
    }

    .quiz-title {
        font-size: clamp(17px, 4.7vw, 21px);
        line-height: 1;
    }

    .quiz-subtitle,
    .quiz-status {
        font-size: clamp(10px, 2.6vw, 12px);
        line-height: 1.25;
    }

    .quiz-status {
        padding: 6px 8px;
    }

    .quiz-progress-meta {
        font-size: 10px;
    }

    .quiz-progress-bar {
        height: 3px;
    }

    .quiz-question {
        min-height: 36px;
        gap: 3px;
    }

    .quiz-question strong {
        font-size: clamp(14px, 3.8vw, 17px);
        line-height: 1.1;
    }

    .quiz-question span {
        font-size: 10px;
    }

    .quiz-options {
        grid-template-rows: repeat(4, minmax(0, 1fr));
        gap: 5px;
        height: min(21dvh, 190px);
        min-height: 140px;
    }

    .quiz-option {
        min-height: 0;
        padding: 6px 10px;
        font-size: clamp(11px, 2.9vw, 13px);
        line-height: 1.12;
    }

    .quiz-nav-button {
        min-height: 30px;
        padding: 0 11px;
        font-size: 11px;
    }

    .quiz-privacy-note {
        font-size: 9px;
        line-height: 1.2;
    }

    .quiz-panel:has(.quiz-status:not([hidden]):not(:empty)) .quiz-options {
        height: min(17dvh, 150px);
        min-height: 120px;
    }

    .lab-hero-copy {
        display: contents;
    }

    .experience-shell {
        height: 100svh;
        height: 100dvh;
        min-height: 0;
        max-height: 100svh;
        max-height: 100dvh;
        overflow: hidden;
    }

    .lab-hero-final,
    .lab-hero-shell {
        width: 100%;
        max-width: 100%;
        height: 100%;
        min-width: 0;
        min-height: 0;
        max-height: 100%;
        overflow: hidden;
    }

    .experience-shell {
        padding: clamp(6px, 1.25svh, 10px);
    }

    .lab-hero-shell {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto minmax(0, 1fr) auto;
        align-content: stretch;
        justify-items: center;
        gap: clamp(5px, .9svh, 9px);
        padding: clamp(6px, 1.25svh, 10px) 8px calc(clamp(6px, 1.25svh, 10px) + env(safe-area-inset-bottom));
    }

    .lab-hero-title {
        order: 1;
        width: 100%;
        min-width: 0;
        max-width: calc(100vw - 32px);
        margin-top: calc(var(--mobile-brand-clearance) + 8px);
        font-size: clamp(27px, 8.2vw, 36px);
        overflow: hidden;
    }

    .lab-hero-summary {
        order: 2;
        width: min(100%, 360px);
        min-width: 0;
        max-width: calc(100vw - 32px);
        overflow-wrap: break-word;
    }

    .lab-hero-visual {
        order: 3;
        align-self: stretch;
        width: min(100%, 430px);
        height: 100%;
        min-height: 0;
        overflow: hidden;
    }

    .lab-hero-visual-frame {
        width: 100% !important;
        height: 100% !important;
        min-height: 0 !important;
        max-height: min(46svh, 420px) !important;
        align-self: center;
    }

    .lab-hero-actions {
        order: 4;
        align-self: end;
        flex: 0 0 auto;
        width: min(100%, 360px);
        min-width: 0;
        max-width: calc(100vw - 32px);
    }

    .video-entry-actions {
        left: calc(18px + env(safe-area-inset-left)) !important;
        right: calc(18px + env(safe-area-inset-right)) !important;
        bottom: calc(18px + env(safe-area-inset-bottom)) !important;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 10px !important;
        width: auto !important;
        max-width: none !important;
        transform: none !important;
    }

    .video-entry-button,
    .video-entry-button-secondary {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        min-height: 52px !important;
        padding: 0 16px !important;
        line-height: 1.08 !important;
        white-space: normal !important;
        overflow-wrap: normal !important;
        word-break: normal !important;
        text-align: center !important;
    }

    .video-entry-button {
        font-size: clamp(16px, 4.3vw, 19px) !important;
    }

    .video-entry-button-secondary {
        min-height: 48px !important;
        font-size: clamp(15px, 4vw, 18px) !important;
    }
}

@media (max-width: 768px) and (max-height: 760px) {
    [data-screen="generating"].flow-screen.is-active {
        padding-top: calc(var(--mobile-brand-clearance) + 48px);
        gap: 3px;
    }

    [data-screen="generating"] .flow-title {
        font-size: clamp(23px, 6.4vw, 29px) !important;
    }

    [data-screen="generating"] .flow-subtitle {
        font-size: 10px !important;
    }

    .generation-status-panel {
        grid-template-columns: 64px minmax(0, 1fr);
        max-height: 145px;
        padding: 7px 10px;
    }

    .generation-status-panel .generator-wrap {
        width: 60px;
        max-width: 60px;
    }

    .generation-status-panel .generation-item {
        min-height: 20px;
        font-size: 10px;
    }

    .generation-status-panel .privacy-note {
        font-size: 8px;
    }

    .quiz-panel {
        padding: 7px 10px;
    }

    .quiz-subtitle,
    .quiz-privacy-note {
        display: none;
    }

    .quiz-question {
        min-height: 30px;
    }

    .quiz-options {
        height: min(18dvh, 125px);
        min-height: 108px;
    }

    .quiz-panel:has(.quiz-status:not([hidden]):not(:empty)) .quiz-options {
        height: min(15dvh, 108px);
        min-height: 96px;
    }
}

/* Public flow surfaces never become scroll containers; content scales to the viewport. */
body[data-flow-state] .portrait-dialog,
body[data-flow-state] .modal-shell,
body[data-flow-state] .flow-screen.is-active,
body[data-flow-state="results"]:not(.send-details-open) .result-review-stage,
body[data-flow-state="results"]:not(.send-details-open) .result-grid,
body[data-flow-state="results"]:not(.send-details-open) .quiz-report {
    overflow: hidden !important;
    overscroll-behavior: none !important;
}

@media (max-width: 900px), (orientation: portrait) {
    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage {
        --review-gap: 6px;
        --review-card-gap: 5px;
        --review-footer-h: clamp(24px, 3.2dvh, 30px);
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-rows: auto minmax(0, 1fr) auto !important;
        align-content: stretch !important;
        gap: var(--review-gap) !important;
        overflow: hidden !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage.has-quiz-report {
        grid-template-rows: auto minmax(0, 1fr) auto auto !important;
        gap: var(--review-gap) !important;
        overflow: hidden !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage .result-grid,
    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage.has-quiz-report .result-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-rows: repeat(3, minmax(0, 1fr)) !important;
        grid-auto-rows: 0 !important;
        align-content: stretch !important;
        align-items: stretch !important;
        gap: var(--review-card-gap) !important;
        width: min(100%, 560px) !important;
        height: 100% !important;
        min-height: 0 !important;
        max-height: 100% !important;
        overflow: hidden !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage .result-card,
    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage.has-quiz-report .result-card {
        grid-template-rows: minmax(0, 1fr) var(--review-footer-h) !important;
        align-self: stretch !important;
        width: 100% !important;
        height: 100% !important;
        min-height: 0 !important;
        max-height: 100% !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage .result-card-img-wrapper,
    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage.has-quiz-report .result-card-img-wrapper {
        width: 100% !important;
        height: 100% !important;
        min-height: 0 !important;
        aspect-ratio: auto !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage .result-card img {
        object-fit: contain !important;
        object-position: center !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage .result-caption {
        height: var(--review-footer-h) !important;
        min-height: 0 !important;
        padding: 0 36px 0 9px !important;
        font-size: clamp(9px, 2.65vw, 12px) !important;
        line-height: 1.05 !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage.has-quiz-report .quiz-report {
        display: grid;
        grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
        grid-template-areas:
            "report-header report-profile"
            "report-summary report-summary"
            "report-congrats report-congrats"
            "report-strengths report-secondary"
            "report-disclaimer report-disclaimer";
        align-items: start;
        gap: 3px 9px;
        width: min(100%, 560px) !important;
        max-height: min(18dvh, 156px) !important;
        padding: 9px 11px !important;
        overflow: hidden !important;
    }

    .quiz-report-header {
        grid-area: report-header;
        gap: 1px;
        min-width: 0;
        margin: 0;
    }

    .quiz-report-header p,
    .quiz-report-profile span {
        font-size: 8px;
    }

    .quiz-report-header h2 {
        font-size: clamp(18px, 5.2vw, 24px);
        line-height: .9;
    }

    .quiz-report-profile {
        grid-area: report-profile;
        gap: 2px;
        min-width: 0;
        padding: 0 0 0 8px;
        border: 0;
        border-left: 1px solid rgba(255,255,255,.14);
    }

    .quiz-report-profile strong {
        display: -webkit-box;
        overflow: hidden;
        font-size: clamp(12px, 3.2vw, 15px);
        line-height: 1.08;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .quiz-report-summary,
    .quiz-report-congrats,
    .quiz-report-strengths,
    .quiz-report-secondary,
    .quiz-report-disclaimer {
        display: -webkit-box;
        min-width: 0;
        margin: 0;
        overflow: hidden;
        font-size: clamp(8.5px, 2.35vw, 11px);
        line-height: 1.2;
        -webkit-box-orient: vertical;
    }

    .quiz-report-summary {
        grid-area: report-summary;
        -webkit-line-clamp: 2;
    }

    .quiz-report-congrats {
        grid-area: report-congrats;
        -webkit-line-clamp: 1;
    }

    .quiz-report-strengths {
        grid-area: report-strengths;
        -webkit-line-clamp: 1;
    }

    .quiz-report-secondary {
        grid-area: report-secondary;
        -webkit-line-clamp: 1;
    }

    .quiz-report-disclaimer {
        grid-area: report-disclaimer;
        font-size: 8px;
        -webkit-line-clamp: 2;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-actions {
        gap: 5px !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-actions .primary-button,
    body[data-flow-state="results"]:not(.send-details-open) .result-review-actions .back-button {
        min-height: clamp(36px, 4.6dvh, 42px) !important;
    }
}

@media (max-width: 430px) {
    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage {
        padding-top: calc(var(--mobile-brand-clearance) + 14px) !important;
        padding-bottom: calc(7px + env(safe-area-inset-bottom)) !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage #resultsTitle.flow-title {
        font-size: clamp(21px, 6.4vw, 28px) !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-stage .result-review-header .flow-subtitle {
        font-size: clamp(9px, 2.55vw, 11px) !important;
    }
}

@media (min-width: 769px) {
    .lab-hero-brand {
        left: clamp(20px, 3.2vw, 42px);
        top: clamp(20px, 3.2vw, 42px);
    }

    .video-entry-logo,
    .lab-hero-logo,
    .modal-logo,
    .send-details-logo {
        width: calc(var(--nanno-logo-size-desktop, 210px) * 1.5) !important;
        max-width: min(30vw, 390px) !important;
        height: auto;
    }
}

/* Result actions remain a matched pair at every responsive size. */
body[data-flow-state="results"]:not(.send-details-open) .result-review-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    align-items: stretch !important;
    justify-items: stretch !important;
    gap: 10px !important;
    width: min(100%, 560px) !important;
    margin-inline: auto !important;
}

body[data-flow-state="results"]:not(.send-details-open) .result-review-actions .primary-button,
body[data-flow-state="results"]:not(.send-details-open) .result-review-actions .back-button {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: clamp(54px, 6dvh, 62px) !important;
    min-height: clamp(54px, 6dvh, 62px) !important;
    max-height: clamp(54px, 6dvh, 62px) !important;
    padding: 0 18px !important;
    margin: 0 !important;
    justify-content: center !important;
    justify-self: stretch !important;
    text-align: center !important;
    box-sizing: border-box !important;
}

body[data-flow-state="results"]:not(.send-details-open) .result-review-actions .primary-button {
    order: 1 !important;
}

body[data-flow-state="results"]:not(.send-details-open) .result-review-actions .back-button {
    order: 2 !important;
}

@media (max-width: 768px) {
    body[data-flow-state="results"]:not(.send-details-open) .result-review-actions {
        width: min(100%, 292px) !important;
    }

    body[data-flow-state="results"]:not(.send-details-open) .result-review-actions .primary-button,
    body[data-flow-state="results"]:not(.send-details-open) .result-review-actions .back-button {
        height: clamp(40px, 4.8dvh, 46px) !important;
        min-height: clamp(40px, 4.8dvh, 46px) !important;
        max-height: clamp(40px, 4.8dvh, 46px) !important;
    }
}

/* Match the desktop Console Hero shell to the Capture workspace geometry. */
@media (min-width: 900px) and (orientation: landscape) {
    .experience-shell {
        padding: 16px !important;
    }

    .lab-hero-final {
        width: 100% !important;
        max-width: 1760px !important;
    }

    .lab-hero-shell {
        width: min(1760px, calc(100vw - 32px)) !important;
        max-width: calc(100vw - 32px) !important;
        height: min(960px, calc(100dvh - 32px)) !important;
        max-height: calc(100dvh - 32px) !important;
        padding: clamp(28px, 2.5vw, 48px) !important;
    }

    .lab-hero-shell::before {
        left: 18px !important;
        top: 18px !important;
        bottom: 18px !important;
    }

    .lab-hero-shell::after {
        right: 18px !important;
        top: 18px !important;
        bottom: 18px !important;
    }

    .lab-hero-brand {
        left: 40px !important;
        top: 28px !important;
        margin: 0 !important;
    }

    .lab-hero-copy {
        padding-top: clamp(28px, 3dvh, 40px);
    }
}

/* Keep every public-flow logo on the Console Hero viewport anchor. */
:root {
    --public-brand-page-left: 24px;
    --public-brand-page-top: 32px;
}

.video-entry-logo,
.lab-hero-brand,
.modal-logo,
.send-details-brand {
    position: fixed !important;
    left: var(--public-brand-page-left) !important;
    top: var(--public-brand-page-top) !important;
    margin: 0 !important;
}

@media (min-width: 769px) and (max-width: 899px) {
    :root {
        --public-brand-page-left: calc(clamp(12px, 2.8vw, 22px) + clamp(20px, 3.2vw, 42px));
        --public-brand-page-top: calc(clamp(12px, 2.8vw, 22px) + clamp(20px, 3.2vw, 42px));
    }
}

@media (min-width: 900px) and (orientation: portrait) {
    :root {
        --public-brand-page-left: calc(clamp(18px, 3.2vw, 48px) + clamp(20px, 3.2vw, 42px));
        --public-brand-page-top: calc(clamp(18px, 3.2vw, 48px) + clamp(20px, 3.2vw, 42px));
    }
}

@media (min-width: 900px) and (orientation: landscape) {
    :root {
        --public-brand-page-left: max(56px, calc(50vw - 840px));
        --public-brand-page-top: max(44px, calc(50dvh - 452px));
    }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
