@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;700&display=swap");

:root {
    --cream: #f7f3eb;
    --paper: rgba(255, 251, 245, 0.88);
    --paper-strong: rgba(255, 252, 248, 0.96);
    --ink: #11223f;
    --ink-soft: #4f5f7b;
    --line: rgba(17, 34, 63, 0.1);
    --navy: #081a34;
    --navy-soft: #10254a;
    --cyan: #2dd4ff;
    --lime: #d6ff5b;
    --coral: #ff7f5c;
    --rose: #ffb8a6;
    --shadow: 0 24px 60px rgba(11, 27, 53, 0.16);
    --shadow-strong: 0 28px 70px rgba(3, 9, 20, 0.36);
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 18px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    height: 100%;
}

body {
    min-height: 100dvh;
    font-family: "Outfit", "Trebuchet MS", sans-serif;
    color: var(--ink);
    overflow-x: hidden;
    position: relative;
    isolation: isolate;
    background-color: #081629;
}

img {
    display: block;
    max-width: 100%;
}

button,
input,
a {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

.hidden {
    display: none !important;
}

body.is-modal-open {
    overflow: hidden;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.dashboard-body-home .quiet-stat-records-carousel {
    min-width: 0;
}

.dashboard-body-home .quiet-stat-records-nav {
    display: none;
}

.dashboard-body-home #dashboard-records-card,
.dashboard-body-home #dashboard-records-card .quiet-stat-records-carousel,
.dashboard-body-home #dashboard-records-card .quiet-stat-carousel-track {
    min-width: 0;
}

.dashboard-body-home #dashboard-records-card .quiet-stat-records-carousel {
    width: 100%;
    overflow: hidden;
}

.dashboard-body-home #dashboard-records-card .quiet-stat-carousel-track {
    display: grid;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 100%;
    gap: 0.72rem;
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.dashboard-body-home #dashboard-records-card .quiet-stat-carousel-track::-webkit-scrollbar {
    display: none;
}

.dashboard-body-home #dashboard-records-card .quiet-stat-record {
    min-width: 0;
    min-height: 6rem;
    box-sizing: border-box;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    align-content: space-between;
    gap: 0.7rem;
    overflow: hidden;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.dashboard-body-home #dashboard-records-card .quiet-stat-record-copy {
    display: grid;
    gap: 0.42rem;
}

.dashboard-body-home #dashboard-records-card .quiet-stat-record small {
    min-width: 0;
    max-width: none;
    line-height: 1.18;
}

.dashboard-body-home #dashboard-records-card .quiet-stat-record strong {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-body-home #dashboard-records-card .quiet-stat-record-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 1.9rem;
    padding: 0.18rem 0.68rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(244, 241, 234, 0.74);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
    transition:
        background-color 180ms ease,
        border-color 180ms ease,
        color 180ms ease;
}

.dashboard-body-home #dashboard-records-card .quiet-stat-record-link:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.14);
    color: rgba(244, 241, 234, 0.92);
}

.dashboard-body-home #dashboard-records-card .quiet-stat-record-link:focus-visible {
    outline: 2px solid rgba(244, 241, 234, 0.54);
    outline-offset: 2px;
}

.dashboard-body-home #dashboard-records-card .quiet-stat-records-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.38rem;
}

.dashboard-body-home #dashboard-records-card .quiet-stat-records-dot {
    appearance: none;
    width: 0.48rem;
    height: 0.48rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(244, 241, 234, 0.2);
    transition:
        width 180ms ease,
        background-color 180ms ease,
        transform 180ms ease;
}

.dashboard-body-home #dashboard-records-card .quiet-stat-records-dot.is-active {
    width: 1.14rem;
    background: rgba(244, 241, 234, 0.78);
}

.dashboard-body-home #dashboard-records-card .quiet-stat-records-dot:focus-visible {
    outline: 2px solid rgba(244, 241, 234, 0.54);
    outline-offset: 2px;
}

.dashboard-body-home #dashboard-records-card .quiet-stat-records-dot:active {
    transform: scale(0.94);
}

.section-label,
.kicker,
.metric-label,
.mode-step,
.summary-label {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.72rem;
    color: var(--ink-soft);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    border: 0;
    border-radius: 999px;
    padding: 0.95rem 1.3rem;
    font-weight: 700;
    cursor: pointer;
    transition:
        transform 180ms ease,
        box-shadow 180ms ease,
        background 180ms ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button:focus-visible {
    outline: 2px solid rgba(244, 241, 234, 0.92);
    outline-offset: 2px;
}

.button-primary {
    background: linear-gradient(135deg, var(--coral), #ff9a6b);
    color: white;
    box-shadow: 0 18px 34px rgba(255, 127, 92, 0.28);
}

.button-accent {
    background: linear-gradient(135deg, var(--cyan), #7af7ff);
    color: var(--navy);
    box-shadow: 0 18px 34px rgba(45, 212, 255, 0.28);
}

.button-ghost {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.button-large {
    padding-inline: 1.5rem;
}

.support-copy {
    color: var(--ink-soft);
}

.ambient,
.play-ambient {
    position: fixed;
    inset: auto;
    border-radius: 999px;
    filter: blur(26px);
    pointer-events: none;
    opacity: 0.52;
    z-index: -1;
}

.dashboard-body {
    color: white;
    --dashboard-ink: #08101f;
    --dashboard-panel: rgba(14, 23, 40, 0.92);
    --dashboard-panel-soft: rgba(19, 31, 52, 0.88);
    --dashboard-line: rgba(255, 255, 255, 0.08);
    --dashboard-line-strong: rgba(255, 255, 255, 0.14);
    --dashboard-warm: #ff667d;
    --dashboard-warm-soft: #ffc0ca;
    --dashboard-cool: #67b8ff;
    --dashboard-cool-soft: #b9dcff;
    --dashboard-signal: #f4f7ff;
}

.dashboard-body::before,
.play-body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -2;
    background-repeat: no-repeat;
    background-size: cover;
}

.dashboard-body::before {
    background:
        linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        radial-gradient(
            circle at top left,
            rgba(103, 184, 255, 0.14),
            transparent 24%
        ),
        radial-gradient(
            circle at 82% 12%,
            rgba(255, 102, 125, 0.12),
            transparent 20%
        ),
        linear-gradient(180deg, #07111f 0%, #0a1730 100%);
    background-size:
        32px 32px,
        32px 32px,
        auto,
        auto,
        auto;
}

.ambient-cyan {
    top: -4rem;
    right: -3rem;
    width: 16rem;
    height: 16rem;
    background: rgba(103, 184, 255, 0.22);
}

.ambient-coral {
    bottom: 10rem;
    left: -4rem;
    width: 14rem;
    height: 14rem;
    background: rgba(255, 102, 125, 0.18);
}

.dashboard-shell {
    position: relative;
    z-index: 1;
    min-height: 100dvh;
    display: grid;
    grid-template-rows: auto 1fr;
    padding: max(0.8rem, env(safe-area-inset-top)) 0.95rem
        max(0.9rem, env(safe-area-inset-bottom));
    overflow: visible;
}

.dashboard-topbar,
.dashboard-main,
.game-topbar,
.game-layout {
    max-width: 1180px;
    margin: 0 auto;
}

.dashboard-topbar,
.dashboard-main {
    max-width: 1240px;
}

.dashboard-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.brand-mark,
.game-brand {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.dashboard-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

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

.dashboard-subtle-button,
.ghost-link-button {
    appearance: none;
    font: inherit;
    cursor: pointer;
}

.account-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.35rem;
    padding: 0.58rem 0.82rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.account-mobile-link {
    display: none;
}

.topbar-mobile-icon {
    display: none;
}

.dashboard-subtle-link,
.catalog-back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.58rem 0.82rem;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition:
        color 160ms ease,
        border-color 160ms ease,
        background 160ms ease,
        transform 160ms ease;
}

.dashboard-subtle-link:hover,
.catalog-back-link:hover {
    color: rgba(255, 255, 255, 0.92);
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-1px);
}

.dashboard-subtle-link-metrics {
    display: none;
}

.dashboard-phase-pill {
    background: rgba(255, 255, 255, 0.055);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.88);
}

.dashboard-main {
    display: grid;
    gap: 0.8rem;
    height: 100%;
    min-height: 0;
    align-content: start;
}

.hero-panel,
.surface-card {
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.018),
            rgba(255, 255, 255, 0)
        ),
        linear-gradient(
            180deg,
            var(--dashboard-panel-soft),
            var(--dashboard-panel)
        );
    border: 1px solid var(--dashboard-line);
    box-shadow:
        0 24px 54px rgba(3, 9, 20, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.025);
    backdrop-filter: blur(8px);
}

.hero-panel {
    display: grid;
    gap: 0.95rem;
    padding: 1rem;
    border-radius: var(--radius-xl);
}

.hero-copy {
    display: grid;
    align-content: start;
    gap: 0.95rem;
}

.hero-copy h1 {
    margin: 0.45rem 0 0;
    max-width: 12ch;
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(2.2rem, 8vw, 4.8rem);
    line-height: 0.94;
    letter-spacing: -0.05em;
}

.lede {
    max-width: 54ch;
    margin: 0.7rem 0 0;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.72);
}

.hero-actions {
    display: grid;
    gap: 0.75rem;
    margin-top: 0.95rem;
    width: 100%;
}

.mode-launch-grid {
    display: grid;
    gap: 0.75rem;
    width: 100%;
}

.mode-launch-card,
.exam-choice-card {
    width: 100%;
    display: grid;
    justify-items: start;
    gap: 0.48rem;
    padding: 1.02rem 1.04rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.06);
    color: white;
    text-align: left;
    cursor: pointer;
    transition:
        transform 180ms ease,
        border-color 180ms ease,
        background 180ms ease,
        box-shadow 180ms ease;
}

.mode-launch-card:hover,
.exam-choice-card:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.18);
}

.mode-launch-card {
    position: relative;
    overflow: hidden;
    min-height: 11rem;
    align-content: start;
    border-color: rgba(255, 255, 255, 0.1);
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.014),
            rgba(255, 255, 255, 0)
        ),
        linear-gradient(180deg, rgba(11, 19, 32, 0.96), rgba(8, 15, 28, 0.98));
    box-shadow: 0 10px 18px rgba(3, 9, 20, 0.18);
}

.mode-launch-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 3px;
    pointer-events: none;
    opacity: 0.85;
}

.mode-launch-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 24px rgba(3, 9, 20, 0.22);
}

.mode-launch-card strong,
.exam-choice-card strong {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.28rem;
    letter-spacing: -0.03em;
    position: relative;
    z-index: 1;
}

.mode-launch-card .support-copy,
.exam-choice-card .support-copy {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    position: relative;
    z-index: 1;
}

.mode-launch-kicker {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.48);
    position: relative;
    z-index: 1;
}

.exam-choice-card-accent {
    background: linear-gradient(
        135deg,
        rgba(103, 184, 255, 0.18),
        rgba(255, 255, 255, 0.08)
    );
    border-color: rgba(103, 184, 255, 0.24);
    box-shadow: 0 18px 36px rgba(103, 184, 255, 0.12);
}

.mode-launch-card-primary {
    background:
        linear-gradient(180deg, rgba(16, 16, 24, 0.96), rgba(11, 13, 20, 0.98)),
        linear-gradient(
            135deg,
            rgba(255, 102, 125, 0.045),
            rgba(255, 255, 255, 0.02)
        );
    border-color: rgba(255, 255, 255, 0.11);
    box-shadow: 0 10px 18px rgba(255, 102, 125, 0.06);
}

.mode-launch-card-primary::before {
    background: linear-gradient(
        180deg,
        rgba(255, 102, 125, 0.76),
        rgba(255, 154, 171, 0.66)
    );
}

.mode-launch-card-exam {
    background:
        linear-gradient(180deg, rgba(13, 20, 34, 0.96), rgba(9, 17, 29, 0.98)),
        linear-gradient(
            135deg,
            rgba(103, 184, 255, 0.045),
            rgba(255, 255, 255, 0.02)
        );
    border-color: rgba(255, 255, 255, 0.11);
    box-shadow: 0 10px 18px rgba(103, 184, 255, 0.06);
}

.mode-launch-card-exam::before {
    background: linear-gradient(
        180deg,
        rgba(103, 184, 255, 0.76),
        rgba(167, 218, 255, 0.66)
    );
}

.mode-launch-cta {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: auto;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: 0;
    color: rgba(255, 255, 255, 0.98);
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.01em;
}

.mode-launch-cta-arrow {
    font-size: 1rem;
    line-height: 1;
    transition:
        transform 180ms ease,
        opacity 180ms ease;
}

.mode-launch-card:hover .mode-launch-cta-arrow {
    transform: translateX(3px);
}

.mode-launch-card-primary .mode-launch-cta {
    color: rgba(255, 229, 234, 0.92);
}

.mode-launch-card-exam .mode-launch-cta {
    color: rgba(220, 237, 255, 0.92);
}

.mode-launch-card-exam:hover {
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 14px 24px rgba(103, 184, 255, 0.08);
}

.hero-support {
    max-width: 34rem;
    margin: 0;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.72);
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
}

.metric-card {
    display: grid;
    align-content: start;
    gap: 0.35rem;
    padding: 0.8rem 0.9rem;
    border-radius: var(--radius-lg);
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.03),
        rgba(255, 255, 255, 0.015)
    );
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.metric-card .metric-label {
    line-height: 1.15;
}

.metric-reading {
    display: grid;
    gap: 0.15rem;
    margin-top: 0.1rem;
}

.metric-card strong {
    display: block;
    margin: 0;
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.55rem;
    line-height: 0.95;
}

.metric-foot {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.74rem;
    line-height: 1.15;
}

.metric-card p {
    margin: 0.1rem 0 0;
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.82rem;
    line-height: 1.35;
}

.metric-card-bright {
    background: linear-gradient(
        180deg,
        rgba(103, 184, 255, 0.12),
        rgba(255, 255, 255, 0.03)
    );
}

.dashboard-grid {
    display: grid;
    gap: 0.8rem;
    min-height: 0;
}

.surface-card {
    display: grid;
    align-content: start;
    padding: 0.95rem;
    border-radius: var(--radius-xl);
}

.surface-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.surface-head h2 {
    margin: 0.2rem 0 0;
    font-size: 1.2rem;
}

.surface-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3rem;
    padding: 0.52rem 0.72rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    font-family: "Space Grotesk", sans-serif;
}

.surface-badge-soft {
    color: rgba(255, 255, 255, 0.68);
}

.surface-badge-context {
    min-width: auto;
    gap: 0.45rem;
    padding-inline: 0.78rem;
    color: rgba(255, 255, 255, 0.88);
    white-space: nowrap;
}

.surface-badge-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
    background: var(--dashboard-signal);
    box-shadow: 0 0 14px rgba(244, 247, 255, 0.24);
}

.progress-ring {
    margin-top: 0.85rem;
}

.mode-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
}

.progress-meter {
    position: relative;
    height: 0.75rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.progress-fill {
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(
        90deg,
        rgba(255, 102, 125, 0.9),
        rgba(103, 184, 255, 0.92)
    );
    box-shadow:
        0 0 14px rgba(255, 102, 125, 0.18),
        0 0 28px rgba(103, 184, 255, 0.18);
    transition: width 240ms ease;
}

.mode-list,
.focus-stack {
    display: grid;
    gap: 0.6rem;
    margin-top: 0.8rem;
}

.mode-card,
.focus-item {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.75rem 0.85rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.mode-card strong,
.focus-item strong {
    display: block;
}

.mode-copy {
    display: grid;
    gap: 0.22rem;
    min-width: 0;
}

.mode-copy strong {
    line-height: 1.08;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

.mode-card p,
.focus-item .support-copy {
    margin: 0.2rem 0 0;
    color: rgba(255, 255, 255, 0.7);
}

.mode-step,
.focus-state {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.65rem;
    border-radius: 999px;
    background: rgba(8, 26, 52, 0.07);
    font-weight: 700;
}

.dashboard-body .section-label,
.dashboard-body .kicker,
.dashboard-body .metric-label,
.dashboard-body .mode-step,
.dashboard-body .summary-label,
.play-body .section-label,
.play-body .kicker,
.play-body .metric-label,
.play-body .mode-step,
.play-body .summary-label {
    color: rgba(255, 255, 255, 0.58);
}

.dashboard-body .brand-mark,
.dashboard-body .support-copy,
.dashboard-body .surface-card,
.dashboard-body .hero-panel,
.dashboard-body .metric-card,
.dashboard-body .mode-card,
.dashboard-body .focus-item {
    color: white;
}

.dashboard-body .focus-state {
    background: rgba(255, 255, 255, 0.06);
    color: var(--dashboard-signal);
}

.dashboard-modal {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.dashboard-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 11, 22, 0.72);
    backdrop-filter: blur(8px);
}

.dashboard-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 680px);
    display: grid;
    gap: 1rem;
    padding: 1rem;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(
        180deg,
        rgba(19, 34, 58, 0.96),
        rgba(12, 25, 47, 0.96)
    );
    box-shadow: var(--shadow-strong);
    color: white;
}

.dashboard-modal-copy {
    display: grid;
    gap: 0.4rem;
}

.dashboard-modal-copy h2 {
    margin: 0;
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(1.55rem, 4vw, 2.2rem);
    letter-spacing: -0.04em;
}

.dashboard-modal-close {
    justify-self: end;
    border: 0;
    border-radius: 999px;
    padding: 0.48rem 0.72rem;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.92);
    cursor: pointer;
}

.exam-choice-grid {
    display: grid;
    gap: 0.75rem;
}

.catalog-main {
    display: grid;
    gap: 0.9rem;
    align-content: start;
}

.auth-shell {
    min-height: 100dvh;
}

.auth-topbar {
    margin-bottom: 1.1rem;
}

.auth-main {
    display: grid;
    min-height: calc(100dvh - 4.8rem);
    align-content: center;
}

.auth-stage {
    display: grid;
    gap: 1.2rem;
    min-height: min(78vh, 820px);
    align-items: stretch;
    padding: 1.2rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 32px;
    backdrop-filter: blur(10px);
    box-shadow: none;
}

.auth-copy,
.auth-panel {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

.auth-copy {
    display: grid;
    align-content: end;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}

.auth-copy::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 2.25rem;
    height: 1px;
    background: rgba(255, 255, 255, 0.18);
}

.auth-copy h1,
.auth-panel h2 {
    margin: 0;
    font-family: "Space Grotesk", sans-serif;
    letter-spacing: -0.05em;
}

.auth-copy h1 {
    max-width: 8.5ch;
    font-size: clamp(2.6rem, 8vw, 5rem);
    line-height: 0.92;
}

.auth-copy .lede {
    margin: 0;
    max-width: 32ch;
    color: rgba(255, 255, 255, 0.68);
}

.auth-copy-note {
    margin: 0;
    max-width: 30ch;
    padding-top: 0.95rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.48);
    font-size: 0.9rem;
}

.auth-panel {
    display: grid;
    gap: 1rem;
    align-content: start;
    max-width: 30rem;
}

.auth-panel-copy {
    display: grid;
    gap: 0.35rem;
    padding-bottom: 0.95rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-panel h2 {
    font-size: clamp(1.5rem, 4vw, 2.4rem);
    line-height: 0.96;
}

.auth-form {
    display: grid;
    gap: 0.85rem;
}

.auth-field {
    display: grid;
    gap: 0.42rem;
}

.auth-field span,
.auth-switch-copy,
.auth-error {
    color: rgba(255, 255, 255, 0.72);
}

.auth-field input {
    width: 100%;
    min-height: 3.55rem;
    padding: 0.9rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.03);
    color: white;
    font: inherit;
    transition:
        border-color 180ms ease,
        background 180ms ease,
        box-shadow 180ms ease;
}

.auth-field input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.045);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.auth-submit {
    width: 100%;
    min-height: 3.75rem;
    background: #f0ece3;
    color: #0a0c0f;
    box-shadow: none;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.auth-submit:hover {
    background: #f6f2ea;
}

.auth-submit:focus-visible {
    outline: 2px solid rgba(240, 236, 227, 0.95);
    outline-offset: 2px;
}

.auth-error {
    margin: 0;
    padding: 0.78rem 0.92rem;
    border-radius: 18px;
    background: rgba(255, 102, 125, 0.08);
    border: 1px solid rgba(255, 102, 125, 0.14);
    color: rgba(255, 234, 238, 0.92);
}

.auth-switch-copy {
    margin: 0;
    color: rgba(255, 255, 255, 0.58);
}

.auth-switch-copy a {
    color: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid rgba(255, 255, 255, 0.24);
}

.error-shell {
    min-height: 100dvh;
}

.error-main {
    min-height: calc(100dvh - 4.8rem);
}

.error-copy {
    gap: 1rem;
}

.error-copy h1 {
    max-width: 10ch;
}

.error-copy .lede {
    max-width: 32ch;
}

.error-copy-note {
    max-width: 34ch;
}

.error-panel {
    gap: 1rem;
}

.error-panel-copy {
    padding-bottom: 1rem;
}

.error-status-card {
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.error-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 1.95rem;
    padding: 0.18rem 0.72rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.72);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.72rem;
}

.error-panel-text {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.46;
}

.error-actions {
    display: grid;
    gap: 0.68rem;
}

.error-action {
    width: 100%;
    min-height: 3.45rem;
}

.error-action-primary {
    background: #f0ece3;
    color: #0a0c0f;
    box-shadow: none;
}

.error-action-primary:hover {
    background: #f6f2ea;
}

.catalog-hero,
.catalog-panel {
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.018),
            rgba(255, 255, 255, 0)
        ),
        linear-gradient(
            180deg,
            var(--dashboard-panel-soft),
            var(--dashboard-panel)
        );
    border: 1px solid var(--dashboard-line);
    box-shadow:
        0 24px 54px rgba(3, 9, 20, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.025);
    border-radius: var(--radius-xl);
}

.catalog-hero {
    padding: 1.15rem 1.2rem;
}

.catalog-hero h1 {
    margin: 0.3rem 0 0;
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(1.9rem, 5vw, 3.2rem);
    letter-spacing: -0.04em;
    line-height: 0.95;
}

.catalog-panel {
    padding: 1rem;
}

.catalog-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.catalog-card {
    display: grid;
    gap: 0.75rem;
    padding: 0.82rem;
    border-radius: 24px;
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.018),
            rgba(255, 255, 255, 0)
        ),
        linear-gradient(180deg, rgba(10, 18, 31, 0.96), rgba(8, 15, 28, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 16px 28px rgba(3, 9, 20, 0.18);
    contain: layout paint style;
    content-visibility: auto;
    contain-intrinsic-size: 220px;
}

.catalog-flag-shell {
    display: grid;
    place-items: center;
    position: relative;
    min-height: 116px;
    padding: 0.3rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.catalog-flag-shell::before,
.flag-frame::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0.55rem;
    width: min(72%, 220px);
    height: 1.2rem;
    transform: translateX(-50%);
    border-radius: 999px;
    background: radial-gradient(
        circle,
        rgba(2, 8, 18, 0.34) 0%,
        rgba(2, 8, 18, 0.2) 48%,
        rgba(2, 8, 18, 0) 76%
    );
    filter: blur(8px);
    pointer-events: none;
}

.catalog-flag-shell img {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 140px;
    max-height: 92px;
    object-fit: contain;
    filter: drop-shadow(0 8px 12px rgba(2, 8, 18, 0.16))
        drop-shadow(0 16px 24px rgba(2, 8, 18, 0.24));
}

.catalog-copy {
    display: grid;
    gap: 0.18rem;
}

.catalog-copy strong {
    font-size: 1rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.catalog-copy span {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.82rem;
}

.play-body {
    color: white;
    --play-warm: #ff667d;
    --play-warm-soft: #ffc0ca;
    --play-cool: #67b8ff;
    --play-cool-soft: #b9dcff;
    --play-signal: #f4f7ff;
    --play-panel: rgba(14, 23, 40, 0.92);
    --play-panel-soft: rgba(19, 31, 52, 0.88);
    --play-line: rgba(255, 255, 255, 0.08);
    --play-line-strong: rgba(255, 255, 255, 0.12);
}

.play-body .button-primary {
    background: linear-gradient(135deg, var(--play-warm), #ff98aa);
    color: #07111f;
    box-shadow: 0 18px 34px rgba(255, 102, 125, 0.24);
}

.play-body .button-accent {
    background: linear-gradient(135deg, var(--play-cool), #a7d9ff);
    color: #07111f;
    box-shadow: 0 18px 34px rgba(103, 184, 255, 0.24);
}

.play-body .button-ghost {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.play-body::before {
    background:
        linear-gradient(rgba(255, 255, 255, 0.016) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.016) 1px, transparent 1px),
        radial-gradient(
            circle at top left,
            rgba(103, 184, 255, 0.14),
            transparent 24%
        ),
        radial-gradient(
            circle at 80% 10%,
            rgba(255, 102, 125, 0.12),
            transparent 20%
        ),
        linear-gradient(180deg, #07111f 0%, #0a1730 100%);
    background-size:
        32px 32px,
        32px 32px,
        auto,
        auto,
        auto;
}

.play-ambient-cyan {
    top: 2rem;
    right: -3rem;
    width: 16rem;
    height: 16rem;
    background: rgba(103, 184, 255, 0.18);
}

.play-ambient-lime {
    bottom: 8rem;
    left: -2rem;
    width: 14rem;
    height: 14rem;
    background: rgba(255, 102, 125, 0.12);
}

.game-shell {
    position: relative;
    z-index: 1;
    min-height: 100dvh;
    display: grid;
    grid-template-rows: auto 1fr;
    padding: max(0.75rem, env(safe-area-inset-top)) 0.85rem
        max(0.85rem, env(safe-area-inset-bottom));
    overflow: visible;
}

.game-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 0.7rem;
}

.topbar-spacer {
    visibility: hidden;
    pointer-events: none;
}

.ghost-link,
.hud-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.65rem 0.85rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.09);
    color: rgba(255, 255, 255, 0.92);
}

.hud-pill {
    font-weight: 700;
}

.game-layout {
    display: grid;
    gap: 1rem;
    height: 100%;
    min-height: 0;
}

.game-aside {
    display: none;
}

.aside-card,
.session-card {
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.018),
            rgba(255, 255, 255, 0)
        ),
        linear-gradient(180deg, var(--play-panel-soft), var(--play-panel));
    border: 1px solid var(--play-line);
    box-shadow:
        0 24px 54px rgba(3, 9, 20, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.025);
    backdrop-filter: blur(8px);
}

