/* Square Off: game-table felt, ivory tiles, team pieces. */
:root {
  --felt: #13513f;
  --felt-deep: #0b3a2c;
  --felt-rail: #0e4434;
  --ivory: #f4ecd6;
  --ivory-hi: #fbf6e8;
  --ivory-lo: #e7dbbd;
  --tile-edge: #b5a37a;
  --ink: #1b2520;
  --ink-soft: #56635c;
  --chalk: #f4ecd6;
  --chalk-dim: rgba(244, 236, 214, 0.72);
  --chalk-faint: rgba(244, 236, 214, 0.16);
  --tomato: #e8492f;
  --right: #1f7a49;
  --wrong: #c23b26;
  --focus: #f2b33d;
  --font-display: 'Unbounded', 'Arial Black', 'Helvetica Neue', system-ui, sans-serif;
  --font-text: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --gap: clamp(6px, 0.8vw, 14px);
  --pad: clamp(10px, 1.4vw, 24px);
  --r-tile: 12px;
  --r-card: 22px;
  --r-btn: 10px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background-color: var(--felt);
  background-image:
    radial-gradient(130% 95% at 50% 30%, transparent 45%, rgba(0, 0, 0, 0.42) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .11 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-attachment: fixed;
  color: var(--chalk);
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
kbd {
  font-family: var(--font-text); font-size: 0.78em; font-weight: 700;
  padding: 0.05em 0.45em; border-radius: 5px; border: 1px solid currentColor; opacity: 0.7; margin-left: 0.4em;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 44px; padding: 0.55em 1.1em; border-radius: var(--r-btn);
  border: 2px solid transparent; font-weight: 700; line-height: 1.1; white-space: nowrap;
  transition: transform 0.1s ease, background-color 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: var(--ivory); }
.btn-primary:hover { background: #2b3832; }
.btn-light { background: var(--ivory); color: var(--ink); box-shadow: 0 4px 0 var(--tile-edge); }
.btn-light:hover { background: var(--ivory-hi); }
.btn-light:active { box-shadow: 0 2px 0 var(--tile-edge); transform: translateY(2px); }
.btn-ghost { background: transparent; border-color: var(--chalk-faint); color: var(--chalk); }
.btn-ghost:hover { border-color: var(--chalk-dim); }
.btn-quiet { background: transparent; color: var(--ink-soft); padding-inline: 0.6em; }
.btn-quiet:hover { color: var(--ink); text-decoration: underline; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-btn);
  background: transparent; border: 0; color: var(--chalk-dim);
}
.icon-btn:hover { color: var(--chalk); background: rgba(0, 0, 0, 0.18); }
.icon-btn svg { width: 22px; height: 22px; }

/* ---------- Logo ---------- */
.mark { display: inline-block; position: relative; flex: none; }
.mark i { position: absolute; width: 62%; height: 62%; border-radius: 14%; }
.mark i:first-child { left: 0; top: 0; background: var(--ivory); }
.mark i:last-child { right: 0; bottom: 0; background: var(--tomato); }
.mark-lg { width: clamp(56px, 7vw, 96px); height: clamp(56px, 7vw, 96px); }
.mark-sm { width: 28px; height: 28px; }

/* ---------- Home ---------- */
.home {
  max-width: 1360px; margin: 0 auto; padding: clamp(20px, 4vw, 56px) clamp(16px, 4vw, 56px) 64px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 40px);
  align-items: start;
}
.home-head { grid-column: 1 / -1; display: flex; align-items: center; gap: clamp(16px, 2vw, 28px); }
.wordmark {
  margin: 0; font-family: var(--font-display); font-weight: 900; letter-spacing: -0.02em;
  font-size: clamp(40px, 6.4vw, 92px); line-height: 0.95;
}
.tagline { margin: 0.6em 0 0; color: var(--chalk-dim); font-size: clamp(16px, 1.4vw, 20px); max-width: 52ch; }

.resume {
  grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px;
  padding: 16px 20px; border-radius: 16px; background: var(--felt-deep);
  box-shadow: inset 0 0 0 2px var(--chalk-faint);
}
.resume-text { flex: 1 1 260px; }
.resume-text strong { display: block; font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.resume-text span { color: var(--chalk-dim); }

.panel {
  background: rgba(6, 34, 26, 0.55); border-radius: 18px; padding: clamp(18px, 2vw, 28px);
  box-shadow: inset 0 0 0 1px var(--chalk-faint);
}
.panel h2 { margin: 0 0 16px; font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -0.01em; }
.drop {
  display: grid; gap: 4px; width: 100%; padding: 22px; text-align: left; border-radius: 14px;
  background: transparent; border: 2px dashed rgba(244, 236, 214, 0.35); color: var(--chalk);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.drop:hover, .drop.is-drag { background: rgba(244, 236, 214, 0.07); border-color: var(--ivory); }
.drop-title { font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.drop-sub { color: var(--chalk-dim); }
.templates { margin: 12px 0 0; color: var(--chalk-dim); }
.templates a { color: var(--chalk); font-weight: 700; }

.notice { margin: 16px 0 0; padding: 12px 14px; border-radius: 12px; background: rgba(0, 0, 0, 0.25); border-left: 4px solid var(--chalk-dim); }
.notice.is-ok { border-color: #6fcf97; }
.notice.is-warn { border-color: var(--focus); }
.notice.is-error { border-color: #ff7a63; }
.notice strong { display: block; }
.notice ul { margin: 6px 0 0; padding-left: 1.2em; color: var(--chalk-dim); }

.game-list { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; }
.game-list li { display: flex; gap: 6px; align-items: stretch; }
.game-item {
  flex: 1; display: grid; gap: 2px; text-align: left; padding: 12px 16px; border-radius: var(--r-tile);
  background: rgba(244, 236, 214, 0.06); border: 2px solid transparent; color: var(--chalk);
}
.game-item:hover { background: rgba(244, 236, 214, 0.12); }
.game-item.is-selected { background: var(--ivory); color: var(--ink); box-shadow: 0 4px 0 var(--tile-edge); }
.gi-title { font-weight: 700; font-size: 18px; }
.gi-meta { font-size: 15px; opacity: 0.75; }

.field { border: 0; margin: 0 0 22px; padding: 0; }
.field > legend, .field > label.label { display: block; font-weight: 700; margin-bottom: 8px; padding: 0; }
.hint { margin: -4px 0 10px; color: var(--chalk-dim); font-size: 15px; }
.text-input {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: var(--r-btn);
  background: rgba(0, 0, 0, 0.28); border: 2px solid var(--chalk-faint); color: var(--chalk);
}
.text-input:focus { border-color: var(--ivory); outline: none; }

.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.seg button {
  min-width: 52px; min-height: 44px; padding: 8px 14px; border-radius: var(--r-btn);
  background: rgba(0, 0, 0, 0.22); border: 2px solid var(--chalk-faint); font-weight: 700;
}
.seg button[aria-checked='true'] { background: var(--ivory); color: var(--ink); border-color: var(--ivory); }
.seg button[disabled] { opacity: 0.4; cursor: not-allowed; }

.team-names { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.team-name { display: flex; align-items: center; gap: 10px; }
.token { width: 22px; height: 22px; border-radius: 5px; background: var(--c); flex: none; box-shadow: 0 3px 0 rgba(0, 0, 0, 0.3); }

.check { display: flex; align-items: baseline; gap: 10px; padding: 6px 0; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--ivory); transform: translateY(3px); flex: none; }
.check .muted { color: var(--chalk-dim); font-size: 15px; }
.muted { color: var(--chalk-dim); }
.start-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.btn-start { font-family: var(--font-display); font-size: 20px; padding: 0.7em 1.4em; min-height: 56px; }
.start-error { color: #ffb3a6; margin: 0; }

/* ---------- Game screen ---------- */
.game {
  height: 100vh; height: 100dvh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  gap: var(--gap); padding: var(--pad);
}
.topbar { display: flex; align-items: center; gap: 16px; min-height: 44px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 16px; }
.round-label { flex: 1; display: flex; align-items: baseline; gap: 14px; min-width: 0; }
.round-name { font-family: var(--font-display); font-weight: 700; font-size: clamp(16px, 1.6vw, 26px); white-space: nowrap; }
.game-title { color: var(--chalk-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tools { display: flex; gap: 4px; }

.board {
  display: grid; min-height: 0; gap: var(--gap);
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  grid-template-rows: minmax(0, 1.05fr) repeat(var(--rows), minmax(0, 1fr));
}
.cat {
  margin: 0; min-width: 0; min-height: 0; border-radius: var(--r-tile); padding: 6px 10px;
  background: var(--felt-deep); box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.45);
  display: grid;
}
.fit { display: grid; place-items: center; overflow: hidden; min-height: 0; min-width: 0; }
.fit > div { width: 100%; text-align: center; }
.cat .fit > div {
  font-family: var(--font-display); font-weight: 700; line-height: 1.12; letter-spacing: -0.01em;
  overflow-wrap: break-word; hyphens: auto;
}
.tile {
  container-type: size; min-width: 0; min-height: 0; border: 0; border-radius: var(--r-tile); padding: 0;
  background: linear-gradient(180deg, var(--ivory-hi), var(--ivory) 55%, var(--ivory-lo));
  color: var(--ink); font-family: var(--font-display); font-weight: 900; letter-spacing: -0.02em;
  box-shadow: 0 5px 0 var(--tile-edge), 0 10px 16px rgba(0, 0, 0, 0.35);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  margin-bottom: 5px;
}
.tile span { font-size: min(22cqw, 44cqh); line-height: 1; }
.tile:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--tile-edge), 0 14px 20px rgba(0, 0, 0, 0.4); }
.tile:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--tile-edge), 0 4px 8px rgba(0, 0, 0, 0.3); }
.socket {
  min-height: 0; border-radius: var(--r-tile); margin-bottom: 5px;
  background: rgba(0, 0, 0, 0.16); box-shadow: inset 0 4px 12px rgba(0, 0, 0, 0.45);
}

.scores { display: grid; grid-template-columns: repeat(var(--teams), minmax(0, 1fr)); gap: var(--gap); }
.team {
  display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px;
  align-items: center; text-align: left; padding: clamp(8px, 1vw, 16px) clamp(12px, 1.4vw, 22px);
  border-radius: 14px; background: var(--felt-rail); border: 0; color: var(--chalk);
  box-shadow: inset 0 0 0 1px var(--chalk-faint);
}
.team:hover { box-shadow: inset 0 0 0 2px var(--chalk-dim); }
.team .team-token {
  grid-row: 1 / 3; width: clamp(18px, 2.2vw, 34px); height: clamp(18px, 2.2vw, 34px); border-radius: 22%;
  background: var(--c); box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35);
}
.team-label { font-weight: 700; font-size: clamp(14px, 1.2vw, 20px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--chalk-dim); }
.team-score { font-family: var(--font-display); font-weight: 700; font-size: clamp(22px, 2.8vw, 50px); line-height: 1.05; letter-spacing: -0.02em; }
.team-score.is-neg { color: #ff9a87; }

/* ---------- Overlays and cards ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 10; display: grid; padding: clamp(10px, 2vw, 32px);
  background: rgba(5, 26, 20, 0.72); backdrop-filter: blur(3px);
}
.card {
  min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden;
  background: linear-gradient(180deg, var(--ivory-hi), var(--ivory) 40%, var(--ivory-lo));
  color: var(--ink); border-radius: var(--r-card);
  box-shadow: 0 8px 0 var(--tile-edge), 0 30px 60px rgba(0, 0, 0, 0.55);
  transform-origin: 0 0;
}
.card-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 20px;
  padding: clamp(14px, 2vw, 30px) clamp(18px, 2.6vw, 44px) 0;
  font-family: var(--font-display); font-weight: 700; font-size: clamp(16px, 1.8vw, 30px);
}
.card-cat { color: var(--ink-soft); min-width: 0; }
.card-value { white-space: nowrap; }
.card-body { min-height: 0; padding: clamp(12px, 2vw, 32px) clamp(18px, 3vw, 56px); display: grid; }
.card.is-animating .card-head, .card.is-animating .card-body, .card.is-animating .host-bar { opacity: 0; }
.card-head, .card-body, .host-bar { transition: opacity 0.2s ease; }

.clue-layout { min-height: 0; display: grid; gap: clamp(16px, 3vw, 48px); grid-template-columns: minmax(0, 1fr); }
.clue-layout.has-image { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
.clue-figure { margin: 0; min-height: 0; display: grid; place-items: center; }
.clue-figure img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; }
.img-missing { color: var(--wrong); font-weight: 700; text-align: center; padding: 20px; border: 2px dashed currentColor; border-radius: 12px; }
.clue-col { min-height: 0; display: flex; flex-direction: column; gap: clamp(10px, 2vh, 24px); }
.clue-text { flex: 1 1 auto; }
.clue-text > div { font-weight: 700; line-height: 1.22; overflow-wrap: break-word; }
.clue-response {
  flex: none; text-align: center; padding-top: clamp(10px, 2vh, 22px);
  border-top: 3px solid rgba(27, 37, 32, 0.15);
}
.clue-response p {
  margin: 0; font-family: var(--font-display); font-weight: 700; color: var(--right);
  font-size: clamp(22px, 3.6vw, 64px); line-height: 1.12; letter-spacing: -0.01em; overflow-wrap: anywhere;
}
.clue-response .none { color: var(--ink-soft); font-size: clamp(18px, 2vw, 30px); }

.host-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
  padding: clamp(10px, 1.4vw, 18px) clamp(14px, 2vw, 32px);
  background: rgba(27, 37, 32, 0.07); border-top: 1px solid rgba(27, 37, 32, 0.12);
}
.host-bar { font-size: clamp(15px, 1vw, 19px); }
.host-bar .spacer { flex: 1; }
.card .muted { color: var(--ink-soft); }
.marks { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.mark-group { display: flex; align-items: center; gap: 6px; }
.mark-name { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-right: 4px; max-width: 16ch; }
.mark-name span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mark-name .team-token { width: 16px; height: 16px; border-radius: 4px; background: var(--c); flex: none; }
.mark-btn {
  min-height: 40px; padding: 6px 12px; border-radius: 8px; font-weight: 700;
  background: transparent; border: 2px solid rgba(27, 37, 32, 0.25); color: var(--ink);
}
.mark-btn:hover { border-color: var(--ink); }
.mark-btn.ok[aria-pressed='true'] { background: var(--right); border-color: var(--right); color: #fff; }
.mark-btn.no[aria-pressed='true'] { background: var(--wrong); border-color: var(--wrong); color: #fff; }

/* Wild Square and Final Square */
.center-stack { align-self: center; justify-self: center; width: min(100%, 980px); display: grid; gap: clamp(12px, 2.4vh, 26px); text-align: center; }
.big-title {
  margin: 0; font-family: var(--font-display); font-weight: 900; letter-spacing: -0.03em; line-height: 0.95;
  font-size: clamp(44px, 9vw, 168px); color: var(--tomato);
}
.big-sub { margin: 0; font-size: clamp(17px, 1.7vw, 26px); color: var(--ink-soft); }
.plaque {
  justify-self: center; padding: 0.5em 0.9em; border-radius: 16px; background: var(--felt);
  color: var(--ivory); font-family: var(--font-display); font-weight: 700; font-size: clamp(26px, 4vw, 72px);
  line-height: 1.1; box-shadow: inset 0 3px 14px rgba(0, 0, 0, 0.45);
}
.team-pick { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.pick {
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 18px;
  border-radius: 12px; background: transparent; border: 2px solid rgba(27, 37, 32, 0.25); font-weight: 700; color: var(--ink);
}
.pick .team-token { width: 18px; height: 18px; border-radius: 4px; background: var(--c); }
.pick small { font-weight: 400; color: var(--ink-soft); }
.pick[aria-pressed='true'] { background: var(--ink); color: var(--ivory); border-color: var(--ink); }
.pick[aria-pressed='true'] small { color: var(--chalk-dim); }
.wager-input {
  justify-self: center; width: min(320px, 100%); min-height: 64px; text-align: center; padding: 8px 14px;
  font-family: var(--font-display); font-weight: 700; font-size: 32px; color: var(--ink);
  background: #fff; border: 3px solid rgba(27, 37, 32, 0.25); border-radius: 12px;
}
.wager-input:focus { border-color: var(--ink); outline: none; }
.wager-input[disabled] { opacity: 0.5; }
.form-error { margin: 0; min-height: 1.4em; color: var(--wrong); font-weight: 700; }
.wager-rows { display: grid; gap: 10px; justify-self: center; width: min(100%, 720px); }
.wager-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(120px, 200px); align-items: center; gap: 14px; text-align: left; }
.wager-row .mark-name { max-width: none; font-size: 20px; }
.wager-row .wager-input { width: 100%; min-height: 52px; font-size: 24px; }
/* Final Square wagers: hide the digits, the caret and the selection, so nothing reveals how long the number is. */
.secret { position: relative; display: block; }
.secret-input { color: transparent; caret-color: transparent; }
.secret-input::selection { color: transparent; background: transparent; }
.secret-input::placeholder { color: var(--ink-soft); font-family: var(--font-text); font-size: 17px; font-weight: 400; }
.secret-mask {
  position: absolute; inset: 0; display: none; place-items: center; pointer-events: none;
  font-weight: 700; font-size: 18px; color: var(--right);
}
.secret-input:not(:placeholder-shown) + .secret-mask { display: grid; }
.timer { height: 10px; border-radius: 99px; background: rgba(27, 37, 32, 0.12); overflow: hidden; }
.timer-fill { height: 100%; width: 100%; background: var(--tomato); transform-origin: left center; }
.timer.is-running .timer-fill { animation: drain 30s linear forwards; }
@keyframes drain { to { transform: scaleX(0); } }
.timer-done { color: var(--wrong); font-weight: 700; }

/* Standings */
.standings { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; width: min(100%, 760px); justify-self: center; }
.standings li {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px;
  padding: 12px 18px; border-radius: 14px; background: rgba(27, 37, 32, 0.06); text-align: left;
}
.standings li:first-child { background: var(--felt); color: var(--ivory); }
.standings .team-token { width: 26px; height: 26px; border-radius: 6px; background: var(--c); }
.standings .s-name { font-weight: 700; font-size: clamp(18px, 1.8vw, 28px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.standings .s-score { font-family: var(--font-display); font-weight: 700; font-size: clamp(20px, 2.4vw, 40px); }
.winner { margin: 0; font-family: var(--font-display); font-weight: 900; font-size: clamp(34px, 6vw, 110px); line-height: 1; letter-spacing: -0.03em; color: var(--winner, var(--tomato)); }

.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 20; }
.confetti i {
  position: absolute; top: -40px; width: 14px; height: 14px; border-radius: 3px; background: var(--c);
  animation: fall var(--d) cubic-bezier(.3, .1, .6, 1) var(--delay) forwards;
}
@keyframes fall { to { transform: translate(var(--x), 110vh) rotate(var(--r)); } }

/* ---------- Dialogs and toast ---------- */
.dlg {
  border: 0; padding: 0; border-radius: 18px; width: min(460px, calc(100vw - 32px));
  background: var(--ivory); color: var(--ink); box-shadow: 0 6px 0 var(--tile-edge), 0 30px 60px rgba(0, 0, 0, 0.5);
}
.dlg::backdrop { background: rgba(5, 26, 20, 0.6); }
.dlg-body { padding: 22px 24px; display: grid; gap: 14px; }
.dlg h2 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 22px; }
.dlg p { margin: 0; color: var(--ink-soft); }
.dlg label { display: grid; gap: 6px; font-weight: 700; }
.dlg input {
  min-height: 46px; padding: 8px 12px; border-radius: 10px; border: 2px solid rgba(27, 37, 32, 0.25); background: #fff; color: var(--ink);
}
.dlg-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.menu-list { display: grid; gap: 4px; }
.menu-list button {
  text-align: left; padding: 12px 14px; border-radius: 10px; background: transparent; border: 0; font-weight: 700; color: var(--ink);
  display: flex; justify-content: space-between; gap: 12px;
}
.menu-list button:hover { background: rgba(27, 37, 32, 0.08); }
.menu-list button span { font-weight: 400; color: var(--ink-soft); }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; }
.keys dt { font-weight: 700; white-space: nowrap; }
.keys dd { margin: 0; color: var(--ink-soft); }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 30; transform: translate(-50%, 20px); opacity: 0;
  padding: 10px 18px; border-radius: 10px; background: var(--ink); color: var(--ivory); font-weight: 700;
  pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Small screens ---------- */
@media (max-width: 860px) {
  .home { grid-template-columns: minmax(0, 1fr); }
  .team-names { grid-template-columns: minmax(0, 1fr); }
  .brand-name, .game-title { display: none; }
  .clue-layout.has-image { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 0.8fr) minmax(0, 1fr); }
  .wager-row { grid-template-columns: minmax(0, 1fr) minmax(110px, 160px); }
  .wager-row .muted { display: none; }
}
@media (max-width: 560px) {
  .scores { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile { margin-bottom: 3px; box-shadow: 0 3px 0 var(--tile-edge); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .confetti { display: none; }
}
