/* frontend/pachisi.css — Pachisi board, both layouts and both schemes.
 *
 * ⛔ WHY THIS IS ITS OWN FILE AND NOT A BLOCK IN style.css. Every other game's
 * board lives at the end of style.css. This one does not, because Pachisi and
 * Senet were built in PARALLEL SESSIONS on the same checkout and both wanted to
 * append to the end of that file — two appends to one file, with no merge
 * between them, is a silent-clobber waiting to happen. chat.css is the
 * precedent for a game-adjacent stylesheet of its own. Nothing else changes:
 * the scheme variables still cascade in, LayoutSchemes still paints the subtree,
 * and BoardFit still measures `.pc-root`.
 *
 * ── Colour is data ──────────────────────────────────────────────────────────
 * Every colour below is a variable declared in the two scheme blocks at the top.
 * CLASSIC is an embroidered cloth in aged cotton and muted dyes; ARCADE is the
 * SAME cloth lit up. Identical markup, identical geometry — only variables move.
 *
 * ── The two layouts are separate arrangements, not one shrunk ───────────────
 * MOBILE is authored unscaled: track cells are 28px ACROSS the direction of
 * travel and 18px ALONG it, so a row through the centre is 8x18 + 3x28 + 8x18 =
 * 372px and the cross fits a 390px phone with its corner panels intact. ⭐ The
 * cells are NOT square, and that is the whole phone answer: you read the piece,
 * not the length, so the axis that carries tokens got BIGGER (25 -> 28) while
 * the axis that carries nothing shrank. An embroidered pachisi cloth looks like
 * this anyway.
 * DESKTOP is the same proportion at 48 x 32 (board 656) inside a 1240 x 812
 * design box that BoardFit scales as one unit. See the arithmetic in pachisi.js.
 */

/* ── CLASSIC (default) ───────────────────────────────────────────────────── */
/* ⛔⛔ THE SCREEN CARRIES THE PALETTE, NOT JUST THE BOARD. Three surfaces live
   OUTSIDE .pc-root — the setup card, the confirm sheet and the capture banner —
   and every one of them styles itself from these vars. Defined on .pc-root
   alone they were out of scope for all three, so each ran on its var() FALLBACK:
   the setup card fell back to a LIGHT-surface pair (#222 on rgba(255,255,255,.05))
   and was unreadable on the dark page. A fallback that happens to match is not
   scope. */
