/* Last Question (Ni Idea): twenty questions. The player thinks of anything; the game asks and guesses.
     The paper-map style (claude/estilo-visual.md): flat paper, a terrain band, ink, and one cutout shadow under what lies on the paper. */
  :root { --paper: #F6F0DE; --band: #BFDCC9; --park: #A9D1BA; --ink: #2A2E35; --muted: #6B7078; --card: #FFFFFF; --player: #2E5FE0; --hazard: #E54B4B; --reward: #EFB22E; --good: #58B65C;
    --sh: 2px 3px 0 rgba(42, 46, 53, 0.13); --font: 'Jost', system-ui, sans-serif; }
  :root[data-theme="dark"] { --paper: #262B38; --band: #343B4A; --park: #414A5B; --ink: #F3EEE2; --muted: #B4B9C3; --card: #3F4553; --player: #7DB4FF; --hazard: #FF6B6B; --reward: #FFD15C; --good: #78CB7B; --sh: 2px 3px 0 rgba(0, 0, 0, 0.32); }
  #stage, #stage * { box-sizing: border-box; margin: 0; }
  #stage [hidden] { display: none !important; }
  html, body { height: 100%; margin: 0; }
  body { background: var(--paper); color: var(--ink); font-family: var(--font); -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; overflow: hidden; }
  #stage { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); touch-action: none; background: var(--paper); color: var(--ink); font-family: var(--font); transition: background-color 2.5s; }
  .band { position: absolute; left: 10px; right: 10px; top: 10px; height: 24%; border-radius: 26px; background: var(--band); box-shadow: var(--sh); transition: background-color 2.5s; }
  .band::after { content: ''; position: absolute; right: 7%; bottom: 14%; width: 22%; height: 34%; border-radius: 18px; background: var(--park); }
  .col { position: relative; width: 100%; max-width: 440px; flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 12px; min-height: 0; }
  #hud { position: relative; width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 8px; }
  .card { background: var(--card); border-radius: 18px; box-shadow: var(--sh); padding: 18px; }
  h1 { font-size: 28px; font-weight: 600; line-height: 1.1; }
  h2 { font-size: 22px; font-weight: 600; }
  .tag { color: var(--muted); font-size: 15px; margin-top: 4px; }
  .caps { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
  .qtext { font-size: 24px; font-weight: 600; line-height: 1.2; min-height: 2.4em; display: flex; align-items: center; }
  .sub { font-size: 15px; color: var(--muted); line-height: 1.35; }
  .knows { text-align: center; }
  .btn { font: 500 16px var(--font); color: var(--ink); background: var(--card); border: 0; border-radius: 23px; height: 46px; padding: 0 18px; box-shadow: var(--sh); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
  .btn.primary { background: var(--ink); color: var(--paper); }
  .btn.small { height: 40px; font-size: 14px; }
  .btn:active, .round:active { transform: translate(2px, 3px); box-shadow: none; }
  .btn:focus-visible, .round:focus-visible, #stage input:focus-visible, .who:focus-visible { outline: 3px solid var(--player); outline-offset: 2px; }
  .btn kbd { font: 500 11px var(--font); opacity: 0.5; }
  .opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .opts.one { grid-template-columns: 1fr; }
  .opts .wide { grid-column: 1 / -1; }
  .row { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
  .round { width: 36px; height: 36px; flex: none; border-radius: 50%; border: 0; background: var(--card); color: var(--ink); box-shadow: var(--sh); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font: 500 12px var(--font); }
  .round svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .pips { display: flex; gap: 3px; flex-wrap: nowrap; }
  .pips i { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--muted); }
  .pips i.on { background: var(--player); box-shadow: none; }
  .pips i.miss { background: var(--hazard); box-shadow: none; }
  .pips i.gap { margin-left: 6px; }
  .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
  .stats b { display: block; font-size: 24px; font-weight: 600; }
  .who { font: 500 14px var(--font); color: var(--muted); background: none; border: 0; padding: 4px 0; cursor: pointer; text-align: left; }
  #stage input[type=text] { font: 500 17px var(--font); color: var(--ink); background: var(--card); box-shadow: var(--sh); border: 0; border-radius: 14px; height: 48px; padding: 0 14px; width: 100%; -webkit-user-select: text; user-select: text; }
  .sug { display: flex; flex-wrap: wrap; gap: 8px; min-height: 40px; margin-top: 10px; }
  .sug .btn { height: 40px; font-size: 14px; padding: 0 14px; }
  .diff { font-size: 14px; color: var(--muted); line-height: 1.4; list-style: none; }
  .diff li { margin-top: 4px; }
  .foot { display: flex; gap: 10px; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; }
  .foot .ver { background: none; border: 0; color: var(--muted); font: 400 12px var(--font); cursor: default; padding: 6px; }
  #panel { justify-content: flex-start; padding-top: 6px; }
  #panel .card { display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow: hidden; }
  .list { list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 15px; min-height: 0; overflow-y: auto; touch-action: manipulation; }
  .list li { display: flex; justify-content: space-between; gap: 12px; }
  .list li b { font-weight: 600; }
  .list li.me { color: var(--player); }
  .tabs { display: flex; gap: 8px; }
  .tabs .btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
  .links { display: flex; gap: 10px; flex-wrap: wrap; }
  .tune { display: flex; gap: 8px; align-items: center; justify-content: center; font-size: 12px; color: var(--muted); }
  /* December (the holidays door, docs/GAMES.md "Holidays"): the pieces the game lays out for it; they stay hidden the rest of the year. The door's canvas lies in #stage under the markup (z -1), so the band
     steps one layer lower while the season is on (it would otherwise paint over the village); the string of lights hangs from a box of its own, over the card it is on. */
  #stage.xmas .band { z-index: -2; }
  #xmasLights { position: absolute; height: 0; z-index: 3; pointer-events: none; }
  #xmasWords { position: absolute; z-index: 1; margin: 0; white-space: nowrap; pointer-events: none; color: var(--ink); opacity: 0.72; }
  @media (max-height: 520px) { .qtext { font-size: 20px; min-height: 1.4em; } .card { padding: 12px 16px; } .col { gap: 8px; } .btn { height: 40px; } .stats b { font-size: 20px; } h1 { font-size: 22px; } .band { height: 30%; } }
  @media (prefers-reduced-motion: no-preference) { .pop { animation: lqpop 0.22s ease-out; } @keyframes lqpop { from { transform: scale(0.96); opacity: 0.5; } to { transform: none; opacity: 1; } } }
  @media (prefers-reduced-motion: reduce) { #stage, .band { transition: none; } }
