:root {
  --ink: #101028;
  --ink-soft: #202044;
  --paper: #f7f5ef;
  --white: #ffffff;
  --lime: #d8ff3e;
  --coral: #ff6b55;
  --cyan: #4edee8;
  --purple: #7667ff;
  --muted: #68687d;
  --line: rgba(16, 16, 40, 0.14);
  --shadow: 0 24px 80px rgba(5, 5, 28, 0.22);
}

.game-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 99px; background: #eae9e3; }
.game-tabs a { text-decoration: none; color: var(--ink); padding: 8px 18px; border-radius: 99px; font-size: 13px; font-weight: 800; }
.game-tabs a[aria-current="page"] { background: var(--ink); color: white; }
.game-tabs a:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }
@media (max-width: 380px) { .game-tabs a { padding: 8px 12px; } }

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--ink); }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  overflow-x: hidden;
}

body.round-active {
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
}

button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:not(:disabled), select { cursor: pointer; }
[hidden] { display: none !important; }

.screen { min-height: 100svh; position: relative; }
.container { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }

.ambient { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.shape { position: absolute; opacity: .65; }
.shape-one { width: 94px; height: 22px; background: var(--lime); right: -20px; top: 18%; transform: rotate(-35deg); }
.shape-two { width: 42px; height: 42px; border: 10px solid var(--coral); border-radius: 50%; left: 3%; top: 68%; }
.shape-three { width: 54px; height: 54px; border: 2px solid rgba(118,103,255,.35); transform: rotate(24deg); right: 9%; bottom: 3%; }

.topbar, .round-topbar {
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}

.brand { color: var(--ink); text-decoration: none; font-weight: 950; font-size: 1.35rem; letter-spacing: -.06em; position: relative; display: inline-flex; }
.brand span { position: relative; z-index: 1; transform: rotate(-2deg); }
.brand i { position: absolute; height: 8px; left: -3px; right: -4px; bottom: 0; background: var(--lime); transform: rotate(-3deg); }
.icon-button, .close-button {
  width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 50%; background: rgba(255,255,255,.58); font-weight: 850; font-size: 1.15rem;
  transition: transform .2s ease, background .2s ease;
}
.icon-button:hover, .close-button:hover { transform: rotate(5deg); background: var(--white); }

.setup-layout { display: grid; grid-template-columns: .78fr 1.22fr; gap: clamp(42px, 7vw, 96px); align-items: start; padding: 48px 0 88px; position: relative; z-index: 1; }
.intro-block { position: sticky; top: 130px; padding-top: 25px; }
.eyebrow, .step-label { text-transform: uppercase; letter-spacing: .16em; font-size: .75rem; font-weight: 850; }
.eyebrow { display: flex; align-items: center; gap: 10px; }
.eyebrow span { width: 28px; height: 4px; background: var(--coral); display: inline-block; }
.intro-block h1 { margin: 18px 0 22px; font-size: clamp(3.1rem, 6vw, 5.7rem); line-height: .91; letter-spacing: -.07em; font-weight: 950; }
.intro-block h1 em { color: var(--purple); font-style: normal; }
.intro-block > p { color: var(--muted); max-width: 460px; font-size: 1.12rem; }
.quick-rules { display: grid; gap: 12px; margin-top: 42px; max-width: 430px; }
.quick-rules div { display: flex; align-items: center; gap: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.quick-rules b { color: var(--coral); font-size: .78rem; }
.quick-rules span { font-weight: 720; }

.setup-panel { background: var(--white); border: 1px solid var(--line); border-radius: 30px 30px 30px 8px; padding: clamp(22px, 4vw, 38px); box-shadow: var(--shadow); }
.panel-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.panel-heading h2, .modal h2 { margin: 2px 0 0; font-size: 1.65rem; letter-spacing: -.045em; }
.step-label { color: var(--purple); }
.text-button { border: 0; background: transparent; color: var(--purple); font-weight: 780; padding: 10px 0; }
.text-button:hover { text-decoration: underline; text-underline-offset: 4px; }
.deck-hint { color: var(--muted); font-size: .84rem; margin: -10px 0 18px; }

.deck-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.deck-card { min-height: 104px; padding: 16px; border: 2px solid transparent; background: #f3f2ef; border-radius: 18px; text-align: left; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; transition: transform .18s ease, border-color .18s ease, background .18s ease; position: relative; cursor: pointer; }
.deck-card:hover { transform: translateY(-2px); background: #faf9f6; }
.deck-card[aria-checked="true"] { border-color: var(--ink); background: var(--white); box-shadow: 4px 4px 0 var(--ink); transform: translate(-2px, -2px); }
.deck-icon { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font-size: 1.32rem; font-weight: 900; }
.deck-copy { min-width: 0; }
.deck-copy b { display: block; font-size: .96rem; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deck-copy small { color: var(--muted); font-size: .76rem; }
.deck-check { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #bbb9c1; position: relative; }
.deck-card[aria-checked="true"] .deck-check { background: var(--ink); border-color: var(--ink); }
.deck-card[aria-checked="true"] .deck-check::after { content: ""; position: absolute; width: 6px; height: 3px; border-left: 2px solid white; border-bottom: 2px solid white; transform: rotate(-45deg); left: 5px; top: 5px; }
.deck-delete { position: absolute; top: 4px; right: 4px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); display: none; z-index: 2; }
.deck-card:hover .deck-delete, .deck-delete:focus-visible { display: block; }
.deck-delete:hover { background: #eeecef; color: #c53232; }

.setup-divider { height: 1px; background: var(--line); margin: 30px 0; }
.players-heading { align-items: center; }
.count-badge, .round-chip { color: var(--muted); background: #efedf6; padding: 6px 11px; border-radius: 99px; font-size: .78rem; font-weight: 760; }
.players-list { display: grid; gap: 10px; }
.player-row { display: grid; grid-template-columns: 38px 1fr 42px; gap: 10px; align-items: center; }
.player-index { width: 38px; height: 38px; border-radius: 11px; background: var(--ink); color: white; display: grid; place-items: center; font-size: .78rem; font-weight: 820; }
.player-input { width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; background: #fbfaf8; color: var(--ink); font-weight: 650; outline: none; }
.player-input:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(118,103,255,.14); }
.remove-player { width: 42px; height: 42px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 1.4rem; }
.remove-player:hover:not(:disabled) { background: #fff0ee; color: #bb3426; }
.remove-player:disabled { opacity: .2; cursor: not-allowed; }
.add-player-button { width: 100%; min-height: 48px; margin-top: 10px; border: 1px dashed #aaa8b1; color: var(--purple); background: transparent; border-radius: 12px; font-weight: 760; }
.add-player-button:hover { border-style: solid; background: #f7f6ff; }

.game-options { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.option-field { display: grid; gap: 7px; }
.option-field > span, .modal label { font-size: .84rem; font-weight: 780; }
.option-field select { min-height: 50px; width: 100%; background: #f5f4f1; border: 1px solid var(--line); border-radius: 12px; padding: 0 40px 0 14px; color: var(--ink); font-weight: 680; }
.primary-button, .secondary-button { min-height: 56px; border-radius: 14px; padding: 0 22px; font-weight: 850; border: 2px solid var(--ink); display: flex; align-items: center; justify-content: center; gap: 14px; transition: transform .16s ease, box-shadow .16s ease; }
.primary-button { color: var(--ink); background: var(--lime); box-shadow: 4px 4px 0 var(--ink); }
.primary-button:hover { transform: translate(-2px,-2px); box-shadow: 7px 7px 0 var(--ink); }
.primary-button:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 var(--ink); }
.primary-button:disabled { opacity: .62; cursor: wait; transform: none; box-shadow: 2px 2px 0 var(--ink); }
.secondary-button { background: var(--white); }
.secondary-button:hover { background: #f1f0ed; }
.start-button { width: 100%; margin-top: 26px; font-size: 1.05rem; justify-content: space-between; padding-inline: 26px; }
.form-error { color: #b42822; background: #fff0ee; border-radius: 10px; padding: 10px 12px; margin: 14px 0 0; font-size: .84rem; font-weight: 650; }

.centered-screen { color: var(--white); background: var(--ink); overflow: hidden; }
.centered-screen::before { content: ""; position: absolute; width: 420px; height: 420px; border: 80px solid rgba(118,103,255,.14); border-radius: 50%; left: -220px; top: 20%; }
.compact-topbar { height: 82px; color: var(--white); }
.small-brand { color: var(--white); position: absolute; left: 50%; transform: translateX(-50%); }
.round-chip { color: var(--white); background: rgba(255,255,255,.1); }
.back-button { min-height: 44px; border: 0; background: transparent; color: rgba(255,255,255,.75); font-weight: 720; }
.back-button:hover { color: var(--white); }
.stage-card { width: min(640px, calc(100% - 40px)); margin: clamp(50px, 9vh, 100px) auto 80px; text-align: center; position: relative; z-index: 1; }
.player-orbit { width: 130px; height: 130px; margin: 0 auto 30px; position: relative; display: grid; place-items: center; }
.orbit-ring { position: absolute; inset: 0; border: 2px dashed rgba(216,255,62,.55); border-radius: 50%; animation: spin 14s linear infinite; }
.player-initial { width: 94px; height: 94px; border-radius: 31px 31px 31px 9px; background: var(--purple); display: grid; place-items: center; font-size: 2.6rem; font-weight: 950; transform: rotate(-3deg); }
.stage-kicker { text-transform: uppercase; letter-spacing: .2em; color: var(--lime); font-size: .76rem; font-weight: 850; margin: 0 0 10px; }
.stage-card h2, .summary-hero h2, .results-card h2 { font-size: clamp(2.5rem, 6vw, 4.8rem); letter-spacing: -.065em; line-height: .96; margin: 0; }
.stage-copy { color: rgba(255,255,255,.68); font-size: 1.05rem; max-width: 520px; margin: 22px auto; }
.selected-deck-line { display: flex; align-items: center; justify-content: center; gap: 9px; font-size: .84rem; font-weight: 760; margin: 28px 0; }
.selected-deck-line > span:first-child, .deck-label span:first-child { width: 10px; height: 10px; border-radius: 50%; background: var(--coral); }
.handoff-motion-hint { width: fit-content; min-height: 58px; margin: -8px auto 24px; padding: 8px 16px 8px 10px; border: 1px solid rgba(255,255,255,.15); border-radius: 15px; display: flex; align-items: center; gap: 11px; text-align: left; }
.handoff-motion-hint > span:first-child { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: rgba(216,255,62,.14); color: var(--lime); font-size: 1.35rem; font-weight: 900; }
.handoff-motion-hint > span:last-child { display: grid; }
.handoff-motion-hint b { font-size: .82rem; }
.handoff-motion-hint small { color: rgba(255,255,255,.6); font-size: .72rem; }
.handoff-sensor-error { width: min(520px, 100%); margin: 0 auto 18px; padding: 11px 14px; border: 1px solid rgba(255,107,85,.45); border-radius: 12px; background: rgba(255,107,85,.12); color: #ffd7d1; font-size: .86rem; font-weight: 700; }
.ios-fullscreen-hint { width: min(520px, 100%); margin: 0 auto 18px; padding: 11px 14px; border: 1px solid rgba(78,222,232,.35); border-radius: 12px; background: rgba(78,222,232,.1); color: rgba(255,255,255,.78); font-size: .78rem; }
.ios-fullscreen-hint b { color: var(--cyan); }
.giant-button { width: min(370px, 100%); margin: 28px auto 0; min-height: 68px; font-size: 1.1rem; }

.game-screen { background: var(--purple); color: var(--white); overflow: hidden; }
.game-screen::before, .game-screen::after { content: ""; position: absolute; border: 3px solid rgba(255,255,255,.11); width: 210px; height: 210px; transform: rotate(22deg); }
.game-screen::before { left: -130px; top: 28%; }
.game-screen::after { right: -130px; bottom: 5%; border-radius: 50%; }
.game-hud { height: 112px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; position: relative; z-index: 2; }
.hud-player { display: flex; align-items: center; gap: 12px; }
.mini-avatar { width: 44px; height: 44px; display: grid; place-items: center; background: var(--ink); border-radius: 14px 14px 14px 5px; font-weight: 900; }
.hud-player > span:last-child, .hud-score { display: grid; }
.hud-player small, .hud-score small { color: rgba(255,255,255,.65); font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; }
.hud-player b, .hud-score b { font-size: 1.02rem; }
.hud-score { text-align: right; }
.hud-score b { font-size: 1.8rem; line-height: 1; }
.timer { width: 86px; height: 86px; border-radius: 50%; background: conic-gradient(var(--lime) var(--progress, 100%), rgba(255,255,255,.18) 0); padding: 5px; box-shadow: 0 8px 32px rgba(9,8,38,.2); }
.timer > div { width: 100%; height: 100%; border-radius: 50%; background: var(--ink); display: grid; place-content: center; text-align: center; line-height: 1; }
.timer b { font-size: 1.65rem; }
.timer small { font-size: .64rem; color: rgba(255,255,255,.6); margin-top: 3px; }
.timer.urgent { animation: pulse .72s ease-in-out infinite alternate; }
.word-stage { position: relative; z-index: 1; text-align: center; padding: clamp(24px, 5vh, 56px) 0 50px; }
.deck-label { display: flex; gap: 8px; justify-content: center; align-items: center; font-size: .76rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 7px; }
.motion-status { width: fit-content; min-height: 34px; margin: 0 auto 12px; padding: 4px 11px; border: 1px solid transparent; border-radius: 999px; background: transparent; display: flex; align-items: center; justify-content: center; gap: 8px; color: rgba(255,255,255,.78); font: inherit; font-size: .73rem; cursor: pointer; touch-action: manipulation; }
.motion-status:hover, .motion-status:focus-visible { border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.07); }
.motion-status:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
.motion-status > span { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.46); box-shadow: 0 0 0 4px rgba(255,255,255,.08); }
.motion-status.is-active > span { background: var(--lime); box-shadow: 0 0 0 4px rgba(216,255,62,.14); }
.motion-status.is-waiting > span { background: #ffbc42; }
.motion-status.is-fallback > span { background: rgba(255,255,255,.46); }
.motion-status b { font-weight: 760; }
.word-card { width: min(820px, 100%); min-height: clamp(280px, 46vh, 440px); margin-inline: auto; border-radius: 36px 36px 36px 12px; background: var(--white); color: var(--ink); box-shadow: 14px 16px 0 var(--ink); display: grid; place-content: center; position: relative; padding: 42px; transform: rotate(-.5deg); }
.word-card > p { text-transform: uppercase; letter-spacing: .2em; font-size: .72rem; color: var(--muted); font-weight: 820; margin: 0 0 18px; }
.word-card h1 { font-size: clamp(3.1rem, 9vw, 7.4rem); letter-spacing: -.065em; line-height: .92; margin: 0; overflow-wrap: anywhere; text-wrap: balance; }
.word-number { position: absolute; right: 26px; bottom: 22px; font-size: .72rem; font-weight: 850; color: #a09eaa; }
.corner { position: absolute; width: 18px; height: 18px; border-style: solid; border-color: var(--coral); }
.corner-a { left: 24px; top: 24px; border-width: 3px 0 0 3px; }
.corner-b { right: 24px; bottom: 24px; border-width: 0 3px 3px 0; }
.game-tip { color: rgba(255,255,255,.68); font-size: .78rem; margin: 18px 0 0; }
.countdown-overlay { position: fixed; inset: 0; background: var(--ink); z-index: 10; display: grid; place-content: center; place-items: center; gap: 22px; text-align: center; padding: 24px; }
.countdown-overlay span { font-size: min(40vw, 16rem); font-weight: 950; color: var(--lime); animation: countPop .75s ease both; }
.countdown-overlay p { margin: 0; color: rgba(255,255,255,.76); font-weight: 760; font-size: 1rem; }
.answer-feedback { position: fixed; inset: 0; z-index: 8; display: grid; place-content: center; place-items: center; gap: 16px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink); animation: feedbackIn .34s ease both; pointer-events: none; }
.answer-feedback.correct { background: rgba(216,255,62,.96); }
.answer-feedback.skipped { background: rgba(255,107,85,.96); }
.answer-feedback span { font-size: clamp(5rem, 22vw, 11rem); line-height: .8; font-weight: 950; }
.answer-feedback b { font-size: clamp(1.5rem, 5vw, 2.7rem); }

.summary-layout { display: grid; grid-template-columns: .9fr 1.1fr; gap: 60px; align-items: center; min-height: calc(100svh - 100px); padding: 40px 0 80px; position: relative; z-index: 1; }
.summary-hero { text-align: center; }
.score-burst { width: 180px; height: 180px; background: var(--lime); color: var(--ink); border-radius: 50% 50% 50% 18%; display: grid; place-content: center; margin: 0 auto 34px; transform: rotate(-5deg); box-shadow: 10px 12px 0 var(--coral); }
.score-burst span { font-size: 4.8rem; line-height: .8; font-weight: 950; }
.score-burst small { margin-top: 14px; font-weight: 800; }
.summary-hero p:last-child { color: rgba(255,255,255,.64); }
.summary-panel { background: var(--white); color: var(--ink); border-radius: 28px 28px 28px 9px; padding: 30px; box-shadow: var(--shadow); }
.summary-panel h3 { font-size: 1.3rem; margin: 0 0 18px; }
.round-answers { max-height: 330px; overflow-y: auto; display: grid; gap: 8px; margin-bottom: 24px; padding-right: 4px; }
.answer-row { display: flex; justify-content: space-between; align-items: center; min-height: 46px; border-radius: 11px; padding: 0 13px; background: #f5f4f1; gap: 14px; }
.answer-row b { font-size: .92rem; }
.answer-status { font-size: .72rem; font-weight: 820; text-transform: uppercase; letter-spacing: .08em; }
.answer-row.correct .answer-status { color: #38721e; }
.answer-row.skipped .answer-status { color: #a33e32; }
.empty-answers { color: var(--muted); text-align: center; padding: 30px 10px; }
.summary-panel .primary-button { width: 100%; }

.results-card { text-align: center; padding: clamp(100px, 15vh, 150px) 0 70px; position: relative; z-index: 1; }
.trophy-mark { width: 76px; height: 76px; background: var(--coral); display: grid; place-items: center; border-radius: 24px 24px 24px 7px; font-size: 2.2rem; margin: 0 auto 26px; transform: rotate(6deg); }
.winner-copy { color: rgba(255,255,255,.65); font-size: 1.08rem; margin: 18px 0 30px; }
.leaderboard { width: min(620px, 100%); margin: 0 auto; display: grid; gap: 10px; text-align: left; }
.leader-row { min-height: 72px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.08); border-radius: 16px; padding: 0 20px; display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 12px; }
.leader-row:first-child { background: var(--lime); color: var(--ink); transform: scale(1.025); border-color: var(--lime); }
.leader-place { font-weight: 950; font-size: 1.1rem; }
.leader-name { font-weight: 780; }
.leader-score { font-weight: 950; font-size: 1.2rem; }
.leader-score small { font-weight: 650; font-size: .7rem; opacity: .65; }
.results-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; width: min(620px, 100%); margin: 32px auto 0; }
.results-actions .secondary-button { border-color: rgba(255,255,255,.35); color: var(--white); background: transparent; }
.results-actions .secondary-button:hover { background: rgba(255,255,255,.08); }

.modal { width: min(560px, calc(100% - 28px)); border: 0; border-radius: 28px 28px 28px 8px; padding: 0; color: var(--ink); box-shadow: var(--shadow); }
.modal::backdrop { background: rgba(10,10,35,.72); backdrop-filter: blur(7px); }
.modal form { padding: clamp(24px, 5vw, 34px); display: grid; }
.modal-head { display: flex; justify-content: space-between; align-items: start; margin-bottom: 26px; }
.close-button { font-size: 1.65rem; line-height: 1; }
.modal label { display: flex; justify-content: space-between; gap: 12px; margin: 15px 0 7px; }
.modal label span { color: var(--muted); font-weight: 600; }
.modal input, .modal textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; background: #f7f6f3; padding: 13px 14px; outline: none; color: var(--ink); }
.modal input:focus, .modal textarea:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(118,103,255,.14); }
.modal textarea { resize: vertical; min-height: 190px; }
.field-hint { color: var(--muted); font-size: .77rem; margin: 8px 0 22px; }
.rules-list { list-style: none; padding: 0; margin: 0 0 26px; counter-reset: rule; display: grid; gap: 18px; }
.rules-list li { counter-increment: rule; display: grid; grid-template-columns: 42px 1fr; column-gap: 12px; }
.rules-list li::before { content: counter(rule); grid-row: span 2; width: 38px; height: 38px; border-radius: 11px; background: var(--lime); display: grid; place-items: center; font-weight: 900; }
.rules-list b { font-size: .95rem; }
.rules-list span { color: var(--muted); font-size: .84rem; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { to { transform: scale(1.08); } }
@keyframes countPop { 0% { transform: scale(.45) rotate(-10deg); opacity: 0; } 55% { transform: scale(1.1) rotate(3deg); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes feedbackIn { 0% { opacity: 0; transform: scale(1.08); } 35% { opacity: 1; transform: scale(1); } 82% { opacity: 1; } 100% { opacity: 0; } }

@media (max-width: 860px) {
  .setup-layout { grid-template-columns: 1fr; padding-top: 10px; }
  .intro-block { position: static; padding-top: 0; }
  .intro-block h1 { max-width: 650px; }
  .quick-rules { grid-template-columns: repeat(3, 1fr); max-width: none; }
  .quick-rules div { align-items: start; flex-direction: column; gap: 5px; }
  .summary-layout { grid-template-columns: 1fr; gap: 40px; padding-top: 50px; }
  .summary-hero h2 { font-size: 3.3rem; }
}

@media (max-width: 580px) {
  .container { width: min(100% - 24px, 1160px); }
  .topbar { height: 72px; }
  .setup-layout { gap: 30px; padding-bottom: 40px; }
  .intro-block h1 { font-size: clamp(2.8rem, 14vw, 4rem); margin-top: 14px; }
  .intro-block > p { font-size: 1rem; }
  .quick-rules { display: none; }
  .setup-panel { border-radius: 24px 24px 24px 7px; padding: 20px 16px; }
  .panel-heading { align-items: center; }
  .panel-heading h2 { font-size: 1.35rem; }
  .text-button { font-size: .8rem; }
  .deck-grid { grid-template-columns: 1fr; }
  .deck-card { min-height: 82px; }
  .setup-divider { margin: 24px 0; }
  .game-options { grid-template-columns: 1fr; }
  .compact-topbar { height: 70px; }
  .small-brand { display: none; }
  .back-button span { display: none; }
  .stage-card { margin-top: 50px; }
  .stage-card h2 { font-size: 3.2rem; }
  .game-hud { height: 90px; }
  .hud-player > span:last-child { display: none; }
  .timer { width: 72px; height: 72px; }
  .timer b { font-size: 1.35rem; }
  .word-stage { padding-top: 20px; }
  .word-card { min-height: 38vh; padding: 30px 18px; border-radius: 25px 25px 25px 8px; box-shadow: 8px 9px 0 var(--ink); }
  .word-card h1 { font-size: clamp(2.5rem, 13vw, 4.2rem); }
  .game-tip { font-size: .72rem; }
  .motion-status { font-size: .68rem; margin-bottom: 8px; }
  .summary-layout { width: min(100% - 24px, 1160px); padding-top: 28px; gap: 32px; }
  .score-burst { width: 130px; height: 130px; margin-bottom: 26px; }
  .score-burst span { font-size: 3.5rem; }
  .summary-hero h2 { font-size: 2.65rem; }
  .summary-panel { padding: 22px 16px; }
  .round-answers { max-height: 220px; }
  .results-card { padding-top: 80px; }
  .results-card h2 { font-size: 3rem; }
  .results-actions { grid-template-columns: 1fr; }
  .leader-row:first-child { transform: none; }
}

@media (orientation: landscape) and (max-height: 600px) {
  .game-screen { min-height: 100dvh; }
  .game-hud { height: 66px; }
  .mini-avatar { width: 36px; height: 36px; border-radius: 11px 11px 11px 4px; }
  .timer { width: 58px; height: 58px; padding: 4px; }
  .timer b { font-size: 1.2rem; }
  .hud-score b { font-size: 1.45rem; }
  .word-stage { padding: 2px 0 12px; }
  .deck-label { margin-bottom: 2px; font-size: .66rem; }
  .motion-status { min-height: 28px; margin-bottom: 5px; padding-block: 2px; font-size: .65rem; }
  .word-card { width: min(900px, calc(100% - 26px)); min-height: calc(100dvh - 142px); max-height: calc(100dvh - 142px); padding: 22px 34px; border-radius: 25px 25px 25px 8px; box-shadow: 8px 9px 0 var(--ink); }
  .word-card > p { margin-bottom: 8px; font-size: .62rem; }
  .word-card h1 { font-size: clamp(2.6rem, 10vw, 5.8rem); }
  .word-number { right: 20px; bottom: 14px; }
  .game-tip { display: none; }
  .countdown-overlay { gap: 8px; }
  .countdown-overlay span { font-size: min(27vw, 9rem); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }
