/* The play screen of Zoongo (spec 05 UI-07..UI-19, 06, 07): look B with the chosen elements (docs/plan/decisions.md No 4, 5, 9, 10).
   The same layout that drew the accepted frame (docs/plan/look/: mock.css, theme-b.css, elements/options.css - chosen 2.2.3.3.3),
   with the measured sizes read from the frame variables --f-* (src/game/view/theme.js FRAME_A writes them). Fonts and the kit
   colour roles - src/theme/ui-theme.css. Phone below 900 px, desktop from 900 px, landscape phone below 500 px of height.
   Source text is ASCII. */

/* ---- theme of look B ---- */
:root {
  --font-head: "Oswald", sans-serif; --font-num: "Oswald", sans-serif; --font-text: "Source Sans 3", sans-serif;
  --page: #3a2552; --ink: #24182f; --ink-soft: rgba(36,24,47,.5); --print: #2d2340;
  --radius: 6px; --radius-big: 12px;
  --chip: linear-gradient(#fdf0d8, #f0d6a8);
  --chip-shadow: inset 0 0 0 2px #2d2340, inset 0 2px 0 rgba(255,255,255,.6), 3px 3px 0 #2d2340, 0 6px 10px rgba(20,10,40,.35);
  --card: linear-gradient(rgba(255,255,255,0) 0 60%, rgba(255,255,255,.08)), radial-gradient(130% 100% at 30% 0%, #fdf0d6, #f1d6a6 70%, #e4bf84);
  --card-shadow: inset 0 0 0 4px #2d2340, inset 0 0 0 7px #e9c48a, inset 0 10px 18px rgba(255,255,255,.35), 0 4px 0 #1d1630, 0 18px 32px rgba(20,10,40,.5);
  --num: #24182f; --tab-ink: #fdf0d8;
  --stamp-alpha: .62; --stamp-filter: none; --stamp-mini: #e2603f; --nest: radial-gradient(circle at 50% 40%, #fdf0d8 0 22%, #e0a04a 23% 42%, #2d2340 43% 100%);
  /* a lighter orange with dark ink (decisions No 17; UI-36: cream on orange was 2.8-3.4:1 by the frame) */
  --bingo: linear-gradient(180deg, #f6926a, #ee7a52 55%, #e2683f);
  --bingo-ink: #24182f; --bingo-shadow: inset 0 0 0 3px #2d2340, inset 0 3px 0 rgba(255,255,255,.35), 4px 4px 0 #2d2340, 0 12px 22px rgba(20,10,40,.45);
  --bingo-press: inset 0 0 0 3px #2d2340, 1px 1px 0 #2d2340; --bingo-glow: 0 0 0 6px rgba(255,209,102,.45), 0 0 30px 10px rgba(255,180,90,.55);
  --near: #ffd166; --need: #2d2340; --need-ink: #fdf0d8; --bubble: #fdf0d8; --bubble-ink: #24182f; --focus: #ffd166;
  --confetti: #e2603f, #ffd166, #2f8fa3, #3f6b4a, #fdf0d8, #9fc3dd; --confetti-blend: source-over;
}
.h-forest { --hab: #3f6b4a; --hab-tex: repeating-linear-gradient(90deg, rgba(0,0,0,.12) 0 3px, transparent 3px 8px); }
.h-savanna { --hab: #e0a04a; --hab-tex: repeating-linear-gradient(0deg, rgba(0,0,0,.1) 0 2px, transparent 2px 7px); }
.h-ocean { --hab: #2f8fa3; --hab-tex: repeating-radial-gradient(circle at 50% 140%, rgba(255,255,255,.18) 0 2px, transparent 2px 8px); }
.h-polar { --hab: #8fb6d6; --hab-tex: repeating-linear-gradient(45deg, rgba(255,255,255,.25) 0 2px, transparent 2px 8px); }
.h-jungle { --hab: #5c8f2e; --hab-tex: repeating-linear-gradient(135deg, rgba(0,0,0,.12) 0 3px, transparent 3px 9px); }
/* habitat-dependent tokens: declared on the element that carries the habitat class */
.cell, .tab, .ball {
  --cell: linear-gradient(180deg, color-mix(in srgb, var(--hab) 14%, #fff4de), color-mix(in srgb, var(--hab) 30%, #f2d7a9));
  --cell-shadow: inset 0 2px 0 rgba(255,255,255,.5), inset 0 -3px 0 rgba(0,0,0,.16), 2px 2px 0 rgba(45,35,64,.75), 0 4px 7px rgba(20,10,40,.22);
  --tab-shadow: inset 0 0 0 2px #2d2340, inset 0 3px 0 rgba(255,255,255,.25), 2px 2px 0 #2d2340;
  --ball: radial-gradient(circle at 36% 28%, #fff7e6 0 12%, #f3dcb0 40%, #e3b878 85%);
  --ball-shadow: inset 0 0 0 3px #2d2340, inset 0 0 0 8px color-mix(in srgb, var(--hab, #e2603f) 85%, transparent), inset 0 -6px 8px rgba(80,40,20,.25), 3px 3px 0 #2d2340, 0 8px 14px rgba(20,10,40,.4);
  --ball-shadow-s: inset 0 0 0 2px #2d2340, inset 0 0 0 5px color-mix(in srgb, var(--hab, #e2603f) 85%, transparent), 2px 2px 0 #2d2340;
}
.tab { text-shadow: 2px 2px 0 #2d2340; letter-spacing: .02em; }
.cell .num { font-weight: 700; }
/* stamp ink darkened toward the print colour: plain habitat paint at .5 vanished on the light savanna and polar cells (sheet 17.11.2026) */
.cell .stamp svg { fill: color-mix(in srgb, var(--hab) 72%, #2d2340); }
.count, .call-line, .bot .bname { color: #fdf0d8; text-shadow: 0 2px 0 rgba(20,10,40,.6); }
.top .count b { color: #ffd166; }
.sheet h2 { text-transform: uppercase; }
/* deal of look B (spec 07 VFX-09): the plaque rises from under the edge and swings open on its top hinges */
.card { animation-name: deal-b; animation-duration: .6s; animation-timing-function: cubic-bezier(.2,.9,.3,1); transform-origin: 50% 0; }
@keyframes deal-b { 0% { transform: translateY(140px) rotateX(75deg); opacity: 0; } 35% { opacity: 1; } 70% { transform: translateY(-4px) rotateX(-9deg); } 100% { transform: none; } }

/* ---- layout and motion ---- */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
/* the app root of the page template has no height of its own: the play grid grew by its content, the card never knew the
   screen's height (FIXES "Play screen - the card fits the screen") */
#app { height: 100%; }
body { background: var(--page); color: var(--ink); font-family: var(--font-text); overflow: hidden; }
.scene { position: fixed; inset: 0; z-index: 0; overflow: hidden; }
.scene svg { width: 100%; height: 100%; display: block; }
.zg { position: relative; z-index: 1; height: 100%; display: grid; gap: 8px; padding: 8px var(--f-pad) var(--f-pad);
  grid-template-columns: minmax(0, 1fr); grid-template-rows: var(--f-top-h) auto minmax(0, 1fr); grid-template-areas: "top" "side" "play"; max-width: 520px; margin: 0 auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }

/* top bar */
.top { grid-area: top; display: flex; align-items: center; gap: 8px; }
.icon-btn { width: var(--f-btn); height: var(--f-btn); display: grid; place-items: center; border-radius: var(--radius); background: var(--chip); box-shadow: var(--chip-shadow); }
.icon-btn svg { width: 28px; height: 28px; fill: var(--ink); }
.icon-btn .lbl { display: none; }
.pattern { display: flex; align-items: center; gap: 6px; padding: 0 12px; height: var(--f-pattern-h); border-radius: var(--radius); /* the corners of the buttons next to it (decision 36; it was a 20 px pill) */ background: var(--chip); box-shadow: var(--chip-shadow); font-size: 15px; font-weight: 700; }
/* a two-line name ("Full / card" on a phone) keeps its lines close (owner, test address 20.11.2026) */
.pattern span { line-height: 1.05; }
.pattern svg { width: 28px; height: 28px; fill: var(--ink); color: var(--ink); } /* icons >= 28 px on the phone (spec 05 UI-32) */
.count { margin-left: auto; font-size: 15px; white-space: nowrap; } .count b { font-family: var(--font-num); font-size: 18px; }

/* caller, board, bots, BINGO (phone: one strip above the cards) */
.side { grid-area: side; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "caller bots" "call call" "board board" "bingo bingo"; gap: 6px 10px; align-items: center; }
.caller { grid-area: caller; display: flex; gap: 8px; align-items: center; min-width: 0; }
.parrot { width: var(--f-parrot); height: var(--f-parrot); flex: none; transform-origin: 50% 90%; transition: transform .16s; }
.parrot[data-pose="call"] { transform: rotate(-8deg) scale(1.08); }
.parrot[data-pose="point"] { transform: rotate(10deg) translateX(4px); }
.parrot[data-pose="party"] { animation: party .5s cubic-bezier(.3,1.6,.5,1) infinite alternate; }
@keyframes party { from { transform: translateY(0) rotate(-6deg); } to { transform: translateY(-10px) rotate(6deg); } }
.current { min-width: 0; }
/* the call line has its own row over the whole width: every animal name of both languages fits in one line at 15 px (the longest,
   "G-60 - wandering albatross" in ru, 234 of 366 px; in the 176 px of the host column a third of the names were cut - spec 05 UI-13, UI-45) */
.call-line { grid-area: call; font-size: var(--f-call); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ball { display: inline-grid; place-items: center; border-radius: 50%; position: relative; font-family: var(--font-num); line-height: 1; }
.ball.big { width: var(--f-ball); height: var(--f-ball); background: var(--ball); box-shadow: var(--ball-shadow); }
.ball .bl { font-size: 14px; font-weight: 800; opacity: .8; } .ball.big .bn { font-size: var(--f-ball-num); font-weight: 800; }
.ball.big.pop { animation: pop .66s cubic-bezier(.2,1.5,.4,1); }
@keyframes pop { 0% { transform: translateY(26px) scale(.4); opacity: 0; } 55% { transform: translateY(-6px) scale(1.12); opacity: 1; } 75% { transform: scale(.96); } 100% { transform: none; } }
.board { grid-area: board; display: flex; gap: 6px; min-height: 40px; }
.ball.small { width: var(--f-ball-s); height: var(--f-ball-s); background: var(--ball); box-shadow: var(--ball-shadow-s); animation: slide .24s ease-out; }
.ball.small .bl { display: none; } /* the column of a board ball reads from its number and ring (UI-32: no letters below 14 px) */ .ball.small .bn { font-size: 16px; font-weight: 800; }
@keyframes slide { from { transform: translateX(-24px); opacity: 0; } }
.bots { grid-area: bots; display: flex; gap: 6px; }
.bot { position: relative; width: 56px; text-align: center; }
.bot .face { width: var(--f-face); height: var(--f-face); margin: 0 auto; border-radius: 50%; background: var(--chip); box-shadow: var(--chip-shadow); padding: 4px; transition: transform .24s cubic-bezier(.3,1.6,.5,1); }
.bot .face svg { width: 100%; height: 100%; }
.bot .bname { font-size: var(--f-bot-name); } .bot .need { position: absolute; top: -4px; right: 0; min-width: var(--f-need); height: var(--f-need); border-radius: 11px; font: 800 14px/var(--f-need) var(--font-num); background: var(--need); color: var(--need-ink); }
.bot.near .face { transform: translateY(-3px) scale(1.1); box-shadow: var(--chip-shadow), 0 0 0 3px var(--near); }
.bot.near .need { background: var(--near); animation: pop .4s cubic-bezier(.2,1.5,.4,1); }
.bubble:empty { display: none; } .bubble { position: absolute; top: -34px; right: 30px; white-space: nowrap; padding: 4px 8px; border-radius: 10px; background: var(--bubble); color: var(--bubble-ink); font-size: 13px; box-shadow: var(--chip-shadow); animation: slide .2s ease-out; }
.bingo { grid-area: bingo; height: var(--f-bingo-h); border-radius: var(--f-bingo-r); font: 900 var(--f-bingo-font)/1 var(--font-head); letter-spacing: .06em; background: var(--bingo); color: var(--bingo-ink); box-shadow: var(--bingo-shadow); position: relative; transition: transform .09s ease-out; }
.bingo:active { transform: translateY(3px); box-shadow: var(--bingo-press); }
.ready .bingo { animation: ready 1.2s ease-in-out infinite; box-shadow: var(--bingo-shadow), var(--bingo-glow); }
@keyframes ready { 50% { transform: scale(1.04); } }
.bingo.shake { animation: shake .3s; } @keyframes shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.bingo .cool { position: absolute; inset: 6px; border-radius: inherit; border: 3px solid transparent; }
.bingo.cooling .cool { border-top-color: currentColor; animation: spin 2s linear forwards; } @keyframes spin { to { transform: rotate(360deg); opacity: 0; } }

/* cards */
.play { grid-area: play; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
/* the minis share the width evenly (owner, test address 20.11.2026: they sat at the left) */
.minis { display: flex; justify-content: space-evenly; gap: 8px; margin-bottom: 36px; }
.mini { position: relative; width: 72px; height: 72px; padding: 8px; border-radius: 12px; background: var(--card); box-shadow: var(--card-shadow); opacity: .75; }
.mini.on { opacity: 1; outline: 3px solid var(--focus); }
.mini .dots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; } .mini .dots i { aspect-ratio: 1; border-radius: 50%; border: 1.5px solid var(--ink-soft); }
.mini .dots i.on, .mini .dots i.x { background: var(--stamp-mini); border-color: transparent; }
.mini .miss { position: absolute; top: -8px; right: -8px; min-width: 24px; height: 24px; border-radius: 12px; font: 800 13px/24px var(--font-num); background: var(--near); color: var(--need-ink); }
/* the note under a mini wraps inside the mini's own width ("to full 24" was wider than a mini: 3-4 notes ran into one line) */
.mini .mneed { position: absolute; left: 50%; width: 86px; transform: translateX(-50%); top: calc(100% + 5px); font-size: 14px; font-weight: 600; line-height: 1.1; text-align: center;
  color: #fdf0d8; text-shadow: 0 2px 0 rgba(20,10,40,.6); } /* soft cream over the scene, like the call line (owner 20.11.2026) */
.cards { display: flex; gap: 16px; justify-content: center; }
/* the card fits any screen (FIXES "Play screen - the card fits the screen"): the cards take the rest of the column as a size
   container; with square cells a card W wide is W + tab + 6 high, so W <= rest - tab - 10 (the 4 px shadow); the numbers
   follow the card's own width */
.play > .cards { flex: 1 1 0; min-height: 0; container-type: size; align-items: flex-start; } /* the card keeps its own height, not the container's */
.card { --fit-w: calc(100cqh - var(--f-tab-h) - 10px); container-type: inline-size; }
.card { display: none; width: min(100%, var(--f-card-w), var(--fit-w, 100%)); padding: var(--f-card-pad); border-radius: var(--f-card-r); background: var(--card); box-shadow: var(--card-shadow); position: relative; animation: deal .6s cubic-bezier(.2,1.2,.4,1); }
.card.focus { display: block; }
@keyframes deal { from { transform: translateY(40px) rotateX(30deg); opacity: 0; } }
.ctabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--f-gap); margin-bottom: 6px; }
.tab { height: var(--f-tab-h); display: grid; place-items: center; border-radius: var(--radius) var(--radius) 4px 4px; background: var(--hab); background-image: linear-gradient(rgba(0,0,0,.38), rgba(0,0,0,.38)), var(--hab-tex); /* the habitat and its texture a shade darker (x .62) under cream letters - decisions No 17; UI-36: I 2.0, G 1.9, N 3.3, O 3.4:1 before */ box-shadow: var(--tab-shadow); font: 900 var(--f-tab-font)/1 var(--font-head); color: var(--tab-ink); }
.cgrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--f-gap); }
.cell { position: relative; aspect-ratio: 1; border-radius: var(--radius); background: var(--cell); box-shadow: var(--cell-shadow); display: grid; place-items: center; overflow: visible; transition: transform .2s; }
.cell .num { font: 800 min(var(--f-cell-num), 10cqw)/1 var(--font-num); color: var(--num); position: relative; z-index: 2; }
.cell .glyph { position: absolute; right: 4px; bottom: 4px; width: 32%; height: 32%; fill: var(--hab); opacity: .75; }
.cell .stamp { --stamp-from: scale(1.15) rotate(-8deg); position: absolute; inset: 8%; display: grid; place-items: center; opacity: 0; transform: var(--stamp-from); pointer-events: none; z-index: 1; }
.cell .stamp svg { width: 86%; height: 86%; fill: var(--hab); opacity: var(--stamp-alpha); filter: var(--stamp-filter); }
/* the stamp lands by an animation (not a transition) so a showcase can freeze any frame; options set --stamp-from/-to/-ms/-ease */
.cell.daubed .stamp { opacity: 1; transform: var(--stamp-to, none); animation: stamp-in var(--stamp-ms, 80ms) var(--stamp-ease, ease-in) 60ms both; }
@keyframes stamp-in { from { opacity: 0; transform: var(--stamp-from); } }
.cell.hit { animation: hit .52s cubic-bezier(.2,1.4,.4,1); transform-origin: 50% 100%; }
@keyframes hit { 12% { transform: scale(1); } 27% { transform: scale(1.04, .92); } 58% { transform: scale(.98, 1.03); } 100% { transform: none; } }
.cell.refuse { animation: refuse .24s ease-in-out; } @keyframes refuse { 25% { transform: translateX(-4px); } 50% { transform: translateX(4px); } 75% { transform: translateX(-4px); } }
.cell.near::after { content: ""; position: absolute; inset: -2px; border-radius: inherit; box-shadow: 0 0 0 3px var(--near); opacity: .45; animation: breathe 1.6s ease-in-out infinite; pointer-events: none; }
@keyframes breathe { 50% { opacity: .2; } }
.cell .feather { position: absolute; top: -26px; left: 50%; transform: translateX(-50%); z-index: 3; white-space: nowrap; padding: 2px 6px; border-radius: 8px; font-size: 12px; font-weight: 700; background: var(--bubble); color: var(--bubble-ink); box-shadow: var(--chip-shadow); animation: slide .3s ease-out; }
.cell.missed { box-shadow: var(--cell-shadow), 0 0 0 2px rgba(255,209,102,.7), 0 0 10px 3px rgba(255,209,102,.45); } /* every miss glows softly - decision 37 */
.cell.hinted { box-shadow: var(--cell-shadow), 0 0 0 3px var(--near); }
.cell.free .nest { width: 70%; height: 70%; border-radius: 50%; background: var(--nest); box-shadow: inset 0 -4px 0 rgba(0,0,0,.18), 0 2px 4px rgba(0,0,0,.25); }
.cell.win { animation: win .5s cubic-bezier(.2,1.5,.4,1) forwards; z-index: 4; }
@keyframes win { 40% { transform: scale(1.18); filter: brightness(1.35); } 100% { transform: scale(1.06); filter: brightness(1.15); box-shadow: 0 0 0 3px #ffd166, 0 0 18px 6px rgba(255,209,102,.85); } } /* the gold ring replaces the cell's dark rim: the line reads as one golden band */
/* the win line made plain (decision 26): the other cells dim, a golden band frames a line (under its cells), the line glows;
   the rays come out of the line's middle (showLine in play.js) */
/* the other cells dim under one shade over the card (a filter on 20 cells cost every frame of the finale - decision 38) */
.win-shade { position: absolute; inset: 0; z-index: 2; border-radius: inherit; pointer-events: none; background: rgba(20,10,40,.45); animation: win-shade .4s ease-out both; }
@keyframes win-shade { from { opacity: 0; } }
.won-line .cell.win { box-shadow: 0 0 0 3px #ffd166, 0 0 18px 6px rgba(255,209,102,.85); }
.win-band { position: absolute; z-index: 3; pointer-events: none; border-radius: 999px; transform-origin: 0 50%; background: linear-gradient(180deg, #fff1bf, #ffc857);
  box-shadow: 0 0 0 3px #2d2340, 0 0 30px 12px rgba(255,209,102,.8); animation: win-band .45s cubic-bezier(.2,.9,.3,1) both; }
@keyframes win-band { from { clip-path: inset(0 100% 0 0 round 999px); } to { clip-path: inset(0 0 0 0 round 999px); } }
/* the rays: a layer of their own moved by translate (no layout), no blend with what is under them (decision 38) */
.win-rays { position: fixed; left: 0; top: 0; z-index: 30; pointer-events: none; border-radius: 50%; will-change: transform, opacity;
  background: repeating-conic-gradient(from 0deg, rgba(255,214,120,.62) 0 6deg, transparent 6deg 12deg);
  -webkit-mask: radial-gradient(closest-side, transparent 12%, #000 28%, transparent 100%); mask: radial-gradient(closest-side, transparent 12%, #000 28%, transparent 100%);
  animation: win-rays 2.2s cubic-bezier(.2,.8,.3,1) both; }
@keyframes win-rays { 0% { opacity: 0; scale: .3; } 18% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; scale: 1; rotate: 12deg; } }
.finale .cards { animation: none; } .breathe .card.focus { animation: camera .9s ease-in-out; }
@keyframes camera { 50% { transform: scale(1.02); } }

.zg-toast { position: fixed; left: 50%; top: 168px; transform: translate(-50%, -8px); padding: 8px 14px; border-radius: 12px; background: var(--bubble); color: var(--bubble-ink); font-size: 15px; font-weight: 700; box-shadow: var(--chip-shadow); opacity: 0; transition: .2s; z-index: 20; pointer-events: none; }
.zg-toast.on { opacity: 1; transform: translate(-50%, 0); }
.p-hat, .fx-banner { display: none; } /* element options of look B switch them on (elements/options.css) */
.fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 30; }
.result { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: rgba(0,0,0,.45); }
.result[hidden] { display: none; }
.sheet { width: min(92vw, 420px); padding: 24px; border-radius: var(--radius-big); background: var(--card); box-shadow: var(--card-shadow); text-align: center; animation: rise .28s cubic-bezier(.2,.9,.25,1.18); }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
.sheet h2 { font: 900 32px/1.1 var(--font-head); margin: 0 0 8px; } .sheet .stats { font-size: 17px; } .sheet .rank { font-size: 15px; opacity: .85; }
.sheet button { display: block; width: 100%; height: 56px; margin-top: 10px; border-radius: var(--radius); font-size: 18px; font-weight: 800; }
.sheet .primary { background: var(--bingo); color: var(--bingo-ink); box-shadow: var(--bingo-shadow); } .sheet .secondary { border: 2px solid var(--ink-soft); }

/* desktop: own layout, not a stretched phone (UI-10) */
@media (min-width: 900px) {
  .zg { max-width: none; grid-template-columns: 360px 1fr; grid-template-rows: 64px minmax(0, 1fr); grid-template-areas: "top top" "side play"; padding: 12px 24px 24px; gap: 16px 24px; }
  .icon-btn { width: 52px; height: 52px; } .icon-btn svg { width: 36px; height: 36px; }
  .icon-btn:first-child { width: auto; padding: 0 16px; gap: 8px; display: flex; } .icon-btn .lbl { display: inline; font-size: 18px; font-weight: 700; }
  .pattern, .count { font-size: 18px; } .pattern { height: 48px; } .pattern svg { width: 36px; height: 36px; } /* >= 36 px on the computer (UI-33) */
  .side { grid-template-columns: 1fr; grid-template-areas: "caller" "call" "board" "bots" "bingo"; align-content: start; gap: 16px; }
  .parrot { width: 96px; height: 96px; } .ball.big { width: 92px; height: 92px; } .ball.big .bn { font-size: 42px; } .ball.big .bl { font-size: 18px; } .call-line { font-size: 20px; white-space: normal; }
  .ball.small { width: 52px; height: 52px; } .ball.small .bn { font-size: 20px; }
  .bots { flex-direction: column; gap: 10px; } .bot { display: flex; align-items: center; gap: 12px; width: auto; text-align: left; }
  /* the rivals on a soft see-through violet plate, their counts in cream badges with a dark outline (decision 35: the dark
     badges sank into the dark scene) */
  .bots { padding: 10px 12px; border-radius: 14px; background: rgba(58,37,82,.72); box-shadow: inset 0 0 0 1.5px rgba(253,240,216,.25), 3px 3px 0 rgba(20,10,40,.5); }
  .bot .need { background: linear-gradient(180deg, #fbefd6, #f6e3bf 55%, #ecd3a6); color: #24182f; box-shadow: inset 0 0 0 2px #2d2340, 2px 2px 0 rgba(20,10,40,.5); }
  .bot .face { width: 60px; height: 60px; margin: 0; } .bot .bname { font-size: 18px; } .bot .need { position: static; margin-left: auto; min-width: 32px; height: 32px; font-size: 18px; line-height: 32px; border-radius: 16px; text-align: center; }
  .bubble { top: -6px; right: 48px; font-size: 16px; }
  .bingo { height: 76px; font-size: 38px; }
  .minis { display: none; } .cards { align-items: center; height: 100%; gap: 24px; }
  .card { display: block; width: min(412px, calc(100cqh - 44px - 10px)); } .tab { height: 44px; font-size: 30px; }
  .cell .num { font-size: min(35px, 10cqw); } .zg-toast { top: 90px; font-size: 18px; }
}
/* one card: no mini row (UI-08); desktop with 3-4 cards: two by two - at 1280 x 800 the cell is ~50 px (ART-10 names 60 px: two rows of
   60 px cards need ~760 px of height; question to the owner, LOOK_PLAN section 3) */
.c1 .minis { display: none; }
/* a short computer window (a laptop with the browser's bars, 600-700 px): the host column tightens so it keeps inside the
   screen, the cards fit the rest (FIXES "Play screen - the card fits the screen") */
@media (min-width: 900px) and (max-height: 700px) {
  .side { gap: 10px; } .parrot { width: 72px; height: 72px; } .ball.big { width: 76px; height: 76px; } .ball.big .bn { font-size: 36px; }
  .bots { gap: 6px; padding: 8px 12px; } .bot .face { width: 48px; height: 48px; } .bingo { height: 64px; font-size: 32px; }
}
@media (min-width: 900px) {
  .c3 .cards, .c4 .cards { display: grid; grid-template-columns: repeat(2, auto); align-content: center; justify-content: center; gap: 16px 24px; }
  .c3 .card, .c4 .card { width: min(286px, calc((100cqh - 16px) / 2 - 30px - 10px)); padding: 7px; } .c3 .tab, .c4 .tab { height: 30px; font-size: 22px; } .c3 .cell .num, .c4 .cell .num { font-size: min(26px, 10cqw); } .c3 .cgrid, .c4 .cgrid { gap: 3px; }
}
/* phone portrait (decision 25): the board of the previous balls stands right of the call line "N-41 - crab" - no board row of
   its own, the card gets that height; a long animal name shrinks to 14 px, then takes 2 lines (fitCall) */
@media (max-width: 899px) and (min-height: 501px) {
  .side { grid-template-areas: "caller bots" "call board" "bingo bingo"; }
  .board { justify-content: flex-end; align-items: center; min-height: 34px; gap: 5px; }
  .board .ball.small { width: 30px; height: 30px; } .board .ball.small .bn { font-size: 14px; }
}
/* a short phone in portrait (the browser's bars leave 560-760 px): the strip above the card tightens - host, ball, rivals,
   BINGO! and the minis - so the card keeps playable cells (FIXES "Play screen - the card fits the screen"); 390 x 844 is untouched */
@media (max-width: 899px) and (min-height: 501px) and (max-height: 760px) {
  .zg { gap: 6px; } .side { gap: 4px 10px; }
  .parrot { width: 56px; height: 56px; } .ball.big { width: 64px; height: 64px; } .ball.big .bn { font-size: 30px; } .ball.big .bl { font-size: 12px; }
  .bot { width: 48px; } .bot .face { width: 44px; height: 44px; padding: 3px; } .bot .bname { font-size: 13px; }
  .bingo { height: 52px; font-size: 30px; }
  .minis { margin-bottom: 30px; } .mini { width: 52px; height: 52px; padding: 6px; } .mini .dots { gap: 2px; } .mini .mneed { font-size: 12px; }
}
/* landscape phone (height < 500 px, UI-11): host and rivals column on the left (0.4 width), focus card and a column of minis on the
   right, cell = (height - 72) / 6, not below 48 px; BINGO! under the host column */
@media (max-height: 500px) and (orientation: landscape) {
  .zg { max-width: none; grid-template-columns: 40% 1fr; grid-template-rows: 48px 1fr; grid-template-areas: "top top" "side play"; padding: 6px 12px 8px; gap: 6px 14px; }
  .icon-btn { width: 44px; height: 44px; } .side { grid-template-columns: 1fr; grid-template-areas: "caller" "call" "board" "bots" "bingo"; align-content: start; gap: 6px; }
  .board { display: none; } .bots { justify-content: flex-start; } .bingo { height: 56px; font-size: 26px; }
  .play { flex-direction: row-reverse; justify-content: flex-end; gap: 12px; align-items: flex-start; }
  .minis { flex-direction: column; margin: 0; gap: 22px; } .mini { width: 60px; height: 60px; padding: 6px; } .mini .mneed { top: auto; bottom: -20px; white-space: nowrap; }
  .play > .cards { flex: none; container-type: normal; }
  .card { width: calc(max(48px, (100vh - 72px) / 6) * 5 + 24px); padding: 6px; } /* 5 cells + 4 gaps of 3 + padding 2 x 6 */ .tab { height: 26px; font-size: 20px; margin-bottom: 2px; }
  .ctabs { margin-bottom: 4px; } .cgrid { gap: 3px; } .cell .num { font-size: 24px; }
  .zg-toast { top: 60px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .cell.daubed .stamp { opacity: 1; transform: none; }
}

/* ---- the chosen elements ---- */
:root {
  --card: repeating-linear-gradient(180deg, transparent 0 66px, rgba(40,18,8,.5) 66px 68px, rgba(255,214,160,.18) 68px 69px, transparent 69px),
    repeating-linear-gradient(90deg, rgba(255,220,170,.07) 0 3px, transparent 3px 11px),
    linear-gradient(100deg, #a8632f, #c88148 40%, #9a5a2c);
  --card-shadow: inset 0 0 0 4px #2b170c, inset 0 3px 0 4px rgba(255,214,160,.28), inset 0 -10px 16px rgba(30,10,0,.35), 0 4px 0 #1d1630, 0 18px 32px rgba(20,10,40,.5);
}
.card::before { content: ""; position: absolute; inset: 3px; pointer-events: none; z-index: 5;
  background: radial-gradient(circle at 7px 7px, #fbe3a0 0 1.5px, #b88a3c 2px 3.2px, #2b170c 3.4px 4.2px, transparent 4.5px),
    radial-gradient(circle at calc(100% - 7px) 7px, #fbe3a0 0 1.5px, #b88a3c 2px 3.2px, #2b170c 3.4px 4.2px, transparent 4.5px),
    radial-gradient(circle at 7px calc(100% - 7px), #fbe3a0 0 1.5px, #b88a3c 2px 3.2px, #2b170c 3.4px 4.2px, transparent 4.5px),
    radial-gradient(circle at calc(100% - 7px) calc(100% - 7px), #fbe3a0 0 1.5px, #b88a3c 2px 3.2px, #2b170c 3.4px 4.2px, transparent 4.5px); }

.tab { border-radius: 3px; }
.cell { border-radius: var(--f-cell-r);
  --cell: radial-gradient(circle at 50% 28%, color-mix(in srgb, var(--hab) 8%, #fffaf0), color-mix(in srgb, var(--hab) 30%, #f0d6a8) 82%);
  --cell-shadow: inset 0 0 0 2px #2d2340, inset 0 0 0 4.5px #d9a94e, inset 0 0 0 6px #2d2340, inset 0 9px 10px rgba(255,255,255,.4), 2px 3px 0 #2d2340; }
.cell.daubed { --cell: radial-gradient(circle at 50% 28%, color-mix(in srgb, var(--hab) 55%, #fff4de), color-mix(in srgb, var(--hab) 72%, #fff4de) 80%); }
.cell.daubed .num { text-shadow: 0 1px 0 rgba(255,255,255,.55); }
.cell.daubed .glyph { opacity: 0; }
.cell .stamp { inset: auto; left: -5px; top: -5px; width: 44%; height: 44%; border-radius: 50%;
  background: radial-gradient(circle at 38% 30%, #fff3c4, #e8b95a 55%, #a8742a); box-shadow: inset 0 0 0 1.5px #2d2340, 2px 2px 0 #2d2340;
  --stamp-from: translateY(-16px) scale(1.4); --stamp-ms: 180ms; --stamp-ease: cubic-bezier(.3,1.6,.5,1); }
.cell .stamp svg { width: 70%; height: 70%; fill: #2d2340; opacity: 1; }
.ball {
  --ball: linear-gradient(180deg, #ffe2a8 0 44%, #f7c27a 44% 56%, #f08a4f 56% 68%, #e2603f 68% 80%, #b8455a 80%);
  --ball-shadow: inset 0 0 0 2px #2d2340, 0 0 0 4px var(--hab, #e2603f), 0 0 0 6px #2d2340, 4px 4px 0 6px #2d2340, 0 10px 16px 6px rgba(20,10,40,.35);
  --ball-shadow-s: inset 0 0 0 1.5px #2d2340, 0 0 0 3px var(--hab, #e2603f), 0 0 0 4.5px #2d2340, 2px 2px 0 4.5px #2d2340; }
.ball .bn, .ball .bl { color: #fdf0d8; opacity: 1;
  text-shadow: 2px 2px 0 #2d2340, -1px -1px 0 #2d2340, 1px -1px 0 #2d2340, -1px 1px 0 #2d2340; }
.fx-on .fx-banner, .fx-sheet .fx-banner { display: grid; }
.fx-banner { position: fixed; left: 0; right: 0; top: 40%; height: 180px; place-items: center; pointer-events: none; z-index: 35; overflow: visible; }
.fx-banner > * { grid-area: 1 / 1; display: none; }
.fx-banner * { animation-delay: calc(var(--dl, 0ms) - var(--t, 0ms)) !important; animation-fill-mode: both !important; }
.fx-sheet .fx-banner * { animation-play-state: paused !important; }
.fx-banner .word { font: 900 86px/1 var(--font-head); letter-spacing: .03em; display: none; }
.fx-banner .word span { grid-area: 1 / 1; }
@keyframes fx-pass1 { from { transform: translate(-30px, 22px); opacity: 0; } to { transform: translate(7px, 7px); opacity: 1; } }
@keyframes fx-pass2 { from { transform: translate(28px, -24px); opacity: 0; } to { transform: translate(3.5px, 3.5px); opacity: 1; } }
@keyframes fx-pass3 { from { transform: scale(1.7); opacity: 0; } 60% { opacity: 1; } to { transform: none; opacity: 1; } }
@keyframes fx-knock { 0%, 32% { transform: none; } 36% { transform: scale(1.06) rotate(-2deg); } 44% { transform: rotate(-2deg); } 88% { opacity: 1; transform: rotate(-2deg); } 100% { opacity: 0; transform: rotate(-2deg) translateY(-30px); } }
@keyframes fx-flag { 0% { transform: translateY(-120px) rotate(0); opacity: 0; } 30% { opacity: 1; } 55% { transform: translateY(0) rotate(14deg); } 78% { transform: rotate(-7deg); } 100% { transform: rotate(0); opacity: 1; } }
@keyframes fx-unroll { from { clip-path: polygon(48% 0, 52% 0, 52% 50%, 52% 100%, 48% 100%, 48% 50%); } }
@keyframes fx-out { 0%, 85% { opacity: 1; } 100% { opacity: 0; } }
.fx-banner .rays { display: none; /* the poster's rays gave way to the rays of the win line (decision 26) */ position: absolute; left: 50%; top: 50%; margin: -280px 0 0 -280px; width: 560px; height: 560px; border-radius: 50%; z-index: -1;
  background: repeating-conic-gradient(from 0deg, rgba(255,209,102,.55) 0 9deg, transparent 9deg 18deg);
  -webkit-mask: radial-gradient(closest-side, #000 30%, transparent); mask: radial-gradient(closest-side, #000 30%, transparent);
  animation: fx-rays 1.9s cubic-bezier(.2,.8,.3,1); }
@keyframes fx-rays { 0% { transform: scale(.1) rotate(0); opacity: 0; } 20% { opacity: 1; } 85% { opacity: 1; } 100% { transform: scale(1) rotate(40deg); opacity: 0; } }
.fx-banner .flags { display: flex; gap: 6px; animation: fx-out 1.9s; }
.fx-banner .flags b { width: 60px; height: 72px; display: grid; place-items: center; border-radius: 6px; background: var(--hab); background-image: var(--hab-tex);
  color: #fdf0d8; font: 900 46px/1 var(--font-head); text-shadow: 3px 3px 0 #2d2340; box-shadow: inset 0 0 0 3px #2d2340, inset 0 3px 0 4px rgba(255,255,255,.2), 4px 4px 0 #2d2340;
  animation: fx-drop .55s cubic-bezier(.3,1.5,.5,1); }
.fx-banner .flags b:nth-child(2) { --dl: 110ms; }
.fx-banner .flags b:nth-child(3) { --dl: 220ms; }
.fx-banner .flags b:nth-child(4) { --dl: 330ms; }
.fx-banner .flags b:nth-child(5) { --dl: 440ms; }
@keyframes fx-drop { from { transform: translateY(-90px) scale(1.3); opacity: 0; } 50% { opacity: 1; } to { transform: none; opacity: 1; } }
/* ---- game additions: the scene with its measured veil, portraits, silhouettes, keyboard focus ---- */
/* the scene: the painting plus two light layers - a warm glow from the sun side and a dark foot (spec 06 ART-17) */
.scene { background: var(--page) center / cover no-repeat; background-image: radial-gradient(120% 70% at 60% 18%, rgba(255,200,140,.16), transparent 60%), linear-gradient(transparent 62%, rgba(20,10,40,.35)), url("../../../assets/generated/bg-phone.webp"); }
.scene::after { content: ""; position: absolute; inset: 0; background: rgba(20,10,40,var(--veil, .48)); } /* docs/art/gen/veil.json */
@media (min-width: 900px) { .scene { background-image: radial-gradient(90% 70% at 50% 30%, rgba(255,200,140,.14), transparent 60%), linear-gradient(transparent 62%, rgba(20,10,40,.35)), url("../../../assets/generated/bg-desktop.webp"); } .scene::after { --veil: .41; } }
.portrait { width: 100%; height: 100%; background-repeat: no-repeat; background-size: calc(var(--frames) * 100%) 100%; background-position: calc(var(--i, 0) * 100% / (var(--frames) - 1)) 0; }
.parrot .portrait { --frames: 5; background-image: url("../../../assets/generated/portraits/parrot.webp"); }
.bot .face { padding: 0; overflow: hidden; } .bot .face .portrait { --frames: 4; transform: scale(1.12) translateY(4%); }
.bot-owl .portrait { background-image: url("../../../assets/generated/portraits/owl.webp"); }
.bot-raccoon .portrait { background-image: url("../../../assets/generated/portraits/raccoon.webp"); }
.bot-fox .portrait { background-image: url("../../../assets/generated/portraits/fox.webp"); }
/* upset: the pose is added in code - the portrait lowered, tilted and dimmed (decisions No 10) */
.bot.upset .face { transform: translateY(4px) rotate(-8deg); filter: saturate(.55) brightness(.9); }
.cell .glyph { fill: currentColor; color: color-mix(in srgb, var(--hab) 80%, #2d2340); }
.cell .stamp { color: #2d2340; } /* the brass pin carries the habitat track (marks sprite, currentColor) */
.cell:focus-visible { outline: 3px solid #ffd166; outline-offset: 2px; }
.bingo:focus-visible, .icon-btn:focus-visible, .mini:focus-visible { outline: 3px solid #ffd166; outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* the deal of look B wins over the mockup's plain one (VFX-09: the plaque rises from under the edge and swings on its hinges) */
.card { animation: deal-b .6s cubic-bezier(.2,.9,.3,1); transform-origin: 50% 0; }
/* a soft shadow of each cell on the card besides the print offset (ART-11: a shadow cast on the field) */
.cell { --cell-shadow: inset 0 0 0 2px #2d2340, inset 0 0 0 4.5px #d9a94e, inset 0 0 0 6px #2d2340, inset 0 9px 10px rgba(255,255,255,.4), 2px 3px 0 #2d2340, 0 5px 8px rgba(20,10,40,.28); }
.paused .play, .paused .board, .paused .current { filter: blur(7px); } /* a window is open: the numbers unreadable (spec 05 UI-21) */
/* the "next" bar of a result closed without a choice (spec 05 UI-25): New game - Home, over the BINGO! place */
.next-bar { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 41; display: flex; gap: 10px; }
.next-bar[hidden] { display: none; }
.next-bar .bingo { grid-area: auto; width: 220px; height: 56px; font-size: 22px; }
.next-home { min-height: 56px; padding: 0 18px; border-radius: 10px; font: 700 19px/1 var(--font-text); color: var(--ink); background: linear-gradient(#fdf0d8, #f0d6a8); box-shadow: inset 0 0 0 2.5px #2d2340, 3px 3px 0 #2d2340; }

/* the free cell: FREE (decisions No 16; spec 06 ART-13) - the classic word of bingo, marked from the start */
/* FREE in the orange of "Skip" (decision 31): the button's gradient inside the letters, a thin dark contour so it reads on the
   light cell (the plain orange is 2.3:1 there) */
.cell.free .free-txt { font: 700 min(18px, 7cqw)/1 var(--font-head); letter-spacing: .04em; color: transparent; background: linear-gradient(180deg, #f6926a, #ee7a52 55%, #e2683f);
  -webkit-background-clip: text; background-clip: text; -webkit-text-stroke: .7px #2d2340; text-shadow: none; }

@media (min-width: 900px) { .cell.free .free-txt { font-size: min(22px, 7cqw); } .c3 .cell.free .free-txt, .c4 .cell.free .free-txt { font-size: min(16px, 7cqw); } }
/* FREE follows the card's width like the numbers (the card fits the screen) */

/* the praise (spec 05 UI-37): at the card's foot, apart from the messages at its top */
.praise { position: fixed; z-index: 44; transform: translate(-50%, 6px); padding: 6px 14px; border-radius: 12px; pointer-events: none; opacity: 0;
  font: 700 18px/1 var(--font-head); text-transform: uppercase; letter-spacing: .04em; color: #24182f; background: #ffd166; box-shadow: inset 0 0 0 2px #2d2340, 3px 3px 0 #2d2340; transition: opacity .2s, transform .2s; }
.praise.on { opacity: 1; transform: translate(-50%, 0); }

/* long languages (spec 05 UI-45: the pseudo-locale +40 % cuts no caption): the call line shrinks, then wraps (play.js fitCall);
   the rivals' names wrap under their portraits; the "Missed" feather of an edge column leans inward */
.call-line { min-width: 0; }
.call-line.fit-wrap { white-space: normal; text-overflow: clip; line-height: 1.15; }
.bot .bname { overflow-wrap: anywhere; }
.cell.edge-l .feather { left: -2px; transform: none; }
.cell.edge-r .feather { left: auto; right: -2px; transform: none; }
