/* =========================================================
   NEEDLE — COMPETITION UI
   Soft-neumorphic / retro-future treatment
   ========================================================= */

:root {
    --needle-bg: #ebece9;
    --needle-surface: #f4f5f2;
    --needle-surface-strong: #fafbf8;
    --needle-ink: #121316;
    --needle-muted: #74777d;
    --needle-faint: #a2a5aa;
    --needle-line: rgba(18, 19, 22, 0.08);

    --needle-accent: #665cff;
    --needle-accent-soft: rgba(102, 92, 255, 0.14);
    --needle-accent-glow: rgba(102, 92, 255, 0.20);

    --choice-height: 570px;
    --choice-radius: 28px;

    --shadow-raised:
        18px 18px 38px rgba(117, 121, 126, 0.18),
        -16px -16px 34px rgba(255, 255, 255, 0.88);

    --shadow-hover:
        22px 24px 48px rgba(110, 114, 120, 0.22),
        -18px -18px 38px rgba(255, 255, 255, 0.96),
        0 0 0 1px rgba(102, 92, 255, 0.09),
        0 0 28px rgba(102, 92, 255, 0.10);

    --shadow-inset:
        inset 3px 3px 8px rgba(112, 116, 122, 0.10),
        inset -3px -3px 8px rgba(255, 255, 255, 0.90);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family:
        Inter,
        ui-sans-serif,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    color: var(--needle-ink);
    background: #f5f4f1;
}

button {
    font: inherit;
}

/* =========================================================
   COMPETITION PAGE — BACKDROP
   ========================================================= */

.competition-page {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    overflow: hidden;
    background:
        radial-gradient(circle at 12% 8%, rgba(255, 255, 255, 0.30), transparent 30%),
        radial-gradient(circle at 88% 24%, rgba(102, 92, 255, 0.10), transparent 28%),
        linear-gradient(145deg, #e4e0f6 0%, #dcd7f3 55%, #d5d0ed 100%);
}

.competition-page::before,
.competition-page::after {
    content: "";
    position: fixed;
    z-index: -1;
    pointer-events: none;
    border-radius: 999px;
    filter: blur(1px);
}

.competition-page::before {
    width: 380px;
    height: 380px;
    left: -190px;
    bottom: -130px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0));
}

.competition-page::after {
    width: 420px;
    height: 420px;
    right: -220px;
    top: 140px;
    background: radial-gradient(circle, rgba(102, 92, 255, 0.08), rgba(102, 92, 255, 0));
}

/* =========================================================
   HEADER
   ========================================================= */

.competition-header {
    position: relative;
    z-index: 50;
    height: 76px;
    padding: 0 44px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background: rgba(244, 245, 242, 0.70);
    border-bottom: 1px solid rgba(18, 19, 22, 0.055);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(18px) saturate(130%);
    -webkit-backdrop-filter: blur(18px) saturate(130%);
}

.competition-header .brand {
    position: relative;
    color: var(--needle-ink);
    text-decoration: none;
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.26em;
}

.competition-header .brand::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0.26em;
    bottom: -9px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, var(--needle-accent), transparent);
    opacity: 0.72;
}

.progress-area {
    width: 220px;
}

#progressText {
    display: block;
    margin-bottom: 8px;
    color: var(--needle-muted);
    text-align: right;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.progress-track {
    height: 6px;
    padding: 1px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(229, 230, 227, 0.92);
    box-shadow: var(--shadow-inset);
}

.progress-bar {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #8780ff 0%, var(--needle-accent) 55%, #5449ee 100%);
    box-shadow: 0 0 12px var(--needle-accent-glow);
    transition: width 0.24s ease;
}

/* =========================================================
   STAGE
   ========================================================= */

.competition-stage {
    width: min(1140px, 92vw);
    margin: 0 auto;
    padding: 38px 0 62px;
    text-align: center;
}

.mode-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    margin-bottom: 12px;
    padding: 0 13px;

    color: #5f5aee;
    background: rgba(247, 247, 245, 0.78);
    border: 1px solid rgba(102, 92, 255, 0.10);
    border-radius: 999px;
    box-shadow:
        5px 5px 12px rgba(120, 123, 128, 0.10),
        -5px -5px 12px rgba(255, 255, 255, 0.84);

    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.18em;
}

.competition-stage h1,
#question {
    margin: 0;
    font-size: clamp(34px, 3.8vw, 50px);
    font-weight: 760;
    line-height: 1.02;
    letter-spacing: -0.045em;
}

.instruction {
    margin: 12px 0 30px;
    color: var(--needle-muted);
    font-size: 15px;
    line-height: 1.5;
}

/* =========================================================
   SHARED COMPETITION GEOMETRY

   This is the invariant: photo choices and profile choices
   are the same physical card.
   ========================================================= */

.cards {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 58px minmax(0, 1fr);
    align-items: center;
    gap: 18px;
}

.choice-card {
    position: relative;
    width: 100%;
    height: var(--choice-height);
    min-width: 0;
    min-height: var(--choice-height);
    max-height: var(--choice-height);
    padding: 0;
    margin: 0;
    overflow: hidden;

    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: var(--choice-radius);
    outline: none;
    background: var(--needle-surface);
    box-shadow: var(--shadow-raised);

    cursor: pointer;
    transform: translateZ(0);
    transform-origin: center;
    transition:
        transform 190ms cubic-bezier(.2, .75, .2, 1),
        box-shadow 190ms cubic-bezier(.2, .75, .2, 1),
        border-color 190ms ease,
        filter 190ms ease;
}

.choice-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 8;
    pointer-events: none;
    border-radius: inherit;
    box-shadow:
        inset 0 0 0 1px rgba(18, 19, 22, 0.045),
        inset 0 1px 0 rgba(255, 255, 255, 0.70);
}

.choice-card:hover {
    transform: translateY(-5px) scale(1.006);
    border-color: rgba(102, 92, 255, 0.16);
    box-shadow: var(--shadow-hover);
}

.choice-card:active {
    transform: translateY(-1px) scale(0.994);
}

.choice-card:focus-visible {
    box-shadow:
        var(--shadow-raised),
        0 0 0 4px var(--needle-accent-soft);
}