.aside-card {
    padding: 1rem;
    border-radius: var(--radius-lg);
}

.aside-card h2 {
    margin: 0.2rem 0 0;
    font-size: 1.3rem;
}

.aside-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.aside-metrics span {
    display: block;
    color: rgba(255, 255, 255, 0.68);
}

.aside-metrics strong {
    display: block;
    margin-top: 0.2rem;
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.7rem;
}

.focus-stack.compact .focus-item {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.06);
}

.focus-stack.compact .focus-state {
    background: rgba(255, 255, 255, 0.06);
    color: var(--play-signal);
}

.game-stage {
    display: grid;
    min-height: 0;
}

.session-card {
    width: min(100%, 760px);
    min-height: 0;
    height: 100%;
    margin: 0 auto;
    position: relative;
    display: grid;
    grid-template-rows: auto 1fr auto;
    padding: 0.9rem;
    border-radius: 32px;
}

.session-head {
    display: grid;
    gap: 0.85rem;
    align-items: start;
}

.session-head > :first-child {
    min-width: 0;
}

.session-hud {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    flex-wrap: nowrap;
}

.mode-pill {
    display: inline-flex;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(103, 184, 255, 0.16);
    color: var(--play-cool-soft);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.76rem;
}

.session-head h1 {
    margin: 0.45rem 0 0;
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(1.7rem, 7vw, 3.1rem);
    line-height: 0.94;
    letter-spacing: -0.04em;
    min-height: 1.88em;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.question-subtitle {
    max-width: 54ch;
    margin: 0.45rem 0 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.92rem;
    min-height: 1.35em;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.hud-swap-out {
    animation: hudFadeOut 80ms ease-out forwards;
}

.hud-swap-in {
    animation: hudFadeIn 120ms ease-out both;
}

@keyframes hudFadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes hudFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.score-strip {
    display: flex;
    gap: 0.7rem;
    flex-wrap: nowrap;
}

.score-chip {
    min-width: 6rem;
    padding: 0.65rem 0.82rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.score-chip-label {
    display: block;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.8rem;
}

.score-chip-main {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.2rem;
}

.score-chip-dot {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--play-cool), #a7d9ff);
    box-shadow: 0 0 14px rgba(103, 184, 255, 0.24);
}

.score-chip strong {
    display: block;
    margin: 0;
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.25rem;
}

.score-chip-dot-alert {
    background: linear-gradient(135deg, var(--play-warm), #ffb5c1);
    box-shadow: 0 0 14px rgba(255, 102, 125, 0.24);
}

.score-chip-soft {
    background: rgba(255, 255, 255, 0.05);
}

.score-chip-streak {
    min-width: 6.4rem;
}

.score-chip-lives,
.score-chip-timer,
.score-chip-progress {
    min-width: 7rem;
}

.score-chip.is-streak-hit {
    animation: streakPop 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes streakPop {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(103, 184, 255, 0);
    }
    45% {
        transform: scale(1.06);
        box-shadow: 0 16px 28px rgba(103, 184, 255, 0.18);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(103, 184, 255, 0);
    }
}

.quiz-body {
    display: grid;
    gap: 0.85rem;
    margin-top: 0.95rem;
    min-height: 0;
    align-content: stretch;
}

.question-card,
.summary-panel {
    display: grid;
    gap: 0.85rem;
    min-height: 0;
}

.quiz-body-transition {
    pointer-events: none;
}

.quiz-body-leave {
    animation: quizLeave 100ms ease-out forwards;
}

.quiz-body-enter {
    animation: quizEnter 140ms ease-out both;
}

@keyframes quizLeave {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.985);
    }
}

@keyframes quizEnter {
    from {
        opacity: 0;
        transform: scale(0.985);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.question-card-stable {
    grid-template-rows: minmax(0, 0.95fr) minmax(0, 1.05fr);
    height: 100%;
}

.question-card-stable[data-quiz-type="name_to_flag"] {
    grid-template-rows: auto minmax(0, 1fr);
}

.stimulus-stage,
.response-stage {
    display: grid;
    min-height: 0;
    padding: 0.75rem;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.stimulus-stage {
    align-content: stretch;
}

.response-stage {
    align-content: stretch;
}

.question-card-stable[data-quiz-type="name_to_flag"] .stimulus-stage {
    padding: 0 0 0.25rem;
    border: 0;
    background: transparent;
}

.stimulus-card {
    display: grid;
    min-height: clamp(150px, 24vh, 220px);
    height: 100%;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.018),
            rgba(255, 255, 255, 0)
        ),
        linear-gradient(180deg, rgba(8, 15, 28, 0.96), rgba(10, 18, 33, 0.98));
}

.stimulus-card-flag {
    place-items: center;
    padding: 0.35rem;
}

.stimulus-card-name {
    place-items: center;
    text-align: center;
    padding: 1.1rem;
}

.question-card-stable[data-quiz-type="name_to_flag"] .stimulus-card-name {
    width: min(100%, 560px);
    min-height: clamp(90px, 12vh, 118px);
    height: auto;
    margin: 0 auto;
    padding: 0.9rem 1.1rem;
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.018),
            rgba(255, 255, 255, 0)
        ),
        linear-gradient(180deg, rgba(10, 18, 31, 0.96), rgba(8, 15, 28, 0.98));
}

.stimulus-eyebrow {
    color: rgba(255, 255, 255, 0.62);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.72rem;
}

.stimulus-name {
    max-width: 10ch;
    margin-top: 0.45rem;
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(1.65rem, 6vw, 2.85rem);
    line-height: 0.95;
    letter-spacing: -0.04em;
}

.question-card-stable[data-quiz-type="name_to_flag"] .stimulus-name {
    max-width: 16ch;
    margin-top: 0.3rem;
    font-size: clamp(1.3rem, 3.8vw, 2rem);
    line-height: 1;
}

.flag-frame-hero {
    min-height: 100%;
}

/* ── Skeleton placeholders ────────────────────────────────── */

.skeleton-block {
    border-radius: 14px;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.025) 25%,
        rgba(255, 255, 255, 0.055) 50%,
        rgba(255, 255, 255, 0.025) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.6s ease-in-out infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-stimulus {
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.skeleton-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    gap: 0.7rem;
    height: 100%;
}

.skeleton-answer {
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.flag-stage {
    overflow: hidden;
    border-radius: 28px;
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.018),
            rgba(255, 255, 255, 0)
        ),
        linear-gradient(180deg, rgba(8, 15, 28, 0.96), rgba(10, 18, 33, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.flag-stage-hero {
    padding: 0.75rem;
}

.flag-frame {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: min(24vh, 210px);
    padding: 0.2rem;
    border-radius: 22px;
    background: transparent;
}

.flag-frame.compact {
    min-height: min(13vh, 96px);
}

.flag-frame img {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: auto;
    min-width: 0;
    max-width: 340px;
    max-height: min(22vh, 190px);
    aspect-ratio: 3 / 2;
    object-fit: contain;
    object-position: center;
    opacity: 0;
    transition: opacity 120ms ease;
    filter: drop-shadow(0 9px 14px rgba(2, 8, 18, 0.16))
        drop-shadow(0 18px 28px rgba(2, 8, 18, 0.26));
}

.flag-frame img.is-loaded {
    opacity: 1;
}

.flag-media-shell {
    position: relative;
    display: grid;
    width: 100%;
    height: 100%;
}

.choice-grid,
.flag-grid {
    display: grid;
    gap: 0.7rem;
    height: 100%;
    grid-auto-rows: 1fr;
}

.flag-answer-shell {
    position: relative;
    display: grid;
    width: 100%;
    height: 100%;
    min-height: 0;
}

.answer-card,
.flag-answer-card {
    position: relative;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 22px;
    cursor: pointer;
    transition:
        transform 180ms ease,
        box-shadow 180ms ease,
        border-color 180ms ease,
        opacity 160ms ease,
        filter 180ms ease,
        background 180ms ease;
    will-change: transform, opacity, filter;
}

.answer-card:hover,
.flag-answer-card:hover {
    transform: translateY(-1px);
}

.answer-card:active,
.flag-answer-card:active {
    transform: translateY(0) scale(0.985);
}

.answer-card:focus-visible,
.flag-answer-card:focus-visible,
.flag-zoom-trigger:focus-visible,
.ghost-link:focus-visible,
.catalog-back-link:focus-visible,
.dashboard-subtle-link:focus-visible,
.sound-toggle:focus-visible,
.level-badge:focus-visible {
    outline: 2px solid rgba(244, 241, 234, 0.88);
    outline-offset: 2px;
}

.answer-card {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 4.5rem;
    padding: 1.15rem 0.95rem 0.95rem;
    text-align: center;
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.018),
            rgba(255, 255, 255, 0)
        ),
        linear-gradient(180deg, rgba(12, 20, 34, 0.96), rgba(8, 15, 28, 0.98));
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 14px 30px rgba(3, 9, 20, 0.22);
}

.answer-card-label {
    font-size: 1.02rem;
    font-weight: 700;
}

.answer-shortcut {
    position: absolute;
    top: 0.62rem;
    left: 0.68rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.45rem;
    height: 1.45rem;
    padding-inline: 0.32rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1;
    pointer-events: none;
}

.flag-answer-card {
    padding: 0.45rem;
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.018),
            rgba(255, 255, 255, 0)
        ),
        linear-gradient(180deg, rgba(10, 18, 31, 0.96), rgba(8, 15, 28, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.flag-answer-card .flag-frame {
    transition:
        transform 180ms ease,
        filter 180ms ease;
}

.answer-shortcut-flag {
    z-index: 2;
    top: 0.65rem;
    left: 0.65rem;
    background: rgba(10, 18, 31, 0.78);
    backdrop-filter: blur(6px);
}

.flag-zoom-trigger {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(10, 18, 31, 0.72);
    color: rgba(255, 255, 255, 0.92);
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(2, 8, 18, 0.24);
    backdrop-filter: blur(8px);
    transition:
        transform 160ms ease,
        background 160ms ease,
        border-color 160ms ease,
        opacity 160ms ease;
}

.flag-zoom-trigger:hover {
    transform: translateY(-1px);
    background: rgba(14, 23, 40, 0.88);
    border-color: rgba(255, 255, 255, 0.2);
}

.flag-zoom-trigger:active {
    transform: scale(0.97);
}

.flag-zoom-icon {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.answer-card.is-muted,
.flag-answer-card.is-muted {
    opacity: 0.4;
    transform: scale(0.985);
    filter: saturate(0.65);
}

.answer-card.is-selected,
.flag-answer-card.is-selected {
    opacity: 1;
    transform: translateY(-2px) scale(1.01);
}

.answer-card.is-correct-hit,
.flag-answer-card.is-correct-hit,
.answer-form.is-correct-hit {
    animation: correctHit 240ms cubic-bezier(0.18, 0.8, 0.2, 1);
}

.answer-card.is-selected {
    box-shadow: 0 18px 36px rgba(103, 184, 255, 0.2);
}

.flag-answer-card.is-selected {
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.018),
            rgba(255, 255, 255, 0)
        ),
        linear-gradient(180deg, rgba(13, 27, 47, 0.98), rgba(10, 20, 37, 0.98));
    border-color: rgba(103, 184, 255, 0.24);
    box-shadow: 0 18px 36px rgba(103, 184, 255, 0.16);
}

.flag-answer-card.is-selected .flag-frame {
    transform: scale(0.98);
    filter: saturate(1.05);
}

.country-banner {
    display: grid;
    gap: 0.3rem;
    padding: 0.85rem 0.95rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.country-banner-label {
    color: rgba(255, 255, 255, 0.68);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.74rem;
}

.country-banner strong {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(1.25rem, 6vw, 2.2rem);
}

.answer-form {
    display: grid;
    gap: 0.75rem;
}

.answer-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.7rem;
}

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

.answer-form-panel {
    align-content: center;
    min-height: 100%;
    transition:
        transform 180ms ease,
        opacity 180ms ease,
        filter 180ms ease;
}

.answer-label {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.92rem;
    font-weight: 600;
}

.answer-form-panel.is-submitting {
    opacity: 0.82;
    transform: scale(0.994);
    filter: saturate(0.9);
}

@keyframes subtleErrorHit {
    0% {
        transform: translateX(0);
    }
    30% {
        transform: translateX(-4px);
    }
    62% {
        transform: translateX(3px);
    }
    100% {
        transform: translateX(0);
    }
}

@keyframes subtleErrorField {
    0% {
        border-color: rgba(255, 255, 255, 0.14);
        box-shadow: none;
    }
    35% {
        border-color: rgba(255, 102, 125, 0.48);
        box-shadow: 0 0 0 4px rgba(255, 102, 125, 0.12);
    }
    100% {
        border-color: rgba(255, 255, 255, 0.14);
        box-shadow: none;
    }
}

@keyframes subtleWarningField {
    0% {
        border-color: rgba(255, 255, 255, 0.14);
        box-shadow: none;
    }
    35% {
        border-color: rgba(103, 184, 255, 0.52);
        box-shadow: 0 0 0 4px rgba(103, 184, 255, 0.12);
    }
    100% {
        border-color: rgba(255, 255, 255, 0.14);
        box-shadow: none;
    }
}

.answer-form-panel.is-error-hit,
.answer-form-panel.is-warning-hit {
    animation: subtleErrorHit 240ms ease;
}

@keyframes correctHit {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(103, 184, 255, 0);
    }
    35% {
        transform: scale(1.02);
        box-shadow: 0 18px 34px rgba(103, 184, 255, 0.18);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(103, 184, 255, 0);
    }
}

.answer-burst {
    position: fixed;
    z-index: 40;
    padding: 0.36rem 0.66rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    pointer-events: none;
    transform: translate(-50%, -50%);
    box-shadow: 0 14px 24px rgba(3, 9, 20, 0.18);
    animation: answerBurst 260ms cubic-bezier(0.18, 0.8, 0.2, 1) forwards;
}

.answer-burst-positive {
    background: rgba(103, 184, 255, 0.96);
    color: #07111f;
}

@keyframes answerBurst {
    0% {
        opacity: 0;
        transform: translate(-50%, -42%) scale(0.92);
    }
    25% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -78%) scale(0.98);
    }
}

.answer-input {
    width: 100%;
    padding: 0.95rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    transition:
        box-shadow 180ms ease,
        transform 180ms ease;
}

.answer-input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.answer-input:focus {
    outline: 0;
    box-shadow: 0 0 0 4px rgba(103, 184, 255, 0.16);
}

.answer-input.is-error-hit {
    animation: subtleErrorField 320ms ease;
}

.answer-input.is-warning-hit {
    animation: subtleWarningField 320ms ease;
}

.answer-form-panel.is-submitting .answer-submit {
    transform: scale(0.985);
}

.answer-submit,
.answer-skip {
    transition:
        transform 180ms ease,
        box-shadow 180ms ease,
        opacity 180ms ease;
}

.button-keycap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.5rem;
    padding-inline: 0.38rem;
    border-radius: 999px;
    border: 1px solid currentColor;
    background: rgba(255, 255, 255, 0.08);
    color: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    opacity: 0.82;
}

.button-primary .button-keycap,
.button-accent .button-keycap {
    background: rgba(7, 17, 31, 0.08);
}

.answer-inline-status {
    min-height: 1.15rem;
    margin: 0;
    font-size: 0.84rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.74);
}

.answer-inline-status.is-error {
    color: rgba(255, 192, 202, 0.96);
}

.answer-inline-status.is-warning {
    color: rgba(185, 220, 255, 0.96);
}

.feedback-sheet {
    display: grid;
    gap: 0.9rem;
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 22px;
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.018),
            rgba(255, 255, 255, 0)
        ),
        linear-gradient(180deg, rgba(14, 23, 40, 0.96), rgba(10, 18, 31, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition:
        opacity 180ms ease,
        transform 180ms ease;
}

.feedback-sheet.correct {
    border-color: rgba(103, 184, 255, 0.18);
}

.feedback-sheet.incorrect,
.feedback-sheet.ambiguous,
.feedback-sheet.empty {
    border-color: rgba(255, 102, 125, 0.18);
}

.feedback-sheet h2,
.feedback-sheet p {
    margin: 0;
}

.feedback-copy {
    color: rgba(255, 255, 255, 0.78);
}

.feedback-flag-grid {
    display: grid;
    gap: 0.85rem;
}

.feedback-flag-grid.is-comparison {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feedback-flag-grid.is-single {
    grid-template-columns: minmax(0, 1fr);
}

.feedback-flag-card,
.summary-card {
    display: grid;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
}

.feedback-flag-card {
    gap: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.feedback-flag-meta {
    display: grid;
    gap: 0.18rem;
}

.feedback-meta-label {
    color: rgba(255, 255, 255, 0.62);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.7rem;
    font-weight: 700;
}

.feedback-flag-frame {
    min-height: min(18vh, 150px);
    padding: 0.25rem;
}

.summary-panel {
    margin-top: 0.5rem;
}

.summary-card strong {
    display: block;
    margin-top: 0.35rem;
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.6rem;
}

.summary-card-wide strong {
    font-size: 1.05rem;
    line-height: 1.4;
}

.summary-actions {
    display: grid;
    gap: 0.8rem;
}

.session-error {
    margin: 1rem auto 0;
    width: min(100%, 760px);
    padding: 0.9rem 1rem;
    border-radius: 18px;
    background: rgba(255, 102, 125, 0.1);
    border: 1px solid rgba(255, 102, 125, 0.18);
    color: var(--play-warm-soft);
}

.flag-zoom-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: max(1rem, env(safe-area-inset-top))
        max(1rem, env(safe-area-inset-right))
        max(1rem, env(safe-area-inset-bottom))
        max(1rem, env(safe-area-inset-left));
}

.flag-zoom-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 10, 19, 0.84);
    backdrop-filter: blur(8px);
}

.flag-zoom-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 960px);
    display: grid;
    gap: 0.85rem;
    padding: 1rem;
    border-radius: 28px;
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.018),
            rgba(255, 255, 255, 0)
        ),
        linear-gradient(180deg, rgba(14, 23, 40, 0.97), rgba(10, 18, 31, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 54px rgba(3, 9, 20, 0.4);
}

.flag-zoom-close {
    justify-self: end;
    padding: 0.55rem 0.82rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
}

.flag-zoom-stage {
    display: grid;
    place-items: center;
    min-height: min(70vh, 720px);
    padding: 0.6rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.flag-zoom-stage img {
    width: 100%;
    max-width: 100%;
    max-height: min(66vh, 680px);
    object-fit: contain;
    filter: drop-shadow(0 22px 34px rgba(2, 8, 18, 0.3));
}

.flag-zoom-title {
    margin: 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.72);
    font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
    .quiz-body-leave,
    .quiz-body-enter,
    .hud-swap-out,
    .hud-swap-in,
    .answer-card,
    .flag-answer-card,
    .flag-answer-card .flag-frame,
    .flag-frame img,
    .answer-form-panel,
    .answer-input,
    .answer-submit,
    .feedback-sheet,
    .score-chip,
    .answer-burst,
    .skeleton-block {
        transition: none !important;
        animation: none !important;
    }
}

@media (max-width: 759px) {
    .game-shell {
        padding: max(0.55rem, env(safe-area-inset-top)) 0.55rem
            max(0.7rem, env(safe-area-inset-bottom));
    }

    .game-topbar {
        margin-bottom: 0.45rem;
    }

    .button {
        padding: 0.85rem 1.1rem;
    }

    .topbar-action {
        padding-inline: 1rem;
    }

    .dashboard-phase-pill {
        display: none;
    }

    .hero-copy h1 {
        max-width: 11ch;
    }

    .hero-metrics {
        gap: 0.55rem;
    }

    .metric-card {
        min-height: 7.1rem;
        padding: 0.78rem 0.72rem;
        border-radius: 22px;
    }

    .metric-card .metric-label {
        font-size: 0.63rem;
        letter-spacing: 0.1em;
        text-transform: none;
    }

    .metric-reading strong {
        font-size: clamp(1.45rem, 6.8vw, 1.85rem);
    }

    .metric-foot {
        font-size: 0.67rem;
    }

    .metric-card p,
    .mode-card p {
        display: none;
    }

    .mode-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.55rem;
    }

    .mode-launch-grid,
    .exam-choice-grid {
        gap: 0.6rem;
    }

    .mode-launch-card,
    .exam-choice-card {
        padding: 0.82rem;
        border-radius: 22px;
    }

    .mode-launch-card strong,
    .exam-choice-card strong {
        font-size: 1.04rem;
    }

    .mode-card {
        flex-direction: column;
        align-items: flex-start;
        justify-content: space-between;
        gap: 0.7rem;
        min-height: 6.4rem;
        padding: 0.72rem;
        border-radius: 22px;
    }

    .mode-copy strong {
        font-size: 0.95rem;
    }

    .surface-badge-context {
        gap: 0.38rem;
        padding: 0.44rem 0.66rem;
        font-size: 0.74rem;
    }

    .surface-badge-dot {
        width: 0.42rem;
        height: 0.42rem;
    }

    .mode-step,
    .focus-state {
        min-width: 1.9rem;
        height: 1.9rem;
        padding-inline: 0.45rem;
        font-size: 0.68rem;
    }

    .dashboard-body .focus-stack .focus-item:nth-child(n + 3) {
        display: none;
    }

    .game-brand {
        font-size: 0.95rem;
    }

    .ghost-link,
    .hud-pill {
        padding: 0.48rem 0.68rem;
        font-size: 0.82rem;
    }

    .session-card {
        padding: 0.72rem;
        border-radius: 28px;
    }

    .flag-zoom-trigger {
        top: 0.42rem;
        right: 0.42rem;
        width: 1.9rem;
        height: 1.9rem;
    }

    .flag-zoom-icon {
        width: 0.92rem;
        height: 0.92rem;
    }

    .session-head {
        gap: 0.55rem;
    }

    .session-hud {
        gap: 0.45rem;
        align-items: flex-start;
    }

    .mode-pill {
        padding: 0.38rem 0.68rem;
        font-size: 0.68rem;
    }

    .session-head h1 {
        margin-top: 0.28rem;
        font-size: clamp(1.48rem, 6vw, 2.05rem);
    }

    .question-subtitle {
        margin-top: 0.22rem;
        font-size: 0.82rem;
        line-height: 1.35;
        min-height: calc(2 * 0.82rem * 1.35);
        display: -webkit-box;
        overflow: hidden;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .score-strip {
        justify-content: flex-start;
        gap: 0.45rem;
    }

    .score-chip {
        min-width: auto;
        padding: 0.38rem 0.62rem;
        border-radius: 12px;
    }

    .score-chip .score-chip-label {
        font-size: 0.64rem;
        letter-spacing: 0.1em;
        text-transform: uppercase;
    }

    .score-chip .score-chip-main {
        gap: 0.36rem;
        margin-top: 0.1rem;
    }

    .score-chip .score-chip-dot {
        width: 0.4rem;
        height: 0.4rem;
    }

    .score-chip strong {
        font-size: 0.95rem;
        line-height: 1;
    }

    .quiz-body {
        margin-top: 0.7rem;
        gap: 0.55rem;
    }

    .question-card,
    .summary-panel {
        gap: 0.55rem;
    }

    .question-card-stable {
        grid-template-rows: minmax(0, 1.18fr) auto;
    }

    .question-card-stable[data-quiz-type="flag_to_text"] {
        grid-template-rows: minmax(0, 1.14fr) auto;
    }

    .stimulus-stage,
    .response-stage {
        padding: 0.55rem;
        border-radius: 22px;
    }

    .stimulus-card {
        min-height: clamp(178px, 29vh, 250px);
        border-radius: 20px;
    }

    .stimulus-card-flag {
        padding: 0.18rem;
    }

    .stimulus-card .flag-frame {
        min-height: clamp(176px, 28vh, 246px);
        padding: 0.08rem;
    }

    .stimulus-card .flag-frame img {
        max-width: 100%;
        max-height: min(26vh, 220px);
    }

    .question-card-stable[data-quiz-type="name_to_flag"] .stimulus-card-name {
        width: 100%;
        min-height: 72px;
        padding: 0.62rem 0.85rem;
        border-radius: 18px;
    }

    .question-card-stable[data-quiz-type="name_to_flag"] .stimulus-stage {
        padding: 0 0 0.12rem;
    }

    .question-card-stable[data-quiz-type="name_to_flag"] .stimulus-eyebrow {
        font-size: 0.62rem;
        letter-spacing: 0.12em;
    }

    .question-card-stable[data-quiz-type="name_to_flag"] .stimulus-name {
        margin-top: 0.18rem;
        font-size: clamp(1.08rem, 4.8vw, 1.4rem);
    }

    .choice-grid,
    .skeleton-choice-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.55rem;
    }

    .flag-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.55rem;
    }

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

    .answer-card {
        min-height: 3.7rem;
        padding: 0.72rem;
        border-radius: 18px;
    }

    .answer-card-label {
        font-size: 0.95rem;
    }

    .flag-answer-card {
        padding: 0.28rem;
        border-radius: 18px;
    }

    .flag-answer-card .flag-frame.compact {
        min-height: min(16.5vh, 126px);
    }

    .flag-answer-card img {
        max-height: min(15vh, 112px);
    }

    .answer-form {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.62rem;
    }

    .answer-label {
        font-size: 0.84rem;
    }

    .answer-input {
        padding: 0.82rem 0.9rem;
        border-radius: 18px;
    }

    .answer-submit {
        width: 100%;
        padding-block: 0.8rem;
    }

    .flag-zoom-modal {
        padding: max(0.7rem, env(safe-area-inset-top))
            max(0.7rem, env(safe-area-inset-right))
            max(0.7rem, env(safe-area-inset-bottom))
            max(0.7rem, env(safe-area-inset-left));
    }

    .flag-zoom-dialog {
        padding: 0.78rem;
        border-radius: 24px;
    }

    .flag-zoom-close {
        padding: 0.46rem 0.72rem;
        font-size: 0.84rem;
    }

    .flag-zoom-stage {
        min-height: min(62vh, 460px);
        padding: 0.35rem;
    }

    .flag-zoom-stage img {
        max-height: min(58vh, 420px);
    }

    .dashboard-modal {
        padding: max(0.7rem, env(safe-area-inset-top))
            max(0.7rem, env(safe-area-inset-right))
            max(0.7rem, env(safe-area-inset-bottom))
            max(0.7rem, env(safe-area-inset-left));
    }

    .dashboard-modal-dialog {
        padding: 0.82rem;
        border-radius: 24px;
    }
}