#pachisi-game-screen, .pc-root {
  --pc-table: radial-gradient(120% 100% at 50% -10%, #3a2c1e 0%, #271d13 55%, #17110b 100%);
  --pc-cloth: linear-gradient(150deg, #c3ac83, #a9906a);
  --pc-cloth-edge: rgba(60, 44, 28, .5);
  --pc-cell: #e7dcc0;
  --pc-line: rgba(72, 54, 34, .26);
  --pc-castle: #cdb282;
  --pc-castle-line: rgba(72, 54, 34, .5);
  --pc-panel: #efe5cd;
  --pc-panel-line: rgba(72, 54, 34, .28);
  --pc-txt: #f2e9d6;
  --pc-dim: rgba(242, 233, 214, .62);
  --pc-ink: #3d2f20;
  --pc-ptxt: #3b2d1e;
  --pc-pdim: rgba(59, 45, 30, .66);
  --pc-chrome: rgba(255, 255, 255, .055);
  --pc-chrome-line: rgba(226, 208, 177, .24);
  --pc-accent: #2f6f62;
  --pc-gold: #9d7519;
  --pc-danger: #96382e;
  --pc-btn: linear-gradient(180deg, #b98f2c, #95701c);
  --pc-btn-txt: #241a0c;
  --pc-on-gold: #f6efdd;
  --pc-glow: 0 0 0 rgba(0, 0, 0, 0);
  --pc-soft-glow: 0 0 0 rgba(0, 0, 0, 0);
  --pc-gold-glow: 0 0 0 rgba(0, 0, 0, 0);
  --pc-strip: rgba(226, 208, 177, .35);
  --pc-blur: none;
  --pc-p0: #33507f;
  --pc-p1: #993d2f;
  --pc-p2: #4a6b46;
  --pc-p3: #b08a2e;
}

/* ── ARCADE — the same cloth, luminous. Not a different board. ───────────── */
/* ⛔⛔ THE HOOK IS gm-arcade, WHICH IS WHAT GameTheme.apply ACTUALLY TOGGLES
   (layout-schemes.js, on the SCREEN div). This block was keyed on
   [data-scheme="arcade"] — an attribute NOTHING in the app has ever set — so the
   Arcade scheme never rendered on Pachisi at all. The board suite set the
   attribute BY HAND and so certified a selector production cannot reach.
   ".gm-arcade .bgm-root" (style.css) is the house precedent. */
#pachisi-game-screen.gm-arcade, .gm-arcade .pc-root {
  --pc-table: radial-gradient(120% 100% at 50% -10%, #2a1d6e 0%, #150e3c 55%, #080618 100%);
  --pc-cloth: linear-gradient(150deg, rgba(94, 72, 220, .42), rgba(18, 12, 54, .85));
  --pc-cloth-edge: rgba(140, 170, 255, .34);
  --pc-cell: rgba(160, 190, 255, .10);
  --pc-line: rgba(160, 190, 255, .26);
  --pc-castle: rgba(255, 210, 74, .18);
  --pc-castle-line: rgba(255, 210, 74, .55);
  --pc-panel: rgba(120, 150, 255, .12);
  --pc-panel-line: rgba(150, 180, 255, .28);
  --pc-txt: #eaf0ff;
  --pc-dim: rgba(214, 228, 255, .62);
  --pc-ink: #dce7ff;
  --pc-ptxt: #eaf0ff;
  --pc-pdim: rgba(214, 228, 255, .66);
  --pc-chrome: rgba(120, 150, 255, .12);
  --pc-chrome-line: rgba(150, 180, 255, .28);
  --pc-accent: #41e8ff;
  --pc-gold: #ffd24a;
  --pc-danger: #ff4d7d;
  --pc-btn: linear-gradient(180deg, #48e6ff, #1f8fd6);
  --pc-btn-txt: #05132b;
  --pc-on-gold: #1a1206;
  --pc-glow: 0 0 26px rgba(65, 232, 255, .55);
  --pc-soft-glow: 0 0 16px rgba(65, 232, 255, .35);
  --pc-gold-glow: 0 0 28px rgba(255, 210, 74, .55);
  --pc-strip: rgba(150, 180, 255, .3);
  --pc-blur: blur(6px);
  --pc-p0: #5b9dff;
  --pc-p1: #ff5d7a;
  --pc-p2: #3ce6a8;
  --pc-p3: #ffc93d;
}

/* ── the shell ───────────────────────────────────────────────────────────── */
.pc-root {
  /* MOBILE metrics. --pc-ac is ACROSS the track, --pc-al is ALONG it. */
  --pc-ac: 28px;
  --pc-al: 18px;
  --pc-die: 34;
  --pc-tok: 20px;
  --pc-tok-stack: 16px;
  --pc-fan: 6px;

  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 9px 14px;
  background: var(--pc-table);
  color: var(--pc-txt);
  border-radius: 26px;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;   /* ⛔ per-element, NOT app-wide */
}
.pc-root * { -webkit-tap-highlight-color: transparent; }

/* ⛔ There is NO in-game-overlay strip here. The mock draws one inside the
 * board; in this app chat.css reserves that space on the SCREEN, so drawing it
 * as well would reserve it twice. --pc-strip survives because .pc-reserve (the
 * desktop rail's game-over placeholder) uses it. */

.pc-topbar { flex: none; display: flex; align-items: center; gap: 7px; height: 32px; }
.pc-spacer { flex: 1; }
.pc-turnpill {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 11px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; color: var(--pc-txt);
  background: var(--pc-chrome);
  box-shadow: inset 0 0 0 1px var(--pc-chrome-line);
}
.pc-turnpill[data-mine="1"] {
  background: color-mix(in oklab, var(--pc-accent) 22%, transparent);
  box-shadow: inset 0 0 0 1px var(--pc-accent);
}
.pc-turndot { width: 9px; height: 9px; border-radius: 50%; background: var(--pc-p0); }
.pc-turnpill[data-seat="1"] .pc-turndot { background: var(--pc-p1); }
.pc-turnpill[data-seat="2"] .pc-turndot { background: var(--pc-p2); }
.pc-turnpill[data-seat="3"] .pc-turndot { background: var(--pc-p3); }
.pc-turnpill[data-mine="1"] .pc-turndot { box-shadow: var(--pc-soft-glow); }

.pc-tablebadge {
  padding: 5px 8px; border-radius: 7px;
  font-size: 9.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--pc-dim); box-shadow: inset 0 0 0 1px var(--pc-chrome-line);
}
.pc-info {
  width: 26px; height: 26px; border-radius: 50%; border: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 700; cursor: pointer;
  color: var(--pc-txt); background: var(--pc-chrome);
  box-shadow: inset 0 0 0 1px var(--pc-chrome-line);
}

.pc-row { display: contents; }
.pc-rail-l { display: none; }              /* desktop only */
.pc-boardcol { display: contents; }

/* ── the board ───────────────────────────────────────────────────────────── */
.pc-boardwrap {
  flex: none;
  align-self: center;
  width: calc(16 * var(--pc-al) + 3 * var(--pc-ac));
  height: calc(16 * var(--pc-al) + 3 * var(--pc-ac));
  border-radius: 14px;
  background: var(--pc-cloth);
  box-shadow: inset 0 0 0 1px var(--pc-cloth-edge), 0 18px 40px -22px rgba(0, 0, 0, .7);
}
.pc-board {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(8, var(--pc-al)) repeat(3, var(--pc-ac)) repeat(8, var(--pc-al));
  grid-template-rows: repeat(8, var(--pc-al)) repeat(3, var(--pc-ac)) repeat(8, var(--pc-al));
  position: relative;
}

.pc-cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: .5px;
  border-radius: 3px;
  background: var(--pc-cell);
  box-shadow: inset 0 0 0 1px var(--pc-line);
}
.pc-cell[data-castle="1"] { background: var(--pc-castle); box-shadow: inset 0 0 0 1px var(--pc-castle-line); }
/* your own middle column is tinted at full weight; the other three at half, so
   ownership comes from WEIGHT rather than from longer labels */
.pc-cell[data-mid="0"] { background: color-mix(in oklab, var(--pc-p0) 24%, var(--pc-cell)); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--pc-p0) 62%, transparent); }
.pc-cell[data-mid="1"] { background: color-mix(in oklab, var(--pc-p1) 11%, var(--pc-cell)); }
.pc-cell[data-mid="2"] { background: color-mix(in oklab, var(--pc-p2) 11%, var(--pc-cell)); }
.pc-cell[data-mid="3"] { background: color-mix(in oklab, var(--pc-p3) 11%, var(--pc-cell)); }
.pc-cell[data-tip="0"] { background: color-mix(in oklab, var(--pc-p0) 34%, var(--pc-castle)); box-shadow: inset 0 0 0 1px var(--pc-p0); }
.pc-cell[data-tip="1"] { background: color-mix(in oklab, var(--pc-p1) 15%, var(--pc-castle)); }
.pc-cell[data-tip="2"] { background: color-mix(in oklab, var(--pc-p2) 15%, var(--pc-castle)); }
.pc-cell[data-tip="3"] { background: color-mix(in oklab, var(--pc-p3) 15%, var(--pc-castle)); }

.pc-chev {
  position: absolute;
  color: var(--pc-ink);
  opacity: .3;
  font-size: 12px;
  line-height: 1;
  pointer-events: none;
}
.pc-cell[data-mid="0"] .pc-chev { color: var(--pc-p0); opacity: .62; }

.pc-hatch {
  position: absolute;
  inset: 2px;
  border-radius: 2px;
  opacity: .5;
  pointer-events: none;
  background:
    repeating-linear-gradient(45deg, var(--pc-castle-line) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(-45deg, var(--pc-castle-line) 0 1px, transparent 1px 5px);
}

/* trail dots along the selected move's whole route */
.pc-cell[data-trail="1"]::after {
  content: "";
  position: absolute;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--pc-accent);
  opacity: .72;
  box-shadow: var(--pc-soft-glow);
  z-index: 2;
}

