/* Live Bingo — arena at night.
   Dark bowl, a spotlight on the court, basketball-orange for anything that
   has happened, gold for anything worth points. Display type is loud
   (Bungee, Barlow Condensed); reading type stays the system font so a fan
   glancing between the court and a phone never has to work at it. */

:root {
  --bg: #0a0e1f;
  --bg-2: #141a36;
  --bg-3: #1d2550;
  --ink: #f3f5ff;
  --muted: #97a2c9;
  --line: rgba(255, 255, 255, 0.09);

  --ball: #ff7a1a;
  --ball-deep: #d9500a;
  --ball-shadow: #8f3300;
  --gold: #ffc83d;
  --gold-dim: #c7902a;
  --hot: #ff3d6e;
  --mint: #3ef0a8;
  --violet: #7b5cff;

  --display: "Bungee", "Impact", system-ui, sans-serif;
  --condensed: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;

  /* The ball: used for the logo's O and the tick on every marked square. */
  --ball-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cdefs%3E%3CradialGradient id='g' cx='35%25' cy='30%25' r='75%25'%3E%3Cstop offset='0' stop-color='%23ffb36b'/%3E%3Cstop offset='.55' stop-color='%23ff7a1a'/%3E%3Cstop offset='1' stop-color='%23c24400'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='50' cy='50' r='47' fill='url(%23g)' stroke='%232a1000' stroke-width='3'/%3E%3Cg fill='none' stroke='%232a1000' stroke-width='3.2'%3E%3Cpath d='M50 3v94M3 50h94'/%3E%3Cpath d='M17 15c20 18 20 52 0 70M83 15c-20 18-20 52 0 70'/%3E%3C/g%3E%3C/svg%3E");
  /* Just the seams, as a watermark inside a marked square. */
  --seams-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='white' stroke-opacity='.2' stroke-width='3'%3E%3Ccircle cx='50' cy='50' r='47'/%3E%3Cpath d='M50 3v94M3 50h94M17 15c20 18 20 52 0 70M83 15c-20 18-20 52 0 70'/%3E%3C/g%3E%3C/svg%3E");
  /* Half-court: centre circle and the line, drawn faintly under everything. */
  --court-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 400'%3E%3Cg fill='none' stroke='white' stroke-opacity='.06' stroke-width='2'%3E%3Cpath d='M0 200h400'/%3E%3Ccircle cx='200' cy='200' r='70'/%3E%3Ccircle cx='200' cy='200' r='22'/%3E%3C/g%3E%3C/svg%3E");
}

* { box-sizing: border-box; }

html { background: var(--bg); }
html, body {
  margin: 0;
  color: var(--ink);
  font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior-y: contain;
}

/* Fixed layer rather than background-attachment, which iOS ignores. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60% 40% at 15% 0%, rgba(255, 122, 26, 0.22), transparent 70%),
    radial-gradient(55% 45% at 95% 5%, rgba(123, 92, 255, 0.22), transparent 70%),
    radial-gradient(80% 50% at 50% 110%, rgba(255, 200, 61, 0.08), transparent 70%),
    var(--court-svg) center 62% / min(140vw, 760px) no-repeat,
    var(--bg);
}

#app {
  max-width: 560px;
  margin: 0 auto;
  padding: env(safe-area-inset-top) 12px calc(20px + env(safe-area-inset-bottom));
}

.hidden { display: none !important; }

.screen:not(.hidden) { animation: screen-in 320ms cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes screen-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* ----------------------------------------------------------------- brand */
.brand { text-align: center; padding: 34px 0 6px; }
.logo {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(38px, 12vw, 54px);
  line-height: 0.95;
  letter-spacing: 0.01em;
  color: var(--gold);
  text-shadow: 0 3px 0 var(--ball-shadow), 0 0 28px rgba(255, 122, 26, 0.45);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}
.logo .live-word {
  font-size: 0.42em;
  letter-spacing: 0.3em;
  color: #fff;
  text-shadow: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  margin-bottom: 0.15em;
}
.logo .ball {
  display: inline-block;
  width: 0.82em;
  height: 0.82em;
  vertical-align: -0.02em;
  margin-left: 0.04em;
  background: var(--ball-svg) center / contain no-repeat;
  filter: drop-shadow(0 3px 0 var(--ball-shadow));
  animation: dribble 1.8s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}
@keyframes dribble {
  0%, 100% { transform: translateY(-0.1em) rotate(0deg); }
  45% { transform: translateY(0.08em) rotate(90deg) scaleY(0.94); }
  50% { transform: translateY(0.1em) rotate(100deg) scale(1.04, 0.9); }
}
.tagline {
  color: var(--muted);
  margin: 10px 0 0;
  font-size: 14px;
}