.versus {
    position: relative;
    z-index: 20;
    width: 46px;
    height: 46px;
    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #696c72;
    background: rgba(244, 245, 242, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.84);
    border-radius: 50%;
    box-shadow:
        7px 7px 16px rgba(117, 121, 126, 0.15),
        -7px -7px 16px rgba(255, 255, 255, 0.88),
        inset 0 0 0 1px rgba(18, 19, 22, 0.035);

    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

/* =========================================================
   PHOTO CARD
   ========================================================= */

.photo-card {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
    background: #dfe1de;
}

.photo-card img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    transform: scale(1.002);
    transition:
        transform 420ms cubic-bezier(.2, .7, .2, 1),
        filter 240ms ease;
}

.choice-card:hover .photo-card img {
    transform: scale(1.022);
    filter: saturate(1.03) contrast(1.015);
}

/* =========================================================
   DESKTOP PROFILE CARD
   ========================================================= */

.info-card {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 26px 28px 22px;
    overflow: hidden;

    display: flex;
    flex-direction: column;

    color: var(--needle-ink);
    text-align: left;
    background:
        radial-gradient(circle at 88% 5%, rgba(102, 92, 255, 0.075), transparent 26%),
        linear-gradient(145deg, #f7f8f5 0%, #f0f1ee 100%);
}

.info-card::before {
    content: "PROFILE / SIGNAL";
    position: absolute;
    top: 18px;
    right: 22px;
    color: rgba(102, 92, 255, 0.38);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.info-card-heading {
    position: relative;
    display: flex;
    align-items: baseline;
    gap: 9px;
    padding: 2px 0 13px;
    border-bottom: 1px solid var(--needle-line);
}

.info-card-heading::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 54px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--needle-accent), rgba(102, 92, 255, 0));
}

.info-card-heading h2 {
    margin: 0;
    max-width: 75%;
    overflow: hidden;
    color: #111216;
    font-size: 32px;
    font-weight: 780;
    line-height: 1;
    letter-spacing: -0.045em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.info-card-heading span {
    color: var(--needle-muted);
    font-size: 18px;
    font-weight: 520;
    letter-spacing: -0.02em;
}

.primary-info {
    margin: 12px 0 10px;
    padding: 11px 14px;

    display: flex;
    flex-direction: column;
    gap: 3px;

    border-radius: 18px;
    background: rgba(238, 239, 236, 0.86);
    box-shadow: var(--shadow-inset);
}

.primary-info strong {
    overflow: hidden;
    color: #25262a;
    font-size: 16px;
    font-weight: 730;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.primary-info span {
    overflow: hidden;
    color: var(--needle-muted);
    font-size: 12px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.facts-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 0;
    border: 0;
}

.facts-grid > div {
    min-width: 0;
    min-height: 52px;
    padding: 9px 11px;

    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;

    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 15px;
    background: rgba(246, 247, 244, 0.74);
    box-shadow:
        5px 5px 11px rgba(121, 124, 129, 0.10),
        -5px -5px 11px rgba(255, 255, 255, 0.76);
}

.fact-label,
.section-label {
    color: #8a8d93;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 8px;
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.facts-grid > div > strong,
.facts-grid > div > span:not(.fact-label) {
    overflow: hidden;
    color: #27282c;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.28;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-section {
    min-height: 0;
    padding-top: 10px;
}

.profile-section p {
    margin: 4px 0 0;
    overflow: hidden;
    color: #45474c;
    font-size: 11px;
    line-height: 1.34;

    display: -webkit-box;
    -webkit-box-orient: vertical;
    line-clamp: 3;
    -webkit-line-clamp: 3;
}

.interest-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 6px;
    overflow: hidden;
    max-height: 46px;
}

.interest-tags span {
    padding: 5px 8px;
    color: #50525a;
    background: rgba(237, 238, 235, 0.90);
    border: 1px solid rgba(255, 255, 255, 0.68);
    border-radius: 999px;
    box-shadow:
        3px 3px 7px rgba(120, 123, 128, 0.09),
        -3px -3px 7px rgba(255, 255, 255, 0.68);
    font-size: 9px;
    font-weight: 650;
    line-height: 1;
    white-space: nowrap;
}

.keyboard-hint {
    margin-top: 24px;
    color: #979a9f;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 9px;
    letter-spacing: 0.06em;
}

.mobile-choice-hint {
    display: none;
}

/* Desktop/mobile profile variants */
.desktop-profile-card {
    display: flex;
    flex-direction: column;
}

.mobile-profile-card {
    display: none;
}

/* Keep the final section (normally Interests) visible and visually anchored. */
.info-card > .profile-section:last-child {
    margin-top: auto;
}

/* =========================================================
   TABLET / NARROW DESKTOP
   ========================================================= */

@media (max-width: 760px) {
    :root {
        --choice-height: 470px;
        --choice-radius: 22px;
    }

    .competition-header {
        height: 68px;
        padding: 0 20px;
    }

    .progress-area {
        width: 132px;
    }

    .competition-stage {
        width: min(720px, 94vw);
        padding-top: 28px;
    }

    .competition-stage h1,
    #question {
        font-size: clamp(28px, 5vw, 38px);
    }

    .cards {
        grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr);
        gap: 10px;
    }

    .versus {
        width: 36px;
        height: 36px;
        font-size: 8px;
    }

    .info-card {
        padding: 18px 19px 16px;
    }

    .info-card::before {
        display: none;
    }

    .info-card-heading {
        padding-bottom: 10px;
    }

    .info-card-heading h2 {
        font-size: 25px;
    }

    .info-card-heading span {
        font-size: 15px;
    }

    .primary-info {
        margin: 8px 0 7px;
        padding: 8px 10px;
    }

    .facts-grid {
        gap: 6px;
    }

    .facts-grid > div {
        min-height: 46px;
        padding: 7px 9px;
    }

    .profile-section {
        padding-top: 7px;
    }

    .profile-section p {
        margin-top: 3px;
        font-size: 10px;
        line-height: 1.25;
        line-clamp: 3;
        -webkit-line-clamp: 3;
    }

    .interest-tags {
        max-height: 38px;
        margin-top: 4px;
        gap: 4px;
    }

    .interest-tags span {
        padding: 4px 7px;
        font-size: 8px;
    }
}

/* =========================================================
   LANDING / AUTHENTICATION
   One real input sits over each segmented visual field.
   This preserves paste, autofill, accessibility and mobile
   keyboard behavior while retaining the retro-future look.
   ========================================================= */

