/* GO FISH — stylesheet.
 *
 * Spec: briefs/go-fish-spec.md (S#, L#, K#…); §n is the brief.
 *
 * THE SHARED DNA (S17 F2). Card faces, court art, backs, the gold action,
 * typography, buttons, plates, focus states, radii and spacing are the
 * catalogue's, taken from the Crazy Eights shell. The FELT is Go Fish's own
 * family (F1, option A "Lagoon", Ronan 2026-10-01). The board geometry is
 * not Crazy Eights' (F3): the opponents sit round a central pond.
 */

*,*::before,*::after{ box-sizing:border-box; }
html,body{
  margin:0; padding:0; height:100%; overflow:hidden;
  background:var(--table-deep);
}
body{
  font-family:var(--font-ui);
  color:var(--text-primary);
  -webkit-text-size-adjust:100%;
  -webkit-tap-highlight-color:transparent;
}
button{ font:inherit; color:inherit; }

:root{
  /* --- Go Fish category environment (F1). --- */
  --table-bg:#0F5F66;
  --table-deep:#0A474D;
  --table-highlight:#177A80;
  --felt-glow:rgba(150,230,225,.14);

  /* --- Shared product tokens: the catalogue's values. --- */
  --text-primary:#F6F7F4;
  --text-secondary:#D3E4E2;
  --text-muted:#AFC7C4;

  --action:#F0B84B;
  --action-text:#1A1F1D;
  --success:#62C58B;
  --danger:#E45B64;
  --active:#62C4FF;

  --card-bg:#FAFAF7;
  --card-black:#202322;
  --card-red:#CB343E;

  --line:rgba(255,255,255,.16);
  --line-soft:rgba(255,255,255,.09);
  /* A plate, not a tint (V16): captions on the felt sit on this. */
  --panel:rgba(0,0,0,.42);
  --felt-plate:rgba(3,30,33,.66);

  --space-1:4px;  --space-2:8px;  --space-3:12px;
  --space-4:16px; --space-5:24px; --space-6:32px;
  --radius:10px;

  --font-ui:'Inter',system-ui,-apple-system,'Segoe UI',sans-serif;
  --font-display:'Playfair Display',Georgia,serif;
  --font-mono:'IBM Plex Mono',ui-monospace,'SF Mono',Menlo,monospace;

  --back-red:#A6142B;
  --back-white:#F7F1E6;

  /* Avatars (T2). Identity only; never a state cue. */
  --av-maya:#E07A5F;
  --av-leo:#5FB49C;
  --av-ava:#A393D9;

  /* CARD GEOMETRY (L1): ratio 0.70. The card is held; the fan gives first. */
  --card-w:clamp(64px, min(7.6vw, 13.6dvh), 92px);
  --card-h:calc(var(--card-w) / 0.70);
  --lift:14px;
  --pond-w:clamp(48px, min(calc(var(--card-w) * 0.86), 11dvh), 80px);
  --back-w:clamp(14px, 1.5vw, 20px);
  --back-h:calc(var(--back-w) / 0.70);
  --side-seat:clamp(176px, 18vw, 232px);
  --side-col:clamp(176px, 17vw, 240px);

  /* S9: movement durations. The reading pauses live in the controller. */
  --dur-select:150ms;
  --dur-travel:380ms;
  --dur-ripple:600ms;
}

/* ------------------------------------------------------------- shell --- */

.game{
  position:relative;
  display:grid;
  /* Your books | your hand | the record of play, along the bottom. */
  grid-template-columns:var(--side-col) minmax(0,1fr) var(--side-col);
  grid-template-rows:auto minmax(0,1fr) auto auto;
  grid-template-areas:
    'header      header      header'
    'table       table       table'
    'instruction instruction instruction'
    'books       hand        hist';
  column-gap:var(--space-4);
  height:100dvh; max-height:100dvh; width:100%;
  /* L3: the felt fills the window; the layout is capped at 1320px inside it. */
  padding:
    max(var(--space-2), env(safe-area-inset-top)) max(var(--space-3), env(safe-area-inset-right), calc((100% - 1320px) / 2))
    max(var(--space-2), env(safe-area-inset-bottom)) max(var(--space-3), env(safe-area-inset-left), calc((100% - 1320px) / 2));
  row-gap:10px;
  background:
    radial-gradient(ellipse at 50% 36%, var(--table-highlight) 0%, var(--table-bg) 48%, var(--table-deep) 100%);
}

/* ------------------------------------------------------------ header --- */

.zone-header{
  grid-area:header;
  display:flex; align-items:center; justify-content:space-between;
  padding-bottom:var(--space-1);
  border-bottom:1px solid var(--line-soft);
  min-height:40px;
}
.wordmark .title{
  font-family:var(--font-display); font-weight:800;
  font-size:clamp(17px,2vw,24px); letter-spacing:.01em; white-space:nowrap;
}
.header-controls{ display:flex; align-items:center; gap:var(--space-2); }

