/* frontend/acorns.css — ACORNS board, both layouts.
 *
 * ⛔ ITS OWN FILE, NOT A BLOCK IN style.css — the Gulls / Swarm precedent.
 *
 * ── Colour is data ──────────────────────────────────────────────────────────
 * Every colour is a variable lifted from the mock (docs/design/batch7/Acorns.dc.html L16–25): CLASSIC by default
 * (the bark log), ARCADE when GameTheme puts `gm-arcade` on the screen — recolour only, driven by the equipped
 * Arcade palette's `--pgr-*` tokens (the existing scheme engine; the mock's Forest/Blue/Citrus/Cherry prop is NOT
 * forked). ⛔ THE SCREEN CARRIES THE PALETTE, NOT ONLY THE BOARD: the setup card sits outside `.ac-root`.
 * Sides are SHAPE + RIM + ROW first: you ● solid rim, the near row (PC) / left column (phone); HAZEL ◇ dashed rim,
 * the far row / right column. Go again ↻, grab ✦, landing ★ all carry a glyph. The owner is colourblind.
 *
 * ── Geometry is the mock's ──────────────────────────────────────────────────
 * Phone first (F1m 384 × 812, build() L459–637 with mob=true), the 360 floor (F8), then the desktop design box
 * at 1280 × 553 — the mock's 637 less its 84 px chat strip — and 593 when the chat bar is a pill (the log is the
 * row that grows, F2). ONE DOM, two grid-area maps (buildSlots L443–453: AC-M2, your column LEFT on the phone).
 *
 * ── ⭐ LOCKED LAYOUT ────────────────────────────────────────────────────────
 * Every row is a FIXED size except the LOG. Every text box is a fixed width or fills its slot with an ellipsis.
 * Feedback changes colour, glow or a 1 px transform — never size or spacing (house rule 2).
 */

