
        /* ============================================================
           TRIVIA QUIZ — Nyza Games
           Quiz-show purple & gold theme. Card-based question flow with
           a depleting ring timer, animated streak combos, lifelines,
           pause overlay, gold-particle win burst, and a full stats screen.
           ============================================================ */

        body.game-page {
            --t-bg: #1a0a32;
            --t-bg-grad: radial-gradient(ellipse at 50% -10%, #5d2a99 0%, #2a1352 45%, #110620 100%);
            --t-text: #f4eaff;
            --t-text-muted: #c4a8e0;
            --t-text-subtle: #9d80c0;
            --t-primary: #fbbf24;
            --t-primary-mid: #f59e0b;
            --t-primary-dark: #b45309;
            --t-glass-bg: rgba(45, 22, 80, 0.55);
            --t-glass-border: rgba(251,191,36,0.32);
            --t-card-bg: rgba(255,255,255,0.06);
            --t-card-border: rgba(251,191,36,0.28);
            --t-btn-grad: linear-gradient(135deg, #fbbf24, #f59e0b 55%, #b45309);
        }
        body.game-page::before {
            content: '';
            position: fixed; inset: 0; z-index: -2; pointer-events: none;
            background:
                radial-gradient(ellipse 60% 80% at 50% 0%, rgba(251,191,36,0.22) 0%, transparent 55%),
                radial-gradient(ellipse 70% 50% at 50% 100%, rgba(124, 58, 237, 0.18) 0%, transparent 60%);
        }
        body.game-page::after {
            content: '';
            position: fixed; inset: 0; z-index: -1; pointer-events: none;
            background-image:
                radial-gradient(2px 2px at 12% 18%, rgba(251,191,36,0.5), transparent 40%),
                radial-gradient(1px 1px at 78% 32%, rgba(255,255,255,0.4), transparent 40%),
                radial-gradient(1.5px 1.5px at 42% 78%, rgba(251,191,36,0.4), transparent 40%),
                radial-gradient(1px 1px at 88% 88%, rgba(255,255,255,0.35), transparent 40%);
            opacity: 0.6;
            animation: starDrift 60s linear infinite;
        }
        @keyframes starDrift {
            from { transform: translateY(0); }
            to { transform: translateY(-40px); }
        }

        /* ============================================================
           DESKTOP LAYOUT — board column + side rail.
           Was a single centered column floating in empty horizontal
           space; the rail consumes the leftover width with Recent
           Games + How to Play, themed to the quiz-show palette.
           ============================================================ */
        .game-layout {
            display: flex; gap: 22px; align-items: flex-start;
            justify-content: center; width: 100%;
            max-width: 1400px; margin: 0 auto; padding: 0 18px;
        }
        .game-main {
            position: relative; display: flex; flex-direction: column;
            align-items: center; min-width: 0; max-width: 100%;
        }

        .trivia-container {
            width: min(560px, 94vw);
            position: relative;
            margin: 0;
        }

        .game-rail {
            width: 340px; flex-shrink: 0;
            display: flex; flex-direction: column; gap: 14px;
        }
        .rail-card {
            background: rgba(45, 22, 80, 0.4);
            border: 1px solid var(--t-card-border);
            border-radius: 16px; padding: 14px 16px;
            backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
        }
        .rail-card-title {
            font-family: 'Orbitron', monospace; font-size: 0.6rem;
            text-transform: uppercase; letter-spacing: 0.14em;
            color: var(--t-primary); margin-bottom: 10px; font-weight: 700;
        }
        /* Help + history toggles live open inside the rail on desktop. */
        .game-rail .help-toggle, .game-rail .history-toggle {
            display: block; width: 100%; margin: 0; text-align: left;
        }
        .game-rail .help-panel, .game-rail .history-panel {
            max-width: none; width: 100%;
            margin: 10px 0 0; padding: 0;
            background: none; border: none;
            backdrop-filter: none; -webkit-backdrop-filter: none;
        }

        /* ===== Setup Screen ===== */
        .setup-screen { padding: 0.5rem 0; }
        .setup-section { margin-bottom: 1.3rem; }
        .setup-title {
            font-family: 'Orbitron', monospace;
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 0.14em;
            color: var(--t-primary);
            margin-bottom: 0.6rem;
            font-weight: 700;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .setup-title .hint {
            font-size: 0.6rem;
            color: var(--t-text-muted);
            font-weight: 500;
            letter-spacing: 0.06em;
            text-transform: none;
        }
        .setting-group { display: flex; flex-wrap: wrap; gap: 0.45rem; }
        .setting-btn {
            padding: 0.55rem 1rem;
            border: 1px solid var(--t-glass-border);
            border-radius: 24px;
            font-family: inherit;
            font-size: 0.78rem;
            font-weight: 600;
            cursor: pointer;
            background: var(--t-card-bg);
            color: var(--t-text);
            transition: transform 0.15s, box-shadow 0.15s, background 0.15s, border-color 0.15s;
            -webkit-tap-highlight-color: transparent;
        }
        .setting-btn:active { transform: scale(0.96); }
        .setting-btn.active {
            background: var(--t-btn-grad);
            color: #1a0a32;
            border-color: transparent;
            box-shadow: 0 4px 16px rgba(251,191,36,0.4), inset 0 1px 0 rgba(255,255,255,0.3);
        }
        .setting-btn:hover:not(.active) { background: rgba(251,191,36,0.15); border-color: rgba(251,191,36,0.45); }
        .diff-desc {
            font-size: 0.78rem;
            color: var(--t-text-muted);
            margin-top: 0.5rem;
            line-height: 1.45;
            min-height: 1.2rem;
        }
        .diff-desc strong { color: var(--t-primary); }

        .cat-btn {
            padding: 0.5rem 0.9rem;
            border: 1px solid var(--t-glass-border);
            border-radius: 24px;
            font-family: inherit;
            font-size: 0.75rem;
            font-weight: 600;
            cursor: pointer;
            background: var(--t-card-bg);
            color: var(--t-text);
            transition: all 0.15s;
            -webkit-tap-highlight-color: transparent;
        }
        .cat-btn:active { transform: scale(0.96); }
        .cat-btn.active {
            background: rgba(251,191,36,0.2);
            border-color: var(--t-primary);
            color: var(--t-primary);
        }
        .cat-btn:hover:not(.active) { background: rgba(251,191,36,0.12); }

        .start-quiz-btn {
            display: block;
            width: 100%;
            padding: 1.15rem;
            margin-top: 1.5rem;
            border: none;
            border-radius: 32px;
            font-family: 'Orbitron', monospace;
            font-size: 1rem;
            font-weight: 700;
            letter-spacing: 0.14em;
            text-transform: uppercase;
            cursor: pointer;
            color: #1a0a32;
            background: var(--t-btn-grad);
            transition: transform 0.2s, box-shadow 0.2s;
            box-shadow:
              inset 0 1px 0 rgba(255,255,255,0.35),
              0 10px 30px rgba(251,191,36,0.45),
              0 0 0 1px rgba(251,191,36,0.6);
        }
        .start-quiz-btn:hover {
            transform: translateY(-2px);
            box-shadow:
              inset 0 1px 0 rgba(255,255,255,0.45),
              0 14px 36px rgba(251,191,36,0.6),
              0 0 0 1px rgba(251,191,36,0.85);
        }
        .start-quiz-btn:active { transform: translateY(0) scale(0.98); }

        .best-display {
            text-align: center;
            margin-top: 0.8rem;
            font-size: 0.72rem;
            color: var(--t-text-muted);
            font-family: 'Orbitron', monospace;
            letter-spacing: 0.1em;
        }
        .best-display strong { color: var(--t-primary); font-weight: 700; }

        /* ===== Quiz Screen ===== */
        .quiz-screen { display: none; }
        .quiz-screen.active { display: block; animation: cardSlideIn 0.45s cubic-bezier(0.22, 1, 0.36, 1); }

        @keyframes cardSlideIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .hud-bar {
            display: flex;
            align-items: center;
            gap: 0.6rem;
            margin-bottom: 0.85rem;
        }
        .hud-progress {
            flex: 1;
            height: 6px;
            background: rgba(255,255,255,0.08);
            border-radius: 6px;
            overflow: hidden;
            box-shadow: inset 0 1px 3px rgba(0,0,0,0.4);
        }
        .hud-progress-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--t-primary), var(--t-primary-mid));
            border-radius: 6px;
            transition: width 0.4s ease;
            box-shadow: 0 0 10px rgba(251,191,36,0.5);
        }
        .hud-pause-btn {
            width: 36px; height: 36px;
            border-radius: 10px;
            background: rgba(255,255,255,0.08);
            border: 1px solid var(--t-glass-border);
            color: var(--t-text);
            font-size: 0.95rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: transform 0.15s, background 0.15s;
            -webkit-tap-highlight-color: transparent;
        }
        .hud-pause-btn:hover { background: rgba(255,255,255,0.15); }
        .hud-pause-btn:active { transform: scale(0.92); }

        /* Top strip: counter | timer ring | category */
        .top-strip {
            display: grid;
            grid-template-columns: 1fr auto 1fr;
            align-items: center;
            gap: 0.6rem;
            margin-bottom: 1rem;
        }
        .counter-cell { font-size: 0.72rem; color: var(--t-text-muted); font-family: 'Orbitron', monospace; letter-spacing: 0.08em; }
        .category-cell {
            justify-self: end;
            font-family: 'Orbitron', monospace;
            font-size: 0.6rem;
            text-transform: uppercase;
            letter-spacing: 0.14em;
            color: var(--t-primary);
            font-weight: 700;
            background: rgba(251,191,36,0.14);
            border: 1px solid rgba(251,191,36,0.3);
            padding: 0.3rem 0.7rem;
            border-radius: 24px;
            white-space: nowrap;
        }

        /* Timer ring */
        .timer-ring {
            position: relative;
            width: 64px; height: 64px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .timer-ring svg {
            position: absolute; inset: 0;
            transform: rotate(-90deg);
            width: 100%; height: 100%;
        }
        .timer-ring circle {
            fill: none;
            stroke-width: 5;
            stroke-linecap: round;
        }
        .timer-ring .ring-track { stroke: rgba(255,255,255,0.1); }
        .timer-ring .ring-fill {
            stroke: var(--t-primary);
            transition: stroke-dashoffset 0.1s linear, stroke 0.2s;
            filter: drop-shadow(0 0 6px rgba(251,191,36,0.7));
        }
        .timer-ring .ring-fill.warn {
            stroke: #ef4444;
            filter: drop-shadow(0 0 8px rgba(239,68,68,0.85));
            animation: ringPulse 0.5s ease-in-out infinite;
        }
        @keyframes ringPulse {
            0%, 100% { filter: drop-shadow(0 0 6px rgba(239,68,68,0.5)); }
            50% { filter: drop-shadow(0 0 14px rgba(239,68,68,1)); }
        }
        .timer-ring-text {
            font-family: 'Orbitron', monospace;
            font-size: 1rem;
            font-weight: 800;
            color: var(--t-text);
            z-index: 1;
        }
        .timer-ring-text.warn { color: #ef4444; }
        .timer-ring.untimed .ring-fill { stroke: rgba(255,255,255,0.18); animation: none; }
        .timer-ring.untimed .timer-ring-text { font-size: 0.65rem; color: var(--t-text-muted); letter-spacing: 0.06em; }

        /* Stats row: score, streak, combo */
        .stat-strip {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.6rem;
            margin-bottom: 1rem;
            padding: 0.55rem 0.85rem;
            background: rgba(255,255,255,0.04);
            border: 1px solid rgba(251,191,36,0.18);
            border-radius: 14px;
        }
        .stat-pill {
            display: flex;
            align-items: baseline;
            gap: 0.35rem;
            font-size: 0.7rem;
            color: var(--t-text-muted);
        }
        .stat-pill .label {
            font-family: 'Orbitron', monospace;
            font-size: 0.55rem;
            text-transform: uppercase;
            letter-spacing: 0.14em;
            color: var(--t-text-subtle);
        }
        .stat-pill .value {
            font-family: 'Orbitron', monospace;
            font-size: 1rem;
            font-weight: 800;
            color: var(--t-text);
            min-width: 1.5ch;
            display: inline-block;
        }
        .stat-pill.score .value {
            background: linear-gradient(135deg, var(--t-primary), var(--t-primary-mid));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        .combo-badge {
            font-family: 'Orbitron', monospace;
            font-size: 0.72rem;
            font-weight: 800;
            color: #fff;
            background: linear-gradient(135deg, #ef4444, #f59e0b, #fbbf24);
            background-size: 200% 200%;
            padding: 0.3rem 0.7rem;
            border-radius: 18px;
            letter-spacing: 0.06em;
            box-shadow: 0 4px 14px rgba(245,158,11,0.45);
            animation: comboGlow 1.6s ease-in-out infinite, comboPop 0.4s ease-out;
            display: none;
        }
        .combo-badge.visible { display: inline-block; }
        @keyframes comboGlow {
            0%, 100% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
        }
        @keyframes comboPop {
            0% { transform: scale(0.4); }
            60% { transform: scale(1.25); }
            100% { transform: scale(1); }
        }

        /* Question card */
        .question-card {
            position: relative;
            margin-bottom: 1rem;
        }
        .question-card-inner {
            font-size: 1.08rem;
            font-weight: 500;
            line-height: 1.5;
            color: var(--t-text);
            background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(251,191,36,0.04));
            border: 1px solid var(--t-card-border);
            border-radius: 18px;
            padding: 1.3rem 1.4rem;
            min-height: 4rem;
            box-shadow:
                inset 0 1px 0 rgba(255,255,255,0.08),
                0 12px 36px rgba(0,0,0,0.35),
                0 0 50px rgba(251,191,36,0.08);
        }
        .question-card.swap-out .question-card-inner { animation: cardOut 0.25s ease-in forwards; }
        .question-card.swap-in .question-card-inner { animation: cardIn 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
        @keyframes cardOut {
            from { opacity: 1; transform: translateX(0); }
            to { opacity: 0; transform: translateX(-30px); }
        }
        @keyframes cardIn {
            from { opacity: 0; transform: translateX(30px); }
            to { opacity: 1; transform: translateX(0); }
        }

        /* Options */
        .options {
            display: flex;
            flex-direction: column;
            gap: 0.55rem;
        }
        .option-btn {
            position: relative;
            display: flex;
            align-items: center;
            gap: 0.8rem;
            width: 100%;
            text-align: left;
            padding: 1.05rem 1.1rem;
            border: 1px solid rgba(255,255,255,0.1);
            border-left: 4px solid rgba(251,191,36,0.4);
            border-radius: 14px;
            background: rgba(255,255,255,0.04);
            color: var(--t-text);
            font-family: inherit;
            font-size: 0.92rem;
            font-weight: 500;
            cursor: pointer;
            transition: transform 0.18s, background 0.18s, border-color 0.18s, box-shadow 0.18s;
            -webkit-tap-highlight-color: transparent;
            box-shadow:
              inset 0 1px 0 rgba(255,255,255,0.04),
              0 4px 12px rgba(0,0,0,0.2);
        }
        .options.swap-in .option-btn { animation: optIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) backwards; }
        .options.swap-in .option-btn:nth-child(1) { animation-delay: 0.05s; }
        .options.swap-in .option-btn:nth-child(2) { animation-delay: 0.1s; }
        .options.swap-in .option-btn:nth-child(3) { animation-delay: 0.15s; }
        .options.swap-in .option-btn:nth-child(4) { animation-delay: 0.2s; }
        @keyframes optIn {
            from { opacity: 0; transform: translateY(12px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .option-key {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 28px; height: 28px;
            border-radius: 8px;
            background: rgba(251,191,36,0.15);
            color: var(--t-primary);
            font-family: 'Orbitron', monospace;
            font-size: 0.75rem;
            font-weight: 800;
            flex-shrink: 0;
        }
        .option-text { flex: 1; }
        .option-icon {
            width: 22px; height: 22px;
            flex-shrink: 0;
            display: none;
        }

        .option-btn:hover:not(.disabled):not(.eliminated) {
            transform: translateX(6px);
            border-left-color: var(--t-primary);
            background: rgba(251,191,36,0.12);
            box-shadow:
              inset 0 1px 0 rgba(255,255,255,0.1),
              0 8px 24px rgba(251,191,36,0.25);
        }
        .option-btn:active:not(.disabled):not(.eliminated) {
            transform: translateX(6px) scale(0.985);
        }
        .option-btn.tapped {
            animation: tapPulse 0.3s ease-out;
        }
        @keyframes tapPulse {
            0% { transform: translateX(6px) scale(1); }
            40% { transform: translateX(6px) scale(0.97); background: rgba(251,191,36,0.25); }
            100% { transform: translateX(6px) scale(1); }
        }

        .option-btn.correct {
            background: linear-gradient(135deg, rgba(16,185,129,0.35), rgba(16,185,129,0.12));
            border-color: #10b981;
            border-left-color: #10b981;
            color: #ecfdf5;
            box-shadow: 0 0 28px rgba(16,185,129,0.5), inset 0 0 0 1px rgba(16,185,129,0.4);
            animation: correctFlash 0.55s ease-out;
        }
        .option-btn.correct .option-key { background: rgba(16,185,129,0.3); color: #d1fae5; }
        .option-btn.correct .option-icon.check { display: block; color: #10b981; }
        .option-btn.wrong {
            background: linear-gradient(135deg, rgba(239,68,68,0.35), rgba(239,68,68,0.12));
            border-color: #ef4444;
            border-left-color: #ef4444;
            color: #fef2f2;
            box-shadow: 0 0 28px rgba(239,68,68,0.5), inset 0 0 0 1px rgba(239,68,68,0.4);
            animation: wrongShake 0.5s ease-out;
        }
        .option-btn.wrong .option-key { background: rgba(239,68,68,0.3); color: #fecaca; }
        .option-btn.wrong .option-icon.cross { display: block; color: #ef4444; }
        .option-btn.reveal-correct {
            background: linear-gradient(135deg, rgba(16,185,129,0.22), rgba(16,185,129,0.08));
            border-color: #10b981;
            border-left-color: #10b981;
            box-shadow: 0 0 18px rgba(16,185,129,0.35);
        }
        .option-btn.reveal-correct .option-icon.check { display: block; color: #10b981; }

        @keyframes correctFlash {
            0% { transform: scale(1); }
            30% { transform: scale(1.04); }
            60% { transform: scale(0.99); }
            100% { transform: scale(1); }
        }
        @keyframes wrongShake {
            0%, 100% { transform: translateX(6px); }
            20% { transform: translateX(-3px); }
            40% { transform: translateX(12px); }
            60% { transform: translateX(0); }
            80% { transform: translateX(9px); }
        }
        .option-btn.disabled { pointer-events: none; }
        .option-btn.eliminated {
            opacity: 0.32;
            pointer-events: none;
            text-decoration: line-through;
            filter: grayscale(0.5);
        }

        /* Explanation */
        .explanation {
            display: none;
            margin-top: 0.85rem;
            padding: 0.85rem 1.05rem;
            background: rgba(251,191,36,0.1);
            border: 1px solid rgba(251,191,36,0.28);
            border-radius: 12px;
            font-size: 0.85rem;
            color: var(--t-text);
            line-height: 1.55;
            animation: explFade 0.4s ease;
        }
        .explanation.visible { display: block; }
        .explanation strong { color: var(--t-primary); }
        @keyframes explFade {
            from { opacity: 0; transform: translateY(-6px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* Lifelines */
        .lifelines {
            display: flex;
            gap: 0.55rem;
            justify-content: center;
            margin-top: 1.1rem;
        }
        .lifeline-btn {
            display: flex;
            align-items: center;
            gap: 0.4rem;
            padding: 0.55rem 1rem;
            border: 1px solid var(--t-glass-border);
            border-radius: 24px;
            background: rgba(255,255,255,0.06);
            font-family: 'Orbitron', monospace;
            font-size: 0.72rem;
            font-weight: 700;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            cursor: pointer;
            color: var(--t-text);
            transition: transform 0.15s, background 0.15s, border-color 0.15s;
            -webkit-tap-highlight-color: transparent;
        }
        .lifeline-btn:hover:not(:disabled) {
            background: rgba(251,191,36,0.18);
            border-color: rgba(251,191,36,0.55);
            color: var(--t-primary);
        }
        .lifeline-btn:active:not(:disabled) { transform: scale(0.95); }
        .lifeline-btn:disabled {
            opacity: 0.3;
            cursor: not-allowed;
            text-decoration: line-through;
        }
        .lifeline-btn svg { width: 14px; height: 14px; }

        /* Floating score pop */
        .score-pop {
            position: absolute;
            font-family: 'Orbitron', monospace;
            font-size: 1.3rem;
            font-weight: 800;
            color: var(--t-primary);
            text-shadow: 0 2px 12px rgba(0,0,0,0.5);
            pointer-events: none;
            animation: scorePop 1s ease-out forwards;
            z-index: 10;
        }
        @keyframes scorePop {
            0% { opacity: 0; transform: scale(0.4) translateY(0); }
            25% { opacity: 1; transform: scale(1.3) translateY(-14px); }
            100% { opacity: 0; transform: scale(0.95) translateY(-60px); }
        }

        /* ===== Overlay (pause + game over) ===== */
        .overlay {
            position: fixed;
            inset: 0;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 1.5rem;
            z-index: 1000;
            background: radial-gradient(ellipse at center, rgba(26,10,50,0.7), rgba(11,4,24,0.95));
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            animation: overlayFade 0.35s ease;
        }
        .overlay.active { display: flex; }
        @keyframes overlayFade {
            from { opacity: 0; }
            to { opacity: 1; }
        }
        .overlay-box {
            width: min(440px, 92vw);
            background: linear-gradient(160deg, rgba(45,22,80,0.95), rgba(20,8,45,0.95));
            border: 1px solid var(--t-glass-border);
            border-radius: 24px;
            padding: 2rem 1.6rem 1.6rem;
            text-align: center;
            box-shadow:
                0 24px 60px rgba(0,0,0,0.5),
                inset 0 1px 0 rgba(255,255,255,0.1),
                0 0 80px rgba(251,191,36,0.15);
            animation: boxPop 0.45s cubic-bezier(0.22, 1, 0.36, 1);
        }
        @keyframes boxPop {
            from { opacity: 0; transform: scale(0.85) translateY(20px); }
            to { opacity: 1; transform: scale(1) translateY(0); }
        }
        .overlay-title {
            font-family: 'Orbitron', monospace;
            font-size: 1.6rem;
            font-weight: 800;
            letter-spacing: 0.06em;
            margin: 0 0 0.4rem;
            background: linear-gradient(135deg, var(--t-primary), var(--t-primary-mid));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            filter: drop-shadow(0 2px 10px rgba(251,191,36,0.35));
        }
        .overlay-sub {
            margin: 0 0 1.2rem;
            color: var(--t-text-muted);
            font-size: 0.92rem;
            line-height: 1.5;
        }

        /* Game-over score */
        .gover-score {
            font-family: 'Orbitron', monospace;
            font-size: 3.6rem;
            font-weight: 900;
            line-height: 1;
            margin: 0.4rem 0 0.3rem;
            background: linear-gradient(135deg, #fde68a, var(--t-primary), var(--t-primary-dark));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            filter: drop-shadow(0 0 24px rgba(251,191,36,0.6));
            letter-spacing: -0.02em;
        }
        .gover-score-label {
            font-family: 'Orbitron', monospace;
            font-size: 0.65rem;
            letter-spacing: 0.18em;
            text-transform: uppercase;
            color: var(--t-text-subtle);
            margin-bottom: 0.4rem;
        }
        .gover-tag {
            display: inline-block;
            margin: 0.3rem 0 0.8rem;
            padding: 0.2rem 0.7rem;
            border-radius: 18px;
            background: rgba(251,191,36,0.18);
            border: 1px solid rgba(251,191,36,0.4);
            color: var(--t-primary);
            font-family: 'Orbitron', monospace;
            font-size: 0.62rem;
            letter-spacing: 0.16em;
            text-transform: uppercase;
            font-weight: 700;
        }
        .gover-tag.new-best {
            background: linear-gradient(135deg, #fbbf24, #f59e0b);
            color: #1a0a32;
            border-color: transparent;
            box-shadow: 0 4px 14px rgba(251,191,36,0.5);
            animation: bestGlow 1.5s ease-in-out infinite;
        }
        @keyframes bestGlow {
            0%, 100% { box-shadow: 0 4px 14px rgba(251,191,36,0.5); }
            50% { box-shadow: 0 6px 22px rgba(251,191,36,0.85); }
        }

        .stats-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 0.5rem;
            margin: 1.2rem 0 1rem;
        }
        .stat-cell {
            padding: 0.7rem 0.4rem;
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(251,191,36,0.2);
            border-radius: 12px;
        }
        .stat-cell-label {
            font-family: 'Orbitron', monospace;
            font-size: 0.55rem;
            letter-spacing: 0.14em;
            text-transform: uppercase;
            color: var(--t-text-subtle);
            margin-bottom: 0.3rem;
        }
        .stat-cell-value {
            font-family: 'Orbitron', monospace;
            font-size: 1.1rem;
            font-weight: 800;
            color: var(--t-primary);
        }
        .stat-cell-value.small { font-size: 0.95rem; }

        .overlay-btn-row {
            display: flex;
            gap: 0.6rem;
            flex-wrap: wrap;
            justify-content: center;
            margin-top: 0.6rem;
        }
        .overlay-btn {
            padding: 0.8rem 1.4rem;
            border-radius: 99px;
            border: 0;
            cursor: pointer;
            font-family: 'Orbitron', monospace;
            font-size: 0.78rem;
            font-weight: 800;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            transition: transform 0.15s, box-shadow 0.15s;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.4rem;
            -webkit-tap-highlight-color: transparent;
        }
        .overlay-btn-primary {
            background: var(--t-btn-grad);
            color: #1a0a32;
            box-shadow: 0 6px 20px rgba(251,191,36,0.4);
        }
        .overlay-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(251,191,36,0.55); }
        .overlay-btn-ghost {
            background: rgba(255,255,255,0.08);
            border: 1px solid rgba(255,255,255,0.2);
            color: var(--t-text);
        }
        .overlay-btn-ghost:hover { background: rgba(255,255,255,0.15); }
        .overlay-btn:active { transform: translateY(0) scale(0.97); }

        /* Review */
        .review-toggle {
            margin-top: 0.4rem;
            font-size: 0.72rem;
            color: var(--t-text-muted);
            cursor: pointer;
            background: none;
            border: none;
            font-family: 'Orbitron', monospace;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            transition: color 0.15s;
        }
        .review-toggle:hover { color: var(--t-primary); }
        .review-list {
            display: none;
            max-height: 280px;
            overflow-y: auto;
            text-align: left;
            margin-top: 0.5rem;
            padding-right: 0.4rem;
        }
        .review-list.active { display: block; }
        .review-list::-webkit-scrollbar { width: 6px; }
        .review-list::-webkit-scrollbar-thumb { background: rgba(251,191,36,0.4); border-radius: 3px; }
        .review-item {
            padding: 0.6rem 0.7rem;
            border-bottom: 1px solid rgba(251,191,36,0.18);
            font-size: 0.78rem;
        }
        .review-q { font-weight: 500; color: var(--t-text); margin-bottom: 0.25rem; }
        .review-correct { color: #6ee7b7; font-size: 0.72rem; }
        .review-wrong { color: #fca5a5; font-size: 0.72rem; }
        .review-skip { color: var(--t-text-subtle); font-size: 0.72rem; font-style: italic; }

        /* ===== Particles (gold burst) ===== */
        #particleLayer {
            position: fixed;
            inset: 0;
            pointer-events: none;
            z-index: 2000;
            overflow: hidden;
        }
        .particle {
            position: absolute;
            width: 8px; height: 8px;
            border-radius: 50%;
            pointer-events: none;
        }

        /* ===== Help & history (below container) ===== */
        .help-toggle, .history-toggle {
            display: block; margin: 0.8rem auto 0; padding: 0.45rem 1.2rem;
            background: rgba(255,255,255,0.05); border: 1px solid var(--t-glass-border);
            color: var(--t-text); border-radius: 22px;
            font-family: 'Orbitron', monospace; font-size: 0.66rem; cursor: pointer;
            letter-spacing: 0.12em; text-transform: uppercase;
            transition: background 0.15s, border-color 0.15s, color 0.15s;
        }
        .help-toggle:hover, .history-toggle:hover {
            background: rgba(251,191,36,0.15);
            border-color: rgba(251,191,36,0.45);
            color: var(--t-primary);
        }
        .help-panel, .history-panel {
            display: none; max-width: 560px; width: min(560px, 94vw);
            margin: 0.8rem auto 0; padding: 1.2rem;
            background: var(--t-glass-bg); border: 1px solid var(--t-card-border);
            border-radius: 16px; color: var(--t-text);
            font-size: 0.85rem; line-height: 1.55;
            backdrop-filter: blur(14px);
            -webkit-backdrop-filter: blur(14px);
        }
        .help-panel.active, .history-panel.active { display: block; }
        .help-panel h3 {
            margin: 0 0 0.4rem;
            font-family: 'Orbitron', monospace;
            font-size: 0.75rem;
            color: var(--t-primary);
            text-transform: uppercase;
            letter-spacing: 0.1em;
        }
        .help-panel h3:not(:first-child) { margin-top: 1rem; }
        .help-panel ul { margin: 0 0 0.5rem; padding-left: 1.3rem; }
        .help-panel li { margin: 0.25rem 0; }
        .help-panel strong { color: var(--t-primary); }
        .history-title {
            font-family: 'Orbitron', monospace; font-size: 0.7rem; text-transform: uppercase;
            letter-spacing: 0.1em; color: var(--t-primary); text-align: center; margin-bottom: 0.6rem;
        }
        .history-list {
            max-height: 260px; overflow-y: auto;
            display: flex; flex-direction: column; gap: 0.35rem;
        }
        .history-list::-webkit-scrollbar { width: 6px; }
        .history-list::-webkit-scrollbar-thumb { background: rgba(251,191,36,0.4); border-radius: 3px; }
        .history-item {
            display: flex; justify-content: space-between; align-items: center;
            padding: 0.55rem 0.85rem;
            background: rgba(255,255,255,0.04); border: 1px solid rgba(251,191,36,0.18);
            border-radius: 10px;
            font-size: 0.78rem;
        }
        .history-score { font-family: 'Orbitron', monospace; font-weight: 800; color: var(--t-primary); }
        .history-meta { color: var(--t-text-muted); font-size: 0.72rem; }
        .history-empty { text-align: center; color: var(--t-text-subtle); font-size: 0.85rem; padding: 1rem; }

        /* In-overlay difficulty re-pick on the end screen — MOBILE only
           (desktop returns to the inline setup picker via "New Game"). Lets
           the player launch a fresh run at a different difficulty without
           hunting for the setup screen. */
        .overlay-settings { display: none; }
        .overlay-settings .setting-group { justify-content: center; }

        /* Mobile / tablet: stack the rail below the board column. */
        @media (max-width: 899px) {
            .game-layout { flex-direction: column; align-items: center; gap: 14px; padding: 0 12px; }
            .game-rail { width: 100%; max-width: 560px; }
            .overlay-settings {
                display: flex; flex-wrap: wrap; gap: 8px;
                justify-content: center; margin: 0.4rem 0 1rem;
            }
        }

        /* Responsive tweaks */
        @media (max-width: 480px) {
            .trivia-container { width: 96vw; }
            .question-card-inner { font-size: 1rem; padding: 1.1rem 1.15rem; }
            .option-btn { font-size: 0.88rem; padding: 0.95rem 0.95rem; }
            .gover-score { font-size: 3rem; }
            .stat-cell-value { font-size: 1rem; }
            .timer-ring { width: 56px; height: 56px; }
            .timer-ring-text { font-size: 0.9rem; }
        }