.ctrl-btn{
  font-family:var(--font-ui); font-size:clamp(13px,1.2vw,15px); font-weight:700;
  color:var(--text-primary); background:var(--panel);
  border:1px solid var(--line); border-radius:var(--radius);
  padding:var(--space-2) var(--space-3); cursor:pointer;
  transition:border-color .16s ease, background .16s ease, filter .16s ease;
}
.ctrl-btn:hover:not(:disabled){ border-color:var(--action); }
.ctrl-btn:disabled{ opacity:.42; cursor:not-allowed; }
.ctrl-btn:focus-visible, .seat:focus-visible, .card:focus-visible, .history-more:focus-visible{
  outline:2px solid var(--active); outline-offset:2px;
}
.ctrl-btn.primary{
  background:var(--action); color:var(--action-text); border-color:var(--action);
  font-weight:800; padding:var(--space-2) var(--space-5); min-height:48px;
}
.ctrl-btn.primary:hover:not(:disabled){ filter:brightness(1.07); }
.icon-btn{
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px;
  min-width:48px; min-height:44px; padding:var(--space-1) var(--space-2); line-height:1;
}
.icon-glyph{ font-size:16px; }
.icon-label{ font-size:10px; letter-spacing:.06em; text-transform:uppercase; color:var(--text-secondary); white-space:nowrap; }
.icon-btn[aria-pressed='false'] .icon-glyph{ opacity:.55; }
/* G6: the inline confirm reads as a warning, in words as well as colour. */
.icon-btn.is-confirm{ border-color:var(--danger); background:rgba(228,91,100,.22); }
.icon-btn.is-confirm .icon-label{ color:#FFD9DC; font-weight:800; }

/* ------------------------------------------------------------- table --- */

.zone-table{
  grid-area:table; min-height:0; position:relative;
  display:grid;
  grid-template-columns:var(--side-seat) minmax(0,1fr) var(--side-seat);
  grid-template-rows:auto minmax(0,1fr);
  /* Leo along the top edge, Maya and Ava at the two sides, the pond alone in
     the middle with clear felt round it. */
  grid-template-areas:
    'left top    right'
    'left centre right';
  column-gap:var(--space-5); row-gap:var(--space-4);
  align-items:center; justify-items:center;
  padding:var(--space-4);
  border-radius:calc(var(--radius) * 1.6);
  border:1px solid var(--line-soft);
  background:radial-gradient(ellipse at 50% 55%, var(--felt-glow) 0%, transparent 60%);
}

/* ---- seats (T1–T4, I4, K2) ---- */
.seat{
  position:relative; min-height:44px; min-width:44px;
  display:flex; flex-direction:column; align-items:center; gap:var(--space-2);
  padding:var(--space-3) var(--space-4) var(--space-4);
  border-radius:calc(var(--radius) * 1.2);
  background:var(--felt-plate);
  border:2px solid transparent;
  cursor:default; text-align:center;
  width:var(--side-seat);
  transition:border-color .16s ease, background .16s ease, opacity .16s ease;
}
.seat-top{ grid-area:top; align-self:start; width:auto; min-width:min(440px, 100%); min-height:72px; flex-direction:row; align-items:center; gap:var(--space-4); padding:var(--space-3) var(--space-5); }
.seat-left{ grid-area:left; }
.seat-right{ grid-area:right; }
.seat-id{ display:flex; align-items:center; gap:var(--space-2); }
.seat-top .seat-id{ flex:none; }
.seat-body{ display:flex; flex-direction:column; align-items:center; gap:var(--space-2); }
.seat-line{ display:flex; flex-direction:column; align-items:center; gap:6px; }
.seat-top .seat-body{ flex-direction:row; flex-wrap:wrap; align-items:center; column-gap:var(--space-4); row-gap:6px; max-width:360px; }
.seat-top .seat-line{ flex-direction:row; gap:var(--space-3); }
.seat-holds:empty{ min-height:0; }
.avatar{
  width:32px; height:32px; border-radius:50%; flex:none;
  display:inline-flex; align-items:center; justify-content:center;
  background:var(--av); color:#13201F;
  font-family:var(--font-display); font-weight:800; font-size:17px;
  box-shadow:0 2px 6px rgba(0,0,0,.35), inset 0 0 0 2px rgba(255,255,255,.35);
}
.seat-name{ font-size:15px; font-weight:700; white-space:nowrap; }
.seat-marker{
  width:9px; height:9px; border-radius:50%; flex:none;
  border:1px solid var(--line); background:transparent;
}
.seat-stats{
  display:flex; gap:.5ch; justify-content:center;
  font-family:var(--font-mono); font-size:13px; font-weight:600;
  color:var(--text-secondary); white-space:nowrap; font-variant-numeric:tabular-nums;
}
.seat-backs{ display:flex; height:calc(var(--back-h) + 2px); align-items:center; }
.seat-backs .card-back{ width:var(--back-w); height:var(--back-h); margin-left:calc(var(--back-w) * -0.55); border-radius:3px; }
.seat-backs .card-back:first-child{ margin-left:0; }
.seat-row{ display:flex; align-items:center; gap:6px; flex-wrap:wrap; justify-content:center; min-height:20px; }
.seat-top .seat-row{ justify-content:flex-start; }
.row-caption{
  font-family:var(--font-mono); font-size:12px; letter-spacing:.08em;
  text-transform:uppercase; color:var(--text-muted);
}
/* P3: asked-rank chips — "holds 7, K". */
.chip{
  font-family:var(--font-mono); font-size:12px; font-weight:700; line-height:1;
  padding:3px 6px; border-radius:999px;
  background:rgba(255,255,255,.12); border:1px solid var(--line);
}
/* Book tiles: a small stacked card per book (§12 "compact form"). */
.book-tile{
  position:relative; display:inline-flex; align-items:center; justify-content:center;
  width:20px; height:27px; border-radius:3px;
  background:var(--card-bg); color:var(--card-black);
  font-family:var(--font-ui); font-weight:800; font-size:12px;
  box-shadow:2px 2px 0 rgba(250,250,247,.55), 4px 4px 0 rgba(250,250,247,.3), 0 2px 4px rgba(0,0,0,.4);
  margin-right:4px;
}

/* T4: the acting seat — outline, filled marker AND name weight. */
.seat.is-acting{ border-color:var(--active); background:rgba(6,32,52,.80); }
.seat.is-acting .seat-marker{ background:var(--active); border-color:var(--active); }
.seat.is-acting .seat-name{ font-weight:800; }

/* I4: targets. Gold outline + the words on the seat. */
.seat-ask{
  display:none;
  /* Out of flow: becoming a target must not change the seat's size (L7). */
  position:absolute; left:50%; bottom:-12px; transform:translateX(-50%); z-index:4;
  font-family:var(--font-ui); font-size:13px; font-weight:800; letter-spacing:.02em;
  color:var(--action-text); background:var(--action);
  padding:5px 10px; border-radius:999px; white-space:nowrap;
}
.seat.is-target{ border-color:var(--action); cursor:pointer; }
.seat.is-target .seat-ask{ display:inline-block; }
.seat.is-target:hover{ background:rgba(40,30,4,.55); }
.seat.is-unavailable{ opacity:.45; }

/* T5: one short reaction at a time, beside its seat. */
.bubble{
  position:absolute; z-index:5;
  font-size:13px; font-weight:700; white-space:nowrap;
  color:var(--card-black); background:var(--card-bg);
  padding:5px 10px; border-radius:12px;
  box-shadow:0 4px 12px rgba(0,0,0,.4);
}
.seat-left .bubble{ left:calc(100% + 6px); top:10px; }
.seat-right .bubble{ right:calc(100% + 6px); top:10px; }
.seat-top .bubble{ left:50%; top:calc(100% + 6px); transform:translateX(-50%); }

/* ---- centre: pond, history, beats (S8, S9, S13) ---- */
.centre{
  grid-area:centre; position:relative;
  width:100%; height:100%; min-height:0;
  display:flex; align-items:center; justify-content:center;
}
.pond{
  position:relative; flex:none;
  display:flex; flex-direction:column; align-items:center; gap:var(--space-2);
}
/* M2: two static rings — water, not an aquarium. */
.pond-water{
  position:absolute; left:50%; top:calc(var(--pond-w) / 0.70 / 2);
  width:calc(var(--pond-w) * 2.5); height:calc(var(--pond-w) * 1.75);
  transform:translate(-50%,-50%); border-radius:50%;
  border:1px solid rgba(220,255,252,.18);
  box-shadow:0 0 0 calc(var(--pond-w) * 0.28) rgba(220,255,252,.05), inset 0 0 30px rgba(0,30,34,.35);
  pointer-events:none;
}
.pond-water::after{
  content:''; position:absolute; inset:-1px; border-radius:50%;
  border:1px solid rgba(220,255,252,.3); opacity:0; transform:scale(.7);
}
.pond.is-rippling .pond-water::after{ animation:ripple var(--dur-ripple) ease-out; }
@keyframes ripple{ from{ opacity:.9; transform:scale(.7); } to{ opacity:0; transform:scale(1.25); } }
.pond-stack{ position:relative; width:var(--pond-w); height:calc(var(--pond-w) / 0.70); }
.pond-stack .card-back{ position:absolute; inset:0; width:100%; height:100%; border-radius:7px; }
.pond-stack .card-back:nth-child(2){ transform:translate(2px,-2px); }
.pond-stack .card-back:nth-child(3){ transform:translate(4px,-4px); }
.pond.is-empty .pond-stack{ opacity:.25; }
.pond-count{
  position:relative;
  font-family:var(--font-mono); font-size:13px; font-weight:700; letter-spacing:.08em;
  background:var(--felt-plate); border-radius:4px; padding:2px 8px;
  font-variant-numeric:tabular-nums; min-width:11ch; text-align:center;
}

.history{
  grid-area:hist; align-self:end; min-width:0;
  display:flex; flex-direction:column; gap:2px;
  padding:var(--space-2) var(--space-3);
  border-radius:var(--radius); background:var(--felt-plate); border:1px solid var(--line);
  max-height:100%; overflow:hidden;
}
.history[hidden]{ display:none; }
.history-caption{
  margin:0; font-family:var(--font-mono); font-size:12px; font-weight:700; letter-spacing:.12em;
  text-transform:uppercase; color:var(--text-muted);
  padding-bottom:3px; border-bottom:1px solid var(--line-soft);
}
.history-list{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:1px; }
.history-list li{ font-size:13px; line-height:1.4; color:var(--text-primary); }
.history-list li.is-yours{ color:var(--text-secondary); }
.history-list li.is-earlier{ font-family:var(--font-mono); font-size:12px; color:var(--text-muted); }
.history-more{
  display:none; align-self:flex-start;
  font-family:var(--font-mono); font-size:12px; font-weight:700;
  background:transparent; border:1px solid var(--line); border-radius:999px;
  padding:3px 9px; cursor:pointer; color:var(--text-secondary);
}

.callout, .reveal, .book-show, .result{
  position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); z-index:6;
  display:flex; flex-direction:column; align-items:center; gap:var(--space-2);
}
.callout[hidden], .reveal[hidden], .book-show[hidden], .result[hidden]{ display:none; }
.callout{
  flex-direction:row; gap:var(--space-2);
  padding:var(--space-2) var(--space-5); border-radius:999px;
  background:rgba(3,30,33,.88); border:1px solid rgba(220,255,252,.35);
  box-shadow:0 10px 30px rgba(0,0,0,.45);
}
.callout .fish{ width:36px; height:18px; fill:var(--action); }
.callout .fish circle{ fill:var(--table-deep); }
.callout-text{ font-family:var(--font-display); font-style:italic; font-weight:800; font-size:clamp(22px,2.6vw,30px); }
.reveal-card .card, .book-show-cards .card{ box-shadow:0 14px 30px rgba(0,0,0,.5); }
.reveal-caption, .book-show-caption{
  font-family:var(--font-mono); font-weight:700; font-size:14px; letter-spacing:.08em;
  background:rgba(3,30,33,.88); border:1px solid var(--line); border-radius:var(--radius);
  padding:4px 12px; white-space:nowrap;
}
.book-show-cards{ display:flex; }
.book-show-cards .card + .card{ margin-left:calc(var(--card-w) * -0.55); }

