/* Pictionary — the Recess design language (tokens lifted 1:1 from apps/web
   tailwind.css `.recess-ds`), tuned bright and playful for kids on tablets:
   pills everywhere, big tap targets, Satoshi. Single light theme. */
:root {
  --ds-bg: #f1f4f5;
  --ds-bg-2: #e9edee;
  --ds-card: #ffffff;
  --ds-ink: #050505;
  --ds-ink-2: rgba(5, 5, 5, 0.76);
  --ds-ink-3: rgba(5, 5, 5, 0.58);
  --ds-ink-4: rgba(5, 5, 5, 0.32);
  --ds-ink-5: rgba(5, 5, 5, 0.12);
  --ds-rule: rgba(5, 5, 5, 0.12);
  --ds-accent-grad: linear-gradient(90deg, #7c3aed, #a855f7);
  --ds-accent-1: #7c3aed;
  --ds-accent-2: #a855f7;
  --ds-blue: #3d4ee8;
  --ds-blue-soft: #e4e6fd;
  --ds-red: #f04a37;
  --ds-red-soft: #fde0da;
  --ds-amber: #f5a623;
  --ds-amber-soft: #fdecc6;
  --ds-green: #3fae47;
  --ds-green-soft: #ddf3df;
  --ds-success-text: #1f7a29;
  --ds-font: "Satoshi", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 22px;
  --shadow: 0 10px 30px rgba(5, 5, 5, 0.08);
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  height: 100%;
  background: var(--ds-bg);
  color: var(--ds-ink);
  font-family: var(--ds-font);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
[hidden] {
  display: none !important;
}
.app {
  min-height: 100%;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
.muted {
  color: var(--ds-ink-3);
  font-weight: 500;
}
.err {
  color: var(--ds-red);
  font-weight: 700;
  min-height: 1.4em;
  margin-top: 10px;
}
.boot {
  flex: 1;
  display: grid;
  place-items: center;
  color: var(--ds-ink-3);
}

/* ── top bar ─────────────────────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px clamp(14px, 3vw, 28px);
  background: color-mix(in srgb, var(--ds-bg) 86%, transparent);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 5;
}
.brand {
  font-weight: 900;
  font-size: 20px;
  letter-spacing: -0.02em;
  background: var(--ds-accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--ds-card);
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 1px 0 var(--ds-ink-5);
}
.pill-mode {
  background: var(--ds-accent-grad);
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 11px;
  font-weight: 900;
}
.spacer {
  flex: 1;
}
.timer {
  font-weight: 900;
  font-size: 26px;
  min-width: 64px;
  text-align: center;
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--ds-card);
  font-variant-numeric: tabular-nums;
  transition: background 200ms, color 200ms;
}
.timer.hot {
  background: var(--ds-red);
  color: #fff;
  animation: pulse 1s infinite;
}
@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}
.who {
  font-weight: 700;
  font-size: 14px;
  color: var(--ds-ink-2);
}
.icon-btn {
  border: 0;
  background: var(--ds-card);
  width: 40px;
  height: 40px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--ds-ink);
  display: grid;
  place-items: center;
  box-shadow: 0 1px 0 var(--ds-ink-5);
}

/* ── buttons ─────────────────────────────────────────────────────────────── */
.btn {
  border: 0;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
  transition: transform 120ms, box-shadow 120ms, filter 120ms;
  min-height: 44px;
  white-space: nowrap;
}
.btn:active {
  transform: scale(0.97);
}
.btn:disabled {
  opacity: 0.45;
  cursor: default;
  transform: none;
}
.btn-primary {
  background: var(--ds-accent-grad);
  color: #fff;
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.28);
}
.btn-primary:hover:not(:disabled) {
  filter: brightness(1.06);
}
.btn-secondary {
  background: var(--ds-card);
  color: var(--ds-ink);
  box-shadow: 0 1px 0 var(--ds-ink-5), var(--shadow);
}
.btn-ghost {
  background: transparent;
  color: var(--ds-ink-3);
}
.btn-ghost:hover {
  background: var(--ds-ink-5);
}
.btn-danger {
  background: var(--ds-red-soft);
  color: #a12b1c;
}
.btn-xl {
  font-size: 20px;
  padding: 18px 34px;
  min-height: 60px;
}
.btn-small {
  font-size: 14px;
  padding: 8px 14px;
  min-height: 36px;
}
.link-btn {
  border: 0;
  background: none;
  color: var(--ds-accent-1);
  font-weight: 700;
  cursor: pointer;
  padding: 0 4px;
}

/* ── panels ──────────────────────────────────────────────────────────────── */
.panel {
  background: var(--ds-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ds-ink-3);
  margin-bottom: 12px;
}
.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0 clamp(12px, 2.5vw, 28px) 28px;
}

/* ── home ────────────────────────────────────────────────────────────────── */
.hero {
  margin: auto;
  text-align: center;
  max-width: 560px;
  width: 100%;
  padding: 40px 0;
  position: relative;
}
.hero-doodle {
  position: absolute;
  inset: -60px -80px auto;
  height: 260px;
  background:
    radial-gradient(circle at 20% 30%, var(--ds-red-soft) 0 60px, transparent 61px),
    radial-gradient(circle at 80% 20%, var(--ds-blue-soft) 0 70px, transparent 71px),
    radial-gradient(circle at 55% 75%, var(--ds-amber-soft) 0 50px, transparent 51px),
    radial-gradient(circle at 10% 85%, var(--ds-green-soft) 0 40px, transparent 41px);
  z-index: -1;
  filter: blur(2px);
}
.hero-title {
  font-weight: 900;
  font-size: clamp(48px, 9vw, 84px);
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 0 0 34px;
  background: var(--ds-accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.home-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: stretch;
  width: min(360px, 90%);
  margin: 0 auto;
}
.join-form {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 18px;
  flex-wrap: wrap;
}
.join-form input {
  width: 150px;
  text-align: center;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: 2px solid var(--ds-rule);
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--ds-card);
  outline: none;
}
.join-form input:focus {
  border-color: var(--ds-accent-1);
}
.playing-as {
  margin-top: 26px;
  color: var(--ds-ink-3);
  font-size: 14px;
}

/* ── lobby ───────────────────────────────────────────────────────────────── */
.lobby {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.2fr);
  gap: 18px;
  max-width: 1100px;
  width: 100%;
  margin: 8px auto 0;
}
.lobby.solo {
  grid-template-columns: minmax(280px, 560px);
  justify-content: center;
}
.lobby-wait {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--ds-rule);
  font-weight: 700;
}
.code-block {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--ds-bg);
  border-radius: 999px;
  padding: 8px 8px 8px 16px;
  margin-bottom: 14px;
}
.code-block b {
  font-size: 26px;
  letter-spacing: 0.2em;
  font-weight: 900;
  flex: 1;
}
.player-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 36px;
}
.player-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 14px;
  background: var(--ds-bg);
  font-weight: 700;
}
.player-row.off {
  opacity: 0.45;
}
.player-row .name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.player-row .tag {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ds-ink-3);
}
.player-row .mini {
  border: 0;
  background: var(--ds-card);
  border-radius: 999px;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  cursor: pointer;
  font-weight: 800;
  font-size: 12px;
  box-shadow: 0 1px 0 var(--ds-ink-5);
}
.mini.red {
  color: var(--ds-red);
}
.mini.blue {
  color: var(--ds-blue);
}
.mini.on {
  background: var(--ds-ink);
  color: #fff;
}
.team-panels {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.team {
  border-radius: 16px;
  padding: 10px;
  background: var(--ds-bg);
}
.team-red {
  background: var(--ds-red-soft);
}
.team-blue {
  background: var(--ds-blue-soft);
}
.team-head {
  font-weight: 900;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.team-red .team-head {
  color: #a12b1c;
}
.team-blue .team-head {
  color: #2733a3;
}
.team .player-row {
  background: var(--ds-card);
}
.player-row.draggable {
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.player-row.dragging {
  cursor: grabbing;
  position: relative;
  z-index: 5;
  opacity: 0.85;
  box-shadow: 0 12px 30px rgba(5, 5, 5, 0.25);
  pointer-events: none;
}
.team {
  border: 2px solid transparent;
  transition: border-color 120ms, background 120ms;
}
.team.hot {
  border-color: var(--ds-ink);
}
.team-red.hot {
  border-color: var(--ds-red);
}
.team-blue.hot {
  border-color: var(--ds-blue);
}
.bucket-empty {
  border: 2px dashed var(--ds-rule);
  border-radius: 14px;
  padding: 10px;
  text-align: center;
  color: var(--ds-ink-3);
  font-weight: 700;
  font-size: 13px;
}
.settings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
}
.settings label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-weight: 700;
  font-size: 13px;
  color: var(--ds-ink-2);
}
.settings label.full {
  grid-column: 1 / -1;
}
.settings label.check {
  flex-direction: row;
  align-items: center;
  grid-column: 1 / -1;
}
.settings input,
.settings select,
.settings textarea {
  border: 2px solid var(--ds-rule);
  border-radius: 14px;
  padding: 9px 12px;
  background: var(--ds-card);
  outline: none;
  font-weight: 600;
  min-height: 42px;
}
.settings input:focus,
.settings select:focus,
.settings textarea:focus {
  border-color: var(--ds-accent-1);
}
.settings input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-height: 0;
}
.settings :disabled {
  background: var(--ds-bg);
  color: var(--ds-ink-2);
}
.game-length {
  margin-top: 12px;
  font-weight: 800;
  font-size: 14px;
  color: var(--ds-ink-2);
}
.lobby-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
  flex-wrap: wrap;
}