.landing-body {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 82% 18%, rgba(102, 92, 255, 0.12), transparent 32%),
        radial-gradient(circle at 8% 88%, rgba(255, 255, 255, 0.86), transparent 28%),
        var(--needle-bg);
}

.auth-landing {
    min-height: 100vh;
    position: relative;
    isolation: isolate;
}

.auth-landing::before,
.auth-landing::after {
    content: "";
    position: fixed;
    z-index: -1;
    border-radius: 50%;
    pointer-events: none;
}

.auth-landing::before {
    width: 420px;
    height: 420px;
    right: -160px;
    top: 110px;
    border: 1px solid rgba(102, 92, 255, 0.08);
    box-shadow:
        inset 24px 24px 70px rgba(102, 92, 255, 0.035),
        0 0 100px rgba(102, 92, 255, 0.06);
}

.auth-landing::after {
    width: 210px;
    height: 210px;
    left: -95px;
    bottom: -45px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow: -18px -18px 48px rgba(255, 255, 255, 0.54);
}

.landing-topbar {
    height: 82px;
    padding: 0 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(18, 19, 22, 0.07);
    background: rgba(244, 245, 242, 0.68);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.landing-status {
    color: var(--needle-faint);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.18em;
}

.auth-hero {
    width: min(720px, calc(100vw - 40px));
    margin: 0 auto;
    padding: 72px 0 86px;
    text-align: center;
}

.auth-hero-copy .mode-label {
    margin-bottom: 18px;
}

.auth-hero-copy h1 {
    margin: 0;
    color: var(--needle-ink);
    font-size: clamp(48px, 7vw, 78px);
    font-weight: 850;
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.auth-hero-copy > p {
    max-width: 520px;
    margin: 20px auto 36px;
    color: var(--needle-muted);
    font-size: 16px;
    line-height: 1.55;
}

.auth-console {
    position: relative;
    width: min(600px, 100%);
    margin: 0 auto;
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 32px;
    background: rgba(244, 245, 242, 0.90);
    box-shadow:
        20px 22px 54px rgba(111, 115, 121, 0.18),
        -18px -18px 44px rgba(255, 255, 255, 0.88),
        inset 0 1px 0 rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

.auth-console::before {
    content: "";
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(18, 19, 22, 0.035);
    border-radius: 24px;
    pointer-events: none;
}

.auth-panel,
.audience-step,
.guest-entry,
.returning-user {
    position: relative;
    z-index: 1;
}

.auth-console-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    color: #83868c;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.18em;
}

.auth-signal {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--needle-accent);
    box-shadow: 0 0 13px var(--needle-accent-glow);
}

.auth-label {
    display: block;
    margin-bottom: 9px;
    color: #92959b;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.17em;
    text-align: left;
}

.segmented-field {
    position: relative;
    width: 100%;
    border-radius: 18px;
    transition:
        box-shadow 160ms ease,
        transform 160ms ease;
}

.segmented-field.is-focused {
    box-shadow:
        0 0 0 1px rgba(102, 92, 255, 0.18),
        0 0 24px rgba(102, 92, 255, 0.08);
}

.segmented-input {
    position: absolute;
    inset: 0;
    z-index: 3;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: transparent;
    caret-color: transparent;
    opacity: 0.02;
    cursor: text;
}

.phone-digits,
.otp-digits {
    position: relative;
    z-index: 1;
    display: grid;
    width: 100%;
}

.phone-digits {
    grid-template-columns: repeat(3, 1fr) 12px repeat(3, 1fr) 12px repeat(4, 1fr);
    gap: 6px;
}

.otp-digits {
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

.phone-digits > span:not(.digit-gap),
.otp-digits > span {
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 12px;
    background: #eef0ed;
    color: var(--needle-ink);
    box-shadow:
        inset 3px 3px 7px rgba(110, 114, 120, 0.11),
        inset -3px -3px 7px rgba(255, 255, 255, 0.88);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 17px;
    font-weight: 750;
    transition:
        background 130ms ease,
        box-shadow 130ms ease,
        border-color 130ms ease;
}

.phone-digits > span.is-filled,
.otp-digits > span.is-filled {
    background: #f7f8f5;
    box-shadow:
        4px 4px 10px rgba(111, 115, 121, 0.12),
        -4px -4px 9px rgba(255, 255, 255, 0.85);
}

.phone-digits > span.is-next,
.otp-digits > span.is-next {
    border-color: rgba(102, 92, 255, 0.28);
    box-shadow:
        inset 3px 3px 7px rgba(110, 114, 120, 0.10),
        inset -3px -3px 7px rgba(255, 255, 255, 0.90),
        0 0 14px rgba(102, 92, 255, 0.09);
}

.digit-gap {
    width: 12px;
}

.auth-microcopy,
.prototype-note {
    margin: 11px 0 0;
    color: #96999e;
    font-size: 11px;
    line-height: 1.4;
    text-align: left;
}

.prototype-note {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 8px;
    letter-spacing: 0.11em;
}

.prototype-note strong {
    color: var(--needle-accent);
}

.auth-primary {
    width: 100%;
    min-height: 54px;
    margin-top: 19px;
    padding: 0 19px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #101114;
    border-radius: 16px;
    background: #15161a;
    color: white;
    box-shadow:
        7px 8px 18px rgba(59, 61, 66, 0.22),
        -3px -3px 10px rgba(255, 255, 255, 0.50);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.15em;
    cursor: pointer;
    transition:
        transform 140ms ease,
        box-shadow 140ms ease,
        background 140ms ease;
}

.auth-primary:hover {
    transform: translateY(-2px);
    background: #0e0f12;
    box-shadow:
        9px 11px 22px rgba(59, 61, 66, 0.25),
        -4px -4px 11px rgba(255, 255, 255, 0.54),
        0 0 24px rgba(102, 92, 255, 0.08);
}

.auth-primary:disabled {
    opacity: 0.62;
    cursor: wait;
}

.auth-primary span {
    color: #8f86ff;
    font-size: 16px;
}

.auth-back {
    display: block;
    margin: -4px 0 16px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #8e9197;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 8px;
    font-weight: 750;
    letter-spacing: 0.13em;
    cursor: pointer;
}

.otp-heading {
    margin-bottom: 12px;
    text-align: left;
}

.otp-heading .auth-label {
    margin-bottom: 4px;
}

.otp-heading strong {
    color: var(--needle-ink);
    font-size: 14px;
}

.auth-error {
    margin: 10px 0 0;
    color: #a64242;
    font-size: 11px;
    line-height: 1.35;
    text-align: left;
}

.auth-divider {
    position: relative;
    z-index: 1;
    height: 49px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-divider::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: rgba(18, 19, 22, 0.07);
}

.auth-divider span {
    position: relative;
    padding: 0 12px;
    background: rgba(244, 245, 242, 0.95);
    color: #a0a3a8;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.15em;
}

.guest-entry {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: end;
    text-align: left;
}

.guest-copy .auth-label {
    margin-bottom: 6px;
}

.guest-copy h2,
.audience-step h2 {
    margin: 0;
    color: var(--needle-ink);
    font-size: 24px;
    line-height: 1.05;
    letter-spacing: -0.035em;
}

.guest-copy p,
.audience-step p {
    margin: 7px 0 0;
    color: #85888e;
    font-size: 11px;
    line-height: 1.4;
}

.guest-gender-buttons,
.audience-buttons {
    display: flex;
    gap: 8px;
}

.guest-gender-buttons button,
.audience-buttons button {
    min-width: 100px;
    min-height: 58px;
    padding: 9px 15px;
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 15px;
    background: #f0f1ee;
    color: var(--needle-ink);
    box-shadow:
        5px 6px 13px rgba(111, 115, 121, 0.14),
        -5px -5px 12px rgba(255, 255, 255, 0.86);
    cursor: pointer;
    transition:
        transform 140ms ease,
        box-shadow 140ms ease,
        border-color 140ms ease;
}

.guest-gender-buttons button:hover,
.audience-buttons button:hover {
    transform: translateY(-2px);
    border-color: rgba(102, 92, 255, 0.17);
    box-shadow:
        7px 8px 16px rgba(111, 115, 121, 0.16),
        -6px -6px 14px rgba(255, 255, 255, 0.90),
        0 0 20px rgba(102, 92, 255, 0.07);
}

.guest-gender-buttons span {
    display: block;
    margin-bottom: 4px;
    color: #9a9da2;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 6px;
    font-weight: 750;
    letter-spacing: 0.13em;
}

.guest-gender-buttons strong {
    font-size: 12px;
    letter-spacing: 0.04em;
}

.audience-step {
    text-align: left;
}

.audience-step .audience-buttons {
    margin-top: 20px;
}

.audience-buttons button {
    flex: 1;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.returning-user {
    margin-bottom: 18px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-radius: 13px;
    background: rgba(102, 92, 255, 0.055);
    color: #81848a;
    font-size: 10px;
}

.returning-user button {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--needle-accent);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.08em;
    cursor: pointer;
}

.trust-line {
    margin-top: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #92959b;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.15em;
}

.trust-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--needle-accent);
    box-shadow: 0 0 11px var(--needle-accent-glow);
}

