@font-face { font-family: "Comic Neue"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("../fonts/comic-neue-400.woff2") format("woff2"); }
@font-face { font-family: "Comic Neue"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("../fonts/comic-neue-700.woff2") format("woff2"); }
@font-face { font-family: "Fira Mono"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("fonts/FiraMono-Bold.ttf") format("truetype"); }

/* feel.css — the feel lab on the ritual board.
 * The geometry is ported from ritual.css / ritual.js layout(): your card bottom-left and large, theirs
 * top-right and smaller, an oval table lying on the diagonal between them (YOUR slot lower-left, THEIR
 * slot upper-right), seat plates under card+bench, commit cluster bottom-right on your side.
 * Positions come from layout() in feel.js as inline styles + CSS variables. */
:root {
  --ink: #f2ede4;
  --dim: #a9a197;
  --bg: #14120f;
  --bg2: #1d1a16;
  --line: #3a332b;
  --hot: #f7931a;
  --my: #2fb3a5;
  --my-d: #1f7a70;
  --foe: #d9503a;
  --danger: #ff6a55;
  --ease: cubic-bezier(.22,.61,.36,1);
  --mono: "Fira Mono", ui-monospace, monospace;
  --ang: -29deg;
  --tk: 36px;
  --seat: 48px;
  --seat-d: 38px;
  --ck: 80px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 400 14px/1.4 "Comic Neue", system-ui, sans-serif; overflow: hidden; }
button { font-family: inherit; }