@media (max-width: 759px) and (max-height: 760px) {
    .dashboard-topbar,
    .game-topbar {
        margin-bottom: 0.6rem;
    }

    .hero-panel,
    .surface-card,
    .session-card {
        padding: 0.82rem;
        border-radius: 26px;
    }

    .hero-copy h1,
    .session-head h1 {
        font-size: clamp(1.55rem, 6.5vw, 2.4rem);
    }

    .lede,
    .question-subtitle {
        font-size: 0.84rem;
    }

    .hero-actions,
    .quiz-body,
    .question-card {
        gap: 0.65rem;
    }

    .mode-launch-card,
    .exam-choice-card {
        padding: 0.78rem 0.8rem;
    }

    .dashboard-subtle-link,
    .catalog-back-link {
        padding: 0.5rem 0.7rem;
        font-size: 0.78rem;
    }

    .country-banner,
    .feedback-sheet,
    .summary-card {
        padding: 0.75rem 0.8rem;
    }

    .catalog-hero,
    .catalog-panel {
        padding: 0.88rem;
    }

    .catalog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.6rem;
    }

    .catalog-card {
        padding: 0.72rem;
        border-radius: 22px;
    }

    .catalog-flag-shell {
        min-height: 92px;
    }

    .metric-card {
        padding: 0.7rem 0.78rem;
    }

    .metric-reading strong {
        font-size: 1.35rem;
    }

    .dashboard-grid,
    .mode-list,
    .focus-stack {
        gap: 0.55rem;
    }

    .mode-card,
    .focus-item,
    .answer-card {
        padding: 0.7rem 0.78rem;
    }

    .score-chip {
        padding: 0.34rem 0.54rem;
        border-radius: 10px;
    }

    .score-chip strong {
        font-size: 0.88rem;
    }

    .play-body .stimulus-card .flag-frame {
        min-height: min(22vh, 178px);
    }

    .play-body .stimulus-card .flag-frame img {
        max-height: min(19vh, 152px);
    }

    .play-body .flag-answer-card .flag-frame.compact {
        min-height: min(11.5vh, 92px);
    }

    .play-body .flag-answer-card img {
        max-height: min(10.5vh, 80px);
    }
}

@media (min-width: 760px) {
    .dashboard-shell {
        padding-inline: 1.5rem;
    }

    .dashboard-subtle-link-topbar {
        display: none;
    }

    .dashboard-admin-link {
        display: inline-flex;
    }

    .dashboard-subtle-link-metrics {
        display: inline-flex;
        width: 100%;
        margin-top: 0.1rem;
        justify-content: center;
    }

    .hero-panel {
        grid-template-columns: minmax(0, 1.7fr) minmax(248px, 300px);
        align-items: start;
        gap: 1.1rem;
        padding: 1.45rem;
    }

    .hero-copy {
        grid-column: 1;
        grid-row: 1;
    }

    .hero-actions {
        grid-column: 1 / -1;
        grid-row: 2;
        margin-top: 0.1rem;
        align-items: stretch;
    }

    .mode-launch-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .hero-metrics {
        grid-column: 2;
        grid-row: 1;
        grid-template-columns: minmax(0, 1fr);
        gap: 0.5rem;
        align-self: start;
        align-content: start;
        grid-auto-rows: min-content;
    }

    .hero-metrics .metric-card {
        gap: 0.24rem;
        padding: 0.62rem 0.72rem;
        border-radius: 20px;
        min-height: 0;
        align-self: start;
    }

    .hero-metrics .metric-card p {
        display: none;
    }

    .hero-metrics .metric-card strong {
        font-size: 1.28rem;
    }

    .hero-metrics .metric-foot {
        font-size: 0.68rem;
    }

    .dashboard-grid {
        grid-template-columns: minmax(0, 1.28fr) minmax(300px, 0.92fr);
        align-items: start;
    }

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

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

    .session-head {
        grid-template-columns: 1fr auto;
    }

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

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

    .catalog-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .feedback-flag-frame {
        min-height: min(22vh, 180px);
    }

    .summary-card-wide,
    .summary-actions {
        grid-column: 1 / -1;
    }
}

@media (min-width: 1024px) {
    .surface-card-learning .mode-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .surface-card-focus {
        position: sticky;
        top: 1rem;
    }

    .game-layout {
        grid-template-columns: 280px minmax(0, 1fr);
        align-items: start;
    }

    .game-aside {
        display: grid;
        gap: 1rem;
        position: sticky;
        top: 1rem;
    }

    .session-card {
        margin: 0;
        width: 100%;
    }

    .flag-grid.flag-grid-wide {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* ── XP burst ────────────────────────────────────────────── */

.xp-burst {
    position: fixed;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.38rem 0.75rem;
    border-radius: 999px;
    background: rgba(103, 184, 255, 0.94);
    color: #07111f;
    font-weight: 700;
    font-size: 0.86rem;
    pointer-events: none;
    transform: translate(-50%, -50%);
    animation: xpBurstFloat 900ms cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
    box-shadow: 0 8px 24px rgba(103, 184, 255, 0.32);
}

.xp-burst-time {
    font-size: 0.74rem;
    font-weight: 600;
    opacity: 0.6;
}

.xp-time-fast {
    opacity: 0.82;
    color: #084;
}

@keyframes xpBurstFloat {
    0% {
        opacity: 0;
        transform: translate(-50%, -30%) scale(0.8);
    }
    18% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.06);
    }
    30% {
        transform: translate(-50%, -54%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -140%) scale(0.94);
    }
}

/* ── Confetti ────────────────────────────────────────────── */

.confetti-container {
    position: fixed;
    top: 40%;
    left: 50%;
    z-index: 58;
    pointer-events: none;
}

.confetti-particle {
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 2px;
    opacity: 0;
    animation: confettiFall 1.1s cubic-bezier(0.22, 0.7, 0.2, 1) forwards;
    animation-delay: var(--d, 0s);
    transform-origin: center;
}

@keyframes confettiFall {
    0% {
        opacity: 1;
        transform: translate(0, 0) rotate(0deg) scale(var(--s, 1));
    }
    70% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate(var(--x, 0), 280px) rotate(var(--r, 360deg))
            scale(0.3);
    }
}

/* ── Level up ────────────────────────────────────────────── */

.level-up-overlay {
    position: fixed;
    inset: 0;
    z-index: 56;
    display: grid;
    place-items: center;
    pointer-events: none;
    background: radial-gradient(
        circle at center,
        rgba(103, 184, 255, 0.08),
        transparent 60%
    );
    animation: levelUpFade 2.2s ease forwards;
}

.level-up-content {
    display: grid;
    gap: 0.3rem;
    text-align: center;
    animation: levelUpPop 600ms cubic-bezier(0.18, 0.85, 0.2, 1) forwards;
}

.level-up-kicker {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.78rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
}

.level-up-number {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(2.8rem, 10vw, 4rem);
    line-height: 0.92;
    letter-spacing: -0.04em;
    color: white;
    text-shadow: 0 0 50px rgba(103, 184, 255, 0.4);
}

.level-up-rank {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(185, 220, 255, 0.88);
}

@keyframes levelUpFade {
    0%,
    65% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

@keyframes levelUpPop {
    0% {
        transform: scale(0.5);
        opacity: 0;
        filter: blur(8px);
    }
    50% {
        transform: scale(1.08);
        opacity: 1;
        filter: blur(0);
    }
    100% {
        transform: scale(1);
        opacity: 1;
        filter: blur(0);
    }
}

/* ── Mastered burst ──────────────────────────────────────── */

.mastered-burst {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 52;
    transform: translate(-50%, -50%);
    display: grid;
    gap: 0.2rem;
    text-align: center;
    padding: 0.65rem 1.4rem;
    border-radius: 18px;
    background: linear-gradient(
        135deg,
        rgba(103, 184, 255, 0.95),
        rgba(130, 200, 255, 0.95)
    );
    color: #07111f;
    box-shadow: 0 14px 40px rgba(103, 184, 255, 0.35);
    pointer-events: none;
    animation: masteredPop 1.6s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.mastered-burst-label {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.66rem;
    font-weight: 700;
    opacity: 0.6;
}

.mastered-burst strong {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.2rem;
}

@keyframes masteredPop {
    0% {
        opacity: 0;
        transform: translate(-50%, -42%) scale(0.8);
    }
    12% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.06);
    }
    22% {
        transform: translate(-50%, -50%) scale(1);
    }
    72% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -62%) scale(0.95);
    }
}

/* ── Sound toggle ────────────────────────────────────────── */

.sound-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.78);
    cursor: pointer;
    transition:
        background 160ms ease,
        border-color 160ms ease,
        opacity 160ms ease;
}

.sound-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
}

.sound-toggle[data-sound="off"] {
    opacity: 0.45;
}

.sound-toggle-icon {
    width: 1.05rem;
    height: 1.05rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sound-wave {
    transition: opacity 160ms ease;
}

.sound-toggle[data-sound="off"] .sound-wave {
    opacity: 0;
}

/* ── Level badge ─────────────────────────────────────────── */

.level-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    padding: 0.38rem 0.68rem;
    border-radius: 999px;
    background: linear-gradient(
        135deg,
        rgba(103, 184, 255, 0.1),
        rgba(255, 102, 125, 0.06)
    );
    border: 1px solid rgba(103, 184, 255, 0.16);
    font-size: 0.82rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.88);
    white-space: nowrap;
}

.level-badge-label {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
}

.game-topbar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ── Response timer ──────────────────────────────────────── */

.response-timer {
    display: inline-flex;
    align-items: center;
    margin-top: 0;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.76rem;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    visibility: hidden;
    color: rgba(255, 255, 255, 0.38);
    transition:
        color 200ms ease,
        border-color 200ms ease,
        background 200ms ease;
}

.response-timer.is-fast {
    color: rgba(103, 230, 160, 0.92);
    border-color: rgba(103, 230, 160, 0.16);
    background: rgba(103, 230, 160, 0.06);
}

.response-timer.is-medium {
    color: rgba(255, 200, 110, 0.88);
    border-color: rgba(255, 200, 110, 0.14);
    background: rgba(255, 200, 110, 0.05);
}

.response-timer.is-slow {
    color: rgba(255, 150, 150, 0.72);
    border-color: rgba(255, 150, 150, 0.1);
}

.response-timer.is-visible {
    visibility: visible;
}

/* ── XP score chip ───────────────────────────────────────── */

.score-chip-xp {
    min-width: 5.4rem;
}

/* ── Dashboard level card ────────────────────────────────── */

.metric-card-level {
    background: linear-gradient(
        135deg,
        rgba(103, 184, 255, 0.1),
        rgba(255, 102, 125, 0.05)
    );
    border-color: rgba(103, 184, 255, 0.14);
}

.level-xp-track {
    width: 100%;
    height: 4px;
    margin-top: 0.4rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.level-xp-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(
        90deg,
        rgba(103, 184, 255, 0.78),
        rgba(255, 102, 125, 0.78)
    );
    box-shadow: 0 0 12px rgba(103, 184, 255, 0.15);
    transition: width 300ms ease;
}

.level-xp-caption {
    margin: 0.25rem 0 0;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.42);
}

/* ── Summary entrance ────────────────────────────────────── */

.summary-panel .summary-card,
.summary-panel .summary-actions {
    opacity: 0;
    transform: translateY(12px);
    animation: summaryCardIn 420ms ease forwards;
}

.summary-panel .summary-card:nth-child(1) {
    animation-delay: 60ms;
}
.summary-panel .summary-card:nth-child(2) {
    animation-delay: 140ms;
}
.summary-panel .summary-card:nth-child(3) {
    animation-delay: 220ms;
}
.summary-panel .summary-card:nth-child(4) {
    animation-delay: 300ms;
}
.summary-panel .summary-card:nth-child(5) {
    animation-delay: 380ms;
}
.summary-panel .summary-actions {
    animation-delay: 440ms;
}

@keyframes summaryCardIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Reduced motion overrides for new animations ─────────── */

@media (prefers-reduced-motion: reduce) {
    .xp-burst,
    .confetti-particle,
    .level-up-overlay,
    .level-up-content,
    .mastered-burst,
    .summary-panel .summary-card,
    .summary-panel .summary-actions {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .level-up-overlay {
        display: none !important;
    }
}

/* ── Mobile adjustments for new elements ─────────────────── */

@media (max-width: 759px) {
    .level-badge {
        padding: 0.3rem 0.55rem;
        font-size: 0.76rem;
    }

    .sound-toggle {
        width: 1.9rem;
        height: 1.9rem;
    }

    .sound-toggle-icon {
        width: 0.95rem;
        height: 0.95rem;
    }

    .response-timer {
        padding: 0.15rem 0.42rem;
        font-size: 0.7rem;
    }

    .xp-burst {
        font-size: 0.78rem;
        padding: 0.32rem 0.62rem;
    }

    .xp-burst-time {
        font-size: 0.68rem;
    }
}

/* ── Arcade refresh ──────────────────────────────────────── */

.dashboard-body {
    --dashboard-panel: rgba(15, 23, 38, 0.9);
    --dashboard-panel-soft: rgba(21, 31, 50, 0.84);
    --dashboard-line: rgba(255, 255, 255, 0.08);
    --dashboard-line-strong: rgba(255, 255, 255, 0.14);
    --dashboard-warm: #ff8b5e;
    --dashboard-warm-soft: #ffd2a3;
    --dashboard-cool: #4fd7ff;
    --dashboard-cool-soft: #cdf7ff;
    --dashboard-signal: #dfff77;
}

.play-body {
    --play-warm: #ff8b5e;
    --play-warm-soft: #ffd2a3;
    --play-cool: #4fd7ff;
    --play-cool-soft: #cdf7ff;
    --play-signal: #dfff77;
    --play-panel: rgba(15, 23, 38, 0.9);
    --play-panel-soft: rgba(21, 31, 50, 0.84);
    --play-line: rgba(255, 255, 255, 0.08);
    --play-line-strong: rgba(255, 255, 255, 0.14);
}

.dashboard-body::before {
    background:
        radial-gradient(
            circle at 14% 14%,
            rgba(255, 139, 94, 0.22),
            transparent 18%
        ),
        radial-gradient(
            circle at 83% 11%,
            rgba(79, 215, 255, 0.2),
            transparent 16%
        ),
        radial-gradient(
            circle at 54% 100%,
            rgba(223, 255, 119, 0.08),
            transparent 24%
        ),
        linear-gradient(180deg, #07101b 0%, #0d1630 52%, #09111e 100%);
}

.play-body::before {
    background:
        radial-gradient(
            circle at 16% 16%,
            rgba(255, 139, 94, 0.18),
            transparent 18%
        ),
        radial-gradient(
            circle at 84% 10%,
            rgba(79, 215, 255, 0.18),
            transparent 16%
        ),
        radial-gradient(
            circle at 50% 100%,
            rgba(223, 255, 119, 0.07),
            transparent 22%
        ),
        linear-gradient(180deg, #07101b 0%, #0d1630 52%, #09111e 100%);
}

.dashboard-body::after,
.play-body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    opacity: 0.09;
    background-image: radial-gradient(
        rgba(255, 255, 255, 0.85) 0.9px,
        transparent 0.9px
    );
    background-size: 20px 20px;
    mask-image: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.9),
        rgba(255, 255, 255, 0.18)
    );
}

.ambient-cyan,
.play-ambient-cyan {
    background: rgba(79, 215, 255, 0.2);
}

.ambient-coral,
.play-ambient-lime {
    background: rgba(255, 139, 94, 0.16);
}

.dashboard-topbar,
.game-topbar {
    margin-bottom: 1rem;
}

.brand-mark,
.game-brand {
    letter-spacing: 0.02em;
    font-size: 1.04rem;
}

.dashboard-subtle-link,
.catalog-back-link,
.ghost-link,
.hud-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.dashboard-subtle-link:hover,
.catalog-back-link:hover,
.ghost-link:hover {
    background: rgba(255, 255, 255, 0.075);
    border-color: rgba(255, 255, 255, 0.16);
}

.hero-panel,
.surface-card,
.aside-card,
.session-card,
.dashboard-modal-dialog,
.flag-zoom-dialog {
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.03),
            rgba(255, 255, 255, 0)
        ),
        linear-gradient(180deg, rgba(26, 38, 61, 0.92), rgba(12, 20, 34, 0.96));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 22px 54px rgba(2, 7, 18, 0.36),
        inset 0 1px 0 rgba(255, 255, 255, 0.035);
    backdrop-filter: blur(14px);
}

.hero-panel-game {
    position: relative;
    overflow: hidden;
    gap: 1rem;
}

.hero-panel-game::before,
.session-card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-panel-game::before {
    background:
        radial-gradient(
            circle at 0% 100%,
            rgba(255, 139, 94, 0.18),
            transparent 26%
        ),
        radial-gradient(
            circle at 100% 0%,
            rgba(79, 215, 255, 0.18),
            transparent 24%
        );
    opacity: 0.9;
}

.hero-stage,
.hero-player-card,
.session-head,
.quiz-body {
    position: relative;
    z-index: 1;
}

.hero-stage {
    display: grid;
    gap: 1rem;
}

.hero-copy .kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 0.38rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.78);
}

.hero-copy h1 {
    max-width: 8.5ch;
    margin: 0.25rem 0 0;
    font-size: clamp(2.6rem, 8vw, 5.4rem);
    line-height: 0.9;
}

.lede {
    margin: 0;
    max-width: 44ch;
    font-size: 1rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.74);
}

.mode-launch-grid {
    gap: 0.85rem;
}

.mode-launch-card {
    min-height: 12rem;
    padding: 1.15rem;
    border-radius: 28px;
    align-content: start;
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.028),
            rgba(255, 255, 255, 0)
        ),
        linear-gradient(180deg, rgba(16, 22, 35, 0.98), rgba(10, 15, 28, 0.98));
    box-shadow: 0 18px 32px rgba(3, 9, 20, 0.28);
}

.mode-launch-card::before {
    width: 4px;
    opacity: 1;
}

.mode-launch-card::after {
    content: "";
    position: absolute;
    width: 10rem;
    height: 10rem;
    right: -2.8rem;
    bottom: -5rem;
    border-radius: 999px;
    opacity: 0.75;
    filter: blur(14px);
    pointer-events: none;
}

.mode-launch-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 24px 42px rgba(3, 9, 20, 0.34);
}

.mode-launch-card strong,
.exam-choice-card strong {
    font-size: 1.46rem;
}

.mode-launch-card .support-copy,
.exam-choice-card .support-copy {
    max-width: 32ch;
    color: rgba(255, 255, 255, 0.74);
    line-height: 1.42;
}

.mode-launch-kicker {
    color: rgba(255, 255, 255, 0.58);
}

.mode-launch-card-primary {
    border-color: rgba(255, 139, 94, 0.18);
    box-shadow: 0 18px 32px rgba(255, 139, 94, 0.12);
}

.mode-launch-card-primary::before {
    background: linear-gradient(
        180deg,
        rgba(255, 139, 94, 0.95),
        rgba(255, 210, 163, 0.88)
    );
}

.mode-launch-card-primary::after {
    background: radial-gradient(
        circle,
        rgba(255, 139, 94, 0.28),
        transparent 68%
    );
}

.mode-launch-card-exam {
    border-color: rgba(79, 215, 255, 0.18);
    box-shadow: 0 18px 32px rgba(79, 215, 255, 0.12);
}

.mode-launch-card-exam::before {
    background: linear-gradient(
        180deg,
        rgba(79, 215, 255, 0.95),
        rgba(205, 247, 255, 0.88)
    );
}

.mode-launch-card-exam::after {
    background: radial-gradient(
        circle,
        rgba(79, 215, 255, 0.28),
        transparent 68%
    );
}

.mode-launch-card-exam:hover {
    box-shadow: 0 24px 42px rgba(79, 215, 255, 0.14);
}

.mode-launch-cta {
    margin-top: auto;
    padding: 0.72rem 0.88rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.mode-launch-card-primary .mode-launch-cta {
    color: rgba(255, 230, 213, 0.96);
    background: rgba(255, 139, 94, 0.12);
    border-color: rgba(255, 139, 94, 0.16);
}

.mode-launch-card-exam .mode-launch-cta {
    color: rgba(226, 249, 255, 0.96);
    background: rgba(79, 215, 255, 0.12);
    border-color: rgba(79, 215, 255, 0.16);
}

.hero-player-card {
    display: grid;
    gap: 0.95rem;
    padding: 1.08rem;
    border-radius: 30px;
    position: relative;
    overflow: hidden;
}

.hero-player-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(
        90deg,
        rgba(255, 139, 94, 0.95),
        rgba(255, 210, 99, 0.95),
        rgba(79, 215, 255, 0.95)
    );
}

.hero-player-head {
    display: grid;
    gap: 0.75rem;
}

.hero-player-level {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.player-level-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.48rem;
    padding: 0.48rem 0.72rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.92);
    font-weight: 700;
}

.player-level-pill strong {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.08rem;
}

.dashboard-phase-pill {
    background: rgba(79, 215, 255, 0.12);
    border-color: rgba(79, 215, 255, 0.18);
    color: rgba(226, 249, 255, 0.96);
}

.hero-player-rank {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.42rem;
    letter-spacing: -0.03em;
}

.hero-progress-cluster {
    display: grid;
    gap: 0.8rem;
}

.hero-progress-reading {
    display: flex;
    align-items: flex-end;
    gap: 0.6rem;
    margin-top: 0.12rem;
}

.hero-progress-value {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(2.4rem, 6vw, 3.6rem);
    line-height: 0.9;
    letter-spacing: -0.05em;
}

.hero-progress-caption {
    padding-bottom: 0.28rem;
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.9rem;
}

.progress-meter-hero {
    height: 0.92rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.progress-fill {
    background: linear-gradient(
        90deg,
        rgba(255, 139, 94, 0.98) 0%,
        rgba(255, 210, 99, 0.98) 46%,
        rgba(79, 215, 255, 0.98) 100%
    );
    box-shadow:
        0 0 18px rgba(255, 139, 94, 0.2),
        0 0 28px rgba(79, 215, 255, 0.16);
}

.hero-progress-copy {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
}

.hero-stat-grid {
    display: grid;
    gap: 0.75rem;
}

.hero-stat-card {
    display: grid;
    gap: 0.35rem;
    padding: 0.9rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.hero-stat-card strong {
    display: flex;
    align-items: baseline;
    gap: 0.15rem;
    margin: 0;
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.64rem;
    line-height: 0.95;
}

.hero-stat-card small {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.58);
}

.hero-stat-card p {
    margin: 0.05rem 0 0;
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.84rem;
    line-height: 1.4;
}

.hero-stat-card-xp strong {
    display: block;
    font-size: 1.02rem;
    line-height: 1.2;
}

.hero-stat-card .level-xp-track {
    margin-top: 0.2rem;
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
}

.level-xp-fill {
    background: linear-gradient(
        90deg,
        rgba(79, 215, 255, 0.96),
        rgba(255, 210, 99, 0.96)
    );
    box-shadow: 0 0 14px rgba(79, 215, 255, 0.2);
}

.surface-card-playbook {
    gap: 1rem;
}

.surface-card-playbook .surface-head {
    align-items: center;
}

.surface-card-playbook .surface-head h2 {
    font-size: 1.45rem;
}

.surface-card-playbook .surface-badge {
    color: rgba(255, 255, 255, 0.82);
    background: rgba(255, 255, 255, 0.06);
}

.mode-list-arcade {
    margin-top: 0;
    gap: 0.8rem;
}

.mode-list-arcade .mode-card {
    position: relative;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1rem;
    border-radius: 24px;
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.028),
            rgba(255, 255, 255, 0)
        ),
        rgba(255, 255, 255, 0.048);
}

.mode-list-arcade .mode-card:nth-child(1) {
    border-color: rgba(255, 139, 94, 0.18);
}

.mode-list-arcade .mode-card:nth-child(2) {
    border-color: rgba(255, 210, 99, 0.16);
}

.mode-list-arcade .mode-card:nth-child(3) {
    border-color: rgba(79, 215, 255, 0.18);
}

.mode-list-arcade .mode-step {
    min-width: 2.4rem;
    height: 2.4rem;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.96);
}

.mode-list-arcade .mode-copy strong {
    font-size: 1.08rem;
}

.mode-list-arcade .mode-card p {
    display: block;
    color: rgba(255, 255, 255, 0.68);
}

.dashboard-grid-solo {
    grid-template-columns: 1fr;
}

.dashboard-modal-dialog {
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.04),
            rgba(255, 255, 255, 0)
        ),
        linear-gradient(180deg, rgba(27, 39, 63, 0.98), rgba(13, 22, 38, 0.98));
}