/* =========================================================
   GUEST SIGN-UP — COMPETITION PAGE
   ========================================================= */

.guest-save-dock {
    width: min(760px, calc(100vw - 40px));
    margin: -28px auto 54px;
    padding: 15px 17px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 20px;
    background: rgba(240, 242, 239, 0.92);
    box-shadow:
        9px 10px 24px rgba(112, 116, 121, 0.13),
        -8px -8px 22px rgba(255, 255, 255, 0.80),
        inset 0 1px 0 rgba(255, 255, 255, 0.90);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition:
        opacity 220ms ease,
        transform 220ms ease;
}

.guest-save-dock[hidden] {
    display: none !important;
}

.guest-save-dock.is-leaving {
    opacity: 0;
    transform: translateY(8px);
}

.guest-save-dock > [data-guest-auth-content] {
    display: grid;
    grid-template-columns: minmax(210px, 0.82fr) minmax(390px, 1.35fr);
    gap: 18px;
    align-items: center;
}

.guest-save-copy {
    min-width: 0;
    text-align: left;
}

.guest-save-copy > div {
    display: flex;
    align-items: baseline;
    gap: 9px;
}

.guest-save-kicker {
    color: var(--needle-accent);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 7px;
    font-weight: 850;
    letter-spacing: 0.15em;
    white-space: nowrap;
}

.guest-save-copy h2 {
    margin: 0;
    color: var(--needle-ink);
    font-size: 17px;
    line-height: 1.1;
    letter-spacing: -0.025em;
}

.guest-save-copy p {
    margin: 5px 0 0;
    color: #888b91;
    font-size: 9px;
    line-height: 1.35;
}

.guest-save-controls {
    min-width: 0;
}

.guest-phone-form,
.guest-otp-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.compact-phone-field {
    flex: 1;
}

.compact-phone-field .phone-digits {
    grid-template-columns: repeat(3, 1fr) 6px repeat(3, 1fr) 6px repeat(4, 1fr);
    gap: 3px;
}

.compact-phone-field .digit-gap {
    width: 6px;
}

.compact-phone-field .phone-digits > span:not(.digit-gap),
.compact-otp-field .otp-digits > span {
    height: 37px;
    border-radius: 8px;
    font-size: 11px;
}

.guest-save-button {
    min-height: 38px;
    padding: 0 13px;
    display: flex;
    align-items: center;
    gap: 11px;
    border: 1px solid #16171a;
    border-radius: 10px;
    background: #16171a;
    color: white;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 8px;
    font-weight: 850;
    letter-spacing: 0.12em;
    cursor: pointer;
    white-space: nowrap;
}

.guest-save-button span {
    color: #9188ff;
    font-size: 12px;
}

.guest-auth-back {
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #888b91;
    cursor: pointer;
}

.compact-otp-field {
    width: 225px;
    flex: 0 0 auto;
}

.compact-otp-field .otp-digits {
    gap: 4px;
}

.guest-prototype-code,
.guest-phone-preview {
    color: #9a9da2;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 6px;
    font-weight: 750;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.guest-prototype-code {
    color: var(--needle-accent);
}

.guest-auth-error {
    margin: 5px 0 0;
    font-size: 8px;
}

.guest-save-success {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #74777d;
    font-size: 9px;
}

.guest-save-success strong {
    color: var(--needle-ink);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 8px;
    letter-spacing: 0.12em;
}

.success-pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--needle-accent);
    box-shadow: 0 0 12px var(--needle-accent-glow);
}