/* Pulsing red dot: something is happening right now. */
.dot {
  width: 0.55em;
  height: 0.55em;
  border-radius: 50%;
  background: var(--hot);
  box-shadow: 0 0 0 0 rgba(255, 61, 110, 0.7);
  animation: pulse 1.6s ease-out infinite;
  flex: none;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 61, 110, 0.7); }
  70% { box-shadow: 0 0 0 0.6em rgba(255, 61, 110, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 61, 110, 0); }
}

.scoreline {
  text-align: center;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  padding: 12px 0 20px;
  font-size: 14px;
}
#join-scoreline {
  font-family: var(--condensed);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--ink);
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  margin: 16px 0 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* ------------------------------------------------------------------ join */
#join-form { display: grid; gap: 14px; margin-top: 6px; }
#join-form label { display: grid; gap: 6px; }
#join-form span {
  font-family: var(--condensed);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
#join-form input {
  background: var(--bg-2);
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  color: var(--ink);
  font-size: 18px; /* >=16px so iOS does not zoom on focus */
  font-weight: 600;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
#join-form input:focus {
  outline: none;
  border-color: var(--ball);
  box-shadow: 0 0 0 4px rgba(255, 122, 26, 0.2);
}

/* Chunky arcade button: a solid shadow underneath that it presses into. */
button {
  font-family: var(--condensed);
  background: linear-gradient(180deg, #ff9a45, var(--ball) 55%, var(--ball-deep));
  color: #2a0f00;
  border: 0;
  border-radius: 14px;
  padding: 15px 16px 14px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 5px 0 var(--ball-shadow), 0 10px 24px rgba(255, 122, 26, 0.25);
  transition: transform 90ms ease, box-shadow 90ms ease, filter 160ms ease;
  -webkit-tap-highlight-color: transparent;
}
button:hover:not(:disabled) { filter: brightness(1.07); }
button:active:not(:disabled) {
  transform: translateY(4px);
  box-shadow: 0 1px 0 var(--ball-shadow), 0 4px 12px rgba(255, 122, 26, 0.2);
}
button:disabled { opacity: 0.5; cursor: default; }
button:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.fineprint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  margin-top: 24px;
  padding: 12px 14px;
  border: 1px dashed var(--line);
  border-radius: 12px;
}

/* ------------------------------------------------------------------ game */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 0 -12px 10px;
  padding: 10px 14px;
  font-variant-numeric: tabular-nums;
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(10, 14, 31, 0.82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.score {
  font-family: var(--condensed);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.score .tm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--ink);
}
.score .num {
  font-family: var(--display);
  font-weight: 400;
  font-size: 20px;
  color: var(--gold);
  min-width: 1.6em;
  text-align: center;
}
.score .num.bump { animation: bump 500ms ease; }
@keyframes bump {
  30% { transform: scale(1.35); color: #fff; }
}
.score .vs { color: var(--muted); font-weight: 500; }

/* A team's colour, as a little jersey swatch. */
.chip {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: var(--c, var(--muted));
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.55);
  flex: none;
}

.clock {
  font-family: var(--condensed);
  color: var(--gold);
  font-weight: 700;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.clock.final { color: var(--muted); }

/* Mute switch. Small and quiet: it sits beside the clock, not on the court. */
.sound-toggle {
  flex: none;
  width: 38px;
  height: 38px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
  border-radius: 50%;
  background: var(--bg-3);
  border: 1px solid var(--line);
  box-shadow: none;
}
.sound-toggle:active:not(:disabled) { transform: scale(0.92); box-shadow: none; }
.sound-toggle[aria-pressed="false"] { opacity: 0.6; }

.joinbanner {
  background: linear-gradient(90deg, rgba(255, 122, 26, 0.16), rgba(123, 92, 255, 0.1));
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  color: #d7ddf5;
  margin-bottom: 12px;
}

/* ------------------------------------------------------------------ card */
.grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  padding: 8px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.cell {
  position: relative;
  aspect-ratio: 1;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.15;
  overflow: hidden;
  /* No auto-hyphenation: at this cell width it produces "an of-fensive
     rebound", which reads worse than a slightly ragged wrap. */
  overflow-wrap: break-word;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.25);
  transition: background 220ms ease, transform 160ms ease, border-color 220ms ease;
}
.cell.rare { border-color: rgba(255, 200, 61, 0.4); }