.lab {
  position: fixed; inset: 0; z-index: 0; overflow: clip;   /* clip, not hidden: a focus or a scripted click must never scroll the table */   /* z-index 0 = one stacking context, so the start screen (.pk, 50) always sits above the whole table */
  background:
    radial-gradient(1500px 950px at 55% 48%, #332b22 0%, transparent 72%),
    repeating-linear-gradient(135deg, rgba(255,255,255,.012) 0 2px, transparent 2px 6px),
    var(--bg);
}

/* ---------- top bar ---------- */
.top { position: absolute; left: 0; right: auto; width: 60%; top: 0; height: 34px; z-index: 30; display: flex; align-items: center;
  gap: 12px; padding: 0 12px; font: 700 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.top .phase { color: var(--hot); }
/* item 9: the phase echo speaks the actor colours for you/they segments */
.top .phase b.ph-you { color: var(--my); font: inherit; }
.top .phase b.ph-them { color: var(--foe); font: inherit; }

/* ---------- element matchup: the signal lives on the table (owner rulings 2026-10-25) ----------
 * Ink/value steps, hard edges, nothing floaty. Glyph + colour carry the read where no label
 * shows; where a label shows, the owner's words: ADVANTAGED / DISADVANTAGED / EVEN. */

/* (1) the active-vs-active badge: a tab pinned to MY active card's TOP-LEFT corner, riding the
 * edge — never inside the card, nothing covered. Position solved in feel.js from the live
 * card rect against every other cluster. */
.mu-tab { position: absolute; z-index: 8; display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 9px; border: 0; border-radius: 0; background: #9d9382; color: #14110D;
  pointer-events: auto; cursor: help; white-space: nowrap; }
.mu-tab .mu-g { flex: none; font: 700 11px/1 var(--mono); }
.mu-tab .mu-w { font: 700 11px/1 var(--mono); letter-spacing: .14em; }
.mu-tab.is-adv { background: var(--my); color: #0b211e; }
.mu-tab.is-dis { background: var(--foe); color: #fff; }
.mu-tab.is-even { background: #9d9382; color: #14110D; }
.mu-tab[hidden] { display: none; }

/* (1b) the felt carries the matchup: my (left) half of the table tints slightly greener when
 * the edge is mine, slightly redder when it is theirs; their half symmetrically. A value step
 * riding the existing felt gradients (never a paint job); hidden when the matchup is moot. */
.mu-felt { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; clip-path: ellipse(50% 50% at 50% 50%); pointer-events: none; opacity: 0;
  transition: opacity calc(.4s * var(--mot, 1)) var(--ease); }
.mu-felt.is-adv, .mu-felt.is-dis { opacity: 1; }
.mu-felt::before, .mu-felt::after { content: ""; position: absolute; top: 0; bottom: 0; width: 50%; }
.mu-felt::before { left: 0; } .mu-felt::after { right: 0; }
.mu-felt.is-adv::before { background: rgba(47,179,165,.30); }
.mu-felt.is-adv::after { background: rgba(217,80,58,.24); }
.mu-felt.is-dis::before { background: rgba(217,80,58,.30); }
.mu-felt.is-dis::after { background: rgba(47,179,165,.24); }
.mu-felt.is-even::before, .mu-felt.is-even::after { background: none; }

/* (2) bench pips: a corner tag on each of my tiles = that pup vs THEIR current active.
 * Bottom-left corner: the top corners carry the number/name/diamond, the bottom-left is the
 * art's quietest edge. Small, absolute, no layout impact — the tile geometry is untouched. */
.mu-pip { position: absolute; left: 0; bottom: calc(100% + 3px); z-index: 6; width: 18px; height: 14px;
  display: grid; place-items: center; font: 700 9px/1 var(--mono); color: #14110D;
  background: #f1eadf; pointer-events: none; }
.mu-pip.is-adv { background: var(--my); color: #0b211e; }
.mu-pip.is-dis { background: var(--foe); color: #fff; }
.mu-pip.is-even { background: #9d9382; color: #14110D; }
.mu-pip[hidden] { display: none; }
.lab.portrait .mu-pip { width: 15px; height: 12px; font-size: 8px; }

/* (3) projection: a SWAP control under the pointer stamps the badge on every card THEY have out */
.mu-proj { position: absolute; left: 4%; bottom: 4%; z-index: 8; width: 16px; height: 16px;
  display: grid; place-items: center; font: 700 9px/1 var(--mono); pointer-events: none;
  background: #f1eadf; box-shadow: 0 2px 5px rgba(0,0,0,.5); }
.mu-proj.is-adv { background: var(--my); color: #0b211e; }
.mu-proj.is-dis { background: var(--foe); color: #fff; }
.mu-proj.is-even { background: #9d9382; color: #14110D; }
/* on the foe T1 card the badge scales with the card (a container); on the small bench tiles the
   fixed 16px reads better than a cqw size that would vanish */
#foeCard .mu-proj { width: 5.2cqw; height: 5.2cqw; font-size: 3cqw; min-width: 12px; min-height: 12px; }
.top .vs b { color: var(--ink); }
.top .sp { display: none; }
.top .instr { position: static; flex: 1 1 0; min-width: 0; margin: 0 0 0 8px; padding-left: 14px; font-size: 12px; letter-spacing: .05em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .phase, .top .vs { flex: none; white-space: nowrap; }
.tools { position: absolute; z-index: 62; right: 12px; top: 3px; display: flex; gap: 8px; }   /* above the scrim (59) so log toggles shut */
.tiny { font: 700 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink);
  background: rgba(36,31,26,.92); border: 2px solid #5a4d3d; border-radius: 0; padding: 7px 10px; min-height: 28px; cursor: pointer; }
.tiny:hover { border-color: var(--hot); }
/* music volume: the tools row's only slider — same skin as .tiny, compact */
.tools .vol { width: 92px; height: 28px; margin: 0; padding: 0 8px; accent-color: var(--hot); cursor: pointer;
  background: rgba(36,31,26,.92); border: 2px solid #5a4d3d; border-radius: 0; }
.tools .vol:hover { border-color: var(--hot); }
/* audio hint: a dismissible invitation to turn music/sfx on (owner ask). Quiet, not a modal. */
.audiohint { position: absolute; z-index: 62; right: 12px; top: 40px; max-width: 320px; display: flex; align-items: center; gap: 8px;
  padding: 7px 8px 7px 10px; background: rgba(36,31,26,.96); border: 2px solid #5a4d3d;
  font: 700 11px/1.35 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink);
  opacity: 0; transition: opacity .2s linear; }
.audiohint.on { opacity: 1; }
.audiohint[hidden] { display: none; }
.audiohint button { flex: none; width: 24px; height: 24px; padding: 0; background: none; border: 1px solid #5a4d3d; color: var(--ink);
  font: 700 14px/1 var(--mono); cursor: pointer; }
.audiohint button:hover { border-color: var(--hot); }
@media (max-width: 620px), (orientation: portrait) { .audiohint { top: 50px; left: 6px; right: 6px; max-width: none; } }
@media (prefers-reduced-motion: reduce) { .audiohint { transition: none; } }

/* ---------- seat plates ---------- */
.seat { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.seat i { position: absolute; display: block; border-radius: 22px; }  /* seat furniture, not a card or control: rounded like ritual */
.seat.me i { background: linear-gradient(155deg, #2c4640 0%, #1d302b 55%, #172622 100%); }
.seat.foe i { background: linear-gradient(205deg, #4a2b24 0%, #34201b 55%, #261813 100%); }
.seat.me { filter: drop-shadow(0 -2px 0 rgba(47,179,165,.45)) drop-shadow(2px 0 0 rgba(47,179,165,.25)) drop-shadow(0 14px 26px rgba(0,0,0,.55)); }
.seat.foe { filter: drop-shadow(0 2px 0 rgba(217,80,58,.5)) drop-shadow(-2px 0 0 rgba(217,80,58,.3)) drop-shadow(0 14px 26px rgba(0,0,0,.55)); }

/* ---------- zones & cards ---------- */
.zone { position: absolute; inset: 0; pointer-events: none; }
.zone > * { pointer-events: auto; }
.cardhost { position: absolute; z-index: 5; }
.cardhost .pc-card { width: 100%; box-shadow: 0 18px 44px rgba(0,0,0,.55); }
.pc-card.mine-face { box-shadow: 0 22px 54px rgba(0,0,0,.6), 0 0 0 1px rgba(47,179,165,.25); }

.instr { position: absolute; z-index: 6; margin: 0; font: 700 13px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase;
  color: var(--dim); pointer-events: none; }

/* energy blocks + readouts */
.hud { position: absolute; z-index: 6; display: flex; align-items: center; justify-content: flex-start; gap: 8px; white-space: nowrap;
  font: 700 11px/1 var(--mono); letter-spacing: .14em; color: var(--dim); }
.hud[hidden] { display: none; }
.hud.theirs { align-items: center; }
.hud.theirs .hud-n { font-size: 18px; }
.hud.theirs .meter { flex: 1 1 0; min-width: 24px; }
.hud.theirs .hud-l { color: #c9bfb2; }
.hud-l { font: 700 11px/1 var(--mono); letter-spacing: .16em; color: var(--dim); }
.hud-n { font: 700 20px/1 var(--mono); font-size: 20px; letter-spacing: 0; color: var(--ink); }
.hud-n em { font-style: normal; font-size: 12px; color: var(--dim); }
.blocks { display: flex; gap: 3px; }
.blocks i { display: block; width: 6px; height: 11px; background: rgba(0,0,0,.55); box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); }
.blocks i.on { background: var(--my); box-shadow: none; }

/* ---------- bench: a huddle ----------
 * The strip has a constant width. Tiles are flex items whose WIDTH is set by feel.js (rest / open /
 * shrunk); height follows from the aspect ratio and the strip is bottom-anchored, so an open tile grows
 * upward and sideways while its neighbours give way. One transition, one easing, no per-frame JS. */
.bench { position: absolute; z-index: 4; display: flex; align-items: flex-end; }
.bench.me.has-open { z-index: 70; }
.bench.snap .bt, .bench.snap .bt .f0, .bench.snap .bt .f1 { transition: none !important; }
.bt { position: relative; flex: none; padding: 0; border: 0; background: none; cursor: pointer; color: inherit;
  aspect-ratio: 1152 / 1600; container-type: inline-size;
  transition: width calc(.26s * var(--mot, 1)) var(--ease); }
.bt .f0, .bt .f1 { position: absolute; inset: 0; }
.bt .f0 > .pc-card, .bt .f1 > .pc-card { width: 100%; height: 100%; box-shadow: 0 8px 20px rgba(0,0,0,.55); pointer-events: none; }
.foe-bench .bt { cursor: default; }
.bt:focus-visible { outline: 2px solid var(--hot); outline-offset: 3px; }

/* T0 -> T1 in place: the two faces crossfade inside the tile's own box */
.bt .f1 { opacity: 0; pointer-events: none; transition: opacity calc(.2s * var(--mot, 1)) var(--ease); }
.bt .f0 { transition: opacity calc(.2s * var(--mot, 1)) var(--ease); }
.bt.is-open .f1 { opacity: 1; pointer-events: auto; }
.bt.is-open .f1 > .pc-card { pointer-events: auto; }
.bt.is-open .f0 { opacity: 0; }
.bt .f1 .pc-line.pc-trick { cursor: pointer; }

/* Resting tiles are flat: the card and nothing else. TRAP (on the trap pup) is a labelled tab that
 * ride the top edge of the OPEN tile only. They are placed in percent of the card and appear by opacity,
 * so they never move while the tile grows. */
.bt.trap::before { position: absolute; bottom: 100%; z-index: 6; height: 24px; min-width: 24px; padding: 0 9px;
  display: grid; place-items: center; font: 700 12px/1 var(--mono); letter-spacing: .1em; color: #14110D; background: #FBF8F3;
  opacity: 0; pointer-events: none; transition: opacity calc(.2s * var(--mot, 1)) var(--ease); }
.bt.trap::before { content: "TRAP"; left: 4%; box-shadow: inset 0 -3px 0 var(--hot); opacity: 1; }
.bt.is-open.trap::before { opacity: 1; }

/* ---------- the table: an oval on the diagonal ---------- */
.axis.under { z-index: 2; }
.axis.over { z-index: 7; }
.axis { position: absolute; width: 0; height: 0; transform: rotate(var(--ang)); pointer-events: none; }
.oval { position: absolute; left: calc(var(--oa) * -1); top: calc(var(--ob) * -1); width: calc(var(--oa) * 2); height: calc(var(--ob) * 2);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255,255,255,.10), transparent 80%), radial-gradient(ellipse at 50% 35%, #346056 0%, #214038 58%, #172c26 100%);
  box-shadow: 0 0 0 4px #6b5236, 0 0 0 7px #17120d, inset 0 0 0 2px rgba(247,147,26,.55), inset 0 0 70px rgba(0,0,0,.55), 0 40px 90px rgba(0,0,0,.65); }
.oval::after { content: ""; position: absolute; left: calc(50% - 1px); top: 9%; bottom: 9%; width: 2px; opacity: .5;
  background: linear-gradient(to bottom, rgba(242,237,228,.5) 0 30%, transparent 30% 70%, rgba(242,237,228,.5) 70% 100%); }
.oval .ring { position: absolute; inset: 7%; border-radius: 50%; border: 2px dashed rgba(242,237,228,.12); }
.slot { position: absolute; z-index: 3; display: grid; place-items: center; width: var(--sw); height: var(--sh); }
.slot.my-slot { left: var(--msx); top: var(--msy); transform: translate(-50%, -50%) rotate(calc(var(--ang) * -1)); }
.slot.foe-slot { left: var(--fsx); top: var(--fsy); transform: translate(-50%, -50%) rotate(calc(var(--ang) * -1)); }
@keyframes flipin { from { transform: rotateY(90deg) scale(.7); opacity: .2; } to { transform: rotateY(0) scale(1); opacity: 1; } }

.centre { position: absolute; left: var(--cnx, 0); top: var(--cny, 0); transform: translate(-50%, -50%) rotate(calc(var(--ang) * -1));
  width: var(--cw, 120px); text-align: center; display: grid; gap: 6px; justify-items: center; }
.rcount { font: 700 max(12px, calc(var(--ob) * .1))/1 var(--mono); letter-spacing: .26em; color: rgba(242,237,228,.82); }
.rcount b { color: #fff; font-size: 1.9em; letter-spacing: .02em; margin-left: .15em; }
.beat { min-height: 1.4em; font: 700 max(12px, calc(var(--ob) * .1))/1.25 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }

/* ---------- commit cluster: energy · READ · SPRING · LOCK IN · clock (bottom-right, your side) ---------- */
.dock { position: absolute; z-index: 7; }
.cluster { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.opts { height: 100%; display: flex; align-items: center; gap: 14px; }       /* the live options: one group */
.commit { height: 100%; display: flex; align-items: center; gap: 14px; margin-left: auto; }   /* LOCK IN: alone, bottom-right */
.preview { position: absolute; right: 0; bottom: calc(100% + 8px); white-space: nowrap; font: 700 12px/1 var(--mono); letter-spacing: .04em; }
.energy { flex: none; display: grid; gap: 6px; align-content: center; width: 96px; }
.energy .hud-l { position: static; }
.energy .hud-n { display: block; }
.energy .hud-n em { font-family: var(--mono); font-size: 12px; margin-left: 3px; }
.meter { display: block; height: 6px; background: #000; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.meter i { display: block; height: 100%; width: 0; background: var(--hot); }

/* verbs are raised steps: a hard 3px step under, no blur, no glow */
.ck { position: relative; flex: none; align-self: stretch; display: grid; align-content: center; justify-items: center; gap: 6px; padding: 0 16px; cursor: pointer;
  font: 700 15px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink);
  background: #2e2821; border: 0; border-radius: 0; box-shadow: 0 3px 0 #0b0a08;
  transition: transform .1s var(--ease); }
.ck em { font: 700 11px/1.1 var(--mono); font-style: normal; letter-spacing: .04em; text-transform: none; color: var(--dim); }
.ck:hover:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 #0b0a08; background: #3a352c; }
.ck:focus-visible { outline: 2px solid var(--hot); outline-offset: 3px; }

.springbtn { max-width: 220px; justify-items: start; text-align: left; }
.springbtn em { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; font-family: "Comic Neue", sans-serif; }
/* the live options are paper: ink on paper, full-size label. LOCK IN stays the only accent. */
.readbtn, .springbtn { background: #F1EADF; color: #14110D; font-size: 13px; letter-spacing: .08em; padding: 0 20px; box-shadow: 0 3px 0 #9d9382; }
.readbtn em, .springbtn em { color: #3f3a32; font-size: 12px; }
.readbtn:hover:not(:disabled), .springbtn:hover:not(:disabled) { background: #FBF8F3; box-shadow: 0 1px 0 #9d9382; }
.readbtn.is-held, .springbtn[aria-pressed="true"] { background: #BFE3DB; color: #0F4A40; box-shadow: none; transform: translateY(3px); }
.readbtn.is-held em, .springbtn[aria-pressed="true"] em { color: #0F4A40; }
.readbtn:disabled, .springbtn:disabled { background: repeating-linear-gradient(-45deg, #C9C0B0 0 4px, #BDB3A2 4px 8px); color: #3b362f; box-shadow: none; }
.readbtn:disabled em, .springbtn:disabled em { color: #3b362f; }
.ck:disabled { cursor: default; color: #b4ab9f; background: repeating-linear-gradient(-45deg, #2b2620 0 4px, #231f1a 4px 8px); box-shadow: none; }
.ck:disabled em { color: #a9a197; }

/* the single primary: heaviest ink, shortest */
.ck.primary { min-width: 128px; max-width: 180px; padding: 0 18px; font-size: 18px; color: #16120d;
  background: var(--hot); box-shadow: 0 5px 0 #a8590a; }
.ck.primary em { color: #3a2204; font-size: 12px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ck.primary:hover:not(:disabled) { background: #ffa83a; transform: translateY(3px); box-shadow: 0 2px 0 #a8590a; }
.ck.primary:disabled em { color: #b4ab9f; }
.ck.primary:disabled { color: #b4ab9f; background: repeating-linear-gradient(-45deg, #2b2620 0 4px, #231f1a 4px 8px); box-shadow: none; }


/* ---------- log: quiet, top-middle ---------- */
.log { position: absolute; z-index: 6; display: flex; flex-direction: column; gap: 6px; overflow: hidden; pointer-events: none; }
.log-h { font: 700 11px/1 var(--mono); letter-spacing: .2em; color: var(--dim); }
.log-rows { margin: 0; padding: 0; list-style: none; overflow: hidden; display: flex; flex-direction: column; gap: 4px;
  font: 400 13px/1.35 "Comic Neue", sans-serif; color: #cfc6bb; }
.log-rows li { display: flex; flex-wrap: wrap; gap: 8px; }
.log-rows b { flex: none; width: 28px; font: 700 11px/1.7 var(--mono); letter-spacing: .06em; color: var(--dim); text-transform: uppercase; }
.log-rows li.sys span { color: var(--dim); font-style: italic; }
/* items 8/9: actor colour-coding (the lab's own you/them accents), bold damage figures,
   dim sub-detail. The panel groups by round with banded blocks (item 8). */
.log-rows li.you > b { color: var(--my); }
.log-rows li.them > b { color: var(--foe); }
.log-rows li span { min-width: 0; }
.log-rows li span b.num { font-weight: 700; color: var(--ink); text-transform: none; white-space: nowrap; }
.log-rows li span.nb { white-space: nowrap; }
.log-rows li.sys span { color: var(--dim); }
.log-rows li em.sub { font: 400 12px/1.3 "Comic Neue", sans-serif; color: var(--dim); font-style: normal; }
.log-rows li em.sub.flat { margin-left: 0; flex-basis: 100%; }
.log-rows li em.sub span, .log-rows li.sys em.sub span, .log-rows li em.sub b { font-style: normal; color: inherit; }
/* who/what/how rows: the head keeps the actor's row; outcome (.oc) and why (em.sub) each get
   their own line, indented under the head's text column (gutter 36px ambient / 42px panel). */
.log-rows li span.head { flex: 1; min-width: 0; }
.log-rows li span.oc, .log-rows li em.sub { flex-basis: calc(100% - 36px); margin-left: 36px; }
.logpanel .log-rows li span.oc, .logpanel .log-rows li em.sub { flex-basis: calc(100% - 42px); margin-left: 42px; }
.log-rows li.rblock { display: block; }
.logpanel .log-rows li.rblock { border-left: 3px solid #3a332b; background: rgba(255,255,255,.03); padding: 6px 8px 8px 10px; }
.logpanel .log-rows li.rblock + li.rblock { margin-top: 10px; }
.log-rows .rhead { display: flex; align-items: baseline; gap: 10px; margin: 0 0 6px; }
.logpanel .log-rows .rhead b { width: auto; flex: none; white-space: nowrap; font: 700 11px/1 var(--mono); letter-spacing: .14em; color: var(--hot); }
.log-rows .rhead span { font: 400 12px/1.4 var(--mono); color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log-rows .rblock ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 7px; }
.log-rows .rblock ul li { gap: 8px; }
.log-rows .rblock ul li > b { width: 34px; }

/* ---------------------------------------------------------------- hooks on the face */
/* THE ATTACK ROW (row 64): one row, three sections side by side, no gaps, so the sections sum to the row:
 *   main attack (name, cost)  |  heavy attack (climax, its cost)  |  damage calculator (base ~DMG, climax ~DMG)
 * The two verb sections are separate targets with real inset padding (row 63). Their children never take the
 * pointer, so elementFromPoint at a section's centre resolves to that section. Built in the lab around the
 * card's own attack row; card.js is untouched. */
.pc-card.mine-face[data-tier="t1"] .vrow {
  --zp: max(var(--zpmin, 8px), calc(var(--u) * 22));
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.15fr) minmax(0, .78fr); column-gap: 0; align-items: stretch;
  height: calc(var(--u) * 150); padding: 0; box-sizing: border-box; overflow: hidden;
  background: rgb(255 255 255 / var(--face-op-atk-box)); box-shadow: 0 2px 0 rgba(20, 17, 13, .22);
}
.pc-card.mine-face .vrow .vs {
  position: relative; box-sizing: border-box; min-width: 0; margin: 0; border: 0; text-align: left; font: inherit; color: inherit;
  font-size: var(--pc-fs-text); padding: var(--zp);
  display: flex; flex-direction: column; justify-content: center; gap: .15em; background: none; box-shadow: none; overflow: hidden;
}
.pc-card.mine-face .vrow .vs + .vs { border-left: 1px solid rgba(20, 17, 13, .22); }
.pc-card.mine-face .vrow .vs > * { pointer-events: none; }
.pc-card.mine-face .vrow .vs-main, .pc-card.mine-face .vrow .vs-heavy {
  cursor: pointer; padding-right: calc(var(--zp) + var(--seat, 48px)); transition: background var(--fast, .12s) var(--ease), box-shadow var(--fast, .12s) var(--ease); }
.pc-card.mine-face .vrow .pc-move-name {
  font: 700 calc(var(--u) * 42)/1.05 var(--pc-sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; letter-spacing: 0; }
.pc-card.mine-face .vrow .vs-main:hover, .pc-card.mine-face .vrow .vs-heavy:hover, .pc-card.mine-face .vrow .is-hover { background: rgba(47, 140, 122, .13); box-shadow: inset 0 3px 7px rgba(0, 0, 0, .24); }
.pc-card.mine-face .vrow .vs:hover .pc-card.mine-face .vrow .vs-main:active, .pc-card.mine-face .vrow .vs-heavy:active { background: rgba(47, 140, 122, .22); box-shadow: inset 0 5px 10px rgba(0, 0, 0, .34); }
.pc-card.mine-face .vrow .vs.is-held, .pc-card.mine-face .vrow .vs.is-held:hover { background: rgba(47, 140, 122, .3) !important; box-shadow: inset 0 4px 9px rgba(0, 0, 0, .3) !important; }
.pc-card.mine-face .vrow .vs.is-held .pc-move-name, .pc-card.mine-face .vrow .vs.is-held .pc-card.mine-face .vrow .vs.is-held .pc-card.mine-face .vrow .vs.is-poor, .pc-card.mine-face .vrow .vs.is-poor:hover {
  background: repeating-linear-gradient(-45deg, rgba(0, 0, 0, .06) 0 3px, transparent 3px 7px) !important; box-shadow: none !important; cursor: not-allowed; }
.pc-card.mine-face .vrow .vs.is-poor > * { opacity: .45; }
/* item 6: the attack's energy cost as the card's own pips, one line under/next to the move name.
   Data-driven (costPips in feel.js); dim with their section when it cannot be paid. */
.pc-card.mine-face .vrow .vcost { display: flex; gap: 3px; align-items: center; }
.pc-card.mine-face .vrow .vcost .pc-pip { width: 8px; height: 10px; border-width: 0; background: var(--face-c-el); opacity: .92; }
.pc-card.mine-face .vrow .vs.is-off .vcost .pc-pip, .pc-card.mine-face .vrow .vs.is-poor .vcost .pc-pip { opacity: .4; background: #8a2f20; }
.pc-card.mine-face .vrow .vs:focus-visible { outline: 2px solid var(--hot); outline-offset: -3px; }
/* the calculator: base figure large + the doubled figure small; the climax figure takes over while the heavy section is live */
.pc-card.mine-face .vrow .vs-calc { position: relative; align-items: flex-end; justify-content: center; gap: .12em; background: none;
  padding-left: calc(var(--zp) * .6); padding-right: var(--zp); }
.pc-card.mine-face .vrow .vs-calc::before { content: ""; position: absolute; inset: 0; background: var(--face-c-el); opacity: var(--face-op-dmg-zone); transition: opacity var(--fast, .12s) var(--ease); }
.pc-card.mine-face .vrow .vs-calc.is-climax::before { opacity: calc(var(--face-op-dmg-zone) * 2.2); }
.pc-card.mine-face .vrow .vs-calc > * { position: relative; }
.vc-big { display: flex; align-items: baseline; gap: .35em; white-space: nowrap; }
.vc-n { font: 700 calc(var(--u) * 62)/1 var(--pc-mono); }
.vc-l { font: 700 max(11px, calc(var(--u) * 24))/1 var(--pc-mono); letter-spacing: var(--face-ls-label); color: var(--face-c-dim-tile); }
.vc-sub { font: 700 max(11px, calc(var(--u) * 28))/1 var(--pc-mono); white-space: nowrap; color: var(--face-c-dim-tile); }
.vs-calc.is-climax .vc-sub { color: inherit; }
.pc-card.mine-face, .foe-card .pc-card { cursor: zoom-in; }

/* ---------- bench cards: art/header zoom, body = trick, attack printed and inert ---------- */
.foe-bench .bt.theirs { cursor: zoom-in; }
.bt.mine.is-open .f1 > .pc-card { cursor: pointer; }
.bt.mine .f1 .pc-art, .bt.mine .f1 .pc-header { cursor: zoom-in; }
.bt .f1 .pc-attack, .bt .f1 .pc-attack * { cursor: default; }
.bt .f1 .pc-move, .bt .f1 .pc-move:hover { background: none; box-shadow: none; transition: none; }
.bt .f1 .pc-line.pc-passive { cursor: pointer; }
/* the trick row is the one live key on a bench card: rest = a key, hover/focus = pressed-in tint, pressed = deeper, held = teal */
/* NOTE: no .f1 wrapper exists in the bench DOM — rules namespaced under it never matched. */
.bt .pc-line.pc-trick { cursor: pointer; box-shadow: 0 2px 0 rgba(20, 17, 13, .22);
  transition: box-shadow var(--fast, .12s) var(--ease), background-color var(--fast, .12s) var(--ease); }
.bt.is-open .pc-line.pc-trick:not(.is-off):hover, .bt.is-open:focus-visible .pc-line.pc-trick:not(.is-off) {
  background-image: linear-gradient(rgba(47, 140, 122, .24), rgba(47, 140, 122, .24)); box-shadow: inset 0 3px 7px rgba(0, 0, 0, .24), inset 3px 0 0 var(--my); }
.bt.is-open .pc-line.pc-trick:not(.is-off):active { background-image: linear-gradient(rgba(47, 140, 122, .3), rgba(47, 140, 122, .3)); box-shadow: inset 0 5px 10px rgba(0, 0, 0, .34); }
.bt .pc-line.pc-trick.is-held { background-image: linear-gradient(rgba(47, 140, 122, .32), rgba(47, 140, 122, .32)); box-shadow: inset 0 4px 9px rgba(0, 0, 0, .3); }
.bt .pc-line.pc-trick.is-held .pc-ab-name { color: #1B5A4E; }

/* ---------- hover read popover ---------- */
.tip { position: fixed; z-index: 95; pointer-events: none; display: grid; gap: 4px; padding: 10px 12px; width: max-content;
  background: rgba(251, 248, 243, .94); color: #14110D; border: 1px solid rgba(20, 17, 13, .38);
  box-shadow: 0 3px 0 rgba(157, 147, 130, .8), 0 14px 30px rgba(0,0,0,.45); }
.tip[hidden] { display: none; }
.tip-k { font: 700 11px/1 var(--mono); letter-spacing: .14em; color: #5d554a; }
.tip-n { font: 700 15px/1.2 "Comic Neue", sans-serif; }
.tip-t { font: 400 14px/1.35 "Comic Neue", sans-serif; }

/* ---------- resolve: the seats fall back, the table takes over ---------- */
.seat, .cardhost, .bench, .hud { transition: opacity calc(.5s * var(--mot, 1)) var(--ease); }
.lab.resolving .seat, .lab.resolving .cardhost, .lab.resolving .bench, .lab.resolving .hud { opacity: .14; pointer-events: none; }
/* ---------- inspect: T2, large, centred ---------- */
.inspect { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  background: rgba(10, 8, 6, .9); cursor: zoom-out; }
.inspect[hidden] { display: none; }
.inspect-card { width: min(calc((100dvh - 64px) * .72), 92vw); }
.inspect-card .pc-card { width: 100%; box-shadow: 0 22px 54px rgba(0,0,0,.6); }
.inspect-hint { margin: 0; font: 700 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }

/* ---------- animation, scaled by ?slow ---------- */
.ck { transition-duration: calc(.1s * var(--mot, 1)); }

/* ---------- ?debug ---------- */
.debug .zone, .debug .cardhost, .debug .bench, .debug .bt, .debug .slot, .debug .dock, .debug .log, .debug .hud,
.debug .seat i, .debug .oval, .debug .top, .debug .top .instr { outline: 1px solid #ff00ff; outline-offset: -1px; }
.debug .top .instr, .debug .seat i, .debug .zone, .debug .oval, .debug .hud { position: absolute; }
.debug .top .instr { position: relative; }
.dbg-l { position: absolute; left: 2px; top: 2px; z-index: 99; padding: 1px 3px; font: 700 11px/1 var(--mono); font-style: normal;
  color: #ff00ff; background: rgba(0,0,0,.75); pointer-events: none; white-space: nowrap; }

/* ---------- fixed boxes: no control resizes with its label, so the rail is the same width in every state ---------- */
.ck { padding: 0 12px; overflow: hidden; }
.ck > *, .ck em { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.readbtn { width: 124px; min-width: 0; max-width: none; }
.springbtn { width: 204px; min-width: 0; max-width: none; }
.ck.primary { width: 172px; min-width: 0; max-width: none; }
.ck.primary em { max-width: 100%; }

/* ---------- log: ambient line + on-demand panel ---------- */
.log { overflow: hidden; }
.log .log-rows li:nth-child(2) { opacity: .82; }
.lab.portrait .log .log-rows .rhead span { display: none; }
.scrim { position: fixed; inset: 0; z-index: 59; background: rgba(10, 8, 6, .62);
  opacity: 0; pointer-events: none; transition: opacity calc(.26s * var(--mot, 1)) var(--ease); }
.scrim.on { opacity: 1; pointer-events: auto; }
.logpanel { position: fixed; z-index: 60; top: 34px; right: 0; bottom: 0; width: min(340px, 32vw); display: flex; flex-direction: column; gap: 10px;
  padding: 14px 16px 16px; background: #1d1a16; color: #cfc6bb;
  transform: translateX(100%); visibility: hidden;
  transition: transform calc(.26s * var(--mot, 1)) var(--ease), visibility 0s linear calc(.26s * var(--mot, 1)); }
.logpanel.open { transform: none; visibility: visible; transition: transform calc(.26s * var(--mot, 1)) var(--ease), visibility 0s; }
.lp-h { display: flex; align-items: center; justify-content: space-between; font: 700 12px/1 var(--mono); letter-spacing: .2em; color: var(--dim); }
.logpanel .log-rows { flex: 1 1 0; min-height: 0; overflow-y: auto; gap: 8px; font-size: 14px; pointer-events: auto; }
.logpanel .log-rows b { width: 34px; }
.logpanel .log-rows > li.rblock { list-style: none; }
@media (max-width: 900px), (max-aspect-ratio: 1/1) {
  .logpanel { top: auto; left: 0; right: 0; bottom: 0; width: auto; height: 46dvh; transform: translateY(100%); }
  .logpanel.open { transform: none; }
}

/* =====================================================================================================
 * PORTRAIT — <= 620px wide or taller than wide. Real px sizes from layoutPortrait(); nothing is scaled.
 * Them above, the mat, you below; verbs in two thumb rows at the bottom. Tap targets >= 44.
 * ===================================================================================================== */
.tiny .lg { display: inline; }

/* ---------- states: the lab harness drawer (lab only, quiet) ---------- */
#states { position: absolute; z-index: 62; right: 12px; top: 34px; width: 210px; padding: 10px 12px 12px;
  background: var(--panel, #141412); border: 1px solid var(--line, #2a2a26); border-radius: 8px;
  font: 700 11px/1.6 var(--mono); letter-spacing: .06em; color: var(--ink); text-transform: uppercase; }
#states .st-h { color: var(--dim); letter-spacing: .2em; margin-bottom: 6px; }
#states .st-h span { letter-spacing: .06em; opacity: .7; text-transform: none; }
#states .st-g { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0 0; }
#states .st-g b { flex: 0 0 100%; color: var(--dim); font-weight: 400; letter-spacing: .14em; margin-bottom: 2px; }
#states .st-g button { font: inherit; color: inherit; background: none; border: 1px solid var(--line, #2a2a26);
  border-radius: 4px; padding: 4px 7px; cursor: pointer; text-transform: inherit; letter-spacing: inherit; }
#states .st-g button:hover { border-color: var(--hot); }
#states .st-ff { display: flex; align-items: center; gap: 6px; margin-top: 10px; color: var(--dim); cursor: pointer; }
.lab.portrait #states { top: 46px; right: 6px; }

/* ---------- tune: the motion harness (?tune only) ---------- */
#tune { position: fixed; z-index: 62; right: 10px; bottom: 10px; width: 322px; max-height: calc(100vh - 20px); display: flex; flex-direction: column; padding: 8px 10px 10px;
  background: rgba(16,15,13,.94); border: 1px solid var(--line, #2a2a26); border-radius: 8px;
  font: 700 10.5px/1.5 var(--mono); letter-spacing: .05em; color: var(--ink); text-transform: uppercase; }
#tune .tn-h { color: var(--dim); letter-spacing: .2em; display: flex; justify-content: space-between; cursor: pointer; }
#tune .tn-h span { letter-spacing: .06em; opacity: .7; text-transform: none; }
#tune .tn-row { display: flex; gap: 5px; align-items: center; margin-top: 7px; flex-wrap: wrap; }
#tune select, #tune button, #tune input[type="number"] { font: inherit; color: inherit; background: none; border: 1px solid var(--line, #2a2a26);
  border-radius: 4px; padding: 3px 6px; text-transform: inherit; letter-spacing: inherit; }
#tune button { cursor: pointer; }
#tune button:hover { border-color: var(--hot); }
#tune button.on { border-color: var(--hot); color: var(--hot); }
#tune input[type="range"] { flex: 1; min-width: 90px; accent-color: var(--hot); }
#tune .tn-band button { flex: 1; }
#tune .tn-knobs { overflow: auto; margin-top: 6px; padding-top: 2px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px 10px; max-height: 42vh; }
#tune .tn-knobs h4 { grid-column: 1 / -1; margin: 5px 0 0; font: inherit; color: var(--dim); letter-spacing: .2em; }
#tune label.tn-k { display: flex; justify-content: space-between; align-items: center; gap: 4px; color: var(--dim); }
#tune label.tn-k input { width: 54px; text-align: right; }
#tune .tn-note { color: var(--dim); text-transform: none; letter-spacing: .02em; }
#tune.collapsed .tn-knobs, #tune.collapsed .tn-tuner { display: none; }
#tune:not(.collapsed) .tn-beats { max-height: 24vh; }
#tune .tn-foot { display: flex; }
/* beat browser: functional, not pretty */
#tune .tn-beats { overflow: auto; margin-top: 6px; max-height: 62vh; display: flex; flex-direction: column; gap: 2px; }
#tune .tn-beats h4 { margin: 6px 0 1px; font: inherit; color: var(--hot); letter-spacing: .2em; }
#tune .tn-beats button.tn-b { text-align: left; text-transform: none; letter-spacing: .02em; padding: 4px 8px; }
#tune.nolist .tn-beats { display: none !important; }
body.tn-portrait #tune .tn-beats { max-height: 24vh; display: grid; grid-template-columns: 1fr 1fr; }
body.tn-portrait #tune .tn-beats h4 { grid-column: 1 / -1; }
body.tn-portrait #tune .tn-beats button.tn-b { font-size: 10px; padding: 5px 6px; line-height: 1.25; }
.lab.portrait ~ #tune, body.tn-portrait #tune { left: 0; right: 0; bottom: 0; width: auto; border-radius: 8px 8px 0 0; }
body.tn-portrait #tune .tn-knobs { max-height: 28vh; grid-template-columns: 1fr 1fr 1fr; }
.lab.portrait .top { width: 100%; height: 64px; padding: 0 12px; flex-wrap: wrap; align-content: flex-start; gap: 0 12px; }
.lab.portrait .top .phase { height: 44px; display: flex; align-items: center; flex: 0 1 auto; min-width: 0; max-width: calc(100% - 150px);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lab.portrait .top .vs { height: 44px; display: flex; align-items: center; gap: .45em; }
.lab.portrait .top .instr { order: 3; flex: 0 0 100%; height: 20px; margin: 0; padding: 0; line-height: 20px; font-size: 12px; }
.lab.portrait .tools { top: 0; right: 6px; left: 6px; height: 44px; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; justify-content: safe flex-end; }
.lab.portrait .tools::-webkit-scrollbar { display: none; }
.lab.portrait .tiny { min-height: 44px; min-width: 44px; padding: 0 12px; }
.lab.portrait .log { overflow: hidden; }
.lab.portrait .log-h { display: none; }
.lab.portrait .log .log-rows li:nth-child(2) { display: none; }
.lab.portrait .log .log-rows { font-size: 13px; }
.lab.portrait .log .log-rows li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lab.portrait .log .log-rows li span { overflow: hidden; text-overflow: ellipsis; }

/* the mat: slots stacked, captions to the left of each slot, the read between them */
.lab.portrait .oval::after { display: none; }
.lab.portrait .rcount { font-size: 13px; }
.lab.portrait .beat { font-size: 12px; }

/* your bench: the open tile is lifted by tap and sits above its neighbours */
.lab.portrait .bt.is-open { z-index: 3; }
.lab.portrait .foe-bench .bt { cursor: pointer; }
.lab.portrait .hud.theirs .hud-n { font-size: 16px; }

/* the dock: row 1 = energy, READ, TRAP; row 2 = clock, LOCK IN. Both rows are --row tall. */
.lab.portrait .dock { z-index: 8; }
.lab.portrait .cluster { flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 8px; }
.lab.portrait .opts { height: var(--row); display: grid; grid-template-columns: 72px 1fr 1.5fr; gap: 8px; align-items: stretch; }
.lab.portrait .commit { height: var(--row); margin: 0; gap: 8px; display: flex; }
.lab.portrait .energy { width: auto; gap: 5px; }
.lab.portrait .hud-n { font-size: 18px; }
.lab.portrait .ck { min-height: 44px; }
.lab.portrait .readbtn, .lab.portrait .springbtn { width: auto; max-width: none; padding: 0 8px; font-size: 12px; letter-spacing: .05em; }
.lab.portrait .springbtn { justify-items: center; text-align: center; }
.lab.portrait .ck.primary { flex: 1 1 0; width: auto; max-width: none; min-width: 0; }
.lab.portrait .preview { position: fixed; right: var(--pad, 10px); top: var(--pvTop, 0); bottom: auto; z-index: 9; }
@media (max-width: 519px) { .lab.portrait .top .vs { display: none; } .tiny .lg { display: none; } }

/* touch: on a phone the card is small, so the row is short (~25px). The verb sections are extended 5px up and down. */
.lab.portrait .pc-card.mine-face .vrow { --zpmin: 3px; --vzk-min: 0px; }
.lab.portrait .lab.portrait .pc-card.mine-face .vrow .vs-main, .lab.portrait .pc-card.mine-face .vrow .vs-heavy { padding-right: var(--zp); }
.lab.portrait .lab.portrait .lab.portrait .pc-card.mine-face .vrow .pc-move-name { font-size: calc(var(--u) * 48); }
.lab.portrait .vc-l, .lab.portrait .vc-sub { display: none; }
.lab.portrait .vc-n { font-size: calc(var(--u) * 80); }
.lab.portrait .pc-card.mine-face .vrow .vs-calc { align-items: center; }
.lab.portrait .pc-card.mine-face .vrow .vs-main::before, .lab.portrait .pc-card.mine-face .vrow .vs-heavy::before { content: ""; position: absolute; left: 0; right: 0; top: -5px; bottom: -5px; }
@media (max-width: 1100px) { .vz-k { letter-spacing: 0; } }

/* ---------- card backs (row 67): a trap is a secret commitment ---------- */
.cback { position: absolute; inset: 0; container-type: inline-size; display: grid; place-items: center; overflow: hidden; border: 3px solid #0e0b09;
  background: repeating-linear-gradient(45deg, #2b1f19 0 6px, #231913 6px 12px); box-shadow: inset 0 0 0 3px #4a362b, 0 8px 20px rgba(0,0,0,.55); }
.cback.mine { background: repeating-linear-gradient(45deg, #1d3a35 0 6px, #17302c 6px 12px); box-shadow: inset 0 0 0 3px var(--my-d), 0 8px 20px rgba(0,0,0,.55); }
.cback .cb-mark { display: block; width: 34cqw; aspect-ratio: 1; transform: rotate(45deg); border: 2px solid rgba(242,237,228,.5); background: rgba(0,0,0,.35); }
.bt.trapback::before { display: none; }
.cback.foe .cb-own { color: #ff8a76; }
.cback.mine .cb-mark { border-color: #6fe0d2; }
.cback .cb-own { position: absolute; left: 0; right: 0; bottom: 5%; text-align: center; font: 700 max(11px, 13cqw)/1 var(--mono); letter-spacing: .1em; color: #6fe0d2; }
.bt .f0 > .cback, .bt .f1 > .cback { box-shadow: inset 0 0 0 3px #4a362b, 0 8px 20px rgba(0,0,0,.55); }
.bt.trapback { cursor: default; }

/* ---------- seals on the mat: the committed card (row 65) ---------- */

/* ---------- resolve: the sequence on the mat (row 66) ---------- */
.stage { position: absolute; inset: 0; z-index: 12; pointer-events: auto; cursor: pointer; }
.stage[hidden] { display: none; }
.stage.snap * { transition: none !important; animation: none !important; }
.sc { position: absolute; left: 0; top: 0; aspect-ratio: 1152 / 1600; container-type: inline-size; will-change: transform;
  transition: transform calc(.7s * var(--mot, 1)) var(--ease), opacity calc(.4s * var(--mot, 1)) var(--ease); }
.sc-in { position: absolute; inset: 0; transition: transform calc(.3s * var(--mot, 1)) var(--ease), opacity calc(.3s * var(--mot, 1)) var(--ease); }
.sc-in > .rot, .sc-in .idle { position: absolute; inset: 0; }   /* motion wrappers pass geometry through */
.sc-in .pc-card { position: absolute; inset: 0; width: 100%; height: 100%; box-shadow: 0 14px 30px rgba(0,0,0,.6); pointer-events: none; }
.sc .pc-hpfill { width: 100%; transform-origin: left center; transform: scaleX(var(--pc-hp-frac, 1)); transition: transform calc(.6s * var(--mot, 1)) var(--ease); }
.sc.acting { z-index: 3; }
.sc.acting .sc-in { transform: translate(var(--ax, 0), var(--ay, 0)) scale(1.07); }
.sc.acting .sc-in .pc-card { box-shadow: 0 0 0 3px var(--hot), 0 24px 36px rgba(0,0,0,.6); }
.sc.hit .sc-in { animation: shake calc(.45s * var(--mot, 1)) linear 1; }
.sc.ko .sc-in { opacity: .45; filter: grayscale(1); }
.sc.leave { opacity: 0; }
.sc.helper { z-index: 2; }
.sc.trapcard { z-index: 2; }
.sc-in.flipped { animation: flipin calc(.5s * var(--mot, 1)) var(--ease) 1; }
.sc.readmark::after { content: "READ"; position: absolute; top: -12px; left: 50%; transform: translateX(-50%); z-index: 4; padding: 4px 10px; background: #F1EADF; color: #14110D;
  font: 700 12px/1 var(--mono); letter-spacing: .12em; box-shadow: 0 3px 0 #9d9382; }
.say { position: absolute; z-index: 9; left: var(--sayx, 50%); top: var(--sayy, 50%); transform: translate(-50%, -50%); max-width: min(560px, 92vw); text-align: center;
  padding: 10px 16px; background: #14110d; color: var(--ink); border: 2px solid var(--hot); font: 700 15px/1.25 var(--mono); letter-spacing: .03em;
  box-shadow: 0 10px 26px rgba(0,0,0,.6); opacity: 0; pointer-events: none; }
.say.on { opacity: 1; }
.say[data-side="A"] { border-color: var(--my); }
.say[data-side="B"] { border-color: var(--foe); }
.say.pop { animation: say-pop calc(.3s * var(--mot, 1)) var(--ease) 1; }
.fx { position: absolute; z-index: 10; transform: translate(-50%, 0); font: 700 34px/1 var(--mono); color: #fff; text-shadow: 0 2px 0 #000, 0 0 12px rgba(0,0,0,.8); pointer-events: none;
  animation: fx-up calc(1.2s * var(--mot, 1)) var(--ease) 1 forwards; }
.fx.crit { color: #ffd34d; font-size: 42px; } .fx.heal { color: #7be8a0; } .fx.trap { color: #ffb066; }
/* the floating damage number over the DEFENDER (spec item 1): red, big enough at 390x844,
   centred on the card's own width, floats -40px and fades in ~900ms. An overlay node on #stage:
   it resizes nothing and moves nothing. */
.fx.dmgpop { z-index: 14; color: #ff8a76; font-size: clamp(24px, calc(var(--u, 1px) * 62), 44px); }
@keyframes dmgpop-up { from { transform: translate(-50%, 0); opacity: 1; } to { transform: translate(-50%, -40px); opacity: 0; } }
.fx.dmgpop { animation: dmgpop-up calc(.9s * var(--mot, 1)) var(--ease) 1 forwards; }
@keyframes shake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-9px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
@keyframes say-pop { from { transform: translate(-50%, -50%) scale(.92); } to { transform: translate(-50%, -50%) scale(1); } }
@keyframes fx-up { from { transform: translate(-50%, 0); opacity: 1; } to { transform: translate(-50%, -60px); opacity: 0; } }
@media (max-width: 520px) { .say { font-size: 13px; padding: 8px 12px; } }
@media (max-width: 1500px) and (min-aspect-ratio: 1/1) { .lab:not(.portrait) { --seat: 38px; --seat-d: 30px; } .vz-k { letter-spacing: 0; } .vz-sub { gap: .4em; } }


/* =====================================================================================================
 * ROUND 68-73: one card one place, stations, markers, tokenless attack row, plain-sentence beats
 * ===================================================================================================== */
/* attack row: two words + calculator. Labels are block boxes so a clip is measurable; nothing is ellipsised. */
.pc-card.mine-face .vrow .pc-move-name { display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: clip; font-size: max(12px, calc(var(--u) * 46)); }
.pc-card.mine-face .vrow .vs-main, .pc-card.mine-face .vrow .vs-heavy { padding-right: var(--zp); }
.pc-card.mine-face .vrow .vs-heavy { font: inherit; }
.vz-why { display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: clip; font: 700 max(10px, calc(var(--u) * 26))/1.1 var(--pc-mono); color: #8a2f20; }
.vz-why:empty { display: none; }
.vc-big { overflow: hidden; max-width: 100%; }
.pc-card.mine-face .vrow .vs.is-off, .pc-card.mine-face .vrow .vs.is-off:hover, .pc-card.mine-face .vrow .vs.is-off:active {
  background: repeating-linear-gradient(-45deg, rgba(20,17,13,.16) 0 4px, rgba(20,17,13,.04) 4px 9px) !important; box-shadow: none !important; cursor: not-allowed; }
.pc-card.mine-face .vrow .vs.is-off .pc-move-name { opacity: .5; text-decoration: line-through; text-decoration-thickness: 1px; }
.pc-card.mine-face .vrow .vs.is-off:focus-visible { outline: 2px dashed var(--hot); }
.lab.portrait .vz-why { display: none; }
.lab.portrait .pc-card.mine-face .vrow .pc-move-name { font-size: max(11px, calc(var(--u) * 46)); }
/* phone: the row is ~25px; each verb section reaches 10px up and down so the target is >= 44px */
.lab.portrait .pc-card.mine-face .vrow .vs-main::before, .lab.portrait .pc-card.mine-face .vrow .vs-heavy::before { top: -12px; bottom: -12px; }
.tip-w { font: 700 12px/1.2 var(--mono); color: #8a2f20; }
.tip-w[hidden] { display: none; }

/* bench: one node per tile */
.bt .bc { position: absolute; inset: 0; }
.bt .bc > .pc-card { position: absolute; inset: 0; width: 100%; height: 100%; box-shadow: 0 8px 20px rgba(0,0,0,.55); }
.bt.theirs .bc > .pc-card { pointer-events: none; }
.bt.mine:not(.is-open) .bc > .pc-card { pointer-events: none; }
.bt .bc.swapin { animation: swapin calc(.2s * var(--mot, 1)) var(--ease) 1; }
@keyframes swapin { from { opacity: .35; } to { opacity: 1; } }
.bt.out { cursor: default; }
.foe-bench { justify-content: flex-end; }
.cardhost.out { aspect-ratio: 1152 / 1600; }
.cardhost.out .pc-card { display: none; }
.bt.is-open .pc-line.pc-trick { cursor: pointer; }

/* table: rest outlines give way to stations */
.stage { pointer-events: none; cursor: default; z-index: 12; }
.stage .say, .stage .fx { pointer-events: none; }
.lab.resolving .slot { opacity: 0; transition: opacity calc(.4s * var(--mot, 1)) var(--ease); }
.slot { transition: opacity calc(.4s * var(--mot, 1)) var(--ease); }
.sc { transform-origin: 0 0; }
.sc .sc-in .pc-card { box-shadow: 0 14px 30px rgba(0,0,0,.6); }
.sc.back .sc-in .cback { position: absolute; inset: 0; }
.stage.has-actor .sc:not(.acting):not(.recv) > .sc-in { opacity: .42; filter: saturate(.6) brightness(.8); }
.stage.has-actor .armed { opacity: .5; }
.sc-in { transition: transform calc(.3s * var(--mot, 1)) var(--ease), opacity calc(.3s * var(--mot, 1)) var(--ease); }
.sc.acting .sc-in { transform: translateY(-12px) scale(1.07); }
.sc.mine.acting .sc-in .pc-card, .sc.mine.recv .sc-in .pc-card { box-shadow: 0 0 0 4px var(--my), 0 24px 36px rgba(0,0,0,.6); }
.sc.foe.acting .sc-in .pc-card, .sc.foe.recv .sc-in .pc-card { box-shadow: 0 0 0 4px var(--foe), 0 24px 36px rgba(0,0,0,.6); }
.sc.recv .sc-in .pc-card { outline: 3px solid #fff; outline-offset: 3px; }
/* the verb tag sits ON the card's top edge (flush left, wholly above it) so the pup's name header stays readable */
.sc.acting::after, .sc.recv::after { content: attr(data-tag); position: absolute; left: 0; bottom: calc(100% + 3.6% + 20px); z-index: 6; padding: 4px 10px; white-space: nowrap;
  font: 700 12px/1 var(--mono); letter-spacing: .12em; color: #14110D; background: #FBF8F3; }
.sc.mine.acting::after { background: #8fe6da; } .sc.foe.acting::after { background: #ffb4a6; }
.sc.readmark::before { content: "READ"; position: absolute; bottom: -12px; left: 50%; transform: translateX(-50%); z-index: 4; padding: 4px 10px; background: #F1EADF; color: #14110D;
  font: 700 12px/1 var(--mono); letter-spacing: .12em; }
.sc.readmark::after { content: attr(data-tag); }
.sc .pc-passive.fired, .sc .pc-line.pc-passive.fired { outline: 3px solid var(--hot); outline-offset: -2px; background: rgba(247,147,26,.25); }
.say { transform: translate(-50%, -50%); width: auto; max-width: none; }
@keyframes say-pop { from { transform: translate(-50%, -50%) scale(.94); } to { transform: translate(-50%, -50%) scale(1); } }

/* armed markers: a small portrait card-back (the seal-slot back: hatch, diamond, ring) parked on its owner's half */
.armed { position: absolute; left: 0; top: 0; width: 52px; height: 72px; display: grid; place-items: center; align-content: center; gap: 4px; z-index: 4; pointer-events: auto; box-sizing: border-box;
  border: 3px solid #0e0b09; background: repeating-linear-gradient(45deg, #2b1f19 0 6px, #231913 6px 12px); box-shadow: inset 0 0 0 2px #4a362b, 0 6px 14px rgba(0,0,0,.5);
  transition: transform calc(.7s * var(--mot, 1)) var(--ease); }
.armed[hidden] { display: none; }
.armed.mine { background: repeating-linear-gradient(45deg, #1d3a35 0 6px, #17302c 6px 12px); box-shadow: inset 0 0 0 2px var(--my-d), 0 6px 14px rgba(0,0,0,.5); cursor: help; }
.armed .am-d { display: block; width: 15px; height: 15px; margin-bottom: 3px; transform: rotate(45deg); border: 2px solid rgba(242,237,228,.5); background: rgba(0,0,0,.35); }
.armed.mine .am-d { border-color: #6fe0d2; }
.armed .am-t { font: 700 10px/1 var(--mono); letter-spacing: .1em; color: var(--ink); }
.armed .am-s { font: 700 7px/1 var(--mono); font-style: normal; letter-spacing: .08em; color: var(--dim); }
.armed.primed { outline: 3px solid var(--hot); outline-offset: 2px; }
.armed:focus-visible { outline: 2px solid var(--hot); outline-offset: 3px; }
.lab.resolving .armed { z-index: 4; }
.peek { position: fixed; z-index: 96; display: grid; gap: 6px; width: max-content; padding: 0; background: none; border: 0; box-shadow: none; }   /* no frame: the trap facts, the card and its SWAP IN control, as a bench tile and its SWAP */
.peek-trap { display: grid; gap: 3px; padding: 8px 10px; box-sizing: border-box; background: rgba(20,17,13,.88); border: 1px solid rgba(251,248,243,.18); }
.peek-trap .pt-n { font: 700 11px/1.2 var(--mono); letter-spacing: .08em; color: var(--hot); }
.peek-trap .pt-r { font: 400 11px/1.35 var(--mono); color: var(--ink); }
.peek-trap .pt-c { font: italic 400 10px/1.3 var(--mono); color: var(--dim); }
.peek[hidden] { display: none; }
.peek-card { position: relative; container-type: inline-size; aspect-ratio: 1152 / 1600; }
.peek-card > .pc-card { position: absolute; inset: 0; width: 100%; height: 100%; box-shadow: 0 8px 20px rgba(0,0,0,.55); }
.peek-swap { width: 100%; min-width: 0; height: 28px; padding: 0 10px; font: 700 12px/1 var(--mono); letter-spacing: .08em; white-space: nowrap; color: #14110D; background: #FBF8F3; border: 0;
  box-shadow: inset 0 -3px 0 #cfc6b8, 0 4px 10px rgba(0,0,0,.45); cursor: pointer; }
.peek-swap:hover { background: #fff; }
.peek-swap:focus-visible { outline: 2px solid var(--hot); outline-offset: 2px; }
.lab.portrait .peek-swap { height: 44px; font-size: 13px; }
.lab.resolving .seat, .lab.resolving .cardhost, .lab.resolving .bench, .lab.resolving .hud { opacity: .14; }
.lab.resolving .log { opacity: 0; transition: opacity calc(.3s * var(--mot, 1)) var(--ease); }
/* the row on the table: the card is scaled as a whole, so no pixel floors (they clip at small sizes) */
.sc .pc-card.mine-face .vrow { --zpmin: 3px; }
.sc .pc-card.mine-face .vrow .pc-move-name { font-size: calc(var(--u) * 46); }
.sc .pc-card.mine-face .vrow .vc-l, .sc .pc-card.mine-face .vrow .vc-sub { font-size: calc(var(--u) * 24); }
.sc .pc-card.mine-face .vrow .vz-why { display: none; }
/* phone: let the 10px reach above and below the row escape the row's own clip */
.lab.portrait .pc-card.mine-face .vrow, .lab.portrait .pc-card.mine-face .vrow .vs-main, .lab.portrait .pc-card.mine-face .vrow .vs-heavy { overflow: visible; }
.lab.portrait .pc-card.mine-face .vrow .vs-main, .lab.portrait .pc-card.mine-face .vrow .vs-heavy { z-index: 1; }


/* =====================================================================================================
 * ROWS 74-77: the reveal. The mat zooms to fill the stage; the cards assemble on it, backs up; each turns over on its beat.
 * No scaffold: a stance draws nothing until a card is in it.
 * ===================================================================================================== */
.axis.under { transition: opacity 0s linear calc(.8s * var(--mot, 1)); }
.lab.zoom .axis.under { opacity: 0; transition: opacity 0s; }
/* the stage mat: the same felt as the oval, drawn at its own final size so nothing is stretched at rest on the table */
.rmat { position: absolute; z-index: 0; border-radius: 50%; pointer-events: none; opacity: 0; transform: var(--rm0, none); will-change: transform;
  transition: transform calc(.8s * var(--mot, 1)) var(--ease), opacity 0s linear calc(.8s * var(--mot, 1));
  background: radial-gradient(closest-side, rgba(255,255,255,.10), transparent 80%), radial-gradient(ellipse at 50% 35%, #346056 0%, #214038 58%, #172c26 100%);
  box-shadow: 0 0 0 6px #6b5236, 0 0 0 10px #17120d, inset 0 0 0 3px rgba(247,147,26,.55), inset 0 0 90px rgba(0,0,0,.55), 0 40px 90px rgba(0,0,0,.65); }
.lab.zoom .rmat { opacity: 1; transform: var(--rm1, none); transition: transform calc(.8s * var(--mot, 1)) var(--ease), opacity 0s; }
.rm-line { position: absolute; left: calc(50% - 1px); top: 7%; bottom: 7%; width: 2px; background: rgba(242,237,228,.3); }   /* the strike line: whole, not dashed */
/* the rest-state slots, labels and the middle read give way while the table is the stage */
.axis.over { transition: opacity calc(.4s * var(--mot, 1)) var(--ease), visibility 0s linear calc(.4s * var(--mot, 1)); }
.lab.zoom .axis.over, .lab.resolving .axis.over { opacity: 0; visibility: hidden; }
.lab.resolving .slot { opacity: 1; }
/* the clusters slide partly away and come back */
.dock, .bench, .hud, .cardhost { transition: opacity calc(.6s * var(--mot, 1)) var(--ease), translate calc(.8s * var(--mot, 1)) var(--ease); }
.lab.zoom .dock { translate: 0 62%; opacity: .22; }
.lab.zoom .bench.me { translate: 0 52%; }
.lab.zoom .foe-bench { translate: 0 -46%; }
.lab.zoom .hud.theirs { translate: 0 -120%; }
.lab.resolving .dock { pointer-events: none; }
.lab.resolving .seat, .lab.resolving .bench, .lab.resolving .hud { opacity: .22; }
.lab.zoom .cardhost { opacity: 0; }
.lab.resolving .cardhost.out { opacity: 0; }
/* a card on the table: a back or a face */
.sc .sc-in { transition: transform calc(.3s * var(--mot, 1)) var(--ease), opacity calc(.3s * var(--mot, 1)) var(--ease), filter calc(.3s * var(--mot, 1)) var(--ease); }
.sc.flipping .sc-in { transform: scaleX(0); transition-duration: calc(.23s * var(--mot, 1)); transition-timing-function: cubic-bezier(.5, 0, .9, .6); }
.sc[data-face="down"] .cback { box-shadow: inset 0 0 0 3px #4a362b, 0 14px 30px rgba(0,0,0,.6); }
.sc[data-face="down"] .cback.mine { box-shadow: inset 0 0 0 3px var(--my-d), 0 14px 30px rgba(0,0,0,.6); }
.sc[data-face="down"] .cb-mark { width: 30cqw; border-width: 3px; }
.sc.acting .cback { box-shadow: 0 0 0 4px var(--hot), 0 24px 36px rgba(0,0,0,.6); }
.sc-in.flipped { animation: none; }

/* ---------- the beat box: sized and placed by the solver, clear of the felt and every card ---------- */
.say { display: flex; align-items: center; justify-content: center; }

/* ---------- a card prints the line it acts with ---------- */
.pc-t0-trick[data-line="trap"] { color: var(--face-c-el-trap, #7a2d8f); }
.pc-t0-trick[data-line] { text-shadow: 0 0 0 transparent; }
.pc-card .is-acting { outline: 3px solid var(--hot); outline-offset: -3px; background-color: rgba(247,147,26,.22); }
.pc-card .vrow.is-acting { outline-offset: -3px; }
/* on the printed faces the move/climax highlight wraps a text-sized box — an inset offset hugs the glyphs
   (owner: "hugs the text too much"). Give it air; full-row highlights keep the inset. */
.pc-card:not(.mine-face) .pc-move.is-acting, .pc-card:not(.mine-face) .climax-hit.is-acting { outline-offset: 3px; }

/* ---------- promote: the bench as a choice (>= 44px targets, keys 1-n) ---------- */
.promote { position: fixed; z-index: 75; left: 50%; bottom: 10px; transform: translateX(-50%); max-width: calc(100vw - 16px);
  display: grid; gap: 8px; justify-items: center; padding: 10px 12px 12px; background: #14110d; border: 2px solid var(--my);
  box-shadow: 0 16px 40px rgba(0,0,0,.7); }
.promote[hidden] { display: none; }
.pm-h { margin: 0; font: 700 13px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); text-align: center; }
.pm-row { display: flex; gap: 10px; justify-content: center; }
.pm-opt { position: relative; flex: none; width: clamp(104px, 9vw, 150px); min-height: 44px; display: grid; gap: 6px; justify-items: center; align-content: start;
  padding: 8px 6px 8px; cursor: pointer; color: #14110D; background: #F1EADF; border: 0; box-shadow: 0 3px 0 #9d9382; font-family: inherit; }
.pm-opt:hover, .pm-opt:focus-visible { background: #FBF8F3; outline: 3px solid var(--hot); outline-offset: 2px; }
.pm-opt:active { transform: translateY(2px); box-shadow: 0 1px 0 #9d9382; }
.pm-k { position: absolute; left: 4px; top: 4px; z-index: 2; min-width: 22px; height: 22px; display: grid; place-items: center; font: 700 13px/1 var(--mono); color: #fff; background: #14110D; }
.pm-card { position: relative; display: block; width: clamp(64px, 6vw, 96px); aspect-ratio: 1152 / 1600; container-type: inline-size; }
.pm-card > .pc-card { position: absolute; inset: 0; width: 100%; height: 100%; box-shadow: 0 6px 14px rgba(0,0,0,.4); }
.pm-t { display: grid; gap: 2px; text-align: center; width: 100%; }
.pm-mv { font: 700 13px/1.15 "Comic Neue", sans-serif; }
.pm-tr { font: 400 13px/1.15 "Comic Neue", sans-serif; color: #3f3a32; }
.pm-hp { font: 700 11px/1.2 var(--mono); letter-spacing: .06em; color: #5d554a; }
.lab.choosing .sc, .lab.choosing .armed, .lab.choosing .rmat { filter: brightness(.6); }
.lab.choosing .bench.me { opacity: 0; }
@media (max-width: 620px), (max-aspect-ratio: 1/1) {
  .promote { left: 8px; right: 8px; transform: none; max-width: none; }
  .pm-row { width: 100%; gap: 6px; }
  .pm-opt { flex: 1 1 0; width: auto; min-width: 0; }
  .pm-card { width: min(78px, 22vw); }
}

/* =====================================================================================================
 * EVERYTHING THAT CAN HAPPEN, VISIBLE (text and state only; no motion): live buffs, round start, forced states
 * ===================================================================================================== */
.cardhost { container-type: inline-size; }
.chips { position: absolute; left: 28.5%; width: 47.5%; top: 2.5%; height: 4.8%; z-index: 6; display: flex; align-items: center; gap: 3px; overflow: hidden; pointer-events: none; }
/* seat chips live wholly OUTSIDE the card (owner ruling 2026-10-27): the header's air belongs to
   the name. Yours: above the card, right-aligned (the matchup badge owns the top-left corner).
   Theirs: below the card, left-aligned — above their card is the lab tools strip, and below is
   clear felt on both viewports. Same anchor family as the reveal table's chips. */
.cardhost:has(> .pc-card[data-tier="t1"][data-name]) > .chips {
  left: 0; right: 0; width: 100%; height: auto; top: auto; bottom: calc(100% + 6px); justify-content: flex-end; overflow: visible;
}
.cardhost:has(> .pc-card[data-tier="t1"][data-name]) > .chips .chip { font-size: clamp(8px, 2.1cqw, 10px); }
#foeCard.cardhost > .chips { top: calc(100% + 6px); bottom: auto; justify-content: flex-start; }
.cardhost > .chips { pointer-events: auto; }
/* on the reveal table the chips never ride the name header: they sit in a row wholly ABOVE the card, the same anchor family as the
   verb tag. A lit card (acting/recv) lifts and grows, so its chips ride one row above the verb tag line instead of under the lifted card. */
.sc > .chips { left: 0; right: auto; width: 100%; top: auto; height: auto; bottom: calc(100% + 4px); justify-content: flex-start; overflow: visible; flex-wrap: wrap-reverse; z-index: 7; }
.sc.acting > .chips, .sc.recv > .chips { bottom: calc(100% + 3.6% + 20px + 26px); }
.sc > .chips .chip { font-size: 10px; }
.chip { flex: none; display: block; padding: 1px 5px 1px 4px; font: 700 clamp(9px, 3.4cqw, 12px)/1.2 var(--mono); letter-spacing: .03em; white-space: nowrap;
  color: #14110D; background: #FBF8F3; border-left: 4px solid #6b5236; box-shadow: 0 2px 0 rgba(0,0,0,.45); }
.chip-empowered { border-left-color: #e88a1a; background: #ffe2b0; }
.chip-vulnerable { border-left-color: #b3231a; background: #f6c8c4; }
.lab-mod { align-self: center; font: 700 10px/1 var(--mono); letter-spacing: .1em; color: #14110D; background: var(--hot); padding: 4px 7px; }
.chip-weakened { border-left-color: #8a2f20; background: #f4c1b8; }
.chip-cover, .chip-guard, .chip-scout { border-left-color: #2f8f7f; background: #c4ece4; }
.chip-hype { border-left-color: #c9a400; background: #fff0a8; }
.chip-read { border-left-color: #14110D; background: #F1EADF; }
.chip-exhausted, .chip-lingering { border-left-color: #14110D; background: #d9d4cc; }
.chip-lingering { background: #cfc3e0; }
.chip-exposed { border-left-color: #b02a1a; background: #ffd0c8; }
.chip-crit { border-left-color: #c9a400; background: #ffd34d; }
.chip-more { background: #14110D; color: #fff; border-left-color: #fff; }
.sc.ko > .chips { opacity: .6; }
.sc[data-forced]::before { content: "FORCED"; position: absolute; bottom: -12px; left: 50%; transform: translateX(-50%); z-index: 4; padding: 4px 10px; background: #14110D; color: #fff;
  font: 700 12px/1 var(--mono); letter-spacing: .12em; box-shadow: 0 2px 0 #9d9382; }
.hud-n .gain { margin-left: 8px; padding: 1px 5px; font: 700 11px/1.2 var(--mono); color: #14110D; background: var(--hot); vertical-align: middle; }
.energy .hud-n .gain { display: inline-block; }
.hud.theirs .hud-n .gain { font-size: 11px; }

.lab.portrait .top .phase { max-width: calc(100% - 200px); }
/* a lock sub-label is short and never clipped (row 51: the button's width is fixed) */
.ck.primary em { text-overflow: clip; max-width: 100%; }

/* ---------- SWAP: a control in the bench's own chrome, above the open tile, never on the card (row 81) ---------- */
.swapbtn { position: fixed; z-index: 9; padding: 0 10px; display: grid; place-items: center; font: 700 12px/1 var(--mono); letter-spacing: .08em; white-space: nowrap;
  color: #14110D; background: #FBF8F3; border: 0; box-shadow: inset 0 -3px 0 #cfc6b8, 0 4px 10px rgba(0,0,0,.45); cursor: pointer;
  transition: background var(--fast, .12s) var(--ease), transform var(--fast, .12s) var(--ease); }
.swapbtn[hidden] { display: none; }
.swapbtn:hover { background: #fff; transform: translateY(-1px); }
.swapbtn.is-held, .swapbtn.is-held:hover { background: #2f8c7a; color: #fff; box-shadow: inset 0 3px 7px rgba(0,0,0,.35); transform: none; }
.swapbtn:focus-visible { outline: 2px solid var(--hot); outline-offset: 2px; }
.lab.portrait .swapbtn { font-size: 13px; }
.lab.resolving .swapbtn { display: none; }

/* ---------- a verb that cannot be paid does not look actionable (row 83): no lift, no hold, no pointer ---------- */
.pc-card.mine-face .vrow .vs-main.is-off, .pc-card.mine-face .vrow .vs-main.is-off:hover, .pc-card.mine-face .vrow .vs-main.is-off:active {
  background: repeating-linear-gradient(-45deg, rgba(20,17,13,.16) 0 4px, rgba(20,17,13,.04) 4px 9px) !important; box-shadow: none !important; cursor: not-allowed; }
.pc-card.mine-face .vrow .vs-main.is-off .pc-move-name { opacity: .5; text-decoration: line-through; text-decoration-thickness: 1px; }
.pc-card.mine-face .vrow .vs-main.is-off:focus-visible { outline: 2px dashed var(--hot); }
.bt.is-open .pc-line.pc-trick.is-off { cursor: not-allowed; opacity: .55; background: repeating-linear-gradient(-45deg, rgba(20,17,13,.14) 0 4px, rgba(20,17,13,.03) 4px 9px); }

/* ---------- seals: a locked side's card back appears in its slot; before any lock the felt is clean (row 85) ---------- */
.slot .seal { position: absolute; inset: 0; animation: sealin calc(.35s * var(--mot, 1)) var(--ease) 1; }
@keyframes sealin { from { opacity: 0; transform: translateY(8px) scale(.94); } to { opacity: 1; transform: none; } }

/* ---------- the clock: a slim muted fixture ON the mat's centre line; it names the side that has not locked (row 84) ---------- */
.mclock { position: absolute; left: 0; top: -34px; z-index: 4; transform: translate(-50%, -50%) rotate(calc(var(--ang) * -1)); display: grid; gap: 4px; justify-items: center;
  padding: 4px 8px; border-radius: 3px; background: rgba(14,11,9,.55); color: #b9b0a4; pointer-events: none; }
.mclock[hidden] { display: none; }
.mclock .mc-who { font: 700 9px/1 var(--mono); letter-spacing: .16em; white-space: nowrap; }
.mclock .mc-row { display: flex; align-items: center; gap: 6px; }
.mclock .mc-bar { display: block; width: 52px; height: 3px; background: rgba(169,161,151,.25); position: relative; overflow: hidden; }
.mclock .mc-bar::after { content: ""; position: absolute; inset: 0; background: rgba(201,191,178,.85); transform-origin: 0 50%; transform: scaleX(calc(var(--p, 100) / 100)); transition: transform 1s linear; }
.mclock b { font: 700 10px/1 var(--mono); font-variant-numeric: tabular-nums; min-width: 2ch; text-align: right; }
.mclock.danger { color: var(--danger); }
.mclock.danger .mc-bar::after { background: var(--danger); }
/* phone: the mat's centre line is horizontal and the round counter sits in the gap, so the clock rides the line to the right of it */
.lab.portrait .mclock { left: calc(var(--sw) / 2 + 52px); top: 0; }


/* =====================================================================================================
 * 261026 batch: chips vs markers, spent bench verbs, live damage figure, opponent chips at the bottom
 * ===================================================================================================== */
/* ITEM 3: the damage figure is the live per-hit estimate. Teal = more than the card's printed ~DMG (matchup / Empowered), red = less
   (matchup / Weakened). The printed figure rides the sub line ("card N") so the card's own stat stays readable. */
.vs-calc.is-up .vc-n { color: #17806f; }
.vs-calc.is-down .vc-n { color: #a8301f; }
.vs-calc.is-up .vc-n::before { content: "\25B2"; font-size: .34em; vertical-align: .9em; margin-right: .18em; }
.vs-calc.is-down .vc-n::before { content: "\25BC"; font-size: .34em; vertical-align: .9em; margin-right: .18em; }
.lab.portrait .vs-calc.is-diff .vc-sub { display: block; font-size: 9px; line-height: 1; margin-top: 1px; }
.lab.portrait .vs-calc.is-diff { flex-direction: column; justify-content: center; }

/* ITEM 2: a bench verb is once per match (engine P.benchUsed). The tile says so, open or closed: the verb line is struck and hatched,
   and the whole line stops looking pressable (owner: no USED stamp — the struck/hatched display is enough). The pup itself is still
   a valid swap, so the art stays lit. */
.bt.is-spent .pc-t0-trick, .bt.is-spent .pc-line.pc-trick .pc-ab-name, .bt.is-spent .pc-line.pc-trick .pc-ab-text { text-decoration: line-through; text-decoration-thickness: 2px; opacity: .5; }
.bt.is-spent .pc-lower { background: repeating-linear-gradient(-45deg, rgba(20,17,13,.2) 0 4px, rgba(20,17,13,.04) 4px 9px); }
.bt.is-spent .bc { position: absolute; }
.bt.is-spent.is-open .pc-line.pc-trick { box-shadow: none; }

/* ITEM 1: stage chips ride their card's TOP edge on the side away from the trap marker. YOUR marker parks top-left of the felt (next
   to your card's top-left corner), so your chips right-align; THEIR marker parks bottom-right, away from the top edge. */
.sc[data-side="A"] > .chips { left: auto; right: 0; justify-content: flex-end; }

/* ITEM 4: THEIR chips live at the bottom of their card (outside it, flush right, below the stat band), bigger. */
#foeCard.cardhost > .chips, .cardhost.foe-card > .chips {
  left: auto; right: 0; width: max(100%, 230px); top: calc(100% + 5px); height: auto; justify-content: flex-end; overflow: hidden; z-index: 7;
}
#foeCard.cardhost > .chips .chip { font-size: clamp(11px, 4.4cqw, 14px); padding: 2px 7px 2px 5px; }
.lab.portrait #foeCard.cardhost > .chips .chip { font-size: 11px; }
/* while the reveal runs the cards leave their seats and the table carries the chips (stage chips), so the seat chips step aside:
   the markers fly from their parking spots across the seats and must never cross a live chip on the way. */
.lab.resolving .cardhost > .chips { visibility: hidden; }


/* =====================================================================================================
 * MATCH END: verdict + the winning team lined up. Dim in the log panel's language; sits under the tool buttons (62) so RESET stays live.
 * ===================================================================================================== */
/* z-index 71: an open bench tile rides at 70 (.bench.me.has-open) and must not float above the verdict or eat the
   REMATCH click — the match can end while the pointer rests on a tile (caught in verification). */
.endscr { position: fixed; inset: 0; z-index: 71; display: flex; align-items: center; justify-content: center; padding: 44px 12px 12px;
  background: rgba(10, 8, 6, .95); cursor: zoom-out; opacity: 0; transition: opacity calc(.35s * var(--mot, 1)) var(--ease); }
.endscr[hidden] { display: none; }
.endscr.on { opacity: 1; }
.end-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; cursor: default; max-width: 100%;
  transform: translateY(14px); transition: transform calc(.35s * var(--mot, 1)) var(--ease); }
.endscr.on .end-inner { transform: none; }
.end-v { margin: 0; font: 700 clamp(40px, 9vw, 92px)/1 var(--mono); letter-spacing: .3em; padding-left: .3em; color: var(--ink); }
.end-v.is-win { color: var(--my); }
.end-v.is-lose { color: var(--foe); }
.end-v.is-draw { color: var(--dim); }
.end-why { max-width: min(640px, 92vw); margin: -4px 0 0; font: 700 12px/1.3 var(--mono); letter-spacing: .14em; color: var(--dim); text-align: center; }
.end-row { display: flex; align-items: flex-end; justify-content: center; gap: clamp(8px, 1.4vw, 20px); margin: 34px 0 6px; }
.end-c { flex: none; width: clamp(60px, 11vw, 170px); aspect-ratio: 1152 / 1600; container-type: inline-size; position: relative; cursor: pointer; }
.end-c > .pc-card { position: absolute; inset: 0; width: 100%; height: 100%; box-shadow: 0 14px 30px rgba(0,0,0,.6); }
.end-c.lead { width: clamp(100px, 19vw, 300px); transform: translateY(-20px); z-index: 2; }
.end-c.lead > .pc-card { box-shadow: 0 0 0 4px var(--hot), 0 26px 44px rgba(0,0,0,.65); }
.end-v.is-win ~ .end-row .end-c.lead > .pc-card { box-shadow: 0 0 0 4px var(--my), 0 26px 44px rgba(0,0,0,.65); }
.end-v.is-lose ~ .end-row .end-c.lead > .pc-card { box-shadow: 0 0 0 4px var(--foe), 0 26px 44px rgba(0,0,0,.65); }
.end-c.ko > .pc-card { opacity: .45; filter: grayscale(1); }
.end-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.end-again { appearance: none; border: 0; cursor: pointer; padding: 12px 28px; background: #F1EADF; color: #14110D; box-shadow: 0 3px 0 rgba(0,0,0,.45);
  font: 700 14px/1 var(--mono); letter-spacing: .24em; }
.end-again.ghost { background: transparent; color: #F1EADF; box-shadow: inset 0 0 0 2px rgba(241,234,223,.55); }
.end-again:hover { background: #fff; }
.end-again.ghost:hover { background: rgba(241,234,223,.16); }
.end-again:focus-visible { outline: 2px solid var(--hot); outline-offset: 3px; }
.end-note { margin: 0; font: 700 10px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); opacity: .7; }
@media (max-width: 700px) {
  /* one row, any roster: n-1 small cards + one lead 2.3x as wide share the width (--n set from the roster) */
  .end-row { --eu: calc((100vw - 24px - (var(--n, 5) - 1) * 5px) / (var(--n, 5) + 1.8)); gap: 5px; }
  .end-c { width: min(var(--eu), 90px); }
  .end-c.lead { width: min(calc(var(--eu) * 2.8), 190px); transform: translateY(-14px); }
  .end-v { letter-spacing: .2em; padding-left: .2em; }
}

/* ---------- attack ladder marks (P1 round 2): moving marks only, transform + opacity ---------- */
.sc.flying { z-index: 5; }
.sc.flying::after, .sc.flying::before, .sc.flying > .chips { opacity: 0; transition: none; }   /* tag + chips rejoin when the card is home */
.sc.struck { z-index: 4; }
.fx-dim { position: absolute; inset: -20%; z-index: 2; background: #05070a; opacity: 0; pointer-events: none; }
.fx-burst { position: absolute; z-index: 11; pointer-events: none; opacity: 0; border-radius: 50%;
  background: repeating-conic-gradient(from 3deg, rgba(255,244,214,.95) 0 1.4deg, transparent 1.4deg 6deg);
  -webkit-mask-image: radial-gradient(circle, transparent 16%, #000 28%, #000 52%, transparent 70%); mask-image: radial-gradient(circle, transparent 16%, #000 28%, #000 52%, transparent 70%); }

/* ---------- P2-P5 beats (anim-ref/MEASUREMENTS.md "P2-P5 anchors"): transform + opacity only ---------- */
/* printed tags are STAMPED: they land from 1.7x, tilted, and settle (C5/C11/C12 70-160ms; C13 hard: 75ms, no anticipation) */
.sc.acting::after, .sc.recv::after { transform-origin: 0 100%; animation: tagstamp calc(.16s * var(--mot, 1)) cubic-bezier(.2, 1.5, .4, 1) 1 both; }
.sc[data-stamp="hard"]::after { animation: tagslam calc(.075s * var(--mot, 1)) linear 1 both; background: #14110D !important; color: #fff; }
@keyframes tagstamp { from { opacity: 0; transform: scale(1.7) rotate(-6deg); } to { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes tagslam { from { opacity: 0; transform: scale(2.2); } to { opacity: 1; transform: scale(1); } }
.sc.snapin { transition: transform calc(.16s * var(--mot, 1)) cubic-bezier(.1, .9, .2, 1), opacity calc(.4s * var(--mot, 1)) var(--ease); }       /* C7/C8: the trap snaps to the strike line */
.sc.snaptravel { transition: transform calc(.3s * var(--mot, 1)) cubic-bezier(.2, 1.25, .35, 1), opacity calc(.4s * var(--mot, 1)) var(--ease); }     /* D2: one overshooting snap into the empty seat */
.fx-ring { position: absolute; z-index: 12; pointer-events: none; border: 4px solid #fff; border-radius: 6px; opacity: 0; }
.fx-mark { position: absolute; z-index: 13; pointer-events: none; padding: 8px 16px; white-space: nowrap; font: 700 clamp(15px, 1.5vw, 20px)/1 var(--mono); letter-spacing: .14em;
  background: #8fe6da; color: #14110D; box-shadow: 0 6px 14px rgba(0,0,0,.5); transform: translate(-50%, -50%); }
.fx-mark.hex { background: #14110D; color: #ff8a76; box-shadow: 0 0 0 2px #ff8a76, 0 6px 14px rgba(0,0,0,.5); }
.fx-bw { position: absolute; inset: 0; z-index: 8; pointer-events: none; opacity: 0; background: rgba(255,255,255,.22);
  -webkit-backdrop-filter: grayscale(1) contrast(1.7) brightness(1.15); backdrop-filter: grayscale(1) contrast(1.7) brightness(1.15); }   /* static filter; only opacity animates */
/* D1: the KO stamp lives on .sc (outside the fading .sc-in) */
.ko-stamp { position: absolute; left: 50%; top: 46%; z-index: 9; transform: translate(-50%, -50%) rotate(-13deg); pointer-events: none;
  font: 900 74cqw/1 var(--mono); letter-spacing: -.04em; color: #ff4a36; padding: 0 .08em; border: 7cqw solid #ff4a36; border-radius: 3cqw;
  background: rgba(20,8,6,.55); text-shadow: 0 .02em 0 #000; box-shadow: 0 10px 28px rgba(0,0,0,.65); }
.sc.ko .sc-in { transition-duration: calc(.55s * var(--mot, 1)); }
/* A1 seal: lands from above with weight, one squash, settles (110 + 55 hold + 215) */
@keyframes sealin { 0% { opacity: 0; transform: translateY(-34px) scale(1.55) rotate(-7deg); } 30% { opacity: 1; transform: translateY(0) scale(.93) rotate(1deg); } 42% { transform: scale(.93); } 62% { transform: scale(1.03); } 100% { opacity: 1; transform: none; } }
.slot .seal { animation: sealin calc(.38s * var(--mot, 1)) cubic-bezier(.4, 0, .6, 1) 1; }
/* D5 round verdict prints as ink: wide-set type tightens onto the line */
.say.verdict { animation: verdictin calc(.555s * var(--mot, 1)) cubic-bezier(.2, .9, .3, 1) 1 both; }
@keyframes verdictin { from { opacity: 0; letter-spacing: .32em; transform: translate(-50%, -50%) scale(1.18); } to { opacity: 1; letter-spacing: inherit; transform: translate(-50%, -50%) scale(1); } }
/* D6 match end: the word stamps with gavel weight; the whole lineup settles flat at once */
.endscr.on .end-v { animation: endstamp calc(.16s * var(--mot, 1)) cubic-bezier(.5, 0, .9, .6) 1 both; }
@keyframes endstamp { 0% { opacity: 0; scale: 2.8; rotate: -5deg; } 70% { opacity: 1; scale: .94; rotate: 0deg; } 100% { opacity: 1; scale: 1; rotate: 0deg; } }
.endscr.on .end-c { animation: endsettle calc(.26s * var(--mot, 1)) cubic-bezier(.2, .8, .3, 1) 1 both; }
@keyframes endsettle { from { opacity: 0; translate: 0 -46px; scale: 1.14; } to { opacity: 1; translate: 0 0; scale: 1; } }
@media (prefers-reduced-motion: reduce) {
  .sc.acting::after, .sc.recv::after, .sc[data-stamp="hard"]::after, .slot .seal, .say.verdict, .endscr.on .end-v, .endscr.on .end-c { animation: none; }
  .sc.snapin, .sc.snaptravel { transition: none; }
  .sc.ko .sc-in { transition-duration: 0s; }
}


/* =====================================================================================================
 * BLIND SETUP: the first choice of the game (lead + trap). Same dim, same type, same two buttons as the match end;
 * teal = mine (the lead), orange = the one accent (the trap). z 72: above the tools, the table and the end screen.
 * ===================================================================================================== */
.setupscr { position: fixed; inset: 0; z-index: 72; display: flex; align-items: center; justify-content: center; padding: 20px 12px 12px; overflow-y: auto;
  background: #0a0806; opacity: 0; transition: opacity calc(.35s * var(--mot, 1)) var(--ease); }
.setupscr[hidden] { display: none; }
.setupscr.on { opacity: 1; }
.su-inner { display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 100%; margin: auto 0;
  transform: translateY(14px); transition: transform calc(.35s * var(--mot, 1)) var(--ease); }
.setupscr.on .su-inner { transform: none; }
.su-k { margin: 0; font: 700 11px/1 var(--mono); letter-spacing: .3em; padding-left: .3em; color: var(--hot); }
.su-v { margin: 0; font: 700 clamp(30px, 5.4vw, 64px)/1 var(--mono); letter-spacing: .24em; padding-left: .24em; color: var(--ink); text-align: center; }
.su-sub { max-width: min(640px, 92vw); text-wrap: balance; margin: 0; font: 700 12px/1.45 var(--mono); letter-spacing: .06em; color: var(--dim); text-align: center; }
.su-row { --gp: clamp(8px, 1.4vw, 20px); display: flex; align-items: flex-start; justify-content: center; gap: var(--gp); margin: 22px 0 4px; }
.su-m { flex: none; width: clamp(80px, 12.5vw, 190px); display: grid; gap: 6px; transition: transform calc(.18s * var(--mot, 1)) var(--ease); }
.su-c { position: relative; width: 100%; aspect-ratio: 1152 / 1600; container-type: inline-size; cursor: zoom-in; }
.su-c > .pc-card { position: absolute; inset: 0; width: 100%; height: 100%; box-shadow: 0 14px 30px rgba(0,0,0,.6); transition: box-shadow calc(.18s * var(--mot, 1)) var(--ease); }
.su-m.is-lead { transform: translateY(-14px); }
.su-m.is-lead .su-c { outline: 4px solid var(--my); outline-offset: 5px; }
.su-m.is-lead .su-c > .pc-card { box-shadow: 0 26px 44px rgba(0,0,0,.65); }
.su-m.is-trap .su-c { outline: 4px solid var(--hot); outline-offset: 5px; }
.su-m.is-trap .su-c > .pc-card { filter: brightness(.55) saturate(.6); }          /* face-down: waiting, dimmed */
.su-b { appearance: none; border: 0; border-radius: 0; cursor: pointer; min-height: 34px; padding: 0 6px; font: 700 11px/1 var(--mono); letter-spacing: .2em; padding-left: calc(6px + .2em);
  color: #F1EADF; background: transparent; box-shadow: inset 0 0 0 2px rgba(241,234,223,.45); }
.su-b:hover:not(:disabled) { background: rgba(241,234,223,.16); }
.su-b:disabled { cursor: default; color: #6c655b; box-shadow: inset 0 0 0 2px #3a332b; background: repeating-linear-gradient(-45deg, #1a1713 0 4px, #14120f 4px 8px); }
.su-b.su-l[aria-pressed="true"], .su-b.su-l[aria-pressed="true"]:hover { background: var(--my); color: #06201c; box-shadow: none; }
.su-b.su-t[aria-pressed="true"], .su-b.su-t[aria-pressed="true"]:hover { background: var(--hot); color: #16120d; box-shadow: none; }
.su-b:focus-visible, .su-actions .end-again:focus-visible { outline: 2px solid var(--hot); outline-offset: 3px; }
.su-msg { min-height: 2.9em; max-width: min(700px, 92vw); text-wrap: balance; margin: 4px 0 0; font: 700 12px/1.45 var(--mono); letter-spacing: .1em; color: var(--ink); text-align: center; text-transform: uppercase; }
.su-actions .end-again.on, .su-actions .end-again[aria-pressed="true"] { background: var(--hot); color: #16120d; box-shadow: 0 3px 0 rgba(0,0,0,.45); }
.su-actions .end-again:disabled { cursor: default; color: #b4ab9f; background: repeating-linear-gradient(-45deg, #2b2620 0 4px, #231f1a 4px 8px); box-shadow: none; }
/* arrival: the cards deal in one after another (motion only; the reduced path simply appears) */
.setupscr.on:not(.rm) .su-m { animation: su-in calc(.32s * var(--mot, 1)) var(--ease) backwards; animation-delay: calc(var(--i, 0) * .05s * var(--mot, 1) + .12s); }
@keyframes su-in { from { opacity: 0; transform: translateY(18px); } }
.setupscr.rm, .setupscr.rm * { transition: none !important; animation: none !important; }
@media (max-width: 700px) {
  .su-row { --eu: calc((100vw - 24px - (var(--n, 5) - 1) * 5px) / var(--n, 5)); gap: 5px; margin-top: 14px; }
  .su-m { width: min(var(--eu), 110px); gap: 5px; }
  .su-b { min-height: 38px; font-size: 9px; letter-spacing: .08em; padding: 0 2px; }
  .su-v { letter-spacing: .14em; padding-left: .14em; }
  .su-sub, .su-msg { font-size: 11px; }
  .su-actions { flex-wrap: wrap; }
  .su-actions .end-again { padding: 12px 18px; }
}
@media (prefers-reduced-motion: reduce) { .setupscr, .setupscr * { transition: none !important; animation: none !important; } }

/* ---------- one page: the start screen (picker.css / picker.js) sits over the table ----------
 * While it is up the table is only hidden (visibility keeps its layout measured) and inert. */
body.is-menu .lab { visibility: hidden; }
@media (max-width: 700px) {
  .end-actions { gap: 10px; }
  .end-actions .end-again { padding: 12px 16px; letter-spacing: .16em; }
}

/* ---------- hotseat (?mode=hotseat): whose move it is, and the privacy curtain ---------- */
.hsbadge { flex: none; padding: 5px 9px 4px; font: 700 11px/1 var(--mono); letter-spacing: .14em; white-space: nowrap; color: #14110D; background: var(--ink); }
.hsbadge[hidden] { display: none; }
.hsbadge.p1 { background: var(--my); }
.hsbadge.p2 { background: var(--hot); }
/* a band along the top edge in the holder's colour: readable from across the table, and gone in the shared reveal */
.lab[data-hs="p1"]::after, .lab[data-hs="p2"]::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; z-index: 70; pointer-events: none; }
.lab[data-hs="p1"]::after { background: var(--my); }
.lab[data-hs="p2"]::after { background: var(--hot); }
/* lab-only tools have no place in a two-player match */
body.hs-mode #statesBtn, body.hs-mode #states, body.hs-mode #reset, body.hs-mode #newteams, body.hs-mode #endFresh { display: none !important; }
body.hs-mode .lab.portrait .top .vs { display: none; }

.curtain { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 24px; text-align: center; color: var(--ink);
  background: radial-gradient(900px 620px at 50% 38%, #2a231c 0%, transparent 70%), repeating-linear-gradient(135deg, rgba(255,255,255,.015) 0 2px, transparent 2px 6px), #0b0a08; }
.curtain[hidden] { display: none; }
.curtain[data-p="1"] { --cu: var(--my); }
.curtain[data-p="2"] { --cu: var(--hot); }
.cu-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: min(760px, 94vw); }
.cu-k { margin: 0; font: 700 11px/1.3 var(--mono); letter-spacing: .3em; color: var(--hot); }
.cu-t { margin: 0; font: 700 clamp(24px, 5vw, 60px)/1.05 var(--mono); letter-spacing: .2em; padding-left: .2em; }
.cu-p { margin: 0; font: 700 clamp(38px, 9vw, 116px)/1 var(--mono); letter-spacing: .12em; padding-left: .12em; color: var(--cu, var(--ink)); }
.cu-s { margin: 0; max-width: 34em; font: 400 clamp(15px, 1.7vw, 20px)/1.4 "Comic Neue", system-ui, sans-serif; color: var(--dim); }
.cu-go { margin-top: 20px; display: grid; justify-items: center; gap: 6px; min-width: min(440px, 88vw); min-height: 76px; padding: 0 22px; border: 0; border-radius: 0; cursor: pointer;
  font: 700 clamp(18px, 2.2vw, 24px)/1 var(--mono); letter-spacing: .16em; color: #16120d; background: var(--hot); box-shadow: 0 5px 0 #a8590a; align-content: center; }
.cu-go em { font: 700 11px/1.2 var(--mono); font-style: normal; letter-spacing: .06em; text-transform: none; color: #3a2204; }
.cu-go:hover:not(:disabled) { background: #ffa83a; }
.cu-go:disabled { cursor: default; color: #b4ab9f; background: repeating-linear-gradient(-45deg, #2b2620 0 4px, #231f1a 4px 8px); box-shadow: none; }
.cu-go:disabled em { color: #a9a197; }
.cu-go:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.cu-n { margin: 8px 0 0; font: 700 10px/1 var(--mono); letter-spacing: .24em; text-transform: uppercase; color: #7d756a; }
.curtain[data-kind="reveal"] .cu-p { color: var(--ink); }
body.hs-mode .lab.portrait .top .hsbadge { order: 3; align-self: flex-end; height: 20px; display: flex; align-items: center; padding: 0 7px; font-size: 10px; letter-spacing: .1em; }
body.hs-mode .lab.portrait .top .instr { order: 4; flex: 1 1 0; min-width: 0; margin-left: 8px; }
body.hs-mode .lab.portrait .top .phase { flex: 0 0 100%; max-width: none; }   /* row 1 is the tools row's; the badge + hint share row 2 */

/* =====================================================================================================
 * SUDDEN DEATH overlay (z 76: above promote 75 / setup 72, below inspect 100 and the hotseat curtain 400).
 * Structure and behaviour first; the skin is provisional. Every transition has a JS instant path under MOTION.reduced().
 * ===================================================================================================== */
.sd { position: fixed; inset: 0; z-index: 76; display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 16px 12px 12px;
  background: radial-gradient(1000px 640px at 50% 30%, rgba(60,24,16,.55) 0%, transparent 70%), repeating-linear-gradient(135deg, rgba(255,255,255,.015) 0 2px, transparent 2px 6px), rgba(12,10,8,.965);
  --who: var(--hot); }
.sd[hidden] { display: none; }
.sd[data-p="1"] { --who: var(--my); }
.sd[data-p="2"] { --who: var(--hot); }
.sd-inner { width: min(980px, 100%); margin: auto; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.sd-k { margin: 0; font: 700 11px/1.3 var(--mono); letter-spacing: .3em; color: var(--who); text-transform: uppercase; }
.sd-t1 { margin: 0; font: 700 clamp(18px, 2.6vw, 30px)/1.12 "Comic Neue", system-ui, sans-serif; color: var(--ink); }
.sd-t2 { margin: 0; font: 400 clamp(15px, 1.7vw, 20px)/1.3 "Comic Neue", system-ui, sans-serif; color: var(--dim); }
.sd[data-stage="title"] .sd-inner { gap: 14px; }
.sd[data-stage="title"] .sd-t1 { font: 700 clamp(34px, 9vw, 112px)/1 var(--mono); letter-spacing: .14em; padding-left: .14em; color: var(--foe); text-shadow: 0 0 40px rgba(217,80,58,.35); }
.sd[data-stage="title"] .sd-t2 { font-size: clamp(18px, 2.6vw, 30px); color: var(--ink); }
.sd[data-stage="title"] .sd-inner { min-height: 60vh; justify-content: center; }
.sd-board { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 4px; font: 700 12px/1 var(--mono); letter-spacing: .14em; }
.sd-board[hidden], .sd-seed[hidden] { display: none; }
.sd-side { display: flex; align-items: center; gap: 10px; }
.sd-me .sd-who { color: var(--my); } .sd-foe .sd-who { color: var(--foe); }
.sd-pips { display: inline-flex; gap: 6px; }
.sd-pip { display: block; width: 16px; height: 16px; transform: rotate(45deg); border: 2px solid var(--dim); background: transparent; }
.sd-me .sd-pip.on { background: var(--my); border-color: var(--my); } .sd-foe .sd-pip.on { background: var(--foe); border-color: var(--foe); }
.sd-dash { color: var(--dim); }
.sd-seed { margin: 0; font: 400 clamp(14px, 1.5vw, 17px)/1.3 "Comic Neue", system-ui, sans-serif; color: var(--hot); }
.sd-body { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 6px; }

/* the hand: your team (draft) or your squad (clash) */
.sd-hand { --sdw: clamp(84px, min(13vw, 24vh), 190px); display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(8px, 1.2vw, 16px); transition: opacity .25s, transform .25s; }
.sd-hand.gone { opacity: 0; transform: translateY(14px); pointer-events: none; height: 0; overflow: hidden; margin-top: -14px; }
.sd-tile { position: relative; width: var(--sdw); display: grid; gap: 6px; justify-items: center; align-content: start; padding: 8px 6px 8px; cursor: pointer; border: 0; color: #14110D;
  background: #F1EADF; box-shadow: 0 3px 0 #9d9382; font-family: inherit; min-height: 44px; }
.sd-tile:hover:not(:disabled), .sd-tile:focus-visible { background: #FBF8F3; outline: 3px solid var(--hot); outline-offset: 2px; }
.sd-tile.on { background: #fff; outline: 4px solid var(--who); outline-offset: 2px; transform: translateY(-4px); }
.sd-tile.full:not(.on) { opacity: .55; cursor: default; }
.sd-tile:disabled { cursor: default; }
.sd-card { position: relative; display: block; width: 100%; aspect-ratio: 1152 / 1600; container-type: inline-size; }
.sd-card > .pc-card { position: absolute; inset: 0; width: 100%; height: 100%; box-shadow: 0 6px 14px rgba(0,0,0,.4); }
.sd-tile.ko .sd-card > .pc-card { opacity: .5; filter: grayscale(1); }
.sd-cap { display: grid; gap: 1px; width: 100%; }
.sd-nm { font: 700 13px/1.15 "Comic Neue", sans-serif; overflow-wrap: anywhere; }
.sd-el { font: 700 10px/1.2 var(--mono); letter-spacing: .08em; color: #5d554a; }
.sd-tile.ko .sd-el { color: #a8321f; }
.sd-kb { position: absolute; left: 4px; top: 4px; z-index: 2; min-width: 22px; height: 22px; display: grid; place-items: center; font: 700 13px/1 var(--mono); color: #fff; background: #14110D; }
.sd-tick { position: absolute; right: 4px; top: 4px; z-index: 2; min-width: 22px; height: 22px; display: grid; place-items: center; font: 700 12px/1 var(--mono); font-style: normal; color: transparent; background: transparent; }
.sd-tile.on .sd-tick { color: #14110D; background: var(--who); }

/* the arena: two slots, the verdict between */
.sd-arena { --rw: clamp(96px, min(16vw, 25vh), 190px); display: grid; grid-template-columns: var(--rw) minmax(150px, 230px) var(--rw); align-items: center; justify-content: center; gap: clamp(8px, 2vw, 28px); }
.sd-slot { display: grid; gap: 6px; justify-items: center; }
.sd-slot-l { font: 700 11px/1 var(--mono); letter-spacing: .2em; color: var(--dim); }
.sd-slot[data-side="A"] .sd-slot-l { color: var(--my); } .sd-slot[data-side="B"] .sd-slot-l { color: var(--foe); }
.sd-flip { width: var(--rw); aspect-ratio: 1152 / 1600; position: relative; perspective: 1000px; container-type: inline-size; }
.sd-flip::before { content: ""; position: absolute; inset: 0; border: 2px dashed var(--line); }
.sd-rot { position: absolute; inset: 0; transform-style: preserve-3d; }
.sd-rot > .cback, .sd-rot > .pc-card { position: absolute; inset: 0; width: 100%; height: 100%; backface-visibility: hidden; }
.sd-slot.win .sd-flip { filter: drop-shadow(0 0 14px rgba(247,147,26,.7)); } .sd-slot.win .sd-rot { outline: 4px solid var(--hot); outline-offset: 2px; }
.sd-slot.lose .sd-rot { opacity: .55; filter: grayscale(.7); }
.sd-vd { display: grid; gap: 6px; justify-items: center; min-height: 90px; align-content: center; }
.sd-vd-w { font: 700 clamp(20px, 3vw, 34px)/1 var(--mono); letter-spacing: .1em; color: var(--ink); }
.sd-vd[data-kind="replay"] .sd-vd-w { color: var(--dim); font-size: clamp(16px, 2vw, 22px); }
.sd-vd-s { font: 400 clamp(14px, 1.5vw, 18px)/1.2 "Comic Neue", system-ui, sans-serif; color: var(--dim); }
.sd-vd-sc { font: 700 clamp(15px, 1.6vw, 18px)/1.2 "Comic Neue", system-ui, sans-serif; font-style: normal; color: var(--hot); }
.sd-arrow { font: 400 clamp(34px, 5vw, 60px)/1 var(--mono); font-style: normal; color: var(--hot); }
.sd-coin { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; font: 700 24px/1 var(--mono); font-style: normal; color: #3a2204; background: radial-gradient(circle at 35% 30%, #ffd37a, var(--hot) 70%); box-shadow: 0 4px 0 #a8590a; }
.sd-note { margin: 0; min-height: 1.3em; font: 400 clamp(14px, 1.5vw, 17px)/1.3 "Comic Neue", system-ui, sans-serif; color: var(--hot); }
.sd-actions { display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 48px; }
.sd-count { font: 700 13px/1 var(--mono); letter-spacing: .12em; color: var(--dim); }
.sd-go { min-height: 44px; }
.sd-go[hidden] { display: none; }
.sd-go:disabled { opacity: .4; cursor: default; }
.sd-go:focus-visible { outline: 3px solid var(--hot); outline-offset: 3px; }
@media (max-width: 620px), (max-aspect-ratio: 1/1) {
  .sd-hand { --sdw: min(29vw, 24vh, 150px); gap: 8px; }
  .sd-arena { --rw: min(38vw, 28vh); grid-template-columns: var(--rw) var(--rw); grid-template-areas: "a b" "v v"; gap: 8px 12px; }
  .sd-arena > .sd-slot[data-side="A"] { grid-area: a; } .sd-arena > .sd-slot[data-side="B"] { grid-area: b; } .sd-arena > .sd-vd { grid-area: v; min-height: 70px; }
  .sd-vd[data-kind="wheel"] { grid-template-columns: auto auto; column-gap: 10px; }
  .sd-vd[data-kind="wheel"] .sd-vd-s, .sd-vd[data-kind="wheel"] .sd-vd-sc { grid-column: 1 / -1; }
}
.curtain[data-kind="sdreveal"] .cu-p { color: var(--ink); }

.sd-squad { --sdw: clamp(80px, min(10vw, 16vh), 130px); }
body.sd-open .audiohint { display: none !important; }
@media (max-width: 620px), (max-aspect-ratio: 1/1) {
  .sd-arena { --rw: min(30vw, 21vh); }
  .sd-squad { --sdw: min(27vw, 17vh, 120px); }
}
