/* Streaming Stampede - the stage's own styles, Clear Cut's pattern: nothing here reaches any other game.
   Scoped under .stmp so the phone and the big screen share one construction and differ only in size. */

.stmp {
  position: relative;
  overflow: hidden;
  background: var(--toy-ink-color, #1e1e24);
  border-radius: 18px;
  touch-action: manipulation;              /* no double-tap zoom while counting */
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
}

/* THE PHONE'S STAGE IS A PART, NOT A CROP. On the wall the stage IS the screen and on the how-to card it sits
   in .ptut-demo's own recessed window, but in a round on a phone it was a bare rounded rectangle laid straight
   on the carnival wallpaper - the studio's pale floor running out to an edge with nothing to stop it. The
   porthole's construction round it (ink rim, sunk in, a solid drop under) makes it the recessed stage the rest
   of the app is built from. Scoped off both of the other two so neither gains a second frame. */
.stmp:not(.stmpb-host):not(.stmpd) {
  border: var(--toy-border-dark, 4px solid #1E1E24);
  box-shadow: var(--toy-porthole-recess, inset 0 4px 6px 0 rgba(0, 0, 0, .28)), var(--toy-shadow-md, 0 8px 0 0 #1E1E24); --toy-drop:0px; --toy-drop-c:transparent; --toy-under:opacity(1);
}

/* ---- FULL SCREEN ON THE PHONE (stampede-stage.js focus(), body.stmp-focus) ---- */
/* Every other game draws inside play.html's #stage, which is inset 16px a side, so the party backdrop ran as
   a gutter round a floor that is meant to BE the room. Rock Harden already escapes it and this is its recipe
   (harden-stage.css .hd-stage): fixed to the VISUAL viewport, not the layout one, so the browser's own bars
   are out of it - a bare 100dvh leaves the foot of the floor under Safari's toolbar. The bezel and the recess
   above come off with it: a window frame round something that fills the screen is a frame round nothing. */
body.stmp-focus .stmp:not(.stmpd) {
  position: fixed; left: 0; right: 0; top: var(--vv-top, 0px); height: var(--vv-h, 100dvh);
  border: 0; border-radius: 0; box-shadow: none; --toy-drop:0px; --toy-drop-c:transparent; --toy-under:opacity(1); z-index: 25;
}
/* THE FURNITURE CLEARS THE TOP BAR, which stays above the stage (z-index 25 is under it, as Harden's is) and
   would otherwise sit on the banner. Its height is measured into --topbar-h by play.html. */
/* --topbar-h is the bar's HEIGHT; the bar itself sits 14px down the page (and further on a notched phone),
   so the clearance is its height plus that offset plus the 10px the furniture always had. Measured on a
   393pt phone: bar [0,14,393,56], so its foot is 70 and the banner starts at 80. */
body.stmp-focus .stmp:not(.stmpd) .stmp-ask { top: calc(var(--topbar-h, 44px) + env(safe-area-inset-top, 0px) + 24px); }
body.stmp-focus .stmp:not(.stmpd) .stmp-tally,
body.stmp-focus .stmp:not(.stmpd) .stmp-score { top: calc(var(--topbar-h, 44px) + env(safe-area-inset-top, 0px) + 24px + 4em); }
/* the sides take the notch into account too, since the stage now reaches the glass */
body.stmp-focus .stmp:not(.stmpd) .stmp-score { left: max(10px, env(safe-area-inset-left)); }
body.stmp-focus .stmp:not(.stmpd) .stmp-tally { right: max(10px, env(safe-area-inset-right)); }
/* A COMPUTER (play.html html.pcz): the stage reaches the window's edges (--pcx either side of the phone's column), and the
   cards rode out with it - ~1,700px apart on a 1080p screen, far from the herd and the count. They frame the column
   instead: 140px out from it, so the banner and the crossing stay between them. */
html.pcz body.stmp-focus .stmp:not(.stmpd) .stmp-score { left: max(10px, calc(var(--pcx, 0px) - 140px)); }
html.pcz body.stmp-focus .stmp:not(.stmpd) .stmp-tally { right: max(10px, calc(var(--pcx, 0px) - 140px)); }
body.stmp-focus .foot, body.stmp-focus .footer { display: none; }
html:has(body.stmp-focus) { overflow: hidden; overscroll-behavior: none; }

/* the studio: a bright back wall and a flat floor the herd crosses, as the original's set reads */
/* the generated studio set; the gradients below are only a fallback for a host without the art */
/* sized and placed by fitBackdrop() so its horizon lands on the stage's, whatever the art's own is */
.stmp-bg { position: absolute; max-width: none; }
.stmp-sky {
  position: absolute; inset: 0 0 calc(100% - var(--stmp-horizon, 38%)) 0;
  background: linear-gradient(#2f6ea8 0%, #4b93c9 58%, #6fb0dd 100%);
}
.stmp-floor {
  position: absolute; inset: var(--stmp-horizon, 38%) 0 0 0;
  background: linear-gradient(#8e94a6 0%, #a7adbd 26%, #b9bfcd 100%);
  box-shadow: inset 0 3px 0 rgba(0, 0, 0, .18); --toy-drop:0px; --toy-drop-c:transparent; --toy-under:opacity(1);
}

/* shadows sit in their own layer so they can multiply against the floor; see stampede-stage.js */
.stmp-shadows, .stmp-cast { position: absolute; inset: 0; }
/* A GROUND FOR THE RUNNERS TO BE ON. Below the horizon the set art is a near-featureless pale gradient with one
   faint seam down the middle, so a single crosser read as floating in grey rather than crossing a floor. Two
   cues, both inside the shadow layer so they paint under every creature and over the backdrop: a band of depth
   along the horizon where the floor meets the wall, and a soft well towards the front that darkens the corners.
   Nothing drawn, nothing with an edge - the set stays the set. */
.stmp-shadows::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  /* EVERY STOP STARTS AND ENDS AT ZERO. The first try pinned the band's top to --stmp-horizon and opened it at
     .26 alpha, which put a hard grey line straight across the stage - a gradient that begins part-way up its own
     box edge IS an edge. Running the whole height and fading in and out instead leaves nothing with a boundary. */
  background:
    linear-gradient(180deg, rgba(40, 36, 52, 0) calc(var(--stmp-horizon, 38%) - 7%), rgba(40, 36, 52, .22) var(--stmp-horizon, 38%),
      rgba(40, 36, 52, .05) calc(var(--stmp-horizon, 38%) + 12%), rgba(40, 36, 52, 0) calc(var(--stmp-horizon, 38%) + 26%)),
    radial-gradient(ellipse 86% 120% at 50% 112%, rgba(40, 36, 52, 0) 48%, rgba(40, 36, 52, .15) 100%);
}

/* THE CRAWLERS' SPRITES CARRY A BAKED SHADOW, and their cut frame clips it. Measured: omanyte-ooze1 is 672x397
   and its alpha runs 525px wide at y=373 out to x=667 - four pixels from the frame - then stops over about eight
   source rows, which at the size a runner is drawn is under a pixel. On the floor that is a hard-edged grey slab
   with the creature sitting on it (sampled across one: luminance steps 161 -> 97 and back in a single 6px span,
   both sides). It is NOT the stage's own shadow - diffing a frame with .stmp-shadows hidden leaves clean soft
   ellipses - and it is not in the other kinds' sprites, whose art stops well inside their frames.
   The stage draws a proper contact ellipse for every runner anyway, so the baked one is redundant as well as
   broken: fade the band it lives in and the slab goes, sides and all. The real fix is a re-cut of those two
   sheets; this is what stops it reaching a phone meanwhile. (Daniel, 2026-11-01) */
.stmp-one.k-ooze img {
  -webkit-mask-image: linear-gradient(180deg, #000 86%, transparent 99%);
  mask-image: linear-gradient(180deg, #000 86%, transparent 99%);
}

/* a zero-size anchor at the creature's feet; the sprite hangs above it */
.stmp-one {
  position: absolute; left: 0; top: 0; width: 0; height: 0;
  transform-origin: 0 0;
  will-change: transform;
}
.stmp-one img {
  position: absolute; left: 0; bottom: 0;
  transform-origin: 50% 50%;
  image-rendering: auto;
}
/* NO drop-shadow on a sprite. It was tried for the crawlers, to trace their contact exactly, and it traces
   the WHOLE silhouette - so Omanyte's tall shell wore a dark halo in mid-air, its top curve included. A
   filter cannot know which parts of an outline are near the floor; only the floor ellipse can. */
/* NOTE: the cartwheel pivots about its CENTRE, like everything else, and must. A pivot low in the sprite
   stays nailed to the anchor, so the body orbits it - Daniel: "like you spinning a keychain around your
   finger". A tumbling body's contact point MOVES, and rotating about the centre while translating is exactly
   what produces that; the going-over-the-edge feel comes from the lift in stampede-stage.js, not the pivot. */
/* The ground shadow, on the floor at the creature's feet and centred on it, so a grounded character sits IN
   its shadow rather than on the rim of one. A hovering sprite rises off it and the shadow stays put, which is
   what reads as height.
   Two layers: a tight core for contact occlusion and a wide soft cast that reaches zero before the element's
   edge, so there is no boundary anywhere. multiply lets the floor's seams show through instead of being
   painted over. */
.stmp-shadows .stmp-shadow {
  position: absolute; left: 0; top: 0;
  transform-origin: 50% 50%;
  mix-blend-mode: multiply;
  /* Placed by stampede-stage.js: its BOTTOM edge sits on the contact line and the ellipse extends away from
     the viewer, which is where the recording puts it - measured on three pairs, the shadow tops sit 42-49px
     above the feet with heights of 42-50px. Centring it on the contact line, or below it, leaves the gap
     that made Doduo and Psyduck look like they were hovering. */
  /* darkness measured off the recording: its shadow cores sit at 40% of the floor's luminance, alpha 0.60 of
     black, where this was 0.34 and read as a smudge. 0.48 at the core, since that 0.60 is the darkest quarter
     and will include contact shadow directly under a body. */
  background:
    radial-gradient(ellipse 42% 42% at 50% 50%, rgba(34, 30, 44, .58) 0%, rgba(34, 30, 44, .20) 72%, rgba(34, 30, 44, 0) 100%),
    radial-gradient(closest-side, rgba(40, 36, 52, .34) 0%, rgba(40, 36, 52, .17) 54%, rgba(40, 36, 52, 0) 92%);   /* closest-side: zero before every edge. `ellipse at center` is sized to the FARTHEST CORNER, so it met the box's sides still dark - a hard-edged band */
  pointer-events: none;
}
/* aloft: a shadow cast from height is broader and weaker than one cast from the floor. Shrinking it read as
   distance but is backwards - height spreads a shadow and softens it, and that is also the clearer signal
   that the thing is off the ground rather than small. */
.stmp-shadows .stmp-aloft { opacity: .62; }
/* A seam for bodies lying flat. A plain radial gradient tapers so hard that under a long body its tips go
   faint and it reads as a bump under the middle. Stretching the horizontal radius fixes that - but 165% went
   too far the other way, holding full strength to the very edge so the seam read as a plank the creature was
   standing on. It is now held even by its STOPS, not its radius: a radius past 50% meets the box's sides still
   dark (118% left ~40% at the edge), and on a computer's bigger sprites that hard-sided band read as a grey slab
   under every Slugma and Omanyte (Gemini, 2026-11-08). 50% wide reaches zero exactly at the sides. */
.stmp-shadows .stmp-seam {
  background:
    radial-gradient(ellipse 50% 54% at 50% 50%, rgba(34, 30, 44, .52) 0%, rgba(34, 30, 44, .46) 40%, rgba(34, 30, 44, .30) 70%, rgba(34, 30, 44, 0) 100%),
    radial-gradient(closest-side, rgba(40, 36, 52, .24) 0%, rgba(40, 36, 52, 0) 92%);
}
.stmp-one .stmp-burst {
  /* centred on the creature's BASE, not hung below the anchor: the anchor is a zero-height point at its feet,
     so a burst pinned to top:0 reads as a second object lying on the floor underneath it */
  left: 0; bottom: 0; top: auto; height: 40px;
  pointer-events: none;
  --toy-fx:opacity(1);
  z-index: -1;
}

/* what to count, and for how much - the original puts this up before the herd arrives */
/* THE LIGHT TOY CASING, shared by the four things the stage puts over the floor: flat cream plastic, an ink
   outline, and the house's own ink drop under it.
   IT CARRIED FOUR EDGE TREATMENTS AT ONCE and they stacked into a banded rim: a top-to-bottom gradient on the
   face, a white inset ring, a tan border, and a tan lip under THAT - so the foot of every card was three pale
   stripes and the whole part read as two cards in a pile rather than one moulded one (Daniel, 2026-11-01,
   pointing at the counter: "below YOUR COUNT ... it's also present in the others"). One surface, one outline,
   one drop. The charcoal version noted here before was a dark CASE - a dark well inside a dark card has
   nothing to contrast with, which is still true and still avoided; the face stays cream and only the edge
   is ink, which is what every other toy part in the app does. */
.stmp {
  --stmp-case: #FAF7EE;
  --stmp-case-edge: 2px solid var(--toy-ink-color, #1E1E24);
  /* NO DROP. The house extrudes a pill with --toy-shadow-sm, and these carried it - but the house's pills
     are big ones, and 4px under a 67px counter is a far bigger share of the part than 4px under a 186px
     reveal card. Side by side against the ink outline it read as a lip hanging off the small cards while
     looking right on the large one (Daniel, 2026-11-01, having seen both). One uniform ink outline, no
     drop, on all four: a part that is the same weight at every size this stage draws it. */
  /* the screen inside is the same ink as the outline - one tone, no inset. It was a flat navy with a 3px
     inset top lip, and the lip's rounded rect pulled away from the plate's at the top corners, leaving a
     crescent step down each curve. A recess that needs a shadow to be read is not needed here: the plate is
     ink in a cream card, which is already a hole. */
  --stmp-screen: var(--toy-ink-color, #1E1E24);
  --stmp-screen-ink: #FFF8E7;
  --stmp-slate: #3A4254;
  /* VERDICTS ARE THE HOUSE'S COLOURS. Clear Cut prints one on a light pill (.cc-hint .cc-verdict) and uses the
     theme's dark variants; the amber is deeper than --t-yel-d, which washes out on cream, as Clear Cut found. */
  --stmp-win: var(--t-grn-d, #0A8A60); --stmp-near: #8A5A00; --stmp-off: var(--t-red-d, #A3123A);
}

/* THE ASK, built to the toy theme's plastic recipe (TOY-UI-ARCHITECTURE.md): a coloured trim, an ink outline
   round it, a bevel sheen along the top inside, and a SOLID ink drop below - no blur, because the drop is the
   part's thickness, not a shadow. It was a flat translucent slab, which is dark-mode web furniture and belongs
   to no theme. The party plastic (yellow into orange) is the game's own casing. */
.stmp-ask {
  position: absolute; left: 50%; top: 10px; transform: translateX(-50%);
  display: flex; align-items: center; gap: .5em;
  /* THE POINTS PILL SITS INSET FROM THE CURVE. The right side was .36em against .75em on the left, which is
     right for two pieces of type but not for a pill: the badge's own rounded end ran almost into the casing's,
     two curves a few px apart, and read pinched (Daniel, 2026-11-01). Matched to the left, less the pill's own
     2px border and lip, so the gap LOOKS equal rather than measuring equal. fitAsk pays for it out of the type. */
  padding: .3em .62em .34em .75em; border-radius: 999px;
  background: var(--stmp-case); border: var(--stmp-case-edge);
  color: var(--stmp-slate);
  font-family: 'Fredoka', ui-rounded, system-ui, sans-serif; font-weight: 700; letter-spacing: .01em;
  white-space: nowrap;                     /* three lines of banner on a narrow phone covered the back lanes */
  max-width: calc(100% - 20px);
  font-size: var(--stmp-ui-fs, 16px);
  z-index: 60; pointer-events: none;
}
.stmp-ask i { font-style: normal; font-size: .68em; text-transform: uppercase; letter-spacing: .14em; }
/* THE LAST ROUND IS WORTH FOUR TIMES THE FIRST and wore the same cream casing to say so. The card already
   escalates (a crowd in the well instead of a portrait); the banner, which is what is on screen for the whole
   40-point wave, did not. Gold plastic on the same recipe - the game's own party casing, one step up - so the
   stakes are legible from the first frame without a new colour entering the set. */
.stmp-ask-all {
  --stmp-case: var(--toy-gold, #FFE066);   /* the face is the only thing the finale changes; edge and drop stay ink */
  --stmp-slate: #3A2A04;
}
/* THE TARGET GETS ITS OWN SUNKEN SCREEN. It is the one word the wave is won or lost on, so it is never
   furniture: dark well, ivory display face, the same construction as the counter's window. */
.stmp-ask b {
  font-family: 'Lilita One', ui-rounded, system-ui, sans-serif; font-weight: 400; font-size: 1.16em;
  letter-spacing: .03em;
  background: var(--stmp-screen); color: var(--stmp-screen-ink);
  padding: .1em .5em .16em; border-radius: 999px;
}
/* the points, gold. It had a lip of its own, and on the gold banner that put its ink outline a drop away
   from the banner's: ink, gold, ink, gold, ink across ten pixels, with the badge's foot reading as a third
   ring rather than an edge. Flat, like every casing on this stage (Daniel, 2026-11-01). */
.stmp-ask u {
  text-decoration: none; font-family: 'Lilita One', ui-rounded, system-ui, sans-serif; font-weight: 400;
  font-size: .8em; letter-spacing: .04em;
  background: var(--toy-gold, #FFE066); color: #2A1F04;
  padding: .14em .5em .18em; border-radius: 999px;
  border: 2px solid var(--toy-ink-color, #1E1E24);
}
/* ...but on the finale's gold banner it takes the dark screen the target wears (Daniel, 2026-11-04 - it was meant to
   since 2026-11-01, and lost to the rule above at the same specificity, so it rendered gold on gold). A dark pill
   needs no ink ring of its own, and without one its end ran into the casing's ink edge: the right side gets the
   left's full .75em, so the curve has air on both sides. */
.stmp-ask-all { padding-right: .75em; }
.stmp-ask-all u {
  background: var(--stmp-screen); color: var(--stmp-screen-ink); border-color: var(--stmp-screen);
}

/* the running count - the PHONE only. The big screen never shows counts mid-wave: 160 phones agreeing on 8
   is the answer, printed on the wall the players are watching. */
/* THE COUNTER - a tally clicker: a casing with a window in it, not a label with a number on it.
   AT THE TOP, NOT THE BOTTOM, and that is a correctness fix rather than a preference. Measured over a whole
   round on a 390x620 phone, a sprite was behind it in 19.5% of frames, at worst covering 4200px of an 89x47
   counter - a creature completely hidden on the wave where every one is worth points. Creatures live in the
   lane band: the topmost sprite pixel all round is y=289 of 620, so the strip under the banner is the one
   place on the stage that provably never has anything in it. Top-right there: 0% occluded.
   Under the banner rather than beside it, because the banner is centred and wide and a 390px phone has no
   room for both on one row. PHONE ONLY: the wall shows no count, see above. */
/* ONE PAIR OF HUD CARDS, one in each top corner of the strip under the banner. The counter was alone on the
   right; the round's score takes the left, so the two frame the floor and neither sits off-centre on its own.
   Identical casing and identical window, because they are the same kind of part - what tells them apart is the
   label under the number, and the counter's is the one that sinks when you tap. */
.stmp-tally, .stmp-score {
  position: absolute; top: calc(10px + 4em);   /* clears the banner, which is ~3.2em tall */
  display: flex; flex-direction: column; align-items: center; gap: .15em;
  padding: .28em .34em .32em; border-radius: .55em;
  background: var(--stmp-case); border: var(--stmp-case-edge);
  color: var(--stmp-slate);
  font-family: 'Fredoka', ui-rounded, system-ui, sans-serif;
  font-size: var(--stmp-ui-fs, 16px);
  z-index: 60; pointer-events: none;
}
.stmp-score { left: 10px; }
.stmp-tally {
  right: 10px;
  transform: translateY(0); transition: transform .09s ease-out;
}
/* pressed: a short nudge down. It used to sink ONTO its lip, squashing the part rather than merely moving
   it - with no lip under the card there is nothing to sink onto, so the travel comes down to match. */
.stmp-tally.is-clicked { transform: translateY(2px); }
/* the display window: dark, sunk in, one line tall so only one digit is ever in view */
.stmp-tally b, .stmp-score b {
  font-family: 'Lilita One', ui-rounded, system-ui, sans-serif; font-weight: 400;
  font-size: 1.85em; line-height: 1;
  /* THE PLATE AND THE WINDOW ARE TWO ELEMENTS, and both of this window's bugs came from making them one.
     The window has to be EXACTLY one digit tall or the next digit on the strip shows through it, and overflow
     clips at the padding box - so a single element had to buy its depth with a TRANSPARENT BORDER, since
     padding would have been clipped into. That cost it twice. First the digit sat 5px low, because play.html
     sets `* { box-sizing:border-box }` and `height:1em` became the whole box (Daniel, 2026-11-01: "the 0
     doesn't seem to be centered"); then the border pushed the recess inwards, because an inset shadow's outer
     edge is the PADDING edge - so the shadow drew its own rounded rectangle a few px in from the plate and
     read as a dark panel sitting ON the window rather than a hollow in it ("a drop shadow in front of the
     counter box"). Split in two, each does one job: b is the plate, and .stmp-tally-win is the one-line
     window inside it.
     THE PLATE IS EXACTLY ONE LINE TALL, with no padding above or below. It had .1em, which bought depth but
     put the clip 3px inside the plate - so a rolling digit was chopped by a straight line floating in the
     middle of the dark pill with dead plate above and below it, instead of travelling into its rounded ends
     (Daniel, 2026-11-01). The plate's own overflow does the clipping now, so the corners cut the digits on
     the radius. */
  display: block; box-sizing: content-box; overflow: hidden;
  min-width: 1.7em; padding: 0 .22em;
  border-radius: .22em; text-align: center;
  background: var(--stmp-screen); color: var(--stmp-screen-ink);
}
.stmp-tally-win, .stmp-score-win { display: block; height: 1em; overflow: hidden; }
.stmp-tally .stmp-roll, .stmp-score .stmp-roll { display: block; will-change: transform; }
.stmp-tally .stmp-roll i, .stmp-score .stmp-roll i { display: block; height: 1em; font-style: normal; }
.stmp-tally-sub, .stmp-score-sub { font-size: .54em; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

/* a press flashes the stage so a count is visibly registered, without saying whether it was right */
.stmp-hit::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 70;
  border-radius: inherit;
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .85); --toy-drop:0px; --toy-drop-c:transparent; --toy-under:opacity(1);
  animation: stmp-flash .22s ease-out forwards;
}
@keyframes stmp-flash { from { opacity: 1; } to { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .stmp-hit::after { animation-duration: .01s; }
}

/* THE ROUND CARD, over the stage during the lead-in. The original shows one before every question - the number,
   what a perfect count is worth, the thing itself, and how to count it - and a counting game needs it: told what
   to count at the moment counting starts, the first second is a reaction test rather than a counting one.
   Sized in em off the stage's own font-size so one construction serves the phone and the big screen, as
   everything else here does. */
/* THE STACK IS CENTRED ON WHAT YOU CAN SEE. The run-up's number keeps a 2.4em row at the foot of the stack from
   the moment the card opens, empty, so nothing shifts under the player as 3 becomes 2 becomes 1 - but centring
   counted that empty row, which pushed everything visible above the middle and left the bottom third dark. A
   matching spacer at the top balances it and keeps the no-shift guarantee; it shrinks away first on a stage too
   short to afford it. */
.stmp-card::before { content: ''; flex: 0 1 2.4em; min-height: 0; }
.stmp-card {
  position: absolute; inset: 0; z-index: 80;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5em;
  text-align: center; pointer-events: none;
  /* LIGHT ENOUGH TO LEAVE THE SET THERE. A near-opaque wash killed the carnival behind it, and the set is half
     the reason the stage looks like a stage; a soft blur buys back the legibility the lost opacity cost, and it
     only runs during the lead-in, never while anyone is counting. */
  background: radial-gradient(ellipse 72% 62% at 50% 46%, rgba(18, 14, 10, .40), rgba(18, 14, 10, .74));
  -webkit-backdrop-filter: blur(2.5px) saturate(1.06);
  backdrop-filter: blur(2.5px) saturate(1.06);
  color: #fff;
  font-size: var(--stmp-card-fs, 18px);
}
/* THE SAME PARTS AS THE REST OF THE STAGE. The card was built before the casings existed and kept its own
   flat furniture - bare text on the wash and a gold pill with no edge - so the thing a player sees FIRST each
   wave was the one thing not made of what everything else is made of. */
.stmp-card i {
  font-style: normal; display: flex; align-items: center; gap: .55em;
  padding: .28em .34em .32em .7em; border-radius: 999px;
  background: var(--stmp-case); border: var(--stmp-case-edge);
  color: var(--stmp-slate);
  font-family: 'Fredoka', ui-rounded, system-ui, sans-serif; font-weight: 700;
  font-size: .74em; letter-spacing: .12em; text-transform: uppercase;
}
/* the points, gold - the same flat badge the in-play banner carries */
.stmp-card i em {
  font-style: normal; font-family: 'Lilita One', ui-rounded, system-ui, sans-serif; font-weight: 400;
  font-size: 1.05em; letter-spacing: .04em; text-transform: none;
  background: var(--toy-gold, #FFE066); color: #2A1F04;
  padding: .12em .5em .16em; border-radius: 999px;
  border: 2px solid var(--toy-ink-color, #1E1E24);
}
/* THE PORTRAIT WELL. Every character picture in this app sits in a porthole (.claude/rules/toy-ui.md), and this
   is that atom's CONSTRUCTION - ink rim, sunk-in recess, 18px corners - rather than a flat plate of its own.
   What it does NOT take is the eggshell fill, and TOY-UI-ARCHITECTURE.md's fourth invariant is the licence:
   art drawn against dark keeps the construction round a dark screen. It has to be dark here, because the cast
   runs from Doduo's brown to Togepi's near-white and no one flat fill serves both - on eggshell Togepi would
   vanish exactly as Magnemite vanished on the translucent wash. A warm radial backlight finishes it: pale
   species read against the dark, dark species sit in the glow. */
.stmp-card-pic {
  box-sizing: border-box;
  height: 8.4em;                           /* FIXED, so all three cards put their title on one baseline. Letting
                                              the well hug its contents gave round 3, whose sprites are smaller,
                                              a shorter well and a title that sat higher than the other two. */
  display: flex; align-items: flex-end; justify-content: center; gap: .7em;
  padding: .5em .9em .45em;
  border-radius: 18px;
  border: var(--toy-border-inset, 2.5px solid #1e1e24);
  /* A COOL WELL, not a warm one. The backlight was amber, and most of this cast is warm - Doduo's brown read as
     a smudge on it, Slugma and Electrode no better. Ice blue at the centre into deep navy at the rim gives the
     warm majority a complementary ground, and the neutral ones (Magnemite, Voltorb) lose nothing, because what
     separates them from the well is luminance and the vignette keeps that either way. */
  background:
    radial-gradient(ellipse 60% 56% at 50% 54%, rgba(176, 224, 255, .34), rgba(120, 180, 240, .13) 52%, transparent 78%),
    linear-gradient(#24314a 0%, #0f1626 100%);
  /* the bezel: the atom's own sheen for the lit top edge, a hairline of light round the rest, then the recess */
  box-shadow:
    var(--toy-bevel-sheen, inset 0 3px 0 0 rgba(255, 255, 255, .45)), inset 0 0 0 1px rgba(190, 220, 255, .22), var(--toy-porthole-recess, inset 0 4px 6px 0 rgba(0, 0, 0, .28)), 0 .35em .6em rgba(0, 0, 0, .55); --toy-drop:0px; --toy-drop-c:transparent; --toy-under:opacity(1);
}
.stmp-card-pic > img {
  display: block; height: 100%; width: auto; max-width: 100%; object-fit: contain;
  --toy-fx:drop-shadow(0 .28em .36em rgba(0, 0, 0, .55)); filter:var(--toy-fx, opacity(1)) drop-shadow(0 var(--toy-drop, 0px) 0 var(--toy-drop-c, transparent)) var(--toy-under, opacity(1));
}
/* THE HERD. One drawn crowd filling the well, rather than cut sprites arranged into one - the well is sized to
   the picture's own aspect (8.4em x 15.05em) so it fills edge to edge with nothing cropped and nothing letter-
   boxed. It still clips, which is the porthole atom's one deliberate job. */
.stmp-card-all .stmp-card-pic,
.stmp-card-pic.stmp-card-hero { display: block; position: relative; overflow: hidden; width: 15.05em; padding: 0; }
/* THE BEVEL, DRAWN OVER THE ART. An inset box-shadow paints on the element's own background, which is UNDER its
   children - so on these two the well's sheen was behind an opaque picture and never showed, and the window lost
   the one highlight that says the rim is thick. The cut-sprite cards kept it, because their art is transparent.
   An overlay restores it in the same place it sits everywhere else: a lit top edge, a hairline round the rest. */
.stmp-card-all .stmp-card-pic::after,
.stmp-card-pic.stmp-card-hero::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  border-radius: inherit;
  box-shadow: var(--toy-bevel-sheen, inset 0 3px 0 0 rgba(255, 255, 255, .45)), inset 0 0 0 1px rgba(190, 220, 255, .22); --toy-drop:0px; --toy-drop-c:transparent; --toy-under:opacity(1); }
.stmp-card-pic .stmp-herd {
  display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%;
}
/* THE NAME ON A SUNKEN SCREEN, exactly as the in-play banner carries it: the one word the wave is won or lost
   on is the same part in both places, so a player reads it the same way twice. */
.stmp-card b {
  font-family: 'Lilita One', ui-rounded, system-ui, sans-serif; font-weight: 400; font-size: 1.7em;
  line-height: 1.05; letter-spacing: .03em;
  background: var(--stmp-screen); color: var(--stmp-screen-ink);
  padding: .1em .5em .16em; border-radius: .3em;
  max-width: 92%;
}
/* the finale's name is bigger, and must come AFTER the base rule: both selectors weigh the same, so order
   alone decides, and with this above it the base quietly won and COUNT THEM ALL shrank to everything else */
.stmp-card-all b { font-size: 2.3em; }
.stmp-card u { text-decoration: none; font-size: .86em; opacity: .74; }
/* THE RUN-UP'S NUMBER. Its row is there from the moment the card is, empty, so the card is exactly as tall
   while it names the target as it is while it counts: nothing shifts under the player as 3 becomes 2 becomes 1,
   and the instruction stays readable the whole way down. */
.stmp-card s { display: block; height: 1em; text-decoration: none;
  font-family: 'Lilita One', ui-rounded, system-ui, sans-serif; font-weight: 400; font-size: 2.4em; line-height: 1;
  color: var(--stmp-screen-ink); -webkit-text-stroke: .06em var(--toy-ink-color, #1E1E24); paint-order: stroke fill;
  text-shadow: 0 .1em 0 var(--toy-ink-color, #1E1E24), 0 .075em 0 var(--toy-ink-color, #1E1E24), 0 .05em 0 var(--toy-ink-color, #1E1E24), 0 .025em 0 var(--toy-ink-color, #1E1E24); }
.stmp-card s.pop { animation: stmp-go .7s cubic-bezier(.2, .9, .3, 1) both; }
@keyframes stmp-go { 0% { transform: scale(1.5); opacity: 0; } 22% { transform: scale(1); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .stmp-card s.pop { animation: none; } }

/* ---- THE HOW-TO DEMO (tutorials.js, via StampedeStage.wireDemo) ---- */
/* the stage in the card's box. The stage sizes everything it draws off this box, so the only thing the card has
   to say is how big the box is - the herd, the card, the counter and the reveal all follow. */
.stmpd { position: absolute; inset: 0; overflow: hidden; border-radius: 14px; cursor: pointer;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
/* PRESSED. The counter sinking onto its lip is the real receipt, but it is a 90px part in a corner, and on a
   card whose whole job is to say "tap HERE" the surface itself has to answer. A ring of light round the inside
   of the screen, for as long as the finger is down: inset, so it reads as the glass lighting up rather than a
   button moving, and inside the stage's own clip so nothing escapes the bezel. */
.stmpd::after { content: ''; position: absolute; inset: 0; z-index: 90; pointer-events: none;
  border-radius: inherit; box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .5), inset 0 0 18px rgba(255, 255, 255, .22); --toy-drop:0px; --toy-drop-c:transparent; --toy-under:opacity(1);
  opacity: 0; transition: opacity .16s ease-out; }
.stmpd:active::after { opacity: 1; transition-duration: 0s; }
@media (prefers-reduced-motion: reduce) { .stmpd::after { transition: none; } }

/* ---- THE BIG SCREEN (stampede-big.js) ---- */
/* The wall mounts the same stage the phones do, so there is almost nothing here: a box for it, and the one
   pill it is allowed to show. Everything about how the herd is drawn lives above and is shared. */
.stmpb-stage { position: absolute; inset: 0; }
/* HOW MANY THUMBS ARE STILL GOING - and deliberately not what any of them has counted. The wall is what the
   players are watching, so a number on it would be the answer. See stampede-big.js. */
.stmpb-live {
  /* bottom-LEFT: the display's own Enable sound button lives in the bottom-right corner and sat across the
     word under the number (it is only gone once a host has clicked it, which on show night may be never) */
  position: absolute; left: 22px; bottom: 18px; z-index: 60;
  display: flex; align-items: baseline; gap: .4em;
  padding: .3em .8em .35em; border-radius: 999px;
  background: rgba(24, 18, 13, .66); color: #fff;
  font-size: var(--stmp-ui-fs, 16px); opacity: .5; transition: opacity .3s;   /* the stage, not the window */
}
.stmpb-live.on { opacity: 1; }
.stmpb-host.has-chart .stmpb-live { display: none; }   /* the chart is up: nobody is counting, and it says how many played */
.stmpb-live b { font-size: 1.5em; font-weight: 900; line-height: 1; }
.stmpb-live span { font-size: .72em; opacity: .7; letter-spacing: .06em; text-transform: uppercase; }

/* WHAT THE ROOM COUNTED (stampede-big.js chart, the server's guesses - only after a wave's answer is out): a light card in
   the bottom band, under the answer panel and the next wave's card, sized off the stage (--stmp-ui-fs) like the pill */
.stmpb-chart {
  position: absolute; left: 50%; bottom: 3.5%; z-index: 85; transform: translateX(-50%); display: none;   /* over the next wave's card (80) and its blur */
  width: min(86%, 34em); padding: .55em .9em .6em; border-radius: 1em; box-sizing: border-box;
  background: #FFFDF5; color: var(--toy-ink-color, #1E1E24); border: .16em solid var(--toy-ink-color, #1E1E24);
  box-shadow: none; --toy-drop:0.2em; --toy-drop-c:var(--toy-ink-color, #1E1E24); --toy-under:drop-shadow(0 .8em 0.8em rgba(20, 20, 30, .25));
  font-family: 'Lilita One', 'Fredoka', system-ui, sans-serif; font-size: var(--stmp-ui-fs, 16px); filter:var(--toy-fx, opacity(1)) drop-shadow(0 var(--toy-drop, 0px) 0 var(--toy-drop-c, transparent)) var(--toy-under, opacity(1))}
.stmpb-chart.on { display: block; }
.stmpc-head { display: flex; justify-content: space-between; align-items: baseline; font-size: .62em; letter-spacing: .14em; color: #4A4E63; margin-bottom: .35em; }
.stmpc-head b { font-weight: 400; color: var(--toy-ink-color, #1E1E24); }
.stmpc-bars { display: flex; align-items: flex-end; gap: .22em; height: 4.4em; }
.stmpc-col { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: .12em; }
.stmpc-bar { display: block; width: 100%; height: var(--h); min-height: .12em; border-radius: .22em .22em 0 0; background: #5B8DF5;
  box-shadow: inset 0 0 0 .1em var(--toy-ink-color, #1E1E24); --toy-drop:0px; --toy-drop-c:transparent; --toy-under:opacity(1); }
.stmpc-col.hit .stmpc-bar { background: #10B981; }
/* one player is still a bar: never thinner than this, so a 1 beside a 27 reads as a bar, not as the empty line under a 0 */
.stmpc-col:not(.none) .stmpc-bar { min-height: .42em; }
.stmpc-col.none .stmpc-bar { background: var(--toy-ink-color, #1E1E24); opacity: .35; box-shadow: none; --toy-drop:0px; --toy-drop-c:transparent; --toy-under:opacity(1); }
.stmpc-bars.grow .stmpc-bar { animation: stmpcGrow .35s cubic-bezier(.2, .9, .3, 1) both; transform-origin: 50% 100%; }
@keyframes stmpcGrow { from { transform: scaleY(0); } to { transform: none; } }
.stmpc-n { font-size: .62em; line-height: 1; min-height: 1em; }
.stmpc-x { font-size: .7em; line-height: 1; padding-top: .15em; color: #4A4E63; }
.stmpc-col.hit .stmpc-x { color: #fff; background: #10B981; border-radius: .4em; padding: .12em .35em; box-shadow: inset 0 0 0 .12em var(--toy-ink-color, #1E1E24); --toy-drop:0px; --toy-drop-c:transparent; --toy-under:opacity(1); }
.stmpc-far { margin-top: .4em; font-size: .66em; display: flex; flex-wrap: wrap; gap: .2em .5em; align-items: baseline; justify-content: center; }
.stmpc-far span { letter-spacing: .14em; color: #A3123A; }
.stmpc-far b { font-weight: 400; color: var(--toy-ink-color, #1E1E24); }
.stmpc-far.all { color: #0A8A60; letter-spacing: .14em; }
@media (prefers-reduced-motion: reduce) { .stmpc-bars.grow .stmpc-bar { animation: none; } }

/* ---- WHAT THAT WAVE WAS (stampede-stage.js, between waves) ---- */
/* The same light casing as the other two, so the three read as one set of parts. The colour of the VERDICT
   carries the outcome, not the colour of the card - a card that turned red would read as an error rather than
   a score, and the set behind it is pastel. */
.stmp-reveal {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 80;
  display: flex; flex-direction: column; align-items: center; gap: .42em;
  padding: .7em 1.1em .8em; border-radius: 1em;
  background: var(--stmp-case); border: var(--stmp-case-edge);
  color: var(--stmp-slate);
  font-family: 'Fredoka', ui-rounded, system-ui, sans-serif; font-weight: 700;
  font-size: var(--stmp-ui-fs, 16px); text-align: center;
}
.stmp-reveal > i { font-style: normal; font-size: .68em; letter-spacing: .2em; text-transform: uppercase; }
/* ONE number, in a dark recessed screen - a mechanical display window sunk into the casing. The strip of
   digits behind it is wound up from 0, so the window is exactly one digit tall and clips the rest. */
.stmp-rv-row { display: none; }
.stmp-rv-well {
  /* Plate and window, split for the reason .stmp-tally b gives above. This one had the transparent border at
     .2em/.3em of a 2.6em type - 9px and 14px - so the recess was held that far off every edge and drew a dark
     curtain down each side of the number (Daniel, 2026-11-01). Now the plate carries the recess to its own
     edges and .stmp-rv-win is the one-line clip. Same outer size. */
  width: 100%; box-sizing: content-box; overflow: hidden;
  padding: 0 .3em; border-radius: .3em; text-align: center;
  background: var(--stmp-screen); color: var(--stmp-screen-ink);
  font-family: 'Lilita One', ui-rounded, system-ui, sans-serif; font-size: 2.6em; line-height: 1;
}
.stmp-rv-win { display: block; height: 1em; overflow: hidden; }
.stmp-rv-reel { display: block; will-change: transform; }
.stmp-rv-reel i { display: block; height: 1em; font-style: normal; }
/* .08em is the house tracking for a verdict word (clearcut-stage.css .cc-hint .cc-verdict), not a guess */
.stmp-reveal > em {
  font-style: normal; font-family: 'Lilita One', ui-rounded, system-ui, sans-serif; font-weight: 400;
  font-size: 1.45em; letter-spacing: .08em;
}
.stmp-reveal.is-exact > em { color: var(--stmp-win); }
.stmp-reveal.is-near  > em { color: var(--stmp-near); }
.stmp-reveal.is-off   > em { color: var(--stmp-off); }
.stmp-rv-pts {
  text-decoration: none; font-family: 'Lilita One', ui-rounded, system-ui, sans-serif; font-weight: 400;
  font-size: .82em; letter-spacing: .04em;
  background: var(--toy-gold, #FFE066); color: #2A1F04;
  padding: .14em .55em .18em; border-radius: 999px;
  border: 2px solid var(--toy-ink-color, #1E1E24);
}
/* nothing earned: parchment, not gold. A gold badge reading 0 looks like a reward. */
.stmp-reveal.is-off .stmp-rv-pts {
  background: #E6DDC6; color: #6B6049;
}
/* THE WORDS WAIT FOR THE REEL. "ONE SHORT" on screen while the number is still climbing gives it away. */
.stmp-reveal > em, .stmp-rv-pts {
  opacity: 0; transform: scale(.82);
  transition: opacity .18s ease-out, transform .26s cubic-bezier(.2, 1.5, .4, 1);
}
.stmp-reveal.is-told > em, .stmp-reveal.is-told .stmp-rv-pts { opacity: 1; transform: scale(1); }