/* =========================================================
   MOBILE COMPETITION

   Photo mode and profile mode intentionally share the same
   two-row geometry. Each candidate therefore occupies the
   exact same outer dimensions in either mode.
   ========================================================= */

@media (max-width: 600px) {
    body.competition-body {
        width: 100%;
        height: 100%;
        overflow: hidden;
    }

    .competition-page {
        width: 100%;
        height: 100dvh;
        min-height: 100dvh;
        display: flex;
        flex-direction: column;
    }

    .competition-header {
        flex: 0 0 58px;
        height: 58px;
        padding: 0 15px;
    }

    .competition-header .brand {
        font-size: 14px;
        letter-spacing: 0.22em;
    }

    .competition-header .brand::after {
        bottom: -7px;
    }

    .progress-area {
        width: 90px;
    }

    #progressText {
        margin-bottom: 5px;
        font-size: 8px;
    }

    .progress-track {
        height: 5px;
    }

    .competition-stage {
        width: 100%;
        flex: 1;
        min-height: 0;
        margin: 0;
        padding: 10px 13px 10px;

        display: flex;
        flex-direction: column;
        text-align: center;
    }

    .mode-label {
        flex: 0 0 auto;
        min-height: 21px;
        margin: 0 0 5px;
        padding: 0 9px;
        font-size: 7px;
        letter-spacing: 0.15em;
    }

    .competition-stage h1,
    #question {
        flex: 0 0 auto;
        margin: 0;
        font-size: 21px;
        line-height: 1.05;
        letter-spacing: -0.035em;
    }

    .instruction {
        flex: 0 0 auto;
        margin: 5px 0 9px;
        font-size: 11px;
        line-height: 1.25;
    }

    .keyboard-hint {
        display: none;
    }

    .mobile-choice-hint {
        display: block;
        flex: 0 0 auto;
        margin: 7px 0 0;
        color: #92959a;
        font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
        font-size: 8px;
        letter-spacing: 0.04em;
    }

    /* One shared geometry for BOTH modes. */
    .cards.photo-mode,
    .cards.profile-mode {
        position: relative;
        flex: 1;
        min-height: 0;
        width: 100%;

        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows:
            minmax(0, 1fr)
            minmax(0, 1fr);
        gap: 10px;

        align-items: stretch;
        overflow: visible;
        background: transparent;
    }

    .cards.photo-mode .choice-card,
    .cards.profile-mode .choice-card {
        width: 100%;
        height: 100%;
        min-width: 0;
        min-height: 0;
        max-height: none;
        margin: 0;
        padding: 0;

        border: 1px solid rgba(255, 255, 255, 0.72);
        border-radius: 18px;
        background: var(--needle-surface);
        box-shadow:
            8px 8px 18px rgba(112, 116, 121, 0.15),
            -7px -7px 16px rgba(255, 255, 255, 0.83);
        overflow: hidden;
    }

    .cards.photo-mode .choice-card:hover,
    .cards.profile-mode .choice-card:hover {
        transform: none;
        box-shadow:
            8px 8px 18px rgba(112, 116, 121, 0.15),
            -7px -7px 16px rgba(255, 255, 255, 0.83);
    }

    .cards.photo-mode .photo-card,
    .cards.profile-mode .info-card {
        width: 100%;
        height: 100%;
        min-height: 0;
    }

    .cards.photo-mode .photo-card img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        border-radius: 0;
    }

    .cards.photo-mode #cardA img,
    .cards.photo-mode #cardB img {
        border-radius: 0;
    }

    .cards.photo-mode .versus,
    .cards.profile-mode .versus {
        position: absolute;
        left: 50%;
        top: 50%;
        z-index: 30;
        transform: translate(-50%, -50%);

        width: 34px;
        height: 34px;
        margin: 0;
        display: flex;
        align-items: center;
        justify-content: center;

        border-radius: 50%;
        background: rgba(244, 245, 242, 0.96);
        border: 1px solid rgba(255, 255, 255, 0.92);
        color: #5f6268;
        box-shadow:
            5px 5px 12px rgba(110, 114, 120, 0.18),
            -5px -5px 12px rgba(255, 255, 255, 0.92),
            0 0 0 1px rgba(102, 92, 255, 0.035);

        font-size: 8px;
        pointer-events: none;
    }

    /* Use the compact mobile profile markup. */
    .desktop-profile-card {
        display: none;
    }

    .mobile-profile-card {
        display: block;
    }

    .cards.profile-mode .info-card {
        padding: 0;
        display: block;
        overflow: hidden;
        text-align: initial;
        background:
            radial-gradient(circle at 92% 0%, rgba(102, 92, 255, 0.065), transparent 26%),
            linear-gradient(145deg, #f7f8f5, #eff0ed);
    }

    .cards.profile-mode .info-card::before {
        display: none;
    }

    .cards.profile-mode .mobile-profile-card {
        width: 100%;
        height: 100%;
        padding: 11px 13px;
        overflow: hidden;
    }

    .cards.profile-mode .mobile-profile-row {
        width: 100%;
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 12px;
        padding: 7px 0;
        border-bottom: 1px solid rgba(18, 19, 22, 0.065);
    }

    .cards.profile-mode .mobile-header-row {
        padding-top: 0;
        padding-bottom: 8px;
    }

    .cards.profile-mode .mobile-profile-left,
    .cards.profile-mode .mobile-profile-right {
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .cards.profile-mode .mobile-profile-left {
        align-items: flex-start;
        text-align: left;
    }

    .cards.profile-mode .mobile-profile-right {
        align-items: flex-end;
        text-align: right;
    }

    .cards.profile-mode .mobile-profile-name {
        max-width: 100%;
        overflow: hidden;
        color: #15161a;
        font-size: 15px;
        font-weight: 820;
        line-height: 1.05;
        letter-spacing: -0.025em;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .cards.profile-mode .mobile-profile-name span {
        margin-left: 3px;
        color: var(--needle-muted);
        font-size: 11px;
        font-weight: 500;
    }

    .cards.profile-mode .mobile-header-row .mobile-profile-right strong {
        max-width: 100%;
        overflow: hidden;
        color: #2d2f34;
        font-size: 9px;
        font-weight: 760;
        line-height: 1.15;
        text-align: right;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .cards.profile-mode .mobile-location {
        max-width: 100%;
        overflow: hidden;
        color: var(--needle-muted);
        font-size: 8px;
        line-height: 1.15;
        text-align: right;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .cards.profile-mode .mobile-profile-card .fact-label,
    .cards.profile-mode .mobile-profile-card .section-label {
        color: #8e9197;
        font-size: 6px;
        font-weight: 900;
        line-height: 1.15;
        letter-spacing: 0.12em;
    }

    .cards.profile-mode .mobile-profile-left > strong,
    .cards.profile-mode .mobile-profile-right > strong {
        max-width: 100%;
        overflow: hidden;
        color: #303237;
        font-size: 8.5px;
        font-weight: 730;
        line-height: 1.18;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .cards.profile-mode .mobile-profile-left p,
    .cards.profile-mode .mobile-profile-right p {
        margin: 2px 0 0;
        overflow: hidden;
        color: #4d5056;
        font-size: 7.5px;
        line-height: 1.25;

        display: -webkit-box;
        -webkit-box-orient: vertical;
        line-clamp: 2;
        -webkit-line-clamp: 2;
    }

    .cards.profile-mode .mobile-profile-left p {
        text-align: left;
    }

    .cards.profile-mode .mobile-profile-right p {
        text-align: right;
    }

    .cards.profile-mode .mobile-profile-interests {
        width: 100%;
        padding-top: 8px;
        display: flex;
        flex-direction: column;
        align-items: center;
        overflow: hidden;
        text-align: center;
    }

    .cards.profile-mode .mobile-profile-interests .section-label {
        display: block;
        width: 100%;
        text-align: center;
    }

    .cards.profile-mode .mobile-profile-interests .interest-tags {
        width: 100%;
        max-height: 42px;
        margin-top: 5px;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px;
        overflow: hidden;
    }

    .cards.profile-mode .mobile-profile-interests .interest-tags span {
        padding: 4px 6px;
        border-radius: 999px;
        background: rgba(237, 238, 235, 0.92);
        color: #555860;
        font-size: 7px;
        line-height: 1;
        white-space: nowrap;
        box-shadow:
            2px 2px 5px rgba(116, 120, 125, 0.09),
            -2px -2px 5px rgba(255, 255, 255, 0.70);
    }

    .cards.profile-mode .choice-card.is-dragging {
        z-index: 40;
        transition: none;
        box-shadow:
            11px 12px 26px rgba(103, 107, 113, 0.22),
            -8px -8px 18px rgba(255, 255, 255, 0.88),
            0 0 0 2px rgba(102, 92, 255, 0.08);
    }
}

/* =========================================================
   AUTH PROTOTYPE — BASIC SMALL-SCREEN SAFETY
   Full responsive tuning comes later; these rules only ensure
   the authentication controls remain usable during MVP testing.
   ========================================================= */

@media (max-width: 700px) {
    .landing-topbar {
        height: 64px;
        padding: 0 18px;
    }

    .landing-status {
        display: none;
    }

    .auth-hero {
        width: min(100% - 26px, 560px);
        padding: 42px 0 58px;
    }

    .auth-hero-copy h1 {
        font-size: clamp(42px, 14vw, 64px);
    }

    .auth-hero-copy > p {
        margin-bottom: 27px;
        font-size: 14px;
    }

    .auth-console {
        padding: 19px;
        border-radius: 24px;
    }

    .phone-digits {
        grid-template-columns: repeat(3, 1fr) 5px repeat(3, 1fr) 5px repeat(4, 1fr);
        gap: 3px;
    }

    .phone-digits > span:not(.digit-gap),
    .otp-digits > span {
        height: 45px;
        border-radius: 9px;
        font-size: 14px;
    }

    .digit-gap {
        width: 5px;
    }

    .guest-entry {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .guest-gender-buttons button {
        flex: 1;
    }
}

@media (max-width: 600px) {
    body.competition-body.has-guest-signup {
        height: auto;
        min-height: 100%;
        overflow-y: auto;
    }

    body.competition-body.has-guest-signup .competition-page {
        height: auto;
        min-height: 100dvh;
    }

    body.competition-body.has-guest-signup .competition-stage {
        min-height: calc(100dvh - 58px);
    }

    .guest-save-dock {
        width: calc(100% - 26px);
        margin: 8px auto 24px;
        padding: 15px;
    }

    .guest-save-dock > [data-guest-auth-content] {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .guest-save-copy > div {
        flex-wrap: wrap;
    }

    .guest-phone-form,
    .guest-otp-form {
        flex-wrap: wrap;
    }

    .compact-phone-field,
    .compact-otp-field {
        width: 100%;
        flex: 1 1 100%;
    }

    .guest-save-button {
        margin-left: auto;
    }

    .guest-prototype-code,
    .guest-phone-preview {
        order: 4;
    }
}

/* Search summary */
.results-page { max-width: 960px; margin: 0 auto; padding: 48px 24px; line-height: 1.6; }
.results-page h1 { font-size: clamp(2rem, 6vw, 3.5rem); line-height: 1.15; }
.results-page .mode-label { margin-top: 40px; }
.result-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin: 32px 0; }
.result-columns section { padding: 24px; border-radius: 24px; background: var(--needle-surface); box-shadow: var(--shadow-raised); }
.result-columns ul { padding-left: 20px; }
.result-columns li { margin: 12px 0; overflow-wrap: anywhere; }
.result-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; margin-top: 32px; }
.result-actions button { padding: 14px 20px; border: 0; border-radius: 12px; background: var(--needle-accent); color: white; cursor: pointer; }
.result-actions a { color: var(--needle-ink); }
@media (max-width: 600px) { .result-columns { grid-template-columns: 1fr; } }

.audience-buttons button:disabled, .guest-gender-buttons button:disabled { opacity: 0.45; cursor: not-allowed; }

.sample-data-note { color: #595c63; font-size: 0.85rem; line-height: 1.5; max-width: 640px; margin: 12px auto 20px; }

.learning-note { max-width: 640px; margin: 12px auto; line-height: 1.5; color: var(--needle-muted); }

/* Three-Needle reveal: scoped to preserve the comparison layouts. */
[hidden] { display: none !important; }
.finale-body { background: #f3f1ec; }
.finale-page { max-width: 1200px; margin: auto; padding: 32px 32px 64px; }
.finale-topbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.demo-badge { font-size: 10px; letter-spacing: .14em; border: 1px solid #c9c6bf; border-radius: 20px; padding: 8px 12px; }
.finale-intro { text-align: center; max-width: 720px; margin: 64px auto 24px; }
.finale-intro h1 { font-size: clamp(36px, 5.5vw, 64px); letter-spacing: -.045em; line-height: 1.08; margin: 14px 0 20px; }
.finale-intro > p:last-child { font-size: 18px; line-height: 1.65; color: #56565e; }
.finale-demo { max-width: 840px; margin: 24px auto 32px; padding: 14px 20px; border-radius: 14px; background: #e8e4fa; color: #4b426a; font-size: 12px; line-height: 1.6; text-align: center; }
.finale-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.finalist-card { border: 1px solid #dedbd4; border-radius: 24px; overflow: hidden; background: #fffefb; box-shadow: 0 12px 32px #2723330a; display: flex; flex-direction: column; }
.finalist-category { padding: 18px 20px; margin: 0; text-align: center; font-size: 11px; font-weight: 800; letter-spacing: .18em; color: #5d4aaa; }
.finalist-card > img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: center 25%; }
.finalist-content { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.finalist-content h2 { margin: 0 0 8px; font-size: 26px; letter-spacing: -.03em; }
.finalist-facts { font-size: 12px; line-height: 1.6; color: #67656c; min-height: 38px; margin: 0 0 20px; }
.finalist-description { border-top: 1px solid #e7e4de; padding-top: 20px; font-size: 17px; line-height: 1.5; margin: 0; }
.finalist-detail { font-size: 13px; color: #747079; line-height: 1.6; margin: 12px 0 24px; }
.finale-primary { display: inline-block; background: #6553bb; color: white; padding: 15px 20px; border: 0; border-radius: 12px; font-size: 14px; font-weight: 650; cursor: pointer; text-decoration: none; text-align: center; }
.finalist-content .finale-primary { margin-top: auto; width: 100%; }
.finale-primary:hover { background: #514098; }
.finale-primary:focus-visible, .finale-back:focus-visible { outline: 3px solid #ad9af2; outline-offset: 4px; }
.finale-actions { display: flex; justify-content: center; gap: 20px; margin: 24px auto; }
.finale-footnote { max-width: 660px; text-align: center; margin: 32px auto 0; font-size: 12px; line-height: 1.7; color: #6e6973; }
.finale-dialog { border: 1px solid #dedbd4; border-radius: 24px; padding: 32px; width: min(480px, calc(100% - 32px)); color: #25202e; }
.finale-dialog::backdrop { background: #21182e88; backdrop-filter: blur(4px); }
.finale-dialog h2 { font-size: 30px; line-height: 1.2; }
.finale-dialog p { line-height: 1.7; }
.finale-dialog .finale-primary { width: 100%; }
.finale-back { display: block; background: none; border: 0; padding: 16px; margin: 4px auto 0; cursor: pointer; text-decoration: underline; }
.match-panel { max-width: 400px; margin: 32px auto; text-align: center; padding: 24px; background: #fffefb; border-radius: 24px; line-height: 1.7; }
.match-panel img { width: 160px; height: 160px; border-radius: 50%; object-fit: cover; }
@media (max-width: 760px) {
    .finale-page { padding: 24px 18px 40px; }
    .finale-intro { margin-top: 40px; }
    .finale-grid { grid-template-columns: 1fr; max-width: 420px; margin: auto; }
    .finalist-card > img { aspect-ratio: 4 / 3; }
    .finale-topbar .brand { font-size: 22px; }
}

.finalist-more { font-size: 13px; line-height: 1.7; color: #59545f; margin-bottom: 24px; }
.finalist-more summary { cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.test-users-page { max-width: 860px; line-height: 1.7; }
.test-users-page section { background: #fffefb; border: 1px solid #dedbd4; border-radius: 20px; padding: 24px; margin: 24px 0; }
.test-users-page select { display: block; width: 100%; max-width: 100%; padding: 12px; margin: 8px 0 18px; font: inherit; }
.test-users-page label { font-weight: 650; }
.test-users-page .finale-primary { margin: 0 10px 12px 0; }
.test-lab-link { text-align: center; margin: 28px auto; font-size: 12px; }

#aboutForm input { display: block; width: 100%; box-sizing: border-box; padding: 12px; margin: 8px 0 20px; border: 1px solid #c9c6bf; border-radius: 8px; font: inherit; background: white; color: #25202e; }
#aboutForm input:focus-visible { outline: 3px solid #ad9af2; outline-offset: 2px; }

#profileForm input { display:block; width:100%; box-sizing:border-box; padding:12px; margin:8px 0 20px; border:1px solid #c9c6bf; border-radius:8px; font:inherit; background:white; color:#25202e; }
#profileFields { border:1px solid #dedbd4; border-radius:20px; padding:24px; margin:24px 0; }
#profileForm input:focus-visible { outline:3px solid #ad9af2; outline-offset:2px; }
.profile-photo-preview { display:block; width:180px; max-width:100%; border-radius:16px; margin:12px 0 24px; }
.profile-photo-preview[hidden] { display:none; }

/* Responsive usability pass: retain the visual language without clipping content. */
html { -webkit-text-size-adjust: 100%; }
input, select, textarea { max-width: 100%; min-width: 0; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, summary:focus-visible, select:focus-visible {
    outline: 3px solid #665cff; outline-offset: 4px;
}
.finale-topbar, .finale-actions, .audience-buttons, .guest-gender-buttons { flex-wrap: wrap; }
.finalist-card, .finalist-content, .test-users-page section, fieldset { min-width: 0; }
.finalist-content, .test-users-page { overflow-wrap: anywhere; }
.finale-dialog { max-height: calc(100dvh - 32px); overflow-y: auto; }
.finale-back, .test-lab-link a, .test-users-page a { min-height: 44px; display: inline-flex; align-items: center; }
.finale-page { padding-bottom: max(40px, env(safe-area-inset-bottom)); }
.choice-card { touch-action: pan-y pinch-zoom; }

@media (max-width: 1000px) {
    input, select, textarea, #aboutForm input, #profileForm input { font-size: 16px; }
    .test-users-page button, .test-users-page select { min-height: 44px; }
    .finale-grid { gap: 14px; }
    .finalist-content { padding: 20px; }
}
@media (min-width: 601px) and (max-width: 1000px) {
    .cards { grid-template-columns: minmax(0,1fr) 36px minmax(0,1fr); gap: 12px; }
    .info-card { padding: 20px; overflow-y: auto; }
    .info-card-heading h2 { font-size: 26px; }
    .primary-info strong, .primary-info span, .facts-grid strong { white-space: normal; overflow-wrap: anywhere; }
}
@media (max-width: 600px) {
    body.competition-body { height: auto; overflow-y: auto; }
    .competition-page { height: auto; min-height: 100svh; }
    .competition-header { padding-left: max(15px,env(safe-area-inset-left)); padding-right: max(15px,env(safe-area-inset-right)); }
    .competition-stage { flex: 0 0 auto; padding-bottom: max(20px,env(safe-area-inset-bottom)); }
    .cards.photo-mode, .cards.profile-mode {
        flex: none;
        grid-template-rows: repeat(2, clamp(320px, 46svh, 440px));
    }
    .cards.profile-mode .mobile-profile-card { overflow-y: auto; overscroll-behavior-y: auto; }
    .cards.profile-mode .mobile-profile-name { font-size: 18px; white-space: normal; line-height: 1.25; }
    .cards.profile-mode .mobile-profile-name span { font-size: 14px; }
    .cards.profile-mode .mobile-profile-card .fact-label,
    .cards.profile-mode .mobile-profile-card .section-label { font-size: 11px; color: #62656c; letter-spacing: .06em; }
    .cards.profile-mode .mobile-header-row .mobile-profile-right strong,
    .cards.profile-mode .mobile-profile-left > strong,
    .cards.profile-mode .mobile-profile-right > strong,
    .cards.profile-mode .mobile-location { font-size: 13px; line-height: 1.4; white-space: normal; overflow-wrap: anywhere; }
    .cards.profile-mode .mobile-profile-left p,
    .cards.profile-mode .mobile-profile-right p { display: block; font-size: 13px; line-height: 1.45; -webkit-line-clamp: unset; line-clamp: unset; }
    .cards.profile-mode .mobile-profile-interests .interest-tags { max-height: none; overflow: visible; }
    .cards.profile-mode .mobile-profile-interests .interest-tags span { font-size: 12px; white-space: normal; line-height: 1.3; }
    .mode-label, .mobile-choice-hint, #progressText { font-size: 11px; }
    .instruction { font-size: 14px; line-height: 1.45; }
    .learning-note, .sample-data-note { font-size: 13px; line-height: 1.5; }
    .auth-console { padding: 16px; }
    .auth-console label, .auth-error, .guest-auth-error { font-size: 13px; }
    .test-users-page section, #profileFields { padding: 16px; }
    .test-users-page .finale-primary { width: 100%; margin-right: 0; }
    .finale-dialog { padding: 22px; }
    .finale-topbar { gap: 12px; }
}
@media (max-width: 380px) {
    .competition-header .brand { letter-spacing: .12em; }
    .auth-hero-copy h1 { font-size: 40px; }
    .phone-digits { gap: 2px; }
    .cards.profile-mode .mobile-profile-row { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.finalist-content .finale-primary:disabled, #confirmButton:disabled { opacity: .55; cursor: not-allowed; }
.availability-note { color: #70412c; font-size: 14px; line-height: 1.5; }

/* Local report/block controls remain outside the comparison choice buttons. */
#safetyForm textarea { display:block; width:100%; box-sizing:border-box; padding:12px; margin:8px 0 20px; border:1px solid #c9c6bf; border-radius:8px; font:inherit; color:#25202e; background:white; }
#safetyForm textarea:focus-visible { outline:3px solid #ad9af2; outline-offset:2px; }
#safetyForm label { display:block; margin-top:16px; }
#safetyForm input[type="checkbox"] { width:22px; height:22px; vertical-align:middle; margin:12px 8px 12px 0; }
#safetyA, #safetyB { display:inline-block; padding:12px 4px; }

.consent-agreement { display:flex; gap:12px; align-items:flex-start; margin:24px 0; line-height:1.5; }
.consent-agreement input { flex:0 0 22px; width:22px; height:22px; margin:2px 0; }
.consent-navigation a { display:inline-block; padding:12px 4px; }

/* Email credentials use the existing auth panel dimensions and typography. */
.email-login-input { display:block; width:100%; box-sizing:border-box; min-height:48px; margin:12px 0 22px; padding:12px; border:1px solid #bbb; border-radius:8px; font:inherit; background:#fff; color:#111; }
#emailContinue[hidden] { display:none; }

/* Application visibility must override component display styles. */
[hidden] { display: none !important; }

/* The isolated pitch uses plain profile facts, not the compact competition markup. */
.pitch-body #pitchStage .cards.profile-mode { align-items: stretch; }
.pitch-body #pitchStage .cards.profile-mode .choice-card {
    height: auto; min-height: 320px; max-height: none;
}
.pitch-body #pitchStage .cards.profile-mode .info-card {
    height: 100%; padding: 24px; overflow: visible;
    display: flex; flex-direction: column; gap: 16px;
    overflow-wrap: anywhere;
}
.pitch-body #pitchStage .info-card h2,
.pitch-body #pitchStage .info-card p { margin: 0; }
.pitch-body #pitchStage .info-card .primary-info { display: block; margin: 0; }
.pitch-body .choice-card:disabled { cursor: wait; }
.pitch-body details > summary { min-height: 44px; padding: 12px 0; cursor: pointer; }
@media (max-width: 600px) {
    .pitch-body #pitchStage .cards.profile-mode { grid-template-rows: repeat(2, auto); }
    .pitch-body #pitchStage .cards.profile-mode .info-card { padding: 20px; }
}

/* Six visual cells retain a single accessible OTP input and native autofill. */
.otp-code{--otp-cell:2.4rem!important;width:calc(6 * var(--otp-cell))!important;max-width:100%;font-family:monospace!important;font-size:1.25rem!important;letter-spacing:calc(var(--otp-cell) - 1ch)!important;padding:.8rem 0 .8rem calc((var(--otp-cell) - 1ch)/2)!important;border-radius:.3rem;background:repeating-linear-gradient(to right,transparent 0,transparent calc(var(--otp-cell) - 2px),#94a3b8 calc(var(--otp-cell) - 2px),#94a3b8 var(--otp-cell))!important;}