.exam-choice-card {
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.03),
            rgba(255, 255, 255, 0)
        ),
        linear-gradient(180deg, rgba(16, 22, 35, 0.98), rgba(10, 15, 28, 0.98));
}

.exam-choice-card-accent {
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.03),
            rgba(255, 255, 255, 0)
        ),
        linear-gradient(180deg, rgba(14, 25, 40, 0.98), rgba(10, 18, 31, 0.98));
    border-color: rgba(79, 215, 255, 0.18);
    box-shadow: 0 18px 36px rgba(79, 215, 255, 0.12);
}

.play-body .button-primary {
    background: linear-gradient(135deg, var(--play-warm), #ffd06a);
    color: #09111d;
    box-shadow: 0 16px 30px rgba(255, 139, 94, 0.22);
}

.play-body .button-accent {
    background: linear-gradient(135deg, var(--play-cool), #9ff1ff);
    color: #07111c;
    box-shadow: 0 16px 30px rgba(79, 215, 255, 0.22);
}

.play-body .button-ghost {
    background: rgba(255, 255, 255, 0.055);
    border-color: rgba(255, 255, 255, 0.1);
}

.mode-pill {
    background: rgba(255, 139, 94, 0.12);
    border-color: rgba(255, 139, 94, 0.2);
    color: rgba(255, 226, 209, 0.96);
}

.session-card {
    overflow: hidden;
}

.session-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(
        90deg,
        rgba(255, 139, 94, 0.96),
        rgba(255, 210, 99, 0.96),
        rgba(79, 215, 255, 0.96)
    );
    opacity: 0.95;
}

.session-card::after {
    background:
        radial-gradient(
            circle at 0% 100%,
            rgba(255, 139, 94, 0.14),
            transparent 28%
        ),
        radial-gradient(
            circle at 100% 0%,
            rgba(79, 215, 255, 0.14),
            transparent 26%
        );
    opacity: 0.9;
}

.score-chip,
.aside-card .focus-item,
.focus-stack.compact .focus-item,
.stimulus-stage,
.response-stage {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.score-chip-dot {
    background: linear-gradient(135deg, var(--play-cool), #c7f7ff);
    box-shadow: 0 0 14px rgba(79, 215, 255, 0.24);
}

.score-chip-dot-alert {
    background: linear-gradient(135deg, var(--play-warm), #ffd2a3);
    box-shadow: 0 0 14px rgba(255, 139, 94, 0.24);
}

.question-subtitle,
.aside-metrics span,
.score-chip-label,
.response-timer,
.focus-stack.compact .focus-item .support-copy,
.mode-card p,
.focus-item .support-copy {
    color: rgba(255, 255, 255, 0.7);
}

.game-topbar .ghost-link,
.game-topbar .sound-toggle,
.game-topbar .level-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.game-topbar .level-badge {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

@media (max-width: 759px) {
    .dashboard-phase-pill {
        display: inline-flex;
    }

    .dashboard-topbar,
    .game-topbar {
        margin-bottom: 0.72rem;
    }

    .hero-panel-game,
    .surface-card-playbook,
    .session-card,
    .aside-card {
        padding: 0.9rem;
        border-radius: 28px;
    }

    .hero-copy .kicker {
        padding: 0.32rem 0.62rem;
        font-size: 0.66rem;
    }

    .hero-copy h1 {
        max-width: 8ch;
        font-size: clamp(2.05rem, 10vw, 3.2rem);
    }

    .lede {
        font-size: 0.88rem;
        line-height: 1.38;
    }

    .hero-actions,
    .hero-progress-cluster {
        gap: 0.72rem;
    }

    .mode-launch-card,
    .exam-choice-card {
        min-height: 10.2rem;
        padding: 0.95rem;
        border-radius: 24px;
    }

    .mode-launch-card strong,
    .exam-choice-card strong {
        font-size: 1.22rem;
    }

    .mode-launch-card .support-copy,
    .exam-choice-card .support-copy {
        font-size: 0.86rem;
    }

    .mode-launch-cta {
        padding: 0.62rem 0.8rem;
        font-size: 0.84rem;
    }

    .hero-player-card {
        padding-top: 0.96rem;
        gap: 0.82rem;
    }

    .hero-player-rank {
        font-size: 1.2rem;
    }

    .hero-progress-value {
        font-size: 2.2rem;
    }

    .hero-progress-caption {
        font-size: 0.82rem;
        padding-bottom: 0.18rem;
    }

    .hero-stat-grid {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }

    .hero-stat-card {
        padding: 0.78rem;
        border-radius: 20px;
    }

    .hero-stat-card strong {
        font-size: 1.4rem;
    }

    .dashboard-subtle-link-metrics {
        display: none;
    }

    .mode-list-arcade {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.55rem;
    }

    .mode-list-arcade .mode-card {
        min-height: 6.9rem;
        padding: 0.72rem;
        border-radius: 20px;
    }

    .mode-list-arcade .mode-card p {
        display: none;
    }

    .mode-list-arcade .mode-copy strong {
        font-size: 0.94rem;
    }

    .mode-list-arcade .mode-step {
        min-width: 2rem;
        height: 2rem;
        font-size: 0.7rem;
    }

    .game-topbar .ghost-link,
    .game-topbar .sound-toggle,
    .game-topbar .level-badge {
        border-radius: 14px;
    }
}

@media (min-width: 760px) {
    .hero-panel-game {
        grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.95fr);
        align-items: stretch;
        gap: 1rem;
        padding: 1.35rem;
    }

    .hero-stage {
        align-content: space-between;
        min-height: 100%;
    }

    .hero-actions {
        margin-top: auto;
    }

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

    .hero-player-card {
        min-height: 100%;
    }

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

    .dashboard-subtle-link-topbar {
        display: none;
    }

    .dashboard-subtle-link-metrics {
        display: inline-flex;
        width: 100%;
        justify-content: center;
    }

    .mode-list-arcade {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* ── Immersive minimalist refresh ────────────────────────── */

.dashboard-body,
.play-body {
    color: #f4f1ea;
}

.dashboard-body,
.play-body {
    --dashboard-panel: #111419;
    --dashboard-panel-soft: #141920;
    --dashboard-line: rgba(255, 255, 255, 0.08);
    --dashboard-line-strong: rgba(255, 255, 255, 0.12);
    --dashboard-signal: #d6ddcb;
    --play-panel: #111419;
    --play-panel-soft: #141920;
    --play-line: rgba(255, 255, 255, 0.08);
    --play-line-strong: rgba(255, 255, 255, 0.12);
    --play-warm: #d09b76;
    --play-warm-soft: #ead1bf;
    --play-cool: #d6ddcb;
    --play-cool-soft: #eef2e8;
    --play-signal: #d6ddcb;
}

.dashboard-body::before,
.play-body::before {
    background:
        radial-gradient(
            circle at 50% 18%,
            rgba(255, 255, 255, 0.045),
            transparent 26%
        ),
        linear-gradient(180deg, #090b0e 0%, #0c1015 100%);
}

.dashboard-body::after,
.play-body::after {
    opacity: 0.045;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.5),
        transparent 85%
    );
}

.ambient,
.play-ambient {
    display: none;
}

.dashboard-shell,
.game-shell {
    padding-inline: 1rem;
}

.dashboard-topbar,
.dashboard-main,
.game-topbar,
.game-layout,
.catalog-main {
    max-width: 1180px;
}

.brand-mark,
.game-brand {
    font-size: 1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-subtle-link,
.catalog-back-link,
.ghost-link,
.hud-pill,
.sound-toggle,
.level-badge {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

.dashboard-subtle-link:hover,
.catalog-back-link:hover,
.ghost-link:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: none;
}

.account-chip-active {
    color: rgba(255, 255, 255, 0.92);
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.05);
}

.sound-toggle[data-sound="off"] {
    opacity: 0.72;
}

.dashboard-main-immersive {
    min-height: calc(100dvh - 4.9rem);
}

.landing-stage {
    display: grid;
    gap: 1rem;
    min-height: 100%;
    align-items: stretch;
}

.landing-copy,
.progress-panel,
.account-hero,
.account-progress,
.account-card,
.mode-select-stage,
.catalog-hero,
.catalog-panel,
.aside-card,
.session-card,
.dashboard-modal-dialog,
.flag-zoom-dialog {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: none;
    backdrop-filter: blur(10px);
}

.landing-copy,
.progress-panel,
.account-hero,
.account-progress,
.catalog-hero,
.catalog-panel {
    border-radius: 32px;
    padding: 1.15rem;
}

.landing-copy {
    display: grid;
    justify-items: start;
    align-items: start;
    text-align: left;
    align-content: end;
    gap: 1.25rem;
    min-height: 48vh;
}

.landing-kicker,
.mode-select-copy .kicker,
.catalog-hero .kicker {
    color: rgba(255, 255, 255, 0.58);
}

.landing-copy h1,
.mode-select-copy h1,
.catalog-hero h1 {
    margin: 0;
    max-width: 8ch;
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(2.8rem, 8vw, 6rem);
    line-height: 0.92;
    letter-spacing: -0.05em;
}

.landing-copy .lede,
.mode-select-copy .lede,
.catalog-hero .lede {
    margin: 0;
    max-width: 34ch;
    color: rgba(255, 255, 255, 0.68);
    font-size: 1rem;
    line-height: 1.48;
}

.landing-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.play-cta {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.08rem;
    min-width: min(100%, 18rem);
    padding: 1rem 1.15rem;
    border-radius: 999px;
    background: #f0ece3;
    color: #0a0c0f;
    box-shadow: none;
    transition:
        transform 160ms ease,
        background 160ms ease;
}

.play-cta:hover {
    transform: translateY(-1px);
    background: #f6f2ea;
}

.play-cta-main {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.5rem;
    line-height: 1;
    letter-spacing: -0.04em;
}

.play-cta-meta {
    color: rgba(10, 12, 15, 0.62);
    font-size: 0.84rem;
}

.progress-panel {
    display: grid;
    gap: 1rem;
    align-content: start;
}

.account-main {
    display: grid;
    gap: 1rem;
    align-content: start;
}

.account-stage {
    display: grid;
    gap: 1rem;
}

.account-hero {
    display: grid;
    gap: 1.1rem;
    align-content: end;
    min-height: 20rem;
}

.account-hero h1 {
    margin: 0;
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(2.5rem, 8vw, 4.8rem);
    line-height: 0.92;
    letter-spacing: -0.05em;
}

.account-inline-metrics,
.account-compact-grid,
.account-grid {
    display: grid;
    gap: 0.75rem;
}

.account-inline-card,
.account-stat-card {
    display: grid;
    gap: 0.24rem;
    padding: 0.95rem 1rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.account-inline-card strong,
.account-stat-card strong {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.2rem;
    line-height: 1.02;
    letter-spacing: -0.03em;
}

.account-inline-card strong {
    font-size: 1.08rem;
}

.account-stat-card p,
.account-card-note p,
.account-card-copy {
    margin: 0;
    color: rgba(255, 255, 255, 0.64);
}

.account-progress {
    display: grid;
    gap: 1rem;
    align-content: start;
}

.account-flash-stack {
    display: grid;
    gap: 0.65rem;
    position: fixed;
    top: max(0.9rem, env(safe-area-inset-top));
    right: 1rem;
    z-index: 30;
    width: min(24rem, calc(100vw - 1.5rem));
    pointer-events: none;
}

.account-flash {
    padding: 0.88rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.86);
    pointer-events: auto;
    transition:
        opacity 220ms ease,
        transform 220ms ease;
}

.account-flash.is-dismissing {
    opacity: 0;
    transform: translateY(-6px);
}

.account-flash-success {
    border-color: rgba(214, 221, 203, 0.18);
    background: rgba(214, 221, 203, 0.08);
}

.account-flash-error {
    border-color: rgba(255, 102, 125, 0.14);
    background: rgba(255, 102, 125, 0.08);
    color: rgba(255, 234, 238, 0.92);
}

.account-card {
    display: grid;
    gap: 1rem;
    padding: 1rem;
    border-radius: 28px;
}

.account-list {
    display: grid;
    gap: 0.8rem;
}

.account-list-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.account-list-row:first-child {
    padding-top: 0;
    border-top: 0;
}

.account-list-row span {
    color: rgba(255, 255, 255, 0.58);
}

.account-row-label {
    display: inline-flex;
    align-items: center;
    gap: 0.48rem;
}

.account-row-label .ui-icon {
    width: 0.92rem;
    height: 0.92rem;
    opacity: 0.56;
}

.account-list-row strong,
.account-card-note h2 {
    margin: 0;
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.18rem;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.account-card-note {
    align-content: start;
}

.account-card-copy {
    max-width: 30ch;
    line-height: 1.42;
}

.account-password-form {
    display: grid;
    gap: 0.8rem;
}

.admin-main {
    display: grid;
    gap: 1rem;
    align-content: start;
    min-height: 0;
}

.admin-stage,
.admin-layout,
.admin-overview-grid,
.admin-metrics-grid,
.admin-detail-grid,
.admin-action-grid {
    display: grid;
    gap: 0.75rem;
}

.admin-hero,
.admin-overview,
.admin-users-card,
.admin-detail-card,
.admin-actions-card,
.admin-detail-subcard {
    min-height: 0;
}

.admin-hero {
    display: grid;
    gap: 1rem;
    align-content: end;
    padding: 1.1rem;
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: none;
    backdrop-filter: blur(10px);
}

.admin-hero h1 {
    margin: 0;
    max-width: 10ch;
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(2.6rem, 7vw, 4.7rem);
    line-height: 0.94;
    letter-spacing: -0.05em;
}

.admin-hero .lede {
    margin: 0;
    max-width: 48ch;
    color: rgba(255, 255, 255, 0.66);
    line-height: 1.48;
}

.admin-overview-grid .account-stat-card {
    min-height: 0;
}

.admin-overview {
    display: grid;
    padding: 1.1rem;
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: none;
    backdrop-filter: blur(10px);
}

.admin-users-card {
    display: grid;
    gap: 0.85rem;
    overflow: hidden;
}

.admin-user-list {
    display: grid;
    gap: 0.6rem;
    min-height: 0;
}

.admin-user-row {
    display: grid;
    gap: 0.22rem;
    padding: 0.9rem 0.95rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    transition:
        background 160ms ease,
        border-color 160ms ease,
        transform 160ms ease;
}

.admin-user-row:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

.admin-user-row.is-active {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(214, 221, 203, 0.2);
}

.admin-user-head,
.admin-detail-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.9rem;
}

.admin-user-head strong,
.admin-detail-head h2 {
    margin: 0;
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.22rem;
    line-height: 1.02;
    letter-spacing: -0.03em;
    color: rgba(255, 255, 255, 0.94);
}

.admin-detail-copy {
    display: grid;
    gap: 0.3rem;
}

.admin-user-row p,
.admin-user-row span,
.admin-detail-head p,
.admin-action-card p,
.admin-action-note {
    margin: 0;
    color: rgba(255, 255, 255, 0.62);
}

.admin-user-row span {
    font-size: 0.88rem;
}

.admin-user-badges {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.admin-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.75rem;
    padding: 0.25rem 0.62rem;
    border-radius: 999px;
    background: rgba(214, 221, 203, 0.08);
    border: 1px solid rgba(214, 221, 203, 0.14);
    color: rgba(238, 242, 232, 0.9);
    font-size: 0.78rem;
    font-weight: 600;
}

.admin-pill-soft {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.76);
}

.admin-detail-stack {
    display: grid;
    gap: 0.85rem;
    min-height: 0;
}

.admin-detail-card,
.admin-actions-card {
    gap: 0.9rem;
}

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

.admin-detail-grid {
    grid-template-columns: 1fr;
}

.admin-detail-subcard {
    align-content: start;
}

.admin-actions-card {
    align-content: start;
}

.admin-action-grid {
    grid-template-columns: 1fr;
}

.admin-action-card {
    display: grid;
    gap: 0.8rem;
    padding: 0.95rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-action-card h3 {
    margin: 0;
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.14rem;
    letter-spacing: -0.03em;
}

.admin-action-danger {
    border-color: rgba(255, 255, 255, 0.06);
}

.admin-password-form {
    display: grid;
    gap: 0.8rem;
}

.admin-password-form .auth-submit,
.admin-delete-button {
    justify-self: start;
}

.admin-delete-button {
    border-color: rgba(255, 255, 255, 0.12);
}

.admin-delete-dialog {
    width: min(100%, 34rem);
}

.admin-delete-copy {
    gap: 0.5rem;
}

.admin-delete-copy p:last-child {
    color: rgba(255, 255, 255, 0.68);
    line-height: 1.5;
}

.admin-delete-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.progress-panel-head {
    display: grid;
    gap: 0.75rem;
}

.immersive-chip {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 0.46rem 0.74rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.86);
    font-weight: 600;
}

.player-line {
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.player-line-label {
    color: rgba(255, 255, 255, 0.54);
    font-size: 0.84rem;
}

.player-line strong {
    font-family: "Space Grotesk", sans-serif;
    font-size: 2rem;
    line-height: 0.9;
}

.player-line-rank {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.96rem;
}

.progress-panel-body {
    display: grid;
    gap: 0.7rem;
}

.progress-hero-line {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.progress-hero-value {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(2.5rem, 6vw, 4.3rem);
    line-height: 0.9;
    letter-spacing: -0.06em;
}

.progress-hero-note,
.progress-panel-copy,
.quiet-stat p,
.mode-option-copy p,
.catalog-copy span,
.question-subtitle,
.score-chip-label,
.aside-metrics span,
.response-timer,
.support-copy {
    color: rgba(255, 255, 255, 0.64);
}

.progress-meter,
.level-xp-track {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: none;
}

.progress-meter-immersive {
    height: 0.7rem;
}

.progress-fill,
.level-xp-fill {
    background: #d6ddcb;
    box-shadow: none;
}

.quiet-stats {
    display: grid;
    gap: 0.75rem;
}

.quiet-stat {
    display: grid;
    gap: 0.3rem;
    padding-top: 0.95rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.quiet-stat strong {
    display: inline-flex;
    align-items: baseline;
    gap: 0.16rem;
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.26rem;
    line-height: 1.05;
}

.quiet-stat small {
    color: rgba(255, 255, 255, 0.5);
}

.dashboard-subtle-link-metrics {
    display: inline-flex;
    justify-content: center;
}

.mode-select-main,
.catalog-main {
    display: grid;
    gap: 1rem;
}

.mode-select-stage {
    display: grid;
    gap: 1.1rem;
    padding: 1.2rem;
    border-radius: 34px;
}

.mode-select-copy {
    display: grid;
    gap: 0.75rem;
}

.mode-select-list {
    display: grid;
    gap: 0.7rem;
}

.mode-option {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.05rem;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition:
        background 160ms ease,
        border-color 160ms ease,
        transform 160ms ease;
}

.mode-option:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
}

.mode-option-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.7);
    font-weight: 700;
    font-size: 0.8rem;
}

.mode-option-copy {
    display: grid;
    gap: 0.18rem;
    min-width: 0;
}

.mode-option-copy strong {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.3rem;
    letter-spacing: -0.03em;
}

.mode-option-copy p {
    margin: 0;
    max-width: 48ch;
    line-height: 1.45;
}

.mode-option-tag {
    white-space: nowrap;
    padding: 0.42rem 0.72rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.82rem;
    font-weight: 600;
}

.catalog-hero h1 {
    max-width: 11ch;
}

.catalog-panel {
    padding: 1rem;
}

.catalog-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

.catalog-flag-shell {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.game-topbar {
    margin-bottom: 0.85rem;
}

.game-layout {
    gap: 0.9rem;
}

.aside-card,
.session-card,
.catalog-card {
    border-radius: 30px;
}

.session-card {
    padding: 1rem;
}

.session-card::before,
.session-card::after,
.hero-panel-game::before {
    display: none;
}

.mode-pill {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.82);
}

.score-chip,
.stimulus-stage,
.response-stage,
.focus-stack.compact .focus-item,
.aside-card .focus-item,
.feedback-sheet,
.country-banner,
.summary-card {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

.score-chip-dot,
.score-chip-dot-alert {
    box-shadow: none;
}

.score-chip-dot {
    background: #d6ddcb;
}

.score-chip-dot-alert {
    background: #d09b76;
}

.play-body .button-primary {
    background: #f0ece3;
    color: #0a0c0f;
    box-shadow: none;
}

.play-body .button-accent {
    background: rgba(255, 255, 255, 0.08);
    color: #f4f1ea;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: none;
}

.play-body .button-ghost {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.flag-zoom-trigger,
.dashboard-modal-close,
.flag-zoom-close {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

.feedback-sheet {
    border-radius: 26px;
}

@media (max-width: 759px) {
    .dashboard-shell,
    .game-shell {
        padding-inline: 0.82rem;
    }

    .landing-copy,
    .progress-panel,
    .account-hero,
    .account-progress,
    .mode-select-stage,
    .catalog-hero,
    .catalog-panel,
    .session-card,
    .aside-card {
        padding: 0.95rem;
        border-radius: 26px;
    }

    .landing-copy h1,
    .mode-select-copy h1,
    .catalog-hero h1 {
        max-width: 9ch;
        font-size: clamp(2.15rem, 11vw, 3.5rem);
    }

    .landing-copy .lede,
    .mode-select-copy .lede,
    .catalog-hero .lede {
        font-size: 0.9rem;
    }

    .play-cta {
        width: 100%;
    }

    .mode-option {
        grid-template-columns: auto 1fr;
        align-items: start;
    }

    .mode-option-tag {
        grid-column: 2;
        width: fit-content;
    }

    .progress-hero-value {
        font-size: 2.35rem;
    }

    .quiet-stat strong {
        font-size: 1.12rem;
    }

    .dashboard-subtle-link-topbar {
        display: inline-flex;
    }

    .dashboard-subtle-link-metrics {
        display: none;
    }

    .account-inline-metrics,
    .account-compact-grid {
        grid-template-columns: 1fr;
    }

    .account-progress {
        display: flex;
        flex-direction: column;
        align-content: stretch;
    }

    .account-progress > * {
        width: 100%;
        max-width: none;
    }

    .account-progress .progress-panel-body {
        order: 0;
        width: 100%;
        justify-self: stretch;
    }

    .account-compact-grid {
        order: 1;
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .account-stat-card {
        min-height: 0;
        align-content: start;
        width: 100%;
    }

    .account-card,
    .account-inline-card {
        padding: 0.95rem;
    }

    .account-list-row {
        align-items: start;
    }

    .account-list-row strong {
        text-align: right;
    }

    .admin-hero,
    .admin-users-card,
    .admin-detail-card,
    .admin-actions-card,
    .admin-detail-subcard {
        padding: 0.95rem;
        border-radius: 26px;
    }

    .admin-stage,
    .admin-layout,
    .admin-overview-grid,
    .admin-metrics-grid,
    .admin-detail-grid,
    .admin-action-grid {
        grid-template-columns: 1fr;
    }

    .admin-hero h1 {
        max-width: 9ch;
        font-size: clamp(2.2rem, 11vw, 3.6rem);
    }

    .admin-user-head,
    .admin-detail-head {
        display: grid;
        gap: 0.55rem;
    }

    .admin-user-row,
    .admin-action-card {
        padding: 0.9rem;
        border-radius: 22px;
    }
}

@media (min-width: 760px) {
    .dashboard-body-account .dashboard-shell {
        height: 100dvh;
        overflow: hidden;
    }

    .account-main {
        display: flex;
        flex-direction: column;
        gap: 0.85rem;
        height: 100%;
        min-height: 0;
        align-content: stretch;
    }

    .landing-stage {
        grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.88fr);
    }

    .account-stage {
        grid-template-columns: minmax(0, 1.18fr) minmax(360px, 0.92fr);
        align-items: stretch;
        flex: 1 1 0;
        min-height: 0;
        gap: 0.9rem;
    }

    .account-hero {
        grid-template-rows: auto auto 1fr auto;
        align-content: stretch;
    }

    .account-progress {
        grid-template-rows: auto 1fr auto;
        align-content: stretch;
    }

    .account-inline-metrics,
    .account-compact-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .account-grid {
        grid-template-columns: minmax(0, 0.92fr) minmax(0, 0.92fr) minmax(
                0,
                1.16fr
            );
        align-items: stretch;
        flex: 1 1 0;
        min-height: 0;
        gap: 0.9rem;
    }

    .account-progress,
    .account-hero,
    .account-card {
        min-height: 0;
    }

    .account-compact-grid {
        align-content: end;
    }

    .account-card {
        gap: 0.8rem;
        padding: 0.92rem;
        height: 100%;
        align-content: start;
    }

    .account-card-activity,
    .account-card-stats {
        grid-template-rows: auto 1fr;
    }

    .account-card-security {
        grid-template-rows: auto 1fr;
    }

    .account-card-security .account-password-form {
        align-self: stretch;
    }

    .account-card-security {
        gap: 0.72rem;
    }

    .account-password-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.68rem;
    }

    .account-password-form .auth-field:first-of-type,
    .account-password-form .auth-submit {
        grid-column: 1 / -1;
    }

    .account-password-form .auth-field input {
        min-height: 3.05rem;
    }

    .account-password-form .auth-submit {
        width: auto;
        min-height: 3.05rem;
        padding-inline: 1.25rem;
        justify-self: start;
    }

    .dashboard-body-admin .dashboard-shell {
        min-height: 100dvh;
        height: auto;
        overflow: visible;
    }

    .admin-main {
        display: grid;
        gap: 0.85rem;
        align-content: start;
        min-height: 0;
    }

    .admin-stage {
        grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
        gap: 0.9rem;
    }

    .admin-hero {
        min-height: 15rem;
        padding: 1.15rem;
    }

    .admin-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        height: 100%;
        align-content: stretch;
    }

    .admin-layout {
        grid-template-columns: minmax(290px, 0.8fr) minmax(0, 1.45fr);
        gap: 0.9rem;
        align-items: start;
    }

    .admin-users-card,
    .admin-detail-card,
    .admin-actions-card,
    .admin-detail-subcard {
        padding: 0.95rem;
    }

    .admin-user-list {
        max-height: min(54rem, calc(100dvh - 17rem));
        overflow: auto;
        padding-right: 0.1rem;
    }

    .admin-detail-stack {
        grid-template-rows: auto auto;
    }

    .admin-detail-card {
        min-height: auto;
    }

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

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

    .admin-action-grid {
        grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
        align-items: start;
    }

    .admin-action-card {
        height: 100%;
    }

    .admin-password-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.68rem;
    }

    .admin-password-form .auth-field:first-of-type,
    .admin-password-form .auth-submit {
        grid-column: 1 / -1;
    }

    .admin-password-form .auth-field input {
        min-height: 3.05rem;
    }

    .admin-password-form .auth-submit {
        width: auto;
        min-height: 3.05rem;
        padding-inline: 1.25rem;
    }

    .landing-copy {
        min-height: 72vh;
        padding: 1.4rem;
    }

    .progress-panel {
        padding: 1.25rem;
    }

    .quiet-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.9rem;
    }

    .dashboard-subtle-link-topbar {
        display: none;
    }

    .dashboard-subtle-link-metrics {
        display: inline-flex;
    }

    .mode-select-stage {
        grid-template-columns: 1fr;
        align-items: start;
    }
}

/* ── Minimal polish ──────────────────────────────────────── */

.ui-icon {
    width: 1rem;
    height: 1rem;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dashboard-subtle-link,
.catalog-back-link {
    gap: 0.52rem;
}

.play-cta {
    min-width: min(100%, 17rem);
    min-height: 4.9rem;
    padding: 1.18rem 1.08rem;
}

.play-cta-main-row {
    display: inline-flex;
    align-items: center;
    width: 100%;
    gap: 0.55rem;
}

.play-cta-icon {
    width: 1.22rem;
    height: 1.22rem;
    opacity: 0.72;
    animation: playArrowDrift 2.2s ease-in-out infinite;
}

@keyframes playArrowDrift {
    0%,
    100% {
        transform: translateX(0);
        opacity: 0.62;
    }
    50% {
        transform: translateX(5px);
        opacity: 0.9;
    }
}

.metric-label-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.44rem;
}

.metric-label-icon .ui-icon {
    width: 0.92rem;
    height: 0.92rem;
    opacity: 0.7;
}

.quiet-stat p {
    margin: 0.02rem 0 0;
}

.quiet-stat-inline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
    gap: 0.65rem;
}

.quiet-stat-record {
    display: grid;
    gap: 0.18rem;
    padding: 0.72rem 0.78rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.quiet-stat-record small {
    color: rgba(255, 255, 255, 0.54);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.quiet-stat-record strong {
    font-size: 1.08rem;
}

.mode-option {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
}

.mode-option-primary {
    background: rgba(255, 255, 255, 0.038);
    border-color: rgba(255, 255, 255, 0.14);
}

.mode-option-primary .mode-option-index {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.92);
}

.mode-option-primary .mode-option-tag {
    background: rgba(255, 255, 255, 0.065);
    border-color: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.92);
}

.mode-option-arrow {
    width: 1rem;
    height: 1rem;
    opacity: 0.5;
}

.mode-option-record {
    display: inline-flex;
    align-items: center;
    margin-top: 0.28rem;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.progress-panel-body {
    gap: 0.58rem;
}

.progress-hero-line {
    gap: 0.42rem;
}

.progress-hero-note {
    max-width: 14ch;
}

@media (max-width: 759px) {
    .answer-shortcut,
    .button-keycap {
        display: none;
    }

    .dashboard-shell,
    .game-shell {
        padding-inline: 0.72rem;
        padding-top: max(0.7rem, env(safe-area-inset-top));
        padding-bottom: max(0.8rem, env(safe-area-inset-bottom));
    }

    .dashboard-topbar,
    .game-topbar {
        gap: 0.55rem;
        margin-bottom: 0.68rem;
    }

    .brand-mark,
    .game-brand {
        font-size: 0.88rem;
        letter-spacing: 0.09em;
    }

    .dashboard-topbar-actions {
        gap: 0.42rem;
    }

    .dashboard-subtle-link-topbar,
    .catalog-back-link,
    .ghost-link,
    .hud-pill {
        padding: 0.52rem 0.68rem;
    }

    .dashboard-subtle-link-topbar {
        min-width: 2.3rem;
        justify-content: center;
    }

    .dashboard-subtle-link-topbar span {
        display: none;
    }

    .landing-stage {
        gap: 0.72rem;
    }

    .landing-copy,
    .progress-panel,
    .mode-select-stage,
    .catalog-hero,
    .catalog-panel {
        padding: 0.88rem;
        border-radius: 24px;
    }

    .landing-copy {
        min-height: 41vh;
        gap: 1rem;
        align-items: flex-start;
        justify-items: start;
        text-align: left;
        justify-content: end;
    }

    .landing-kicker,
    .mode-select-copy .kicker,
    .catalog-hero .kicker {
        font-size: 0.66rem;
        letter-spacing: 0.18em;
    }

    .landing-copy h1,
    .mode-select-copy h1,
    .catalog-hero h1 {
        max-width: 8.4ch;
        font-size: clamp(2.2rem, 11vw, 3.35rem);
        line-height: 0.9;
    }

    .landing-copy .lede,
    .mode-select-copy .lede,
    .catalog-hero .lede {
        max-width: 29ch;
        font-size: 0.88rem;
        line-height: 1.42;
    }

    .landing-actions {
        width: 100%;
    }

    .play-cta {
        width: 100%;
        border-radius: 22px;
    }

    .play-cta-main {
        font-size: 1.36rem;
    }

    .play-cta-meta {
        font-size: 0.78rem;
    }

    .progress-panel {
        gap: 0.8rem;
    }

    .progress-panel-head {
        gap: 0.58rem;
    }

    .immersive-chip {
        padding: 0.38rem 0.62rem;
        font-size: 0.8rem;
    }

    .player-line {
        gap: 0.34rem;
    }

    .player-line-label {
        font-size: 0.76rem;
    }

    .player-line strong {
        font-size: 1.62rem;
    }

    .player-line-rank {
        font-size: 0.84rem;
    }

    .progress-hero-value {
        font-size: 2.15rem;
    }

    .progress-hero-note {
        max-width: 10ch;
        font-size: 0.78rem;
    }

    .progress-meter-immersive {
        height: 0.62rem;
    }

    .quiet-stats {
        gap: 0.55rem;
    }

    .quiet-stat {
        gap: 0.24rem;
        padding-top: 0.72rem;
    }

    .quiet-stat strong {
        font-size: 1.02rem;
    }

    .quiet-stat p {
        font-size: 0.76rem;
        line-height: 1.35;
    }

    .mode-select-stage {
        gap: 0.85rem;
    }

    .mode-select-list {
        gap: 0.55rem;
    }

    .mode-option {
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 0.72rem;
        padding: 0.86rem;
        border-radius: 22px;
    }

    .mode-option-index {
        width: 2.15rem;
        height: 2.15rem;
        font-size: 0.74rem;
    }

    .mode-option-copy strong {
        font-size: 1.08rem;
    }

    .mode-option-copy p {
        font-size: 0.84rem;
        line-height: 1.38;
    }

    .mode-option-arrow {
        width: 0.92rem;
        height: 0.92rem;
    }

    .mode-option-tag {
        grid-column: 2;
        margin-top: -0.08rem;
        padding: 0.34rem 0.6rem;
        font-size: 0.74rem;
    }

    .session-card,
    .aside-card {
        border-radius: 24px;
    }
}

@media (min-width: 760px) {
    .landing-copy {
        gap: 1.45rem;
    }

    .landing-copy .lede {
        max-width: 36ch;
    }

    .progress-panel {
        gap: 1.05rem;
    }

    .progress-panel-body {
        gap: 0.66rem;
    }
}

/* ── Dashboard spacing refinements ───────────────────────── */

.landing-stage {
    gap: 1.05rem;
}

.landing-copy {
    gap: 1.35rem;
}

.progress-panel {
    gap: 1.08rem;
}

.progress-panel-head {
    gap: 0.7rem;
}

.player-stack {
    display: grid;
    gap: 0.55rem;
}

.panel-separator {
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}

.player-line .ui-icon {
    width: 0.96rem;
    height: 0.96rem;
    opacity: 0.72;
}

.player-cap {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: rgba(255, 255, 255, 0.64);
    font-size: 0.88rem;
    line-height: 1.35;
}

.player-cap .ui-icon {
    width: 0.9rem;
    height: 0.9rem;
    opacity: 0.64;
}

.progress-panel-body {
    gap: 0.74rem;
}

.quiet-stats {
    gap: 0.85rem;
}

.quiet-stat {
    gap: 0.34rem;
    padding-top: 1rem;
}

@media (max-width: 759px) {
    .dashboard-shell,
    .game-shell {
        padding-inline: 0.82rem;
    }

    .dashboard-topbar,
    .game-topbar {
        margin-bottom: 0.8rem;
    }

    .landing-stage {
        gap: 0.92rem;
    }

    .landing-copy,
    .progress-panel {
        padding: 1rem;
    }

    .landing-copy {
        order: 2;
        align-items: flex-start;
        justify-items: start;
        text-align: left;
        min-height: 44vh;
        gap: 1.18rem;
        align-content: start;
    }

    .play-cta {
        min-height: 5.35rem;
        padding: 1rem 1.05rem;
    }

    .progress-panel {
        order: 1;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-areas:
            "hero hero"
            "mastered level";
        gap: 0.72rem;
        align-items: stretch;
    }

    .progress-panel-head {
        grid-area: level;
        display: block;
        min-width: 0;
    }

    .player-stack {
        height: 100%;
        gap: 0.42rem;
        padding: 0.86rem;
        border-radius: 20px;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.08);
    }

    .player-line {
        gap: 0.38rem;
        align-items: baseline;
    }

    .player-line strong {
        font-size: 1.3rem;
    }

    .player-cap {
        font-size: 0.76rem;
        line-height: 1.3;
    }

    .panel-separator {
        display: none;
    }

    .progress-panel-body {
        grid-area: hero;
        gap: 0.6rem;
        padding: 0.9rem;
        border-radius: 20px;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.08);
    }

    .quiet-stats {
        grid-area: mastered;
        gap: 0;
        min-width: 0;
    }

    .quiet-stat {
        height: 100%;
        padding: 0.86rem;
        border-top: 0;
        border-radius: 20px;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.08);
    }

    .quiet-stat strong {
        font-size: 1.22rem;
    }

    .quiet-stat p {
        font-size: 0.75rem;
        line-height: 1.32;
        display: -webkit-box;
        overflow: hidden;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
    }

    .progress-hero-line {
        align-items: end;
        gap: 0.35rem;
    }

    .progress-hero-value {
        font-size: 2rem;
    }

    .progress-hero-note {
        max-width: 8ch;
        font-size: 0.74rem;
        line-height: 1.18;
    }

    .progress-meter-immersive {
        height: 0.56rem;
    }

    .metric-label-icon {
        gap: 0.32rem;
    }

    .metric-label-icon .ui-icon,
    .player-line .ui-icon,
    .player-cap .ui-icon {
        width: 0.82rem;
        height: 0.82rem;
    }
}

