:root {
    color-scheme: dark;
    --ink: #111735;
    --ink-soft: #20294e;
    --ink-raised: #303b69;
    --paper: #f8f8ff;
    --muted: #c1c9e6;
    --line: rgba(240, 244, 255, 0.18);
    --acid: #ffda69;
    --acid-deep: #e4b943;
    --coral: #ff85a4;
    --mint: #82e5d6;
    --danger: #ff806e;
    --display-font: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
    --body-font: "Trebuchet MS", "Segoe UI", sans-serif;
    font-family: var(--body-font);
    background: var(--ink);
    color: var(--paper);
    font-synthesis: none;
    text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

html { min-width: 320px; min-height: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    background-color: var(--ink);
    background-image: linear-gradient(145deg, #111735, #25204b);
    color: var(--paper);
    font-size: 16px;
    line-height: 1.5;
}

button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--acid); outline-offset: 3px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.home-page { overflow-x: hidden; }
.home-shell { position: relative; display: grid; grid-template-columns: 1.12fr 0.88fr; align-items: center; gap: 8vw; width: min(1200px, calc(100% - 80px)); min-height: 100vh; margin: 0 auto; padding: 80px 0 100px; }
.home-shell::before { position: absolute; z-index: -1; top: 12%; left: 47%; width: 440px; height: 440px; border: 1px solid rgba(214, 245, 106, 0.15); border-radius: 50%; content: ""; box-shadow: 0 0 0 52px rgba(214, 245, 106, 0.018), 0 0 0 104px rgba(214, 245, 106, 0.015); }
.home-copy { animation: arrive 650ms ease both; }
.eyebrow { margin: 0 0 14px; color: var(--acid); font-size: 11px; font-weight: 800; letter-spacing: 1.6px; }
.home-copy h1 { margin: 0; font-family: var(--display-font); font-size: 108px; font-weight: 400; line-height: 0.86; text-transform: uppercase; }
.home-copy h1 span { color: var(--acid); }
.home-description { max-width: 380px; margin: 30px 0 34px; color: #c2c5bd; font-size: 18px; }
.join-panel { position: relative; padding: 36px 0 0 38px; border-left: 1px solid var(--line); animation: arrive 650ms 120ms ease both; }
.join-panel::before { position: absolute; top: 0; left: -2px; width: 3px; height: 64px; background: var(--coral); content: ""; }
.join-panel h2 { margin: 0 0 25px; font-family: var(--display-font); font-size: 32px; font-weight: 400; text-transform: uppercase; }
.stack-form { display: grid; gap: 12px; }
.code-input { width: 100%; min-height: 76px; padding: 10px 18px; border: 1px solid var(--line); border-radius: 2px; background: var(--ink-soft); color: var(--paper); font-family: var(--display-font); font-size: 38px; letter-spacing: 7px; text-align: center; }
.code-input::placeholder { color: #777d76; }
.tiny-note { margin: 20px 0 0; color: var(--muted); font-size: 13px; }
.home-footer { position: absolute; right: 0; bottom: 30px; left: 0; display: flex; justify-content: space-between; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.home-footer span:first-child { color: var(--paper); font-weight: 700; }

.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: 16px; padding: 12px 20px; border: 1px solid transparent; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 800; transition: background-color 150ms ease, color 150ms ease, transform 150ms ease, border-color 150ms ease; }
.button:active:not(:disabled) { transform: translateY(1px) scale(.98); }
.button:hover:not(:disabled) { transform: translateY(-2px); }
.button:disabled { opacity: 0.46; cursor: not-allowed; }
.button-accent { background: var(--acid); color: var(--ink); }
.button-accent:hover:not(:disabled) { background: #ffe8a0; }
.button-dark { background: var(--paper); color: var(--ink); }
.button-dark:hover:not(:disabled) { background: white; }
.button-large { min-height: 58px; padding: 16px 22px; font-size: 15px; text-transform: uppercase; }
.button-outline { border-color: var(--line); background: transparent; color: var(--paper); }
.button-outline:hover:not(:disabled) { border-color: var(--acid); color: var(--acid); }
.button-outline:disabled { opacity: 0.5; }

.app-page { min-height: 100vh; }
.topbar { display: flex; min-height: 72px; align-items: center; justify-content: space-between; padding: 0 max(30px, calc((100% - 1180px) / 2)); border-bottom: 1px solid var(--line); }
.wordmark { font-size: 15px; font-weight: 900; }
.wordmark span { color: var(--acid); }
.topbar-note { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: 1.5px; }
.content-shell { width: min(1180px, calc(100% - 64px)); margin: 0 auto; padding: 48px 0 90px; }
.narrow-shell { width: min(760px, calc(100% - 48px)); }
.back-link { display: inline-block; margin-bottom: 25px; color: var(--muted); font-size: 13px; }
.back-link:hover { color: var(--acid); }
.page-heading { margin-bottom: 32px; }
.page-heading .eyebrow { margin-bottom: 9px; }
.page-heading h1, .empty-state h1 { margin: 0; font-family: var(--display-font); font-size: 54px; font-weight: 400; line-height: 1; text-transform: uppercase; }
.page-heading > p:last-child { margin: 13px 0 0; color: var(--muted); }
.form-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 22px; }
.field { display: grid; align-content: start; gap: 8px; color: #e3e4dc; font-size: 13px; font-weight: 700; }
.field small { margin-left: 5px; color: var(--muted); font-size: 11px; font-weight: 400; }
.field input, .field select { width: 100%; min-height: 50px; padding: 0 14px; border: 1px solid var(--line); border-radius: 2px; background: var(--ink-soft); color: var(--paper); }
.field input::placeholder { color: #777d76; }
.field select { cursor: pointer; }
.field-wide { grid-column: 1 / -1; }
.category-field { min-width: 0; margin: 0; padding: 0; border: 0; }
.category-field legend { margin-bottom: 10px; color: #e3e4dc; font-size: 13px; font-weight: 700; }
.category-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.category-option { position: relative; cursor: pointer; }
.category-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.category-option span { display: flex; min-height: 48px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 2px; background: var(--ink-soft); color: #c3c7bf; font-size: 12px; line-height: 1.25; transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease; }
.category-option input:checked + span { border-color: var(--acid); background: rgba(214, 245, 106, 0.11); color: var(--acid); }
.category-option input:focus-visible + span { outline: 3px solid var(--acid); outline-offset: 2px; }
.toggle-option { display: flex; min-height: 48px; align-items: center; gap: 11px; color: #e3e4dc; font-size: 13px; font-weight: 700; cursor: pointer; }
.toggle-option input { width: 19px; height: 19px; accent-color: var(--acid); }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 8px; }
.form-actions .button { min-width: 190px; }
.form-message { min-height: 20px; margin: 4px 0; color: var(--mint); font-size: 13px; }
.form-message.is-error { color: var(--danger); }
.notice { margin-bottom: 22px; padding: 14px 16px; border-left: 3px solid var(--coral); background: rgba(255, 121, 95, 0.09); color: #ffd0c7; font-size: 14px; }
.single-column { grid-template-columns: 1fr; gap: 18px; }
.single-column .button { width: 100%; }
.join-shell { padding-top: 35px; }

.room-layout { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 64px; align-items: start; }
.room-main .page-heading { margin-bottom: 27px; }
.code-board { display: grid; justify-items: center; gap: 4px; width: min(100%, 490px); padding: 28px 20px 25px; border: 1px solid rgba(214, 245, 106, 0.32); background: linear-gradient(145deg, rgba(214, 245, 106, 0.08), transparent 60%), var(--ink-soft); }
.code-board strong { color: var(--acid); font-family: var(--display-font); font-size: 78px; font-weight: 400; line-height: 1.1; letter-spacing: 7px; }
.code-board > span:last-child { color: var(--muted); font-size: 12px; }
.room-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.players-panel { padding-left: 25px; border-left: 1px solid var(--line); }
.host-live-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; max-width: 490px; margin-top: 22px; }
.host-live-stat { display: grid; gap: 3px; padding: 11px 13px; border-left: 2px solid var(--acid); background: rgba(44, 49, 46, 0.7); }
.host-live-stat span { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: 1px; }
.host-live-stat strong { font-size: 16px; }
.host-controls { display: flex; flex-wrap: wrap; grid-column: 1 / -1; gap: 8px; padding-top: 6px; }
.host-controls .button { flex: 1; min-width: 130px; }
.button-danger { border-color: rgba(255, 121, 95, 0.5); background: rgba(255, 121, 95, 0.11); color: #ff9b88; }
.button-danger:hover:not(:disabled) { border-color: var(--coral); background: rgba(255, 121, 95, 0.2); }
.pause-callout { margin: 22px 0; color: var(--coral); font-family: var(--display-font); font-size: 28px; text-transform: uppercase; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; padding: 0 0 14px; border-bottom: 1px solid var(--line); }
.panel-heading h2 { margin: 0; font-family: var(--display-font); font-size: 24px; font-weight: 400; text-transform: uppercase; }
.count-badge { display: grid; width: 30px; aspect-ratio: 1; place-items: center; border-radius: 50%; background: var(--acid); color: var(--ink); font-size: 13px; font-weight: 900; }
.player-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.player-row { display: flex; min-height: 55px; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.player-number { color: var(--coral); font-size: 11px; font-weight: 800; }
.player-name { font-size: 14px; }
.empty-list { padding: 22px 0; color: var(--muted); font-size: 13px; }
.share-row { display: flex; align-items: center; gap: 18px; margin-top: 50px; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.share-row > div:first-child { flex: 1; min-width: 0; }
.share-row .eyebrow { margin: 0; }
.share-row p { overflow-wrap: anywhere; margin: 5px 0 0; color: #c4c8c0; font-size: 13px; }
.room-join { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 32px; width: 100%; max-width: 850px; margin: 32px auto 0; padding: 24px; border: 1px solid var(--line); background: var(--ink-soft); text-align: left; }
.room-join-qr { display: block; flex: 0 0 auto; width: 300px; height: auto; max-width: 100%; aspect-ratio: 1; object-fit: contain; padding: 0; background: #fff; }
.room-join-copy { flex: 1 1 240px; min-width: 0; max-width: 380px; }
.room-join-copy p { margin: 16px 0 0; color: #c4c8c0; font-size: 18px; line-height: 1.5; }
.room-join-copy .room-join-heading { margin: 0 0 22px; color: var(--acid); font-size: 21px; font-weight: 800; letter-spacing: 1px; }
.room-join-label { display: block; color: var(--muted); font-size: 13px; letter-spacing: 2px; }
.room-join-code { display: block; color: var(--acid); font-size: 55px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.2; letter-spacing: 4px; }
.room-join-alternative { overflow-wrap: anywhere; }
@media (min-width: 1200px) { .room-join-qr { width: 340px; } }
@media (max-width: 700px) {
    .room-join { flex-direction: column; gap: 24px; padding: 20px 12px; text-align: center; }
    .room-join-qr { width: 244px; }
    .room-join-copy { flex: 0 1 auto; width: 100%; }
    .room-join-code { font-size: 44px; }
    .room-join-copy p { font-size: 16px; }
}
.empty-state { max-width: 650px; padding: 10vh 0; }
.empty-state > p:not(.eyebrow) { max-width: 500px; margin: 18px 0 28px; color: var(--muted); }

.game-board { max-width: 830px; margin: 10px auto 0; animation: arrive 350ms ease both; }
.question-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--acid); font-size: 11px; font-weight: 800; letter-spacing: 1px; }
.game-question-text { margin: 20px 0 24px; font-family: var(--display-font); font-size: 48px; font-weight: 400; line-height: 1.05; }
.answer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.answer-option { display: flex; min-height: 64px; align-items: center; gap: 15px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 2px; background: var(--ink-soft); color: var(--paper); text-align: left; }
.answer-letter { display: grid; width: 34px; min-width: 34px; aspect-ratio: 1; place-items: center; border-radius: 2px; background: var(--ink-raised); color: var(--acid); font-family: var(--display-font); font-size: 19px; }
.answer-text { font-size: 15px; font-weight: 700; line-height: 1.25; }
.answer-option.is-correct { border-color: var(--acid); background: rgba(214, 245, 106, 0.13); }
.host-live-count { margin: 18px 0; color: var(--muted); font-size: 13px; }
.result-callout { margin: 22px 0 4px; color: var(--acid); font-family: var(--display-font); font-size: 28px; text-transform: uppercase; }
.explanation { max-width: 700px; margin: 12px 0; color: #c0c5bd; font-size: 15px; }
.ranking-list { display: grid; gap: 0; margin: 22px 0; padding: 0; list-style: none; }
.ranking-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 5px 14px; padding: 12px 10px; border-bottom: 1px solid var(--line); }
.rank-number { color: var(--coral); font-family: var(--display-font); font-size: 20px; }
.rank-name { overflow: hidden; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.rank-score { color: var(--acid); font-size: 14px; font-weight: 800; }
.rank-detail { grid-column: 2 / -1; color: var(--muted); font-size: 11px; }
.ranking-compact { margin: 12px 0 22px; }
.ranking-compact .ranking-row { padding: 8px 10px; }
.next-question-button { margin-top: 4px; }
.winner-state h2, .tv-finished h2 { margin: 12px 0 0; color: var(--acid); font-family: var(--display-font); font-size: 42px; font-weight: 400; }
.winner-name { margin: 3px 0; font-family: var(--display-font); font-size: 55px; line-height: 1; }
.winner-stats { margin: 5px 0; color: #c5c9c0; }
.configured-prize { width: fit-content; margin: 18px 0 0; padding: 8px 12px; border-left: 3px solid var(--coral); background: rgba(255, 121, 95, 0.1); color: #ffc2b5; font-size: 13px; font-weight: 800; }
.last-place { margin: 24px 0 0; color: var(--muted); font-size: 14px; font-weight: 800; }
.final-ranking { margin-top: 36px; }
.final-ranking h2 { color: var(--paper); font-family: var(--display-font); font-size: 26px; }
.bank-summary { margin: -12px 0 20px; color: var(--acid); font-size: 14px; font-weight: 800; }
.bank-table-wrap { overflow-x: auto; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.bank-table { width: 100%; border-collapse: collapse; text-align: right; }
.bank-table th, .bank-table td { padding: 15px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.bank-table thead th { color: var(--acid); font-size: 10px; letter-spacing: 1px; text-transform: uppercase; }
.bank-table th:first-child { text-align: left; }
.bank-table tbody th { font-weight: 700; }
.bank-table tfoot th, .bank-table tfoot td { border-top: 1px solid var(--acid); border-bottom: 0; color: var(--acid); font-weight: 900; }
.bank-note { margin-top: 17px; color: var(--muted); font-size: 13px; }

.player-shell { width: min(760px, calc(100% - 36px)); padding-top: 34px; }
.player-page .topbar { min-height: 60px; }
.waiting-state { display: grid; min-height: 65vh; align-content: center; justify-items: center; text-align: center; animation: arrive 500ms ease both; }
.waiting-mark { display: grid; width: 78px; aspect-ratio: 1; place-items: center; margin-bottom: 24px; border: 1px solid var(--acid); border-radius: 50%; color: var(--acid); font-family: var(--display-font); font-size: 52px; }
.waiting-state h1 { max-width: 560px; margin: 0; font-family: var(--display-font); font-size: 50px; font-weight: 400; line-height: 1; text-transform: uppercase; }
.waiting-state > p:not(.eyebrow) { color: var(--muted); }
.waiting-dots { display: flex; gap: 7px; margin-top: 12px; }
.waiting-dots i { width: 7px; aspect-ratio: 1; border-radius: 50%; background: var(--coral); animation: pulse 900ms infinite alternate; }
.waiting-dots i:nth-child(2) { animation-delay: 180ms; }
.waiting-dots i:nth-child(3) { animation-delay: 360ms; }
.question-view { animation: arrive 250ms ease both; }
.question-view .question-meta { justify-content: center; }
.player-timer { display: flex; align-items: baseline; justify-content: center; gap: 6px; margin: 18px 0 8px; color: var(--acid); }
.player-timer span:first-child { font-family: var(--display-font); font-size: 53px; line-height: 1; }
.player-timer span:last-child { color: var(--muted); font-size: 12px; }
.player-timer.is-urgent { color: var(--coral); }
.question-view h1 { margin: 12px auto 25px; font-family: var(--display-font); font-size: 44px; font-weight: 400; line-height: 1.06; text-align: center; }
.player-page .answer-grid { grid-template-columns: 1fr; gap: 9px; }
.answer-button { width: 100%; min-height: 64px; cursor: pointer; transition: border-color 120ms ease, background-color 120ms ease, transform 120ms ease; }
.answer-button:hover:not(:disabled) { transform: translateX(3px); border-color: var(--acid); }
.answer-button:disabled { opacity: 0.56; cursor: default; }
.answer-button.is-selected { border-color: var(--acid); background: rgba(214, 245, 106, 0.12); opacity: 1; }
.answer-message { min-height: 25px; margin: 16px 0; color: var(--mint); font-size: 15px; font-weight: 800; text-align: center; }
.question-image { display: block; max-width: 100%; max-height: 250px; margin: 0 auto 20px; object-fit: contain; }
.result-state, .ranking-state, .winner-state { padding-top: 30px; animation: arrive 300ms ease both; }
.result-state h2 { margin: 0; font-family: var(--display-font); font-size: 34px; font-weight: 400; text-transform: uppercase; }
.revealed-answer { color: var(--acid); font-size: 21px; font-weight: 800; }
.personal-result { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--mint); font-weight: 800; }
.ranking-state h2 { margin: 0; font-family: var(--display-font); font-size: 34px; font-weight: 400; text-transform: uppercase; }

.tv-page { display: flex; min-height: 100vh; flex-direction: column; background-image: radial-gradient(ellipse at 50% 20%, rgba(214, 245, 106, 0.09), transparent 45%); }
.tv-topbar { display: flex; min-height: 70px; align-items: center; gap: 24px; padding: 0 4vw; border-bottom: 1px solid var(--line); }
.tv-topbar .wordmark { margin-right: auto; font-size: 17px; }
.tv-topbar > span:nth-child(2) { color: var(--muted); font-size: 13px; }
.icon-button { display: grid; width: 42px; aspect-ratio: 1; place-items: center; border: 1px solid var(--line); border-radius: 2px; background: transparent; cursor: pointer; font-size: 23px; }
.icon-button:hover { border-color: var(--acid); color: var(--acid); }
.tv-stage { display: grid; width: min(1500px, calc(100% - 8vw)); flex: 1; align-content: center; margin: 0 auto; padding: 50px 0; }
.tv-waiting { text-align: center; }
.tv-waiting .eyebrow { font-size: 13px; }
.tv-waiting h1 { margin: 24px 0 5px; font-family: var(--display-font); font-size: 38px; font-weight: 400; text-transform: uppercase; }
.tv-waiting > p:not(.eyebrow) { margin: 6px 0; color: var(--muted); font-size: 17px; }
.tv-player-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; margin: 25px auto; }
.tv-player-chip { padding: 8px 12px; border: 1px solid var(--line); border-radius: 2px; font-size: 14px; }
.tv-question { position: relative; animation: arrive 300ms ease both; }
.tv-meta { display: flex; justify-content: center; gap: 32px; color: var(--acid); font-size: 13px; font-weight: 800; letter-spacing: 1px; }
.tv-timer { position: absolute; top: 0; right: 0; display: grid; width: 72px; aspect-ratio: 1; place-items: center; border: 2px solid var(--acid); border-radius: 50%; color: var(--acid); font-family: var(--display-font); font-size: 40px; }
.tv-timer.is-urgent { border-color: var(--coral); color: var(--coral); animation: timer-pulse 700ms infinite alternate; }
.tv-question h1 { max-width: 1200px; margin: 40px auto; font-family: var(--display-font); font-size: 72px; font-weight: 400; line-height: 1.04; text-align: center; }
.tv-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tv-option { display: flex; min-height: 85px; align-items: center; gap: 20px; padding: 16px 22px; border: 1px solid var(--line); border-radius: 2px; background: rgba(44, 49, 46, 0.78); }
.tv-option .answer-letter { width: 42px; min-width: 42px; font-size: 24px; }
.tv-option .answer-text { font-size: 21px; }
.tv-answer-count { margin: 20px 0 0; color: var(--muted); font-size: 13px; text-align: center; }
.tv-reveal { text-align: center; animation: arrive 300ms ease both; }
.tv-revealed-answer { margin: 12px 0; color: var(--acid); font-family: var(--display-font); font-size: 78px; font-weight: 400; line-height: 1; }
.tv-reveal .explanation { max-width: 900px; margin: 20px auto; font-size: 19px; }
.tv-ranking { width: min(880px, 100%); margin: 0 auto; animation: arrive 300ms ease both; }
.tv-ranking h2 { margin: 0; font-family: var(--display-font); font-size: 38px; font-weight: 400; text-transform: uppercase; }
.tv-ranking .ranking-row { grid-template-columns: 50px minmax(0, 1fr) auto; padding: 14px 12px; }
.tv-ranking .rank-number { font-size: 29px; }
.tv-ranking .rank-name { font-size: 20px; }
.tv-ranking .rank-score { font-size: 19px; }
.tv-finished { width: min(970px, 100%); margin: 0 auto; text-align: center; animation: arrive 300ms ease both; }
.tv-finished .winner-name { font-size: 84px; }
.tv-finished .final-ranking { margin-top: 24px; text-align: left; }
.tv-error { position: fixed; right: 20px; bottom: 8px; left: 20px; color: var(--danger); text-align: center; }

@keyframes arrive { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { from { opacity: 0.35; transform: translateY(2px); } to { opacity: 1; transform: translateY(-2px); } }
@keyframes timer-pulse { to { transform: scale(1.06); } }

@media (max-width: 900px) {
    .home-shell::before { left: 38%; width: 300px; height: 300px; }
}

@media (max-width: 760px) {
    .home-shell { grid-template-columns: 1fr; gap: 52px; width: min(560px, calc(100% - 40px)); padding: 62px 0 100px; }
    .home-copy, .join-panel { min-width: 0; }
    .home-shell::before { top: 5%; left: 14%; width: 220px; height: 220px; box-shadow: 0 0 0 26px rgba(214, 245, 106, 0.018), 0 0 0 52px rgba(214, 245, 106, 0.015); }
    .home-copy h1 { font-size: 72px; }
    .home-description { margin: 21px 0 24px; font-size: 16px; }
    .join-panel { padding: 25px 0 0; border-top: 1px solid var(--line); border-left: 0; }
    .join-panel::before { top: -2px; left: 0; width: 62px; height: 3px; }
    .join-panel h2 { font-size: 27px; }
    .home-footer { bottom: 22px; flex-wrap: wrap; justify-content: center; gap: 8px 10px; font-size: 10px; text-align: center; }
    .topbar { min-height: 62px; padding: 0 20px; }
    .content-shell { width: calc(100% - 40px); padding-top: 32px; }
    .narrow-shell { width: calc(100% - 40px); }
    .page-heading h1, .empty-state h1 { font-size: 42px; }
    .form-layout { grid-template-columns: 1fr; gap: 16px; }
    .field-wide { grid-column: auto; }
    .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-actions { align-items: stretch; }
    .form-actions .button { width: 100%; }
    .room-layout { grid-template-columns: 1fr; gap: 35px; }
    .players-panel { padding: 0; border: 0; }
    .host-live-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .host-controls .button { min-width: 100%; }
    .code-board strong { font-size: 66px; }
    .room-actions { display: grid; }
    .share-row { flex-wrap: wrap; margin-top: 32px; }
    .share-row > div:first-child { flex-basis: 100%; }
    .share-row .button { flex: 1; }
    .answer-grid { grid-template-columns: 1fr; }
    .game-question-text { font-size: 36px; }
    .player-shell { width: calc(100% - 32px); }
    .waiting-state h1 { font-size: 39px; }
    .question-view h1 { font-size: 34px; }
    .tv-topbar { min-height: 58px; padding: 0 16px; }
    .tv-topbar .wordmark { font-size: 14px; }
    .tv-stage { width: calc(100% - 32px); padding: 32px 0; }
    .tv-waiting h1 { font-size: 29px; }
    .tv-waiting > p:not(.eyebrow) { font-size: 14px; }
    .tv-meta { justify-content: flex-start; flex-wrap: wrap; gap: 8px 14px; padding-right: 62px; font-size: 10px; }
    .tv-timer { width: 54px; font-size: 30px; }
    .tv-question h1 { margin: 35px auto 24px; font-size: 40px; text-align: left; }
    .tv-options { grid-template-columns: 1fr; gap: 8px; }
    .tv-option { min-height: 60px; gap: 12px; padding: 10px 12px; }
    .tv-option .answer-letter { width: 34px; min-width: 34px; font-size: 19px; }
    .tv-option .answer-text { font-size: 16px; }
    .tv-ranking h2 { font-size: 30px; }
    .tv-ranking .ranking-row { grid-template-columns: 34px minmax(0, 1fr) auto; }
    .tv-ranking .rank-name { font-size: 15px; }
    .tv-ranking .rank-score { font-size: 14px; }
    .tv-revealed-answer { font-size: 48px; }
    .tv-finished .winner-name { font-size: 54px; }
}

@media (max-width: 360px) {
    .home-copy h1 { font-size: 60px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