/* ── game ────────────────────────────────────────────────────────────────── */
.game {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 280px;
  gap: 14px;
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
}
.scoreboard,
.chat-panel {
  max-height: calc(100svh - 92px);
}
.score-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: auto;
}
.score-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 14px;
  background: var(--ds-bg);
  font-weight: 700;
  font-size: 14px;
}
.score-row.me {
  outline: 2px solid var(--ds-accent-2);
}
.score-row.guessed {
  background: var(--ds-green-soft);
}
.score-row.drawing {
  background: var(--ds-amber-soft);
}
.score-row.off {
  opacity: 0.45;
}
.score-row .rank {
  color: var(--ds-ink-3);
  font-size: 12px;
  width: 18px;
}
.score-row .dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex: none;
}
.dot.red {
  background: var(--ds-red);
}
.dot.blue {
  background: var(--ds-blue);
}
.score-row .name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.score-row .mini {
  min-width: 26px;
  height: 26px;
  padding: 0 5px;
  font-size: 11px;
  flex: none;
}
.score-row .pts {
  font-variant-numeric: tabular-nums;
  font-weight: 900;
}
.team-scores {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.team-score {
  border-radius: 14px;
  padding: 8px;
  text-align: center;
  font-weight: 900;
}
.team-score.red {
  background: var(--ds-red-soft);
  color: #a12b1c;
}
.team-score.blue {
  background: var(--ds-blue-soft);
  color: #2733a3;
}
.team-score b {
  display: block;
  font-size: 22px;
}
.host-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--ds-rule);
}
.leave-game {
  margin-top: auto;
  align-self: flex-start;
}
.stage {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.word-bar {
  text-align: center;
  font-weight: 900;
  font-size: clamp(20px, 3vw, 30px);
  letter-spacing: 0.18em;
  min-height: 42px;
  font-variant-numeric: tabular-nums;
}
.word-bar .drawer-word {
  letter-spacing: 0.05em;
  color: var(--ds-accent-1);
}
.word-bar .soft {
  color: var(--ds-ink-3);
  letter-spacing: 0;
  font-size: 18px;
  font-weight: 700;
}
.canvas-area {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  min-height: 0;
  flex: 1;
}
.board {
  position: relative;
  flex: none;
  width: 100%;
  max-width: 100%;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow), 0 0 0 1px var(--ds-ink-5);
  aspect-ratio: 4 / 3;
}
.board canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: crosshair;
}
.board.mine canvas {
  cursor: crosshair;
}
.board:not(.mine) canvas {
  cursor: default;
}
.board-red {
  box-shadow: var(--shadow), 0 0 0 4px var(--ds-red);
}
.board-blue {
  box-shadow: var(--shadow), 0 0 0 4px var(--ds-blue);
}
.board-label {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(5, 5, 5, 0.7);
  color: #fff;
  font-weight: 800;
  font-size: 12px;
  pointer-events: none;
}
.board-label:empty {
  display: none;
}
.canvas-area.dual .board {
  max-width: calc(50% - 6px);
}
/* Wide layout: the game fills the viewport exactly; panels scroll inside
   themselves and the board is sized by fitBoards() — the page never scrolls. */