@media (min-width: 760px) {
    .dashboard-body-home .dashboard-main {
        max-width: 1240px;
    }

    .dashboard-main {
        max-width: 1380px;
    }

    .dashboard-main-immersive {
        display: grid;
        align-content: center;
    }

    .dashboard-body-home .landing-stage {
        width: min(100%, 70.5rem);
        margin-inline: auto;
        justify-content: center;
        grid-template-columns: minmax(0, 43.75rem) minmax(25.5rem, 1fr);
        gap: 1.2rem;
        min-height: min(76vh, 820px);
        align-content: center;
    }

    .landing-stage {
        grid-template-columns: minmax(0, 1.7fr) minmax(420px, 1fr);
        gap: 1.2rem;
        min-height: min(76vh, 820px);
        align-content: center;
    }

    .dashboard-body-home .landing-copy {
        width: auto;
        justify-self: stretch;
        align-content: center;
    }

    .landing-copy {
        padding: 1.55rem;
        gap: 1.55rem;
    }

    .progress-panel {
        padding: 1.35rem;
        gap: 1.15rem;
    }

    .progress-panel-head {
        gap: 0.76rem;
    }

    .quiet-stats {
        grid-template-columns: 1fr;
        gap: 0.95rem;
    }

    .mode-select-main {
        max-width: 860px;
        margin: 0 auto;
    }

    .mode-select-stage {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .mode-select-copy {
        max-width: 36rem;
    }
}

/* ── Landing final alignment fixes ──────────────────────── */

.landing-copy > * {
    justify-self: start;
    margin-left: 0;
}

.landing-copy .landing-actions {
    width: 100%;
    justify-content: flex-start;
}

.landing-copy .play-cta {
    width: min(100%, 18rem);
}

.home-mobile-cta {
    display: none;
}

@media (max-width: 759px) {
    .landing-copy .landing-kicker,
    .landing-copy h1,
    .landing-copy .lede,
    .landing-copy .landing-actions {
        width: 100%;
        max-width: none;
    }

    .landing-copy .play-cta {
        width: 100%;
        max-width: none;
    }
}

.score-strip-timer-right {
    justify-content: flex-end;
    width: 100%;
    flex-wrap: nowrap;
}

.score-strip-timer-right .score-chip-timer {
    margin-left: auto;
}

.session-hud .response-timer {
    flex: none;
}

@media (max-width: 759px) {
    .account-chip {
        display: none;
    }

    .account-mobile-link {
        display: inline-flex;
    }

    .dashboard-main-immersive {
        min-height: calc(100dvh - 4.6rem);
        align-content: end;
    }

    .landing-stage {
        min-height: 100%;
        align-content: end;
    }

    .landing-copy {
        min-height: 35vh;
    }

    .score-strip-timer-right {
        justify-content: flex-start;
    }

    .score-strip-timer-right .score-chip-timer {
        margin-left: auto;
    }

    .session-hud {
        width: 100%;
    }

    .session-hud .response-timer {
        margin-left: auto;
    }
}

/* ── Dashboard mobile final pass ────────────────────────── */

.level-card {
    display: grid;
    gap: 0.72rem;
}

/* ── Catalog final polish ───────────────────────────────── */

.dashboard-body-catalog .catalog-main {
    width: 100%;
    max-width: 1680px;
    gap: 1rem;
}

.dashboard-body-catalog .catalog-hero {
    display: grid;
    gap: 1.05rem;
    padding: 1.18rem 1.22rem;
}

.dashboard-body-catalog .catalog-hero-copy,
.dashboard-body-catalog .catalog-hero-side {
    display: grid;
    gap: 0.42rem;
}

.dashboard-body-catalog .catalog-hero-copy {
    align-content: end;
}

.dashboard-body-catalog .catalog-hero-copy h1 {
    max-width: 6.4ch;
    font-size: clamp(3.15rem, 5vw, 5.05rem);
    line-height: 0.9;
}

.dashboard-body-catalog .catalog-hero-copy .lede {
    max-width: 40ch;
}

.dashboard-body-catalog .catalog-hero-side {
    align-content: end;
    align-self: stretch;
    padding: 1rem 1.02rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.dashboard-body-catalog .catalog-hero-side strong {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(2.7rem, 5vw, 4.1rem);
    line-height: 0.92;
    letter-spacing: -0.05em;
}

.dashboard-body-catalog .catalog-hero-side p {
    margin: 0;
    max-width: 20ch;
    color: rgba(244, 241, 234, 0.66);
    line-height: 1.4;
}

.dashboard-body-catalog .catalog-panel {
    padding: 1rem;
}

.dashboard-body-catalog .catalog-grid {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0.9rem;
}

.dashboard-body-catalog .catalog-card {
    display: grid;
    gap: 0.72rem;
    padding: 0.84rem;
    align-content: start;
}

.dashboard-body-catalog .catalog-flag-shell {
    min-height: 132px;
    padding: 0.55rem;
    border-radius: 21px;
}

.dashboard-body-catalog .catalog-flag-shell img {
    max-width: min(100%, 172px);
    max-height: 104px;
}

.dashboard-body-catalog .catalog-copy {
    gap: 0.3rem;
}

.dashboard-body-catalog .catalog-copy strong,
.dashboard-body-catalog .catalog-copy span {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
}

.dashboard-body-catalog .catalog-copy strong {
    -webkit-line-clamp: 2;
    line-clamp: 2;
    line-height: 1.15;
}

.dashboard-body-catalog .catalog-copy span {
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

@media (min-width: 760px) {
    .dashboard-body-catalog .catalog-main {
        margin-inline: auto;
    }

    .dashboard-body-catalog .catalog-hero {
        grid-template-columns: minmax(0, 1.18fr) minmax(250px, 0.42fr);
        align-items: stretch;
    }
}

@media (max-width: 759px) {
    .dashboard-body-catalog .catalog-main {
        gap: 0.78rem;
    }

    .dashboard-body-catalog .catalog-hero {
        gap: 0.88rem;
        padding: 0.92rem;
    }

    .dashboard-body-catalog .catalog-hero-copy h1 {
        max-width: 7ch;
        font-size: clamp(2.45rem, 12vw, 3.9rem);
    }

    .dashboard-body-catalog .catalog-hero-copy .lede {
        max-width: 30ch;
    }

    .dashboard-body-catalog .catalog-hero-side {
        padding: 0.88rem 0.92rem;
        border-radius: 22px;
    }

    .dashboard-body-catalog .catalog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.72rem;
    }

    .dashboard-body-catalog .catalog-card {
        padding: 0.72rem;
        gap: 0.62rem;
        border-radius: 24px;
    }

    .dashboard-body-catalog .catalog-flag-shell {
        min-height: 102px;
        padding: 0.46rem;
        border-radius: 18px;
    }

    .dashboard-body-catalog .catalog-flag-shell img {
        max-width: min(100%, 138px);
        max-height: 82px;
    }

    .dashboard-body-catalog .catalog-copy strong {
        font-size: 0.95rem;
    }

    .dashboard-body-catalog .catalog-copy span {
        font-size: 0.78rem;
        line-height: 1.25;
    }
}

/* ── Home dashboard compact mobile pass ─────────────────── */

@media (max-width: 759px) {
    .dashboard-body-home .dashboard-shell {
        min-height: 100dvh;
        gap: 0;
    }

    .dashboard-body-home .dashboard-topbar {
        margin-bottom: 0.56rem;
    }

    .dashboard-body-home .dashboard-main-immersive {
        min-height: calc(100dvh - 4.25rem);
        display: grid;
        align-content: stretch;
    }

    .dashboard-body-home .landing-stage {
        min-height: 100%;
        grid-template-rows: minmax(0, 0.92fr) minmax(0, 1.08fr);
        align-content: stretch;
        gap: 0.62rem;
    }

    .dashboard-body-home .landing-copy {
        order: 1;
        min-height: 0;
        height: 100%;
        padding: 0.88rem;
        gap: 0.74rem;
        align-content: space-between;
    }

    .dashboard-body-home .landing-kicker {
        font-size: 0.62rem;
        letter-spacing: 0.2em;
    }

    .dashboard-body-home .landing-copy h1 {
        max-width: 8.2ch;
        font-size: clamp(2.25rem, 10.6vw, 3.15rem);
        line-height: 0.88;
    }

    .dashboard-body-home .landing-copy .lede {
        max-width: 24ch;
        font-size: 0.8rem;
        line-height: 1.28;
        display: -webkit-box;
        overflow: hidden;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .dashboard-body-home .landing-actions {
        margin-top: auto;
    }

    .dashboard-body-home .play-cta {
        min-height: 0;
        padding: 0.82rem 0.92rem;
        border-radius: 18px;
    }

    .dashboard-body-home .play-cta-main {
        font-size: 1.2rem;
    }

    .dashboard-body-home .progress-panel {
        order: 2;
        align-content: start;
        padding: 0.82rem;
        gap: 0.54rem;
        grid-template-columns: 1fr;
        grid-template-areas:
            "hero"
            "mastered"
            "level";
    }

    .dashboard-body-home .progress-panel-body,
    .dashboard-body-home .quiet-stat,
    .dashboard-body-home .level-card {
        padding: 0.76rem;
        border-radius: 18px;
    }

    .dashboard-body-home .progress-panel-body {
        gap: 0.42rem;
    }

    .dashboard-body-home .section-label {
        font-size: 0.64rem;
        letter-spacing: 0.18em;
    }

    .dashboard-body-home .progress-hero-line {
        gap: 0.44rem;
        align-items: end;
    }

    .dashboard-body-home .progress-hero-value {
        font-size: 1.82rem;
    }

    .dashboard-body-home .progress-hero-note {
        max-width: 12ch;
        margin-left: auto;
        font-size: 0.68rem;
        line-height: 1.12;
        text-align: right;
    }

    .dashboard-body-home .progress-meter-immersive {
        height: 0.48rem;
    }

    .dashboard-body-home .quiet-stats {
        display: grid;
        grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
        gap: 0.54rem;
    }

    .dashboard-body-home .quiet-stat {
        height: 100%;
        gap: 0.18rem;
        padding-top: 0.76rem;
        border-top: 0;
    }

    .dashboard-body-home .quiet-stat strong {
        font-size: 1rem;
    }

    .dashboard-body-home .quiet-stat p {
        margin-top: 0;
        font-size: 0.68rem;
        line-height: 1.22;
        display: -webkit-box;
        overflow: hidden;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .dashboard-body-home .quiet-stat-mastery strong {
        font-size: 1.08rem;
    }

    .dashboard-body-home .quiet-stat-records {
        gap: 0.42rem;
    }

    .dashboard-body-home .quiet-stat-records p {
        display: none;
    }

    .dashboard-body-home .quiet-stat-inline {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.38rem;
    }

    .dashboard-body-home .quiet-stat-record {
        gap: 0.12rem;
        padding: 0.46rem 0.48rem;
        border-radius: 14px;
    }

    .dashboard-body-home .quiet-stat-record small {
        font-size: 0.5rem;
        letter-spacing: 0.08em;
    }

    .dashboard-body-home .quiet-stat-record strong {
        font-size: 0.82rem;
        line-height: 1.08;
    }

    .dashboard-body-home .progress-panel-head {
        gap: 0;
    }

    .dashboard-body-home .level-card {
        gap: 0.48rem;
    }

    .dashboard-body-home .level-rank-chip {
        padding: 0.24rem 0.46rem;
        font-size: 0.64rem;
    }

    .dashboard-body-home .level-card-body {
        gap: 0.46rem;
        align-items: end;
    }

    .dashboard-body-home .level-card-body strong {
        font-size: 1.56rem;
    }

    .dashboard-body-home .level-card-body p {
        font-size: 0.68rem;
        line-height: 1.18;
    }

    .dashboard-body-home .dashboard-subtle-link-metrics {
        display: none;
    }
}

.level-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
}

.level-rank-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.34rem 0.58rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.72rem;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.level-card-body {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: end;
    gap: 0.7rem;
}

.level-card-body strong {
    font-family: "Space Grotesk", sans-serif;
    font-size: 2.1rem;
    line-height: 0.88;
    letter-spacing: -0.05em;
}

.level-card-body p {
    margin: 0;
    color: rgba(255, 255, 255, 0.66);
    font-size: 0.82rem;
    line-height: 1.34;
}

@media (min-width: 760px) {
    .level-card {
        gap: 0.78rem;
    }

    .level-card-body strong {
        font-size: 2.4rem;
    }

    .level-card-body p {
        max-width: 18ch;
    }
}

@media (max-width: 759px) {
    .dashboard-main-immersive {
        min-height: calc(100dvh - 4.6rem);
        display: grid;
        align-content: stretch;
    }

    .landing-stage {
        min-height: 100%;
        grid-template-rows: auto minmax(0, 1fr);
        align-content: stretch;
        gap: 0.78rem;
    }

    .progress-panel {
        grid-template-columns: 1fr;
        grid-template-areas:
            "hero"
            "mastered"
            "level";
        gap: 0.68rem;
        padding: 0.92rem;
    }

    .progress-panel-body,
    .quiet-stat,
    .level-card {
        padding: 0.9rem;
        border-radius: 20px;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.08);
    }

    .progress-panel-body {
        gap: 0.52rem;
    }

    .progress-hero-line {
        align-items: end;
        gap: 0.55rem;
    }

    .progress-hero-note {
        max-width: none;
        margin-left: auto;
        text-align: right;
        font-size: 0.74rem;
        line-height: 1.16;
    }

    .progress-meter-immersive {
        height: 0.54rem;
    }

    .quiet-stats {
        grid-area: mastered;
        gap: 0;
    }

    .quiet-stat {
        gap: 0.2rem;
        padding-top: 0.9rem;
        border-top: 0;
    }

    .quiet-stat strong {
        font-size: 1.3rem;
    }

    .quiet-stat p {
        font-size: 0.74rem;
        line-height: 1.28;
        -webkit-line-clamp: 2;
    }

    .progress-panel-head {
        grid-area: level;
        min-width: 0;
    }

    .level-card {
        height: 100%;
        gap: 0.66rem;
        align-content: space-between;
    }

    .level-card-head .metric-label-icon {
        gap: 0.3rem;
    }

    .level-card-head .ui-icon {
        width: 0.82rem;
        height: 0.82rem;
    }

    .level-rank-chip {
        padding: 0.28rem 0.5rem;
        font-size: 0.68rem;
    }

    .level-card-body {
        gap: 0.56rem;
    }

    .level-card-body strong {
        font-size: 1.9rem;
    }

    .level-card-body p {
        font-size: 0.74rem;
        line-height: 1.24;
    }

    .landing-copy {
        min-height: 0;
        height: 100%;
        display: grid;
        align-content: space-between;
        gap: 0.95rem;
        padding: 1rem;
    }

    .landing-copy .landing-kicker,
    .landing-copy h1,
    .landing-copy .lede {
        align-self: start;
    }

    .landing-copy .landing-actions {
        align-self: end;
        margin-top: auto;
    }

    .landing-copy .lede {
        max-width: 24ch;
    }

    .auth-stage {
        min-height: calc(100dvh - 5rem);
        align-content: space-between;
        padding: 0.95rem;
        border-radius: 26px;
    }

    .auth-copy,
    .auth-panel {
        padding: 0;
        border-radius: 0;
    }

    .auth-copy {
        min-height: 0;
        align-content: start;
        gap: 0.85rem;
    }

    .auth-copy::before {
        top: 0;
        left: 0;
    }

    .auth-copy h1 {
        max-width: 8.8ch;
        font-size: clamp(2.2rem, 10vw, 3.4rem);
    }

    .auth-panel {
        align-self: end;
        max-width: none;
    }
}

@media (min-width: 760px) {
    .auth-stage {
        grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
        gap: 0;
        align-items: stretch;
        padding: 1.4rem;
    }

    .auth-copy {
        min-height: 100%;
        align-content: center;
        padding-right: 1.5rem;
    }

    .auth-panel {
        min-height: 100%;
        max-width: none;
        align-content: center;
        padding-left: 1.5rem;
        border-left: 1px solid rgba(255, 255, 255, 0.08);
    }
}

.dashboard-body-onboarding .dashboard-shell {
    min-height: 100dvh;
}

.onboarding-main {
    display: grid;
    min-height: calc(100dvh - 5rem);
}

.onboarding-shell {
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 1rem;
    min-height: 100%;
    padding: 0.9rem 0 1rem;
}

.onboarding-meta {
    display: grid;
    gap: 0.8rem;
}

.onboarding-progress-copy {
    display: grid;
    gap: 0.32rem;
}

.onboarding-progress-copy strong {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1rem;
    letter-spacing: -0.02em;
    color: rgba(255, 255, 255, 0.92);
}

.onboarding-progress-meter {
    width: 100%;
    height: 0.32rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.onboarding-progress-fill {
    width: 25%;
    height: 100%;
    border-radius: inherit;
    background: rgba(233, 231, 225, 0.94);
    transition: width 260ms ease;
}

.onboarding-stage {
    position: relative;
    overflow: hidden;
    min-height: 0;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.025);
}

.onboarding-track {
    --onboarding-step: 0;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 100%;
    min-height: 100%;
    transform: translateX(calc(var(--onboarding-step) * -100%));
    transition: transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.onboarding-panel {
    display: grid;
    grid-template-rows: auto auto;
    gap: 1.1rem;
    align-content: center;
    min-height: 100%;
    padding: 1.2rem;
}

.onboarding-copy {
    display: grid;
    gap: 0.75rem;
    align-content: start;
}

.onboarding-copy h1,
.onboarding-copy h2 {
    margin: 0;
    max-width: 12ch;
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(2.3rem, 11vw, 4.8rem);
    line-height: 0.95;
    letter-spacing: -0.05em;
    text-wrap: balance;
}

.onboarding-copy h2 {
    font-size: clamp(2rem, 8vw, 3.4rem);
    max-width: 13ch;
}

.onboarding-copy .lede {
    margin: 0;
    max-width: 36ch;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.55;
}

.onboarding-visual {
    display: grid;
    min-height: 18rem;
}

.onboarding-scene {
    position: relative;
    display: grid;
    align-content: center;
    gap: 0.85rem;
    min-height: 100%;
    padding: 1rem;
    border-radius: 28px;
    background:
        radial-gradient(
            circle at top left,
            rgba(255, 255, 255, 0.04),
            transparent 48%
        ),
        rgba(10, 14, 22, 0.64);
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.scene-flag-card {
    display: grid;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    border-radius: 22px;
    background: rgba(17, 21, 31, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
}

.scene-flag-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: contain;
}

.scene-flag-card span {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
}

.scene-learning {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
}

.scene-learning-points {
    display: grid;
    grid-column: 1 / -1;
    gap: 0.7rem;
}

.scene-learning-point {
    display: grid;
    gap: 0.28rem;
    padding: 0.9rem 1rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.scene-learning-point strong,
.scene-mode-card strong,
.scene-compare-card strong,
.scene-compare-note strong,
.scene-exam-card span,
.scene-tool-pill strong {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
    color: rgba(255, 255, 255, 0.94);
}

.scene-learning-point p,
.scene-mode-card p,
.scene-compare-card p,
.scene-compare-note p,
.scene-exam-card p,
.scene-tool-pill span {
    margin: 0;
    color: rgba(255, 255, 255, 0.64);
}

.scene-training,
.scene-exams,
.scene-tools {
    align-content: center;
}

.scene-training {
    grid-template-columns: 1fr;
}

.scene-compare {
    align-content: start;
}

.scene-compare-card,
.scene-compare-note {
    display: grid;
    gap: 0.7rem;
    padding: 0.95rem 1rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.scene-compare-head {
    display: grid;
    gap: 0.65rem;
}

.scene-compare-head img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: contain;
}

.scene-compare-rule {
    display: grid;
    gap: 0.22rem;
}

.scene-compare-rule span {
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.72rem;
}

.scene-mode-card,
.scene-exam-card,
.scene-tool-pill {
    display: grid;
    gap: 0.35rem;
    padding: 0.9rem 1rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.scene-mode-card span:first-child {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.scene-exams,
.scene-tools {
    grid-template-columns: 1fr;
}

.scene-exam-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
}

.scene-exam-tag {
    display: inline-flex;
    align-items: center;
    min-height: 1.7rem;
    padding: 0.18rem 0.58rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
}

.scene-tool-pill {
    grid-template-columns: 1fr;
}

.scene-adaptive,
.scene-confusions,
.scene-modes,
.scene-tools {
    align-content: center;
}

.scene-adaptive-stack,
.scene-mode-stack,
.scene-tool-stack,
.scene-confusion-tips {
    display: grid;
    gap: 0.7rem;
}

.scene-adaptive-row,
.scene-mode-card,
.scene-tool-pill,
.scene-confusion-tip {
    display: grid;
    align-items: center;
    gap: 0.7rem;
    padding: 0.8rem 0.9rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.scene-adaptive-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.scene-adaptive-flag {
    display: grid;
    place-items: center;
    width: 4rem;
    aspect-ratio: 4 / 3;
    padding: 0.2rem;
    border-radius: 14px;
    background: transparent;
    border: 1px solid transparent;
}

.scene-adaptive-flag img,
.scene-confusion-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.scene-adaptive-copy,
.scene-mode-copy,
.scene-tool-copy {
    display: grid;
    gap: 0.18rem;
}

.scene-adaptive-copy strong,
.scene-mode-copy strong,
.scene-tool-copy strong,
.scene-confusion-card strong {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1rem;
    letter-spacing: -0.02em;
    color: rgba(255, 255, 255, 0.94);
}

.scene-adaptive-copy p,
.scene-mode-copy p,
.scene-tool-copy span,
.scene-confusion-card p,
.scene-confusion-tip p {
    margin: 0;
    color: rgba(255, 255, 255, 0.66);
    line-height: 1.34;
}

.scene-status-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.8rem;
    padding: 0.18rem 0.68rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.76rem;
    white-space: nowrap;
}

.scene-status-chip-alert {
    background: rgba(255, 255, 255, 0.12);
}

.scene-status-chip-soft {
    color: rgba(255, 255, 255, 0.68);
}

.scene-confusions {
    gap: 0.8rem;
}

.scene-confusion-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
}

.scene-confusion-card {
    display: grid;
    gap: 0.55rem;
    padding: 0.8rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.scene-confusion-card img {
    aspect-ratio: 4 / 3;
}

.scene-confusion-tip {
    grid-template-columns: auto minmax(0, 1fr);
}

.scene-tip-index,
.scene-icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.88);
    flex: 0 0 auto;
}

.scene-icon-badge svg {
    width: 1rem;
    height: 1rem;
}

.scene-icon-badge svg,
.scene-icon-badge svg * {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.scene-mode-card,
.scene-tool-pill {
    grid-template-columns: auto minmax(0, 1fr);
}

.onboarding-controls {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.8rem;
    align-items: center;
}

.onboarding-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.onboarding-dot {
    width: 0.65rem;
    height: 0.65rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    cursor: pointer;
    transition:
        transform 180ms ease,
        background 180ms ease;
}

.onboarding-dot.is-active {
    background: rgba(233, 231, 225, 0.92);
    transform: scale(1.08);
}

.onboarding-cta {
    grid-column: 1 / -1;
}

.onboarding-complete-form {
    display: none;
}

.mobile-copy {
    display: none;
}

@media (max-width: 759px) {
    .dashboard-body-onboarding {
        overflow: hidden;
    }

    .dashboard-body-onboarding .dashboard-shell {
        min-height: 100dvh;
        height: 100dvh;
        overflow: hidden;
        padding-bottom: max(0.8rem, env(safe-area-inset-bottom));
    }

    .onboarding-main {
        min-height: calc(100dvh - 4.1rem);
        height: calc(100dvh - 4.1rem);
    }

    .onboarding-shell {
        grid-template-rows: auto minmax(0, 1fr) auto;
        gap: 0.35rem;
        min-height: 100%;
        padding: 0.1rem 0 0;
    }

    .onboarding-meta {
        gap: 0.28rem;
        padding-inline: 0.1rem;
    }

    .onboarding-meta .section-label {
        display: none;
    }

    .onboarding-progress-copy {
        gap: 0.1rem;
    }

    .onboarding-progress-copy strong {
        font-size: 0.82rem;
    }

    .onboarding-progress-meter {
        height: 0.24rem;
    }

    .onboarding-stage {
        min-height: 0;
        border-radius: 0;
        border-color: transparent;
        background: transparent;
    }

    .onboarding-track {
        height: 100%;
    }

    .onboarding-panel {
        min-height: 0;
        overflow: hidden;
        align-content: center;
        gap: 1.1rem;
        padding: 1rem 0.85rem;
        grid-template-rows: auto auto;
    }

    .onboarding-copy {
        gap: 0.4rem;
    }

    .onboarding-copy .kicker {
        font-size: 0.68rem;
        letter-spacing: 0.14em;
        opacity: 0.6;
    }

    .onboarding-copy h1,
    .onboarding-copy h2 {
        max-width: none;
        font-size: clamp(1.5rem, 7.2vw, 2.1rem);
        line-height: 1.04;
    }

    .onboarding-copy .lede {
        max-width: none;
        font-size: 0.82rem;
        line-height: 1.3;
        opacity: 0.72;
    }

    .onboarding-visual {
        min-height: 0;
    }

    .onboarding-scene {
        gap: 0.5rem;
        min-height: 0;
        padding: 0;
        border-radius: 0;
        background: transparent;
        border-color: transparent;
        overflow: visible;
    }

    .scene-learning {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.34rem;
    }

    .scene-learning .scene-flag-card {
        gap: 0.22rem;
        padding: 0.34rem;
        border-radius: 12px;
        box-shadow: none;
    }

    .scene-learning .scene-flag-card:nth-child(3) {
        display: none;
    }

    .scene-learning .scene-flag-card span {
        font-size: 0.62rem;
        line-height: 1.1;
    }

    .scene-learning-points {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.28rem;
    }

    .scene-learning-point {
        gap: 0.1rem;
        padding: 0.42rem 0.46rem;
        border-radius: 12px;
    }

    .scene-learning-point strong,
    .scene-mode-card strong,
    .scene-compare-card strong,
    .scene-compare-note strong,
    .scene-exam-card span,
    .scene-tool-pill strong {
        font-size: 0.72rem;
        line-height: 1.05;
    }

    .scene-learning-point p,
    .scene-mode-card p,
    .scene-compare-card p,
    .scene-compare-note p,
    .scene-exam-card p,
    .scene-tool-pill span {
        font-size: 0.64rem;
        line-height: 1.12;
    }

    .scene-compare {
        gap: 0.32rem;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-content: start;
    }

    .scene-compare-card,
    .scene-compare-note,
    .scene-mode-card,
    .scene-exam-card,
    .scene-tool-pill {
        gap: 0.38rem;
        padding: 0.48rem 0.52rem;
        border-radius: 12px;
    }

    .scene-compare-head {
        gap: 0.24rem;
    }

    .scene-compare-rule span,
    .scene-mode-card span:first-child {
        font-size: 0.54rem;
        letter-spacing: 0.08em;
    }

    .scene-exam-head {
        gap: 0.24rem;
    }

    .scene-exam-tag {
        display: none;
    }

    .onboarding-controls {
        grid-template-columns: auto 1fr auto;
        gap: 0.35rem;
        padding: 0.3rem 0 0;
    }

    .onboarding-controls::before {
        display: none;
    }

    .onboarding-controls > * {
        min-width: 0;
    }

    .onboarding-dots {
        gap: 0.45rem;
    }

    .onboarding-dot {
        width: 0.5rem;
        height: 0.5rem;
    }

    .onboarding-cta {
        grid-column: auto;
        min-height: 2.65rem;
        min-width: 0;
        border-radius: 16px;
        padding-inline: 1.1rem;
    }

    .onboarding-cta .play-cta-main {
        font-size: 0.88rem;
    }

    .onboarding-cta .play-cta-icon {
        width: 0.92rem;
        height: 0.92rem;
    }

    .desktop-copy {
        display: none !important;
    }

    .mobile-copy {
        display: block;
    }

    .scene-compare-note {
        display: none;
    }

    .scene-exams,
    .scene-tools,
    .scene-training {
        gap: 0.28rem;
        align-content: start;
    }

    .scene-exams,
    .scene-tools {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .scene-tools .scene-tool-pill {
        grid-template-columns: 1fr;
    }

    .scene-adaptive-stack {
        gap: 0.45rem;
    }

    .scene-adaptive-row {
        gap: 0.5rem;
        padding: 0.6rem 0.7rem;
        border-radius: 14px;
    }

    .scene-adaptive-flag {
        width: 2.8rem;
    }

    .scene-adaptive-copy strong {
        font-size: 0.82rem;
        line-height: 1.1;
    }

    .scene-adaptive-copy p {
        font-size: 0.66rem;
        line-height: 1.18;
    }

    .scene-status-chip {
        font-size: 0.62rem;
        min-height: 1.45rem;
        padding: 0.12rem 0.48rem;
    }

    .scene-icon-badge {
        width: 1.7rem;
        height: 1.7rem;
    }

    .scene-icon-badge svg {
        width: 0.88rem;
        height: 0.88rem;
    }

    .dashboard-body-onboarding .scene-exam-tag {
        display: inline-flex;
        font-size: 0.58rem;
        min-height: 1.25rem;
        padding: 0.08rem 0.38rem;
    }

    .dashboard-body-onboarding .scene-exams {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.45rem;
    }

    .dashboard-body-onboarding .scene-exam-card {
        padding: 0.6rem 0.65rem;
    }

    .dashboard-body-onboarding .scene-exam-head {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .dashboard-body-onboarding .dashboard-topbar {
        min-height: 3.35rem;
        padding-block: 0.02rem;
    }

    .dashboard-body-onboarding .brand-mark {
        font-size: 0.98rem;
    }

    .dashboard-body-onboarding .dashboard-subtle-link,
    .dashboard-body-onboarding .sound-toggle {
        min-height: 2.15rem;
    }
}

@media (max-width: 759px) and (max-height: 780px) {
    .onboarding-copy h1,
    .onboarding-copy h2 {
        font-size: clamp(1.3rem, 6.4vw, 1.82rem);
    }

    .onboarding-copy .lede {
        font-size: 0.76rem;
        line-height: 1.22;
    }

    .scene-learning .scene-flag-card span {
        font-size: 0.58rem;
    }

    .scene-learning-point strong,
    .scene-mode-card strong,
    .scene-compare-card strong,
    .scene-compare-note strong,
    .scene-exam-card span,
    .scene-tool-pill strong {
        font-size: 0.68rem;
    }

    .scene-learning-point p,
    .scene-mode-card p,
    .scene-compare-card p,
    .scene-compare-note p,
    .scene-exam-card p,
    .scene-tool-pill span {
        font-size: 0.6rem;
    }

    .onboarding-panel {
        gap: 0.7rem;
        padding: 0.6rem 0.7rem;
    }

    .onboarding-copy {
        gap: 0.3rem;
    }

    .scene-adaptive-stack {
        gap: 0.32rem;
    }

    .scene-adaptive-row {
        gap: 0.38rem;
        padding: 0.45rem 0.52rem;
    }

    .scene-adaptive-flag {
        width: 2.4rem;
    }

    .scene-adaptive-copy strong {
        font-size: 0.74rem;
    }

    .scene-adaptive-copy p {
        font-size: 0.58rem;
    }

    .scene-status-chip {
        font-size: 0.56rem;
        min-height: 1.25rem;
        padding: 0.08rem 0.38rem;
    }

    .scene-icon-badge {
        width: 1.5rem;
        height: 1.5rem;
    }

    .scene-icon-badge svg {
        width: 0.78rem;
        height: 0.78rem;
    }
}

@media (min-width: 760px) {
    .desktop-copy {
        display: block;
    }

    .onboarding-main {
        min-height: calc(100dvh - 5.3rem);
    }

    .onboarding-shell {
        padding: 0.7rem 0 1rem;
    }

    .onboarding-panel {
        grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.92fr);
        grid-template-rows: 1fr;
        gap: 1.2rem;
        padding: 1.25rem;
    }

    .onboarding-visual {
        min-height: 24rem;
    }

    .scene-learning {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-content: end;
        min-height: 22rem;
    }

    .scene-learning .scene-flag-card {
        position: absolute;
        width: clamp(9rem, 28vw, 12.5rem);
    }

    .scene-learning .scene-flag-card:nth-child(1) {
        top: 1.25rem;
        left: 1.1rem;
        transform: rotate(-4deg);
    }

    .scene-learning .scene-flag-card:nth-child(2) {
        top: 3.6rem;
        right: 1.5rem;
        transform: rotate(3deg);
    }

    .scene-learning .scene-flag-card:nth-child(3) {
        bottom: 5.1rem;
        left: 32%;
        transform: rotate(-2deg);
    }

    .scene-learning-points {
        position: relative;
        z-index: 1;
        width: min(100%, 21rem);
        gap: 0.5rem;
    }

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

    .scene-compare-note {
        grid-column: 1 / -1;
    }

    .scene-training {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: stretch;
    }

    .scene-exams,
    .scene-tools {
        align-content: center;
    }

    .onboarding-controls {
        grid-template-columns: auto 1fr auto;
    }

    .onboarding-cta {
        grid-column: auto;
        min-width: 14.5rem;
    }

    .mobile-copy {
        display: none !important;
    }
}

@media (max-width: 759px) {
    .dashboard-body-home .dashboard-main-immersive {
        min-height: calc(100svh - 5.2rem - env(safe-area-inset-bottom, 0px));
        padding-bottom: 0;
        display: grid;
        grid-template-rows: minmax(0, 1fr) auto;
        gap: 0.72rem;
        align-content: stretch;
    }

    .dashboard-body-home .landing-stage {
        min-height: 0;
        height: 100%;
        grid-template-rows: auto minmax(0, 1fr);
        align-content: stretch;
        gap: 0.72rem;
    }

    .dashboard-body-home .landing-copy {
        order: 1;
        min-height: 0;
        height: auto;
        padding: 0.96rem 1rem 1rem;
        gap: 0.64rem;
        align-content: start;
        align-items: start;
        justify-items: start;
        text-align: left;
    }

    .dashboard-body-home .landing-copy > * {
        width: 100%;
        justify-self: start;
        margin-left: 0;
        text-align: left;
    }

    .dashboard-body-home .landing-kicker {
        font-size: 0.62rem;
        letter-spacing: 0.18em;
    }

    .dashboard-body-home .landing-copy h1 {
        width: 100%;
        max-width: none;
        font-size: clamp(2.55rem, 10.2vw, 3.35rem);
        line-height: 0.92;
        letter-spacing: -0.05em;
        text-wrap: balance;
    }

    .dashboard-body-home .landing-copy .lede {
        width: 100%;
        max-width: none;
        font-size: 0.9rem;
        line-height: 1.3;
        display: -webkit-box;
        overflow: hidden;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .dashboard-body-home .landing-actions {
        display: none;
    }

    .dashboard-body-home .progress-panel {
        order: 2;
        height: 100%;
        min-height: 0;
        padding: 0.88rem;
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr) auto;
        grid-template-areas:
            "hero"
            "stats"
            "level";
        gap: 0.72rem;
        align-content: stretch;
    }

    .dashboard-body-home .panel-separator,
    .dashboard-body-home .dashboard-subtle-link-metrics {
        display: none;
    }

    .dashboard-body-home .progress-panel-body {
        grid-area: hero;
        padding: 0.86rem;
        gap: 0.46rem;
        border-radius: 20px;
        justify-items: start;
        text-align: left;
    }

    .dashboard-body-home .progress-hero-line {
        display: grid;
        gap: 0.16rem;
        justify-items: start;
        align-items: start;
    }

    .dashboard-body-home .progress-hero-value {
        font-size: 2rem;
    }

    .dashboard-body-home .progress-hero-note {
        margin-left: 0;
        max-width: none;
        text-align: left;
        font-size: 0.78rem;
        line-height: 1.2;
    }

    .dashboard-body-home .progress-meter,
    .dashboard-body-home .progress-meter-immersive {
        width: 100%;
    }

    .dashboard-body-home .quiet-stats {
        grid-area: stats;
        min-height: 0;
        display: grid;
        grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
        grid-auto-rows: 1fr;
        gap: 0.72rem;
        align-content: stretch;
    }

    .dashboard-body-home .quiet-stat {
        min-height: 0;
        height: 100%;
        padding: 0.86rem;
        gap: 0.36rem;
        border-top: 0;
        border-radius: 20px;
        justify-items: start;
        align-content: stretch;
        text-align: left;
        position: relative;
        overflow: hidden;
        isolation: isolate;
    }

    .dashboard-body-home .quiet-stat strong {
        font-size: 1.12rem;
    }

    .dashboard-body-home .quiet-stat p {
        font-size: 0.74rem;
        line-height: 1.3;
        display: -webkit-box;
        overflow: hidden;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .dashboard-body-home .quiet-stat::before {
        content: "";
        position: absolute;
        left: -1.8rem;
        bottom: -2.2rem;
        width: 6.8rem;
        height: 6.8rem;
        border-radius: 999px;
        background: radial-gradient(
            circle,
            rgba(255, 255, 255, 0.08) 0%,
            rgba(255, 255, 255, 0.02) 42%,
            transparent 72%
        );
        pointer-events: none;
        z-index: 0;
    }

    .dashboard-body-home .quiet-stat > * {
        position: relative;
        z-index: 1;
    }

    .dashboard-body-home .quiet-stat-mastery {
        grid-template-rows: auto 1fr auto;
    }

    .dashboard-body-home .quiet-stat .metric-label.metric-label-icon {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        column-gap: 0.4rem;
    }

    .dashboard-body-home .quiet-stat .metric-label {
        width: 100%;
        min-height: 2.75rem;
        align-items: start;
        align-content: start;
    }

    .dashboard-body-home .quiet-stat .metric-label .ui-icon {
        margin-top: 0.08rem;
    }

    .dashboard-body-home .quiet-stat .metric-label > span:last-child {
        display: inline-block;
        max-width: 7.3rem;
        line-height: 1.08;
    }

    .dashboard-body-home .quiet-stat-mastery strong {
        align-self: center;
        font-size: clamp(1.88rem, 6.8vw, 2.28rem);
        line-height: 0.94;
    }

    .dashboard-body-home .quiet-stat-mastery strong small {
        font-size: 0.46em;
    }

    .dashboard-body-home .quiet-stat-mastery p {
        margin-top: auto;
        max-width: 12ch;
        font-size: 0.82rem;
        line-height: 1.28;
        -webkit-line-clamp: 3;
    }

    .dashboard-body-home .quiet-stat-records {
        grid-template-rows: auto minmax(0, 1fr) auto;
        gap: 0.58rem;
    }

    .dashboard-body-home .quiet-stat-inline {
        grid-template-columns: 1fr;
        gap: 0.46rem;
        justify-items: stretch;
        align-content: start;
    }

    .dashboard-body-home #dashboard-records-card .quiet-stat-carousel-track {
        gap: 0.66rem;
    }

    .dashboard-body-home #dashboard-records-card .quiet-stat-record {
        min-height: 7.7rem;
        display: grid;
        grid-template-rows: auto minmax(0, 1fr);
        align-content: space-between;
        gap: 0.86rem;
        padding: 0.9rem 0.92rem 0.98rem;
        border-radius: 18px;
        text-align: left;
        background: rgba(255, 255, 255, 0.045);
        border: 1px solid rgba(255, 255, 255, 0.08);
    }

    .dashboard-body-home #dashboard-records-card .quiet-stat-record small {
        min-width: 0;
        max-width: none;
        font-size: 0.66rem;
        letter-spacing: 0.12em;
        line-height: 1.18;
    }

    .dashboard-body-home #dashboard-records-card .quiet-stat-record strong {
        display: inline-flex;
        justify-content: flex-start;
        align-items: end;
        font-size: clamp(1.18rem, 5.2vw, 1.5rem);
        line-height: 0.94;
        text-align: left;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .dashboard-body-home #dashboard-records-card .quiet-stat-record.is-pending strong {
        color: rgba(244, 241, 234, 0.72);
    }

    .dashboard-body-home #dashboard-records-card .quiet-stat-record-link {
        min-height: 1.98rem;
        padding-inline: 0.74rem;
        font-size: 0.74rem;
    }

    .dashboard-body-home #dashboard-records-card .quiet-stat-records-nav {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.34rem;
    }

    .dashboard-body-home #dashboard-records-card .quiet-stat-records-dot {
        appearance: none;
        width: 0.46rem;
        height: 0.46rem;
        padding: 0;
        border: 0;
        border-radius: 999px;
        background: rgba(244, 241, 234, 0.2);
        transition:
            width 180ms ease,
            background-color 180ms ease,
            transform 180ms ease;
    }

    .dashboard-body-home #dashboard-records-card .quiet-stat-records-dot.is-active {
        width: 1.18rem;
        background: rgba(244, 241, 234, 0.78);
    }

    .dashboard-body-home #dashboard-records-card .quiet-stat-records-dot:focus-visible {
        outline: 2px solid rgba(244, 241, 234, 0.54);
        outline-offset: 2px;
    }

    .dashboard-body-home #dashboard-records-card .quiet-stat-records-dot:active {
        transform: scale(0.94);
    }

    .dashboard-body-home .progress-panel-head {
        grid-area: level;
        display: block;
        min-width: 0;
    }

    .dashboard-body-home .level-card {
        height: auto;
        padding: 0.84rem;
        gap: 0.58rem;
        border-radius: 20px;
        justify-items: start;
        text-align: left;
    }

    .dashboard-body-home .level-card-head {
        gap: 0.54rem;
    }

    .dashboard-body-home .level-card-body {
        gap: 0.56rem;
    }

    .dashboard-body-home .level-card-body strong {
        font-size: 1.62rem;
    }

    .dashboard-body-home .level-card-body p {
        font-size: 0.74rem;
        line-height: 1.24;
    }

    .dashboard-body-home .home-mobile-cta {
        display: block;
        position: static;
        align-self: end;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    .dashboard-body-home .home-mobile-cta .play-cta {
        width: 100%;
        max-width: none;
        min-height: 4.92rem;
        padding: 1rem 1.12rem;
        border-radius: 26px;
    }

    .dashboard-body-home .home-mobile-cta .play-cta-main {
        font-size: 1.34rem;
    }
}

