/* Game Room look: the graphics plan (docs/graphics-plan.md). Loaded after style.css and overrides it.
   Clean "family premium" table: textured felt, spotlight, wood rails, seat plates, motion, 3D dice,
   celebrations. The cards themselves (Bicycle-style faces and back) are untouched.
   --spd: animation speed (1 normal, .55 fast; set by fx.js from the menu). */
:root { --spd: 1; --felt-hi: #23794f; --felt-lo: #0d3826;
  /* Theme tokens (the table Theme setting, bottom of this file). These are the Classic values; a scene overrides them
     on html[data-theme="..."]. Colours only: a theme never changes a size, so nothing moves when it is switched. */
  --rail-solid: #5c3a20; --bg-solid: #0b2c1e; --panel-rgb: 9 40 27; --panel-solid: #183f2d; --on-gold: #1b1433;
  --root-bg: radial-gradient(900px 500px at 50% 0%, #1c5a3e 0%, transparent 70%), linear-gradient(180deg, #12402c, #0b2c1e);
}

/* Cloth texture: a tiny noise pattern drawn by the browser (no image files). */
:root {
  --cloth: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
  --wood: repeating-linear-gradient(100deg, #6e4627 0 7px, #5c3a20 7px 12px, #7d5331 12px 15px, #5a381f 15px 22px);
}
/* The felt is its own layer behind the page, pinned to the top and as tall as the phone's FULL screen (100lvh). It used to be
   the body's background with background-attachment: fixed, which is sized to the visible screen: every time a phone's address
   bar slid in or out the felt and its spotlight rescaled, so the table seemed to move under the cards (Stephen, 2026-11-17).
   Same rule for the theme pictures (.gr-bd, below) and House Rules (room.css). Never size a backdrop with inset: 0,
   100dvh or background-attachment: fixed. */
body { background: var(--felt-lo); }
body::before {
  content: ''; position: fixed; left: 0; top: 0; width: 100%; height: 100vh; height: 100lvh; z-index: -1; pointer-events: none;
  background: var(--cloth), radial-gradient(130% 90% at 50% 18%, var(--felt-hi) 0%, #155a3a 38%, var(--felt-lo) 100%);
}
html[data-theme] body::before, body.gr-home::before, body.tv:has(.tv-picker)::before { display: none; }
.ph-top { background: linear-gradient(180deg, rgb(var(--panel-rgb) / .96) 70%, transparent); }

/* ---------- tables: felt inside a wood rail ---------- */
.felt, .oval {
  border: 12px solid transparent;
  background: var(--cloth) padding-box, radial-gradient(circle at 50% 42%, #24814f, #155b3a 55%, #0d3826 100%) padding-box, var(--wood) border-box;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, .55), 0 10px 26px rgba(0, 0, 0, .45);
}
.oval { border-width: 14px; }

/* ---------- seat plates: avatar, name plate, badge, a glowing ring for whose turn it is ---------- */
.seat .face, .pseat .face {
  display: inline-block; padding: 3px; border-radius: 32%; background: rgba(0, 0, 0, .35);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .22), 0 3px 8px rgba(0, 0, 0, .4);
}
.seat .nm { background: rgba(0, 0, 0, .55); padding: 2px 12px; border-radius: 999px; margin-top: 2px; }
.seat .sub { font-size: 12px; }
/* Smooth glow pulse (2026-11-07, tools/check-motion.js): the glow sits still and a second, wider glow fades in and out on
   top. Only opacity moves, so the graphics chip runs it; pulsing the box-shadow itself repainted the screen every frame. */
.seat.up .face, .pseat.up .face { position: relative; box-shadow: 0 0 0 3px var(--gold), 0 0 18px 4px rgba(255, 207, 74, .6); }
.seat.up .face::after, .pseat.up .face::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: 0 0 26px 8px rgba(255, 207, 74, .4); opacity: 0; will-change: opacity; animation: glowPulse 1.6s ease-in-out infinite; }
@keyframes glowPulse { 50% { opacity: 1; } }
.pseat.up { box-shadow: none; }
.seat.up .nm, .pseat.up .nm { color: var(--on-gold); background: var(--gold); border-radius: 999px; padding: 1px 10px; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; background: rgba(0, 0, 0, .45); font-size: 12px; color: var(--ink); }
.badge .cb { width: 10px; height: 14px; border-radius: 2px; background: #b3242f; box-shadow: inset 0 0 0 1.5px #fff; }

/* ---------- the trick: each card lands in front of whoever played it ---------- */
.trick.cross { position: relative; display: block; width: 210px; height: 200px; margin: 6px auto; min-height: 0; }
.trick.cross .played { position: absolute; display: grid; justify-items: center; gap: 2px; }
.trick.cross .card { --w: 58px; }
.trick.cross .at-south { left: calc(50% - 29px); bottom: 0; }
.trick.cross .at-north { left: calc(50% - 29px); top: 0; }
.trick.cross .at-west { left: 4px; top: calc(50% - 50px); }
.trick.cross .at-east { right: 4px; top: calc(50% - 50px); }
.trick.cross .by { font-size: 11px; color: var(--mute); }
.trick.cross.big { width: 360px; height: 330px; }
.trick.cross.big .card { --w: 92px; }
.trick.cross.big .at-south, .trick.cross.big .at-north { left: calc(50% - 46px); }
.trick.cross.big .at-west, .trick.cross.big .at-east { top: calc(50% - 76px); }
.tv-size .trick.cross.big { width: 440px; height: 400px; }
.tv-size .trick.cross.big .card { --w: 110px; }
.tv-size .trick.cross.big .at-south, .tv-size .trick.cross.big .at-north { left: calc(50% - 55px); }
.tv-size .trick.cross.big .at-west, .tv-size .trick.cross.big .at-east { top: calc(50% - 90px); }
.trick.cross.empty { display: grid; place-items: center; height: 120px; }
.felt .center .trick.cross { margin: 0; }

/* ---------- motion ---------- */
.fly-in { animation: flyIn calc(.38s * var(--spd)) cubic-bezier(.2, .8, .25, 1) both; animation-delay: calc(var(--fi, 0) * .045s * var(--spd)); }
@keyframes flyIn { from { transform: translate(var(--fx, 0), var(--fy, -200px)) rotate(-14deg) scale(.8); opacity: .15; } to { transform: none; opacity: 1; } }
/* A finished trick sits a moment, then sweeps off to whoever won it. */
.sweep { animation: sweep calc(.42s * var(--spd)) ease-in calc(.8s * var(--spd)) forwards; }
@keyframes sweep { to { transform: translate(var(--tx, 0), var(--ty, 0)) scale(.45); opacity: 0; } }
.pop-in { animation: popIn calc(.3s * var(--spd)) cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes popIn { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- the hand: one gentle arc along the bottom (13-card games) ---------- */
.hand.arc { position: relative; display: block; height: calc(var(--w) * 1.453 + 46px); margin: 6px 0 4px; --w: 76px;
  --step: min(28px, calc((min(100vw, 560px) - 104px - var(--w)) / (var(--n) - 1))); }
.hand.arc .card {
  --w: inherit; position: absolute; top: 26px; cursor: pointer; transform-origin: 50% 120%;
  left: calc(50% - var(--w) / 2 + var(--k) * var(--step));
  transform: translateY(var(--dy)) rotate(var(--rot));
  transition: transform calc(.14s * var(--spd));
  touch-action: none;
}
.hand.arc .card.picked, .hand.arc .card.lifted { transform: translateY(calc(var(--dy) - 26px)) rotate(var(--rot)); z-index: 30;
  box-shadow: 0 0 0 3px var(--gold), 0 10px 16px rgba(0, 0, 0, .45); }
.hand.arc .card.deal-in { animation: dealIn calc(.34s * var(--spd)) cubic-bezier(.2, .8, .25, 1) both; animation-delay: calc(var(--fi) * .035s * var(--spd)); }
@keyframes dealIn { from { transform: translate(0, -260px) rotate(30deg) scale(.6); opacity: 0; } }
.hand-tools { display: flex; justify-content: center; gap: 8px; margin-top: -4px; }
.hand-tools .chip { min-height: 32px; padding: 4px 12px; font-size: 13px; }
.swipe-hint { text-align: center; color: var(--mute); font-size: 12px; }

/* ---------- 3D dice (cards.js GR.die3d) ---------- */
.d3 { --s: 56px; width: var(--s); height: var(--s); perspective: 420px; display: inline-block; position: relative; flex: none; }
.d3::after { content: ''; position: absolute; left: 10%; right: 10%; bottom: -10%; height: 16%; border-radius: 50%; background: rgba(0, 0, 0, .35); filter: blur(4px); z-index: -1; }
.d3 .cube { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: transform calc(.25s * var(--spd)); }
.d3 .f {
  position: absolute; inset: 0; border-radius: 20%; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); padding: calc(var(--s) * .15);
  background: radial-gradient(circle at 32% 26%, #ffffff 0%, #f6f2ea 45%, #ddd5c6 100%);
  box-shadow: inset 0 0 calc(var(--s) * .08) rgba(0, 0, 0, .28), inset 0 calc(var(--s) * -.05) 0 rgba(0, 0, 0, .08);
  backface-visibility: hidden;
}
.d3 .f i { display: grid; place-items: center; }
.d3 .f i.pip::after { content: ''; width: 74%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #3a3a44, #0e0e12); box-shadow: inset 0 1px 1px rgba(0, 0, 0, .6); }
.d3 .f1 { transform: translateZ(calc(var(--s) / 2)); }
.d3 .f6 { transform: rotateY(180deg) translateZ(calc(var(--s) / 2)); }
.d3 .f3 { transform: rotateY(90deg) translateZ(calc(var(--s) / 2)); }
.d3 .f4 { transform: rotateY(-90deg) translateZ(calc(var(--s) / 2)); }
.d3 .f2 { transform: rotateX(90deg) translateZ(calc(var(--s) / 2)); }
.d3 .f5 { transform: rotateX(-90deg) translateZ(calc(var(--s) / 2)); }
.d3.blank .f { background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25); }
.d3.blank .f i.pip::after { display: none; }
/* The tumble spins a wrapper around the cube (the cube itself stays turned to the face it lands on). The keyframes are plain
   numbers, no CSS variables, so the phone's or TV's graphics chip runs them on its own: a busy moment (a redraw, a sound
   loading) can't make the dice stutter or stop (Stephen, 2026-11-06). */
.d3 .tumbler { position: absolute; inset: 0; transform-style: preserve-3d; }
.d3.tumble .tumbler { will-change: transform; animation: roll3d calc(1s * var(--spd)) cubic-bezier(.15, .7, .3, 1) both; animation-delay: calc(var(--di, 0) * .06s); }
@keyframes roll3d {
  0% { transform: translateY(-90px) rotateX(810deg) rotateY(-630deg) rotateZ(160deg); }
  62% { transform: translateY(6px) rotateX(24deg) rotateY(-12deg) rotateZ(4deg); }
  80% { transform: translateY(-5px) rotateX(-6deg) rotateY(0deg) rotateZ(0deg); }
  100% { transform: translateY(0) rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
}
.d3.held { transform: translateY(-12px); }
.d3.held .f { box-shadow: inset 0 0 0 3px var(--gold), inset 0 0 calc(var(--s) * .08) rgba(0, 0, 0, .28); }
.d3.held::before { content: 'KEEP'; position: absolute; bottom: -24px; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 800; color: var(--gold); letter-spacing: .08em; }
.d3[data-move] { cursor: pointer; }
.dice-tray { display: flex; justify-content: center; gap: 12px; padding: 22px 12px 30px; margin: 10px 0; border-radius: 18px;
  background: var(--cloth), radial-gradient(circle at 50% 40%, #1d6b45, #0e3f29); box-shadow: inset 0 3px 14px rgba(0, 0, 0, .55); border: 6px solid transparent;
  background-clip: padding-box; outline: 6px solid var(--rail-solid); outline-offset: -6px; }
.dice-tray.big .d3 { --s: 110px; }
.dice-tray.big { gap: 26px; padding: 34px 20px 46px; }
@media (max-width: 420px) { .d3 { --s: 50px; } .dice-tray { gap: 9px; } }

/* ---------- scorecard ---------- */
.scorecard tr.zero td { color: var(--mute); text-decoration: line-through; font-weight: 600; }
.scorecard tr.bonus th::after { content: ' ★'; color: var(--gold); }
.scorecard .prog { font-weight: 600; color: var(--mute); font-size: 12px; }
.scorecard .prog b { color: var(--gold); }
.y-phone .scorecard tr.total th, .y-phone .scorecard tr.total td { position: sticky; bottom: 0; background: rgb(var(--panel-rgb) / .96); }

/* ---------- celebrations (fx.js GR.celebrate) ---------- */
.celebrate { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; pointer-events: auto; }
.celebrate.small { pointer-events: none; }
.celebrate .banner { display: grid; justify-items: center; gap: 4px; padding: 18px 30px; border-radius: 20px; background: rgb(var(--panel-rgb) / .92);
  border: 3px solid var(--gold); box-shadow: 0 16px 40px rgba(0, 0, 0, .55); animation: bannerIn calc(.45s * var(--spd)) cubic-bezier(.3, 1.6, .5, 1) both; }
.celebrate .banner b { font-family: 'Fredoka', sans-serif; font-size: clamp(34px, 10vw, 76px); color: var(--gold); line-height: 1; text-shadow: 0 4px 0 rgba(0, 0, 0, .35); }
.celebrate .banner small { font-size: 18px; color: var(--ink); font-weight: 700; }
.celebrate.small .banner { padding: 10px 20px; }
.celebrate.small .banner b { font-size: 30px; }
@keyframes bannerIn { from { transform: scale(.3) rotate(-6deg); opacity: 0; } }
.confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.confetti i { position: absolute; top: -20px; left: var(--x); width: 9px; height: 14px; background: var(--c); border-radius: 2px;
  animation: fall var(--d) linear var(--w) forwards; }
/* Plain numbers again (each piece starts at its own angle with `rotate`), so the confetti falls on the graphics chip. */
@keyframes fall { from { transform: translateY(0) rotate(0deg); } to { transform: translateY(110vh) rotate(560deg); } }

/* ---------- waiting screens in your own color ---------- */
.wait-me { text-align: center; padding: 26px 16px; border-radius: 22px; margin: 10px 0;
  background: linear-gradient(160deg, var(--pc, #4dd4ff) 0%, rgba(0, 0, 0, .25) 120%); color: #12241a; }
.wait-me .face svg, .wait-me .face-fb { margin: 0 auto 8px; }
.wait-me b { display: block; font-family: 'Fredoka', sans-serif; font-size: 26px; }
.wait-me span { font-weight: 700; opacity: .85; }

/* The TV app's weak hardware: no looping glow there. */
.tv-lite .seat.up .face::after, .tv-lite .pseat.up .face::after { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .fly-in, .sweep, .deal-in, .d3.tumble .tumbler, .pop-in, .celebrate .banner, .confetti i, .seat.up .face::after, .pseat.up .face::after { animation: none !important; }
}

/* ---------- poker ---------- */
.board .card.win5, .pcards .card.win5 { transform: translateY(-8px); box-shadow: 0 0 0 3px var(--gold), 0 8px 14px rgba(0, 0, 0, .45); }
.board .card.dimmed, .pcards .card.dimmed { filter: brightness(.45) saturate(.6); }
.pot-pile .pchip { width: 30px; height: 8px; }
.pot { font-size: 26px; text-shadow: 0 2px 0 rgba(0, 0, 0, .4); }
.tv-size .pot { font-size: 34px; }
.preact { justify-content: center; margin-top: 8px; }
.preact .chip.on { background: var(--gold); color: var(--on-gold); }
.bet-box { position: sticky; bottom: 8px; z-index: 5; background: rgb(var(--panel-rgb) / .92); border-radius: 18px; padding: 10px; box-shadow: 0 8px 22px rgba(0, 0, 0, .45); }
.bet-box .quick .chip { min-height: 44px; }
/* Hold'em phone, stationary (Stephen, 2026-11-02): status, cards, chips and one fixed action block (button row + tray) never change size.
   Targets 44px+ with 8px gaps, inputs 16px+. */
.p-phone .status { height: 2.4em; min-height: 0; margin: 2px 0 4px; line-height: 1.2; overflow: hidden; text-align: center; }
.p-phone .status span { display: block; max-height: 2.4em; overflow: hidden; }
.p-phone .p-cards { height: 190px; min-height: 190px; overflow: hidden; }
.p-phone .my-stack { height: 72px; margin: 4px 0; overflow: hidden; }
.p-phone .my-chips { height: 40px; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.p-phone .my-stack .chipstacks { margin-bottom: 0; }
.p-act { height: 232px; background: rgb(var(--panel-rgb) / .92); border-radius: 16px; padding: 8px; margin-top: 4px; }
.p-act-btns { display: flex; gap: 8px; height: 52px; }
.p-act-btns .btn { flex: 1 1 0; min-width: 0; margin: 0; height: 52px; padding: 0 8px; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-act-btns .p-hid { visibility: hidden; }
.p-act-btns .call-btn { background: #2fb457; border-color: #2fb457; color: #fff; font-weight: 800; }
.p-act-btns .btn.ghost.pre { background: #3a4a44; border: 2px solid #8fa39a; color: #fff; font-weight: 800; }
.p-act-btns .btn.ghost.pre.on { background: #ffb300; border-color: #ffb300; color: #1c1c22; }
.p-act-tray { height: 160px; margin-top: 8px; overflow-y: auto; overflow-x: hidden; }
.p-act-tray .raise { margin-top: 0; }
.p-act-tray .raise input[type=range] { width: 100%; height: 44px; margin: 0; font-size: 16px; }
.p-act-tray .quick { flex-wrap: nowrap; gap: 8px; }
.p-act-tray .quick .chip { flex: 1 1 0; min-width: 0; min-height: 44px; padding: 0 2px; font-size: 14px; white-space: nowrap; }
.p-act-tray .btn.big { margin: 8px 0 0; height: 52px; padding: 0 10px; font-size: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-act-tray .win-line { display: flex; align-items: center; gap: 8px; font-size: 15px; margin-bottom: 6px; }

/* ---------- Euchre (public/games/euchre.js) ---------- */
.t0 { --tc: #4dd4ff; } .t1 { --tc: #ffb347; }
b.t0, b.t1, span.t0, span.t1 { color: var(--tc); }
.sy { font-weight: 900; } .sy.red { color: #ff6b6b; }
.e-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: nowrap; white-space: nowrap; gap: 6px; font-size: 13px; padding: 2px; height: 30px; overflow: hidden; }
.e-phone .status { min-height: 40px; font-size: 16px; margin: 4px 0; }
.e-actions > .chip { width: 100%; } .e-actions > .chip.wide { grid-column: 1 / -1; }
.e-trump { background: rgba(0, 0, 0, .4); border-radius: 999px; padding: 2px 8px; font-size: 13px; }
.e-trump.red { color: #ff8a8a; }
.e-maker { font-weight: 700; } .alone { color: var(--gold); letter-spacing: .06em; }
.e-bid { text-align: center; }
.e-bidtop { display: flex; gap: 12px; align-items: center; justify-content: center; margin: 2px 0; }
.e-up { display: grid; justify-items: center; gap: 2px; } .e-up .card { --w: 58px; } .e-up .card.big { --w: 130px; }
.e-up.down .card { filter: brightness(.5) grayscale(.5); transform: rotate(8deg); }
.e-talk { flex: 1; text-align: left; max-width: 220px; }
.e-say { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; padding: 1px 8px; border-left: 4px solid var(--tc); border-radius: 4px; }
.e-say.up { background: rgba(255, 207, 74, .15); } .e-say i { font-style: normal; background: var(--gold); color: var(--on-gold); border-radius: 999px; padding: 0 5px; font-size: 11px; font-weight: 800; }
.e-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; } .e-actions > .e-suits, .e-actions > .e-alone { grid-column: 1 / -1; } .e-alone { display: flex; justify-content: center; }
.e-btn { padding: 8px; font-size: 18px; min-height: 46px; } .e-btn.wide { grid-column: 1 / -1; }
.e-suits { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; width: 100%; }
.e-suit { display: grid; justify-items: center; padding: 2px 2px; font-size: 24px; line-height: 1.1; background: #fffdf7; color: #1c1c22; } .e-suit small { font-size: 11px; } .e-suit .sy.red { color: #c8232c; }
.e-suit:disabled { opacity: .3; }
.e-scores { display: grid; gap: 6px; margin: 6px 0; }
.e-team { display: flex; align-items: center; gap: 10px; padding: 6px 12px; border-radius: 12px; background: rgba(0, 0, 0, .25); border-left: 6px solid var(--tc); }
.e-team .tn { flex: 1; font-weight: 700; } .e-team .pts { font-size: 28px; font-weight: 800; } .e-team .tk { color: var(--mute); font-size: 13px; }
.e-team.maker { box-shadow: inset 0 0 0 2px var(--gold); }
.e-result { font-size: 18px; margin: 4px 0; }
.e-seat .nm { box-shadow: inset 0 -3px 0 var(--tc); } .e-seat.out { opacity: .5; }
.e-seat .badge.dealer { background: var(--gold); color: var(--on-gold); font-weight: 800; } .e-seat .badge.maker { background: var(--tc); color: #10222a; font-weight: 800; }
.e-bubble { background: #fff8ef; color: var(--on-gold); border-radius: 12px; padding: 1px 10px; font-size: 13px; font-weight: 800; } .e-bubble.pass { background: rgba(255, 255, 255, .2); color: var(--ink); font-weight: 600; }
.e-corner { position: absolute; left: 10px; top: 8px; display: grid; gap: 4px; justify-items: start; font-size: 14px; }
.e-center-up { display: grid; justify-items: center; gap: 4px; }
.big-note.small { font-size: 18px; }
.hand.arc .card.is-trump { box-shadow: 0 0 0 2px rgba(255, 207, 74, .55); }

/* ---------- stationary phone layout (every game): nothing above the player's cards changes height ---------- */
/* The strip is one fixed height whatever it shows; status lines always have room for two lines. */
.strip { height: 112px; overflow: hidden; align-content: space-between; }
.strip .s-main { flex-wrap: nowrap; overflow: hidden; }
.strip .s-scores { flex-wrap: nowrap; overflow: hidden; white-space: nowrap; }
.status { min-height: 52px; display: grid; place-items: center; align-content: center; }
/* Trick-taking games: a fixed-height top zone (trick, bidding, messages) and the hand in a dock that sits at the bottom. */
.h-phone { display: flex; flex-direction: column; min-height: calc(100vh - 212px); min-height: calc(100dvh - 212px); }
.h-top { height: 332px; flex: none; }
.h-dock { margin-top: auto; }
/* Hold'em: the hole cards keep their space whether they're showing, folded or waiting. */
.p-cards { min-height: 190px; display: grid; align-content: center; }
.h-dock .my-pts { margin-top: 2px; }

/* ---------- handwriting on paper score sheets (shared: any game with a paper card can use `.handwritten`) ---------- */
/* Font: Caveat by Impallari Type, SIL Open Font License 1.1 (Google Fonts). Set --pen on the sheet for the ink color.
   Per-box tilt: put style="--rot:2deg;--dx:1px;--dy:-1px" on the element, derived from the box id (never random, so redraws don't jiggle). */
.handwritten { font-family: 'Caveat', 'Segoe Print', 'Bradley Hand', 'Comic Sans MS', cursive; font-weight: 700; color: var(--pen, #2056d6);
  display: inline-block; line-height: 1; transform: translate(var(--dx, 0px), var(--dy, 0px)) rotate(var(--rot, 0deg)); }
.handwritten.write-in { animation: penIn calc(.4s * var(--spd, 1)) ease-out both; }
@keyframes penIn { from { clip-path: inset(-20% 100% -20% -10%); } to { clip-path: inset(-20% -20% -20% -10%); } }
.handwritten.scratch { position: relative; }
.handwritten.scratch::after { content: ''; position: absolute; left: -3px; right: -3px; top: 50%; border-top: 2.5px solid var(--pen, #2056d6); border-radius: 2px; transform: rotate(-26deg); opacity: .9; }
.handwritten.ring { padding: 0 5px; border: 2px solid var(--pen, #2056d6); border-radius: 50% 46% 52% 48% / 55% 50% 50% 45%; }
.handwritten.hw-check svg { display: block; width: 100%; height: 100%; }
.hw-check path { fill: none; stroke: var(--pen, #2056d6); stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.hw-check.write-in path { stroke-dasharray: 30; animation: penDraw calc(.35s * var(--spd, 1)) ease-out both; }
@keyframes penDraw { from { stroke-dashoffset: 30; } to { stroke-dashoffset: 0; } }

/* ---------- Yahtzee paper scorecard (public/games/yahtzee.js) ---------- */
.y-paper { padding: 6px; }
.ycard-wrap { --navy: #14286b; --pen: #2056d6; --c1: #dce9f8; --c2: #fadbe4; background: #fff; color: var(--navy); border-radius: 8px; padding: 6px 6px 8px;
  font-family: 'Nunito', system-ui, sans-serif; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.y-top { display: flex; align-items: flex-end; gap: 6px; margin-bottom: 4px; }
.y-banner { display: block; width: 62%; max-width: 270px; height: auto; flex: none; }
.y-name { flex: 1; min-width: 0; display: flex; align-items: flex-end; gap: 4px; font-size: 11px; font-weight: 800; padding-bottom: 4px; }
.y-name .line { flex: 1; min-width: 0; border-bottom: 1.5px solid var(--navy); font-size: 20px; line-height: 20px; height: 22px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.y-name .line.team { font-size: 15px; line-height: 13px; height: 26px; white-space: normal; text-overflow: clip; } /* a team's names can wrap to two lines */
.ycard { width: 100%; border-collapse: collapse; table-layout: fixed; color: var(--navy); font-size: 11.5px; }
.ycard th, .ycard td { border: 1px solid var(--navy); padding: 0 3px; height: 27px; vertical-align: middle; }
.ycard thead th { position: sticky; top: 0; z-index: 2; background: #fff; font-size: 10px; font-weight: 900; letter-spacing: .03em; height: 24px; box-shadow: 0 1px 0 var(--navy); }
.ycard thead th small { display: block; font-size: 9px; opacity: .65; line-height: 1; }
.ycard th.lab { text-align: left; font-weight: 800; background: #fff; }
.ycard .lab .nm { display: inline-block; font-size: 12px; font-weight: 900; line-height: 1.05; }
.ycard .lab .nm.sm { font-size: 10.5px; } .ycard .lab .nm.big { font-size: 13px; letter-spacing: .02em; }
.ycard .lab small { font-size: 8.5px; font-weight: 700; opacity: .8; }
.ycard .lab .dice { display: inline-flex; align-items: center; gap: 1px; margin-left: 4px; vertical-align: middle; }
.ycard .lab .eq { font-size: 10px; font-weight: 800; margin-left: 2px; }
.pdie { display: block; flex: none; color: var(--navy); }
.ycard td.how, .ycard th.how { text-align: center; font-size: 9px; font-weight: 700; line-height: 1.08; text-transform: none; }
.ycard .arrow { width: 30px; height: 9px; color: var(--navy); }
.ycard tr.sec th { background: #fff; text-align: left; font-size: 12px; font-weight: 900; letter-spacing: .04em; height: 22px; text-transform: uppercase; }
.ycard td.v { text-align: center; padding: 0; position: relative; font-size: 20px; }
.ycard td.v.c1, .ycard th.v.c1 { background: var(--c1); } .ycard td.v.c2, .ycard th.v.c2 { background: var(--c2); }
.ycard td.v .handwritten { font-size: 22px; }
.ycard td.v .prog { font-style: normal; font-size: 9.5px; font-weight: 800; color: #8a94b8; }
.ycard .cap { position: absolute; left: 2px; top: 1px; font-size: 8px; font-weight: 900; opacity: .55; line-height: 1; }
.ycard tr.tot th.lab { text-transform: none; }
.ycard tr.grand th, .ycard tr.grand td { border-top: 2.5px solid var(--navy); height: 32px; }
.ycard tr.grand td .handwritten { font-size: 28px; }
.ycard td.just { box-shadow: inset 0 0 0 2px rgba(32, 86, 214, .35); }
/* The box just scored, held up through the 5 s Undo wait (public/games/yahtzee.js waitOn) */
.ycard td.just.held { background: rgba(255, 213, 74, .55); box-shadow: inset 0 0 0 3px #d9a400; }
.y-count { display: inline-block; min-width: 1.1em; text-align: center; color: var(--gold, #ffd54a); font-variant-numeric: tabular-nums; }
.cboxes { display: inline-flex; gap: 3px; align-items: center; justify-content: center; }
.cbox { width: 17px; height: 17px; border: 1.6px solid var(--navy); border-radius: 2px; background: #fff; display: inline-block; position: relative; }
.cbox .handwritten { position: absolute; inset: -4px -3px -2px -3px; width: auto; height: auto; }
.ycard .score-btn { display: block; width: calc(100% - 6px); margin: 0 auto; min-width: 0; height: 23px; padding: 0; border-radius: 5px; cursor: pointer;
  font-family: 'Caveat', 'Segoe Print', cursive; font-weight: 700; font-size: 20px; line-height: 1; color: #1b7a46; background: rgba(60, 170, 100, .16); border: 1.5px dashed #2f9a5e; }
.ycard .score-btn.zero { color: #7b7f90; background: rgba(120, 125, 150, .12); border-color: #9aa0b8; }
.ycard .score-btn:active { transform: translateY(1px); }
.y-joke { text-align: center; font-size: 10.5px; font-weight: 800; letter-spacing: .01em; margin-top: 6px; color: var(--navy); }
/* Triple on a narrow phone: no How-to-score column, a bit tighter. */
.ycard-wrap.triple.compact .ycard th, .ycard-wrap.triple.compact .ycard td { padding: 0 2px; }
.ycard-wrap.triple.compact .ycard .lab .nm { font-size: 11px; } .ycard-wrap.triple.compact .ycard .lab .nm.sm { font-size: 9.5px; }
.ycard-wrap.triple.compact .ycard td.v .handwritten { font-size: 20px; }
.ycard-wrap.triple.compact .ycard .score-btn { font-size: 18px; width: calc(100% - 4px); }
.ycard-wrap.triple.compact .cbox { width: 13px; height: 13px; } .ycard-wrap.triple.compact .cboxes { gap: 2px; white-space: nowrap; } .ycard-wrap.triple.compact .cboxes > .handwritten { font-size: 15px; margin-left: -1px; }
.ycard-wrap.compact .y-banner { width: 68%; }
/* Phone: dice and Roll never move; only this panel scrolls. */
/* Phone: the card is as tall as it is and the PAGE scrolls (Stephen, 2026-11-28: a scroll box inside the page trapped the swipe).
   No inner up-down scroller; only the sideways slide (.y-hs) and the swipe between players' cards (.y-swipe) stay. */
.y-scroll { overflow: visible; }
/* TV / whole-table view */
.y-cards .y-card { flex-basis: 760px; max-width: 900px; } /* six game columns: wider cards (series, Stephen 2026-11-01) */
.y-cards.triple .y-card { flex-basis: 760px; max-width: 900px; }
/* TV, fitted to the screen (yahtzee.js fitCards): one row at full card size, then zoomed down to fit. */
.y-cards.one-row { flex-wrap: nowrap; } .y-cards.one-row .y-card { flex: 0 0 760px; } .y-cards.triple.one-row .y-card { flex-basis: 760px; }
.y-card .ycard-wrap .ycard th, .y-card .ycard-wrap .ycard td { font-size: inherit; padding: 0 3px; }
.y-card .ycard td.v { padding: 0; }
.y-card.won { box-shadow: 0 0 0 3px var(--gold); }
.y-card-h { color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .handwritten.write-in, .hw-check.write-in path { animation: none !important; } }

/* ---------- Phone rows for Hearts, Euchre, Spades, Thirty-one, Crazy Eights (Stephen, 2026-11-02) ----------
   Facts bar, a 212px zone (trick / bidding / hand result), a two-line status, one 52px action row, then the hand dock:
   the same size and place in every state, so nothing jumps when the words or buttons change. Taps are 44px or more (Apple HIG). */
:is(.hh-phone, .e-phone, .s-phone) .h-top { height: auto; } /* its rows add up to 348px, more than the old fixed 332 */
:is(.hh-phone, .e-phone, .s-phone, .ce-phone, .tt-phone) .h-zone { height: 212px; display: flex; align-items: center; justify-content: center; } /* not clipped: a finished trick sweeps out past the edge */
:is(.hh-phone, .e-phone, .s-phone, .ce-phone, .tt-phone) .h-zone > * { max-width: 100%; box-sizing: border-box; }
:is(.hh-phone, .e-phone, .s-phone, .ce-phone, .tt-phone) .h-zone .trick.cross { margin: 6px auto; }
:is(.hh-phone, .e-phone, .s-phone, .ce-phone, .tt-phone) .h-zone .hand-over { margin: 0; width: 100%; }
:is(.hh-phone, .e-phone, .s-phone, .ce-phone, .tt-phone) .status { height: 2.4em; min-height: 0; margin: 4px 0; padding: 0 4px; font-size: 16px; line-height: 1.2; overflow: hidden; text-align: center; }
:is(.hh-phone, .e-phone, .s-phone, .ce-phone, .tt-phone) .status small { display: block; font-size: 12px; font-weight: 600; color: var(--mute); }
:is(.hh-phone, .e-phone, .s-phone, .ce-phone, .tt-phone) .h-act { height: 52px; margin: 0 0 8px; display: flex; gap: 8px; }
:is(.hh-phone, .e-phone, .s-phone, .ce-phone, .tt-phone) .h-act > .btn { flex: 1 1 0; min-width: 0; height: 100%; margin: 0; padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:is(.hh-phone, .e-phone, .s-phone, .ce-phone, .tt-phone) .h-act > .btn:disabled { opacity: .55; }
.h-act > .h-amber { background: #ffb300; border-color: #ffb300; color: #1c1c22; font-weight: 800; } /* solid, readable (Stephen, 2026-11-01) */
:is(.hh-phone, .e-phone, .s-phone, .ce-phone, .tt-phone) .hand-tools .chip { min-height: 44px; font-size: 15px; }
:is(.hh-phone, .e-phone, .s-phone, .ce-phone, .tt-phone) .my-pts { height: 22px; line-height: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; text-align: center; }
.h-pass { display: grid; justify-items: center; gap: 8px; }
.h-pass .big-note { font-size: 22px; } .h-cards { display: flex; gap: 8px; min-height: 110px; align-items: center; }
/* Euchre bidding lives in the zone; its buttons live in the action row */
.e-phone .e-bid { display: grid; gap: 6px; justify-items: center; width: 100%; }
.e-phone .e-chiprow { height: 44px; display: flex; justify-content: center; }
.e-phone .e-alone-chip { min-height: 44px; font-size: 15px; padding: 0 16px; }
.e-phone .e-pass { background: #e8e6ee; border-color: #cfcbd9; color: #1c1c22; font-weight: 800; }
.e-phone .h-act > .e-btn { font-size: 18px; min-height: 0; }
.e-phone .h-act > .e-suits { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; width: 100%; }
.e-phone .h-act .e-suit { height: 100%; font-size: 24px; padding: 0 2px; align-content: center; }
.e-phone .h-act .e-suit small { font-size: 12px; }
.e-phone .e-talk .lbl { font-size: 12px; } .e-phone .e-say { font-size: 14px; }
.e-phone .e-tw { display: none; } .e-phone .e-bar { font-size: 14px; }
/* Spades: bids + number picker in the zone, Bid / Blind Nil in the action row */
.s-phone .sp-bid { display: grid; grid-template-rows: 70px 22px 96px; gap: 4px; width: 100%; }
.s-phone .sp-pick { gap: 6px; align-content: start; }
.s-phone .sp-pl { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 0 2px; font-size: 12px; } /* name on its own line: it was cut to "R…" beside the bid */
.s-phone .sp-pl .nm { grid-column: 1 / -1; } .s-phone .sp-pl em { grid-column: 2; }
.s-phone .sp-team { gap: 4px; }
.s-phone .sp-n { min-height: 44px; height: 44px; font-size: 18px; }
.s-phone .sp-n.on { background: #2fb457; border-color: #fff; color: #fff; }
.s-phone .h-act > .sp-go:not(:disabled) { background: #2fb457; border-color: #2fb457; color: #fff; font-weight: 800; }
.s-phone .h-act > .sp-look { background: #e8e6ee; border-color: #cfcbd9; color: #1c1c22; font-weight: 800; }
.s-phone .h-act > .e-btn { font-size: 18px; min-height: 0; }

/* ---------- Spades (public/games/spades.js) ---------- */
/* Team colors .t0 / .t1 come from the Euchre block above. */
.s-phone .status { font-size: 15px; text-align: center; padding: 0 4px; }
.sp-broken { background: rgba(0, 0, 0, .4); border-radius: 999px; padding: 2px 10px; font-size: 13px; font-weight: 700; color: var(--mute); }
.sp-broken.on { color: var(--on-gold); background: var(--gold); }
.sp-broken .sy { font-size: 15px; }
.sp-ct { font-size: 13px; }
/* bidding */
.sp-bid { text-align: center; }
.sp-bids { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin: 4px 0; }
.sp-bc { display: grid; justify-items: center; align-content: center; min-width: 0; height: 66px; padding: 2px 3px; border-radius: 10px; background: rgba(0, 0, 0, .28); border-top: 4px solid var(--tc); }
.sp-bc .n { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 700; }
.sp-bc .n i { font-style: normal; background: var(--gold); color: var(--on-gold); border-radius: 999px; padding: 0 4px; font-size: 10px; font-weight: 800; }
.sp-bc b { font-size: 24px; line-height: 1.1; }
.sp-bc.nil b { color: var(--gold); font-size: 20px; }
.sp-bc small { font-size: 10px; color: var(--mute); line-height: 1; white-space: pre; }
.sp-bc.up { box-shadow: 0 0 0 2px var(--gold); background: rgba(255, 207, 74, .14); }
.sp-sum { height: 22px; font-size: 13px; overflow: hidden; white-space: nowrap; }
.sp-pick { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.sp-n { min-height: 40px; padding: 0; font-size: 18px; min-width: 0; }
.sp-n.nil { background: #1b1433; color: var(--gold); border: 2px solid var(--gold); font-size: 15px; letter-spacing: .03em; } /* every bid button is gold (.btn), so Nil is dark with a gold outline */
.sp-blind { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sp-blind .btn { font-size: 16px; }
/* playing: team columns on either side of the trick */
.sp-mid { display: grid; grid-template-columns: minmax(0, 1fr) 210px minmax(0, 1fr); align-items: center; height: 212px; overflow: hidden; }
.sp-mid .trick.cross { margin: 6px 0; }
.sp-team { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; font-size: 11.5px; padding: 4px 3px 4px 5px; min-width: 0; overflow: hidden; border-left: 4px solid var(--tc); border-radius: 4px; background: rgba(0, 0, 0, .2); }
.sp-team .sp-tl { font-size: 13px; color: var(--tc); }
.sp-pl { display: flex; justify-content: space-between; gap: 3px; min-width: 0; }
.sp-pl .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.sp-pl em { font-style: normal; font-weight: 800; flex: none; }
.sp-pl.nil em { color: #7ee2a0; } .sp-pl.bust em { color: #ff7b7b; }
.sp-k { color: var(--mute); font-size: 11px; white-space: nowrap; } .sp-k b { color: var(--ink); }
/* hand over */
.sp-over { padding: 8px 10px; margin: 0 0 6px; }
.sp-over .lbl { margin-bottom: 2px; }
.sp-over .btn { margin-top: 4px; min-height: 40px; padding: 6px; }
.sp-res { text-align: left; padding: 2px 8px; margin: 3px 0; border-left: 5px solid var(--tc); border-radius: 4px; background: rgba(0, 0, 0, .2); }
.sp-res-h { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.sp-res-h .handwritten { font-size: 26px; color: #8fc1ff; }
.sp-res .sp-tot { margin-left: auto; color: var(--mute); font-size: 13px; }
.sp-res .fine { font-size: 12px; line-height: 1.25; min-height: 15px; }
/* the hand-kept score pad: ruled paper, printed headings, pen numbers */
.sp-pad { --pen: #1f4fc4; --ink: #1c2a4a; position: relative; margin: 6px 0; padding: 4px 6px 4px 8px; border-radius: 6px; color: var(--ink);
  background: linear-gradient(90deg, transparent 29px, rgba(200, 50, 60, .55) 29px 30px, transparent 30px), #fbf6e3;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .4); text-align: center; }
.sp-pad-h, .sp-row, .sp-pad-f { display: grid; grid-template-columns: 26px 1fr 1fr; align-items: center; }
.sp-pad .grp { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; min-width: 0; }
.sp-pad-h { font-size: 11px; font-weight: 800; border-bottom: 2px solid var(--ink); padding-bottom: 1px; }
.sp-pad-h .grp { grid-template-columns: 1fr 1fr 1fr; }
.sp-pad-h .grp > b { grid-column: 1 / -1; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.sp-pad-h .grp.t0 > b { color: #1c6fa8; } .sp-pad-h .grp.t1 > b { color: #b4640a; }
.sp-pad-h small { font-size: 9px; font-weight: 700; opacity: .7; color: var(--ink); }
.sp-pad-h .n { opacity: .6; }
.sp-pad-rows { background: repeating-linear-gradient(180deg, transparent 0 25px, rgba(60, 100, 170, .35) 25px 26px); }
.sp-pad-rows:not(:empty) { min-height: 26px; }
.sp-row { height: 26px; }
.sp-row .n { font-size: 11px; font-weight: 800; opacity: .55; }
.sp-row .c { display: block; }
.sp-row .handwritten { font-size: 21px; }
.sp-row .c.s .handwritten { font-size: 24px; }
.sp-row.new .c.s .handwritten { text-decoration: underline double; text-underline-offset: 2px; }
.sp-pad-f { font-size: 11px; font-weight: 700; border-top: 2px solid var(--ink); padding-top: 1px; }
.sp-pad-f .handwritten { font-size: 20px; } .sp-pad-f .grp { display: block; }
.sp-empty { padding: 4px; }
.sp-pad.phone .sp-row { height: 24px; }
/* TV */
.sp-seat .nm { box-shadow: inset 0 -3px 0 var(--tc); }
.sp-seat .badge.dealer { background: var(--gold); color: var(--on-gold); font-weight: 800; }
.sp-seat .badge.bid { background: var(--tc); color: #10222a; font-weight: 800; }
.sp-seat .badge.bust { background: #b3242f; color: #fff; }
.s-table .e-team .tk { flex: none; }
.tv-size .sp-pad-rows { background: repeating-linear-gradient(180deg, transparent 0 29px, rgba(60, 100, 170, .35) 29px 30px); }
.tv-size .sp-row { height: 30px; } .tv-size .sp-row .handwritten { font-size: 24px; }

/* ---------- Farkle (public/games/farkle.js) ---------- */
/* Stationary phone layout: the status (52px, from the shared rule), flag, info row, tray and button row all have fixed heights. */
.f-phone { display: block; }
.f-flag { height: 20px; line-height: 20px; text-align: center; font-size: 12px; font-weight: 800; letter-spacing: .06em; color: var(--gold); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.f-phone .status { height: 56px; min-height: 0; overflow: hidden; line-height: 1.2; font-size: 15px; text-align: center; padding: 0 4px; box-sizing: border-box; } /* fixed: a long hint clips instead of pushing the dice (Stephen, 2026-11-02) */
.f-phone .status.bust { color: #ff8d8d; font-weight: 800; }
.f-info { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; height: 58px; }
.f-info > div, .f-tv-nums > div { display: grid; align-content: center; justify-items: center; background: rgba(0, 0, 0, .28); border-radius: 12px; min-width: 0; overflow: hidden; }
.f-info small, .f-tv-nums small { font-size: 12px; color: var(--mute); text-transform: uppercase; letter-spacing: .06em; line-height: 1.1; }
.f-info b, .f-tv-nums b { font-family: 'Fredoka', sans-serif; font-size: 24px; line-height: 1.1; font-weight: 600; white-space: nowrap; }
.f-tray { gap: 8px; height: 126px; box-sizing: border-box; align-items: center; padding: 14px 10px 26px; margin: 10px 0; overflow: hidden; } /* overflow: tumbling dice drop in from above; clip them to the tray so they never fly over the score boxes (2026-11-02) */
.f-tray .d3 { --s: 44px; }
.f-tray.big { gap: 22px; height: auto; padding: 34px 20px 46px; }
.f-tray.big .d3 { --s: 96px; }
.d3.aside { opacity: .42; filter: grayscale(.5); transform: scale(.84); }
.d3.aside::before { content: '\2713'; position: absolute; bottom: -22px; left: 50%; transform: translateX(-50%); font-size: 14px; font-weight: 800; color: var(--go); }
.d3.nokeep { opacity: .78; }
.f-tray.farkle { outline-color: #b3242f; box-shadow: inset 0 3px 14px rgba(0, 0, 0, .55), inset 0 0 0 4px rgba(229, 72, 77, .55); }
.f-tray .d3.tumble .tumbler { animation-delay: calc(var(--di, 0) * .06s - var(--el, 0s)); }
.f-tray.farkle .d3 { animation: fkShake calc(.55s * var(--spd, 1)) ease-in-out 1 both; animation-delay: calc(.8s - var(--el, 0s)); }
@keyframes fkShake { 0%, 100% { translate: 0 0; } 15% { translate: -9px 2px; } 30% { translate: 8px -2px; } 45% { translate: -7px 1px; } 60% { translate: 6px 0; } 80% { translate: -3px 0; } }
.f-tray.hot { animation: fkHot calc(1.8s * var(--spd, 1)) ease-out 1; animation-delay: calc(.8s - var(--el, 0s)); }
@keyframes fkHot { 0% { box-shadow: inset 0 3px 14px rgba(0, 0, 0, .55), 0 0 0 0 rgba(255, 150, 40, 0); } 25% { box-shadow: inset 0 3px 14px rgba(0, 0, 0, .55), 0 0 34px 10px rgba(255, 150, 40, .9); } 100% { box-shadow: inset 0 3px 14px rgba(0, 0, 0, .55), 0 0 0 0 rgba(255, 150, 40, 0); } }
.f-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; height: 82px; }
.f-btns .btn.big { margin: 10px 0; padding: 6px; height: 62px; display: grid; align-content: center; justify-items: center; font-size: 20px; line-height: 1.15; white-space: nowrap; overflow: hidden; }
.f-btns .btn small { font-size: 13px; font-weight: 700; opacity: .75; margin: 0; }
.f-btns .bank-btn { background: var(--go); }
.f-pad-panel { padding: 8px; }
.f-rules { padding: 8px 12px; }
.f-rules-g { display: grid; grid-template-columns: 1fr auto; gap: 1px 12px; font-size: 13px; margin: 4px 0; }
.f-rules-g b { text-align: right; font-weight: 800; }
.f-rules .fine { font-size: 12px; }
/* the pad: ruled paper, printed headings, pen numbers (same family as the Spades pad) */
.f-pad { --pen: #1f4fc4; --ink: #1c2a4a; position: relative; padding: 4px 6px; border-radius: 6px; color: var(--ink); text-align: center;
  background: linear-gradient(90deg, transparent 5px, rgba(200, 50, 60, .45) 5px 6px, transparent 6px), #fbf6e3; box-shadow: 0 2px 8px rgba(0, 0, 0, .4); }
.f-pad-h, .f-row, .f-pad-f { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); align-items: center; }
.f-pad-h { font-size: 12px; font-weight: 800; border-bottom: 2px solid var(--ink); padding-bottom: 1px; }
.f-pad-h .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
.f-pad-h .nm.up { box-shadow: inset 0 -3px 0 var(--gold); }
.f-pad-scroll { height: 156px; overflow-y: auto; /* no overscroll containment: at the top/bottom a swipe carries on to the page (2026-11-28) */ -webkit-overflow-scrolling: touch;
  background: repeating-linear-gradient(180deg, transparent 0 25px, rgba(60, 100, 170, .35) 25px 26px); }
.f-row { height: 26px; }
.f-row .c { display: block; position: relative; white-space: nowrap; }
.f-row .handwritten { font-size: 21px; }
.f-row:last-child .c:not(.f):not(:empty) .handwritten { text-decoration: underline double; text-underline-offset: 2px; }
.f-row .c.f .handwritten:not(.f-slash) { font-size: 15px; margin-left: 2px; }
.f-slash { width: 26px; height: 20px; vertical-align: middle; }
.f-pad-f { border-top: 2px solid var(--ink); padding-top: 1px; height: 48px; align-content: start; overflow: hidden; }
.f-pad-f .handwritten { font-size: 24px; }
.f-pad-f small { display: block; font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; opacity: .6; line-height: 1; }
.f-empty { padding: 8px; font-size: 12px; opacity: .55; }
.f-pad.n5 .f-row .handwritten, .f-pad.n6 .f-row .handwritten, .f-pad.n7 .f-row .handwritten, .f-pad.n8 .f-row .handwritten { font-size: 17px; }
.f-pad.n5 .f-pad-f .handwritten, .f-pad.n6 .f-pad-f .handwritten, .f-pad.n7 .f-pad-f .handwritten, .f-pad.n8 .f-pad-f .handwritten { font-size: 19px; }
.f-pad.n7 .f-pad-h, .f-pad.n8 .f-pad-h { font-size: 12px; }
.f-pad.n7 .f-row .handwritten, .f-pad.n8 .f-row .handwritten { font-size: 14px; }
.f-pad.n7 .f-pad-f .handwritten, .f-pad.n8 .f-pad-f .handwritten { font-size: 16px; }
/* TV */
.f-table { display: grid; gap: 4px; }
.f-tv-nums { display: flex; gap: 10px; margin-left: 24px; } .f-tv-nums > div { padding: 6px 22px; }
.f-tv-nums b { font-size: 40px; }
.f-pad.tv .f-pad-h { font-size: 20px; } .f-pad.tv .f-pad-scroll { height: 330px; background: repeating-linear-gradient(180deg, transparent 0 33px, rgba(60, 100, 170, .35) 33px 34px); }
.f-pad.tv .f-row { height: 34px; } .f-pad.tv .f-row .handwritten { font-size: 28px; } .f-pad.tv .f-pad-f .handwritten { font-size: 34px; }
.f-pad.tv .f-slash { width: 34px; height: 26px; } .f-pad.tv .f-pad-f small { font-size: 12px; }
.f-pad.tv.n7 .f-row .handwritten, .f-pad.tv.n8 .f-row .handwritten { font-size: 22px; }
.f-pad.tv.n7 .f-pad-f .handwritten, .f-pad.tv.n8 .f-pad-f .handwritten { font-size: 26px; }
.f-pad.tv.n7 .f-pad-h, .f-pad.tv.n8 .f-pad-h { font-size: 15px; }
@media (prefers-reduced-motion: reduce) { .f-tray.farkle .d3, .f-tray.hot { animation: none !important; } }
.f-table .f-rules { max-width: 520px; width: 100%; margin: 10px auto; box-sizing: border-box; }

/* ---------- big moments (2026-10-30): all of these are position: fixed layers, so nothing in the page moves ---------- */
/* Yahtzee "going for it": the screen dims to a spotlight on the one loose die (fx.js GR.spotlight). */
.spot { position: fixed; inset: 0; z-index: 65; pointer-events: auto; touch-action: manipulation; animation: spotIn calc(.35s * var(--spd)) ease-out both;
  background: radial-gradient(circle at var(--sx) var(--sy), transparent 0, transparent var(--sr), rgba(3, 10, 6, .86) calc(var(--sr) + 70px)); }
.spot.out { opacity: 0; transition: opacity .25s; }
@keyframes spotIn { from { opacity: 0; } }
.spot-ring { position: absolute; left: calc(var(--sx) - var(--sr)); top: calc(var(--sy) - var(--sr)); width: calc(var(--sr) * 2); height: calc(var(--sr) * 2);
  border-radius: 50%; border: 3px solid var(--gold); box-shadow: 0 0 40px 10px rgba(255, 207, 74, .65), inset 0 0 26px rgba(255, 207, 74, .35); will-change: transform; animation: ringPulse .7s ease-in-out infinite alternate; }
@keyframes ringPulse { to { transform: scale(1.1); } } /* grows and shrinks only: a glow that pulses repaints every frame */
.spot-label { position: absolute; left: 0; right: 0; top: 14%; display: grid; justify-items: center; gap: 4px; text-align: center; padding: 0 16px; }
.spot-label b { font-family: 'Fredoka', sans-serif; font-size: clamp(26px, 7vw, 56px); color: var(--gold); text-shadow: 0 3px 0 rgba(0, 0, 0, .5); line-height: 1.05; }
.spot-label small { font-size: 18px; font-weight: 700; color: var(--ink); }
.spot-skip { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; font-size: 12px; color: var(--mute); letter-spacing: .08em; text-transform: uppercase; }
/* The loose die tumbles slower (1.8 s), after the drumroll has built for 1.3 s (it hovers in the air until then). */
.d3.tumble.gfi .tumbler { animation-duration: calc(1.8s * var(--spd)); animation-delay: calc(1.3s * var(--spd)); }
.d3.gfi { z-index: 3; }
@media (prefers-reduced-motion: reduce) { .spot, .spot-ring { animation: none !important; } }

/* Monster hand / BAD BEAT! / BIG POT!: a full-screen moment (fx.js GR.moment). */
.moment { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; pointer-events: auto; touch-action: manipulation; }
.moment .banner { display: grid; justify-items: center; gap: 6px; padding: 22px 34px; border-radius: 22px; background: rgb(var(--panel-rgb) / .94); text-align: center;
  border: 4px solid var(--gold); box-shadow: 0 0 60px rgba(255, 207, 74, .5), 0 16px 40px rgba(0, 0, 0, .55); animation: bannerIn calc(.5s * var(--spd)) cubic-bezier(.3, 1.6, .5, 1) both; max-width: 92vw; }
.moment .banner b { font-family: 'Fredoka', sans-serif; font-size: clamp(38px, 11vw, 92px); color: var(--gold); line-height: 1; text-shadow: 0 5px 0 rgba(0, 0, 0, .4); }
.moment .banner small { font-size: 20px; color: var(--ink); font-weight: 700; }
.moment .flash { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 50% 50%, rgba(255, 236, 160, .95), rgba(255, 207, 74, .55) 45%, rgba(255, 207, 74, 0) 75%); animation: goldFlash calc(1.1s * var(--spd)) ease-out both; }
@keyframes goldFlash { 0% { opacity: 0; } 12% { opacity: 1; } 100% { opacity: 0; } }
.moment.monster .banner { border-color: #fff1a8; box-shadow: 0 0 110px 22px rgba(255, 207, 74, .6), 0 16px 40px rgba(0, 0, 0, .55); animation: bannerIn calc(.5s * var(--spd)) cubic-bezier(.3, 1.6, .5, 1) both; }
.moment.badbeat { background: radial-gradient(circle at 50% 50%, rgba(120, 0, 10, .45), rgba(0, 0, 0, .65)); }
.moment.badbeat .banner { border-color: #ff5d73; box-shadow: 0 0 60px rgba(255, 93, 115, .5), 0 16px 40px rgba(0, 0, 0, .55); animation: bannerIn calc(.5s * var(--spd)) cubic-bezier(.3, 1.6, .5, 1) both, beatShake .5s .4s 2; }
.moment.badbeat .banner b { color: #ff7d8f; }
@keyframes beatShake { 25% { transform: translateX(-9px) rotate(-1.5deg); } 75% { transform: translateX(9px) rotate(1.5deg); } }
.moment.bigpot .banner b { color: #7dffa0; }
.moment.bigpot .banner { border-color: #6be37a; box-shadow: 0 0 60px rgba(107, 227, 122, .45), 0 16px 40px rgba(0, 0, 0, .55); }
@media (prefers-reduced-motion: reduce) { .moment .banner, .moment .flash, .moment.badbeat .banner, .moment.monster .banner { animation: none !important; } }

/* Poker all-in showdown: everyone's cards face up with their exact odds (public/games/holdem.js). A tap hides it. */
.gr-layer.allin { position: fixed; inset: 0; z-index: 55; display: flex; align-items: flex-end; justify-content: center; padding: 0 8px 8px; pointer-events: auto; touch-action: manipulation; }
.gr-layer.allin { animation: allinIn calc(.4s * var(--spd)) cubic-bezier(.2, 1.3, .4, 1) both; } /* only when it first appears, not on every card */
.allin-panel { width: min(100%, 460px); max-height: 58vh; overflow: hidden; border-radius: 18px; padding: 10px 12px 8px; background: rgb(var(--panel-rgb) / .96); border: 3px solid var(--gold);
  box-shadow: 0 -6px 30px rgba(0, 0, 0, .55), 0 0 30px rgba(255, 207, 74, .3); }
@keyframes allinIn { from { transform: translateY(40px); opacity: 0; } }
.allin-panel.many .allin-row { padding: 2px 0; gap: 6px; } .allin-panel.many .allin-row .pct { font-size: 20px; } .allin-panel.many .allin-row .pct small { font-size: 9px; }
.allin-panel.many .allin-row .nm small { display: none; } .allin-panel.many .allin-row .hole2 .card.mini { --w: 24px; } .allin-panel.many .allin-board .card { --w: 32px; } .allin-panel.many { padding-top: 6px; }
.allin-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.allin-head b { font-family: 'Fredoka', sans-serif; font-size: 24px; color: var(--gold); letter-spacing: .04em; }
.allin-head small { font-size: 11px; color: var(--mute); text-align: right; }
.allin-board { display: flex; gap: 4px; justify-content: center; margin: 6px 0; }
.allin-board .card { --w: 40px; }
.allin-board .card.slot { opacity: .35; }
.allin-board .card.slot.next { opacity: 1; animation: nextCard .5s ease-in-out infinite alternate; background: rgba(255, 207, 74, .25); outline: 2px dashed var(--gold); }
@keyframes nextCard { to { transform: translateY(-4px); } }
.allin-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto 62px; align-items: center; gap: 8px; padding: 4px 0; border-top: 1px solid rgba(255, 255, 255, .1); position: relative; }
.allin-row .nm { font-weight: 800; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.allin-row .nm small { display: block; font-size: 11px; font-weight: 600; color: var(--mute); }
.allin-row .hole2 { display: flex; gap: 2px; }
.allin-row .hole2 .card.mini { --w: 30px; }
.allin-row .pct { text-align: right; font-family: 'Fredoka', sans-serif; font-size: 26px; font-weight: 700; line-height: 1; animation: pctPop calc(.45s * var(--spd)) ease-out both; }
.allin-row .pct small { display: block; font-family: system-ui, sans-serif; font-size: 11px; font-weight: 700; color: var(--mute); }
.allin-row.lead .pct { color: var(--gold); }
.allin-row .bar { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--gold); opacity: .8; border-radius: 3px; }
@keyframes pctPop { from { transform: scale(1.35); opacity: .3; } }
.allin-note { font-size: 12px; color: var(--mute); text-align: center; padding: 4px 0; }
.allin-tap { text-align: center; font-size: 10px; color: var(--mute); letter-spacing: .08em; text-transform: uppercase; margin-top: 2px; }
@media (min-width: 900px) { /* the TV: the panel sits at the bottom right, clear of the board and the middle of the table */
  .gr-layer.allin { justify-content: flex-end; padding: 0 18px 18px; }
  .allin-panel { width: min(44vw, 600px); max-height: 80vh; padding: 14px 20px 10px; }
  .allin-head b { font-size: 36px; } .allin-head small { font-size: 15px; }
  .allin-board .card { --w: 60px; }
  .allin-row { grid-template-columns: 46px minmax(0, 1fr) auto 112px; padding: 6px 0; gap: 12px; }
  .allin-row .nm { font-size: 22px; } .allin-row .nm small { font-size: 14px; }
  .allin-row .hole2 .card.mini { --w: 46px; }
  .allin-row .pct { font-size: 42px; } .allin-row .pct small { font-size: 14px; }
  .allin-note { font-size: 18px; }
  .allin-panel.many .allin-row .pct { font-size: 28px; } .allin-panel.many .allin-row .hole2 .card.mini { --w: 34px; } .allin-panel.many .allin-board .card { --w: 44px; } .allin-panel.many .allin-row .nm { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) { .gr-layer.allin, .allin-board .card.slot.next, .allin-row .pct { animation: none !important; } }

/* ---------- numbered cards (cards.js GR.numCard): one SVG template, same .card sizes as the Bicycle cards ---------- */
.card.ncard { background: transparent; box-shadow: 0 2px 6px rgba(0, 0, 0, .4); }
.card.ncard svg { display: block; width: 100%; height: 100%; pointer-events: none; }
.card.ncard.slot { background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .22); border-radius: calc(var(--w) * .06); }
.card.ncard.tiny { --w: 30px; }
.card.ncard.big { --w: 110px; }
.nc-val { position: absolute; left: 50%; bottom: -3px; transform: translateX(-50%); min-width: 22px; padding: 0 6px; border-radius: 999px; background: #1b1433; color: #fff; border: 2px solid #fff;
  font: 900 14px/18px 'Arial Black', Arial, sans-serif; text-align: center; font-style: normal; box-shadow: 0 2px 4px rgba(0, 0, 0, .5); pointer-events: none; z-index: 2; }

/* ---------- Spite & Malice (public/games/spitemalice.js) ---------- */
/* Everything on the phone has a fixed height; the hand has 5 fixed slots and sits in a dock at the bottom. */
.sm-phone { display: flex; flex-direction: column; min-height: calc(100vh - 264px); min-height: calc(100dvh - 264px); } /* bar 65 + strip 81 + this + Leave button = one screen on a 375x812 phone (the strip lost its stockpiles line) */
.sm-top { position: relative; flex: none; }
.sm-dock { margin-top: auto; }
.sm-phone .status { height: 50px; min-height: 50px; padding: 0 6px; margin: 0 0 4px; line-height: 1.15; font-size: 17px; align-content: center; }
.sm-phone .status small { display: block; font-weight: 600; font-size: 12.5px; color: var(--mute); }
.sm-phone .status.go span { color: var(--gold); }
.sm-cap { display: block; text-align: center; font-size: 12px; color: var(--mute); line-height: 15px; height: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm-cap b { color: var(--ink); }
.sm-n { position: absolute; right: -3px; top: -4px; min-width: 18px; height: 18px; border-radius: 9px; background: #1b1433; color: #fff; border: 1.5px solid #fff; font: 800 11px/15px Arial, sans-serif; text-align: center; font-style: normal; z-index: 2; }

/* opponents: one row of up to 3, or two rows */
.sm-opps { display: grid; gap: 6px; height: 46px; margin-bottom: 6px; }
.sm-rows2 .sm-opps { height: 98px; } .sm-rows0 .sm-opps { height: 0; margin: 0; }
.sm-opps.c1 { grid-template-columns: 1fr; } .sm-opps.c2 { grid-template-columns: 1fr 1fr; } .sm-opps.c3 { grid-template-columns: 1fr 1fr 1fr; }
.sm-opp { display: flex; align-items: center; gap: 7px; min-width: 0; height: 46px; padding: 3px 7px; border-radius: 12px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); }
.sm-opp.up { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 12px rgba(255, 207, 74, .35); }
.sm-opp.mate { background: rgba(75, 195, 120, .18); }
.sm-opp .sm-ot .card { --w: 26px; }
.sm-opp .sm-ot { position: relative; flex: none; display: block; width: 26px; height: 38px; border-radius: 4px; }
.sm-oi { display: grid; min-width: 0; line-height: 1.15; }
.sm-oi b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-oi span { font-size: 12px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* building piles */
.sm-build { display: grid; grid-template-columns: 46px repeat(4, 1fr); gap: 8px; align-items: start; height: 112px; margin-bottom: 4px; justify-items: center; }
.sm-draw { display: grid; justify-items: center; gap: 2px; width: 100%; }
.sm-draw .card { --w: 44px; }
.sm-draw .sm-cap { white-space: normal; font-size: 12px; line-height: 13px; height: 26px; }
.sm-pile { position: relative; display: grid; justify-items: center; gap: 2px; cursor: pointer; }
.sm-pile > .card { --w: 64px; }
.sm-pile .nc-val { bottom: 12px; }
.sm-empty { display: grid; place-items: center; }
.sm-empty::after { content: attr(data-hint); font: 900 calc(var(--w) * .5)/1 'Arial Black', Arial, sans-serif; color: rgba(255, 255, 255, .22); }
.sm-pile.ok .card { box-shadow: 0 0 0 3px var(--gold), 0 0 6px 1px rgba(255, 207, 74, .4); }
/* the pulse: a glow layer fading in and out (opacity only, see .seat.up .face::after) */
.sm-pile.ok .card::after, .sm-stock.hot .card::after, .tp-grp.ok::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: 0 0 18px 4px rgba(255, 207, 74, .9); opacity: 0; will-change: opacity; animation: glowPulse calc(2s * var(--spd)) ease-in-out infinite; }

/* my stockpile and my four discard piles */
.sm-mine { display: grid; grid-template-columns: 78px 1fr; gap: 10px; height: 128px; align-items: start; }
.sm-stock { position: relative; display: grid; justify-items: center; gap: 2px; width: 78px; cursor: pointer; }
.sm-stock > .card { --w: 76px; }
.sm-stock .sm-cap { font-size: 12px; line-height: 13px; height: 26px; white-space: normal; }
.sm-discs { display: grid; gap: 2px; min-width: 0; }
.sm-dgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; justify-items: center; }
.sm-dp { position: relative; cursor: pointer; padding-top: 2px; }
.sm-dp .card { --w: 54px; }
.sm-dp.deep .card { box-shadow: 2px 2px 0 #cdd5e8, 4px 4px 0 #9aa5c2, 4px 6px 8px rgba(0, 0, 0, .4); }
.sm-dp.drop .card.slot { box-shadow: inset 0 0 0 2px var(--gold); background: rgba(255, 207, 74, .14); }
.sm-dp.drop .card:not(.slot) { outline: 2px dashed rgba(255, 207, 74, .8); outline-offset: 2px; }
.sm-stock.hot .card, .sm-opp .card.ok, .sm-dp .card.ok, .sm-hs .card.ok { box-shadow: 0 0 0 2px rgba(107, 227, 122, .95), 0 2px 6px rgba(0, 0, 0, .4); }
.sm-stock.hot .card { box-shadow: 0 0 0 3px var(--gold), 0 0 6px 1px rgba(255, 207, 74, .4); }
.sm-stock .card.ncard.sel, .sm-dp .card.ncard.sel, .sm-opp .card.ncard.sel { transform: translateY(-5px); }
.card.ncard.sel { transform: translateY(-12px); box-shadow: 0 0 0 3px var(--gold), 0 10px 16px rgba(0, 0, 0, .5) !important; animation: none !important; z-index: 5; }

/* my hand: five fixed slots, with room above them for the lift */
.sm-hand { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; justify-items: center; height: 108px; padding-top: 14px; }
.sm-hs { position: relative; cursor: pointer; width: 100%; display: grid; justify-items: center; }
.sm-hs .card { --w: 62px; }
.sm-dock .my-pts { text-align: center; font-size: 12.5px; color: var(--mute); height: 18px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm-dock .my-pts b { color: var(--ink); }
.sm-overbox { position: absolute; inset: 0; z-index: 20; overflow: auto; }
.sm-overbox .panel, .sm-overbox .panel.sm-hover { margin: 0; min-height: 100%; box-sizing: border-box; background: var(--panel-solid, #10241b) !important; } /* solid: the piles used to show through the text */
.sm-hover { text-align: center; }
.sm-res td.l, .sm-res th:first-child { text-align: left; }
.sm-res td, .sm-res th { padding: 2px 6px; font-size: 15px; }
.sm-res tr.won td { color: var(--gold); }

/* the table (TV, or Whole table on a phone) */
.sm-table { --pw: 66px; --sw: 54px; --dw: 34px; display: grid; gap: 10px; }
.sm-table.tv { --pw: clamp(90px, 9vw, 160px); --sw: clamp(78px, 7.6vw, 130px); --dw: clamp(44px, 4.2vw, 76px); gap: 16px; }
.sm-table.tv.n5, .sm-table.tv.n6 { --dw: clamp(34px, 3.1vw, 58px); --sw: clamp(62px, 5.8vw, 100px); }
.sm-center { display: flex; justify-content: center; align-items: flex-start; gap: calc(var(--pw) * .22); padding: 12px 8px 8px; border-radius: 20px; background: rgba(0, 0, 0, .22); border: 1px solid var(--line); }
.sm-table .sm-center .sm-draw { width: auto; margin-right: calc(var(--pw) * .25); }
.sm-table .sm-center .sm-draw .card { --w: calc(var(--pw) * .72); }
.sm-table .sm-center .sm-pile > .card { --w: var(--pw); }
.sm-table .sm-center .sm-pile .nc-val { bottom: 15px; }
.sm-table .sm-cap { font-size: clamp(11px, 1.1vw, 17px); height: auto; min-height: 15px; line-height: 1.25; }
.sm-boards { display: grid; gap: 8px; grid-template-columns: 1fr; }
.sm-table.tv .sm-boards { grid-template-columns: repeat(2, 1fr); gap: 14px; }
.sm-table.tv.n5 .sm-boards, .sm-table.tv.n6 .sm-boards { grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sm-board { padding: 8px 10px; border-radius: 16px; background: rgba(0, 0, 0, .28); border: 1px solid var(--line); }
.sm-board.up { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold), 0 0 18px rgba(255, 207, 74, .4); }
.sm-board.tm0 { border-left: 6px solid #4dd4ff; } .sm-board.tm1 { border-left: 6px solid #ff8a4d; }
.sm-bh { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.sm-bh .nm { font-weight: 800; font-size: clamp(14px, 1.5vw, 24px); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-hc { color: var(--mute); font-size: 13px; }
.sm-bb { display: flex; align-items: flex-start; gap: 10px; }
.sm-bs { display: grid; justify-items: center; gap: 2px; flex: none; }
.sm-bs .card { --w: var(--sw); }
.sm-bds { display: flex; gap: 6px; flex: 1; justify-content: flex-end; padding-right: 6px; }
.sm-bd { position: relative; }
.sm-bd .card { --w: var(--dw); }
.sm-table.phone .sm-bh { margin-bottom: 4px; }
.sm-table.phone .sm-bb { align-items: center; }
.sm-table.phone .sm-bs { grid-auto-flow: column; align-items: center; gap: 8px; }
.sm-table.phone .sm-bs .sm-cap { white-space: nowrap; }
.sm-table .sm-n { font-size: 10px; min-width: 16px; height: 16px; line-height: 13px; }
@media (prefers-reduced-motion: reduce) { .sm-pile.ok .card::after, .sm-stock.hot .card::after, .tp-grp.ok::after { animation: none !important; } }
.sm-table { grid-template-columns: minmax(0, 1fr); }
.sm-table.phone { --pw: 56px; --sw: 50px; --dw: 32px; }
.sm-table.phone .sm-center { gap: 8px; padding: 10px 6px 6px; }
.sm-table.phone .sm-center .sm-draw { margin-right: 4px; }
.sm-table.phone .sm-center .sm-draw .card { --w: 38px; }
.sm-table.phone .sm-bds { gap: 5px; }
.sm-table.phone .sm-board { padding: 6px 8px; }

/* ---------- Ten Phases (public/games/tenphases.js, tenphases-editor.js) ---------- */
/* STATIONARY: every phone row has a fixed height; the table box is the only flexible one and scrolls inside itself. The hand is 11 fixed slots. */
.tp-phone { position: relative; display: flex; flex-direction: column; gap: 4px; min-height: calc(100vh - 236px); min-height: calc(100dvh - 236px); } /* the page (bar 65 + strip 54 + this + Leave button) is exactly one screen tall on a 375x812 phone */
.tp-phone .status { flex: none; height: 44px; min-height: 44px; padding: 0 6px; margin: 0; line-height: 1.15; font-size: 17px; align-content: center; }
.tp-phone .status small { display: block; font-weight: 600; font-size: 12px; color: var(--mute); }
.tp-phone .status.go span { color: var(--gold); }
.tp-pls { flex: none; display: flex; gap: 6px; height: 50px; overflow-x: auto; scrollbar-width: none; }
.tp-pl { flex: 1 0 96px; display: grid; align-content: center; min-width: 0; padding: 2px 4px; border-radius: 10px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); line-height: 1.2; }
.tp-pl.up { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 10px rgba(255, 207, 74, .35); }
.tp-pl b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-pl span { font-size: 12px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-pl.laid span:last-child { color: #7ee79a; }
.tp-info { flex: none; height: 40px; display: grid; align-content: center; padding: 0 8px; border-radius: 10px; background: rgba(255, 207, 74, .12); border: 1px solid rgba(255, 207, 74, .4); line-height: 1.2; }
.tp-info b { font-size: 13px; color: var(--gold); } .tp-info span { font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-chips { flex: none; display: flex; gap: 8px; height: 44px; overflow-x: auto; scrollbar-width: none; align-items: stretch; }
.tp-chips.msg { align-items: center; padding: 0 8px; font-size: 12.5px; color: #7ee79a; font-weight: 700; }
.tp-chip { flex: 1 0 auto; display: flex; align-items: center; justify-content: center; gap: 5px; padding: 0 7px; border-radius: 10px; border: 2px solid var(--line); background: rgba(0, 0, 0, .3); color: var(--ink); font: 800 13px/1 inherit; white-space: nowrap; }
.tp-chip small { font-size: 12px; color: var(--mute); } .tp-chip.done small { color: #7ee79a; }
.tp-chip:disabled { opacity: .5; }
.tp-chip.t0.on, .tp-chip.t0.done { border-color: #ffcf4a; } .tp-chip.t1.on, .tp-chip.t1.done { border-color: #4dd4ff; } .tp-chip.t2.on, .tp-chip.t2.done { border-color: #ff6fd8; } .tp-chip.td.on { border-color: #fff; }
.tp-chip.on { background: rgba(255, 255, 255, .16); }
.tp-midw { position: relative; flex: 1 1 0; display: flex; min-height: 124px; } /* basis 0: laid-down groups scroll inside the box, they never push the buttons and hand down (Stephen, 2026-11-02) */
.tp-midw > .tp-mid { min-height: 0; }
.tp-mid { flex: 1; overflow-y: auto; padding: 3px 6px 6px; border-radius: 12px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); }
.tp-over { position: absolute; inset: -48px 0 -100px; z-index: 20; overflow: auto; } /* hand-over / Skip boxes also cover the phase-chip row and the (then useless) Draw/Take/Lay down row, so the whole box is readable */
.tp-over .panel, .tp-over .panel.sm-hover { margin: 0; min-height: 100%; box-sizing: border-box; padding: 8px 10px; background: var(--panel-solid, #10241b) !important; text-align: center; } /* solid: the table used to show through the text */
.tp-over .panel .lbl { margin-bottom: 2px; } .tp-over .panel .big-note { font-size: 16px; }
.tp-over .sm-res td, .tp-over .sm-res th { font-size: 13px; padding: 1px 4px; } .tp-over .sm-res th { white-space: nowrap; } .tp-over .fine { font-size: 12px; margin: 2px 0; }
.tp-over .btn { display: block; width: 100%; margin: 4px 0; }
.tp-none { padding: 18px 8px; text-align: center; color: var(--mute); font-size: 13px; }
.tp-pth { font-size: 12px; color: var(--mute); margin-top: 4px; } .tp-pth b { color: var(--ink); }
.tp-gs { display: grid; gap: 2px; }
.tp-grp { display: flex; align-items: center; gap: 8px; padding: 2px 6px; border-radius: 8px; background: rgba(255, 255, 255, .07); border: 2px solid transparent; }
.tp-phone .tp-grp { --gw: 30px; }
.tp-grp[data-grp] { cursor: pointer; }
.tp-grp.ok { position: relative; border-color: var(--gold); box-shadow: 0 0 10px rgba(255, 207, 74, .55); }
.tp-gl { flex: none; min-width: 36px; font: 800 11px/1.1 inherit; color: var(--mute); text-transform: capitalize; } .tp-gl small { display: block; font-weight: 600; font-size: 10px; }
.tp-gc { display: flex; padding-right: calc(var(--gw) * .5); }
.tp-gcard { position: relative; display: block; margin-right: calc(var(--gw) * -.5); }
.tp-gcard .card { --w: var(--gw); }
.tp-v { position: absolute; left: 50%; bottom: -2px; transform: translateX(-50%); font: 900 9px/12px Arial, sans-serif; min-width: 14px; text-align: center; padding: 0 3px; border-radius: 7px; background: #1b1433; color: #fff; border: 1px solid #fff; font-style: normal; }
.tp-act { flex: none; display: grid; grid-template-columns: 86px 86px 1fr; gap: 8px; height: 96px; }
.tp-ovs, .sm-overw { display: contents; } /* always there, so a Skip prompt / hand-over box appearing doesn't rebuild the table list under it (Stephen, 2026-11-02) */
.tp-phone .status, .sm-phone .status { overflow: hidden; }
.tp-btns .btn.discard { background: #3a6ea8; border-color: #3a6ea8; color: #fff; font-weight: 800; } /* a key action: solid, not a ghost (Stephen, 2026-11-02) */
.tp-btns .btn.discard:disabled { background: rgba(58, 110, 168, .45); }
.tp-pile { display: grid; justify-items: center; align-content: center; gap: 3px; padding: 3px; border-radius: 12px; border: 2px solid var(--line); background: rgba(0, 0, 0, .3); color: var(--ink); font: 700 12px/1.1 inherit; }
.tp-pile .card { --w: 38px; } .tp-pile span:last-child { white-space: nowrap; }
.tp-pile:not(:disabled) { border-color: var(--gold); box-shadow: 0 0 12px rgba(255, 207, 74, .5); }
.tp-pile:disabled { opacity: .5; }
.tp-btns { display: grid; grid-template-rows: 1fr 1fr; gap: 8px; }
.tp-btns .btn { margin: 0; padding: 0 8px; font-size: 16px; } .tp-btns .btn:disabled { opacity: .35; }
.tp-dock { flex: none; }
.tp-hand { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0 4px; justify-items: center; padding-top: 10px; }
.tp-hs { position: relative; display: grid; justify-items: center; width: 100%; cursor: pointer; }
.tp-hs:nth-child(n+7) { margin-top: -34px; }
.tp-hs .card { --w: min(58px, calc((100vw - 54px) / 6)); transition: transform .12s; } /* 6 cards must fit the page width: 58px each pushed the hand 9px past the screen edge, which made phones zoom the whole page out (the 910 vs 831 "scroll") */
.tp-hs .card.sel { transform: translateY(-9px); }
.tp-hs.t0 .card { box-shadow: 0 0 0 3px #ffcf4a; } .tp-hs.t1 .card { box-shadow: 0 0 0 3px #4dd4ff; } .tp-hs.t2 .card { box-shadow: 0 0 0 3px #ff6fd8; } .tp-hs.td .card { box-shadow: 0 0 0 3px #fff; }
.tp-tag { position: absolute; top: -8px; right: 2px; z-index: 3; min-width: 18px; height: 18px; border-radius: 9px; color: #111; font: 900 11px/18px Arial, sans-serif; text-align: center; font-style: normal; }
.tp-hs.t0 .tp-tag { background: #ffcf4a; } .tp-hs.t1 .tp-tag { background: #4dd4ff; } .tp-hs.t2 .tp-tag { background: #ff6fd8; } .tp-hs.td .tp-tag { background: #fff; }
.tp-dock .my-pts { text-align: center; font-size: 12.5px; color: var(--mute); height: 18px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-dock .my-pts b { color: var(--ink); }
/* the table view (TV, or "Whole table" on a phone) */
.tp-table { --pw: 56px; --gw: 26px; display: grid; gap: 10px; }
.tp-table.tv { --pw: clamp(70px, 7vw, 130px); --gw: clamp(34px, 3.2vw, 58px); gap: 16px; }
.tp-piles { display: flex; justify-content: center; gap: calc(var(--pw) * .6); padding: 10px; border-radius: 20px; background: rgba(0, 0, 0, .22); border: 1px solid var(--line); }
.tp-pp { display: grid; justify-items: center; gap: 3px; } .tp-pp .card { --w: var(--pw); }
.tp-boards { display: grid; gap: 8px; grid-template-columns: 1fr; }
.tp-table.tv .tp-boards { grid-template-columns: repeat(2, 1fr); gap: 14px; }
.tp-board { padding: 8px 10px; border-radius: 16px; background: rgba(0, 0, 0, .28); border: 1px solid var(--line); }
.tp-board.up { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold), 0 0 18px rgba(255, 207, 74, .4); }
.tp-bh { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.tp-bh .nm { font-weight: 800; font-size: clamp(14px, 1.5vw, 24px); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-bp { font-weight: 800; color: var(--gold); font-size: clamp(12px, 1.2vw, 20px); } .tp-bs { color: var(--mute); font-size: clamp(12px, 1.2vw, 20px); }
.tp-wait { color: var(--mute); font-size: clamp(12px, 1.1vw, 18px); padding: 4px 0; }
.tp-list { margin: 4px 0 0; padding-left: 22px; font-size: 14px; line-height: 1.5; }
/* the House Rules phase editor */
.tpe { display: grid; gap: 10px; }
.tpe-phase { padding: 10px; border-radius: 14px; background: rgba(0, 0, 0, .22); border: 1px solid var(--line); display: grid; gap: 8px; }
.tpe-phase.bad { border-color: #ff7b6b; }
.tpe-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; } .tpe-prev { font-weight: 800; flex: 1; min-width: 0; } .tpe-cnt { color: var(--mute); font-size: 12.5px; }
.tpe-part { display: flex; align-items: center; gap: 8px; }
.tpe-part select { min-height: 42px; padding: 0 8px; border-radius: 10px; font: 700 15px/1 inherit; background: #1b1433; color: #fff; border: 1px solid var(--line); }
.tpe-part select[data-ed="type"] { flex: 1; min-width: 0; } .tpe-of { color: var(--mute); }
.tpe-tools { display: flex; gap: 6px; align-items: center; } .tpe-sp { flex: 1; }
.tpe .btn.small { min-height: 40px; padding: 0 12px; }
.tpe .btn:disabled { opacity: .35; }

/* ---------- Starship Battle (public/games/starship.js) ---------- */
/* Graphics pass 2026-10-30. Art in public/img/starship (see its README.md): RealVisXL nebula backdrops and asteroids, wildcardx XL
   ship sprites. STATIONARY: banner, board, bar and bottom row have fixed heights; every effect lives in the grid's overlay
   (.sa-ov, transform/opacity only) so nothing in the layout ever moves, shifts or resizes. */
.sa-phone { display: block; --sa-cy: #5fe3ff; --sa-line: rgba(130, 195, 255, .2); }
.sa-phone .btn:active { transform: none; }
.sa-banner { height: 44px; display: grid; place-items: center; text-align: center; font-weight: 800; font-size: 16px; line-height: 1.15; overflow: hidden; padding: 0 6px; letter-spacing: .02em;
  background: linear-gradient(180deg, rgba(8, 28, 52, .75), rgba(8, 28, 52, .25)); border-bottom: 1px solid rgba(95, 227, 255, .35); border-radius: 8px 8px 0 0; }
.sa-banner.mine { color: var(--gold); border-bottom-color: var(--gold); }
.sa-gw { position: relative; }
.sa-grid { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 0; background: #060e22 url(img/starship/space-own.jpg) center / cover; border: 2px solid rgba(95, 227, 255, .55); border-radius: 8px; padding: 0; width: 100%;
  box-shadow: 0 0 14px rgba(95, 227, 255, .22), inset 0 0 24px rgba(0, 0, 0, .5); overflow: hidden; }
.sa-grid.enemy { background-image: url(img/starship/space-enemy.jpg); border-color: rgba(255, 110, 130, .6); box-shadow: 0 0 14px rgba(255, 90, 120, .25), inset 0 0 24px rgba(0, 0, 0, .5); }
.sa-grid.own, .sa-grid.enemy { grid-template-columns: 16px repeat(var(--n), 1fr); grid-template-rows: 14px; }
.sa-grid .ax { font: 700 10px/14px ui-monospace, Consolas, monospace; color: #86dcff; display: block; text-align: center; background: rgba(4, 10, 24, .72); height: 14px; min-height: 0; }
.sa-grid.enemy .ax { color: #ff9fb0; }
.sa-c { position: relative; aspect-ratio: 1; padding: 0; border: 0; border-radius: 0; background: rgba(4, 12, 30, .32); box-shadow: inset 0 0 0 .5px var(--sa-line); min-width: 0; cursor: pointer; }
.sa-grid.mini .sa-c { cursor: default; background: rgba(4, 12, 30, .2); }
.sa-grid.enemy .sa-c { box-shadow: inset 0 0 0 .5px rgba(255, 170, 190, .2); }
/* tactical-display corners (static) */
.sa-gw::before, .sa-gw::after { content: ''; position: absolute; width: 14px; height: 14px; z-index: 3; pointer-events: none; border: 0 solid var(--sa-cy); }
.sa-gw::before { left: -1px; top: -1px; border-width: 2px 0 0 2px; border-top-left-radius: 8px; }
.sa-gw::after { right: -1px; bottom: -1px; border-width: 0 2px 2px 0; border-bottom-right-radius: 8px; }
.sa-gw.enemy::before, .sa-gw.enemy::after { border-color: #ff6e82; }
.sa-gw.mini::before, .sa-gw.mini::after { display: none; }
.sa-c.sa-rock { background-color: transparent; }
.sa-c.sa-wreck { background: rgba(120, 20, 10, .28); }
.sa-c.sa-pt { background: rgba(40, 150, 190, .2); }
.sa-c.sa-pre { background: rgba(60, 200, 230, .28); box-shadow: inset 0 0 0 1px var(--sa-cy); }
.sa-c.sa-drop-ok { background: rgba(60, 230, 120, .34) !important; box-shadow: inset 0 0 0 1px #6be37a; }
.sa-c.sa-drop-bad { background: rgba(240, 70, 70, .34) !important; box-shadow: inset 0 0 0 1px #ff6e6e; }
/* markers (persistent) */
.sa-mk.miss::after { content: ''; position: absolute; inset: 34%; border-radius: 50%; border: 1.5px solid rgba(120, 190, 255, .6); background: rgba(80, 150, 230, .18); }
.sa-mk.hit::before { content: ''; position: absolute; inset: -6% -10% 18% 14%; border-radius: 50%; background: radial-gradient(circle at 55% 60%, rgba(40, 36, 40, .8), rgba(40, 36, 40, 0) 68%); }
.sa-mk.hit::after { content: ''; position: absolute; inset: 14%; border-radius: 50%; background: radial-gradient(circle, #fff3b0 0 14%, #ffa030 32%, #e0401a 56%, rgba(120, 20, 10, 0) 74%); animation: saEmber 1.6s ease-in-out infinite alternate; }
.sa-mk.shield::after { content: ''; position: absolute; inset: 16%; border-radius: 50%; border: 2px solid var(--sa-cy); box-shadow: 0 0 6px var(--sa-cy), inset 0 0 5px rgba(95, 227, 255, .5); }
.sa-c.sa-aim { box-shadow: inset 0 0 0 1.5px var(--gold); background: rgba(255, 207, 74, .14); }
.sa-c.sa-aim::after { content: ''; position: absolute; inset: 8%; background: radial-gradient(circle, transparent 0 40%, var(--gold) 42% 52%, transparent 54%), linear-gradient(var(--gold), var(--gold)) center / 2px 100% no-repeat, linear-gradient(var(--gold), var(--gold)) center / 100% 2px no-repeat; }
.sa-gw.mini .sa-mk.hit::after { inset: 0; }
.sa-gw.mini .sa-mk.hit::before { display: none; }
.sa-gw.mini .sa-mk.miss::after { inset: 30%; border-width: 1px; }
@keyframes saEmber { from { opacity: .72; } to { opacity: 1; } }
/* the overlay: sprites and one-shot effects, same tracks as the cells, never takes taps (except your own ships while placing) */
.sa-ov { position: absolute; left: 2px; top: 2px; right: 2px; bottom: 2px; display: grid; grid-template-columns: 16px repeat(var(--n), 1fr); grid-template-rows: 14px repeat(var(--n), 1fr); pointer-events: none; overflow: hidden; border-radius: 6px; z-index: 2; }
.sa-gw.mini .sa-ov { grid-template-columns: repeat(var(--n), 1fr); grid-template-rows: repeat(var(--n), 1fr); }
.sa-ov > *, .sa-lay > * { position: relative; min-width: 0; min-height: 0; }
.sa-lay { display: contents; } /* three stable layers (ships, markers, one-shot effects) so a change in one never rebuilds the others (Stephen, 2026-11-02) */
.sa-rk { background: var(--img) center / 118% 118% no-repeat; }
.sa-sp { z-index: 1; }
.sa-sp i { position: absolute; left: 50%; top: 50%; width: calc(100% * var(--len)); height: calc(100% / var(--len)); transform: translate(-50%, -50%); background: var(--img) center / 100% 100% no-repeat; }
.sa-sp.v i { transform: translate(-50%, -50%) rotate(90deg); }
.sa-sp.h i { width: 100%; height: 100%; }
.sa-sp.own { pointer-events: auto; touch-action: none; cursor: grab; }
.sa-sp.sel i { filter: drop-shadow(0 0 3px var(--gold)) drop-shadow(0 0 1px var(--gold)); }
.sa-sp.drag { opacity: .3; }
.sa-sp.sunk i, .sa-sp.reveal i { filter: grayscale(.7) brightness(.68) sepia(.5) saturate(1.6) hue-rotate(-25deg); }
.sa-sp.reveal i { opacity: .75; }
.sa-sp.fresh i { animation: saReveal calc(.9s * var(--spd, 1)) ease-out both; animation-delay: calc(var(--d, 0) * 1s * var(--spd, 1) + .25s); }
@keyframes saReveal { 0% { opacity: 0; filter: brightness(4) saturate(0); } 40% { opacity: 1; filter: brightness(2.2) sepia(1) saturate(3); } 100% { opacity: 1; } }
.sa-shd { border: 1.5px solid rgba(95, 227, 255, .8); border-radius: 999px; background: radial-gradient(ellipse, rgba(95, 227, 255, .06), rgba(95, 227, 255, .22)); box-shadow: 0 0 7px rgba(95, 227, 255, .6), inset 0 0 6px rgba(95, 227, 255, .45); animation: saPulse 2.4s ease-in-out infinite alternate; z-index: 2; }
.sa-shd.pop { animation: saBubble calc(.7s * var(--spd, 1)) ease-out both; animation-delay: calc(var(--d, 0) * 1s * var(--spd, 1) + .2s); }
@keyframes saPulse { from { opacity: .55; } to { opacity: 1; } }
@keyframes saBubble { 0% { opacity: 1; background: rgba(200, 250, 255, .85); box-shadow: 0 0 14px #fff, inset 0 0 10px #fff; } 100% { opacity: 0; } }
.sa-mk { z-index: 3; }
.sa-pnum { display: grid; place-items: center; font: 800 11px ui-monospace, Consolas, monospace; color: var(--sa-cy); text-shadow: 0 0 4px #000, 0 0 2px #000; z-index: 2; }
/* one-shot effects */
.fx { z-index: 4; }
.fx-bolt { overflow: hidden; }
.fx-bolt::before { content: ''; position: absolute; left: 50%; width: 3px; margin-left: -1.5px; top: 0; bottom: 0; background: linear-gradient(to top, rgba(255, 60, 80, 0), #ff5470 40%, #fff 100%); box-shadow: 0 0 6px #ff4060, 0 0 12px #ff4060; transform-origin: bottom; transform: scaleY(0); opacity: 0;
  animation: saBolt calc(.34s * var(--spd, 1)) ease-out both; animation-delay: calc(var(--d, 0) * 1s * var(--spd, 1)); }
.fx-bolt.dn::before { transform-origin: top; background: linear-gradient(to bottom, rgba(255, 60, 80, 0), #ff5470 40%, #fff 100%); }
.fx-bolt.mine::before { background: linear-gradient(to top, rgba(95, 227, 255, 0), #3cc8ff 40%, #fff 100%); box-shadow: 0 0 6px #35c0ff, 0 0 12px #35c0ff; }
@keyframes saBolt { 0% { transform: scaleY(0); opacity: 1; } 55% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }
.fx-ripple::before, .fx-ripple::after { content: ''; position: absolute; inset: 15%; border-radius: 50%; border: 1.5px solid rgba(140, 200, 255, .9); opacity: 0; animation: saRipple calc(.8s * var(--spd, 1)) ease-out both; animation-delay: calc(var(--d, 0) * 1s * var(--spd, 1) + .2s); }
.fx-ripple::after { animation-delay: calc(var(--d, 0) * 1s * var(--spd, 1) + .38s); }
@keyframes saRipple { 0% { transform: scale(.15); opacity: .95; } 100% { transform: scale(1.6); opacity: 0; } }
.fx-burst::before { content: ''; position: absolute; inset: -45%; border-radius: 50%; background: radial-gradient(circle, #fff 0 12%, #ffd060 24%, #ff7a20 44%, rgba(220, 50, 20, .6) 62%, rgba(220, 50, 20, 0) 74%); opacity: 0; animation: saBurst calc(.6s * var(--spd, 1)) ease-out both; animation-delay: calc(var(--d, 0) * 1s * var(--spd, 1) + .2s); }
.fx-burst::after { content: ''; position: absolute; inset: 5%; border-radius: 50%; border: 2px solid #ffd060; opacity: 0; animation: saRing calc(.5s * var(--spd, 1)) ease-out both; animation-delay: calc(var(--d, 0) * 1s * var(--spd, 1) + .24s); }
@keyframes saBurst { 0% { transform: scale(.2); opacity: 1; } 35% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.35); opacity: 0; } }
@keyframes saRing { 0% { transform: scale(.4); opacity: 1; } 100% { transform: scale(1.9); opacity: 0; } }
.fx-bubble::before { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #aaf4ff; background: rgba(95, 227, 255, .3); box-shadow: 0 0 10px var(--sa-cy); opacity: 0; animation: saBub calc(.7s * var(--spd, 1)) ease-out both; animation-delay: calc(var(--d, 0) * 1s * var(--spd, 1) + .2s); }
@keyframes saBub { 0% { transform: scale(.4); opacity: 1; } 100% { transform: scale(1.9); opacity: 0; } }
.fx-wave { display: block; overflow: hidden; }
.fx-wave::before { content: ''; position: absolute; left: 50%; top: 50%; width: calc(100% * var(--wd)); aspect-ratio: 1; margin: 0; border-radius: 50%; border: 3px solid #ffb060; box-shadow: 0 0 10px #ff7a20, inset 0 0 10px #ff7a20; opacity: 0; transform: translate(-50%, -50%) scale(.1); animation: saWave calc(.8s * var(--spd, 1)) ease-out both; animation-delay: calc(var(--d, 0) * 1s * var(--spd, 1) + .2s); }
@keyframes saWave { 0% { transform: translate(-50%, -50%) scale(.1); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; } }
.fx-flash { background: rgba(255, 60, 60, .45); opacity: 0; animation: saFlash calc(.5s * var(--spd, 1)) ease-out both; animation-delay: calc(var(--d, 0) * 1s * var(--spd, 1) + .2s); }
@keyframes saFlash { 0% { opacity: 1; } 100% { opacity: 0; } }
.fx-sweep { overflow: hidden; border: 1px solid rgba(95, 227, 255, .8); background: rgba(95, 227, 255, .08); opacity: 0; animation: saSweepBox calc(1.5s * var(--spd, 1)) linear both; }
.fx-sweep::before { content: ''; position: absolute; left: 50%; top: 50%; width: 220%; aspect-ratio: 1; margin: -110% 0 0 -110%; background: conic-gradient(from 0deg, rgba(95, 227, 255, 0) 0deg, rgba(95, 227, 255, 0) 250deg, rgba(95, 227, 255, .75) 358deg, #d8fbff 360deg); border-radius: 50%; animation: saSpin calc(1.5s * var(--spd, 1)) linear both; }
@keyframes saSpin { to { transform: rotate(540deg); } }
@keyframes saSweepBox { 0% { opacity: 0; } 10%, 85% { opacity: 1; } 100% { opacity: 0; } }
/* reduced motion: no travel, no spin; short fades only */
@media (prefers-reduced-motion: reduce) {
  .sa-mk.hit::after, .sa-shd { animation: none !important; }
  .fx-bolt::before, .fx-ripple::before, .fx-ripple::after, .fx-wave::before, .fx-sweep::before { animation: none !important; display: none; }
  .fx-burst::before { animation: saFade .8s ease-out both !important; transform: none; inset: 0; }
  .fx-burst::after { display: none; }
  .fx-bubble::before { animation: saFade .8s ease-out both !important; inset: 0; }
  .fx-flash { animation: saFade .6s ease-out both !important; }
  .fx-sweep { animation: saSweepBox 1.2s linear both !important; }
  .sa-sp.fresh i, .sa-shd.pop { animation: saFade .8s ease-out reverse both !important; }
  @keyframes saFade { 0% { opacity: 1; } 100% { opacity: 0; } }
}
.sa-bar { height: 56px; display: flex; gap: 8px; align-items: center; margin: 8px 0 0; }
.sa-bar .sa-fire { flex: 1; height: 52px; margin: 0; padding: 0 10px; font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sa-bar .sa-ping { width: 108px; height: 52px; flex: none; margin: 0; padding: 0; font-size: 16px; }
.sa-bar .sa-ping.on { background: #12404a; color: #5fe3ff; border-color: #5fe3ff; }
.sa-low { height: 150px; display: flex; gap: 10px; margin-top: 6px; overflow: hidden; }
.sa-minibox { width: 132px; flex: none; }
.sa-minibox .sa-gw { width: 132px; }
.sa-minibox small, .sa-tally small { display: block; font-size: 11px; color: var(--mute); text-transform: uppercase; letter-spacing: .04em; margin-top: 3px; white-space: nowrap; overflow: hidden; }
.sa-right { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.sa-tally { height: 76px; flex: none; overflow: hidden; }
.sa-tally small { margin: 0 0 2px; }
.sa-tg { display: grid; grid-template-columns: 1fr 1fr; gap: 1px 6px; }
.sa-t { display: flex; align-items: center; gap: 1px; height: 14px; font-size: 10px; overflow: hidden; white-space: nowrap; }
.sa-t em { font-style: normal; width: 44px; flex: none; overflow: hidden; text-overflow: ellipsis; color: var(--mute); }
.sa-t i { width: 7px; height: 7px; background: #5fb8e8; display: block; box-shadow: 0 0 3px rgba(95, 227, 255, .6); }
.sa-t.down i { background: #e5484d; box-shadow: 0 0 3px rgba(255, 90, 60, .7); }
.sa-t.down em { text-decoration: line-through; }
.sa-feed { flex: 1; font-size: 12px; line-height: 1.25; overflow: hidden; }
.sa-feed > div { margin-bottom: 2px; }
.sa-feed .dim { color: var(--mute); }
.sa-tray { height: 94px; display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 44px; /* 44px targets (Stephen, 2026-11-02) */ gap: 6px; align-content: start; margin-top: 8px; overflow: hidden; }
.sa-tray.many { grid-template-columns: repeat(4, 1fr); }
.sa-chip { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-width: 0; border: 1px solid rgba(95, 227, 255, .3); background: rgba(4, 16, 36, .6); color: var(--ink); border-radius: 8px; padding: 0 4px; height: 44px; font-weight: 700; font-size: 12px; touch-action: none; }
.sa-chip .sa-th { height: 16px; max-width: 100%; background: var(--img) center / contain no-repeat; }
.sa-chip em { font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; line-height: 1.1; }
.sa-chip b { color: var(--gold); margin-left: 3px; }
.sa-chip.done { opacity: .55; }
.sa-chip.on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); opacity: 1; }
.sa-tools { height: 40px; display: flex; gap: 6px; align-items: center; }
.sa-tools .btn { flex: 1; min-width: 0; margin: 0; height: 36px; padding: 0 4px; font-size: 14px; white-space: nowrap; overflow: hidden; }
.sa-note { height: 34px; font-size: 12px; color: var(--mute); overflow: hidden; line-height: 1.25; }
.sa-ghost { position: fixed; z-index: 70; pointer-events: none; left: 0; top: 0; filter: drop-shadow(0 0 4px rgba(0, 0, 0, .8)); opacity: .92; }
.sa-ghost i { position: absolute; left: 50%; top: 50%; background: var(--img) center / 100% 100% no-repeat; }
.sa-t em { width: 54px; }
/* landscape phones: the board takes the left, everything else stacks on the right (nothing moves between turns) */
@media (orientation: landscape) and (max-height: 560px) {
  .sa-phone { display: grid; grid-template-columns: minmax(0, calc(100vh - 100px)) minmax(0, 1fr); column-gap: 12px; align-content: start; align-items: start; }
  .sa-phone > .sa-board { grid-column: 1; grid-row: 1 / span 8; }
  .sa-phone > :not(.sa-board) { grid-column: 2; }
  .sa-banner { height: 40px; }
  .sa-bar { margin-top: 6px; }
  .sa-tg { grid-template-columns: 1fr; }
  .sa-tools .btn { font-size: 12px; padding: 0 2px; }
}
.sa-tv { text-align: center; }
.sa-tv-i { font-size: 56px; }

/* ---------- Guess Whooo? (public/games/whooo.js) ---------- */
/* Placeholder faces. STATIONARY: header, banner, board, ask bar and history have fixed heights; questions, sheets and results are fixed overlays. */
.wh-phone { display: block; }
.wh-head { height: 54px; display: flex; align-items: center; gap: 8px; }
.wh-mine { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1; }
.wh-mine > div { min-width: 0; line-height: 1.1; }
.wh-mine small, .wh-score small { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wh-mine b { font-size: 15px; }
.wh-mp { display: block; font-size: 13px; letter-spacing: 2px; }
.wh-score { text-align: right; flex: none; max-width: 40%; }
.wh-score b { font-size: 13px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wh-hb { display: flex; gap: 4px; flex: none; }
.wh-i { width: 44px; height: 44px; font-size: 18px; font-weight: 800; }   /* 44px tap target (Stephen, 2026-11-02, iPhone rules) */
.wh-i.on { background: var(--gold); color: var(--on-gold); }
.wh-banner { height: 30px; display: grid; place-items: center; text-align: center; font-weight: 800; font-size: 15px; overflow: hidden; white-space: nowrap; }
.wh-banner.mine { color: var(--gold); }
.wh-board { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; height: calc(4 * var(--rowh) + 12px); }
.wh-board.f { --rowh: 72px; } .wh-board.v { --rowh: 104px; }
.wh-card { position: relative; height: var(--rowh); padding: 3px 1px; border: 2px solid var(--line); border-radius: 10px; background: rgba(255, 253, 247, .94); color: #1c1c22; display: flex; flex-direction: column; align-items: center; gap: 1px; overflow: hidden; cursor: pointer; min-width: 0; }
.wh-card b { font-size: 11px; line-height: 1.1; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wh-card .wh-face { width: 100%; max-width: 46px; height: auto; flex: none; }
.wh-pr { width: 100%; text-align: left; padding: 0 1px; }
.wh-pl { font-size: 10px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #3a3a46; }
.wh-pl span { font-size: 9px; }
.wh-board.im { --rowh: 80px; } .wh-card .wh-img { max-width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 7px; background: #efe6d6; } .wh-board.im .wh-img { width: 100%; height: auto; }
.wh-sheet .wh-img, .wh-rev .wh-img, .wh-qm .wh-img, .wh-mine .wh-img { border-radius: 14px; object-fit: cover; }
.wh-card.down { filter: grayscale(1) brightness(.55); opacity: .55; }
.wh-card.down::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(0, 0, 0, .25) 6px 8px); }
.wh-card.aim { border-color: var(--gold); }
.wh-card.pick { box-shadow: 0 0 0 3px var(--gold); }
.wh-bar { height: 52px; display: flex; gap: 6px; align-items: center; margin-top: 6px; }
.wh-bar .wh-ask { flex: 1; min-width: 0; height: 46px; margin: 0; padding: 0 8px; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wh-bar .wh-done:not(:disabled) { background: #2fb457; color: #fff; }
.wh-bar .wh-auto { flex: none; height: 46px; padding: 0 8px; font-size: 12px; line-height: 1.1; width: 76px; }
.wh-bar .wh-gs { flex: none; height: 46px; padding: 0 12px; margin: 0; }
.wh-bar .wh-gs.on { background: var(--gold); color: var(--on-gold); }
.wh-bar .wh-in { flex: 1; min-width: 0; height: 46px; font-size: 16px; padding: 0 10px; }
.wh-bar .wh-send, .wh-bar .wh-sg { flex: none; height: 46px; padding: 0 12px; margin: 0; }
.wh-bar [disabled], .wh-bar:has(.wh-in:disabled) { opacity: .45; }
.wh-hist { height: 88px; margin-top: 6px; overflow-y: auto; font-size: 13px; line-height: 1.3; border-top: 1px solid var(--line); padding-top: 4px; }
.wh-hist > div { margin-bottom: 2px; }
.wh-hist .dim { color: var(--mute); }
.wh-hist .bad { color: #ff9a9a; } .wh-hist .ok { color: var(--go); }
.wh-hist em { font-style: normal; font-weight: 800; color: var(--gold); }
.wh-hist em.a-no, .wh-hist em.a-probablynot { color: #ff9a9a; }
/* overlays */
.gr-layer.wh-layer { position: fixed; inset: 0; z-index: 56; pointer-events: none; }
.wh-ov { position: absolute; inset: 0; display: flex; justify-content: center; pointer-events: auto; background: rgba(0, 0, 0, .55); padding: 12px; touch-action: manipulation; }
.wh-ov.top { align-items: flex-start; padding-top: 90px; background: rgba(0, 0, 0, .35); }
.wh-ov.mid { align-items: center; }
.wh-ov.bot { align-items: flex-end; padding: 0; background: rgba(0, 0, 0, .4); }
.wh-sheet, .wh-q { width: 100%; max-width: 420px; background: #1d3a2d; border: 1px solid var(--line); border-radius: 18px; padding: 16px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.wh-sheet h3 { margin: 0 0 8px; font-family: 'Fredoka', sans-serif; text-align: center; }
.wh-sheet p { margin: 8px 0; font-size: 15px; line-height: 1.35; } .wh-sheet p span { margin-right: 8px; }
.wh-sheet p.c { text-align: center; }
.wh-sheet .btn { width: 100%; margin-top: 10px; }
.wh-sheet.zc { text-align: center; } .wh-sheet.zc .wh-face { margin: 0 auto 6px; }
.wh-sheet .row { display: flex; gap: 8px; } .wh-sheet .row .btn { flex: 1; }
.wh-sheet.bot { max-width: 560px; border-radius: 18px 18px 0 0; max-height: 62vh; display: flex; flex-direction: column; padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
.wh-sh-h { display: flex; align-items: center; justify-content: space-between; } .wh-sh-h h3 { margin: 0; text-align: left; }
.wh-sc { overflow-y: auto; margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.wh-tg small { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--mute); margin-bottom: 3px; }
.wh-tg div { display: flex; flex-wrap: wrap; gap: 6px; }
.wh-tg .chip:disabled { opacity: .35; }
.wh-sug { text-align: left; border: 1px solid var(--line); background: rgba(255, 255, 255, .08); color: var(--ink); border-radius: 12px; padding: 12px; font-size: 16px; font-weight: 700; }
.wh-sug:disabled { opacity: .35; }
.wh-q { background: var(--card); color: var(--card-ink); } .wh-q small { color: #6a6a78; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.wh-qt { font-family: 'Fredoka', sans-serif; font-size: 24px; line-height: 1.2; margin: 6px 0 10px; }
.wh-qm { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 10px; color: #3a3a46; } .wh-qm .wh-face { flex: none; }
.wh-ans { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .wh-ans .btn { margin: 0; padding: 14px 6px; font-size: 18px; }
.wh-ans .btn.ghost { color: #1c1c22; background: #d9d5e4; border-color: #b9b3c9; font-weight: 800; }   /* solid, readable "No" (Stephen, 2026-11-02) */
.wh-rev { display: flex; justify-content: space-around; text-align: center; gap: 8px; } .wh-rev small { display: block; font-size: 12px; color: var(--mute); } .wh-rev .wh-face { margin: 0 auto; }

/* ---------- Yahtzee: Undo, Top 10, and the TV's side-by-side layout (games/yahtzee.js) ---------- */
/* Undo and Confirm share the Roll button's row, so nothing above or below them moves (Stephen, 2026-11-01). */
.y-phone .y-act { display: flex; gap: 8px; min-height: 52px; margin: 6px 0 8px; }
.y-phone .y-act > .btn { margin: 0; flex: 1 1 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.y-phone .y-act > .roll-btn { flex-grow: 2; }
/* Solid colours: the ghost style was hard to read on the felt (Stephen, 2026-11-01). Undo = amber, Confirm = green. */
.y-phone .undo-btn { background: #ffb300; border-color: #ffb300; color: #1c1c22; font-weight: 800; }
.y-phone .confirm-btn { background: #2fb457; border-color: #2fb457; color: #fff; font-weight: 800; }
.y-high ol { list-style: none; margin: 6px 0 0; padding: 0; counter-reset: none; }
.y-high li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 5px 8px; border-radius: 8px; font-weight: 700; }
.y-high li:nth-child(odd) { background: rgba(255,255,255,.05); }
.y-high li .rk { color: var(--gold); font-weight: 900; text-align: right; }
.y-high li .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.y-high li .sc { font-family: 'Fredoka', sans-serif; font-size: 1.15em; }
.y-high li.new { background: rgba(255, 205, 60, .22); box-shadow: inset 0 0 0 2px var(--gold); }
.y-hs-new { text-align: center; border-color: var(--gold); }
.y-hs-new .row { margin-top: 10px; flex-wrap: nowrap; } .y-hs-new input { flex: 1; min-width: 0; }
/* TV wide enough: roller, dice and Top 10 on the left; the scorecard carousel on the right (fitCards sizes it to the height). */
@media (min-width: 1100px) {
  .tv-main:has(.y-tv) { max-width: none; }
  .y-tv { display: grid; grid-template-columns: 600px minmax(0, 1fr); gap: 18px; align-items: start; }
  .y-tv .dice-tray.big { gap: 16px; padding: 26px 14px 36px; }
  .y-tv .dice-tray.big .d3 { --s: 88px; }
  .y-tv .y-high { font-size: 20px; } .y-tv .y-high .lbl { font-size: 15px; }
  .y-carousel { overflow: hidden; }
  .y-tv .y-cards.one-row { justify-content: flex-start; }
}

/* =====================================================================================================
   TABLE THEMES (docs/graphics-plan.md). The VIP picks one for the room, the TV follows, phones follow too unless a
   phone picked its own. "Classic" is the default and is simply no data-theme: everything above. Each scene below is
   a set of tokens on html[data-theme="id"]: --bg (darkest tone), --panel / --panel-solid / --panel-rgb (dark
   translucent panels, so text stays readable on a busy backdrop), --ink / --mute (always light on dark panels),
   --gold + --on-gold (accent and the text on it, contrast-checked), --wood (table rail), --surface + --tile (the table
   top texture), --dim-rgb / --dim (darkens a light surface so cards and white text read), --shade (darkens the backdrop).
   Scenes only change colours and pictures, never a size, so nothing moves when the theme is switched.
   Art: 12 scenes made with RealVisXL V5.0 (see README). Images load only for the chosen scene: theme.js
   preloads the backdrop (TV or phone size) and the surface, then fades the backdrop in. */
html[data-theme] body { background: var(--bg); }
html[data-theme] { --root-bg: linear-gradient(rgb(var(--dim-rgb) / .52), rgb(var(--dim-rgb) / .74)); }
/* Full-screen games (Dominoes, Mahjong, Rummy Tiles...) cover the page, so their playing area gets the table surface too. */
html[data-theme] :is(.dm-board, .rt-board, .mj-mid) {
  background: radial-gradient(circle at 50% 45%, rgb(var(--dim-rgb) / 0) 40%, rgb(var(--dim-rgb) / .45) 100%),
    linear-gradient(rgb(var(--dim-rgb) / var(--dim)), rgb(var(--dim-rgb) / var(--dim))), var(--surface) 0 0 / var(--tile) repeat;
}
html[data-theme] .felt, html[data-theme] .oval {
  background:
    radial-gradient(circle at 50% 42%, rgb(var(--dim-rgb) / 0) 38%, rgb(var(--dim-rgb) / .5) 100%) padding-box,
    linear-gradient(rgb(var(--dim-rgb) / var(--dim)), rgb(var(--dim-rgb) / var(--dim))) padding-box,
    var(--surface) 0 0 / var(--tile) repeat padding-box,
    var(--wood) border-box;
}
html[data-theme] .dice-tray {
  background:
    radial-gradient(circle at 50% 40%, rgb(var(--dim-rgb) / 0) 38%, rgb(var(--dim-rgb) / .45) 100%),
    linear-gradient(rgb(var(--dim-rgb) / var(--dim)), rgb(var(--dim-rgb) / var(--dim))),
    var(--surface) 0 0 / var(--tile) repeat;
}
html[data-theme] .seat .nm, html[data-theme] .badge { background: rgb(var(--dim-rgb) / .78); }
html[data-theme] .seat.up .nm, html[data-theme] .pseat.up .nm { background: var(--gold); }
html[data-theme] .seat.up .face, html[data-theme] .pseat.up .face { box-shadow: 0 0 0 3px var(--gold), 0 0 18px 4px color-mix(in srgb, var(--gold) 60%, transparent); }
html[data-theme] .btn.ghost, html[data-theme] .chip:not(.on), html[data-theme] .icon-btn { background: rgb(var(--dim-rgb) / .55); }
html[data-theme] .tv-top { background: rgb(var(--panel-rgb) / .82); }
html[data-theme] .toast { background: var(--panel-solid); border: 1px solid var(--line); }

/* The backdrop picture: two stacked layers (theme.js) so a switch cross-fades; never moves anything. */
.gr-bd { position: fixed; left: 0; top: 0; width: 100%; height: 100vh; height: 100lvh; z-index: -1; /* full-screen height, not inset: 0: see the felt layer at the top */ pointer-events: none; overflow: hidden; }
.gr-bd i { position: absolute; inset: 0; background: center / cover no-repeat; opacity: 0; transition: opacity .7s ease; }
.gr-bd i.on { opacity: 1; }
.gr-bd::after { content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 62%, rgb(var(--dim-rgb) / .5), transparent 72%), rgb(var(--dim-rgb) / var(--shade)); }
html:not([data-theme]) .gr-bd { display: none; }
@media (prefers-reduced-motion: reduce) { .gr-bd i { transition: none; } }

/* The picker: thumbnails; the chosen one gets an outline (box-shadow, so nothing changes size). */
.theme-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 6px 0; }
.theme-grid.tv { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.theme-opt { display: grid; align-content: start; grid-template-rows: auto 1fr; gap: 3px; padding: 4px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .06); color: var(--ink); cursor: pointer; font: inherit; text-align: center; }
.theme-opt .sw { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 6px; object-fit: cover; background: #14472f; }
.theme-opt .sw.classic { height: 0 !important; padding-top: 56.25%; background: radial-gradient(circle at 50% 42%, #24814f, #155b3a 55%, #0d3826 100%); }
.theme-opt b { font-size: 11px; font-weight: 800; line-height: 1.15; min-height: 2.3em; display: grid; place-items: center; }
.theme-opt.on { box-shadow: 0 0 0 3px var(--gold); background: rgba(255, 255, 255, .14); }
.theme-opt:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.theme-grid.tv .theme-opt b { font-size: 15px; }
.theme-me { width: 100%; padding: 10px 12px; border-radius: 12px; font-size: 16px; font-weight: 800; background: rgb(var(--dim-rgb, 0 0 0) / .6); color: var(--ink); border: 1px solid var(--line); }
.theme-me option { color: #111; background: #fff; }

[data-theme="parlor1920s"] {
  --bg: #120d0a; --bg-solid: #100c09; --panel-rgb: 15 11 8; --panel-solid: #28231d;
  --panel: rgb(var(--panel-rgb) / .9); --line: rgba(255, 255, 255, .17);
  --ink: #f3e6cc; --mute: #cdb897; --gold: #d4a94f; --on-gold: #1b1433;
  --rail-solid: #1c1410; --wood: linear-gradient(#2e2723, #1c1410); --felt-hi: #3a342d; --felt-lo: #0e0a08;
  --surface: url("img/themes/parlor1920s-surface.webp"); --tile: 256px; --dim-rgb: 18 13 10; --dim: 0; --shade: 0.18;
}
[data-theme="diner1950s"] {
  --bg: #1b2a2e; --bg-solid: #182629; --panel-rgb: 23 36 39; --panel-solid: #323e3f;
  --panel: rgb(var(--panel-rgb) / .9); --line: rgba(255, 255, 255, .17);
  --ink: #fff4dc; --mute: #cfe3e0; --gold: #ef8e94; --on-gold: #1b1433;
  --rail-solid: #c9ced3; --wood: linear-gradient(#cdd2d7, #c9ced3); --felt-hi: #444e4d; --felt-lo: #162225;
  --surface: url("img/themes/diner1950s-surface.webp"); --tile: 256px; --dim-rgb: 27 42 46; --dim: 0.58; --shade: 0.52;
}
[data-theme="den1970s"] {
  --bg: #1e130b; --bg-solid: #1b110a; --panel-rgb: 26 16 9; --panel-solid: #34291f;
  --panel: rgb(var(--panel-rgb) / .9); --line: rgba(255, 255, 255, .17);
  --ink: #fff1d6; --mute: #e2c49a; --gold: #e7b52c; --on-gold: #1b1433;
  --rail-solid: #5b3a1f; --wood: linear-gradient(#684a31, #5b3a1f); --felt-hi: #463b30; --felt-lo: #180f09;
  --surface: url("img/themes/den1970s-surface.webp"); --tile: 256px; --dim-rgb: 30 19 11; --dim: 0.42; --shade: 0.3;
}
[data-theme="farmhouse"] {
  --bg: #2b2a24; --bg-solid: #272620; --panel-rgb: 37 36 31; --panel-solid: #403e37;
  --panel: rgb(var(--panel-rgb) / .9); --line: rgba(255, 255, 255, .17);
  --ink: #fff6e6; --mute: #e0d2b8; --gold: #9cb698; --on-gold: #1b1433;
  --rail-solid: #f2ede2; --wood: linear-gradient(#f3eee4, #f2ede2); --felt-hi: #514f47; --felt-lo: #22221d;
  --surface: url("img/themes/farmhouse-surface.webp"); --tile: 256px; --dim-rgb: 43 42 36; --dim: 0.58; --shade: 0.52;
}
[data-theme="modern"] {
  --bg: #1f2022; --bg-solid: #1c1d1f; --panel-rgb: 26 27 29; --panel-solid: #343536;
  --panel: rgb(var(--panel-rgb) / .9); --line: rgba(255, 255, 255, .17);
  --ink: #f5f3ee; --mute: #d3d0c8; --gold: #e2855d; --on-gold: #1b1433;
  --rail-solid: #c9a97a; --wood: linear-gradient(#cdb085, #c9a97a); --felt-hi: #464647; --felt-lo: #191a1b;
  --surface: url("img/themes/modern-surface.webp"); --tile: 256px; --dim-rgb: 31 32 34; --dim: 0.58; --shade: 0.52;
}
[data-theme="beach"] {
  --bg: #1d1b2e; --bg-solid: #1a1829; --panel-rgb: 25 23 39; --panel-solid: #343140;
  --panel: rgb(var(--panel-rgb) / .9); --line: rgba(255, 255, 255, .17);
  --ink: #fff3e3; --mute: #e6d3bd; --gold: #ff8a3d; --on-gold: #1b1433;
  --rail-solid: #6b5a46; --wood: linear-gradient(#776755, #6b5a46); --felt-hi: #46424f; --felt-lo: #171625;
  --surface: url("img/themes/beach-surface.webp"); --tile: 256px; --dim-rgb: 29 27 46; --dim: 0.58; --shade: 0.5;
}
[data-theme="rooftop"] {
  --bg: #070b18; --bg-solid: #060a16; --panel-rgb: 6 9 20; --panel-solid: #1e222f;
  --panel: rgb(var(--panel-rgb) / .9); --line: rgba(255, 255, 255, .17);
  --ink: #eef2fa; --mute: #a3adc2; --gold: #ffc35c; --on-gold: #1b1433;
  --rail-solid: #8c95a3; --wood: linear-gradient(#959daa, #8c95a3); --felt-hi: #313541; --felt-lo: #060913;
  --surface: url("img/themes/rooftop-surface.webp"); --tile: 256px; --dim-rgb: 7 11 24; --dim: 0; --shade: 0.15;
}
[data-theme="lodge"] {
  --bg: #15110d; --bg-solid: #130f0c; --panel-rgb: 18 14 11; --panel-solid: #2c2722;
  --panel: rgb(var(--panel-rgb) / .9); --line: rgba(255, 255, 255, .17);
  --ink: #fbefdc; --mute: #d2b894; --gold: #e8a33d; --on-gold: #1b1433;
  --rail-solid: #3b2a1c; --wood: linear-gradient(#4b3b2e, #3b2a1c); --felt-hi: #3e3932; --felt-lo: #110e0a;
  --surface: url("img/themes/lodge-surface.webp"); --tile: 256px; --dim-rgb: 21 17 13; --dim: 0.24; --shade: 0.3;
}
[data-theme="forest"] {
  --bg: #0f1a12; --bg-solid: #0e1710; --panel-rgb: 13 22 15; --panel-solid: #273028;
  --panel: rgb(var(--panel-rgb) / .9); --line: rgba(255, 255, 255, .17);
  --ink: #fffaf0; --mute: #e3dcc4; --gold: #ec7068; --on-gold: #1b1433;
  --rail-solid: #6e4f33; --wood: linear-gradient(#7a5d43, #6e4f33); --felt-hi: #3a423a; --felt-lo: #0c150e;
  --surface: url("img/themes/forest-surface.webp"); --tile: 154px; --dim-rgb: 15 26 18; --dim: 0.6; --shade: 0.5;
}
[data-theme="vegas"] {
  --bg: #07120d; --bg-solid: #06100c; --panel-rgb: 6 15 11; --panel-solid: #202922;
  --panel: rgb(var(--panel-rgb) / .9); --line: rgba(255, 255, 255, .17);
  --ink: #fff6dc; --mute: #cfe0c9; --gold: #ffd25e; --on-gold: #1b1433;
  --rail-solid: #b8893b; --wood: linear-gradient(#be924b, #b8893b); --felt-hi: #343b32; --felt-lo: #060e0a;
  --surface: url("img/themes/vegas-surface.webp"); --tile: 256px; --dim-rgb: 7 18 13; --dim: 0; --shade: 0.15;
}
[data-theme="montecarlo"] {
  --bg: #0a0f1f; --bg-solid: #090e1c; --panel-rgb: 8 13 26; --panel-solid: #212533;
  --panel: rgb(var(--panel-rgb) / .9); --line: rgba(255, 255, 255, .17);
  --ink: #f4efe3; --mute: #b7b9c9; --gold: #d6b46a; --on-gold: #1b1433;
  --rail-solid: #5a1626; --wood: linear-gradient(#672937, #5a1626); --felt-hi: #343742; --felt-lo: #080c19;
  --surface: url("img/themes/montecarlo-surface.webp"); --tile: 256px; --dim-rgb: 10 15 31; --dim: 0; --shade: 0.15;
}
[data-theme="neon"] {
  --bg: #0b0614; --bg-solid: #0a0512; --panel-rgb: 9 5 17; --panel-solid: #221d2c;
  --panel: rgb(var(--panel-rgb) / .9); --line: rgba(255, 255, 255, .17);
  --ink: #f5efff; --mute: #b9a6dc; --gold: #ff3fb4; --on-gold: #1b1433;
  --rail-solid: #141018; --wood: linear-gradient(#27232a, #141018); --felt-hi: #35303e; --felt-lo: #090510;
  --surface: url("img/themes/neon-surface.webp"); --tile: 256px; --dim-rgb: 11 6 20; --dim: 0; --shade: 0.12;
}.menu-box { max-height: calc(100vh - 32px); overflow-y: auto; }

/* Games that draw their own translucent boxes straight on the page (Mahjong's TV seats): a dark tint so they read on any scene. */
html[data-theme] .mj-tv .side, html[data-theme] .mj-tv .ctr, html[data-theme] .mj-tv .center { background: rgb(var(--panel-rgb) / .86); }

/* Yahtzee in the TV app (games/yahtzee.js, .y-big; table.js leaves it out of the scaled box): the roller and dice in a band
   across the top, then the scorecards with both halves side by side, blown up by fitCards to fill the rest of the screen.
   Turn order left to right; the next player's card peeks in at the right edge. */
html.tv-app .y-tv.y-big { display: flex; flex-direction: column; gap: 14px; }
html.tv-app .y-big .y-band { display: flex; align-items: center; justify-content: center; gap: 40px; }
html.tv-app .y-big .y-band .y-roller { justify-content: flex-start; }
html.tv-app .y-big .y-band .big-name { font-size: 40px; }
html.tv-app .y-big .y-band .fine { font-size: 26px; }
html.tv-app .y-big .dice-tray.big { margin: 0; gap: 22px; padding: 18px 26px 30px; }
html.tv-app .y-big .dice-tray.big .d3 { --s: 92px; }
html.tv-app .y-big .y-band .y-high { min-width: 520px; font-size: 24px; }
html.tv-app .y-big .y-carousel { overflow: hidden; }
html.tv-app .y-big .y-cards.one-row { justify-content: flex-start; gap: 18px; }
html.tv-app .y-big .y-cards.one-row .y-card { flex: none; max-width: none; }
html.tv-app .y-big .y-card-h { display: none; } /* the name is on the card */
html.tv-app .y-big .ycard-wrap.wide { width: 640px; }
html.tv-app .y-big .ycard-wrap.triple.wide { width: 900px; }
html.tv-app .y-big .y-halves { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start; }
html.tv-app .y-big .ycard-wrap.wide .y-top { align-items: center; }
html.tv-app .y-big .ycard-wrap.wide .y-banner { width: 44%; }
html.tv-app .y-big .ycard-wrap.wide .y-joke { margin-top: 4px; }
html.tv-app .y-big .y-carousel { width: 100%; max-width: calc(100vw - 192px); }
/* bigger words for the couch: labels were 12px in 27px rows (made for the "How to Score" column, which the TV drops) */
html.tv-app .y-big .ycard-wrap.wide .ycard th, html.tv-app .y-big .ycard-wrap.wide .ycard td { height: 31px; }
html.tv-app .y-big .ycard-wrap.wide .ycard thead th { font-size: 13px; height: 26px; }
html.tv-app .y-big .ycard-wrap.wide .ycard .lab .nm { font-size: 16px; }
html.tv-app .y-big .ycard-wrap.wide .ycard .lab .nm.sm { font-size: 14px; }
html.tv-app .y-big .ycard-wrap.wide .ycard .lab .nm.big { font-size: 17px; }
html.tv-app .y-big .ycard-wrap.wide .ycard .lab small { font-size: 10.5px; }
html.tv-app .y-big .ycard-wrap.wide .ycard tr.sec th { font-size: 15px; }
html.tv-app .y-big .ycard-wrap.wide .ycard .lab .eq { font-size: 12px; }
html.tv-app .y-big .ycard-wrap.wide .ycard td.v .handwritten { font-size: 26px; }
html.tv-app .y-big .ycard-wrap.wide .ycard tr.grand td .handwritten { font-size: 32px; }
html.tv-app .y-big .ycard-wrap.wide .y-joke { font-size: 12px; }
html.tv-app .tv-main:has(.y-big) { overflow: hidden; }

/* Phone strip: 112px kept room for the scores row; with a TV showing the scores it's one line, so it shrinks to fit. */
#strip .strip:not(:has(.s-scores)) { height: auto; }
/* Yahtzee phone: dice and Roll closer together, and the card runs to the bottom of the screen (games/yahtzee.js fitPhoneCard) */
/* Always exactly two lines tall, so the dice and card below never shift when the words change. */
.y-phone .status { min-height: 0; margin: 2px 0 4px; line-height: 1.2; height: 2.4em; overflow: hidden; display: flex; align-items: center; justify-content: center; text-align: center; }
.y-phone .dice-tray { margin: 4px 0; padding: 16px 12px 24px; }
.y-phone .roll-btn { padding: 12px; }
.y-phone .y-scroll { margin-top: 0; }
html.tv-app .y-big .dice-tray.big { padding: 14px 24px 24px; }
html.tv-app .y-big .dice-tray.big .d3 { --s: 84px; }
html.tv-app .y-big .ycard-wrap.wide .y-banner { width: 34%; }
html.tv-app .y-big .ycard-wrap.wide .y-top { margin-bottom: 2px; }
html.tv-app .tv-main:has(.y-big) { padding-top: 18px; }

/* Yahtzee TV: an always-on pane down the right (scores, then the Top 10), like an arcade's score display.
   Left: the dice band, then the current player's big card with the next one peeking in. */
html.tv-app .y-tv.y-big { display: grid; grid-template-columns: minmax(0, 1fr) 470px; grid-template-rows: auto 1fr; column-gap: 28px; row-gap: 14px; }
html.tv-app .y-big .y-band { grid-column: 1; grid-row: 1; }
html.tv-app .y-big .y-carousel { grid-column: 1; grid-row: 2; max-width: none; min-width: 0; }
html.tv-app .y-big .y-pane { grid-column: 2; grid-row: 1 / span 2; display: grid; gap: 16px; align-content: start; min-width: 0; }
html.tv-app .y-big .y-pane .panel { margin: 0; padding: 18px 20px; }
html.tv-app .y-big .y-pane .lbl { font-size: 22px; margin-bottom: 8px; }
html.tv-app .y-stand ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
html.tv-app .y-stand li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 12px; border-radius: 12px; font-size: 28px; font-weight: 700; }
html.tv-app .y-stand li .nm { display: grid; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.15; }
html.tv-app .y-stand li .got { font-size: 20px; font-weight: 600; color: var(--gold); }
html.tv-app .y-stand li .sc { font-family: var(--k-font-display); font-size: 36px; font-variant-numeric: tabular-nums; }
html.tv-app .y-stand li.up { background: rgba(255, 255, 255, .1); box-shadow: inset 4px 0 0 var(--gold); }
html.tv-app .y-stand li.lead .sc { color: var(--gold); }
html.tv-app .y-stand li.just .sc { animation: popIn calc(.5s * var(--spd)) cubic-bezier(.3, 1.6, .5, 1); }
html.tv-app .y-big .y-pane .y-high { font-size: 24px; }
html.tv-app .y-big .y-pane .y-high li { padding: 4px 8px; }
html.tv-app body.tv .y-big .y-pane .lbl { font-size: 24px; letter-spacing: .08em; }
html.tv-app body.tv .y-big .y-pane .fine { font-size: 24px; }
html.tv-app body.tv .y-big .y-pane .y-high li { font-size: 26px; grid-template-columns: 40px minmax(0, 1fr) auto; }
/* Yahtzee TV, take two (Stephen, 2026-11-01): the dice, then the scores and Top 10 down the LEFT; one whole scorecard on the
   RIGHT, drawn like the paper card (not split in halves) at a fixed width, then zoomed to the screen's height (fitCards). */
html.tv-app .y-tv.y-big { grid-template-columns: minmax(0, 430px) minmax(0, 1fr); column-gap: 24px; }
html.tv-app .y-big .y-band { grid-column: 1; grid-row: 1; flex-direction: column; align-items: stretch; gap: 10px; }
html.tv-app .y-big .y-band .dice-tray.big { justify-content: center; }
html.tv-app .y-big .y-pane { grid-column: 1; grid-row: 2; }
html.tv-app .y-big .y-carousel { grid-column: 2; grid-row: 1 / span 2; display: flex; justify-content: center; align-items: flex-start; }
html.tv-app .y-big .y-cards { display: block; }
html.tv-app .y-big .y-cards .y-card { margin: 0; }
/* The card is the star (Stephen, 2026-11-01: "super nice and visible"): no How to Score column, short rows with big writing and a
   small logo, so zooming to the screen's height makes the words and numbers as big as they can be. The left side shrinks to make room. */
html.tv-app .y-big .ycard-wrap.classic { width: 800px; } /* six game columns across; fitCards still zooms to the screen */
html.tv-app .y-big .ycard-wrap.triple { width: 800px; }
html.tv-app .y-big .ycard-wrap { padding: 4px 5px 5px; }
html.tv-app .y-big .ycard-wrap .y-top { margin-bottom: 2px; align-items: center; }
html.tv-app .y-big .ycard-wrap .y-banner { width: 40%; max-width: 170px; }
html.tv-app .y-big .ycard-wrap.triple .y-banner { width: 34%; }
html.tv-app .y-big .ycard th, html.tv-app .y-big .ycard td { height: 21px; padding: 0 4px; line-height: 1; }
html.tv-app .y-big .ycard thead th { height: 18px; font-size: 11px; }
html.tv-app .y-big .ycard .lab .nm { font-size: 15px; }
html.tv-app .y-big .ycard .lab .nm.sm { font-size: 13px; }
html.tv-app .y-big .ycard .lab .nm.big { font-size: 16px; }
html.tv-app .y-big .ycard .lab small { font-size: 9.5px; }
html.tv-app .y-big .ycard tr.sec th { height: 18px; font-size: 13px; }
html.tv-app .y-big .ycard td.v .handwritten { font-size: 23px; line-height: .9; }
html.tv-app .y-big .ycard tr.grand th, html.tv-app .y-big .ycard tr.grand td { height: 26px; }
html.tv-app .y-big .ycard tr.grand td .handwritten { font-size: 30px; }
html.tv-app .y-big .ycard-wrap .y-joke { margin-top: 3px; font-size: 11px; }
/* the left side, smaller */
html.tv-app .y-big .y-band .big-name { font-size: 32px; }
html.tv-app .y-big .y-band .fine { font-size: 20px; }
html.tv-app .y-big .y-band .dice-tray.big { padding: 12px 14px 18px; gap: 12px; }
html.tv-app .y-big .y-band .dice-tray.big .d3 { --s: 64px; }
html.tv-app .y-big .y-pane { gap: 12px; }
html.tv-app .y-big .y-pane .panel { padding: 12px 14px; }
html.tv-app body.tv .y-big .y-pane .lbl { font-size: 18px; }
html.tv-app .y-big .y-stand li { font-size: 22px; padding: 5px 10px; grid-template-columns: 32px minmax(0, 1fr) auto; }
html.tv-app .y-big .y-stand li .sc { font-size: 28px; }
html.tv-app .y-big .y-stand li .got { font-size: 16px; }
html.tv-app body.tv .y-big .y-pane .y-high li { font-size: 19px; padding: 2px 6px; grid-template-columns: 30px minmax(0, 1fr) auto; }
html.tv-app body.tv .y-big .y-pane .fine { font-size: 18px; }

/* Yahtzee phone: everyone's scorecard in a swipe row (yours first); name chips show whose card you're on, tap one to jump */
.y-who { display: flex; gap: 6px; margin: 0 0 6px; overflow-x: auto; scrollbar-width: none; }
.y-who::-webkit-scrollbar { display: none; }
.y-who .chip { flex: none; min-height: 30px; padding: 3px 12px; font-size: 13px; }
.y-who .chip b { margin-left: 4px; font-variant-numeric: tabular-nums; }
.y-who .chip.up { box-shadow: inset 0 -2px 0 var(--gold); }
.y-swipe { display: flex; gap: 10px; overflow-x: auto; overflow-y: hidden; align-items: flex-start; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; }
.y-swipe::-webkit-scrollbar { display: none; }
.y-swipe > .y-paper { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; margin: 0; }

/* Yahtzee teams (Stephen, 2026-11-01): the lobby's two columns, the dot by a name, and the scoreboard line on screens with no side pane */
.y-tsplit { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0 8px; }
/* the team colours are Euchre's: .t0 / .t1 set --tc (blue / orange) */
.y-tcol { display: grid; gap: 6px; align-content: start; padding: 8px; border-radius: 12px; background: rgba(0, 0, 0, .22); border: 2px solid var(--tc, var(--line)); }
.y-tcol .lbl { margin: 0; color: var(--tc); }
.y-tcol .y-tp { display: flex; align-items: center; gap: 8px; min-width: 0; justify-content: flex-start; text-align: left; }
.y-tcol .y-tp .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
div.y-tp { padding: 6px 10px; font-weight: 700; }
.ytm { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: middle; background: var(--tc, var(--gold)); }
.y-teams { display: flex; flex-wrap: wrap; gap: 6px 12px; justify-content: center; margin: 6px 0; font-weight: 800; }
.y-tm { padding: 3px 12px; border-radius: 999px; background: rgba(0, 0, 0, .25); border: 2px solid var(--tc, var(--gold)); }
.y-tm.up { background: rgba(255, 255, 255, .14); }
.y-tm.won { box-shadow: 0 0 0 3px var(--gold); }
.y-tm b { margin-left: 4px; font-variant-numeric: tabular-nums; }

/* ---------- Guess Whooo? Hot Takes (public/games/whooo.js: hotPhone / hotTable) ---------- */
/* Phone */
.wo-phone { display: grid; gap: 10px; }
.wo-ph-h { display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: 800; color: var(--mute); }
.wo-ph-h b { color: var(--gold); }
.wo-q { font-family: 'Fredoka', sans-serif; font-size: 24px; line-height: 1.2; text-align: center; padding: 10px 8px; min-height: 80px; display: grid; place-items: center; border-radius: 14px; background: rgba(0,0,0,.25); }
.wo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wo-pick { display: grid; justify-items: center; gap: 2px; padding: 8px 6px; min-height: 64px; border-radius: 14px; border: 3px solid transparent; background: rgba(255,255,255,.08); color: inherit; font: inherit; cursor: pointer; }
.wo-pick b { font-size: 16px; } .wo-pick small { font-size: 12px; color: var(--mute); line-height: 1.2; text-align: center; }
.wo-pick.on { border-color: var(--gold); background: rgba(255,207,74,.18); }   /* no scale: the picked card must not grow into its neighbours (Stephen, 2026-11-02) */
.wo-pick:disabled { opacity: .7; }
.wo-st { text-align: center; font-size: 15px; min-height: 2.5em; display: grid; place-items: center; } .wo-st.dim { color: var(--mute); font-size: 13px; }   /* two lines of room: the text under the choices never changes their height */
.wo-vr.ph { visibility: hidden; animation: none; height: 44px; }   /* a vote not shown yet keeps its row, so the list never grows or re-pops */
.wo-votes { display: grid; gap: 6px; }
.wo-vr { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 12px; background: rgba(255,255,255,.07); animation: wo-pop calc(.35s * var(--spd, 1)) ease-out; }
.wo-vr span { font-weight: 700; } .wo-vr i { color: var(--mute); font-style: normal; } .wo-vr b { margin-left: auto; }
.wo-res { text-align: center; font-size: 17px; display: grid; gap: 4px; } .wo-res b { color: var(--gold); } .wo-res div { font-size: 14px; color: var(--mute); }
.wo-rank > div, .wo-verd > div { display: flex; align-items: center; gap: 8px; padding: 4px 6px; }
.wo-rank b { margin-left: auto; font-size: 18px; color: var(--gold); }
.wo-verd small { display: block; font-size: 12px; color: var(--mute); } .wo-verd .wo-face { flex: none; }
@keyframes wo-pop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }

/* TV (inside the fit area: px only, text 30px+) */
.wo-tv { width: 100%; }
.wo-tv-in { display: grid; gap: 24px; padding: 8px 12px; }
.wo-top { display: flex; justify-content: space-between; font-size: 30px; font-weight: 800; color: var(--mute); }
.wo-tq { font-family: 'Fredoka', sans-serif; font-size: 64px; line-height: 1.1; text-align: center; margin: 0; }
.wo-line { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; align-items: start; }
.wo-c { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 14px 8px; border-radius: 22px; background: rgba(255,255,255,.07); min-height: 560px; align-content: start; }
.wo-cf { position: relative; }
.wo-crown { position: absolute; top: -34px; left: 50%; transform: translateX(-50%); font-size: 64px; animation: wo-pop calc(.5s * var(--spd, 1)) ease-out; }
.wo-c > b { font-size: 36px; line-height: 1.1; } .wo-c > small { font-size: 30px; line-height: 1.15; color: var(--mute); }
.wo-chips { display: grid; gap: 8px; width: 100%; margin-top: 6px; }
.wo-chip { display: flex; align-items: center; gap: 8px; padding: 4px 10px; border-radius: 30px; background: var(--gold); color: var(--on-gold, #1d1a24); font-size: 30px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  animation: wo-pop calc(.45s * var(--spd, 1)) ease-out; }
.wo-n { font-size: 56px; font-weight: 900; color: var(--gold); min-height: 64px; }
.wo-tv-ppl { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 22px; }
.wo-pp { display: inline-flex; align-items: center; gap: 10px; font-size: 32px; font-weight: 700; padding: 6px 16px; border-radius: 40px; background: rgba(255,255,255,.08); }
.wo-pp i { font-style: normal; color: var(--mute); } .wo-pp.in i { color: #6be37a; } .wo-pp.in { background: rgba(107,227,122,.16); }
.wo-pp b { color: var(--gold); } .wo-pp em { font-style: normal; color: #6be37a; font-weight: 900; }
.wo-tick { display: flex; justify-content: center; min-height: 72px; }
.wo-tk { display: inline-flex; align-items: center; gap: 14px; font-size: 44px; animation: wo-pop calc(.4s * var(--spd, 1)) ease-out; } .wo-tk b { color: var(--gold); }
.wo-tv-verd { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 30px; }
.wo-tv-verd > div { display: flex; align-items: center; gap: 18px; } .wo-tv-verd .wo-face { flex: none; }
.wo-tv-verd small { display: block; font-size: 30px; color: var(--mute); } .wo-tv-verd b { font-size: 40px; } .wo-tv-verd em { font-style: normal; font-size: 30px; color: var(--gold); margin-left: 12px; }

/* Guess Whooo? board pinch-zoom window + big card (public/games/whooo.js board / overlay) */
.wh-bwin { container-type: inline-size; height: calc(4 * var(--rowh) + 12px); overflow: auto; touch-action: pan-x pan-y; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.wh-bwin > .wh-board { width: 100cqw; } /* the window's width in container units, so CSS zoom makes the grid wider and it scrolls */
.wh-bwin.f { --rowh: 72px; } .wh-bwin.v { --rowh: 104px; } .wh-bwin.im { --rowh: 80px; }
.wh-sheet.zc.big .wh-face { width: min(240px, 62vw); height: auto; }
.wh-sheet.zc.big.isdown .wh-face { filter: grayscale(1) brightness(.6); }
.wh-tl { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 4px 0 6px; }
.wh-tl span { padding: 4px 10px; border-radius: 20px; background: rgba(255,255,255,.12); font-size: 15px; font-weight: 700; }
.wh-tl.dim { color: var(--mute); font-size: 14px; }

/* ---------- Game show (Yahtzee): the YouTube picture-in-picture box and the VIP's link box (show-music.js, play.js) ---------- */
.yt-pip { position: fixed; left: 14px; bottom: 14px; width: clamp(200px, 22vw, 360px); aspect-ratio: 16 / 9; z-index: 40;
  border-radius: 14px; overflow: hidden; background: #000; box-shadow: 0 6px 22px rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.18); }
.yt-pip iframe, .yt-pip #yt-pip-player { width: 100%; height: 100%; display: block; border: 0; }
.yt-pip .yt-msg { position: absolute; inset: auto 0 0 0; padding: 6px 8px; font-size: 12px; line-height: 1.3; color: #fff; background: rgba(0,0,0,.72); }
.yt-pip .yt-msg:only-child { position: static; height: 100%; display: grid; place-items: center; text-align: center; }
.yt-form { display: flex; gap: 6px; margin: 4px 0 6px; }
.yt-form .btn { flex: none; width: auto; }
.yt-form .yt-link { flex: 1; min-width: 0; width: auto; font: inherit; padding: 8px 10px; border-radius: 12px; /* dark glass like the lobby selects (room.css) */
  background: rgba(255,255,255,.08); color: var(--ink); border: 1px solid rgba(255,255,255,.18); }
.yt-form .yt-link::placeholder { color: rgba(255,255,255,.45); }
/* The FINAL ROUND banner: a deep red stage light instead of the gold flash. */
.moment.final .banner b { font-family: var(--k-font-display, 'Fredoka', sans-serif); text-transform: uppercase; letter-spacing: .08em; }
.moment.final .flash { background: radial-gradient(circle at 50% 45%, rgba(255,70,70,.55), rgba(120,0,0,.0) 65%); }

/* ---------- Yahtzee sheet: six game columns, series (Stephen, 2026-11-01; games/yahtzee.js card()) ---------- */
/* Separate borders so the frozen name column keeps its lines while the others slide under it. */
.ycard.sheet { border-collapse: separate; border-spacing: 0; border-top: 1px solid var(--navy); border-left: 1px solid var(--navy); }
.ycard.sheet th, .ycard.sheet td { border-width: 0 1px 1px 0; }
.ycard.sheet thead tr:nth-child(2) th { top: 24px; }
.ycard.sheet td.fill { background: #fff; }
.ycard.sheet th.gh { letter-spacing: .08em; }
.ycard.sheet td.fut, .ycard.sheet th.fut { background-image: linear-gradient(rgba(20, 40, 107, .05), rgba(20, 40, 107, .05)); }
.ycard.sheet thead th.fut { opacity: .55; }
/* the game in play: a soft gold tint all the way down, and a bold header */
.ycard.sheet td.cur:not(.just), .ycard.sheet th.v.cur { box-shadow: inset 0 0 0 100px rgba(255, 207, 74, .2); }
.ycard.sheet thead th.cur { color: var(--navy); background: #ffe9a8; }
.ycard.sheet td.gs, .ycard.sheet th.gs { border-left: 2px solid var(--navy); }
.ycard.sheet td.past .handwritten { opacity: .92; }
.ycard.sheet tr.wins td { height: 26px; }
.ycard tr.wins .hw-check { display: inline-block; position: static; width: 22px; height: 22px; vertical-align: middle; }
.ycard.sheet tr.serie td { height: 30px; }
.ycard .stk { text-align: center; } .ycard .serx { margin-left: 8px; font-size: 10px; font-weight: 800; opacity: .75; text-transform: uppercase; }
.ycard .slide { display: block; font-size: 8px; font-weight: 800; opacity: .6; letter-spacing: .06em; }
.ycard.sheet tr.sec th.lab { height: 22px; white-space: nowrap; }
.ycard-wrap.compact .ycard tr.sec th.lab { font-size: 10px; letter-spacing: 0; }
.ycard .lab .nm.sm { white-space: nowrap; }
/* Phone: the card slides sideways inside itself (the page's name chips still switch players). Three game columns show; the names
   column stays put. Widths are container units so the pieces always add up to exactly two "pages" of three columns. */
.y-hs { container-type: inline-size; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.y-hs .ycard.sheet { width: 169cqw; }
.y-hs col.cl { width: 31cqw; } .y-hs col.cc { width: 23cqw; }
.y-hs .ycard th.lab { position: sticky; left: 0; z-index: 1; background: #fff; box-shadow: 1px 0 0 var(--navy); }
.y-hs .ycard thead th.lab { z-index: 4; }
.y-hs .y-top, .y-hs .y-joke { position: sticky; left: 0; width: 100cqw; box-sizing: border-box; }
.y-hs .stk { position: sticky; left: 31cqw; width: 69cqw; }
.ycard-wrap.compact .ycard th, .ycard-wrap.compact .ycard td { padding: 0 2px; }
.ycard-wrap.compact .ycard .lab .nm { font-size: 11px; } .ycard-wrap.compact .ycard .lab .nm.sm { font-size: 9.5px; }
.ycard-wrap.compact .ycard td.v .handwritten { font-size: 20px; }
.ycard-wrap.compact .ycard tr.grand td .handwritten { font-size: 24px; }
.ycard-wrap.compact .ycard .score-btn { font-size: 18px; width: calc(100% - 4px); }
.ycard-wrap.compact .cbox { width: 13px; height: 13px; } .ycard-wrap.compact .cboxes { gap: 2px; white-space: nowrap; }
.ycard-wrap.compact .ycard .lab small { font-size: 8px; }
.ycard-wrap.compact .ycard .lab .dice { margin-left: 2px; }
/* series line above the name chips, the result between games, the amber "are you sure" Roll button */
.y-ser { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; margin: 0 0 4px; font-size: 12px; font-weight: 800; color: var(--gold); }
.y-ser span { color: var(--ink); font-weight: 700; }
.y-between { text-align: center; margin: 6px 0 8px; } .y-between .btn { margin-top: 8px; }
.y-stand .y-serline { margin: -4px 0 6px; }
html.tv-app .y-stand li .y-sx { font-size: 16px; color: inherit; opacity: .8; }
/* Scores pane in a series (2026-11-06): overall, then each game's score. Base sizes for a laptop table; the TV app's below. */
.y-stand ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.y-stand li { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 10px; font-weight: 700; }
.y-stand li .nm { display: grid; min-width: 0; line-height: 1.15; }
.y-stand li .sc { font-family: var(--k-font-display, 'Fredoka', sans-serif); font-size: 22px; font-variant-numeric: tabular-nums; }
.y-stand li.up { background: rgba(255, 255, 255, .1); box-shadow: inset 4px 0 0 var(--gold); }
.y-stand li .y-sx b { color: var(--gold); }
.y-stand .y-games { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 13px; font-weight: 600; opacity: .85; }
.y-stand .y-games span { white-space: nowrap; }
.y-stand .y-games .won b { color: var(--gold); }
.y-stand .y-games .now { opacity: .7; font-style: italic; }
html.tv-app .y-stand li .y-sx { font-size: 20px; opacity: .9; }
html.tv-app .y-stand .y-games { font-size: 18px; gap: 2px 14px; }
.y-phone .y-act > .roll-btn.sure { background: #ffb300; border-color: #ffb300; color: #1c1c22; font-weight: 800; white-space: normal; font-size: 13px; line-height: 1.1; padding: 6px 8px; }
html.tv-app .y-big .y-between { margin: 0; } html.tv-app .y-big .y-between .big-name { font-size: 30px; } html.tv-app .y-big .y-between .fine { font-size: 20px; }
html.tv-app .y-big .ycard.sheet thead tr:nth-child(2) th { top: 18px; }