@media (min-width: 961px) {
  .app:has(#screen-game:not([hidden])) {
    height: 100svh;
    overflow: hidden;
  }
  #screen-game {
    min-height: 0;
    overflow: hidden;
    padding-bottom: 14px;
  }
  .game {
    grid-template-rows: minmax(0, 1fr);
    height: 100%;
    min-height: 0;
  }
  .scoreboard,
  .chat-panel,
  .stage {
    height: 100%;
    min-height: 0;
    max-height: none;
    overflow: hidden;
  }
  .score-list {
    min-height: 0;
  }
  .word-bar {
    flex: none;
  }
  .status-line {
    flex: none;
  }
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  justify-content: center;
  align-items: center;
  background: var(--ds-card);
  border-radius: 999px;
  padding: 6px 12px;
  box-shadow: var(--shadow);
  flex: none;
  align-self: center;
}
.tool-group {
  display: flex;
  gap: 4px;
  align-items: center;
}
.tool {
  border: 0;
  background: var(--ds-bg);
  width: 32px;
  height: 32px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 15px;
  display: grid;
  place-items: center;
}
.tool.on {
  background: var(--ds-ink);
  color: #fff;
}
.size-dot {
  border-radius: 999px;
  background: var(--ds-ink);
  display: block;
}
.tool.on .size-dot {
  background: #fff;
}
.swatch {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 3px solid transparent;
  cursor: pointer;
  padding: 0;
}
.swatch.on {
  border-color: var(--ds-ink);
  transform: scale(1.15);
}
.status-line {
  text-align: center;
  font-weight: 700;
  color: var(--ds-ink-3);
  min-height: 1.4em;
}
.chat-log {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
  padding-right: 4px;
  scroll-behavior: smooth;
}
.msg {
  padding: 6px 10px;
  border-radius: 12px;
  background: var(--ds-bg);
  line-height: 1.3;
  word-break: break-word;
}
.msg b {
  margin-right: 4px;
}
.msg.system {
  background: transparent;
  color: var(--ds-ink-3);
  font-weight: 700;
  font-size: 13px;
}
.msg.correct {
  background: var(--ds-green-soft);
  color: var(--ds-success-text);
  font-weight: 800;
}
.msg.correct-self {
  background: var(--ds-green);
  color: #fff;
  font-weight: 900;
}
.msg.close {
  background: var(--ds-amber-soft);
  color: #8f5600;
  font-weight: 800;
}
.msg.insider {
  opacity: 0.7;
  font-style: italic;
}
.msg.private {
  opacity: 0.6;
}
.msg.error {
  background: var(--ds-red-soft);
  color: #a12b1c;
  font-weight: 700;
}
.msg .team-tag {
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  margin-right: 6px;
}
.team-tag.red {
  color: var(--ds-red);
}
.team-tag.blue {
  color: var(--ds-blue);
}
.chat-form {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}
.chat-form input {
  flex: 1;
  min-width: 0;
  border: 2px solid var(--ds-rule);
  border-radius: 999px;
  padding: 10px 14px;
  outline: none;
  min-height: 44px;
}
.chat-form input:focus {
  border-color: var(--ds-accent-1);
}
.chat-form input:disabled {
  background: var(--ds-bg);
}