@media (max-width: 759px) and (max-height: 860px) {
    .dashboard-body-home .dashboard-main-immersive {
        min-height: calc(100svh - 5.45rem - env(safe-area-inset-bottom, 0px));
        gap: 0.64rem;
    }

    .dashboard-body-home .landing-stage,
    .dashboard-body-home .progress-panel,
    .dashboard-body-home .quiet-stats {
        gap: 0.64rem;
    }

    .dashboard-body-home .landing-copy {
        padding: 0.9rem 0.96rem 0.96rem;
        gap: 0.56rem;
    }

    .dashboard-body-home .landing-copy h1 {
        font-size: clamp(2.36rem, 9.3vw, 3.02rem);
    }

    .dashboard-body-home .landing-copy .lede {
        font-size: 0.86rem;
    }

    .dashboard-body-home .progress-panel,
    .dashboard-body-home .progress-panel-body,
    .dashboard-body-home .quiet-stat,
    .dashboard-body-home .level-card {
        padding: 0.8rem;
    }

    .dashboard-body-home .quiet-stat-mastery strong {
        font-size: clamp(1.72rem, 6.1vw, 2.04rem);
    }

    .dashboard-body-home .quiet-stat .metric-label {
        min-height: 2.52rem;
    }

    .dashboard-body-home .quiet-stat .metric-label > span:last-child {
        max-width: 6.8rem;
    }

    .dashboard-body-home #dashboard-records-card .quiet-stat-record {
        min-height: 7.05rem;
        gap: 0.78rem;
        padding: 0.82rem 0.86rem 0.9rem;
    }

    .dashboard-body-home #dashboard-records-card .quiet-stat-record small {
        font-size: 0.62rem;
    }

    .dashboard-body-home #dashboard-records-card .quiet-stat-record strong {
        font-size: clamp(1.08rem, 4.8vw, 1.34rem);
    }

    .dashboard-body-home #dashboard-records-card .quiet-stat-record-link {
        min-height: 1.9rem;
        font-size: 0.72rem;
    }

    .dashboard-body-home .level-card-body strong {
        font-size: 1.5rem;
    }

    .dashboard-body-home .level-card-body p {
        font-size: 0.72rem;
    }

    .dashboard-body-home #dashboard-records-card .quiet-stat-records-dot.is-active {
        width: 1.02rem;
    }

    .dashboard-body-home .home-mobile-cta .play-cta {
        min-height: 4.72rem;
        padding: 0.94rem 1.08rem;
    }

    .dashboard-body-home .home-mobile-cta .play-cta-main {
        font-size: 1.28rem;
    }
}

