/* frontend/picnicgoat.css — PICNIC GOAT board, both layouts.
 *
 * ⛔ ITS OWN FILE, NOT A BLOCK IN style.css — the Gulls / Swarm / Pippily / Fleeced precedent.
 *
 * ── Colour is data ──────────────────────────────────────────────────────────
 * CLASSIC (Flat) by default — the mock's `[data-goat="classic"]` tokens (Picnic Goat.dc.html L17–39), renamed --pg-*.
 * ARCADE when GameTheme puts `gm-arcade` on the screen (the mock's arcade block, L40–62): recolour only — same box,
 * same sizes. ⛔ Pixel is NOT built (PG2-M1, ruled). ⛔ THE SCREEN CARRIES THE PALETTE: the setup card sits outside
 * `.pg-root`.
 * ⭐ COLOURBLIND (house rule 5): a pattern carries each player (Dots ● / Gingham ■ / Stripes ▲ / Zigzag ◆ — the four
 *    bases sit at OKLCH L .52–.64, so in greyscale the PATTERN is the cue); a toll badge carries −N + a sandwich or ✓
 *    or ⊘; OUT blankets are grey + hatched + ⊘; the chosen heading is a FILLED header; blocked spots are hatched + ✕.
 *
 * ── Geometry ────────────────────────────────────────────────────────────────
 * Desktop: ONE design box 1280 × 553 — the mock's 637 less its 84 px chat strip — scaled as a unit by BoardFit.
 * pad 12 · side 280 · the LAWN a square the box's full height (529; 569 with the chat pill, via data-bf-h 593) ·
 * controls the rest (431 / 391): banner 56 · steer · roll 92 | place · feed.
 * Phone: unscaled, 384 × 812 down to the 360 × 740 floor: header 28 · panels 74 · the LAWN (the one flexible row, the
 * largest square left) · controls 108 + 44 + feed. Tight (< 370): 26 · 66 · 98 + 40.
 *
 * ── ⭐ LOCKED LAYOUT ────────────────────────────────────────────────────────
 * Every slot is a FIXED size except the phone lawn. Every text box is a fixed width or fills its slot. Feedback changes
 * colour, glow or a transform — never size or spacing. Tags, badges, the ghost and the flyers exist from the first
 * frame and only show or hide.
 */

#picnicgoat-game-screen, .pg-root {
  --pg-font: 'Trebuchet MS', 'Segoe UI', system-ui, sans-serif;
  --pg-bg: radial-gradient(120% 95% at 50% -12%, #fbf3e2 0%, #efe0c2 52%, #dfcba4 100%);
  --pg-deck: repeating-linear-gradient(90deg, rgba(80, 58, 34, .05) 0 2px, transparent 2px 46px);
  --pg-panel: rgba(255, 255, 255, .66); --pg-panel2: rgba(255, 255, 255, .4); --pg-line: rgba(48, 36, 22, .22);
  --pg-txt: #2a2016; --pg-dim: rgba(42, 32, 22, .62); --pg-pill: rgba(48, 36, 22, .08);
  --pg-cardFace: #fffdf5; --pg-cardTxt: #2a2016; --pg-cardEdge: rgba(42, 32, 22, .3);
  --pg-used: rgba(42, 32, 22, .07); --pg-usedTxt: rgba(42, 32, 22, .38); --pg-usedLine: rgba(42, 32, 22, .2);
  --pg-hatch: repeating-linear-gradient(135deg, rgba(42, 32, 22, .16) 0 3px, rgba(42, 32, 22, .04) 3px 6px);
  --pg-sel: oklch(.5 .1 220); --pg-selInk: #ffffff;
  --pg-ok: oklch(.5 .11 152); --pg-okInk: #ffffff; --pg-okPress: oklch(.42 .11 152);
  --pg-win: oklch(.62 .13 95); --pg-winGlow: oklch(.62 .13 95 / .5);
  --pg-edge: oklch(.66 .1 138); --pg-grassA: oklch(.84 .12 132); --pg-grassB: oklch(.8 .12 132); --pg-grassLine: rgba(40, 70, 20, .13);
  --pg-loop: #fff8e6; --pg-loopEdge: oklch(.45 .08 130);
  --pg-seam: #2d2418; --pg-stitch: rgba(255, 255, 255, .72); --pg-patInk: rgba(255, 255, 255, .62); --pg-patInk2: rgba(255, 255, 255, .4); --pg-blShadow: rgba(30, 24, 10, .3);
  --pg-c0: oklch(.6 .16 28); --pg-c1: oklch(.55 .13 250); --pg-c2: oklch(.64 .13 80); --pg-c3: oklch(.52 .14 320);
  --pg-goatBody: #fbf5e6; --pg-goatInk: #3a2a1c; --pg-goatHorn: #b88a52; --pg-goatMuzzle: #f1c6b0; --pg-goatBeard: #d9c8a4; --pg-goatDisk: rgba(255, 253, 245, .6);
  --pg-head: #ffffff; --pg-headInk: #2a2016; --pg-path: #2a2016; --pg-markBg: rgba(255, 253, 245, .88);
  --pg-toll: oklch(.55 .17 30); --pg-tollInk: #ffffff; --pg-free: oklch(.92 .06 150); --pg-freeInk: oklch(.36 .09 150);
  --pg-glowC: oklch(.86 .17 95); --pg-glowFill: oklch(.92 .15 95 / .4);
  --pg-bread: #ecc783; --pg-crust: #b07a3a; --pg-filling: oklch(.62 .14 140);
  --pg-radS: 6px; --pg-radM: 10px; --pg-radL: 14px;
  --pg-shadow: 0 2px 6px rgba(40, 28, 14, .14); --pg-cardShadow: 0 3px 0 rgba(42, 32, 22, .18);
}
#picnicgoat-game-screen.gm-arcade, .gm-arcade .pg-root {
  --pg-font: Verdana, 'Segoe UI', system-ui, sans-serif;
  --pg-bg: radial-gradient(110% 90% at 22% -10%, #2b1163 0%, #170a3f 48%, #08041c 100%);
  --pg-deck: repeating-linear-gradient(90deg, rgba(255, 255, 255, .04) 0 2px, transparent 2px 46px);
  --pg-panel: rgba(255, 255, 255, .085); --pg-panel2: rgba(255, 255, 255, .05); --pg-line: rgba(255, 255, 255, .22);
  --pg-txt: #f6f2ff; --pg-dim: rgba(246, 242, 255, .64); --pg-pill: rgba(255, 255, 255, .1);
  --pg-cardFace: #fdfaff; --pg-cardTxt: #1a0b3d; --pg-cardEdge: rgba(255, 255, 255, .5);
  --pg-used: rgba(255, 255, 255, .07); --pg-usedTxt: rgba(246, 242, 255, .4); --pg-usedLine: rgba(255, 255, 255, .18);
  --pg-hatch: repeating-linear-gradient(135deg, rgba(255, 255, 255, .14) 0 3px, rgba(255, 255, 255, .03) 3px 6px);
  --pg-sel: oklch(.78 .16 200); --pg-selInk: #08041c;
  --pg-ok: oklch(.8 .19 145); --pg-okInk: #06210f; --pg-okPress: oklch(.68 .17 145);
  --pg-win: oklch(.88 .17 100); --pg-winGlow: oklch(.88 .17 100 / .55);
  --pg-edge: #0b241f; --pg-grassA: #14432f; --pg-grassB: #103a29; --pg-grassLine: rgba(120, 255, 190, .12);
  --pg-loop: oklch(.85 .14 200); --pg-loopEdge: #041018;
  --pg-seam: #08041c; --pg-stitch: rgba(255, 255, 255, .62); --pg-patInk: rgba(255, 255, 255, .6); --pg-patInk2: rgba(255, 255, 255, .36); --pg-blShadow: rgba(0, 0, 0, .5);
  --pg-c0: oklch(.66 .19 20); --pg-c1: oklch(.64 .15 240); --pg-c2: oklch(.76 .15 88); --pg-c3: oklch(.62 .18 310);
  --pg-goatInk: #1a0b3d; --pg-goatHorn: #c99a5e; --pg-goatMuzzle: #f4c3b4; --pg-goatDisk: rgba(255, 255, 255, .28);
  --pg-headInk: #08041c; --pg-path: #f6f2ff; --pg-markBg: rgba(20, 10, 52, .84);
  --pg-toll: oklch(.66 .21 12); --pg-free: oklch(.8 .19 145); --pg-freeInk: #06210f;
  --pg-glowC: oklch(.9 .17 100); --pg-glowFill: oklch(.9 .17 100 / .3);
  --pg-filling: oklch(.72 .17 145);
  --pg-radS: 7px; --pg-radM: 12px; --pg-radL: 18px;
  --pg-shadow: 0 6px 18px rgba(0, 0, 0, .45); --pg-cardShadow: 0 4px 0 rgba(0, 0, 0, .35);
}

