/* Tock board. Seat colours come from --s0..--s9 in app.css. */
.tk-s0 { --tk: var(--s0); } .tk-s1 { --tk: var(--s1); } .tk-s2 { --tk: var(--s2); } .tk-s3 { --tk: var(--s3); }
.tk-s4 { --tk: var(--s4, #f97316); } .tk-s5 { --tk: var(--s5, #14b8a6); } .tk-s6 { --tk: var(--s6, #ef4444); }
.tk-s7 { --tk: var(--s7, #84cc16); } .tk-s8 { --tk: var(--s8, #06b6d4); } .tk-s9 { --tk: var(--s9, #f59e0b); }

.tk-wrap {
  position: relative;
  width: min(100%, 74vh, 760px);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
}
.tk-svg { display: block; width: 100%; height: 100%; }
/* The board itself, in the image of the one Ian drew: pearl-white stock with
   a grey rim, coloured bases and lanes, and wells you can see into. (His
   board art has 41 track holes; this game's track is 72, so the look is
   borrowed and the geometry stays the engine's.) */
.tk-rim { fill: #f2efe6; stroke: #b9c0c9; stroke-width: 10; }
.tk-hole { fill: #cfd3d8; stroke: #9aa2ad; stroke-width: 2; }
.tk-start { fill: rgba(0, 0, 0, 0.35); stroke: var(--tk); stroke-width: 6; }
.tk-lane, .tk-basehole { fill: color-mix(in srgb, var(--tk) 26%, #e8e5db); stroke: var(--tk); stroke-width: 3.5; stroke-opacity: 0.95; }
.tk-name { fill: var(--tk); font-size: 34px; font-weight: 800; paint-order: stroke; stroke: #fffdf6; stroke-width: 6px; }

/* the marble layer: one <button><img></button> per marble, placed in board
   percentages over the SVG (see board() in tock.js for why not <image>) */
.tk-board { position: relative; width: 100%; height: 100%; }   /* fills the square .tk-wrap; the layer matches the svg exactly */
.tk-marbles { position: absolute; inset: 0; pointer-events: none; }
.tk-marble {
  /* 8% of the square board each way: the generous finger target the old hit
     circle gave; the marble itself is the middle half, as a background */
  position: absolute; width: 8%; height: 8%; min-height: 0; padding: 0; border: 0;
  background-color: transparent;
  transform: translate(-50%, -50%); border-radius: 50%; pointer-events: auto; cursor: pointer;
}
/* the marble is drawn, not loaded: a glass ball in the seat's colour from two
   radial gradients. Playwright's WebKit died painting the same buttons with a
   webp behind them (2026-09-21), and it had died on SVG <image>s and on <img>
   before that; gradients survived every cycle. No raster, nothing to decode. */
.tk-marble::before {
  content: ""; position: absolute; inset: 25%; border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.95) 0, rgba(255, 255, 255, 0.55) 18%, rgba(255, 255, 255, 0) 42%),
    radial-gradient(circle at 50% 55%, color-mix(in srgb, var(--tk) 80%, #fff) 0, var(--tk) 45%, color-mix(in srgb, var(--tk) 55%, #000) 100%);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.45), inset 0 -2px 3px rgba(0, 0, 0, 0.25);
}
.tk-marble.tk-can { background-color: color-mix(in srgb, var(--accent) 35%, transparent); box-shadow: 0 0 0 3px var(--accent); }
.tk-marble.tk-chosen { background-color: rgba(255, 255, 255, 0.35); box-shadow: 0 0 0 4px #fff; }
.tk-hit { fill: transparent; }
.tk-ball { fill: var(--tk); stroke: #0b1325; stroke-width: 3; }
.tk-ball-img { pointer-events: none; }
.tk-shine { fill: rgba(255, 255, 255, 0.55); pointer-events: none; }
.tk-can .tk-ball { stroke: var(--accent); stroke-width: 7; }   /* no keyframes inside the SVG: WebKit */
/* A ring behind the marble rather than a drop-shadow filter: filters on these
   pieces crash WebKit (see the card note). */
.tk-can .tk-hit { fill: var(--accent); fill-opacity: 0.3; }
.tk-chosen .tk-hit { fill: #fff; fill-opacity: 0.35; }
.tk-chosen .tk-ball { stroke: #fff; stroke-width: 8; }


.tk-center {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: grid; justify-items: center; gap: 6px; pointer-events: none;
  --cw: clamp(40px, 6.6vmin, 70px); --ch: calc(var(--cw) * 1.4);   /* a % here resolves against itself */
}
.tk-center .card { width: var(--cw); height: var(--ch); }
.tk-round {
  /* sits under the played card in the hub's little stack -- it used to be pinned
     to the centre and printed across the card's face (sweep 2026-09-21) */
  white-space: nowrap; font-size: 0.85rem; font-weight: 700;
  color: rgba(15, 23, 42, 0.6); background: rgba(255, 255, 255, 0.75);
  padding: 2px 10px; border-radius: 999px;
}

.tk-last { text-align: center; color: var(--text); font-weight: 600; min-height: 1.45em; margin-bottom: 10px; }
.tk-teams { text-align: center; color: var(--muted); font-size: 0.95rem; margin-top: 10px; }

.tk-step {
  display: grid; gap: 12px; margin: 16px auto 0; max-width: 560px;
  padding: 1rem; border-radius: var(--radius);
  background: rgba(253, 224, 71, 0.07); border: 1px solid rgba(253, 224, 71, 0.45);
}
.tk-step h3 { text-align: center; font-size: 1.15rem; }
.tk-step .muted { text-align: center; }
.tk-choices { display: grid; gap: 10px; }
.tk-choice { justify-content: flex-start; text-align: left; line-height: 1.25; padding-top: 0.5rem; padding-bottom: 0.5rem; }
.tk-choice .dot { flex: 0 0 auto; }

.tk-handwrap { display: grid; gap: 8px; margin-top: 16px; }
.tk-handwrap > .muted { text-align: center; font-size: 0.9rem; }

/* The board's own furniture, under the holes: the ring the marbles travel,
   each player's lane in to the middle, the pad their marbles wait on, a ring
   round their starting hole, and the hub with its compass star. */
.tk-track { fill: none; stroke: #e3e0d4; stroke-width: 58; }
.tk-lanebar { stroke: var(--tk); stroke-width: 46; stroke-linecap: round; opacity: 0.32; }
.tk-basepad { fill: var(--tk); fill-opacity: 0.2; stroke: var(--tk); stroke-width: 3; stroke-opacity: 0.85; }
.tk-startring { fill: none; stroke: var(--tk); stroke-width: 5; opacity: 0.9; }
.tk-hub { fill: #eae7db; stroke: #c3c8cf; stroke-width: 4; }
.tk-star { fill: #b9c0c9; opacity: 0.85; }