/* Free space: the ball itself, sitting in the middle of the card. */
.cell.free {
  color: #fff;
  font-family: var(--display);
  font-weight: 400;
  font-size: 11px;
  background: radial-gradient(circle at 50% 50%, rgba(255, 200, 61, 0.25), transparent 70%), var(--bg-3);
  border-color: rgba(255, 200, 61, 0.6);
}
.cell.free::before {
  content: "";
  position: absolute;
  inset: 12%;
  background: var(--ball-svg) center / contain no-repeat;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.4));
}
.cell.free { isolation: isolate; }
.cell.free::before { z-index: -1; }
.cell.free { text-shadow: 0 1px 0 #2a1000, 0 0 4px #2a1000, 0 0 8px #2a1000; }

/* Marked: daubed in ball orange, seams showing through. */
.cell.marked,
.cell.marked[data-odds] {
  background:
    var(--seams-svg) 210% 210% / 140% no-repeat,
    linear-gradient(160deg, #ff8a2e, #ee6410 45%, #c24400);
  border-color: #ffb36b;
  color: #fff;
  font-weight: 800;
  text-shadow: 0 1px 0 rgba(70, 15, 0, 0.9), 0 0 6px rgba(70, 15, 0, 0.6);
  box-shadow: inset 0 -3px 0 rgba(120, 30, 0, 0.45), 0 0 16px rgba(255, 122, 26, 0.35);
}
.cell.marked::after {
  /* the corner of the watermark is dim; keep it that way */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.25), transparent 55%);
  pointer-events: none;
}
.cell.marked.free { color: #fff; }

.cell.just-marked { animation: stamp 640ms cubic-bezier(0.2, 1.4, 0.4, 1); z-index: 2; }
@keyframes stamp {
  0% { transform: scale(1.7) rotate(-10deg); opacity: 0.2; }
  45% { transform: scale(0.9) rotate(3deg); opacity: 1; box-shadow: 0 0 0 0 rgba(255, 200, 61, 0.9); }
  75% { transform: scale(1.06) rotate(0); box-shadow: 0 0 0 14px rgba(255, 200, 61, 0); }
  100% { transform: scale(1); }
}

.cell.in-line { outline: 2px solid var(--gold); outline-offset: -2px; }

/* A fresh deal: squares flip in, left to right, top to bottom. */
.grid.deal .cell { animation: deal 520ms cubic-bezier(0.2, 1.2, 0.4, 1) both; }
@keyframes deal {
  from { opacity: 0; transform: translateY(-14px) rotateX(70deg) scale(0.85); }
  to { opacity: 1; transform: none; }
}
.grid.deal .cell:nth-child(5n + 1) { animation-delay: calc(var(--row, 0) * 60ms + 0ms); }
.grid.deal .cell:nth-child(5n + 2) { animation-delay: calc(var(--row, 0) * 60ms + 30ms); }
.grid.deal .cell:nth-child(5n + 3) { animation-delay: calc(var(--row, 0) * 60ms + 60ms); }
.grid.deal .cell:nth-child(5n + 4) { animation-delay: calc(var(--row, 0) * 60ms + 90ms); }
.grid.deal .cell:nth-child(5n + 5) { animation-delay: calc(var(--row, 0) * 60ms + 120ms); }
.grid .cell:nth-child(n + 6) { --row: 1; }
.grid .cell:nth-child(n + 11) { --row: 2; }
.grid .cell:nth-child(n + 16) { --row: 3; }
.grid .cell:nth-child(n + 21) { --row: 4; }

/* ----------------------------------------------------------------- stats */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 14px 0;
  text-align: center;
}
.stats div {
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 4px 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.stats strong {
  display: block;
  font-family: var(--display);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.1;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 14px rgba(255, 200, 61, 0.35);
}
.stats strong.bump { animation: bump 520ms ease; }
.stats span {
  font-family: var(--condensed);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ---------------------------------------------------------------- ticker */
.ticker {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 6px 12px;
  font-size: 13px;
  color: #c4cbe6;
  min-height: 60px;
}
.ticker::before {
  content: "Play-by-play";
  display: block;
  font-family: var(--condensed);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  padding: 4px 0 4px;
}
.ticker div { padding: 5px 0; border-top: 1px solid var(--line); }
.ticker div:first-of-type { animation: tick-in 380ms ease; color: var(--ink); }
@keyframes tick-in {
  from { opacity: 0; transform: translateX(-12px); background: rgba(255, 200, 61, 0.15); }
  to { opacity: 1; transform: none; }
}
.ticker .t-clock {
  font-family: var(--condensed);
  font-weight: 700;
  color: var(--gold-dim);
  font-variant-numeric: tabular-nums;
  margin-right: 8px;
}

/* ----------------------------------------------------------- leaderboard */
.board {
  margin-top: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 12px;
}
.board summary {
  cursor: pointer;
  padding: 12px 0;
  font-family: var(--condensed);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.board summary::-webkit-details-marker { display: none; }
.board summary::after { content: "▾"; transition: transform 200ms ease; }
.board[open] summary::after { transform: rotate(180deg); }
.board h3 { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin: 14px 0 6px; }
.board table { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 8px; }
.board td { padding: 8px 4px; border-top: 1px solid var(--line); }
.board td:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.board .rank {
  display: inline-block;
  min-width: 1.8em;
  font-family: var(--condensed);
  font-weight: 800;
  color: var(--muted);
}
.board tr.me td {
  color: var(--gold);
  font-weight: 800;
  background: rgba(255, 200, 61, 0.08);
}
.board tr.me td:first-child { border-radius: 8px 0 0 8px; }
.board tr.me td:last-child { border-radius: 0 8px 8px 0; }

/* ----------------------------------------------------------------- toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  max-width: calc(100vw - 32px);
  background: linear-gradient(180deg, #ffd766, var(--gold));
  color: #2a1800;
  font-family: var(--condensed);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.03em;
  padding: 12px 22px;
  border-radius: 999px;
  z-index: 50;
  box-shadow: 0 4px 0 var(--gold-dim), 0 12px 30px rgba(0, 0, 0, 0.45);
  animation: rise 360ms cubic-bezier(0.2, 1.4, 0.4, 1);
}
@keyframes rise {
  from { transform: translate(-50%, 24px) scale(0.8); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

/* -------------------------------------------------------- celebrations
   The layer for points that float off a square, confetti, and the big slam.
   Never takes a tap: it sits over the card the fan is still reading. */
#fx {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 60;
  overflow: hidden;
}
.float-pts {
  position: fixed;
  transform: translate(-50%, -50%);
  font-family: var(--display);
  font-size: 22px;
  color: var(--gold);
  -webkit-text-stroke: 1px #3a1800;
  text-shadow: 0 3px 0 var(--ball-shadow), 0 0 18px rgba(255, 200, 61, 0.7);
  animation: float-up 1100ms cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
  white-space: nowrap;
}
@keyframes float-up {
  0% { opacity: 0; transform: translate(-50%, -30%) scale(0.5); }
  15% { opacity: 1; transform: translate(-50%, -80%) scale(1.25); }
  100% { opacity: 0; transform: translate(-50%, -260%) scale(1); }
}
.confetti {
  position: absolute;
  top: -20px;
  width: 9px;
  height: 14px;
  border-radius: 2px;
}
.slam {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  background: radial-gradient(circle at 50% 45%, rgba(255, 122, 26, 0.35), rgba(10, 14, 31, 0.55) 60%);
  animation: slam-bg 2200ms ease forwards;
}
.slam b {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(64px, 22vw, 120px);
  line-height: 1;
  color: var(--gold);
  -webkit-text-stroke: 2px #3a1800;
  text-shadow: 0 6px 0 var(--ball-shadow), 0 0 40px rgba(255, 200, 61, 0.8);
  animation: slam-in 2200ms cubic-bezier(0.2, 1.5, 0.4, 1) forwards;
}
.slam span {
  font-family: var(--condensed);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  animation: slam-sub 2200ms ease forwards;
}
@keyframes slam-in {
  0% { transform: scale(3) rotate(-8deg); opacity: 0; }
  18% { transform: scale(0.92) rotate(-4deg); opacity: 1; }
  28% { transform: scale(1.04) rotate(-4deg); }
  80% { transform: scale(1) rotate(-4deg); opacity: 1; }
  100% { transform: scale(1.1) rotate(-4deg); opacity: 0; }
}
@keyframes slam-sub {
  0%, 20% { opacity: 0; transform: translateY(12px); }
  32%, 80% { opacity: 1; transform: none; }
  100% { opacity: 0; }
}
@keyframes slam-bg {
  0% { opacity: 0; }
  10%, 80% { opacity: 1; }
  100% { opacity: 0; }
}
.shake { animation: shake 420ms ease; }
@keyframes shake {
  20% { transform: translate(-4px, 2px) rotate(-0.6deg); }
  40% { transform: translate(4px, -2px) rotate(0.6deg); }
  60% { transform: translate(-3px, 1px); }
  80% { transform: translate(2px, 0); }
}

@media (min-width: 420px) {
  .cell { font-size: 11px; }
  .cell.free { font-size: 13px; }
}

/* ---------------------------------------------------------------- editor */
.edhint {
  display: block;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 400;
  margin-top: 4px;
}

/* The first thing the editor says: these squares are yours to change. */
.edcallout {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 4px 0 12px;
  padding: 12px 14px;
  border: 1px solid var(--gold-dim);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 200, 61, 0.14), rgba(255, 122, 26, 0.06));
  box-shadow: 0 0 24px rgba(255, 200, 61, 0.12);
}
.edcallout p { margin: 0; font-size: 15px; line-height: 1.4; }
.edcallout b { color: var(--gold); }
.edcallout-icon { font-size: 22px; line-height: 1.1; }