.result{
  min-width:min(360px, 92%);
  padding:var(--space-4) var(--space-5);
  border-radius:calc(var(--radius) * 1.6);
  background:rgba(3,30,33,.92); border:1px solid var(--line);
  box-shadow:0 20px 50px rgba(0,0,0,.5);
}
.result-headline{
  margin:0; font-family:var(--font-display); font-weight:800; color:var(--action);
  font-size:clamp(24px,3vw,32px); letter-spacing:.04em; text-align:center;
}
.result-standings{ list-style:none; margin:0; padding:0; width:100%; }
.result-standings li{
  font-family:var(--font-mono); font-weight:700; font-size:15px; letter-spacing:.06em;
  padding:5px 2px; border-bottom:1px solid var(--line-soft);
}
.result-standings li.is-winner{ color:var(--action); }
.result-standings li.is-winner::after{ content:'  ★'; }

.history-panel{
  position:absolute; inset:var(--space-2); z-index:20;
  display:flex; flex-direction:column; gap:var(--space-2);
  padding:var(--space-3); border-radius:var(--radius);
  background:rgba(3,30,33,.96); border:1px solid var(--line);
  overflow:auto;
}
.history-panel[hidden]{ display:none; }
.history-panel .ctrl-btn{ align-self:center; min-height:44px; }

/* -------------------------------------------------- instruction / tip --- */

.zone-instruction{ grid-area:instruction; display:flex; flex-direction:column; align-items:center; gap:6px; padding-top:2px; }
.instruction{
  font-family:var(--font-mono); font-weight:700;
  font-size:clamp(15px,1.5vw,18px); letter-spacing:.07em;
  text-align:center; min-height:34px; max-width:100%;
  display:flex; align-items:center; justify-content:center;
  padding:var(--space-1) var(--space-4);
  border-radius:var(--radius); background:var(--panel); border:1px solid var(--line-soft);
}
.game[data-phase='humanTurn'] .instruction, .game[data-phase='humanTarget'] .instruction{
  border-color:var(--action); color:#FFE7B3;
}
.instruction.is-blank{ visibility:hidden; }
.tip{
  font-size:13px; color:var(--text-secondary); min-height:18px; line-height:18px;
  text-align:center; padding:0 var(--space-2); border-radius:4px;
}
.tip:not(:empty){ background:var(--felt-plate); }

