/* Triple Take's look: the light table (David's pick, 2026-11-08;
   docs/triple-take.md, "Its look"). A photographer's light table, a cool
   lit glass with a faint grid, the cards laid on it like prints, your picks
   circled in grease-pencil pink. The cards are the only strong color on
   the screen. This file is the tokens (the house's, the room kit's and the
   game's own: the cards) and the cards themselves; it's loaded before the
   room's structure (games/room/room.css), the table (table.css) after it.
   The Django pages (games/templates/triple-take/page.html) wear just this.

   Faces, both OFL and bundled in fonts/: Bricolage Grotesque (the display:
   the title, the big numbers) and Figtree (everything else). */

@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 600 800; font-display: swap; src: url("fonts/bricolage-grotesque-600-800-latin.c47ac31e5437.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("fonts/figtree-400-800-latin.392aed3eb142.woff2") format("woff2"); }

:root {
  /* the house's (docs/guide/design/tokens.md) */
  --t-display: clamp(32px, 7vw, 44px); --t-heading: 20px; --t-body: 16px; --t-label: 16px; --t-note: 14px;
  --s1: 4px; --s2: 8px; --s3: 16px; --s4: 24px; --s5: 40px;
  --pick-tint: color-mix(in srgb, currentColor 14%, transparent);
  --pick-ring: inset 0 0 0 2px currentColor;
  --pick-weight: 700;

  /* the cards: white prints, lit from the top */
  --card-hi: #ffffff; --card-lo: #f3f1ec; --card-edge: #d3cbb9;
  --card-shadow: 0 1px 1px rgba(23, 33, 49, .18), 0 3px 8px rgba(23, 33, 49, .14);
  /* the light table: the glass, its grid, the board's own pane */
  --glass: #e9eef3; --grid: rgba(60, 90, 130, .09); --pane: #f7fafc; --pane-edge: #c6d1dc;
  /* the stage: a dark band over the glass for a moment (announce.js) */
  --stage: #172131; --stage-ink: #ffffff;
  /* the grease pencil: what you've picked */
  --pencil: #c4127a;

  /* the room kit's (docs/guide/design/tokens.md, "Color jobs"), on the light table */
  --room: #dfe6ed;
  --table: linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 32px 32px, linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 32px 32px, radial-gradient(ellipse at 40% 25%, #f8fafc, #e9eef3 60%, #dfe6ed);
  --rail: 0 solid transparent;
  --rail-radius: 0;
  --panel: #ffffff;
  --panel-edge: 1px solid #cfd8e2;
  --panel-radius: 14px;
  --sheet: #ffffff;
  --chip: #ffffff;
  --chip-edge: 1px solid #cfd8e2;
  --chip-radius: 10px;
  --ink: #172131;
  --soft: #4d5868;
  --turn: #c4127a;
  --good: #1f7a4d;
  --bad: #b42318;
  --focus: #172131;
  --btn: #172131;
  --btn-ink: #ffffff;
  --btn-edge: 2px solid #172131;
  --btn2: transparent;
  --btn2-ink: #172131;
  --btn2-edge: 1.5px solid #172131;
  --btn-radius: 10px;
  --btn-weight: 700;
  --confirm: #b42318;
  --confirm-ink: #ffffff;
  --turn-ink: #ffffff;
  --seat-ink: #111;
  --field-edge: 1.5px solid #9aa7b6;
  --ui-font: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --display: "Bricolage Grotesque", "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --display-weight: 800;
  /* a win's confetti: the cards' own colors and the pencil */
  --house-cheer: #14358a, #e5322d, #ffcb05, #c4127a;

  color-scheme: light;
}

body { background: var(--room); color: var(--ink); }

/* ── a card (cards.js): a white print with one to three shapes ───────── */
.ttcard {
  all: unset; box-sizing: border-box; position: relative; display: block; width: 100%; aspect-ratio: 100 / 64;
  border-radius: 8%/12.5%; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; touch-action: manipulation;
}
.ttcard .ttface { display: block; width: 100%; height: 100%; filter: drop-shadow(0 1.5px 2px rgba(23, 33, 49, .2)); }
button.ttcard { cursor: pointer; }
.ttcard::after { content: ""; position: absolute; inset: -5px; border-radius: 16px; pointer-events: none; border: 0 solid transparent; }
button.ttcard:focus-visible::after { border: 3px solid var(--focus); }
@media (hover: hover) { button.ttcard:not([disabled]):hover .ttface { filter: drop-shadow(0 3px 5px rgba(23, 33, 49, .28)); } }
/* picked: lifted, circled in grease pencil */
.ttcard.picked { transform: translateY(-4px); }
.ttcard.picked::after { border: 3.5px solid var(--pencil); }
/* taken: ringed in the finder's seat color (their mark on the corner) */
.ttcard.taken::after { border: 4px solid var(--seat, var(--ink)); }
/* a wrong trio: a dashed ring in the bad color, and one shake (Never only color: dashed) */
.ttcard.wrong::after { border: 3.5px dashed var(--bad); }
.ttcard.wrong { animation: ttshake 360ms ease-in-out 1; }
@keyframes ttshake { 25% { transform: translateX(-4px) rotate(-1.5deg); } 50% { transform: translateX(4px) rotate(1.2deg); } 75% { transform: translateX(-2px); } }
/* new: three just dealt, until the next trio's taken */
.ttcard .ttnew { position: absolute; z-index: 2; top: -9px; right: 8%; font: 800 11px/1.4 var(--ui-font); background: var(--ink); color: #fff; border-radius: 999px; padding: 0 7px; pointer-events: none; }
.ttcard .ttbadge { position: absolute; z-index: 2; top: -11px; left: -9px; width: 24px; height: 24px; }
.ttcard[disabled] { cursor: default; }
@media (prefers-reduced-motion: no-preference) { .ttcard { transition: transform 120ms; } }
@media (prefers-reduced-motion: reduce) { .ttcard.wrong { animation: none; } }