/* Every square that can be changed says so, quietly. */
.cell .edit-mark {
  position: absolute;
  bottom: 2px;
  right: 5px;
  font-size: 11px;
  color: var(--gold);
  opacity: 0.55;
}
.cell.editable:hover .edit-mark { opacity: 1; }

/* First visit only: a tip, and the squares nudging to show they are buttons. */
.coach-tip {
  width: fit-content;
  margin: 0 auto 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--gold);
  color: #2a1600;
  font-family: var(--condensed);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.03em;
  animation: coach-bob 1.4s ease-in-out infinite;
}
@keyframes coach-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}
.grid.coach .cell.editable {
  animation: coach-nudge 2.8s ease-in-out 1.2s infinite;
}
.grid.coach .cell.editable:nth-child(3n) { animation-delay: 1.4s; }
.grid.coach .cell.editable:nth-child(3n + 1) { animation-delay: 1.6s; }
@keyframes coach-nudge {
  0%, 70%, 100% { transform: none; border-color: var(--line); }
  76% { transform: rotate(-2deg) scale(1.04); border-color: var(--gold); }
  84% { transform: rotate(2deg) scale(1.04); border-color: var(--gold); }
  92% { transform: none; }
}
.edactions { margin-top: 14px; display: grid; gap: 12px; }
.edactions button { width: 100%; }
button.secondary {
  background: transparent;
  color: var(--gold);
  border: 2px solid var(--gold-dim);
  box-shadow: none;
  padding: 11px;
  font-size: 17px;
}
button.secondary:active:not(:disabled) { transform: translateY(2px); box-shadow: none; }
button.secondary::before { content: "🎲 "; }