/* ── Mobile browser chrome safety pass ──────────────────── */

@media (max-width: 759px) {
    .dashboard-body .dashboard-shell,
    .dashboard-body-home .dashboard-shell,
    .dashboard-body-onboarding .dashboard-shell,
    .auth-shell,
    .error-shell {
        min-height: var(--app-visible-height, 100svh);
    }

    .dashboard-body-onboarding .dashboard-shell {
        height: var(--app-visible-height, 100svh);
    }

    .dashboard-body .dashboard-main-immersive {
        min-height: calc(var(--app-visible-height, 100svh) - 4.6rem);
    }

    .dashboard-body-home .dashboard-main-immersive {
        min-height: calc(var(--app-visible-height, 100svh) - 5.2rem - env(safe-area-inset-bottom, 0px));
        height: calc(var(--app-visible-height, 100svh) - 5.2rem - env(safe-area-inset-bottom, 0px));
    }

    .dashboard-body-account .account-main,
    .dashboard-body-admin .admin-main {
        min-height: calc(var(--app-visible-height, 100svh) - 4.9rem);
    }

    .auth-main,
    .error-main {
        min-height: calc(var(--app-visible-height, 100svh) - 4.8rem);
    }

    .auth-stage {
        min-height: calc(var(--app-visible-height, 100svh) - 5rem);
    }

    .onboarding-main {
        min-height: calc(var(--app-visible-height, 100svh) - 4.1rem);
        height: calc(var(--app-visible-height, 100svh) - 4.1rem);
    }
}

@media (max-width: 759px) and (max-height: 860px) {
    .dashboard-body-home .dashboard-main-immersive {
        min-height: calc(var(--app-visible-height, 100svh) - 5.45rem - env(safe-area-inset-bottom, 0px));
        height: calc(var(--app-visible-height, 100svh) - 5.45rem - env(safe-area-inset-bottom, 0px));
    }
}

@media (max-width: 759px) {
    :root.viewport-short .dashboard-body-home .dashboard-shell {
        padding-top: max(0.66rem, env(safe-area-inset-top));
        padding-bottom: 0.28rem;
    }

    :root.viewport-short .dashboard-body-home .dashboard-topbar {
        margin-bottom: 0.46rem;
    }

    :root.viewport-short .dashboard-body-home .dashboard-main-immersive,
    :root.viewport-short .dashboard-body-home .landing-stage {
        gap: 0.56rem;
    }

    :root.viewport-short .dashboard-body-home .landing-copy {
        padding: 0.78rem 0.84rem 0.82rem;
        gap: 0.46rem;
    }

    :root.viewport-short .dashboard-body-home .landing-copy h1 {
        font-size: clamp(2.02rem, 8.9vw, 2.66rem);
    }

    :root.viewport-short .dashboard-body-home .landing-copy .lede {
        font-size: 0.78rem;
        line-height: 1.22;
    }

    :root.viewport-short .dashboard-body-home .progress-panel {
        padding: 0.78rem;
        gap: 0.56rem;
    }

    :root.viewport-short .dashboard-body-home .progress-panel-body,
    :root.viewport-short .dashboard-body-home .quiet-stat,
    :root.viewport-short .dashboard-body-home .level-card {
        padding: 0.72rem;
    }

    :root.viewport-short .dashboard-body-home .progress-panel-body {
        gap: 0.38rem;
    }

    :root.viewport-short .dashboard-body-home .progress-hero-value {
        font-size: 1.72rem;
    }

    :root.viewport-short .dashboard-body-home .progress-hero-note,
    :root.viewport-short .dashboard-body-home .level-card-body p,
    :root.viewport-short .dashboard-body-home .quiet-stat p {
        font-size: 0.7rem;
        line-height: 1.2;
    }

    :root.viewport-short .dashboard-body-home .quiet-stats {
        gap: 0.56rem;
    }

    :root.viewport-short .dashboard-body-home .quiet-stat .metric-label {
        min-height: 2.28rem;
    }

    :root.viewport-short .dashboard-body-home .quiet-stat .metric-label > span:last-child {
        max-width: 6.4rem;
    }

    :root.viewport-short .dashboard-body-home .quiet-stat-mastery strong {
        font-size: clamp(1.56rem, 5.7vw, 1.94rem);
    }

    :root.viewport-short .dashboard-body-home .quiet-stat-mastery p {
        -webkit-line-clamp: 2;
    }

    :root.viewport-short .dashboard-body-home #dashboard-records-card .quiet-stat-record {
        min-height: 6.3rem;
        gap: 0.62rem;
        padding: 0.72rem 0.78rem 0.8rem;
    }

    :root.viewport-short .dashboard-body-home #dashboard-records-card .quiet-stat-record small {
        font-size: 0.58rem;
    }

    :root.viewport-short .dashboard-body-home #dashboard-records-card .quiet-stat-record strong {
        font-size: clamp(0.96rem, 4.3vw, 1.16rem);
    }

    :root.viewport-short .dashboard-body-home #dashboard-records-card .quiet-stat-record-link {
        min-height: 1.82rem;
        font-size: 0.7rem;
    }

    :root.viewport-short .dashboard-body-home .level-card {
        gap: 0.48rem;
    }

    :root.viewport-short .dashboard-body-home .level-rank-chip {
        padding: 0.22rem 0.44rem;
        font-size: 0.62rem;
    }

    :root.viewport-short .dashboard-body-home .level-card-body strong {
        font-size: 1.34rem;
    }

    :root.viewport-short .dashboard-body-home .home-mobile-cta .play-cta {
        min-height: 4.28rem;
        padding: 0.82rem 1rem;
        border-radius: 24px;
    }

    :root.viewport-short .dashboard-body-home .home-mobile-cta {
        padding-bottom: 0;
    }

    :root.viewport-short .dashboard-body-home .home-mobile-cta .play-cta-main {
        font-size: 1.16rem;
    }

    :root.viewport-short .auth-shell,
    :root.viewport-short .error-shell {
        padding-top: max(0.66rem, env(safe-area-inset-top));
        padding-bottom: max(0.72rem, env(safe-area-inset-bottom));
    }

    :root.viewport-short .auth-topbar {
        margin-bottom: 0.72rem;
    }

    :root.viewport-short .auth-stage {
        padding: 0.82rem;
        gap: 0.9rem;
        min-height: calc(var(--app-visible-height, 100svh) - 4.7rem);
    }

    :root.viewport-short .auth-copy {
        gap: 0.72rem;
    }

    :root.viewport-short .auth-copy h1,
    :root.viewport-short .error-copy h1 {
        font-size: clamp(1.96rem, 8.8vw, 2.88rem);
    }

    :root.viewport-short .auth-copy .lede,
    :root.viewport-short .error-copy .lede,
    :root.viewport-short .auth-copy-note,
    :root.viewport-short .error-copy-note {
        font-size: 0.9rem;
        line-height: 1.34;
    }

    :root.viewport-short .auth-field input {
        min-height: 3.15rem;
        padding-block: 0.76rem;
    }

    :root.viewport-short .auth-submit,
    :root.viewport-short .error-action {
        min-height: 3.3rem;
    }

    :root.viewport-tight .dashboard-body-home .dashboard-shell {
        padding-inline: 0.72rem;
        padding-top: max(0.58rem, env(safe-area-inset-top));
        padding-bottom: 0.18rem;
    }

    :root.viewport-tight .dashboard-body-home .dashboard-main-immersive,
    :root.viewport-tight .dashboard-body-home .landing-stage {
        gap: 0.48rem;
    }

    :root.viewport-tight .dashboard-body-home .landing-copy {
        padding: 0.7rem 0.76rem 0.74rem;
        gap: 0.4rem;
    }

    :root.viewport-tight .dashboard-body-home .landing-copy h1 {
        font-size: clamp(1.86rem, 8.1vw, 2.34rem);
        line-height: 0.9;
    }

    :root.viewport-tight .dashboard-body-home .landing-copy .lede {
        font-size: 0.74rem;
    }

    :root.viewport-tight .dashboard-body-home .progress-panel {
        padding: 0.72rem;
        gap: 0.48rem;
    }

    :root.viewport-tight .dashboard-body-home .progress-panel-body,
    :root.viewport-tight .dashboard-body-home .quiet-stat,
    :root.viewport-tight .dashboard-body-home .level-card {
        padding: 0.66rem;
    }

    :root.viewport-tight .dashboard-body-home .progress-hero-value {
        font-size: 1.58rem;
    }

    :root.viewport-tight .dashboard-body-home .quiet-stat .metric-label {
        min-height: 2.12rem;
    }

    :root.viewport-tight .dashboard-body-home .quiet-stat strong {
        font-size: 1rem;
    }

    :root.viewport-tight .dashboard-body-home .quiet-stat .metric-label > span:last-child {
        max-width: 5.8rem;
    }

    :root.viewport-tight .dashboard-body-home #dashboard-records-card .quiet-stat-record {
        min-height: 5.9rem;
        gap: 0.54rem;
        padding: 0.68rem 0.72rem 0.74rem;
    }

    :root.viewport-tight .dashboard-body-home #dashboard-records-card .quiet-stat-record strong {
        font-size: clamp(0.9rem, 4.05vw, 1.08rem);
    }

    :root.viewport-tight .dashboard-body-home .level-card-body strong {
        font-size: 1.24rem;
    }

    :root.viewport-tight .dashboard-body-home .home-mobile-cta .play-cta {
        min-height: 4.02rem;
        padding: 0.76rem 0.94rem;
        border-radius: 22px;
    }

    :root.viewport-tight .dashboard-body-home .home-mobile-cta {
        padding-bottom: 0;
    }

    :root.viewport-tight .dashboard-body-home .home-mobile-cta .play-cta-main {
        font-size: 1.08rem;
    }

    :root.viewport-tight .auth-stage {
        padding: 0.74rem;
        gap: 0.82rem;
        min-height: calc(var(--app-visible-height, 100svh) - 4.55rem);
    }

    :root.viewport-tight .auth-copy h1,
    :root.viewport-tight .error-copy h1 {
        font-size: clamp(1.78rem, 8vw, 2.48rem);
    }

    :root.viewport-tight .auth-field input {
        min-height: 3rem;
    }

    :root.viewport-tight .auth-submit,
    :root.viewport-tight .error-action {
        min-height: 3.15rem;
    }
}

@media (max-width: 759px) {
    .dashboard-body-home .dashboard-shell {
        padding-bottom: 0;
    }

    .dashboard-body-account .dashboard-shell,
    .dashboard-body-admin .dashboard-shell {
        padding-bottom: 0;
    }

    .dashboard-body-home .dashboard-main-immersive {
        min-height: 0;
        height: auto;
    }

    .dashboard-body-home .home-mobile-cta {
        padding-bottom: 0;
        margin-bottom: 0;
    }
}

/* ── Theme toggle + light mode ──────────────────────────── */

:root {
    --theme-app-text: #f4f1ea;
    --theme-text-soft: rgba(255, 255, 255, 0.78);
    --theme-text-muted: rgba(255, 255, 255, 0.64);
    --theme-text-faint: rgba(255, 255, 255, 0.58);
    --theme-text-subtle: rgba(255, 255, 255, 0.48);
    --theme-control-bg: rgba(255, 255, 255, 0.03);
    --theme-control-bg-hover: rgba(255, 255, 255, 0.05);
    --theme-control-border: rgba(255, 255, 255, 0.08);
    --theme-control-border-strong: rgba(255, 255, 255, 0.14);
    --theme-control-text: rgba(255, 255, 255, 0.78);
    --theme-chip-bg: rgba(255, 255, 255, 0.05);
    --theme-chip-border: rgba(255, 255, 255, 0.1);
    --theme-chip-text: rgba(255, 255, 255, 0.86);
    --theme-surface: rgba(255, 255, 255, 0.02);
    --theme-surface-strong: rgba(255, 255, 255, 0.035);
    --theme-surface-border: rgba(255, 255, 255, 0.08);
    --theme-surface-border-strong: rgba(255, 255, 255, 0.12);
    --theme-surface-shadow: none;
    --theme-meter-track: rgba(255, 255, 255, 0.05);
    --theme-meter-border: rgba(255, 255, 255, 0.06);
    --theme-meter-fill: #d6ddcb;
    --theme-input-bg: rgba(255, 255, 255, 0.03);
    --theme-input-bg-focus: rgba(255, 255, 255, 0.045);
    --theme-input-border: rgba(255, 255, 255, 0.07);
    --theme-input-border-focus: rgba(255, 255, 255, 0.16);
    --theme-input-placeholder: rgba(255, 255, 255, 0.45);
    --theme-focus-outline: rgba(244, 241, 234, 0.88);
    --theme-focus-ring: rgba(103, 184, 255, 0.16);
    --theme-cta-bg: #f0ece3;
    --theme-cta-bg-hover: #f6f2ea;
    --theme-cta-text: #0a0c0f;
    --theme-cta-meta: rgba(10, 12, 15, 0.62);
    --theme-overlay: rgba(5, 10, 19, 0.84);
    --theme-error-bg: rgba(255, 255, 255, 0.05);
    --theme-error-border: rgba(255, 255, 255, 0.1);
    --theme-error-text: rgba(255, 255, 255, 0.82);
    --theme-flag-shadow:
        drop-shadow(0 9px 14px rgba(2, 8, 18, 0.16))
        drop-shadow(0 18px 28px rgba(2, 8, 18, 0.26));
}

html[data-theme="light"] {
    --theme-app-text: #0a0c0f;
    --theme-text-soft: rgba(10, 12, 15, 0.88);
    --theme-text-muted: rgba(10, 12, 15, 0.74);
    --theme-text-faint: rgba(10, 12, 15, 0.62);
    --theme-text-subtle: rgba(10, 12, 15, 0.5);
    --theme-control-bg: rgba(10, 12, 15, 0.045);
    --theme-control-bg-hover: rgba(10, 12, 15, 0.075);
    --theme-control-border: rgba(10, 12, 15, 0.1);
    --theme-control-border-strong: rgba(10, 12, 15, 0.16);
    --theme-control-text: rgba(10, 12, 15, 0.84);
    --theme-chip-bg: rgba(10, 12, 15, 0.06);
    --theme-chip-border: rgba(10, 12, 15, 0.12);
    --theme-chip-text: rgba(10, 12, 15, 0.9);
    --theme-surface: rgba(255, 255, 255, 0.82);
    --theme-surface-strong: rgba(10, 12, 15, 0.045);
    --theme-surface-border: rgba(10, 12, 15, 0.1);
    --theme-surface-border-strong: rgba(10, 12, 15, 0.16);
    --theme-surface-shadow: 0 18px 42px rgba(10, 12, 15, 0.06);
    --theme-meter-track: rgba(10, 12, 15, 0.08);
    --theme-meter-border: rgba(10, 12, 15, 0.1);
    --theme-meter-fill: #0a0c0f;
    --theme-input-bg: rgba(255, 255, 255, 0.92);
    --theme-input-bg-focus: rgba(255, 255, 255, 0.98);
    --theme-input-border: rgba(10, 12, 15, 0.12);
    --theme-input-border-focus: rgba(10, 12, 15, 0.22);
    --theme-input-placeholder: rgba(10, 12, 15, 0.5);
    --theme-focus-outline: rgba(10, 12, 15, 0.72);
    --theme-focus-ring: rgba(10, 12, 15, 0.12);
    --theme-cta-bg: #0a0c0f;
    --theme-cta-bg-hover: #171b21;
    --theme-cta-text: #f4f1ea;
    --theme-cta-meta: rgba(244, 241, 234, 0.7);
    --theme-overlay: rgba(10, 12, 15, 0.16);
    --theme-error-bg: rgba(10, 12, 15, 0.06);
    --theme-error-border: rgba(10, 12, 15, 0.14);
    --theme-error-text: rgba(10, 12, 15, 0.86);
    --theme-flag-shadow:
        drop-shadow(0 10px 18px rgba(10, 12, 15, 0.08))
        drop-shadow(0 20px 28px rgba(10, 12, 15, 0.12));
}

.theme-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    padding: 0;
    border-radius: 999px;
    border: 1px solid var(--theme-control-border);
    background: var(--theme-control-bg);
    color: var(--theme-control-text);
    cursor: pointer;
    transition:
        background 160ms ease,
        border-color 160ms ease,
        color 160ms ease;
}

.theme-toggle:hover {
    background: var(--theme-control-bg-hover);
    border-color: var(--theme-control-border-strong);
}

.theme-toggle[aria-pressed="true"] {
    background: var(--theme-control-bg-hover);
    border-color: var(--theme-control-border-strong);
}

.theme-toggle:focus-visible {
    outline: 2px solid var(--theme-focus-outline);
    outline-offset: 2px;
}

.theme-toggle-icon {
    position: absolute;
    width: 1.02rem;
    height: 1.02rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition:
        opacity 180ms ease,
        transform 180ms ease;
}

.theme-toggle-icon-dark {
    opacity: 0;
    transform: scale(0.82) rotate(-10deg);
}

.theme-toggle[data-theme="light"] .theme-toggle-icon-light {
    opacity: 0;
    transform: scale(0.82) rotate(10deg);
}