#acorns-game-screen, #acorns-mp-game-screen, .ac-root {
  --ac-page: #0b0c09; --ac-ink: #edefe6; --ac-dim: #99a08e; --ac-dim2: #69705d;
  --ac-shell: linear-gradient(180deg, #15170f, #0d0e09); --ac-shell2: #0d0e09;
  --ac-panel: #181b12; --ac-panel2: #12140d; --ac-line: #2c3122; --ac-line2: #3f4630;
  --ac-log: linear-gradient(180deg, #3d2d1e, #2a1e13); --ac-logrim: #58412c;
  --ac-hole: #180f08;
  --ac-nut: #c98a45; --ac-nut2: #8f5c28; --ac-cap: #5d4023;
  --ac-you: #f2d9a0; --ac-bot: #6fb39a;
  --ac-accent: #e3a13f; --ac-again: #7ddba0; --ac-grab: #e3a13f; --ac-lock: #8b9280;
  --ac-onAgain: #0d1509;
  --ac-f: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ac-m: ui-monospace, SFMono-Regular, Menlo, monospace;
  --ac-r1: 6px; --ac-r2: 10px; --ac-r3: 16px;
  --ac-nutR: 44% 44% 52% 52% / 34% 34% 66% 66%; --ac-capR: 46% 46% 26% 26% / 74% 74% 34% 34%;
}
/* ARCADE — recolour only, from the equipped Arcade palette (GameTheme sets --pgr-* on the screen). The mock's vars()
   (L339–348): the log stays wood, the shell and rims take the palette. */
#acorns-game-screen.gm-arcade, #acorns-mp-game-screen.gm-arcade, .gm-arcade .ac-root {
  --ac-shell: var(--pgr-bg, radial-gradient(135% 120% at 50% -10%, #08361c 0%, #0b2a16 48%, #06170c 100%)); --ac-shell2: #10101c;
  --ac-panel: rgba(255, 255, 255, .07); --ac-panel2: rgba(0, 0, 0, .26);
  --ac-line: color-mix(in srgb, var(--pgr-sel, #4ade80) 34%, transparent); --ac-line2: color-mix(in srgb, var(--pgr-sel, #4ade80) 58%, transparent);
  --ac-log: linear-gradient(180deg, #5b3a1c, #38200e); --ac-logrim: var(--pgr-sel, #4ade80);
  --ac-hole: rgba(0, 0, 0, .55);
  --ac-nut: #e0a75d; --ac-nut2: #a9702f; --ac-cap: #6b4a26;
  --ac-you: #facc15; --ac-bot: #38bdf8;
  --ac-accent: var(--pgr-sel, #4ade80); --ac-again: #4ade80; --ac-grab: var(--pgr-gold, #facc15);
  --ac-ink: #ffffff; --ac-dim: rgba(255, 255, 255, .7); --ac-dim2: rgba(255, 255, 255, .48);
}

/* the mock's keyframes, L30–38. ⛔ ac-rise animates the `translate` PROPERTY only (AC-F1): the card is centred by its
   flex wrapper, so no keyframe can wipe the centring (predicely_scale_keyframe_trap). */
@keyframes ac-turn { 0%, 100% { box-shadow: 0 0 0 0 rgba(227, 161, 63, .40), 0 0 18px -8px rgba(227, 161, 63, .9) } 55% { box-shadow: 0 0 0 5px rgba(227, 161, 63, 0), 0 0 26px -4px rgba(227, 161, 63, 1) } }
@keyframes ac-sel { 0%, 100% { box-shadow: 0 0 0 0 rgba(125, 219, 160, .45), 0 0 16px -6px rgba(125, 219, 160, .8) } 55% { box-shadow: 0 0 0 6px rgba(125, 219, 160, 0), 0 0 26px -3px rgba(125, 219, 160, 1) } }
@keyframes ac-grabpulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(227, 161, 63, .5), 0 0 18px -8px rgba(227, 161, 63, .85) } 50% { box-shadow: 0 0 0 7px rgba(227, 161, 63, 0), 0 0 30px -2px rgba(227, 161, 63, 1) } }
@keyframes ac-rise { 0% { opacity: 0; translate: 0 12px } 100% { opacity: 1; translate: 0 0 } }
@keyframes ac-pulse { 0%, 100% { opacity: .45 } 50% { opacity: 1 } }
@keyframes ac-bounce { 0%, 100% { translate: 0 0 } 38% { translate: 0 -6px } 70% { translate: 0 1px } }
/* AC-F10 — a landing settles: the count chip ticks with a short drop (ac-drop, L34: from −26 px, overshoot +3 at 64%;
   scaled down for a chip that must not leave its slot), the pile acorn drops in. */
@keyframes ac-tick { 0% { translate: 0 -4px } 64% { translate: 0 1px } 100% { translate: 0 0 } }
@keyframes ac-drop { 0% { translate: 0 -26px; scale: .8; opacity: 0 } 64% { translate: 0 3px; scale: 1; opacity: 1 } 100% { translate: 0 0; opacity: 1 } }

/* ── setup card (on the screen's palette) ───────────────────────────────── */
#acorns-game-screen, #acorns-mp-game-screen { background: var(--ac-page); color: var(--ac-ink); }
.ac-setup-card { max-width: 560px; margin: 24px auto; padding: 26px 28px; display: flex; flex-direction: column; gap: 10px; font-family: var(--ac-f); background: var(--ac-panel); color: var(--ac-ink); border: 1px solid var(--ac-line2); border-radius: var(--ac-r3); }
.ac-setup-eyebrow { font: 700 11px/1.3 var(--ac-m); letter-spacing: .2em; text-transform: uppercase; color: var(--ac-accent); }
.ac-setup-title { margin: 0; font-size: 30px; }
.ac-setup-blurb, .ac-setup-hint { margin: 0; line-height: 1.55; font-size: 14px; }
.ac-setup-hint { color: var(--ac-dim); font-size: 12.5px; }
.ac-setup-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0; }
.ac-setup-lab { font: 700 11px var(--ac-m); letter-spacing: .14em; text-transform: uppercase; color: var(--ac-dim); min-width: 74px; }
.ac-opts { display: flex; gap: 6px; flex-wrap: wrap; }
.ac-opt { min-width: 76px; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--ac-line2); background: var(--ac-panel2); color: var(--ac-ink); font: 700 13px var(--ac-f); cursor: pointer; transition: background .12s, box-shadow .12s, transform .1s; }
.ac-opt[data-on="1"] { background: var(--ac-accent); color: var(--ac-onAgain); border-color: var(--ac-accent); }
.ac-opt:active { transform: translateY(1px); }
.ac-start { height: 48px; margin-top: 6px; border: 0; border-radius: 12px; background: var(--ac-again); color: var(--ac-onAgain); font: 800 16px var(--ac-f); letter-spacing: .04em; cursor: pointer; transition: filter .12s, transform .1s; }
.ac-start:active { transform: translateY(1px); filter: brightness(.92); }
@media (hover: hover) { .ac-start:hover { filter: brightness(1.08); } .ac-opt:hover { box-shadow: 0 0 0 2px var(--ac-accent); } }

/* ── the board root (phone first: F1m, 384 × 812) ─────────────────────── */
.ac-root {
  --ac-pad: 8px; --ac-gap: 6px; --ac-headH: 32px; --ac-railLH: 76px; --ac-railRH: 50px;
  --ac-turnH: 26px; --ac-outH: 44px; --ac-cgap: 6px; --ac-logPad: 8px; --ac-gcol: 6px;
  --ac-botStashH: 52px; --ac-youStashH: 58px;
  --ac-die: 22px; --ac-scoreW: 166px; --ac-numW: 38px;
  --ac-fsTiny: 7.5px; --ac-fsLbl: 7.5px; --ac-fsTurn: 9px; --ac-fsChip: 8px; --ac-fsCount: 15px; --ac-fsStash: 26px;
  --ac-chipW: 26px; --ac-chipH: 20px; --ac-nutS: 9px; --ac-scoopW: 116px; --ac-scoopH: 30px;
  --ac-fsOut: 11.5px; --ac-fsOutSub: 7.5px; --ac-oico: 24px; --ac-fsFeed: 9.5px; --ac-feedH: 14px;
  --ac-legW: 150px; --ac-modeW: 52px; --ac-onlogW: 84px; --ac-againW: 74px;
  position: relative; box-sizing: border-box; overflow: hidden;
  width: 100%; height: var(--ac-phone-h, 740px); padding: var(--ac-pad);
  display: flex; flex-direction: column; gap: var(--ac-gap);
  background: var(--ac-shell); color: var(--ac-ink); font-family: var(--ac-f);
  border: 1px solid var(--ac-line); border-radius: 22px;
  user-select: none; -webkit-user-select: none; -webkit-font-smoothing: antialiased;
}
.ac-root *, .ac-root *::before, .ac-root *::after { box-sizing: border-box; }
.ac-root button { font-family: inherit; -webkit-tap-highlight-color: transparent; margin: 0; }
.ac-root i, .ac-root em { font-style: normal; }

/* the acorn — the mock's pile piece (pile(), L361–371): a nut body + a darker cap */
.ac-nut { position: relative; flex: none; display: inline-block; width: var(--ac-nutS); height: calc(var(--ac-nutS) * 1.16); border-radius: var(--ac-nutR); background: linear-gradient(170deg, var(--ac-nut), var(--ac-nut2)); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .28); }
.ac-nut::before { content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: max(3px, calc(var(--ac-nutS) * .36)); border-radius: var(--ac-capR); background: var(--ac-cap); }
.ac-nut[data-new="1"] { animation: ac-drop .32s ease-out both; }

/* ── header ──────────────────────────────────────────────────────────────── */
.ac-head { flex: none; height: var(--ac-headH); display: flex; align-items: center; gap: 7px; padding: 0 4px; min-width: 0; white-space: nowrap; }
.ac-mark { --ac-nutS: 11px; }
.ac-brand { flex: none; font: 700 10px var(--ac-m); letter-spacing: .26em; color: var(--ac-ink); }
.ac-legchip { flex: none; width: var(--ac-legW); overflow: hidden; text-overflow: ellipsis; text-align: center; font: 400 var(--ac-fsChip) var(--ac-m); letter-spacing: .1em; padding: 3px 6px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--ac-accent) 46%, transparent); background: color-mix(in srgb, var(--ac-accent) 12%, transparent); color: var(--ac-accent); }
.ac-hsp { flex: 1 1 0; min-width: 0; }
.ac-mode { flex: none; width: var(--ac-modeW); overflow: hidden; text-overflow: ellipsis; text-align: right; font: 400 var(--ac-fsTiny) var(--ac-m); letter-spacing: .12em; color: var(--ac-dim2); }
.ac-menu { flex: none; width: 30px; height: 24px; border: 1px solid var(--ac-line2); border-radius: 999px; cursor: pointer; font-size: 13px; line-height: 1; background: var(--ac-panel); color: var(--ac-ink); transition: box-shadow .12s, transform .1s; }
.ac-menu:active { transform: translateY(1px); }
@media (hover: hover) { .ac-menu:hover { box-shadow: 0 0 0 2px var(--ac-accent); } }