/* Whose players the card draws from. */
.pool {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  font-family: var(--condensed);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.seg {
  display: flex;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.seg button {
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 16px;
  font-weight: 800;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.seg button:active:not(:disabled) { transform: scale(0.96); box-shadow: none; }
.seg button[aria-pressed='true'] {
  background: linear-gradient(180deg, #ff9a45, var(--ball));
  color: #2a0f00;
}

/* Join: who the card is built around. Full width, so long nicknames fit. */
.cheer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--condensed);
  font-size: 15px;
  font-weight: 700;
}
.cheer .seg button { flex: 1; justify-content: center; }
.cheer-note {
  margin: 0;
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
}

/* A square's worth, shown on the tile itself. */
.cell .pts {
  position: absolute;
  top: 3px;
  right: 4px;
  font-family: var(--condensed);
  font-size: 10px;
  font-weight: 800;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  text-shadow: none;
}
.cell.marked .pts { color: #fff3c4; }
.cell.editable { cursor: pointer; }
.cell.editable:hover { border-color: var(--gold); transform: translateY(-2px); }
.cell.editable:active { transform: scale(0.94); }
.cell.custom { border-color: rgba(255, 200, 61, 0.6); }
.cell.custom::before {
  content: "✎";
  position: absolute;
  top: 2px;
  left: 4px;
  font-size: 9px;
  color: var(--gold);
  opacity: 0.8;
}

/* ---------------------------------------------------------------- picker */
.sheet {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 16, 0.72);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 40;
  animation: fade 200ms ease;
}
@keyframes fade { from { opacity: 0; } }
.sheet-inner {
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2) 30%);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px 22px 0 0;
  padding: 10px 16px calc(20px + env(safe-area-inset-bottom));
  width: 100%;
  max-width: 560px;
  display: grid;
  gap: 12px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.5);
  animation: sheet-up 320ms cubic-bezier(0.2, 1, 0.3, 1);
}
.sheet-inner::before {
  /* grab handle */
  content: "";
  justify-self: center;
  width: 40px;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.25);
}
@keyframes sheet-up { from { transform: translateY(100%); } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.sheet-head strong {
  font-family: var(--condensed);
  font-size: 20px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.sheet-head button {
  background: transparent;
  color: var(--gold);
  font-size: 17px;
  padding: 6px 4px;
  width: auto;
  box-shadow: none;
}
.pk-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pk-row > span {
  font-family: var(--condensed);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.pk-row select {
  flex: 1;
  max-width: 64%;
  background: var(--bg);
  color: var(--ink);
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  font-size: 16px;
  font-weight: 600;
}
.pk-row select:focus { outline: none; border-color: var(--ball); }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper button {
  width: 44px;
  padding: 7px 0;
  font-size: 22px;
  line-height: 1;
  background: var(--bg);
  color: var(--ink);
  border: 2px solid var(--line);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.4);
}
.stepper button:active:not(:disabled) { transform: translateY(3px); box-shadow: none; }
.stepper output {
  min-width: 50px;
  text-align: center;
  font-family: var(--display);
  font-size: 22px;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.pk-preview {
  background: var(--bg);
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.5;
}
.pk-preview b { color: var(--gold); font-variant-numeric: tabular-nums; }
.pk-preview .odds { color: var(--muted); }
.pk-preview.risky {
  border-color: rgba(255, 200, 61, 0.55);
  background: linear-gradient(135deg, rgba(255, 200, 61, 0.08), transparent 60%), var(--bg);
}

/* ------------------------------------------------- expected delivery shading
   A square's fill encodes how often it lands. Likely squares read as solid and
   settled; long shots recede and pick up a gold edge, so a card's risk profile
   is legible at a glance without reading a single number. Marked squares
   override all of it — once it has happened, the odds no longer matter. */
.cell[data-odds="vhigh"] { background: #27347a; }
.cell[data-odds="high"]  { background: #212c66; }
.cell[data-odds="mid"]   { background: #1b2452; }
.cell[data-odds="low"]   { background: #151c40; }
.cell[data-odds="vlow"]  {
  background:
    repeating-linear-gradient(135deg, rgba(255, 200, 61, 0.06) 0 6px, transparent 6px 12px),
    #10152f;
  border-color: rgba(255, 200, 61, 0.55);
  color: #f1dcae;
}
.cell[data-odds="vlow"] .pts { color: #ffd86b; }

.odds-legend {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 12px 0 8px;
  font-family: var(--condensed);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.odds-legend i {
  width: 18px;
  height: 12px;
  border-radius: 4px;
  border: 1px solid var(--line);
  display: inline-block;
}
.odds-legend i.vhigh { background: #27347a; }
.odds-legend i.high { background: #212c66; }
.odds-legend i.mid { background: #1b2452; }
.odds-legend i.low { background: #151c40; }
.odds-legend i.vlow {
  background: repeating-linear-gradient(135deg, rgba(255, 200, 61, 0.2) 0 3px, transparent 3px 6px), #10152f;
  border-color: rgba(255, 200, 61, 0.55);
}
.odds-legend .sep { flex: 1; }

.cell .odds {
  position: absolute;
  bottom: 3px;
  left: 4px;
  font-family: var(--condensed);
  font-size: 9.5px;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.cell.marked .odds { color: rgba(255, 255, 255, 0.8); }

.longshot-count { color: var(--gold); font-weight: 800; }
.longshot-count.full { color: #ff8f7a; }

.ed-odds {
  color: var(--muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  margin: 12px 0 0;
  text-align: center;
}
.ed-odds b {
  font-family: var(--display);
  font-weight: 400;
  color: var(--gold);
  font-size: 17px;
}
.ed-warn {
  border-left: 4px solid #ff8f7a;
  background: rgba(255, 143, 122, 0.1);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
  margin: 12px 0 0;
  animation: shake 420ms ease;
}

/* ---------------------------------------------------------------- lobby */
.lobby-group { margin-top: 24px; }
.lobby-group h2 {
  font-family: var(--condensed);
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.lobby-group h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}
.lobby-note { color: var(--muted); font-size: 13px; margin: -4px 0 10px; }
.lobby-list { display: grid; gap: 8px; }

/* A whole row is the tap target: thumbs on a phone, not a link. */
.lobby-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 14px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 800;
  text-transform: none;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
}
.lobby-item:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35); }
.lobby-item:hover:not(:disabled) { filter: none; border-color: rgba(255, 255, 255, 0.2); }
.lobby-item:disabled { opacity: 0.45; }
.lobby-item .matchup { flex: 1; display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.lobby-item .matchup .at { color: var(--muted); font-weight: 500; }
.lobby-item .when {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
/* Team colours bleed in from each end of the row. */
.lobby-item[style*="--away"] {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--away) 45%, transparent), transparent 38%),
    linear-gradient(180deg, var(--bg-3), var(--bg-2));
}
.lobby-item::after {
  content: "›";
  font-size: 24px;
  color: var(--muted);
  line-height: 1;
}
.lobby-item:disabled::after { content: ""; }
/* A game in progress is the one most people want; make it findable. */
.lobby-item.in { border-color: rgba(62, 240, 168, 0.45); }
.lobby-item.in .when { color: var(--mint); }
.lobby-item.running { border-color: rgba(255, 200, 61, 0.5); box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35), 0 0 22px rgba(255, 200, 61, 0.12); }
.lobby-item .dot { font-size: 14px; }

.linkish {
  background: none;
  box-shadow: none;
  color: var(--muted);
  border: 0;
  padding: 0 0 14px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  display: block;
  margin: 0 auto;
}
.linkish:active:not(:disabled) { transform: none; box-shadow: none; }

/* ------------------------------------------------------------- box score */
/* Wide screens only. The card column slides left and the box takes the right. */
.boxpanel { display: none; }
@media (min-width: 1080px) {
  :root { --boxoff: max(16px, calc((100vw - 1024px) / 2)); }
  body:has(#game:not(.hidden)) #app { margin-left: var(--boxoff); }
  .boxpanel {
    display: block;
    position: fixed;
    top: 16px;
    left: calc(var(--boxoff) + 584px);
    width: 440px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(20, 26, 54, 0.88);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }
}
.boxhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.boxhead h2 {
  margin: 0;
  font-family: var(--condensed);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.boxhead .seg button { padding: 5px 12px; font-size: 14px; }
.box-empty, .box-note, .box-legend { color: var(--muted); font-size: 13px; margin: 8px 0; }
.box-legend { display: flex; align-items: center; gap: 6px; margin-top: 0; }

.boxtable {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 14px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.boxtable th, .boxtable td { padding: 4px 4px; text-align: right; }
.boxtable thead th {
  font-family: var(--condensed);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--line);
}
.boxtable thead th:first-child { color: var(--ink); font-size: 15px; font-weight: 800; }
.boxtable th[scope="row"] {
  text-align: left;
  font-weight: 600;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-left: 3px solid transparent;
  padding-left: 6px;
}
.boxtable tr.oncard th[scope="row"] { border-left-color: var(--gold); color: var(--gold); }
.boxtable tr.quiet { opacity: 0.45; }
.boxtable td.zero { color: var(--muted); }
.boxtable tfoot th, .boxtable tfoot td { border-top: 1px solid var(--line); font-weight: 800; }

/* A number the card is waiting on: gold outline. Landed: filled orange. */
.boxtable td.hit, .lg {
  background: rgba(255, 200, 61, 0.16);
  box-shadow: inset 0 0 0 1px var(--gold-dim);
  color: var(--gold);
  font-weight: 800;
  border-radius: 5px;
}
.boxtable td.hit.done, .lg.done {
  background: linear-gradient(180deg, #ff9a45, var(--ball));
  box-shadow: none;
  color: #2a0f00;
}
.lg { display: inline-block; width: 14px; height: 14px; margin-left: 6px; }
.lg:first-child { margin-left: 0; }

.cstat {
  padding: 10px 12px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-2);
}
.cstat-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.cstat-who { font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.cstat-num { font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.cstat-num b { color: var(--ink); font-size: 18px; }
.cstat-bar { height: 6px; margin: 8px 0 6px; border-radius: 999px; background: var(--bg-3); overflow: hidden; }
.cstat-bar i { display: block; height: 100%; border-radius: inherit; background: var(--gold); transition: width 400ms ease; }
.cstat-label { font-size: 12px; color: var(--muted); }
.cstat.done { opacity: 0.7; }
.cstat.done .cstat-bar i { background: var(--ball); }
.cstat.done .cstat-num { color: var(--ball); }

/* ------------------------------------------------------------------ deck */
/* Every card open on this screen. A strip of chips on phones; on a big screen
   a rail of live mini cards to the left of the one in focus. */
.topbar-actions { display: flex; gap: 6px; flex: none; }
#deck-add { color: var(--gold); font-size: 20px; font-weight: 800; }

button.deckchip,
button.mini-open,
button.mini-close,
button.mini-add,
button.back-to-cards {
  font-family: var(--condensed);
  text-transform: none;
  letter-spacing: 0.02em;
  box-shadow: none;
  transition: border-color 160ms ease, background 160ms ease, transform 90ms ease;
}
button.deckchip:active:not(:disabled),
button.mini-open:active:not(:disabled),
button.mini-add:active:not(:disabled),
button.back-to-cards:active:not(:disabled) { transform: scale(0.97); box-shadow: none; }

.deckbar {
  display: flex;
  gap: 8px;
  margin: 0 -12px;
  padding: 10px 12px 2px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.deckbar::-webkit-scrollbar { display: none; }

button.deckchip {
  position: relative;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  padding: 6px 12px 5px;
  border-radius: 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  scroll-snap-align: start;
}
button.deckchip.on { background: var(--bg-3); border-color: var(--gold); }
button.deckchip.deck-more {
  justify-content: center;
  color: var(--gold);
  border-style: dashed;
  border-color: var(--gold-dim);
  background: transparent;
}

.deck-score { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.deck-score b { font-family: var(--display); font-weight: 400; font-size: 0.9em; color: var(--gold); }
.deck-tm { display: inline-flex; align-items: center; gap: 4px; }
.deck-dash, .deck-wait { color: var(--muted); }
.deck-when { color: var(--muted); font-size: 12px; font-weight: 600; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.deck-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 22px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--ball);
  color: #2a0f00;
  font: 800 12px/1.4 var(--condensed);
  text-align: center;
}
.hot { animation: deck-hot 1.4s ease-in-out infinite; }
@keyframes deck-hot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 200, 61, 0); }
  50% { box-shadow: 0 0 0 4px rgba(255, 200, 61, 0.45), 0 0 22px rgba(255, 200, 61, 0.35); }
}

button.deck-close { display: block; margin: 14px auto 0; }

button.back-to-cards {
  display: block;
  width: 100%;
  margin: 0 0 14px;
  padding: 11px;
  font-size: 17px;
  font-weight: 800;
  color: var(--gold);
  background: transparent;
  border: 2px solid var(--gold-dim);
}

.lobby-item.mine { border-color: var(--gold-dim); }
.lobby-item.mine .when { color: var(--gold); }

/* Switching cards slides the new one in from the side the deck moved to. */
#game.slide-next :is(.joinbanner, .grid, .stats, .ticker) { animation: slide-next 260ms cubic-bezier(0.2, 0.8, 0.2, 1); }
#game.slide-prev :is(.joinbanner, .grid, .stats, .ticker) { animation: slide-prev 260ms cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes slide-next { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes slide-prev { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }

/* The rail only exists on big screens with more than one card open. */
.deckrail { display: none; }
@media (min-width: 1320px) {
  body.multi { --railw: 232px; --boxoff: max(16px, calc((100vw - 1024px - 256px) / 2)); }
  body.multi:has(#game:not(.hidden)) #app { margin-left: calc(var(--boxoff) + 256px); }
  body.multi .boxpanel { left: calc(var(--boxoff) + 256px + 584px); }
  body.multi .deckbar { display: none; }
  body.multi .deckrail {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: fixed;
    top: 16px;
    left: var(--boxoff);
    width: var(--railw);
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 2px 6px 6px 2px;
  }
}
.deckrail h2 {
  margin: 0 0 2px;
  font-family: var(--condensed);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.deckrail h2 span { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; }

.mini { position: relative; border-radius: 14px; }
button.mini-open {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding: 10px;
  border-radius: 14px;
  background: rgba(20, 26, 54, 0.88);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  text-align: left;
}
button.mini-open:hover:not(:disabled) { filter: none; border-color: rgba(255, 255, 255, 0.22); }
.mini.on button.mini-open { border-color: var(--gold); background: var(--bg-3); }
.mini-head { display: flex; flex-direction: column; gap: 1px; padding-right: 18px; }
.mini-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; }
.mini-grid i {
  aspect-ratio: 1;
  border-radius: 4px;
  background: var(--bg-3);
  border: 1px solid var(--line);
}
.mini-grid i.m { background: linear-gradient(180deg, #ff9a45, var(--ball-deep)); border-color: transparent; }
.mini-grid i.f { background: var(--ball-svg) center / 80% no-repeat, var(--bg-3); }
.mini-grid i.new { animation: mini-new 900ms ease-out; }
@keyframes mini-new {
  0% { transform: scale(1.5); box-shadow: 0 0 0 3px var(--gold); }
  100% { transform: none; box-shadow: none; }
}
.mini-foot { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 14px; }
.mini-foot b { color: var(--gold); font-family: var(--display); font-weight: 400; }
.mini-foot .deck-badge { position: static; }
button.mini-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  opacity: 0;
}
.mini:hover button.mini-close, button.mini-close:focus-visible { opacity: 1; }
button.mini-close:hover:not(:disabled) { color: var(--ink); background: var(--bg-2); }
button.mini-add {
  padding: 12px;
  border-radius: 14px;
  background: transparent;
  border: 2px dashed var(--gold-dim);
  color: var(--gold);
  font-size: 16px;
  font-weight: 800;
}

@media (prefers-reduced-motion: reduce) {
  .coach-tip, .grid.coach .cell.editable, .hot { animation: none; }
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
  }
  .slam, .slam b, .slam span { animation-duration: 2200ms !important; }
  .slam b { animation-name: slam-sub !important; }
}