.theme-toggle[data-theme="light"] .theme-toggle-icon-dark {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

@media (max-width: 759px) {
    .theme-toggle {
        width: 1.9rem;
        height: 1.9rem;
    }

    .theme-toggle-icon {
        width: 0.95rem;
        height: 0.95rem;
    }
}

html[data-theme="light"] .dashboard-body,
html[data-theme="light"] .play-body {
    color: var(--theme-app-text);
    --dashboard-panel: #fcfaf6;
    --dashboard-panel-soft: #ffffff;
    --dashboard-line: rgba(10, 12, 15, 0.08);
    --dashboard-line-strong: rgba(10, 12, 15, 0.14);
    --dashboard-signal: #0a0c0f;
    --play-panel: #fcfaf6;
    --play-panel-soft: #ffffff;
    --play-line: rgba(10, 12, 15, 0.08);
    --play-line-strong: rgba(10, 12, 15, 0.14);
    --play-warm: #48423d;
    --play-warm-soft: #79716b;
    --play-cool: #0a0c0f;
    --play-cool-soft: #545b64;
    --play-signal: #0a0c0f;
}

html[data-theme="light"] .dashboard-body::before,
html[data-theme="light"] .play-body::before {
    background:
        radial-gradient(
            circle at 50% 18%,
            rgba(10, 12, 15, 0.055),
            transparent 28%
        ),
        linear-gradient(180deg, #f7f4ed 0%, #ebe7de 100%);
}

html[data-theme="light"] .dashboard-body::after,
html[data-theme="light"] .play-body::after {
    opacity: 0.05;
    background-image:
        linear-gradient(rgba(10, 12, 15, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(10, 12, 15, 0.05) 1px, transparent 1px);
}

html[data-theme="light"] .dashboard-subtle-link,
html[data-theme="light"] .catalog-back-link,
html[data-theme="light"] .ghost-link,
html[data-theme="light"] .hud-pill,
html[data-theme="light"] .sound-toggle,
html[data-theme="light"] .theme-toggle,
html[data-theme="light"] .level-badge,
html[data-theme="light"] .account-chip {
    background: var(--theme-control-bg);
    border-color: var(--theme-control-border);
    color: var(--theme-control-text);
}

html[data-theme="light"] .dashboard-subtle-link:hover,
html[data-theme="light"] .catalog-back-link:hover,
html[data-theme="light"] .ghost-link:hover,
html[data-theme="light"] .sound-toggle:hover {
    background: var(--theme-control-bg-hover);
    border-color: var(--theme-control-border-strong);
}

html[data-theme="light"] .account-chip-active,
html[data-theme="light"] .dashboard-phase-pill,
html[data-theme="light"] .immersive-chip,
html[data-theme="light"] .mode-option-primary .mode-option-index,
html[data-theme="light"] .mode-option-primary .mode-option-tag,
html[data-theme="light"] .scene-exam-tag,
html[data-theme="light"] .admin-pill,
html[data-theme="light"] .admin-pill-soft {
    background: var(--theme-chip-bg);
    border-color: var(--theme-chip-border);
    color: var(--theme-chip-text);
}

html[data-theme="light"] .landing-copy,
html[data-theme="light"] .progress-panel,
html[data-theme="light"] .account-hero,
html[data-theme="light"] .account-progress,
html[data-theme="light"] .account-card,
html[data-theme="light"] .mode-select-stage,
html[data-theme="light"] .catalog-hero,
html[data-theme="light"] .catalog-panel,
html[data-theme="light"] .aside-card,
html[data-theme="light"] .session-card,
html[data-theme="light"] .dashboard-modal-dialog,
html[data-theme="light"] .flag-zoom-dialog,
html[data-theme="light"] .auth-stage,
html[data-theme="light"] .admin-hero,
html[data-theme="light"] .admin-overview,
html[data-theme="light"] .admin-users-card,
html[data-theme="light"] .admin-detail-card,
html[data-theme="light"] .admin-actions-card,
html[data-theme="light"] .admin-detail-subcard {
    background:
        linear-gradient(
            180deg,
            rgba(10, 12, 15, 0.018),
            rgba(10, 12, 15, 0)
        ),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 243, 235, 0.98));
    border-color: var(--theme-surface-border);
    box-shadow: var(--theme-surface-shadow);
}

html[data-theme="light"] .mode-launch-card,
html[data-theme="light"] .exam-choice-card,
html[data-theme="light"] .account-inline-card,
html[data-theme="light"] .account-stat-card,
html[data-theme="light"] .catalog-hero-side,
html[data-theme="light"] .catalog-card,
html[data-theme="light"] .catalog-flag-shell,
html[data-theme="light"] .mode-option,
html[data-theme="light"] .mode-option-index,
html[data-theme="light"] .mode-option-tag,
html[data-theme="light"] .score-chip,
html[data-theme="light"] .country-banner,
html[data-theme="light"] .error-status-card,
html[data-theme="light"] .quiet-stat-record,
html[data-theme="light"] .feedback-flag-card,
html[data-theme="light"] .summary-card,
html[data-theme="light"] .admin-user-row,
html[data-theme="light"] .admin-action-card,
html[data-theme="light"] .scene-learning-point,
html[data-theme="light"] .scene-compare-card,
html[data-theme="light"] .scene-compare-note,
html[data-theme="light"] .scene-mode-card,
html[data-theme="light"] .scene-exam-card,
html[data-theme="light"] .scene-tool-pill,
html[data-theme="light"] .scene-adaptive-row,
html[data-theme="light"] .scene-confusion-tip,
html[data-theme="light"] .onboarding-scene,
html[data-theme="light"] .scene-flag-card {
    background: var(--theme-surface-strong);
    border-color: var(--theme-surface-border);
    box-shadow: none;
}

html[data-theme="light"] .dashboard-body .section-label,
html[data-theme="light"] .dashboard-body .kicker,
html[data-theme="light"] .dashboard-body .metric-label,
html[data-theme="light"] .dashboard-body .mode-step,
html[data-theme="light"] .dashboard-body .summary-label,
html[data-theme="light"] .play-body .section-label,
html[data-theme="light"] .play-body .kicker,
html[data-theme="light"] .play-body .metric-label,
html[data-theme="light"] .play-body .mode-step,
html[data-theme="light"] .play-body .summary-label,
html[data-theme="light"] .landing-kicker,
html[data-theme="light"] .mode-select-copy .kicker,
html[data-theme="light"] .catalog-hero .kicker,
html[data-theme="light"] .stimulus-eyebrow,
html[data-theme="light"] .feedback-meta-label,
html[data-theme="light"] .country-banner-label,
html[data-theme="light"] .scene-compare-rule span,
html[data-theme="light"] .mode-launch-kicker,
html[data-theme="light"] .error-code,
html[data-theme="light"] .mode-option-index,
html[data-theme="light"] .quiet-stat small {
    color: var(--theme-text-faint);
}

html[data-theme="light"] .landing-copy .lede,
html[data-theme="light"] .mode-select-copy .lede,
html[data-theme="light"] .catalog-hero .lede,
html[data-theme="light"] .catalog-copy span,
html[data-theme="light"] .progress-hero-note,
html[data-theme="light"] .progress-panel-copy,
html[data-theme="light"] .quiet-stat p,
html[data-theme="light"] .mode-option-copy p,
html[data-theme="light"] .mode-option-record,
html[data-theme="light"] .question-subtitle,
html[data-theme="light"] .score-chip-label,
html[data-theme="light"] .aside-metrics span,
html[data-theme="light"] .response-timer,
html[data-theme="light"] .support-copy,
html[data-theme="light"] .player-line-label,
html[data-theme="light"] .player-line-rank,
html[data-theme="light"] .auth-copy .lede,
html[data-theme="light"] .auth-copy-note,
html[data-theme="light"] .auth-field span,
html[data-theme="light"] .auth-switch-copy,
html[data-theme="light"] .error-panel-text,
html[data-theme="light"] .feedback-copy,
html[data-theme="light"] .scene-learning-point p,
html[data-theme="light"] .scene-mode-card p,
html[data-theme="light"] .scene-compare-card p,
html[data-theme="light"] .scene-compare-note p,
html[data-theme="light"] .scene-exam-card p,
html[data-theme="light"] .scene-tool-pill span,
html[data-theme="light"] .admin-hero .lede,
html[data-theme="light"] .admin-user-row p,
html[data-theme="light"] .admin-user-row span,
html[data-theme="light"] .admin-detail-head p,
html[data-theme="light"] .admin-action-card p,
html[data-theme="light"] .admin-action-note {
    color: var(--theme-text-muted);
}

html[data-theme="light"] .auth-copy::before,
html[data-theme="light"] .auth-copy-note,
html[data-theme="light"] .auth-panel-copy,
html[data-theme="light"] .quiet-stat,
html[data-theme="light"] .progress-meter,
html[data-theme="light"] .level-xp-track {
    border-color: var(--theme-surface-border);
}

html[data-theme="light"] .progress-meter,
html[data-theme="light"] .level-xp-track {
    background: var(--theme-meter-track);
    border-color: var(--theme-meter-border);
}

html[data-theme="light"] .progress-fill,
html[data-theme="light"] .level-xp-fill,
html[data-theme="light"] .score-chip-dot,
html[data-theme="light"] .score-chip-dot-alert {
    background: var(--theme-meter-fill);
    box-shadow: none;
}

html[data-theme="light"] .play-cta,
html[data-theme="light"] .button-primary,
html[data-theme="light"] .auth-submit,
html[data-theme="light"] .error-action-primary,
html[data-theme="light"] .play-body .button-primary {
    background: var(--theme-cta-bg);
    color: var(--theme-cta-text);
    box-shadow: none;
}

html[data-theme="light"] .play-cta:hover,
html[data-theme="light"] .button-primary:hover,
html[data-theme="light"] .auth-submit:hover,
html[data-theme="light"] .error-action-primary:hover,
html[data-theme="light"] .play-body .button-primary:hover {
    background: var(--theme-cta-bg-hover);
}

html[data-theme="light"] .play-cta-meta {
    color: var(--theme-cta-meta);
}

html[data-theme="light"] .button-accent {
    background: rgba(10, 12, 15, 0.06);
    color: #0a0c0f;
    border: 1px solid var(--theme-surface-border-strong);
    box-shadow: none;
}

html[data-theme="light"] .button-ghost,
html[data-theme="light"] .play-body .button-ghost {
    background: rgba(10, 12, 15, 0.03);
    color: #0a0c0f;
    border: 1px solid var(--theme-surface-border-strong);
}

html[data-theme="light"] .button-primary .button-keycap {
    background: rgba(255, 255, 255, 0.08);
}

html[data-theme="light"] .button-accent .button-keycap,
html[data-theme="light"] .button-keycap {
    background: rgba(10, 12, 15, 0.06);
}

html[data-theme="light"] .auth-field input,
html[data-theme="light"] .answer-input {
    background: var(--theme-input-bg);
    border-color: var(--theme-input-border);
    color: #0a0c0f;
}

html[data-theme="light"] .auth-field input::placeholder,
html[data-theme="light"] .answer-input::placeholder {
    color: var(--theme-input-placeholder);
}

html[data-theme="light"] .auth-field input:focus,
html[data-theme="light"] .answer-input:focus {
    background: var(--theme-input-bg-focus);
    border-color: var(--theme-input-border-focus);
    box-shadow: 0 0 0 4px var(--theme-focus-ring);
}

html[data-theme="light"] .auth-error,
html[data-theme="light"] .session-error {
    background: var(--theme-error-bg);
    border-color: var(--theme-error-border);
    color: var(--theme-error-text);
}

html[data-theme="light"] .session-card,
html[data-theme="light"] .dashboard-modal-dialog,
html[data-theme="light"] .flag-zoom-dialog {
    box-shadow: var(--theme-surface-shadow);
}

html[data-theme="light"] .stimulus-stage,
html[data-theme="light"] .response-stage,
html[data-theme="light"] .stimulus-card,
html[data-theme="light"] .question-card-stable[data-quiz-type="name_to_flag"] .stimulus-card-name,
html[data-theme="light"] .flag-stage,
html[data-theme="light"] .answer-card,
html[data-theme="light"] .flag-answer-card,
html[data-theme="light"] .feedback-sheet,
html[data-theme="light"] .flag-zoom-stage {
    background:
        linear-gradient(
            180deg,
            rgba(10, 12, 15, 0.018),
            rgba(10, 12, 15, 0)
        ),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 243, 235, 0.98));
    border-color: var(--theme-surface-border);
    color: #0a0c0f;
    box-shadow: none;
}

html[data-theme="light"] .flag-frame::before,
html[data-theme="light"] .catalog-flag-shell::before {
    background: radial-gradient(
        circle,
        rgba(10, 12, 15, 0.16) 0%,
        rgba(10, 12, 15, 0.08) 48%,
        rgba(10, 12, 15, 0) 76%
    );
}

html[data-theme="light"] .flag-frame img,
html[data-theme="light"] .catalog-flag-shell img,
html[data-theme="light"] .flag-zoom-stage img {
    filter: var(--theme-flag-shadow);
}

html[data-theme="light"] .answer-card,
html[data-theme="light"] .flag-answer-card,
html[data-theme="light"] .answer-card.is-selected,
html[data-theme="light"] .flag-answer-card.is-selected {
    color: #0a0c0f;
}

html[data-theme="light"] .answer-shortcut,
html[data-theme="light"] .answer-shortcut-flag,
html[data-theme="light"] .flag-zoom-trigger,
html[data-theme="light"] .flag-zoom-close {
    background: rgba(255, 255, 255, 0.84);
    border-color: var(--theme-surface-border-strong);
    color: rgba(10, 12, 15, 0.86);
    box-shadow: none;
}

html[data-theme="light"] .flag-zoom-trigger:hover,
html[data-theme="light"] .flag-zoom-close:hover {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(10, 12, 15, 0.18);
}

html[data-theme="light"] .answer-card.is-selected {
    box-shadow: 0 16px 26px rgba(10, 12, 15, 0.08);
}

html[data-theme="light"] .flag-answer-card.is-selected {
    background:
        linear-gradient(
            180deg,
            rgba(10, 12, 15, 0.024),
            rgba(10, 12, 15, 0)
        ),
        linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(244, 240, 232, 0.99));
    border-color: rgba(10, 12, 15, 0.18);
    box-shadow: 0 16px 26px rgba(10, 12, 15, 0.07);
}

html[data-theme="light"] .feedback-sheet.correct,
html[data-theme="light"] .feedback-sheet.incorrect,
html[data-theme="light"] .feedback-sheet.ambiguous,
html[data-theme="light"] .feedback-sheet.empty {
    border-color: var(--theme-surface-border-strong);
}

html[data-theme="light"] .answer-inline-status,
html[data-theme="light"] .answer-inline-status.is-error,
html[data-theme="light"] .answer-inline-status.is-warning {
    color: var(--theme-text-muted);
}

html[data-theme="light"] .answer-burst-positive {
    background: #0a0c0f;
    color: #f4f1ea;
}

html[data-theme="light"] .flag-zoom-backdrop {
    background: var(--theme-overlay);
}

html[data-theme="light"] .dashboard-body-home #dashboard-records-card .quiet-stat-record-link {
    background: rgba(10, 12, 15, 0.045);
    border-color: rgba(10, 12, 15, 0.08);
    color: rgba(10, 12, 15, 0.72);
}

html[data-theme="light"] .dashboard-body-home #dashboard-records-card .quiet-stat-record-link:hover {
    background: rgba(10, 12, 15, 0.065);
    border-color: rgba(10, 12, 15, 0.12);
    color: rgba(10, 12, 15, 0.92);
}

html[data-theme="light"] .dashboard-body-home #dashboard-records-card .quiet-stat-records-dot {
    background: rgba(10, 12, 15, 0.18);
}

html[data-theme="light"] .dashboard-body-home #dashboard-records-card .quiet-stat-records-dot.is-active {
    background: rgba(10, 12, 15, 0.78);
}

html[data-theme="light"] .answer-card:focus-visible,
html[data-theme="light"] .flag-answer-card:focus-visible,
html[data-theme="light"] .flag-zoom-trigger:focus-visible,
html[data-theme="light"] .ghost-link:focus-visible,
html[data-theme="light"] .catalog-back-link:focus-visible,
html[data-theme="light"] .dashboard-subtle-link:focus-visible,
html[data-theme="light"] .sound-toggle:focus-visible,
html[data-theme="light"] .theme-toggle:focus-visible,
html[data-theme="light"] .level-badge:focus-visible {
    outline: 2px solid var(--theme-focus-outline);
}

html[data-theme="light"] .dashboard-body .brand-mark,
html[data-theme="light"] .game-brand,
html[data-theme="light"] .dashboard-body .surface-card,
html[data-theme="light"] .dashboard-body .hero-panel,
html[data-theme="light"] .dashboard-body .metric-card,
html[data-theme="light"] .dashboard-body .mode-card,
html[data-theme="light"] .dashboard-body .focus-item,
html[data-theme="light"] .dashboard-modal-dialog,
html[data-theme="light"] .dashboard-modal-close,
html[data-theme="light"] .catalog-copy strong,
html[data-theme="light"] .admin-user-head strong,
html[data-theme="light"] .admin-detail-head h2,
html[data-theme="light"] .admin-action-card h3,
html[data-theme="light"] .scene-flag-card span,
html[data-theme="light"] .scene-learning-point strong,
html[data-theme="light"] .scene-adaptive-copy strong,
html[data-theme="light"] .scene-mode-copy strong,
html[data-theme="light"] .scene-tool-copy strong,
html[data-theme="light"] .scene-confusion-card strong {
    color: #0a0c0f;
}

html[data-theme="light"] .metric-card,
html[data-theme="light"] .mode-card,
html[data-theme="light"] .focus-item,
html[data-theme="light"] .metric-card-bright {
    background: var(--theme-surface-strong);
    border-color: var(--theme-surface-border);
    box-shadow: none;
}

html[data-theme="light"] .metric-foot,
html[data-theme="light"] .metric-card p,
html[data-theme="light"] .mode-card p,
html[data-theme="light"] .focus-item .support-copy,
html[data-theme="light"] .account-stat-card p,
html[data-theme="light"] .account-card-note p,
html[data-theme="light"] .account-card-copy,
html[data-theme="light"] .account-list-row span,
html[data-theme="light"] .admin-delete-copy p:last-child,
html[data-theme="light"] .scene-mode-card span:first-child,
html[data-theme="light"] .scene-adaptive-copy p,
html[data-theme="light"] .scene-mode-copy p,
html[data-theme="light"] .scene-tool-copy span,
html[data-theme="light"] .scene-confusion-card p,
html[data-theme="light"] .scene-confusion-tip p {
    color: var(--theme-text-muted);
}

html[data-theme="light"] .surface-badge,
html[data-theme="light"] .surface-badge-context,
html[data-theme="light"] .surface-badge-soft,
html[data-theme="light"] .focus-state,
html[data-theme="light"] .mode-step,
html[data-theme="light"] .error-code,
html[data-theme="light"] .scene-status-chip,
html[data-theme="light"] .scene-status-chip-alert,
html[data-theme="light"] .scene-tip-index,
html[data-theme="light"] .scene-icon-badge {
    background: var(--theme-chip-bg);
    border-color: var(--theme-chip-border);
    color: var(--theme-chip-text);
    box-shadow: none;
}

html[data-theme="light"] .surface-badge-dot {
    background: #0a0c0f;
    box-shadow: none;
}

html[data-theme="light"] .level-badge {
    background: rgba(10, 12, 15, 0.05);
    border-color: rgba(10, 12, 15, 0.1);
    color: rgba(10, 12, 15, 0.88);
}

html[data-theme="light"] .level-badge-label,
html[data-theme="light"] .scene-status-chip-soft,
html[data-theme="light"] .account-row-label .ui-icon {
    color: var(--theme-text-faint);
    opacity: 1;
}

html[data-theme="light"] .dashboard-modal-backdrop {
    background: rgba(10, 12, 15, 0.16);
}

html[data-theme="light"] .dashboard-modal-dialog {
    background:
        linear-gradient(
            180deg,
            rgba(10, 12, 15, 0.018),
            rgba(10, 12, 15, 0)
        ),
        linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(247, 243, 235, 0.99));
    border-color: var(--theme-surface-border-strong);
}

html[data-theme="light"] .dashboard-modal-copy p,
html[data-theme="light"] .dashboard-modal-copy .support-copy {
    color: var(--theme-text-muted);
}

html[data-theme="light"] .dashboard-modal-close {
    background: rgba(10, 12, 15, 0.045);
}

html[data-theme="light"] .account-flash {
    background: rgba(255, 255, 255, 0.92);
    border-color: var(--theme-surface-border);
    color: rgba(10, 12, 15, 0.86);
    box-shadow: 0 14px 28px rgba(10, 12, 15, 0.08);
}

html[data-theme="light"] .account-flash-success,
html[data-theme="light"] .account-flash-error {
    background: rgba(255, 255, 255, 0.94);
    border-color: var(--theme-surface-border-strong);
    color: rgba(10, 12, 15, 0.88);
}

html[data-theme="light"] .auth-switch-copy a {
    color: #0a0c0f;
    border-bottom-color: rgba(10, 12, 15, 0.22);
}

html[data-theme="light"] .admin-user-row.is-active {
    background: rgba(10, 12, 15, 0.055);
    border-color: rgba(10, 12, 15, 0.14);
}

html[data-theme="light"] .admin-action-danger,
html[data-theme="light"] .admin-delete-button {
    border-color: rgba(10, 12, 15, 0.14);
}

html[data-theme="light"] .catalog-flag-shell,
html[data-theme="light"] .scene-adaptive-flag {
    background: rgba(255, 255, 255, 0.84);
}

html[data-theme="light"] .skeleton-block {
    background: linear-gradient(
        90deg,
        rgba(10, 12, 15, 0.05) 25%,
        rgba(10, 12, 15, 0.085) 50%,
        rgba(10, 12, 15, 0.05) 75%
    );
}

html[data-theme="light"] .skeleton-stimulus,
html[data-theme="light"] .skeleton-answer {
    border-color: rgba(10, 12, 15, 0.08);
}

html[data-theme="light"] .response-timer {
    background: rgba(10, 12, 15, 0.03);
    border-color: rgba(10, 12, 15, 0.08);
    color: rgba(10, 12, 15, 0.42);
}

html[data-theme="light"] .response-timer.is-fast {
    color: rgba(10, 12, 15, 0.9);
    border-color: rgba(10, 12, 15, 0.16);
    background: rgba(10, 12, 15, 0.05);
}

html[data-theme="light"] .response-timer.is-medium {
    color: rgba(10, 12, 15, 0.78);
    border-color: rgba(10, 12, 15, 0.12);
    background: rgba(10, 12, 15, 0.045);
}

html[data-theme="light"] .response-timer.is-slow {
    color: rgba(10, 12, 15, 0.62);
    border-color: rgba(10, 12, 15, 0.1);
    background: rgba(10, 12, 15, 0.035);
}

html[data-theme="light"] .onboarding-dot {
    background: rgba(10, 12, 15, 0.14);
}

html[data-theme="light"] .onboarding-dot.is-active {
    background: rgba(10, 12, 15, 0.86);
}

html[data-theme="light"] .account-hero .lede,
html[data-theme="light"] .dashboard-body-catalog .catalog-hero-side p,
html[data-theme="light"] .level-card-body p,
html[data-theme="light"] .mode-option-record,
html[data-theme="light"] .score-chip-label,
html[data-theme="light"] .question-subtitle,
html[data-theme="light"] .stimulus-eyebrow {
    color: rgba(10, 12, 15, 0.78);
}

html[data-theme="light"] .progress-hero-note,
html[data-theme="light"] .catalog-copy span,
html[data-theme="light"] .quiet-stat-record small {
    color: rgba(10, 12, 15, 0.72);
}

html[data-theme="light"] .level-rank-chip,
html[data-theme="light"] .mode-option-tag,
html[data-theme="light"] .mode-option-primary .mode-option-tag,
html[data-theme="light"] .mode-pill {
    background: rgba(10, 12, 15, 0.08);
    border-color: rgba(10, 12, 15, 0.13);
    color: rgba(10, 12, 15, 0.88);
}

html[data-theme="light"] .mode-option-primary .mode-option-index {
    background: rgba(10, 12, 15, 0.08);
    color: rgba(10, 12, 15, 0.88);
}

html[data-theme="light"] .mode-option-arrow {
    opacity: 0.72;
    color: rgba(10, 12, 15, 0.72);
}

html[data-theme="light"] .dashboard-body-catalog .catalog-hero-side {
    background: rgba(10, 12, 15, 0.045);
    border-color: rgba(10, 12, 15, 0.1);
}

html[data-theme="light"] .catalog-card,
html[data-theme="light"] .catalog-flag-shell,
html[data-theme="light"] .dashboard-body-home .progress-panel-body,
html[data-theme="light"] .dashboard-body-home .quiet-stat,
html[data-theme="light"] .dashboard-body-home .level-card {
    border-color: rgba(10, 12, 15, 0.12);
}

html[data-theme="light"] .flag-zoom-trigger,
html[data-theme="light"] .flag-zoom-close {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 10px 18px rgba(10, 12, 15, 0.08);
}

html[data-theme="light"] .dashboard-body-home .level-rank-chip,
html[data-theme="light"] .dashboard-body-home .level-card-body p,
html[data-theme="light"] .dashboard-body-home .progress-hero-note {
    color: rgba(10, 12, 15, 0.82);
}

html[data-theme="light"] .dashboard-body-home .quiet-stat p,
html[data-theme="light"] .dashboard-body-home .quiet-stat .metric-label {
    color: rgba(10, 12, 15, 0.74);
}

@media (max-width: 759px) {
    html[data-theme="light"] .dashboard-body-home #dashboard-records-card .quiet-stat-record {
        background:
            linear-gradient(
                180deg,
                rgba(10, 12, 15, 0.042),
                rgba(10, 12, 15, 0.016)
            ),
            linear-gradient(
                180deg,
                rgba(255, 255, 255, 0.985),
                rgba(245, 241, 233, 0.97)
            );
        border-color: rgba(10, 12, 15, 0.14);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34);
    }

    html[data-theme="light"] .dashboard-body-home #dashboard-records-card .quiet-stat-record small {
        color: rgba(10, 12, 15, 0.82);
        font-weight: 600;
    }

    html[data-theme="light"] .dashboard-body-home #dashboard-records-card .quiet-stat-record strong {
        color: #0a0c0f;
    }

    html[data-theme="light"] .dashboard-body-home #dashboard-records-card .quiet-stat-record.is-pending strong {
        color: rgba(10, 12, 15, 0.88);
    }

    html[data-theme="light"] .dashboard-body-home #dashboard-records-card .quiet-stat-record-link {
        background: rgba(10, 12, 15, 0.07);
        border-color: rgba(10, 12, 15, 0.14);
        color: rgba(10, 12, 15, 0.84);
    }

    html[data-theme="light"] .dashboard-body-home #dashboard-records-card .quiet-stat-record-link:hover {
        background: rgba(10, 12, 15, 0.09);
        border-color: rgba(10, 12, 15, 0.18);
        color: #0a0c0f;
    }

    .dashboard-body-account,
    .dashboard-body-admin {
        overflow-x: hidden;
    }

    .dashboard-body-account .dashboard-shell,
    .dashboard-body-admin .dashboard-shell {
        overflow-x: clip;
    }

    .dashboard-body-account .dashboard-topbar,
    .dashboard-body-admin .dashboard-topbar {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        justify-items: stretch;
        gap: 0.62rem;
    }

    .dashboard-body-account .dashboard-topbar-actions,
    .dashboard-body-admin .dashboard-topbar-actions {
        width: auto;
        min-width: 0;
        align-items: center;
        justify-content: flex-end;
        flex-wrap: nowrap;
        gap: 0.34rem;
    }

    .dashboard-body-account .brand-mark,
    .dashboard-body-admin .brand-mark {
        max-width: none;
        white-space: nowrap;
        line-height: 1;
        font-size: 0.8rem;
        letter-spacing: 0.07em;
    }

    .dashboard-body-account .account-chip,
    .dashboard-body-account .dashboard-subtle-link,
    .dashboard-body-account .catalog-back-link,
    .dashboard-body-admin .account-chip,
    .dashboard-body-admin .dashboard-subtle-link,
    .dashboard-body-admin .catalog-back-link {
        max-width: 100%;
        min-width: 0;
        padding: 0.52rem 0.68rem;
        font-size: 0.76rem;
        letter-spacing: 0.03em;
    }

    .dashboard-body-account .topbar-mobile-icon,
    .dashboard-body-admin .topbar-mobile-icon {
        display: block;
    }

    .dashboard-body-account .topbar-mobile-label,
    .dashboard-body-admin .topbar-mobile-label {
        display: none;
    }

    .dashboard-body-account .topbar-mobile-icon-link,
    .dashboard-body-account .topbar-mobile-icon-button,
    .dashboard-body-admin .topbar-mobile-icon-link,
    .dashboard-body-admin .topbar-mobile-icon-button {
        width: 2.34rem;
        min-width: 2.34rem;
        min-height: 2.34rem;
        padding: 0;
        gap: 0;
        flex: none;
        justify-content: center;
    }

    .dashboard-body-account .topbar-inline-form,
    .dashboard-body-admin .topbar-inline-form {
        max-width: 100%;
        flex: none;
    }

    .dashboard-body-account .catalog-back-link,
    .dashboard-body-admin .catalog-back-link {
        min-width: 2.34rem;
        flex: none;
    }
}

@media (max-width: 430px) {
    .dashboard-body-account .catalog-back-link,
    .dashboard-body-admin .catalog-back-link {
        width: 2.34rem;
        min-width: 2.34rem;
        min-height: 2.34rem;
        padding: 0;
        gap: 0;
        border-radius: 999px;
        justify-content: center;
    }

    .dashboard-body-account .catalog-back-link span,
    .dashboard-body-admin .catalog-back-link span {
        display: none;
    }
}
