body :is(
  .current-discipline strong,
  .placeholder-page h1,
  .game-title-row h1,
  .conductor-hero h1,
  .game-conductor-heading h1,
  .conductor-live-heading h1,
  .sprint-live-heading h1,
  .word-config-section > h1,
  .quote-config-section > h1,
  .quote-live-section > h1,
  .archive-hero h1,
  .identity-panel h1,
  .section-heading :is(h1, h2),
  .admin-section > h1,
  .screen-title:not(.screen-topics-question),
  .screen-content > h1:not(.screen-topics-question),
  .screen-join-title,
  .screen-scene-sting-copy strong,
  .screen-lobby-moment.is-all-ready .screen-lobby-moment-copy strong,
  .screen-squares-cue,
  .screen-slots-copy > h1,
  .screen-slots-machine-marquee strong,
  .ceremony-champion-label,
  .platform-demo-current h2,
  .slots-machine-marquee strong,
  .platform-hero h1,
  .platform-section-intro h2,
  .platform-final-cta h2,
  .auth-intro h1,
  .auth-card h2,
  .login-card h1,
  .dashboard-heading h1,
  .dashboard-empty h2,
  .create-heading h1,
  .session-heading h1,
  .session-game-choice h2,
  .create-section h2,
  .rehearsal-empty h1,
  .info-heading h1
) {
  font-family: var(--display-font);
  font-stretch: var(--display-font-stretch);
  font-style: var(--display-font-style);
  font-synthesis: none;
  font-weight: var(--display-font-weight);
  letter-spacing: normal;
}

.identity-panel h1 span { font-family: var(--ui-font); font-stretch: normal; font-style: normal; font-synthesis: none; font-weight: 850; }

body :is(
  .game-timer,
  .game-summary strong,
  .slots-scoreboard strong,
  .slots-line-callout > strong,
  .quote-live-status strong,
  .closest-live-correct strong,
  .topics-player-score,
  .screen-topics-scores strong,
  .screen-topics-board-row span,
  .sprint-game-meta strong,
  .sprint-expression,
  .sprint-live-counts strong,
  .sprint-live-roster article > strong,
  .screen-sprint-rank,
  .screen-sprint-score,
  .screen-readiness strong,
  .screen-quote-timer,
  .screen-closest-correct strong,
  .screen-closest-answers article b,
  .screen-squares-timer,
  .screen-five-letters-summary strong,
  .screen-five-letters-card-footer > strong,
  .squares-game-meta strong,
  .squares-cell > span,
  .archive-podium-rank,
  .participant-total > span,
  .ceremony-results:not(.ceremony-chart-results) .result-rank,
  .conductor-readiness dd,
  .code-input,
  .dashboard-empty > span
) {
  font-family: var(--display-font);
  font-stretch: var(--display-font-stretch);
  font-style: var(--display-font-style);
  font-synthesis: none;
  font-weight: var(--display-font-weight);
  letter-spacing: var(--display-letter-spacing, normal);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}
.tournament-lockup { display: inline-flex; min-width: 0; max-width: 100%; align-items: center; gap: .62em; color: var(--paper); font-size: .88rem; line-height: 1.2; }
.tournament-lockup-product { display: inline-flex; flex: 0 0 auto; align-items: center; color: var(--paper); text-decoration: none; }
.tournament-lockup-product .partyathlon-wordmark { display: block; width: auto; max-width: none; height: 2rem; }
.tournament-lockup-divider { width: 1px; height: 1.05em; flex: 0 0 auto; background: var(--line); }
.tournament-lockup-name { min-width: 0; overflow: hidden; color: var(--muted); font-weight: 800; letter-spacing: .01em; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.tournament-lockup-product:hover { opacity: .78; }
.tournament-lockup-name:hover { color: var(--paper); }

.identity-page { display: grid; min-height: 100vh; grid-template-rows: auto 1fr; }
.event-mark { position: relative; display: flex; min-width: 0; align-items: center; border-bottom: 1px solid var(--line); padding: 1.2rem; }
.event-mark .tournament-lockup { width: 100%; }
.identity-panel { width: min(100%, 56rem); align-self: end; justify-self: center; padding: 2rem 1.2rem 2.5rem; }
.identity-panel h1 { margin: 0 0 2rem; font-size: clamp(2.6rem, 14vw, 5rem); letter-spacing: -.025em; line-height: 1; }
.identity-panel h1 span { overflow-wrap: anywhere; color: var(--brand-accent); }
.participant-picker { display: grid; }
.participant-picker button { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr) auto; align-items: center; border: 0; border-top: 1px solid var(--line); padding: 1rem 0; background: none; color: var(--paper); text-align: left; cursor: pointer; }
.participant-picker button:last-child { border-bottom: 1px solid var(--line); }
.participant-picker button span { color: var(--muted); font-size: .72rem; font-variant-numeric: tabular-nums; }
.participant-picker button strong { min-width: 0; overflow-wrap: anywhere; }
.participant-picker button b { color: var(--brand-accent); font-size: .68rem; letter-spacing: .06em; text-align: right; }
.participant-picker button:hover { color: var(--brand-accent); }
.participant-picker button:disabled { color: var(--muted); cursor: not-allowed; opacity: .62; }
.participant-picker button:disabled b { color: var(--orange); }
.choice-actions { display: flex; gap: var(--action-gap); }
.participant-confirm-form { width: min(100%, 30rem); }
.identity-error { position: static; flex: 0 0 auto; width: 100%; margin: 0 0 1rem; }

@media (max-width: 699px) {
  .identity-shell { height: 100dvh; min-height: 0; overflow: hidden; }
  .identity-page { height: 100%; min-height: 0; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
  .event-mark { min-height: 0; padding: clamp(.8rem, 2.6dvh, 1.1rem) 1.2rem; }
  .event-mark .tournament-lockup { font-size: .76rem; }
  .identity-panel { align-self: stretch; display: flex; min-height: 0; flex-direction: column; justify-content: flex-end; padding: clamp(1rem, 3.5dvh, 1.7rem) 1.2rem max(1rem, env(safe-area-inset-bottom)); overflow: hidden; }
  .identity-panel .eyebrow { flex: 0 0 auto; margin-bottom: .5rem; }
  .identity-panel h1 { flex: 0 0 auto; margin-bottom: clamp(1rem, 3dvh, 1.6rem); font-size: clamp(2.4rem, 12vw, 4rem); }
  .participant-picker { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  .participant-picker button { min-height: 48px; padding: .75rem 0; }
  .choice-actions { flex: 0 0 auto; }
}

.portal-page { width: min(100%, 920px); margin: auto; }
.portal-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); padding: max(1rem, env(safe-area-inset-top)) max(var(--page-gutter), env(safe-area-inset-right)) 1rem max(var(--page-gutter), env(safe-area-inset-left)); }
.portal-header .tournament-lockup { flex: 1 1 auto; }
.portal-header .text-button { font-size: .72rem; }
.portal-hero { padding: 4rem 1.2rem 1.5rem; }
.portal-hero h1 { margin: 0 0 3.5rem; overflow-wrap: anywhere; font-size: clamp(3.2rem, 16vw, 7rem); letter-spacing: -.02em; line-height: 1; }
.current-discipline { border-left: 5px solid var(--brand-accent); padding: .3rem 0 .3rem 1rem; }
.current-discipline span, .current-discipline small { display: block; color: var(--muted); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; }
.current-discipline strong { display: block; margin: .25rem 0; font-size: clamp(1.5rem, 7vw, 2.7rem); letter-spacing: -.015em; }
.schedule { padding: 3.5rem 1.2rem; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.3rem; }
.section-heading .eyebrow { margin: 0; }
.section-heading h1, .section-heading h2 { min-width: 0; overflow-wrap: anywhere; margin: 0; font-size: clamp(2rem, 8vw, 3.5rem); letter-spacing: -.02em; line-height: 1.05; }
.section-heading sup { color: var(--brand-accent); font-size: .7rem; }
.discipline-list { margin: 0; padding: 0; list-style: none; }
.discipline-list li { display: grid; grid-template-columns: 2.5rem 1fr auto; gap: .5rem; align-items: center; min-height: 76px; border-top: 1px solid var(--line); }
.discipline-list li:last-child { border-bottom: 1px solid var(--line); }
.discipline-number { color: var(--muted); font-size: .72rem; }
.discipline-list strong, .discipline-list small { display: block; }
.discipline-list strong { font-size: 1rem; }
.discipline-list small { margin-top: .25rem; color: var(--muted); font-size: .68rem; text-transform: uppercase; }
.discipline-list a { color: var(--muted); font-size: .72rem; text-decoration: none; }
.discipline-list a span { color: var(--brand-accent); }
.discipline-list li[data-status="in_progress"] { border-left: 4px solid var(--brand-accent); padding-left: .8rem; }
.discipline-list li[data-status="in_progress"] .discipline-status { color: var(--brand-accent); }
.discipline-list li[data-status="completed"] { opacity: .58; }
.discipline-list li[data-status="correcting"] { border-left: 4px solid var(--orange); padding-left: .8rem; }
.discipline-list li[data-status="correcting"] .discipline-status { color: var(--orange); }
.discipline-list li[data-status="skipped"] { opacity: .42; }

.placeholder-page { display: flex; min-height: 100vh; flex-direction: column; }
.placeholder-page section { margin: auto 0; padding: 1.2rem; }
.placeholder-page h1 { max-width: 900px; margin: 0; font-size: clamp(3.5rem, 15vw, 9rem); letter-spacing: -.03em; line-height: .92; }
.placeholder-page section > p:not(.eyebrow) { max-width: 40rem; color: var(--muted); font-size: 1.1rem; line-height: 1.6; }
.live-pill { display: inline-block; border: 1px solid var(--brand-accent); padding: .45rem .7rem; color: var(--brand-accent); font-size: .72rem; font-weight: 800; text-transform: uppercase; }