/* --------------------------------------------------------- your books --- */

.zone-books{
  grid-area:books; min-width:0;
  display:flex; flex-direction:column; align-items:flex-start; justify-content:flex-end; gap:6px;
  padding:var(--space-2) var(--space-3); align-self:end;
  border-radius:var(--radius); background:var(--felt-plate); border:1px solid var(--line-soft);
}
.books-caption, .books-count{ background:none; padding:0; white-space:nowrap; }
.books-caption, .books-count{
  font-family:var(--font-mono); font-size:12px; font-weight:700; letter-spacing:.1em;
  text-transform:uppercase; color:var(--text-muted);
  background:var(--felt-plate); border-radius:4px; padding:2px 6px;
}
.books-tiles{ display:flex; flex-wrap:wrap; align-items:center; row-gap:6px; min-height:27px; }

/* -------------------------------------------------------------- hand --- */

.player-hand{ grid-area:hand; align-self:end; }
.player-hand{
  position:relative;
  display:flex; flex-direction:column; align-items:center; justify-content:flex-end;
  width:100%;
  padding-top:calc(var(--lift) + 4px);
  min-height:calc(var(--card-h) + var(--lift) + 4px);
}
.hand-row{ display:flex; justify-content:center; align-items:flex-end; }
.hand-row + .hand-row{ margin-top:calc(var(--card-h) * -0.42); }
.hand-group{ position:relative; display:flex; align-items:flex-end; }
.ask-chip{
  /* Sits across the foot of the lifted group, over the upside-down corner
     indices, so it costs no height and never hides a rank. */
  position:absolute; left:50%; bottom:calc(var(--lift) + 6px); transform:translateX(-50%);
  font-family:var(--font-mono); font-size:12px; font-weight:800; letter-spacing:.06em; white-space:nowrap;
  color:var(--action-text); background:var(--active); border-radius:999px; padding:2px 8px;
  z-index:30; pointer-events:none;
}

/* -------------------------------------------------------------- card --- */