/* ── keyframes (the mock's, L92–102). ⛔ The pops animate the `scale` PROPERTY, never `transform` — a chip's centring
 *    and the goat's position ARE transforms (predicely_scale_keyframe_trap). ── */
@keyframes pg-bob { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-5%) } }
@keyframes pg-hop { 0%, 100% { transform: translateY(0) } 40% { transform: translateY(-16%) } }
@keyframes pg-chew { 0%, 100% { transform: scaleY(1) } 50% { transform: scaleY(.7) } }
@keyframes pg-crumb { 0% { transform: translate(0, 0); opacity: 1 } 100% { transform: translate(var(--cx), var(--cy)); opacity: 0 } }
@keyframes pg-glow { 0%, 100% { opacity: .55 } 50% { opacity: 1 } }
@keyframes pg-pop { 0% { scale: .2; opacity: 0 } 65% { scale: 1.18; opacity: 1 } 100% { scale: 1; opacity: 1 } }
@keyframes pg-flap { 0% { transform: perspective(320px) rotateX(-68deg) translateY(-10%); opacity: .25 } 100% { transform: perspective(320px) rotateX(0) translateY(0); opacity: 1 } }
@keyframes pg-ghost { 0% { transform: perspective(320px) rotateX(-68deg) translateY(-10%); opacity: .25 } 40%, 100% { transform: perspective(320px) rotateX(0) translateY(0); opacity: 1 } }
@keyframes pg-pulse { 0%, 100% { box-shadow: 0 0 0 2px var(--pg-sel), 0 0 0 5px transparent } 50% { box-shadow: 0 0 0 2px var(--pg-sel), 0 0 12px 5px var(--pg-winGlow) } }
@keyframes pg-z { 0% { transform: translate(0, 0); opacity: 0 } 30% { opacity: 1 } 100% { transform: translate(40%, -120%); opacity: 0 } }
@keyframes pg-in { 0% { opacity: 0; transform: translateY(6px) } 100% { opacity: 1; transform: none } }

/* ── setup card (on the screen's palette) ───────────────────────────────── */
#picnicgoat-game-screen { background: var(--pg-bg); color: var(--pg-txt); }
.pg-setup-card { max-width: 560px; margin: 24px auto; padding: 26px 28px; display: flex; flex-direction: column; gap: 10px; font-family: var(--pg-font); background: var(--pg-panel); color: var(--pg-txt); border: 1px solid var(--pg-line); }
.pg-setup-eyebrow { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--pg-dim); font-weight: 700; }
.pg-setup-title { margin: 0; font-size: 30px; }
.pg-setup-blurb, .pg-setup-hint { margin: 0; line-height: 1.55; font-size: 14px; }
.pg-setup-hint { color: var(--pg-dim); font-size: 12.5px; }
.pg-setup-row { display: flex; align-items: center; gap: 12px; }
.pg-setup-lab { width: 64px; font-weight: 700; font-size: 13px; color: var(--pg-dim); }
.pg-opts { display: flex; gap: 6px; flex-wrap: wrap; }
.pg-opt { min-width: 52px; height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--pg-line); background: var(--pg-panel); color: var(--pg-txt); font: 700 14px var(--pg-font); cursor: pointer; }
.pg-opt[data-on="1"] { background: var(--pg-sel); color: var(--pg-selInk); box-shadow: 0 0 0 2px var(--pg-txt); }
.pg-start { margin-top: 6px; height: 48px; border-radius: 12px; border: 1px solid var(--pg-line); background: var(--pg-ok); color: var(--pg-okInk); font: 800 17px var(--pg-font); letter-spacing: .04em; cursor: pointer; }
.pg-start:active, .pg-opt:active { transform: translateY(1px); }
@media (hover: hover) { .pg-start:hover { filter: brightness(1.1); } .pg-opt:hover { box-shadow: 0 0 0 2px var(--pg-txt); } }
.pg-endrows { display: flex; flex-direction: column; gap: 6px; }
.pg-endrow { display: flex; justify-content: space-between; gap: 12px; padding: 7px 10px; border-radius: 8px; background: rgba(127, 127, 127, .12); }
.pg-endrow[data-win="1"] { box-shadow: 0 0 0 2px currentColor; font-weight: 800; }
.pg-endnote { margin-top: 10px; font-size: 12px; opacity: .7; }

/* ── the root ───────────────────────────────────────────────────────────── */
.pg-root {
  position: relative; box-sizing: border-box; overflow: hidden;
  background: var(--pg-bg); color: var(--pg-txt); font-family: var(--pg-font);
  user-select: none; -webkit-user-select: none;
  --pg-gap: 8px;
}
.pg-root *, .pg-root *::before, .pg-root *::after { box-sizing: border-box; }
.pg-root button { font-family: inherit; -webkit-tap-highlight-color: transparent; margin: 0; padding: 0; }
.pg-root i, .pg-root em { font-style: normal; }
.pg-box { background: var(--pg-panel2); border: 1px solid var(--pg-line); border-radius: var(--pg-radM); }
.pg-ph-only { display: none; }