.screen-shell { overflow: hidden; }
.screen-app { display: grid; width: 100vw; height: 100vh; height: 100dvh; min-height: 0; grid-template-rows: auto minmax(0, 1fr) auto; padding: 3vh 4vw; }
.screen-header, .screen-footer { display: flex; justify-content: space-between; gap: 2vw; color: var(--muted); font-size: clamp(.65rem, 1vw, 1rem); font-weight: 800; letter-spacing: .06em; }
.screen-header { min-width: 0; }
.screen-header > div { display: flex; flex: 0 0 auto; align-items: center; gap: 1.2vw; }
.screen-header b { color: var(--brand-accent); }
.screen-header .tournament-lockup { flex: 1 1 auto; font-size: clamp(.8rem, 1.15vw, 1.25rem); }
.screen-footer span:last-child { overflow: hidden; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.screen-sound-toggle { min-height: var(--control-height); border: 1px solid var(--line); border-radius: 999px; padding: .35rem .65rem; background: transparent; color: var(--muted); font: inherit; font-size: var(--button-font-size-small); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.screen-sound-toggle:hover { border-color: var(--brand-accent); color: var(--paper); }
.screen-sound-toggle.is-enabled { border-color: var(--brand-accent); color: var(--brand-accent); box-shadow: 0 0 1vw rgba(var(--brand-accent-rgb), .18); }
.screen-sound-toggle:disabled { cursor: wait; opacity: .65; }
.screen-content { position: relative; display: flex; min-height: 0; flex-direction: column; align-items: center; justify-content: center; text-align: center; transform: scale(var(--screen-fit-scale, 1)); transform-origin: var(--screen-fit-origin-x, center) var(--screen-fit-origin-y, center); }
.screen-kicker { margin: 0 0 2vh; color: var(--brand-accent); font-size: clamp(.85rem, 1.4vw, 1.5rem); font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.screen-title { max-width: 90vw; margin: 0; overflow-wrap: anywhere; font-size: clamp(4rem, min(10vw, 20vh), 11rem); letter-spacing: -.03em; line-height: 1; }
.screen-subtitle { max-width: 90vw; margin: 3vh 0 0; overflow-wrap: anywhere; color: var(--muted); font-size: clamp(1.4rem, 2.6vw, 3rem); }
.screen-preparation { display: grid; width: min(92vw, 1500px); max-height: none; grid-template-columns: minmax(240px, .78fr) minmax(0, 1.22fr); column-gap: clamp(2rem, 5vw, 7rem); row-gap: clamp(.8rem, 2vh, 1.4rem); align-items: center; text-align: left; }
.screen-join-qr { display: grid; justify-items: center; gap: 1.5vh; }
.screen-join-qr img { width: min(35vw, 50vh, 520px); height: auto; aspect-ratio: 1; padding: clamp(.6rem, 1vw, 1.1rem); background: #fff; }
.screen-join-url { color: var(--paper); font-size: clamp(.8rem, 1.35vw, 1.4rem); font-weight: 800; letter-spacing: .02em; }
.screen-join-details { min-width: 0; }
.screen-join-title { margin: 0; font-size: clamp(2.5rem, min(4.2vw, 14vh), 6rem); letter-spacing: -.02em; line-height: 1.05; white-space: nowrap; }
.screen-join-instruction { margin: 2vh 0 0; color: var(--muted); font-size: clamp(1.2rem, 2.2vw, 2.5rem); }
.screen-lobby-prompt { display: grid; width: min(88vw, 1100px); min-height: clamp(2.5rem, 5vh, 4rem); grid-column: 1 / -1; grid-template-columns: minmax(2.5rem, 1fr) minmax(0, 44rem) minmax(2.5rem, 1fr); align-items: center; justify-self: center; gap: clamp(1rem, 2vw, 2rem); margin: 0 0 clamp(1rem, 3vh, 2rem); color: var(--paper); font-size: clamp(1.2rem, 2vw, 2.2rem); font-weight: 850; line-height: 1.15; text-align: center; }
.screen-lobby-prompt::before, .screen-lobby-prompt::after { width: min(100%, clamp(2.5rem, 8vw, 9rem)); height: 1px; background: var(--brand-accent); content: ""; opacity: .55; }
.screen-lobby-prompt::before { justify-self: end; }
.screen-lobby-prompt::after { justify-self: start; }
.screen-lobby-prompt-copy { min-width: 0; overflow-wrap: anywhere; }
.screen-lobby-prompt-copy.is-entering { animation: screen-lobby-prompt-in .45s ease both; }
.screen-readiness { display: flex; align-items: baseline; gap: 1vw; margin: 3.5vh 0 1.5vh; border-top: 3px solid var(--brand-accent); padding-top: 1.4vh; }
.screen-readiness strong { color: var(--brand-accent); font-size: clamp(2rem, 4vw, 4.8rem); letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.screen-readiness span { color: var(--muted); font-size: clamp(.8rem, 1.2vw, 1.3rem); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.screen-ready-list { display: grid; max-height: none; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6vh 2vw; margin: 0; padding: 0; list-style: none; overflow: visible; }
.screen-ready-list li { display: grid; min-width: 0; grid-template-columns: 1.5em minmax(0, 1fr); align-items: center; color: var(--muted); font-size: clamp(.85rem, 1.45vw, 1.55rem); }
.screen-ready-list li > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.screen-ready-list li.is-selected { color: var(--paper); }
.screen-ready-mark { color: var(--line); font-weight: 950; }
.screen-ready-list li.is-selected .screen-ready-mark { color: var(--brand-accent); }
.screen-ready-list li.screen-ready-more { color: var(--paper); font-weight: 800; }
.screen-ready-list li.screen-ready-more .screen-ready-mark { color: var(--brand-accent); }
.screen-ready-empty { margin-top: 3vh; color: var(--muted); font-size: clamp(.9rem, 1.3vw, 1.4rem); }
.screen-lobby-moment { position: absolute; z-index: 30; right: clamp(.75rem, 2vw, 2rem); bottom: clamp(.75rem, 2vh, 1.5rem); display: grid; width: min(38vw, 34rem); max-width: calc(100% - 2rem); min-height: clamp(5.5rem, 12vh, 8rem); align-items: center; overflow: hidden; border: 1px solid rgba(var(--brand-accent-rgb), .42); border-left: clamp(4px, .4vw, 7px) solid var(--brand-accent); padding: clamp(.9rem, 1.5vw, 1.4rem) clamp(1rem, 1.8vw, 1.7rem); background: rgba(7, 9, 8, .96); box-shadow: 0 1rem 3rem rgba(0, 0, 0, .48), inset 0 0 3rem rgba(var(--brand-accent-rgb), .045); pointer-events: none; animation: screen-lobby-toast-in .4s cubic-bezier(.2, .8, .2, 1); }
.screen-lobby-moment.is-leaving { opacity: 0; transform: translate3d(0, .75rem, 0) scale(.98); transition: opacity .4s ease, transform .4s ease; }
.screen-lobby-moment-copy { position: relative; z-index: 2; display: grid; justify-items: start; gap: clamp(.3rem, .6vh, .55rem); width: 100%; text-align: left; }
.screen-lobby-moment-copy span { color: var(--brand-accent); font-size: clamp(.68rem, .82vw, .92rem); font-weight: 900; letter-spacing: .18em; text-transform: uppercase; }
.screen-lobby-moment-copy strong { max-width: 100%; overflow-wrap: anywhere; font-size: clamp(1.75rem, min(2.8vw, 5.5vh), 3.25rem); letter-spacing: -.035em; line-height: .95; }
.screen-lobby-moment.is-all-ready { inset: 5%; width: auto; max-width: none; min-height: 0; place-items: center; border: 1px solid var(--brand-accent); padding: 0; background: rgba(7, 9, 8, .94); box-shadow: 0 2rem 7rem rgba(0, 0, 0, .6), inset 0 0 16vw rgba(var(--brand-accent-rgb), .13); backdrop-filter: blur(12px); animation-name: screen-lobby-moment-in; animation-duration: .45s; }
.screen-lobby-moment.is-all-ready.is-leaving { transform: scale(1.025); }
.screen-lobby-moment.is-all-ready .screen-lobby-moment-copy { justify-items: center; gap: 1.5vh; width: min(88%, 1200px); text-align: center; }
.screen-lobby-moment.is-all-ready .screen-lobby-moment-copy span { font-size: clamp(.75rem, 1.3vw, 1.35rem); }
.screen-lobby-moment.is-all-ready .screen-lobby-moment-copy strong { font-size: clamp(3.5rem, min(9vw, 18vh), 10rem); letter-spacing: -.045em; line-height: .9; }
.screen-lobby-confetti { position: absolute; z-index: 1; top: -12%; left: var(--x); width: clamp(7px, .75vw, 14px); height: clamp(14px, 1.4vw, 25px); background: var(--confetti); opacity: 0; animation: screen-lobby-confetti-fall 2.8s cubic-bezier(.15, .7, .35, 1) var(--delay) infinite; }
@keyframes screen-lobby-prompt-in { from { opacity: .72; } to { opacity: 1; } }
@keyframes screen-lobby-toast-in { from { opacity: 0; transform: translate3d(1.25rem, .75rem, 0) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes screen-lobby-moment-in { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }
@keyframes screen-lobby-confetti-fall { 0% { opacity: 0; transform: translate3d(0, -4vh, 0) rotate(0); } 12% { opacity: 1; } 100% { opacity: 0; transform: translate3d(var(--drift), 100vh, 0) rotate(var(--turn)); } }
@media (max-aspect-ratio: 4/3) {
  .screen-preparation { column-gap: 3vw; }
}
@media (max-width: 620px) {
  .screen-preparation { width: 100%; grid-template-columns: minmax(0, 1fr); gap: 1rem; text-align: center; }
  .screen-join-qr img { width: min(44vw, 24vh, 240px); }
  .screen-join-title { font-size: clamp(1.75rem, 7.2vw, 2.6rem); white-space: normal; }
  .screen-join-instruction { margin-top: .65rem; font-size: 1rem; }
  .screen-readiness { justify-content: center; margin-top: 1rem; gap: .5rem; }
  .screen-ready-list { text-align: left; }
  .screen-lobby-prompt { width: 100%; grid-template-columns: 1rem minmax(0, 1fr) 1rem; gap: .75rem; margin-bottom: 0; font-size: 1rem; }
}
@media (max-width: 700px), (max-aspect-ratio: 3/4) {
  .screen-lobby-moment:not(.is-all-ready) { right: clamp(.5rem, 2vw, .75rem); bottom: clamp(.5rem, 2vh, .75rem); left: clamp(.5rem, 2vw, .75rem); width: auto; max-width: none; min-height: clamp(5rem, 12vh, 6.5rem); padding: .85rem 1rem; }
  .screen-lobby-moment:not(.is-all-ready) .screen-lobby-moment-copy strong { font-size: clamp(1.4rem, 6.5vw, 2.4rem); }
}
.ceremony-title { font-size: clamp(3rem, min(7vw, 16vh), 8rem); }
.ceremony-champion-title { display: grid; width: min(92vw, 1400px); max-width: none; justify-items: center; gap: clamp(.25rem, .6vh, .5rem); margin-top: clamp(.65rem, 1.8vh, 1.25rem); text-align: center; animation: ceremony-champion-title-reveal .65s cubic-bezier(.2, .8, .2, 1) both; }
.ceremony-champion-label { color: var(--gold); font-size: clamp(1.5rem, min(3vw, 5vh), 3.2rem); font-weight: 900; letter-spacing: .025em; line-height: 1.08; text-shadow: 0 0 2rem color-mix(in srgb, var(--gold) 20%, transparent); }
.ceremony-champion-name { max-width: 100%; overflow-wrap: anywhere; font-size: clamp(2.8rem, min(6vw, 10vh), 6.8rem); letter-spacing: -.035em; line-height: .92; }
.ceremony-results { display: grid; width: min(90vw, 900px); height: min(62vh, var(--screen-results-height, 3.1rem)); max-height: none; grid-template-columns: minmax(0, 1fr); grid-template-rows: repeat(var(--screen-result-count, 1), minmax(0, 1fr)); margin: 3vh 0 0; padding: 0; list-style: none; overflow: hidden; }
.ceremony-results li { display: grid; grid-template-columns: minmax(3rem, 4vw) minmax(0, 1fr) auto; column-gap: clamp(.5rem, 1vw, 1rem); align-items: center; border-top: 1px solid var(--line); padding: 1.2vh 0; text-align: left; }
.external-results-heading { display: grid; width: min(90vw, 900px); grid-template-columns: minmax(3rem, 4vw) minmax(0, 1fr) auto; column-gap: clamp(.5rem, 1vw, 1rem); margin-top: 2vh; color: var(--muted); font-size: clamp(.6rem, .85vw, .8rem); font-weight: 850; letter-spacing: .1em; text-align: left; text-transform: uppercase; }
.external-results-heading span:last-child { text-align: right; }
.screen-ceremony > .ceremony-results-reveal { margin-top: .6vh; }
.ceremony-results-reveal li.is-new-result { animation: ceremony-result-reveal .45s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes ceremony-result-reveal { from { opacity: 0; transform: translateY(1.2rem); } to { opacity: 1; transform: translateY(0); } }
.screen-ceremony { justify-content: flex-start; overflow: hidden; padding-top: clamp(1rem, 2vh, 1.5rem); }
.screen-ceremony > .screen-kicker { margin-bottom: 1vh; }
.screen-ceremony > .screen-subtitle { margin-top: 1.5vh; font-size: clamp(1rem, min(2.2vw, 4vh), 2.3rem); line-height: 1.15; }
.screen-ceremony > .ceremony-results { min-height: 0; margin-top: 1.5vh; }
.screen-ceremony > .ceremony-results li { min-height: 0; padding-block: .45vh; line-height: 1; }
.result-rank { color: var(--brand-accent); font-size: clamp(1.2rem, 2vw, 2.5rem); font-weight: 900; }
.result-name { min-width: 0; overflow: hidden; font-size: clamp(1.1rem, 2vw, 2.3rem); text-overflow: ellipsis; white-space: nowrap; }
.result-value { color: var(--muted); font-size: clamp(.8rem, 1.25vw, 1.4rem); }
.standings-reveal { display: grid; max-width: 900px; }
.ceremony-podium { position: relative; z-index: 2; display: grid; width: min(92vw, 1120px); max-height: none; flex: 1 1 auto; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: clamp(.45rem, 1vw, 1rem); margin-top: 2vh; margin-bottom: clamp(2rem, 6vh, 3.25rem); overflow: visible; }
.ceremony-podium li { --podium-color: var(--brand-accent); position: relative; display: grid; min-width: 0; grid-row: 1; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); justify-items: center; align-self: end; border: 1px solid color-mix(in srgb, var(--podium-color) 38%, var(--line)); border-top: clamp(4px, .55vw, 7px) solid var(--podium-color); padding: clamp(1rem, 2.2vh, 1.5rem) clamp(.75rem, 1.5vw, 1.4rem); background: linear-gradient(180deg, color-mix(in srgb, var(--podium-color) 13%, var(--surface)), color-mix(in srgb, var(--podium-color) 4%, var(--ink))); box-shadow: inset 0 1px color-mix(in srgb, var(--podium-color) 22%, transparent), 0 1.4rem 3rem rgba(0, 0, 0, .2); text-align: center; transition: opacity .2s ease; }
.ceremony-podium li.is-podium-slot-1 { --podium-color: var(--brand-accent); min-height: clamp(260px, 48vh, 450px); grid-column: 2; }
.ceremony-podium li.is-podium-slot-2 { --podium-color: #cfd5dc; min-height: clamp(225px, 40vh, 375px); grid-column: 1; }
.ceremony-podium li.is-podium-slot-3 { --podium-color: #d88b4f; min-height: clamp(190px, 33vh, 315px); grid-column: 3; }
.ceremony-podium li.is-pending { opacity: 0; }
.ceremony-podium li.is-revealed { animation: ceremony-podium-reveal .58s cubic-bezier(.16, 1, .3, 1) both; }
.ceremony-podium li.is-podium-slot-1.is-revealed { animation-name: ceremony-champion-reveal; animation-duration: .78s; }
.ceremony-podium .result-rank { grid-row: 3; align-self: end; color: var(--podium-color); font-size: clamp(5rem, min(10vw, 17vh), 9.5rem); letter-spacing: -.08em; line-height: .72; text-shadow: 0 0 2.8rem color-mix(in srgb, var(--podium-color) 18%, transparent); }
.ceremony-podium .result-name { max-width: 100%; grid-row: 1; overflow: visible; overflow-wrap: anywhere; font-size: clamp(1.35rem, min(2.8vw, 5vh), 3rem); line-height: 1; text-overflow: clip; white-space: normal; }
.ceremony-podium .result-value { grid-row: 2; margin-top: .8vh; color: color-mix(in srgb, var(--podium-color) 62%, var(--muted)); font-size: clamp(.78rem, min(1.25vw, 2.3vh), 1.35rem); }
.screen-ceremony.is-ceremony-winner > .screen-kicker, .screen-ceremony.is-ceremony-winner > .ceremony-title, .screen-ceremony.is-ceremony-winner > .screen-subtitle { position: relative; z-index: 2; }
.screen-ceremony.is-celebrating::before { position: absolute; z-index: 1; top: 38%; left: 50%; width: min(70vw, 950px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(var(--brand-accent-rgb), .18), rgba(var(--brand-accent-rgb), 0) 65%); content: ""; pointer-events: none; transform: translate(-50%, -50%); animation: ceremony-winner-glow 1.35s ease-out both; }
.ceremony-fireworks { position: absolute; z-index: 1; inset: 0; overflow: hidden; pointer-events: none; }
.ceremony-firework { position: absolute; bottom: 0; left: var(--firework-x); width: 2px; height: 2px; }
.ceremony-firework::before { position: absolute; bottom: 0; left: 0; width: 3px; height: 10px; border-radius: 50%; background: var(--firework-color); box-shadow: 0 0 8px var(--firework-color), 0 8px 12px color-mix(in srgb, var(--firework-color) 55%, transparent); content: ""; opacity: 0; offset-anchor: 50% 50%; offset-distance: 0%; offset-path: var(--firework-path); offset-rotate: auto 90deg; animation: ceremony-firework-launch var(--firework-cycle) linear var(--firework-delay) infinite; }
.ceremony-firework-burst { position: absolute; inset: 0; transform: translate3d(var(--firework-drift), var(--firework-rise), 0); }
.ceremony-firework-burst::before { position: absolute; top: -7px; left: -7px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 0 18px #fff, 0 0 34px var(--firework-color); content: ""; opacity: 0; animation: ceremony-firework-flash var(--firework-cycle) ease-out var(--firework-delay) infinite; }
.ceremony-firework-spark { position: absolute; top: -6px; left: -2px; display: block; width: 4px; height: 13px; border-radius: 50%; background: linear-gradient(to bottom, #fff, var(--spark-color) 48%, transparent); box-shadow: 0 0 11px var(--spark-color); opacity: 0; transform-origin: 50% 50%; animation: ceremony-firework-spark var(--firework-cycle) cubic-bezier(.12, .68, .25, 1) var(--firework-delay) infinite; }
.ceremony-celebration { position: absolute; z-index: 5; inset: 0; overflow: hidden; pointer-events: none; }
.ceremony-confetti-piece { position: absolute; top: -12%; left: var(--x); width: calc(9px * var(--size)); height: calc(20px * var(--size)); background: var(--confetti); box-shadow: 0 0 10px color-mix(in srgb, var(--confetti) 45%, transparent); opacity: 0; animation: ceremony-confetti-fall var(--duration) linear var(--delay) both; }
@keyframes ceremony-podium-reveal { from { opacity: 0; transform: translate3d(0, 2rem, 0) scale(.97); } to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); } }
@keyframes ceremony-champion-reveal { 0% { opacity: 0; transform: translate3d(0, 2.5rem, 0) scale(.94); } 68% { opacity: 1; transform: translate3d(0, -.25rem, 0) scale(1.025); } 100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); } }
@keyframes ceremony-champion-title-reveal { from { opacity: 0; transform: translate3d(0, -.75rem, 0) scale(.98); } to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); } }
@keyframes ceremony-winner-glow { from { opacity: 0; transform: translate(-50%, -50%) scale(.5); } 45% { opacity: 1; } to { opacity: .45; transform: translate(-50%, -50%) scale(1); } }
@keyframes ceremony-confetti-fall { 0% { opacity: 0; transform: translate3d(0, -6vh, 0) rotate(0); } 8% { opacity: 1; } 32% { transform: translate3d(var(--drift-early), 15vh, 0) rotate(var(--turn-early)); } 58% { transform: translate3d(var(--drift-mid), 45vh, 0) rotate(var(--turn-mid)); } 80% { opacity: 1; transform: translate3d(var(--drift-late), 82vh, 0) rotate(var(--turn-late)); } 100% { opacity: 0; transform: translate3d(var(--drift), 112vh, 0) rotate(var(--turn)); } }
@keyframes ceremony-firework-launch { 0% { opacity: 0; offset-distance: 0%; transform: scaleY(.6); } 1% { opacity: .9; offset-distance: 5.555%; } 18% { opacity: 1; offset-distance: 100%; transform: scaleY(1); } 19%, 100% { opacity: 0; offset-distance: 100%; transform: scaleY(1); } }
@keyframes ceremony-firework-flash { 0%, 18% { opacity: 0; transform: scale(.2); } 19% { opacity: 1; transform: scale(.6); } 24% { opacity: 0; transform: scale(2.8); } 100% { opacity: 0; transform: scale(2.8); } }
@keyframes ceremony-firework-spark { 0%, 18% { opacity: 0; transform: translate3d(0, 0, 0) rotate(var(--spark-angle)) scale(.2); } 19% { opacity: 1; } 37% { opacity: 0; transform: translate3d(var(--spark-x), var(--spark-y), 0) rotate(var(--spark-angle)) scale(.8); } 100% { opacity: 0; transform: translate3d(var(--spark-x), var(--spark-y), 0) rotate(var(--spark-angle)) scale(.8); } }
.screen-ceremony.is-ceremony-winner .ceremony-podium { margin-top: 1.5vh; }
.screen-ceremony.is-ceremony-winner .ceremony-podium li { padding: clamp(1rem, 2.2vh, 1.5rem) clamp(.75rem, 1.5vw, 1.4rem); }
.screen-ceremony.has-progress-chart .ceremony-title { font-size: clamp(2.2rem, min(4.8vw, 9vh), 5.5rem); }
.ceremony-chart-layout { display: grid; width: min(92vw, 1600px); min-height: 0; flex: 1 1 auto; grid-template-columns: minmax(0, 1fr) clamp(300px, 23vw, 390px); gap: clamp(1.2rem, 2.2vw, 2.6rem); margin-top: 1.2vh; text-align: left; }
.ceremony-chart-panel { display: grid; min-width: 0; min-height: 0; grid-template-rows: auto minmax(0, 1fr); }
.ceremony-chart-caption { margin: 0; color: var(--muted); font-size: clamp(.72rem, 1vw, 1rem); font-weight: 850; letter-spacing: .12em; text-transform: uppercase; transition: color .35s ease; }
.ceremony-chart-caption.is-live { color: var(--paper); }
.ceremony-chart-stage { min-width: 0; min-height: 250px; height: 100%; }
.ceremony-chart { display: block; width: 100%; height: 100%; min-height: 250px; overflow: visible; }
.ceremony-chart-grid line { stroke: var(--line); stroke-width: 1; }
.ceremony-chart-grid text { fill: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.ceremony-chart-frame { fill: none; stroke: var(--line); stroke-width: 1.5; }
.ceremony-chart-axis-title { fill: var(--paper); font-size: 14px; font-weight: 750; letter-spacing: .04em; }
.ceremony-chart-series path { fill: none; opacity: .72; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.ceremony-chart-series circle { stroke-width: 3; vector-effect: non-scaling-stroke; }
.ceremony-chart-ranking { display: grid; min-width: 0; min-height: 0; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
.ceremony-chart-results { width: 100%; height: min(calc(100% - .5vh), var(--screen-results-height, 4.25rem)); min-height: 0; max-height: none; align-self: start; grid-auto-rows: minmax(0, 1fr); margin-top: .5vh; }
.ceremony-chart-results li { position: relative; z-index: 1; min-height: 0; grid-template-columns: clamp(2rem, 2.6vw, 3rem) clamp(1.5rem, 2.2vw, 2.35rem) minmax(0, 1fr); grid-template-rows: auto auto; align-content: center; gap: 0 .45rem; padding: .35vh .2rem; background: var(--ink); will-change: transform; }
.ceremony-chart-results .result-rank { grid-row: 1 / -1; align-self: center; font-size: clamp(.9rem, 1.35vw, 1.5rem); }
.ceremony-chart-results .result-series-swatch { width: 100%; height: 3px; grid-row: 1 / -1; align-self: center; background: var(--series-color); }
.ceremony-chart-results .result-name { grid-column: 3; overflow: hidden; font-size: clamp(.78rem, 1.15vw, 1.25rem); text-overflow: ellipsis; white-space: nowrap; }
.ceremony-chart-results .result-value { grid-column: 3; overflow: hidden; font-size: clamp(.62rem, .78vw, .82rem); text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 900px), (max-aspect-ratio: 10/9) {
  .ceremony-chart-layout { grid-template-columns: minmax(0, 1fr); }
  .ceremony-chart-ranking { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ceremony-chart-series { transition: none; }
  .ceremony-results-reveal li.is-new-result { animation: none; }
  .ceremony-podium li.is-revealed { animation: none; }
  .ceremony-celebration, .ceremony-fireworks, .screen-ceremony.is-celebrating::before { display: none; }
}
.screen-quote-heading { display: grid; width: min(92vw, 1500px); flex: 0 0 auto; grid-template-columns: minmax(0, 1fr) auto; gap: 3vw; align-items: center; text-align: left; }
.screen-quote-text { min-width: 0; margin: 0; overflow-wrap: anywhere; font-size: clamp(1.5rem, min(3.1vw, 4.6vh), 4rem); font-weight: 850; letter-spacing: -.025em; line-height: 1.12; }
.screen-quote-timer { display: block; width: 3ch; color: var(--brand-accent); font-size: clamp(3rem, 7vw, 8rem); font-variant-numeric: tabular-nums; letter-spacing: -.05em; line-height: .8; text-align: center; }
.screen-quote-timer.is-three-digits { font-size: clamp(2.2rem, 5vw, 5.8rem); }
.screen-quote-timer.is-urgent { border-color: var(--orange); color: var(--orange); }
.screen-question-media { display: block; width: min(72vw, 1100px); max-height: 27vh; flex: 0 0 auto; margin-top: 2vh; border: 2px solid var(--line); background: #050706; object-fit: contain; }
.screen-content.has-question-media .screen-quote-options { margin-top: 2vh; }
.screen-content.has-question-media .screen-quote-option { min-height: 9vh; padding-block: .8vw; }
.screen-quote-options { display: grid; width: min(92vw, 1500px); flex: 0 0 auto; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2vw; margin-top: 2vh; }
.screen-quote-option { display: grid; min-height: 12vh; grid-template-columns: auto 1fr; grid-template-rows: auto 1fr; gap: .5vw 1vw; border: 2px solid var(--line); padding: 1.3vw; background: var(--surface); text-align: left; }
.screen-quote-option.is-correct { border-color: var(--brand-accent); box-shadow: inset .5vw 0 var(--brand-accent); }
.screen-quote-key { display: grid; width: 2.5vw; min-width: 2rem; aspect-ratio: 1; place-items: center; border: 1px solid var(--line); color: var(--brand-accent); font-size: clamp(.8rem, 1.2vw, 1.4rem); font-weight: 900; }
.screen-quote-author { min-width: 0; align-self: center; overflow-wrap: anywhere; font-size: clamp(1.2rem, min(2.3vw, 4vh), 3rem); line-height: 1.12; }
.screen-quote-voters { grid-column: 2; display: flex; flex-wrap: wrap; align-content: start; gap: .5vw; margin-top: .7vh; }
.screen-quote-voters span { max-width: 100%; overflow: hidden; border: 1px solid var(--line); padding: .35vw .55vw; color: var(--paper); font-size: clamp(.75rem, 1vw, 1.2rem); text-overflow: ellipsis; white-space: nowrap; }
.screen-quote-voters span.screen-quote-voters-more { border-color: var(--brand-accent); color: var(--brand-accent); }
.screen-quote-voters small { color: var(--muted); }
.screen-quote-count { margin: 2vh 0 0; color: var(--muted); font-size: clamp(1rem, 1.6vw, 2rem); }
.screen-closest-heading { margin-bottom: 3vh; }
.screen-closest-question { font-size: clamp(1.8rem, min(4vw, 6vh), 5rem); }
.screen-content.is-closest-reveal { justify-content: center; padding-top: 0; }
.screen-content.is-closest-reveal .screen-closest-question { font-size: clamp(1.3rem, min(2.6vw, 4vh), 3rem); }
.screen-content.is-closest-answering.has-question-media .screen-closest-question { font-size: clamp(1.3rem, min(2.6vw, 4vh), 3rem); }
.screen-content.is-closest-reveal.is-closest-empty:not(.has-question-media) { justify-content: center; padding-top: 0; }
.screen-closest-correct { container-type: inline-size; display: grid; width: min(92vw, 1500px); flex: 0 0 auto; grid-template-columns: minmax(0, 1fr); align-items: center; gap: 1vh; margin-top: 1.5vh; border: 2px solid var(--brand-accent); padding: clamp(.6rem, 1vw, 1rem); background: linear-gradient(90deg, rgba(var(--brand-accent-rgb), .12), var(--surface) 62%); box-shadow: inset clamp(.35rem, .55vw, .65rem) 0 var(--brand-accent); text-align: center; }
.screen-closest-correct span { color: var(--muted); font-size: clamp(1rem, 1.7vw, 2rem); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.screen-closest-correct strong { color: var(--brand-accent); font-size: clamp(1.3rem, min(5vw, 6cqi), 5rem); letter-spacing: -.04em; line-height: 1.05; white-space: nowrap; }
.screen-closest-answers { display: grid; width: min(92vw, 1500px); flex: 0 0 auto; grid-template-columns: repeat(var(--closest-answer-columns, 3), minmax(0, 1fr)); grid-template-rows: repeat(var(--closest-answer-rows, 1), auto); gap: .8vw; margin-top: .8vw; }
.screen-closest-answers[data-count="0"] { max-height: none; grid-template-columns: minmax(0, 1fr); overflow: visible; }
.screen-closest-empty { display: grid; width: min(100%, 46rem); grid-column: 1 / -1; grid-template-columns: minmax(2rem, 1fr) auto minmax(2rem, 1fr); align-items: center; justify-self: center; gap: clamp(.8rem, 1.6vw, 1.5rem); margin: clamp(1rem, 2.5vh, 2rem) 0 0; color: var(--muted); font-size: clamp(1.2rem, 2vw, 2.25rem); line-height: 1.1; text-align: center; white-space: nowrap; }
.screen-closest-empty::before, .screen-closest-empty::after { height: 1px; background: var(--line); content: ""; }
.screen-closest-answers[data-count="1"] { grid-template-columns: minmax(0, 1fr); }
.screen-closest-answers[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.screen-closest-answers article { display: grid; min-width: 0; grid-template-columns: minmax(0, 1fr); gap: .3vw; border: 2px solid var(--line); padding: .55vw .7vw; background: var(--surface); text-align: left; }
.screen-closest-answers article.is-scoring { border-color: var(--blue); box-shadow: inset .45vw 0 var(--blue); }
.screen-closest-answers article.is-closest { border-color: var(--brand-accent); box-shadow: inset .45vw 0 var(--brand-accent); }
.screen-closest-answers article strong { min-width: 0; overflow-wrap: anywhere; font-size: clamp(.8rem, 1.25vw, 1.5rem); line-height: 1.15; }
.screen-closest-answers article b { min-width: 0; color: var(--paper); font-size: clamp(.85rem, 1.7vw, 2rem); line-height: 1.15; white-space: nowrap; }
.screen-closest-answers article small { min-width: 0; color: var(--muted); font-size: clamp(.65rem, .85vw, 1rem); line-height: 1.25; overflow-wrap: anywhere; }
.screen-closest-answers article.is-scoring small { color: var(--blue); }
.screen-closest-answers article.is-closest small { color: var(--brand-accent); }
.screen-content.is-closest-answering .screen-closest-heading,
.screen-content.is-closest-reveal .screen-closest-heading { margin-bottom: 0; }
.screen-closest-answering-media { width: min(92vw, 1600px); height: 58vh; max-height: none; margin-top: 1.5vh; border: 0; }
.screen-closest-reveal-layout { display: grid; width: min(92vw, 1650px); flex: 0 0 auto; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 2vw; align-items: center; margin-top: 1.5vh; }
.screen-closest-reveal-media { width: 100%; height: min(43vh, 500px); min-width: 0; max-height: none; margin: 0; border: 0; object-fit: contain; }
.screen-closest-reveal-results { display: flex; min-width: 0; flex-direction: column; }
.screen-closest-reveal-results .screen-closest-correct { width: 100%; flex: 0 0 auto; margin-top: 0; padding: clamp(.65rem, 1vw, 1rem); }
.screen-closest-reveal-results .screen-closest-correct strong { font-size: clamp(1.3rem, 6cqi, 5rem); }
.screen-closest-reveal-results .screen-closest-answers { width: 100%; max-height: none; flex: 0 0 auto; gap: .45vw; margin-top: .45vw; }
.screen-closest-reveal-results .screen-closest-answers article { padding: .45vw .6vw; }
.screen-closest-reveal-results .screen-closest-answers article b { font-size: clamp(.65rem, 1vw, 1.2rem); }
.screen-closest-reveal-results .screen-closest-answers article small { font-size: clamp(.55rem, .7vw, .85rem); }
.screen-closest-reveal-results .screen-quote-count { flex: 0 0 auto; margin-top: 1vh; }
@media (max-aspect-ratio: 1/1) {
  .screen-closest-answering-media { height: 50vh; }
  .screen-closest-reveal-layout { height: auto; max-height: 65vh; grid-template-columns: 1fr; }
  .screen-closest-reveal-media { height: 32vh; }
  .screen-closest-reveal-results .screen-closest-answers { max-height: 25vh; grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .screen-shell .screen-closest-answers { max-height: none; grid-template-rows: none; gap: .5rem; }
  .screen-shell .screen-closest-answers:not([data-count="0"]):not([data-count="1"]) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .screen-shell .screen-closest-answers article { padding: .55rem; }
  .screen-shell .screen-closest-answers article b { font-size: .85rem; }
  .screen-shell .screen-closest-answers article small { font-size: .68rem; }
}
.screen-slots-layout { display: grid; width: min(95vw, 1500px); grid-template-columns: minmax(0, 2fr) minmax(520px, 3fr); gap: 2.5vw; align-items: center; text-align: left; }
.screen-slots-copy { container-type: inline-size; display: flex; min-width: 0; min-height: min(26vw, 390px); flex-direction: column; justify-content: center; }
.screen-slots-player { max-width: 100%; color: var(--muted); font-size: clamp(1rem, 1.8vw, 2rem); overflow-wrap: anywhere; }
.screen-slots-copy > h1 { display: flex; min-height: clamp(3.3rem, min(9vw, 23cqi), 10rem); align-items: center; margin: .3vh 0; }
.screen-slots-result, .screen-slots-jackpot { letter-spacing: -.08em; line-height: .82; }
.screen-slots-result { max-width: 100%; font-size: clamp(4rem, min(11vw, 28cqi), 12rem); }
.screen-slots-spinning { max-width: 100%; font-size: clamp(3.5rem, min(7vw, 20cqi), 8rem); letter-spacing: -.07em; line-height: .86; }
.screen-slots-jackpot { max-width: 100%; color: #ffe242; font-size: clamp(4rem, min(7vw, 18cqi), 7.5rem); white-space: nowrap; text-shadow: 0 0 4vw rgba(255, 226, 66, .35); }
.screen-slots-detail { max-width: 100%; margin: 2vh 0 0; color: var(--brand-accent); font-size: clamp(1.2rem, 2vw, 2.5rem); font-weight: 850; overflow-wrap: anywhere; text-transform: uppercase; }
.screen-slots-turn { max-width: 100%; margin: 2.2vh 0 0; color: var(--muted); font-size: clamp(1rem, 1.7vw, 2rem); font-weight: 750; overflow-wrap: anywhere; }
.screen-slots-combo { display: inline-block; margin: 2vh 0 0; border: .2vw solid #ffe242; border-left-width: .7vw; padding: .7vw 1.1vw; background: rgba(255, 226, 66, .1); color: #ffe242; box-shadow: 0 0 2vw rgba(255, 226, 66, .24); font-size: clamp(1rem, 1.8vw, 2.2rem); font-weight: 950; text-transform: uppercase; }
.screen-slots-machine { --screen-cabinet-gold: #d6a83f; position: relative; display: grid; width: min(100%, 86vh); aspect-ratio: 1.15; box-sizing: border-box; grid-template-rows: auto auto minmax(0, 1fr) auto; justify-self: end; border: .35vw solid #3a2417; border-radius: 2.4vw 2.4vw .8vw .8vw; padding: .65vw; background: linear-gradient(105deg, #381218 0, #681f2b 12%, #8b2d3b 48%, #561821 88%, #2a1014 100%); box-shadow: 0 2vw 5vw rgba(0, 0, 0, .58), inset 0 0 0 .2vw #a4702a, inset .8vw 0 1.5vw rgba(255, 199, 81, .12), inset -.8vw 0 1.5vw rgba(0, 0, 0, .38); }
.screen-slots-machine-marquee { display: grid; min-height: 4.3vw; grid-template-columns: 1fr auto 1fr; align-items: center; margin: 0 .6vw .25vw; border: .28vw solid #442814; border-radius: 2vw 2vw .55vw .55vw; padding: .35vw 1vw; background: radial-gradient(circle at 50% 32%, #fff4a8 0, #ffcf3f 28%, #d76b16 74%, #7a2c10 100%); color: #5d1717; box-shadow: inset 0 0 0 .2vw #f8d979, inset 0 -.8vw 1.4vw rgba(123, 33, 12, .28), 0 .35vw 0 #321b10, 0 .7vw 1.3vw rgba(0, 0, 0, .38); text-align: center; }
.screen-slots-machine-marquee strong { font-size: clamp(1.15rem, 2vw, 2.35rem); letter-spacing: .055em; white-space: nowrap; text-shadow: 0 .08vw #fff2a0, 0 .2vw 0 rgba(255, 255, 255, .2), 0 0 .8vw rgba(255, 250, 176, .42); }
.screen-slots-machine-marquee span { color: #8b261c; font-size: clamp(.9rem, 1.5vw, 1.8rem); text-align: center; }
.screen-slots-machine-bulbs { display: flex; height: 1.1vw; align-items: center; justify-content: space-between; margin: .35vw .55vw; }
.screen-slots-machine-bulbs span { width: .58vw; min-width: 5px; aspect-ratio: 1; border-radius: 50%; background: #b36b1d; box-shadow: inset 0 0 .12vw rgba(52, 25, 8, .8), 0 0 .18vw rgba(255, 205, 65, .32); opacity: .58; }
.screen-slots-machine.is-spinning .screen-slots-machine-bulbs span { animation: screen-slot-bulb-flicker var(--bulb-speed) steps(1, end) var(--bulb-delay) infinite; }
.screen-slots-bezel { min-height: 0; border: .42vw solid #2c1b12; border-radius: .7vw; padding: .38vw; background: linear-gradient(135deg, #bb8735, #5a351b 18%, #d5a34a 48%, #4a2b17 82%, #9b6828); box-shadow: inset 0 0 0 .14vw #e4bd68, 0 .55vw 1.2vw rgba(0, 0, 0, .48); }
.screen-slots-grid-wrap { position: relative; height: 100%; isolation: isolate; }
.screen-slots-lines { position: absolute; z-index: 4; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.screen-slots-lines polyline { stroke: var(--line-color); stroke-width: clamp(4px, .38vw, 7px); stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .95)); }
.screen-slots-grid { position: relative; z-index: 1; display: grid; width: 100%; height: 100%; box-sizing: border-box; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-template-rows: minmax(0, 1fr); gap: .35vw; border: .35vw solid #100b08; border-radius: .4vw; padding: .35vw; background: #100b08; box-shadow: inset 0 1.2vw 1.8vw rgba(0, 0, 0, .24), inset 0 -1.2vw 1.8vw rgba(0, 0, 0, .3); overflow: hidden; }
.screen-slots-grid span { display: grid; min-width: 0; min-height: 0; place-items: center; border: .08vw solid #898979; border-radius: .2vw; background: linear-gradient(105deg, #d7d8cf, #fffef4 38%, #e7e8df 72%, #c9cbc1); font-size: clamp(2rem, 3.4vw, 4.2rem); line-height: 1; text-shadow: 0 .12vw 0 rgba(255, 255, 255, .68); }
.screen-slot-reel { position: relative; min-width: 0; height: 100%; border: .08vw solid #3f483d; border-radius: .2vw; background: #e8eadf; overflow: hidden; box-shadow: inset 0 1.2vw 1.2vw -1.2vw rgba(0, 0, 0, .9), inset 0 -1.2vw 1.2vw -1.2vw rgba(0, 0, 0, .9); }
.screen-slot-reel::before, .screen-slot-reel::after { position: absolute; z-index: 2; right: 0; left: 0; height: 16%; pointer-events: none; content: ""; }
.screen-slot-reel::before { top: 0; background: linear-gradient(rgba(9, 11, 9, .52), transparent); }
.screen-slot-reel::after { bottom: 0; background: linear-gradient(transparent, rgba(9, 11, 9, .52)); }
.screen-slot-reel-strip { display: grid; height: 100%; grid-template-rows: repeat(3, minmax(0, 1fr)); gap: .35vw; }
.screen-slot-reel-strip.is-rolling { display: flex; height: auto; flex-direction: column; gap: var(--screen-slot-gap); will-change: transform; }
.screen-slot-reel-strip.is-rolling span { flex: 0 0 var(--screen-slot-cell-height); width: 100%; aspect-ratio: auto; filter: blur(.35px) saturate(.85); }
.screen-slots-readout { min-height: 3.3vw; margin-top: .5vw; border: .2vw solid #3c2516; border-radius: .4vw; padding: .65vw .8vw; background: linear-gradient(160deg, #4c2d1b, #24160f 54%, #5e381f); color: #ffe265; box-shadow: inset 0 0 0 .08vw #9c682c; font-size: clamp(.8rem, 1.3vw, 1.55rem); font-weight: 950; letter-spacing: .1em; text-align: center; text-transform: uppercase; }
.screen-slots-callouts { display: flex; width: min(92vw, 1320px); height: clamp(2.8rem, 3.7vw, 4rem); flex-wrap: nowrap; align-content: center; align-items: center; justify-content: center; gap: 1vw; margin-top: 1vh; overflow: hidden; }
.screen-slots-callouts span { border: 2px solid var(--line-color); border-left-width: .5vw; padding: .6vw 1vw; color: var(--line-color); background: var(--ink); font-size: clamp(.8rem, 1.2vw, 1.5rem); font-weight: 900; text-transform: uppercase; }
@media (max-width: 620px) {
  .screen-shell .screen-title:not(.screen-topics-question) { font-size: clamp(1.65rem, 7.5vw, 2.8rem); white-space: normal; }
}
@media (max-width: 900px) {
  .screen-slots-layout { width: 100%; grid-template-columns: minmax(0, 1fr); gap: 2vh; text-align: center; }
  .screen-slots-copy { min-height: 0; align-items: center; }
  .screen-slots-copy > h1 { justify-content: center; }
  .screen-slots-machine { width: min(100%, 52vh); justify-self: center; }
}

.admin-shell { background: #0e100f; }
.admin-header { position: sticky; z-index: 4; top: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .65rem 1rem; border-bottom: 1px solid var(--line); padding: max(.8rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) .8rem max(1rem, env(safe-area-inset-left)); background: rgba(11, 13, 12, .96); }
.admin-shell .flash { z-index: 5; top: max(.5rem, env(safe-area-inset-top)); }
.admin-header > div { min-width: 0; flex: 1 1 18rem; }
.admin-header .tournament-lockup { width: 100%; }
.admin-header div small { display: block; margin-top: .18rem; color: var(--muted); font-size: .65rem; }
.admin-header nav { display: flex; min-width: 0; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.admin-header nav a, .admin-header > a { color: var(--muted); font-size: .75rem; text-decoration: none; }
.admin-page { width: min(100%, 1100px); margin: auto; padding: 1rem; }
.admin-section { margin: 1rem 0; border: 1px solid var(--line); background: var(--surface); }
.admin-section[id] { scroll-margin-top: 6rem; }
.admin-section > h1 { min-width: 0; overflow-wrap: anywhere; margin: 0; font-size: clamp(2.3rem, 8vw, 4.5rem); letter-spacing: -.06em; }
.status-banner { display: grid; grid-template-columns: 1fr; border-left: 5px solid var(--muted); padding: 1rem; background: var(--ink); }
.status-banner span, .status-banner small { color: var(--muted); font-size: .72rem; text-transform: uppercase; }
.status-banner strong { margin: .25rem 0; font-size: 1.8rem; }
.status-in_progress { border-color: var(--brand-accent); }
.status-finished { border-color: var(--blue); }
.action-row { display: flex; flex-wrap: wrap; gap: var(--action-gap); margin-top: 1rem; }
.action-row.compact { margin-top: auto; }
.admin-disciplines { display: grid; gap: .7rem; }
.external-discipline-create { margin: 1rem 0; border: 1px dashed var(--line); background: var(--ink); }
.external-discipline-create summary { padding: 1rem; color: var(--brand-accent); font-weight: 850; cursor: pointer; }
.external-discipline-create form { border-top: 1px solid var(--line); padding: 1rem; }
.external-attempt-settings { display: grid; gap: 1rem; }
.admin-discipline { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-items: center; min-height: 0; border-left: 3px solid var(--line); padding: 1rem; background: var(--ink); }
.admin-discipline.is-in_progress { border-color: var(--brand-accent); }
.admin-discipline.is-correcting { border-color: var(--orange); }
.admin-discipline.is-completed { opacity: .78; }
.admin-discipline.is-skipped { opacity: .55; }
.discipline-card-identity { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: .75rem; align-items: center; }
.discipline-card-order { color: var(--muted); font-size: .75rem; font-weight: 850; }
.discipline-card-identity small { display: block; margin-bottom: .3rem; color: var(--muted); font-size: .65rem; letter-spacing: .08em; text-transform: uppercase; }
.discipline-card-identity h3 { margin: 0; font-size: 1.2rem; line-height: 1.05; }
.discipline-card-actions, .discipline-card-order-actions { display: flex; flex-wrap: wrap; gap: var(--action-gap); align-items: center; }
.discipline-card-actions form, .discipline-card-order-actions form { display: contents; }
.discipline-card-order-actions { justify-content: flex-end; }
.tiebreak-form { display: grid; gap: .6rem; margin-top: 1rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.add-participant { display: grid; gap: .7rem; border-bottom: 1px solid var(--line); padding-bottom: 1rem; }
.participant-admin-list form { display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: .6rem; align-items: center; border-bottom: 1px solid var(--line); padding: .8rem 0; }
.participant-admin-list form > span { color: var(--muted); font-size: .7rem; }
.participant-admin-identity, .participant-admin-list form > .toggle, .participant-admin-actions { grid-column: 2; }
.participant-admin-identity { display: grid; min-width: 0; gap: .35rem; }
.participant-name-limit { color: var(--muted); font-size: .62rem; }
.participant-session-status { color: var(--muted); font-size: .7rem; }
.participant-session-status.is-claimed { color: var(--brand-accent); font-weight: 800; }
.participant-admin-actions { display: flex; flex-wrap: wrap; gap: var(--action-gap); }
.toggle { position: relative; display: flex; align-items: center; gap: .5rem; color: var(--muted); font-size: .7rem; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle i { position: relative; width: 34px; height: 20px; border: 1px solid var(--line); border-radius: 20px; }
.toggle i::after { position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--muted); content: ""; transition: transform .15s; }
.toggle input:checked + i { border-color: var(--brand-accent); }
.toggle input:checked + i::after { background: var(--brand-accent); transform: translateX(14px); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .85rem; }
th, td { border-bottom: 1px solid var(--line); padding: .75rem .55rem; text-align: left; white-space: nowrap; }
th { color: var(--muted); font-size: .65rem; text-transform: uppercase; }
.warning-tag { color: var(--orange); font-size: .7rem; font-weight: 800; }
.ceremony-control > p { color: var(--muted); }
.result-editor { margin-top: 1.5rem; }
.result-edit-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(110px, 40%); gap: .6rem 1rem; align-items: center; border-bottom: 1px solid var(--line); padding: .8rem 0; }
.result-edit-row label { display: contents; }
.result-edit-row > .button { grid-column: 2; justify-self: end; }
.result-edit-row-multi { grid-template-columns: minmax(0, 1fr); }
.result-participant { min-width: 0; overflow-wrap: anywhere; }
.result-participant b, .result-participant small { display: block; }
.result-participant small { margin-top: .25rem; color: var(--muted); font-size: .7rem; }
.manual-result-inputs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22ch), 1fr)); gap: .5rem; }
.manual-result-inputs label { display: grid; gap: .3rem; }
.manual-result-inputs label span { color: var(--muted); font-size: .62rem; font-weight: 750; text-transform: uppercase; }
.manual-result-total { min-width: 0; max-width: 100%; overflow-wrap: anywhere; color: var(--brand-accent); font-size: .8rem; font-weight: 800; text-align: right; }
.manual-result-actions { display: flex; min-width: 0; grid-column: 1 / -1; flex-direction: column; gap: .6rem; align-items: flex-end; }
.result-edit-row-multi > .button { grid-column: auto; justify-self: end; }
.result-editor label span b, .result-editor label span small { display: block; }
.result-editor label span small { margin-top: .25rem; color: var(--muted); font-size: .7rem; }
.result-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, 40%); gap: 1rem; align-items: center; border-bottom: 1px solid var(--line); padding: .8rem 0; }
.result-row > span { min-width: 0; overflow-wrap: anywhere; }
.result-row span b, .result-row span small { display: block; }
.result-row span small { margin-top: .25rem; color: var(--muted); font-size: .7rem; }
.result-row output { color: var(--ink); text-align: right; }
.result-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: .6rem; }
.result-row-actions output { color: var(--paper); }
.sticky-actions { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: .5rem; border-top: 1px solid var(--line); padding: .8rem 0; background: var(--surface); }
.results-save-status { min-height: 1.3rem; margin-top: .8rem; color: var(--muted); font-size: .68rem; text-align: right; }
.results-conductor-shell {
  display: grid;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  overscroll-behavior: none;
}
.results-conductor-shell .admin-header { position: relative; }
.results-conductor-shell .results-page { display: flex; width: min(100%, 1280px); height: 100%; min-height: 0; flex-direction: column; padding: .5rem; overflow: hidden; }
.results-conductor-shell .results-page > .flash { max-height: 25%; flex: 0 0 auto; margin: 0 0 .35rem; overflow-y: auto; }
.results-conductor-shell .results-page > .admin-section { display: flex; height: auto; min-height: 0; flex: 1 1 auto; flex-direction: column; margin: 0; overflow: hidden; }
.results-conductor-shell .results-page > .admin-section > :is(.eyebrow, h1, .help-text) { flex: 0 0 auto; }
.results-conductor-shell .results-page form[data-results-draft] { display: grid; min-height: 0; flex: 1 1 auto; grid-template-rows: minmax(0, 1fr) auto auto; overflow: hidden; }
.results-conductor-shell .result-editor { min-height: 0; margin-top: .5rem; padding-right: .2rem; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
.results-conductor-shell .result-editor-readonly { flex: 1 1 auto; }
.results-conductor-shell .results-save-status { margin-top: .35rem; }
.results-conductor-shell .results-page .sticky-actions { position: static; z-index: 1; padding: .45rem 0 max(.15rem, env(safe-area-inset-bottom)); }
.discipline-reset-details { margin-top: 1rem; border-top: 1px solid var(--line); padding-top: .7rem; }
.discipline-reset-details > summary { display: flex; min-height: var(--control-height); align-items: center; color: var(--muted); cursor: pointer; font-size: .72rem; font-weight: 800; }
.discipline-reset-details .discipline-reset-zone { margin-top: .6rem; }
.danger-zone { border-color: color-mix(in srgb, var(--orange) 55%, var(--line)); }
.danger-zone .eyebrow { color: var(--orange); }
.admin-section > .danger-zone { margin-top: 1.5rem; border-top: 1px solid var(--orange); padding-top: 1.5rem; }
.admin-section > .round-completion { margin-top: 1.5rem; border-top: 1px solid var(--line); padding-top: 1.5rem; }
.round-completion-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.danger-zone-action + .danger-zone-action { margin-top: 1.5rem; border-top: 1px solid var(--line); padding-top: 1.5rem; }
.danger-zone-action h3 { margin: 0 0 .35rem; }
.stacked-form { display: grid; gap: 1rem; }
.login-page { display: grid; min-height: 100vh; place-items: center; padding: 1rem; }
.login-card { width: min(100%, 420px); border: 1px solid var(--line); padding: 1.2rem; background: var(--surface); }
.login-card h1 { margin: 0 0 2rem; font-size: 2.4rem; letter-spacing: -.05em; }
.login-card .button { width: 100%; margin: 1rem 0; }

.word-config-section > h1 { margin: 0; font-size: clamp(3.5rem, 12vw, 7rem); letter-spacing: -.03em; line-height: .92; }
.word-config-form { display: grid; gap: 1rem; margin-top: 2rem; }
.word-config-options { display: grid; grid-template-columns: repeat(2, minmax(0, 220px)); gap: 1rem; }
.word-config-form label small { font-weight: 500; text-transform: none; }
.word-config-form label small b { color: var(--brand-accent); }
.config-lock-note { border-left: 4px solid var(--orange); padding: .8rem 1rem; background: var(--ink); color: var(--orange); font-weight: 750; }

.five-letters-shell { min-height: 100vh; }
.five-letters-page { width: min(100%, 760px); margin: auto; padding-bottom: 3rem; }
.game-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .75rem; border-bottom: 1px solid var(--line); padding: max(1rem, env(safe-area-inset-top)) max(var(--page-gutter), env(safe-area-inset-right)) 1rem max(var(--page-gutter), env(safe-area-inset-left)); }
.game-header .tournament-lockup { width: 100%; justify-content: flex-start; }
.game-header > .game-participant-name { min-width: 0; max-width: min(42vw, 18rem); overflow: hidden; color: var(--muted); font-size: .72rem; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.five-letters-game { padding: 2.5rem 1rem 1rem; }
.game-title-row { display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.game-title-row h1 { margin: 0; font-size: clamp(3.7rem, 16vw, 7rem); letter-spacing: -.03em; line-height: .9; }
.game-meta { display: grid; justify-items: end; gap: .2rem; }
.game-timer { color: var(--paper); font-size: clamp(1.8rem, 7vw, 3rem); font-weight: 950; font-variant-numeric: tabular-nums; letter-spacing: -.04em; line-height: .9; }
.game-timer.is-urgent { color: var(--orange); }
.word-progress { color: var(--brand-accent); font-size: 1.2rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.game-status { min-height: 1.5rem; margin: 2rem 0 1rem; overflow-wrap: anywhere; color: var(--muted); font-size: .85rem; }
.game-status.is-error { color: var(--orange); }
.connection-status { position: fixed; z-index: 10000; top: max(.6rem, env(safe-area-inset-top)); left: 50%; width: min(calc(100vw - 2rem), 42rem); transform: translateX(-50%); border: 1px solid color-mix(in srgb, var(--orange) 55%, var(--line)); border-left: 5px solid var(--orange); padding: .7rem 1rem; background: color-mix(in srgb, var(--ink) 94%, transparent); box-shadow: 0 .8rem 2rem rgba(0, 0, 0, .35); color: var(--paper); font-size: .82rem; font-weight: 800; text-align: center; }
.connection-status[data-state="recovered"] { border-color: color-mix(in srgb, var(--brand-accent) 55%, var(--line)); border-left-color: var(--brand-accent); }
.game-start { width: min(100%, 520px); margin: 3rem auto; border: 1px solid var(--line); padding: 1.5rem; background: var(--surface); text-align: center; }
.game-start p { margin: 0 0 1.2rem; color: var(--muted); line-height: 1.5; }
.game-start .button { min-width: 180px; }
.round-history { display: flex; gap: .4rem; margin-bottom: 1rem; overflow-x: auto; scrollbar-width: thin; }
.round-chip { flex: 0 0 auto; border: 1px solid var(--line); padding: .45rem .6rem; color: var(--muted); font-size: .68rem; font-weight: 750; text-transform: uppercase; }
.round-chip.is-solved { border-color: var(--brand-accent); color: var(--brand-accent); }
.round-chip.is-missed { border-color: var(--orange); color: var(--orange); }
.letter-board { display: grid; gap: .35rem; width: min(100%, 350px); margin: 1.3rem auto; }
.letter-board-stage { min-height: 0; }
.letter-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: .35rem; }
.letter-tile { display: grid; aspect-ratio: 1; place-items: center; border: 2px solid var(--line); background: var(--surface); font-size: clamp(1.35rem, 7vw, 2.2rem); font-weight: 900; text-transform: uppercase; }
.letter-tile:not(:empty) { border-color: #616a62; }
.letter-tile.is-correct { border-color: #78950d; background: #78950d; color: #fff; }
.letter-tile.is-present { border-color: #b68a12; background: #b68a12; color: #fff; }
.letter-tile.is-absent { border-color: #3c423d; background: #3c423d; color: #fff; }
.letter-row.is-not-in-dictionary .letter-tile {
  border-color: var(--orange);
  background: color-mix(in srgb, var(--orange) 16%, var(--surface));
  box-shadow: inset 0 0 0 1px rgba(255, 103, 70, .24), 0 0 .65rem rgba(255, 103, 70, .18);
  color: var(--paper);
}
.letter-keyboard { display: grid; gap: .35rem; width: min(100%, 660px); margin: 1.5rem auto 0; }
.letter-keyboard > div { display: flex; justify-content: center; gap: .2rem; }
.letter-keyboard button { min-width: 0; min-height: var(--control-height); height: 44px; flex: 1; border: 0; border-radius: 3px; padding: 0 .15rem; background: #252925; color: var(--paper); font-size: clamp(.57rem, 2.5vw, .78rem); font-weight: 850; cursor: pointer; }
.letter-keyboard button.wide-key { flex: 1.55; font-size: .57rem; }
.letter-keyboard button.is-correct { background: #78950d; }
.letter-keyboard button.is-present { background: #b68a12; }
.letter-keyboard button.is-absent { background: #3c423d; color: var(--paper); }
.letter-keyboard button:disabled { cursor: default; }
.game-summary { margin: 3rem auto; border-top: 5px solid var(--brand-accent); padding: 1.2rem; background: var(--surface); text-align: center; }
.game-summary p, .game-summary span { display: block; margin: 0; color: var(--muted); }
.game-summary strong { display: block; margin: .5rem 0; font-size: clamp(4rem, 18vw, 7rem); letter-spacing: -.08em; line-height: .85; }

.five-letters-shell.is-five-letters-playing { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
.five-letters-shell.is-five-letters-playing .five-letters-page { display: grid; height: 100%; min-height: 0; grid-template-rows: auto minmax(0, 1fr); padding-bottom: 0; overflow: hidden; }
.five-letters-shell.is-five-letters-playing .five-letters-game { display: grid; min-height: 0; grid-template-rows: auto auto auto minmax(0, 1fr) auto; gap: clamp(.3rem, 1dvh, .65rem); padding: clamp(.55rem, 1.8dvh, 1.1rem) 1rem max(.5rem, env(safe-area-inset-bottom)); overflow: hidden; }
.five-letters-shell.is-five-letters-playing .game-title-row { grid-row: 1; align-items: center; }
.five-letters-shell.is-five-letters-playing .game-title-row .eyebrow { margin-bottom: .35rem; font-size: .62rem; }
.five-letters-shell.is-five-letters-playing .game-title-row h1 { font-size: clamp(2.5rem, 8dvh, 4.5rem); }
.five-letters-shell.is-five-letters-playing .game-timer { font-size: clamp(1.7rem, 5dvh, 2.7rem); }
.five-letters-shell.is-five-letters-playing .word-progress { font-size: 1rem; }
.five-letters-shell.is-five-letters-playing .game-status { grid-row: 2; min-height: 0; margin: 0; font-size: clamp(.7rem, 1.8dvh, .82rem); line-height: 1.25; }
.five-letters-shell.is-five-letters-playing .round-history { grid-row: 3; min-height: 0; margin: 0; }
.five-letters-shell.is-five-letters-playing .round-history:empty { display: none; }
.five-letters-shell.is-five-letters-playing .round-chip { padding: .3rem .5rem; font-size: .6rem; }
.five-letters-shell.is-five-letters-playing .letter-board-stage { container-type: size; display: grid; min-width: 0; min-height: 0; grid-row: 4; place-items: center; overflow: hidden; }
.five-letters-shell.is-five-letters-playing .letter-board { width: min(100%, 350px, 83.333cqh); aspect-ratio: 5 / 6; grid-template-rows: repeat(6, minmax(0, 1fr)); gap: clamp(.18rem, .65dvh, .35rem); margin: 0; }
.five-letters-shell.is-five-letters-playing .letter-row { min-height: 0; gap: clamp(.18rem, .65dvh, .35rem); }
.five-letters-shell.is-five-letters-playing .letter-tile { min-height: 0; aspect-ratio: auto; font-size: clamp(1.15rem, 5dvh, 2.2rem); }
.five-letters-shell.is-five-letters-playing .letter-keyboard { grid-row: 5; gap: clamp(.18rem, .55dvh, .35rem); margin: 0 auto; padding-bottom: env(safe-area-inset-bottom); }
.five-letters-shell.is-five-letters-playing .letter-keyboard > div { gap: clamp(.1rem, .5vw, .2rem); }
.five-letters-shell.is-five-letters-playing .letter-keyboard button { min-height: var(--control-height); height: clamp(44px, 5.4dvh, 46px); }

@media (max-height: 520px) and (orientation: landscape) {
  .five-letters-shell.is-five-letters-playing .game-header { display: none; }
  .five-letters-shell.is-five-letters-playing .five-letters-page { grid-template-rows: minmax(0, 1fr); }
  .five-letters-shell.is-five-letters-playing .five-letters-game {
    grid-template-columns: minmax(118px, .45fr) minmax(300px, 1.55fr);
    grid-template-rows: auto minmax(0, 1fr);
    gap: .2rem .5rem;
    padding: .35rem .65rem max(.3rem, env(safe-area-inset-bottom));
  }
  .five-letters-shell.is-five-letters-playing .game-title-row,
  .five-letters-shell.is-five-letters-playing .round-history { display: none; }
  .five-letters-shell.is-five-letters-playing .game-status { grid-row: 1; grid-column: 1 / -1; overflow: hidden; font-size: .66rem; text-overflow: ellipsis; white-space: nowrap; }
  .five-letters-shell.is-five-letters-playing .letter-board-stage { grid-row: 2; grid-column: 1; }
  .five-letters-shell.is-five-letters-playing .letter-board { width: min(100%, 83.333cqh); }
  .five-letters-shell.is-five-letters-playing .letter-keyboard { width: 100%; grid-row: 2; grid-column: 2; align-self: center; }
}

.slots-shell { min-height: 100vh; background: radial-gradient(circle at 50% 22%, #2a2018 0, #131411 42%, var(--ink) 72%); }
.slots-page { width: min(100%, 820px); margin: auto; padding-bottom: 3rem; }
.slots-game { padding: 2.5rem 1rem 1rem; }
.slots-game > .game-status { min-height: 2.6rem; }
.slots-turn-order { margin: 1.5rem 0; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 1rem; background: color-mix(in srgb, var(--surface) 84%, transparent); }
.slots-turn-order ol { display: grid; gap: .4rem; margin: .75rem 0; padding-left: 1.6rem; }
.slots-turn-order li { overflow-wrap: anywhere; }
.slots-turn-order li::marker { color: var(--brand-accent); font-weight: 850; }
.slots-turn-order small { color: var(--muted); line-height: 1.45; }
.slots-title-row { align-items: start; }
.slots-title-row h1 { font-size: clamp(4rem, 17vw, 7.5rem); }
.slots-scoreboard { display: flex; gap: .5rem; }
.slots-scoreboard > div { min-width: 78px; border-top: 3px solid var(--brand-accent); padding: .55rem .65rem; background: var(--surface); text-align: right; }
.slots-scoreboard span { display: block; color: var(--muted); font-size: .58rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.slots-scoreboard strong { display: block; margin-top: .15rem; font-size: 1.45rem; font-variant-numeric: tabular-nums; }
.slots-machine { --cabinet-gold: #d6a83f; --cabinet-red: #681f2b; position: relative; width: min(100%, 560px); margin: 2.4rem auto 0; border: 5px solid #3a2417; border-radius: 48px 48px 16px 16px; padding: .8rem; background: linear-gradient(105deg, #381218 0, var(--cabinet-red) 12%, #8b2d3b 48%, #561821 88%, #2a1014 100%); box-shadow: 0 28px 70px rgba(0, 0, 0, .58), inset 0 0 0 3px #a4702a, inset 12px 0 22px rgba(255, 199, 81, .12), inset -12px 0 22px rgba(0, 0, 0, .38); }
.slots-machine::before, .slots-machine::after { position: absolute; z-index: -1; top: 18%; bottom: 9%; width: 13px; border: 3px solid #3a2417; background: linear-gradient(#b57c2e, #5a3418 48%, #c38b36); content: ""; }
.slots-machine::before { left: -12px; border-radius: 9px 0 0 9px; }
.slots-machine::after { right: -12px; border-radius: 0 9px 9px 0; }
.slots-machine-marquee { display: grid; min-height: 62px; grid-template-columns: 1fr auto 1fr; align-items: center; margin: -.1rem .7rem .2rem; border: 4px solid #442814; border-radius: 34px 34px 10px 10px; padding: .5rem 1rem; background: radial-gradient(circle at 50% 32%, #fff4a8 0, #ffcf3f 28%, #d76b16 74%, #7a2c10 100%); color: #5d1717; box-shadow: inset 0 0 0 3px #f8d979, inset 0 -12px 22px rgba(123, 33, 12, .28), 0 6px 0 #321b10, 0 12px 20px rgba(0, 0, 0, .38); text-align: center; }
.slots-machine-marquee strong { font-size: clamp(1.15rem, 5.2vw, 2rem); letter-spacing: .055em; white-space: nowrap; text-shadow: 0 1px #fff2a0, 0 3px 0 rgba(255, 255, 255, .2), 0 0 12px rgba(255, 250, 176, .42); }
.slots-machine-marquee span { color: #8b261c; font-size: 1.15rem; text-shadow: 0 1px #fff1a2; }
.slots-machine-bulbs { display: flex; height: 17px; align-items: center; justify-content: space-between; margin: .45rem .65rem .5rem; }
.slots-machine-bulbs span { width: 8px; aspect-ratio: 1; border-radius: 50%; background: #b36b1d; box-shadow: inset 0 0 2px rgba(52, 25, 8, .8), 0 0 3px rgba(255, 205, 65, .32); opacity: .58; }
.slots-machine.is-spinning .slots-machine-bulbs span { animation: screen-slot-bulb-flicker var(--bulb-speed) steps(1, end) var(--bulb-delay) infinite; }
.slots-screen-bezel { border: 6px solid #2c1b12; border-radius: 12px; padding: .55rem; background: linear-gradient(135deg, #bb8735, #5a351b 18%, #d5a34a 48%, #4a2b17 82%, #9b6828); box-shadow: inset 0 0 0 2px #e4bd68, 0 8px 18px rgba(0, 0, 0, .48); }
.slots-grid-wrap { position: relative; isolation: isolate; }
.slots-lines { position: absolute; z-index: 4; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.slots-lines polyline { stroke: var(--line-color); stroke-width: 5px; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .95)); }
.slots-grid { position: relative; z-index: 1; display: grid; aspect-ratio: 1.67; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-template-rows: minmax(0, 1fr); gap: .3rem; border: 5px solid #100b08; border-radius: 7px; padding: .3rem; background: #100b08; overflow: hidden; box-shadow: inset 0 18px 24px rgba(0, 0, 0, .24), inset 0 -18px 24px rgba(0, 0, 0, .3); }
.slot-reel { position: relative; min-width: 0; height: 100%; overflow: hidden; border: 1px solid #3f483d; border-radius: 3px; background: #e8eadf; box-shadow: inset 0 18px 18px -18px rgba(0, 0, 0, .9), inset 0 -18px 18px -18px rgba(0, 0, 0, .9); }
.slot-reel::before, .slot-reel::after { position: absolute; z-index: 2; right: 0; left: 0; height: 16%; pointer-events: none; content: ""; }
.slot-reel::before { top: 0; background: linear-gradient(rgba(9, 11, 9, .52), transparent); }
.slot-reel::after { bottom: 0; background: linear-gradient(transparent, rgba(9, 11, 9, .52)); }
.slot-reel-strip { display: grid; height: 100%; grid-template-rows: repeat(3, minmax(0, 1fr)); gap: .35rem; }
.slot-reel-strip.is-rolling { display: flex; height: auto; flex-direction: column; gap: var(--slot-gap); will-change: transform; }
.slot-reel-strip.is-rolling .slot-cell { flex: 0 0 var(--slot-cell-height); width: 100%; filter: blur(.35px) saturate(.85); }
.slot-cell { display: grid; min-width: 0; min-height: 0; place-items: center; border: 1px solid #898979; border-radius: 3px; background: linear-gradient(105deg, #d7d8cf, #fffef4 38%, #e7e8df 72%, #c9cbc1); color: #11140f; font-size: clamp(1.65rem, 8vw, 3.4rem); line-height: 1; filter: saturate(.9); text-shadow: 0 2px 0 rgba(255, 255, 255, .68); }
.slots-line-callouts { display: flex; width: min(100%, 560px); height: 4.55rem; flex-wrap: nowrap; align-items: center; justify-content: center; gap: .35rem; margin: 0 auto; padding: .5rem .25rem 0; overflow-x: auto; scrollbar-width: none; }
.slots-line-callouts:empty { display: none; }
.slots-line-callouts::-webkit-scrollbar { display: none; }
.slots-line-callout { display: grid; min-width: 112px; flex: 0 0 auto; grid-template-columns: auto auto; grid-template-rows: auto auto; gap: 0 .45rem; border: 1px solid var(--line-color); border-left-width: 5px; padding: .4rem .55rem; background: #0b0d0c; text-align: left; box-shadow: 0 0 14px color-mix(in srgb, var(--line-color) 18%, transparent); }
.slots-line-callout > span { color: var(--line-color); font-size: .56rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.slots-line-callout > small { grid-row: 2; color: var(--muted); font-size: .65rem; }
.slots-line-callout > strong { grid-row: 1 / 3; grid-column: 2; align-self: center; color: var(--line-color); font-size: 1.25rem; }
.slots-control-panel { margin-top: .65rem; border: 3px solid #3c2516; border-radius: 7px 7px 12px 12px; padding: .4rem .75rem .65rem; background: linear-gradient(160deg, #4c2d1b, #24160f 54%, #5e381f); box-shadow: inset 0 0 0 1px #9c682c, inset 0 10px 20px rgba(255, 203, 94, .08); }
.slots-win { min-height: 2rem; padding: .55rem .4rem .1rem; color: #d6bd8d; font-size: .68rem; font-weight: 900; letter-spacing: .1em; text-align: center; text-transform: uppercase; transition: color .2s; }
.slots-win.is-result, .slots-win.is-spinning { font-size: .9rem; }
.slots-win.is-result { color: #ffe265; }
.slots-win.is-spinning { color: #f4d894; }
.slots-win.is-miss { color: #bcae96; }
.slots-spin-button { display: block; width: min(100%, 320px); min-height: 58px; margin: .4rem auto .35rem; border: 2px solid #4e3506; border-radius: 999px; background: linear-gradient(#fff36f, #ffd32f 58%, #e9a814); color: #1a1204; font-weight: 950; letter-spacing: .035em; text-transform: uppercase; cursor: pointer; box-shadow: 0 7px 0 #8c5809, 0 12px 20px rgba(0, 0, 0, .42), inset 0 2px 0 rgba(255, 255, 255, .72); transition: transform .08s, box-shadow .08s, filter .2s; }
.slots-spin-button:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
.slots-spin-button:active:not(:disabled) { transform: translateY(5px); box-shadow: 0 2px 0 #8c5809, 0 5px 12px rgba(0, 0, 0, .4); }
.slots-spin-button:disabled { border-color: #34291e; background: linear-gradient(#514a3e, #302b25); color: #8e8576; box-shadow: 0 4px 0 #1a1511; cursor: default; }
.slots-cabinet-details { display: flex; align-items: center; justify-content: space-between; height: 15px; margin: .15rem .35rem 0; opacity: .72; }
.slots-speaker { width: 82px; height: 7px; background: repeating-linear-gradient(90deg, #0a0806 0 3px, transparent 3px 8px); }
.slots-coin-slot { width: 34px; height: 8px; border: 1px solid #ad7b32; border-radius: 4px; background: #090706; box-shadow: inset 0 0 4px #000, 0 0 0 2px #3b2516; }
.slots-history { display: grid; grid-template-columns: repeat(5, minmax(95px, 1fr)); gap: .45rem; margin: 1rem auto 0; overflow-x: auto; }
.slots-history article { min-width: 95px; border: 1px solid var(--line); padding: .6rem; background: var(--surface); }
.slots-history article > span, .slots-history article > small { display: block; color: var(--muted); font-size: .58rem; }
.slots-history article > strong { display: block; margin: .25rem 0; color: var(--brand-accent); font-size: .82rem; }
.slots-history article.is-jackpot { border-color: #ffe242; }
.slots-history article.is-jackpot > strong { color: #ffe242; }
.slots-rules { margin: 2rem auto 0; border-top: 1px solid var(--line); padding-top: 1rem; }
.slots-rules summary { color: var(--muted); font-size: .78rem; font-weight: 800; cursor: pointer; }
.slots-rules > p { color: var(--muted); font-size: .75rem; line-height: 1.5; }
.slots-paytable { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); }
.slots-paytable > div { display: grid; grid-template-columns: 2rem 1fr; grid-template-rows: auto auto; gap: 0 .6rem; align-items: center; padding: .6rem; background: var(--surface); }
.slots-paytable > div > span { grid-row: 1 / 3; font-size: 1.45rem; }
.slots-paytable > div > strong { font-size: .76rem; }
.slots-paytable > div > small { color: var(--muted); font-size: .6rem; }
.slots-paytable > div.is-jackpot { background: #2b2606; }
.slots-paytable > div.is-jackpot strong, .slots-paytable > div.is-jackpot small { color: #ffe242; }
@keyframes screen-slot-bulb-flicker { 0%, 100% { background: #7d4716; box-shadow: inset 0 0 .12vw rgba(52, 25, 8, .9), 0 0 .12vw rgba(255, 205, 65, .2); opacity: .38; } 37% { background: #fff8b2; box-shadow: 0 0 .35vw #ffe05e, 0 0 .75vw rgba(255, 188, 45, .8); opacity: 1; } 64% { background: #e99a28; box-shadow: 0 0 .22vw rgba(255, 193, 54, .58); opacity: .68; } }

.quote-config-section > h1 { margin: 0; font-size: clamp(3.2rem, 11vw, 6.5rem); letter-spacing: -.03em; line-height: .9; }
.quote-config-form { display: grid; gap: 1rem; margin-top: 2rem; }
.quote-config-basics { display: grid; gap: 1rem; border: 1px solid var(--line); padding: 1rem; background: var(--ink); }
.quote-config-basics label small { font-weight: 500; text-transform: none; }
.quote-question-list { display: grid; gap: 1rem; }
.quote-config-card { border: 1px solid var(--line); padding: 1rem; background: var(--ink); }
.quote-config-card-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: 1rem; color: var(--brand-accent); font-size: .75rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.quote-config-card-actions, .question-order-actions { display: flex; align-items: center; gap: .4rem; }
.quote-config-card-actions { margin-left: auto; }
.question-order-button { width: 44px; padding-inline: .45rem; color: var(--paper); font-size: 1rem; line-height: 1; }
.question-order-button:disabled { color: var(--muted); }
.quote-config-card label + label, .quote-answer-fields { margin-top: 1rem; }
.quote-config-card label small { font-weight: 500; text-transform: none; }
.question-image-field { display: grid; gap: .8rem; margin-top: 1rem; border: 1px solid var(--line); padding: .8rem; background: var(--surface); }
.question-image-existing { display: grid; gap: .65rem; }
.question-image-existing img { display: block; width: 100%; max-height: 260px; background: var(--ink); object-fit: contain; }
.quote-config-card .question-image-remove { display: flex; align-items: center; gap: .55rem; color: var(--orange); text-transform: none; }
.question-image-remove input { width: auto; }
.game-question-media { display: block; width: 100%; max-height: 34vh; margin: -1rem 0 1.4rem; border: 1px solid var(--line); background: var(--ink); object-fit: contain; }
.quote-answer-fields { display: grid; gap: 1rem; }
.quote-remove-button:disabled { visibility: hidden; }
.quote-add-button { justify-self: start; }

.quote-shell { min-height: 100vh; }
.quote-page { width: min(100%, 820px); margin: auto; padding-bottom: 3rem; }
.quote-game { padding: 2.5rem 1rem 1rem; }
.quote-game-meta { display: grid; justify-items: end; gap: .4rem; }
.quote-game-meta .game-timer { color: var(--brand-accent); }
.quote-title-row { align-items: start; }
.quote-title-row h1 { font-size: clamp(3rem, 13vw, 6.3rem); line-height: .8; }
.quote-title-row .word-progress { flex: 0 0 auto; padding-top: 1rem; }
.quote-history { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1rem 0 1.5rem; }
.quote-history-marker { display: grid; width: 2rem; height: 2rem; place-items: center; border: 1px solid var(--line); color: var(--muted); font-size: .7rem; font-weight: 850; }
.quote-history-marker.is-correct { border-color: var(--brand-accent); background: var(--brand-accent); color: var(--ink); }
.quote-history-marker.is-wrong { border-color: var(--orange); color: var(--orange); }
.quote-question { border-top: 5px solid var(--paper); padding-top: 1.2rem; }
.quote-question-number { color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.quote-question blockquote { min-height: 7rem; margin: 1.5rem 0 2.2rem; font-size: clamp(1.65rem, 7vw, 3rem); font-weight: 850; letter-spacing: -.035em; line-height: 1.08; }
.quote-options { display: grid; gap: .55rem; }
.quote-option { display: grid; grid-template-columns: 2.4rem 1fr; align-items: center; min-height: 58px; border: 1px solid var(--line); padding: .65rem .8rem; background: var(--surface); color: var(--paper); text-align: left; cursor: pointer; }
.quote-option:hover, .quote-option:focus-visible { border-color: var(--brand-accent); }
.quote-option > span { display: grid; width: 1.6rem; height: 1.6rem; place-items: center; border: 1px solid var(--line); color: var(--brand-accent); font-size: .7rem; }
.quote-option > strong { font-size: 1rem; }
.quote-option:disabled { cursor: default; opacity: .6; }
.quote-option.is-selected { border-color: var(--blue); box-shadow: inset 4px 0 var(--blue); }
.quote-option.is-correct { border-color: var(--brand-accent); box-shadow: inset 4px 0 var(--brand-accent); opacity: 1; }
.quote-option.is-wrong { border-color: var(--orange); box-shadow: inset 4px 0 var(--orange); opacity: 1; }
.quote-reveal { margin: 2rem auto; border-top: 5px solid; padding: 1.5rem; background: var(--surface); text-align: center; }
.quote-reveal.is-correct { border-color: var(--brand-accent); }
.quote-reveal.is-wrong { border-color: var(--orange); }
.quote-reveal p { margin: 0; color: var(--muted); font-size: .72rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.quote-reveal.is-correct p { color: var(--brand-accent); }
.quote-reveal.is-wrong p { color: var(--orange); }
.quote-reveal strong { display: block; margin: 1rem 0 .45rem; font-size: clamp(2rem, 9vw, 4rem); letter-spacing: -.055em; line-height: .95; }
.quote-reveal > span { display: block; margin-bottom: 1.5rem; color: var(--muted); }
.quote-live-section > h1 { margin: 0; font-size: clamp(3.2rem, 11vw, 6.5rem); letter-spacing: -.03em; line-height: .9; }
.quote-live-status { display: grid; grid-template-columns: 1fr auto; align-items: center; margin: 2rem 0; border-top: 4px solid var(--brand-accent); padding: 1rem; background: var(--ink); }
.quote-live-status span, .quote-live-status small { color: var(--muted); }
.quote-live-status strong { grid-row: 1 / 3; grid-column: 2; color: var(--brand-accent); font-size: 4rem; font-variant-numeric: tabular-nums; }
.quote-live-section blockquote { margin: 2rem 0; font-size: clamp(1.8rem, 5vw, 3.5rem); font-weight: 850; letter-spacing: -.04em; line-height: 1.05; }
.admin-live-question-media { display: block; width: min(100%, 900px); max-height: 46vh; margin: -1rem 0 2rem; border: 1px solid var(--line); background: var(--ink); object-fit: contain; }
.quote-live-round { color: var(--brand-accent); font-size: .75rem; font-weight: 850; text-transform: uppercase; }
.quote-live-votes { display: grid; gap: .7rem; margin: 1.5rem 0; }
.quote-live-votes article { border: 1px solid var(--line); padding: 1rem; background: var(--ink); }
.quote-live-votes article.is-correct { border-color: var(--brand-accent); box-shadow: inset 4px 0 var(--brand-accent); }
.quote-live-votes article > strong { font-size: 1.2rem; }
.quote-live-votes article > div { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .8rem; }
.quote-live-votes article span { min-width: 0; border: 1px solid var(--line); padding: .35rem .5rem; overflow-wrap: anywhere; font-size: .78rem; }
.quote-live-votes article small { color: var(--muted); }
.closest-config-basics { grid-template-columns: 1fr; }
.closest-shell { min-height: 100vh; }
.closest-question h2 { min-height: 7rem; margin: 1.5rem 0 2.2rem; font-size: clamp(1.65rem, 7vw, 3rem); letter-spacing: -.035em; line-height: 1.08; }
.closest-answer-form { display: grid; gap: .65rem; }
.closest-answer-form label { color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.closest-answer-form input { width: 100%; min-height: 68px; border: 1px solid var(--line); border-radius: 0; padding: .8rem 1rem; background: var(--surface); color: var(--paper); font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.closest-answer-form input:focus { border-color: var(--blue); }
.closest-answer-form input.is-saved, .closest-answer-form input.is-saved:focus { border-color: var(--brand-accent); box-shadow: inset 0 0 0 1px var(--brand-accent); }
.closest-answer-form input:disabled { color: var(--muted); opacity: .75; }
.closest-answer-form input.is-saved:disabled { opacity: 1; }
.closest-reveal strong { color: var(--brand-accent); }

.closest-live-correct { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 1.5rem 0; border-top: 4px solid var(--brand-accent); padding: 1rem; background: var(--ink); }
.closest-live-correct span { color: var(--muted); font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.closest-live-correct strong { color: var(--brand-accent); font-size: clamp(2.5rem, 10vw, 5rem); letter-spacing: -.05em; }
.closest-live-answers { display: grid; gap: .7rem; margin: 1.5rem 0; }
.closest-live-answers article { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .25rem 1rem; border: 1px solid var(--line); padding: 1rem; background: var(--ink); }
.closest-live-answers article.is-scoring { border-color: var(--blue); box-shadow: inset 4px 0 var(--blue); }
.closest-live-answers article.is-closest { border-color: var(--brand-accent); box-shadow: inset 4px 0 var(--brand-accent); }
.closest-live-answers article > span { min-width: 0; overflow-wrap: anywhere; font-size: 1.2rem; font-weight: 850; }
.closest-live-answers article small { grid-column: 1 / -1; color: var(--muted); }
.closest-live-answers article.is-scoring small { color: var(--blue); }
.closest-live-answers article.is-closest small { color: var(--brand-accent); }
.closest-live-next-action { position: sticky; z-index: 2; bottom: max(.5rem, env(safe-area-inset-bottom)); margin: 1rem 0; padding: .45rem; background: rgba(11, 13, 12, .94); box-shadow: 0 0 0 1px var(--line); }
.closest-live-next-action .button { width: 100%; min-height: var(--control-height-large); }

.archive-shell { background: var(--ink); color: var(--paper); }
.archive-page { width: min(100%, 1000px); margin: auto; padding: 1rem; }
.tournament-page-header { display: flex; min-width: 0; min-height: 4rem; align-items: center; border-bottom: 1px solid var(--line); }
.archive-shell .tournament-lockup-product { color: var(--paper); }
.archive-hero { border-bottom: 1px solid var(--line); padding: clamp(2.25rem, 5vw, 3.5rem) 0 clamp(2rem, 4vw, 3rem); }
.archive-hero h1 { margin: 0; font-size: clamp(3.4rem, 8vw, 6rem); letter-spacing: -.035em; line-height: .88; }
.archive-hero span { display: block; margin-top: 1rem; color: var(--muted); font-weight: 750; }
.podium-section { padding: clamp(2.5rem, 5vw, 3.5rem) 0 clamp(2.5rem, 5vw, 3.5rem); }
.archive-disciplines { padding: 0 0 clamp(3rem, 7vw, 5rem); }
.archive-ranking-heading { align-items: end; }
.archive-ranking-heading > div { min-width: 0; }
.archive-ranking-heading > span { flex: 0 0 auto; color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.archive-podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: clamp(.5rem, 1.2vw, .85rem); margin: 0; padding: 0; list-style: none; }
.archive-podium li { --podium-color: var(--paper); min-width: 0; grid-row: 1; align-self: end; }
.archive-podium li.place-1 { --podium-color: var(--brand-accent); }
.archive-podium li.place-2 { --podium-color: #cfd5dc; }
.archive-podium li.place-3 { --podium-color: #d88b4f; }
.archive-podium li > a { display: grid; min-height: 10.5rem; grid-template-rows: auto auto minmax(0, 1fr); gap: .5rem; overflow: hidden; border: 1px solid color-mix(in srgb, var(--podium-color) 38%, var(--line)); border-top: 5px solid var(--podium-color); padding: clamp(.85rem, 2vw, 1.25rem); background: linear-gradient(165deg, color-mix(in srgb, var(--podium-color) 13%, var(--surface)), color-mix(in srgb, var(--podium-color) 4%, var(--ink))); box-shadow: inset 0 1px color-mix(in srgb, var(--podium-color) 20%, transparent), 0 1rem 2.25rem rgba(0, 0, 0, .18); text-decoration: none; }
.archive-podium li > a:hover { border-color: var(--podium-color); }
.archive-podium-slot-1 { grid-column: 2; }
.archive-podium .archive-podium-slot-1 > a { min-height: 15rem; }
.archive-podium-slot-2 { grid-column: 1; }
.archive-podium .archive-podium-slot-2 > a { min-height: 12.5rem; }
.archive-podium-slot-3 { grid-column: 3; }
.archive-podium .archive-podium-slot-3 > a { min-height: 10.5rem; }
.archive-podium-count-1 { grid-template-columns: minmax(0, 21rem); justify-content: center; }
.archive-podium-count-1 .archive-podium-slot-1 { grid-column: 1; }
.archive-podium-count-2 { grid-template-columns: repeat(2, minmax(0, 21rem)); justify-content: center; }
.archive-podium-count-2 .archive-podium-slot-1 { grid-column: 2; }
.archive-podium-count-2 .archive-podium-slot-2 { grid-column: 1; }
.archive-podium-name { min-width: 0; overflow-wrap: anywhere; font-size: clamp(1.15rem, 2.3vw, 1.65rem); line-height: 1.02; }
.archive-podium-points { display: flex; align-items: baseline; gap: .35rem; color: color-mix(in srgb, var(--podium-color) 68%, var(--paper)); font-variant-numeric: tabular-nums; }
.archive-podium-points b { font-size: 1rem; }
.archive-podium-points small { color: var(--muted); font-size: .68rem; font-weight: 750; }
.archive-podium-rank { align-self: end; color: var(--podium-color); font-size: clamp(4rem, 9vw, 6.5rem); font-weight: 950; letter-spacing: -.08em; line-height: .7; text-shadow: 0 0 2.4rem color-mix(in srgb, var(--podium-color) 16%, transparent); }
.archive-ranking-rest { margin-top: 1.5rem; }
.archive-ranking-rest h3 { margin: 0; border-top: 1px solid var(--line); padding: 1.1rem .55rem .55rem; color: var(--muted); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; }
.archive-standings-table { table-layout: fixed; font-variant-numeric: tabular-nums; }
.archive-standings-table :is(th, td):first-child { width: 4.5rem; }
.archive-standings-table :is(th, td):last-child { width: 7rem; text-align: right; }
.archive-standings-table td:first-child { color: var(--paper); font-size: 1.15rem; font-weight: 900; }
.archive-standings-table td:nth-child(2) { overflow-wrap: anywhere; white-space: normal; }
.archive-standings-table td:last-child { font-weight: 800; }
.archive-disciplines details { border-top: 1px solid var(--line); }
.archive-disciplines details:last-child { border-bottom: 1px solid var(--line); }
.archive-disciplines summary { display: grid; min-height: 3.5rem; grid-template-columns: 3rem minmax(0, 1fr) auto; align-items: center; padding: 1rem 0; cursor: pointer; list-style: none; }
.archive-disciplines summary > strong { min-width: 0; overflow-wrap: anywhere; }
.archive-disciplines summary::-webkit-details-marker { display: none; }
.archive-disciplines summary > span { color: var(--muted); font-size: .7rem; }
.archive-disciplines summary > b { font-size: 1.5rem; line-height: 1; transition: transform 220ms var(--show-ease); }
.archive-disciplines details[open] summary > b { transform: rotate(45deg); }
.archive-disciplines details::details-content { content-visibility: visible; }
.archive-discipline-panel { display: grid; grid-template-rows: 0fr; visibility: hidden; opacity: 0; transition: grid-template-rows 280ms var(--show-ease), opacity 180ms ease, visibility 280ms; }
.archive-disciplines details[open] > .archive-discipline-panel { grid-template-rows: 1fr; visibility: visible; opacity: 1; }
.archive-disciplines details[open] { border-left: 3px solid var(--brand-accent); padding-left: .75rem; background: linear-gradient(90deg, rgba(var(--brand-accent-rgb), .055), transparent 38%); }
.archive-discipline-panel > .table-wrap { min-height: 0; overflow-y: hidden; }
.archive-shell table a { font-weight: 700; text-decoration: none; }
.participant-result-page { width: min(100%, 760px); margin: auto; padding: 1.2rem; }
.participant-result-page > .back-link { display: inline-flex; margin-top: 1rem; }
.participant-result-hero { padding: 7rem 0 3rem; }
.participant-result-page h1 { margin: 0; overflow-wrap: anywhere; font-size: clamp(3.7rem, 15vw, 7.5rem); letter-spacing: -.03em; line-height: .92; }
.participant-total { display: flex; align-items: center; gap: 1rem; margin-top: 2.5rem; }
.participant-total > span { font-size: 5rem; font-weight: 950; line-height: .8; }
.participant-total p, .participant-total small { margin: 0; display: block; color: var(--muted); }
.participant-results { margin: 0 0 5rem; padding: 0; list-style: none; }
.participant-results li { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr) auto; align-items: center; border-top: 1px solid var(--line); padding: 1rem 0; }
.participant-results li > span, .participant-results small { color: var(--muted); font-size: .7rem; }
.participant-results li div b, .participant-results li div small, .participant-results li > strong small { display: block; }
.participant-results li > div { min-width: 0; overflow-wrap: anywhere; }
.participant-results li > strong { text-align: right; }

.platform-shell { min-height: 100vh; background: radial-gradient(circle at 74% 9%, rgba(var(--brand-accent-rgb), .08), transparent 30rem), var(--ink); }
.platform-logo { display: inline-flex; width: auto; height: 2.5rem; flex: 0 0 auto; align-items: center; text-decoration: none; }
.platform-logo .partyathlon-wordmark { display: block; width: auto; height: 100%; }
.platform-page, .dashboard-page, .create-page { width: min(100%, var(--page-max)); margin: auto; padding-inline: var(--page-gutter); }
.platform-hero { min-height: min(780px, calc(100vh - 72px)); display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 380px); gap: clamp(2.5rem, 4vw, 4.5rem); align-items: center; border-bottom: 1px solid var(--line); padding: 6rem 0; }
.platform-hero-copy { min-width: 0; }
.platform-hero h1 { max-width: 780px; margin: 0; font-size: clamp(3.5rem, 5vw, 4.8rem); font-weight: 850; letter-spacing: -.032em; line-height: .96; }
.platform-hero h1 span { color: var(--paper); }
.platform-lead { max-width: 650px; margin: 2rem 0 0; color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.25rem); line-height: 1.65; }
.platform-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.3rem; margin-top: 2rem; }
.platform-text-link { color: var(--paper); font-size: .88rem; font-weight: 700; text-decoration: none; }
.platform-text-link span { color: var(--brand-accent); }
.platform-demo { overflow: hidden; border: 1px solid var(--line); background: rgba(19, 22, 20, .9); box-shadow: 0 2rem 6rem rgba(0, 0, 0, .2); }
.platform-demo > header, .platform-demo > footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.1rem; color: var(--muted); font-size: .7rem; font-weight: 750; }
.platform-demo > header { border-bottom: 1px solid var(--line); }
.platform-demo > footer { border-top: 1px solid var(--line); }
.platform-demo > footer b { color: var(--brand-accent); letter-spacing: .08em; }
.platform-demo-live { color: var(--brand-accent); white-space: nowrap; }
.platform-demo-live i { display: inline-block; width: .45rem; height: .45rem; margin-right: .25rem; border-radius: 50%; background: var(--brand-accent); box-shadow: 0 0 .8rem rgba(var(--brand-accent-rgb), .45); }
.platform-demo-current { padding: clamp(1.8rem, 4vw, 3rem) 1.1rem; }
.platform-demo-current small { color: var(--muted); font-size: .68rem; letter-spacing: .07em; text-transform: uppercase; }
.platform-demo-current h2 { margin: .4rem 0 .7rem; font-size: clamp(2rem, 3.8vw, 3.4rem); font-weight: 800; letter-spacing: -.025em; line-height: 1; }
.platform-demo-current p { margin: 0; color: var(--muted); }
.platform-demo ol { margin: 0; padding: 0; list-style: none; }
.platform-demo li { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr) auto; gap: .5rem; align-items: center; border-top: 1px solid var(--line); padding: .8rem 1.1rem; }
.platform-demo li > span { color: var(--brand-accent); font-size: .7rem; }
.platform-demo li > b { font-variant-numeric: tabular-nums; }
.platform-how { scroll-margin-top: 2rem; padding: 7rem 0 0; }
.platform-section-intro { display: grid; max-width: 820px; gap: .6rem; margin-bottom: 3rem; }
.platform-section-intro h2 { margin: 0; font-size: clamp(2.5rem, 5vw, 4.8rem); font-weight: 800; letter-spacing: -.028em; line-height: 1; }
.platform-feature-strip { display: grid; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.platform-feature-strip article { min-height: 230px; border-bottom: 1px solid var(--line); padding: 1.5rem 0; }
.platform-feature-strip article:last-child { border-bottom: 0; }
.platform-feature-strip span { color: var(--brand-accent); font-size: .7rem; font-weight: 850; }
.platform-feature-strip b { display: block; margin: 4rem 0 .6rem; font-size: 1.25rem; }
.platform-feature-strip p { max-width: 310px; margin: 0; color: var(--muted); line-height: 1.6; }
.platform-tournaments { padding: 6rem 0; }
.tournament-grid { display: grid; gap: .8rem; }
.tournament-card { min-height: 280px; display: flex; flex-direction: column; border: 1px solid var(--line); background: var(--surface); text-decoration: none; }
.tournament-card:hover { border-color: var(--brand-accent); transform: translateY(-2px); }
.tournament-card h3 { margin: 2.8rem 0 .6rem; font-size: 2rem; letter-spacing: -.02em; line-height: 1.05; }
.tournament-card p { margin: 0; color: var(--muted); line-height: 1.5; }
.tournament-card > b { margin-top: auto; color: var(--brand-accent); }
.tournament-card-status { width: fit-content; border: 1px solid var(--line); padding: .35rem .5rem; color: var(--muted); font-size: .65rem; font-weight: 800; text-transform: uppercase; }
.tournament-card-status.status-in_progress { border-color: var(--brand-accent); color: var(--brand-accent); }
.tournament-card-status.status-finished { border-color: var(--blue); color: var(--blue); }
.platform-final-cta { display: flex; align-items: end; justify-content: space-between; gap: 2rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 5rem 0; }
.platform-final-cta h2 { max-width: 760px; margin: 0; font-size: clamp(2.4rem, 5vw, 4.8rem); font-weight: 800; letter-spacing: -.028em; line-height: 1; }
.platform-final-cta > .button { flex: 0 0 auto; }
.site-footer-shell { display: flex; min-height: 100vh; min-height: 100dvh; flex-direction: column; }
.site-footer-shell > main { flex: 1 0 auto; }
.site-footer-shell > .auth-layout { min-height: 0; }
.site-footer { display: flex; width: min(100%, var(--page-max)); flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 1rem; margin: 4rem auto 0; border-top: 1px solid var(--line); padding: 1.4rem max(var(--page-gutter), env(safe-area-inset-right)) max(2.5rem, env(safe-area-inset-bottom)) max(var(--page-gutter), env(safe-area-inset-left)); color: var(--muted); }
.site-footer p { margin: 0; font-size: .72rem; text-align: right; }
.site-footer .platform-logo { color: var(--paper); }

.auth-layout { position: relative; display: grid; width: min(100%, var(--page-max)); min-height: 100vh; margin: auto; padding: var(--page-gutter); }
.auth-intro { align-self: end; padding: 7rem 0 3rem; }
.auth-intro h1 { margin: 0; font-size: clamp(4rem, 14vw, 8rem); letter-spacing: -.032em; line-height: .9; }
.auth-intro > p:last-child { max-width: 430px; color: var(--muted); line-height: 1.55; }
.auth-card { align-self: center; display: grid; gap: 1rem; border: 1px solid var(--line); background: var(--surface); }
.auth-card h2 { margin: 0 0 1rem; font-size: 2.7rem; letter-spacing: -.02em; line-height: 1.05; }
.auth-card label small, .create-form label small { font-weight: 500; text-transform: none; }
.auth-card > p:last-child { margin: 0; color: var(--muted); font-size: .8rem; }
.auth-card > p:last-child a { color: var(--paper); }
.code-input { --display-letter-spacing: .22em; font-size: 2rem; font-weight: 900; text-align: center; font-variant-numeric: tabular-nums; }

.dashboard-page { padding-top: 4rem; padding-bottom: 6rem; }
.dashboard-heading { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1.5rem; border-bottom: 1px solid var(--line); padding-bottom: 2rem; }
.dashboard-heading h1 { margin: 0; font-size: clamp(3.6rem, 10vw, 7rem); letter-spacing: -.032em; line-height: .9; }
.dashboard-list { display: grid; gap: .8rem; padding-top: 1rem; }
.dashboard-tournament { display: grid; gap: 2rem; border: 1px solid var(--line); background: var(--surface); }
.dashboard-tournament h2 { margin: 1.6rem 0 .4rem; font-size: clamp(1.8rem, 5vw, 3rem); letter-spacing: -.02em; line-height: 1.05; }
.dashboard-tournament p { margin: 0; color: var(--muted); }
.dashboard-tournament-actions { display: flex; flex-wrap: wrap; align-items: end; gap: var(--action-gap); }
.dashboard-empty { border: 1px dashed var(--line); padding: 4rem 1.2rem; text-align: center; }
.dashboard-empty > span { color: var(--brand-accent); font-size: 4rem; font-weight: 950; }
.dashboard-empty h2 { margin: .5rem 0; font-size: 2rem; }
.dashboard-empty p { margin: 0 auto 1.5rem; color: var(--muted); }

.create-page { padding-top: 4rem; padding-bottom: 7rem; }
.create-heading { border-bottom: 1px solid var(--line); padding-bottom: 3rem; }
.create-heading h1 { margin: 0; font-size: clamp(4rem, 11vw, 8rem); letter-spacing: -.032em; line-height: .9; }
.create-form { display: grid; }
.create-form > .flash { width: 100%; }
.create-section { display: grid; grid-template-columns: 2.5rem 1fr; gap: 1rem; border-bottom: 1px solid var(--line); padding: 3rem 0; }
.create-step { color: var(--brand-accent); font-size: .75rem; font-weight: 900; }
.create-section h2 { margin: 0 0 2rem; font-size: clamp(2rem, 6vw, 3.4rem); letter-spacing: -.02em; line-height: 1.05; }
.create-section label { margin-top: 1rem; }
.discipline-picker { display: grid; gap: .55rem; }
.discipline-picker label { position: relative; display: block; margin: 0; cursor: pointer; }
.discipline-picker input { position: absolute; top: 1rem; right: 1rem; z-index: 1; }
.discipline-picker label > span { display: grid; grid-template-columns: 2.5rem 1fr; border: 1px solid var(--line); padding: 1rem 3.2rem 1rem 1rem; background: var(--surface); }
.discipline-picker label > span i { grid-row: 1 / 3; color: var(--muted); font-style: normal; }
.discipline-picker label > span b { color: var(--paper); font-size: 1rem; text-transform: none; }
.discipline-picker label > span small { margin-top: .25rem; color: var(--muted); font-size: .82rem; line-height: 1.5; }
.discipline-picker input:checked + span { border-color: var(--brand-accent); box-shadow: inset 4px 0 var(--brand-accent); }
.create-submit { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 2rem; }
.create-submit p { margin: 0; color: var(--muted); }

@media (max-width: 480px) {
  .admin-header { align-items: flex-start; }
  .admin-header > div { flex-basis: 100%; }
  .admin-header nav { width: 100%; justify-content: space-between; gap: .5rem; }
  .admin-header nav a, .admin-header > a, .admin-header .tournament-lockup-product, .admin-header .text-button { display: inline-flex; min-width: var(--control-height); min-height: var(--control-height); align-items: center; justify-content: center; }
  .section-heading { display: grid; justify-items: start; }
  .admin-section[id] { scroll-margin-top: calc(10rem + env(safe-area-inset-top)); }
  .admin-header nav a, .admin-header .text-button { font-size: .68rem; }
  .discipline-card-order-actions .button { min-width: var(--control-height); }
  .create-heading h1 { overflow-wrap: anywhere; font-size: clamp(3rem, 15vw, 4rem); }
  .portal-header { gap: .8rem; padding: max(.8rem, env(safe-area-inset-top)) max(.9rem, env(safe-area-inset-right)) .8rem max(.9rem, env(safe-area-inset-left)); }
  .portal-header .tournament-lockup { font-size: .76rem; }
  .portal-header form { flex: 0 0 auto; }
  .game-header { min-height: 48px; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; padding: max(.6rem, env(safe-area-inset-top)) max(.75rem, env(safe-area-inset-right)) .6rem max(.75rem, env(safe-area-inset-left)); }
  .game-header .tournament-lockup { justify-content: flex-start; font-size: .7rem; }
  .game-header > .game-participant-name { max-width: 32vw; font-size: .64rem; }
  .slots-page { padding-bottom: 5.5rem; }
  .slots-shell.is-slots-playing { height: 100vh; height: 100dvh; overflow: hidden; }
  .is-slots-playing .slots-page { height: 100vh; height: 100dvh; padding-bottom: 4.75rem; overflow: hidden; }
  .is-slots-playing .slots-game { padding-bottom: 0; }
  .is-slots-playing .slots-history,
  .is-slots-playing .game-summary,
  .is-slots-playing .slots-rules { display: none; }
  .is-slots-playing .slots-line-callouts:not(:empty) { position: fixed; z-index: 19; right: .75rem; bottom: calc(4.85rem + env(safe-area-inset-bottom)); left: .75rem; width: auto; height: 3.65rem; justify-content: start; border: 1px solid var(--line); padding: .3rem; background: rgba(7, 9, 8, .94); box-shadow: 0 -10px 24px rgba(0, 0, 0, .48); }
  .slots-page .game-header { min-height: 48px; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; padding: max(.55rem, env(safe-area-inset-top)) max(.75rem, env(safe-area-inset-right)) .55rem max(.75rem, env(safe-area-inset-left)); }
  .slots-page .tournament-lockup { font-size: .7rem; }
  .slots-page .game-header > .game-participant-name { font-size: .62rem; }
  .slots-game { padding: 1.2rem .75rem 1rem; }
  .slots-title-row { gap: .5rem; }
  .slots-title-row h1 { font-size: 3.15rem; }
  .slots-title-row .eyebrow { margin-bottom: .45rem; font-size: .62rem; }
  .slots-scoreboard { gap: .3rem; }
  .slots-scoreboard > div { min-width: 62px; padding: .35rem .4rem; }
  .slots-scoreboard span { font-size: .5rem; }
  .slots-scoreboard strong { font-size: 1.15rem; }
  .slots-game > .game-status { min-height: 2.9rem; margin: .8rem 0 .55rem; font-size: .72rem; line-height: 1.35; }
  .slots-machine { margin-top: 1.7rem; border-width: 3px; border-radius: 34px 34px 12px 12px; padding: .55rem; }
  .slots-machine::before, .slots-machine::after { width: 9px; border-width: 2px; }
  .slots-machine::before { left: -8px; }
  .slots-machine::after { right: -8px; }
  .slots-machine-marquee { min-height: 46px; margin: 0 .45rem .1rem; border-width: 3px; border-radius: 25px 25px 8px 8px; padding: .3rem .65rem; box-shadow: inset 0 0 0 2px #f8d979, inset 0 -9px 16px rgba(123, 33, 12, .25), 0 4px 0 #321b10, 0 8px 14px rgba(0, 0, 0, .34); }
  .slots-machine-marquee strong { font-size: 1.25rem; }
  .slots-machine-marquee span { font-size: .85rem; }
  .slots-machine-bulbs { height: 11px; margin: .35rem .45rem; }
  .slots-screen-bezel { border-width: 4px; border-radius: 8px; padding: .32rem; }
  .slots-grid { gap: .25rem; border-width: 3px; padding: .25rem; }
  .slot-cell { font-size: clamp(1.55rem, 8vw, 2.7rem); }
  .slots-line-callouts { flex-wrap: nowrap; justify-content: start; overflow-x: auto; padding: .45rem 0 0; scrollbar-width: none; }
  .slots-line-callouts::-webkit-scrollbar { display: none; }
  .slots-line-callout { min-width: 104px; flex: 0 0 auto; padding: .32rem .45rem; }
  .slots-control-panel { margin-top: .45rem; padding: .25rem .55rem .45rem; }
  .slots-win { min-height: 1.5rem; padding: .35rem .3rem 0; font-size: .58rem; }
  .slots-win.is-result, .slots-win.is-spinning { font-size: .8rem; }
  .slots-shell.is-slots-playing .slots-spin-button { position: fixed; z-index: 20; bottom: max(.7rem, env(safe-area-inset-bottom)); left: 50%; width: min(calc(100vw - 1.5rem), 350px); min-height: 56px; margin: 0; transform: translateX(-50%); outline: 5px solid rgba(58, 36, 23, .94); box-shadow: 0 7px 0 #8c5809, 0 14px 26px rgba(0, 0, 0, .62), inset 0 2px 0 rgba(255, 255, 255, .72); }
  .slots-shell.is-slots-playing .slots-spin-button:hover:not(:disabled) { filter: brightness(1.08); transform: translateX(-50%); }
  .slots-shell.is-slots-playing .slots-spin-button:active:not(:disabled) { transform: translate(-50%, 5px); }
  .slots-cabinet-details { height: 10px; }
  .slots-history { display: flex; gap: .4rem; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
  .slots-history::-webkit-scrollbar { display: none; }
  .slots-history article { min-width: 110px; flex: 0 0 110px; scroll-snap-align: start; }
}
@media (max-width: 480px) and (max-height: 720px) {
  .slots-game { padding-top: .9rem; }
  .slots-title-row h1 { font-size: 2.8rem; }
  .slots-game > .game-status { margin-top: .6rem; }
  .slots-machine { width: min(100%, 326px); margin-top: 1.45rem; }
}
@media (max-width: 480px) and (max-height: 600px) {
  .slots-game { padding-top: .55rem; }
  .slots-title-row h1 { font-size: 2.35rem; }
  .slots-title-row .eyebrow { margin-bottom: .25rem; }
  .slots-game > .game-status { min-height: 2.35rem; margin: .35rem 0 .2rem; font-size: .66rem; }
  .slots-machine { width: min(100%, 280px); margin-top: .6rem; }
}
@media (max-width: 480px) and (min-height: 800px) {
  .is-slots-playing .slots-history { display: flex; }
}
@media (min-width: 700px) {
  .identity-page { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .event-mark { padding: 1.2rem 2rem; }
  .identity-panel { align-self: stretch; display: flex; flex-direction: column; justify-content: center; padding: 4rem 2rem; }
  .identity-panel h1 { font-size: min(7vw, 5.5rem); }
  .portal-header { padding: 1.2rem 2rem; }
  .portal-hero, .schedule { padding-inline: 2rem; }
  .discipline-list strong { font-size: 1.15rem; }
  .admin-discipline { grid-template-columns: minmax(210px, .8fr) minmax(0, 1.7fr) auto; }
  .admin-section { }
  .status-banner { grid-template-columns: 8rem 1fr auto; align-items: center; }
  .participant-admin-list form { grid-template-columns: 2rem 1fr 140px auto; }
  .participant-admin-identity, .participant-admin-list form > .toggle, .participant-admin-actions { grid-column: auto; }
  .add-participant { grid-template-columns: 1fr auto; align-items: end; }
  .tiebreak-form { grid-template-columns: 1fr auto; align-items: end; }
  .result-edit-row { grid-template-columns: minmax(0, 1fr) minmax(110px, 30%) auto; }
  .result-edit-row-multi { grid-template-columns: minmax(150px, .5fr) minmax(0, 1.8fr); align-items: start; }
  .result-edit-row > .button { grid-column: auto; }
  .five-letters-game { padding: 4rem 2rem 2rem; }
  .slots-game { padding: 4rem 2rem 2rem; }
  .quote-game { padding: 4rem 2rem 2rem; }
  .quote-answer-fields { grid-template-columns: 1fr 1fr; }
  .quote-config-basics { grid-template-columns: 2fr 1fr; }
  .quote-config-basics.closest-config-basics { grid-template-columns: 1fr; }
  .quote-live-votes { grid-template-columns: repeat(2, 1fr); }
  .letter-keyboard button { height: 48px; }
  .platform-feature-strip { grid-template-columns: repeat(3, 1fr); }
  .platform-feature-strip article { border-right: 1px solid var(--line); border-bottom: 0; padding: 1.5rem; }
  .platform-feature-strip article:last-child { border-right: 0; }
  .tournament-grid { grid-template-columns: repeat(2, 1fr); }
  .auth-layout { grid-template-columns: 1fr minmax(360px, 450px); gap: 4rem; padding: 2rem; }
  .auth-intro { align-self: center; padding: 6rem 0 0; }
  .auth-card { }
  .dashboard-tournament { grid-template-columns: 1fr auto; align-items: end; }
  .create-section { grid-template-columns: 5rem minmax(0, 760px); gap: 2rem; padding: 4rem 0; }
  .discipline-picker { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .archive-page { padding-inline: 2rem; }
  .tournament-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .platform-hero { min-height: auto; grid-template-columns: 1fr; gap: 3rem; padding: 5rem 0; }
  .platform-hero h1 { max-width: 820px; }
  .platform-demo { width: min(100%, 620px); }
}
@media (max-width: 620px) {
  .archive-hero { padding-block: 2rem; }
  .archive-hero h1 { font-size: clamp(3.15rem, 16vw, 4.6rem); }
  .archive-ranking-heading { align-items: flex-start; flex-direction: column; gap: .65rem; }
  .archive-ranking-heading > span { max-width: none; text-align: left; }
  .archive-podium { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
  .archive-podium li > a { min-height: 8.5rem; padding: .8rem; }
  .archive-podium .archive-podium-slot-1 { grid-column: 1 / -1; grid-row: 1; }
  .archive-podium .archive-podium-slot-1 > a { min-height: 10rem; }
  .archive-podium .archive-podium-slot-2 { grid-column: 1; grid-row: 2; }
  .archive-podium .archive-podium-slot-3 { grid-column: 2; grid-row: 2; }
  .archive-podium .archive-podium-slot-2 > a, .archive-podium .archive-podium-slot-3 > a { min-height: 8.5rem; }
  .archive-podium-count-1 { grid-template-columns: minmax(0, 1fr); }
  .archive-podium-count-1 .archive-podium-slot-1 { grid-column: 1; }
  .archive-podium-count-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .archive-podium-count-2 .archive-podium-slot-1 { grid-column: 2; grid-row: 1; }
  .archive-podium-count-2 .archive-podium-slot-2 { grid-column: 1; grid-row: 1; }
  .archive-podium-name { font-size: clamp(1rem, 5vw, 1.3rem); }
  .archive-podium-rank { font-size: clamp(3.5rem, 19vw, 5rem); }
  .archive-standings-table :is(th, td):first-child { width: 3.5rem; }
  .archive-standings-table :is(th, td):last-child { width: 5.5rem; }
  .platform-nav-secondary { display: none; }
  .platform-page { padding-inline: 1rem; }
  .platform-hero { gap: 2.5rem; padding: 4rem 0; }
  .platform-hero h1 { font-size: clamp(3rem, 15vw, 4.6rem); line-height: .96; }
  .platform-lead { margin-top: 1.5rem; }
  .platform-actions { align-items: flex-start; flex-direction: column; gap: 1rem; }
  .platform-how { padding-top: 5rem; }
  .platform-section-intro { margin-bottom: 2rem; }
  .platform-feature-strip article { min-height: 190px; padding-inline: 0; }
  .platform-feature-strip b { margin-top: 2.5rem; }
  .platform-final-cta { align-items: flex-start; flex-direction: column; padding: 4rem 0; }
  .site-footer { align-items: flex-start; flex-direction: column; gap: .65rem; margin-top: 2.5rem; }
  .site-footer p { text-align: left; }
  .screen-footer { align-items: flex-start; flex-direction: column; gap: .35rem; }
  .screen-footer span:last-child { max-width: 100%; text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* Tournament rehearsal workspace */
.rehearsal-shell { min-width: 0; height: 100vh; height: 100dvh; overflow: hidden; background: #050706; }
.rehearsal-toolbar { display: flex; min-height: 74px; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); padding: .7rem 1rem; background: var(--ink); }
.rehearsal-toolbar > div:first-child { display: grid; min-width: 0; flex: 1 1 auto; gap: .2rem; }
.rehearsal-toolbar .tournament-lockup { width: 100%; }
.rehearsal-toolbar small { color: var(--brand-accent); font-size: .65rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.rehearsal-toolbar-actions { display: flex; align-items: end; gap: .55rem; }
.rehearsal-toolbar-actions label { display: grid; gap: .25rem; color: var(--muted); font-size: .58rem; font-weight: 800; text-transform: uppercase; }
.rehearsal-toolbar-actions select { width: 150px; padding-right: 1.8rem; }
.rehearsal-grid { display: grid; height: calc(100vh - 74px); height: calc(100dvh - 74px); grid-template-columns: minmax(220px, 480px) minmax(220px, 480px) minmax(440px, 1fr); grid-template-rows: minmax(0, 1.15fr) minmax(0, .85fr); gap: 6px; padding: 6px; }
.rehearsal-panel { position: relative; display: grid; min-width: 0; min-height: 0; grid-template-rows: minmax(var(--control-height), auto) 1fr; border: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.rehearsal-panel-screen { grid-column: 1 / 3; grid-row: 1; }
.rehearsal-panel-control { grid-column: 3; grid-row: 1 / 3; }
.rehearsal-panel[data-participant-panel="a"] { grid-column: 1; grid-row: 2; }
.rehearsal-panel[data-participant-panel="b"] { grid-column: 2; grid-row: 2; }
.rehearsal-panel > header { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 0 .55rem; background: #151816; }
.rehearsal-panel > header div { display: flex; min-width: 0; align-items: center; gap: .55rem; }
.rehearsal-panel > header span { color: var(--brand-accent); font-size: .58rem; font-weight: 900; }
.rehearsal-panel > header strong { min-width: 0; overflow: hidden; font-size: .67rem; letter-spacing: .03em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.rehearsal-connected { color: var(--brand-accent); font-size: .52rem; font-style: normal; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.rehearsal-connected::before { content: "●"; margin-right: .28rem; }
.rehearsal-panel > header button { min-height: var(--control-height); min-width: var(--control-height); border: 0; padding: .25rem; background: transparent; color: var(--muted); font-size: .6rem; cursor: pointer; }
.rehearsal-panel > header button:hover { color: var(--paper); }
.rehearsal-panel iframe { width: 100%; height: 100%; border: 0; background: var(--ink); }
.rehearsal-panel.is-expanded { position: fixed; z-index: 100; inset: 6px; }
.has-expanded-rehearsal-panel .rehearsal-toolbar { visibility: hidden; }
.rehearsal-empty { display: grid; width: min(100% - 2rem, 900px); min-height: calc(100vh - 74px); align-content: center; margin: auto; padding: 4rem 0; }
.rehearsal-empty h1 { margin: .5rem 0 1.2rem; font-size: clamp(3.6rem, 8vw, 7rem); letter-spacing: -.08em; line-height: .82; }
.rehearsal-empty > p:not(.eyebrow, .flash) { max-width: 650px; color: var(--muted); font-size: 1.05rem; line-height: 1.6; }
.rehearsal-empty form { margin-top: 1rem; }
.rehearsal-entry p { max-width: 780px; color: var(--muted); line-height: 1.55; }
.rehearsal-admin-banner { border: 1px solid var(--brand-accent); padding: .8rem 1rem; color: var(--muted); }
.rehearsal-admin-banner strong, .rehearsal-view-badge { color: var(--brand-accent); letter-spacing: .08em; }
.rehearsal-view-badge { align-self: center; font-size: .65rem; font-weight: 900; }

@media (max-width: 1100px) {
  .rehearsal-toolbar { gap: .55rem; }
  .rehearsal-toolbar small { display: none; }
  .rehearsal-toolbar-actions { gap: .35rem; }
  .rehearsal-toolbar-actions label { font-size: .5rem; }
  .rehearsal-toolbar-actions select { width: 128px; }
  .rehearsal-toolbar-actions .button { padding-inline: .65rem; }
}

@media (max-width: 919px) {
  .rehearsal-shell { height: auto; min-height: 100vh; min-height: 100dvh; overflow-x: hidden; overflow-y: auto; }
  .rehearsal-toolbar { align-items: stretch; flex-direction: column; padding: max(.7rem, env(safe-area-inset-top)) max(.75rem, env(safe-area-inset-right)) .7rem max(.75rem, env(safe-area-inset-left)); }
  .rehearsal-toolbar > div:first-child { min-width: 0; }
  .rehearsal-toolbar .tournament-lockup { font-size: .76rem; }
  .rehearsal-toolbar-actions { display: grid; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; gap: .55rem; }
  .rehearsal-toolbar-actions > * { min-width: 0; margin: 0; }
  .rehearsal-toolbar-actions label { font-size: .58rem; }
  .rehearsal-toolbar-actions select { width: 100%; min-width: 0; }
  .rehearsal-toolbar-actions form { display: grid; }
  .rehearsal-toolbar-actions .button { width: 100%; padding-inline: .45rem; font-size: .68rem; }
  .rehearsal-grid { height: auto; min-height: 0; grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-auto-rows: clamp(360px, 70dvh, 620px); overflow: visible; }
  .rehearsal-panel-screen, .rehearsal-panel-control, .rehearsal-panel[data-participant-panel="a"], .rehearsal-panel[data-participant-panel="b"] { grid-column: 1; grid-row: auto; }
  .rehearsal-panel > header { gap: .5rem; }
  .rehearsal-panel > header div { min-width: 0; }
  .rehearsal-panel > header strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .rehearsal-panel > header button { flex: 0 0 auto; }
  .rehearsal-connected { display: none; }
  .rehearsal-empty { min-height: 0; padding-block: 2rem; }
}

/* Topics buzzer game */
.topics-config-form { display: grid; gap: 1.25rem; }
.topics-global-settings, .topics-round-header, .topics-final-grid { display: grid; gap: .85rem; border: 0; padding: 0; }
.topics-round-editor, .topics-final-editor { border: 1px solid var(--line); padding: 1rem; background: var(--surface); }
.topics-round-header { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); align-items: end; margin-bottom: 1rem; }
.topics-round-header > label:first-child { grid-column: 1 / -1; }
.topics-round-header .button { width: 100%; }
.topics-theme-editor { border-top: 1px solid var(--line); }
.topics-theme-editor:last-child { border-bottom: 1px solid var(--line); }
.topics-theme-editor summary { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem .25rem; cursor: pointer; }
.topics-theme-editor summary span { color: var(--muted); font-size: .72rem; }
.topics-theme-body { display: grid; gap: 1rem; padding: 0 .25rem 1rem; }
.topics-question-grid { display: grid; gap: .8rem; }
.topics-question-card { display: grid; gap: .75rem; border: 1px solid var(--line); padding: .85rem; background: var(--ink); }
.textarea-with-counter { display: grid; gap: .35rem; }
.character-counter { justify-self: end; color: var(--muted); font-size: .68rem; font-variant-numeric: tabular-nums; }
.character-counter.is-over-limit { color: var(--orange); }
.topics-question-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.topics-question-heading > label { width: min(220px, 34vw); }
.topics-question-toggle { min-height: var(--control-height); }
.topics-media-editor { display: grid; gap: .6rem; }
.topics-media-title { color: var(--paper); font-size: .82rem; }
.topics-media-editor img { width: min(100%, 360px); max-height: 220px; object-fit: contain; object-position: left center; }
.topics-remove-media { color: var(--muted); font-size: .78rem; }
.topics-options-editor { display: grid; gap: .65rem; border-left: 3px solid var(--brand-accent); padding: .75rem 1rem; background: var(--surface-2); }
.topics-options-editor .help-text { margin: 0; }
.topics-options-editor-list { display: grid; gap: .5rem; }
.topics-option-editor-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .55rem; align-items: center; }
.topics-option-editor-row input[type="radio"] { width: 1.2rem; height: 1.2rem; accent-color: var(--brand-accent); }
.topics-option-remove { padding: .55rem .7rem; }
.topics-final-editor { display: grid; gap: 1rem; }
.topics-final-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.topics-final-grid > label:nth-child(n+3), .topics-final-grid > .topics-media-editor { grid-column: 1 / -1; }

.topics-live-page { max-width: 1200px; }
.topics-admin-board { display: grid; gap: .45rem; margin: 1.25rem 0; overflow-x: auto; }
.topics-admin-board-row { display: grid; grid-template-columns: minmax(150px, 1.6fr) repeat(var(--topics-question-count), minmax(68px, 1fr)); gap: .35rem; }
.topics-admin-theme, .topics-admin-cell { display: flex; min-width: 72px; min-height: var(--control-height-large); align-items: center; justify-content: center; border: 1px solid var(--line); padding: .5rem; }
.topics-admin-theme { min-width: 170px; justify-content: flex-start; color: var(--paper); }
.topics-admin-board-row > form { display: grid; min-width: 0; }
.topics-admin-board-row > form .topics-admin-cell { width: 100%; }
.topics-admin-cell { margin: 0; background: var(--surface-2); color: var(--brand-accent); font-weight: 900; cursor: pointer; }
.topics-admin-cell.is-played { color: var(--muted); }
.topics-board-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.topics-score-strip, .screen-topics-scores { display: flex; gap: .5rem; flex-wrap: wrap; margin: 1rem 0; }
.topics-score-strip article, .screen-topics-scores article { display: grid; min-width: 110px; border: 1px solid var(--line); padding: .55rem .7rem; }
.topics-score-strip span, .screen-topics-scores span { overflow: hidden; color: var(--muted); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.topics-score-strip strong, .screen-topics-scores strong { color: var(--brand-accent); font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.topics-live-question-card { display: grid; min-width: 0; grid-template-columns: minmax(0, 1fr); gap: 1rem; margin: 1rem 0; border: 1px solid var(--line); padding: 1.25rem; }
.topics-live-question-card > * { min-width: 0; overflow-wrap: anywhere; }
.topics-live-question-card h2 { margin: 0; font-size: clamp(1.35rem, min(3vw, 4.5dvh), 2.5rem); line-height: 1.18; }
.topics-live-page :is(.topics-option, .topics-reference-answer, .topics-admin-theme, .topics-final-answers p, .topics-score-strip span, #topics-live-status) { min-width: 0; overflow-wrap: anywhere; }
.topics-live-page .topics-score-strip span { white-space: normal; }
.topics-reference-answer { border-left: 4px solid var(--brand-accent); padding: .75rem 1rem; background: var(--surface-2); font-weight: 800; }
.topics-question-media { display: block; width: min(100%, 720px); max-height: 48vh; object-fit: contain; }
.topics-options { display: grid; gap: .7rem; width: 100%; }
.topics-options-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.topics-options-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.topics-options-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.topics-option { display: flex; min-height: 4rem; align-items: center; justify-content: center; border: 1px solid var(--line); padding: .8rem 1rem; background: var(--surface-2); font-size: clamp(1rem, 2vw, 1.35rem); font-weight: 750; text-align: center; }
.topics-option.is-correct { border-color: var(--brand-accent); background: color-mix(in srgb, var(--brand-accent) 14%, var(--surface-2)); color: var(--brand-accent); box-shadow: inset 0 0 0 2px var(--brand-accent); }
.topics-attempts { display: grid; gap: .4rem; margin: 0; padding-left: 1.5rem; }
.topics-attempts li { overflow-wrap: anywhere; }
.topics-attempts .is-correct, .topics-final-answers .is-correct { color: var(--brand-accent); }
.topics-attempts .is-wrong, .topics-final-answers .is-wrong { color: var(--orange); }
.topics-judge-actions, .topics-final-answer-actions, .topics-final-actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.topics-final-admin-list { display: grid; gap: .4rem; margin: 1rem 0; }
.topics-final-admin-list p { margin: 0; border: 1px solid var(--line); padding: .7rem; overflow-wrap: anywhere; }
.topics-final-admin-list .is-ready { border-color: var(--brand-accent); }
.topics-final-answers { display: grid; gap: .65rem; margin: 1rem 0; }
.topics-final-answers article { display: grid; grid-template-columns: minmax(120px, .7fr) minmax(100px, .4fr) minmax(180px, 1.5fr) auto; gap: .75rem; align-items: center; border: 1px solid var(--line); padding: .8rem; }
.topics-final-answers article > strong { min-width: 0; overflow-wrap: anywhere; }
.topics-final-answers p { margin: 0; }

.topics-player-page { min-height: 100vh; }
.topics-player-game { width: min(100%, 720px); margin: auto; padding: 2rem 1rem; }
.topics-player-score { color: var(--brand-accent); font-size: clamp(2.4rem, 12vw, 5rem); font-weight: 950; font-variant-numeric: tabular-nums; }
.topics-player-waiting { margin-top: 2rem; border: 1px solid var(--line); padding: 2rem 1rem; color: var(--muted); text-align: center; }
.topics-player-question { display: grid; min-width: 0; grid-template-columns: minmax(0, 1fr); gap: 1rem; margin: 1.5rem 0; }
.topics-player-question > .eyebrow { min-width: 0; overflow-wrap: anywhere; }
.topics-player-question h2 { min-height: 5.5rem; margin: 0; font-size: clamp(1.6rem, 7vw, 3rem); line-height: 1.12; }
.topics-buzz-button { width: min(78vw, 360px); aspect-ratio: 1; margin: 1.5rem auto; border: 8px solid color-mix(in srgb, var(--brand-accent) 45%, var(--ink)); border-radius: 50%; background: var(--brand-accent); color: var(--ink); box-shadow: 0 14px 0 color-mix(in srgb, var(--brand-accent) 45%, var(--ink)), 0 24px 50px rgba(0, 0, 0, .5); font-size: clamp(1.4rem, 7vw, 2.4rem); font-weight: 950; cursor: pointer; }
.topics-buzz-button:active:not(:disabled) { transform: translateY(10px); box-shadow: 0 4px 0 color-mix(in srgb, var(--brand-accent) 45%, var(--ink)), 0 12px 24px rgba(0, 0, 0, .45); }
.topics-buzz-button:disabled { border-color: var(--line); background: var(--surface-2); color: var(--muted); box-shadow: 0 10px 0 var(--line); cursor: default; }
.topics-player-answer { border-left: 4px solid var(--brand-accent); padding: 1rem; background: var(--surface-2); font-weight: 800; }
.topics-player-final-form { display: grid; gap: .8rem; margin-top: 1.5rem; }

.screen-topics-board { display: grid; gap: .7vh; width: 100%; margin: 2vh 0; }
.screen-topics-board-row { display: grid; grid-template-columns: 17vw repeat(var(--topics-question-count), minmax(0, 1fr)); gap: .55vw; }
.screen-topics-theme, .screen-topics-board-row span { display: flex; min-width: 0; min-height: 7vh; align-items: center; border: 1px solid var(--line); padding: .5vw; }
.screen-topics-theme { justify-content: flex-start; overflow-wrap: anywhere; font-size: clamp(.8rem, 1.6vw, 1.6rem); line-height: 1.15; text-align: left; }
.screen-topics-board-row span { justify-content: center; color: var(--brand-accent); font-size: clamp(1rem, 2.3vw, 2.4rem); font-variant-numeric: tabular-nums; font-weight: 950; text-align: center; }
.screen-topics-board-row span.is-played { background: var(--surface); }
.screen-topics-scores { display: grid; width: min(88vw, calc(var(--topics-score-columns, 7) * 12rem)); grid-template-columns: repeat(var(--topics-score-columns, 7), minmax(0, 1fr)); gap: .5vw; justify-content: center; }
.screen-topics-scores article { min-width: 0; padding: .65vh .65vw; }
.screen-topics-scores span { overflow-wrap: anywhere; white-space: normal; font-size: clamp(.65rem, min(1vw, 1.8vh), .9rem); line-height: 1.2; }
.screen-topics-scores strong { overflow-wrap: anywhere; font-size: clamp(1rem, min(1.7vw, 3vh), 1.5rem); line-height: 1.15; }
.screen-topics-finished { gap: clamp(1rem, 3vh, 2rem); overflow: visible; }
.screen-topics-finished > .screen-kicker, .screen-topics-finished > .screen-topics-scores { margin: 0; }
.screen-topics-finished-title { font-size: clamp(3.25rem, min(7vw, 17vh), 8rem); }
.screen-topics-question.screen-title { width: 88vw; max-width: 88vw; font-family: var(--ui-font); font-size: clamp(1.5rem, min(2.5vw, 4.2vh), 3.25rem); font-stretch: normal; font-style: normal; font-synthesis: none; font-weight: 700; letter-spacing: -.025em; line-height: 1.16; }
.screen-topics-question.is-revealing { display: grid; }
.screen-topics-question-sizer, .screen-topics-question-visible { grid-area: 1 / 1; }
.screen-topics-question-sizer { visibility: hidden; }
.screen-topics-media { display: block; max-width: 70vw; max-height: 43vh; margin: 2vh auto; object-fit: contain; }
.screen-topics-layout { justify-content: flex-start; overflow: visible; }
.screen-topics-layout > .screen-kicker { width: 88vw; flex: 0 0 auto; margin-bottom: 1vh; overflow-wrap: anywhere; }
.screen-topics-layout > .screen-topics-question,
.screen-topics-layout > .screen-topics-options,
.screen-topics-layout > .screen-topics-responder,
.screen-topics-layout > .screen-topics-answer,
.screen-topics-layout > .screen-topics-scores { flex: 0 0 auto; }
.screen-topics-layout.has-topics-media > .screen-topics-question { font-size: clamp(1.4rem, min(2.3vw, 3.8vh), 3rem); }
.screen-topics-layout > .screen-subtitle { flex: 0 0 auto; margin-top: 1vh; font-size: clamp(1rem, min(2.1vw, 3.5vh), 2rem); }
.screen-topics-layout.is-question-finished > .screen-topics-answer { margin: 1vh 0; }
.screen-topics-layout > .screen-topics-scores { margin: 1vh 0 0; }
.screen-topics-media-stage { display: grid; width: min(88vw, 1500px); min-height: 0; max-height: 43vh; flex: 1 1 43vh; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 2vw; align-items: stretch; justify-items: stretch; margin: 1vh auto; }
.screen-topics-media-panel { display: grid; min-width: 0; min-height: 0; grid-template-rows: minmax(0, 1fr); align-items: stretch; justify-items: stretch; }
.screen-topics-media-panel.has-label { grid-template-rows: auto minmax(0, 1fr); gap: .5vh; }
.screen-topics-media-label { color: var(--muted); font-size: clamp(.65rem, 1vw, 1rem); font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.screen-topics-media-stage .screen-topics-media { width: 100%; height: 100%; min-width: 0; min-height: 0; max-width: 100%; max-height: 100%; margin: 0; object-fit: contain; }
.screen-topics-options { display: grid; gap: 1vh 1vw; width: min(88vw, 1500px); margin: 1vh auto; }
.screen-topics-options-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.screen-topics-options-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.screen-topics-options-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.screen-topics-option { display: flex; min-width: 0; min-height: 7.5vh; align-items: center; justify-content: center; border: 2px solid var(--line); padding: .7vh 1vw; overflow-wrap: anywhere; background: var(--surface-2); font-size: clamp(1rem, min(1.8vw, 3.2vh), 2rem); font-weight: 800; line-height: 1.15; text-align: center; }
.screen-topics-option.is-correct { border-color: var(--brand-accent); background: color-mix(in srgb, var(--brand-accent) 14%, var(--surface-2)); color: var(--brand-accent); box-shadow: inset 0 0 0 3px var(--brand-accent); }
.screen-topics-responder, .screen-topics-answer { width: 88vw; max-width: 88vw; margin: 1vh 0; overflow-wrap: anywhere; color: var(--brand-accent); font-size: clamp(1.1rem, min(2.1vw, 3.5vh), 2.4rem); font-weight: 900; line-height: 1.2; }

@media (max-width: 700px) {
  .topics-live-page { padding: .5rem; }
  .topics-live-page .admin-section { margin: .5rem 0; padding: .65rem; }
  .topics-live-page .topics-score-strip { display: grid; grid-auto-columns: minmax(82px, 1fr); grid-auto-flow: column; gap: .25rem; margin: .6rem 0; overflow-x: auto; }
  .topics-live-page .topics-score-strip article { min-width: 0; padding: .35rem .45rem; }
  .topics-live-page .topics-score-strip span { font-size: .62rem; }
  .topics-live-page .topics-score-strip strong { font-size: 1rem; }
  .topics-admin-board { gap: .2rem; margin: .7rem 0; }
  .topics-admin-board-row { grid-template-columns: minmax(96px, 1.45fr) repeat(var(--topics-question-count), minmax(44px, 1fr)); gap: .2rem; }
  .topics-admin-theme, .topics-admin-cell { min-width: 0; min-height: var(--control-height); padding: .25rem; }
  .topics-admin-theme { position: sticky; z-index: 1; left: 0; overflow: hidden; background: var(--surface); box-shadow: 3px 0 0 var(--ink); font-size: .7rem; line-height: 1.15; }
  .topics-admin-cell { font-size: .82rem; }
  .topics-final-answers article { grid-template-columns: 1fr; }
  .topics-round-header { grid-template-columns: 1fr 1fr; }
  .topics-round-header > label:first-child { grid-column: 1 / -1; }
  .topics-question-heading { align-items: start; }
  .topics-question-heading { flex-wrap: wrap; }
  .topics-option-editor-row { grid-template-columns: auto minmax(0, 1fr); }
  .topics-option-editor-row .topics-option-remove { grid-column: 2; justify-self: start; }
  .topics-player-options.topics-options-2, .topics-player-options.topics-options-3, .topics-player-options.topics-options-4 { grid-template-columns: 1fr; }
}

/* Arithmetic sprint */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }
.sprint-config-options { grid-template-columns: repeat(2, minmax(0, 280px)); }
.sprint-difficulty-guide { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; margin: 1.2rem 0 2rem; }
.sprint-difficulty-guide article { display: grid; gap: .35rem; border: 1px solid var(--line); padding: 1rem; background: var(--surface-2); }
.sprint-difficulty-guide b { color: var(--brand-accent); }
.sprint-difficulty-guide span { color: var(--muted); font-size: .78rem; line-height: 1.35; }

.arithmetic-sprint-page { min-height: 100dvh; }
.arithmetic-sprint-game { width: min(100%, 1100px); margin: auto; padding: clamp(1rem, 4vw, 2.5rem); }
.sprint-title-row h1 { margin: 0; font-size: clamp(2.3rem, 6vw, 4.5rem); line-height: .86; }
.arithmetic-sprint-shell:not([data-game-phase="playing"]) .sprint-title-row { flex-wrap: wrap; }
.arithmetic-sprint-shell:not([data-game-phase="playing"]) .sprint-title-row > div:first-child { flex: 1 0 auto; }
.arithmetic-sprint-shell:not([data-game-phase="playing"]) .sprint-title-row h1 { overflow-wrap: normal; }
.sprint-game-meta { display: grid; grid-template-columns: repeat(3, minmax(82px, 1fr)); gap: .55rem; }
.sprint-game-meta > div { display: grid; gap: .15rem; border: 1px solid var(--line); padding: .75rem .9rem; background: var(--surface); text-align: right; }
.sprint-game-meta span { color: var(--muted); font-size: .66rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.sprint-game-meta strong { color: var(--brand-accent); font-size: clamp(1.5rem, 5vw, 2.7rem); font-variant-numeric: tabular-nums; line-height: 1; }
#sprint-timer.is-urgent { color: var(--orange); }
.sprint-start { max-width: 620px; }
.sprint-rules { color: var(--brand-accent); font-weight: 800; }
.sprint-play { display: grid; justify-items: center; margin-top: clamp(1rem, 4vh, 3rem); }
.sprint-problem-number { color: var(--muted); font-size: .75rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.sprint-expression { margin: .5rem 0 1.25rem; color: var(--paper); font-size: clamp(4rem, 16vw, 8.5rem); font-variant-numeric: tabular-nums; font-weight: 950; letter-spacing: -.06em; line-height: .95; text-align: center; }
.sprint-answer-form { display: grid; grid-template-columns: minmax(140px, 260px) auto; gap: .65rem; width: min(100%, 520px); }
.sprint-answer-form input { min-width: 0; border: 2px solid var(--line); padding: .75rem 1rem; background: var(--surface-2); color: var(--paper); font-size: 1.6rem; font-variant-numeric: tabular-nums; font-weight: 900; text-align: center; }
.sprint-answer-form input:focus { border-color: var(--brand-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-accent) 20%, transparent); }
.sprint-keypad { display: grid; grid-template-columns: repeat(3, minmax(64px, 92px)); gap: .45rem; margin-top: 1rem; }
.sprint-keypad button { min-height: var(--control-height-large); border: 1px solid var(--line); background: var(--surface); color: var(--paper); font-size: 1.25rem; font-weight: 850; cursor: pointer; }
.sprint-keypad [data-sprint-key="0"] { grid-column: 2; }
.sprint-keypad [data-sprint-key="⌫"] { grid-column: 3; }
.sprint-keypad button:active { border-color: var(--brand-accent); background: var(--brand-accent); color: var(--ink); }
.sprint-feedback { min-height: 2rem; margin: .75rem 0 0; font-size: 1.15rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.sprint-feedback.is-correct { color: var(--brand-accent); }
.sprint-feedback.is-wrong { color: var(--orange); }
.sprint-summary p { color: var(--paper); font-size: clamp(1.4rem, 5vw, 2.4rem); font-weight: 900; }
.sprint-summary small { color: var(--muted); }

.sprint-live-heading { display: flex; gap: 2rem; align-items: end; justify-content: space-between; }
.sprint-live-heading h1 { margin-bottom: .3rem; }
.sprint-live-counts { display: grid; grid-template-columns: auto auto; gap: .1rem .55rem; align-items: baseline; }
.sprint-live-counts strong { color: var(--brand-accent); font-size: 1.45rem; font-variant-numeric: tabular-nums; text-align: right; }
.sprint-live-counts span { color: var(--muted); font-size: .72rem; }
.sprint-live-roster { display: grid; gap: .45rem; margin: 1.5rem 0; }
.sprint-live-roster article { display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto 4rem; gap: .75rem; align-items: center; border: 1px solid var(--line); padding: .75rem 1rem; background: var(--surface-2); }
.sprint-live-roster article.is-playing { border-color: color-mix(in srgb, var(--brand-accent) 65%, var(--line)); }
.sprint-live-rank { color: var(--muted); font-variant-numeric: tabular-nums; }
.sprint-live-roster article > div { display: grid; min-width: 0; }
.sprint-live-roster b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sprint-live-roster small { color: var(--muted); }
.sprint-live-roster article > strong { color: var(--brand-accent); font-size: 1.7rem; font-variant-numeric: tabular-nums; }
.sprint-live-errors { color: var(--orange); font-size: .72rem; text-align: right; }

.sprint-live-shell { display: grid; height: 100vh; height: 100dvh; min-height: 0; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
.sprint-live-shell .admin-header { position: relative; }
.sprint-live-page { display: flex; width: min(100%, 1280px); height: 100%; min-height: 0; flex-direction: column; padding: .5rem; }
.sprint-live-page > .flash { flex: 0 0 auto; width: 100%; margin: 0 0 .35rem; }
.sprint-live-page .admin-section { display: grid; min-height: 0; flex: 1 1 auto; grid-template-rows: auto auto minmax(0, 1fr) auto; gap: .45rem; margin: 0; padding: .65rem; overflow: hidden; }
.sprint-live-page .eyebrow { margin: 0; }
.sprint-live-page .sprint-live-heading { min-width: 0; align-items: center; }
.sprint-live-page .sprint-live-heading h1 { margin: 0; font-size: clamp(1.45rem, 2.2vw, 2.15rem); line-height: 1; }
.sprint-live-page .sprint-live-heading .help-text { margin: .25rem 0 0; font-size: .72rem; line-height: 1.2; }
.sprint-live-page .sprint-live-counts { flex: 0 0 auto; }
.sprint-live-page .sprint-live-roster { min-height: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(56px, max-content); align-content: start; gap: .35rem; margin: 0; padding-right: .2rem; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.sprint-live-page .sprint-live-roster article { min-width: 0; grid-template-columns: 1.4rem minmax(0, 1fr) auto 2.6rem; gap: .15rem .5rem; padding: .4rem .55rem; }
.sprint-live-page .sprint-live-roster article > strong { font-size: 1.35rem; }
.sprint-live-page .sprint-live-roster small, .sprint-live-page .sprint-live-errors { font-size: .62rem; }
.sprint-live-page .admin-section > .round-completion { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .4rem 1rem; align-items: center; margin: 0; border-top: 1px solid var(--line); padding: .5rem 0 0; }
.sprint-live-page .round-completion-copy { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem; align-items: center; min-width: 0; }
.sprint-live-page .round-completion h2, .sprint-live-page .round-completion p { margin: 0; }
.sprint-live-page .round-completion h2 { font-size: 1rem; white-space: nowrap; }
.sprint-live-page .round-completion p { font-size: .68rem; line-height: 1.25; }
.sprint-live-page .round-completion-actions { flex-wrap: nowrap; justify-content: flex-end; }
.sprint-live-page .round-completion .button { min-height: var(--control-height); padding: .45rem .7rem; font-size: .7rem; }

.screen-arithmetic-sprint { justify-content: center; overflow: hidden; padding-block: 2vh; }
.screen-sprint-heading { display: grid; width: min(92vw, 1700px); grid-template-columns: minmax(0, 1fr) auto; gap: clamp(2rem, 4vw, 5rem); align-items: end; text-align: left; }
.screen-sprint-heading > div:first-child { min-width: 0; }
.screen-sprint-heading .screen-kicker { margin-bottom: 1.2vh; }
.screen-sprint-heading .screen-title { max-width: none; margin: 0; font-size: clamp(3rem, 4.5vw, 5.6rem); line-height: .92; white-space: nowrap; }
.screen-sprint-status { display: grid; min-width: max-content; gap: .35rem; border-left: clamp(.25rem, .35vw, .4rem) solid var(--brand-accent); padding: .6rem 0 .6rem clamp(1rem, 1.5vw, 1.5rem); color: var(--brand-accent); font-size: clamp(1rem, 1.45vw, 1.65rem); font-weight: 850; text-align: left; }
.screen-sprint-status small { color: var(--muted); font-size: .6em; }
.screen-sprint-grid { display: grid; width: min(92vw, 1700px); min-height: 0; grid-template-columns: repeat(var(--sprint-columns, 4), minmax(0, 1fr)); gap: clamp(.65rem, 1vw, 1rem); margin-top: clamp(1.5rem, 3vh, 2.5rem); overflow: hidden; }
.screen-sprint-grid[data-count="1"] { width: min(70vw, 720px); }
.screen-sprint-grid[data-count="2"] { width: min(82vw, 1100px); }
.screen-sprint-grid[data-count="3"] { width: min(88vw, 1450px); }
.screen-sprint-card { display: grid; min-height: clamp(5.5rem, 8vh, 7.5rem); grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: .2rem clamp(.7rem, 1vw, 1rem); align-items: center; border: 1px solid var(--line); padding: clamp(.75rem, 1.1vw, 1.15rem); background: var(--surface-2); text-align: left; }
.screen-sprint-card.is-playing { border-color: var(--brand-accent); box-shadow: inset 0 0 0 1px var(--brand-accent); }
.screen-sprint-rank { grid-column: 1; grid-row: 1 / 3; color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.5rem); font-variant-numeric: tabular-nums; }
.screen-sprint-name { min-width: 0; grid-column: 2; grid-row: 1; overflow: hidden; font-size: clamp(1rem, 1.45vw, 1.65rem); font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.screen-sprint-meta { grid-column: 2; grid-row: 2; color: var(--muted); font-size: clamp(.65rem, .95vw, 1rem); }
.screen-sprint-score { grid-column: 3; grid-row: 1 / 3; color: var(--brand-accent); font-size: clamp(2rem, 4vw, 4.6rem); font-variant-numeric: tabular-nums; font-weight: 950; line-height: .8; }

.screen-squares { justify-content: center; overflow: hidden; padding-block: 2vh; }
.screen-squares-stage { display: grid; width: min(92vw, 1500px); min-height: 0; flex: 1; grid-template-columns: minmax(8rem, .34fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 6rem); align-items: center; justify-items: center; margin-top: clamp(1rem, 2vh, 2rem); }
.screen-squares-timer { color: var(--brand-accent); font-size: clamp(7rem, 16vw, 17rem); font-variant-numeric: tabular-nums; font-weight: 950; letter-spacing: -.08em; line-height: .75; text-shadow: 0 0 2.5rem rgba(var(--screen-accent-rgb), .18); }
.screen-squares-timer.is-urgent { color: var(--danger); }
.screen-squares-board { display: grid; width: min(58vh, 50vw, 720px); aspect-ratio: 1; grid-template-columns: repeat(var(--squares-grid-size, 5), minmax(0, 1fr)); gap: clamp(.45rem, 1vh, .9rem); padding: clamp(.7rem, 1.4vh, 1.25rem); border: 1px solid color-mix(in srgb, var(--screen-accent) 35%, var(--line)); background: rgba(8, 11, 9, .76); box-shadow: 0 1.5rem 5rem rgba(0, 0, 0, .28); }
.screen-squares-board span { border: 1px solid color-mix(in srgb, var(--screen-accent) 20%, var(--line)); border-radius: clamp(.35rem, .65vw, .75rem); background: color-mix(in srgb, var(--screen-accent) 4%, var(--surface-2)); }
.screen-squares-board span.is-target { border-color: var(--brand-accent); background: var(--brand-accent); box-shadow: 0 0 clamp(.8rem, 1.8vw, 2rem) rgba(var(--screen-accent-rgb), .34); }
.screen-squares-cue { max-width: 12ch; margin: 0; color: var(--text); font-size: clamp(3.2rem, 6vw, 7.5rem); font-weight: 950; letter-spacing: -.055em; line-height: .9; text-align: left; }
.screen-squares-answered { grid-column: 2; justify-self: start; margin: -3vh 0 0; color: var(--muted); font-size: clamp(1.2rem, 2vw, 2.3rem); font-weight: 800; }

@media (max-width: 900px), (max-height: 650px) {
  .screen-squares-stage { grid-template-columns: auto minmax(0, 1fr); gap: clamp(1rem, 3vw, 2.5rem); }
  .screen-squares-board { width: min(54vh, 54vw, 560px); }
  .screen-squares-timer { font-size: clamp(5rem, 13vw, 10rem); }
}
@media (max-width: 620px) {
  .screen-shell .screen-sprint-status { width: 100%; min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
  .screen-squares-stage { grid-template-columns: minmax(0, 1fr); align-content: center; gap: 1.2rem; }
  .screen-squares-timer { font-size: clamp(4rem, 16vw, 6rem); }
  .screen-squares-cue { width: 100%; max-width: 100%; font-size: clamp(1.8rem, 8.5vw, 3rem); text-align: center; }
  .screen-squares-board { width: min(100%, 34vh, 360px); }
  .screen-squares-answered { grid-column: 1; justify-self: center; margin: 0; }
}

@media (max-width: 1050px) {
  .screen-sprint-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1050px) {
  .screen-sprint-heading { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .screen-sprint-heading .screen-title { white-space: normal; }
  .screen-sprint-status { width: max-content; }
  .sprint-live-page .sprint-live-roster { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 850px) {
  .screen-sprint-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 701px) and (pointer: fine) {
  .sprint-keypad { display: none; }
}

@media (max-width: 1050px) {
  .sprint-title-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .sprint-title-row > * { min-width: 0; }
  .sprint-game-meta { width: min(100%, 520px); }
}

@media (max-width: 700px) {
  .sprint-config-options, .sprint-difficulty-guide { grid-template-columns: 1fr; }
  .arithmetic-sprint-game { padding: .85rem; }
  .sprint-title-row { display: grid; grid-template-columns: 1fr; gap: .85rem; }
  .sprint-title-row h1 { font-size: clamp(2.1rem, 10.8vw, 3.5rem); }
  .sprint-game-meta { width: 100%; }
  .sprint-game-meta > div { padding: .55rem; text-align: center; }
  .sprint-expression { margin: .25rem 0 .7rem; font-size: clamp(3.5rem, 18vw, 5.2rem); }
  .sprint-answer-form { grid-template-columns: minmax(0, 1fr) auto; }
  .sprint-answer-form input { padding: .55rem; font-size: 1.35rem; }
  .sprint-answer-form .button { padding-inline: .9rem; }
  .sprint-keypad { grid-template-columns: repeat(3, minmax(58px, 1fr)); width: min(100%, 300px); }
  .sprint-keypad button { min-height: 46px; }
  .sprint-live-heading { display: grid; }
  .sprint-live-page .sprint-live-roster { grid-template-columns: minmax(0, 1fr); }
  .sprint-live-roster article { grid-template-columns: 1.5rem minmax(0, 1fr) auto; padding: .65rem; }
  .sprint-live-errors { grid-column: 2 / 4; text-align: left; }
}

@media (max-width: 480px) and (orientation: portrait) {
  .sprint-live-page, .sprint-live-page .admin-section, .sprint-live-page .admin-section > .round-completion { min-width: 0; max-width: 100%; }
  .sprint-live-page .admin-section > .round-completion { grid-template-columns: minmax(0, 1fr); }
  .sprint-live-page .round-completion-copy { grid-template-columns: minmax(0, 1fr); gap: .15rem; }
  .sprint-live-page .round-completion h2 { white-space: normal; }
  .sprint-live-page .round-completion-actions { display: grid; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sprint-live-page .round-completion-actions form { min-width: 0; }
  .sprint-live-page .round-completion .button { width: 100%; min-width: 0; white-space: normal; }
}

@media (max-height: 760px) {
  .screen-app { padding: 2vh 3vw; }
  .screen-kicker { margin-bottom: 1vh; }
  .screen-subtitle { margin-top: 1.5vh; }
  .screen-sprint-grid { gap: .55rem; margin-top: 2vh; }
  .screen-sprint-card { min-height: 64px; padding: .55rem .7rem; }
  .screen-sprint-name { font-size: clamp(.9rem, 1.35vw, 1.35rem); }
  .screen-sprint-score { font-size: clamp(1.8rem, 3.5vw, 3.5rem); }
}

@media (max-height: 640px) {
  .sprint-live-shell .admin-header { padding: .4rem .75rem; }
  .sprint-live-page { padding: .35rem; }
  .sprint-live-page .admin-section { gap: .3rem; padding: .45rem; }
  .sprint-live-page .sprint-live-roster { grid-auto-rows: minmax(48px, max-content); gap: .25rem; }
  .sprint-live-page .sprint-live-roster article { padding: .25rem .45rem; }
  .sprint-live-page .admin-section > .round-completion { padding-top: .35rem; }
}

/* Participant show layer */
:is(
  .participant-lobby-shell,
  .discipline-placeholder-shell,
  .five-letters-shell,
  .quote-shell,
  .closest-shell,
  .slots-shell,
  .topics-shell,
  .arithmetic-sprint-shell
) {
  --game-accent: var(--brand-accent);
  --game-accent-rgb: var(--brand-accent-rgb);
  --game-secondary: var(--blue);
  --game-mark: "PARTYATHLON";
  position: relative;
  isolation: isolate;
  min-height: 100dvh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% -4%, rgba(var(--game-accent-rgb), .16), transparent 34rem),
    radial-gradient(circle at 92% 22%, color-mix(in srgb, var(--game-secondary) 11%, transparent), transparent 27rem),
    linear-gradient(145deg, #0d100e 0, var(--ink) 48%, #080a09 100%);
}

.quote-shell { --game-accent: var(--violet); --game-accent-rgb: 200, 155, 255; --game-secondary: var(--gold); --game-mark: "“ ”"; }
.closest-shell { --game-accent: var(--cyan); --game-accent-rgb: 101, 230, 244; --game-secondary: var(--orange); --game-mark: "◎"; }
.slots-shell {
  --game-accent: var(--gold);
  --game-accent-rgb: 255, 207, 92;
  --game-secondary: var(--orange);
  --game-mark: "777";
  background:
    radial-gradient(circle at 50% 18%, rgba(151, 78, 36, .34), transparent 34rem),
    radial-gradient(circle at 12% -4%, rgba(255, 207, 92, .12), transparent 30rem),
    linear-gradient(145deg, #17130f, #0b0d0c 62%);
}
.topics-shell { --game-accent: var(--blue); --game-accent-rgb: 112, 165, 255; --game-secondary: var(--brand-accent); --game-mark: "100 200 300"; }
.arithmetic-sprint-shell { --game-accent: var(--orange); --game-accent-rgb: 255, 103, 70; --game-secondary: var(--brand-accent); --game-mark: "+ − × ÷"; }
.five-letters-shell { --game-mark: "А Б В Г Д"; }
.discipline-placeholder-shell { --game-mark: "LIVE"; }
.participant-lobby-shell { --game-mark: ""; }

:is(
  .participant-lobby-shell,
  .discipline-placeholder-shell,
  .five-letters-shell,
  .quote-shell,
  .closest-shell,
  .slots-shell,
  .topics-shell,
  .arithmetic-sprint-shell
)::before {
  position: fixed;
  z-index: -2;
  inset: -15%;
  background-image:
    linear-gradient(rgba(var(--game-accent-rgb), .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--game-accent-rgb), .045) 1px, transparent 1px);
  background-size: clamp(42px, 7vw, 92px) clamp(42px, 7vw, 92px);
  mask-image: radial-gradient(circle at 30% 25%, #000, transparent 72%);
  content: "";
  pointer-events: none;
}

:is(
  .participant-lobby-shell,
  .discipline-placeholder-shell,
  .five-letters-shell,
  .quote-shell,
  .closest-shell,
  .slots-shell,
  .topics-shell,
  .arithmetic-sprint-shell
)::after {
  position: fixed;
  z-index: -1;
  right: -5vw;
  bottom: -3vh;
  max-width: 92vw;
  color: var(--game-accent);
  content: var(--game-mark);
  font-size: clamp(5rem, 24vw, 17rem);
  font-weight: 950;
  letter-spacing: -.09em;
  line-height: .72;
  opacity: .035;
  overflow-wrap: anywhere;
  pointer-events: none;
  text-align: right;
}

.participant-lobby-shell::after {
  width: min(82vw, 70rem);
  aspect-ratio: 2020.070 / 410.914;
  background: url("/static/partyathlon-wordmark.svg?v=1b5de40769a6") right bottom / contain no-repeat;
}

:is(.portal-page, .placeholder-page, .five-letters-page, .quote-page, .slots-page, .topics-player-page, .arithmetic-sprint-page) {
  position: relative;
  z-index: 1;
}

.game-header {
  position: relative;
  z-index: 20;
  border-bottom-color: color-mix(in srgb, var(--game-accent) 24%, var(--line));
  background: color-mix(in srgb, var(--ink) 80%, transparent);
  backdrop-filter: blur(18px) saturate(1.2);
}

.game-header::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--game-accent), transparent);
  content: "";
  opacity: .48;
}

.game-header > .game-participant-name,
.rehearsal-view-badge {
  justify-self: end;
  border: 1px solid color-mix(in srgb, var(--game-accent) 30%, var(--line));
  border-radius: 999px;
  padding: .35rem .62rem;
  background: rgba(var(--game-accent-rgb), .06);
  color: var(--paper);
  font-weight: 800;
}

.game-title-row > div:first-child { position: relative; }
.game-title-row > div:first-child::after {
  display: block;
  width: clamp(3rem, 13vw, 6.5rem);
  height: 4px;
  margin-top: clamp(.7rem, 2vw, 1.1rem);
  background: linear-gradient(90deg, var(--game-accent), transparent);
  box-shadow: 0 0 1.2rem rgba(var(--game-accent-rgb), .28);
  content: "";
}

.five-letters-shell.is-five-letters-playing .game-title-row > div:first-child::after { display: none; }

.game-title-row h1 {
  text-shadow: 0 .08em .45em rgba(0, 0, 0, .44), 0 0 1.25em rgba(var(--game-accent-rgb), .08);
}

.game-status {
  position: relative;
  padding-left: 1.15rem;
}

.game-status::before {
  position: absolute;
  top: .53em;
  left: .05rem;
  width: .48rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--game-accent);
  box-shadow: 0 0 .9rem rgba(var(--game-accent-rgb), .72);
  content: "";
}

.game-status.is-error::before { background: var(--orange); box-shadow: 0 0 .9rem rgba(255, 103, 70, .68); }

.game-start,
.game-summary {
  position: relative;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--game-accent) 32%, var(--line));
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(var(--game-accent-rgb), .09), transparent 42%),
    color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: var(--show-shadow), inset 0 1px rgba(255, 255, 255, .035);
}

.game-start::before,
.game-summary::before {
  position: absolute;
  top: 0;
  right: 12%;
  left: 12%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--game-accent), transparent);
  content: "";
}

:is(
  .participant-lobby-shell,
  .discipline-placeholder-shell,
  .five-letters-shell,
  .quote-shell,
  .closest-shell,
  .slots-shell,
  .topics-shell,
  .arithmetic-sprint-shell
) .button-primary {
  position: relative;
  overflow: hidden;
  border-radius: 999px;
  box-shadow: 0 .55rem 1.6rem color-mix(in srgb, var(--brand-accent) 14%, transparent);
  transition: filter .2s ease, transform .15s var(--show-ease), box-shadow .2s ease;
}

:is(
  .participant-lobby-shell,
  .discipline-placeholder-shell,
  .five-letters-shell,
  .quote-shell,
  .closest-shell,
  .slots-shell,
  .topics-shell,
  .arithmetic-sprint-shell
) .button-primary:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow: 0 .8rem 2.2rem color-mix(in srgb, var(--brand-accent) 20%, transparent);
}

:is(
  .participant-lobby-shell,
  .discipline-placeholder-shell,
  .five-letters-shell,
  .quote-shell,
  .closest-shell,
  .slots-shell,
  .topics-shell,
  .arithmetic-sprint-shell
) .button-primary:active:not(:disabled) { transform: translateY(1px) scale(.99); }

.letter-tile {
  border-radius: 7px;
  background: linear-gradient(145deg, #1b201c, #101310);
  box-shadow: inset 0 1px rgba(255, 255, 255, .035), 0 .45rem 1rem rgba(0, 0, 0, .16);
  transition: border-color .18s ease, background .18s ease, transform .18s var(--show-ease);
}

.letter-tile:not(:empty) { transform: translateY(-1px); }
.letter-keyboard button { border: 1px solid rgba(255, 255, 255, .035); box-shadow: 0 3px 0 #141714; transition: filter .15s, transform .08s; }
.letter-keyboard button:active:not(:disabled) { filter: brightness(1.15); transform: translateY(2px); }

.quote-shell .quote-question {
  position: relative;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--violet) 32%, var(--line));
  border-top: 5px solid var(--violet);
  border-radius: 15px;
  padding: 1.2rem;
  background: linear-gradient(145deg, rgba(200, 155, 255, .1), transparent 48%), rgba(19, 22, 20, .88);
  box-shadow: var(--show-shadow);
}

.quote-shell .quote-question::after {
  position: absolute;
  z-index: 0;
  top: -.22em;
  right: .05em;
  color: var(--violet);
  content: "”";
  font-family: var(--ui-font);
  font-size: clamp(8rem, 34vw, 15rem);
  line-height: 1;
  opacity: .07;
}

.quote-shell .quote-question > * { position: relative; z-index: 1; }
.quote-option { border-radius: 10px; background: linear-gradient(110deg, rgba(200, 155, 255, .04), var(--surface) 48%); transition: border-color .18s, background .18s, transform .15s var(--show-ease); }
.quote-option:hover:not(:disabled) { background: rgba(200, 155, 255, .08); transform: translateX(3px); }
.quote-reveal { border-radius: 15px; box-shadow: var(--show-shadow); }

.closest-shell .closest-question {
  position: relative;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--cyan) 36%, var(--line));
  border-top: 5px solid var(--cyan);
  border-radius: 15px;
  padding: 1.2rem;
  background:
    radial-gradient(circle at 92% 16%, transparent 0 2.1rem, rgba(101, 230, 244, .07) 2.15rem 2.25rem, transparent 2.3rem 4.3rem, rgba(101, 230, 244, .06) 4.35rem 4.45rem, transparent 4.5rem),
    rgba(19, 22, 20, .9);
  box-shadow: var(--show-shadow);
}

.closest-answer-form input { border-radius: 10px; background: rgba(19, 22, 20, .86); transition: border-color .18s, box-shadow .18s, transform .18s var(--show-ease); }
.closest-answer-form input:focus { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(101, 230, 244, .12), 0 1rem 2rem rgba(0, 0, 0, .22); transform: translateY(-1px); }

.sprint-game-meta > div {
  overflow: hidden;
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(255, 103, 70, .08), var(--surface));
  box-shadow: inset 0 1px rgba(255, 255, 255, .035);
}

.sprint-expression { text-shadow: 0 0 2.5rem rgba(255, 103, 70, .13); }
.sprint-feedback.is-correct { animation: sprint-feedback-pop .42s var(--show-ease); }
.sprint-feedback.is-wrong { animation: sprint-feedback-shake .34s ease; }

.topics-player-waiting,
.topics-player-question {
  border: 1px solid color-mix(in srgb, var(--blue) 30%, var(--line));
  border-radius: 15px;
  padding: 1.2rem;
  background: linear-gradient(145deg, rgba(112, 165, 255, .09), transparent 46%), rgba(19, 22, 20, .9);
  box-shadow: var(--show-shadow);
}

.topics-player-question { margin-block: 1.5rem; }
.topics-buzz-button:not(:disabled) { animation: topics-buzz-ready 1.8s ease-in-out infinite; }

.slots-scoreboard > div { border-radius: 9px; background: linear-gradient(145deg, rgba(255, 207, 92, .09), var(--surface)); box-shadow: 0 .6rem 1.4rem rgba(0, 0, 0, .18); }

.participant-lobby-shell .portal-header,
.participant-lobby-shell .current-discipline {
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  backdrop-filter: blur(16px);
}

.participant-lobby-shell .current-discipline {
  border: 1px solid color-mix(in srgb, var(--brand-accent) 28%, var(--line));
  border-left: 5px solid var(--brand-accent);
  border-radius: 0 16px 16px 0;
  padding: 1.1rem 1.2rem;
  box-shadow: var(--show-shadow);
}

.discipline-placeholder-shell .placeholder-page section {
  width: min(100%, 70rem);
  border-left: clamp(.35rem, 1vw, .7rem) solid var(--brand-accent);
  padding: clamp(1rem, 4vw, 3rem);
  background: linear-gradient(110deg, rgba(var(--brand-accent-rgb), .08), transparent 68%);
}

/* Big-screen broadcast layer */
.screen-shell {
  --screen-accent: var(--brand-accent);
  --screen-accent-rgb: var(--brand-accent-rgb);
  background: #070908;
}

.screen-shell[data-screen-discipline="quote"] { --screen-accent: var(--violet); --screen-accent-rgb: 200, 155, 255; }
.screen-shell[data-screen-discipline="closest"] { --screen-accent: var(--cyan); --screen-accent-rgb: 101, 230, 244; }
.screen-shell[data-screen-discipline="slots"] { --screen-accent: var(--gold); --screen-accent-rgb: 255, 207, 92; }
.screen-shell[data-screen-discipline="topics"] { --screen-accent: var(--blue); --screen-accent-rgb: 112, 165, 255; }
.screen-shell[data-screen-discipline="arithmetic-sprint"] { --screen-accent: var(--orange); --screen-accent-rgb: 255, 103, 70; }
.screen-shell[data-screen-discipline="squares"] { --screen-accent: var(--brand-accent); --screen-accent-rgb: var(--brand-accent-rgb); }

.screen-app {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 42%, rgba(var(--screen-accent-rgb), .075), transparent 34vw),
    linear-gradient(145deg, #0b0e0c, #070908 62%);
  transition: background .6s ease;
}

.screen-app::before {
  position: absolute;
  z-index: -2;
  inset: 0;
  background-image:
    linear-gradient(rgba(var(--screen-accent-rgb), .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--screen-accent-rgb), .045) 1px, transparent 1px);
  background-size: clamp(54px, 6vw, 110px) clamp(54px, 6vw, 110px);
  mask-image: radial-gradient(ellipse at center, #000, transparent 78%);
  content: "";
}

.screen-app::after {
  position: absolute;
  z-index: -1;
  top: -35vh;
  left: 50%;
  width: 70vw;
  height: 75vh;
  transform: translateX(-50%);
  background: conic-gradient(from 168deg at 50% 0, transparent 0 42%, rgba(var(--screen-accent-rgb), .055) 45%, transparent 49% 53%, rgba(var(--screen-accent-rgb), .035) 56%, transparent 60%);
  content: "";
  filter: blur(1px);
  pointer-events: none;
}

.screen-header,
.screen-footer {
  position: relative;
  z-index: 40;
  align-items: center;
}

.screen-header { border-bottom: 1px solid color-mix(in srgb, var(--screen-accent) 20%, var(--line)); padding-bottom: 1.4vh; }
.screen-footer { border-top: 1px solid color-mix(in srgb, var(--screen-accent) 14%, var(--line)); padding-top: 1.4vh; }
.screen-header b {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  border: 1px solid color-mix(in srgb, var(--screen-accent) 35%, var(--line));
  border-radius: 999px;
  padding: .35em .7em;
  background: rgba(var(--screen-accent-rgb), .055);
  color: var(--screen-accent);
}

.screen-header b::before {
  width: .55em;
  aspect-ratio: 1;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 1em currentColor;
  content: "";
}

.screen-content { z-index: 1; }
.screen-title,
.screen-join-title { text-shadow: 0 .08em .5em rgba(0, 0, 0, .5), 0 0 .9em rgba(var(--screen-accent-rgb), .09); }
.screen-kicker { color: var(--screen-accent); }

.screen-ready-list li { border-bottom: 1px solid rgba(255, 255, 255, .035); padding: .24em .35em; }
.screen-ready-list li.is-selected { background: linear-gradient(90deg, rgba(var(--screen-accent-rgb), .08), transparent); }

.screen-five-letters {
  justify-content: center;
  overflow: hidden;
  padding-block: 2vh;
}

.screen-five-letters-heading {
  display: grid;
  width: min(92vw, 1700px);
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(2rem, 5vw, 6rem);
  align-items: end;
  text-align: left;
}

.screen-five-letters-heading .screen-kicker { margin-bottom: 1vh; }
.screen-five-letters-heading .screen-title { max-width: none; font-size: clamp(3.3rem, 5.5vw, 6.8rem); }

.screen-five-letters-summary {
  display: grid;
  min-width: clamp(15rem, 21vw, 23rem);
  grid-template-columns: 1fr auto;
  gap: .25rem 1.4rem;
  align-items: end;
  border: 1px solid color-mix(in srgb, var(--brand-accent) 32%, var(--line));
  border-left: clamp(.3rem, .45vw, .5rem) solid var(--brand-accent);
  padding: clamp(.75rem, 1.2vw, 1.2rem);
  background: linear-gradient(120deg, rgba(var(--brand-accent-rgb), .1), rgba(19, 22, 20, .86));
  box-shadow: 0 1rem 2.6rem rgba(0, 0, 0, .24);
}

.screen-five-letters-summary span {
  align-self: end;
  color: var(--muted);
  font-size: clamp(.65rem, .9vw, .95rem);
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.screen-five-letters-summary strong {
  grid-row: 1 / 3;
  grid-column: 2;
  color: var(--brand-accent);
  font-size: clamp(2.2rem, 4vw, 4.5rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.06em;
  line-height: .82;
}

.screen-five-letters-summary small { color: var(--muted); font-size: clamp(.68rem, .9vw, .95rem); }

.screen-five-letters-grid {
  display: grid;
  width: min(92vw, 1700px);
  min-height: 0;
  grid-template-columns: repeat(var(--five-columns, 4), minmax(0, 1fr));
  gap: clamp(.55rem, .85vw, .9rem);
  margin-top: clamp(1.2rem, 2.5vh, 2.2rem);
  overflow: hidden;
}

.screen-five-letters-grid[data-count="1"] { width: min(66vw, 680px); }
.screen-five-letters-grid[data-count="2"] { width: min(80vw, 1050px); }

.screen-five-letters-card {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: clamp(7.4rem, 12vh, 10rem);
  grid-template-rows: auto .35rem auto;
  gap: clamp(.5rem, .8vh, .75rem);
  overflow: hidden;
  border: 1px solid var(--line);
  padding: clamp(.75rem, 1vw, 1.05rem);
  background: linear-gradient(145deg, rgba(255, 255, 255, .025), rgba(19, 22, 20, .94));
  box-shadow: 0 .8rem 2rem rgba(0, 0, 0, .16), inset 0 1px rgba(255, 255, 255, .025);
  text-align: left;
}

.screen-five-letters-card::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: .35rem;
  background: var(--line);
  content: "";
}

.screen-five-letters-card.is-playing { border-color: color-mix(in srgb, var(--brand-accent) 45%, var(--line)); background: linear-gradient(145deg, rgba(var(--brand-accent-rgb), .08), rgba(19, 22, 20, .94) 56%); }
.screen-five-letters-card.is-playing::before { background: var(--brand-accent); box-shadow: 0 0 1.4rem rgba(var(--brand-accent-rgb), .42); }
.screen-five-letters-card.is-finished { border-color: color-mix(in srgb, var(--blue) 55%, var(--line)); background: linear-gradient(145deg, rgba(112, 165, 255, .1), rgba(19, 22, 20, .94) 58%); }
.screen-five-letters-card.is-finished::before { background: var(--blue); box-shadow: 0 0 1.4rem rgba(112, 165, 255, .35); }

.screen-five-letters-card-heading { display: grid; min-width: 0; grid-template-columns: auto minmax(0, 1fr); gap: .1rem .65rem; align-items: center; }
.screen-five-letters-number { grid-row: 1 / 3; color: var(--muted); font-size: clamp(.75rem, 1vw, 1rem); font-variant-numeric: tabular-nums; }
.screen-five-letters-name { min-width: 0; overflow: hidden; font-size: clamp(1rem, 1.45vw, 1.6rem); text-overflow: ellipsis; white-space: nowrap; }
.screen-five-letters-state { color: var(--muted); font-size: clamp(.58rem, .75vw, .78rem); font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.screen-five-letters-card.is-playing .screen-five-letters-state { color: var(--brand-accent); }
.screen-five-letters-card.is-finished .screen-five-letters-state { color: var(--blue); }

.screen-five-letters-progress { position: relative; overflow: hidden; background: #252b26; }
.screen-five-letters-progress::after { position: absolute; inset: 0 auto 0 0; width: var(--five-progress); background: var(--brand-accent); box-shadow: 0 0 1rem rgba(var(--brand-accent-rgb), .3); content: ""; transition: width .45s var(--show-ease); }
.screen-five-letters-card.is-finished .screen-five-letters-progress::after { background: linear-gradient(90deg, var(--blue), #8db8ff); }

.screen-five-letters-card-footer { display: grid; min-width: 0; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; align-items: end; }
.screen-five-letters-card-footer > span { min-width: 0; grid-row: 1 / 3; align-self: center; overflow: hidden; color: var(--muted); font-size: clamp(.65rem, .83vw, .9rem); text-overflow: ellipsis; white-space: nowrap; }
.screen-five-letters-card-footer > small { color: var(--muted); font-size: clamp(.5rem, .62vw, .65rem); letter-spacing: .08em; text-align: right; text-transform: uppercase; }
.screen-five-letters-card-footer > strong { color: var(--paper); font-size: clamp(1.05rem, 1.55vw, 1.65rem); font-variant-numeric: tabular-nums; line-height: 1; text-align: right; }

@media (max-width: 1050px) {
  .screen-five-letters-heading { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .screen-five-letters-summary { width: max-content; }
  .screen-five-letters-grid:not([data-count="1"]):not([data-count="2"]) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

:is(.screen-quote-option, .screen-closest-answers article, .screen-sprint-card, .screen-topics-option, .screen-topics-theme, .screen-topics-board-row span) {
  border-color: color-mix(in srgb, var(--screen-accent) 16%, var(--line));
  background: linear-gradient(145deg, rgba(var(--screen-accent-rgb), .055), rgba(19, 22, 20, .92));
  box-shadow: inset 0 1px rgba(255, 255, 255, .025), 0 .8rem 1.8rem rgba(0, 0, 0, .12);
}

.screen-scene-sting {
  position: absolute;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: rgba(5, 7, 6, .92);
  opacity: 0;
  pointer-events: none;
  transform: scale(1.035);
  transition: opacity .28s ease, transform .6s var(--show-ease);
}

.screen-scene-sting::before {
  position: absolute;
  inset: -30%;
  background:
    linear-gradient(115deg, transparent 34%, rgba(var(--screen-accent-rgb), .14) 46%, transparent 58%),
    repeating-linear-gradient(90deg, transparent 0 7vw, rgba(var(--screen-accent-rgb), .045) 7vw calc(7vw + 1px));
  content: "";
  transform: skewX(-8deg);
}

.screen-scene-sting.is-visible { opacity: 1; transform: scale(1); }
.screen-scene-sting.is-leaving { opacity: 0; transform: scale(.975); }
.screen-scene-sting-copy { position: relative; display: grid; width: min(88vw, 1500px); justify-items: center; gap: 2vh; text-align: center; }
.screen-scene-sting-copy span { color: var(--screen-accent); font-size: clamp(1rem, 1.5vw, 1.6rem); font-weight: 900; letter-spacing: .2em; text-transform: uppercase; }
.screen-scene-sting-copy strong { max-width: 100%; overflow-wrap: anywhere; font-size: clamp(4rem, min(10vw, 20vh), 11rem); letter-spacing: -.055em; line-height: .86; text-shadow: 0 0 1em rgba(var(--screen-accent-rgb), .22); }

@keyframes participant-page-in {
  from { opacity: 0; transform: translateY(.8rem); }
  to { opacity: 1; transform: none; }
}

@keyframes sprint-feedback-pop {
  0% { opacity: 0; transform: scale(.8); }
  55% { transform: scale(1.1); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes sprint-feedback-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-.45rem); }
  55% { transform: translateX(.35rem); }
  80% { transform: translateX(-.15rem); }
}

@keyframes topics-buzz-ready {
  0%, 100% { box-shadow: 0 14px 0 color-mix(in srgb, var(--brand-accent) 45%, var(--ink)), 0 24px 50px rgba(0, 0, 0, .5), 0 0 0 0 rgba(var(--brand-accent-rgb), .2); }
  50% { box-shadow: 0 14px 0 color-mix(in srgb, var(--brand-accent) 45%, var(--ink)), 0 24px 50px rgba(0, 0, 0, .5), 0 0 0 1rem rgba(var(--brand-accent-rgb), 0); }
}

@media (prefers-reduced-motion: no-preference) {
  :is(.portal-page, .placeholder-page, .five-letters-page, .quote-page, .slots-page, .topics-player-page, .arithmetic-sprint-page) { animation: participant-page-in .55s var(--show-ease) both; }
}

@media (max-width: 700px) {
  .game-header { padding-inline: max(.8rem, env(safe-area-inset-left)) max(.8rem, env(safe-area-inset-right)); }
  .game-header .tournament-lockup { width: 100%; font-size: .7rem; }
  .game-header > .game-participant-name { padding: .3rem .5rem; font-size: .62rem; }
  .game-title-row > div:first-child::after { height: 3px; margin-top: .55rem; }
  .quote-shell .quote-question, .closest-shell .closest-question, .topics-player-question { border-radius: 12px; padding: .9rem; }
  .participant-lobby-shell .portal-hero { padding-top: 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .screen-scene-sting { transition-duration: .01ms; }
  .topics-buzz-button:not(:disabled),
  .sprint-feedback.is-correct,
  .sprint-feedback.is-wrong { animation: none; }
}

/* Separate tournament editing and live-conducting workspaces */
.management-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .25rem;
  margin: 1rem 0;
  border: 1px solid var(--line);
  padding: .25rem;
  background: var(--ink);
}
.management-mode-switch :is(a, span) { display: grid; min-height: var(--control-height); place-items: center; padding: .55rem .8rem; color: var(--muted); font-size: .72rem; font-weight: 850; letter-spacing: .07em; text-align: center; text-decoration: none; text-transform: uppercase; }
.management-mode-switch [aria-current="page"] { background: var(--paper); color: var(--ink); }
.edit-jump-nav { display: flex; overflow-x: auto; gap: .45rem; margin: -.35rem 0 1rem; padding-bottom: .2rem; scrollbar-width: thin; }
.edit-jump-nav a { display: inline-flex; min-height: var(--control-height); flex: 1 0 auto; align-items: center; justify-content: center; border: 1px solid var(--line); padding: .55rem .85rem; color: var(--paper); font-size: .72rem; font-weight: 850; text-decoration: none; }
.edit-intro { border-left: 5px solid var(--blue); }
.discipline-correction-tools { width: 100%; border-top: 1px solid var(--line); padding-top: .7rem; }
.discipline-correction-tools summary { min-height: var(--control-height); color: var(--muted); cursor: pointer; font-size: .72rem; font-weight: 800; }
.discipline-correction-tools .discipline-card-actions { padding-top: .65rem; }

.conductor-page { width: min(100%, 820px); padding-bottom: max(2rem, env(safe-area-inset-bottom)); }
.conductor-page .management-mode-switch { margin-bottom: .75rem; }
.conductor-hero { position: relative; overflow: hidden; border-top: 5px solid var(--brand-accent); padding: clamp(1.1rem, 4vw, 2rem); }
.conductor-hero::after { position: absolute; top: -7rem; right: -6rem; width: 15rem; aspect-ratio: 1; border: 1px solid rgba(var(--brand-accent-rgb), .1); border-radius: 50%; content: ""; box-shadow: 0 0 0 2rem rgba(var(--brand-accent-rgb), .025), 0 0 0 5rem rgba(var(--brand-accent-rgb), .018); pointer-events: none; }
.conductor-hero > * { position: relative; z-index: 1; }
.conductor-hero h1 { max-width: 14ch; min-width: 0; overflow-wrap: anywhere; margin: .25rem 0 .65rem; font-size: clamp(2.15rem, 9vw, 4.8rem); letter-spacing: -.055em; line-height: .9; }
.admin-discipline h3 { min-width: 0; overflow-wrap: anywhere; }
.conductor-hero > p:not(.eyebrow, .live-kicker, .inline-warning) { max-width: 58ch; color: var(--muted); }
.conductor-hero.is-preparation { border-color: var(--blue); }
.conductor-hero.is-finished { border-color: var(--blue); }
.conductor-hero.is-correction { border-color: var(--orange); }
.live-kicker { display: flex; align-items: center; gap: .55rem; color: var(--brand-accent); font-size: .7rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.live-kicker i { width: .65rem; aspect-ratio: 1; border-radius: 50%; background: currentColor; box-shadow: 0 0 1rem currentColor; animation: conductor-live-pulse 1.6s ease-in-out infinite; }
.conductor-round-number { color: var(--muted); font-size: .8rem; font-weight: 900; letter-spacing: .1em; }
.conductor-primary-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; margin-top: 1.2rem; }
.conductor-primary-actions form { display: contents; }
.conductor-readiness { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; margin: 1.2rem 0 0; }
.conductor-readiness div { border: 1px solid var(--line); padding: .75rem; background: var(--ink); }
.conductor-readiness dt { color: var(--muted); font-size: .64rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.conductor-readiness dd { margin: .15rem 0 0; font-size: 1.65rem; font-weight: 950; }
.inline-warning { border-left: 3px solid var(--orange); padding: .65rem .8rem; background: rgba(255, 103, 70, .08); color: var(--paper); }
.conductor-readiness-warning { display: grid; gap: .45rem; border-left: 3px solid var(--orange); margin-top: .8rem; padding: .7rem .85rem; background: rgba(255, 103, 70, .08); }
.conductor-readiness-warning a { display: inline-flex; min-height: var(--control-height); align-items: center; color: var(--brand-accent); font-weight: 800; text-decoration: none; }
.conductor-more-rounds > summary, .conductor-history > summary { display: flex; min-height: 48px; align-items: center; justify-content: space-between; gap: 1rem; cursor: pointer; font-size: 1rem; font-weight: 900; }
.conductor-more-rounds > summary span, .conductor-history > summary span { display: grid; min-width: 2rem; min-height: 2rem; place-items: center; background: var(--ink); color: var(--muted); font-size: .75rem; }
.conductor-round-list { display: grid; gap: .5rem; margin-top: .8rem; }
.conductor-round-list article { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .75rem; align-items: center; border-top: 1px solid var(--line); padding: .75rem 0; }
.conductor-round-list article > div { display: grid; min-width: 0; gap: .18rem; }
.conductor-round-list small { color: var(--muted); font-size: .62rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.conductor-round-list strong { overflow: hidden; text-overflow: ellipsis; }
.conductor-edit-link { display: inline-flex; min-height: var(--control-height); align-items: center; margin-top: .8rem; color: var(--brand-accent); font-weight: 800; text-decoration: none; }
.conductor-standings ol { display: grid; gap: .35rem; margin: .7rem 0 0; padding: 0; list-style: none; }
.conductor-standings li { display: grid; min-height: 48px; grid-template-columns: 2rem minmax(0, 1fr) auto; gap: .65rem; align-items: center; border-bottom: 1px solid var(--line); }
.conductor-standings li > span { color: var(--muted); font-weight: 900; text-align: center; }
.conductor-standings li > strong { min-width: 0; overflow-wrap: anywhere; }
.conductor-standings li > b { color: var(--brand-accent); font-size: .78rem; white-space: nowrap; }
.conductor-standings details summary { min-height: var(--control-height); padding-top: .85rem; color: var(--muted); cursor: pointer; }
.conductor-finish { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; align-items: center; border-color: var(--brand-accent); }
.conductor-finish h2 { margin: .15rem 0; }
.conductor-finish p { margin-bottom: 0; color: var(--muted); }

@keyframes conductor-live-pulse { 50% { opacity: .45; transform: scale(.82); } }

@media (max-width: 600px) {
  .conductor-header nav { justify-content: flex-start; }
  .conductor-page { padding: .65rem; }
  .conductor-page .admin-section { margin: .65rem 0; }
  .conductor-hero h1 { font-size: clamp(2.1rem, 11vw, 3.2rem); }
  .conductor-primary-actions { display: grid; grid-template-columns: minmax(0, 1fr); }
  .conductor-primary-actions :is(form, .button, button) { width: 100%; }
  .conductor-primary-actions .button { min-height: var(--control-height-large); }
  .conductor-readiness { grid-template-columns: minmax(0, 1fr); }
  .conductor-round-list article { grid-template-columns: minmax(0, 1fr); }
  .conductor-round-list article :is(form, .button) { width: 100%; }
  .conductor-finish { grid-template-columns: minmax(0, 1fr); }
  .conductor-finish :is(form, button) { width: 100%; }
  .conductor-standings li { grid-template-columns: 1.7rem minmax(0, 1fr); }
  .conductor-standings li > b { grid-column: 2; padding-bottom: .5rem; }
  .results-page .sticky-actions { position: static; display: grid; grid-template-columns: minmax(0, 1fr); padding-bottom: 0; }
  .results-page .sticky-actions .button { width: 100%; min-height: 48px; }
  .results-save-status { text-align: left; }
  .results-conductor-shell .results-page { padding: .3rem; }
  .results-conductor-shell .results-page > .admin-section { padding: .5rem; }
  .results-conductor-shell .results-page > .admin-section > .eyebrow { margin-bottom: .1rem; font-size: .56rem; }
  .results-conductor-shell .results-page > .admin-section > h1 { font-size: clamp(1.55rem, 8vw, 2.2rem); line-height: .95; }
  .results-conductor-shell .results-page > .admin-section > .help-text { display: none; }
  .results-conductor-shell .result-edit-row { gap: .4rem; padding: .55rem 0; }
  .results-conductor-shell .manual-result-inputs { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22ch), 1fr)); }
  .results-conductor-shell .results-page .sticky-actions { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: .35rem; }
  .results-conductor-shell .results-page .sticky-actions .button { min-width: 0; min-height: var(--control-height-large); padding: .45rem; font-size: .66rem; line-height: 1.15; white-space: normal; }
}

/* Viewport-sized live workspaces */
.game-conductor-shell {
  display: grid;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}
.game-conductor-shell > * { min-width: 0; }
.game-conductor-shell .admin-header {
  position: relative;
  flex-wrap: nowrap;
  gap: .5rem .8rem;
  padding: max(.55rem, env(safe-area-inset-top)) max(.75rem, env(safe-area-inset-right)) .55rem max(.75rem, env(safe-area-inset-left));
}
.game-conductor-shell .admin-header > div { min-width: 0; flex: 1 1 auto; }
.game-conductor-shell .admin-header nav { flex: 0 0 auto; flex-wrap: nowrap; }
.game-conductor-page {
  display: flex;
  width: min(100%, 1280px);
  height: 100%;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  padding: .5rem;
  overflow: hidden;
}
.game-conductor-page > .flash { flex: 0 0 auto; width: 100%; margin: 0 0 .35rem; }
.game-conductor-section {
  display: grid;
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: .45rem;
  margin: 0;
  padding: .65rem;
  overflow: hidden;
}
.topics-conductor-shell .game-conductor-section { grid-template-rows: auto auto minmax(0, 1fr) auto; }
.game-conductor-heading { display: flex; min-width: 0; align-items: baseline; justify-content: space-between; gap: .5rem 1rem; }
.game-conductor-heading .eyebrow { flex: 0 0 auto; margin: 0; }
.game-conductor-heading h1,
.quote-live-section .game-conductor-heading h1 {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: clamp(1.35rem, min(3.2vw, 4.8dvh), 2.5rem);
  letter-spacing: -.04em;
  line-height: 1;
  text-align: right;
}
.game-conductor-stage {
  min-width: 0;
  min-height: 0;
  padding-right: .2rem;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.game-conductor-stage > :first-child { margin-top: 0; }
.game-conductor-stage > :last-child { margin-bottom: .1rem; }
.game-conductor-stage .quote-live-status {
  position: sticky;
  z-index: 4;
  top: 0;
  margin: 0 0 .65rem;
  padding: .55rem .7rem;
  background: rgba(11, 13, 12, .96);
}
.game-conductor-stage .quote-live-status strong { font-size: clamp(2rem, min(6vw, 9dvh), 3.5rem); line-height: .9; }
.game-conductor-stage > blockquote { margin: .65rem 0; overflow-wrap: anywhere; font-size: clamp(1.2rem, min(3vw, 4.5dvh), 2.5rem); line-height: 1.08; }
.game-conductor-stage .admin-live-question-media { width: 100%; max-height: min(32dvh, 320px); margin: 0 0 .65rem; }
.game-conductor-stage > .help-text { margin: .55rem 0; font-size: .75rem; line-height: 1.35; }
.game-conductor-stage .quote-live-round { margin: 0; }
.game-conductor-stage .quote-live-votes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; margin: .65rem 0; }
.game-conductor-stage .quote-live-votes article { min-width: 0; padding: .6rem .7rem; }
.game-conductor-stage .quote-live-votes article > strong { overflow-wrap: anywhere; font-size: 1rem; }
.game-conductor-stage .quote-live-votes article > div { max-height: 5.5rem; margin-top: .45rem; overflow-y: auto; }
.game-conductor-stage .closest-live-correct { margin: .65rem 0; padding: .55rem .7rem; }
.game-conductor-stage .closest-live-correct strong { font-size: clamp(2rem, min(8vw, 10dvh), 4rem); }
.game-conductor-stage .closest-live-answers { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; margin: .65rem 0; }
.game-conductor-stage .closest-live-answers article { min-width: 0; padding: .55rem .7rem; }
.game-conductor-stage .closest-live-answers article > strong { min-width: 0; overflow-wrap: anywhere; }
.quote-live-next-action,
.game-conductor-stage .closest-live-next-action {
  position: sticky;
  z-index: 3;
  top: 0;
  margin: .5rem 0;
  padding: .35rem;
  background: rgba(11, 13, 12, .96);
  box-shadow: 0 0 0 1px var(--line);
}
.quote-live-next-action .button,
.game-conductor-stage .closest-live-next-action .button { width: 100%; min-height: 48px; }
.game-conductor-stage > .flash { position: relative; top: auto; margin: .5rem 0; }
.game-conductor-completion { min-width: 0; border-top: 1px solid var(--line); padding-top: .45rem; }
.game-conductor-completion .round-completion { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .35rem 1rem; align-items: center; margin: 0; border: 0; padding: 0; }
.game-conductor-completion .round-completion-copy { min-width: 0; }
.game-conductor-completion .round-completion h2,
.game-conductor-completion .round-completion p { margin: 0; }
.game-conductor-completion .round-completion h2 { font-size: 1rem; }
.game-conductor-completion .round-completion p { font-size: .68rem; line-height: 1.25; }
.game-conductor-completion .round-completion-actions { flex-wrap: nowrap; }
.game-conductor-completion .button { min-height: var(--control-height); padding: .45rem .7rem; font-size: .7rem; }
.game-conductor-completion .discipline-reset-details { margin: .25rem 0 0; padding: 0; }
.game-conductor-completion .discipline-reset-details > summary { min-height: var(--control-height); }
.topics-conductor-shell #topics-live-status { min-height: 0; margin: 0; font-size: .75rem; line-height: 1.3; }
.topics-conductor-shell .topics-score-strip { margin-top: 0; }
.topics-conductor-shell .topics-live-question-card { margin-top: 0; }
.topics-conductor-shell :is(.topics-judge-actions, .topics-board-actions, .topics-final-actions) { position: sticky; z-index: 3; bottom: 0; padding: .4rem; background: rgba(11, 13, 12, .96); box-shadow: 0 0 0 1px var(--line); }

/* Active participant screens share the same viewport contract. */
:is(.quote-shell, .closest-shell):is([data-game-phase="answering"], [data-game-phase="grace"], [data-game-phase="revealed"]),
.topics-shell[data-game-phase],
.arithmetic-sprint-shell[data-game-phase="playing"],
.slots-shell.is-slots-playing {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  overscroll-behavior: none;
}
html:has(> body:is(.quote-shell, .closest-shell):is([data-game-phase="answering"], [data-game-phase="grace"], [data-game-phase="revealed"])),
html:has(> body.topics-shell[data-game-phase]),
html:has(> body.arithmetic-sprint-shell[data-game-phase="playing"]),
html:has(> body.five-letters-shell.is-five-letters-playing),
html:has(> body.slots-shell.is-slots-playing) {
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.closest-shell:is([data-game-phase="answering"], [data-game-phase="grace"], [data-game-phase="revealed"]) { height: var(--closest-viewport-height, 100dvh); }
:is(.quote-shell, .closest-shell):is([data-game-phase="answering"], [data-game-phase="grace"], [data-game-phase="revealed"]) .quote-page,
.topics-shell[data-game-phase] .topics-player-page,
.arithmetic-sprint-shell[data-game-phase="playing"] .arithmetic-sprint-page,
.slots-shell.is-slots-playing .slots-page {
  display: grid;
  height: 100%;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  padding-bottom: 0;
  overflow: hidden;
}
:is(.quote-shell, .closest-shell):is([data-game-phase="answering"], [data-game-phase="grace"], [data-game-phase="revealed"]) .quote-game {
  display: grid;
  height: 100%;
  min-height: 0;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: clamp(.25rem, 1dvh, .55rem);
  padding: clamp(.45rem, 1.5dvh, .85rem) clamp(.65rem, 2.5vw, 1.25rem) max(.4rem, env(safe-area-inset-bottom));
  overflow: hidden;
}
:is(.quote-shell, .closest-shell):is([data-game-phase="answering"], [data-game-phase="grace"], [data-game-phase="revealed"]) .quote-title-row { min-width: 0; align-items: center; }
:is(.quote-shell, .closest-shell):is([data-game-phase="answering"], [data-game-phase="grace"], [data-game-phase="revealed"]) .quote-title-row > div:first-child { min-width: 0; }
:is(.quote-shell, .closest-shell):is([data-game-phase="answering"], [data-game-phase="grace"], [data-game-phase="revealed"]) .quote-title-row .eyebrow { margin: 0 0 .15rem; font-size: .56rem; }
:is(.quote-shell, .closest-shell):is([data-game-phase="answering"], [data-game-phase="grace"], [data-game-phase="revealed"]) .quote-title-row h1 {
  overflow-wrap: anywhere;
  font-size: clamp(1.3rem, min(6vw, 4.8dvh), 2.35rem);
  line-height: .95;
}
:is(.quote-shell, .closest-shell):is([data-game-phase="answering"], [data-game-phase="grace"], [data-game-phase="revealed"]) .quote-game-meta { display: flex; flex: 0 0 auto; align-items: baseline; gap: .55rem; }
:is(.quote-shell, .closest-shell):is([data-game-phase="answering"], [data-game-phase="grace"], [data-game-phase="revealed"]) .game-timer { font-size: clamp(1.45rem, min(7vw, 5dvh), 2.3rem); }
:is(.quote-shell, .closest-shell):is([data-game-phase="answering"], [data-game-phase="grace"], [data-game-phase="revealed"]) .word-progress { padding: 0; font-size: .8rem; }
:is(.quote-shell, .closest-shell):is([data-game-phase="answering"], [data-game-phase="grace"], [data-game-phase="revealed"]) .game-status {
  min-height: 0;
  max-height: 2.7em;
  margin: 0;
  overflow-y: auto;
  font-size: clamp(.65rem, 1.7dvh, .78rem);
  line-height: 1.25;
}
:is(.quote-shell, .closest-shell):is([data-game-phase="answering"], [data-game-phase="grace"], [data-game-phase="revealed"]) .quote-question {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(.3rem, .8dvh, .55rem);
  border-top-width: 3px;
  padding: clamp(.5rem, 1.25dvh, .8rem);
  overflow: hidden;
}
.quote-question-stage { display: grid; min-width: 0; min-height: 0; grid-template-columns: minmax(0, 1fr); gap: .55rem; overflow: hidden; }
.quote-question.has-media .quote-question-stage { grid-template-columns: minmax(0, 1.15fr) minmax(96px, .85fr); }
:is(.quote-shell, .closest-shell):is([data-game-phase="answering"], [data-game-phase="grace"], [data-game-phase="revealed"]) .quote-question-number { font-size: .58rem; }
:is(.quote-shell, .closest-shell):is([data-game-phase="answering"], [data-game-phase="grace"], [data-game-phase="revealed"]) .quote-question-stage > :is(blockquote, h2) {
  min-width: 0;
  min-height: 0;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overflow-wrap: anywhere;
  font-size: clamp(1rem, min(4.5vw, 3.2dvh), 1.65rem);
  line-height: 1.12;
  overscroll-behavior: contain;
}
:is(.quote-shell, .closest-shell):is([data-game-phase="answering"], [data-game-phase="grace"], [data-game-phase="revealed"]) .quote-question-stage .game-question-media {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  margin: 0;
  object-fit: contain;
}
:is(.quote-shell, .closest-shell):is([data-game-phase="answering"], [data-game-phase="grace"], [data-game-phase="revealed"]) .quote-options { gap: .3rem; }
:is(.quote-shell, .closest-shell):is([data-game-phase="answering"], [data-game-phase="grace"], [data-game-phase="revealed"]) .quote-option {
  min-width: 0;
  min-height: var(--control-height);
  grid-template-columns: 1.8rem minmax(0, 1fr);
  padding: .35rem .55rem;
}
:is(.quote-shell, .closest-shell):is([data-game-phase="answering"], [data-game-phase="grace"], [data-game-phase="revealed"]) .quote-option > span { width: 1.35rem; height: 1.35rem; }
:is(.quote-shell, .closest-shell):is([data-game-phase="answering"], [data-game-phase="grace"], [data-game-phase="revealed"]) .quote-option > strong {
  min-width: 0;
  max-height: 2.5em;
  overflow-y: auto;
  overflow-wrap: anywhere;
  font-size: clamp(.78rem, 2.2vw, .92rem);
  line-height: 1.2;
}
.quote-shell[data-game-phase="revealed"] .quote-option:not(.is-correct):not(.is-wrong) { display: none; }
:is(.quote-shell, .closest-shell)[data-game-phase="revealed"] .quote-reveal {
  max-height: min(25dvh, 10rem);
  margin: 0;
  padding: .65rem;
  overflow-y: auto;
}
:is(.quote-shell, .closest-shell)[data-game-phase="revealed"] .quote-reveal strong { margin: .35rem 0 .2rem; font-size: clamp(1.4rem, min(7vw, 4dvh), 2.4rem); }
:is(.quote-shell, .closest-shell)[data-game-phase="revealed"] .quote-reveal > span { margin-bottom: 0; }

/* Quote content stays compact; only the whole round scrolls on truly short screens. */
.quote-shell:is([data-game-phase="answering"], [data-game-phase="revealed"]) .quote-game {
  grid-template-rows: auto auto minmax(0, 1fr);
}
.quote-shell[data-game-phase="answering"] .game-status {
  min-height: 1.25em;
  max-height: 1.25em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quote-shell:is([data-game-phase="answering"], [data-game-phase="revealed"]) .quote-round-stage {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-auto-rows: max-content;
  align-content: start;
  gap: clamp(.35rem, 1dvh, .6rem);
  padding-right: .1rem;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.quote-shell:is([data-game-phase="answering"], [data-game-phase="revealed"]) .quote-question {
  grid-template-rows: auto auto auto;
  align-content: start;
}
.quote-shell:is([data-game-phase="answering"], [data-game-phase="revealed"]) .quote-question-stage {
  align-items: start;
  overflow: visible;
}
.quote-shell:is([data-game-phase="answering"], [data-game-phase="revealed"]) .quote-question-stage > blockquote,
.quote-shell:is([data-game-phase="answering"], [data-game-phase="revealed"]) .quote-option > strong {
  max-height: none;
  overflow: visible;
}
.quote-shell:is([data-game-phase="answering"], [data-game-phase="revealed"]) .quote-question-stage .game-question-media {
  height: auto;
  max-height: min(22dvh, 10rem);
  align-self: start;
}
.quote-shell[data-game-phase="answering"] .quote-options {
  gap: clamp(.4rem, 1.1dvh, .65rem);
}
.quote-shell[data-game-phase="answering"] .quote-option {
  min-height: clamp(54px, 8.5dvh, 68px);
  grid-template-columns: 2.15rem minmax(0, 1fr);
  padding: clamp(.55rem, 1.4dvh, .8rem) .75rem;
}
.quote-shell[data-game-phase="answering"] .quote-option > span {
  width: 1.65rem;
  height: 1.65rem;
  font-size: .75rem;
}
.quote-shell[data-game-phase="answering"] .quote-option > strong {
  font-size: clamp(.95rem, 3.7vw, 1.12rem);
  line-height: 1.15;
}
.quote-shell[data-game-phase="revealed"] .quote-options { display: none; }
.quote-shell[data-game-phase="revealed"] .quote-reveal {
  max-height: none;
  overflow: visible;
}

@media (max-height: 520px) {
  .quote-shell[data-game-phase="answering"] .quote-options { gap: .35rem; }
  .quote-shell[data-game-phase="answering"] .quote-option {
    min-height: 48px;
    grid-template-columns: 1.85rem minmax(0, 1fr);
    padding: .4rem .6rem;
  }
  .quote-shell[data-game-phase="answering"] .quote-option > span { width: 1.4rem; height: 1.4rem; }
  .quote-shell[data-game-phase="answering"] .quote-option > strong { font-size: clamp(.84rem, 2vw, .98rem); }
}
@media (max-height: 520px) and (orientation: landscape) {
  .quote-shell[data-game-phase="answering"] .quote-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Closest keeps the active card compact; only the round scrolls when needed. */
.closest-shell:is([data-game-phase="answering"], [data-game-phase="grace"], [data-game-phase="revealed"]) .closest-game {
  grid-template-rows: auto auto minmax(0, 1fr);
}
.closest-shell:is([data-game-phase="answering"], [data-game-phase="grace"]) .game-status {
  min-height: 2.7em;
}
.closest-shell:is([data-game-phase="answering"], [data-game-phase="grace"]):not(.is-closest-input-focused) .closest-round-stage {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-auto-rows: max-content;
  align-content: start;
  gap: clamp(.35rem, 1dvh, .6rem);
  padding: clamp(.45rem, 1.8dvh, 1rem) .1rem 1rem;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.closest-shell[data-game-phase="revealed"] .closest-round-stage {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-auto-rows: max-content;
  align-content: start;
  gap: clamp(.35rem, 1dvh, .6rem);
  padding-right: .1rem;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.closest-shell:is([data-game-phase="answering"], [data-game-phase="grace"]):not(.is-closest-input-focused) .closest-question {
  width: min(100%, 44rem);
  min-height: 0;
  grid-template-rows: auto auto auto;
  align-content: start;
  justify-self: center;
}
.closest-shell[data-game-phase="revealed"] .closest-question {
  grid-template-rows: auto auto;
  align-content: start;
}
.closest-shell:is([data-game-phase="answering"], [data-game-phase="grace"]):not(.is-closest-input-focused) .closest-question-stage {
  align-content: start;
  align-items: start;
  padding-top: .15rem;
  overflow: visible;
}
.closest-shell[data-game-phase="revealed"] .closest-question-stage {
  align-items: start;
  overflow: visible;
}
.closest-shell:is([data-game-phase="answering"], [data-game-phase="grace"]):not(.is-closest-input-focused) .closest-question-stage > h2,
.closest-shell[data-game-phase="revealed"] .closest-question-stage > h2 {
  min-height: 0;
  max-height: none;
  overflow: visible;
}
.closest-shell:is([data-game-phase="answering"], [data-game-phase="grace"]):not(.is-closest-input-focused) .closest-question-stage .game-question-media,
.closest-shell[data-game-phase="revealed"] .closest-question-stage .game-question-media {
  height: auto;
  max-height: min(22dvh, 10rem);
  align-self: start;
}
.closest-shell[data-game-phase="revealed"] .closest-reveal {
  max-height: none;
  align-self: start;
  overflow: visible;
}
.closest-shell:is([data-game-phase="answering"], [data-game-phase="grace"]) .closest-answer-form { grid-template-columns: minmax(0, 1fr) auto; gap: .4rem; }
.closest-shell:is([data-game-phase="answering"], [data-game-phase="grace"]) .closest-answer-form label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.closest-shell:is([data-game-phase="answering"], [data-game-phase="grace"]) .closest-answer-form input { min-width: 0; min-height: 48px; padding: .45rem .65rem; font-size: 1.05rem; }
.closest-shell:is([data-game-phase="answering"], [data-game-phase="grace"]) .closest-answer-form .button { width: 12rem; max-width: 100%; min-height: 48px; padding: .5rem .7rem; }

@media (max-width: 540px) {
  .closest-shell:is([data-game-phase="answering"], [data-game-phase="grace"], [data-game-phase="revealed"]) .closest-title-row { align-items: end; gap: .65rem; }
  .closest-shell:is([data-game-phase="answering"], [data-game-phase="grace"], [data-game-phase="revealed"]) .closest-title-row > div:first-child::after { display: none; }
  .closest-shell:is([data-game-phase="answering"], [data-game-phase="grace"], [data-game-phase="revealed"]) .closest-title-row h1 {
    overflow-wrap: normal;
    font-size: clamp(1.65rem, 8vw, 2.15rem);
    line-height: .92;
    white-space: nowrap;
  }
  .closest-shell:is([data-game-phase="answering"], [data-game-phase="grace"], [data-game-phase="revealed"]) .quote-game-meta { align-items: center; gap: .45rem; }
  .closest-shell:is([data-game-phase="answering"], [data-game-phase="grace"], [data-game-phase="revealed"]) .game-timer { color: var(--cyan); font-size: 2rem; }
  .closest-shell:is([data-game-phase="answering"], [data-game-phase="grace"], [data-game-phase="revealed"]) .word-progress {
    border: 1px solid color-mix(in srgb, var(--cyan) 30%, var(--line));
    border-radius: 999px;
    padding: .25rem .45rem;
    color: var(--muted);
    font-size: .68rem;
    line-height: 1;
  }
  .closest-shell:is([data-game-phase="answering"], [data-game-phase="grace"], [data-game-phase="revealed"]) .game-status {
    max-height: none;
    overflow: visible;
    padding-left: 1rem;
    font-size: .73rem;
    line-height: 1.3;
  }
  .closest-shell:is([data-game-phase="answering"], [data-game-phase="grace"]):not(.is-closest-input-focused) .closest-question {
    gap: .6rem;
    border-top-width: 3px;
    padding: .85rem;
    background: linear-gradient(145deg, rgba(101, 230, 244, .055), rgba(19, 22, 20, .94) 48%);
    box-shadow: 0 1.15rem 2.8rem rgba(0, 0, 0, .27), inset 0 1px rgba(255, 255, 255, .025);
  }
  .closest-shell:is([data-game-phase="answering"], [data-game-phase="grace"]):not(.is-closest-input-focused) .closest-question.has-media .closest-question-stage { grid-template-columns: minmax(0, 1fr); }
  .closest-shell:is([data-game-phase="answering"], [data-game-phase="grace"]):not(.is-closest-input-focused) .closest-question h2 {
    font-size: clamp(1.2rem, 5.6vw, 1.5rem);
    line-height: 1.12;
  }
  .closest-shell:is([data-game-phase="answering"], [data-game-phase="grace"]) .closest-answer-form {
    grid-template-columns: minmax(0, 1fr);
    gap: .55rem;
  }
  .closest-shell:is([data-game-phase="answering"], [data-game-phase="grace"]):not(.is-closest-input-focused) .closest-answer-form label {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
    white-space: normal;
  }
  .closest-shell:is([data-game-phase="answering"], [data-game-phase="grace"]) .closest-answer-form input {
    min-height: 54px;
    padding: .65rem .8rem;
    font-size: 1.15rem;
  }
  .closest-shell:is([data-game-phase="answering"], [data-game-phase="grace"]) .closest-answer-form .button {
    width: 100%;
    max-width: none;
    min-height: var(--control-height-large);
    border-color: var(--cyan);
    border-radius: 10px;
    padding: .65rem .9rem;
    background: var(--cyan);
    box-shadow: 0 .65rem 1.6rem rgba(101, 230, 244, .14);
    white-space: nowrap;
  }
}

.closest-shell .closest-answer-form .button.is-saved {
  border-color: var(--brand-accent);
  background: var(--brand-accent);
  box-shadow: 0 .65rem 1.6rem rgba(var(--brand-accent-rgb), .14);
  color: var(--ink);
  opacity: 1;
}

.topics-shell[data-game-phase] .topics-player-game {
  display: grid;
  width: min(100%, 820px);
  height: 100%;
  min-height: 0;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: clamp(.3rem, 1dvh, .6rem);
  padding: clamp(.5rem, 1.5dvh, .9rem) 1rem max(.45rem, env(safe-area-inset-bottom));
  overflow: hidden;
}
.topics-shell[data-game-phase] .game-title-row { align-items: center; }
.topics-shell[data-game-phase] .game-title-row .eyebrow { margin: 0 0 .15rem; font-size: .56rem; }
.topics-shell[data-game-phase] .game-title-row h1 { font-size: clamp(1.5rem, min(7vw, 5dvh), 2.7rem); line-height: 1; }
.topics-shell[data-game-phase] .topics-player-score { font-size: clamp(1.7rem, min(10vw, 6dvh), 3.2rem); line-height: .9; }
.topics-shell[data-game-phase] .game-status { min-height: 0; max-height: 2.7em; margin: 0; overflow-y: auto; font-size: .72rem; line-height: 1.25; }
.topics-shell[data-game-phase] #topics-player-content { min-width: 0; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
.topics-shell:is([data-game-phase="revealing"], [data-game-phase="buzzing"], [data-game-phase="judging"], [data-game-phase="question_finished"]) #topics-player-content {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: .5rem;
  overflow: hidden;
}
.topics-shell[data-game-phase] .topics-player-question { min-width: 0; min-height: 0; gap: .55rem; margin: 0; overflow-y: auto; overscroll-behavior: contain; }
.topics-shell[data-game-phase] .topics-player-question h2 { min-height: 0; overflow-wrap: anywhere; font-size: clamp(1rem, min(5vw, 3.4dvh), 1.65rem); }
.topics-shell[data-game-phase] .topics-question-media { width: 100%; max-height: min(27dvh, 240px); }
.topics-shell[data-game-phase] .topics-options { gap: .35rem; }
.topics-shell[data-game-phase] .topics-option { min-height: var(--control-height); padding: .4rem .55rem; overflow-wrap: anywhere; font-size: clamp(.78rem, 2.6vw, 1rem); }
.topics-shell[data-game-phase] .topics-buzz-button {
  width: min(32dvh, 52vw, 230px);
  min-width: 96px;
  margin: 0 auto max(.35rem, env(safe-area-inset-bottom));
  border-width: clamp(4px, 1dvh, 7px);
  box-shadow: 0 clamp(6px, 1.5dvh, 11px) 0 color-mix(in srgb, var(--brand-accent) 45%, var(--ink)), 0 16px 34px rgba(0, 0, 0, .42);
  font-size: clamp(1rem, min(6vw, 3.5dvh), 1.8rem);
}
.topics-shell[data-game-phase] .topics-player-final-form { margin-top: .65rem; }

.arithmetic-sprint-shell[data-game-phase="playing"] .arithmetic-sprint-game {
  display: grid;
  width: min(100%, 1100px);
  height: 100%;
  min-height: 0;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: .4rem;
  padding: clamp(.45rem, 1.5dvh, .85rem) 1rem max(.4rem, env(safe-area-inset-bottom));
  overflow: hidden;
}
.arithmetic-sprint-shell[data-game-phase="playing"] .sprint-title-row { min-width: 0; align-items: center; }
.arithmetic-sprint-shell[data-game-phase="playing"] .sprint-title-row .eyebrow { margin: 0 0 .15rem; font-size: .56rem; }
.arithmetic-sprint-shell[data-game-phase="playing"] .sprint-title-row h1 { font-size: clamp(1.35rem, min(5vw, 4.4dvh), 2.6rem); }
.arithmetic-sprint-shell[data-game-phase="playing"] .sprint-game-meta > div { padding: .4rem .55rem; }
.arithmetic-sprint-shell[data-game-phase="playing"] .sprint-game-meta strong { font-size: clamp(1.25rem, min(4vw, 4dvh), 2rem); }
.arithmetic-sprint-shell[data-game-phase="playing"] .game-status { min-height: 0; margin: 0; font-size: .72rem; line-height: 1.25; }
.arithmetic-sprint-shell[data-game-phase="playing"] .sprint-play { min-width: 0; min-height: 0; align-content: center; margin: 0; overflow-y: auto; overscroll-behavior: contain; }
.arithmetic-sprint-shell[data-game-phase="playing"] .sprint-expression { margin: .25rem 0 .65rem; font-size: clamp(3rem, min(15vw, 12dvh), 6.5rem); }
.arithmetic-sprint-shell[data-game-phase="playing"] .sprint-keypad { margin-top: .55rem; }
.arithmetic-sprint-shell[data-game-phase="playing"] .sprint-keypad button { min-height: var(--control-height); }

.slots-shell.is-slots-playing .slots-game {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: .35rem;
  padding: clamp(.45rem, 1.4dvh, .8rem) 1rem max(.4rem, env(safe-area-inset-bottom));
  overflow: hidden;
}
.slots-shell.is-slots-playing .slots-title-row { align-items: center; }
.slots-shell.is-slots-playing .slots-title-row .eyebrow { margin: 0 0 .15rem; font-size: .56rem; }
.slots-shell.is-slots-playing .slots-title-row h1 { font-size: clamp(1.8rem, min(9vw, 6dvh), 3.5rem); }
.slots-shell.is-slots-playing .slots-scoreboard > div { padding: .35rem .5rem; }
.slots-shell.is-slots-playing .slots-game > .game-status { min-height: 2.7em; max-height: 2.7em; margin: 0; overflow-y: auto; font-size: .7rem; line-height: 1.25; }
.slots-shell.is-slots-playing .slots-machine { width: min(100%, 560px, 58dvh); align-self: center; margin: 0 auto; }
.slots-shell.is-slots-playing :is(.slots-history, .game-summary, .slots-rules) { display: none; }
.slots-shell.is-slots-playing .slots-line-callouts { height: 3.5rem; padding-top: .25rem; }

/* Keep the focused input composition below the shared active-screen rules so the
   visual viewport wins when a mobile keyboard is open. */
@media (max-width: 699px), (pointer: coarse) and (max-height: 699px) {
  html.is-closest-input-focused:has(> body.closest-shell.is-closest-input-focused) { width: 100%; height: var(--closest-viewport-height, 100dvh); min-height: 0; overflow: hidden; overscroll-behavior: none; }
  html.is-closest-input-focused body.closest-shell.is-closest-input-focused { position: fixed; inset: 0 0 auto; width: 100%; height: var(--closest-viewport-height, 100dvh); max-height: var(--closest-viewport-height, 100dvh); overscroll-behavior: none; }
  .closest-shell.is-closest-input-focused { height: var(--closest-viewport-height, 100dvh); min-height: 0; overflow: hidden; }
  .closest-shell.is-closest-input-focused .closest-page { display: grid; height: 100%; min-height: 0; grid-template-rows: minmax(0, 1fr); padding-bottom: 0; overflow: hidden; }
  .closest-shell.is-closest-input-focused .game-header { display: none; }
  .closest-shell.is-closest-input-focused .closest-game { display: grid; min-height: 0; grid-template-rows: auto auto minmax(0, 1fr); gap: .35rem; padding: .45rem .75rem max(.4rem, env(safe-area-inset-bottom)); overflow: hidden; }
  .closest-shell.is-closest-input-focused .quote-title-row { align-items: center; justify-content: flex-end; }
  .closest-shell.is-closest-input-focused .quote-title-row > div:first-child { display: none; }
  .closest-shell.is-closest-input-focused .quote-game-meta { display: flex; align-items: baseline; gap: .65rem; }
  .closest-shell.is-closest-input-focused .game-timer { font-size: 1.55rem; }
  .closest-shell.is-closest-input-focused .word-progress { font-size: .8rem; }
  .closest-shell.is-closest-input-focused .game-status { min-height: 0; margin: 0; overflow: hidden; font-size: .68rem; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
  .closest-shell.is-closest-input-focused .closest-round-stage { display: grid; min-width: 0; min-height: 0; grid-template-rows: minmax(0, 1fr); overflow: hidden; }
  .closest-shell.is-closest-input-focused .closest-question { display: flex; min-height: 0; height: 100%; flex-direction: column; border-top-width: 3px; padding-top: .45rem; overflow: hidden; }
  .closest-shell.is-closest-input-focused .quote-question-number { font-size: .6rem; }
  .closest-shell.is-closest-input-focused .closest-question-stage { min-height: 0; flex: 1 1 auto; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
  .closest-shell.is-closest-input-focused .closest-question h2 { min-height: 0; max-height: none; flex: 0 0 auto; margin: .25rem 0 .45rem; overflow: visible; font-size: clamp(1rem, 4.5vw, 1.25rem); line-height: 1.1; }
  .closest-shell.is-closest-input-focused .game-question-media { min-height: 0; height: clamp(36px, 16dvh, 72px); flex: 0 1 auto; margin: 0 0 .4rem; }
  .closest-shell.is-closest-input-focused .closest-answer-form { flex: 0 0 auto; gap: .35rem; margin-top: .35rem; }
  .closest-shell.is-closest-input-focused .closest-answer-form label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .closest-shell.is-closest-input-focused .closest-answer-form input { min-height: 50px; padding: .45rem .75rem; font-size: 1.15rem; }
  .closest-shell.is-closest-input-focused .closest-answer-form .button-large { min-height: 46px; padding: .55rem .8rem; }
}

@media (max-width: 700px), (pointer: coarse) and (max-height: 700px) {
  html.is-sprint-input-focused:has(> body.arithmetic-sprint-shell.is-sprint-input-focused) { width: 100%; height: var(--sprint-visible-height, 100dvh); min-height: 0; overflow: hidden; overscroll-behavior: none; }
  body.arithmetic-sprint-shell.is-sprint-input-focused { position: fixed; top: var(--sprint-visible-top, 0px); right: 0; left: 0; height: var(--sprint-visible-height, 100dvh); min-height: 0; overflow: hidden; overscroll-behavior: none; }
  .arithmetic-sprint-shell.is-sprint-input-focused .arithmetic-sprint-page { display: grid; height: 100%; min-height: 0; grid-template-rows: minmax(0, 1fr); overflow: hidden; }
  .arithmetic-sprint-shell.is-sprint-input-focused .game-header { display: none; }
  .arithmetic-sprint-shell.is-sprint-input-focused .arithmetic-sprint-game { display: grid; width: 100%; height: 100%; min-height: 0; grid-template-rows: auto auto minmax(0, 1fr); gap: .25rem; padding: .45rem .75rem max(.4rem, env(safe-area-inset-bottom)); overflow: hidden; }
  .arithmetic-sprint-shell.is-sprint-input-focused .sprint-title-row { display: block; }
  .arithmetic-sprint-shell.is-sprint-input-focused .sprint-title-row > div:first-child { display: none; }
  .arithmetic-sprint-shell.is-sprint-input-focused .sprint-game-meta { width: 100%; gap: .35rem; }
  .arithmetic-sprint-shell.is-sprint-input-focused .sprint-game-meta > div { min-height: 46px; padding: .35rem .5rem; }
  .arithmetic-sprint-shell.is-sprint-input-focused .sprint-game-meta span { font-size: .56rem; }
  .arithmetic-sprint-shell.is-sprint-input-focused .sprint-game-meta strong { font-size: 1.35rem; }
  .arithmetic-sprint-shell.is-sprint-input-focused .game-status { min-height: 0; margin: 0; overflow: hidden; font-size: .68rem; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
  .arithmetic-sprint-shell.is-sprint-input-focused .sprint-play { min-height: 0; align-content: center; margin: 0; padding-bottom: .15rem; overflow-y: auto; overscroll-behavior: contain; }
  .arithmetic-sprint-shell.is-sprint-input-focused .sprint-problem-number { font-size: .58rem; }
  .arithmetic-sprint-shell.is-sprint-input-focused .sprint-expression { margin: .15rem 0 .45rem; font-size: clamp(2.65rem, 15vw, 4.2rem); line-height: .88; }
  .arithmetic-sprint-shell.is-sprint-input-focused .sprint-answer-form { width: min(100%, 420px); grid-template-columns: minmax(0, 1fr) auto; gap: .4rem; }
  .arithmetic-sprint-shell.is-sprint-input-focused .sprint-answer-form input { min-height: 50px; padding: .4rem .6rem; font-size: 1.25rem; }
  .arithmetic-sprint-shell.is-sprint-input-focused .sprint-answer-form .button { min-height: 50px; padding: .45rem .75rem; }
  .arithmetic-sprint-shell.is-sprint-input-focused .sprint-keypad { display: none; }
  .arithmetic-sprint-shell.is-sprint-input-focused .sprint-feedback { min-height: 1.2rem; margin: .25rem 0 0; font-size: .78rem; }
}

@media (max-width: 699px), (pointer: coarse) and (max-height: 699px) {
  html.is-topics-input-focused:has(> body.topics-shell.is-topics-input-focused) { width: 100%; height: var(--topics-visible-height, 100dvh); min-height: 0; overflow: hidden; overscroll-behavior: none; }
  body.topics-shell.is-topics-input-focused { position: fixed; top: var(--topics-visible-top, 0px); right: 0; left: 0; height: var(--topics-visible-height, 100dvh); min-height: 0; overflow: hidden; overscroll-behavior: none; }
  .topics-shell.is-topics-input-focused .topics-player-page { display: grid; height: 100%; min-height: 0; grid-template-rows: minmax(0, 1fr); overflow: hidden; }
  .topics-shell.is-topics-input-focused .game-header,
  .topics-shell.is-topics-input-focused .game-title-row { display: none; }
  .topics-shell.is-topics-input-focused .topics-player-game { display: grid; width: min(100%, 820px); height: 100%; min-height: 0; grid-template-rows: auto minmax(0, 1fr); gap: .35rem; padding: .4rem .75rem max(.4rem, env(safe-area-inset-bottom)); overflow: hidden; }
  .topics-shell.is-topics-input-focused #topics-player-content { min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
  .topics-shell.is-topics-input-focused .topics-player-question { max-height: 38%; overflow-y: auto; }
  .topics-shell.is-topics-input-focused .topics-player-final-form { gap: .45rem; margin-top: .35rem; }
  .topics-shell.is-topics-input-focused .topics-player-final-form textarea { min-height: 72px; resize: none; }
  .topics-shell.is-topics-input-focused .topics-player-final-form .button { min-height: 48px; }
}

@media (min-width: 600px) {
  .quote-shell:is([data-game-phase="answering"], [data-game-phase="revealed"]) .quote-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .game-conductor-shell .admin-header div small { display: none; }
  .game-conductor-shell .admin-header nav { gap: .55rem; }
  .game-conductor-shell .admin-header nav a { font-size: .64rem; }
  .game-conductor-heading { align-items: center; }
  .game-conductor-heading .eyebrow { font-size: .58rem; }
  .game-conductor-stage .quote-live-votes,
  .game-conductor-stage .closest-live-answers { grid-template-columns: minmax(0, 1fr); }
  .game-conductor-completion .round-completion { grid-template-columns: minmax(0, 1fr) auto; }
  .game-conductor-completion .round-completion p { display: none; }
  .topics-shell[data-game-phase] .topics-player-options.topics-options-2,
  .topics-shell[data-game-phase] .topics-player-options.topics-options-3,
  .topics-shell[data-game-phase] .topics-player-options.topics-options-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 480px) {
  .game-conductor-shell .admin-header { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: center; }
  .game-conductor-shell .admin-header nav { width: auto; justify-content: flex-end; }
  .game-conductor-shell .admin-header nav a { min-width: min-content; min-height: var(--control-height); text-align: center; overflow-wrap: normal; }
  .game-conductor-page { padding: .3rem; }
  .game-conductor-section { padding: .45rem; }
  .game-conductor-heading h1,
  .quote-live-section .game-conductor-heading h1 { font-size: 1.25rem; }
  .game-conductor-stage > blockquote { font-size: clamp(1.05rem, 5vw, 1.35rem); }
  .game-conductor-completion .round-completion h2 { display: none; }
  .closest-shell:is([data-game-phase="answering"], [data-game-phase="grace"]) .closest-answer-form .button { max-width: none; white-space: nowrap; }
  .slots-shell.is-slots-playing .slots-game { padding: .45rem .75rem calc(4.75rem + env(safe-area-inset-bottom)); }
  .slots-shell.is-slots-playing .slots-line-callouts:not(:empty) { bottom: calc(4.85rem + env(safe-area-inset-bottom)); }
}

@media (max-height: 620px) {
  .game-header { padding-block: max(.4rem, env(safe-area-inset-top)) .4rem; }
  .game-conductor-shell .admin-header { padding-block: max(.35rem, env(safe-area-inset-top)) .35rem; }
  .game-conductor-page { padding: .3rem; }
  .game-conductor-section { gap: .3rem; padding: .4rem; }
  .game-conductor-stage .admin-live-question-media { max-height: 24dvh; }
  .game-conductor-completion .round-completion p,
  .game-conductor-completion .round-completion h2 { display: none; }
  .quote-question.has-media .quote-question-stage { grid-template-columns: minmax(0, 1.35fr) minmax(80px, .65fr); }
  .topics-shell[data-game-phase] .topics-question-media { max-height: 20dvh; }
  .topics-shell[data-game-phase] .topics-buzz-button { width: min(24dvh, 42vw, 150px); }
  .slots-shell.is-slots-playing .slots-machine { width: min(100%, 480px, 50dvh); }
}

@media (max-height: 620px) and (orientation: landscape) {
  .slots-shell.is-slots-playing .slots-page { grid-template-rows: minmax(0, 1fr); }
  .slots-shell.is-slots-playing .game-header { display: none; }
  .slots-shell.is-slots-playing .slots-game {
    grid-template-columns: minmax(210px, .72fr) minmax(0, 1.28fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    column-gap: .65rem;
    padding: .4rem .65rem;
  }
  .slots-shell.is-slots-playing .slots-title-row {
    display: grid;
    grid-column: 1;
    grid-row: 1;
    grid-template-columns: minmax(0, 1fr);
    gap: .35rem;
  }
  .slots-shell.is-slots-playing .slots-scoreboard { width: 100%; }
  .slots-shell.is-slots-playing .slots-scoreboard > div { min-width: 0; flex: 1 1 0; text-align: left; }
  .slots-shell.is-slots-playing .slots-game > .game-status { grid-column: 1; grid-row: 2; }
  .slots-shell.is-slots-playing .slots-machine {
    display: grid;
    width: min(100%, 500px);
    height: 100%;
    min-height: 0;
    grid-column: 2;
    grid-row: 1 / 4;
    grid-template-rows: auto minmax(0, 1fr) auto;
    border-width: 3px;
    border-radius: 30px 30px 10px 10px;
    padding: .35rem;
  }
  .slots-shell.is-slots-playing .slots-machine-marquee {
    min-height: 34px;
    margin: 0 .35rem .15rem;
    border-width: 2px;
    border-radius: 20px 20px 7px 7px;
    padding: .1rem .45rem;
  }
  .slots-shell.is-slots-playing .slots-machine-marquee strong { font-size: 1rem; }
  .slots-shell.is-slots-playing .slots-machine-marquee span { font-size: .7rem; }
  .slots-shell.is-slots-playing .slots-machine-bulbs,
  .slots-shell.is-slots-playing .slots-cabinet-details { display: none; }
  .slots-shell.is-slots-playing .slots-screen-bezel { min-height: 0; border-width: 3px; padding: .25rem; }
  .slots-shell.is-slots-playing .slots-grid-wrap,
  .slots-shell.is-slots-playing .slots-grid { height: 100%; min-height: 0; }
  .slots-shell.is-slots-playing .slots-grid { aspect-ratio: auto; border-width: 3px; padding: .2rem; }
  .slots-shell.is-slots-playing .slot-cell { font-size: clamp(1.25rem, 6dvh, 2rem); }
  .slots-shell.is-slots-playing .slots-control-panel { margin-top: .25rem; padding: .15rem .45rem .25rem; }
  .slots-shell.is-slots-playing .slots-win { min-height: 1rem; padding: .15rem 0 0; font-size: .52rem; }
  .slots-shell.is-slots-playing .slots-spin-button { min-height: 48px; margin: .2rem auto; }
  .slots-shell.is-slots-playing .slots-line-callouts {
    width: 100%;
    height: 3.2rem;
    grid-column: 1;
    grid-row: 3;
  }
}

/* Public help, account controls and the ready-to-play example. */
.info-page { width: min(100% - 2.5rem, 760px); margin: 3rem auto 5rem; }
.info-heading { margin-bottom: 2.5rem; }
.info-heading h1 { margin: .5rem 0 1rem; font-size: clamp(2.4rem, 7vw, 4.5rem); line-height: 1; }
.info-lead { max-width: 44rem; color: var(--muted); font-size: 1.1rem; line-height: 1.65; }
.info-sections { display: grid; gap: 2rem; }
.info-section { min-width: 0; line-height: 1.65; overflow-wrap: anywhere; }
.info-section h2 { margin: 0 0 .75rem; font-size: 1.45rem; line-height: 1.25; }
.info-section p { margin: .6rem 0; }
.info-section li + li { margin-top: .5rem; }
.info-section a:not(.button) { text-underline-offset: .2em; }
.account-details { display: grid; gap: .5rem; }
.account-details dt { color: var(--muted); }
.account-details dd { margin: 0 0 .75rem; overflow-wrap: anywhere; }
.account-delete-form { display: grid; gap: 1rem; border: 1px solid var(--orange); }
.account-delete-form .button { justify-self: start; white-space: normal; }
.site-footer { flex-wrap: wrap; }
.site-footer-links { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; }
.site-footer-links a { color: var(--muted); text-underline-offset: .2em; }
.dashboard-demo { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; margin: 0 0 1.5rem; border: 1px solid var(--line); }
.dashboard-demo h2 { margin: 0 0 .5rem; font-size: 1.3rem; }
.dashboard-demo p { max-width: 42rem; margin: 0; color: var(--muted); line-height: 1.55; }
.dashboard-demo form { flex-shrink: 0; }
@media (max-width: 650px) {
  .info-page { width: calc(100% - 2rem); margin-top: 2rem; }
  .dashboard-demo { align-items: stretch; flex-direction: column; }
  .dashboard-demo .button { width: 100%; }
  .site-footer-links { width: 100%; }
}