/* ── end ─────────────────────────────────────────────────────────────────── */
.end {
  margin: auto;
  text-align: center;
  max-width: 640px;
  width: 100%;
  padding: 24px 0;
}
.end-title {
  font-weight: 900;
  font-size: clamp(36px, 7vw, 64px);
  letter-spacing: -0.03em;
  line-height: 1;
}
.end-title.red {
  color: var(--ds-red);
}
.end-title.blue {
  color: var(--ds-blue);
}
.end-sub {
  color: var(--ds-ink-3);
  font-weight: 700;
  margin: 10px 0 24px;
}
.podium {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 22px;
}
.podium .step {
  background: var(--ds-card);
  border-radius: 18px 18px 8px 8px;
  padding: 12px 10px;
  width: 140px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.podium .step.p1 {
  height: 170px;
  background: linear-gradient(180deg, #fff3c4, #fde68a);
}
.podium .step.p2 {
  height: 140px;
}
.podium .step.p3 {
  height: 120px;
}
.podium .medal {
  font-size: 30px;
}
.podium .pname {
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.podium .pscore {
  color: var(--ds-ink-3);
  font-weight: 700;
}
.end-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 420px;
  margin: 0 auto 24px;
}
.end-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.mvp {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  max-width: 480px;
  margin: 0 auto 20px;
}
.mvp .card {
  border-radius: 16px;
  padding: 12px;
  font-weight: 800;
}
.mvp .card.red {
  background: var(--ds-red-soft);
  color: #a12b1c;
}
.mvp .card.blue {
  background: var(--ds-blue-soft);
  color: #2733a3;
}
.mvp .card small {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── overlays ────────────────────────────────────────────────────────────── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 5, 0.45);
  display: grid;
  place-items: center;
  z-index: 20;
  padding: 16px;
}
.modal {
  background: var(--ds-card);
  border-radius: 26px;
  padding: 26px;
  text-align: center;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 30px 60px rgba(5, 5, 5, 0.3);
  animation: pop 220ms cubic-bezier(0.22, 1, 0.36, 1);
}
.modal-wide {
  max-width: 900px;
}
@keyframes pop {
  from {
    transform: scale(0.92);
    opacity: 0;
  }
}
.modal-title {
  font-weight: 900;
  font-size: 28px;
  margin-bottom: 16px;
}
.modal-eyebrow {
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ds-ink-3);
}
.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 12px;
}
.reveal-word {
  font-weight: 900;
  font-size: clamp(30px, 5vw, 44px);
  letter-spacing: 0.02em;
  color: var(--ds-accent-1);
  margin: 4px 0 14px;
}
.reveal-boards {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.reveal-boards .mini-board {
  flex: 1 1 260px;
  max-width: 400px;
}
.mini-board canvas {
  width: 100%;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--ds-ink-5);
  display: block;
}
.mini-board.red canvas {
  box-shadow: 0 0 0 4px var(--ds-red);
}
.mini-board.blue canvas {
  box-shadow: 0 0 0 4px var(--ds-blue);
}
.mini-board .cap {
  font-weight: 800;
  font-size: 13px;
  margin-top: 6px;
  color: var(--ds-ink-2);
}
.reveal-results {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}
.reveal-results .chip {
  background: var(--ds-bg);
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 800;
  font-size: 13px;
}
.reveal-results .chip.plus {
  background: var(--ds-green-soft);
  color: var(--ds-success-text);
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--ds-ink);
  color: #fff;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 800;
  z-index: 30;
  box-shadow: 0 10px 30px rgba(5, 5, 5, 0.3);
  max-width: 90vw;
}

/* ── narrow screens: stack ───────────────────────────────────────────────── */
@media (max-width: 960px) {
  .game {
    grid-template-columns: 1fr;
    grid-template-areas: "stage" "chat" "scores";
  }
  .stage {
    grid-area: stage;
  }
  .chat-panel {
    grid-area: chat;
    max-height: 40svh;
  }
  .scoreboard {
    grid-area: scores;
    max-height: none;
  }
  .canvas-area.dual {
    flex-direction: column;
  }
  .canvas-area.dual .board {
    max-width: 100%;
  }
  .lobby {
    grid-template-columns: 1fr;
  }
  .settings {
    grid-template-columns: 1fr;
  }
  .brand {
    font-size: 16px;
  }
  .who {
    display: none;
  }
}