/* ── body: left rail · centre · right rail ──────────────────────────────── */
.ac-body { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; gap: var(--ac-gap); }
.ac-railL { flex: none; height: var(--ac-railLH); display: flex; gap: 6px; min-width: 0; }
.ac-railR { flex: none; height: var(--ac-railRH); display: flex; gap: 6px; min-width: 0; }
.ac-center { flex: 1 1 0; min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: var(--ac-cgap); }
.ac-panel { background: var(--ac-panel); border: 1px solid var(--ac-line); border-radius: var(--ac-r2); padding: 6px 8px; display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.ac-lbl { flex: none; font: 400 var(--ac-fsLbl) var(--ac-m); letter-spacing: .18em; color: var(--ac-dim2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-dicep { flex: 1 1 0; gap: 4px; }
.ac-score { flex: none; width: var(--ac-scoreW); gap: 3px; }
.ac-score .ac-lbl { display: none; }
.ac-feedp { flex: 1 1 0; gap: 2px; justify-content: center; padding-top: 4px; padding-bottom: 4px; }
#ac-f-2 { display: none; }   /* the phone shows two feed rows (the mock's fmax), the PC three */
.ac-keyp { display: none; }

/* setup dice — DieRenderer slots in the player's skin; the meaning (a lit rim, H1–H6) sits AROUND the die. AC-F9: they
   are display-only, so no hover, no press, no pointer. */
.ac-dice { flex: none; display: flex; gap: 4px; align-items: flex-start; }
.ac-dw { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.ac-die { position: relative; flex: none; width: var(--ac-die); height: var(--ac-die); border-radius: 6px; cursor: default; pointer-events: none; transition: box-shadow .12s; }
.ac-die > .ac-dinner { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.ac-die[data-hot="1"] { box-shadow: 0 0 0 2px var(--ac-accent), 0 0 16px -4px var(--ac-accent); animation: ac-bounce 1.1s ease-in-out infinite; }
.ac-dfoot { flex: none; font: 400 7px var(--ac-m); letter-spacing: .06em; color: var(--ac-dim2); }
.ac-dw[data-hot="1"] .ac-dfoot { color: var(--ac-accent); }
.ac-dnote { display: none; font: 400 10.5px/1.35 var(--ac-f); color: var(--ac-dim); }

/* the match table */
.ac-srow { flex: none; display: flex; align-items: center; gap: 6px; }
.ac-srow[data-head="1"] { padding-bottom: 1px; border-bottom: 1px solid var(--ac-line); }
.ac-srow[data-strong="1"] { padding-top: 2px; border-top: 1px solid var(--ac-line); }
.ac-sk { flex: 1 1 0; min-width: 0; font: 400 var(--ac-fsTiny) var(--ac-m); letter-spacing: .1em; color: var(--ac-dim2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-srow[data-strong="1"] .ac-sk { color: var(--ac-ink); }
.ac-sv { flex: none; width: var(--ac-numW); text-align: right; white-space: nowrap; overflow: hidden; font: 800 11.5px/12px var(--ac-f); font-variant-numeric: tabular-nums; color: var(--ac-ink); }
.ac-srow[data-head="1"] .ac-sv { font: 400 8px var(--ac-m); letter-spacing: .06em; }
.ac-sv[data-s="0"] { color: var(--ac-ink); }
.ac-srow[data-head="1"] .ac-sv[data-s="0"], .ac-srow[data-strong="1"] .ac-sv[data-s="0"] { color: var(--ac-you); }
.ac-srow[data-head="1"] .ac-sv[data-s="1"], .ac-srow[data-strong="1"] .ac-sv[data-s="1"] { color: var(--ac-bot); }
.ac-srow[data-dim="1"] .ac-sv { opacity: .42; }

/* ── the turn strip ──────────────────────────────────────────────────────── */
.ac-turn { flex: none; height: var(--ac-turnH); display: flex; align-items: center; gap: 6px; padding: 0 8px; border-radius: var(--ac-r2); background: var(--ac-panel2); border: 1px solid var(--ac-line); min-width: 0; }
.ac-root[data-lock="0"] .ac-turn { border-color: color-mix(in srgb, var(--ac-you) 50%, transparent); animation: ac-turn 1.9s ease-in-out infinite; }
.ac-tglyph { flex: none; width: 12px; text-align: center; font-size: 11px; line-height: 1; }
.ac-tglyph[data-s="0"] { color: var(--ac-you); }
.ac-tglyph[data-s="1"] { color: var(--ac-bot); }
/* AC-F2 — the label never wraps: it shares a fixed strip with the go-again chip and the log count */
.ac-ttxt { flex: 1 1 0; min-width: 0;   /* FILLS the strip: an auto-width label would move the chip beside it (locked layout) */
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font: 700 var(--ac-fsTurn) var(--ac-m); letter-spacing: .14em; color: var(--ac-ink); }
.ac-root[data-lock="1"] .ac-ttxt { color: var(--ac-lock); }
.ac-again { flex: none; width: var(--ac-againW); text-align: center; overflow: hidden; white-space: nowrap; font: 700 var(--ac-fsTiny) var(--ac-m); letter-spacing: .12em; padding: 2px 0; border-radius: 999px; background: var(--ac-again); color: var(--ac-onAgain); visibility: hidden; }
.ac-again[data-on="1"] { visibility: visible; animation: ac-pulse 1.2s ease-in-out infinite; }
.ac-tsp { display: none; }
.ac-onlog { flex: none; width: var(--ac-onlogW); text-align: right; overflow: hidden; white-space: nowrap; font: 400 var(--ac-fsTiny) var(--ac-m); letter-spacing: .1em; color: var(--ac-dim2); }

/* ── the log ─────────────────────────────────────────────────────────────── */
.ac-log { flex: 1 1 0; min-height: 0; padding: var(--ac-logPad); border-radius: 20px; background: var(--ac-log); border: 2px solid var(--ac-logrim); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .07), inset 0 -8px 22px rgba(0, 0, 0, .45); }
.ac-grid { display: grid; height: 100%; gap: var(--ac-gcol); grid-template-columns: 1fr 1fr; grid-template-rows: var(--ac-botStashH) repeat(6, minmax(0, 1fr)) var(--ac-youStashH); }
.ac-slot {
  position: relative; grid-area: var(--ac-ph); min-width: 0; min-height: 0;
  display: flex; flex-direction: row; align-items: center; gap: 6px; padding: 4px 7px;
  background: radial-gradient(120% 120% at 50% 22%, color-mix(in srgb, var(--ac-hole) 78%, #000) 0%, var(--ac-hole) 68%);
  border: 1.5px solid color-mix(in srgb, var(--ac-you) 38%, transparent); border-radius: var(--ac-r2);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, .6);
  transition: background .12s, box-shadow .12s, transform .1s, border-color .12s, opacity .12s;
  cursor: not-allowed; -webkit-tap-highlight-color: transparent;
}
.ac-slot[data-s="1"] { border-style: dashed; border-color: color-mix(in srgb, var(--ac-bot) 26%, transparent); opacity: .82; }
.ac-slot[data-stash="1"] { background: linear-gradient(180deg, rgba(0, 0, 0, .34), rgba(0, 0, 0, .52)); border-radius: var(--ac-r3); cursor: default; opacity: 1; padding: 6px 10px; gap: 8px; }
/* playable: one of your non-empty holes on your move */
.ac-slot[data-play="1"] { cursor: pointer; }
/* locked: your holes drop to 50% while input is locked (F6, L406) — still solid-rimmed, so it reads in greyscale */
.ac-root[data-lock="1"] .ac-slot[data-s="0"][data-stash="0"] { opacity: .5; }
@media (hover: hover) {
  .ac-slot[data-play="1"]:hover { background: radial-gradient(120% 120% at 50% 22%, color-mix(in srgb, var(--ac-you) 18%, var(--ac-hole)) 0%, var(--ac-hole) 72%); border-color: color-mix(in srgb, var(--ac-you) 78%, transparent); box-shadow: inset 0 2px 8px rgba(0, 0, 0, .6), 0 0 16px -6px var(--ac-you); transform: translateY(-1px); }
}
.ac-slot[data-play="1"]:active { background: radial-gradient(120% 120% at 50% 22%, color-mix(in srgb, var(--ac-you) 30%, var(--ac-hole)) 0%, var(--ac-hole) 66%); border-color: var(--ac-you); box-shadow: inset 0 4px 12px rgba(0, 0, 0, .75), 0 0 10px -4px var(--ac-you); transform: translateY(1px); }
/* on the path of the previewed scoop */
.ac-slot[data-path="1"] { background: radial-gradient(120% 120% at 50% 22%, color-mix(in srgb, var(--ac-accent) 16%, var(--ac-hole)) 0%, var(--ac-hole) 74%); border-color: color-mix(in srgb, var(--ac-accent) 55%, transparent); }
/* the scooped hole (selected) */
.ac-slot[data-sel="1"] { box-shadow: inset 0 2px 8px rgba(0, 0, 0, .6), 0 0 0 2px var(--ac-again); animation: ac-sel 1.5s ease-in-out infinite; opacity: 1; }
/* where the last acorn lands */
.ac-slot[data-last="1"] { border-color: var(--ac-again); box-shadow: inset 0 2px 8px rgba(0, 0, 0, .6), 0 0 0 2px color-mix(in srgb, var(--ac-again) 70%, transparent); }
.ac-slot[data-last="1"] > .ac-ring { display: block; }
/* the hole a grab empties (opposite the landing hole) */
.ac-slot[data-opp="1"] { border-color: var(--ac-grab); animation: ac-grabpulse 1.4s ease-in-out infinite; }
.ac-ring { display: none; position: absolute; inset: -3px; border-radius: inherit; pointer-events: none; animation: ac-turn 1.6s ease-in-out infinite; }

.ac-shead { flex: none; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-width: 0; }
.ac-slbl { font: 400 var(--ac-fsLbl) var(--ac-m); letter-spacing: .12em; color: var(--ac-dim2); white-space: nowrap; }
.ac-sglyph { font-size: 8px; line-height: 1; }
.ac-slot[data-s="0"] .ac-sglyph { color: var(--ac-you); opacity: .85; }
.ac-slot[data-s="1"] .ac-sglyph { color: var(--ac-bot); opacity: .85; }
.ac-pile { flex: 1 1 0; min-width: 0; min-height: 0; align-self: stretch; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 2px; padding: 0 2px; overflow: hidden; }
.ac-num { flex: none; display: flex; align-items: center; justify-content: center; width: var(--ac-chipW); height: var(--ac-chipH); border-radius: var(--ac-r1); background: rgba(0, 0, 0, .42); border: 1px solid color-mix(in srgb, var(--ac-you) 22%, transparent); font: 800 var(--ac-fsCount) var(--ac-f); font-variant-numeric: tabular-nums; color: var(--ac-ink); }
.ac-slot[data-s="1"] .ac-num { border-color: color-mix(in srgb, var(--ac-bot) 22%, transparent); }
.ac-num[data-zero="1"] { color: var(--ac-dim2); }
.ac-num[data-tick="1"] { animation: ac-tick .2s ease-out; }
.ac-slot[data-stash="1"] .ac-num { width: 46px; height: auto; background: none; border: 0; font-size: var(--ac-fsStash); line-height: 1; letter-spacing: -.02em; text-shadow: 0 2px 0 rgba(0, 0, 0, .5); }
.ac-slot[data-stash="1"][data-s="0"] .ac-num { color: var(--ac-you); }
.ac-slot[data-stash="1"][data-s="1"] .ac-num { color: var(--ac-bot); }
.ac-badge { display: none; position: absolute; z-index: 3; top: 50%; left: 50%; translate: -50% -50%; font: 700 8px var(--ac-m); letter-spacing: .1em; white-space: nowrap; padding: 1px 5px; border-radius: 999px; background: var(--ac-accent); color: var(--ac-onAgain); pointer-events: none; }
.ac-badge[data-on="1"] { display: block; }
.ac-badge[data-strong="1"] { background: var(--ac-again); box-shadow: 0 0 14px -4px var(--ac-again); }
.ac-badge[data-kind="grab"] { background: var(--ac-grab); box-shadow: 0 0 14px -4px var(--ac-grab); }
.ac-slot[data-stash="1"] .ac-badge { top: 5px; left: auto; right: 58px; translate: 0 0; }

/* ── the outcome strip ───────────────────────────────────────────────────── */
.ac-out { --ac-tone: var(--ac-dim2); flex: none; height: var(--ac-outH); display: flex; align-items: center; gap: 8px; padding: 0 8px; border-radius: var(--ac-r2); background: var(--ac-panel2); border: 1px dashed color-mix(in srgb, var(--ac-tone) 55%, transparent); min-width: 0; }
.ac-out[data-kind="again"] { --ac-tone: var(--ac-again); border-style: solid; }
.ac-out[data-kind="grab"] { --ac-tone: var(--ac-grab); border-style: solid; }
.ac-out[data-kind="plain"] { --ac-tone: var(--ac-accent); border-style: solid; }
.ac-out[data-kind="lock"] { --ac-tone: var(--ac-lock); border-style: solid; }
.ac-oico { flex: none; width: var(--ac-oico); height: var(--ac-oico); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; line-height: 1; background: color-mix(in srgb, var(--ac-tone) 20%, transparent); border: 1px solid color-mix(in srgb, var(--ac-tone) 60%, transparent); color: var(--ac-tone); }
.ac-otxt { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ac-ot { font: 700 var(--ac-fsOut) var(--ac-f); letter-spacing: -.01em; color: var(--ac-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-out[data-kind="idle"] .ac-ot { color: var(--ac-dim); }
.ac-os { font: 400 var(--ac-fsOutSub) var(--ac-m); letter-spacing: .1em; color: var(--ac-dim2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-scoop { flex: none; width: var(--ac-scoopW); height: var(--ac-scoopH); padding: 0 6px; white-space: nowrap; overflow: hidden; border-radius: var(--ac-r1); font: 700 9px var(--ac-m); letter-spacing: .1em; background: transparent; color: var(--ac-lock); border: 1px dashed var(--ac-line2); cursor: not-allowed; transition: box-shadow .12s, background .12s, transform .1s; }
.ac-scoop[data-live="1"] { background: var(--ac-again); color: var(--ac-onAgain); border: 1px solid var(--ac-again); cursor: pointer; box-shadow: 0 0 18px -8px var(--ac-again); }
@media (hover: hover) { .ac-scoop[data-live="1"]:hover { box-shadow: 0 0 22px -4px var(--ac-again); background: color-mix(in srgb, var(--ac-again) 86%, #fff); } }
.ac-scoop[data-live="1"]:active { transform: translateY(1px); box-shadow: 0 0 8px -4px var(--ac-again); }

/* ── feed + key ──────────────────────────────────────────────────────────── */
.ac-fl { flex: none; height: var(--ac-feedH); display: flex; align-items: center; gap: 6px; min-width: 0; opacity: .22; }
.ac-fl[data-age="0"] { opacity: 1; }
.ac-fl[data-age="1"] { opacity: .66; }
.ac-fl[data-age="2"] { opacity: .42; }
.ac-fl[data-age="3"] { opacity: .22; }   /* an empty row is still drawn (locked layout) */
.ac-fg { flex: none; width: 10px; text-align: center; font-size: 8px; line-height: 1; color: var(--ac-dim2); }
.ac-fg[data-s="0"] { color: var(--ac-you); }
.ac-fg[data-s="1"] { color: var(--ac-bot); }
.ac-ft { flex: 1 1 0; min-width: 0; font: 400 var(--ac-fsFeed)/1.2 var(--ac-f); color: var(--ac-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-kr { flex: none; display: flex; align-items: center; gap: 7px; height: 16px; min-width: 0; }
.ac-kg { flex: none; width: 12px; text-align: center; font-size: 10px; line-height: 1; color: var(--ac-accent); }
.ac-kg[data-s="0"] { color: var(--ac-you); }
.ac-kg[data-s="1"] { color: var(--ac-bot); }
.ac-kt { min-width: 0; font: 400 10.5px var(--ac-f); color: var(--ac-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── absolute layers inside the root (the house shape: never fixed) ─────── */
.ac-fx { position: absolute; inset: 0; pointer-events: none; z-index: 20; overflow: hidden; }
.ac-fly { position: absolute; left: 0; top: 0; --ac-nutS: 13px; z-index: 21; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .55)); }
.ac-fly > .ac-nut { box-shadow: 0 0 14px -4px var(--ac-accent); }
.ac-hand { position: absolute; z-index: 22; left: 50%; top: -3px; translate: -50% -100%; font: 800 9px var(--ac-m); letter-spacing: .06em; padding: 1px 5px; border-radius: 999px; background: var(--ac-accent); color: var(--ac-onAgain); white-space: nowrap; }
.ac-scrim { position: absolute; inset: 0; z-index: 30; background: rgba(6, 8, 4, .66); opacity: 0; pointer-events: none; transition: opacity .25s; }
.ac-scrim[data-on="1"] { opacity: 1; pointer-events: auto; }
/* AC-F1 — the leg card is CENTRED BY ITS WRAPPER (flex), and ac-rise moves only `translate` + opacity. */
.ac-cardwrap { position: absolute; inset: 0; z-index: 31; display: none; align-items: center; justify-content: center; padding: 12px; }
.ac-cardwrap[data-on="1"] { display: flex; }
.ac-card { width: min(280px, 100%); display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px; border-radius: var(--ac-r3); background: var(--ac-shell2); border: 2px solid var(--ac-accent); box-shadow: 0 30px 70px -30px #000, 0 0 40px -18px var(--ac-accent); cursor: pointer; animation: ac-rise .5s ease-out both; }
.ac-cico { font-size: 20px; line-height: 1; color: var(--ac-accent); }
.ac-cttl { font: 800 18px var(--ac-f); letter-spacing: -.02em; color: var(--ac-ink); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ac-csub { font: 400 9px/1.6 var(--ac-m); letter-spacing: .06em; color: var(--ac-dim); text-align: center; white-space: pre-line; }

/* the end-screen rows — ⛔ the end screen is appended to <body>, so NO --ac-* token reaches it
   (predicely_solo_replay_bests): these use literal values or the --pgr-* set the overlay carries. */
.ac-endrows { display: flex; flex-direction: column; gap: 4px; }
.ac-endrow { display: grid; grid-template-columns: 1fr 52px 52px 60px; gap: 8px; align-items: center; font-size: 13px; padding: 4px 2px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.ac-endrow[data-head="1"] { font-size: 11px; letter-spacing: .1em; opacity: .7; }
.ac-endrow[data-strong="1"] { font-weight: 800; font-size: 15px; border-bottom: 0; }
.ac-endrow > :not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.ac-endnote { margin-top: 8px; font-size: 12px; opacity: .75; }

@media (prefers-reduced-motion: reduce) {
  .ac-root *, .ac-root *::before, .ac-root *::after { animation: none !important; transition: none !important; }
}

/* ── PHONE ───────────────────────────────────────────────────────────────── */
@media (max-width: 999px) {
  #acorns-game-screen.ac-playing .wrap { padding: 0 2px; max-width: none; }
  #acorns-game-screen.ac-playing .topbar { display: none; }
  #acorns-game-screen.ac-playing.ac-topbar-open .topbar { display: flex; }
  /* the notch: the hidden .topbar carried the safe-area inset (predicely_notch_safe_area; test/_safe_area_top.test.js).
     PADDING, never margin — a top margin collapses through the screen div. */
  #acorns-game-screen.ac-playing:not(.ac-topbar-open) > .wrap { padding-top: env(safe-area-inset-top, 0px); }
  /* ONLINE (MP slice B): the same phone shell — ⛔ but NEVER the wrap's BOTTOM padding: the chat bar mounts on this
     screen and reserves its 84 px on `.has-chatbar .wrap` (chat.css), which a `padding: 0 2px` here would wipe and put
     the board under the bar (B6; Senet .581). acorns.js acFitPhone sums that reservation. */
  #acorns-mp-game-screen.ac-playing .wrap { padding-top: 0; padding-left: 2px; padding-right: 2px; max-width: none; }
  #acorns-mp-game-screen.ac-playing .topbar { display: none; }
  #acorns-mp-game-screen.ac-playing.ac-topbar-open .topbar { display: flex; }
  #acorns-mp-game-screen.ac-playing:not(.ac-topbar-open) > .wrap { padding-top: env(safe-area-inset-top, 0px); }
}
/* the 360 × 740 floor (F8) — same slots, same arrangement, a notch smaller */
@media (max-width: 370px) {
  .ac-root {
    --ac-pad: 7px; --ac-gap: 5px; --ac-railLH: 72px; --ac-botStashH: 46px; --ac-youStashH: 52px;
    --ac-die: 20px; --ac-scoreW: 158px; --ac-numW: 36px; --ac-legW: 140px; --ac-modeW: 44px; --ac-onlogW: 78px;
    --ac-scoopW: 108px; --ac-fsOut: 11px;
  }
}

/* ── DESKTOP — ONE design box, scaled as a unit by BoardFit (the mock's 1280 × 637 less the 84 px chat strip;
   593 with the chat bar collapsed to its pill — the log is the row that grows) ── */
@media (min-width: 1000px) {
  #acorns-game-screen .wrap, #acorns-mp-game-screen .wrap { max-width: none; padding-left: 0; padding-right: 0; }
  .ac-root {
    --ac-pad: 12px; --ac-gap: 10px; --ac-headH: 42px; --ac-railW: 228px;
    --ac-turnH: 38px; --ac-outH: 62px; --ac-cgap: 8px; --ac-logPad: 14px; --ac-gcol: 8px;
    --ac-die: 29px; --ac-numW: 50px;
    --ac-fsTiny: 9px; --ac-fsLbl: 8.5px; --ac-fsTurn: 11px; --ac-fsChip: 9.5px; --ac-fsCount: 17px; --ac-fsStash: 34px;
    --ac-chipW: 34px; --ac-chipH: 24px; --ac-nutS: 12px; --ac-scoopW: 150px; --ac-scoopH: 38px;
    --ac-fsOut: 14px; --ac-fsOutSub: 9.5px; --ac-oico: 32px; --ac-fsFeed: 11px; --ac-feedH: 22px;
    --ac-legW: 230px; --ac-modeW: 260px; --ac-onlogW: 220px; --ac-againW: 94px;
    width: 1280px; height: var(--ac-fit-h, 553px); padding: var(--ac-pad);
    border-radius: var(--ac-r3);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .1), 0 26px 60px -30px #000;
  }
  .ac-head { gap: 10px; padding: 0 6px; }
  .ac-mark { --ac-nutS: 14px; }
  .ac-brand { font-size: 12px; }
  .ac-legchip { padding: 4px 9px; }
  .ac-menu { display: none; }
  .ac-body { flex-direction: row; gap: 10px; }
  .ac-railL, .ac-railR { width: var(--ac-railW); height: auto; flex-direction: column; gap: 10px; }
  .ac-panel { padding: 10px 12px; }
  .ac-dicep { flex: none; gap: 8px; }
  .ac-dice { gap: 5px; }
  .ac-dw { gap: 3px; }
  .ac-die { border-radius: 7px; }
  .ac-dfoot { font-size: 8px; }
  .ac-dnote { display: block; }
  .ac-score { width: auto; gap: 4px; }
  .ac-score .ac-lbl { display: block; margin-bottom: 3px; }
  .ac-srow[data-head="1"] { padding-bottom: 3px; }
  .ac-srow[data-strong="1"] { padding-top: 4px; }
  .ac-sv { font-size: 15px; line-height: inherit; }
  .ac-srow[data-head="1"] .ac-sv { font-size: 9.5px; }
  .ac-feedp { flex: none; gap: 6px; justify-content: flex-start; padding-top: 10px; padding-bottom: 10px; }
  #ac-f-2 { display: flex; }
  .ac-keyp { display: flex; flex: none; gap: 6px; margin-top: auto; }
  .ac-turn { gap: 9px; padding: 0 12px; }
  .ac-tglyph { font-size: 13px; }
  .ac-grid { grid-template-columns: 104px repeat(6, minmax(0, 1fr)) 104px; grid-template-rows: 1fr 1fr; }
  .ac-slot { grid-area: var(--ac-pc); flex-direction: column; align-items: center; justify-content: space-between; gap: 4px; padding: 8px 6px; }
  .ac-slot[data-stash="1"] { padding: 10px 8px; gap: 4px; }
  .ac-shead { width: 100%; flex-direction: row; align-items: center; justify-content: space-between; gap: 4px; }
  .ac-sglyph { font-size: 9px; }
  .ac-pile { align-self: auto; width: 100%; gap: 3px; padding: 2px 0; }
  .ac-slot[data-stash="1"] { --ac-nutS: 11px; }
  .ac-slot[data-stash="1"] .ac-num { width: 58px; }
  .ac-badge { top: -9px; left: 50%; translate: -50% 0; font-size: 9px; padding: 2px 7px; }
  .ac-slot[data-stash="1"] .ac-badge { top: -9px; left: 50%; right: auto; translate: -50% 0; }
  .ac-out { gap: 12px; padding: 0 14px; }
  .ac-oico { font-size: 15px; }
  .ac-otxt { gap: 3px; }
  .ac-scoop { font-size: 10.5px; letter-spacing: .12em; padding: 0 12px; }
  .ac-card { width: 420px; gap: 12px; padding: 26px; }
  .ac-cico { font-size: 26px; }
  .ac-cttl { font-size: 24px; }
  .ac-csub { font-size: 11px; }
  .ac-hand { font-size: 10px; }
  .ac-fly { --ac-nutS: 14px; }
}