.card{
  position:relative; flex:none;
  width:var(--card-w); height:var(--card-h); padding:0; border:0;
  background:linear-gradient(155deg,#FFFFFF,var(--card-bg));
  border-radius:8px;
  box-shadow:0 5px 12px rgba(0,0,0,.42), inset 0 0 0 1px rgba(0,0,0,.07), inset 0 1px 0 rgba(255,255,255,.9);
  color:var(--card-black);
  font-family:var(--font-ui); font-weight:800;
  overflow:hidden;
  outline:2px solid transparent; outline-offset:0;
  transition:transform var(--dur-select) ease, box-shadow var(--dur-select) ease, outline-color var(--dur-select) ease;
}
.card.red{ color:var(--card-red); }
.court-figure{ position:absolute; z-index:1; left:50%; top:50%; transform:translate(-50%,-50%); width:70%; height:60%; display:block; }
.card-corner{ position:absolute; z-index:1; text-align:center; font-size:clamp(11px, calc(var(--card-w) * 0.20), 17px); line-height:1.06; }
.card-corner-top{ top:4px; left:4px; }
.card-corner-bottom{ right:4px; bottom:4px; transform:rotate(180deg); }
.corner-suit-upright{ display:inline-block; transform:rotate(180deg); }
.card-centre-suit{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:calc(var(--card-w) * 0.52); opacity:.9; }

.player-hand .card{ cursor:default; }
.game[data-phase='humanTurn'] .player-hand .card,
.game[data-phase='humanTarget'] .player-hand .card{ cursor:pointer; }
@media (hover:hover){
  .game[data-phase='humanTurn'] .player-hand .card:hover{ transform:translateY(-6px); }
}
/* I2: the whole rank lifts, with an outline — and the chip says it in words. */
.card.is-selected{
  transform:translateY(calc(var(--lift) * -1));
  outline-color:var(--active);
  box-shadow:0 12px 22px rgba(0,0,0,.5), 0 0 0 2px var(--active);
}

.card-back{
  width:var(--back-w); height:var(--back-h);
  border-radius:4px; flex:none;
  background:var(--back-red);
  background-image:
    repeating-linear-gradient(45deg, var(--back-white) 0, var(--back-white) 1px, transparent 1px, transparent 5px),
    repeating-linear-gradient(-45deg, var(--back-white) 0, var(--back-white) 1px, transparent 1px, transparent 5px);
  border:1px solid var(--back-white);
  box-shadow:0 2px 5px rgba(0,0,0,.4);
}

/* A card on its way somewhere (S9). Movement only; it carries nothing the
   player has to read that is not also in the instruction and the record. */
.flying{
  position:fixed; z-index:60; margin:0; pointer-events:none;
  transition-property:transform; transition-timing-function:cubic-bezier(.3,.7,.3,1);
  box-shadow:0 10px 24px rgba(0,0,0,.45);
}
.card-back.flying{ border-radius:6px; }

/* ----------------------------------------------------------- overlays --- */

.overlay{
  position:absolute; inset:0; z-index:40;
  display:none; align-items:center; justify-content:center;
  background:rgba(2,24,27,.72); backdrop-filter:blur(3px);
  padding:var(--space-4);
}
.overlay.open{ display:flex; }
.overlay-panel{
  width:min(92vw, 480px); max-height:88dvh; overflow-y:auto;
  padding:var(--space-5);
  border-radius:calc(var(--radius) * 1.6);
  background:linear-gradient(180deg, #0C3D42, #072B2F);
  border:1px solid var(--line);
  box-shadow:0 26px 70px rgba(0,0,0,.6);
  text-align:center;
}
.overlay-panel h2{
  font-family:var(--font-display); color:var(--action);
  margin:0 0 var(--space-2); font-size:clamp(22px,2.8vw,30px); letter-spacing:.02em;
}
.overlay-panel p.sub{ font-family:var(--font-mono); font-size:13px; color:var(--text-secondary); margin:0 0 var(--space-4); }
.rules-panel{ text-align:left; }
.rules-panel h2, .rules-panel p.sub{ text-align:center; }
.rules-list{ list-style:none; margin:0 0 var(--space-4); padding:0; }
.rules-list li{ font-size:14px; line-height:1.55; color:var(--text-secondary); padding:var(--space-2) 0; border-bottom:1px solid var(--line-soft); }
.rules-list li:last-child{ border-bottom:none; }
.rules-panel .ctrl-btn{ display:block; margin:0 auto; min-height:44px; }

footer{ display:none; }

/* ------------------------------------------- desktops up to 1100px --- */
/* Ronan, 2026-10-01 (option a): on the narrower desktops your books and the
   record of play move up beside the instruction, so the hand has the full
   width and a 24-card hand still fits at 64px or more. The record shows its
   latest line and "+N more". */
@media (min-width:641px) and (max-width:1100px) and (min-height:501px){
  :root{ --hist-col:clamp(200px, 24vw, 260px); }
  .game{
    grid-template-columns:var(--side-col) minmax(0,1fr) var(--hist-col);
    grid-template-areas:
      'header header      header'
      'table  table       table'
      'books  instruction hist'
      'hand   hand        hand';
  }
  .zone-books{ flex-direction:row; flex-wrap:nowrap; align-items:center; align-self:center; justify-self:start; padding:4px 10px; gap:8px; }
  .books-caption{ display:none; }
  .books-tiles{ flex-wrap:nowrap; }
  .books-tiles .book-tile{ margin-right:-3px; }
  .books-tiles .book-tile:last-child{ margin-right:4px; }
  .history{ align-self:center; flex-direction:row; align-items:center; gap:8px; padding:4px 10px; }
  .history .history-caption{ display:none; }
  .history .history-list{ flex:1; min-width:0; }
  .history .history-list li{ display:none; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .history .history-list li:last-child{ display:block; }
  .history .history-more{ display:inline-block; min-height:28px; flex:none; }
}

/* ------------------------------------------------- phones, portrait --- */
/* L4: purpose-built, not the desktop shrunk. Every seat keeps its fan of
   face-down cards (Ronan, 2026-10-01: find the space elsewhere first). */
@media (max-width:640px) and (min-height:501px){
  :root{
    --card-w:clamp(40px, min(16vw, 9dvh), 64px);
    --lift:10px;
    --pond-w:calc(var(--card-w) * 0.8);
    --back-w:9px;
  }
  .game{
    grid-template-columns:minmax(0,1fr);
    grid-template-rows:auto minmax(0,1fr) auto auto auto auto;
    grid-template-areas:'header' 'table' 'hist' 'instruction' 'books' 'hand';
    row-gap:6px; padding-left:max(8px, env(safe-area-inset-left)); padding-right:max(8px, env(safe-area-inset-right)); padding-top:max(4px, env(safe-area-inset-top));
  }
  .zone-header{ min-height:44px; }
  .wordmark .title{ font-size:17px; }
  .header-controls{ gap:4px; }
  .icon-btn{ min-width:44px; min-height:44px; padding:2px 4px; }
  .icon-label{ font-size:9px; letter-spacing:.03em; }
  .zone-table{
    grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
    grid-template-rows:auto auto;
    grid-template-areas:
      'top  top    top'
      'left centre right';
    /* Small fixed gaps; space-evenly hands out whatever height is spare, so
       tall phones get air and short ones still fit. The bottom padding
       leaves room for an ask label hanging under a side seat. */
    align-content:space-evenly;
    column-gap:10px; row-gap:8px; padding:6px 8px 14px;
  }
  .seat{ width:100%; padding:8px 6px; gap:6px; border-radius:var(--radius); }
  .seat-top{ width:auto; min-width:0; max-width:100%; min-height:44px; padding:8px 12px 11px; gap:10px; }
  .seat-top .seat-body{ column-gap:10px; }
  .seat-id{ gap:6px; }
  .avatar{ width:26px; height:26px; font-size:14px; }
  .seat-name{ font-size:14px; }
  .seat-stats{ font-size:13px; }
  /* Side seats: the count in words beside its fan, on one line. */
  .seat-left .seat-line, .seat-right .seat-line{ flex-direction:row; gap:8px; }
  .seat-left .seat-stats, .seat-right .seat-stats{ flex-direction:column; align-items:flex-start; gap:0; line-height:1.3; }
  .seat-left .stat-sep, .seat-right .stat-sep{ display:none; }
  /* The ask label is two short lines on a phone; the seat always keeps room
     for it, so becoming a target does not change its size (L7). */
  .seat-left, .seat-right{ padding-bottom:28px; }
  .seat-left .seat-ask, .seat-right .seat-ask{ bottom:-12px; text-align:center; }
  .seat-left .ask-who, .seat-right .ask-who{ display:block; }
  .ask-who, .ask-what{ white-space:nowrap; }
  .row-caption{ font-size:12px; letter-spacing:.04em; }
  .book-tile{ width:16px; height:22px; margin-right:3px; }
  .chip{ padding:2px 5px; }
  .seat-ask{ font-size:12px; padding:4px 8px; line-height:1.15; }
  /* P2 on a phone: the latest line and "+N more", under the table. */
  .history{
    width:100%; align-self:center; flex-direction:row; align-items:center; gap:8px;
    padding:4px 10px; min-height:34px;
  }
  .history .history-caption{ display:none; }
  .history .history-list{ flex:1; min-width:0; }
  .history .history-list li{ display:none; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:13px; }
  .history .history-list li:last-child{ display:block; }
  .history .history-more{ display:inline-block; flex:none; min-height:28px; }
  /* Beats and the result centre on the whole table, not the narrow pond
     cell, so their words get the table's width. */
  .centre{ position:static; }
  .callout{ white-space:nowrap; }
  .callout-text{ font-size:22px; white-space:nowrap; }
  .reveal-caption, .book-show-caption{ font-size:12px; white-space:nowrap; }
  .result{ min-width:min(300px, 88%); padding:12px 16px; }
  .result-standings li{ font-size:14px; white-space:nowrap; }
  .instruction{ font-size:13px; letter-spacing:.04em; min-height:42px; padding:3px 10px; line-height:1.3; }
  /* Two lines reserved: a tip that wraps must not move what is below it (L7). */
  .tip{ font-size:12px; line-height:16px; min-height:32px; display:flex; align-items:center; justify-content:center; }
  .tip:empty{ background:none; }
  /* Your books: a row just above the hand. */
  .zone-books{ flex-direction:row; align-items:center; justify-content:center; justify-self:center; padding:3px 10px; gap:8px; max-width:100%; }
  /* A row that never wraps or grows: with many books the tiles close up
     (each keeps its corner) rather than push the row taller or wider. */
  .books-tiles{ display:grid; grid-auto-flow:column; grid-auto-columns:minmax(9px, 19px); min-width:0; flex:0 1 auto; overflow:visible; }
  .books-tiles .book-tile{ margin-right:0; justify-self:start; }
  .books-caption, .books-count{ font-size:12px; letter-spacing:.05em; }
}

/* The shortest phones: less air, never less content. */
@media (max-width:640px) and (min-height:501px) and (max-height:600px){
  :root{ --card-w:clamp(40px, min(16vw, 8.8dvh), 64px); --lift:8px; --back-w:8px; }
  .game{ row-gap:4px; }
  .zone-table{ row-gap:4px; padding:4px 4px 13px; }
  .seat{ padding:5px 5px; gap:3px; }
  .seat-top{ padding:5px 10px 10px; }
  .seat-left, .seat-right{ padding-bottom:26px; }
  .avatar{ width:22px; height:22px; font-size:12px; }
  .history{ min-height:28px; padding:2px 8px; }
  .history .history-more{ min-height:24px; }
  .zone-books{ padding:1px 8px; }
  /* Second hand row: the first row keeps its rank AND suit in view (§6). */
  .hand-row + .hand-row{ margin-top:calc(var(--card-h) * -0.5); }
}

/* Ronan 2026-10-01, question 1: on phones under 620px tall each opponent's
   books are the count only ("2 BOOKS", always in the seat); which ranks they
   booked is in the record and the result. */
@media (max-width:640px) and (min-height:501px) and (max-height:620px){
  .seat .seat-books{ display:none; }
}
/* Ronan 2026-10-01, question 2: inside the site's frame on an iPhone SE
   (345x504) the page may scroll vertically, and ONLY when your hand has
   taken a second row (13+ cards); never sideways, nothing cut off. */
@media (max-width:640px) and (min-height:501px) and (max-height:520px){
  html[data-hand-rows="2"], html[data-hand-rows="2"] body,
  html[data-hand-rows="3"], html[data-hand-rows="3"] body{ height:auto; overflow-x:hidden; overflow-y:auto; }
  html[data-hand-rows="2"] .game, html[data-hand-rows="3"] .game{ height:auto; max-height:none; min-height:100dvh; }
  html[data-hand-rows="2"] .zone-table, html[data-hand-rows="3"] .zone-table{ min-height:var(--se-table-min, 250px); }
}
/* Question 3: a third hand row overlaps the second as the second does the first. */
.hand-row + .hand-row + .hand-row{ margin-top:calc(var(--card-h) * -0.5); }

/* ------------------------------------------------ phones, sideways --- */
/* L5: height is what runs out first; width is plentiful, so your books sit
   beside the hand as on desktop. */
@media (max-height:500px){
  :root{
    --card-w:clamp(40px, min(7.4vw, 13.5dvh), 56px);
    --lift:8px;
    --pond-w:calc(var(--card-w) * 0.72);
    --back-w:8px;
    --side-seat:clamp(132px, 20vw, 180px);
    --side-col:clamp(118px, 17vw, 190px);
    --hist-col:clamp(176px, 24vw, 240px);
  }
  /* Your books and the record of play flank the instruction, so the hand
     has the full width. */
  .game{
    grid-template-columns:var(--side-col) minmax(0,1fr) var(--hist-col);
    grid-template-areas:
      'header header      header'
      'table  table       table'
      'books  instruction hist'
      'hand   hand        hand';
    row-gap:4px; padding-top:max(3px, env(safe-area-inset-top)); padding-bottom:max(3px, env(safe-area-inset-bottom));
  }
  .zone-books{ flex-direction:row; flex-wrap:nowrap; align-items:center; align-self:center; justify-self:start; padding:3px 8px; gap:6px; }
  .books-caption{ display:none; }   /* the count says "2 books"; the zone is labelled */
  .books-tiles{ flex-wrap:nowrap; }
  .books-tiles .book-tile{ margin-right:-3px; }
  .books-tiles .book-tile:last-child{ margin-right:4px; }
  /* The result is centred on the whole table and laid out in two columns. */
  .centre{ position:static; }
  .result{ padding:10px 16px; gap:6px; min-width:0; }
  .result-headline{ font-size:20px; }
  .result-standings{ display:grid; grid-template-columns:auto auto; column-gap:18px; }
  .result-standings li{ font-size:13px; padding:2px 0; }
  .history{ align-self:center; }
  .zone-header{ min-height:30px; padding-bottom:2px; }
  .wordmark .title{ font-size:16px; }
  .icon-btn{ min-height:44px; min-width:44px; padding:1px 6px; flex-direction:row; gap:4px; }
  .zone-table{
    grid-template-rows:auto minmax(0,1fr);
    grid-template-areas:
      'left top    right'
      'left centre right';
    row-gap:6px; column-gap:var(--space-4); padding:6px 8px;
  }
  .seat{ padding:6px 8px 8px; gap:4px; }
  /* The ask label straddles the seat's lower edge; the seat keeps room under its chips for it. */
  .seat-left, .seat-right{ padding-bottom:14px; }
  .seat-top{ min-width:0; min-height:44px; padding:4px 12px 10px; }
  .seat-line{ flex-direction:row; gap:8px; }
  .seat-left .seat-stats, .seat-right .seat-stats{ flex-direction:column; align-items:flex-start; gap:0; line-height:1.3; }
  .seat-left .stat-sep, .seat-right .stat-sep{ display:none; }
  .avatar{ width:22px; height:22px; font-size:12px; }
  .seat-name{ font-size:13px; }
  .seat-stats{ font-size:13px; }
  .book-tile{ width:16px; height:21px; }
  .seat-ask{ font-size:12px; padding:3px 8px; }
  /* The record: the latest line and "+N more". */
  .history{ flex-direction:row; align-items:center; gap:6px; padding:3px 8px; }
  .history .history-caption{ display:none; }
  .history .history-list{ flex:1; min-width:0; }
  .history .history-list li{ display:none; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .history .history-list li:last-child{ display:block; }
  .history .history-more{ display:inline-block; min-height:26px; flex:none; }
  .instruction{ font-size:13px; letter-spacing:.03em; min-height:28px; padding:2px 10px; }
  .tip{ font-size:12px; min-height:16px; line-height:16px; }

  .ask-chip{ font-size:12px; }
}

/* Narrow sideways phones: the record's one line moves up into the free
   middle of the header, so the instruction has the full width. */
@media (max-height:500px) and (max-width:700px){
  .game{
    grid-template-areas:
      'header header      header'
      'table  table       table'
      'books  instruction instruction'
      'hand   hand        hand';
  }
  /* Between the title (~96px) and the four buttons (~244px). */
  .history{ grid-area:header; justify-self:start; align-self:center; margin-left:100px; max-width:calc(100% - 100px - 252px); min-width:170px; z-index:2; }
  .icon-btn{ flex-direction:column; gap:1px; padding:1px 4px; }
}

/* The shortest sideways phones: a smaller pond, never a smaller hand. */
@media (max-height:400px){
  :root{ --pond-w:calc(var(--card-w) * 0.6); }
  .pond{ gap:4px; }
  .pond-count{ font-size:13px; padding:1px 6px; }
}

/* The result on shorter screens: standings in two columns, so the whole
   result sits inside the table (S13). */
@media (max-height:720px){
  .centre{ position:static; }
  .result{ padding:12px 18px; gap:6px; box-sizing:border-box; max-width:calc(100% - 12px); }
  .result-headline{ font-size:clamp(20px,2.4vw,26px); }
  .result-standings{ display:grid; grid-template-columns:auto auto; column-gap:22px; }
  .result-standings li{ font-size:14px; padding:3px 0; white-space:nowrap; }
}
@media (max-height:720px) and (max-width:360px){
  .result{ padding:12px 12px; min-width:0; }
  .result-standings{ column-gap:12px; }
}

/* --------------------------------------------------- reduced motion --- */
/* M1: every movement is SHORTENED, never removed (a removed transition stops
   transitionend firing). The reading pauses are not motion and stay. */
@media (prefers-reduced-motion: reduce){
  :root{ --dur-select:1ms; --dur-travel:1ms; --dur-ripple:1ms; }
  .card, .ctrl-btn, .seat{ transition-duration:1ms !important; }
  .pond.is-rippling .pond-water::after{ animation-duration:1ms; }
}

/* ===================================================== 2026-10-09 release === */
/* Decisions G2-G9 (briefs/go-fish-decisions.md). Appended last so each rule
   here wins over the earlier one it replaces, at every size. */

/* G4 no pale type (rule 2026-10-04): under 16px at least 7:1 and semi-bold;
   12px floor, essentials 13px. */
.icon-label{ font-size:12px; font-weight:600; letter-spacing:.04em; color:var(--text-primary); }
.row-caption{ font-weight:600; color:var(--text-primary); }
.history-caption{ font-weight:700; color:var(--text-primary); }
.history-list li{ font-weight:600; }
.history-list li.is-yours{ color:var(--text-primary); }
.history-list li.is-earlier{ font-size:13px; font-weight:600; color:var(--text-secondary); }
.books-caption, .books-count{ font-size:13px; font-weight:700; color:var(--text-primary); }
.tip{ font-size:13px; font-weight:600; color:var(--text-primary); }
.overlay-panel p.sub{ font-weight:600; color:var(--text-primary); }
.rules-list li{ font-weight:600; color:var(--text-primary); }
.history-more{ font-size:13px; color:var(--text-primary); }

/* G6: no "+0 more" — the hidden attribute must win over the phone rules
   that show the button; and 44px with a finger. */
.history-more[hidden]{ display:none !important; }

/* G5: the result never half-covers a seat; the pond count is not left
   under Play Again. */
.game[data-phase='gameOver'] .pond-count{ visibility:hidden; }

/* G7 Coach. */
.coach-btn.is-on{ border-color:var(--action); }
.coach-btn[aria-pressed='false'] .icon-glyph{ opacity:1; }
.start-choices{ display:flex; gap:var(--space-2); justify-content:center; flex-wrap:wrap; }
.start-choice{ min-height:48px; padding:var(--space-2) var(--space-4); font-size:15px; }
.start-choice.is-remembered{ background:var(--action); color:var(--action-text); border-color:var(--action); }
.start-note{ font-size:13px; font-weight:600; color:var(--text-primary); line-height:1.45; margin:var(--space-3) 0 0; text-align:center; max-width:420px; }

/* G8 Hint: beside the instruction on desktop; on a phone, on the right of
   the "Your books" row (the controller moves the button). */
.instr-row{ display:flex; align-items:center; justify-content:center; gap:10px; max-width:100%; }
.hint-btn{ min-height:40px; padding:0 var(--space-3); flex:none; }
.seat.is-hinted{ box-shadow:0 0 0 3px var(--success, #62C58B); }

@media (pointer:coarse){
  .ctrl-btn, .history-more{ min-height:44px; }
}

@media (max-width:640px){
  /* G9: the title gives its room to readable labels and "Coach off". */
  .wordmark{ display:none; }
  .zone-header{ justify-content:flex-end; }
  .icon-label{ font-size:12px; letter-spacing:.02em; }
  .tip{ font-size:13px; line-height:17px; min-height:34px; }
  .zone-books{ justify-self:stretch; justify-content:flex-start; }
  .zone-books .hint-btn{ min-height:44px; padding:0 14px; margin-left:auto; }
  .history .history-more{ min-height:44px; }
}

/* G5 on phones and sideways: the result covers the whole table, on the
   felt (no dark overlay), so no seat is half covered. Every player's books
   are in the standings. */
@media (max-width:640px), (max-height:500px){
  .result{
    position:absolute; inset:0; left:0; top:0; transform:none; z-index:8;
    min-width:0; max-width:none; justify-content:center;
    border-radius:var(--radius);
    background:rgba(3,30,33,.97);
    border:1px solid var(--line); box-shadow:none;
  }
  /* covered whole, so nothing of a seat shows round the edges */
  .game[data-phase='gameOver'] .seat{ visibility:hidden; }
}

/* Sideways: the record's latest line wraps onto a second line rather than
   being cut with an ellipsis (the whole line is readable); book tiles close
   up by 1px only, so a "10" is never under its neighbour. */
@media (max-height:500px){
  .history .history-list li{ white-space:normal; overflow:visible; text-overflow:clip; line-height:1.25; }
  .books-tiles .book-tile{ margin-right:-1px; }
}

/* G6: "+N more" is 44px with a finger at every size (the sideways and short
   phone rules above set it lower with a more specific selector). */
@media (pointer:coarse){
  .history .history-more{ min-height:44px; }
}
/* G5 on short desktops: the result sits a little below centre so it never
   reaches the top seat (Leo) — at 1366x625 it was 8px over his plate. */
@media (min-width:641px) and (min-height:501px) and (max-height:720px){
  .result{ top:calc(50% + 12px); }
}

/* R6a (2026-10-11): the Resume button and where the saved game was */
#btnResume{ display:block; width:min(100%, 320px); min-height:44px; margin:0 auto var(--space-2); }
#btnResume[hidden], #resumeContext[hidden]{ display:none; }
.resume-context{ font-size:13px; font-weight:600; color:var(--text-primary); line-height:1.4; margin:0 auto var(--space-3); text-align:center; max-width:420px; }
@media (max-height:520px){
  #btnResume{ margin-bottom:4px; }
  .resume-context{ margin-bottom:8px; line-height:1.3; }
  #goFishStart .start-note{ margin-top:8px; line-height:1.35; }
}
@media (max-width:640px) and (min-height:501px){
  html[data-hand-rows="2"], html[data-hand-rows="3"]{ --card-w:clamp(40px, min(13.5vw, 7.6dvh), 54px); }
  html[data-hand-rows="2"] .hand-row + .hand-row, html[data-hand-rows="3"] .hand-row + .hand-row{ margin-top:calc(var(--card-h) * -0.5); }
  html[data-hand-rows="2"] .seat-left, html[data-hand-rows="2"] .seat-right,
  html[data-hand-rows="3"] .seat-left, html[data-hand-rows="3"] .seat-right{ padding-top:4px; gap:3px; }
  html[data-hand-rows="2"] .seat-left .seat-body, html[data-hand-rows="2"] .seat-right .seat-body,
  html[data-hand-rows="3"] .seat-left .seat-body, html[data-hand-rows="3"] .seat-right .seat-body{ gap:3px; }
}
/* Narrow phones (under 360 wide): an opponent's held ranks stay on one line with the
   HOLDS caption — tighter gaps, nothing removed. (2026-10-15) */
@media (max-width:359px) and (min-height:501px){
  .seat-left .seat-row, .seat-right .seat-row{ gap:3px; }
  .seat-left .row-caption, .seat-right .row-caption{ letter-spacing:0; }
  .seat-left .chip, .seat-right .chip{ padding:2px 4px; }
}

/* UX standard 2026-10-26: "Or start a new game:" above the start choices when
   something is saved; the ask-first panel. */
.start-or{ margin:4px 0 8px; font-size:14px; font-weight:700; color:var(--text-primary); }
#confirmOverlay{ z-index:45; }
.confirm-panel{ text-align:center; max-width:min(420px, 94vw); }
.confirm-panel h2{ margin:0 0 6px; }
.confirm-panel p.sub{ margin:0; }
.confirm-actions{ display:flex; justify-content:center; gap:8px; flex-wrap:wrap; margin-top:12px; }
.confirm-actions .ctrl-btn{ min-width:140px; min-height:44px; }


/* =====================================================================
   GO FISH REDESIGN (2026-11-03, briefs/classic-games-redesign-brief.md;
   decisions briefs/classic-games-redesign-decisions.md). The Hearts / Spades
   look: a dark band reaching both edges (no game name), buttons in the
   game's own accent with line icons and the label inside (52px packed on
   phones), near-black plates, the turn line in Georgia with no box.
   Cards, rules, pace and the table's own counts unchanged.
   ===================================================================== */
:root, .game{ --g-dark:rgba(3,24,26,.95); --acc-1:#DDF6F4; --acc-2:#B3E3E0; --acc-ink:#0A474D; --table-highlight:#0F5F66; --felt-glow:rgba(0,0,0,0); --felt-plate:rgba(3,24,26,.95); }

.game .zone-header{ justify-content:flex-end; background:var(--g-dark); box-shadow:0 0 0 100vmax var(--g-dark); clip-path:inset(-100vmax -100vmax 0 -100vmax); border:0; border-bottom:0; padding-top:2px; padding-bottom:2px; min-height:0; }
.game .header-controls{ margin-left:auto; gap:8px; }
.game .zone-header .icon-btn{ display:flex; flex-direction:column; align-items:center; justify-content:center; min-width:68px; height:44px; min-height:44px; padding:3px 8px;
  background:var(--acc-2) linear-gradient(var(--acc-1), var(--acc-2)); color:var(--acc-ink); border:0; border-radius:10px; box-shadow:none; }
.game .zone-header .icon-btn[aria-pressed="false"]{ background:var(--acc-ink); color:var(--acc-1); box-shadow:inset 0 0 0 2px var(--acc-2); }
.game .zone-header .icon-glyph{ font-size:0; line-height:0; margin-bottom:2px; opacity:1; filter:none; }
.game .icon-glyph svg{ width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; display:block; }
.game .icon-glyph .snd-off{ display:none; } .game #btnSound[aria-pressed="false"] .snd-on{ display:none; } .game #btnSound[aria-pressed="false"] .snd-off{ display:inline; }
.game .zone-header .icon-label{ font-family:var(--font-ui); font-size:13px; font-weight:700; text-transform:none; letter-spacing:0; white-space:nowrap; line-height:1.15; color:inherit; }
.game .instruction{ background:none; border:0; box-shadow:none; font-family:Georgia,'Times New Roman',serif; font-weight:700; letter-spacing:.02em; color:#FFE7B3; }
.game .tip, .game .tip:not(:empty){ background:none; border:0; color:#FFFFFF; }
@media (max-width:640px){
  .game .zone-header{ padding-top:4px; padding-bottom:4px; }
  .game .header-controls{ display:flex; flex:1 1 auto; width:100%; min-width:0; gap:6px; margin:0; }
  .game .zone-header .icon-btn{ flex:1 1 0; min-width:0; height:52px; min-height:52px; padding:4px 2px; }
}
@media (max-width:640px) and (max-height:540px){ .game .zone-header .icon-btn{ height:44px; min-height:44px; } }

/* Go Fish: "Your books" is your plate (rule 8) - near-black, with the gold
   "Your turn" tag while you ask (data-phase humanTurn / humanTarget). */
.game .zone-books{ background:var(--g-dark); border:1px solid rgba(255,255,255,.10); border-radius:14px; position:relative; }
.game .zone-books .books-caption, .game .zone-books .books-count{ color:#FFFFFF; font-size:13px; }
.game .gf-tag{ display:none; font-family:var(--font-ui); font-size:13px; font-weight:700; line-height:1; padding:4px 8px; border-radius:999px; background:linear-gradient(#F6D47A,#D9A93A); color:#2A1C00; white-space:nowrap; }
.game[data-phase="humanTurn"] .gf-tag, .game[data-phase="humanTarget"] .gf-tag{ display:inline-block; }
.game[data-phase="humanTurn"] .zone-books, .game[data-phase="humanTarget"] .zone-books{ box-shadow:0 0 0 2px #D9A93A; }
@media (max-width:640px){
  .game .zone-books .books-caption{ display:none; }   /* the zone is labelled; the count says "2 books" */
  .game .zone-books{ gap:6px; }
  .game .gf-tag{ padding:4px 7px; }
}
@media (min-width:1101px) and (min-height:501px){ .game .gf-tag{ position:absolute; top:12px; right:12px; } }   /* desktop: the tag sits in the plate's corner, so the plate keeps its height */