/* the side: the header row + the player panels */
.pg-side { display: flex; flex-direction: column; gap: var(--pg-gap); min-width: 0; flex: none; }
.pg-hdr { flex: none; display: flex; align-items: center; gap: var(--pg-gap); min-width: 0; }
.pg-turn { flex: none; height: 100%; display: flex; align-items: center; gap: 5px; padding: 0 10px; border-radius: var(--pg-radM); background: var(--pg-pill); border: 1px solid var(--pg-line); font-weight: 800; letter-spacing: .08em; white-space: nowrap; }
/* ⭐ reserved for the widest value ("48 OF 48" / "48/48") — the pill never changes width (locked layout) */
.pg-turn b { font-variant-numeric: tabular-nums; display: inline-block; min-width: var(--pg-turnW); }
.pg-mode { flex: 1; min-width: 0; height: 100%; display: flex; align-items: center; padding: 0 10px; border-radius: var(--pg-radM); border: 1px dashed var(--pg-line); color: var(--pg-dim); font-weight: 800; letter-spacing: .08em; white-space: nowrap; overflow: hidden; }
.pg-hban { flex: 1; min-width: 0; height: 100%; align-items: center; gap: 6px; padding: 0 10px; border-radius: var(--pg-radM); background: var(--pg-panel); border: 1px solid var(--pg-line); font-weight: 800; letter-spacing: .04em; white-space: nowrap; overflow: hidden; }
.pg-hban i { flex: none; }
.pg-hban b { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pg-menu { display: none; }
.pg-pls { display: grid; gap: var(--pg-gap); }
.pg-pl { position: relative; min-width: 0; display: grid; gap: 2px 6px; padding: 6px 8px; border-radius: var(--pg-radM); background: var(--pg-panel); border: 2px solid transparent; box-shadow: var(--pg-shadow); overflow: visible; }
.pg-pl[data-cur="1"] { border-color: var(--pg-sel); box-shadow: 0 0 0 3px var(--pg-winGlow), var(--pg-shadow); }
.pg-pl[data-out="1"] { background: var(--pg-hatch), var(--pg-panel2); border: 2px dashed var(--pg-usedLine); color: var(--pg-usedTxt); box-shadow: none; }
.pg-pl[data-out="1"] .pg-sw, .pg-pl[data-out="1"] .pg-mini { filter: grayscale(1); }
.pg-av { grid-area: av; align-self: center; width: var(--pg-avS); height: var(--pg-avS); border-radius: 50%; background: var(--pg-pill); border: 1px dashed var(--pg-line); display: flex; align-items: center; justify-content: center; font-size: calc(var(--pg-avS) * .42); font-weight: 800; color: var(--pg-dim); }
.pg-pln { grid-area: nm; align-self: center; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pg-sws { grid-area: sw; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; justify-content: center; }
.pg-sw { --pg-swS2: var(--pg-swS); position: relative; flex: none; width: var(--pg-swS2); height: var(--pg-swS2); border-radius: var(--pg-radS); border: 2px solid var(--pg-seam); display: flex; align-items: center; justify-content: center; }
.pg-sws[data-two="1"] .pg-sw { --pg-swS2: calc(var(--pg-swS) * .78); }
.pg-sw b { font-size: calc(var(--pg-swS2) * .42); line-height: 1; color: var(--pg-seam); background: var(--pg-cardFace); border-radius: 50%; width: calc(var(--pg-swS2) * .56); height: calc(var(--pg-swS2) * .56); display: flex; align-items: center; justify-content: center; }
.pg-sw[data-next="1"] { box-shadow: 0 0 0 2px var(--pg-cardFace), 0 0 0 4px var(--pg-sel); }
.pg-stats { grid-area: st; display: flex; justify-content: center; gap: 3px 8px; min-width: 0; }
/* ⭐ a FIXED line height: a pattern symbol and "?" come from different fonts and must not move the column by a pixel */
.pg-st { display: flex; align-items: center; gap: 5px; white-space: nowrap; min-width: 0; height: var(--pg-stH); overflow: hidden; }
.pg-st b { font-weight: 800; font-variant-numeric: tabular-nums; min-width: 2ch; }
.pg-st em { color: var(--pg-dim); font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.pg-mini { flex: none; display: inline-block; width: 16px; height: 9px; border-radius: 2px; border: 1px solid var(--pg-seam); }
.pg-mini-sq { width: 10px; height: 10px; }
.pg-sc { grid-area: sc; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; min-width: 0; }
.pg-sc em { font-size: 9px; font-weight: 800; letter-spacing: .14em; color: var(--pg-dim); }
.pg-sc b { line-height: 1; font-weight: 800; font-variant-numeric: tabular-nums; width: 100%; text-align: right; }
.pg-sc i { font-size: 9px; font-weight: 700; color: var(--pg-dim); white-space: nowrap; height: 11px; line-height: 11px; }
.pg-tag { position: absolute; height: 18px; padding: 0 7px; border-radius: 999px; display: flex; align-items: center; font-weight: 800; letter-spacing: .08em; white-space: nowrap; }
.pg-tag[data-k=""] { display: none; }
.pg-tag[data-k="turn"] { background: var(--pg-sel); color: var(--pg-selInk); }
.pg-tag[data-k="out"] { background: var(--pg-usedTxt); color: var(--pg-cardFace); }
.pg-tag[data-k="pay"] { background: var(--pg-toll); color: var(--pg-tollInk); }
.pg-tag[data-k="get"] { background: var(--pg-ok); color: var(--pg-okInk); }
.pg-tag[data-k="rank"] { background: var(--pg-win); color: #2a2016; animation: pg-in .5s ease-out both; }
/* the sandwich icon (the mock's sandIcon): crust · bread · filling · bread · crust, cut on the diagonal */
.pg-sand { flex: none; display: inline-block; width: 12px; height: 12px; background: linear-gradient(var(--pg-crust) 0 16%, var(--pg-bread) 16% 38%, var(--pg-filling) 38% 60%, var(--pg-bread) 60% 84%, var(--pg-crust) 84%); clip-path: polygon(0 100%, 100% 100%, 100% 0); }

/* ── the lawn: a square in its box; --cell = one eighth of it (7 squares + a half-square border each side) ── */
.pg-lawnbox { position: relative; container-type: size; display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 0; }
/* isolation: the lawn's layers (blankets 57+, the toll patch 200, paths 240, counts 260, marks 300, targets 420, the goat
   500) must stay INSIDE the lawn — unisolated they out-stacked the end card (.ges-overlay, 90) wherever BoardFit's scale
   is off (phones): the z-leak sweep after Sandcastles .663 */
.pg-lawn { position: relative; flex: none; width: min(100cqw, 100cqh); height: min(100cqw, 100cqh); --cell: calc(min(100cqw, 100cqh) / 8);
  border-radius: var(--pg-radL); background: var(--pg-edge); box-shadow: var(--pg-shadow); overflow: visible; isolation: isolate; }
.pg-grass { position: absolute; left: 6.25%; top: 6.25%; width: 87.5%; height: 87.5%;
  background: linear-gradient(90deg, var(--pg-grassLine) 1px, transparent 1px) 0 0 / calc(100% / 7) calc(100% / 7),
    linear-gradient(var(--pg-grassLine) 1px, transparent 1px) 0 0 / calc(100% / 7) calc(100% / 7),
    conic-gradient(var(--pg-grassA) 25%, var(--pg-grassB) 0 50%, var(--pg-grassA) 0 75%, var(--pg-grassB) 0) 0 0 / calc(200% / 7) calc(200% / 7); }
.pg-loops, .pg-paths { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.pg-loopk { fill: none; stroke: var(--pg-loopEdge); stroke-width: .2; stroke-linecap: round; }
.pg-loopc { fill: none; stroke: var(--pg-loop); stroke-width: .11; stroke-linecap: round; }
.pg-paths { z-index: 240; }
.pg-path { fill: none; stroke: var(--pg-path); stroke-width: .035; stroke-dasharray: .06 .08; stroke-linecap: round; opacity: .5; }
.pg-path[data-on="1"] { stroke-width: .06; stroke-dasharray: .13 .09; stroke-linejoin: round; opacity: 1; }
.pg-layer { position: absolute; inset: 0; pointer-events: none; }
#pg-tgts { pointer-events: none; z-index: 420; }
#pg-tgts > * { pointer-events: auto; }
#pg-marks { z-index: 300; }

/* the blankets — stitched, seamed; the newest on top; an OUT owner's are grey, hatched and ⊘ (neutral) */
.pg-bl { position: absolute; border-radius: calc(var(--cell) * .12); border: calc(var(--cell) * .045) solid var(--pg-seam); box-shadow: 0 calc(var(--cell) * .05) 0 var(--pg-blShadow); transform-origin: 50% 0; }
.pg-bl[data-land="1"] { animation: pg-flap .45s ease-out both; }
.pg-bl[data-dead="1"] { filter: grayscale(1) contrast(.8); opacity: .8; }
.pg-stitch { position: absolute; inset: calc(var(--cell) * .08); border: calc(var(--cell) * .028) dashed var(--pg-stitch); border-radius: calc(var(--cell) * .07); }
.pg-dead { position: absolute; inset: 0; border-radius: calc(var(--cell) * .08); background: var(--pg-hatch); display: flex; align-items: center; justify-content: center; font-size: calc(var(--cell) * .34); font-weight: 800; color: var(--pg-seam); }

/* the toll patch + its count-up */
#pg-hl { z-index: 200; }
.pg-hlc { position: absolute; width: 12.5%; height: 12.5%; background: var(--pg-glowFill); animation: pg-glow 1.2s ease-in-out infinite;
  border: 0 solid var(--pg-glowC); }
.pg-hlc[data-t="1"] { border-top-width: calc(var(--cell) * .075); }
.pg-hlc[data-b="1"] { border-bottom-width: calc(var(--cell) * .075); }
.pg-hlc[data-l="1"] { border-left-width: calc(var(--cell) * .075); }
.pg-hlc[data-r="1"] { border-right-width: calc(var(--cell) * .075); }
.pg-cnts { z-index: 260; }
.pg-cnt { position: absolute; width: calc(var(--cell) * .42); height: calc(var(--cell) * .42); margin: calc(var(--cell) * .29) 0 0 calc(var(--cell) * .29); border-radius: 50%; background: var(--pg-glowC); color: #2a2016;
  border: calc(var(--cell) * .03) solid var(--pg-seam); display: none; align-items: center; justify-content: center; font-size: calc(var(--cell) * .24); font-weight: 800; }
.pg-cnt[data-on="1"] { display: flex; animation: pg-pop .3s ease-out both; }
.pg-plabel { position: absolute; display: none; transform: translate(-10%, -70%); padding: 2px 7px; border-radius: 999px; background: var(--pg-cardFace); color: var(--pg-cardTxt); border: 1px solid var(--pg-seam);
  font-size: calc(var(--cell) * .18); font-weight: 800; white-space: nowrap; box-shadow: var(--pg-cardShadow); z-index: 2; }
.pg-plabel[data-on="1"] { display: block; }

/* the reach preview's stops (MK5): the chosen heading big (number · odds on PC · a heavier ring on the 2/6 stops ·
   a toll badge); the other two small and dashed; a stop ON the goat's own square draws small, offset onto the goat */
.pg-mark, .pg-trail { position: absolute; width: 12.5%; height: 12.5%; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.pg-mark[data-on="0"] b { width: 34%; height: 34%; border-radius: 50%; background: var(--pg-markBg); border: calc(var(--cell) * .03) dashed var(--pg-path); display: flex; align-items: center; justify-content: center; opacity: .85; font-size: calc(var(--cell) * .19); font-weight: 800; color: var(--pg-txt); }
.pg-mark[data-on="1"] { z-index: 2; }
.pg-mark[data-goat="1"] { transform: translate(34%, 34%) scale(.62); z-index: 20; }
.pg-ring { width: 70%; height: 70%; border-radius: 50%; background: var(--pg-markBg); border: calc(var(--cell) * .04) solid var(--pg-path); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.pg-mark[data-odds="2"] .pg-ring { border-width: calc(var(--cell) * .07); }
.pg-ring b { font-size: calc(var(--cell) * .3); font-weight: 800; color: var(--pg-txt); }
.pg-ring em { font-size: calc(var(--cell) * .14); font-weight: 800; color: var(--pg-dim); }
.pg-mbadge { position: absolute; right: -4%; top: -6%; height: calc(var(--cell) * .3); min-width: calc(var(--cell) * .34); padding: 0 calc(var(--cell) * .05); border-radius: 999px; display: flex; align-items: center; justify-content: center; gap: 2px;
  font-size: calc(var(--cell) * .19); font-weight: 800; border: calc(var(--cell) * .025) solid var(--pg-seam); white-space: nowrap; }
.pg-mbadge .pg-sand { width: 7px; height: 7px; }
.pg-mark[data-k="free"] .pg-mbadge { background: var(--pg-free); color: var(--pg-freeInk); }
.pg-mark[data-k="toll"] .pg-mbadge { background: var(--pg-toll); color: var(--pg-tollInk); }
.pg-mark[data-k="out"] .pg-mbadge { background: var(--pg-cardTxt); color: var(--pg-cardFace); }
.pg-trail b { width: 42%; height: 42%; border-radius: 50%; background: var(--pg-markBg); border: calc(var(--cell) * .035) dashed var(--pg-path); display: flex; align-items: center; justify-content: center; font-size: calc(var(--cell) * .22); font-weight: 800; color: var(--pg-txt); }
.pg-trail[data-done="1"] b { background: var(--pg-path); color: var(--pg-markBg); border-style: solid; }

/* the ghost blanket (your next pattern, flapping) */
.pg-ghost { position: absolute; z-index: 380; display: none; border-radius: calc(var(--cell) * .12); border: calc(var(--cell) * .05) dashed var(--pg-cardFace);
  box-shadow: 0 0 0 calc(var(--cell) * .04) var(--pg-ok), 0 calc(var(--cell) * .14) calc(var(--cell) * .12) var(--pg-blShadow); opacity: .88; pointer-events: none; transform-origin: 50% 0; }
.pg-ghost[data-on="1"] { display: block; animation: pg-ghost 2.2s ease-out infinite; }
.pg-ghost i { position: absolute; inset: calc(var(--cell) * .08); border: calc(var(--cell) * .028) dashed var(--pg-stitch); border-radius: calc(var(--cell) * .07); }

/* PC placing: a seam pill per spot (.44 of a square — 29 px on the 529 lawn), with hover */
.pg-pill { position: absolute; width: calc(var(--cell) * .44); height: calc(var(--cell) * .44); transform: translate(-50%, -50%); border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: calc(var(--cell) * .28); font-weight: 800; line-height: 1; transition: background .12s, box-shadow .12s, transform .12s;
  background: var(--pg-cardFace); color: var(--pg-sel); border: calc(var(--cell) * .05) solid var(--pg-sel); box-shadow: var(--pg-cardShadow); cursor: pointer; }
.pg-pill:active { background: var(--pg-sel); color: var(--pg-selInk); box-shadow: inset 0 2px 5px rgba(0, 0, 0, .35); transform: translate(-50%, -44%); }
.pg-pill[data-st="sel"] { background: var(--pg-ok); color: var(--pg-okInk); border-color: var(--pg-cardFace); box-shadow: 0 0 0 calc(var(--cell) * .05) var(--pg-ok), var(--pg-cardShadow); }
.pg-pill[data-st="blocked"] { background: var(--pg-hatch), var(--pg-cardFace); color: var(--pg-usedTxt); border: calc(var(--cell) * .04) dashed var(--pg-usedTxt); box-shadow: none; cursor: not-allowed; }
@media (hover: hover) { .pg-pill[data-st="idle"]:hover { box-shadow: 0 0 0 calc(var(--cell) * .07) var(--pg-winGlow), var(--pg-cardShadow); } }

/* phone placing (PG-M2): a whole square is the target — a lit neighbour "+", the first square "1", its partners "2"
   (PG2-F4) on a dashed ring, the chosen partner ✓, a blocked one hatched ✕ */
.pg-sqt { position: absolute; width: 11.5%; height: 11.5%; display: flex; align-items: center; justify-content: center; border-radius: calc(var(--cell) * .12); cursor: pointer;
  background: var(--pg-glowFill); border: calc(var(--cell) * .06) solid var(--pg-sel); transition: background .12s, box-shadow .12s, transform .12s; }
.pg-sqt b { width: calc(var(--cell) * .42); height: calc(var(--cell) * .42); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: calc(var(--cell) * .28); font-weight: 800; line-height: 1;
  background: var(--pg-sel); color: var(--pg-selInk); border: calc(var(--cell) * .03) solid var(--pg-seam); box-shadow: var(--pg-cardShadow); }
.pg-sqt:active { transform: scale(.94); box-shadow: inset 0 calc(var(--cell) * .05) calc(var(--cell) * .12) rgba(0, 0, 0, .35); }
.pg-sqt[data-st="chosen"] { background: transparent; border: calc(var(--cell) * .09) solid var(--pg-sel); box-shadow: inset 0 0 0 calc(var(--cell) * .03) var(--pg-cardFace), 0 0 0 calc(var(--cell) * .03) var(--pg-cardFace); }
.pg-sqt[data-st="chosen"] b { background: var(--pg-cardFace); color: var(--pg-sel); }
.pg-sqt[data-st="pt"] { border: calc(var(--cell) * .06) dashed var(--pg-ok); }
.pg-sqt[data-st="pt"] b, .pg-sqt[data-st="psel"] b { background: var(--pg-ok); color: var(--pg-okInk); }
.pg-sqt[data-st="psel"] { background: transparent; border: calc(var(--cell) * .07) solid var(--pg-ok); }
.pg-sqt[data-st="blocked"] { background: var(--pg-hatch); border: calc(var(--cell) * .05) dashed var(--pg-usedTxt); cursor: not-allowed; }
.pg-sqt[data-st="blocked"] b { background: var(--pg-cardFace); color: var(--pg-usedTxt); }

/* ── the goat (Picnic Goat.dc.html L198–224): a CSS goat on a disk, heading arrows round it ──────────────────── */
.pg-goat { position: absolute; z-index: 500; width: calc(var(--cell) * .94); height: calc(var(--cell) * .94); transform: translate(-50%, -50%); pointer-events: none; }
.pg-disk { position: absolute; inset: 4%; border-radius: 50%; background: var(--pg-goatDisk); box-shadow: 0 calc(var(--cell) * .04) calc(var(--cell) * .08) var(--pg-blShadow); }
.pg-arrows { position: absolute; inset: 0; }
.pg-rotor { position: absolute; inset: 0; }
.pg-tri { position: absolute; left: 50%; top: calc(var(--cell) * -.12); width: calc(var(--cell) * .24); height: calc(var(--cell) * .204); transform: translateX(-50%); clip-path: polygon(50% 0, 100% 100%, 50% 76%, 0 100%);
  background: var(--pg-goatDisk); filter: drop-shadow(0 0 1px var(--pg-headInk)) drop-shadow(0 0 1px var(--pg-headInk)); }
.pg-tri[data-main="1"] { top: calc(var(--cell) * -.2); width: calc(var(--cell) * .36); height: calc(var(--cell) * .306); background: var(--pg-head); }
.pg-goat[data-st="lie"] .pg-tri { opacity: .35; }
.pg-goat .pg-face { position: absolute; inset: 8%; }
.pg-goat[data-st="idle"] .pg-face { animation: pg-bob 2.4s ease-in-out infinite; }
.pg-goat[data-st="walk"] .pg-face { animation: pg-hop .28s ease-in-out infinite; }
.pg-goat[data-st="munch"] .pg-face { animation: pg-bob .9s ease-in-out infinite; }
.pg-goat[data-st="sit"] .pg-face { transform: translateY(6%) scaleY(.94); }
.pg-goat[data-st="lie"] .pg-face { transform: translateY(12%) scale(1.02, .84); }
.pg-g { position: absolute; display: block; }
.pg-g-hornl, .pg-g-hornr { top: 3%; width: 15%; height: 30%; border-radius: 60% 60% 30% 30%; background: var(--pg-goatHorn); border: calc(var(--cell) * .022) solid var(--pg-goatInk); }
.pg-g-hornl { left: 24%; transform: rotate(-24deg); }
.pg-g-hornr { right: 24%; transform: rotate(24deg); }
.pg-g-earl, .pg-g-earr { top: 35%; width: 29%; height: 15%; border-radius: 50%; background: var(--pg-goatBody); border: calc(var(--cell) * .022) solid var(--pg-goatInk); }
.pg-g-earl { left: 3%; transform: rotate(16deg); }
.pg-g-earr { right: 3%; transform: rotate(-16deg); }
.pg-g-head { left: 23%; top: 17%; width: 54%; height: 66%; border-radius: 46% 46% 42% 42% / 40% 40% 60% 60%; background: var(--pg-goatBody); border: calc(var(--cell) * .026) solid var(--pg-goatInk); }
.pg-g-tuft { left: 40%; top: 15%; width: 20%; height: 12%; border-radius: 50% 50% 40% 40%; background: var(--pg-goatHorn); border: calc(var(--cell) * .018) solid var(--pg-goatInk); }
.pg-g-eye { top: 38%; width: 14%; height: 12%; border-radius: 50%; background: #fff; border: calc(var(--cell) * .02) solid var(--pg-goatInk); overflow: hidden; }
.pg-g-eyel { left: 31%; }
.pg-g-eyer { right: 31%; }
.pg-g-pupil { position: absolute; left: 12%; right: 12%; top: 34%; height: 32%; border-radius: 2px; background: var(--pg-goatInk); }
.pg-goat[data-st="munch"] .pg-g-eye { height: 8%; }
.pg-goat[data-st="lie"] .pg-g-eye { top: 44%; height: 3%; background: var(--pg-goatInk); }
.pg-goat[data-st="lie"] .pg-g-pupil { display: none; }
.pg-g-muz { left: 33%; top: 58%; width: 34%; height: 22%; border-radius: 50%; background: var(--pg-goatMuzzle); border: calc(var(--cell) * .022) solid var(--pg-goatInk); transform-origin: 50% 0; }
.pg-goat[data-st="munch"] .pg-g-muz { animation: pg-chew .5s ease-in-out infinite; }
.pg-g-nl, .pg-g-nr { position: absolute; top: 30%; width: 14%; height: 22%; border-radius: 50%; background: var(--pg-goatInk); }
.pg-g-nl { left: 24%; }
.pg-g-nr { right: 24%; }
.pg-g-beard { left: 44%; top: 81%; width: 12%; height: 15%; background: var(--pg-goatBeard); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.pg-g-snack, .pg-g-crumb, .pg-g-z { display: none; }
.pg-goat[data-st="munch"] .pg-g-snack { display: block; left: 58%; top: 66%; width: 26%; height: 20%; background: linear-gradient(var(--pg-crust) 0 18%, var(--pg-bread) 18% 40%, var(--pg-filling) 40% 60%, var(--pg-bread) 60% 82%, var(--pg-crust) 82%); clip-path: polygon(0 100%, 100% 100%, 100% 0); animation: pg-chew .5s ease-in-out infinite; }
.pg-goat[data-st="munch"] .pg-g-crumb { display: block; border-radius: 50%; background: var(--pg-bread); }
.pg-g-crumb1 { left: 62%; top: 78%; width: 6%; height: 6%; --cx: 180%; --cy: 260%; animation: pg-crumb .9s ease-out infinite; }
.pg-g-crumb2 { left: 30%; top: 80%; width: 5%; height: 5%; --cx: -220%; --cy: 240%; animation: pg-crumb 1.1s ease-out .3s infinite; }
.pg-goat[data-st="lie"] .pg-g-z { display: block; font-weight: 800; color: var(--pg-goatInk); animation: pg-z 2.2s ease-out infinite; }
.pg-g-z1 { left: 78%; top: -4%; font-size: calc(var(--cell) * .24); }
.pg-g-z2 { left: 66%; top: 6%; font-size: calc(var(--cell) * .17); animation-delay: 1s !important; }

/* ── the controls ───────────────────────────────────────────────────────── */
.pg-ctrl { display: grid; gap: var(--pg-gap); min-width: 0; min-height: 0; }
.pg-ban { grid-area: ban; display: flex; flex-direction: column; justify-content: center; gap: 5px; padding: 0 12px; background: var(--pg-panel); box-shadow: var(--pg-shadow); min-width: 0; }
.pg-bant { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 800; letter-spacing: .04em; white-space: nowrap; overflow: hidden; min-width: 0; }
.pg-bant i { flex: none; }
.pg-bant span { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pg-phs { display: flex; gap: 4px; }
/* ⭐ PLAIN TEXT, never a pill (playtest 1: the owner clicked STEER / ROLL thinking they were actions) */
.pg-ph { height: 18px; padding: 0; display: flex; align-items: center; font-size: 9px; font-weight: 800; letter-spacing: .1em; white-space: nowrap; color: var(--pg-dim); cursor: default; }
.pg-ph + .pg-ph::before { content: '›'; margin: 0 6px 0 2px; opacity: .6; }
.pg-ph[data-st="now"] { color: var(--pg-sel); text-decoration: underline 2px; text-underline-offset: 3px; }
.pg-ph[data-st="done"] { color: var(--pg-txt); opacity: .55; }

.pg-steer { grid-area: steer; display: grid; grid-template-columns: var(--pg-legW) repeat(3, minmax(0, 1fr)); gap: 6px; min-height: 0; }
.pg-leg { font-size: var(--pg-metaFs); display: grid; grid-template-rows: var(--pg-sHdrH) repeat(4, var(--pg-sRowH)) var(--pg-sAvgH); padding: 4px 0; align-items: center; font-weight: 800; color: var(--pg-dim); }
.pg-legh { font-size: 9px; letter-spacing: .1em; line-height: 1.2; }
.pg-legr { display: flex; align-items: baseline; gap: var(--pg-legGap); white-space: nowrap; }
.pg-legr b { color: var(--pg-txt); }
.pg-legr em { font-size: var(--pg-legOddsFs); }
.pg-lega { font-size: 9px; letter-spacing: .06em; }
.pg-col { position: relative; display: flex; flex-direction: column; padding: 4px 3px; border-radius: var(--pg-radM); min-width: 0; text-align: center; transition: background .12s, box-shadow .12s, transform .12s, border-color .12s;
  background: var(--pg-cardFace); color: var(--pg-cardTxt); border: 2px solid var(--pg-cardEdge); box-shadow: var(--pg-cardShadow); cursor: pointer; }
.pg-col[data-st="sel"] { border-color: var(--pg-sel); box-shadow: 0 0 0 3px var(--pg-sel), var(--pg-cardShadow); }
.pg-col[data-st="sel"]:active { box-shadow: inset 0 3px 8px rgba(0, 0, 0, .28); transform: translateY(2px); }
.pg-col[data-st="idle"]:active { box-shadow: inset 0 3px 8px rgba(0, 0, 0, .28); transform: translateY(2px); border-color: var(--pg-sel); }
@media (hover: hover) { .pg-col[data-st="idle"]:hover { border-color: var(--pg-sel); box-shadow: 0 0 0 3px var(--pg-winGlow), var(--pg-cardShadow); } }
.pg-col[data-st="locksel"] { background: var(--pg-used); color: var(--pg-txt); border: 2px solid var(--pg-sel); box-shadow: none; cursor: not-allowed; }
.pg-col[data-st="lock"] { background: var(--pg-used); color: var(--pg-usedTxt); border: 2px dashed var(--pg-usedLine); box-shadow: none; cursor: not-allowed; }
.pg-colh { height: var(--pg-sHdrH); display: flex; align-items: center; justify-content: center; gap: 6px; border-radius: calc(var(--pg-radM) - 3px); padding: 0 4px; min-width: 0; overflow: hidden; }
.pg-col[data-st="sel"] .pg-colh, .pg-col[data-st="locksel"] .pg-colh { background: var(--pg-sel); color: var(--pg-selInk); }
.pg-arrow { flex: none; width: 16px; height: 14px; background: currentColor; clip-path: polygon(50% 0, 100% 100%, 50% 72%, 0 100%); }
.pg-colt { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.pg-colt b { font-size: var(--pg-sLblFs); font-weight: 800; letter-spacing: .04em; white-space: nowrap; }
.pg-colt em { font-size: 9px; font-weight: 700; opacity: .75; white-space: nowrap; }
.pg-brow { height: var(--pg-sRowH); display: flex; align-items: center; justify-content: center; }
.pg-badge { height: var(--pg-badgeH); min-width: calc(var(--pg-badgeH) * 1.9); padding: 0 6px; border-radius: 999px; display: flex; align-items: center; justify-content: center; gap: 4px;
  font-size: var(--pg-badgeFs); font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pg-badge .pg-sand { width: var(--pg-bSand); height: var(--pg-bSand); display: none; }
.pg-badge[data-k="free"] { background: var(--pg-free); color: var(--pg-freeInk); }
.pg-badge[data-k="toll"] { background: var(--pg-toll); color: var(--pg-tollInk); }
.pg-badge[data-k="toll"] .pg-sand { display: inline-block; }
.pg-badge[data-k="out"] { background: var(--pg-cardTxt); color: var(--pg-cardFace); box-shadow: 0 0 0 2px var(--pg-toll); }
.pg-badge[data-k="none"] { visibility: hidden; }
.pg-col[data-st="lock"] .pg-badge { opacity: .6; }
.pg-avg { font-size: var(--pg-metaFs); height: var(--pg-sAvgH); display: flex; align-items: center; justify-content: center; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ══ THE TURN PANEL (playtest 1b — "do we need to see the dice twice?"): ONE panel = whose die it is (in its skin, the
 *    1-2-2-3-3-4 strip) · what is happening · the ONE action (ROLL while you steer, CONFIRM while you lay). It glows
 *    when the move is yours. A fixed box; only its contents change. ══ */
.pg-tp { grid-area: turn; position: relative; display: flex; align-items: center; gap: var(--pg-tpGap); min-width: 0; min-height: 0; padding: var(--pg-tpPad);
  border-radius: var(--pg-radM); background: var(--pg-panel2); color: var(--pg-txt); border: 2px solid var(--pg-line); overflow: visible;
  transition: background .2s, border-color .2s, box-shadow .2s; }
.pg-tp[data-mine="1"] { background: var(--pg-cardFace); color: var(--pg-cardTxt); border-color: var(--pg-sel); box-shadow: 0 0 0 3px var(--pg-winGlow), var(--pg-shadow); }
/* PC: the whole panel rolls while you steer (playtest 2) */
.pg-tp[data-rollable="1"] { cursor: pointer; }
@media (hover: hover) { .pg-tp[data-rollable="1"]:hover { box-shadow: 0 0 0 4px var(--pg-winGlow), var(--pg-shadow); } .pg-tp[data-rollable="1"]:hover .pg-rollbtn { box-shadow: 0 0 0 3px var(--pg-winGlow), var(--pg-cardShadow); } }
.pg-tpdie { flex: none; display: flex; flex-direction: var(--pg-tpDir); align-items: center; gap: 5px; }
.pg-act { flex: none; display: grid; width: var(--pg-actW); height: var(--pg-actH); overflow: visible; margin: 0 auto; }
.pg-act > button { grid-area: 1 / 1; width: 100%; height: 100%; }
.pg-act > [data-show="0"] { visibility: hidden; }
.pg-rollbtn { display: flex; align-items: center; justify-content: center; border-radius: var(--pg-radM); background: var(--pg-ok); color: var(--pg-okInk); border: 1px solid var(--pg-ok);
  box-shadow: var(--pg-cardShadow); font-size: 15px; font-weight: 800; letter-spacing: .16em; cursor: pointer; transition: background .12s, box-shadow .12s, transform .12s; }
.pg-rollbtn:active { background: var(--pg-okPress); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .35); transform: translateY(2px); }
@media (hover: hover) { .pg-rollbtn:hover { box-shadow: 0 0 0 3px var(--pg-winGlow), var(--pg-cardShadow); } }
.pg-die { position: relative; flex: none; width: var(--pg-dieS); height: var(--pg-dieS); border-radius: var(--pg-radM); display: flex; align-items: center; justify-content: center; transition: box-shadow .12s, transform .12s;
  background: var(--pg-used); border: 2px dashed var(--pg-usedLine); cursor: not-allowed; }
.pg-die[data-st="ready"] { background: var(--pg-cardFace); border: 2px solid var(--pg-sel); animation: pg-pulse 1.6s ease-in-out infinite; cursor: pointer; }
.pg-die[data-st="ready"]:active { box-shadow: inset 0 3px 8px rgba(0, 0, 0, .3); transform: translateY(2px) rotate(-4deg); animation: none; }
@media (hover: hover) { .pg-die[data-st="ready"]:hover { animation: none; box-shadow: 0 0 0 2px var(--pg-sel), 0 0 0 7px var(--pg-winGlow); } }
.pg-die[data-st="rolled"] { background: var(--pg-cardFace); border: 2px solid var(--pg-cardEdge); box-shadow: 0 0 0 3px var(--pg-win); cursor: default; }
.pg-diein, .pg-dieout { display: flex; align-items: center; justify-content: center; line-height: 0; }
.pg-dieout { position: absolute; inset: 0; pointer-events: none; }
.pg-die[data-st="wait"] { background: var(--pg-cardFace); border: 2px solid var(--pg-cardEdge); cursor: default; }
/* 🌐 MP (slice B, PGB3): my roll is in flight — the die shakes until the server's face arrives (never a fake face) */
.pg-die[data-st="send"] { background: var(--pg-cardFace); border: 2px solid var(--pg-sel); cursor: progress; animation: pg-shake .32s ease-in-out infinite; }
@keyframes pg-shake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-9deg) translateY(-1px); } 75% { transform: rotate(9deg) translateY(-1px); } }
/* 🌐 MP (PGB4): the turn clock — a ring AROUND the die, absolute (it never moves a slot), off in solo */
.pg-clock { position: absolute; inset: -7px; pointer-events: none; display: none; }
.pg-clock[data-on="1"] { display: block; }
.pg-clock svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.pg-clkbg { fill: none; stroke: var(--pg-cardEdge); stroke-width: 2.5; opacity: .45; }
.pg-clkfg { fill: none; stroke: var(--pg-sel); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 0; transition: stroke-dashoffset .25s linear; }
.pg-clock[data-mine="0"] .pg-clkfg { stroke: var(--pg-cardEdge); }
.pg-clock[data-urgent="1"] .pg-clkfg { stroke: #e0564a; }
.pg-clock b { position: absolute; right: -9px; top: -9px; min-width: 18px; height: 18px; padding: 0 3px; border-radius: 9px; background: var(--pg-cardFace);
  border: 1.5px solid var(--pg-cardEdge); font: 800 10px/15px 'Outfit', system-ui, sans-serif; text-align: center; color: var(--pg-headInk); box-sizing: border-box; }
.pg-clock[data-urgent="1"] b { border-color: #e0564a; color: #b8322a; }
.pg-die[data-st="wait"] .pg-diein, .pg-die[data-st="ready"] .pg-diein, .pg-die[data-st="lock"] .pg-diein { opacity: .55; }
/* (no result badge — playtest 3: the die and the lit faces say it) */
.pg-faces { display: grid; grid-template-columns: repeat(var(--pg-faceCols), var(--pg-faceW)); gap: 2px; }
.pg-dface { width: var(--pg-faceW); height: var(--pg-faceH); border-radius: 3px; display: flex; align-items: center; justify-content: center; font-size: var(--pg-faceFs); font-weight: 800; font-variant-numeric: tabular-nums;
  background: var(--pg-cardFace); color: var(--pg-cardTxt); border: 1px solid var(--pg-cardEdge); }
.pg-dface[data-on="1"] { background: var(--pg-win); color: #2a2016; border-color: var(--pg-seam); }
.pg-ok { border-radius: var(--pg-radM); display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; font-weight: 800; letter-spacing: .1em; white-space: nowrap; transition: background .12s, box-shadow .12s, transform .12s;
  background: var(--pg-used); color: var(--pg-usedTxt); border: 1px dashed var(--pg-usedLine); cursor: not-allowed; }
.pg-ok[data-st="idle"] { background: var(--pg-ok); color: var(--pg-okInk); border: 1px solid var(--pg-ok); box-shadow: var(--pg-cardShadow); cursor: pointer; }
.pg-ok[data-st="idle"]:active { background: var(--pg-okPress); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .35); transform: translateY(2px); }
@media (hover: hover) { .pg-ok[data-st="idle"]:hover { box-shadow: 0 0 0 3px var(--pg-winGlow), var(--pg-cardShadow); } }

.pg-feed { grid-area: feed; min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 4px; }
.pg-feedh { flex: none; font-size: 9px; font-weight: 800; letter-spacing: .14em; color: var(--pg-dim); }
.pg-feedls { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.pg-feedl { flex: none; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; font-weight: 600; color: var(--pg-dim); }
.pg-feedl[data-first="1"] { font-weight: 800; color: var(--pg-txt); }
.pg-feedl:empty { display: none; }

/* the flying sandwiches — an absolute layer of the root, painted by pgPaintFlyers */
.pg-flyers { position: absolute; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.pg-fly { position: absolute; left: 0; top: 0; width: 20px; height: 20px; display: none; }
.pg-fly[data-on="1"] { display: block; }

@media (prefers-reduced-motion: reduce) {
  .pg-root .pg-face, .pg-root .pg-g, .pg-die, .pg-ghost, .pg-hlc, .pg-bl, .pg-cnt, .pg-tag { animation: none !important; }
  .pg-tp { transition: none !important; }
}

/* ══ PHONE (unscaled, 384 × 812 → 360 × 740): one column, the LAWN the flexible row ══ */
@media (max-width: 999px) {
  #picnicgoat-game-screen.pg-playing .wrap { padding: 0 2px; max-width: none; }
  #picnicgoat-game-screen.pg-playing .topbar { display: none; }
  #picnicgoat-game-screen.pg-playing.pg-topbar-open .topbar { display: flex; }
  /* NOTCH SWEEP (predicely_notch_safe_area): the topbar carried the inset; hiding it, we carry it — PADDING, never margin */
  #picnicgoat-game-screen.pg-playing:not(.pg-topbar-open) > .wrap { padding-top: env(safe-area-inset-top, 0px); }
  .pg-root { width: 100%; height: var(--pg-phone-h, 694px); padding: 10px; display: flex; flex-direction: column; gap: var(--pg-gap);
    --pg-metaFs: 10px; --pg-turnW: 36px; --pg-stH: 14px; --pg-avS: 18px; --pg-swS: 22px; --pg-legW: 42px; --pg-legGap: 3px; --pg-legOddsFs: 10px; --pg-sHdrH: 26px; --pg-sRowH: 14px; --pg-sAvgH: 14px; --pg-sLblFs: 10px;
    --pg-badgeFs: 10px; --pg-badgeH: 13px; --pg-bSand: 8px; --pg-dieS: 36px; --pg-faceW: 9px; --pg-faceH: 13px; --pg-faceFs: 8px; --pg-faceCols: 3;
    --pg-tpPad: 3px 4px 3px 5px; --pg-tpGap: 7px; --pg-tpDir: row; --pg-actW: 196px; --pg-actH: 34px; }
  .pg-pc-only { display: none !important; }
  .pg-ph-only { display: inline; }
  .pg-hban.pg-ph-only { display: flex; }
  .pg-side { display: contents; }
  .pg-hdr { height: 28px; }
  .pg-turn { font-size: 10px; padding: 0 8px; }
  .pg-hban { font-size: 10px; padding: 0 8px; }
  .pg-menu { display: flex; flex: none; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 8px; border: 1px solid var(--pg-line); background: var(--pg-panel); color: var(--pg-txt); font-size: 14px; cursor: pointer; }
  .pg-pls { flex: none; grid-template-columns: repeat(var(--pg-pn, 3), minmax(0, 1fr)); grid-auto-rows: 74px; }
  .pg-root[data-n="2"] .pg-pls { --pg-pn: 2; }
  .pg-root[data-n="3"] .pg-pls { --pg-pn: 3; }
  .pg-root[data-n="4"] .pg-pls { --pg-pn: 4; }
  .pg-pl { grid-template-columns: 20px minmax(0, 1fr); grid-template-rows: 20px minmax(0, 1fr) 16px; grid-template-areas: "av nm" "sw sc" "st st"; padding: 5px 6px; }
  .pg-root[data-n="2"] .pg-pl { grid-template-columns: 40px minmax(0, 1fr); }
  .pg-root[data-n="2"] .pg-sws { flex-direction: row; }
  .pg-pln { font-size: 11px; }
  .pg-sc b { font-size: 18px; }
  .pg-sc i { display: none; }
  .pg-stats { flex-direction: row; justify-content: flex-start; gap: 0 6px; font-size: 10px; }
  .pg-st { gap: 3px; }
  .pg-st b { font-size: 11px; }
  .pg-st .pg-sand { width: 10px; height: 10px; }
  .pg-mini { width: 12px; height: 8px; }
  .pg-mini-sq { width: 8px; height: 8px; }
  .pg-root[data-n="4"] .pg-st-sq { display: none; }            /* PG2-M2: in the score */
  .pg-tag { top: -7px; right: 4px; height: 14px; font-size: 9px; }
  .pg-lawnbox { flex: 1 1 0; }
  .pg-ctrl { flex: none; grid-template-areas: "steer" "turn" "feed"; grid-template-columns: minmax(0, 1fr); grid-template-rows: 108px 44px 40px; }
  .pg-feed { padding: 4px 10px; justify-content: center; }
  .pg-feedl { font-size: 11px; }
  .pg-legh { visibility: hidden; }
  .pg-fly { width: 16px; height: 16px; }
}
@media (max-width: 370px) {
  .pg-root { padding: 8px; --pg-gap: 6px; --pg-sHdrH: 22px; --pg-sRowH: 13px; --pg-sAvgH: 12px; --pg-dieS: 32px; --pg-tpGap: 5px; --pg-actW: 176px; --pg-actH: 30px; }
  .pg-hdr { height: 26px; }
  .pg-pls { grid-auto-rows: 66px; }
  .pg-pl { grid-template-rows: 18px minmax(0, 1fr) 15px; padding: 4px 5px; }
  .pg-sc b { font-size: 16px; }
  .pg-ctrl { grid-template-rows: 98px 40px 26px; }
  .pg-feed { padding: 3px 8px; }
}

/* ══ DESKTOP: ONE box, scaled by BoardFit ══ */
@media (min-width: 1000px) {
  #picnicgoat-game-screen .wrap { max-width: none; padding-left: 0; padding-right: 0; }
  .pg-root { width: 1280px; height: var(--pg-fit-h, 553px); padding: 12px; display: flex; flex-direction: row; gap: 8px; background-image: var(--pg-deck), var(--pg-bg);
    --pg-metaFs: 11px; --pg-turnW: 62px; --pg-stH: 15px; --pg-avS: 26px; --pg-swS: 44px; --pg-legW: 70px; --pg-legGap: 5px; --pg-legOddsFs: 10px; --pg-sHdrH: 44px; --pg-sRowH: 25px; --pg-sAvgH: 22px; --pg-sLblFs: 12px;
    --pg-badgeFs: 12px; --pg-badgeH: 20px; --pg-bSand: 10px; --pg-dieS: 48px; --pg-faceW: 17px; --pg-faceH: 19px; --pg-faceFs: 11px; --pg-faceCols: 6;
    --pg-tpPad: 8px 10px; --pg-tpGap: 12px; --pg-tpDir: column; --pg-actW: 210px; --pg-actH: 56px; }
  .pg-side { width: 280px; }
  .pg-hdr { height: 32px; font-size: 11px; }
  .pg-pls { grid-auto-rows: 112px; }
  .pg-pl { grid-template-columns: 48px minmax(0, 1fr) 66px; grid-template-rows: 28px minmax(0, 1fr); grid-template-areas: "av nm nm" "sw st sc"; padding: 6px 8px; }
  .pg-pln { font-size: 14px; padding-right: 96px; }
  .pg-stats { flex-direction: column; font-size: 11px; gap: 1px; }
  .pg-st b { font-size: 12px; }
  .pg-sc b { font-size: 26px; }
  .pg-tag { top: 6px; right: 8px; font-size: 10px; }
  .pg-lawnbox { flex: none; width: calc(var(--pg-fit-h, 553px) - 24px); height: 100%; }
  .pg-ctrl { flex: 1 1 0; grid-template-areas: "ban" "steer" "turn" "feed"; grid-template-columns: minmax(0, 1fr); grid-template-rows: 56px auto 92px minmax(0, 1fr); }
  .pg-feed { padding: 7px 10px; }
  .pg-feedl { font-size: 12px; }
}
