:root {
  --canvas: #f4f0e8;
  --surface: #fffaf2;
  --surface-strong: #fff;
  --ink: #1e293b;
  --ink-soft: #526071;
  --muted: #89939d;
  --line: #d9d2c6;
  --navy: #26364b;
  --accent: #f26b52;
  --sun: #f4c95d;
  --success: #3f9b78;
  --danger: #c94f4f;
  --radius-control: 12px;
  --radius-card: 20px;
  --shell: 980px;
  --shadow: 0 8px 24px rgba(30, 41, 59, .08);
  color-scheme: light;
  font-family: Inter, "Noto Sans JP", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-height: 100vh; margin: 0; overflow-x: hidden; background: var(--canvas); color: var(--ink); font-size: 15px; font-weight: 500; }
body::before { position: fixed; inset: 0; z-index: -1; content: ""; opacity: .42; pointer-events: none; background-image: radial-gradient(#d9d2c6 1px, transparent 1px); background-size: 18px 18px; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.topbar { position: sticky; top: 0; z-index: 20; height: 68px; padding: 0 max(20px, calc((100vw - var(--shell)) / 2)); display: flex; align-items: center; justify-content: space-between; gap: 16px; background: rgba(244, 240, 232, .9); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 850; letter-spacing: .08em; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px 11px 11px 4px; background: var(--accent); color: var(--ink); font-size: 13px; letter-spacing: -.08em; transform: rotate(-4deg); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.c-badge { padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-soft); background: rgba(255, 250, 242, .7); font-size: 10px; font-weight: 750; }
.sound-toggle { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--navy); font-size: 18px; line-height: 1; transition: transform .16s ease, background .16s ease, color .16s ease; }
.sound-toggle:hover { transform: translateY(-1px); background: var(--sun); }
.sound-toggle.is-muted { color: var(--muted); opacity: .72; }

.l-shell { width: min(calc(100% - 40px), var(--shell)); margin: 0 auto; }
.view { padding: 56px 0 88px; }
.hero { max-width: 670px; padding: 30px 0 42px; }
.eyebrow { margin: 0 0 12px; color: var(--accent); font-size: 11px; line-height: 1.3; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.hero h1, .turn-meta h1, .result-view > h1 { margin: 0; color: var(--navy); font-size: clamp(48px, 8vw, 86px); line-height: .94; letter-spacing: -.075em; font-weight: 850; }
.hero h1 span { color: var(--ink-soft); }
.hero-copy { margin: 20px 0 0; color: var(--ink-soft); font-size: 17px; line-height: 1.5; }

.online-gateway { position: relative; margin-bottom: 36px; padding: 30px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, .8fr); gap: 32px; overflow: hidden; border-radius: var(--radius-card); background: var(--navy); color: #fff; box-shadow: var(--shadow); }
.online-gateway::after { position: absolute; right: -36px; bottom: -55px; width: 180px; height: 180px; content: ""; border: 18px solid rgba(244, 201, 93, .35); border-radius: 50%; transform: rotate(18deg); }
.online-gateway .eyebrow { color: var(--sun); }
.online-gateway h2 { position: relative; z-index: 1; max-width: 520px; margin: 0; font-size: clamp(27px, 4vw, 42px); line-height: 1.06; letter-spacing: -.06em; font-weight: 850; }
.online-gateway-copy > p:last-child { position: relative; z-index: 1; margin: 15px 0 0; color: #dce5ec; font-size: 13px; line-height: 1.55; }
.online-actions { position: relative; z-index: 1; display: grid; align-content: center; gap: 10px; }
.join-room-form { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 8px; }
.join-room-form .c-button { min-height: 48px; }
.join-room-form input { text-transform: uppercase; }
.online-actions > .field-error { min-height: 18px; margin: 0; color: #ffc5b9; }
.local-divider { margin: 0 0 18px; display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.local-divider::before, .local-divider::after { height: 1px; flex: 1; content: ""; background: var(--line); }

.setup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.setup-panel { padding: 26px; border: 1px solid var(--line); border-radius: var(--radius-card); background: rgba(255, 250, 242, .82); box-shadow: var(--shadow); }
.section-heading { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 22px; }
.section-heading h2 { margin: 0 0 5px; color: var(--navy); font-size: 20px; letter-spacing: -.03em; }
.section-heading p { margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.45; }
.section-heading--compact { margin-bottom: 14px; }
.step { flex: 0 0 auto; min-width: 30px; height: 25px; padding: 0 7px; display: grid; place-items: center; border-radius: 9px 9px 9px 3px; background: var(--sun); color: var(--navy); font-size: 10px; font-weight: 850; }
.player-fields { display: grid; gap: 8px; margin-bottom: 10px; }
.player-row { display: grid; grid-template-columns: 28px 1fr 42px; align-items: center; gap: 8px; }
.player-index { color: var(--muted); font-size: 11px; font-weight: 850; text-align: center; }
.remove-player { width: 42px; height: 42px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--muted); font-size: 22px; }
.remove-player:hover { color: var(--danger); border-color: #e5b9b2; background: #fff3ef; }
.remove-player:disabled { opacity: .28; cursor: not-allowed; }

.c-field { display: grid; gap: 6px; color: var(--ink-soft); font-size: 11px; font-weight: 800; }
.c-field input, .c-field select { width: 100%; min-height: 48px; padding: 0 13px; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--surface-strong); color: var(--ink); }
.c-field input::placeholder { color: #a5adb3; }
.c-field input:hover, .c-field select:hover { border-color: #b5aea2; }
.c-field input:focus, .c-field select:focus { border-color: var(--accent); }
.c-button { min-height: 44px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid transparent; border-radius: var(--radius-control); font-weight: 850; text-decoration: none; transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease; }
.c-button:hover { transform: translateY(-1px); }
.c-button:active { transform: translateY(0); }
.c-button--primary { background: var(--accent); color: var(--ink); box-shadow: 0 5px 0 #d65340; }
.c-button--primary:hover { background: #f77b64; box-shadow: 0 6px 0 #d65340; }
.c-button--primary:active { box-shadow: 0 2px 0 #d65340; }
.c-button--quiet { border-color: var(--line); background: var(--surface-strong); color: var(--ink-soft); }
.c-button--quiet:hover { border-color: #b5aea2; color: var(--ink); background: #fff; }
.online-gateway .c-button--quiet { border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.08); color: #fff; }
.c-button--wide { width: 100%; }
.c-button--large { min-height: 56px; padding-inline: 22px; }
.c-button:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.rules-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 18px 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--line); }
.rules-summary div { min-height: 66px; padding: 10px 7px; display: grid; align-content: center; gap: 3px; background: var(--surface); text-align: center; }
.rules-summary strong { color: var(--navy); font-size: 20px; }
.rules-summary span { color: var(--muted); font-size: 9px; }

.score-rule { padding: 44px 0 0; }
.score-rule h2 { margin: 0; color: var(--navy); font-size: clamp(25px, 4vw, 38px); letter-spacing: -.055em; }
.score-scale { margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-card); list-style: none; box-shadow: var(--shadow); }
.score-scale li { min-height: 88px; padding: 12px; display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--line); background: var(--surface); }
.score-scale li:last-child { border: 0; }
.score-scale span { color: var(--ink-soft); font-size: 10px; }
.score-scale strong { color: var(--navy); font-size: 28px; }
.score-scale .champion { background: var(--sun); }

.scoreboard { display: grid; grid-template-columns: repeat(var(--player-count, 2), 1fr); gap: 8px; margin-bottom: 12px; }
.room-strip { margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .06em; }
.room-strip strong { color: var(--navy); letter-spacing: .12em; }
.player-score { position: relative; min-width: 0; padding: 14px 16px; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); box-shadow: 0 3px 0 rgba(30, 41, 59, .04); }
.player-score::before { position: absolute; top: 0; bottom: 0; left: 0; width: 5px; content: ""; background: transparent; }
.player-score.is-active::before { background: var(--accent); }
.player-score.is-active { border-color: #ebb2a5; background: #fff8f5; }
.player-score-name { display: block; overflow: hidden; color: var(--ink-soft); text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 800; }
.player-score.is-active .player-score-name::after { margin-left: 7px; content: "YOUR TURN"; color: var(--accent); font-size: 8px; letter-spacing: .07em; }
.player-score strong { display: block; margin-top: 4px; color: var(--navy); font-size: 30px; line-height: 1; letter-spacing: -.06em; }
.player-score small { color: var(--muted); font-size: 9px; }

.arena { min-height: 540px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--surface); box-shadow: var(--shadow); }
.turn-meta { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.turn-meta h1 { font-size: clamp(31px, 5vw, 55px); }
.turn-meta h1 span { color: var(--accent); }
.pick-state { padding: 26px 0 0; }
.number-stage { min-height: 210px; display: grid; place-items: center; align-content: center; gap: 8px; border: 2px dashed #c8bfae; border-radius: 15px; background: var(--navy); box-shadow: inset 0 0 0 6px rgba(255,255,255,.04); }
.number-stage-label { padding: 5px 10px; border-radius: 999px; background: rgba(255,255,255,.12); color: #e7edf2; font-size: 9px; font-weight: 850; letter-spacing: .14em; }
.number-preview { color: #fff; font-family: "Arial Black", Inter, sans-serif; font-size: clamp(54px, 12vw, 108px); line-height: .9; letter-spacing: -.08em; }
.number-form { max-width: 660px; margin: 22px auto 0; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 10px; }
.c-field--number input { height: 56px; font-size: 24px; font-weight: 850; letter-spacing: .04em; }
.pick-tools { min-height: 34px; max-width: 660px; margin: 8px auto 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.text-button { padding: 5px 0; border: 0; background: transparent; color: var(--ink-soft); font-size: 11px; font-weight: 750; text-decoration: underline; text-underline-offset: 4px; }
.text-button:hover { color: var(--accent); }
.field-error { color: var(--danger); font-size: 11px; }
.used-note { margin: 18px 0 0; color: var(--muted); font-size: 10px; text-align: center; }

.reveal-state { padding-top: 26px; animation: revealIn .42s ease-out; }
.reveal-kicker { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .12em; }
.reveal-kicker strong { color: var(--navy); font-size: 18px; }
.reveal-main { min-height: 210px; display: flex; align-items: center; justify-content: space-between; gap: 26px; border-bottom: 1px solid var(--line); }
.reveal-main h2 { margin: 0; color: var(--navy); font-size: clamp(40px, 8vw, 75px); line-height: .95; letter-spacing: -.07em; font-weight: 850; overflow-wrap: anywhere; }
.reveal-meta { margin: 10px 0 0; color: var(--ink-soft); font-size: 12px; }
.points-burst { flex: 0 0 auto; width: 150px; height: 150px; display: grid; place-items: center; align-content: center; border-radius: 50%; background: var(--accent); color: var(--ink); transform: rotate(3deg); box-shadow: 5px 6px 0 #d65340; }
.points-burst strong { font-size: 64px; line-height: .8; letter-spacing: -.09em; }
.points-burst span { margin-top: 10px; font-size: 9px; font-weight: 850; letter-spacing: .16em; }
.career-breakdown { padding: 20px 0 24px; display: flex; flex-wrap: wrap; gap: 6px; }
.career-chip { padding: 7px 9px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-strong); color: var(--ink-soft); font-size: 10px; }
.career-chip strong { color: var(--success); }
.career-breakdown .empty-state { width: 100%; }
@keyframes revealIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

.history-panel { margin-top: 18px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-card); background: rgba(255, 250, 242, .6); }
.pick-history { display: grid; gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--line); }
.history-row { padding: 12px 14px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; background: var(--surface); }
.history-row span { display: block; color: var(--muted); font-size: 10px; }
.history-row strong { font-size: 13px; }
.history-points { min-width: 54px; color: var(--success); text-align: right; }
.empty-state { margin: 0; padding: 22px; color: var(--muted); font-size: 11px; text-align: center; background: var(--surface); }

.result-view { max-width: 700px; margin: 0 auto; text-align: center; }
.result-view > h1 { margin-bottom: 34px; }
.podium { display: grid; gap: 8px; text-align: left; }
.podium-row { padding: 17px 20px; display: grid; grid-template-columns: 45px 1fr auto; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); box-shadow: var(--shadow); }
.podium-row:first-child { border-color: #e3b94f; background: #fff8df; }
.podium-rank { color: var(--muted); font-size: 12px; font-weight: 850; }
.podium-row:first-child .podium-rank { color: #ad7b10; }
.podium-name { color: var(--navy); font-size: 18px; font-weight: 850; }
.podium-score { color: var(--navy); font-size: 25px; font-weight: 850; }
.result-actions { margin-top: 22px; display: flex; justify-content: center; gap: 8px; }

.lobby-view { max-width: 720px; margin: 0 auto; }
.lobby-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.lobby-head h1 { margin: 0; color: var(--navy); font-size: clamp(39px, 7vw, 66px); line-height: .95; letter-spacing: -.07em; font-weight: 850; }
.connection-badge { padding: 8px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--surface); font-size: 9px; font-weight: 850; }
.connection-badge.is-online { border-color: #9bcab7; color: var(--success); }
.connection-badge.is-offline { border-color: #e5aaa1; color: var(--danger); }
.room-code-panel { padding: 22px; display: flex; justify-content: space-between; align-items: center; gap: 16px; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--navy); color: #fff; box-shadow: var(--shadow); }
.room-code-panel div { display: grid; gap: 5px; }
.room-code-panel span { color: #b9c6d0; font-size: 9px; font-weight: 850; letter-spacing: .14em; }
.room-code-panel strong { color: var(--sun); font-size: clamp(34px, 8vw, 57px); line-height: 1; letter-spacing: .14em; }
.room-code-panel .c-button--quiet { border-color: rgba(255,255,255,.28); background: rgba(255,255,255,.08); color: #fff; }
.lobby-players { margin-top: 12px; display: grid; gap: 7px; }
.lobby-player { padding: 14px 16px; display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.presence-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.presence-dot.is-online { background: var(--success); box-shadow: 0 0 0 4px #e0f1e9; }
.lobby-player-name { color: var(--navy); font-size: 14px; font-weight: 850; }
.lobby-player-name small { margin-left: 7px; color: var(--muted); font-size: 9px; }
.ready-state { color: var(--muted); font-size: 10px; font-weight: 850; }
.ready-state.is-ready { color: var(--success); }
.lobby-message { min-height: 22px; margin: 14px 0; color: var(--ink-soft); font-size: 11px; text-align: center; }
.lobby-actions { display: flex; justify-content: center; gap: 8px; }

.footer { width: min(calc(100% - 40px), var(--shell)); margin: 0 auto; padding: 22px 0 38px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; line-height: 1.6; }
.data-dialog { width: min(calc(100% - 32px), 620px); padding: 25px; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.data-dialog::backdrop { background: rgba(30,41,59,.45); backdrop-filter: blur(4px); }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; }
.dialog-head h2 { margin: 0; color: var(--navy); font-size: 27px; }
.data-dialog > p { color: var(--ink-soft); font-size: 12px; line-height: 1.6; }
.icon-button { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-strong); color: var(--ink); font-size: 22px; }
.data-actions { margin: 20px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.format-note { padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--surface-strong); font-size: 11px; }
.format-note code { display: block; margin: 8px 0; color: var(--navy); overflow-wrap: anywhere; }
.format-note p { margin: 0; color: var(--muted); }
.dialog-message { min-height: 22px; color: var(--success) !important; }

@media (max-width: 760px) {
  .topbar { height: 56px; padding-inline: 14px; }
  .brand { font-size: 11px; }
  .brand-mark { width: 30px; height: 30px; }
  .topbar-actions { gap: 7px; }
  .topbar .c-badge { display: none; }
  .sound-toggle { width: 34px; height: 34px; font-size: 16px; }
  .l-shell { width: min(calc(100% - 28px), var(--shell)); }
  .view { padding: 30px 0 60px; }
  .hero { padding: 12px 0 28px; }
  .hero h1 { font-size: clamp(45px, 15vw, 68px); }
  .hero-copy { margin-top: 14px; font-size: 15px; }
  .online-gateway { margin-bottom: 26px; padding: 21px 18px; grid-template-columns: 1fr; gap: 18px; border-radius: 17px; }
  .online-gateway::after { right: -70px; bottom: -78px; width: 150px; height: 150px; }
  .online-gateway h2 { font-size: 29px; }
  .join-room-form { grid-template-columns: 1fr 1fr; }
  .join-room-form .c-button { grid-column: 1 / -1; width: 100%; }
  .setup-grid { grid-template-columns: 1fr; gap: 10px; }
  .setup-panel { padding: 21px 17px; border-radius: 17px; }
  .setup-panel .c-button--large { min-height: 53px; }
  .score-rule { padding-top: 34px; }
  .score-scale { grid-template-columns: repeat(4, 1fr); }
  .score-scale li { min-height: 76px; padding: 10px; }
  .score-scale li:nth-child(4) { border-right: 0; }
  .score-scale li:nth-child(n+5) { border-top: 1px solid var(--line); }
  .score-scale li:nth-child(7) { grid-column: span 2; }
  .score-scale strong { font-size: 24px; }
  .score-scale span { font-size: 9px; }

  body.game-active, body.result-active, body.lobby-active { height: 100svh; overflow: hidden; }
  body.game-active .footer, body.result-active .footer, body.lobby-active .footer { display: none; }
  body.game-active .l-shell, body.result-active .l-shell, body.lobby-active .l-shell { width: 100%; }
  #gameView { height: calc(100svh - 56px); padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 7px; }
  #gameView[hidden], #lobbyView[hidden] { display: none !important; }
  #gameView .room-strip { flex: 0 0 14px; margin: 0; padding-inline: 2px; font-size: 8px; }
  #gameView .scoreboard { flex: 0 0 62px; gap: 6px; margin: 0; display: flex; overflow-x: auto; }
  #gameView .player-score { min-width: 136px; padding: 9px 10px 9px 13px; border-radius: 12px; }
  #gameView .player-score-name { font-size: 9px; }
  #gameView .player-score.is-active .player-score-name::after { display: none; }
  #gameView .player-score strong { display: inline; margin: 0 3px 0 0; font-size: 24px; }
  #gameView .player-score small { font-size: 8px; }
  #gameView .arena { flex: 1 1 auto; min-height: 0; padding: 13px; display: flex; flex-direction: column; overflow: hidden; border-radius: 17px; }
  #gameView .turn-meta { flex: 0 0 auto; padding-bottom: 10px; align-items: center; gap: 8px; }
  #gameView .turn-meta .eyebrow { margin-bottom: 4px; font-size: 8px; }
  #gameView .turn-meta h1 { font-size: clamp(23px, 7vw, 31px); }
  #gameView .turn-meta .c-button { min-height: 34px; padding-inline: 9px; font-size: 9px; }
  #gameView .pick-state { flex: 1 1 auto; min-height: 0; padding-top: 11px; display: flex; flex-direction: column; }
  #gameView .number-stage { flex: 1 1 auto; min-height: 84px; max-height: 150px; }
  #gameView .number-preview { font-size: clamp(52px, 20vw, 78px); }
  #gameView .number-form { flex: 0 0 auto; width: 100%; margin-top: 10px; grid-template-columns: 1fr; gap: 7px; }
  #gameView .c-field--number { gap: 4px; font-size: 9px; }
  #gameView .c-field--number input { height: 48px; min-height: 48px; font-size: 21px; }
  #gameView .number-form .c-button { min-height: 48px; }
  #gameView .pick-tools { flex: 0 0 auto; min-height: 25px; width: 100%; margin-top: 3px; flex-direction: row; align-items: center; }
  #gameView .used-note { flex: 0 0 auto; max-width: 100%; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 8px; }
  #gameView .reveal-state { flex: 1 1 auto; min-height: 0; padding-top: 10px; display: flex; flex-direction: column; }
  #gameView .reveal-kicker { flex: 0 0 auto; font-size: 8px; }
  #gameView .reveal-kicker strong { font-size: 14px; }
  #gameView .reveal-main { flex: 0 0 auto; min-height: 120px; padding: 12px 0; display: grid; grid-template-columns: minmax(0, 1fr) 86px; align-items: center; gap: 8px; }
  #gameView .reveal-main h2 { font-size: clamp(28px, 10vw, 42px); }
  #gameView .reveal-main .eyebrow { margin-bottom: 5px; font-size: 8px; }
  #gameView .reveal-meta { margin: 6px 0 0; font-size: 9px; }
  #gameView .points-burst { width: 82px; height: 82px; }
  #gameView .points-burst strong { font-size: 38px; }
  #gameView .points-burst span { margin-top: 5px; font-size: 7px; }
  #gameView .career-breakdown { flex: 1 1 auto; min-height: 44px; max-height: 120px; padding: 9px 0; gap: 4px; overflow-y: auto; align-content: flex-start; }
  #gameView .career-chip { padding: 6px 8px; font-size: 9px; }
  #gameView #confirmPick { flex: 0 0 48px; min-height: 48px; }
  #gameView .history-panel { display: none; }
  #resultView { height: calc(100svh - 56px); padding: 34px 14px 16px; overflow-y: auto; }
  #resultView > h1 { margin-bottom: 26px; font-size: clamp(44px, 15vw, 68px); }
  #resultView .podium-row { padding: 14px 16px; grid-template-columns: 34px 1fr auto; }
  #resultView .podium-name { font-size: 16px; }
  #resultView .podium-score { font-size: 22px; }
  #resultView .result-actions { margin-top: 16px; flex-direction: column; gap: 6px; }
  #resultView .result-actions .c-button { min-height: 48px; }
  #lobbyView { height: calc(100svh - 56px); padding: 22px 14px 14px; display: flex; flex-direction: column; overflow: hidden; }
  #lobbyView .lobby-head { flex: 0 0 auto; margin-bottom: 14px; align-items: center; }
  #lobbyView .lobby-head h1 { font-size: clamp(31px, 10vw, 42px); }
  #lobbyView .lobby-head .eyebrow { margin-bottom: 5px; font-size: 8px; }
  #lobbyView .connection-badge { padding: 6px 8px; font-size: 8px; }
  #lobbyView .room-code-panel { flex: 0 0 auto; padding: 16px; }
  #lobbyView .room-code-panel strong { font-size: clamp(34px, 12vw, 48px); }
  #lobbyView .room-code-panel .c-button { min-height: 38px; padding-inline: 10px; font-size: 9px; }
  #lobbyView .lobby-players { flex: 1 1 auto; min-height: 0; margin-top: 10px; overflow-y: auto; }
  #lobbyView .lobby-player { padding: 12px 14px; }
  #lobbyView .lobby-message { flex: 0 0 auto; margin: 9px 0; font-size: 10px; }
  #lobbyView .lobby-actions { flex: 0 0 auto; flex-direction: column; gap: 6px; }
  #lobbyView .lobby-actions .c-button { width: 100%; min-height: 46px; }
}

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