/* ── tokens ──────────────────────────────────────────────────────────────── */
/* ⭐ Pieces are distinguished by SHAPE first — circle, triangle, diamond,
 * octagon — so they read in greyscale and at 16px. Colour is the second channel,
 * which matters because the owner is colourblind. */
.pc-tokens { position: absolute; inset: 0; pointer-events: none; }
.pc-tok {
  position: absolute;
  left: 50%; top: 50%;
  width: var(--pc-tok); height: var(--pc-tok);
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .45));
  z-index: 3;
}
.pc-tok[data-seat="0"] { background: linear-gradient(158deg, color-mix(in oklab, var(--pc-p0) 74%, #fff), var(--pc-p0)); border-radius: 50%; }
.pc-tok[data-seat="1"] { background: linear-gradient(158deg, color-mix(in oklab, var(--pc-p1) 70%, #000), var(--pc-p1)); clip-path: polygon(50% 4%, 96% 94%, 4% 94%); }
.pc-tok[data-seat="2"] { background: linear-gradient(158deg, color-mix(in oklab, var(--pc-p2) 84%, #fff), var(--pc-p2)); clip-path: polygon(50% 2%, 98% 50%, 50% 98%, 2% 50%); }
.pc-tok[data-seat="3"] { background: linear-gradient(158deg, color-mix(in oklab, var(--pc-p3) 74%, #000), var(--pc-p3)); clip-path: polygon(22% 2%, 78% 2%, 98% 22%, 98% 78%, 78% 98%, 22% 98%, 2% 78%, 2% 22%); }

.pc-tok[data-n="2"], .pc-tok[data-n="3"] { width: var(--pc-tok-stack); height: var(--pc-tok-stack); }
/* the fan runs ACROSS the track — horizontal in a vertical arm, and the reverse */
.pc-cell[data-axis="x"] .pc-tok[data-n="2"][data-i="0"] { transform: translate(-50%, -50%) translateX(calc(-0.5 * var(--pc-fan))); }
.pc-cell[data-axis="x"] .pc-tok[data-n="2"][data-i="1"] { transform: translate(-50%, -50%) translateX(calc(0.5 * var(--pc-fan))); }
.pc-cell[data-axis="x"] .pc-tok[data-n="3"][data-i="0"] { transform: translate(-50%, -50%) translateX(calc(-1 * var(--pc-fan))); }
.pc-cell[data-axis="x"] .pc-tok[data-n="3"][data-i="2"] { transform: translate(-50%, -50%) translateX(var(--pc-fan)); }
.pc-cell[data-axis="y"] .pc-tok[data-n="2"][data-i="0"] { transform: translate(-50%, -50%) translateY(calc(-0.5 * var(--pc-fan))); }
.pc-cell[data-axis="y"] .pc-tok[data-n="2"][data-i="1"] { transform: translate(-50%, -50%) translateY(calc(0.5 * var(--pc-fan))); }
.pc-cell[data-axis="y"] .pc-tok[data-n="3"][data-i="0"] { transform: translate(-50%, -50%) translateY(calc(-1 * var(--pc-fan))); }
.pc-cell[data-axis="y"] .pc-tok[data-n="3"][data-i="2"] { transform: translate(-50%, -50%) translateY(var(--pc-fan)); }

.pc-tok[data-dim="1"] { opacity: .38; }
.pc-tok[data-movable="1"] { box-shadow: 0 0 0 2px var(--pc-accent); }
.pc-tok[data-sel="1"] { box-shadow: 0 0 0 2px var(--pc-accent), var(--pc-soft-glow); }

/* ⭐ The counter pins bottom-right and sits ABOVE the tokens, so a stack can
 * never hide its own count. */
.pc-count {
  position: absolute;
  right: -3px; bottom: -3px;
  min-width: 12px; height: 12px;
  padding: 0 3px;
  border-radius: 999px;
  background: var(--pc-ink);
  color: var(--pc-cell);
  font-size: 8px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  z-index: 20;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .8);
}

/* ── destination markers ─────────────────────────────────────────────────── */
.pc-mark { position: absolute; inset: 0; pointer-events: none; }
.pc-mark[data-target] {
  border-radius: 3px;
  z-index: 6;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.pc-mark[data-target="go"]    { box-shadow: inset 0 0 0 1.5px var(--pc-accent); background: color-mix(in oklab, var(--pc-accent) 12%, transparent); }
.pc-mark[data-target="gold"]  { box-shadow: inset 0 0 0 1.5px var(--pc-gold);   background: color-mix(in oklab, var(--pc-gold) 12%, transparent); }
.pc-mark[data-target="enter"] { box-shadow: inset 0 0 0 1.5px var(--pc-gold);   background: color-mix(in oklab, var(--pc-gold) 16%, transparent); }
.pc-mark[data-target="cap"]   { box-shadow: inset 0 0 0 1.5px var(--pc-danger); background: color-mix(in oklab, var(--pc-danger) 14%, transparent); }
.pc-mark[data-target="dead"]  { box-shadow: inset 0 0 0 1.5px var(--pc-danger); background: color-mix(in oklab, var(--pc-danger) 8%, transparent); opacity: .75; }
.pc-mark[data-sel="1"] { box-shadow: inset 0 0 0 2px currentColor, var(--pc-soft-glow); }
.pc-mark em {
  transform: translateY(6px);
  padding: 1px 3px;
  border-radius: 999px;
  font-size: 7.5px; font-weight: 800; font-style: normal;
  white-space: nowrap;
  z-index: 8;
}
.pc-mark[data-target="go"] em    { background: var(--pc-accent); color: var(--pc-on-gold); }
.pc-mark[data-target="gold"] em,
.pc-mark[data-target="enter"] em { background: var(--pc-gold);   color: var(--pc-on-gold); }
.pc-mark[data-target="cap"] em,
.pc-mark[data-target="dead"] em  { background: var(--pc-danger);  color: var(--pc-on-gold); }

/* ⭐ Cells are under 44px, so the CELL is not the tap target — only a movable
 * piece or a live destination carries a 44px slug, and inactive cells take no
 * taps at all, so there is nothing to mis-hit. */
.pc-cell[data-tap="1"] { cursor: pointer; }
.pc-cell[data-tap="1"]::before {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 44px; height: 44px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  z-index: 14;
}

/* ── the charkoni ────────────────────────────────────────────────────────── */
.pc-charkoni {
  grid-area: 9 / 9 / 12 / 12;
  position: relative;
  margin: 1px;
  border-radius: 8px;
  background: color-mix(in oklab, var(--pc-castle) 70%, var(--pc-cell));
  box-shadow: inset 0 0 0 1.5px var(--pc-castle-line);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  z-index: 4;
}
.pc-charkoni[data-target="1"] {
  box-shadow: inset 0 0 0 2.5px var(--pc-gold), var(--pc-gold-glow);
  background: color-mix(in oklab, var(--pc-gold) 22%, var(--pc-castle));
  cursor: pointer;
}
.pc-charkoni-lab { font-size: 6px; letter-spacing: .16em; text-transform: uppercase; color: var(--pc-ink); opacity: .62; font-weight: 700; }
.pc-charkoni-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.pc-ck-seat {
  display: flex; align-items: center; gap: 2px;
  padding: 1px 3px; border-radius: 6px;
  font-size: 8px; color: var(--pc-ink);
}
.pc-ck-seat[data-live="0"] { opacity: .25; }
.pc-ck-seat[data-seat="0"] { background: color-mix(in oklab, var(--pc-p0) 16%, transparent); }
.pc-ck-seat[data-seat="1"] { background: color-mix(in oklab, var(--pc-p1) 16%, transparent); }
.pc-ck-seat[data-seat="2"] { background: color-mix(in oklab, var(--pc-p2) 16%, transparent); }
.pc-ck-seat[data-seat="3"] { background: color-mix(in oklab, var(--pc-p3) 16%, transparent); }
/* your chip brightens and thickens when a piece is ready to lift */
.pc-ck-seat[data-ready="1"] { background: color-mix(in oklab, var(--pc-p0) 34%, transparent); box-shadow: inset 0 0 0 1.5px var(--pc-p0); }
.pc-ck-seat .pc-tok { position: relative; left: auto; top: auto; transform: none; width: 8px; height: 8px; flex: none; }
.pc-ck-home { font-weight: 800; font-variant-numeric: tabular-nums; }
.pc-ck-wait { font-size: 6.5px; font-weight: 700; opacity: .5; font-style: normal; }
.pc-charkoni-target {
  position: absolute; inset: 0;
  display: flex; align-items: flex-end; justify-content: center;
  pointer-events: none; z-index: 8;
}
.pc-charkoni-target em {
  transform: translateY(7px);
  padding: 1px 6px; border-radius: 999px;
  background: var(--pc-gold); color: var(--pc-on-gold);
  font-size: 8px; font-weight: 800; font-style: normal; white-space: nowrap;
  opacity: 0;
  box-shadow: var(--pc-gold-glow);
}
.pc-charkoni[data-target="1"] .pc-charkoni-target em { opacity: 1; }

/* ── the four corner panels ──────────────────────────────────────────────── */
.pc-panel {
  margin: 4px;
  border-radius: 10px;
  background: var(--pc-panel);
  position: relative;
  z-index: 5;
  padding: 7px;
  display: flex; flex-direction: column; gap: 4px;
  box-shadow: inset 0 0 0 1px var(--pc-panel-line);
  backdrop-filter: var(--pc-blur);
}
.pc-panel[data-live="0"] { opacity: .32; }
.pc-panel[data-active="1"][data-seat="0"] { box-shadow: inset 0 0 0 2px var(--pc-p0), var(--pc-soft-glow); }
.pc-panel[data-active="1"][data-seat="1"] { box-shadow: inset 0 0 0 2px var(--pc-p1), var(--pc-soft-glow); }
.pc-panel[data-active="1"][data-seat="2"] { box-shadow: inset 0 0 0 2px var(--pc-p2), var(--pc-soft-glow); }
.pc-panel[data-active="1"][data-seat="3"] { box-shadow: inset 0 0 0 2px var(--pc-p3), var(--pc-soft-glow); }
.pc-panel-tab { position: absolute; border-radius: 4px; }
.pc-panel[data-seat="0"] .pc-panel-tab { background: var(--pc-p0); }
.pc-panel[data-seat="1"] .pc-panel-tab { background: var(--pc-p1); }
.pc-panel[data-seat="2"] .pc-panel-tab { background: var(--pc-p2); }
.pc-panel[data-seat="3"] .pc-panel-tab { background: var(--pc-p3); }
.pc-panel-tab[data-tab="right"]  { right: -1px; top: 36%; bottom: 36%; width: 4px; }
.pc-panel-tab[data-tab="left"]   { left: -1px;  top: 36%; bottom: 36%; width: 4px; }
.pc-panel-tab[data-tab="top"]    { top: -1px;   left: 36%; right: 36%; height: 4px; }
.pc-panel-tab[data-tab="bottom"] { bottom: -1px; left: 36%; right: 36%; height: 4px; }

.pc-panel-head { display: flex; align-items: center; gap: 5px; }
.pc-avatar {
  width: 22px; height: 22px; border-radius: 7px; flex: none; position: relative;
  display: flex; align-items: center; justify-content: center;
}
.pc-panel[data-seat="0"] .pc-avatar { background: color-mix(in oklab, var(--pc-p0) 22%, transparent); }
.pc-panel[data-seat="1"] .pc-avatar { background: color-mix(in oklab, var(--pc-p1) 22%, transparent); }
.pc-panel[data-seat="2"] .pc-avatar { background: color-mix(in oklab, var(--pc-p2) 22%, transparent); }
.pc-panel[data-seat="3"] .pc-avatar { background: color-mix(in oklab, var(--pc-p3) 22%, transparent); }
.pc-avatar .pc-tok { width: 13px; height: 13px; }
.pc-panel-names { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.pc-panel-nm { font-size: 11px; font-weight: 700; color: var(--pc-ptxt); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-panel-seat { font-size: 7.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--pc-pdim); }
.pc-panel-stats { display: flex; gap: 3px; }
.pc-stat {
  flex: 1; min-width: 0;                 /* ⛔ a 1fr/flex child needs this or one
                                            unshrinkable label widens the board */
  border-radius: 6px; padding: 3px 0;
  display: flex; flex-direction: column; align-items: center;
  background: color-mix(in oklab, var(--pc-ink) 7%, transparent);
}
.pc-stat-n { font-size: 13px; font-weight: 800; line-height: 1; color: var(--pc-ptxt); font-variant-numeric: tabular-nums; }
.pc-stat-l { font-size: 6.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--pc-pdim); font-style: normal; }
.pc-panel-chip {
  border-radius: 999px; padding: 3px 5px;
  font-size: 7.4px; font-weight: 700; letter-spacing: .05em; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: color-mix(in oklab, var(--pc-accent) 16%, transparent);
  color: var(--pc-accent);
  box-shadow: inset 0 0 0 1px var(--pc-accent);
}
.pc-panel-chip[data-wait="1"] {
  background: color-mix(in oklab, var(--pc-gold) 18%, transparent);
  color: var(--pc-gold);
  box-shadow: inset 0 0 0 1px var(--pc-gold);
}

/* ── the feed. ⛔ It NEVER numbers a cell — positions are named by landmark. ── */
.pc-feed {
  flex: none;
  min-height: 42px;
  border-radius: 9px;
  background: var(--pc-panel);
  box-shadow: inset 0 0 0 1px var(--pc-panel-line);
  display: flex; align-items: center; gap: 9px;
  padding: 0 10px;
}
.pc-feed i { font-size: 8px; letter-spacing: .14em; text-transform: uppercase; color: var(--pc-pdim); flex: none; font-style: normal; }
.pc-feed span { font-size: 11px; line-height: 1.35; color: var(--pc-ptxt); }

/* ── the throw panel ─────────────────────────────────────────────────────── */
.pc-throw {
  flex: none;
  margin-top: auto;
  background: var(--pc-panel);
  border-radius: 14px;
  padding: 10px 10px 11px;
  display: flex; flex-direction: column; gap: 7px;
  box-shadow: inset 0 0 0 1px var(--pc-panel-line);
}
.pc-cap { font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: var(--pc-pdim); font-weight: 700; }
.pc-keycap { margin-top: 2px; }
.pc-slots-row { display: flex; align-items: stretch; gap: 5px; }
.pc-slots { display: flex; align-items: flex-start; gap: 3px; flex: 1; min-width: 0; }
.pc-slot { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: 1; min-width: 0; }
.pc-slot-die {
  width: 40px; height: 40px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in oklab, var(--pc-ink) 6%, transparent);
  box-shadow: inset 0 0 0 1px var(--pc-panel-line);
}
.pc-slot[data-up="1"] .pc-slot-die { box-shadow: inset 0 0 0 1px var(--pc-panel-line), var(--pc-soft-glow); }
.pc-slot-cap { font-size: 7px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--pc-pdim); font-style: normal; min-height: 1.2em; }
.pc-slot[data-up="1"] .pc-slot-cap { color: var(--pc-gold); }
.pc-die-fallback { display: flex; align-items: center; justify-content: center; font-size: 20px; color: var(--pc-ink); }

/* ⛔⛔ RESERVED FROM "25" AT EVERY STATE, including the blank pre-throw one, so
 * nothing shifts when a 25 lands. A fixed width and a fixed height — `min-width`
 * is NOT a reservation, it still lets the box grow. */
.pc-result {
  width: 78px; min-width: 78px; max-width: 78px;
  overflow: hidden;
  align-self: stretch;
  border-radius: 10px;
  padding: 0 4px;
  flex: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: color-mix(in oklab, var(--pc-ink) 8%, transparent);
  box-shadow: inset 0 0 0 1px var(--pc-panel-line);
}
.pc-result[data-big="1"] {
  background: color-mix(in oklab, var(--pc-gold) 26%, transparent);
  box-shadow: inset 0 0 0 2px var(--pc-gold), var(--pc-glow);
}
.pc-result-lab { font-size: 7.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--pc-pdim); font-weight: 700; font-style: normal; }
.pc-result-num { font-size: 30px; font-weight: 800; line-height: 1.05; color: var(--pc-ptxt); font-variant-numeric: tabular-nums; min-width: 44px; text-align: center; }
.pc-result-note { font-size: 7.5px; line-height: 1.15; color: var(--pc-pdim); font-weight: 700; text-align: center; font-style: normal; min-height: 1.15em; }
.pc-result[data-big="1"] .pc-result-lab,
.pc-result[data-big="1"] .pc-result-num,
.pc-result[data-big="1"] .pc-result-note { color: var(--pc-gold); }

/* ⭐ The tally SPELLS THE COUNT OUT, so a zero can never read as "nothing
 * happened" — "zero mouths up — all six face down → move 25". */
.pc-tally { font-size: 10px; color: var(--pc-pdim); text-align: center; font-weight: 600; min-height: 1.35em; }

/* the grace bar: a dim outline when not earned, so the slot never moves */
.pc-grace {
  height: 24px; border-radius: 8px;
  font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  display: flex; align-items: center; justify-content: center;
  color: transparent; opacity: .3;
  box-shadow: inset 0 0 0 1px var(--pc-chrome-line);
}
.pc-grace[data-on="1"] {
  color: var(--pc-on-gold);
  background: var(--pc-gold);
  opacity: 1;
  box-shadow: inset 0 0 0 1px var(--pc-gold), var(--pc-gold-glow);
}

/* ⭐ THE SEVEN-ROW KEY IS A SEVEN-COLUMN STRIP — permanent, never behind a
 * sheet, one column per mouth count. It costs 36px of the phone and means
 * nobody ever has to open anything to know what 0 up means. */
.pc-key { display: flex; gap: 2px; }
.pc-key-col {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; align-items: center;
  padding: 3px 0 2px;
  border-radius: 6px;
}
.pc-key-col b { font-size: 13px; font-weight: 800; line-height: 1.1; color: var(--pc-ptxt); font-variant-numeric: tabular-nums; }
.pc-key-col i { font-size: 7px; letter-spacing: .04em; text-transform: uppercase; color: var(--pc-pdim); font-weight: 700; font-style: normal; }
.pc-key-grace { width: 4px; height: 4px; border-radius: 50%; margin-top: 1px; background: transparent; opacity: .001; text-decoration: none; }
.pc-key-grace[data-g="1"] { background: var(--pc-gold); opacity: 1; }
.pc-key-col[data-on="1"] { background: color-mix(in oklab, var(--pc-accent) 20%, transparent); box-shadow: inset 0 0 0 1px var(--pc-accent); }
.pc-key-col[data-on="1"] b { color: var(--pc-accent); }
/* in the endgame the column being WAITED for outlines gold */
.pc-key-col[data-watch="1"] { box-shadow: inset 0 0 0 1px var(--pc-gold); }
.pc-key-col[data-watch="1"] b { color: var(--pc-gold); }

/* ⛔⛔ A FIXED HEIGHT, NOT `min-height` — the owner's locked-layout standard.
 * `min-height` still lets the row GROW, and it did: the hint measured 28px idle
 * and 36px with a two-line message, so every control under it moved the instant
 * a throw landed. Sized for the TALLEST state (two lines at this size) with
 * overflow hidden, and the hint STRINGS are written to that budget. */
.pc-hint {
  height: 32px;
  overflow: hidden;
  border-radius: 9px;
  padding: 5px 8px;
  font-size: 10.5px; line-height: 1.3;
  display: flex; align-items: center;
  flex: none;
  background: color-mix(in oklab, var(--pc-ink) 6%, transparent);
  color: var(--pc-pdim);
}
.pc-hint[data-tone="warn"] { background: color-mix(in oklab, var(--pc-danger) 16%, transparent); color: var(--pc-danger); box-shadow: inset 0 0 0 1px var(--pc-danger); font-weight: 700; }
.pc-hint[data-tone="gold"] { background: color-mix(in oklab, var(--pc-gold) 16%, transparent); color: var(--pc-gold); box-shadow: inset 0 0 0 1px var(--pc-gold); font-weight: 700; }

/* ⭐ TWO FIXED SLOTS. Hold is ALWAYS there, and when holding is the smart play
 * the fill swaps so declining reads as a decision rather than a failure.
 * ⛔ Neither button is ever hidden or removed — only disabled. */
.pc-btns { display: flex; gap: 6px; flex: none; }
.pc-btn {
  height: 54px;
  border: 0;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  text-align: center; line-height: 1.15;
  padding: 0 8px;
  font-size: 12.5px; font-weight: 800;
  cursor: pointer;
  background: transparent;
  color: var(--pc-pdim);
  box-shadow: inset 0 0 0 1.5px var(--pc-pdim);
}
.pc-btn[data-emph="1"] {
  background: var(--pc-btn);
  color: var(--pc-btn-txt);
  box-shadow: var(--pc-soft-glow);
}
.pc-btn:disabled { opacity: .42; cursor: default; }
.pc-hold { flex: 0.72 1 0; }
.pc-go { flex: 1.6 1 0; font-size: 13.5px; }
.pc-hold[data-emph="1"] { flex: 1.35 1 0; }
.pc-go[data-emph="0"] { flex: 1 1 0; }

/* ── screen-level siblings of the board ──────────────────────────────────────
 * ⛔⛔ NOTHING INSIDE THE BOARD IS position:fixed. On desktop `.pc-root` carries
 * BoardFit's scale transform, which would make it the containing block and trap
 * a fixed child inside the scaled box. The decline sheet, the capture banner and
 * the rules overlay are siblings of the board, at screen level. */
#pachisi-sheet, #pachisi-banner {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  pointer-events: none;
}
#pachisi-sheet { align-items: flex-end; justify-content: center; pointer-events: auto; }
.pc-sheet-scrim { position: absolute; inset: 0; background: rgba(20, 14, 8, .58); }
.pc-sheet {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 0 9px 84px;
  padding: 18px 20px;
  border-radius: 18px;
  text-align: center;
  display: flex; flex-direction: column; gap: 7px; align-items: center;
  background: var(--pc-panel, #efe5cd);
  box-shadow: inset 0 0 0 2px var(--pc-accent, #2f6f62), 0 30px 60px -30px #000;
  backdrop-filter: blur(8px);
}
.pc-sheet-tag { font-size: 9.5px; letter-spacing: .22em; text-transform: uppercase; font-weight: 800; color: var(--pc-accent, #2f6f62); }
.pc-sheet-title { margin: 0; font-size: 20px; font-weight: 800; line-height: 1.12; color: var(--pc-ptxt, #3b2d1e); }
.pc-sheet-sub { margin: 0; font-size: 12px; line-height: 1.5; color: var(--pc-pdim, rgba(59,45,30,.66)); }
.pc-sheet-acts { display: flex; gap: 8px; width: 100%; margin-top: 4px; }
.pc-sheet-acts .pc-btn { flex: 1 1 0; height: 46px; }

#pachisi-banner { align-items: center; justify-content: center; }
.pc-banner {
  padding: 18px 20px;
  border-radius: 18px;
  text-align: center;
  max-width: 340px;
  display: flex; flex-direction: column; gap: 6px; align-items: center;
  background: var(--pc-panel, #efe5cd);
  box-shadow: inset 0 0 0 2px var(--pc-danger, #96382e), 0 30px 60px -30px #000;
  backdrop-filter: blur(8px);
}
.pc-banner-tag { font-size: 9.5px; letter-spacing: .22em; text-transform: uppercase; font-weight: 800; color: var(--pc-danger, #96382e); }
.pc-banner-title { margin: 0; font-size: 20px; font-weight: 800; line-height: 1.12; color: var(--pc-ptxt, #3b2d1e); }
.pc-banner-sub { margin: 0; font-size: 12px; line-height: 1.5; color: var(--pc-pdim, rgba(59,45,30,.66)); }

/* ── setup card ──────────────────────────────────────────────────────────── */
/* ⛔ THE SETUP CARD IS A SITE SCREEN, NOT A BOARD SURFACE. It sits on the app's
   own page background, so it takes the SITE palette (--pgr-*, defined on :root
   and overridden per equipped scheme by GameTheme.apply on the screen div) and
   the shared .card surface — the same pattern as Can't Stop's .cs-setup-card,
   whose own rule is nothing but a max-width. It previously styled itself from
   the BOARD palette (--pc-ptxt / --pc-pdim / --pc-panel), which is scoped to
   .pc-root and therefore out of scope here: every colour on the card resolved to
   its var() fallback, and those fallbacks were LIGHT-surface values. The result
   was #222 title and #666 body on the dark page — the first thing a player saw
   and the first thing they could not read. */
.pc-setup-card {
  max-width: 460px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 12px;
}
.pc-setup-eyebrow { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--pgr-dim, #83858b); font-weight: 700; }
.pc-setup-title { margin: 0; font-size: 30px; font-weight: 700; color: var(--pgr-txt, #e9e8e4); }
.pc-setup-blurb, .pc-setup-hint, .pc-setup-warn { margin: 0; font-size: 13px; line-height: 1.5; color: var(--pgr-dim, #83858b); }
/* The blurb and the hint carry real information (the 25, the measured win rate),
   so they are NOT dimmed all the way down — only the length warning is. */
.pc-setup-blurb, .pc-setup-hint { color: var(--pgr-txt, #e9e8e4); opacity: .82; }
.pc-setup-blurb b { color: var(--pgr-txt, #e9e8e4); opacity: 1; }
.pc-setup-warn { font-size: 12px; }
.pc-setup-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pc-setup-lab { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--pgr-dim, #83858b); font-weight: 700; min-width: 76px; }
.pc-opts { display: flex; gap: 6px; flex-wrap: wrap; }
.pc-opt {
  border: 0; cursor: pointer;
  padding: 9px 14px; border-radius: 10px;
  font-size: 13px; font-weight: 700;
  background: transparent; color: var(--pgr-txt, #e9e8e4);
  box-shadow: inset 0 0 0 1.5px var(--pgr-line, rgba(255,255,255,.18));
}
.pc-opt:hover { box-shadow: inset 0 0 0 1.5px var(--pgr-sel, #555); }
.pc-opt[data-on="1"] { background: var(--pc-btn); color: var(--pc-btn-txt); box-shadow: none; }
/* ⭐ The board gold, and now legitimately so: --pc-* is declared on the SCREEN,
   so these two resolve for real and follow the equipped scheme. Before the scope
   fix they were painting the same colour purely by var() FALLBACK — the right
   pixels for the wrong reason, which is why the defect next to them was invisible. */
.pc-start {
  border: 0; cursor: pointer;
  height: 52px; border-radius: 12px;
  font-size: 15px; font-weight: 800;
  background: var(--pc-btn); color: var(--pc-btn-txt);
}

/* end-screen rows */
.pc-endrows { display: flex; flex-direction: column; gap: 6px; }
.pc-endrow { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px; background: rgba(255,255,255,.05); }
.pc-endrow[data-win="1"] { box-shadow: inset 0 0 0 1.5px var(--pc-gold, #9d7519); }
.pc-endnm { flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; font-weight: 700; }
.pc-endnm .pc-tok { position: relative; left: auto; top: auto; transform: none; width: 14px; height: 14px; flex: none; }
.pc-endsc { font-variant-numeric: tabular-nums; font-weight: 800; }
.pc-endst { font-size: 11px; opacity: .7; }

.pc-reserve {
  border: 1px dashed var(--pc-strip);
  border-radius: 12px;
  min-height: 70px;
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--pc-dim); line-height: 1.6; padding: 0 10px;
  flex: none;
}

/* ── MOBILE BUDGET ───────────────────────────────────────────────────────────
 * ⛔ BoardFit DOES NOT SCALE BELOW 1000px (`board-fit.js`: `if (window.innerWidth
 * < (b.bp || BP)) return null`), so the phone layout has to fit natively. Two
 * things measured on a real 375 × 812 phone frame made it fit:
 *
 * 1. ⛔ `.wrap`'s 1.5rem gutter had to go. It left 327px for a 372px board, so
 *    the cross overflowed by 45px and clipped ALL FOUR corner panels — and it
 *    clips them SYMMETRICALLY, which reads as a deliberate crop rather than as a
 *    bug. Exactly the finding Can't Stop recorded; same gutter, same trap.
 * 2. The throw panel is trimmed against the mock's 276px budget, because the
 *    mock sized the phone frame with no CHAT BAR — and chat.css reserves 84px
 *    below a signed-in board. An 812px phone is not an 812px board.
 */
@media (max-width: 999px) {
  /* scoped to a live board so the setup card keeps its normal page gutter */
  /* ⛔ The vertical gutter goes too, not just the horizontal one. `.wrap` is
   * padding: 1.5rem, and the BOTTOM 24px of it is pure decoration sitting
   * underneath a FIXED chat bar — it pushes the action buttons under the bar
   * while contributing nothing a player can see. */
  #pachisi-game-screen.pc-playing .wrap { padding: 0; }
  /* ⛔⛔ 3. AND THE BUDGET IS THE ONE WITH THE CHAT BAR UP, NOT THE SIGNED-OUT
   * ONE. Measured at 375 × 812: signed out the board had 60px of headroom and
   * looked finished — with `body.solo-chat-on` it was MINUS 24 and the page
   * scrolled, which breaks the no-scrolling constraint for every signed-in
   * player. ⭐ The board suite runs signed out, so no assertion would ever have
   * caught it; SCC shipped exactly this and a human found it.
   * The 24px comes off the ALONG axis (18 -> 17), never the across axis: across
   * is the axis that carries tokens and is the whole phone answer, along carries
   * nothing. Board 16x16 + 3x28 = 340. */
  .pc-root { --pc-al: 16px; padding: 6px 2px 6px; gap: 5px; }
  .pc-throw { padding: 8px 8px 9px; gap: 5px; }
  /* ⭐ The two section captions are the cheapest 28px on the phone: the six
   * shells and the seven-column key are self-evident, and the tally under them
   * already says the reading in words. */
  .pc-throw > .pc-cap { display: none; }
  .pc-slot-die { width: 34px; height: 34px; }
  .pc-result-num { font-size: 26px; }
  .pc-grace { height: 20px; }
  .pc-hint { height: 36px; font-size: 10px; }
  .pc-btn { height: 46px; }
  .pc-feed { min-height: 34px; }
  .pc-btn { height: 44px; }
}

/* ── DESKTOP — a separate arrangement, run above 1000px and scaled as one unit
 * by BoardFit. ⛔ The three copies of 1240 x 812 are here, in PC_FIT_W/PC_FIT_H
 * in pachisi.js, and in board-fit.js; pachisi-board.test.html asserts all three
 * agree, because BoardFit writes width and height INLINE and the board clips
 * silently if they disagree. */
@media (min-width: 1000px) {
  /* ⛔⛔ THE `.wrap` CROP. `.wrap` is a 640px-max centred column, so without this
   * the 1240px design box is clipped to 640 and BoardFit fits the board to a
   * room half the size it is entitled to. board-fit.test.html asserts this
   * directly ("every built board's clipping ancestor is as wide as the room it
   * is entitled to") and caught it here; every other scaled board carries the
   * same three declarations. */
  #pachisi-game-screen .wrap { max-width: none; padding-left: 0; padding-right: 0; }
  .pc-root {
    --pc-ac: 48px;
    --pc-al: 32px;
    --pc-die: 66;
    --pc-tok: 32px;
    --pc-tok-stack: 26px;
    --pc-fan: 11px;
    width: 1240px;
    height: 812px;
    padding: 20px;
    gap: 12px;
    border-radius: 18px;
  }
  .pc-strip { height: 38px; border-radius: 9px; font-size: 11px; }
  .pc-topbar { height: 46px; gap: 12px; }
  .pc-turnpill { padding: 9px 16px; font-size: 15px; gap: 10px; }
  .pc-turndot { width: 11px; height: 11px; }
  .pc-tablebadge { padding: 8px 13px; font-size: 11.5px; }
  .pc-info { width: 38px; height: 38px; font-size: 16px; }

  .pc-row { display: flex; flex: 1; gap: 20px; min-height: 0; }
  .pc-rail { display: flex; flex-direction: column; gap: 12px; min-height: 0; flex: none; }
  .pc-rail-l { width: 242px; }
  .pc-rail-r { width: 262px; }
  .pc-boardcol { display: flex; flex: 1; flex-direction: column; gap: 12px; align-items: center; min-width: 0; }
  .pc-boardwrap { border-radius: 20px; }

  .pc-cell { margin: 1px; border-radius: 6px; }
  .pc-chev { font-size: 18px; opacity: .26; }
  .pc-hatch { inset: 4px; }
  .pc-cell[data-trail="1"]::after { width: 9px; height: 9px; }
  .pc-count { right: -4px; bottom: -4px; min-width: 18px; height: 18px; font-size: 10px; }
  .pc-mark[data-target] { border-radius: 5px; }
  .pc-mark em { transform: translateY(9px); padding: 2px 7px; font-size: 10px; }

  .pc-charkoni { margin: 2px; border-radius: 12px; gap: 5px; }
  .pc-charkoni-lab { font-size: 8.5px; }
  .pc-charkoni-grid { gap: 5px; }
  .pc-ck-seat { padding: 3px 7px; gap: 4px; font-size: 12px; }
  .pc-ck-seat .pc-tok { width: 13px; height: 13px; }
  .pc-ck-wait { font-size: 9px; }
  .pc-charkoni-target em { transform: translateY(11px); padding: 3px 10px; font-size: 11px; }

  .pc-panel { margin: 8px; border-radius: 14px; padding: 13px 14px; gap: 10px; }
  .pc-panel-head { gap: 9px; }
  .pc-avatar { width: 36px; height: 36px; border-radius: 10px; }
  .pc-avatar .pc-tok { width: 21px; height: 21px; }
  .pc-panel-nm { font-size: 15.5px; }
  .pc-panel-seat { font-size: 10px; }
  .pc-panel-stats { gap: 6px; }
  .pc-stat { border-radius: 9px; padding: 7px 0; gap: 2px; }
  .pc-stat-n { font-size: 20px; }
  .pc-stat-l { font-size: 8px; }
  .pc-panel-chip { padding: 5px 9px; font-size: 10px; }

  .pc-feed { width: 656px; min-height: 46px; border-radius: 11px; padding: 0 14px; }
  .pc-feed i { font-size: 10px; }
  .pc-feed span { font-size: 13.5px; }

  /* the right rail carries the throw panel full height */
  .pc-throw { flex: 1; min-height: 0; margin-top: 0; border-radius: 16px; padding: 14px; gap: 10px; }
  .pc-cap { font-size: 10px; }
  .pc-slots-row { flex-direction: column; gap: 10px; }
  .pc-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .pc-slot-die { width: 66px; height: 66px; border-radius: 12px; }
  .pc-slot-cap { font-size: 9px; }
  .pc-result {
    width: auto; min-width: 0; max-width: none;
    flex-direction: row; align-items: center; gap: 12px;
    padding: 10px 14px; border-radius: 13px; align-self: stretch;
  }
  .pc-result-lab { font-size: 10px; }
  .pc-result-num { font-size: 54px; min-width: 72px; }
  .pc-result-note { font-size: 11.5px; max-width: 110px; text-align: left; }
  .pc-tally { font-size: 11.5px; text-align: left; }
  .pc-grace { height: 38px; border-radius: 999px; font-size: 12px; padding: 0 15px; }
  /* ⭐ Desktop turns the same seven items into seven ROWS. Same data, same
   * meaning — only the arrangement differs. */
  .pc-key { flex-direction: column; gap: 2px; }
  .pc-key-col { flex-direction: row; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 7px; }
  .pc-key-col b { order: 2; font-size: 14px; min-width: 26px; text-align: right; }
  .pc-key-col i { order: 1; font-size: 11px; text-transform: none; letter-spacing: 0; font-weight: 600; min-width: 54px; }
  .pc-key-grace { order: 3; margin-left: auto; margin-top: 0; }
  .pc-hint { height: 44px; padding: 8px 11px; font-size: 12px; border-radius: 9px; }
  .pc-btns { gap: 9px; }
  .pc-btn { height: 56px; font-size: 14px; }
  .pc-go { font-size: 15.5px; }

  .pc-sheet { max-width: 480px; margin-bottom: 88px; padding: 26px 34px; }
  .pc-sheet-title { font-size: 30px; }
  .pc-sheet-sub { font-size: 14px; }
  .pc-banner { max-width: 480px; padding: 26px 34px; }
  .pc-banner-title { font-size: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  .pc-root *, .pc-root *::before, .pc-root *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}
