/* Squirm.io — one stylesheet for the game chrome and the content pages.
   Keeping them together is deliberate: the HUD and the prose share a type
   scale and a palette, and two stylesheets is how they stop matching. */

/*
 * The two faces, self-hosted (assets/font/LICENCE.txt says why it is not a Google link).
 *
 *   Titan One  the lettering: every button, title, price, number. Round, fat and
 *              friendly, the same softness as our worms and fruit. One weight.
 *   Fredoka    the interface: longer and smaller text. One variable file, every weight
 *              from 300 to 700. A rounded face that stays open at 14px.
 *
 * Titan One was chosen 20 Oct 2026 against Lilita One (the old face: narrower, so less
 * chunk), Bowlby One SC (all caps and very wide, German buttons would not fit), Luckiest
 * Guy and Bangers (capitals only, comic-strip rather than candy) and Chewy (wobbly, thin
 * at 14px). Baloo 2 (Pranksters' text face) was tried for the interface and dropped: its
 * line box is a third taller than Fredoka's, and Safari cannot be told to trim it
 * (@font-face ascent-override is unsupported there), so every text block on an iPhone
 * would have grown. Fredoka keeps the same rounded friendliness at the old heights.
 *
 * `swap` on purpose: a flash of the fallback beats a flash of nothing.
 */
@font-face{ font-family: "Titan One"; src: url("/font/titan-one.woff2?v=2f15f138") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face{ font-family: "Fredoka"; src: url("/font/fredoka.woff2?v=27d49d7c") format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }
/* Lilita One: the layered in-game titles only (.fx: power-up and level-up pops, reward and wheel titles, the length and prize numbers), as they have always been drawn. */
@font-face{ font-family: "Lilita One"; src: url("/font/lilita-one.woff2?v=d2575d4f") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
/* Orbitron — the Overdrive theme's lettering (29 Sep 2026). One weight, Latin
   subset, 7KB, self-hosted like the others. Loaded only when a rule asks for
   it, which is only under [data-vibe="overdrive"]. */
@font-face {
  font-family: "Orbitron";
  src: url("/font/orbitron-800.woff2?v=e2591ec1") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* The front screen's drop-downs: every panel sits ABOVE every button that opens one. The language
     flag had its own z-index (31), above More's panel (20), so on an upright phone, where the flag
     sits beside the logo, it was drawn over More's top corner (Gray, 18 Oct 2026). One pair of
     layers, not a number per piece: a new nav button or panel takes one of these. */
  --z-navbutton: 10;
  --z-navpanel: 20;
  /*
   * Near-black and lime.
   *
   * The palette was navy and mint, which is calm — and calm is the wrong note
   * for an arcade game about being eaten. Lime on near-black is the genre's
   * own language, it survives being scaled down to a portal thumbnail, and it
   * is the one colour that cannot be confused with slither.io's blue.
   */
  --ink: #07090F;
  --ink-2: #10141F;
  --ink-3: #1A2030;
  --line: #262E42;
  --text: #F2F5FA;
  --text-dim: #9AA6BE;
  --accent: #FF4FAD;
  --accent-2: #D11F7C;
  --accent-ink: #FFFFFF;
  --hot: #FF3B5C;
  --warn: #FFC53D;
  /*
   * Rounder. Much rounder.
   *
   * "no cooperate looking squared sharp business look" — 16px on a 560px panel
   * reads as a business card. Games in this field run 20-28px on panels and
   * fully rounded pills on controls, and the softness is most of what separates
   * "fun" from "enterprise dashboard".
   */
  --radius: 24px;
  --radius-sm: 14px;
  --radius-pill: 999px;

  /*
   * A real colour system, not one accent on grey.
   *
   * Gray, looking at Shell Shockers: "more colour, bright colours, thats what
   * kids want". The lime stays the primary — it is the brand and it survives a
   * portal thumbnail — but a single accent on near-black gives every control
   * the same voice, so nothing reads as more or less important than anything
   * else, and none of it reads as playful.
   *
   * Four more, each with ONE job, so colour means something:
   *   sky    the surface a panel is made of, and the calm default
   *   grape  a second category, for what is yours (skins, progress)
   *   tang   attention: the selected thing, the thing to press next
   *   berry  destructive, and only that
   * Each has a `-deep` for the extruded bottom lip that makes a button look
   * like an object you can push instead of a rectangle with a label in it.
   */
  --sky: #2C8FD6;
  --sky-deep: #1D6BA8;
  --sky-soft: #57ADEC;
  --grape: #8B5CF6;
  --grape-deep: #6D33E0;
  --tang: #FF9F1C;
  --tang-deep: #D97B00;
  --berry: #FF3B5C;
  --berry-deep: #C8102E;
  --lime-deep: #8CBB0F;
  /* White, for the pill inputs and the panel copy that sits on colour. */
  --paper: #FFFFFF;
  --paper-dim: rgba(255, 255, 255, 0.78);
  /*
   * The reading measure, as a fixed length rather than ch.
   *
   * It was 74ch, and ch is relative to the element's OWN font size — so the
   * same variable gave a 46px h1 a max-width of ~1850px and a 17px paragraph
   * ~790px. The heading was effectively unconstrained, which is why it ran the
   * full width of the viewport above a much narrower column.
   */
  --max: 46rem;
  /* The game panel is a picture, not prose — it gets more room than the text. */
  --game-max: 1180px;
  /* The header is sticky and the arena sits directly under it, so its height
     is a layout constant rather than a guess. Keep it in step with the
     header's own padding and wordmark height. */
  --header-h: 68px;
  /* The boost button's size and inset, bottom right. The sound dock lives on the
     phone, so both need to read from one place. */
  /* The dock's corner: its own width plus the inset either side. The menu
     overlay keeps its panel out of this lane. */
  /* The dock's own footprint. No longer reserved as a lane — see .overlay —
     but check-layout uses it to assert the panel clears the dock. */
  --dock-lane: 148px;
  /* The boost button's footprint, bottom RIGHT. Nothing else may claim that
     corner during a run. */
  --boost-size: 96px;
  --boost-inset: 24px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /*
   * A real display face, self-hosted.
   *
   * It was "Trebuchet MS" — a system font from 1996 that is the single biggest
   * reason this looked like a business tool rather than a game. Gray: "no
   * cooperate looking squared sharp business look". Fredoka is the soft
   * geometric round the WORDMARK is already drawn in, so the lettering and the
   * interface finally speak with one voice.
   *
   * Self-hosted rather than linked: a portal build must carry no third-party
   * resources at all, and a webfont fetched from Google is a request that can
   * fail and leave the game wearing Trebuchet anyway. 29KB, latin subset,
   * variable weight — see assets/font/LICENCE.txt.
   */
  --font-display: "Fredoka", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  /* The lettering face (see the @font-face note). Every button, title, price and number asks for this one name. */
  --font-label: "Titan One", "Fredoka", "Trebuchet MS", system-ui, sans-serif;
  /*
   * The house lettering: ONE mechanism, a real outline plus one clean drop.
   *
   * It was eight or nine stacked offset shadows per element, which smear into a
   * blur on small text (Gray, 19 Oct 2026: "not readable by people with not so good
   * eyesight ... ugly and 2005 style"). Now:
   *
   *   -webkit-text-stroke + paint-order: stroke fill   the outline, drawn UNDER the
   *       letter, so only its outer half shows and the counters of a, e, o, 8 stay open
   *   one solid text-shadow of 0 var(--lt-drop) 0 var(--ts)   the drop beneath it
   *
   * Everything is in em with a floor and a ceiling, so it scales by itself: a 24px
   * button gets a juicy 3px outline and a 2.4px drop, a 14px note a thin 1.4px
   * outline and a 1px drop, a 4rem hero word never goes past 4px. A rule only says
   * WHAT it is (it joins the list under "House lettering", far below) and which dark
   * tone to wear (`--ts`). It may override --lt-stroke or --lt-drop; it never writes its own
   * shadows.
   *
   * Browsers without paint-order (rare; the list is in "House lettering") draw no
   * outline and keep a four-way hard shadow instead: still crisp, still readable.
   */
  --lt-stroke: clamp(2px, 0.22em, 8px);
  --lt-drop: clamp(1.5px, 0.1em, 5px);
  --ts: #24104f;
}

* { box-sizing: border-box; }

/* The overlays and boost button all set `display`, which beats the
   user-agent rule for [hidden] regardless of specificity — author styles always
   win over UA styles. Without this, every "hidden" panel renders on load. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
}

img, svg, canvas { max-width: 100%; }

/*
 * Zero specificity, like every container rule below it.
 *
 * The container link rules were wrapped in :where() so a component class
 * always beats them — which is what fixed the invisible call-to-action
 * buttons. But a bare `a` scores (0,0,1), and (0,0,1) beats (0,0,0): the
 * global rule then won against every wrapped container rule and repainted
 * those links in the accent colour. The settings tab you are on was accent
 * text on an accent background, a blank lime pill. Gray spotted it on a
 * phone.
 *
 * With everything at zero, source order decides among these rules — global
 * first, containers after — and any component class still wins by existing.
 */
:where(a) { color: var(--accent); text-underline-offset: 3px; }
:where(a:hover) { color: var(--accent-2); }

.visually-hidden{
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link{
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: #06210F; padding: 10px 16px; border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 700;
}
.skip-link:focus{ left: 0; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
/*
 * The focus ring is for the keyboard (main.ts sets `data-keys` on the page at the first real key press and takes it off at
 * the next touch or click). Without that, a button the page focuses itself, such as Play Again when the death screen
 * comes up, counts as focus-visible and wears a white box nobody asked for. Inside the game only: the site's own pages
 * keep the plain browser rule above.
 */
html:not([data-keys]) .game :focus-visible{ outline: none !important; }
/* The power-up picked with a TV remote's Down or a pad's D-pad in a run (client spatialNav.ts): OK or X uses it. */
.powerarc__item[data-tv-pick]{ outline: 4px solid #ffe45c; outline-offset: 3px; border-radius: 50%; }

/* ------------------------------------------------------------ site chrome */
/* ------------------------------------------------------------- the header */
/*
 * The bar the genre actually uses, one notch up.
 *
 * Checked against the field before rebuilding it: the pure-game sites
 * (slither.io, snake.io, wormax.io, agar.io, diep.io) ship no header at all —
 * the game is the page. The ones that carry content pages, as this site does,
 * all run the same bar: chunky logo left, short uppercase nav, and a loud way
 * back into the game. Little Big Snake leads with PLAY NOW; Worms Zone leads
 * with Home. So the shape here is settled convention, and the polish is ours:
 * a sticky glass bar over the arena, display type at nav size, and one lime
 * accent spent on the two things that matter — where you are, and how to play.
 */
/* Same bar as the settings page's, so the two never read as two sites. */
.siteheader{ position: sticky; top: 0; z-index: 30; background: linear-gradient(180deg, #2b2366, #1c1650); border-bottom: 3px solid #fff; box-shadow: 0 2px 0 #7a2a6a, 0 10px 24px -12px rgba(0, 0, 0, 0.6); padding-top: var(--safe-t); }
@supports (backdrop-filter: blur(1px)) {
  .siteheader{ background: linear-gradient(180deg, rgba(43, 35, 102, 0.94), rgba(28, 22, 80, 0.94)); backdrop-filter: blur(14px); }
}
.siteheader__inner{
  display: flex; align-items: center; gap: 10px clamp(14px, 3vw, 30px); flex-wrap: wrap;
  /*
   * Centred on the same column as the game panel below it. The header used to
   * be full-bleed with its contents pinned to the left, so on a wide screen the
   * wordmark sat alone with 1,380px of empty bar beside it while everything
   * underneath was centred — which is what "it is all to the left" was.
   */
  /*
   * The bar spans the window, because the arena under it now does too. It used
   * to be capped at the game box's 1180px so the two lined up; with a
   * full-bleed arena that cap left the wordmark floating in the middle of
   * nothing. Capped well wide so it does not stretch on an ultrawide.
   */
  width: min(1600px, 100%);
  margin-inline: auto;
  padding: 12px clamp(16px, 3vw, 32px);
}
.siteheader__brand{ text-decoration: none; flex: 0 0 auto; display: block; }
.wordmark{
  /* The real wordmark, sized by height so the aspect ratio does the rest. */
  display: block;
  height: 40px;
  width: auto;
  transition: transform 0.16s ease;
}
.siteheader__brand:hover .wordmark{ transform: translateY(-1px) scale(1.02); }

.siteheader__nav{ flex: 1 1 auto; min-width: 0; }
.siteheader__nav ul{
  display: flex; gap: 2px clamp(4px, 1.4vw, 14px); list-style: none; margin: 0; padding: 0;
  /* Five items on a phone beat a hidden menu: a tap you cannot see is a tap
     you do not make, and this is the whole internal link graph. */
  overflow-x: auto; scrollbar-width: none;
}
.siteheader__nav ul::-webkit-scrollbar{ display: none; }
:where(.siteheader__nav) :where(li){ flex: 0 0 auto; }
:where(.siteheader__nav) :where(a){
  position: relative; display: block; padding: 8px 10px 9px;
  font-family: var(--font-display); font-weight: 700;
  font-size: 0.86rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-dim); text-decoration: none; white-space: nowrap;
  transition: color 0.14s ease;
}
/* The underline is a scanline: lit under where you are, sweeping in on hover. */
:where(.siteheader__nav) :where(a::after){
  content: ""; position: absolute; left: 10px; right: 10px; bottom: 2px; height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--accent) 22%, var(--accent) 78%, transparent);
  transform: scaleX(0); transform-origin: left; transition: transform 0.18s ease;
}
:where(.siteheader__nav) :where(a:hover){ color: var(--text); }
:where(.siteheader__nav) :where(a:hover::after){ transform: scaleX(1); }
:where(.siteheader__nav) :where(a[aria-current="page"]){ color: var(--text); }
:where(.siteheader__nav) :where(a[aria-current="page"]::after){ transform: scaleX(1); }

.siteheader__cta{ flex: 0 0 auto; display: inline-block; padding: 8px 18px 10px; border-radius: 999px; text-decoration: none; font-size: 1rem; letter-spacing: 0.02em; --rim: 4px; }
@media (hover: hover){ .siteheader__cta:hover{ filter: brightness(1.07); } }

@media (max-width: 640px) {
  :root { --header-h: 64px; }
  .wordmark{ height: 32px; }
  /*
   * On a page that carries the game there is no Play button in the bar, so the
   * links fit beside the wordmark and the header stays one row — 56px instead
   * of 102px, which is 46px of arena back on a phone.
   */
  .siteheader__inner:not(:has(.siteheader__cta)){
    /* nowrap is the whole trick: with wrapping on, a flex item wider than the
       space left is moved to its own line *before* shrinking is considered, so
       min-width and flex-shrink never got a say and the nav always took a
       second row. */
    flex-wrap: nowrap;
  }
  .siteheader__inner:not(:has(.siteheader__cta)) .siteheader__nav{
    order: 0; flex: 1 1 0; min-width: 0;
  }
  /* The sideways-scrolling row is gone on a phone: the burger holds the
     same links, and a row that hid most of the site behind a swipe was the
     problem being fixed. */
  .siteheader__nav{ display: none; }
  .siteheader__inner{ flex-wrap: nowrap; }
  .siteheader__cog{ display: inline-grid; }
  .siteheader__menu{ display: block; }
  .siteheader__inner:not(:has(.siteheader__cta)) .siteheader__cog{ margin-left: auto; }
  :where(.siteheader__nav) :where(a){ font-size: 0.8rem; padding: 6px 8px 8px; }
  .siteheader__cta{ margin-left: auto; padding: 9px 16px 10px; font-size: 0.82rem; }
}
/*
 * Icon buttons and the phone menu. Hidden on anything wider than a phone,
 * where the full nav row fits and a burger would hide it for no reason.
 */
.iconbtn{ display: inline-grid; place-items: center; flex: 0 0 auto; width: 46px; height: 46px; padding: 0; border-radius: 15px; cursor: pointer; list-style: none; text-decoration: none; --rim: 4px; }
.iconbtn::-webkit-details-marker{ display: none; }
@media (hover: hover){ .iconbtn:hover{ filter: brightness(1.08); } }
.iconbtn:focus-visible{ outline: 2px solid var(--accent); outline-offset: 2px; }
.icon{ width: 20px; height: 20px; display: block; }
/*
 * The dropdown hangs off its OWN button. It used to be positioned against the
 * nearest positioned ancestor — the header on inner pages, the rail on phones —
 * and on the desktop front screen that was the whole-screen overlay, so the
 * panel opened below the bottom of the window: the button turned into an X and
 * nothing appeared (found on the live site straight after deploy, 10 Sep 2026).
 */
.navmenu{ position: relative; }
.menu__menu{ z-index: 30; }
.navmenu .icon--close{ display: none; }
.navmenu[open] .icon--close{ display: block; }
.navmenu[open] .icon--burger{ display: none; }
.navmenu[open] > .iconbtn{ filter: brightness(0.92) saturate(1.1); transform: scale(0.96); }
/*
 * Hidden above the phone breakpoints — and ONLY there, by media query.
 *
 * These were unconditional `display: none` rules, which put the answer in the
 * hands of source order: the phone rules that show the cog and menu live in
 * earlier @media blocks at the same specificity, so the later "hide" won on
 * phones too. The content pages shipped with no cog and no menu at all; the
 * homepage only escaped because its phone block happens to come after this.
 * Scoping the hide to the widths where it applies means order cannot decide.
 */
@media (min-width: 641px) {
  .siteheader__cog, .siteheader__menu{ display: none; }
}
.menu__menupanel{ max-height: min(72dvh, calc(100dvh - 140px)); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.35) transparent; }
.navmenu__group{
  margin: 14px 4px 2px;
  font-family: var(--font-display); font-weight: 700; font-size: 0.72rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent);
}
.navmenu__group:first-child{ margin-top: 6px; }
.navmenu__sound{
  appearance: none; -webkit-appearance: none; display: block; width: 100%;
  padding: 13px 4px; text-align: left; cursor: pointer;
  background: none; border: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font: inherit; font-family: var(--font-display); font-weight: 700; font-size: 1.02rem;
  color: var(--text);
}
@media (hover: hover){ .navmenu__sound:hover{ color: var(--accent); } }
.navmenu__panel{ z-index: var(--z-navpanel); position: absolute; top: calc(100% + 10px); right: 0; left: auto; width: min(360px, calc(100vw - 24px)); padding: 8px 18px 14px; border-radius: 22px; background: linear-gradient(180deg, #2b2366, #1c1650); border: 4px solid #fff; box-shadow: 0 0 0 2px #7a2a6a, 0 20px 44px -12px rgba(0, 0, 0, 0.65); }
.navmenu__panel ul{ list-style: none; margin: 0; padding: 0; display: grid; }
:where(.navmenu__panel) :where(a){ display: block; padding: 12px 4px; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
:where(.navmenu__panel) :where(a:hover){ color: var(--accent); }
:where(.navmenu__panel) :where(a[aria-current="page"]){ color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .siteheader__nav a::after, .wordmark, .siteheader__cta { transition: none; }
}

/*
 * The footer and breadcrumb share the header's column. Without this they run
 * full-bleed and pin left while everything between them is centred — the
 * "shit is all to the left" that started the layout rework.
 */
.sitefooter > *,
.breadcrumb > *{
  width: min(var(--game-max), 100%);
  margin-inline: auto;
}

.breadcrumb{ padding: 14px clamp(16px, 4vw, 40px) 0; }
:where(.breadcrumb) :where(a, li) { color: var(--paper-dim); }
.breadcrumb ol{
  /*
   * margin-block, never the `margin` shorthand. The shorthand also sets
   * margin-inline, which silently cancelled the `margin-inline: auto` above
   * and pinned the breadcrumb to the far left of a 1512px screen while
   * everything else on the page was centred. Same specificity, written later,
   * so it won — and the centring rule was still sitting right there in the
   * file looking correct.
   */
  display: flex; gap: 8px; list-style: none; margin-block: 0; padding: 0;
  font-size: 0.87rem; color: var(--text-dim);
}
:where(.breadcrumb) :where(li + li::before){ content: "/"; margin-right: 8px; opacity: 0.5; }

main { padding: 22px clamp(16px, 4vw, 40px) 64px; }

/*
 * Centre everything in <main> on the reading measure.
 *
 * `main` had padding and nothing else, so on a wide screen the text column sat
 * hard against the left with 600px of dead space beside it — and worse, only
 * `.prose` and `.lede` were capped, so an h1 ran the full 1345px above a 792px
 * paragraph. A heading four times wider than the text it introduces reads as a
 * broken layout, not a design.
 *
 * Applied to every child rather than a list of block classes, so a block added
 * later cannot quietly escape the measure — which is exactly how the h1 and the
 * CTA came to be outside it.
 */
main > * {
  max-width: var(--max);
  margin-inline: auto;
}

/*
 * The arena is not the exception to the measure — it is not on the page at all.
 *
 * Checked against twenty snake games before rebuilding this. The ones that are
 * a *game* — slither.io, wormate.io, wormax.io, gulper.io, mope.io, splix.io —
 * all do the same thing: the arena fills the window, and a single centred
 * column floats on top of it carrying a wordmark, a nickname and a Play button.
 * Nothing else is above the fold. The ones that wrap the game in a document are
 * the ones whose real product is an app-store listing (worms.zone,
 * littlebigsnake.com, snake.io), and they lead with a download button.
 *
 * Squirm.io was doing neither: a 16:9 letterboxed box centred in a 1180px
 * column with an article under it and grey rails either side, which reads as a
 * blog post with a game widget in it. The arena now breaks out of `main` and
 * fills the viewport under the header, and the prose starts below the fold
 * where it belongs — still in the document, still indexed, just not competing
 * with the thing people came for.
 */
main > .game{
  /* Break out of main's padding and the reading measure both. */
  width: 100vw;
  max-width: none;
  margin-left: 50%;
  transform: translateX(-50vw);
  border-radius: 0;
  border-inline: 0;
  aspect-ratio: auto;
  height: calc(100dvh - var(--header-h));
  max-height: none;
  min-height: 420px;
}
.page--home main{ padding-top: 0; }

/* ------------------------------------------------------------- the menu
 *
 * The front screen is the PAGE, not a card on it.
 *
 * "we dont need that box in the middle man thats one of the main issues nobody
 * does that" — and nobody does: slither.io, wormate.io, wormax.io, gulper.io
 * and littlebigsnake all put the name field and Play straight onto the arena
 * with everything else pinned to the edges. A 430px panel with its own
 * background, border and scrollbar was the one thing making this look like a
 * game embedded in a website rather than a game.
 *
 * Three rows: a top rail, the middle, a bottom rail — plus a footer line. Grid
 * rather than absolute positioning, so the middle is centred in what is
 * actually left over rather than in the whole viewport.
 */
.overlay--menu{
  display: block; padding: 0;
  opacity: 1; transition: opacity 0.26s ease;
  background:
    linear-gradient(to bottom, rgba(12, 22, 58, 0.62) 0%, rgba(12, 22, 58, 0) 18%),
    linear-gradient(to top, rgba(12, 22, 58, 0.66) 0%, rgba(12, 22, 58, 0) 22%),
    radial-gradient(ellipse 120% 90% at 50% 45%, rgba(12, 22, 58, 0) 55%, rgba(12, 22, 58, 0.34) 100%);
}
.overlay--menu.is-out{ opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  .overlay--menu{ transition: none; }
}
/*
 * The beta strip, above the menu.
 *
 * Only while it is showing does the overlay become a column, so that the menu
 * gives up exactly the strip's height and not a pixel more. Dismissed, none of
 * these rules match and the menu is precisely what it was before the strip
 * existed — its phone layout took three rounds to get right and is not
 * disturbed here.
 *
 * The strip carries the notch inset; the menu then must not pad for it again,
 * or an iPhone gets the safe area twice.
 */
.overlay--menu:has(> .beta:not([hidden])){ display: flex; flex-direction: column; }
.overlay--menu:has(> .beta:not([hidden])) > .menu{
  flex: 1 1 auto; min-height: 0; height: auto; padding-top: 10px;
}
.beta{
  align-self: center; display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: calc(8px + var(--safe-t)) auto 0; max-width: calc(100% - 24px);
  padding: 5px 6px 5px 8px; border-radius: 999px;
  background: rgba(20, 16, 60, 0.62);
  font-size: 0.8rem; color: #fff;
}
@supports (backdrop-filter: blur(1px)) {
  .beta{ background: rgba(20, 16, 60, 0.46); backdrop-filter: blur(10px); }
}
.beta__text{ margin: 0; min-width: 0; line-height: 1.35; }
.beta__tag{
  display: inline-block; margin-right: 8px; padding: 2px 9px 3px; vertical-align: 1px;
  border-radius: var(--radius-pill); background: #ff4fad; color: #fff;
  font-family: var(--font-label); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase;
}
.beta__short{ display: none; }
.beta__close{ flex: 0 0 auto; appearance: none; -webkit-appearance: none; cursor: pointer; width: 30px; height: 30px; padding: 0; border-radius: 10px; line-height: 1; font-size: 0.8rem; --rim: 3px; }
@media (hover: hover){ .beta__close:hover{ filter: brightness(1.06); } }
.beta__close:focus-visible{ outline: 2px solid var(--accent); outline-offset: 2px; }
/* Straight after an update the strip is the explanation, so it is louder. */
.beta.is-updated{
  box-shadow: 0 0 0 2px #ff4fad;
}
/* The short line up to 899px: between 621 and about 760 the long one wrapped to two lines
   over the top rail (Gray's screenshot, 15 Sep 2026). */
@media (max-width: 899px) {
  .beta{ justify-content: space-between; font-size: 0.74rem; }
  .beta__long{ display: none; }
  .beta__short{ display: inline; }
}

/*
 * The front screen's own pieces. WHERE each one goes is "THE FRONT SCREEN"
 * near the end of this file: named zones, per orientation (11 Oct 2026).
 */
/* Off is the quiet grey button with the icon crossed out (the slash is in the icon, see .icon__slash); on is the violet one.
   Any icon button that carries a slash, anywhere: the music and sound buttons here, and the two in Settings. */
.iconbtn[aria-pressed="false"]:has(.icon__slash){
  --bodyA: #f6f8fc; --bodyB: #d7dfeb; --bodyC: #aeb9cb; --ink: #5a6a88; --ts: rgba(255, 255, 255, 0);
}
.menu .iconbtn .icon{ stroke-width: 2.6; }
/*
 * The middle: name, Play, Play with friends. It clips rather than spilling onto
 * the rows around it, and may be shorter than its content (fitPanels scales it
 * down as a whole when a window is too short for it).
 */
.menu__core{
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 0; min-width: 0; text-align: center; overflow: hidden;
  /* The clip edge sits outside the column, so Play's rim and jelly are never sliced. */
  padding: 8px 14px; margin: -8px -14px;
}
/*
 * The wordmark. Small, and sized by HEIGHT, a share of the screen's (15% on a
 * phone held sideways, 12% upright, up to 20% on a desktop): on a phone it was
 * the biggest thing on the screen (Gray, 11 Oct 2026). The jelly squash needs a
 * little room round it, carried as margin in its own size.
 */
.menu__mark{
  display: block; width: auto; height: var(--mark-h, 18vh); max-width: 100%;
  min-height: 0; object-fit: contain; flex-shrink: 0;
  margin: calc(var(--mark-h, 18vh) * 0.06) auto 0;
  /*
   * The soft shadow stays INSIDE the room the logo has: a 22px blur was cut off
   * in straight lines, a box behind the logo (Gray, 30 Sep 2026). A 9px blur
   * ends about 14px out.
   */
  filter: drop-shadow(0 4px 0 rgba(40, 16, 90, 0.5)) drop-shadow(0 6px 7px rgba(0, 0, 0, 0.4));
}
.menu__eyebrow{
  /* The homepage's keyword line (it has to stay visible prose): one line, a
     pink live-dot, shrinking with the screen rather than wrapping. No box
     (Gray, 14 Sep 2026): plain letters with the leaderboard's dark ring. */
  margin: 0; display: inline-block; max-width: 100%; flex-shrink: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(0.5rem, 1.6vh, 0.72rem); letter-spacing: 0.12em; text-transform: uppercase;
  color: #fff; padding: 2px 4px;
  --ts: #1c0d3a;
}
.menu__eyebrow::before{
  content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; vertical-align: 1px;
  border-radius: 50%; background: #ff4fad; box-shadow: 0 0 0 3px rgba(255, 79, 173, 0.28);
}
/*
 * The language selector (ui/languagePicker.ts): the current flag on the same
 * round button as the bell, and a short list in the burger menu's own panel
 * and rows. The flag is a drawn picture (shared/languages.ts) in a rounded
 * tile, with the little caret that says the button opens something.
 */
.menu__lang{ z-index: var(--z-navbutton); }
.menu__langbtn{ position: relative; }
.menu__langflag{
  position: relative; display: block; width: 29px; height: 20px; margin-top: -4px; border-radius: 4px; overflow: hidden;
}
.menu__langflag .flag, .langitem__flag .flag{ display: block; width: 100%; height: 100%; filter: none; }
.menu__langflag::after, .langitem__flag::after{
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.3), inset 0 1.5px 0 rgba(255, 255, 255, 0.35);
}
.menu__langcaret{
  position: absolute; left: 50%; bottom: 3px; width: 9px; height: 6px; margin-left: -4.5px;
  fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
}
.menu__lang[open] .menu__langcaret{ transform: rotate(180deg); }
.menu__langpanel{ width: auto; min-width: 190px; max-width: calc(100vw - 24px); }
.menu__langpanel ul{ gap: 2px; }
.langitem{
  display: flex; align-items: center; gap: 12px; border-radius: 12px; padding: 10px 8px;
  border-bottom: 0; text-align: left;
}
@media (hover: hover){ .langitem:hover{ background: rgba(255, 255, 255, 0.08); } }
.langitem__flag{ position: relative; flex: 0 0 auto; display: block; width: 30px; height: 20px; border-radius: 5px; overflow: hidden; }
.langitem__name{ flex: 1 1 auto; }
.langitem[aria-pressed="true"]{ color: var(--accent); }
.langitem[aria-pressed="true"]::after{
  content: ""; flex: 0 0 auto; width: 16px; height: 16px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M2.5 8.5l3.5 3.5 7.5-8' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M2.5 8.5l3.5 3.5 7.5-8' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / contain no-repeat;
}
@media (max-width: 520px), (orientation: landscape) and (max-height: 500px) {
  .menu .menu__langflag{ width: 24px; height: 16px; margin-top: -3px; border-radius: 3px; }
  .menu .menu__langcaret{ bottom: 2px; width: 8px; height: 5px; margin-left: -4px; }
}

.menu__field{
  align-self: stretch; display: flex; align-items: center; gap: 10px; text-align: left;
  padding: 5px 8px 5px 18px; border-radius: 18px; background: #fff;
  box-shadow: 0 0 0 3px rgba(60, 20, 110, 0.4), 0 8px 16px -6px rgba(0, 0, 0, 0.45);
}
.menu__label{
  margin: 0; flex: 0 0 auto;
  font-family: var(--font-display); font-weight: 700; font-size: 0.72rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: #8a6aa8;
}
/*
 * White, not a dark hole.
 *
 * A near-black input on a near-black page is the single most "corporate dark
 * dashboard" element on the screen, and it is also the hardest thing to read
 * over a moving arena. Every game this is measured against uses a bright pill:
 * the one place you TYPE should be the one place that is paper.
 */
.menu__input{
  flex: 1; min-width: 0; width: 100%; padding: 9px 4px; font: inherit;
  font-size: 1.2rem; font-weight: 700; color: #22314d; background: transparent;
  border: 0; border-radius: 12px;
}
.menu__input::placeholder{ color: #8496AE; font-weight: 500; }
.menu__input:focus{ outline: none; }
.menu__field:focus-within{ box-shadow: 0 0 0 3px #ff4fad, 0 8px 16px -6px rgba(0, 0, 0, 0.45); }
/* No name yet and Play pressed (menu.ts askForName): the box says so. */
.menu__field.is-needed{ box-shadow: 0 0 0 4px var(--hot), 0 8px 16px -6px rgba(0, 0, 0, 0.45); animation: name-shake 0.42s ease-in-out; }
@keyframes name-shake{ 20%{ translate: -7px 0; } 40%{ translate: 6px 0; } 60%{ translate: -4px 0; } 80%{ translate: 2px 0; } }
@media (prefers-reduced-motion: reduce){ .menu__field.is-needed{ animation: none; } }
/*
 * Buttons are FLAT.
 *
 * They had an extruded lip and a coloured glow — "get rid of shadows on
 * buttons, the lip, make the buttons everywhere better". The lip is a 2010
 * mobile-game tell and the glow made every control look like it was on fire;
 * together they meant the Play button, the nav chips and the choice cards were
 * all shouting at the same volume.
 *
 * What is left carries the weight instead: a solid fill, a generous radius,
 * real size, and one honest press state — the whole thing dips a pixel and
 * darkens. That is enough to feel like a button and quiet enough that the
 * screen has a hierarchy again.
 */
.menu__play{ flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 8px 36px 12px; border-radius: 24px; cursor: pointer; font-size: clamp(1.9rem, 3.4vw, 2.6rem); letter-spacing: 0.01em; min-width: min(280px, 72vw); }
@media (hover: hover){ .menu__play:hover{ filter: brightness(1.07); } }
.menu__play:focus-visible{
  outline: 3px solid #fff; outline-offset: 5px;
}

/*
 * The front screen MOVES.
 *
 * Gray, 10 Sep 2026, twice: Worms Zone's menu is exciting because nothing on it
 * sits still — "main logo bounces around, play button bounces different". Their
 * game is compiled C++ (Emscripten), so the tweens can't be read; these are
 * measured off their menu at 0.25s intervals: the wordmark wobbles like jelly
 * on a slow loop, the To-battle button pulses about 4% on a quicker one, and
 * the two never move together.
 *
 * The button stays FLAT (the no-lip rule above). The excitement is motion and
 * light, not an extruded edge. `scale`/`rotate` are the individual transform
 * properties, so the pulse never fights the button's own press transform.
 */
.menu__mark{
  transform-origin: 50% 88%;
  animation: markDrop 0.7s cubic-bezier(.2,1.6,.4,1) both, markJelly 2.8s ease-in-out 0.7s infinite;
}
@keyframes markDrop{
  0%  { translate: 0 -46px; opacity: 0; scale: 0.9; }
  60% { opacity: 1; }
  100%{ translate: 0 0; opacity: 1; scale: 1; }
}
@keyframes markJelly{
  0%, 100%{ scale: 1 1;       rotate: 0deg; }
  20%     { scale: 1.055 0.95;  rotate: -2deg; }
  40%     { scale: 0.96 1.045;  rotate: 1.4deg; }
  60%     { scale: 1.03 0.98;   rotate: -0.7deg; }
  80%     { scale: 0.99 1.015;  rotate: 0.3deg; }
}



@media (prefers-reduced-motion: reduce){
  .menu__mark{ animation: none; }
}

/* --------------------------------------------------------- the skin strip */
.menu__look{ display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center; }
.menu__look .menu__label{ margin: 0; }
.swatches{
  display: flex; align-items: center; gap: 8px;
  max-width: min(520px, 70vw); overflow-x: auto; padding: 3px;
  scrollbar-width: none;
}
.swatches::-webkit-scrollbar{ display: none; }
.swatch{
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; cursor: pointer;
  border: 2px solid transparent; padding: 0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.45);
  transition: transform 0.12s ease, border-color 0.12s ease;
}
@media (hover: hover){ .swatch:hover{ transform: scale(1.12); } }
.swatch.is-selected{ border-color: var(--text); }
.swatch:focus-visible{ outline: 2px solid var(--accent); outline-offset: 3px; }
.menu__more{
  background: none; border: 0; padding: 0; cursor: pointer; font: inherit;
  color: var(--text-dim); font-size: 0.94rem; display: inline-flex; align-items: center; gap: 8px;
}
@media (hover: hover){ .menu__more:hover{ color: var(--text); } }
.menu__more:focus-visible{ outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }

/*
 * Skin and arena: two matching cards, each a picture, a name and a pair of
 * arrows that choose in place. Gray's front-screen design, 13 Sep 2026:
 * "Skin · Zebra ‹ ›" beside "Arena · Meadow ‹ ›", dark violet with a light
 * rim, over the name and Play. They sit still; the Play button is the one
 * thing on this row that moves.
 */
.pickrow{
  display: flex; justify-content: center; gap: clamp(12px, 2.4vw, 26px);
  width: var(--col);
}
.pickcard{
  flex: 1 1 0; min-width: 0;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto;
  grid-template-areas: "art name prev next";
  align-items: center; column-gap: 8px;
  padding: 7px 8px 7px 8px; border-radius: 20px; color: #fff;
  background: linear-gradient(180deg, #34217c, #231457);
  box-shadow: inset 0 0 0 2px #6d55d9, 0 0 0 2px #190c3d, 0 10px 18px -8px rgba(0, 0, 0, 0.55);
}
.pickcard__art{
  grid-area: art; display: block; width: clamp(80px, 7.2vw, 108px); aspect-ratio: 260 / 150;
  border-radius: 12px;
}
.pickcard__art canvas{ display: block; width: 100%; height: 100%; }
/* The floor is a surface, not a worm: a square swatch with an edge of its own. */
.pickcard__art--floor{
  width: clamp(50px, 5vw, 66px); aspect-ratio: 1; margin: 2px 4px 2px 2px; overflow: hidden;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.22);
}
a.pickcard__art:focus-visible{ outline: 3px solid #fff; outline-offset: 3px; }
.pickcard__label{ grid-area: name; min-width: 0; display: grid; gap: 1px; text-align: left; }
.pickcard__name{
  font-family: var(--font-label); font-size: clamp(1.02rem, 1.45vw, 1.28rem); color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; 
}
.pickcard__hint{
  font-size: 0.74rem; font-weight: 700; color: #cbbcff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pickcard__hint:empty{ display: none; }
.pickcard__arrow{
  display: grid; place-items: center; width: 34px; height: 42px; padding: 0; border: 0; border-radius: 10px;
  background: none; color: #fff; cursor: pointer; font: inherit; -webkit-tap-highlight-color: transparent;
}
.pickcard__arrow--prev{ grid-area: prev; }
.pickcard__arrow--next{ grid-area: next; }
.pickcard__arrow svg{
  width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 3.2;
  stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.35));
}
@media (hover: hover){ .pickcard__arrow:hover:not(:disabled){ background: rgba(255, 255, 255, 0.1); } }
.pickcard__arrow:active:not(:disabled){ transform: scale(0.88); }
.pickcard__arrow:focus-visible{ outline: 3px solid #fff; outline-offset: 1px; }
/* One arena, or one skin, owned: the arrows have nowhere to go, and say so. */
.pickcard__arrow:disabled{ opacity: 0.3; cursor: default; }
/*
 * The phone layout, and the fault it is fixing.
 *
 * Stacking the two cards was the obvious answer to "two 260px pictures do not
 * fit". Measured on a 393x700 phone it made the pick row 217px tall, which put
 * the middle rail's content at 540px inside a 438px track. `.menu__core` is a
 * CENTRED flex, so the 102px of overflow went out of BOTH ends: the wordmark
 * escaped upward under the top nav and the arena card came down over the
 * bottom rail. Gray's screenshot is that, exactly. "Layout fucked mobile".
 *
 * So the cards stay side by side and change SHAPE instead — picture on top,
 * name under it. Two of those is one row of about 100px rather than two rows
 * of 108, and nothing has to be dropped to make room.
 */
/*
 * And wherever the ROW is narrow, not only the screen. With the front
 * screen's side tiles (27 Sep 2026) the column is narrower on a laptop too,
 * and side by side the names came out "S..." and "Aren..." (Gray's
 * screenshot). A container query asks the row itself.
 */
.pickrow{ container-type: inline-size; container-name: pickrow; }
@container pickrow (max-width: 640px) {
  .pickcard{
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "art art art" "prev name next";
    row-gap: 4px; column-gap: 0; padding: 8px 4px 5px; justify-items: center;
  }
  .pickcard__art{ width: min(46cqw, 150px); }
  .pickcard__art--floor{ width: auto; height: min(20cqw, 74px); margin: 2px 0 0; }
  .pickcard__label{ text-align: center; }
  .pickcard__kind{ display: none; }
  .pickcard__name{ font-size: 1.05rem; }
  .pickcard__arrow{ width: 30px; height: 32px; }
}

.menu__unlock{ margin: 0; font-size: 0.8rem; color: var(--text-dim); min-height: 1.2em; }
.menu__alert{
  margin: 0; max-width: 42ch; padding: 8px 12px; border-radius: var(--radius-sm);
  font-size: 0.86rem; font-weight: 600; line-height: 1.35; color: var(--paper);
  background: rgba(255, 59, 92, 0.16); border: 1px solid rgba(255, 59, 92, 0.45);
}


/* ----------------------------------------------------------- the footer */
.menu__foot{
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px 20px; flex-wrap: wrap;
  font-size: 0.78rem; color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-display); font-weight: 500;
  border-top: 2px solid rgba(255, 255, 255, 0.14); padding-top: 9px;
}
.menu__copy{ flex: 0 0 auto; }
.menu__footlinks{ display: flex; flex-wrap: wrap; gap: 4px 16px; justify-content: flex-end; min-width: 0; }
:where(.menu__footlinks) :where(a){
  color: rgba(255, 255, 255, 0.85); text-decoration: none;
  padding: 3px 2px; border-radius: 6px;
}
:where(.menu__footlinks) :where(a:hover){
  color: #ffc8ec;
}

/*
 * The corner controls belong to a RUN.
 *
 * The menu carries Sound and Settings as words in its top rail, so the round
 * icons in the corner would be a second copy of both on the one screen that
 * has room to spell them out. They come back the moment there is a worm.
 */
.game:has(.overlay[data-game-menu]:not([hidden])) .dock{ display: none; }

/*
 * A chromeless page IS the arena.
 *
 * No site header, no site footer, no document scroll. `--header-h` is set to 0
 * by the measuring script when there is no header to measure, so the arena's
 * `100dvh - var(--header-h)` below resolves to the whole viewport without a
 * second height rule to keep in step with the first.
 *
 * `min-height` has to go with it. A 420px floor inside a 390px landscape phone
 * is 30px of document scroll, and the moment the page can scroll a drag that
 * starts on the arena can pull the page instead of steering the worm.
 */
/*
 * `overflow: hidden` belongs to the ARENA, not to "no site header".
 *
 * It was on .page--chromeless, which the settings page also is — so the
 * settings page had to put `overflow: auto` back, which makes <body> the
 * scroll container. A body scroll container does not deliver scroll events to
 * `window` in Chrome: measured, `scrollY` moved from 0 to 1500 and a listener
 * on window fired ZERO times, so the settings sidebar's scroll spy never
 * updated after the first paint. The two concerns are separate and are
 * separated now.
 */
/*
 * Safe areas, on a phone held sideways.
 *
 * `viewport-fit=cover` lets the arena fill the glass, notch included — which is
 * right, a game should. What it must not do is put anything you need to READ
 * or PRESS under the notch, the home indicator or the browser's own chrome.
 * Gray, in landscape: "cant play sideways it dont line up right and is cut
 * off".
 *
 * So the canvas keeps the whole screen and every layer ON it is inset. One
 * variable per edge, defaulting to zero everywhere that has no cutout.
 */
:root {
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
}
.page--home{ overflow: hidden; }
.page--chromeless main{ padding: 0; }
/*
 * NO VIEWPORT BREAKOUT on the page that IS the arena.
 *
 * `main > .game` widens itself to 100vw and re-centres with
 * `margin-left: 50%; translateX(-50vw)`, which is the right trick for an arena
 * embedded in a padded reading column — and completely wrong here, where main
 * has no padding and no column to escape.
 *
 * It is also actively harmful on iOS. In landscape, Safari's side chrome sits
 * OVER the page: 100vw is wider than the part you can see, so the game hung off
 * BOTH edges — and everything pinned to `inset: 0` inside it went with it.
 * Gray's screenshot shows the readout starting at RANK, with the whole LENGTH
 * panel off the left of the screen behind Safari's sidebar, and the minimap and
 * Boost clipped on the right.
 *
 * There is nothing to break out of. 100% of main is the visible width, by
 * definition, whatever the browser is overlaying it with.
 */
.page--chromeless main > .game{
  width: 100%;
  margin-left: 0;
  transform: none;
  min-height: 0;
}

/* --------------------------------------------------- the content pages
 *
 * The same world as the settings page, not a different one.
 *
 * These were near-black with hairline rules while the settings page had a
 * blue-violet ground, cards and a rounded, coloured toolkit — Gray: "all these
 * old inner pages mate dont match settings page design". Two designs on one
 * site is worse than either of them on its own.
 *
 * So the ground, the surfaces, the type and the accents are shared. What is
 * NOT shared is density: a page of prose wants a reading measure and air, a
 * settings screen wants rows. Matching a design means the same materials, not
 * the same layout.
 */
.page:not(.page--chromeless){ background:
    linear-gradient(180deg, rgba(14, 18, 52, 0.62), rgba(14, 18, 52, 0.78)),
    url("/ground/hex.png?v=d2a78a1a") 0 0 / 512px 512px,
    #1d4f9c;
  background-attachment: fixed; }

:where(h1) { font-family: var(--font-label); font-weight: 400; font-size: clamp(2.1rem, 4.8vw, 3.2rem); line-height: 1.08; margin-block: 0.2em 0.5em; letter-spacing: 0.005em; color: var(--paper); --ts: #3c146e; }
:where(h2) {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.4rem, 2.6vw, 1.9rem); line-height: 1.2;
  margin-block: 1.6em 0.5em; letter-spacing: 0; color: var(--paper);
}
:where(h3) {
  font-family: var(--font-display); font-weight: 600;
  font-size: 1.15rem; margin: 1.4em 0 0.35em; color: var(--paper);
}

.prose{ max-width: var(--max); color: var(--paper-dim); }
:where(.prose) :where(p){ color: var(--paper-dim); }
.prose strong{ color: var(--paper); }
/*
 * :where(), and it is not a style preference — it is the fix for invisible
 * buttons.
 *
 * `.prose a` scores (0,2,0) and `.button--primary` scores (0,1,0), so an
 * ordinary link rule inside an article BEAT the button component and repainted
 * its label in the accent colour. The button's background IS the accent
 * colour. Every call-to-action inside prose was therefore lime text on a lime
 * button — a blank green slab, on the leaderboard, about, tips and every
 * listicle. Gray: "button text not visible, theres loads like that".
 *
 * :where() makes this rule specificity ZERO, so any component class inside
 * prose wins by simply existing. That is the general rule for anything that
 * styles a bare element inside a container, and check-layout enforces it —
 * otherwise the next container to style its own links breaks buttons again in
 * a way nobody sees until a screenshot arrives.
 */
:where(.prose) :where(a){ color: var(--accent); text-decoration-color: rgba(255, 79, 173, 0.4); }
:where(.prose) :where(a:hover){ text-decoration-color: var(--accent); }
.prose ul, .prose ol { padding-left: 1.25em; }
:where(.prose) :where(li){ margin: 0.4em 0; }

/*
 * Every section is a card, the way the settings sections are.
 *
 * A run of h2s separated by nothing is what made these read as a document from
 * a different site. The card is the shared object: same radius, same lit edge,
 * same translucent surface over the same ground.
 */
.prose > section{ border-radius: var(--radius); padding: 6px clamp(18px, 3vw, 30px) 24px; margin-block: 20px; background: linear-gradient(180deg, #252c62, #1a1f47); border: 4px solid #fff; box-shadow: 0 0 0 2px #7a2a6a, 0 14px 30px -12px rgba(0, 0, 0, 0.55); }
.prose > section:first-of-type h2{ margin-top: 1em; }

/*
 * The opening answer is a panel like the menu's: violet, white rim, the dark
 * purple lip under it. It was a pink left rule on a see-through box, which read
 * as a pull-quote from a different site.
 */
.lede{
  font-size: 1.12rem; color: var(--paper);
  padding: 18px clamp(18px, 3vw, 26px); margin-block: 0 1.6em;
  max-width: var(--max);
  background: linear-gradient(180deg, #4b3aa8, #33257f);
  border: 4px solid #fff; border-radius: var(--radius);
  box-shadow: 0 0 0 2px #2a1465, 0 14px 30px -12px rgba(0, 0, 0, 0.55);
}

/* Headings in the lettering the menu's panels use (Lilita One). */
:where(.prose, .faq, .related, .skingroup) :where(h2){
  font-family: var(--font-label); font-weight: 400; letter-spacing: 0.01em;
  --ts: #3c146e;
}

.button{ display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 9px 24px 12px; border-radius: 18px; text-decoration: none; cursor: pointer; letter-spacing: 0.01em; font-size: 1.1rem; transition: filter 0.12s ease; }




/* A third action on the death screen, weighted below the other two: it is the
   way out, not a way on, and it must not compete with Play Again. */
/*
 * Weighted below the other two — but still visibly a BUTTON.
 *
 * It had a transparent border until you hovered it, which on the death screen
 * made the only way back to the menu look like a caption. Gray: "main menu has
 * no bored unless you hover over it". A control that only announces itself
 * once you have already found it is not discoverable; quiet means lower
 * contrast, not invisible.
 */
.button--quiet{ font-size: 0.95rem; padding: 7px 16px 9px; --rim: 4px; }

.button--big{ font-size: 1.55rem; padding: 10px 30px 14px; width: 100%; }
/*
 * The house button's other sizes and shapes, so a new screen picks one rather
 * than writing its own (Gray, 14 Sep 2026: "stop hand rolling shit, we work
 * from single source and templates"). These set size and shape only; colour is
 * a role class in the Candy section (--primary, --quiet, --glass, --flat).
 */
.button--sm{ font-size: 0.95rem; padding: 6px 16px 9px; border-radius: var(--radius-sm); --rim: 3px; }
.button--block{ display: flex; width: 100%; }
.button--pill{ border-radius: var(--radius-pill); }
@media (hover: hover){ .button:hover{ filter: brightness(1.07); } }
.button:disabled{ opacity: 0.45; cursor: default; filter: grayscale(0.35); animation: none; }
.button__timer{ font-weight: 600; opacity: 0.8; font-size: 0.9em; }
/*
 * The revive offer on the death screen: one button, one line on what it gives,
 * and a bar that drains over the offer's seconds (--revive-s, set from
 * MONETISATION.REVIVE_OFFER_SECONDS), so there is time to read and a clear
 * sign of how much is left.
 */
.revive{ display: grid; gap: 6px; justify-items: stretch; text-align: center; }
.revive[hidden]{ display: none; }
.revive__go{ width: 100%; }
.revive__note{ margin: 0; font-weight: 700; font-size: 0.95rem; color: #fff;  }
.revive__clock{ display: flex; align-items: center; gap: 10px; }
.revive__clock[hidden]{ display: none; }
.revive__bar{
  flex: 1 1 auto; height: 10px; border-radius: 999px; background: #c6f432; transform-origin: left center;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.2), 0 0 0 3px rgba(12, 8, 36, 0.55);
}
/* Its pink comes in as a layer over the green (opacity), not as a changing background: a background animates on the
   main thread and repainted the bar every frame of the countdown (Galaxy A17, 20 Nov 2026). */
.revive__bar{ position: relative; }
.revive__bar::after{ content: ""; position: absolute; inset: 0; border-radius: inherit; background: #ff4fad; box-shadow: inherit; opacity: 0; }
.revive.is-running .revive__bar{ animation: revive-drain var(--revive-s, 9s) linear forwards; }
.revive.is-running .revive__bar::after{ animation: revive-pink var(--revive-s, 9s) linear forwards; }
.revive__secs{ min-width: 2.2em; font-weight: 700; font-size: 0.9rem; font-variant-numeric: tabular-nums; text-align: right; }
.revive__msg{ margin: 0; font-weight: 700; color: #ffe45c; }
/* "Double your Nuggets" (ui/death.ts): once paid the button is a result, not an unavailable control, so it stays lit. */
.revive .button.is-done:disabled{ opacity: 1; filter: none; }
@keyframes revive-drain{ from{ transform: scaleX(1); } to{ transform: scaleX(0); } }
@keyframes revive-pink{ 70%{ opacity: 0; } to{ opacity: 1; } }
@media (prefers-reduced-motion: reduce){ .revive.is-running .revive__bar, .revive.is-running .revive__bar::after{ animation-timing-function: steps(9, end); } }

.cta{ display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-block: 1.6em; }
.cta__note{ color: var(--paper-dim); font-size: 0.92rem; }

.faq{ margin-block: 20px; border-radius: var(--radius); padding: 6px clamp(18px, 3vw, 30px) 20px; background: linear-gradient(180deg, #252c62, #1a1f47); border: 4px solid #fff; box-shadow: 0 0 0 2px #7a2a6a, 0 14px 30px -12px rgba(0, 0, 0, 0.55); }
.faq__item{ border-top: 2px solid rgba(255, 255, 255, 0.07); padding: 16px 0; }
.faq__item:first-of-type{ border-top: 0; }
.faq__q{
  margin: 0 0 0.3em; font-size: 1.1rem;
  font-family: var(--font-display); font-weight: 600; color: var(--paper);
}
.faq__a{ margin: 0; color: var(--paper-dim); }

.related{
  margin-top: 24px; border-radius: var(--radius);
  padding: 6px clamp(18px, 3vw, 30px) 22px;
  background: linear-gradient(180deg, #4b3aa8, #33257f);
  border: 4px solid #fff;
  box-shadow: 0 0 0 2px #2a1465, 0 14px 30px -12px rgba(0, 0, 0, 0.55);
}
.related__list{ list-style: none; margin: 0; padding: 0; }
:where(.related__list) :where(li){ margin: 0.9em 0; }
:where(.related__list) :where(a){ font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.related__desc{ color: var(--paper-dim); font-size: 0.92rem; display: block; }

.gamelist{ list-style: none; margin: 1.2em 0; padding: 0; display: grid; gap: 12px; }
.gamecard{
  border: 3px solid rgba(255, 255, 255, 0.55); border-radius: var(--radius-sm);
  padding: 16px 18px; background: rgba(255, 255, 255, 0.06);
}
.gamecard--ours{
  border-color: #fff; background: linear-gradient(180deg, #4b3aa8, #33257f);
  box-shadow: 0 0 0 2px #2a1465;
}
.gamecard__name{ margin: 0 0 0.15em; font-size: 1.05rem; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gamecard__badge{
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em;
  background: rgba(110, 231, 183, 0.16); color: var(--accent);
  border: 1px solid rgba(110, 231, 183, 0.4); border-radius: 999px; padding: 2px 9px; font-weight: 700;
}
.gamecard__genre{ margin: 0 0 0.4em; color: var(--accent); font-size: 0.83rem; font-weight: 600; }
.gamecard__blurb{ margin: 0; color: var(--text-dim); font-size: 0.96rem; }

/* --------------------------------------------------------------- skins page */
.skingroup{ max-width: none; }
.skingrid{
  list-style: none; margin: 1.1em 0 0; padding: 0;
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
}
.skincard{
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--ink-2); padding: 12px; text-align: center;
}
.skincard__art{ display: block; width: 100%; height: auto; }
.skincard__name{ margin: 6px 0 2px; font-size: 0.98rem; }
.skincard__unlock{ margin: 0; font-size: 0.8rem; color: var(--text-dim); line-height: 1.4; }

/* ---------------------------------------------------------------- footer */
/*
 * A footer, not a bin.
 *
 * It was one paragraph, a flat run of eleven links, and a "Last updated" date.
 * Eleven links in a row tell a reader nothing about which one they want, and a
 * documentation date on a game is a convention borrowed from the wrong place —
 * no game in the field carries one, and the sitemap's <lastmod> is where a
 * crawler looks anyway.
 */
.sitefooter{ border-top: 3px solid #fff; box-shadow: 0 -2px 0 #7a2a6a; padding: 40px clamp(16px, 4vw, 40px) 0; color: var(--paper-dim); font-size: 0.92rem; background: linear-gradient(180deg, #1c1650, #120e38); }
.sitefooter__inner{
  display: grid; gap: 32px clamp(24px, 5vw, 64px);
  grid-template-columns: minmax(200px, 1fr) 2fr;
  align-items: start;
}
.sitefooter__mark{ display: block; height: 30px; width: auto; margin-bottom: 12px; opacity: 0.9; }
.sitefooter__entity{ margin: 0; max-width: 30ch; line-height: 1.5; }
.sitefooter__nav{
  display: grid; gap: 24px clamp(20px, 4vw, 48px);
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.sitefooter__heading{
  margin: 0 0 10px; font-family: var(--font-display);
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--text);
}
.sitefooter__links{
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 7px;
}
:where(.sitefooter__links) :where(a){ color: var(--paper-dim); text-decoration: none; }
:where(.sitefooter__links) :where(a:hover){ color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.sitefooter__base{
  margin-top: 36px; padding: 18px 0 34px;
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 6px 24px; justify-content: space-between;
  font-size: 0.84rem;
}
.sitefooter__copy, .sitefooter__made { margin: 0; }
@media (max-width: 640px) {
  .sitefooter__inner{ grid-template-columns: 1fr; gap: 28px; }
  .sitefooter__nav{ grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
}

/* ---------------------------------------------------------------- the game */
.game{
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 380px;
  max-height: min(78vh, 780px);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #070a12;
  touch-action: none;
  user-select: none;
  /* Safari's own: without these a finger held still on an iPhone brings up the text magnifier or the long-press menu,
     which cancels the touch and loses steering or boost (Gray, 7 Nov 2026). */
  -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
}
.game__stage{
  position: absolute; inset: 0;
  /* Mud's average colour: every new player starts on mud, so the arena fades
     in from its own floor. The game repaints this for other floors (GROUND_TONE). */
  background: #9b6134;
}
.squirm-canvas{
  /*
   * !important: PixiJS's autoDensity writes the canvas's size inline, in
   * pixels, from its first measurement. A fixed-width canvas is the one thing
   * that can make iPhone Safari grow a portal's iframe to fit it; the game then
   * re-measures the grown frame and stays too wide, cut off on the right (Gray,
   * CrazyGames on an iPhone held sideways, 28 Sep 2026). The drawing
   * resolution is still the renderer's; the box always follows the stage.
   */
  display: block; width: 100% !important; height: 100% !important;
  /* Hidden until it can draw its real floor and food; see Renderer.reveal. */
  opacity: 0; transition: opacity 450ms ease-out;
}
.squirm-canvas.is-ready{ opacity: 1; }
@media (prefers-reduced-motion: reduce){ .squirm-canvas{ transition: none; } }

/*
 * The loading screen (gameShell.ts .boot, main.ts bootProgress): the game's
 * violet room, the logo, and our worm growing along a track as the game gets
 * ready: main.ts pushes it on at each real step, then grows it the rest of
 * the way over what is left of BOOT_MIN_MS, and it fades into the menu when
 * .game gains .is-ready.
 */
.boot{
  --p: 0.06;
  position: absolute; inset: 0; z-index: 40; overflow: hidden;
  display: grid; place-content: center; justify-items: center; gap: clamp(14px, 4vh, 30px); padding: 20px;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.14), transparent 45%),
    radial-gradient(ellipse 120% 100% at 50% 30%, #6a52e6, #3d2c9e 50%, #1c1250 100%);
  transition: opacity 0.4s ease, visibility 0s linear 0.4s;
}
.game.is-ready .boot{ opacity: 0; visibility: hidden; pointer-events: none; }
.boot__rays{ position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.boot__rays::before{
  content: ""; position: absolute; left: 50%; top: 35%; width: 1088px; height: 1088px; translate: -50% -50%; pointer-events: none;
  background: repeating-conic-gradient(rgba(255, 255, 255, 0.07) 0 8deg, transparent 8deg 20deg);
  -webkit-mask: radial-gradient(circle, #000 99px, transparent 544px); mask: radial-gradient(circle, #000 99px, transparent 544px);
  animation: ray-spin 40s linear infinite; will-change: rotate;
}
.boot__mark{ position: relative; width: min(78vw, 520px); height: auto; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.45)); animation: boot-bob 2.4s ease-in-out infinite; }
@keyframes boot-bob{ 50%{ translate: 0 -6px; } }
/* The track, and the worm growing along it with its head leading. */
.boot__track{
  position: relative; width: min(72vw, 420px); height: 30px; border-radius: 999px; padding: 4px;
  background: rgba(10, 6, 40, 0.55); box-shadow: inset 0 3px 0 rgba(0, 0, 0, 0.35), 0 0 0 3px rgba(255, 255, 255, 0.85);
}
.boot__worm{
  position: relative; height: 100%; min-width: 22px; width: calc(var(--p) * 100%); border-radius: 999px;
  background:
    repeating-linear-gradient(90deg, transparent 0 14px, rgba(0, 0, 0, 0.12) 14px 16px),
    linear-gradient(180deg, #e3ff8a, #9be22d 55%, #5fae12);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.45);
  transition: width 0.7s cubic-bezier(0.3, 0.8, 0.3, 1);
}
.boot__head{
  position: absolute; right: -6px; top: 50%; width: 30px; height: 30px; translate: 0 -50%; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f0ffb0, #9be22d 55%, #4f9a0e); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
}
.boot__head::before, .boot__head::after{
  content: ""; position: absolute; top: 7px; width: 8px; height: 8px; border-radius: 50%;
  background: radial-gradient(circle at 60% 50%, #1b0431 45%, #fff 50%);
}
.boot__head::before{ right: 5px; }
.boot__head::after{ right: 5px; top: 15px; }
.boot__tip{
  position: relative; margin: 0; max-width: 36ch; min-height: 2.6em; text-align: center;
  font-family: var(--font-label); font-size: clamp(1rem, 2.6vw, 1.25rem); color: #fff;
  --ts: #2a0848;
}
@media (prefers-reduced-motion: reduce){ .boot__rays, .boot__rays::before, .boot__mark{ animation: none; } }

/*
 * The owners' banner (ui/liveBanner.ts): ringed text, no box, never catches a tap, so it covers no button and blocks no
 * steering. Above the menu and the HUD; one line per message, the urgent ones (restart close, new games paused) gold.
 */
.livebanner{
  position: absolute; inset-inline: 0; top: calc(6px + var(--safe-t, 0px)); margin: 0 auto; width: fit-content;
  max-width: min(calc(100% - 24px), 46ch); z-index: 40; pointer-events: none; text-align: center;
  display: flex; flex-direction: column; gap: 2px;
  font-family: var(--font-label); font-size: clamp(0.85rem, 2.2vw, 1.05rem); line-height: 1.2; color: #fff;
  -webkit-text-stroke: 0.14em #14104a; paint-order: stroke fill; text-shadow: 0 0.08em 0 #14104a;
}
.livebanner[hidden]{ display: none; }
.livebanner__line--urgent{ color: #ffd23f; }

.game__status{
  position: absolute; inset-inline: 0; top: 50%; transform: translateY(-50%);
  margin: 0 auto; max-width: 34ch; text-align: center; z-index: 4;
  color: var(--text); background: rgba(10, 14, 26, 0.86);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 18px; font-weight: 600;
}
/* The way out while the client waits for a place in a full box (main.ts). */
.game__status-cancel{
  display: block; margin: 12px auto 0; padding: 8px 20px;
  font: inherit; font-weight: 700; color: var(--text);
  background: transparent; border: 1px solid var(--line);
  border-radius: var(--radius-pill); cursor: pointer;
}
@media (hover: hover){ .game__status-cancel:hover{ border-color: var(--text-dim); } }
.game__status-cancel:focus-visible{ outline: 2px solid var(--accent); outline-offset: 2px; }

/*
 * The HUD belongs to a run, not to the menu.
 *
 * With the arena now behind the menu, LENGTH 10 / RANK — / TOP 10 sat over an
 * attract scene reporting on a worm that does not exist. The corner controls
 * stay: settings and mute are settings, and every game in the field keeps them
 * on the menu screen as corner furniture.
 */
.game:has(.overlay[data-game-lobby]:not([hidden])) .hud__stat,
.game:has(.overlay[data-game-lobby]:not([hidden])) .hud__board,
.game:has(.overlay[data-game-lobby]:not([hidden])) .hud__minimap,
.game:has(.overlay[data-game-menu]:not([hidden])) .hud__stat,
.game:has(.overlay[data-game-menu]:not([hidden])) .hud__board,
.game:has(.overlay[data-game-menu]:not([hidden])) .hud__minimap{ display: none; }

.hud{
  position: absolute; inset: 0; pointer-events: none;
  padding:
    calc(12px + var(--safe-t)) calc(12px + var(--safe-r))
    calc(12px + var(--safe-b)) calc(12px + var(--safe-l));
  /*
   * The HUD is a template: named slots, and every piece takes its slot by
   * name (grid-area), never by row and column numbers. It used to be numbers,
   * with the strip and the board both unable to shrink, so on a phone the strip
   * ran under the Top 10 as soon as it gained a readout (Nuggets, 14 Sep 2026).
   * Now the strip keeps its size and the board's column takes what is left, its
   * names cut short with an ellipsis rather than overlapping. tools/check-layout
   * holds every .hud__ piece to its slot.
   */
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) minmax(0, max-content);
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "stats . board"
    ".     . .    "
    ".     . corner";
  gap: 10px; font-size: 0.9rem;
  /* The one way HUD text stands off the arena: a crisp dark ring round every
     letter, never a box (see .hud__board). The strip and the board share it. */
  --board-ink: #1c0d3a;
  --ts: var(--board-ink);
  /* A touch more ring than a button's: the floor behind it changes from sand to black. */
  --lt-stroke: clamp(2px, 0.22em, 6px); --lt-drop: 1px;
}
/*
 * The readout is text on the arena, not a box.
 *
 * It was three fat rounded cards and a floating pill; then one boxed strip
 * with dividers, a lime edge, an "In arena" count and the ping. slither.io
 * shows two lines of small text and nothing else, and every game in the field
 * keeps the play area that clean. Gray, 14 Sep 2026: "every snake game, the
 * actual gameplay, the area is clean as fuck, you trying to keep adding shit
 * in the way". So: Length, Rank "#13 of 40", Nuggets when you have some, in
 * the board's ring, and no box.
 */
.hud__stat{
  display: flex; flex-direction: column; justify-content: center;
  padding: 2px 0;
}
.hud__label{
  display: block; margin: 0 0 1px; white-space: nowrap;
  font-family: var(--font-display); font-weight: 600; font-size: 0.62rem;
  text-transform: uppercase; letter-spacing: 0.13em; color: #fff;
}
.hud__value{
  font-family: var(--font-label); font-weight: 400; font-size: 1.12rem;
  line-height: 1.05; font-variant-numeric: tabular-nums; color: var(--paper);
}

/*
 * The leaderboard is not a panel.
 *
 * It was a bordered card with a near-solid background and full-brightness white
 * text, sitting over a third of a phone screen you are trying to steer through.
 * slither.io — and every other game in the field — draws its board straight
 * onto the arena: no box, muted text, and a shadow instead of a backdrop so it
 * stays readable over a bright patch of floor without hiding it.
 *
 * Muted text and a soft shadow only hold up on slither's black floor. On sand,
 * the phone board's 50% white stood 1.25:1 off the floor and even full white
 * only 1.73:1, where small text wants 4.5 (measured on the floor art, 13 Sep
 * 2026; Gray could not read it on his phone). So the text is full white with a
 * crisp dark ring round every letter, as the "+N" pops have: 18:1 against the
 * ring on any floor, and still no box over the arena.
 */
.hud__board{
  /* One fixed width (Gray, 29 Sep 2026: "needs fixed width for username size"): it grew and
     shrank with whoever was in the Top 10. A long name ends in "..." instead. */
  grid-area: board; justify-self: end; align-self: start; width: min(12.5rem, 100%);
  background: none; border: 0; padding: 4px 2px;
}
:where(.hud__board) :where(h2){ margin: 0 0 4px; }
.squirm-board{
  list-style: none; margin: 0; padding: 0; font-variant-numeric: tabular-nums;
  color: #fff; font-family: var(--font-display); font-weight: 600;
}
.squirm-board__row{ display: grid; grid-template-columns: 1.4em 1fr auto; gap: 7px; font-size: 0.84rem; line-height: 1.5; }
.squirm-board__row.is-you{ color: var(--you-ink); }
.squirm-board__name{ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.squirm-board__row.is-you .squirm-board__len{ color: var(--you-ink); }
/*
 * The in-run board is one grid for all its rows (the rows dissolve into it), so the rank column is as wide as the widest
 * rank and the names line up under each other. It was a grid per row with a rank column of 1.4em: your own row at
 * "122" or "1234" spilled over the start of your name (Gray, 20 Oct 2026, iPhone: the start was cut off).
 * 14px and up at weight 700, a ring of 0.21em (a real outline drawn under the letter, so the counters of a, e, o stay open) and one
 * crisp drop. "You" is a light pink: the dark ring holds it on sand, mud and neon alike, where the saturated pink did not.
 */
/*
 * The board never changes size, and it is a little see-through (Gray, 25 Oct 2026: "slightly transparent like others do,
 * and stop adjusting in size when scores change"). Size: one width per breakpoint (--board-w); a rank column for three
 * digits and a score column for 9,999,999 (tabular digits, so a 9 is as wide as a 1); the name takes the rest and ends in an
 * ellipsis; every cell has one fixed line height; and the board always has all its slots (the top rows, the rule and your own
 * row), an unused one keeping its space (see Hud.renderBoard). Nothing in a row can move another row or the board's box.
 * See-through: every cell is painted at full strength, ring and all, then faded as one (opacity on the cell, never an alpha
 * colour, which would let the ring show through the letter). --board-alpha is the text, --board-alpha-you your own row.
 */
.game{ --board-w: 14rem; }
.hud__board{
  --you-ink: color-mix(in srgb, var(--accent) 28%, #fff); --lt-stroke: clamp(2px, 0.2em, 4px); --lt-drop: 1px;
  --board-alpha: 0.55; --board-alpha-you: 0.85; --board-lh: 1.4; /* 0.55/0.85 from 0.8/0.96 (Gray, 6 Nov 2026: more see-through) */
  width: var(--board-w);
}
.hud__board .hud__label{ opacity: var(--board-alpha); }
.hud__board .squirm-board{
  display: grid; grid-template-columns: 3ch minmax(0, 1fr) 8.2ch; column-gap: 8px; font-weight: 700;
  font-size: max(14px, 0.875rem);
}
.hud__board .squirm-board__row{ display: contents; line-height: var(--board-lh); }
.hud__board .squirm-board__row > *{ height: calc(1em * var(--board-lh)); opacity: var(--board-alpha); }
.hud__board .squirm-board__row.is-you > *{ opacity: var(--board-alpha-you); }
/* A slot with nobody in it keeps its space and draws nothing. */
.hud__board .squirm-board__row.is-empty > *{ visibility: hidden; }
/* Your own row is the one to find at a glance, over the busiest floor: a heavier ring than the rest. */
.hud__board .squirm-board__row.is-you{ --lt-stroke: clamp(3px, 0.28em, 5px); }
.hud__board .squirm-board__pos{ text-align: right; }
.hud__board .squirm-board__len{ text-align: right; }
/* The ring is drawn outside the letter: a box that clips its own overflow would shave it off the first letter. */
.hud__board .squirm-board__name{ padding-inline: 2px; margin-inline: -2px; }
.hud__board .squirm-board__gap{ grid-column: 1 / -1; opacity: var(--board-alpha); }
.hud__board .squirm-board__gap.is-empty{ visibility: hidden; }
/* The rule between the top ten and your own row further down. */
.squirm-board__gap{ height: 1px; margin: 3px 0; background: rgba(255, 255, 255, 0.85); box-shadow: 0 1px 0 var(--board-ink), 0 -1px 0 var(--board-ink); list-style: none; }

.hud__corner{
  grid-area: corner; justify-self: end; align-self: end;
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
}
.hud{ --minimap-base: 118px; --minimap-w: calc(var(--minimap-base) * var(--minimap-scale, 1)); }
.hud__minimap{ width: var(--minimap-w); height: var(--minimap-w); display: block; position: relative; border-radius: 50%; overflow: hidden; }
/* The map (painted when the radar changes) and your dot over it (moved by its transform, never painted): hud.ts drawMinimap. */
.hud__mapfield{ display: block; width: 100%; height: 100%; }
/*
 * Each part of the HUD whose text changes in a run on a layer of its own, so a new number repaints that part and
 * not a tile of the screen round it: on the Galaxy A17 the page's repaints share the graphics thread with the game,
 * and the slowest 1% of frame swaps went from 18-23 ms to about 11 (20 Nov 2026, A/B over 25 s runs).
 */
.hud__stat, .hud__board, .hud__corner{ will-change: transform; }
/*
 * And each cell of the board on its own, inside that. A board cell is ringed, dropped and faded, which iOS Safari paints
 * slowly, and the whole board was one layer: the half-second leaderboard repainted all of it in one frame, a 30 ms frame
 * twice a second (iPhone simulator, Safari 26.5: with the board hidden, none). Layers per cell: a new number repaints that
 * number, and its fade is the card's. The same look; 20 slow frames in 8 s down to about 6.
 */
.hud__board .squirm-board__row > *{ will-change: transform; }
.hud__mapdot{ position: absolute; left: 0; top: 0; pointer-events: none; will-change: transform; }
.hud__stats{
  grid-area: stats; justify-self: start; align-self: start;
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 18px;
}
/* Length is the score. It gets the accent and the size; the others do not,
   or the strip is equal numbers and none of them is the one that matters. */
.hud__stat:first-child .hud__value{ color: var(--accent); font-size: 1.4rem; }
/* The nugget count reads faster with its own icon in front of it, the way a
   currency symbol would — Gray, 15 Sep 2026: "put a nugget before the
   number, that would look better". Same art as the fly-to-counter animation. */
.hud__value--nugget{ display: inline-flex; align-items: center; gap: 4px; }
.hud__nugget-icon{ width: 1em; height: 1em; display: block; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.6)); }
/*
 * An amount of Nuggets anywhere else: the gold and the number, never the word
 * (ui/nuggetAmount.ts). Gray, 18 Sep 2026: "dont use the word nuggets, use the
 * icon man". Sized off the text it sits in, so one rule serves a card label, a
 * button and the purchase dialog alike.
 */
.nugamt{ display: inline-flex; align-items: center; gap: 0.2em; white-space: nowrap; vertical-align: -0.2em; font-variant-numeric: tabular-nums; }
.nugamt__icon{ width: 1.25em; height: 1.25em; flex: none; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.55)); }

/*
 * The pickup pop (branch: powerups, second round). Gray, after playing the
 * stacking version: "it should pop up in middle of screen which power up you
 * just got so you know". Upper-middle of the stage — above where a worm's
 * head normally sits on screen, so it never covers it (the clean-play-area
 * rule: no box behind it either, just the icon and the layered word). Pointer
 * events off throughout, so it can never eat a click or a touch mid-run.
 */
.powerpop{
  position: absolute; left: 50%; top: 16%; transform: translate(-50%, 0);
  display: grid; justify-items: center; gap: 2px;
  pointer-events: none; z-index: 6; text-align: center;
}
.powerpop[hidden]{ display: none; }
/* The level-up toast reuses .powerpop wholesale, gold instead of the power-up's own colour. */
[data-hud-levelup]{ --pu-color: #ffd166; }
/*
 * It also carries the Halloween news and endings, some long, longer in German
 * ("Wormy_McWormface99 hat den Kopflosen Reiter abgeschnitten!"). They wrap,
 * centred, between the score strip and the Top 10 on a wide screen, below the
 * Top 10 on a phone, and never off the glass (check-overflow's in-run scenarios).
 */
/* Lettering that may wrap gets 1.15 between lines at the least, and the tiles' thick-outlined labels 1.25: outlined type crushes together below that (Gray, 4 Nov
   2026: "revive text all squashed", "check for any other squashed text"; check-overflow LINES). */
[data-hud-levelup] .powerpop__name{ white-space: normal; width: max-content; max-width: calc(100vw - 2 * (var(--board-w) + 40px)); line-height: 1.15; text-wrap: balance; overflow-wrap: anywhere; }
/*
 * The strip wraps rather than taking the Top 10's width: with Candy, Nuggets
 * and Level in it (the Halloween Party), five readouts in one row squeezed the
 * Top 10 to a 46px sliver and the minimap with it, on a phone held upright
 * (check-overflow's in-run scenarios, 18 Oct 2026).
 */
@media (max-width: 760px) {
  .hud__stats{ max-width: calc(100vw - var(--board-w) - 40px - var(--safe-l, 0px) - var(--safe-r, 0px)); }
}
@media (max-height: 500px) {
  .hud__stats{ max-width: calc(100vw - var(--board-w) - 48px - var(--safe-l, 0px) - var(--safe-r, 0px)); }
}
/* On a phone held upright the Top 10 and the minimap fill the top right: the banner goes below your worm, clear of both and of the controls. */
@media (max-width: 760px) {
  [data-hud-levelup]{ top: 62%; }
  [data-hud-levelup] .powerpop__name{ max-width: calc(100vw - 32px - var(--safe-l, 0px) - var(--safe-r, 0px)); font-size: clamp(1.3rem, 6.4vw, 1.9rem); }
}
@media (max-height: 500px) {
  [data-hud-levelup]{ top: 34%; }
  [data-hud-levelup] .powerpop__name{ max-width: calc(100vw - 2 * (var(--board-w) + 24px) - var(--safe-l, 0px) - var(--safe-r, 0px)); font-size: clamp(1.1rem, 5.2vh, 1.6rem); }
}
.powerpop__glyph{
  position: relative; width: clamp(64px, 11vw, 96px); height: clamp(64px, 11vw, 96px);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--pu-color, #7ad6ff);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35), 0 6px 18px rgba(0, 0, 0, 0.55),
    0 0 34px color-mix(in oklab, var(--pu-color, #7ad6ff) 65%, transparent);
}
.powerpop__letter{
  font-family: var(--font-display); font-weight: 700; color: #0b1020; font-size: clamp(1.6rem, 4vw, 2.4rem);
}
.powerpop__art{ position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.powerpop__art[hidden]{ display: none; }
.powerpop__art{ object-fit: contain; border-radius: 0; }
.powerpop__glyph:has(.powerpop__art:not([hidden])){ background: none; box-shadow: none; }
.powerpop__glyph:has(.powerpop__art:not([hidden])) .powerpop__letter{ visibility: hidden; }
.powerpop__name{
  margin: 4px 0 0; font-family: "Lilita One", var(--font-display); font-weight: 400;
  font-size: clamp(1.6rem, 4.4vw, 2.6rem); letter-spacing: 0.01em;
}
.powerpop__name::before{
  color: #1b0431; -webkit-text-stroke: 0.22em #1b0431;
  filter: drop-shadow(0 0.03em 0 #1b0431) drop-shadow(0 0.06em 0.06em rgba(8, 0, 24, 0.5));
}
.powerpop__name::after{ color: var(--pu-color, #7ad6ff); -webkit-text-stroke: 0.1em var(--pu-color, #7ad6ff); }
.powerpop__name > span{ background-image: linear-gradient(180deg, #fff 0%, #fff 55%, #fff0e0 100%); }
.powerpop__extra{
  font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; color: var(--pu-color, #7ad6ff);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.55);
}
.powerpop__extra[hidden]{ display: none; }
/*
 * Scales in with a small overshoot, holds, then floats up and fades — Gray's
 * brief, "pop up... so you know". ~1.4s total (hud.ts POWERUP_POP_MS): a
 * quick overshoot-in (0-12%), a hold through 64% (about 0.9s), then the float
 * and fade to the end.
 */
.powerpop.is-playing{ animation: powerpop-play 1.4s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes powerpop-play{
  0%{ transform: translate(-50%, 6px) scale(0.4); opacity: 0; }
  12%{ transform: translate(-50%, 0) scale(1.08); opacity: 1; }
  20%{ transform: translate(-50%, 0) scale(1); opacity: 1; }
  64%{ transform: translate(-50%, 0) scale(1); opacity: 1; }
  100%{ transform: translate(-50%, -26px) scale(1); opacity: 0; }
}
@media (prefers-reduced-motion: reduce){
  .powerpop.is-playing{ animation: powerpop-fade 1.4s ease both; }
}
@keyframes powerpop-fade{ 0%{ opacity: 0; } 15%{ opacity: 1; } 70%{ opacity: 1; } 100%{ opacity: 0; } }
.game:has(.overlay[data-game-menu]:not([hidden])) .powerpop,
.game:has(.overlay[data-game-settings]:not([hidden])) .powerpop,
.game:has(.overlay[data-game-death]:not([hidden])) .powerpop{ display: none; }
/* "of 40" after the rank: context, not a second number to read. */
.hud__of{ margin-left: 0.3em; font-size: max(11.5px, 0.62em); }
.chip{
  font: inherit; font-size: 0.76rem; font-weight: 600;
  background: rgba(10, 14, 26, 0.72); color: var(--text-dim);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; cursor: pointer;
}
@media (hover: hover){ .chip:hover{ color: var(--text); border-color: var(--accent); } }

.boostbutton{ position: absolute; right: calc(var(--boost-inset) + var(--safe-r)); bottom: calc(var(--boost-inset) + var(--safe-b)); width: var(--boost-size); height: var(--boost-size); border-radius: 50%; font-size: 1.05rem; letter-spacing: 0.02em; z-index: 5; --rim: 4px; }
.boostbutton.is-active{ transform: scale(1.07, 0.93); filter: brightness(1.12); }
/* Boost steers nothing on a menu. It also sat in the same corner as the link
   bar's right-hand end, which on a phone put a 96px circle over three links. */
.game:has(.overlay[data-game-menu]:not([hidden])) .boostbutton,
.game:has(.overlay[data-game-settings]:not([hidden])) .boostbutton,
.game:has(.overlay[data-game-death]:not([hidden])) .boostbutton{ display: none; }
/*
 * Boost on the LEFT (Settings > Controls), for a player who steers with the
 * right thumb. The sound dock trades corners with it, so they never share one.
 * `.game.is-boost-left` outranks every per-screen `.dock` rule below.
 */
.game.is-boost-left .boostbutton{ right: auto; left: calc(var(--boost-inset) + var(--safe-l)); }
.game.is-boost-left .dock{ left: auto; right: calc(14px + var(--safe-r)); align-items: flex-end; }
/*
 * Any screen with a boost button keeps the minimap out of the bottom corners.
 *
 * The phone rules below moved it under the leaderboard by screen SIZE, and an
 * iPad in landscape is wider than any of them: the minimap stayed in the
 * bottom-right corner, under the boost button — and with boost switched to
 * the left, under the sound and exit buttons that move there instead (Gray,
 * 27 Sep 2026, on an iPad). Keyed on the boost button being on screen, which
 * is exactly when a bottom corner is taken, whatever the screen's size.
 */
.game:has(.boostbutton:not([hidden])) .hud{
  grid-template-areas:
    "stats . board"
    "stats . corner"
    ".     . .     ";
}
.game:has(.boostbutton:not([hidden])) .hud__corner{ align-self: start; }
/*
 * A SHORT screen with a boost button (a phone on its side): the minimap sits
 * BESIDE the Top 10, in the top row, not under it.
 *
 * Under the board it needs the board's height, its own and a bottom control's
 * (Boost on one side, sound and exit on the other) stacked in one column, and
 * a phone on its side is about 300px tall once Safari's bars and the home
 * strip are out: Boost sat on the minimap, and with Boost on the left the
 * sound and exit buttons did (Gray, 30 Sep 2026, with screenshots: "you
 * should have know this was an issue because you can clearly see it wouldnt
 * fit"). The top row is the one place no bottom control can reach, whichever
 * side Boost is on.
 */
@media (orientation: landscape) and (max-height: 540px) {
  .game:has(.boostbutton:not([hidden])) .hud{
    grid-template-areas:
      "stats corner board"
      ".     .      .    "
      ".     .      .    ";
  }
  .game:has(.boostbutton:not([hidden])) .hud__corner{ align-self: start; justify-self: end; }
}
/*
 * What a run shows (Settings > Graphics, "On screen"; ui/settingsScreen.ts,
 * main.ts applyHudView). Gray, 19 Oct 2026, with slither.io's and Worms Zone's
 * settings in front of him. The game root carries one class per choice.
 *
 *   is-board-off      the Top 10 is gone
 *   is-minimap-off    the minimap is gone
 *   is-minimap-left   the minimap takes the top of the left column, above the score strip
 *   is-hud-hidden     the whole HUD goes, for a clean recording: the boost
 *                     button, the leave button and the menus stay
 *
 * The minimap's size is --minimap-scale (1, 1.2 or 1.5) times the base size
 * each screen size sets (--minimap-base).
 *
 * Left is the top of the left column on EVERY screen, never the bottom corner:
 * the bottom left is the sound and leave buttons (or the boost button, with
 * boost on the left), and under the score strip it ran into them whenever the
 * event line made the strip tall (check-overflow's minimap scenarios, 19 Oct
 * 2026). The HUD's named slots do the work: only the template changes, the
 * piece still takes "corner". (`:has(.hud)` only raises the rule above the
 * boost-button templates earlier in this sheet, which are written with :has,
 * and carry that much weight.)
 */
.game.is-minimap-left:has(.hud) .hud{
  grid-template-areas:
    "corner . board"
    "stats  . board"
    ".      . .    ";
}
.game.is-minimap-left:has(.hud) .hud__corner{ justify-self: start; align-self: start; align-items: flex-start; }
/*
 * A phone on its side: the minimap is in the top row, beside the Top 10 (right) or before the score
 * strip (left), because no bottom control can reach the top row. The strip gives up that much width
 * to it and wraps, as it does for the Top 10; without this a full strip squeezed a x1 minimap to a
 * sliver (check-overflow's minimap scenarios, 19 Oct 2026).
 */
@media (orientation: landscape) and (max-height: 540px) {
  .game.is-minimap-left:has(.hud) .hud{
    grid-template-areas:
      "corner stats board"
      ".      .     .    "
      ".      .     .    ";
  }
  .game:has(.boostbutton:not([hidden])):not(.is-minimap-left):not(.is-minimap-off) .hud__stats,
  .game.is-minimap-left:not(.is-minimap-off) .hud__stats{
    max-width: calc(100vw - var(--board-w) - 48px - var(--safe-l, 0px) - var(--safe-r, 0px) - var(--minimap-w));
  }
}
@media (orientation: landscape) and (max-height: 500px) {
  .game:has(.boostbutton:not([hidden])):not(.is-minimap-left):not(.is-minimap-off) .hud__stats,
  .game.is-minimap-left:not(.is-minimap-off) .hud__stats{
    max-width: calc(100vw - var(--board-w) - 48px - var(--safe-l, 0px) - var(--safe-r, 0px) - var(--minimap-w));
  }
}
.game.is-board-off .hud__board,
.game.is-minimap-off .hud__corner{ display: none; }
.game.is-hud-hidden .hud,
.game.is-hud-hidden .dock__icon[data-game-mute]{ display: none; }
/*
 * The power-up row is NOT hidden by an overlay-keyed rule here (it once
 * was, the same shape as the boost button above) — hud.ts's `blocked`
 * field, driven directly by main.ts's own `phase === "playing"`, is now
 * the one place that decides it. Every one of these `:has()` rules depends
 * on some OTHER code path keeping an overlay's `hidden` attribute in sync
 * with reality, forever, and two different overlays already broke that
 * promise this same week (the death screen once, the front menu once) in
 * two different ways — the same bug, over and over, because there was no
 * single place it could be fixed for good. See hud.ts.
 */

/*
 * Exactly one scrollbar, ever.
 *
 * The overlay used to scroll and the skin list scrolled inside it, so a tall
 * menu in a short arena produced a scrollbar inside a scrollbar — and the Play
 * button could scroll out of sight. Now the overlay never scrolls; a simple
 * panel scrolls as a whole, and the menu pins its head and scrolls one region
 * beneath it.
 */
/*
 * The menu floats ON the arena, it does not cover it.
 *
 * The backdrop used to be an almost-opaque radial, which meant the first thing
 * a new player saw was a dark rectangle — the same first impression as a page
 * that has not loaded. Behind it now is a live arena (see attract.ts), so the
 * backdrop's job is to keep the panel readable over moving worms, not to hide
 * them: a vignette that darkens the edges and leaves the middle alive.
 */
.overlay{
  position: absolute; inset: 0; z-index: 6;
  display: grid; place-items: center; padding: 16px;
  /*
   * The panel is CENTRED. No lane.
   *
   * This used to reserve 148px on the left for the sound dock, which fixed a
   * real overlap on phones and created a permanent one-sided offset
   * everywhere else — a panel visibly pushed off centre, which is what Gray
   * spotted.
   *
   * The offset was never needed above the phone breakpoint. Measured, not
   * guessed: the panel is min(430px, 100%) and the dock ends at 14px + 148px =
   * 162px, so the panel's left edge is (viewport - 430) / 2, and at the
   * narrowest desktop width the phone rules do not cover — 768px — that is
   * 169px. Clear of the dock at every width from there up, and widening the
   * viewport only pushes them further apart.
   *
   * Below 768px the phone block does not use a lane either: it pins the panel
   * to the top instead, which gathers the slack into one bottom strip the dock
   * and the scroll cue share. tools/check-layout.mjs measures the real gap
   * across the range so this cannot regress into an overlap again.
   */
  background:
    radial-gradient(ellipse 120% 90% at 50% 45%, rgba(4, 6, 12, 0.34), rgba(4, 6, 12, 0.86) 78%);
  overflow: hidden;
}
/*
 * Opening a panel: ONE rule for every overlay (Gray, 20 Oct 2026, of The Burrow: "flicks open with a judder"). They were
 * shown by taking `hidden` off, so each one simply appeared, with the rest of its work landing in the frames after. Now the
 * backdrop fades and the panel rises a few pixels into place, in transform and opacity only (the compositor's own
 * properties: no layout, no paint). It starts the moment `hidden` comes off, and ui/fitPanels.ts has by then fitted the
 * panel and told the game to hold the arena behind it still for the same 220ms. `backwards` fill: nothing is left on the
 * panel once it has settled, so no layer outlives the opening. The secret reveal and the front screen have their own.
 */
@keyframes overlay-in{ from{ opacity: 0; } }
@keyframes panel-in{ from{ opacity: 0; transform: translateY(16px) scale(0.97); } }
.overlay:not([hidden], .overlay--menu, .overlay--secret){ animation: overlay-in 140ms ease-out backwards; }
.overlay:not([hidden], .overlay--menu, .overlay--secret) > :is(.panel, .screen, .wheelstage){ animation: panel-in 220ms cubic-bezier(0.2, 0.9, 0.25, 1) backwards; }
@media (prefers-reduced-motion: reduce){
  .overlay:not([hidden], .overlay--menu, .overlay--secret), .overlay:not([hidden], .overlay--menu, .overlay--secret) > :is(.panel, .screen, .wheelstage){ animation: none; }
}
/* Death, privacy and how-to still want the room dark — they are read, not
   looked past. */
.overlay:has(.panel--death),
.overlay[data-game-lobby]{
  background: radial-gradient(ellipse 120% 90% at 50% 45%, rgba(4, 6, 12, 0.34), rgba(4, 6, 12, 0.78) 80%);
}
.overlay:has(.panel__list):not([data-game-lobby]){
  background: radial-gradient(circle at 50% 40%, rgba(10, 14, 26, 0.86), rgba(4, 6, 12, 0.96));
}
/*
 * Settings is read, not looked past, and it sits ON the menu.
 *
 * At the ordinary backdrop strength the menu panel behind it stayed legible
 * through the blur — the wordmark and the NAME YOUR WORM field showing as a
 * ghost rectangle behind the word "Settings", which reads as a rendering fault
 * rather than as depth.
 */
.overlay--settings{
  background: radial-gradient(circle at 50% 40%, rgba(10, 14, 26, 0.9), rgba(4, 6, 12, 0.97));
}
/*
 * The house panel, in the violet of the game's own screens (the wheel, the
 * reveal, the death screen) rather than the navy it started in, so every
 * pop-up reads as one family (Gray, 27 Sep 2026: "inline with rest of site
 * modals").
 */
.panel{
  width: min(560px, 100%); border-radius: var(--radius); padding: 20px; max-height: 100%; overflow-y: auto;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.12), transparent 45%),
    radial-gradient(ellipse 120% 100% at 50% 10%, #5a48c4, #3a2c9a 50%, #221660 100%);
  border: 4px solid #fff; box-shadow: 0 0 0 2px #7a2a6a, 0 14px 30px -12px rgba(0, 0, 0, 0.55);
  /* The panel's reading text: the rounded interface face, and a dim that is still 6:1 on the violet (the grey-blue it replaces was 2.6:1). */
  font-family: var(--font-display); font-weight: 600; --text-dim: #ddd6ff;
}
/*
 * There is no `.panel--menu` any more.
 *
 * It was a 430px card with its own background, border and scrollbar floating
 * in the middle of a live arena — the single thing that made this read as a
 * game embedded in a website. The front screen is laid straight onto the
 * arena now; see `.menu` above.
 */
.panel__head{
  flex: 0 0 auto; padding: 22px 22px 20px;
  border-bottom: 1px solid var(--line);
  border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
  text-align: center;
}
/* The wordmark is the title. A game's front page says its name in its own
   lettering, not in the body face at 1.5rem. */
.panel__mark{ display: block; height: 54px; width: auto; margin: 2px auto 12px; }
.panel__head .panel__title{ font-size: 1.12rem; margin: 0 0 4px; }
.panel__head .panel__sub{ font-size: 0.9rem; margin: 0 0 16px; }
.panel__head .field__label{ text-align: left; }
.panel__head .button--big{ margin-bottom: 0; }
/* min-height:0 is what actually lets a flex child scroll instead of growing. */
.panel__scroll{ flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 4px 20px 20px; }
.panel__section--first{ margin-top: 16px; }
/*
 * The menu's foot: pinned like the head, for the same reason.
 *
 * Settings used to be a section inside the scroller, under forty skin tiles.
 * A control you have to scroll past a wall of cosmetics to reach is a control
 * most people never find.
 */
.panel__foot{
  flex: 0 0 auto; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
  padding: 12px 18px 14px; border-top: 1px solid var(--line);
}
.panel__foot .button{ flex: 0 1 auto; }
.panel--death{
  text-align: center; width: min(480px, 100%); padding: 26px 22px 22px;
  /*
   * Arrives, rather than appears. The arena is still playing underneath — the
   * burst, the body coming apart, the food it drops — so the panel comes up
   * from 80% and stays a little transparent at rest, which keeps the thing that
   * just happened visible behind the number.
   */
  /*
   * The reward reveal's room, not a dark glass sheet (Gray, 27 Sep 2026:
   * "inline with rest of site modals"): violet with light rays behind the
   * number, the house white rim.
   */
  position: relative; isolation: isolate;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.16), transparent 40%),
    radial-gradient(ellipse 120% 90% at 50% 24%, #7a64ff, #4332b8 46%, #1f1760 92%);
  animation: deathIn 260ms cubic-bezier(0.16, 0.9, 0.3, 1) both;
}
/* The rays turn inside a clip the size of the panel, so they never make it scroll. */
.death__rays{ position: absolute; z-index: -1; inset: 0; overflow: hidden; pointer-events: none; border-radius: inherit; }
.death__rays::before{
  content: ""; position: absolute; left: 50%; top: 18%; width: 636px; height: 636px; translate: -50% -50%; pointer-events: none;
  background: repeating-conic-gradient(rgba(255, 255, 255, 0.12) 0 9deg, transparent 9deg 24deg);
  -webkit-mask: radial-gradient(circle, #000 51px, transparent 318px); mask: radial-gradient(circle, #000 51px, transparent 318px);
  animation: ray-spin-t 24s linear infinite; will-change: transform; translate: none; transform: translate(-50%, -50%);
}
/*
 * Turned by `transform`, its own layer: with the `rotate` property the rays were repainted every frame on the
 * Galaxy A17 while the game drew behind the death screen; this way the death screen paints half as often (A/B,
 * 20 Nov 2026). The same picture and the same turn.
 */
@keyframes ray-spin-t{ from{ transform: translate(-50%, -50%) rotate(0deg); } to{ transform: translate(-50%, -50%) rotate(360deg); } }
/*
 * No sideways scrollbar, ever.
 *
 * Gray, 10 Sep 2026: "the death screen modal flickers with the play again
 * bounce". The panel scrolls (overflow-y:auto, so x is auto too), and at the
 * widest point of the jelly the Play Again button reached a pixel past the
 * padding. An 11px horizontal scrollbar came and went on every bounce, and the
 * content jumped with it. Stepped through the bounce in 2ms steps in Chrome:
 * 19 of 51 steps showed the bar before this, 0 of 51 after. The 6px of room
 * keeps the stretch inside the panel, so nothing is clipped either.
 */
.panel--death{ overflow-x: hidden; }
.panel--death .panel__actions{ padding-inline: 6px; }

/*
 * The death screen on a phone turned sideways: 292px tall in iPhone Safari.
 * The panel scrolled, with the score and Play Again half out of view. Here the
 * score comes down, the buttons sit side by side, and the share row goes (the
 * menu has its own share button).
 */
@media (max-height: 420px) and (orientation: landscape) {
  /* The lobby's room is built from the same pieces (a label, one big number,
     a stack of actions) and had the same fault: Leave sat below the fold at
     812x375 (measured 14 Sep 2026). So it takes the same landscape rules. */
  :is(.panel--death, .panel--lobby){ padding: 12px 18px; width: min(620px, 100%); }
  .death__score, .panel__display{ font-size: 2.4rem; line-height: 1.05; }
  .death__cause{ margin-bottom: 6px; }
  /* Every visible button on one row: Revive comes and goes, Main menu stays. */
  :is(.panel--death, .panel--lobby) .panel__actions{ grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); margin-top: 8px; }
  .panel--death .share{ display: none; }
  /* The member list, one line apart rather than a paragraph apart. */
  .panel--lobby .panel__list{ margin-bottom: 4px; }
  :where(.panel--lobby .panel__list) :where(li){ margin: 0.15em 0; }
  /* Small enough that "Play Again" stays on one line in a third of the row,
     and the label above the score stays in view. */
  :is(.panel--death, .panel--lobby) .panel__actions > .button{ padding: 6px 13px 8px; font-size: 1.1rem; min-height: 0; }
  .death__label, .panel__eyebrow{ font-size: 0.66rem; }
  /* The revive offer is one cell of that row: its button the size of its neighbours', its words allowed to wrap (German). */
  .panel--death .revive{ gap: 3px; }
  .panel--death .revive__go{ padding: 6px 8px 8px; font-size: 0.95rem; min-height: 44px; line-height: 1.25; white-space: normal; }
  .panel--death .revive__note{ font-size: 0.74rem; line-height: 1.1; }
  .panel--death .revive__secs{ font-size: 0.78rem; }
}
@keyframes deathIn {
  from { opacity: 0; transform: scale(0.8); }
  to   { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .panel--death{ animation: none; }
}
/* The backdrop behind it comes up too, so the arena is not slapped with a
   full-strength dim on the frame you died. */
.overlay:has(.panel--death){ animation: deathBackdrop 260ms ease both; }
@keyframes deathBackdrop { from { opacity: 0; } to { opacity: 1; } }

/* One scrollbar left, so make it look deliberate rather than borrowed. */
.panel, .panel__scroll { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.panel::-webkit-scrollbar, .panel__scroll::-webkit-scrollbar { width: 10px; }
.panel::-webkit-scrollbar-track, .panel__scroll::-webkit-scrollbar-track { background: transparent; }
.panel::-webkit-scrollbar-thumb, .panel__scroll::-webkit-scrollbar-thumb {
  background: var(--line); border-radius: 99px;
  border: 3px solid var(--ink-2); background-clip: padding-box;
}
.panel__scroll::-webkit-scrollbar-thumb:hover{ background: #3A4460; }

/*
 * The death screen.
 *
 * One number is the result of the run and everything else is context, so the
 * length is set at five times the size of the label above it. The old panel
 * gave the score, the rank, the best and the killer the same weight, which
 * made the player hunt for the one thing they wanted to know.
 */
.death__label, .panel__eyebrow{
  margin: 0; font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-dim);
}
.death__label{ color: #ffe45c; letter-spacing: 0.3em;  }
/* The length in the reveal's gold layered type (.fx, as .reward__num). */
.death__score .fx{ font-family: "Lilita One", var(--font-display); font-weight: 400; letter-spacing: 0; }
.death__score .fx::before{ color: #3b1a00; -webkit-text-stroke: 0.14em #3b1a00; filter: drop-shadow(0 0.06em 0 #3b1a00) drop-shadow(0 0.1em 0.1em rgba(0, 0, 0, 0.5)); }
.death__score .fx::after{ color: #fff3b0; -webkit-text-stroke: 0.05em #fff3b0; }
.death__score .fx > span{ background-image: linear-gradient(180deg, #fffbe6 0%, #ffe45c 42%, #ffc21a 60%, #ff9a00 100%); }
.death__score, .panel__display{
  margin: 2px 0 6px;
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(3.2rem, 15vw, 4.6rem); line-height: 1;
  letter-spacing: -0.04em; color: var(--accent);
  font-variant-numeric: tabular-nums;
}
/* A code to pass on: one click or tap selects all of it, where the game's
   no-select rule (.game) made it impossible to select at all (Gray, 15 Sep 2026:
   "the code aint selectable if you double click it"). */
.panel__display--code{
  -webkit-user-select: all; user-select: all; cursor: text;
  /* Crisp game lettering, not the pink display type (Gray, 7 Nov 2026: "share code is blurry as fuck and ugly"):
     Lilita One has its one real weight (the 900 asked of Fredoka was faked and smeared), a dark outline painted
     under the fill, and a plain dark plate behind it. */
  width: fit-content; margin-inline: auto; padding: 4px 18px 8px;
  font-family: var(--font-label); font-weight: 400;
  font-size: clamp(2.4rem, 10vw, 3.4rem); letter-spacing: 0.08em; line-height: 1.1;
  color: #fff; -webkit-text-stroke: 0.12em #2a0a52; paint-order: stroke fill;
  text-shadow: 0 0.07em 0 #2a0a52;
  background: rgba(10, 0, 30, 0.35); border: 2px solid rgba(255, 255, 255, 0.16); border-radius: 16px;
}
/* The run's numbers as picture tiles (ui/death.ts statTile). */
.death__stats{
  margin: 6px 0 12px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px;
}
.death__stat{
  display: grid; justify-items: center; gap: 0; min-width: 0; padding: 6px 2px 8px; border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.05));
  border: 2px solid rgba(255, 255, 255, 0.18);
}
.death__stat img{ width: 34px; height: 34px; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.4)); }
.death__stat b{ font-family: var(--font-label); font-weight: 400; font-size: clamp(0.95rem, 3.6vw, 1.3rem); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.1; color: #fff; --ts: #1b0431; font-variant-numeric: tabular-nums; }
.death__stat small{ font-size: 0.75rem; white-space: nowrap; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255, 255, 255, 0.7); }
/* A new personal best: a gold ribbon under the number. */
.death__best{ margin: -4px 0 2px; }
.death__best[hidden]{ display: none; }
.death__ribbon{
  display: inline-block; padding: 4px 18px 5px; border-radius: 8px; rotate: -3deg;
  background: linear-gradient(180deg, #ffe45c, #ff9f1c); border: 3px solid #fff; box-shadow: 0 3px 0 #8a4a00;
  font-family: var(--font-label); font-size: 1.1rem; color: #fff; --ts: #7a3d00;
  animation: tile-pulse 1.3s ease-in-out infinite;
}
.death__cause{
  margin: 0 auto 12px; display: table; padding: 6px 14px; border-radius: 999px;
  background: rgba(10, 6, 40, 0.4); color: rgba(255, 255, 255, 0.85); font-size: 0.92rem;
}
.death__cause:empty{ display: none; }
/* Hide this name / Report name: a link's height is its text's; a finger needs 44px. */
.death__report .linkbutton{ display: inline-flex; align-items: center; min-height: 44px; }

/* Share */
.share{ margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.share__label{
  margin: 0 0 9px; font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-dim);
}
.share__row{ display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; }
.share__btn{ display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px 9px; border-radius: 14px; font-size: 0.98rem; text-decoration: none; cursor: pointer; --rim: 3px; }
@media (hover: hover){ .share__btn:hover{ filter: brightness(1.05); } }
/* Confirmation replaces the label rather than appearing beside it, so the row
   does not reflow and shift the buttons under the player's cursor. */
/*
 * The death screen's row: equal round buttons in the brands' own colours, one
 * row that never wraps and never changes size (Gray, 27 Sep 2026: "these
 * buttuns ugly and they keep resizing"). Candy bodies, brand-tinted.
 */
.share__row--round{ display: flex; flex-wrap: nowrap; justify-content: center; gap: clamp(6px, 2.4vw, 12px); }
.share__btn.share__btn--round{
  width: clamp(44px, 12vw, 54px); height: clamp(44px, 12vw, 54px); flex: none; padding: 0; justify-content: center;
  border-radius: 50%; --rim: 3px; --ink: #fff; text-shadow: none; -webkit-text-stroke: 0;
}
.share__btn.share__btn--round svg{ filter: drop-shadow(0 2px 0 var(--ts)); }
.share__btn--round[hidden]{ display: none; }
.share__btn.share__btn--native{ --bodyA: #c7b2ff; --bodyB: #8a5cff; --bodyC: #5f33d6; --ts: #35187f; }
.share__btn.share__btn--x{ --bodyA: #4a4a4a; --bodyB: #1a1a1a; --bodyC: #000; --ts: #000; }
.share__btn.share__btn--reddit{ --bodyA: #ff8a52; --bodyB: #ff4500; --bodyC: #c73600; --ts: #7a2100; }
.share__btn.share__btn--facebook{ --bodyA: #5b9bff; --bodyB: #1877f2; --bodyC: #0f5bc4; --ts: #083a80; }
.share__btn.share__btn--whatsapp{ --bodyA: #6ff29a; --bodyB: #25d366; --bodyC: #149c48; --ts: #0a5a28; }
.share__btn.share__btn--copy{ --bodyA: #ffd27a; --bodyB: #e07800; --bodyC: #b85600; --ts: #7a3d00; }
.share__btn.is-done{ --bodyA: #ff9ddf; --bodyB: #f0369c; --bodyC: #c2166f; --ts: #7a0f48; --ink: #fff; }

/* On a content page the row is left-aligned with the prose, not centred. */
.share--page{ margin: 2.4em 0 0; border-top: 1px solid var(--line); padding-top: 16px; }
.share--page .share__row{ justify-content: flex-start; }
.panel__title{ font-family: var(--font-label); font-weight: 400; color: #fff; font-size: 1.5rem; margin: 0 0 6px; --ts: #2c1a7a; }
.panel__sub{ margin: 0 0 16px; color: var(--text-dim); }
.panel__section{ font-size: 1rem; margin: 20px 0 4px; }
.panel__hint{ margin: 4px 0 10px; font-size: 0.85rem; color: var(--text-dim); min-height: 1.2em; }
.panel__note{ margin: 10px 0 0; font-size: 0.79rem; color: var(--text-dim); }
/* Hunting Hour's popup (gameShell HUNT_POPUP): the mole on top, three short lines, Close and Hunt now!. */
.panel--hunt{ text-align: center; }
.panel--hunt .panel__art{ display: block; width: 112px; height: 112px; margin: -6px auto 2px; animation: hunt-bob 1.6s ease-in-out infinite; }
.panel--hunt .panel__note{ font-size: 0.95rem; color: var(--text); }
.panel--hunt [data-hunt-popup-time]{ color: var(--text-dim); }
@keyframes hunt-bob{ 0%, 100%{ transform: translateY(0); } 50%{ transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce){ .panel--hunt .panel__art{ animation: none; } }
/* Mole Hunt, the week's board under the hour's lines (ui/huntingPopup.ts): a heading, the three places' Nuggets, the countdown, the top ten.
   Names wrap (the event rows' rule), and the heading's outline sits well inside the panel so its scroll box never cuts it. */
.huntboard{ margin: 14px 0 6px; padding: 12px 2px 0; border-top: 3px solid rgba(255, 255, 255, 0.14); text-align: left; }
.huntboard[hidden]{ display: none; }
/* The top ten may sit in a box of their own (huntingPopup.ts fit) that scrolls by whole rows; a row's shadow gets room below it. */
.huntboard [data-hunt-board-rows]{ overflow-y: auto; padding-bottom: 4px; overscroll-behavior: contain; }
.huntboard__me{ margin-top: 4px; }
.huntboard__me:empty{ display: none; }
.huntboard__title{
  margin: 0 0 2px; padding: 0 0.3em; text-align: center; font-family: "Lilita One", var(--font-display); font-weight: 400; font-size: 1.35rem; line-height: 1.2;
  color: #fff; -webkit-text-stroke: 0.2em #1b1050; paint-order: stroke fill; text-shadow: 0 0.1em 0 #1b1050;
}
.huntboard__sub{ margin: 0 0 8px; text-align: center; font-size: 0.95rem; color: var(--text); }
.huntboard__prizes{ list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.huntboard__prize{ display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px 3px 6px; border-radius: 14px; background: rgba(12, 8, 36, 0.45); box-shadow: 0 3px 0 rgba(8, 4, 34, 0.7); font-family: "Lilita One", var(--font-display); font-size: 1.05rem; color: #fff; }
.huntboard__cup{ display: block; width: 32px; height: 32px; object-fit: contain; }
.huntboard__time{ margin: 0 0 10px; text-align: center; font-size: 0.9rem; color: var(--text-dim); }
/* The board's rows (Gray, 11 Nov 2026: "way too big ... names show one at a time on mobile"). Where the board is wide enough
   a row is one line: cup, name, count at the right. On a narrow phone the count sits under the name, at the left, so the name
   has the whole row; the name's size follows the row (a 20-letter name of wide letters stays on one line, never split).
   The board runs nearly edge to edge inside the panel. */
.huntboard{ margin-left: -10px; margin-right: -10px; container: huntboard / inline-size; }
.huntboard .ranks--event{ gap: 4px; }
.huntboard .ranks--event .ranks__row{
  container-type: inline-size; grid-template-columns: 38px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 6px; row-gap: 0;
  align-content: center; min-height: 42px; padding: 2px 8px 2px 4px; box-shadow: 0 3px 0 rgba(8, 4, 34, 0.7);
}
.huntboard .ranks--event .ranks__rank{ grid-row: 1 / 3; font-size: 1.05rem; }
.huntboard .ranks--event .ranks__rank img{ width: 32px; height: 32px; }
.huntboard .ranks--event .ranks__name{ line-height: 1.15; font-size: max(0.72rem, min(1rem, calc((100cqw - 52px) / 19))); }
.huntboard .ranks--event .ranks__len{ grid-column: 2; grid-row: 2; justify-content: flex-start; line-height: 1.15; font-size: 0.8rem; color: var(--text-dim); }
@container huntboard (min-width: 430px){
  .huntboard .ranks--event .ranks__row{ grid-template-columns: 38px minmax(0, 1fr) auto; grid-template-rows: auto; column-gap: 8px; min-height: 38px; padding-right: 12px; }
  .huntboard .ranks--event .ranks__rank{ grid-row: auto; }
  .huntboard .ranks--event .ranks__name{ font-size: max(0.72rem, min(1rem, calc((100cqw - 170px) / 19))); }
  .huntboard .ranks--event .ranks__len{ grid-column: auto; grid-row: auto; justify-content: flex-end; font-size: 0.9rem; color: #fff; }
}
/* The board up (huntingPopup.ts sets has-board) on anything but a tall screen: a smaller mole and the two buttons side by side, so the rows have the room. */
@media (max-height: 900px){
  .panel--hunt.has-board{ padding-top: 12px; padding-bottom: 14px; }
  .panel--hunt.has-board .panel__art{ width: 64px; height: 64px; margin: -4px auto 0; }
  .panel--hunt.has-board .panel__note{ margin-top: 3px; }
  .panel--hunt.has-board .panel__actions{ grid-auto-flow: column; grid-auto-columns: 1fr; margin-top: 8px; gap: 8px; }
  .panel--hunt.has-board .huntboard{ margin-top: 8px; padding-top: 8px; }
  .panel--hunt.has-board :is(.huntboard__prizes, .huntboard__sub){ margin-bottom: 4px; }
  .panel--hunt.has-board .huntboard__time{ margin-bottom: 6px; }
  .panel--hunt.has-board .huntboard__prize{ padding: 2px 8px 2px 4px; font-size: 0.95rem; gap: 4px; }
  .panel--hunt.has-board .huntboard__cup{ width: 26px; height: 26px; }
}
@media (orientation: landscape) and (max-height: 500px){
  .panel--hunt .panel__art{ display: none; }
  .panel--hunt .panel__note{ margin-top: 2px; }
  .panel--hunt .panel__actions{ grid-auto-flow: column; grid-auto-columns: 1fr; margin-top: 8px; gap: 8px; }
  .huntboard__prizes, .huntboard__sub{ margin-bottom: 4px; }
  .huntboard__time{ margin-bottom: 6px; }
  /* A phone on its side with the board up: two columns, the hour's lines and the buttons on the left, the board on the right with the height to itself. */
  .panel--hunt.has-board{
    width: min(780px, 100%); padding: 12px 16px; display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 5fr);
    grid-template-rows: repeat(4, auto) minmax(0, 1fr); column-gap: 14px; align-items: start;
  }
  .panel--hunt.has-board > *{ grid-column: 1; }
  .panel--hunt.has-board > .huntboard{
    grid-column: 2; grid-row: 1 / span 5; align-self: stretch; margin: 0; padding: 0 0 0 12px;
    border-top: 0; border-left: 3px solid rgba(255, 255, 255, 0.14);
  }
  /* The left column is narrow: the buttons stack, and its lines take a size that keeps each on one line ("50 pro Diamant-Maulwurf"). */
  .panel--hunt.has-board > .panel__actions{ grid-row: 5; align-self: end; grid-auto-flow: row; }
  .panel--hunt.has-board > .panel__title{ font-size: 1.25rem; }
  .panel--hunt.has-board > .panel__note{ font-size: clamp(0.75rem, 1.9vw, 1rem); white-space: nowrap; }
  /* Only while the board is narrow enough for two-line rows; a wide one keeps its one-line rows. */
  @container huntboard (max-width: 429.98px){
    .panel--hunt.has-board .ranks--event .ranks__row{ grid-template-columns: 34px minmax(0, 1fr); column-gap: 4px; padding-right: 6px; }
    .panel--hunt.has-board .ranks--event .ranks__rank img{ width: 30px; height: 30px; }
    .panel--hunt.has-board .ranks--event .ranks__name{ font-size: max(0.72rem, min(1rem, calc((100cqw - 46px) / 19))); }
  }
  .panel--hunt.has-board .huntboard__title{ font-size: 1.15rem; }
  .panel--hunt.has-board .huntboard__sub{ display: none; }
  .panel--hunt.has-board .huntboard__prize{ padding: 2px 8px 2px 4px; font-size: 0.9rem; gap: 4px; }
  .panel--hunt.has-board .huntboard__cup{ width: 24px; height: 24px; }
  .panel--hunt.has-board .huntboard__time{ margin-bottom: 4px; font-size: 0.82rem; }
}
/* A phone on its side at its shortest (about 300px) with no board: the lead-in lines give way. */
@media (orientation: landscape) and (max-height: 320px){
  .panel--hunt [data-hunt-popup-diamond]{ display: none; }
  .panel--hunt:not(.has-board) .huntboard__sub{ display: none; }
}
.panel__links{ margin: 14px 0 0; font-size: 0.88rem; }
.panel__list{ margin: 0 0 16px; padding-left: 1.15em; text-align: left; color: var(--text-dim); font-size: 0.92rem; }
:where(.panel__list) :where(li){ margin: 0.55em 0; }
.panel__list strong{ color: var(--text); }

/* A button that reads as a link — used where a real link would be an outbound
   link, which portal builds are rejected for. */
.linkbutton{
  background: none; border: 0; padding: 0; font: inherit;
  color: var(--accent); cursor: pointer; text-decoration: underline;
  text-underline-offset: 3px;
}
@media (hover: hover){ .linkbutton:hover{ color: var(--accent-2); } }
.linkbutton:focus-visible{ outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.linkbutton:disabled{ text-decoration: none; cursor: default; opacity: 0.8; }
/* Dim: a way out that must not compete, such as Hide or Report on the death
   screen. It had its own copy of this whole rule as .death__reportbtn. */
.linkbutton--dim{ color: var(--text-dim); padding: 2px 4px; text-underline-offset: 2px; }
@media (hover: hover){ .linkbutton--dim:hover{ color: var(--text); } }
.panel__actions{ display: grid; gap: 10px; margin-top: 16px; }
/* Cash prices in the Get more Nuggets panel (website build only): two to a row, house buttons. */
.cashshop{ margin-top: 14px; }
.cashshop__title{ margin: 0 0 8px; font-size: 0.95rem; color: var(--text-dim); font-weight: 700; }
.cashshop__grid{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cashshop__grid > .button{ min-height: 44px; }
.cashshop__grid > .cashshop__wide{ grid-column: 1 / -1; }
.cashshop__grid .button__price{ margin-left: 6px; white-space: nowrap; }
.cashshop__grid .nugamt{ white-space: nowrap; }
@media (max-width: 400px){ .cashshop__grid{ grid-template-columns: minmax(0, 1fr); } }
.cashshop__holds{
  grid-column: 1 / -1; margin: -2px 0 4px; display: flex; justify-content: center; align-items: center; gap: 6px;
  font-family: "Lilita One", var(--font-display); font-size: 0.95rem; color: #fff; white-space: nowrap;
}
.cashshop__skin{ height: 46px; width: auto; margin: -12px -4px; }

.field{ display: block; margin-bottom: 14px; }
.field__label{ display: block; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.09em; color: var(--text-dim); margin-bottom: 5px; }
.field__input{
  width: 100%; font: inherit; padding: 12px 14px; border-radius: var(--radius-sm);
  /* Never under 16px: Safari zooms the page in on a smaller text box (6 Oct 2026). */
  font-size: max(16px, 1em);
  border: 1px solid var(--line); background: var(--ink); color: var(--text);
}

.radio{ margin-top: 6px; }
.radio__stations,
.region__choices{ display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
/* The same grid for the floors — four of them, two up on a narrow panel. */
.stations{ display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.station.is-locked{ opacity: 0.55; cursor: not-allowed; }
.station.is-locked .station__name{ color: var(--text-dim); }
.region{ margin-top: 6px; }
.station{
  display: grid; gap: 2px; padding: 8px 9px; cursor: pointer; text-align: left;
  background: var(--ink-3); border: 2px solid transparent; border-radius: var(--radius-sm);
  color: var(--text); font: inherit;
}
@media (hover: hover){ .station:hover:not(:disabled){ border-color: var(--line); } }
.station.is-selected{ border-color: var(--accent); }
.station.is-selected .station__name{ color: var(--accent); }
.station:disabled{ opacity: 0.5; cursor: not-allowed; }
.station__name{ font-size: 0.88rem; font-weight: 700; }
.station__desc{ font-size: 0.72rem; color: var(--text-dim); line-height: 1.35; }

.radio__transport{ display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.radio__transport .button{ padding: 8px 16px; }
.radio__volume{ flex: 1; display: flex; }
.radio__volume input{ width: 100%; accent-color: var(--accent); }
.radio__now{ margin: 8px 0 0; font-size: 0.82rem; color: var(--text-dim); }
.radio__credit{ margin: 3px 0 0; font-size: 0.72rem; color: var(--text-dim); opacity: 0.85; }

.toast{
  margin: 12px 0 0; padding: 9px 13px; border-radius: var(--radius-sm);
  background: rgba(110, 231, 183, 0.14); border: 1px solid rgba(110, 231, 183, 0.4);
  color: var(--accent); font-weight: 700; font-size: 0.9rem;
}

/* No longer a scroller of its own — .panel__scroll is the only one. */
.squirm-skins{ padding-right: 0; }
.squirm-skins__group + .squirm-skins__group{ margin-top: 12px; }
.squirm-skins__heading{
  margin: 0 0 6px; font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.09em; color: var(--text-dim); font-weight: 700;
}
.squirm-skins__row{ display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 7px; }
.squirm-skin{
  display: grid; gap: 2px; padding: 5px; cursor: pointer;
  background: var(--ink-3); border: 2px solid transparent; border-radius: var(--radius-sm);
  color: var(--text); font: inherit;
}
.squirm-skin__art{ width: 100%; height: 40px; display: block; }
.squirm-skin__name{ font-size: 0.72rem; color: var(--text-dim); }
@media (hover: hover){ .squirm-skin:hover:not(:disabled){ border-color: var(--line); } }
.squirm-skin.is-selected{ border-color: var(--accent); }
.squirm-skin.is-selected .squirm-skin__name{ color: var(--accent); }
.squirm-skin.is-locked{ cursor: not-allowed; opacity: 0.72; }

@media (max-width: 720px) {
  body { font-size: 16px; }
  /* `.game{ aspect-ratio: 3/4 }` used to live here, from when the arena was a
     box on the page. It is the viewport now — see `main > .game`. */
  .hud__board{ min-width: 0; }
  .hud{ --minimap-base: 82px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/*
 * The seam between the arena and the article.
 *
 * The arena ends at the window edge and the prose begins immediately under it,
 * so without a marker the first heading reads as the page having scrolled by
 * accident. A small lime eyebrow says "this is the write-up, deliberately".
 */
.eyebrow{
  font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent); margin: 26px 0 0;
}
.prose section:first-of-type .eyebrow + h2{ margin-top: 0.3em; }

/* ------------------------------------------------------------ sound dock */
/*
 * Above the overlay (z-index 6), because that is the whole point: with sound
 * off, the old chips sat *under* the menu and could be seen but not clicked.
 */
/*
 * Hidden while the death screen is up.
 *
 * The dock sits above the overlay so sound can be changed from the menu — but
 * on the death screen that put a floating pill through the middle of the share
 * buttons. Death is a modal moment with its own actions; the controls are back
 * the instant you are in the arena or the menu again.
 */
.game:has(.overlay[data-game-death]:not([hidden])) .dock{ display: none; }

.dock{
  position: absolute;
  left: calc(14px + var(--safe-l)); bottom: calc(14px + var(--safe-b)); z-index: 9;
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
}
/*
 * The corner does not move any more, because it is not on screen at the same
 * time as anything it could collide with — the menu hides it outright (see the
 * `.menu` block) and puts Sound and Settings in its top rail as words.
 *
 * The rule that used to live here lifted it over the bottom link bar with
 * `bottom: calc(var(--linkbar-h) + 10px)` and a transition. Worth remembering
 * why it went: a `transition` on a value fed by a custom property that
 * JavaScript sets after first paint left the property parked on its FALLBACK
 * permanently — measured 58px with the variable sitting at 70px, unchanged
 * whatever it was set to afterwards. Never transition a property whose value
 * comes from a measured variable.
 */
/*
 * No backdrop blur: this bar sits over the live arena, and a blur of what is behind it is
 * redone whenever the arena underneath changes, which is every frame. Measured in Firefox on a
 * Mac with the arena running (24 Oct 2026, five pairs of runs): taking it off cut the browser's
 * processor time per frame by about 40% in every pair, and doubled the frame rate where the
 * machine was busy.
 */
.dock__bar{
  display: flex; gap: 6px; padding: 5px;
  border-radius: 999px; border: 1px solid var(--line);
  background: rgba(7, 9, 15, 0.55);
}
.dock__icon{ width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border-radius: 50%; cursor: pointer; font-size: 0.95rem; line-height: 1; --rim: 3px; }
.dock__icon[hidden]{ display: none; }
@media (hover: hover){ .dock__icon:hover{ background: rgba(255, 255, 255, 0.07); color: var(--text); } }
.dock__icon:focus-visible{ outline: 2px solid var(--accent); outline-offset: 2px; }
.dock__icon[aria-expanded="true"]{ background: var(--accent); color: var(--accent-ink); }
.dock__glyph{
  display: block;
  fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}
.dock__speaker-body{ fill: currentColor; stroke: currentColor; stroke-width: 1.2; }
.dock__glyph--leave{ stroke-width: 2; }
/* The quality button: dim while soft (the default), lit while sharp. */
.dock__icon--hd{ opacity: 0.6; }
.dock__icon--hd[aria-pressed="true"]{ opacity: 1; color: var(--accent); }
/* Waves when there is sound, a cross when there is not. One icon, two states. */
.dock__cross{ opacity: 0; }
/* The game root carries is-silent (ui/sound.ts refresh), not the dock: keyed
   on .dock, the speaker never changed at all (Gray, 28 Sep 2026: "no matter
   what you click it, it stays the same design"). Every mute button, the
   dock's speaker shows the cross (the menu's swaps its own icon on aria-pressed). */
.game.is-silent .dock__wave{ opacity: 0; }
.game.is-silent .dock__cross{ opacity: 1; }
.game.is-silent .dock__icon[data-game-mute]{ color: var(--warn); }

/*
 * Four bars, at rest when nothing is playing and dancing when it is. It is the
 * only ornament in here and it earns its place: it is the one part of the
 * control that tells you the radio is running without opening anything.
 */
.eq{ display: flex; align-items: flex-end; gap: 2px; height: 14px; }
.eq i{ width: 3px; height: 4px; border-radius: 1px; background: var(--text-dim); transition: height 0.2s ease; }
@media (hover: hover){ .dock__icon:hover .eq i{ background: var(--text); } }
.eq.is-playing i{ background: var(--accent); animation: bounce 900ms ease-in-out infinite; }
.eq.is-playing i:nth-child(1){ animation-delay: 0ms; }
.eq.is-playing i:nth-child(2){ animation-delay: 140ms; }
.eq.is-playing i:nth-child(3){ animation-delay: 300ms; }
.eq.is-playing i:nth-child(4){ animation-delay: 80ms; }
@keyframes bounce { 0%, 100% { height: 4px; } 50% { height: 14px; } }
@media (prefers-reduced-motion: reduce) {
  .eq.is-playing i{ animation: none; height: 9px; }
}

/*
 * The dock's popover is gone.
 *
 * It held one copy of the sound switches while the menu held another, and the
 * two disagreed — see settings.ts. There is one settings screen now, and the
 * corner is two buttons that reach it.
 */
.dock__btn{ flex: 1; padding: 5px 12px 8px; border-radius: 12px; cursor: pointer; font-size: 0.92rem; --rim: 3px; }
@media (hover: hover){ .dock__btn:hover{ background: rgba(255, 255, 255, 0.09); } }
.dock__btn:disabled{ opacity: 0.4; cursor: default; }

/* ------------------------------------------------------- the settings screen */
.panel--settings{
  width: min(460px, 100%);
  /* The link bar fades out while this is up, so the whole height is free —
     nothing to reserve, and no constant to go stale. */
  max-height: 100%;
  padding: 0; overflow: hidden; display: flex; flex-direction: column;
  background: rgba(16, 20, 31, 0.86);
  border-color: rgba(255, 79, 173, 0.18);
  box-shadow: 0 30px 80px -40px #000, 0 0 0 1px rgba(0, 0, 0, 0.4);
}
@supports (backdrop-filter: blur(1px)) {
  .panel--settings{ background: rgba(16, 20, 31, 0.7); backdrop-filter: blur(18px) saturate(130%); }
}
/* Title on the left, the way out on the right — the one control on this screen
   that must never need scrolling to, for the same reason Play does not. */
.panel__head--row{
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; text-align: left; padding: 16px 18px;
}
.panel__head--row .panel__title{ margin: 0; font-size: 1.2rem; }

.setting{ display: flex; flex-direction: column; gap: 8px; padding: 16px 0; }
.setting + .setting{ border-top: 1px solid var(--line); }
.setting:first-child{ padding-top: 6px; }
.setting__row{ display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.setting__label{
  margin: 0; font-family: var(--font-display); font-size: 0.76rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim);
}
.setting__blurb{ margin: 0; font-size: 0.82rem; color: var(--text-dim); line-height: 1.45; }
.setting__slider{ display: block; }
.setting__slider input{ width: 100%; accent-color: var(--accent); }
.setting__transport{ display: flex; gap: 6px; }
.setting__now{ margin: 0; font-size: 0.76rem; color: var(--text-dim); line-height: 1.4; }
.setting__now.is-problem{ color: var(--warn); }
.setting__credit{ margin: 0; font-size: 0.72rem; color: var(--text-dim); line-height: 1.4; }

/* A switch, because on/off is a state and a button that says "Sound on" is a
   riddle about whether that is what it does or what it will do. */
.switch{ background: none; border: 0; padding: 0; cursor: pointer; }
.switch__track{
  display: block; width: 38px; height: 21px; border-radius: 999px;
  background: var(--ink-3); border: 1px solid var(--line);
  transition: background 0.16s ease, border-color 0.16s ease;
}
.switch__knob{
  display: block; width: 15px; height: 15px; margin: 2px; border-radius: 50%;
  background: var(--text-dim); transition: transform 0.16s ease, background 0.16s ease;
}
.switch[aria-pressed="true"] .switch__track{ background: rgba(255, 79, 173, 0.28); border-color: var(--accent); }
.switch[aria-pressed="true"] .switch__knob{ transform: translateX(17px); background: var(--accent); }
.switch:focus-visible{ outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 999px; }

/*
 * The corner survives on a phone now.
 *
 * It used to hide the settings button below 900px with a coarse pointer,
 * because what it opened was a 268px popover with three station chips and two
 * sliders crammed into the corner over a live arena. What it opens now is a
 * full screen with room to breathe, which is if anything BETTER on a phone
 * than on a desktop. The mute button was always here; the settings button
 * joins it.
 */

/* ------------------------------------------------------- the arena on a phone */
/*
 * Everything here is a fault visible in one portrait screenshot: the HUD boxes
 * were desktop-sized and ate the top of the arena, the leaderboard was nearly
 * opaque and covered a third of the width, the ping chip ran off the right
 * edge, and the corner controls sat underneath the boost button.
 */
@media (max-width: 767px) {
  /*
   * The readout on a phone.
   *
   * "this shit aint gonna work like that on mobile mate" — and it did not:
   * IN ARENA broke across two lines, which made the strip taller than the
   * leaderboard beside it and pushed the two into each other. Labels never
   * wrap now (see .hud__label) and the numbers come down a size.
   */
  .hud{ padding: calc(8px + var(--safe-t)) calc(8px + var(--safe-r))
                 calc(8px + var(--safe-b)) calc(8px + var(--safe-l)); }
  .hud__stats{ gap: 12px; }
  .hud__label{ font-size: 0.72rem; letter-spacing: 0.04em; }  /* the reading floor (SMALL, ui/uiRules.ts): 8px could not be read at arm's length */
  .hud__value{ font-size: 0.95rem; }
  .hud__stat:first-child .hud__value{ font-size: 1.1rem; }

  /* You are steering through this, on the smallest screen there is. */
  .game{ --board-w: min(14rem, 54vw); }
  .hud__board{ font-size: 0.7rem; padding: 2px; }
  .hud__board .hud__label{ font-size: 0.72rem; }

  /*
   * Bottom left, and it can sit right in the corner now.
   *
   * It used to be pushed a whole joystick-height up the screen, because the
   * joystick owned that corner during a run. Steering is drag-anywhere now and
   * the only touch control is the boost button, which is bottom RIGHT — so the
   * left corner is free and the dock stops floating oddly above nothing.
   */
  .dock{
    left: calc(12px + var(--safe-l)); right: auto; top: auto;
    bottom: calc(12px + var(--safe-b));
  }


  /* The minimap sat in the bottom-right corner, which on a phone is where the
     boost button is — they overlapped, and the boost button won. On a phone
     the template moves the corner slot up, directly under the leaderboard, in
     the one right-hand space nothing else claims. */
  .hud{
    grid-template-areas:
      "stats . board"
      "stats . corner"
      ".     . .     ";
  }
  .hud__corner{ align-self: start; }
  .hud{ --minimap-base: 74px; }
}

/* ---------------------------------------------------------------- the secret
 *
 * The Konami reveal. Sits above everything at z-index 7 — one above the other
 * overlays — because it is shown while the menu is up and must land ON it, not
 * behind it.
 *
 * The suspense is carried by the transition rather than by any content: the
 * panel scales up from 80% while the words arrive on their own timers, so
 * there is a beat where something has clearly happened and you do not yet know
 * what. Same 20%-smaller entrance the death modal uses, deliberately, so the
 * game has one language for "a screen has arrived".
 */
.overlay--secret{
  z-index: 7;
  /*
   * Nearly opaque, and the panel below has its own ground.
   *
   * At 0.86 the menu read straight through it: "JOIN THE ARENA" sat inside the
   * word GALAXY and the skin picker showed through the copy. A reveal has to
   * be the only thing on screen, so this is a curtain rather than a tint.
   */
  background: radial-gradient(circle at 50% 45%, rgba(24, 10, 48, 0.97), rgba(3, 4, 8, 0.985) 70%);
  opacity: 0;
  transition: opacity 340ms ease;
  /* This one IS centred on the arena — it is a moment, not a working panel, so
     the dock lane the menu reserves does not apply. */
  padding: 16px;
}
.overlay--secret.is-in{ opacity: 1; }

.secret{
  text-align: center;
  max-width: 460px;
  width: min(460px, 100%);
  padding: 30px 26px 26px;
  border-radius: var(--radius);
  /* Its own ground, so nothing behind can read through the type even where the
     curtain is thinnest. */
  background: linear-gradient(168deg, #180C36, #08060F 78%);
  border: 1px solid #3A2668;
  box-shadow: 0 0 0 1px rgba(155, 77, 255, 0.16), 0 26px 60px rgba(0, 0, 0, 0.7),
              0 0 70px rgba(123, 59, 224, 0.22);
  transform: scale(0.8);
  opacity: 0;
  transition: transform 620ms cubic-bezier(.16, 1, .3, 1), opacity 500ms ease;
}
.overlay--secret.is-in .secret{ transform: scale(1); opacity: 1; }

/* The worm itself, landing with its name: the surprise is SEEING it (Gray, 26
   Sep 2026, after the first name code: "there was no big surprise it just
   unlocked?"). Empty until the name beat, then it springs in. */
.secret__art{
  display: block; width: 136px; height: 136px; margin: 0 auto 14px;
  transform: scale(0.3) rotate(-12deg); opacity: 0;
  filter: drop-shadow(0 0 26px rgba(229, 139, 234, 0.55));
  transition: transform 760ms cubic-bezier(.2, 1.6, .4, 1), opacity 380ms ease;
}
.secret__art.is-in{ transform: scale(1) rotate(0); opacity: 1; }
.secret__eyebrow{
  font-family: var(--font-display); font-weight: 700; font-size: 0.68rem;
  letter-spacing: 0.24em; text-transform: uppercase;
  color: #7FE8FF; margin: 0 0 10px; min-height: 1em;
}
.secret__name{
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(2.2rem, 9vw, 3.6rem); line-height: 1; margin: 0;
  min-height: 1em;
  /* The skin's own palette, as type. Falls back to plain white where
     background-clip: text is unsupported, which is legible either way. */
  color: #F2F5FA;
  background: linear-gradient(96deg, #7FE8FF, #FFFFFF 38%, #C2338F);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.secret__sub{
  margin: 12px 0 0; color: var(--text-dim); font-size: 0.95rem; min-height: 1.4em;
}
.secret__bar{
  margin: 16px auto 0; width: min(280px, 70vw); height: 6px;
  border-radius: 999px; background: var(--ink-3);
  border: 1px solid var(--line); overflow: hidden;
}
.secret__bar i{
  display: block; height: 100%; width: 0%; border-radius: 999px;
  background: linear-gradient(90deg, #22348F, #C2338F, #7FE8FF);
  transition: width 900ms cubic-bezier(.16, 1, .3, 1);
}
.secret__actions{ margin-top: 22px; }

@media (prefers-reduced-motion: reduce) {
  .overlay--secret, .secret, .secret__bar i, .secret__art { transition-duration: 1ms; }
}

/* ------------------------------------------------------- a phone held sideways
 *
 * This is how people actually play, and nothing was built for it. The phone
 * rules keyed off `max-width: 767px`, and a phone in landscape is 844px wide —
 * so it got the DESKTOP layout in 390px of height: a menu panel taller than
 * the screen, and a HUD sized for a laptop.
 *
 * Keyed on HEIGHT, because that is the thing that is scarce. It applies to a
 * short window on a desktop too, which is correct — the layout has the same
 * problem there.
 */
@media (max-height: 500px) {

  /* The HUD is glanceable, not readable — shrink it rather than let it cover
     a third of a 390px-tall arena. */
  /* The board keeps one width, but not more than 27% of a short screen (the old board's width at 640 wide): the centre banners and the event line keep clear of it by that width. */
  .game{ --board-w: min(14rem, 27vw); }
  .hud__board{ font-size: 0.72rem; --board-lh: 1.25; }
  /* Top 5 is plenty (Gray, 19 Sep 2026: all ten covered 60% of a 390px arena); Hud.renderBoard builds five rows when this query matches. */
  /* The minimap sat in the bottom-right corner, which is where the boost button is on a
     phone held sideways as much as upright: the boost button covered it. The corner slot
     goes under the leaderboard, as the upright phone's does (the 767px block below). */
  .hud{ grid-template-areas: "stats . board" "stats . corner" ". . ."; }
  .hud__corner{ align-self: start; }
  .hud{ --minimap-base: 74px; }

  /* Both thumbs are already on the glass; the controls can be smaller and
     tucked further in — but never inside a safe area. In landscape that is
     where the Dynamic Island and the home indicator live, and a mute button
     under either is a mute button you cannot press. */
  :root { --boost-size: 74px; --boost-inset: 14px; }
  .dock{
    bottom: calc(8px + var(--safe-b));
    left: calc(8px + var(--safe-l));
  }
}

/*
 * Nothing anywhere may rely on the page scrolling to reach the game.
 *
 * A phone that rotates mid-run must not leave the arena half off-screen, and
 * the arena is sized from its own box rather than the viewport, so this is the
 * one rule that keeps them agreeing.
 */
@media (max-height: 500px) and (orientation: landscape) {
  .game{ height: 100dvh; max-height: 100dvh; }
}

/* ==========================================================================
   THE SETTINGS PAGE

   A real page, not a panel over the arena. The shape comes from measuring
   eight of these: Krunker runs eight categories deep, Shell Shockers splits
   tabs from a two-column list, agar.io hangs a gear off the front screen —
   and every one worth copying separates NAVIGATION from CONTENT rather than
   stacking six sections in one column. Two levels, never three: that is the
   depth at which players stop knowing where they are, and it is the one
   number every game-UI guide agrees on.

   It reads as a DOCUMENT, not as an overlay. A shade lighter than the arena,
   with a real column, real dividers and one accent — the arena is a place,
   this is a desk.
   ========================================================================== */

/*
 * Out of the reading measure.
 *
 * `main > *` centres every direct child on --max (46rem / 736px), which is
 * right for prose and wrong for a two-column settings page: measured at
 * 1512px, the whole thing rendered 640px wide and left-shifted, with the skin
 * grid squeezed to two columns. The arena breaks out of the same rule the same
 * way — see `main > .game`.
 */
.page--settings main{ padding: 0; }
.page--settings main > *{ width: 100%; max-width: none; margin-inline: 0; }
/*
 * Colour, not a dark dashboard.
 *
 * "more colour, bright colours, thats what kids want, no cooperate looking
 * squared sharp business look" — this was near-black with hairline dividers,
 * which is a settings screen for an IDE. It is a deep blue-violet now with
 * three coloured glows in it, and every surface on top is a rounded card with
 * a lit edge rather than a 1px box.
 */
.page--settings{
  background:
    radial-gradient(760px 500px at 8% 0%, rgba(139, 92, 246, 0.30), transparent 66%),
    radial-gradient(820px 540px at 96% 6%, rgba(44, 143, 214, 0.28), transparent 68%),
    radial-gradient(900px 500px at 50% 100%, rgba(255, 79, 173, 0.10), transparent 70%),
    linear-gradient(180deg, #161B33 0%, #10152A 40%, #0B0F1E 100%);
  background-attachment: fixed;
  min-height: 100dvh;
}
.settings{ min-height: 100dvh; display: flex; flex-direction: column; }

/* -------------------------------------------------------------- the bar */
.settings__bar{
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: 16px;
  padding: calc(13px + var(--safe-t)) calc(clamp(14px, 4vw, 40px) + var(--safe-r))
           13px calc(clamp(14px, 4vw, 40px) + var(--safe-l));
  border-bottom: 2px solid rgba(255, 255, 255, 0.09);
  background: rgba(16, 21, 42, 0.9);
}
@supports (backdrop-filter: blur(1px)) {
  .settings__bar{ background: rgba(16, 21, 42, 0.7); backdrop-filter: blur(18px) saturate(150%); }
}
.settings__back{ justify-self: start; display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-size: 1.02rem; padding: 7px 18px 10px; border-radius: 999px; --rim: 4px; }
@media (hover: hover){ .settings__back:hover{ filter: brightness(1.07); } }
.settings__title{
  margin: 0; font-family: var(--font-display); font-weight: 600;
  font-size: 1.2rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--paper);
}
/*
 * The receipt.
 *
 * Writing to localStorage is instant and invisible, which reads as the control
 * not working. Deliberately not a toast: something that flies in over the page
 * on every slider tick would be worse than silence.
 */
.settings__saved{
  justify-self: end; margin: 0; font-size: 0.78rem; color: var(--accent);
  font-family: var(--font-display); font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  opacity: 0; transform: translateY(-2px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.settings__saved.is-on{ opacity: 1; transform: translateY(0); }

/* ------------------------------------------------------------ the split */
.settings__body{
  flex: 1 1 auto; width: 100%; max-width: 1120px; margin-inline: auto;
  display: grid; grid-template-columns: 208px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px); padding: clamp(24px, 4vw, 44px) clamp(16px, 4vw, 40px) 80px;
}
/* Under the bar by the bar's MEASURED height (settings.ts sets --settings-bar-h),
   never a guessed number: a guess drifts from the bar and slides the rail under it. */
.settings__nav{ position: sticky; top: calc(var(--settings-bar-h, 70px) + 16px); align-self: start; }
.settings__nav ul{ list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
:where(.settings__nav) :where(a){
  display: block; padding: 11px 18px; border-radius: var(--radius-pill);
  color: var(--paper-dim); text-decoration: none;
  font-family: var(--font-display); font-weight: 600; font-size: 1rem;
  border-left: 0;
  /* Short. A 140ms cross-fade between two items reads, in a screenshot and to
     the eye, as two items being highlighted at once. */
  transition: color 0.08s ease, background 0.08s ease;
}
:where(.settings__nav) :where(a:hover){ color: var(--paper); background: rgba(255, 255, 255, 0.09); }
/* Set by the scroll spy in settings.ts, not by :target — :target only moves
   when a link is clicked, so scrolling past three sections left it lying. */
:where(.settings__nav) :where(a.is-current){ color: var(--accent-ink); background: var(--accent); }

.settings__pane{ min-width: 0; display: grid; gap: 44px; }

/* --------------------------------------------------------- a section */
/*
 * Each section is a CARD, not a run of hairlines.
 *
 * A soft raised surface with a lit top edge — the same object language as the
 * buttons. Hairline dividers on a flat ground is the look Gray called
 * corporate, and it is also harder to scan: nothing tells you where one
 * subject stops.
 */
.set-section{
  /* Clear of everything that sticks at the top, as measured (settings.ts). */
  scroll-margin-top: calc(var(--settings-sticky-h, 80px) + 16px);
  border-radius: var(--radius); padding: 24px clamp(18px, 3vw, 30px) 26px;
  background: rgba(255, 255, 255, 0.055);
  border: 2px solid rgba(255, 255, 255, 0.09);
}
@supports (backdrop-filter: blur(1px)) {
  .set-section{ backdrop-filter: blur(10px) saturate(120%); }
}
.set-section__head{ margin-bottom: 20px; }
.set-section__title{
  margin: 0 0 4px; font-family: var(--font-display); font-weight: 600;
  font-size: 1.7rem; letter-spacing: 0; color: var(--paper);
}
.set-section__blurb{ margin: 0; color: var(--paper-dim); font-size: 0.97rem; }

/* ------------------------------------------------------------- a row */
/*
 * Label and description on the left, the control on the right. This is the
 * anatomy every settings screen that is pleasant to use shares, and the
 * description is not optional: a switch called "Ornaments" with nothing under
 * it is a guess.
 */
.set-row{
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px 24px; align-items: center;
  padding: 18px 0; border-top: 2px solid rgba(255, 255, 255, 0.07);
}
.set-row:first-of-type{ border-top: 0; padding-top: 4px; }
.set-row--stack{ grid-template-columns: minmax(0, 1fr); align-items: stretch; }
.set-row--slider{ grid-template-columns: 150px minmax(0, 1fr); padding-top: 0; border-top: 0; }
.set-row__text{ min-width: 0; }
.set-row__label{
  margin: 0 0 3px; font-family: var(--font-display); font-weight: 600;
  font-size: 1.1rem; color: var(--paper);
}
.set-row__label label{ cursor: pointer; }
.set-row__sub{ color: var(--text-dim); font-size: 0.88rem; }
.set-row__desc{ margin: 0; color: var(--paper-dim); font-size: 0.9rem; line-height: 1.5; }
:where(.set-row__desc) :where(a){ color: var(--accent-2); }
.set-row__control{ justify-self: end; }

.set-input{
  width: min(320px, 100%); padding: 14px 18px; font: inherit; font-size: 1.05rem;
  font-weight: 600; color: #16233A; background: var(--paper);
  border: 0; border-radius: var(--radius-sm);
}
.set-input::placeholder{ color: #8496AE; font-weight: 500; }
.set-input:focus{ outline: 3px solid var(--accent); outline-offset: 2px; }
.set-slider{ width: 100%; accent-color: var(--accent); }
.set-note{ margin: 10px 0 0; font-size: 0.85rem; color: var(--paper-dim); line-height: 1.5; }
.set-note.is-problem{ color: var(--warn); }
.set-transport{ display: flex; gap: 8px; margin-top: 10px; }
.set-btn{ padding: 8px 22px 11px; border-radius: 16px; cursor: pointer; font-size: 1.05rem; }
@media (hover: hover){ .set-btn:hover{ filter: brightness(1.07); } }
.set-btn:disabled{ opacity: 0.4; cursor: default; }

/* One row is not like the others, and has to look it. */
.set-row--danger{ border-top: 1px solid rgba(255, 59, 92, 0.28); }
.set-row--danger .set-row__label{ color: var(--hot); }
.set-danger{ padding: 9px 24px 12px; border-radius: 16px; cursor: pointer; font-size: 1.1rem; }
@media (hover: hover){ .set-danger:hover{ filter: brightness(1.07); } }
.set-danger:disabled{ opacity: 0.4; cursor: not-allowed; filter: none; transform: none; }
.set-danger.is-armed{ animation: armed 0.9s ease-in-out infinite; }
@keyframes armed { 50% { filter: brightness(1.3); } }
@media (prefers-reduced-motion: reduce) { .set-danger.is-armed { animation: none; } }

/*
 * Erase's second screen: a warning, then a typed word — see
 * `panel--danger` below and ui/accountPane.ts. Gray, 16 Sep 2026: press-Erase-
 * twice was "too short... kids like to do tricks like that".
 */
.panel--danger, .panel--confirm{ width: min(440px, 100%); text-align: center; }
.panel--danger .panel__actions, .panel--confirm .panel__actions{ grid-auto-flow: column; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.panel--danger .panel__actions .button, .panel--confirm .panel__actions .button{ padding-inline: 10px; overflow-wrap: anywhere; }
/*
 * The purchase confirmation (ui/buyConfirm.ts). The same centred two-button
 * panel as --danger, with the thing being bought as its picture and the price
 * as the page's big number. It sits over whichever shop opened it — Settings
 * and the Burrow are both full-screen overlays — so it stacks above them.
 */
.overlay--confirm{ z-index: 9; background: radial-gradient(circle at 50% 42%, rgba(10, 14, 26, 0.72), rgba(4, 6, 12, 0.92)); }
.panel--buy{ width: min(380px, 100%); text-align: center; animation: buy-in 180ms ease-out both; }
.panel--buy .panel__actions{ grid-auto-flow: column; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
.buy__art{
  display: block; width: 132px; height: 132px; margin: 0 auto 10px; object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.5));
}
.buy__art[hidden]{ display: none; }
.buy__name{ margin: 2px 0 6px; font-size: 1.5rem; }
.buy__price{ display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0; }
.buy__price .panel__display{ margin: 0; font-size: clamp(2.2rem, 10vw, 2.8rem); color: #ffd166; }
.buy__nugget{ width: 34px; height: 34px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5)); }
.buy__balance{ font-size: 0.86rem; }
.buy__balance.is-short{ color: #ff9aa9; font-weight: 700; }
@keyframes buy-in{ from{ transform: scale(0.92); opacity: 0; } to{ transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce){ .panel--buy{ animation: none; } }
.panel__input{
  display: block; width: 100%; margin-top: 14px; padding: 11px 14px; font: inherit;
  font-size: 1.15rem; font-weight: 700; letter-spacing: 0.08em; text-align: center;
  color: #22314d; background: #fff; border: 0; border-radius: 12px;
}
.panel__input::placeholder{ color: #22314d; opacity: 0.3; }
/* The bug report's box (ui/bugReport.ts): several lines of plain writing, not a code. */
.panel__input--area{ font-size: 1rem; font-weight: 500; letter-spacing: 0; text-align: left; resize: none; min-height: 5.5rem; max-height: 34vh; line-height: 1.35; }
@media (max-height: 460px){ .panel__input--area{ min-height: 3.2rem; } }
/*
 * The settings PAGE (unlike the game shell) has no positioned ancestor, and
 * can scroll taller than one viewport — an absolutely-positioned overlay
 * would centre itself on the whole scrolled page, not on what is on screen.
 * Fixed pins it to the viewport actually showing, wherever the page is
 * scrolled to.
 */
[data-set-wipe-warn], [data-set-wipe-type]{ position: fixed; }

/* ------------------------------------------------------ sign-in buttons */
/*
 * Each provider's own button is the house button in a brand role (.button
 * --flat with --google, --apple or --discord, in the Candy section): the brand
 * sets the fill and the logo, the house button the size, shape, press and
 * focus. Only the row they sit in is laid out here.
 */
.signin{
  display: grid; gap: 10px; margin-top: 14px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

/* ------------------------------------------------------ choice cards */
/*
 * One of N. Used by quality, arena floors, radio stations and regions — four
 * controls that are the same question, so they are one component rather than
 * four near-identical sets of classes.
 */
.choices{
  display: grid; gap: 10px; margin-top: 14px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.choice{
  display: grid; gap: 4px; text-align: left; cursor: pointer;
  padding: 15px 18px 17px; border-radius: var(--radius-sm);
  border: 2px solid rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.06);
  color: var(--paper); font: inherit;
  transition: border-color 0.14s ease, background 0.14s ease, transform 0.12s ease;
}
@media (hover: hover){ .choice:hover:not(:disabled){ border-color: #38425c; background: rgba(255, 255, 255, 0.05); } }
.choice:focus-visible{ outline: 2px solid var(--accent); outline-offset: 2px; }
.choice__name{ font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.choice__desc{ color: var(--paper-dim); font-size: 0.82rem; line-height: 1.4; }
.choice.is-selected, .choices .station.is-selected {
  border-color: var(--accent); background: rgba(255, 79, 173, 0.16);
}
.choice.is-selected .choice__name{ color: var(--accent); }
.choice:disabled, .choice.is-locked { opacity: 0.45; cursor: not-allowed; }

/* The pickers reuse the arena's `.station` markup, so it maps onto this. */
.choices .station{
  display: grid; gap: 4px; text-align: left; cursor: pointer;
  padding: 15px 18px 17px; border-radius: var(--radius-sm);
  border: 2px solid rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.06);
  color: var(--paper); font: inherit;
}
.choices .station.is-selected{ border-color: var(--accent); background: rgba(255, 79, 173, 0.07); }
.choices .station.is-selected .station__name{ color: var(--accent); }
.choices .station__name{ font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.choices .station__desc{ color: var(--paper-dim); font-size: 0.82rem; line-height: 1.4; }

/* ------------------------------------------------------- the preview */
/*
 * The point of the skins section.
 *
 * Every cosmetic picker worth copying shows the thing at a size you can see it
 * — Shell Shockers spins a 3D character beside its loadout. A 96px tile is a
 * swatch; this is the worm, and it swims.
 */
.preview{
  margin: 20px 0 8px; border-radius: var(--radius); overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background:
    radial-gradient(700px 260px at 50% 120%, rgba(255, 79, 173, 0.09), transparent 70%),
    linear-gradient(180deg, #0D111C, #080B13);
}
.preview__canvas{ display: block; width: 100%; height: auto; aspect-ratio: 64 / 26; }
.preview__meta{
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; padding: 12px 18px 14px; border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}
.preview__name{
  margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 1.3rem;
  color: var(--paper);
}
.preview__unlock{ margin: 0; color: var(--paper-dim); font-size: 0.87rem; }

/* ------------------------------------------------------ the skin grid */
.skinset{ display: grid; gap: 30px; margin-top: 10px; }
.skinset__heading{
  margin: 0 0 2px; display: inline-block;
  font-family: var(--font-display); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase; color: var(--accent);
  background: rgba(255, 79, 173, 0.12); padding: 6px 13px; border-radius: var(--radius-pill);
}
.skinset__how{ margin: 8px 0 12px; font-size: 0.86rem; color: var(--paper-dim); }
.skinset__grid{
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
}
.skintile{
  display: grid; gap: 2px; padding: 9px 9px 11px; cursor: pointer;
  border-radius: var(--radius-sm); border: 2px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06); color: var(--paper); font: inherit;
  transition: border-color 0.14s ease, background 0.14s ease, transform 0.12s ease;
}
@media (hover: hover){
  .skintile:hover:not(:disabled){
    border-color: #38425c; background: rgba(255, 255, 255, 0.055); transform: translateY(-2px);
  }
}
.skintile:focus-visible{ outline: 2px solid var(--accent); outline-offset: 2px; }
.skintile__art{ display: block; width: 100%; height: auto; aspect-ratio: 176 / 100; }
.skintile__name{
  font-family: var(--font-display); font-size: 0.86rem; font-weight: 500;
  color: var(--paper-dim); text-align: center;
}
.skintile.is-selected{
  border-color: var(--accent); background: rgba(255, 79, 173, 0.16);
}
.skintile.is-selected .skintile__name{ color: var(--accent); }
.skintile.is-locked{ opacity: 0.42; cursor: not-allowed; }
.skintile:disabled{ cursor: not-allowed; }

/* ---------------------------------------------------------- controls */
.keys{ margin: 0; display: grid; gap: 0; }
.keys__row{
  display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr);
  gap: 10px 24px; align-items: baseline;
  padding: 14px 0; border-top: 2px solid rgba(255, 255, 255, 0.07);
}
.keys__row:first-child{ border-top: 0; padding-top: 2px; }
.keys dt{ margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.keys dd{ margin: 0; color: var(--paper-dim); font-size: 0.94rem; line-height: 1.5; }
.keys__or{ color: var(--paper-dim); font-size: 0.82rem; }
/* Flat, like everything else. A key cap does not need a fake bevel to read as
   a key when it is white on a dark page. */
.keys kbd, .menu__keys kbd {
  font-family: var(--font-display); font-weight: 600; font-size: 0.7rem;
  letter-spacing: 0.08em; text-transform: uppercase; color: #16233A;
  background: var(--paper); border: 0;
  border-radius: 8px; padding: 7px 11px; white-space: nowrap;
}

/* -------------------------------------------------------- the stats */
.stats{ margin: 0 0 8px; display: grid; gap: 0; }
.stats__row{
  display: flex; align-items: baseline; justify-content: space-between; gap: 20px;
  padding: 13px 0; border-top: 2px solid rgba(255, 255, 255, 0.07);
}
.stats__row:first-child{ border-top: 0; padding-top: 2px; }
.stats dt{ color: var(--paper-dim); font-size: 0.95rem; }
.stats dd{
  margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 1.35rem;
  color: var(--accent); font-variant-numeric: tabular-nums;
}

.settings__foot{
  margin: 0; padding-top: 26px; border-top: 2px solid rgba(255, 255, 255, 0.08);
  font-size: 0.86rem; color: var(--paper-dim); line-height: 1.6;
}
:where(.settings__foot) :where(a){ color: var(--paper-dim); }
:where(.settings__foot) :where(a:hover){ color: var(--accent); }

/* ------------------------------------------------------- on a phone */
@media (max-width: 820px) {
  /*
   * The settings page on a phone.
   *
   * Gray: "ss2 is mobile, its not nice". It was the desktop layout with the
   * sidebar stacked on top — a rail of tabs above six sections, then a wall of
   * left-aligned rows with their controls pushed to a column that no longer
   * existed. What it needed was not squeezing: the CARD is the unit, and on a
   * phone each row becomes its own little card too, so a control is always
   * next to the words that name it.
   */
  .settings__body{ grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 14px 12px 70px; }
  .settings__nav{
    position: sticky; top: var(--settings-bar-h, 56px); z-index: 15; margin: 0 -12px;
    background: rgba(16, 21, 42, 0.94); padding: 8px 12px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.09);
  }
  @supports (backdrop-filter: blur(1px)) {
    .settings__nav{ background: rgba(16, 21, 42, 0.78); backdrop-filter: blur(16px); }
  }
  /*
   * Every tab on screen, always: the rail WRAPS on a phone.
   *
   * It was a sideways scroller. First with a fade that cut the last tab in half
   * ("button is cut off man"), then padded and snapped with its scrollbar
   * hidden, which left nothing at all to say more sections were past the edge,
   * and clipped the current pill to the rail's own edges (Gray, 14 Sep 2026:
   * "you cannt tell theres more shit to the menu on small screens mate, always
   * got this issue"). Six or seven short tabs fit in two rows; a row of tabs
   * you can see beats a row you have to discover. tools/check-layout holds it.
   */
  .settings__nav ul{
    display: flex; flex-wrap: wrap; justify-content: center; gap: 6px;
  }
  :where(.settings__nav) :where(a){ padding: 8px 14px; white-space: nowrap; font-size: 0.9rem; }

  .settings__pane{ gap: 16px; }
  .set-section{ padding: 18px 15px 20px; border-radius: 20px; }
  .set-section__title{ font-size: 1.4rem; }
  .set-section__blurb{ font-size: 0.92rem; }

  /*
   * Each row is its own card: label, description, then the control underneath
   * at full width. Stacked WITHOUT a surface, a switch ended up floating
   * under a paragraph with nothing tying the two together.
   */
  .set-row{
    grid-template-columns: minmax(0, 1fr); gap: 12px;
    padding: 14px; border-top: 0; margin-top: 10px;
    border-radius: var(--radius-sm); background: rgba(255, 255, 255, 0.05);
  }
  .set-row:first-of-type{ padding-top: 14px; margin-top: 0; }
  .set-row--stack{ background: none; padding: 0; margin-top: 18px; }
  .set-row__control{ justify-self: stretch; }
  .set-row__control .switch{ justify-self: start; }
  .set-input{ width: 100%; }
  .set-row--slider{
    grid-template-columns: minmax(0, 1fr); gap: 8px; background: none; padding: 4px 0 0;
    margin-top: 0;
  }
  .set-row--danger{ background: rgba(255, 59, 92, 0.09); border-top: 0; }
  .set-danger{ width: 100%; }

  /* Two columns of choices at most, or the text inside them wraps to five
     lines and the cards become paragraphs. */
  .choices{ grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
  .choice, .choices .station { padding: 13px 14px 15px; }
  .choice__desc, .choices .station__desc { font-size: 0.78rem; }

  .skinset__grid{ grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
  .skintile__name{ font-size: 0.78rem; }
  .preview{ margin: 16px 0 6px; }
  .preview__meta{ padding: 11px 14px 12px; }

  /* The key list is two columns of narrow text at this width. One column,
     with the caps above what they do. */
  .keys__row{ grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 12px 0; }

  /* The notch inset stays on a phone, where the notch is. */
  .settings__bar{ grid-template-columns: auto 1fr auto; padding: calc(9px + var(--safe-t)) 12px 9px; }
  .settings__title{ font-size: 0.86rem; letter-spacing: 0.12em; }
  .settings__back{ padding: 8px 13px 9px; font-size: 0.86rem; }
  .settings__saved{ font-size: 0.7rem; }
}

/* ---------------------------------------------------------- the all-time board
 *
 * Real players only, best run first. A table would be the obvious shape and is
 * the wrong one: a rank, a name and a number are three fields, and an <ol> of
 * rows keeps the ordinal in the markup rather than in a column of typed digits.
 */
.board{
  margin: 28px 0 34px; border-radius: var(--radius);
  border: 2px solid var(--line); background: var(--ink-2);
  overflow: hidden;
}
.board__head{
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px 20px; flex-wrap: wrap;
  padding: 18px 22px; border-bottom: 2px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 79, 173, 0.1), transparent);
}
.board__title{
  margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 1.3rem;
}
.board__status{ margin: 0; font-size: 0.86rem; color: var(--text-dim); }
.board__status.is-problem{ color: var(--warn); }
.board__rows{ margin: 0; padding: 0; list-style: none; }
.board__row{
  display: grid; align-items: baseline; gap: 4px 16px;
  grid-template-columns: 3.4rem minmax(0, 1fr) auto 6.5rem;
  padding: 11px 22px; border-top: 1px solid rgba(38, 46, 66, 0.6);
}
.board__row:first-child{ border-top: 0; }
.board__row:nth-child(even){ background: rgba(255, 255, 255, 0.018); }
.board__rank{
  font-family: var(--font-display); font-weight: 600; font-size: 0.9rem;
  color: var(--text-dim); font-variant-numeric: tabular-nums;
}
/* The top three get the colour. Everyone else gets the number — a board where
   every row is decorated has no top three. */
.board__row--1 .board__rank{ color: var(--tang); }
.board__row--2 .board__rank{ color: #C9D4E4; }
.board__row--3 .board__rank{ color: #CE8946; }
.board__row--1 .board__name, .board__row--1 .board__len { color: var(--accent); }
.board__name{
  min-width: 0; overflow-wrap: anywhere;
  font-family: var(--font-display); font-weight: 500; font-size: 1.02rem;
}
.board__len{
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
  font-variant-numeric: tabular-nums; text-align: right;
}
.board__when{
  font-size: 0.78rem; color: var(--text-dim); text-align: right;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 560px) {
  /* The date is the first thing to go: it is context, not the score. */
  .board__row{ grid-template-columns: 2.8rem minmax(0, 1fr) auto; padding: 10px 14px; }
  .board__when{ display: none; }
  .board__head{ padding: 14px 16px; }
}


/* ================================================================ Game buttons
 * The house button, on every page. One look, built in CSS from the role's three body colours (--bodyA light, --bodyB
 * mid, --bodyC deep) and its darkest ink (--ts), the way a shop button in a casual game is made:
 *
 *   - a solid dark BORDER (the role's own darkest ink, or --edge where a theme sets one);
 *   - a body that is lighter at the top, with ONE shine band across the top half (a hard edge, no blob);
 *   - a crisp darker LIP under it (an inset band and a hard drop, no blur) that squashes when it is pressed;
 *   - lettering in Lilita One: white, outlined in --ts by a text-stroke painted under the fill, plus one hard drop in
 *     the same ink. No soft shadows and no glows anywhere (Gray, 8 Nov 2026: "your shadows fuck it up, text and font
 *     dont match the boxes", then "dont make classic childish, make it neutral": modest outline, calm colours).
 *
 * Sizes come from --h, the control's height (44px when a control does not say), so the border, the lip and the words
 * all scale with the box they sit on. Nothing here is overflow:hidden: Chrome drops the radius on a clipped element
 * while it animates and the corners flick square. Each button's own rule keeps only its size and layout.
 */
:is(.button, .menu__play, .siteheader__cta, .iconbtn, .set-btn, .set-danger, .share__btn,
    .dock__icon, .dock__btn, .boostbutton, .beta__close, .settings__back){
  --bodyA: #7fb0ff; --bodyB: #3f77e6; --bodyC: #2d58bd; --ts: #14275e; --ink: #ffffff;
  --lip: max(3px, calc(var(--h, 44px) * 0.085)); --bw: max(2px, calc(var(--h, 44px) * 0.06)); --drop: calc(var(--lip) * 0.7);
  /* No `position` here: the Boost button is `absolute` and a rule down here once put it back in the flow. */
  border: var(--bw) solid var(--edge, var(--ts));
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1)) 0 0 / 100% 46% no-repeat,
    linear-gradient(180deg, var(--bodyA) 0%, var(--bodyB) 55%, var(--bodyC) 100%);
  box-shadow:
    inset 0 calc(var(--lip) * -1) 0 rgba(0, 0, 0, 0.2), inset 0 2px 0 rgba(255, 255, 255, 0.35),
    0 var(--drop) 0 var(--edge, var(--ts));
  color: var(--ink); font-family: var(--font-label); font-weight: 400;
  -webkit-text-stroke: 0.15em var(--ts); paint-order: stroke fill; stroke-linejoin: round;
  text-shadow: 0 0.07em 0 var(--ts); letter-spacing: 0.02em;
  -webkit-tap-highlight-color: transparent;
}
:is(.button, .menu__play, .siteheader__cta, .iconbtn, .set-btn, .set-danger, .share__btn,
    .dock__icon, .dock__btn, .boostbutton, .beta__close, .settings__back):focus-visible{ outline: 3px solid #fff; outline-offset: 3px; }
:is(.iconbtn, .dock__icon, .share__btn, .dock__btn, .button--step) svg{ filter: drop-shadow(0 1.5px 0 var(--ts)); }

/* ================================================================ Press feedback
 * One mechanism for "this answered you", for every control in the game. Gray,
 * 18 Oct 2026, of the top-right row: "theres no feedback on these buttons and
 * no indication when sound is off, best do a sweep of buttons".
 *
 *   - Candy buttons (the list above): the house squash on press, a dim and a
 *     stop sign when disabled, a spinner when busy.
 *   - Everything else that can be pressed (rows, tiles, cards, switches): the
 *     same idea drawn gently, through zero-specificity rules so any component
 *     that wants its own press look still wins by simply writing one.
 *   - Hover only where there is a pointer to hover with. A phone has none, and
 *     a hover rule there sticks to the last thing touched.
 *   - A ring on keyboard focus is the global :focus-visible at the top of the
 *     sheet; the Candy list's own white ring is above.
 *   - A control that is ON or OFF says so: aria-pressed is true when the thing
 *     is ON, every time, and the picture follows it (.icon__slash, .navmenu__switch).
 *
 * The click sound is not here: main.ts plays it for every button and summary
 * in the shell, and it is silent when sound is off.
 */
:where(button, summary, [role="button"]){ touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
:where(button, summary, [role="button"]):active:where(:not(:disabled, [aria-disabled="true"], [aria-busy="true"])){ scale: 0.97; filter: brightness(0.94); }
@media (hover: hover) {
  :where(button, summary, [role="button"]):hover:where(:not(:disabled, [aria-disabled="true"], [aria-busy="true"])){ filter: brightness(1.07); }
}
:where(button, summary, [role="button"]):where(:disabled, [aria-disabled="true"]){ cursor: not-allowed; }
:where(button, summary, [role="button"])[aria-busy="true"]{ cursor: progress; pointer-events: none; }

:is(.button, .menu__play, .siteheader__cta, .iconbtn, .set-btn, .set-danger, .share__btn,
    .dock__icon, .dock__btn, .boostbutton, .beta__close, .settings__back){
  transition: transform 0.07s ease-out, filter 0.12s ease;
}
@media (prefers-reduced-motion: reduce){
  :is(.button, .menu__play, .siteheader__cta, .iconbtn, .set-btn, .set-danger, .share__btn,
    .dock__icon, .dock__btn, .boostbutton, .beta__close, .settings__back){ transition: none; }
}
:is(.button, .menu__play, .siteheader__cta, .iconbtn, .set-btn, .set-danger, .share__btn,
    .dock__icon, .dock__btn, .boostbutton, .beta__close, .settings__back):active:where(:not(:disabled, [aria-disabled="true"], [aria-busy="true"])){
  animation: none; transform: translateY(calc(var(--drop) * 0.9)); scale: 1; filter: brightness(0.97); --drop: calc(var(--lip) * 0.1);
  box-shadow: inset 0 calc(var(--lip) * -0.45) 0 rgba(0, 0, 0, 0.2), inset 0 2px 0 rgba(255, 255, 255, 0.25), 0 var(--drop) 0 var(--edge, var(--ts));
}
:is(.button, .iconbtn, .set-btn, .set-danger, .share__btn, .dock__icon, .dock__btn, .boostbutton, .beta__close, .settings__back, .menu__play, .siteheader__cta):disabled{
  opacity: 0.45; cursor: not-allowed; filter: grayscale(0.35); animation: none;
}
:is(.button, .menu__play, .siteheader__cta, .iconbtn, .set-btn, .set-danger, .share__btn,
    .dock__icon, .dock__btn, .boostbutton, .beta__close, .settings__back)[aria-busy="true"]{
  opacity: 0.8; filter: saturate(0.7); animation: none;
}
/* A ring turning inside a button that is waiting on the network (aria-busy="true"). */
:is(.button:not(.button--tile, .button--tab), .set-btn, .set-danger)[aria-busy="true"]::after{
  content: ""; flex: none; width: 0.85em; height: 0.85em; margin-left: 8px; box-sizing: border-box;
  border: 0.16em solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: control-spin 0.7s linear infinite;
}
@keyframes control-spin{ to{ transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  :is(.button, .set-btn, .set-danger)[aria-busy="true"]::after{ animation: none; border-right-color: currentColor; opacity: 0.5; }
}

/* Rows in a drop-down (More, Language): a wash under the finger, not a squash of the whole row. */
@media (hover: hover) {
  .navmenu__sound:hover:not(:disabled){ background: rgba(255, 255, 255, 0.07); }
}
.navmenu__sound:active:not(:disabled){ scale: 1; filter: none; background: rgba(255, 79, 173, 0.22); }
.navmenu__sound:focus-visible{ outline-offset: -3px; border-radius: 8px; }

/*
 * A row that is a switch: the name stays put and a small switch on its right
 * says on or off (ui/sound.ts, main.ts). Off is dim, on is lit.
 */
.navmenu__switch{ display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.navmenu__switch::after{
  content: ""; flex: none; width: 40px; height: 22px; box-sizing: border-box; border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  background: radial-gradient(circle at 11px 50%, rgba(255, 255, 255, 0.7) 6px, transparent 7px), rgba(255, 255, 255, 0.06);
}
.navmenu__switch[aria-pressed="true"]{ color: var(--accent); }
.navmenu__switch[aria-pressed="true"]::after{
  border-color: var(--accent);
  background: radial-gradient(circle at 27px 50%, #fff 6px, transparent 7px), var(--accent);
}
.navmenu__switch[aria-pressed="false"]{ color: rgba(255, 255, 255, 0.7); }

/*
 * The crossed-out note and speaker. The slash is drawn inside the icon
 * (icons.ts) and shown while the control is OFF; its halo is the body colour,
 * so it cuts a clean gap through the picture rather than lying over it.
 */
.icon__slash{ opacity: 0; transition: opacity 0.12s ease; }
.icon__slash-halo{ stroke: var(--bodyC, #1c1650); stroke-width: 5; }
[aria-pressed="false"] .icon .icon__slash, .icon__slash.is-off{ opacity: 1; }

/* Roles. Violet is the default above: secondary actions and icon buttons. */
:is(.button--primary, .menu__play, .siteheader__cta, .boostbutton){
  --bodyA: #ff8db5; --bodyB: #f0457f; --bodyC: #c42a63; --ts: #5e0f2f;
}
:is(.button--quiet, .share__btn, .beta__close){
  --bodyA: #fffdf7; --bodyB: #efe8d8; --bodyC: #d6ccb4; --ink: #2a2f45; --ts: #7d7157;
  -webkit-text-stroke: 0; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}
:is(.button--quiet, .share__btn, .beta__close) svg{ filter: none; }
.set-danger{ --bodyA: #ff8e9c; --bodyB: #e8405a; --bodyC: #b82442; --ts: #5e0c1c; }
/* Glass: the see-through violet of the menu's chips, as a button. For a
   choice that should be found without competing with Play. */
.button--glass{
  --edge: rgba(190, 200, 255, 0.55);
  --bodyA: rgba(43, 48, 110, 0.82); --bodyB: rgba(28, 32, 76, 0.78); --bodyC: rgba(20, 24, 60, 0.74); --ts: #14183a;
}
/*
 * Buy: Worms Zone's chunky green price button, for a price or a "yes, this
 * one" (the Burrow's showcase and card price pills). Blue: their video and
 * upgrade button, the colour --step already wears.
 */
/*
 * Tile: the front screen's side tiles (gameShell.ts menu__side). Worms Zone's
 * left column, in our Candy body, and then some. Gray, 27 Sep 2026: "the box
 * designs are shit, flat boring, no shiny shit anywhere, also they are
 * small". So: big, a colour each (data-tone), the picture bursting out of
 * the top of the tile, a light sweep across the glass every few seconds, and
 * the thing waiting for you moves — the gift wiggles, the wheel turns.
 */
/*
 * Sized from the screen's HEIGHT (--tile), so three always fit between the top
 * and bottom rails. At a fixed 138px they did not on an iPad in landscape
 * (1024x690 usable): "With friends" sat on the Share and Settings buttons
 * (Gray, 27 Sep 2026: "ipad things on screen cutoff in landscape").
 */
.button--tile{
  /* Four tiles stack in the right-hand column since Themes joined it (30 Sep 2026): the
     height term keeps four of them between the top and bottom rails on a laptop. */
  --tile: clamp(60px, min(15.5vh, calc((100vh - 330px) / 4.8)), 138px);
  --h: calc(var(--tile) * 0.56);
  position: relative; flex-direction: column; justify-content: flex-end; gap: 2px;
  width: var(--tile); min-height: calc(var(--tile) * 0.86); padding: 0 6px calc(var(--tile) * 0.085); margin-top: calc(var(--tile) * 0.33);
  border-radius: calc(var(--tile) * 0.19); font-size: max(0.8rem, calc(var(--tile) * 0.11)); line-height: 1.25; letter-spacing: -0.02em; text-align: center;
}
.button--tile[data-tone="pink"]{ --bodyA: #ff93b8; --bodyB: #ee4a85; --bodyC: #bf2d64; --ts: #5e1031; }
.button--tile[data-tone="orange"]{ --bodyA: #ffc46a; --bodyB: #f08a1c; --bodyC: #c4650a; --ts: #5c2c02; }
.button--tile[data-tone="blue"]{ --bodyA: #7cc0f5; --bodyB: #3a8ad4; --bodyC: #2a62a8; --ts: #0f3260; }
.button--tile[data-tone="green"]{ --bodyA: #b5e86b; --bodyB: #5eb92c; --bodyC: #3f8f1b; --ts: #19460a; }
.button--tile[data-tone="violet"]{ --bodyA: #b9a5f5; --bodyB: #7d5bdb; --bodyC: #5a3bb0; --ts: #271566; }
.button--tile[data-tone="red"]{ --bodyA: #ff8a7a; --bodyB: #e2363a; --bodyC: #b01e28; --ts: #5a0a10; }
.button--tile[data-tone="teal"]{ --bodyA: #7fe0d4; --bodyB: #25b3a3; --bodyC: #168079; --ts: #0a4240; }
.button--tile img{
  width: calc(var(--tile) * 0.75); height: calc(var(--tile) * 0.75); margin: calc(var(--tile) * -0.43) auto 2px; object-fit: contain;
  filter: drop-shadow(0 4px 0 rgba(20, 8, 60, 0.3));
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@media (hover: hover){ .button--tile:hover img{ transform: scale(1.08) translateY(-4px); } }
.button--tile .button__label{ display: block; }
/* Waiting for you: the gift wiggles, and the wheel turns slowly on its own. */
.button--tile[data-ready] img{ animation: tile-wiggle 2.6s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes tile-wiggle{ 0%, 70%, 100%{ rotate: 0deg; scale: 1; } 74%{ rotate: -9deg; scale: 1.08; } 80%{ rotate: 8deg; } 86%{ rotate: -5deg; } 92%{ rotate: 3deg; } }
.tile--wheel img{ animation: tile-turn 9s linear infinite; }
@keyframes tile-turn{ to{ rotate: 360deg; } }
/* The countdown or "Ready!" pill hanging off the bottom edge. */
.button--tile .tile__badge{
  position: absolute; bottom: -14px; left: 50%; translate: -50% 0; white-space: nowrap;
  padding: 4px 12px 6px; border-radius: 999px; border: 3px solid #1d1a52; line-height: 1.25;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.06)) 0 0 / 100% 46% no-repeat, linear-gradient(180deg, #5b63d6, #3a3fa6); font-size: 0.92rem; min-width: 70%;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.2), 0 2px 0 #1d1a52;
}
.button--tile[data-ready] .tile__badge{ background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.06)) 0 0 / 100% 46% no-repeat, linear-gradient(180deg, #aee66b, #44921c); border-color: #1b4709; text-shadow: 0 0.07em 0 #1b4709; animation: tile-pulse 1.2s ease-in-out infinite; }
@keyframes tile-pulse{ 50%{ scale: 1.1; } }
.button--tile .tile__badge:empty{ display: none; }
/* A tile carrying a pill makes room for it, so the pill never sits on the label. */
.button--tile:has(.tile__badge:not(:empty)){ padding-bottom: 26px; }
.button--tile .iconbtn__dot{ top: -6px; right: -6px; width: 20px; height: 20px; }
@media (prefers-reduced-motion: reduce){ .button--tile, .button--tile img, .button--tile .tile__badge{ animation: none !important; transition: none !important; } }
/* Buy: the deeper green of the free-video button (below), so the white price reads on a phone in daylight (Gray, 21 Nov
   2026: "all the green boxes in all parts of the burrow with white text is very difficult to see"). Each theme below
   keeps its own colour, each deepened the same way. */
.button--buy{ --bodyA: #35b856; --bodyB: #12843a; --bodyC: #0a5a29; --ts: #053a19; }
.button--blue{ --bodyA: #84c4f5; --bodyB: #3a8ad4; --bodyC: #2a62a8; --ts: #0f3260; }
/*
 * Video: the free-Nuggets button on the front screen. A DEEPER green than --buy, so the white lettering has the
 * contrast it needs on a phone in daylight (Gray, 20 Oct 2026: "barely can read it"): the lightest stop is still
 * about 4:1 behind white, and the dark outline does the rest.
 */
.button--video{ --bodyA: #35b856; --bodyB: #12843a; --bodyC: #0a5a29; --ts: #053a19; --glow: rgba(18, 132, 58, 0.55); }
/*
 * Flat: for the sign-in buttons. Google, Apple and Discord each fix their
 * button's fill, logo and lettering, so none of the Candy body, rim or
 * outlined text applies; size, shape, press and focus still come from .button.
 */
.button--flat{
  background: var(--flat-bg, #ffffff); border: 1px solid var(--flat-line, transparent);
  box-shadow: none; text-shadow: none; -webkit-text-stroke: 0; color: var(--flat-ink, #1f1f1f);
  font-family: inherit; font-weight: 600;
}
.button--flat svg{ filter: none; width: 20px; height: 20px; flex: none; }
.button--google{ --flat-bg: #ffffff; --flat-ink: #1f1f1f; --flat-line: #747775; }
.button--apple{ --flat-bg: #000000; --flat-ink: #ffffff; }
.button--discord{ --flat-bg: #5865f2; --flat-ink: #ffffff; }
/* "Last used" (ui/signInPanel.ts): a small tag on the way this device last signed in, at the button's right edge. */
.button--flat[data-signin]{ position: relative; }
.signin__last{
  position: absolute; right: 10px; top: 50%; translate: 0 -50%; padding: 1px 8px; border-radius: 999px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em; line-height: 1.5; text-transform: uppercase;
  background: #ffe45c; color: #3a1d00; border: 1px solid rgba(58, 29, 0, 0.35);
}
.signin__last[hidden]{ display: none; }
/* The one button a prompt shows before the chooser (ui/signInPanel.ts, setStage). */
.panel--signin > [data-signin-cta]{ display: block; margin: 4px auto 0; }
.panel--signin > [data-signin-cta][hidden]{ display: none; }

/* The one bounce: squash and stretch, the whole button, nothing clipped. Only
   on the buttons that start a run; if everything bounces, nothing stands out. */
:is(.menu__play, [data-death-again]){ animation: cbJelly 2.2s ease-in-out infinite; will-change: transform; }
@media (hover: hover){ :is(.menu__play, [data-death-again]):hover{ animation-duration: 1.6s; } }
/* A third of the squash it had (1.12 x 0.88): Gray, 13 Sep 2026, "less jelly
   movement on the play button". It still breathes; it no longer wobbles. */
@keyframes cbJelly{
  0%{ transform: scale(1, 1); } 10%{ transform: scale(1.04, 0.96); } 20%{ transform: scale(0.975, 1.025); }
  30%{ transform: scale(1.012, 0.99); } 40%, 100%{ transform: scale(1, 1); }
}

/*
 * Play, as Gray drew it on 13 Sep 2026: a play mark and PLAY! in capitals on
 * the pink, a pink rim rather than a white one, and a darker lip under it so
 * it stands up off the screen beside the name field.
 */
.menu__play{
  text-transform: uppercase; gap: 14px;
  --drop: calc(var(--lip) * 0.9);
}
.menu__play-icon{
  width: 0.74em; height: 0.74em; flex: 0 0 auto; fill: currentColor;
  filter: drop-shadow(0 2px 0 var(--ts)) drop-shadow(0 -1.5px 0 var(--ts)) drop-shadow(1.5px 0 0 var(--ts)) drop-shadow(-1.5px 0 0 var(--ts));
}
@media (prefers-reduced-motion: reduce){ :is(.menu__play, [data-death-again]){ animation: none; } }



/* The narrowest phones keep the keyword, not the article. */
@media (max-width: 360px) {
  .menu__eyebrow-the{ display: none; }
}

/*
 * The homepage arena is pinned to the screen, not sized from 100dvh.
 *
 * Gray, on Chrome for iPhone, 10 Sep 2026: "that first time load black half is
 * still there". The arena was `calc(100dvh - var(--header-h))` tall, and on iOS
 * 100dvh can stay at its first-load value when the URL bar collapses, so the
 * game ended short: empty page below it, and the page itself nudged up so the
 * top of the menu was cut off. The canvas re-measuring itself (layout.ts) could
 * not help, because the box it measured was the wrong height. A fixed box with
 * inset: 0 always covers exactly what is visible, and the document has nothing
 * to scroll. The renderer follows through its ResizeObserver on the stage.
 */
html:has(body.page--home){ overflow: hidden; overscroll-behavior: none; height: 100%; }
.page--home main > .game{
  position: fixed; inset: 0; width: auto; height: auto; min-height: 0; max-height: none;
  margin: 0; transform: none;
  /* The card's hairline frame (.game) is a 1px ring round the whole screen here: the canvas was 2px short of the
     box, so every turn re-drew a line along the top and bottom edges and the arena sat 1px off the glass. */
  border: 0;
}


/*
 * Play with friends: the second choice on the screen, so the second-biggest
 * button. Chunky and violet like the corner buttons, with the people icon, and
 * never wider than the column Play sits in.
 */
.menu__friends{
  --rim: 4px; gap: 10px; width: min(340px, var(--col)); padding: 7px 22px 10px;
  border-radius: 20px; font-size: clamp(1.1rem, 1.6vw, 1.3rem);
}
/*
 * The icon sits INSIDE the button's face. It was 40px with -10px margins top and
 * bottom, so it overhung the button's top edge and hung into the bottom lip —
 * Gray, 23 Sep 2026, on both menu buttons: "icons dont sit right, just looks
 * weird". 1.75em tracks the label, and the extra 2px off the bottom margin is
 * half the lip (--rim), so it centres on the face you see, not the box.
 */
.menu__friends img, .menu__wardrobe img{
  width: 1.75em; height: 1.75em; flex: none; margin: -5px 0 -3px -4px; object-fit: contain;
  filter: drop-shadow(0 2px 1px rgba(0, 0, 0, 0.35));
}
/*
 * The Burrow, under Play with friends: the same size and shape, in the orange
 * of the wardrobe's own furniture so the two read as different doors rather
 * than twins. Its icon is the painted worm on its display stand.
 */
.menu__wardrobe{
  --rim: 4px; --bodyA: #ffd27a; --bodyB: #e07800; --bodyC: #b85600; --ts: #7a3d00;
  gap: 10px; width: min(340px, var(--col)); padding: 7px 22px 10px;
  border-radius: 20px; font-size: clamp(1.1rem, 1.6vw, 1.3rem);
}
/*
 * The two doors under Play wear a rim in their OWN colour, thin, not the house
 * white. Gray, 29 Sep 2026, passing on players' complaints: "too much white
 * around these two buttons". Two stacked buttons with the 4px white rim and the
 * edge ring were more rim than button. Play keeps the white rim: it is the one
 * loud choice on the screen, and now the only one that shines like that.
 */
@media (hover: hover){ .menu__wardrobe:hover{ filter: brightness(1.07); } }
@media (hover: hover){ .menu__friends:hover{ filter: brightness(1.07); } }
/*
 * Free Nuggets for a video, in the menu's centre column under Play with friends: the same width and shape, a gold prize
 * in big type with the video mark beside it, and the small line (how many are left, or the wait) under it. It RESTS
 * (aria-disabled) rather than dims when there is nothing to watch: the words stay at full strength, only the colour
 * goes quiet and the press does nothing.
 */
.menu__video{
  --edge: #053a19;
  display: grid; grid-template-columns: auto auto; justify-content: center; align-items: center; justify-items: start; column-gap: 12px;
  width: min(340px, 86%); padding: 6px 14px 10px 12px; border-radius: 20px; text-align: left;
}
.menu__video .icon{ width: clamp(1.9rem, 2.6vw, 2.4rem); height: auto; aspect-ratio: 1 / 1; filter: drop-shadow(0 2px 0 var(--ts)); }
.menu__videotext{ display: grid; justify-items: start; gap: 1px; min-width: 0; }
.menu__videomain{ font-size: clamp(1.45rem, 2.1vw, 1.7rem); line-height: 1.05; color: #fff; white-space: nowrap; }
.menu__videomain .nugamt{ gap: 0.12em; }
.menu__videomain .nugamt__icon{ width: 1.1em; height: 1.1em; }
.menu__video small{ color: #fff; }
.menu__video[aria-disabled="true"]{
  --bodyA: #8c86b8; --bodyB: #5d5693; --bodyC: #403a72; --ts: #1d1747; --edge: #1d1747;
  cursor: default;
}
/* A phone on its side: the same button, a size down, so the centre column keeps its room. */
@media (orientation: landscape) and (max-height: 500px){
  .menu .menu__video{ width: 100%; padding: 2px 10px 7px 8px; column-gap: 8px; border-radius: 16px; }
  .menu .menu__video .icon{ width: 1.7rem; }
  .menu .menu__videomain{ font-size: 1.25rem; }
}
.menu__video[aria-disabled="true"]:active{ transform: none; scale: 1; filter: none; }
/* Classic paints it as a pill whose rims grow with its height (9% top, 12% bottom of ui/classic/blue-m): two lines
   of words need the pill taller than one, and padding that keeps the prize off the top rim (Gray's A17, 4 Nov 2026:
   the 100 sat on the rim and the two lines touched). */
[data-vibe="classic"] .menu .menu__video{ --h: 64px; height: auto; min-height: var(--h); --pad-x: calc(var(--h) * 0.4); }
[data-vibe="classic"] .menu__videotext{ gap: 3px; }
@media (hover: hover){ .menu__video[aria-disabled="true"]:hover{ filter: none; } }


/*
 * The analytics question: website only (layout.ts), never in a portal build.
 * A small card at the bottom rather than a wall, answered in one tap.
 */
.consent{
  position: fixed; z-index: 60; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  width: min(460px, calc(100% - 24px)); display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px;
  padding: 12px 14px; border-radius: 16px; background: #1a1f47; color: #fff; border: 3px solid #fff;
  box-shadow: 0 0 0 2px #7a2a6a, 0 14px 30px -12px rgba(0, 0, 0, 0.55);
  font-size: 0.9rem; line-height: 1.4;
}
.consent[hidden]{ display: none; }
.consent p{ margin: 0; flex: 1 1 220px; }
.consent__actions{ display: flex; gap: 8px; }
/* Accept and Essential only are house buttons (.button --primary and --quiet,
   --sm); they had a hand-rolled pair of their own here. */

/* Hide or report the name of whoever killed you. See death.ts. */
.death__report{ margin: -2px 0 6px; min-height: 44px; display: flex; gap: 8px; justify-content: center; align-items: center; font-size: 0.82rem; color: var(--text-dim); }
.death__report[hidden]{ display: none; }
/* Hide this name and Report name are .linkbutton --dim; Unhide is a small house button, in the same 44px row. */
.death__report [hidden]{ display: none; }

/* Settings > Account > Hidden players: a name and its Unhide, one row each. */
.hiddenlist{ list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hiddenlist[hidden]{ display: none; }
.hiddenlist li{ display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.hiddenlist__name{ min-width: 0; overflow-wrap: anywhere; font-weight: 600; color: #fff; }
.hiddenlist .button{ flex: none; }

/* ------------------------------------------------------ the lobby */
/*
 * Play with friends, before the match (gameShell, data-game-lobby). Built
 * from the house pieces: the panel, the Candy buttons, the name field, and the
 * death screen's label and big number. Only layout lives here.
 */
.lobby__join{ display: flex; gap: 10px; align-items: center; }
.lobby__join > .menu__field{ flex: 1; min-width: 55%; }  /* the code box keeps room to type in; a long "Join" (Beitreten) shrinks instead (CLIP) */
/* The heading above it already says what goes in the box ("or join one"), so its inside label is for screen readers
   only: in German "CODE" left the box 11px to type in (CLIP). */
.lobby__join .menu__label{ position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* The bots toggle (16 Sep 2026): same .switch as Sound/Music on settings.ts, just this row's layout. */
.lobby__switchrow{ display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 0; }
.lobby__switchlabel{ font-size: 0.92rem; color: var(--text-dim); text-align: left; }
.lobby__count{ display: flex; align-items: center; gap: 8px; }
.lobby__countvalue{
  min-width: 2.6em; text-align: center; font-family: var(--font-label);
  font-size: 1.35rem; color: #fff; font-variant-numeric: tabular-nums;
}
/* The room reads like the death screen it shares its pieces with: a label, one
   big number (the code), and the rest centred under it. */
.panel--lobby [data-lobby-room]{ text-align: center; }
/* The list sets its own alignment (.panel__list), so it is centred by name too. */
.panel--lobby .panel__list{ list-style: none; padding: 0; text-align: center; }

/* ------------------------------------------------------ in-game screens */
/*
 * Settings inside the game (ui/settingsScreen.ts, gameShell data-game-screen).
 * Gray, 15 Sep 2026: "just make it similar to worms zone", "chunky is good",
 * all in one window. Worms Zone's shape: a title, your currency and a close X
 * along the top, big icon tabs under it, chunky controls, and on the look
 * tabs a live preview. Built from the house pieces (Candy buttons, .station,
 * .iconbtn); what is new here is layout, plus two Candy variants (--tab,
 * --step) in the same family as the rest.
 *
 * The preview is a WINDOW onto the arena running behind: on the Background
 * and Food tabs the screen stops painting its own fill and the window's
 * enormous box-shadow paints it instead, everywhere except inside the window.
 * The bar, tabs and side column sit on a higher layer so the shadow cannot
 * cover them, and the screen clips it to its rounded edge.
 */
.overlay--screen{ background: rgba(8, 6, 24, 0.55); padding: clamp(8px, 2vw, 22px); }
/* The corner speaker and the run's readouts are for a live run; over Settings
   they only cover corners of it. */
.game:has(:is([data-game-screen], [data-game-profile], [data-game-board], [data-game-event], [data-game-wheel], [data-game-daily], [data-game-lobby], [data-game-updates], [data-nugget-shop], [data-reward]):not([hidden])) :is([data-game-dock], .hud){ visibility: hidden; }
.screen{
  --screen-fill: #2f2573;
  position: relative; overflow: hidden;
  display: grid; grid-template-rows: auto auto minmax(0, 1fr);
  width: min(1120px, 100%); height: min(760px, 100%);
  border-radius: var(--radius); border: 4px solid #fff;
  background: radial-gradient(ellipse 120% 80% at 50% 0%, #3d3196, var(--screen-fill) 70%);
  box-shadow: 0 0 0 2px #7a2a6a, 0 18px 40px -14px rgba(0, 0, 0, 0.7);
}
.screen.is-windowed{ background: transparent; }
.screen__bar{
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: 12px; padding: 12px 14px 8px 20px;
  background: linear-gradient(180deg, #3d3196, #352a86);
}
.screen__title{
  margin: 0 auto 0 0; font-family: var(--font-label); font-weight: 400;
  font-size: clamp(1.3rem, 3.4vw, 2.3rem); color: #ffe45c; letter-spacing: 0.01em;
  --ts: #35187f;
}
/* Your Nuggets, as a pill: the menu's top rail and the Settings bar, one component. */
.nuggetpill{
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px 6px 6px;
  border-radius: 999px; background: rgba(12, 8, 36, 0.7);
  font-family: var(--font-label); font-size: 1.25rem; color: #fff; line-height: 1;
}
.nuggetpill[hidden]{ display: none; }
.nuggetpill img{ width: 30px; height: 30px; filter: drop-shadow(0 2px 1px rgba(0, 0, 0, 0.55)); }
/* The close X: an icon button in Worms Zone's orange. */
.iconbtn--close{ --bodyA: #ffd27a; --bodyB: #e07800; --bodyC: #b85600; --ts: #7a3d00; --glow: rgba(217, 123, 0, 0.5); }

/* Big icon tabs: the chosen one widens and says its name, as Worms Zone's do. */
.screen__tabs{
  position: relative; z-index: 2;
  display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 14px 0;
  background: #352a86; border-bottom: 4px solid rgba(255, 255, 255, 0.14);
}
.button--tab{
  --rim: 3px; --bodyA: #6f5fd6; --bodyB: #5a48c4; --bodyC: #4636a8; --ts: #231566;
  flex: 1 1 64px; min-width: 64px; max-width: 120px; min-height: 62px; padding: 6px 10px 8px;
  border-radius: 18px 18px 8px 8px; font-size: 1.3rem; gap: 8px;
}
.button--tab svg, .button--tab img{ width: 34px; height: 34px; flex: none; }
.button--tab .button__label{ display: none; }
.button--tab.is-selected{
  --bodyA: #b9a8ff; --bodyB: #8f78ff; --bodyC: #6a52e6;
  flex-grow: 3; max-width: 260px;
  /* Its name always fits: with six tabs on a 768px tablet the share it was given ran short of "Hintergrund". */
  min-width: max-content;
}
.button--tab.is-selected .button__label{ display: inline; color: #ffe45c; font-size: 0.86em; }

.screen__body{ position: relative; z-index: 1; min-height: 0; overflow-y: auto; padding: 18px clamp(14px, 3vw, 30px) 24px; }
.screen__pane{ display: grid; gap: 18px; align-content: start; max-width: 720px; margin: 0 auto; }
.screen__pane[hidden]{ display: none; }
.screen__pane--windowed{
  max-width: none; height: 100%;
  grid-template-columns: minmax(250px, 340px) minmax(0, 1fr); align-items: stretch;
}
.screen__side{ position: relative; z-index: 1; display: grid; gap: 12px; align-content: start; min-height: 0; overflow-y: auto; padding-right: 4px; }
.screen__window{
  position: relative; z-index: 0; min-height: 240px;
  border-radius: 22px; border: 4px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 200vmax var(--screen-fill), inset 0 0 0 2px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}
.screen__note{ margin: 0; font-size: 0.9rem; color: var(--text-dim); }
.screen__note[hidden]{ display: none; }
.screen__heading{ margin: 0; font-family: var(--font-label); font-weight: 400; font-size: 1.2rem; color: #fff; }

/*
 * Every Settings tab is a window onto the arena (27 Sep 2026): the controls
 * down the left in cards, a badge in the window saying what is in use.
 */
.screen__bar::before{
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0.07;
  background: url(/squirm-io-worm-icon.png) 0 0 / 54px 54px repeat;
}
.screen__card{
  display: grid; gap: 12px; padding: 14px; border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
  border: 2px solid rgba(255, 255, 255, 0.12);
}
.screen__card--center{ justify-items: center; text-align: center; }
.screen__card .button svg{ width: 22px; height: 22px; }
/* Two columns that may be narrower than their longest word (a bare `1fr` may not: "Nutzungsbedingungen"
   pushed the whole Settings pane wider than a phone), so a long word breaks (hyphenated in German). */
.screen__links{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.screen__links .button{ font-size: 0.95rem; padding: 8px 10px 10px; overflow-wrap: break-word; hyphens: manual; }
.screen__version{
  justify-self: center; background: none; border: 0; padding: 4px 8px; cursor: pointer;
  font: inherit; font-size: 0.78rem; color: var(--text-dim); text-decoration: underline dotted;
}
.screen__side .stepper{ grid-template-columns: auto minmax(0, 1fr) auto auto; row-gap: 6px; }
.screen__side .stepper__label{ grid-column: 1 / -1; }
.screen__tiles--two{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
.screen__tiles--three{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* On screen (Settings > Graphics): the house .switch in a row with its words, the whole row a tap target. */
.screen__group{ display: grid; gap: 12px; }
.screen__group[hidden]{ display: none; }
.screen__card--switches{ gap: 0; padding: 4px 14px; }
.screen__switchrow{ display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 3px 0; }
.screen__switchrow + .screen__switchrow{ border-top: 1px solid rgba(255, 255, 255, 0.12); }
.screen__switchtext{ display: grid; gap: 2px; min-width: 0; flex: 1; cursor: pointer; }
.screen__switchlabel{ font-family: var(--font-label); font-weight: 400; font-size: 1.1rem; color: #fff; overflow-wrap: anywhere; }
.screen__switchblurb{ font-size: 0.8rem; line-height: 1.35; color: var(--text-dim); }
.screen__switchrow .switch{ flex: none; padding: 9px 0 9px 10px; }
/* Where the minimap will sit, and how big, shown in the window (the same base size a phone draws). */
.screen__ghostmap{
  position: absolute; top: 72px; width: calc(74px * var(--minimap-scale, 1)); aspect-ratio: 1; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.9); background: radial-gradient(circle, rgba(255, 255, 255, 0.28) 0 6%, rgba(10, 6, 40, 0.55) 7%);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.45);
}
.screen__ghostmap[hidden]{ display: none; }
.screen__ghostmap[data-side="right"]{ right: 22px; top: 110px; }
.screen__ghostmap[data-side="left"]{ left: 22px; }
/* The window is a strip on a phone: the ghost sits at its top and is cut by it, never pushing the screen to scroll. */
.screen__window:has(.screen__ghostmap){ overflow: hidden; }
/* Graphics now holds more than one screen of choices (On screen, minimap, quality): the end of the scroller fades out, so a choice cut by its edge reads as more to scroll, not as a broken card. The padding keeps the last row clear of the fade. */
[data-screen-pane="graphics"] .screen__side{ padding-bottom: 30px; -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 30px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 30px), transparent); }
@media (max-width: 760px){ .screen__ghostmap, .screen__ghostmap[data-side="right"]{ top: 10px; } }
.station__swatch--art{ background-size: 82% auto; background-repeat: no-repeat; background-color: rgba(10, 6, 40, 0.35); }
.station__swatch--art.is-mirrored{ transform: scaleX(-1); }
.keys--compact .keys__row{ grid-template-columns: auto minmax(0, 1fr); gap: 10px; padding: 6px 0; font-size: 0.86rem; }
.keys--compact kbd{ font-size: 0.66rem; }
/* "✓ Selected", in the window, as Worms Zone's preview says it. */
.screen__badge{
  position: absolute; left: 50%; bottom: 18px; translate: -50% 0; white-space: nowrap; max-width: calc(100% - 24px);
  overflow: hidden; text-overflow: ellipsis;
  padding: 8px 22px 10px; border-radius: 18px; border: 3px solid rgba(255, 255, 255, 0.85);
  background: rgba(22, 12, 64, 0.82); box-shadow: 0 8px 18px -6px rgba(0, 0, 0, 0.6);
  font-family: var(--font-label); font-size: clamp(1.1rem, 2.2vw, 1.7rem); color: #ffe45c;
  --ts: #35187f;
}
.screen__badge[hidden], .screen__badge:empty{ display: none; }
/* Where the boost button will sit on a phone, shown in the window. */
.screen__ghostboost{
  position: absolute; bottom: 22%; width: 86px; height: 86px; border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #ffb3e0, #ff4fad 55%, #b0125f); border: 4px solid #fff;
  box-shadow: 0 0 0 6px rgba(255, 79, 173, 0.35), 0 10px 20px rgba(0, 0, 0, 0.5);
  animation: tile-pulse 1.4s ease-in-out infinite;
}
.screen__ghostboost[data-side="right"]{ right: 26px; }
.screen__ghostboost[data-side="left"]{ left: 26px; }
.screen__ghostboost::after{ content: "BOOST"; position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-label); font-size: 1rem; color: #fff; --ts: #7a0f48; }

/* Music and Sounds: − [ten cells] + and a speaker, Worms Zone's chunky bars. */
.stepper{ display: grid; grid-template-columns: 5.2em auto minmax(0, 1fr) auto auto; align-items: center; gap: 10px; }
.stepper__label{ font-family: var(--font-label); font-size: 1.3rem; color: #fff; }
.stepper__bar{
  display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; height: 30px; padding: 4px;
  border-radius: 10px; background: #1d1650; box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.45);
}
.stepper__cell{ border-radius: 5px; background: rgba(255, 255, 255, 0.1); }
.stepper__cell.is-on{ background: linear-gradient(180deg, #ffd27a, #ff9f1c 55%, #ff4fad); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.45); }
.stepper.is-muted .stepper__bar{ opacity: 0.6; }
.button--step{ --rim: 3px; --bodyA: #8fd0ff; --bodyB: #2c8fd6; --bodyC: #1d6ba8; --ts: #0d3a66; width: 44px; height: 44px; padding: 0; border-radius: 12px; }
.stepper .iconbtn{ width: 44px; height: 44px; }

/* Floors and food themes: tiles with the texture itself as the picture. */
.station--tile{ grid-template-rows: auto auto auto; padding: 8px 8px 10px; text-align: center; background: #3b2f8f; border-width: 3px; }
.station--tile.is-selected{ border-color: #c6f432; box-shadow: 0 0 0 2px rgba(198, 244, 50, 0.35); }
.station--tile.is-selected .station__name{ color: #c6f432; }
/* A locked item you can buy with Nuggets is a button, not a wall. */
.station--tile.is-locked.is-buyable{ cursor: pointer; opacity: 0.8; }
.station--tile.is-locked.is-buyable .station__desc{ color: #ffd27a; font-weight: 700; }
.station__swatch{ display: block; aspect-ratio: 1; border-radius: 12px; background-size: 128px 128px; background-position: center; background-repeat: repeat; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.25); }
.screen__tiles{ display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.screen__pane .choices{ margin-top: 0; }

/* A phone: the window goes under the controls instead of beside them. */
/*
 * A phone (Gray's screenshots, 15 Sep 2026). Seven tabs wrapped onto two rows,
 * and the chosen one widened to show its name, which was cut off ("Optio",
 * "Graphi", "Backgro") and ran into its neighbour. On a phone every tab is an
 * equal square in one row with its icon only, and the chosen one is told by its
 * colour; the pane's own heading says where you are. The floor and food panes
 * give the tiles the height and the window onto the arena a strip under them:
 * the window had taken most of the screen and left a row and a half of floors.
 */
@media (max-width: 760px){
  .screen__pane--windowed{ grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) clamp(120px, 24vh, 190px); }
  .screen__window{ min-height: 0; }
  .screen__tiles{ grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; }
  .stepper{ grid-template-columns: 4.4em auto minmax(0, 1fr) auto auto; gap: 6px; }
  .stepper__label{ font-size: 1.05rem; }
  .screen__tabs{ flex-wrap: nowrap; gap: 4px; padding: 6px 8px 0; }
  .button--tab, .button--tab.is-selected{ flex: 1 1 0; min-width: 0; max-width: none; min-height: 50px; padding: 5px 2px 7px; }
  .button--tab.is-selected .button__label{ display: none; }
  /* With no name showing, the chosen tab needs more than a lighter body: a lime rim. */
  .button--tab.is-selected{ --rimA: #e8ff7a; --rimB: #c6f432; }
  .button--tab svg, .button--tab img{ width: clamp(24px, 7vw, 32px); height: clamp(24px, 7vw, 32px); }
}
/* A tab's keyboard focus ring sits inside it, rather than a white frame floating round it. */
.button--tab:focus-visible{ outline: 3px solid #fff; outline-offset: -6px; }

/*
 * A phone on its side, in the screens that are laid out for a tall window
 * (Gray, 19 Sep 2026, iPhone: 844x390, and 292 with Safari's bars). Settings and
 * Profile spent 156 of 292px on a title bar and a row of 62px tabs and showed
 * one row of what you opened them for; the purchase confirmation was taller
 * than the screen, so Buy sat below the fold; the private-arena lobby ran its
 * Leave button off the bottom. Each keeps its shape and gives back the room:
 * a slimmer bar and tabs, the picture beside the words instead of above them.
 * Height decides, not width: an 844px-wide phone is short, and a short window on
 * a desktop has the same problem.
 */
@media (orientation: landscape) and (max-height: 500px){
  .overlay--screen{ padding: 6px; }
  .screen:not(.screen--burrow){ height: 100%; border-width: 3px; }
  .screen:not(.screen--burrow) .screen__bar{ padding: 4px 10px 2px 16px; }
  .screen:not(.screen--burrow) .screen__title{ font-size: 1.5rem; }
  .screen:not(.screen--burrow) .iconbtn--close{ width: 44px; height: 44px; }
  .screen__tabs{ padding: 4px 10px 0; }
  .screen .button--tab{ min-height: 44px; padding-block: 3px 5px; }
  .screen .button--tab svg, .screen .button--tab img{ width: 28px; height: 28px; }
  .screen__body{ padding-block: 10px 14px; }
  .screen__pane{ gap: 12px; }
  .screen .button--step, .screen .stepper .iconbtn{ width: 44px; height: 44px; }
  /*
   * Title, tabs, Nuggets and the close X on ONE line (27 Sep 2026): two rows
   * of header left the leaderboard two players tall at 844x360 (Gray:
   * "landscape mobile also many things cut off or hard to choose").
   */
  .screen:not(.screen--burrow){ grid-template-columns: auto minmax(0, 1fr) auto auto; grid-template-rows: auto minmax(0, 1fr) auto; }
  .screen:not(.screen--burrow) .screen__bar{ display: contents; }
  /* With the bar flattened its pattern would lie over the whole screen. */
  .screen:not(.screen--burrow) .screen__bar::before{ display: none; }
  .screen:not(.screen--burrow) .screen__title{ grid-column: 1; grid-row: 1; align-self: center; margin: 0; padding: 4px 6px 2px 14px; font-size: 1.3rem; }
  .screen:not(.screen--burrow) .screen__tabs{ grid-column: 2; grid-row: 1; flex-wrap: nowrap; background: none; border-bottom: 0; padding: 4px 6px 2px; }
  .screen:not(.screen--burrow) .screen__bar > .nuggetpill{ grid-column: 3; grid-row: 1; align-self: center; }
  .screen:not(.screen--burrow) .screen__bar > .iconbtn--close{ grid-column: 4; grid-row: 1; align-self: center; margin: 4px 8px 2px 4px; }
  .screen:not(.screen--burrow) .screen__body{ grid-column: 1 / -1; grid-row: 2; border-top: 3px solid rgba(255, 255, 255, 0.14); }
  .screen:not(.screen--burrow) > .ranks__me{ grid-column: 1 / -1; grid-row: 3; padding: 4px 14px 6px; }
  /* The purchase confirmation: the picture beside the words, both buttons on a row of their own. */
  .panel--buy{ width: min(560px, 100%); display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 16px; align-items: center; text-align: left; padding: 12px 18px; }
  .panel--buy > .buy__art{ grid-column: 1; grid-row: 1 / span 4; width: 92px; height: 92px; margin: 0; }
  .panel--buy > :not(.buy__art){ grid-column: 2; }
  .panel--buy .buy__name{ margin: 0 0 2px; font-size: 1.3rem; }
  .panel--buy .buy__price{ justify-content: flex-start; }
  .panel--buy .buy__price .panel__display{ font-size: 2rem; }
  .panel--buy .panel__note{ margin: 2px 0 0; }
  .panel--buy .panel__actions{ grid-column: 1 / -1; margin-top: 10px; }
  .panel--buy .panel__actions .button{ min-height: 44px; }
}
/*
 * The lobby's first step is six things tall (title, blurb, extra worms, Start,
 * the code row, Back), which is not 292px. Sideways it is two columns instead:
 * what it is on the left, what to press on the right, so Back stays in view.
 */
@media (orientation: landscape) and (max-height: 420px){
  .panel--lobby{ width: min(720px, 100%); }
  .panel--lobby [data-lobby-choose]:not([hidden]){ display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 20px; row-gap: 6px; align-items: center; text-align: left; }
  .panel--lobby [data-lobby-choose] > *{ margin: 0; grid-column: 2; }
  .panel--lobby [data-lobby-choose] > .panel__title{ grid-column: 1; grid-row: 1; font-size: 1.3rem; }
  .panel--lobby [data-lobby-choose] > .panel__sub{ grid-column: 1; grid-row: 2; font-size: 0.8rem; line-height: 1.3; }
  .panel--lobby [data-lobby-choose] > .lobby__switchrow{ grid-column: 1; grid-row: 3; }
  .panel--lobby [data-lobby-choose] > :nth-child(4){ grid-column: 2; grid-row: 1; }
  .panel--lobby [data-lobby-choose] > .share__label{ grid-column: 2; grid-row: 2; align-self: end; }
  .panel--lobby [data-lobby-choose] > .lobby__join{ grid-column: 2; grid-row: 3; }
  .panel--lobby [data-lobby-choose] > .panel__hint{ grid-column: 1; grid-row: 4; }
  .panel--lobby [data-lobby-choose] > :nth-child(8){ grid-column: 2; grid-row: 4; }
  .panel--lobby .panel__actions > .button, .panel--lobby .lobby__join .button{ min-height: 44px; }
  /* The death screen with its XP line, what killed you and the report row is taller than 292px
     (its score scrolled off the top): the result on the left, the cause on the right, buttons across. */
  .panel--death{ display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); column-gap: 20px; row-gap: 2px; align-items: center; width: min(720px, 100%); }
  .panel--death > *{ grid-column: 2; margin-block: 0; }
  /* The run's tiles on the right, where there is room for "3:09" and "146,336" (27 Sep 2026). */
  .panel--death > .death__label{ grid-column: 1; grid-row: 1; }
  .panel--death > .death__score{ grid-column: 1; grid-row: 2; }
  .panel--death > .death__best{ grid-column: 1; grid-row: 3; }
  .panel--death > .death__xp{ grid-column: 1; grid-row: 4; }
  .panel--death > .death__cause{ grid-column: 2; grid-row: 1; }
  .panel--death > .death__stats{ grid-column: 2; grid-row: 2 / span 2; margin: 0; }
  .panel--death > .death__report{ grid-column: 2; grid-row: 4; }
  .panel--death > .toast{ grid-column: 1 / -1; grid-row: 5; }
  .panel--death > .panel__actions{ grid-column: 1 / -1; grid-row: 6; margin-top: 8px; }
  .panel--death .death__stat{ padding: 4px 2px 5px; }
  .panel--death .death__stat img{ width: 26px; height: 26px; }
  .panel--death .death__stats{ grid-auto-columns: auto; }
  .panel--death .death__stat{ padding-inline: 6px; }
  .panel--death .death__stat b{ font-size: 1rem; }
  .panel--death .panel__actions > .button{ min-height: 44px; }
}

/*
 * A newer version is live (ui/updateNotice.ts). Gray, 5 Nov 2026: "many people leave browsers open, we should have a
 * flashing button ... a larger one that says click to update". The house buy button, pinned top centre over the home
 * screen, pulsing and brightening until it is pressed.
 */
.menu__update{
  /* Under the logo, in the store badge's place while it shows (Gray, 7 Nov 2026: "ugly and not readable"): it sat over
     the logo, white on lime. The house blue button, crisp outlined lettering, a gentle pulse. */
  display: block; margin: clamp(4px, 1vh, 10px) auto 0; width: fit-content;
  --h: 50px; --pad-x: 26px; font-size: clamp(1rem, 2.2vw, 1.3rem); white-space: nowrap; max-width: calc(100vw - 24px);
  color: #fff; -webkit-text-stroke: 0.14em #14104a; paint-order: stroke fill; text-shadow: 0 0.08em 0 #14104a;
  animation: tile-pulse 1.4s ease-in-out infinite;
}
.menu:has(.menu__update:not([hidden])) .menu__stores{ display: none; }
.menu__update[hidden]{ display: none; }
@media (prefers-reduced-motion: reduce){ .menu__update{ animation: none; } }

/* ------------------------------------------------------ the updates bell */
/*
 * Gray, 15 Sep 2026: "we also need a nice bell notification where we will
 * show updates". An icon button with a red dot until the newest update has
 * been seen; the list is the house panel (ui/updates.ts).
 */
.menu__bell{ position: relative; }
.iconbtn__dot{
  position: absolute; top: -5px; right: -5px; width: 15px; height: 15px; border-radius: 50%;
  background: #ff3b5c; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}
.iconbtn__dot[hidden]{ display: none; }
/*
 * The leaderboard (ui/boardScreen.ts): the Settings screen's shell, a row per
 * player — cup or number, level badge, name, their worm, length — and your
 * own row pinned under the list.
 */
.screen--board{ grid-template-rows: auto auto minmax(0, 1fr) auto; width: min(980px, 100%); }
.ranks{ list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ranks__row{
  display: grid; grid-template-columns: 56px 46px minmax(0, 1fr) minmax(90px, 220px) auto; align-items: center; gap: 12px;
  min-height: 60px; padding: 6px 16px 6px 10px; border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
  border: 2px solid rgba(255, 255, 255, 0.08);
}
.ranks__row[data-medal="gold"]{ background: linear-gradient(90deg, rgba(255, 196, 60, 0.32), rgba(255, 255, 255, 0.05) 70%); border-color: rgba(255, 206, 90, 0.55); }
.ranks__row[data-medal="silver"]{ background: linear-gradient(90deg, rgba(215, 225, 245, 0.26), rgba(255, 255, 255, 0.05) 70%); border-color: rgba(220, 230, 250, 0.4); }
.ranks__row[data-medal="bronze"]{ background: linear-gradient(90deg, rgba(230, 140, 70, 0.28), rgba(255, 255, 255, 0.05) 70%); border-color: rgba(235, 150, 80, 0.45); }
.ranks__rank{ display: grid; place-items: center; font-family: var(--font-label); font-size: 1.5rem; color: #ffd84a;  font-variant-numeric: tabular-nums; }
.ranks__rank img{ width: 52px; height: 52px; object-fit: contain; }
/* The level on a painted shield (tools/import-rewards.py): gold for the podium, violet below it. */
.ranks__level{
  display: grid; place-items: center; width: 46px; height: 46px; padding-top: 2px;
  background: url(/ui/rank-shield-violet.webp?v=84c9d548) center / contain no-repeat;
  font-family: var(--font-label); font-size: max(12.5px, calc(1.05rem * var(--lvk, 1))); color: #fff;
  --ts: #2c1a7a;
}
/* Three and four digit levels (ui/levelFrame.ts sets data-digits) shrink to stay inside the badge. */
.ranks__level[data-digits="3"]{ --lvk: 0.88; }
.ranks__level[data-digits="4"]{ --lvk: 0.74; }
.ranks__row[data-medal] .ranks__level{ background-image: url(/ui/rank-shield-gold.webp?v=940111b3); }
.ranks__name{ min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-label); font-size: 1.3rem; color: #fff;  }
.ranks__worm{ width: 100%; height: 48px; }
.ranks__len{ font-family: var(--font-label); font-size: 1.35rem; color: #fff; font-variant-numeric: tabular-nums; text-align: right;  }
.ranks__me{ position: relative; z-index: 2; padding: 10px clamp(14px, 3vw, 30px) 14px; background: linear-gradient(180deg, #352a86, #2a206a); border-top: 4px solid rgba(255, 255, 255, 0.14); }
.ranks__me[hidden]{ display: none; }
.ranks__row.is-me{ border-color: var(--accent); background: linear-gradient(90deg, rgba(255, 79, 173, 0.28), rgba(255, 255, 255, 0.05) 70%); }
.ranks__none{ margin: 6px 0; text-align: center; color: var(--text-dim); font-weight: 700; }
@media (max-width: 640px){
  .ranks__row{ grid-template-columns: 40px 36px minmax(0, 1fr) 72px auto; gap: 8px; padding: 4px 10px 4px 6px; min-height: 52px; }
  .ranks__rank img{ width: 38px; height: 38px; }
  .ranks__rank{ font-size: 1.15rem; }
  .ranks__level{ width: 36px; height: 36px; font-size: max(12.5px, calc(0.9rem * var(--lvk, 1))); }
  .ranks__name, .ranks__len{ font-size: 1.02rem; }
  .ranks__worm{ height: 36px; }
}
/* An upright phone: the worm picture gives its column to the name. With it there, names were cut to one letter
   ("W…", Gray's A17, 4 Nov 2026); a name is what the row is for (TRUNC, ui/uiRules.ts). */
@media (max-width: 480px){
  .ranks__row{ grid-template-columns: 36px 34px minmax(0, 1fr) auto; }
  .ranks__worm{ display: none; }
  .ranks__name .flagicon{ width: 22px; height: 16px; margin-right: 6px; }
}
/* A phone on its side: the leaderboard's rows slimmer, so more than two players fit (27 Sep 2026). */
@media (orientation: landscape) and (max-height: 500px){
  .ranks{ gap: 7px; }
  .ranks__row{ min-height: 42px; padding: 2px 12px 2px 6px; gap: 8px; }
  .ranks__rank img{ width: 34px; height: 34px; }
  .ranks__rank{ font-size: 1.1rem; }
  .ranks__level{ width: 34px; height: 34px; font-size: max(12.5px, calc(0.9rem * var(--lvk, 1))); }
  .ranks__name, .ranks__len{ font-size: 1rem; }
  .ranks__worm{ height: 30px; }
}

/*
 * The prize wheel (ui/wheelPanel.ts). A stage, not a form: a room in the site theme's colours with a glow, and ONE unit
 * in it: the wheel, the Spin button (the house buy button) under it, and the level bonus beside it as a card as tall as
 * the wheel. Two canvases: the face turns, the rim with its bulbs stays put. Gray, 27 Sep 2026: "prize wheel is
 * absolute dogshit all around"; 6 Nov 2026: "needs mega improvement across all themes", because the stage was Classic's
 * violet on every theme, the ladder floated far from the wheel, and the Spin button was a gunmetal slab in Overdrive.
 *
 * The colours are --wh-* on .overlay--wheel, set per theme in the "wheel themes" block below; the canvases read them
 * as the wheel opens (wheelPanel.ts readPalette). The layout is three shapes of one grid, chosen by the room the stage's
 * body really has (container queries, not the screen): beside (the default), under (a narrow body) and short (a phone on
 * its side).
 */
.overlay--wheel{
  --wh-bg-a: #8a3fd6; --wh-bg-b: #4a1f9a; --wh-bg-c: #25104f; --wh-edge: #7a2a6a; --wh-border: #fff;
  --wh-ray: rgba(255, 220, 120, 0.12); --wh-ink: #2a0848; --wh-card: rgba(20, 8, 60, 0.45); --wh-card-line: rgba(255, 255, 255, 0.25);
  --wh-gold: #ffe45c; --wh-chip: rgba(20, 8, 60, 0.55);
  background: rgba(8, 4, 28, 0.72); padding: clamp(8px, 2vw, 22px);
}
.wheelstage{
  position: relative; overflow: hidden; display: grid; grid-template-rows: auto auto minmax(0, 1fr);
  width: min(940px, 100%); height: min(800px, 100%); border-radius: var(--radius); border: 4px solid var(--wh-border);
  box-shadow: 0 0 0 2px var(--wh-edge), 0 18px 40px -14px rgba(0, 0, 0, 0.7);
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.14) 0 2px, transparent 3px) 0 0 / 90px 90px,
    radial-gradient(circle at 70% 80%, rgba(255, 228, 92, 0.18) 0 2px, transparent 3px) 0 0 / 130px 130px,
    radial-gradient(ellipse 80% 70% at 50% 52%, var(--wh-bg-a), var(--wh-bg-b) 55%, var(--wh-bg-c));
}
.wheelstage__glow{ position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.wheelstage__glow::before{
  content: ""; position: absolute; left: 50%; top: 54%; width: 902px; height: 902px; translate: -50% -50%; pointer-events: none;
  background: repeating-conic-gradient(var(--wh-ray) 0 8deg, transparent 8deg 20deg);
  -webkit-mask: radial-gradient(circle, #000 93px, transparent 451px); mask: radial-gradient(circle, #000 93px, transparent 451px);
  animation: ray-spin 30s linear infinite; will-change: rotate;
}
.wheelstage__bar{ position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; padding: 18px 64px 2px; }
.wheelstage__bar .iconbtn--close{ position: absolute; right: 14px; top: 12px; }
.wheelstage__title{ margin: 0; font-family: "Lilita One", var(--font-display); font-size: clamp(1.8rem, min(5vw, 7vh), 3rem); rotate: -2deg; }
.wheelstage__title::before{ color: #3b0a5a; -webkit-text-stroke: 0.24em #3b0a5a; filter: drop-shadow(0 0.06em 0 #1b0431) drop-shadow(0 0.1em 0.1em rgba(0, 0, 0, 0.5)); }
.wheelstage__title::after{ color: #ff9a00; -webkit-text-stroke: 0.1em #ff9a00; }
.wheelstage__title > span{ background-image: linear-gradient(180deg, #fffbe6 0%, #ffe45c 45%, #ffc21a 55%, #ff9a00 100%); }
/* What the wheel says (a free spin is ready, the next one in...): a chip under the title, not loose lettering on the room. */
.wheelstage__note{
  position: relative; z-index: 1; justify-self: center; margin: 4px 16px 6px; max-width: calc(100% - 32px); padding: 3px 18px 5px; min-height: 1.5em; text-align: center;
  border-radius: 999px; background: var(--wh-chip); box-shadow: inset 0 0 0 2px var(--wh-card-line);
  font-family: "Lilita One", var(--font-display); font-size: 1.15rem; line-height: 1.25; color: #fff; text-shadow: 0 2px 0 var(--wh-ink);
}
.wheelstage__note:empty{ visibility: hidden; }
.wheelstage__body{
  position: relative; z-index: 1; min-height: 0; padding: clamp(4px, 1.2vh, 12px) clamp(12px, 3vw, 32px) clamp(10px, 2.4vh, 22px);
  /* The unit sizes itself from the room this row really has (cq units), so a short screen shrinks the wheel instead of
     pushing the header and Spin off the panel: an iPad in landscape did (Gray, 27 Sep 2026). */
  container-type: size;
}
/* Beside: the wheel with Spin under it, the level bonus to its right, the whole unit centred in the room. */
.wheelunit{
  --btn: clamp(56px, 11cqh, 72px); --rail: clamp(168px, 24cqw, 212px); --gap: clamp(14px, 3cqw, 32px);
  --size: min(calc(100cqh - var(--btn) - 14px), calc(100cqw - var(--rail) - var(--gap)), 640px);
  height: 100%; display: grid; justify-content: center; align-content: center;
  grid-template-columns: var(--size) var(--rail); grid-template-rows: var(--size) var(--btn);
  grid-template-areas: "wheel meter" "spin meter"; column-gap: var(--gap); row-gap: 14px;
}
.wheel{ grid-area: wheel; position: relative; width: var(--size); height: var(--size); }
.wheel__rim, .wheel__face{ position: absolute; left: 0; top: 0; width: 100%; aspect-ratio: 1; }
.wheel__rim{ z-index: 2; pointer-events: none; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.45)); }
.wheel__face{ z-index: 1; }
.wheelstage.is-won .wheel__face, .overlay--wheel.is-won .wheel__face{ animation: wh-won 900ms ease-out; }
@keyframes wh-won{ 20%{ scale: 1.03; filter: brightness(1.25); } 60%{ scale: 1; filter: brightness(1.1); } }
/* The pointer: a gold flap at the top that flicks against every peg. */
.wheel__pointer{
  position: absolute; z-index: 3; left: 50%; top: -1.5%; width: 11%; aspect-ratio: 0.8; translate: -50% 0;
  transform-origin: 50% 12%;
  background: linear-gradient(180deg, #fff3a8, #ffc21a 50%, #d98a00);
  clip-path: polygon(10% 0, 90% 0, 90% 30%, 50% 100%, 10% 30%);
  filter: drop-shadow(0 4px 0 #8a4a00) drop-shadow(0 6px 6px rgba(0, 0, 0, 0.4));
}
.wheel__pointer::after{ content: ""; position: absolute; left: 32%; top: 10%; width: 36%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, #e0247f 60%, #8a0f48); }
.wheel__pointer.is-flick{ animation: wh-flick 140ms ease-out; }
@keyframes wh-flick{ 35%{ rotate: -22deg; } }
/*
 * Spin: the house buy button, big, under the wheel. Sized by --h like every painted pill (THE FACE RULE sets its padding;
 * the :root prefix outranks the theme blocks' own --h), the lettering from --h. "Spin again" (a video) is the blue one.
 */
:root .wheelunit .wheel__spin{
  grid-area: spin; justify-self: center; align-self: center; width: min(100%, calc(var(--size) * 0.86)); --h: var(--btn); min-height: var(--h);
  font-size: calc(var(--h) * 0.46); padding-block: calc(var(--h) * 0.1) calc(var(--h) * 0.14);
}
.wheel__spin[data-kind="video"]{ --bodyA: #8fd0ff; --bodyB: #2c8fd6; --bodyC: #1d6ba8; --ts: #0d3a66; --glow: rgba(29, 107, 168, 0.5); }
.wheel__spin:not(:disabled){ animation: wh-ready 1.3s ease-in-out infinite; }
.wheel__spin:disabled{ filter: saturate(0.5) brightness(0.9); cursor: default; }
.wheel__spin[hidden]{ display: none; }
@keyframes wh-ready{ 50%{ scale: 1.05; } }
/* The level bonus: a card beside the wheel with your rung lit, centred against it. */
.wheel__meter{
  grid-area: meter; align-self: center; display: grid; gap: 10px; padding: 12px 10px 10px;
  border-radius: 24px; background: var(--wh-card); border: 3px solid var(--wh-card-line); box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.18), 0 10px 20px -10px rgba(0, 0, 0, 0.55);
}
.wheel__metertitle{ margin: 0; text-align: center; font-family: "Lilita One", var(--font-display); font-size: 1.2rem; line-height: 1.2; color: var(--wh-gold); text-shadow: 0 2px 0 var(--wh-ink); }
.wheel__ladder{ list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.wheel__step{
  display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 52px; padding: 4px 14px; border-radius: 16px;
  background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.72); font-weight: 800; font-size: 0.9rem;
}
.wheel__step b{ font-family: "Lilita One", var(--font-display); font-weight: 400; font-size: 1.65rem; line-height: 1; color: #fff; text-shadow: 0 2px 0 var(--wh-ink); }
.wheel__step.is-yours{
  background: linear-gradient(180deg, #ffe45c, #ff9a00); color: #5a2600; box-shadow: 0 0 0 3px #fff, 0 0 18px rgba(255, 200, 60, 0.8);
  scale: 1.05;
}
.wheel__step.is-yours b{ color: #fff; text-shadow: 0 2px 0 #8a4a00; }
/* Under: a body too narrow for two columns (an upright phone). The wheel as wide as the body, Spin under it, the five rungs in a row. */
@container (max-width: 600px){
  .wheelunit{
    --meter: 112px; --btn: clamp(52px, 8cqh, 68px);
    --size: min(100cqw, calc(100cqh - var(--btn) - var(--meter) - 28px), 560px);
    grid-template-columns: var(--size); grid-template-rows: var(--size) var(--btn) auto; grid-template-areas: "wheel" "spin" "meter"; row-gap: 14px;
  }
  .wheel__meter{ align-self: end; padding: 8px 8px 8px; gap: 6px; border-radius: 22px; }
  .wheel__metertitle{ font-size: 1rem; }
  .wheel__ladder{ grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .wheel__step{ flex-direction: column; justify-content: center; min-height: 0; padding: 6px 2px 7px; gap: 2px; font-size: 0.78rem; border-radius: 13px; }
  .wheel__step b{ font-size: 1.3rem; }
  .wheel__step.is-yours{ scale: 1.04; box-shadow: 0 0 0 2px #fff, 0 0 12px rgba(255, 200, 60, 0.8); }
}
/* Short: a phone on its side (844x360): the wheel the height of the room on the left, the rungs over Spin on the right. */
@container (max-height: 440px) and (min-width: 440px){
  .wheelunit{
    --btn: 48px; --rail: clamp(150px, 30cqw, 210px); --gap: clamp(12px, 3cqw, 28px);
    --size: min(100cqh, calc(100cqw - var(--rail) - var(--gap)));
    grid-template-columns: var(--size) var(--rail); grid-template-rows: minmax(0, 1fr) var(--btn); grid-template-areas: "wheel meter" "wheel spin";
    height: var(--size); row-gap: 10px; column-gap: var(--gap);
  }
  .wheel__meter{ align-self: stretch; padding: 7px; gap: 0; border-radius: 18px; border-width: 2px; }
  .wheel__metertitle{ display: none; }
  .wheel__ladder{ grid-template-columns: none; grid-auto-rows: minmax(0, 1fr); gap: 4px; height: 100%; }
  .wheel__step{ flex-direction: row; min-height: 0; padding: 0 12px; font-size: 0.8rem; border-radius: 11px; }
  .wheel__step b{ font-size: 1.15rem; }
  .wheel__step.is-yours{ scale: 1.03; box-shadow: 0 0 0 2px #fff, 0 0 12px rgba(255, 200, 60, 0.8); }
  :root .wheelunit .wheel__spin{ width: 100%; }
}
/* A phone on its side: a small header and a tighter stage. */
@media (orientation: landscape) and (max-height: 500px) {
  .overlay--wheel{ padding: 6px; }
  .wheelstage{ height: 100%; }
  .wheelstage__bar{ padding: 6px 60px 0; }
  .wheelstage__bar .iconbtn--close{ top: 6px; right: 8px; }
  .wheelstage__title{ font-size: 1.5rem; }
  .wheelstage__note{ font-size: 0.95rem; margin: 2px 12px 4px; padding: 1px 14px 3px; min-height: 0; }
  .wheelstage__body{ padding: 6px 16px 8px; }
}
@media (prefers-reduced-motion: reduce){ .wheel__spin, .wheelstage__glow, .wheelstage__glow::before{ animation: none !important; } }

/*
 * Wheel themes: the room, the rim and the slices in each site theme's colours (the canvases read --wh-rim-*, --wh-lip, --wh-bulb-*
 * and --wh-slices; each slice is "light,deep,1 if pale" and the slices are split by |). Classic is the default above.
 */
[data-vibe="overdrive"] .overlay--wheel{
  --wh-bg-a: #1a2f55; --wh-bg-b: #0e1830; --wh-bg-c: #05080f; --wh-edge: rgba(25, 227, 255, 0.55); --wh-border: #19e3ff;
  --wh-ray: rgba(25, 227, 255, 0.1); --wh-ink: #02060c; --wh-card: rgba(8, 14, 28, 0.7); --wh-card-line: rgba(25, 227, 255, 0.45); --wh-gold: #19e3ff; --wh-chip: rgba(8, 14, 28, 0.75);
  --wh-rim-a: #55637f; --wh-rim-b: #252e44; --wh-rim-c: #0b0f1a; --wh-lip: #19e3ff; --wh-bulb-on: #19e3ff; --wh-bulb-off: #3b4a63;
  --wh-slices: "#19e3ff,#0a8fb0,0|#2b3652,#141b2c,0|#ff5be0,#c0139a,0|#2b3652,#141b2c,0|#b6ff3b,#6aa800,1|#2b3652,#141b2c,0|#ffb020,#c27400,0|#2b3652,#141b2c,0|#ffe45c,#f0a800,0";
}
[data-vibe="overdrive"] .wheelstage{ border-width: 2px; box-shadow: 0 0 0 1px rgba(25, 227, 255, 0.4), 0 0 32px -6px rgba(25, 227, 255, 0.5), 0 18px 40px -14px rgba(0, 0, 0, 0.8); }
[data-vibe="overdrive"] .wheelstage__title::before{ color: #03141c; -webkit-text-stroke-color: #03141c; }
[data-vibe="overdrive"] .wheelstage__title::after{ color: #19e3ff; -webkit-text-stroke-color: #19e3ff; }
[data-vibe="overdrive"] .wheelstage__title > span{ background-image: linear-gradient(180deg, #ffffff 0%, #b9f6ff 45%, #19e3ff 55%, #0a9ab8 100%); }
[data-vibe="overdrive"] .wheel__step.is-yours{ background: linear-gradient(180deg, #ffc65c, #e08400); }
[data-vibe="garden"] .overlay--wheel{
  --wh-bg-a: #d4623e; --wh-bg-b: #7a2f4c; --wh-bg-c: #2a1030; --wh-edge: #ffb347; --wh-border: #fff2d6;
  --wh-ray: rgba(255, 214, 140, 0.16); --wh-ink: #3a1004; --wh-card: rgba(58, 16, 40, 0.5); --wh-card-line: rgba(255, 226, 170, 0.45); --wh-gold: #ffd978; --wh-chip: rgba(58, 16, 40, 0.55);
  --wh-rim-a: #ffc766; --wh-rim-b: #e0801f; --wh-rim-c: #8a3f0a; --wh-lip: #fff0c4; --wh-bulb-on: #fff6c2; --wh-bulb-off: #c99a6a;
  --wh-slices: "#ff8a5c,#d9432a,0|#fff3dc,#ffd9a0,1|#9bd35a,#4f8a1e,0|#fff3dc,#ffd9a0,1|#ffc23d,#e08a00,0|#fff3dc,#ffd9a0,1|#c46aa8,#7a2a68,0|#fff3dc,#ffd9a0,1|#ffe45c,#f0a800,0";
}
[data-vibe="winddown"] .overlay--wheel{
  --wh-bg-a: #3f46a8; --wh-bg-b: #1d2462; --wh-bg-c: #080c2c; --wh-edge: rgba(169, 139, 255, 0.6); --wh-border: #c9d4ff;
  --wh-ray: rgba(170, 190, 255, 0.1); --wh-ink: #050818; --wh-card: rgba(10, 16, 52, 0.6); --wh-card-line: rgba(169, 139, 255, 0.5); --wh-gold: #ffe9a8; --wh-chip: rgba(10, 16, 52, 0.6);
  --wh-rim-a: #8a94ff; --wh-rim-b: #4650c8; --wh-rim-c: #1c2270; --wh-lip: #c9d4ff; --wh-bulb-on: #dff0ff; --wh-bulb-off: #6a74b8;
  --wh-slices: "#7a86ff,#3a45b8,0|#e8ecff,#b9c2f5,1|#4fe3c9,#1f9f8c,0|#e8ecff,#b9c2f5,1|#a98bff,#6342c9,0|#e8ecff,#b9c2f5,1|#ff8fd0,#c24a98,0|#e8ecff,#b9c2f5,1|#ffe45c,#f0a800,0";
}

/* The daily gift's base and its look are in the GAME LOOK section below (one strip of cards, every size). */
.updates{ list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; text-align: left; }
.updates__item{ padding: 12px 14px; border-radius: var(--radius-sm); background: rgba(255, 255, 255, 0.06); border: 2px solid rgba(255, 255, 255, 0.08); }
.updates__item.is-new{ border-color: var(--accent); background: rgba(255, 79, 173, 0.1); }
.updates__date{ margin: 0; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); }
.updates__title{ margin: 2px 0 4px; font-family: var(--font-display); font-size: 1.1rem; }
.updates__body{ margin: 0; font-size: 0.92rem; color: var(--text-dim); line-height: 1.45; }
/* A phone on its side with the browser's bars showing: two news items fit without a sliver of a third row. */
@media (orientation: landscape) and (max-height: 340px) {
  .updates{ gap: 6px; margin-bottom: 10px; }
  .updates__item{ padding: 6px 12px; }
  .updates__title{ font-size: 1rem; margin: 1px 0 2px; }
  .updates__body{ line-height: 1.35; }
}

/* ------------------------------------------------------ level and a cleaner menu */
/*
 * Worms Zone's front screen (15 Sep 2026): a level badge and bar top left, the
 * currency top right, one big Play, round buttons in the corners, and nothing
 * else. Gray: "worms zone has player levels, we need to add that, they show
 * it" and "we got too much going on with footer links too, loads of stuff".
 */
.menu__level{ display: flex; align-items: center; gap: 8px; }
.menu__level[hidden]{ display: none; }
.menu__levelbadge{
  display: grid; place-items: center; min-width: 46px; height: 46px; padding: 0 8px;
  border-radius: 14px; border: 3px solid #fff;
  background: linear-gradient(180deg, #ffd27a, #ff9f1c 55%, #d97b00);
  box-shadow: 0 0 0 2px #7a3d00, 0 4px 0 #a35a00;
  font-family: var(--font-label); font-size: 1.45rem; color: #fff; line-height: 1;
  --ts: #7a3d00;
}
.menu__levelbar{
  display: block; width: clamp(90px, 18vw, 150px); height: 15px; overflow: hidden;
  border-radius: 999px; border: 2px solid rgba(255, 255, 255, 0.9); background: rgba(20, 16, 60, 0.75);
}
.menu__levelbar i{ display: block; width: 0; height: 100%; background: linear-gradient(90deg, #c6f432, #e8ff7a); transition: width 0.6s ease; }
/*
 * Your picture, top left: your worm's face in an orange tile with the level in
 * its corner and the bar beside it, Worms Zone's arrangement. It is the way
 * into your Profile, and a red dot on it means an achievement is waiting.
 */
.menu__avatar{
  position: relative; appearance: none; -webkit-appearance: none; cursor: pointer;
  margin: 0; padding: 0 0 8px; border: 0; background: none; color: inherit; font: inherit;
}
/* Violet behind the face, not orange: an orange worm's face vanished into an
   orange tile (Ember on the phone, 15 Sep 2026), and no skin is this violet. */
.menu__avatarart{
  display: block; flex: none; width: 58px; height: 58px; border-radius: 16px; border: 3px solid #fff;
  background: radial-gradient(circle at 50% 36%, #8f7bff, #4a38c4 72%);
  box-shadow: 0 0 0 2px #7a3d00, 0 4px 0 #a35a00;
}
.menu__avatar .menu__levelbadge{
  position: absolute; left: 36px; bottom: 0; min-width: 30px; height: 30px; padding: 0 5px;
  border-radius: 10px; font-size: 1rem;
}
.menu__avatar .menu__levelbar{ margin-left: 10px; flex: none; }  /* never squeezed to a stub by the sign-in pill beside it (it was 3px wide) */
@media (hover: hover){ .menu__avatar:hover .menu__avatarart{ filter: brightness(1.07); } }
.menu__avatar:focus-visible{ outline: none; }
.menu__avatar:focus-visible .menu__avatarart{ outline: 3px solid var(--accent); outline-offset: 3px; }
.menu__avatardot{
  position: absolute; top: -5px; left: 47px; width: 16px; height: 16px; border-radius: 50%;
  background: #ff3b4f; border: 2px solid #fff; box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
}
.menu__avatardot[hidden]{ display: none; }
/*
 * Something to collect (ui/menu.ts setCollectDot): the picture beats. A gold glow builds behind it, then it pops a
 * little and a ring ripples out from it; the dot bounces on the beat. Gray, 10 Nov 2026: "profile should pulsate when
 * achievements need collecting, pulse and glow build".
 */
.menu__avatar[data-collect] .menu__avatarart{ animation: avatar-beat 1.8s ease-in-out infinite; }
.menu__avatar[data-collect] .menu__avatardot{ animation: avatar-dot 1.8s ease-in-out infinite; }
@keyframes avatar-beat{
  0%, 100%{ transform: scale(1); box-shadow: 0 0 0 2px #7a3d00, 0 4px 0 #a35a00, 0 0 0 0 rgba(255, 216, 74, 0); outline: 3px solid rgba(255, 216, 74, 0); outline-offset: 0; }
  45%{ transform: scale(1.02); box-shadow: 0 0 0 2px #7a3d00, 0 4px 0 #a35a00, 0 0 16px 4px rgba(255, 216, 74, 0.55); outline: 3px solid rgba(255, 216, 74, 0); outline-offset: 0; }
  58%{ transform: scale(1.12); box-shadow: 0 0 0 2px #ffb000, 0 4px 0 #a35a00, 0 0 26px 9px rgba(255, 216, 74, 0.9); filter: brightness(1.15); outline: 3px solid rgba(255, 216, 74, 0.95); outline-offset: 1px; }
  72%{ transform: scale(0.98); box-shadow: 0 0 0 2px #7a3d00, 0 4px 0 #a35a00, 0 0 18px 5px rgba(255, 216, 74, 0.5); outline: 3px solid rgba(255, 216, 74, 0.5); outline-offset: 9px; }
  86%{ transform: scale(1.01); outline: 3px solid rgba(255, 216, 74, 0.15); outline-offset: 15px; }
  99%{ outline: 3px solid rgba(255, 216, 74, 0); outline-offset: 18px; }
}
@keyframes avatar-dot{
  0%, 50%, 100%{ transform: none; }
  58%{ transform: translateY(-5px) scale(1.2); }
  70%{ transform: translateY(0) scale(0.95); }
}
@media (prefers-reduced-motion: reduce){
  .menu__avatar[data-collect] .menu__avatarart, .menu__avatar[data-collect] .menu__avatardot{ animation: none; }
  .menu__avatar[data-collect] .menu__avatarart{ box-shadow: 0 0 0 2px #ffb000, 0 4px 0 #a35a00, 0 0 18px 5px rgba(255, 216, 74, 0.7); }
}
.button--tab .menu__avatardot{ top: 4px; left: auto; right: 6px; }

/* ------------------------------------------------------ level frames
 * The frame round a level number (shared levels.ts LEVEL_FRAMES, ui/levelFrame.ts): bronze at level 50, silver at
 * 100, gold at 250, diamond at 500, and an animated cosmic one at 1,000. Drawn here, in CSS, from five colours per
 * frame (the custom properties below), so the menu's badge, the profile's, the leaderboard's and the in-run level
 * all wear the same frame. Gray, 9 Nov 2026: "think ahead when people start reaching level 100, 500, 1000".
 */
@property --lf-spin{ syntax: "<angle>"; inherits: false; initial-value: 0deg; }
[data-frame="bronze"]{ --lf-top: #ffc78f; --lf-bot: #b8672a; --lf-edge: #ffe1c0; --lf-ring: #5e2f0c; --lf-glow: rgba(255, 170, 100, 0.55); }
[data-frame="silver"]{ --lf-top: #f7fbff; --lf-bot: #9fb0c8; --lf-edge: #ffffff; --lf-ring: #3a4a66; --lf-glow: rgba(200, 225, 255, 0.6); }
[data-frame="gold"]{ --lf-top: #fff0a0; --lf-bot: #f0a800; --lf-edge: #fff8d6; --lf-ring: #7a4a00; --lf-glow: rgba(255, 210, 70, 0.65); }
[data-frame="diamond"]{ --lf-top: #c4f6ff; --lf-bot: #2f9bff; --lf-edge: #e8fdff; --lf-ring: #0b3f7a; --lf-glow: rgba(90, 210, 255, 0.7); }
[data-frame="cosmic"]{ --lf-top: #ff7ad9; --lf-bot: #4a2cc9; --lf-edge: #d9f4ff; --lf-ring: #1c0f5c; --lf-glow: rgba(190, 120, 255, 0.75); }
/* The badges: the menu's, the profile's and a leaderboard row's level. */
/* Colours only on the menu's badge (its size, corner and place stay what .menu__levelbadge and the avatar say);
   the gem needs a positioned badge, which :where gives without outranking the avatar's own position. */
:where(.menu__levelbadge[data-frame]){ position: relative; }
.menu__levelbadge[data-frame], .ranks__level[data-frame]{
  isolation: isolate;
  text-shadow: 0 2px 0 var(--lf-ring), 1px 0 0 var(--lf-ring), -1px 0 0 var(--lf-ring), 0 -1px 0 var(--lf-ring);
}
.menu__levelbadge[data-frame]{
  background: linear-gradient(180deg, var(--lf-top), var(--lf-bot));
  border-color: var(--lf-edge);
  box-shadow: 0 0 0 2px var(--lf-ring), 0 4px 0 var(--lf-ring), 0 0 14px var(--lf-glow);
  -webkit-text-stroke: 0.14em var(--lf-ring); paint-order: stroke fill; stroke-linejoin: round;
  text-shadow: 0 var(--lt-drop) 0 var(--lf-ring);
}
/*
 * A leaderboard row keeps its painted shield at every level (Gray, 10 Nov 2026: "why they dont have proper border for
 * level?" — from level 50 the shield had become a plain box). The frame tints the shield, drawn behind the number.
 */
.ranks__level[data-frame]{ position: relative; background: none; }
.ranks__level[data-frame]::before{
  content: ""; position: absolute; inset: 0; z-index: -2; background: url(/ui/rank-shield-gold.webp?v=940111b3) center / contain no-repeat;
  filter: drop-shadow(0 0 6px var(--lf-glow));
}
.ranks__level[data-frame="bronze"]::before{ filter: sepia(0.6) hue-rotate(-28deg) saturate(1.15) brightness(0.82) drop-shadow(0 0 6px var(--lf-glow)); }
.ranks__level[data-frame="silver"]::before{ filter: grayscale(1) brightness(1.28) contrast(1.08) drop-shadow(0 0 6px var(--lf-glow)); }
.ranks__level[data-frame="diamond"]::before{ background-image: url(/ui/rank-shield-blue.webp?v=24d5d854); filter: brightness(1.12) saturate(1.2) drop-shadow(0 0 8px var(--lf-glow)); }
.ranks__level[data-frame="cosmic"]::before{ background-image: url(/ui/rank-shield-violet.webp?v=84c9d548); animation: lf-hue 6s linear infinite; }
@keyframes lf-hue{ from{ filter: hue-rotate(0deg) saturate(1.3) drop-shadow(0 0 9px var(--lf-glow)); } to{ filter: hue-rotate(360deg) saturate(1.3) drop-shadow(0 0 9px var(--lf-glow)); } }
/* A small gem on top from gold up, so the higher frames read as more than a colour change. */
.menu__levelbadge[data-frame="gold"]::after, .menu__levelbadge[data-frame="diamond"]::after, .menu__levelbadge[data-frame="cosmic"]::after,
.ranks__level[data-frame="gold"]::after, .ranks__level[data-frame="diamond"]::after, .ranks__level[data-frame="cosmic"]::after{
  content: ""; position: absolute; z-index: -1; left: 50%; top: -9px; width: 14px; height: 12px; translate: -50% 0;
  background: linear-gradient(135deg, var(--lf-edge), var(--lf-top) 45%, var(--lf-bot));
  clip-path: polygon(50% 0, 100% 40%, 50% 100%, 0 40%);
  filter: drop-shadow(0 1px 0 var(--lf-ring));
}
.ranks__row[data-medal] .ranks__level[data-frame]{ background-image: none; }
/* A long number on the front screen's small badge: smaller type, and the badge grows to the left rather than past the button. */
.menu__avatar .menu__levelbadge[data-digits="3"]{ font-size: 0.86rem; padding: 0 4px; }
.menu__avatar .menu__levelbadge[data-digits="4"]{ font-size: 0.74rem; padding: 0 3px; left: auto; right: 2px; }
/* The cosmic frame turns slowly: a ring of colour round the number, the one animated frame. */
.menu__levelbadge[data-frame="cosmic"]{
  background:
    linear-gradient(180deg, var(--lf-top), var(--lf-bot)) padding-box,
    conic-gradient(from var(--lf-spin), #ff7ad9, #7a5cff, #3de3ff, #ffe45c, #ff7ad9) border-box;
  border-color: transparent;
  animation: lf-spin 6s linear infinite;
}
@keyframes lf-spin{ to{ --lf-spin: 360deg; } }
@media (prefers-reduced-motion: reduce){
  .menu__levelbadge[data-frame="cosmic"], .ranks__level[data-frame="cosmic"]::before{ animation: none; }
}
/* In a run: no box (clean play area). A tiny gem before the number and the number in the frame's light colour. */
.hud__stat--level[data-frame] .hud__value{ color: var(--lf-edge); }
.hud__stat--level[data-frame] .hud__value::before{
  content: ""; display: inline-block; width: 0.42em; height: 0.42em; margin-right: 0.28em; vertical-align: 0.12em;
  background: linear-gradient(135deg, var(--lf-edge), var(--lf-bot));
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.hud__stat--level[data-frame="cosmic"] .hud__value{ animation: lf-hue 6s linear infinite; }
@keyframes lf-hue{ to{ filter: hue-rotate(360deg); } }
@media (prefers-reduced-motion: reduce){ .hud__stat--level[data-frame="cosmic"] .hud__value{ animation: none; } }

/* ---------------------------------------------------------------- profile
 * Profile (ui/profileScreen.ts): the Settings screen shell with two tabs.
 * You: your worm's face, your level, six numbers. Achievements: a podium of
 * bronze, silver and gold counts, then a card per achievement, collectable
 * ones first. Worms Zone's layout, with every card saying what it asks.
 */
.button--tab{ position: relative; }
.screen__pane--wide{ max-width: 1040px; }
.dossier{ display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: 22px; align-items: start; }
.dossier__me{
  display: grid; justify-items: center; gap: 10px; padding: 18px 16px 20px;
  border-radius: 22px; background: #3b2f8f; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.25);
}
.dossier__avatar{
  display: block; width: 150px; height: 150px; border-radius: 28px;
  background: radial-gradient(circle at 50% 36%, #8f7bff, #4a38c4 70%);
  border: 4px solid #fff; box-shadow: 0 0 0 2px #7a2a6a, 0 8px 0 -2px rgba(0, 0, 0, 0.3);
}
.dossier__name{
  margin: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: var(--font-label); font-size: 1.5rem; color: #fff;
}
.dossier__level{ display: flex; align-items: center; gap: 8px; width: 100%; }
.dossier__level .menu__levelbar{ flex: 1 1 auto; width: auto; }

/* Six numbers, each with its painted icon (generated 15 Sep 2026, our own objects). */
.statgrid{ display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.statcard--length{ --statcard-icon: url(/ui/stat-length.webp?v=67d6fb04); }
.statcard--time{ --statcard-icon: url(/ui/stat-time.webp?v=38d5368e); }
.statcard--kills{ --statcard-icon: url(/ui/stat-kills.webp?v=0e207249); }
.statcard--games{ --statcard-icon: url(/ui/stat-games.webp?v=a7b52a50); }
.statcard--played{ --statcard-icon: url(/ui/stat-played.webp?v=0d1aa30b); }
.statcard--owned{ --statcard-icon: url(/ui/stat-owned.webp?v=74086b12); }
.statcard::before{
  content: ""; grid-row: 2; justify-self: center; align-self: center; width: clamp(56px, 6vw, 76px); aspect-ratio: 1;
  background: var(--statcard-icon, none) center / contain no-repeat; filter: drop-shadow(0 4px 2px rgba(20, 10, 60, 0.35));
}
.statcard__value{ grid-row: 3; }
.statcard{
  display: grid; grid-template-rows: auto 1fr auto; gap: 2px; min-height: 150px;
  padding: 10px 12px 12px; border-radius: 18px; border: 3px solid #fff;
  background: linear-gradient(180deg, #7d8cff, #5a6ae6);
  box-shadow: 0 0 0 2px #3a2a8a, inset 0 -5px 0 rgba(0, 0, 0, 0.18);
}
.statcard__label{ font-family: var(--font-label); font-size: 1rem; color: #ffe45c; --ts: #35187f; }
.statcard__value{
  align-self: end; justify-self: end; font-family: var(--font-label); font-weight: 400;
  font-size: clamp(1.5rem, 2.6vw, 2rem); color: #fff; font-variant-numeric: tabular-nums; --ts: #35187f;
}

/*
 * The podium: three steps, gold in the middle and highest, silver on its left
 * and bronze on its right — the way a real one stands (it had bronze first).
 *
 * Each step is dressed like a Burrow card (the same ray burst and glow, in its
 * own metal) with a band of sheen across it, rather than a flat fill. Gray,
 * 23 Sep 2026: "cards look boring with no backgrounds".
 */
.podium{ display: flex; justify-content: center; align-items: flex-end; gap: 10px; }
.podium__step{
  --metal: #e7a91c; --metal-light: #ffe27a; --metal-deep: #9a6a00;
  position: relative;
  display: grid; justify-items: center; align-content: end; gap: 2px; width: min(150px, 30%);
  padding: 8px 6px 10px; border-radius: 16px 16px 8px 8px; border: 3px solid #fff;
  background:
    linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, 0.34) 46%, rgba(255, 255, 255, 0.08) 54%, transparent 60%),
    repeating-conic-gradient(from 0deg at 50% 30%, rgba(255, 255, 255, 0.16) 0deg 9deg, transparent 9deg 18deg),
    radial-gradient(circle at 50% 30%, var(--metal-light), var(--metal) 55%, var(--metal-deep) 100%);
  box-shadow: 0 0 0 2px #3a2a8a, inset 0 -5px 0 rgba(0, 0, 0, 0.2), inset 0 3px 0 rgba(255, 255, 255, 0.45);
}
.podium__step--silver{ order: 1; min-height: 112px; --metal: #aebfd4; --metal-light: #f4f8ff; --metal-deep: #6f829c; --medal: #8497b0; }
.podium__step--gold{ order: 2; min-height: 128px; --metal: #f0b52a; --metal-light: #fff0a8; --metal-deep: #b07a06; --medal: #d99a0b; }
.podium__step--bronze{ order: 3; min-height: 100px; --metal: #d9844a; --metal-light: #ffc79a; --metal-deep: #97491c; --medal: #b8622c; }
.podium__cup{
  width: 58px; height: 58px; margin-top: -30px;
  background: var(--medal-img, none) center / contain no-repeat; filter: drop-shadow(0 4px 3px rgba(0, 0, 0, 0.35));
}
.podium__step--bronze{ --medal-img: url(/ui/medal-bronze.webp?v=28c99312); }
.podium__step--silver{ --medal-img: url(/ui/medal-silver.webp?v=33532ef7); }
.podium__step--gold{ --medal-img: url(/ui/medal-gold.webp?v=43404af2); }
.podium__count{ font-family: var(--font-label); font-weight: 400; font-size: 1.5rem; color: #fff;  font-variant-numeric: tabular-nums; }
.podium__name{ font-family: var(--font-display); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(20, 10, 50, 0.75); }

.trophies{ display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.trophy{
  display: grid; grid-template-rows: auto 1fr auto; gap: 8px; min-width: 0;
  padding: 10px 12px 12px; border-radius: 18px; border: 3px solid rgba(255, 255, 255, 0.85);
  background: linear-gradient(180deg, #5a4bd0, #4636a8);
  box-shadow: 0 0 0 2px #2a1d70, inset 0 -5px 0 rgba(0, 0, 0, 0.2);
}
.trophy[data-tier="bronze"]{ border-color: #f2a36b; }
.trophy[data-tier="silver"]{ border-color: #e3ecf7; }
.trophy[data-tier="gold"]{ border-color: #ffd24a; }
.trophy.is-ready{ border-color: #c6f432; box-shadow: 0 0 0 2px #2a1d70, 0 0 18px -2px rgba(198, 244, 50, 0.6), inset 0 -5px 0 rgba(0, 0, 0, 0.2); }
.trophy.is-done{ background: linear-gradient(180deg, #4a3fa8, #3a2f8a); }
.trophy__head{ display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; }
.trophy__dots{ margin-left: auto; }
.trophy__heading{ display: flex; align-items: center; gap: 8px; min-width: 0; }
/* The card's own badge (tools/import-badges.py), or the plain medal until it exists. */
.trophy__badge{ width: 40px; height: 40px; flex: none; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.4)); }
.trophy__badge.is-dim{ filter: grayscale(1) brightness(0.6); opacity: 0.55; }
.trophy__badge.is-pulsing{ animation: trophy-badge-pulse 1.6s ease-in-out infinite; }
.trophy__name{ margin: 0; overflow-wrap: break-word; hyphens: manual; font-family: var(--font-label); font-weight: 400; font-size: 1.1rem; color: #ffe45c; --ts: #35187f; }
/* Climber has seven pips: they wrap under the name rather than run out of the card into the next one (OVERLAP). */
.trophy{ min-width: 0; }
.trophy__head{ flex-wrap: wrap; }
.trophy__dots{ display: inline-flex; flex-wrap: wrap; gap: 5px; max-width: 100%; }
.trophy__dot{ width: 12px; height: 12px; border-radius: 50%; background: rgba(0, 0, 0, 0.35); box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.4); }
.trophy__dot:nth-child(1).is-on{ background: #e08a4f; }
.trophy__dot:nth-child(2).is-on{ background: #d9e3ef; }
.trophy__dot:nth-child(3).is-on{ background: #ffd24a; }
.trophy__dot.is-ready{ background: #c6f432; box-shadow: 0 0 0 2px rgba(198, 244, 50, 0.35); }
.trophy__ask{ margin: 0; font-size: 0.95rem; line-height: 1.35; color: #fff; }
.trophy__foot{ display: flex; align-items: center; gap: 10px; min-height: 40px; }
.trophy__bar{
  position: relative; flex: 1 1 auto; height: 26px; border-radius: 9px; overflow: hidden;
  background: #1d1650; box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.45);
}
.trophy__bar > i{ position: absolute; inset: 0 auto 0 0; background: linear-gradient(180deg, #ffd27a, #ff9f1c 55%, #ff4fad); }
.trophy__barlabel{
  position: relative; display: block; text-align: center; line-height: 26px;
  font-family: var(--font-label); font-size: 0.9rem; color: #fff;
  font-variant-numeric: tabular-nums; 
}
.trophy__prize, .trophy__collect{ display: inline-flex; align-items: center; gap: 4px; }
.trophy__prize{ font-family: var(--font-label); font-size: 1.05rem; color: #ffd27a; }
.trophy__prize b{ font-weight: 400; }
.trophy__collect{ flex: 1 1 auto; justify-content: center; min-width: 0; }
.trophy__done{ font-family: var(--font-label); font-size: 1.05rem; color: #c6f432; }
/* Event achievements (profileScreen.ts paintEventAchievements): a section per event, and a card the event ended on, greyed. */
.trophies__events{ display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 4px 0 16px; min-width: 0; }
.trophies__events[hidden]{ display: none; }
.trophies__event{ display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; min-width: 0; }
/* German names run long (Kürbiszertrümmerer): a card's name may break rather than push the grid sideways (check:overflow, 932x430). */
.trophies__event .trophy__name{ overflow-wrap: break-word; hyphens: manual; }
.trophies__event + .trophies__event{ margin-top: 8px; }
.trophies + .trophies__events{ margin: 16px 0 4px; }
.trophy.is-missed{ filter: grayscale(0.85); opacity: 0.6; }
.trophy__missed{ font-family: var(--font-label); font-size: 1rem; color: rgba(255, 255, 255, 0.8); }

/*
 * Layered game type (the game-UI research, 15 Sep 2026). A plain outlined
 * word is what made our screens read like a web page. Game titles are a stack:
 * a light-to-dark fill with a hard gloss band, an inner coloured rim, a dark
 * outer outline, a solid extrusion and a ground shadow. The element carries
 * the fill span; ::before (outer outline, extrusion, shadow) and ::after
 * (inner rim) are copies of the same words from data-text, so any script that
 * changes the words changes data-text too (profileScreen.ts `layered`).
 */
.fx{ position: relative; display: inline-block; isolation: isolate; line-height: 1; white-space: nowrap; }
.fx::before, .fx::after{
  content: attr(data-text); content: attr(data-text) / "";
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
}
.fx > span{
  display: inline-block; -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  /* The outline is ::before's. One inherited from a lettering rule (h2, .showcase__banner) drew over the clipped fill
     and left only a dark ring: the Burrow's worm name was unreadable on a phone (4 Nov 2026). */
  -webkit-text-stroke: 0; text-shadow: none;
}

/*
 * The reward: one hero word, one number, one button, revealed in beats
 * (profileScreen.ts BEAT: impact 520ms, count 1300ms, bar 2100ms, button
 * 2600ms). Everything else is small tracked capitals or plain text.
 */
.reward{
  --tint: #e39a5a; --t1: #ffe2c2; --t2: #e39a5a; --t3: #9c521f; --ink: #3a1606;
  position: absolute; inset: 0; z-index: 5; overflow: hidden auto; container-type: size;
  display: grid; place-items: safe center; padding: 18px;
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 255, 255, 0.16), transparent 42%),
    radial-gradient(circle at 50% 38%, #7a64ff, #4332b8 46%, #1f1760 88%);
  cursor: pointer;
}
.reward[data-tier="silver"]{ --tint: #d6e2ff; --t1: #ffffff; --t2: #cfd8e8; --t3: #7d8aa3; --ink: #1e2436; }
.reward[data-tier="gold"]{ --tint: #ffd84a; --t1: #fff7c4; --t2: #ffd84a; --t3: #d98a00; --ink: #4a2600; }
.reward[hidden]{ display: none; }
/* The one reveal for the whole game (ui/rewardReveal.ts): over every screen, not inside one. */
.reward--page{ position: fixed; z-index: 90; }
.reward__next[hidden], .reward__num[hidden], .reward__extras[hidden]{ display: none; }
/* Confetti falling over the whole screen from the impact beat. */
.reward__rain{ position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.reward__drop{
  position: absolute; top: -24px; left: var(--x); width: 10px; height: 16px; border-radius: 2px; background: var(--c);
  opacity: 0;
}
.reward.is-playing .reward__drop{ animation: rw-rain var(--t, 3s) cubic-bezier(0.3, 0.1, 0.6, 1) var(--d, 0.5s) both; }
@keyframes rw-rain{
  0%{ opacity: 1; translate: 0 0; rotate: 0deg; }
  85%{ opacity: 1; }
  100%{ opacity: 0; translate: var(--sway) 110vh; rotate: var(--r); }
}
/* What else it paid: a row of power-up icons with their counts. */
.reward__extras{ list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
/* Each power-up won: its picture, name and count, and what it does (powerupArt.ts chargeExtras). */
.reward__extras{ flex-direction: column; align-items: stretch; width: min(380px, 100%); }
.reward__extra{
  display: flex; align-items: center; gap: 10px; padding: 6px 16px 6px 8px; border-radius: 18px; text-align: left;
  background: rgba(20, 10, 60, 0.5); border: 2px solid rgba(255, 255, 255, 0.35);
}
.reward__extra img{ width: 48px; height: 48px; object-fit: contain; flex: none; }
.reward__extratext{ display: grid; gap: 1px; }
.reward__extratext b{ font-family: var(--font-label); font-weight: 400; font-size: 1.3rem; color: #fff; --ts: #1b0431; }
.reward__extratext small{ font-size: 0.86rem; font-weight: 700; color: #ffe45c; }
/* How to use them, under the list. */
.reward__note{ margin: 0; max-width: 380px; font-size: 0.92rem; line-height: 1.4; color: rgba(255, 255, 255, 0.88); }
.reward__note[hidden]{ display: none; }
.reward.is-playing .reward__note{ animation: rw-fade 300ms ease-out 1700ms both; }
.reward.is-playing .reward__extras{ animation: rw-pop 260ms cubic-bezier(0.34, 1.56, 0.64, 1) 1400ms both; }
.reward__rays{ position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.reward__rays::before{
  content: ""; position: absolute; left: 50%; top: 32%; width: 848px; height: 848px; translate: -50% -50%; pointer-events: none;
  background: repeating-conic-gradient(rgba(255, 255, 255, 0.15) 0 9deg, transparent 9deg 24deg);
  -webkit-mask: radial-gradient(circle, #000 71px, transparent 424px); mask: radial-gradient(circle, #000 71px, transparent 424px);
  animation: ray-spin 20s linear infinite; will-change: rotate;
}
/*
 * Everything is sized from the room the reveal really has (cqh: its own box, inside the notch and the home
 * indicator), and the picture is the one thing that gives way, so whatever a reward carries the buttons stay on
 * the glass. Gray's phone in Chrome, 390x661, 1 Nov 2026: a Legend's worm, number, note, card bar and two
 * stacked buttons came to 664px and put Close under the bottom of the screen.
 */
.reward__stage{
  position: relative; display: flex; flex-direction: column; align-items: center; gap: clamp(3px, 1.2cqh, 8px);
  width: min(460px, 100%); max-height: 100cqh; text-align: center;
}
.reward__hero, .reward__paid{ display: contents; }
.reward__eyebrow{
  margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 0.8rem;
  letter-spacing: 0.32em; text-transform: uppercase; color: var(--tint);
}
.reward__medal{
  flex: 0 1 auto; width: 100%; height: clamp(120px, 20cqh, 180px); min-height: 56px; object-fit: contain;
  filter: drop-shadow(0 10px 8px rgba(0, 0, 0, 0.4)) drop-shadow(0 0 30px color-mix(in oklab, var(--tint) 55%, transparent));
}
.reward__burst{ position: absolute; left: 50%; top: 26%; width: 0; height: 0; pointer-events: none; }
.reward__bit{ position: absolute; left: 0; top: 0; translate: -50% -50%; opacity: 0; }
.reward.is-playing .reward__bit{ animation: rw-fly 2s cubic-bezier(0.12, 0.75, 0.3, 1) var(--d, 0.52s) both; }
.reward__bit--nugget{ width: clamp(34px, 3vw, 52px); height: clamp(34px, 3vw, 52px); background: url(/ui/reward-nuggets.webp?v=ab621f30) center / contain no-repeat; }
.reward__bit--confetti{ width: 10px; height: 18px; border-radius: 3px; background: var(--c, #fff); }

/* Recipe 1, the hero: white with a pink under-band, a pink rim, a deep violet outline and extrusion. */
.reward__title{
  margin: 6px 0 2px; font-family: "Lilita One", var(--font-display); font-weight: 400;
  font-size: clamp(min(2.3rem, 6.5cqh), 7vw, 4rem); letter-spacing: 0.01em; rotate: -3deg;
}
.reward__title::before{
  color: #2a0848; -webkit-text-stroke: 0.26em #2a0848;
  filter: drop-shadow(0 0.035em 0 #2a0848) drop-shadow(0 0.035em 0 #1b0431) drop-shadow(0 0.07em 0.08em rgba(8, 0, 24, 0.55));
}
.reward__title::after{ color: #ff4fad; -webkit-text-stroke: 0.12em #ff4fad; }
.reward__title > span{ background-image: linear-gradient(180deg, #ffffff 0%, #ffffff 46%, #ffe3f3 54%, #ffb8df 100%); }

/* Recipe 2, the tier: a swallowtail ribbon in the tier's metal, the word white with a tier-ink outline. */
.reward__ribbonwrap{ filter: drop-shadow(0 0.14em 0 #1b0431) drop-shadow(0 0.3em 0.3em rgba(8, 0, 24, 0.45)); }
.reward__ribbon{
  margin: 0; display: inline-grid; place-items: center; padding: 0.4em 1.7em 0.52em;
  font-family: "Lilita One", var(--font-display); font-size: 1.45rem; letter-spacing: 0.08em; text-transform: uppercase;
  background: linear-gradient(180deg, var(--t1) 0%, var(--t2) 52%, var(--t3) 100%);
  clip-path: polygon(0 0, 100% 0, calc(100% - 0.75em) 50%, 100% 100%, 0 100%, 0.75em 50%);
  box-shadow: inset 0 0.14em 0 rgba(255, 255, 255, 0.6), inset 0 -0.18em 0 rgba(0, 0, 0, 0.28);
}
.reward__ribbon .fx::before{ color: var(--ink); -webkit-text-stroke: 0.2em var(--ink); filter: drop-shadow(0 0.06em 0 var(--ink)); }
.reward__ribbon .fx > span{ background-image: linear-gradient(180deg, #fff 0 55%, #fff0e0 56% 100%); }

/* Recipe 3, the number: gold with a pale rim and a brown outline, a small plus, a tracked unit. */
.reward__num{ margin: 4px 0 0; display: inline-flex; align-items: center; gap: 0.1em; font-family: "Lilita One", var(--font-display); font-size: clamp(2.4rem, 8cqh, 4.2rem); }
.reward__num .fx{ font-variant-numeric: tabular-nums; min-width: 1.6em; text-align: right; }
.reward__num .fx::before{
  color: #3b1a00; -webkit-text-stroke: 0.2em #3b1a00;
  filter: drop-shadow(0 0.04em 0 #3b1a00) drop-shadow(0 0.04em 0 #230f00) drop-shadow(0 0.08em 0.1em rgba(0, 0, 0, 0.5));
}
.reward__num .fx::after{ color: #fff3b0; -webkit-text-stroke: 0.08em #fff3b0; }
.reward__num .fx > span{ background-image: linear-gradient(180deg, #fffbe6 0%, #ffe45c 42%, #ffc21a 60%, #ff9a00 100%); }
.reward__num .fx.is-landed{ animation: rw-land 240ms cubic-bezier(0.3, 1.8, 0.5, 1); }
.reward__plus{ font-size: 0.6em; color: #ffe45c; -webkit-text-stroke: 0.16em #3b1a00; paint-order: stroke fill; }
.reward__nug{ width: 0.95em; height: 0.95em; margin-left: 0.08em; filter: drop-shadow(0 4px 2px rgba(0, 0, 0, 0.4)); }
.reward__unit{
  align-self: flex-end; margin: 0 0 0.9em 0.3em; font-family: var(--font-display); font-weight: 700;
  font-size: 0.8rem; letter-spacing: 0.3em; text-transform: uppercase; color: #fff; opacity: 0.85;
}

/* The next goal: a label, a bar with the next medal ghosted at its end, one plain line. */
.reward__next{ display: grid; gap: 6px; width: min(360px, 100%); margin-top: 6px; }
.reward__nextlabel{
  margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 0.72rem;
  letter-spacing: 0.3em; text-transform: uppercase; color: rgba(255, 255, 255, 0.75);
}
.reward__bar{
  position: relative; height: 26px; margin-right: 22px; border-radius: 13px;
  background: #1d1650; box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.45), 0 0 0 2px rgba(255, 255, 255, 0.18);
}
.reward__bar > i{
  position: absolute; inset: 0 auto 0 0; width: var(--fill, 0%); border-radius: 13px;
  background: linear-gradient(180deg, var(--t1), var(--t2) 55%, var(--t3));
  box-shadow: 0 0 12px color-mix(in oklab, var(--tint) 60%, transparent);
}
.reward.is-playing .reward__bar > i{ animation: rw-fill 500ms ease-out 2100ms both; }
.reward__bartext{
  position: relative; display: block; line-height: 26px; font-family: var(--font-label); font-size: 0.95rem;
  color: #fff; font-variant-numeric: tabular-nums; 
}
.reward__ghost{ position: absolute; right: -30px; top: 50%; translate: 0 -50%; width: 46px; height: 46px; opacity: 0.45; filter: grayscale(0.3); }
.reward__nexttext{ margin: 0; font-size: 1rem; line-height: 1.4; color: rgba(255, 255, 255, 0.85); }
.reward__actions{ display: grid; justify-items: center; gap: 8px; margin-top: clamp(2px, 1.4cqh, 10px); }
/* Two buttons sit side by side: stacked, they cost the picture a whole row. */
.reward__actions:has(> .reward__close:not([hidden])){ width: min(360px, 100%); grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.reward__actions:has(> .reward__close:not([hidden])) > *{ min-width: 0; width: 100%; }
.reward__close[hidden]{ display: none; }
/* A short phone with three power-ups to list: tighter rows, so the how-to line and Collect stay on the glass. */
@container (max-height: 600px){
  .reward__extras{ gap: 4px; }
  .reward__extra{ padding: 2px 12px 2px 6px; }
  .reward__extra img{ width: 36px; height: 36px; }
  .reward__extratext b{ font-size: 1.05rem; }
  .reward__extratext small{ font-size: 0.78rem; }
  .reward__medal{ min-height: 40px; }
}
/* A laptop window (1000x516): the stacked reveal had 18px too much, so the last row peeked out under the Collect button. A smaller title and less padding give it back. */
@media (orientation: landscape) and (min-height: 501px){ @container (max-height: 600px){
  .reward:not([hidden]){ padding-block: calc(8px + var(--safe-t)) calc(8px + var(--safe-b)); }
  .reward__title{ font-size: clamp(1.8rem, 9cqh, 3rem); margin: 2px 0 0; }
} }
/* The smallest upright phones, and sideways under the bars: a power-up's name is enough, and Collect stays on the glass. */
@media (orientation: portrait){ @container (max-height: 540px){ .reward__extratext small{ display: none; } } }
@media (orientation: landscape){ @container (max-height: 310px){
  .reward__extratext small{ display: none; }
  .reward__num{ font-size: 1.6rem; }
  .reward__actions .button{ padding-block: 4px 6px; }
} }
.reward__collect{ min-width: 220px; }
.reward__collect:disabled{ cursor: default; }
.reward__close{ min-width: 140px; }
.reward__close:disabled{ cursor: default; }
/* A skin drawn on a canvas is not square like a medal. */
.reward__medal{ object-fit: contain; }
/* A worm (ui/skinPortrait.ts) is taller than a medal is wide: its whole body stands in the picture. */
.reward__medal.is-worm{ height: clamp(170px, 30cqh, 270px); }

/* The beats. `both` holds each piece hidden until its moment. */
.reward.is-playing .reward__eyebrow{ animation: rw-fade 150ms ease-out 450ms both; }
.reward.is-playing .reward__medal{ animation: rw-drop 520ms cubic-bezier(0.3, 1.5, 0.5, 1) 0ms both, rw-sway 3s ease-in-out 1200ms infinite; }
.reward.is-playing .reward__title{ animation: rw-title 420ms cubic-bezier(0.34, 1.56, 0.64, 1) 600ms both; }
.reward.is-playing .reward__ribbonwrap{ animation: rw-unfold 260ms cubic-bezier(0.34, 1.56, 0.64, 1) 900ms both; }
.reward.is-playing .reward__num{ animation: rw-fade 200ms ease-out 1250ms both; }
.reward.is-playing .reward__next{ animation: rw-fade 300ms ease-out 2100ms both; }
.reward.is-playing .reward__actions{ animation: rw-pop 200ms cubic-bezier(0.34, 1.56, 0.64, 1) 2600ms both; }
/* A tap skips: every piece jumps to where it ends. */
.reward.is-skipped *{ animation-delay: 0s !important; animation-duration: 1ms !important; }
.reward.is-skipped .reward__medal{ animation: none !important; }

/*
 * A phone on its side: two columns, the prize on the left and what it paid
 * with Collect on the right. One column put Collect below the screen at
 * 844x360, and the reveal could not be closed (27 Sep 2026).
 */
@media (orientation: landscape) and (max-height: 500px) {
  .reward{ padding: 10px 16px; }
  .reward__stage{ width: min(820px, 100%); flex-direction: row; justify-content: center; gap: 28px; }
  .reward__hero, .reward__paid{ display: flex; flex-direction: column; align-items: center; gap: clamp(2px, 1.6cqh, 6px); flex: 1 1 0; min-width: 0; max-height: 100cqh; }
  .reward__paid{ justify-content: center; }
  .reward__medal{ height: clamp(70px, 26cqh, 130px); min-height: 44px; }
  .reward__medal.is-worm{ height: clamp(90px, 32cqh, 160px); }
  .reward__title{ font-size: clamp(1.5rem, 9cqh, 2.8rem); margin: 0; }
  .reward__num{ font-size: clamp(1.9rem, 12cqh, 3.4rem); margin: 0; }
  .reward__next{ gap: 2px; margin-top: 0; }
  .reward__nexttext{ font-size: 0.8rem; line-height: 1.2; }
  .reward__extra{ padding: 2px 12px 2px 6px; }
  .reward__extra img{ width: 34px; height: 34px; }
  .reward__extratext b{ font-size: 1.05rem; }
  .reward__extratext{ display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; }
  .reward__extratext small{ font-size: 0.72rem; }
  .reward__extras{ gap: 3px; }
  /* Wear it and Close side by side: stacked they pushed the stage off a short screen. */
  .reward__actions{ margin-top: 2px; width: 100%; }
  .reward__collect, .reward__close{ min-width: 0; width: 100%; }
  .reward__note{ font-size: 0.72rem; line-height: 1.15; }
  .reward__burst{ left: 25%; }
  /*
   * Nothing to count (a sign-in with no bonus): one column, centred. Two put
   * Play alone at the top right and squeezed the ribbon off the left edge
   * (Gray's iPhone home-screen app, 11 Oct 2026).
   */
  .reward__stage:not(:has(:is(.reward__num, .reward__extras, .reward__next):not([hidden]))){ width: min(520px, 100%); flex-direction: column; gap: clamp(2px, 1.6cqh, 6px); }
  .reward__stage:not(:has(:is(.reward__num, .reward__extras, .reward__next):not([hidden]))) > :is(.reward__hero, .reward__paid){ display: contents; }
  .reward__stage:not(:has(:is(.reward__num, .reward__extras, .reward__next):not([hidden]))) .reward__actions{ width: min(320px, 100%); }
  /* The whole stage's width, so a two-sentence note (the Rider's: worn after the event) stays on two lines. */
  .reward__stage:not(:has(:is(.reward__num, .reward__extras, .reward__next):not([hidden]))) .reward__note{ max-width: 100%; }
  .reward__stage:not(:has(:is(.reward__num, .reward__extras, .reward__next):not([hidden]))) .reward__medal.is-worm{ height: clamp(80px, 26cqh, 150px); }
  .reward__stage:not(:has(:is(.reward__num, .reward__extras, .reward__next):not([hidden]))) .reward__burst{ left: 50%; }
}
/* The ribbon never wider than the screen: its words wrap inside it instead. */
.reward__ribbonwrap{ max-width: 100%; }
.reward__ribbon{ max-width: 100%; font-size: clamp(1rem, 5.4vw, 1.45rem); }

@keyframes rw-spin{ to{ rotate: 360deg; } }
/*
 * Light rays that turn INSIDE their own box. They used to be a square 900 to
 * 1400px across, spun in place: clipped on screen, but iPhone Safari sizes a
 * portal's iframe to its content, so the game grew wider than the frame and
 * sat off to the right from the loading screen on (Gray, CrazyGames on an
 * iPhone held sideways, 28 Sep 2026). Now the gradient's start angle turns
 * and the element is never larger than what it covers.
 */
/*
 * The turning rays (loading screen, death screen, daily wheel, reward reveal): a pre-drawn layer turned whole, which the
 * graphics chip does on its own. They turned a gradient's start angle before (an animated custom property), which
 * repainted the gradient every frame on the main thread: the death screen ran at 42 fps on an NVIDIA Shield, 58 with
 * the rays held still (17 Nov 2026).
 */
@keyframes ray-spin{ to{ rotate: 360deg; } }
@keyframes rw-fade{ from{ opacity: 0; translate: 0 6px; } }
@keyframes rw-drop{ 0%{ opacity: 0; translate: 0 -40%; scale: 1.6; } 60%{ opacity: 1; scale: 0.92; } 100%{ scale: 1; } }
@keyframes rw-sway{ 0%, 100%{ rotate: -3deg; } 50%{ rotate: 3deg; } }
@keyframes rw-title{ from{ opacity: 0; scale: 0.4; translate: 0 0.5em; } 60%{ opacity: 1; scale: 1.1; } }
@keyframes rw-unfold{ from{ scale: 0 1; opacity: 0; } }
@keyframes rw-pop{ from{ scale: 0.8; opacity: 0; } }
@keyframes rw-fill{ from{ width: 0; } }
@keyframes rw-land{ 40%{ scale: 1.24; } }
@keyframes rw-fly{
  0%{ transform: translate(0, 0) rotate(0) scale(0.3); opacity: 0; }
  6%{ opacity: 1; } 82%{ opacity: 1; }
  100%{ transform: translate(var(--dx), var(--dy)) rotate(var(--r)) scale(1); opacity: 0; }
}
@keyframes trophy-badge-pulse{ 0%, 100%{ transform: scale(1); opacity: 1; } 50%{ transform: scale(1.1); opacity: 0.8; } }

@media (prefers-reduced-motion: reduce){
  .reward__rays, .reward__rays::before, .reward *{ animation: none !important; }
  .trophy__badge.is-pulsing{ animation: none; }
}

@media (max-width: 760px){
  .dossier{ grid-template-columns: minmax(0, 1fr); }
  .statgrid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trophies{ grid-template-columns: minmax(0, 1fr); }
}
/*
 * Off the play screen. The footer row stays in the page, so every page is
 * still linked from the homepage for a crawler, and the ☰ menu in the top
 * rail carries the same links for a player; the badges, key hints and rules
 * line go, as in every front screen in the genre.
 */
.menu__foot{ display: none; }

/* The death screen's XP line, and a level-up (SOT section 4). */
.death__xp{
  margin: -4px 0 8px; font-family: var(--font-label); font-size: 1.3rem; color: #c6f432;
}
.death__xp[hidden]{ display: none; }
/* The XP pill and the level beside it; a level-up is a gold one that pulses. */
.death__xp{ display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; }
.death__xp[hidden]{ display: none; }
.death__xp [data-death-level]{
  padding: 3px 12px 4px; border-radius: 999px; border: 2px solid #fff; background: linear-gradient(180deg, #b9a8ff, #6a52e6);
  font-family: var(--font-label); font-size: 0.95rem; color: #fff; --ts: #2c1a7a;
}
.death__xp .death__levelup{ background: linear-gradient(180deg, #ffd24a, #d97300 85%); --ts: #6e3200; animation: tile-pulse 1.1s ease-in-out infinite; }
.death__levelup{ color: #ffd27a; }

/* ------------------------------------------------------ the burrow */
/*
 * The Burrow, the wardrobe inside the game (ui/burrowScreen.ts, gameShell
 * data-game-burrow). Gray, 15 Sep 2026, from Worms Zone's wardrobe, and again
 * on 18 Sep with their Wardrobe and ours side by side: "their layout is way
 * better, bigger cards, better styling, thats what im saying we do similar".
 * So it is their layout: tabs along the top, a rail of icon buttons down the
 * left, the worm standing on a lit stage, and big sunburst cards in two rows
 * that scroll sideways. The Settings screen's shell and the house pieces
 * (Candy buttons, .station, .iconbtn); what is new here is layout, the five
 * rarity colours and the painted stages and cards.
 */
.game:has([data-game-burrow]:not([hidden])) :is([data-game-dock], .hud){ visibility: hidden; }

/* The skin card's picture is the way in: a picture button, like your picture top left. */
button.pickcard__art{
  appearance: none; -webkit-appearance: none; margin: 0; padding: 0; border: 0;
  background: none; color: inherit; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
@media (hover: hover){ button.pickcard__art:hover canvas{ filter: brightness(1.1); } }
button.pickcard__art:focus-visible{ outline: 3px solid #fff; outline-offset: 3px; }

/*
 * Rarity colours, the SOT's order, as the painted stages and cards are
 * (ui/stage-*.webp, ui/card-*.webp): Common silver-grey, Rare royal blue, Epic
 * violet, Legendary gold-orange, Mythical hot pink. --rarity is the bright
 * face, --rarity-deep the shade under it.
 */
.screen--burrow, .screen--burrow [data-rarity="common"]{ --rarity: #c9d2df; --rarity-deep: #56627a; --stage-art: url(/ui/stage-common.webp?v=db85e601); --card-art: url(/ui/card-common.webp?v=817dba22); }
.screen--burrow [data-rarity="rare"]{ --rarity: #4f8dff; --rarity-deep: #1b3ca3; --stage-art: url(/ui/stage-rare.webp?v=9123adc1); --card-art: url(/ui/card-rare.webp?v=b1324876); }
.screen--burrow [data-rarity="epic"]{ --rarity: #b36bff; --rarity-deep: #531fa6; --stage-art: url(/ui/stage-epic.webp?v=cbfbb8b2); --card-art: url(/ui/card-epic.webp?v=9481a0ec); }
.screen--burrow [data-rarity="legendary"]{ --rarity: #ffb12e; --rarity-deep: #b05200; --stage-art: url(/ui/stage-legendary.webp?v=f8e1ab74); --card-art: url(/ui/card-legendary.webp?v=579393d3); }
.screen--burrow [data-rarity="mythical"]{ --rarity: #ff4fb0; --rarity-deep: #980e5c; --stage-art: url(/ui/stage-mythical.webp?v=2603260d); --card-art: url(/ui/card-mythical.webp?v=18a59e17); }

/*
 * The shell: one row across the top, then rail | showcase | cards. Bigger
 * than the Settings screen's (Gray: "bigger cards"), and it never scrolls
 * up and down: on a phone held sideways the cards scroll sideways instead.
 */
.screen--burrow{ grid-template-rows: auto minmax(0, 1fr); width: min(1280px, 100%); height: min(820px, 100%); }
.burrow__bar{ gap: 10px; padding: 8px 10px 8px 16px; border-bottom: 4px solid rgba(255, 255, 255, 0.14); }
.burrow__bar .screen__title{ margin: 0; flex: none; }
/* The front screen's Nuggets pill opens the same offer. */
.nuggetpill.is-offer{ cursor: pointer; }
.nuggetpill.is-offer::after{ content: "+"; margin-left: 2px; font-size: 1.1em; color: #c6f432; }
.burrow__tabs{ display: flex; flex: 1 1 auto; min-width: 0; gap: 6px; margin-right: auto; }
.burrow__tabs .button--tab{ min-height: 54px; border-radius: 16px; }
.burrow__tabs .button--tab.is-selected{ max-width: 280px; }

.burrow{
  position: relative; z-index: 1; min-height: 0;
  display: grid; grid-template-columns: auto clamp(180px, 25vw, 330px) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr); grid-template-areas: "rail show pane"; gap: clamp(8px, 1.3vw, 16px);
  padding: clamp(8px, 1.3vw, 16px) clamp(8px, 1.3vw, 16px) 0;
}
/* Power-ups need the room; eyes and mouths keep the worm on its stage, wearing
   the face being tried on — the reason to have a showcase there at all. */
.burrow[data-tab="upgrades"][data-upgrade="powerups"]{ grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "rail pane"; }
.burrow[data-tab="upgrades"][data-upgrade="powerups"] .showcase{ display: none; }

/* Eyes and mouths reuse the skin card whole; only the art is a picture, not a drawing. */
.facecard img.burrowcard__art{ object-fit: contain; padding: 16% 10% 18%; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.4)); }
/* The plain card: your own worm's face (facePicker, drawWormAvatar), square, in the middle of the card. */
.facecard .facecard__own{ justify-self: center; align-self: center; width: 62%; height: auto; aspect-ratio: 1 / 1; max-height: 100%; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.4)); }

/* The rail: square icon buttons down the left, the chosen one ringed in lime. */
.burrow__rails{ grid-area: rail; min-height: 0; }
.burrow__rail{ display: flex; flex-direction: column; gap: 8px; }
.burrow__rail[hidden]{ display: none; }
.burrow__railbtn{ position: relative; width: clamp(42px, 7vh, 56px); height: clamp(42px, 7vh, 56px); border-radius: 14px; --rim: 3px; }
/* A block, so it has no text baseline to sit on, and a size that does not
   depend on the button's shape. As a percentage of the WIDTH it came out 63px
   across a 46px-tall pill (21 Sep); as a percentage of the HEIGHT it had
   nothing to resolve against in a grid cell sized by its content, fell back
   to the tag's own 30px, and sat 2px off the bottom on a phone (Gray, 23 Sep
   2026: "the nugget is not good on smaller viewports"). 28px is the size the
   stroke icons beside it draw at. */
.burrow__railbtn img{ object-fit: contain; filter: drop-shadow(0 2px 1px rgba(0, 0, 0, 0.5)); }
.burrow__railbtn[aria-pressed="true"]{ --rimA: #e8ff7a; --rimB: #c6f432; --bodyA: #b9a8ff; --bodyB: #8f78ff; --bodyC: #6a52e6; }

/*
 * The showcase: the whole panel in the rarity colour, the name on a banner,
 * and the worm standing on a lit stage with its button on the stage's front.
 * The stage is the painted pedestal for the rarity (Gray: "generate a real
 * image man, no cheap shit here"); the drawn one under it only shows while
 * the painting has not loaded (burrowScreen.ts adds .has-stage-art).
 */
.showcase{
  grid-area: show; min-height: 0; min-width: 0;
  /* A column, not a grid of numbered rows: a piece that hides (the rarity word
     on a phone, the bar once owned) must not hand the stage's row to another. */
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  margin-bottom: clamp(8px, 1.3vw, 16px); padding: 10px 10px 12px; border-radius: 22px; border: 4px solid #fff;
  background: radial-gradient(ellipse 110% 70% at 50% 28%, color-mix(in srgb, var(--rarity) 88%, #fff), var(--rarity-deep) 88%);
  box-shadow: 0 0 0 2px #1a1150, inset 0 -6px 0 rgba(0, 0, 0, 0.22);
}
.showcase > :not(.showcase__stage){ flex: none; }
.showcase__banner{
  margin: 0; max-width: 100%; padding: 2px 6px 4px; text-align: center;
  font-family: "Lilita One", var(--font-display); font-size: clamp(1.4rem, 2.8vw, 2.4rem); line-height: 1.15; color: #fff;
}
/* The worm's name is ringed lettering (.fx, the house layered type): a dark outline, the rarity's own rim, a pale fill. */
.showcase__banner .fx{ white-space: normal; max-width: 100%; text-wrap: balance; overflow-wrap: anywhere; line-height: 1.15; }
.showcase__banner .fx::before{ color: #1a1150; -webkit-text-stroke: 0.3em #1a1150; filter: drop-shadow(0 0.07em 0 #1a1150) drop-shadow(0 0.12em 0.1em rgba(0, 0, 0, 0.45)); }
.showcase__banner .fx::after{ color: var(--rarity); -webkit-text-stroke: 0.14em var(--rarity); }
.showcase__banner .fx > span{ background-image: linear-gradient(180deg, #fff 0 52%, color-mix(in srgb, var(--rarity) 30%, #fff) 54% 100%); }
.showcase__rarity{
  margin: -2px 0 0; font-family: var(--font-label); font-size: clamp(0.85rem, 1.4vw, 1.05rem);
  letter-spacing: 0.08em; text-transform: uppercase; color: #fff;
  --ts: var(--rarity-deep);
}
.showcase__stage{
  --s: min(100cqw, 100cqh);
  position: relative; container-type: size; flex: 1 1 0; width: 100%; min-height: 0;
  background: var(--stage-art) center bottom / contain no-repeat;
}
/* The spotlight from above, in the rarity colour. */
.showcase__light{
  position: absolute; left: 50%; top: 0; bottom: calc(var(--s) * 0.16); width: calc(var(--s) * 0.9); margin-left: calc(var(--s) * -0.45);
  pointer-events: none; clip-path: polygon(36% 0, 64% 0, 100% 100%, 0 100%);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.14) 70%, transparent);
}
/* The drawn stage, until the painted one arrives. */
.showcase__stage::before{
  content: ""; position: absolute; left: 50%; bottom: calc(var(--s) * 0.04);
  width: calc(var(--s) * 0.86); height: calc(var(--s) * 0.3); margin-left: calc(var(--s) * -0.43); border-radius: 50%;
  background: radial-gradient(ellipse at 50% 28%, #fff 0 8%, color-mix(in srgb, var(--rarity) 55%, #fff) 30%, var(--rarity-deep) 62%, #1a1150 100%);
  box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--rarity), 0 0 30px 8px color-mix(in srgb, var(--rarity) 70%, transparent), 0 10px 0 6px rgba(26, 17, 80, 0.55);
}
.has-stage-art .showcase__stage::before{ display: none; }
/* The worm stands on the pedestal's top: its head is drawn at the canvas's foot. */
.showcase__art{ position: absolute; left: 0; top: 0; z-index: 1; display: block; width: 100%; height: calc(100% - var(--s) * 0.19 - 20px); }
.showcase__action{
  position: absolute; left: 0; right: 0; bottom: calc(var(--s) * 0.02); z-index: 2;
  width: max-content; max-width: 100%; margin-inline: auto; font-size: clamp(1rem, 1.8vw, 1.4rem); padding: 5px 18px 8px;
}
.showcase__action svg{ width: 1.2em; height: 1.2em; flex: none; }
.showcase__action .nugamt__icon{ width: 1.4em; height: 1.4em; }
.showcase__action:disabled{ opacity: 1; filter: none; cursor: default; }
.showcase__route{ margin: 0; max-width: 100%; text-align: center; font-size: clamp(0.72rem, 1.2vw, 0.9rem); line-height: 1.3; color: #fff;  }
/*
 * The stage keeps one size whichever worm is focused: the route line and the
 * progress bar keep their room when a worm has none (an owned one), or the
 * stage grew and shrank under it on every pick (Gray, 4 Oct 2026: "the whole
 * preview changes sizes, it looks untidy and glitchy").
 */
.showcase__route{ min-height: 2.6em; }
.showcase__route:empty{ visibility: hidden; }
.showcase__bar{
  position: relative; width: 100%; height: 20px; border-radius: 8px; overflow: hidden;
  background: rgba(20, 14, 60, 0.75); box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.45);
  font-family: var(--font-label); font-size: 0.8rem; color: #fff; 
}
.showcase__bar[data-off]{ visibility: hidden; }
.burrow:not([data-catwalk]) .showcase__bar[data-off]{ display: none; }
.showcase__bar > i{ position: absolute; inset: 0 auto 0 0; background: linear-gradient(180deg, #ffd27a, #ff9f1c 55%, #ff4fad); }
.showcase__bar > span{ position: relative; display: block; text-align: center; line-height: 20px; font-variant-numeric: tabular-nums; }

/*
 * THE CATWALK (ui/catwalk.ts). On Shop and My Worms the stage fills the screen
 * and your worms stand in a row on it: the chosen one big in the middle, its
 * neighbours smaller either side, and a swipe walks the row. The name rides
 * the top, the button the pedestal; held sideways the route and the progress
 * stand in a column beside the stage, held upright they sit under it.
 *
 * What moves is only a transform and an opacity on a fixed pool of seven
 * slides, each a picture drawn once by the game's own worm renderer: nothing
 * is laid out or painted while a thumb is on it.
 */
.burrow[data-catwalk]{ grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "rail show"; }
.burrow[data-catwalk] .burrow__pane{ display: none; }
.burrow[data-catwalk] .showcase{
  display: grid; grid-template-columns: minmax(0, 1fr) clamp(150px, 26%, 270px); grid-template-rows: minmax(0, 1fr);
  grid-template-areas: "stage info"; align-items: stretch; column-gap: clamp(8px, 1.3vw, 16px); padding: 8px 12px 10px 8px;
}
.burrow[data-catwalk] .showcase__stage{ grid-area: stage; height: auto; min-height: 0; --head: 2.9rem; --pedestal: calc(var(--s) * 0.19 + 20px); --ch: calc(100cqh - var(--head) - var(--pedestal)); }
.burrow[data-catwalk] .showcase__banner{ grid-area: stage; align-self: start; justify-self: center; z-index: 3; max-width: calc(100% - 110px); pointer-events: none; padding-top: 4px; }
.burrow[data-catwalk] .showcase__heart{ grid-area: stage; align-self: start; justify-self: end; z-index: 4; margin: 2px 2px 0 0; }
.burrow[data-catwalk] .showcase__info{
  grid-area: info; display: flex; flex-direction: column; justify-content: center; align-items: stretch; gap: 8px; min-width: 0; min-height: 0; overflow: hidden;
}
.burrow[data-catwalk] .showcase__rarity{ margin: 0; text-align: center; }
.burrow[data-catwalk] .showcase__info > [data-burrow-get-nuggets], .burrow[data-catwalk] .showcase__info > [data-burrow-cash]{ align-self: center; min-height: 44px; }
.burrow[data-catwalk] .burrow__count{ display: block; position: static; text-align: center; font-size: 0.85rem; }
/* A shelf with nothing on it: just the words, in the middle of the stage. */
.burrow[data-catwalk][data-walk="off"] :is(.showcase__banner, .showcase__art, .showcase__action, .showcase__heart, .showcase__info, .showcase__light){ display: none; }
.burrow[data-catwalk] .burrow__empty{ display: grid; place-items: center; inset: var(--head) 8% 12%; }
.burrow[data-catwalk] .burrow__empty[hidden]{ display: none; }
.showcase__info{ display: contents; }
.showcase__place{ margin: 0; text-align: center; font-family: "Lilita One", var(--font-display); font-size: 1rem; color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.45); font-variant-numeric: tabular-nums; }
.showcase__place:empty{ display: none; }
/* The scrub bar: drag it to run along a long list; it is the shop's 140 worms in one thumb's reach. */
.catwalk__scrub{ display: none; position: relative; flex: none; height: 30px; width: 100%; touch-action: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.burrow[data-walk="on"] .catwalk__scrub{ display: block; }
.catwalk__scrub::before, .catwalk__scrub > i{ content: ""; position: absolute; left: 0; right: 0; top: 11px; height: 8px; border-radius: 5px; }
.catwalk__scrub::before{ background: rgba(20, 14, 60, 0.75); box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.45); }
.catwalk__scrub > i{ background: linear-gradient(180deg, #e8ff7a, #c6f432 60%, #8fd117); transform-origin: 0 50%; transform: scaleX(0); will-change: transform; }
.catwalk__scrub > b{ position: absolute; left: 0; top: 3px; width: 24px; height: 24px; border-radius: 50%; border: 3px solid #fff; background: linear-gradient(180deg, #e8ff7a, #8fd117); box-shadow: 0 0 0 2px #1a1150, 0 3px 0 rgba(0, 0, 0, 0.3); will-change: transform; }
/* A worm you own: keep it among your favourites, from the stage itself. */
.showcase__heart{ width: 44px; height: 44px; border-radius: 14px; --rim: 3px; }
.showcase__heart[hidden]{ display: none; }
.showcase__heart svg{ width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linejoin: round; }
.showcase__heart[aria-pressed="true"]{ --bodyA: #ff9ddf; --bodyB: #ff4fad; --bodyC: #d11f7c; --ts: #7a0f48; }
.showcase__heart[aria-pressed="true"] svg{ fill: #fff; }

/* The row itself: the same box the lone worm stands in, above the pedestal and below the name. */
.catwalk, .catwalk__nav{ display: none; }
.burrow[data-walk="on"] .catwalk{ display: block; }
.burrow[data-walk="on"] .catwalk__nav{ display: grid; }
.burrow[data-walk="on"] .showcase__art{ display: none; }
.burrow[data-catwalk] .showcase__art{ top: var(--head); height: var(--ch); }
.catwalk{
  --sw: min(calc(var(--ch) * 0.74), 40cqw);
  position: absolute; z-index: 1; left: 0; right: 0; top: var(--head); height: var(--ch);
  touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
  contain: layout style paint;
}
.catwalk:active{ cursor: grabbing; }
.catwalk:focus-visible{ outline: 3px solid #fff; outline-offset: -3px; border-radius: 18px; }
.catwalk__slide{
  position: absolute; left: 50%; bottom: 0; width: var(--sw); height: 100%; margin-left: calc(var(--sw) / -2);
  transform-origin: 50% 100%; opacity: 0; will-change: transform, opacity; contain: layout style;
}
.catwalk__slide[data-off]{ visibility: hidden; }
/* Each worm's own patch of floor, so the ones beside the middle stand on something too. */
.catwalk__slide::before{
  content: ""; position: absolute; left: 6%; right: 6%; bottom: -5%; height: 9%; border-radius: 50%;
  background: radial-gradient(ellipse at 50% 50%, rgba(10, 4, 40, 0.5), rgba(10, 4, 40, 0) 70%);
}
.catwalk__art{ position: relative; display: block; width: 100%; height: 100%; pointer-events: none; }
.catwalk__badge{
  position: absolute; left: 50%; bottom: 3%; z-index: 2; margin-left: 15%; display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 50%; border: 3px solid #fff; pointer-events: none;
  font-family: "Lilita One", var(--font-display); font-size: 0.95rem; line-height: 1; color: #fff;
}
.catwalk__badge[hidden]{ display: none; }
.catwalk__badge[data-kind="worn"]{ background: linear-gradient(180deg, #9dff5c, #3fbf1a); box-shadow: 0 0 0 2px #1a5a0c; text-shadow: 0 1px 0 #1a5a0c; }
.catwalk__badge[data-kind="locked"]{ background: linear-gradient(180deg, #8f78ff, #5a43d6); box-shadow: 0 0 0 2px #1a1150; }
.catwalk__badge svg{ width: 14px; height: 14px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
/* While the row is walking, the words and the button belong to the worm it left, so they dim and wait. */
.showcase__banner, .showcase__info > :not(.catwalk__scrub), .showcase__action{ transition: opacity 120ms ease-out; }
.showcase[data-moving] :is(.showcase__banner, .showcase__info > :not(.catwalk__scrub), .showcase__action){ opacity: 0.45; }
.showcase[data-moving] .showcase__action{ pointer-events: none; }
@media (prefers-reduced-motion: reduce){ .showcase__banner, .showcase__info > :not(.catwalk__scrub), .showcase__action{ transition: none; } }
.catwalk__nav{ position: absolute; z-index: 4; top: calc(var(--head) + var(--ch) / 2 - 23px); width: 46px; height: 46px; }
.catwalk__nav--prev{ left: 2px; }
.catwalk__nav--next{ right: 2px; }
.catwalk__nav svg{ width: 26px; height: 26px; }
.catwalk__nav:disabled{ opacity: 0.35; cursor: default; }
.burrow[data-catwalk] .burrow__empty{ z-index: 3; }
@media (prefers-reduced-motion: reduce){ .catwalk__slide{ will-change: auto; } }
/* A phone held sideways, or any short screen: the name and the pedestal take less, so the worms get the height. */
@media (max-height: 520px){
  .burrow[data-catwalk] .showcase__stage{ --head: 2.1rem; --pedestal: calc(var(--s) * 0.15 + 8px); }
  .showcase__banner{ font-size: clamp(1.2rem, 2.4vw, 1.7rem); }
}
/* Five chips down the rail do not fit a phone held sideways at its shortest: they shrink to the least a finger can use. */
@media (orientation: landscape) and (max-height: 360px){
  .burrow[data-catwalk] .showcase__info{ gap: 3px; }
  .burrow[data-catwalk] .showcase__place{ display: none; }
  .burrow[data-catwalk] .showcase__route{ -webkit-line-clamp: 4; line-height: 1.2; }
  .burrow[data-catwalk] .burrow__rail{ gap: 3px; }
  .burrow[data-catwalk] .burrow__railbtn{ width: 46px; height: 38px; border-radius: 12px; }
}
/* The rarity word has the info column to itself on the catwalk, so a short screen keeps it. */
@media (orientation: landscape) and (max-height: 420px){ .burrow[data-catwalk] .showcase__rarity{ display: block; } }

/*
 * The cards: two rows that scroll sideways, each card sized off the height
 * it is given so a phone held sideways still gets two whole rows, and the
 * next column is cut off at the right edge to say there is more.
 */
.burrow__pane{ grid-area: pane; position: relative; min-width: 0; min-height: 0; container-type: size; }
.burrow__pane[hidden]{ display: none; }
.burrow__grid{
  --gap: clamp(8px, 1.2vw, 14px);
  /* How far each card's price pill hangs below it; the rows leave room for it. */
  --drop: 15px;
  --row: calc((100cqh - var(--gap) - var(--drop) * 2 - 14px) / 2);
  display: grid; grid-auto-flow: column; grid-template-rows: repeat(2, var(--row));
  grid-auto-columns: calc(var(--row) * 0.82); column-gap: var(--gap); row-gap: calc(var(--gap) + var(--drop));
  height: 100%; padding: 2px 4px calc(var(--drop) + 12px); overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x proximity; overscroll-behavior-x: contain;
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.4) transparent;
}
.burrow__cell{ position: relative; scroll-snap-align: start; min-height: 0; }
/* A card a screen and a half or more from the visible part of the shelf is out of style, layout and paint (burrowScreen.ts markFar). Its box stays (the grid sizes it) and keeps the card's coloured face (the rule at .burrowcard), so a fling that outruns the shelf shows blank cards, never gaps. */
.burrow__cell.is-far{ content-visibility: hidden; contain-intrinsic-size: auto 120px 150px; }
.burrowcard, .burrow__cell.is-far{
  position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 0;
  width: 100%; height: 100%; padding: 7px 7px 0; text-align: left; color: #fff;
  border-radius: 18px; border: 3px solid rgba(255, 255, 255, 0.9);
  background:
    var(--card-art) center / cover no-repeat,
    repeating-conic-gradient(from 0deg at 50% 55%, rgba(255, 255, 255, 0.13) 0deg 9deg, transparent 9deg 18deg),
    radial-gradient(circle at 50% 55%, color-mix(in srgb, var(--rarity) 80%, #fff), var(--rarity-deep) 78%);
  box-shadow: 0 0 0 2px #1a1150, inset 0 -5px 0 rgba(0, 0, 0, 0.2);
}
@media (hover: hover){ .burrowcard:hover:not(:disabled){ border-color: #fff; filter: brightness(1.07); } }
.burrowcard:focus-visible{ outline: 3px solid #fff; outline-offset: 3px; }
.burrowcard.is-focused{ border-color: #8dff3c; box-shadow: 0 0 0 3px #8dff3c, 0 0 18px 2px rgba(141, 255, 60, 0.65); }
.burrowcard .station__name{
  position: relative; z-index: 1; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: var(--font-label); font-weight: 400; font-size: clamp(0.82rem, 1.5vw, 1.15rem); color: #fff;
}
.burrowcard__art{ display: block; width: 100%; height: 100%; min-height: 0; }
/* Drawing a card's picture resizes its canvas, which re-laid-out the whole shelf once per card (a draw reads the size back, so each one was a full layout): the canvas's size is the card's, never its own. */
canvas.burrowcard__art{ contain: strict; }
/* The chunky pill on the card's foot: the price, a video, how it is earned, or yours. */
.burrowcard__tag{
  position: absolute; left: 0; right: 0; bottom: calc(var(--drop) * -1); z-index: 1;
  width: max-content; max-width: calc(100% + 6px); margin-inline: auto; gap: 4px;
  padding: 3px 10px 6px; font-size: min(clamp(0.72rem, 1.2vw, 1rem), 10.5cqi); letter-spacing: -0.02em; white-space: nowrap; pointer-events: none;
}
.burrowcard__tag svg{ width: 1.1em; height: 1.1em; flex: none; }
/* What you're wearing: a green tick in the corner. */
.burrowcard__worn{
  position: absolute; top: -8px; right: -8px; z-index: 2; display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 50%; border: 3px solid #fff;
  background: linear-gradient(180deg, #9dff5c, #3fbf1a); box-shadow: 0 0 0 2px #1a5a0c;
  font-family: var(--font-label); font-size: 0.95rem; color: #fff; --ts: #1a5a0c;
}
/* Low on the card's right, over the body rather than the name or the face. */
.burrowcard__heart{ position: absolute; right: 6px; bottom: calc(var(--drop) + 8px); z-index: 2; width: 32px; height: 32px; border-radius: 11px; --rim: 3px; }
.burrowcard__heart svg{ fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linejoin: round; }
.burrowcard__heart[aria-pressed="true"]{ --bodyA: #ff9ddf; --bodyB: #f0369c; --bodyC: #c2166f; --ts: #7a0f48; }
.burrowcard__heart[aria-pressed="true"] svg{ fill: #fff; }
.burrow__empty{ position: absolute; inset: 30% 10% auto; text-align: center; font-size: 1rem; color: #fff; }
/* A creature's face panes: why there is nothing to wear, and the way to a worm that can. */
.facelock{ display: grid; justify-items: center; gap: 12px; }
/* The Glow Beads food card: the original glowing pellets, drawn here as they are in the arena. */
.station__swatch--glow{
  background:
    radial-gradient(circle at 28% 34%, #6ee7ff 0 7%, rgba(110, 231, 255, 0.45) 11%, transparent 20%),
    radial-gradient(circle at 66% 26%, #ffd166 0 6%, rgba(255, 209, 102, 0.45) 10%, transparent 18%),
    radial-gradient(circle at 52% 60%, #ff6b9d 0 8%, rgba(255, 107, 157, 0.45) 12%, transparent 22%),
    radial-gradient(circle at 24% 74%, #9dff6e 0 6%, rgba(157, 255, 110, 0.45) 10%, transparent 18%),
    radial-gradient(circle at 78% 72%, #c084fc 0 7%, rgba(192, 132, 252, 0.45) 11%, transparent 20%),
    #140f34;
}
.facelock[hidden]{ display: none; }
.facelock .screen__note{ color: #fff; font-size: 1rem; }
.burrow__count{
  display: none; position: absolute; right: 8px; bottom: 6px; margin: 0; pointer-events: none;
  font-family: "Lilita One", var(--font-display); font-size: 0.95rem; color: #cbbcff;
}

/*
 * Upgrades: Worms Zone's power-up cards. The potion, its name, a level bar
 * up the card's left, how long it runs now, and a blue + with the next
 * level's price; carried charges under it. Each rail entry on this tab is
 * its own pane ([data-burrow-upgrade-pane]), so eyes and mouths slot in.
 */
.burrow__pane--upgrades{ overflow-x: hidden; overflow-y: auto; padding-bottom: 12px; scrollbar-width: thin; }
.burrow__upgrade{ display: grid; gap: 12px; align-content: start; }
.burrow__upgrade[hidden]{ display: none; }
/*
 * Eyes and mouths are the SKIN cards, so they lay out like the shop: two rows
 * sized to the pane, scrolling sideways. They were measured against nothing —
 * the pane was not a size container, so the grid's 100cqh fell back to the
 * whole window — and the cards came out a window tall, the second row cut off
 * below the pane, with a scrollbar that scrolled a pane of power-ups that was
 * not there. Gray, 23 Sep 2026: "theres no need for cards to be that big as it
 * creates scroll down that dont work".
 */
@media (orientation: landscape), (min-width: 901px){
  .burrow__upgrade:is([data-burrow-upgrade-pane="eyes"], [data-burrow-upgrade-pane="mouth"]){
    container-type: size; height: 100%; grid-template-rows: minmax(0, 1fr) auto; gap: 6px;
  }
  .burrow__upgrade:is([data-burrow-upgrade-pane="eyes"], [data-burrow-upgrade-pane="mouth"]) .burrow__grid{
    --row: calc((100cqh - var(--gap) - var(--drop) * 2 - 14px - var(--note, 0px)) / 2);
  }
  .burrow__upgrade:has(> .screen__note:not([hidden])){ --note: 2.2em; }
  .burrow__pane--upgrades:has(> .burrow__upgrade:is([data-burrow-upgrade-pane="eyes"], [data-burrow-upgrade-pane="mouth"]):not([hidden])){ overflow: hidden; padding-bottom: 0; }
}
.burrow__powerups{ display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.dayresults{ display: grid; gap: 10px; margin-bottom: 14px; }
.dayresults__you{ margin: 0; font-weight: 700; color: #fff; }
.dayresults__you:empty{ display: none; }
.powercard{
  --pu-color: #7ad6ff;
  display: grid; grid-template-columns: 56px minmax(0, 1fr); grid-template-areas: "potion head" "buy buy"; gap: 10px;
  padding: 12px; border-radius: 16px; color: #fff;
  background: color-mix(in srgb, var(--pu-color) 22%, #2a2070);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.14);
}
.powercard__potion{ grid-area: potion; position: relative; align-self: start; width: 56px; height: 56px; }
.powercard__icon{ width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: var(--pu-color); }
.powercard__charges{
  position: absolute; top: -5px; right: -7px; padding: 0 6px; border-radius: 999px; background: #fff; color: #2a2070;
  font-family: "Lilita One", var(--font-display); font-size: 0.82rem; line-height: 1.45;
}
.powercard__charges[hidden]{ display: none; }
.powercard__head{ grid-area: head; display: grid; gap: 4px; align-content: start; min-width: 0; }
.powercard__title{ display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.powercard__name{ font-family: "Lilita One", var(--font-display); font-size: 1.15rem; line-height: 1.1; }
.powercard__duration{ font-family: "Lilita One", var(--font-display); font-size: 1rem; color: #e8ff7a; }
.powercard__effect{ margin: 0; font-size: 0.82rem; line-height: 1.3; color: rgba(255, 255, 255, 0.85); }
.powercard__levels{ display: flex; gap: 3px; }
.powercard__levels i{ flex: 1; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.16); }
.powercard__levels i.is-on{ background: #e8ff7a; }
.powercard__buy{ grid-area: buy; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.powercard__buy .button{ min-width: 0; padding-inline: 4px; white-space: nowrap; font-size: min(0.86rem, 3.4cqw); }

/* The narrow end of landscape (740px phones): the tabs lose their words, the showcase slims. */
@media (max-width: 900px){
  .burrow__bar .screen__title{ font-size: 1.35rem; }
  .burrow__tabs .button--tab.is-selected .button__label{ display: none; }
  .burrow__tabs .button--tab, .burrow__tabs .button--tab.is-selected{ flex: 0 0 auto; width: 64px; min-width: 0; min-height: 46px; padding: 4px 6px 6px; }
  .burrow__tabs .button--tab.is-selected{ --rimA: #e8ff7a; --rimB: #c6f432; }
  .burrow__tabs .button--tab svg, .burrow__tabs .button--tab img{ width: 30px; height: 30px; }
  .burrow{ grid-template-columns: auto clamp(170px, 27vw, 240px) minmax(0, 1fr); }
}
@media (orientation: landscape) and (max-height: 520px){
  .overlay--screen[data-game-burrow]{ padding: 6px; }
  .burrow__bar{ padding-block: 5px; }
  .showcase__route{ font-size: 0.7rem; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
  .burrow__bar .iconbtn--close{ width: 44px; height: 44px; }
  .burrow__bar .nuggetpill{ font-size: 1.05rem; }
  .burrow__bar .nuggetpill img{ width: 24px; height: 24px; }
  .burrow__tabs .button--tab{ min-height: 44px; }
  .showcase{ gap: 3px; padding: 6px 8px 8px; border-width: 3px; }
  .showcase__banner{ padding: 2px 12px 4px; }
  .showcase__action{ font-size: 0.95rem; padding: 3px 12px 6px; --rim: 3px; }
  .burrow__grid{ --drop: 11px; }
  .burrowcard, .burrow__cell.is-far{ padding: 5px 5px 0; border-radius: 14px; }
  .burrowcard__tag{ font-size: min(0.74rem, 11.2cqi); padding: 1px 8px 4px; }
  .burrowcard__heart{ width: 26px; height: 26px; border-radius: 9px; right: 4px; }
  .burrowcard__heart svg{ width: 15px; height: 15px; }
  .powercard{ grid-template-columns: 44px minmax(0, 1fr); }
  .powercard__potion{ width: 44px; height: 44px; }
}
/* A phone held sideways: the banner's colour already says the rarity, so its word gives the worm the room. */
@media (orientation: landscape) and (max-height: 420px){
  .showcase__rarity{ display: none; }
}

/*
 * UPRIGHT: the Burrow's own layout, not the landscape one squeezed. Gray, 19 Sep
 * 2026, on his iPhone: "vertical for the burrow ain't gonna work with this
 * design". It did not: the sideways rail | showcase | cards row gave the
 * showcase a full-height column and left one column of cards beside it, and the
 * tabs ran into the wallet. Held upright the screen is a sheet, top to bottom:
 *
 *   The Burrow                    wallet   close
 *   [ shop ][ my worms ][ upgrades ]                 tabs, one full row
 *   [ worm on its stage ] name / rarity / progress   a SHORT band, not a column
 *   [ filter chips, one row ]
 *   [ cards, 2-4 across, scrolling UP AND DOWN ]     the only thing that scrolls
 *
 * The cards go the way a thumb scrolls a phone; only the landscape screen
 * scrolls them sideways (Worms Zone does the same, its wardrobe being
 * landscape only). Keyed on orientation and width so an upright tablet and a
 * narrow desktop window get it too.
 */
@media (orientation: portrait) and (max-width: 900px){
  .overlay--screen[data-game-burrow]{
    padding: calc(6px + var(--safe-t)) calc(6px + var(--safe-r)) calc(6px + var(--safe-b)) calc(6px + var(--safe-l));
  }
  .screen--burrow{ width: 100%; height: 100%; border-width: 3px; border-radius: 22px; }
  .burrow__bar{
    display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "title wallet close" "tabs tabs tabs";
    align-items: center; gap: 6px 8px; padding: 8px 8px 0 14px; border-bottom-width: 3px;
  }
  .burrow__bar .screen__title{ grid-area: title; font-size: 1.55rem; }
  .burrow__bar .nuggetpill{ grid-area: wallet; font-size: 1.1rem; }
  .burrow__bar .nuggetpill img{ width: 26px; height: 26px; }
  .burrow__bar .iconbtn--close{ grid-area: close; width: 44px; height: 44px; }
  .burrow__bar .burrow__tabs{ grid-area: tabs; margin: 0; padding-bottom: 8px; gap: 6px; }
  /* Three tabs across the full width; the chosen one is wider and says its name. */
  .burrow__bar .burrow__tabs .button--tab{ flex: 1 1 0; width: auto; min-width: 0; max-width: none; min-height: 48px; padding: 4px 6px 6px; font-size: 1rem; }
  .burrow__bar .burrow__tabs .button--tab.is-selected{ flex-grow: 2.3; max-width: none; }
  .burrow__bar .burrow__tabs .button--tab.is-selected .button__label{ display: inline; white-space: nowrap; }
  .burrow__bar .burrow__tabs .button--tab svg, .burrow__bar .burrow__tabs .button--tab img{ width: 28px; height: 28px; }

  .burrow, .burrow[data-tab="upgrades"][data-upgrade="powerups"]{
    grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr);
    grid-template-areas: "show" "rail" "pane"; gap: 8px; padding: 8px 8px 0;
  }
  /* Power-ups have no worm to show: the chips and the cards. */
  .burrow[data-tab="upgrades"][data-upgrade="powerups"]{ grid-template-rows: auto minmax(0, 1fr); grid-template-areas: "rail" "pane"; }

  /* The filter chips: one row of equal pills, so every one is a big target. */
  .burrow__rail{ display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 96px); justify-content: center; gap: 8px; }
  .burrow__rail[hidden]{ display: none; }
  .burrow__railbtn{ width: 100%; height: 46px; border-radius: 14px; }

  /* The showcase: a short band. The worm and its stage on the left, its name,
     rarity and progress on the right, and the button on the stage's front. */
  .showcase{
    display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) repeat(5, auto) minmax(0, 1fr); align-items: center; justify-items: stretch;
    column-gap: 8px; row-gap: 4px; height: clamp(168px, 27dvh, 260px); margin-bottom: 0; padding: 8px; border-radius: 18px; border-width: 3px;
  }
  .showcase__stage{ grid-column: 1; grid-row: 1 / -1; align-self: stretch; height: 100%; }
  .showcase__banner{ grid-column: 2; grid-row: 2; padding: 3px 10px 5px; font-size: clamp(1.05rem, 5vw, 1.45rem); border-radius: 12px; }
  .showcase__rarity{ grid-column: 2; grid-row: 3; margin: 0; text-align: center; font-size: 0.9rem; }
  .showcase__bar{ grid-column: 2; grid-row: 4; }
  .showcase__route{ grid-column: 2; grid-row: 5; font-size: 0.78rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .showcase > [data-burrow-get-nuggets], .showcase > [data-burrow-cash]{ grid-column: 2; grid-row: 6; justify-self: center; min-height: 44px; }
  .showcase__action{ min-height: 44px; font-size: 1.05rem; padding: 4px 14px 7px; }

  /* The cards: as many across as fit, and the pane scrolls up and down. */
  .burrow__grid{
    --gap: 12px; --drop: 15px;
    grid-auto-flow: row; grid-template-rows: none; grid-auto-rows: auto; grid-auto-columns: auto;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 128px), 1fr));
    column-gap: var(--gap); row-gap: calc(var(--gap) + var(--drop)); align-content: start;
    padding: 6px 6px calc(var(--drop) + 28px); overflow-x: hidden; overflow-y: auto;
    scroll-snap-type: none; overscroll-behavior-y: contain;
  }
  /* min-height:auto, not the sideways layout's 0: with 0 an auto row sizes to nothing and every card lands on the last. */
  .burrow__cell{ aspect-ratio: 0.82; min-height: auto; scroll-snap-align: none; }
  .burrowcard__heart{ width: 40px; height: 40px; }
  .burrow__grid{ padding-inline: 10px; }
  /* The count sat on the last card's corner; the grid is the whole story upright. */
  .burrow__count{ display: none; }
  .powercard__buy .button{ min-height: 44px; }
  /* Upgrades scrolls as a pane; the eyes and mouths grids inside it just grow. */
  .burrow__pane--upgrades .burrow__grid{ height: auto; overflow: visible; }
  /*
   * Eyes and mouths end a price pill's hang below the last card, not 28px of empty floor under it and 12px of
   * pane padding as well: at 768x1024 the three rows of mouths ran 15px past the pane and it scrolled by a sliver
   * with the last row's pills just peeking out (check-overflow PEEK). Now the rows end where the pane does.
   */
  .burrow__upgrade:is([data-burrow-upgrade-pane="eyes"], [data-burrow-upgrade-pane="mouth"]) .burrow__grid{ padding-bottom: calc(var(--drop) + 4px); }
  .burrow__pane--upgrades:has(> .burrow__upgrade:is([data-burrow-upgrade-pane="eyes"], [data-burrow-upgrade-pane="mouth"]):not([hidden])){ padding-bottom: 0; }
  .burrow__powerups{ grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
}
/* A short upright phone (360x640): the title row goes, so the tabs take its place beside the wallet and close. */
@media (orientation: portrait) and (max-width: 900px) and (max-height: 700px){
  .burrow__bar{ grid-template-areas: "tabs wallet close"; padding: 6px 8px 6px 8px; gap: 6px; }
  .burrow__bar .screen__title{ position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .burrow__bar .burrow__tabs{ padding-bottom: 0; }
  .burrow__bar .burrow__tabs .button--tab.is-selected{ flex-grow: 1; }
  .burrow__bar .burrow__tabs .button--tab.is-selected .button__label{ display: none; }
  .showcase{ height: clamp(140px, 24dvh, 170px); }
}

/*
 * The catwalk held upright (see the block above): the chips along the top, the
 * stage taking everything under them, and the route and progress in a strip
 * beneath it. The name is on the stage, so nothing else here needs a width.
 */
@media (orientation: portrait) and (max-width: 900px){
  .burrow[data-catwalk]{
    grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); grid-template-areas: "rail" "show"; padding-bottom: 8px;
  }
  .burrow[data-catwalk] .showcase{
    grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; grid-template-areas: "stage" "info";
    height: auto; row-gap: 6px; padding: 6px 8px 8px;
  }
  .burrow[data-catwalk] .showcase__stage{ --head: 3rem; }
  .burrow[data-catwalk] .showcase__banner{ font-size: clamp(1.55rem, 7vw, 2.3rem); }
  .burrow[data-catwalk] .showcase__info{
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 12px; row-gap: 4px; justify-content: stretch;
  }
  .burrow[data-catwalk] .showcase__info > *{ grid-row: auto; }
  .burrow[data-catwalk] .showcase__rarity{ grid-column: 1; text-align: left; }
  .burrow[data-catwalk] .showcase__place{ grid-column: 2; }
  .burrow[data-catwalk] .showcase__info > :not(.showcase__rarity, .showcase__place){ grid-column: 1 / -1; }
  /* Two lines of room whatever the worm: a stage that grew and shrank with each route redrew every worm on it (and Gray, 4 Oct 2026: "the whole preview changes sizes"). */
  .burrow[data-catwalk] .showcase__route{ font-size: 0.8rem; -webkit-line-clamp: 2; line-height: 1.25; min-height: 2.5em; }
}


/*
 * The in-run power-ups, one arc (hud.ts paintArc). Gray, 25 Oct 2026, picking the arc: one orb per power-up type, each in
 * its own fixed slot on an arc round Boost (kind order, so keys 1-5 stay under the same thumb), drawn while that kind is
 * HELD or RUNNING. Held: a full ring and a count tag, and the orb is the button that uses it. Running: it glows and its
 * ring drains as the timer. There is no separate running row, so a held orb and a running orb can never sit on each other.
 * The arc is centred on Boost (mirrored when Boost is on the left); with no Boost button it fans over the bottom middle.
 * Clean-play-area style throughout: rings in the kind's own colour, never a box.
 */
.powerarc{
  --pu-orb: 46px; --dir: 1;
  /*
   * Fitted to the room, not to offsets: the orbs ring Boost 18px clear. The arc ends at 288deg, the last point where the top orb is
   * still inside Boost's own right-hand margin, and starts where the lowest orb (running, so 8% bigger, with its ring and 4px of air)
   * still clears the bottom of the safe area: the room below Boost's centre is its inset plus half its size, since the safe inset moves
   * the centre and the edge together. Phone upright (Boost 96, inset 24, orb 46, r 89): sin(start) <= 0.45, so 154deg. The step then
   * keeps every orb, running ones included, off its neighbour (chord >= 1.08 x orb). Sideways is in the media query below.
   * check-overflow's arc scenes hold all of it, with the notch and home indicator, at every size.
   */
  --arc-r: calc(var(--boost-size) / 2 + var(--pu-orb) / 2 + 18px); --arc-start: 154deg; --arc-step: 33.5deg;
  --edge: calc(10px + var(--safe-r)); --ax: calc(var(--boost-inset) + var(--safe-r) + var(--boost-size) / 2);
  position: absolute; width: 0; height: 0; z-index: 5;
  right: var(--ax); bottom: calc(var(--boost-inset) + var(--safe-b) + var(--boost-size) / 2);
}
.powerarc[hidden]{ display: none; }
/* On its side: smaller orbs, and the arc starts higher so its first orb stays on the glass above the bottom edge. */
@media (max-height: 500px){ .powerarc{ --pu-orb: 36px; --arc-start: 161deg; --arc-step: 31.75deg; } }
.game.is-boost-left .powerarc{
  --dir: -1; --edge: calc(10px + var(--safe-l)); --ax: calc(var(--boost-inset) + var(--safe-l) + var(--boost-size) / 2);
  right: auto; left: var(--ax);
}
/* No Boost button (a mouse): the same orbs fan over the bottom middle. */
.game:not(:has(.boostbutton:not([hidden]))) .powerarc{
  --arc-r: 92px; --arc-start: 190deg; --arc-step: 40deg;
  left: 50%; right: auto; bottom: calc(16px + var(--safe-b) + var(--pu-orb) / 2);
}
.powerarc__item{
  --pu-color: #7ad6ff; --a: calc(var(--arc-start) + var(--slot, 0) * var(--arc-step));
  appearance: none; -webkit-appearance: none; border: 0; margin: calc(var(--pu-orb) / -2) 0 0 calc(var(--pu-orb) / -2); padding: 0; cursor: pointer;
  position: absolute; left: 0; top: 0; width: var(--pu-orb); height: var(--pu-orb); border-radius: 50%;
  /* Lower slots over higher ones, so a count tag on the outside corner is never covered by the next orb round the arc. */
  z-index: calc(10 - var(--slot, 0));
  display: grid; place-items: center; background: none;
  translate: calc(var(--dir) * var(--arc-r) * cos(var(--a))) calc(var(--arc-r) * sin(var(--a)));
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.55));
  transition: scale 0.12s ease; animation: powerup-in 0.22s ease-out;
}
.powerarc__item::after{ content: ""; position: absolute; inset: 0; border-radius: 50%; background: rgba(11, 16, 32, 0.55); z-index: -1; }
@keyframes powerup-in{ from{ opacity: 0; } to{ opacity: 1; } }
@media (hover: hover){ .powerarc__item:not(:disabled):hover{ scale: 1.08; } }
.powerarc__item:focus-visible{ scale: 1.08; outline: 3px solid #fff; outline-offset: 2px; }
.powerarc__item:not(:disabled):active{ scale: 0.94; }
/* The ring: full while held, drained clockwise from the top as the running timer. */
.powerarc__ring{ position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.powerarc__track, .powerarc__timer{ fill: none; stroke-width: 9; }
.powerarc__track{ stroke: rgba(11, 16, 32, 0.62); }
.powerarc__timer{ stroke: var(--pu-color); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 0; }
.powerarc__art{ position: relative; width: calc(100% - 12px); height: calc(100% - 12px); object-fit: contain; }
.powerarc__item.is-running{ scale: 1.08; filter: drop-shadow(0 0 9px var(--pu-color)) drop-shadow(0 3px 6px rgba(0, 0, 0, 0.55)); }
.powerarc__item.is-spent{ cursor: default; }
/* Hide the interface keeps what can be used, and takes away what only reports. */
.game.is-hud-hidden .powerarc__item.is-spent{ display: none; }
/* How many: a small gold tag on the orb's outside corner, away from the next orb round the arc. */
/* On the fan the counts mirror about its middle: outside corners on each side, the top orb's over its centre. */
.game:not(:has(.boostbutton:not([hidden]))) .powerarc__item:is([data-slot="3"], [data-slot="4"]) .powerarc__count{ left: auto; right: -8px; }
.game:not(:has(.boostbutton:not([hidden]))) .powerarc__item[data-slot="2"] .powerarc__count{ left: 50%; top: -12px; translate: -50% 0; }
.powerarc__count{
  position: absolute; left: -8px; top: -6px; z-index: 1;
  padding: 0 6px 1px; border-radius: 999px; border: 2px solid #fff;
  background: linear-gradient(180deg, #ffe45c, #ff9f1c); box-shadow: 0 2px 0 #8a4a00;
  font-family: var(--font-label); font-size: 0.74rem; line-height: 1.1; color: #fff;
  --ts: #7a3d00;
}
.powerarc__count[hidden]{ display: none; }
.game.is-boost-left .powerarc__count{ left: auto; right: -8px; }
@media (prefers-reduced-motion: reduce){ .powerarc__item{ animation: none; transition: none; } }
/* The once-only "what are these" bubble (hud.ts showChargeHint). Dark ink on white: NO outline (an outline in the ink's own colour swallows the
   letters, Gray, 20 Oct 2026). It sits above the arc's top orb, its tail on the arc, kept inside the screen on the side Boost is on (8px more
   than the edge, for its pulse). */
.powerarc__hint{
  position: absolute; right: calc(var(--edge) + 8px - var(--ax)); bottom: calc(var(--arc-r) + var(--pu-orb) / 2 + 22px);
  box-sizing: border-box; width: max-content; max-width: min(260px, calc(100vw - 2 * var(--edge) - 36px));
  white-space: normal; text-align: center; text-wrap: balance; line-height: 1.2;
  padding: 7px 14px 8px; border-radius: 14px; background: #fff; color: #1b1550;
  font-family: var(--font-label); font-size: 1rem; box-shadow: 0 6px 14px rgba(0, 0, 0, 0.45);
  -webkit-text-stroke: 0; text-shadow: none;
  animation: tile-pulse 1.2s ease-in-out infinite; pointer-events: none;
}
.powerarc__hint::after{ content: ""; position: absolute; right: calc(var(--ax) - var(--edge) - 16px); top: 100%; border: 8px solid transparent; border-top-color: #fff; }
.game.is-boost-left .powerarc__hint{ right: auto; left: calc(var(--edge) + 8px - var(--ax)); }
.game.is-boost-left .powerarc__hint::after{ right: auto; left: calc(var(--ax) - var(--edge) - 16px); }
.game:not(:has(.boostbutton:not([hidden]))) .powerarc__hint{ right: 50%; left: auto; translate: 50% 0; }
.game:not(:has(.boostbutton:not([hidden]))) .powerarc__hint::after{ right: 50%; left: auto; translate: 50% 0; }
/* Not overlay-keyed CSS: hud.ts's `blocked` field owns whether the arc shows. */
/* A phone on its side: the event line is 15rem at most, so even as it arrives (1.15 times) it stays clear of the minimap beside the score strip (check-overflow hud). */
@media (orientation: landscape) and (max-height: 420px){ .hud .hud__event{ max-width: min(15rem, 86%); } }

/*
 * Settings' windowed tabs on a phone on its side stay side by side: the
 * 760px rule stacks the window under the controls, which is right for a
 * phone held upright and left the controls a 91px strip at 667x320 (27 Sep
 * 2026, Gray: "landscape mobile also many things cut off or hard to choose").
 */
@media (orientation: landscape) and (max-height: 500px){
  .screen__pane--windowed{ grid-template-columns: minmax(230px, 0.9fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); gap: 10px; }
  .screen__window{ min-height: 0; }
  .screen__body{ padding-inline: 10px; }
}


/* ======================================================= THE FRONT SCREEN
 *
 * Gray, 11 Oct 2026: "our layout is never correct when rotating device ... its
 * too cramped, way too much shit on screen, logo on mobile takes way too much
 * space. add login button, do redesign." The design he approved, Worms Zone's
 * arrangement:
 *
 *   top left      your picture, level, and Log in (or your name)
 *   top centre    a small logo: at most 15% of the height sideways, 12% upright, 20% on a desktop
 *   top right     Nuggets, What's new, music
 *   middle        name, one big Play (the biggest thing on the screen), Play with friends
 *   right edge    the time-limited tiles that are on: event, daily gift, prize wheel
 *   bottom        The Burrow left; Settings and More right
 *
 * Upright, the same zones stack: the account bar, the logo, the worm and floor
 * pickers, name and Play in the bottom third, and one row of four big buttons
 * (The Burrow, Events, Top players, More).
 *
 * WHY IT IS BUILT THIS WAY. Every zone is a named grid area, like the HUD's
 * slots, and which arrangement applies is decided by ORIENTATION and HEIGHT in
 * media queries the browser evaluates itself, never by a width breakpoint and
 * never by a height JavaScript measured. A phone held sideways is 844-932px
 * wide, which used to land it in the "<900px is a phone upright" rules: that
 * was the cramped, cut-off screen, and nothing re-ran until the phone was
 * turned. Now the same rotation is a different media query matching, at once.
 */
.menu{
  /* The whole width, stated: .overlay centres its children, and a centred block
     shrinks to its content (Gray, 15 Sep 2026: "why is homepage boxed in"). */
  width: 100%;
  height: 100%;
  /* The drop-downs (More, Events) are placed against the menu itself, inside its padding. */
  position: relative;
  --pad-t: calc(clamp(8px, 2vh, 18px) + var(--safe-t));
  --pad-r: calc(clamp(12px, 2.4vw, 30px) + var(--safe-r));
  --pad-b: calc(clamp(8px, 2vh, 16px) + var(--safe-b));
  --pad-l: calc(clamp(12px, 2.4vw, 30px) + var(--safe-l));
  --top-h: 58px;
  --col: min(560px, 42vw);
  display: grid;
  /*
   * Sideways and on a desktop (Gray, round 3): the round buttons along the top,
   * More the last of them; your worm, your floor and The Burrow down the left;
   * name and Play in the middle; the timed tiles down the right. Both side
   * columns are the whole height between the top row and the bottom inset.
   * `minmax(0, 1fr)`, never a bare 1fr: a bare 1fr cannot shrink below its
   * content, and on a short screen it pushed the bottom row off the glass.
   */
  grid-template-columns: minmax(0, 1fr) minmax(0, var(--col)) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto minmax(0, 1fr) auto;
  grid-template-areas:
    "top   top   top"
    "left  .     side"
    "left  core  side"
    "left  .     side"
    "foot  foot  foot";
  column-gap: clamp(10px, 1.6vw, 18px); row-gap: clamp(6px, 1.4vh, 14px);
  /* Belt and braces: nothing should reach the edge, but a row that grows must
     clip rather than push the bottom row off a screen that cannot scroll. */
  overflow: hidden;
  padding:
    calc(clamp(8px, 2vh, 18px) + var(--safe-t)) calc(clamp(12px, 2.4vw, 30px) + var(--safe-r))
    calc(clamp(8px, 2vh, 16px) + var(--safe-b)) calc(clamp(12px, 2.4vw, 30px) + var(--safe-l));
  --mark-h: min(18vh, 170px);
  --t: clamp(62px, 11vh, 96px);
}
/* Rows may be shorter than their contents, columns narrower than theirs. */
.menu > *{ min-width: 0; min-height: 0; }

/* The top row is a row of its own, so the round buttons on the right take the width they need and the logo stays as near the middle as they allow. */
.menu__top{
  grid-area: top; display: grid; align-items: start; column-gap: clamp(8px, 1.6vw, 18px);
  grid-template-columns: minmax(max-content, 1fr) minmax(0, auto) minmax(max-content, 1fr); grid-template-areas: "me brand nav";
}
.menu__me{ grid-area: me; align-self: start; justify-self: start; display: flex; align-items: center; gap: clamp(5px, 1.9vw, 10px); }
.menu__brand{ grid-area: brand; align-self: start; justify-self: center; display: flex; flex-direction: column; align-items: center; max-width: 100%; }
.menu__nav{ grid-area: nav; align-self: start; justify-self: end; display: flex; align-items: center; gap: 10px; }
.menu__left{ grid-area: left; container-type: size; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: clamp(6px, 2.4cqh, 14px); }
.menu > .menu__core{ grid-area: core; width: 100%; justify-self: center; gap: clamp(8px, 1.6vh, 16px); }
.menu__side{ grid-area: side; container-type: size; display: flex; flex-direction: column; justify-content: center; align-items: flex-end; gap: clamp(10px, 4cqh, 18px); }
/* The bar is not a box: each of its pieces takes a zone of the menu by name. */
.menu__bar{ display: contents; }
.menu__events{ grid-area: events; }
.menu__tile--board{ grid-area: board; }
.menu__tile--burrow{ grid-area: burrow; }
.menu__foot{ grid-area: foot; }

/* Top left: the Log in button and, once signed in, your name (ui/signInPanel.ts). */
.menu__login{ flex: none; white-space: nowrap; }
/*
 * Log in sells itself (Gray, 11 Oct 2026: "needs to be more visible on home and
 * exciting, maybe login button should pulsate and have a red dot"): it breathes,
 * wears the red dot every other "something for you" button has, and a gold pill
 * says what signing in pays (SIGNIN_BONUS).
 */
.menu__login{ position: relative; overflow: visible; animation: login-beat 1.6s ease-in-out infinite; }
.menu__login .iconbtn__dot{ top: -6px; right: -6px; }
.menu__loginbonus{
  position: absolute; left: 50%; bottom: -13px; translate: -50% 0; white-space: nowrap; pointer-events: none;
  padding: 2px 9px 3px; border-radius: 999px; border: 2px solid #fff; line-height: 1.2;
  font-family: var(--font-label); font-size: 0.78rem; color: #fff; --ts: #8a4a00;
  background: linear-gradient(180deg, #ffe45c, #ff9a00); box-shadow: 0 2px 0 rgba(20, 8, 60, 0.45);
}
@keyframes login-beat{ 0%, 100%{ scale: 1; filter: none; } 50%{ scale: 1.05; filter: brightness(1.1); } }
@media (prefers-reduced-motion: reduce){ .menu__login{ animation: none; } }
.menu__login[hidden], .menu__who[hidden]{ display: none; }
/* A narrow phone upright (360px) in German: the login's dot stayed clear of the Nuggets pill beside it. */
/* "Sign Up / Log In" is a long label for the top row: a little smaller on a phone so the Nuggets pill beside it keeps clear. */
@media (max-width: 480px), (orientation: landscape) and (max-height: 500px){ .menu__login{ padding-inline: 8px; font-size: 0.78rem; white-space: normal; max-width: 5.4rem; line-height: 1.15; text-align: center; } }
@media (max-width: 399px){ .menu__login{ max-width: 4.7rem; font-size: 0.74rem; } }
@media (max-width: 399px){ .menu__login .iconbtn__dot{ right: -2px; } .nuggetpill{ padding: 6px 10px 6px 5px; gap: 6px; font-size: 1.12rem; } .nuggetpill.is-offer::after{ margin-left: 0; } }
/* A phone on its side: the wider lettering gives the header's title and Nuggets pill a size down, so the tabs between them keep their room. */
@media (orientation: landscape) and (max-height: 420px){ .overlay .panel .panel__title{ margin-bottom: 2px; } .hud .hud__stats{ column-gap: 12px; } .hud .hud__value{ font-size: 1rem; } .hud .hud__stat:first-child .hud__value{ font-size: 1.2rem; } .hud .hud__event{ max-width: min(15rem, 86%); } .screen__side .button, .screen__side .share__btn, .screen__side .set-btn, .screen__side .set-danger{ font-size: 0.9rem; letter-spacing: -0.02em; } .screen__side .set-danger, .screen__side .set-btn{ padding-inline: 12px; } .screen__heading{ font-size: 0.95rem; } .screen__links .button{ font-size: 0.82rem; padding-inline: 6px; } .screen__bar .screen__title{ font-size: 1.05rem; } .screen__bar .nuggetpill{ font-size: 0.95rem; } }
@media (max-width: 380px){ .nuggetpill{ padding: 4px 6px 4px 3px; gap: 3px; font-size: 0.85rem; } .nuggetpill img{ width: 22px; height: 22px; } }
.menu__who{
  /* Its own width, up to the cap: a four-letter name was cut to "Da…" while the
     level bar kept its room (Gray, 12 Oct 2026). The bar is what gives. */
  flex: none; min-width: 0; max-width: 22vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: var(--font-label); font-size: 1.15rem; color: #fff;
  --ts: #1c0d3a;
}
.menu__brand > .menu__eyebrow{ margin-top: -2px; letter-spacing: 0.07em; }   /* the line fits the brand column on a 1180px iPad (it ran 9px over) */
/* An older iPad on its side: the logo gives way to the round buttons, and the line under it, which would be cut short, is left out. */
@media (orientation: landscape) and (max-width: 1100px){ .menu__brand > .menu__eyebrow{ display: none; } }
/*
 * The store badges, under the logo (gameShell.ts, ".menu__stores"). Google's artwork as it comes, sized by
 * HEIGHT like the wordmark and never wider than it needs; a second badge (the App Store, when it is out)
 * sits beside it in the same row. Shown in the language the page is in. Hidden in an installed copy of the
 * site, and with the menu while a run is on (the whole overlay fades out).
 */
.menu__stores{ display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 10px; margin-top: clamp(2px, 0.7vh, 8px); }
.menu__store{ display: block; line-height: 0; border-radius: 8px; }
.menu__storeart{ display: block; width: auto; height: var(--store-h, clamp(30px, 5vh, 44px)); }
.menu__storeart[data-lang-art="de"], html:lang(de) .menu__storeart[data-lang-art="en"]{ display: none; }
html:lang(de) .menu__storeart[data-lang-art="de"]{ display: block; }
/* A phone held sideways: a smaller badge with air under the logo, so the pickers below keep their room. */
@media (orientation: landscape) and (max-height: 500px){ .menu__stores{ margin-top: 6px; } .menu{ --store-h: 28px; } }
@media (orientation: landscape) and (max-height: 400px){ .menu{ --store-h: 22px; } .menu__stores{ margin-top: 4px; } }
/* The shortest sideways phones (320-340px, Safari's bars showing) have no room to spare: the badge waits for a taller screen. */
@media (orientation: landscape) and (max-height: 340px){ .menu__stores{ display: none; } }
@media (display-mode: standalone), (display-mode: fullscreen), (display-mode: minimal-ui){ .menu__stores{ display: none; } }
/* The level bar is the piece of the top left that gives, so Log in never reaches the logo. */
.menu__avatar .menu__levelbar{ width: clamp(56px, 7vw, 120px); }

/* The middle column: name over Play, one edge, and Play the biggest thing on the screen. */
.menu__start{ display: flex; flex-direction: column; align-items: stretch; gap: clamp(8px, 1.4vh, 14px); width: 100%; }
.menu__start > .menu__play{ min-width: 0; width: 100%; padding: 10px 28px 14px; font-size: clamp(2rem, 5.2vh, 2.9rem); }
.menu .menu__friends{ width: min(340px, 86%); }
.menu__alert{ align-self: center; }
.menu__elsewhere{ align-self: center; }

/*
 * The tiles on this screen are the compact Worms Zone tile: picture inside,
 * name under it, any countdown pill hanging off the top edge. Sized by --t,
 * which each place sets from the HEIGHT it has.
 */
.menu .menu__tile{
  width: calc(var(--t) * 1.18); height: calc(var(--t) * 0.94); min-height: 0; margin: 0;
  padding: 4px 3px 6px; justify-content: center; gap: 2px; flex: none;
  border-radius: calc(var(--t) * 0.22); --rim: 3px;
  font-size: max(0.72rem, calc(var(--t) * 0.15)); line-height: 1.25;
}
.menu .menu__tile img{ width: calc(var(--t) * 0.5); height: calc(var(--t) * 0.5); margin: 0 auto; }
@media (hover: hover){ .menu .menu__tile:hover img{ transform: scale(1.08); } }
.menu .menu__tile:has(.tile__badge:not(:empty)){ padding-bottom: 6px; }
.menu .menu__tile .tile__badge{
  top: -10px; bottom: auto; min-width: 0; padding: 1px 7px 2px; border-width: 2px;
  font-size: max(0.56rem, calc(var(--t) * 0.13));
}
.menu .menu__tile .iconbtn__dot{ top: -6px; right: -6px; width: 16px; height: 16px; }
.menu__tileicon{ display: grid; place-items: center; width: calc(var(--t) * 0.5); height: calc(var(--t) * 0.5); }
.menu__tileicon .icon{ width: 74%; height: 74%; stroke-width: 2.8; filter: drop-shadow(0 2px 0 var(--ts)); }
/* A <summary> as a tile: no disclosure triangle. */
.menu :is(.menu__menu, .menu__events) > summary{ list-style: none; cursor: pointer; }
.menu :is(.menu__menu, .menu__events) > summary::-webkit-details-marker{ display: none; }
.menu :is(.menu__menu, .menu__events)[open] > summary{ filter: brightness(0.92) saturate(1.1); }

/*
 * The right edge: three timed tiles always fit, from the column's own height
 * (each tile 0.94 of --t tall, its pill 10px over the top, two gaps).
 */
.menu__side .menu__tile{ --t: clamp(34px, calc((100cqh - 8cqh - 16px) / 2.9), 104px); }
.menu__bar > *{ min-width: 0; min-height: 0; }
/* The left column: your worm, your floor, The Burrow, each a share of the column's height. */
@media (orientation: landscape){
/* One grid, not a flex column: the two cards are one height, whatever their pictures need (check-overflow SAME). */
.menu__left .pickrow{ display: grid; grid-template-columns: minmax(0, 1fr); grid-auto-rows: 1fr; align-content: center; width: min(100%, 250px); gap: clamp(6px, 2.4cqh, 14px); margin: 0; }
.menu__left .pickcard{
  flex: none; padding: 5px 3px 4px; row-gap: 3px; column-gap: 4px;
  grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "prev art next" "name name name"; justify-items: center;
}
.menu__left .pickcard__art{ width: min(100%, calc((36cqh - 34px) / 0.577), 190px); }
.menu__left .pickcard__art--floor{ width: auto; height: clamp(24px, calc(20cqh - 34px), 90px); margin: 0; }
.menu__left .pickcard__label{ text-align: center; padding-inline: 4px; }
.menu__left .pickcard__kind, .menu__left .pickcard__hint{ display: none; }
.menu__left .pickcard__name{ letter-spacing: -0.04em; font-size: clamp(0.8rem, 4.2cqh, 0.9rem); line-height: 1.15; white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: break-word; }
.menu__left .pickcard__arrow{ width: 26px; height: clamp(28px, 10cqh, 42px); }
/* The Burrow as wide as the cards above it, its icon beside a one-line name: as a
   small square its name wrapped onto two lines (Gray, 11 Oct 2026). */
.menu__left .menu__tile--burrow{
  width: min(100%, 250px); height: clamp(40px, 17cqh, 72px); flex-direction: row; gap: 6px;
  padding: 4px 8px 6px; font-size: clamp(0.68rem, 3.9cqh, 1.12rem); letter-spacing: -0.02em; white-space: nowrap;
}
.menu__left .menu__tile--burrow img{ width: clamp(28px, 12cqh, 52px); height: clamp(28px, 12cqh, 52px); margin: 0; }
}

/* Sideways and on a desktop: More is the last round button top right, in the bell's style. */
.menu .menu__menu > .menu__tile{
  width: 46px; height: 46px; padding: 0; border-radius: 15px; animation: none;
}
.menu .menu__menu > .menu__tile .button__label{ display: none; }
.menu .menu__menu > .menu__tile .menu__tileicon{ width: 24px; height: 24px; }
/* More's rows are a list to scan, tighter than the site menu's on a content page. */
.menu__menupanel .navmenu__sound, :where(.menu__menupanel) :where(a){ padding: 10px 4px; font-size: 1rem; }
.menu__events, .menu__tile--board, .menu__portraitonly, .menu__moredot{ display: none; }

/*
 * The drop-downs hang off the MENU, inside its padding: More opens down from
 * the top right, never past the bottom inset; upright both open up from the
 * bottom row, never past the account bar. Their heights are a share of the
 * menu's own box, so no measured or guessed viewport height is involved (an
 * upright iPhone in Safari ran the sheet off the top: Gray, round 3).
 */
.menu .navmenu:is(.menu__menu, .menu__events){ position: static; }
.menu :is(.menu__menu, .menu__events) > .navmenu__panel{
  top: calc(var(--pad-t) + var(--top-h)); bottom: auto; right: var(--pad-r); left: auto;
  width: min(340px, calc(100% - var(--pad-l) - var(--pad-r)));
  max-height: calc(100% - var(--pad-t) - var(--pad-b) - var(--top-h)); overflow-y: auto; overscroll-behavior: contain;
}
/* Events shows only while one of its tiles is on, and carries their red dot (or a Ready!). */
.menu:not(:has(.menu__side .button--tile:not([hidden]))) .menu__events{ display: none !important; }
.menu__events > summary{ position: relative; }
.menu:has(.menu__side :is(.iconbtn__dot:not([hidden]), [data-ready])) .menu__events > summary::after{
  content: ""; position: absolute; top: -6px; right: -6px; width: 16px; height: 16px; border-radius: 50%;
  background: #ff3b5c; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}
.menu__menu > summary{ position: relative; }
.menu__moredot[hidden]{ display: none !important; }
/* Inside More, the row the red dot on More is for (Gray: "should also show what that alert is for"). */
.navmenu__dot{ position: static; display: inline-block; vertical-align: middle; margin-left: 8px; width: 12px; height: 12px; }
.navmenu__dot[hidden]{ display: none; }
.menu__menupanel [hidden]{ display: none; }

/* --------------------------------------------- a phone held sideways */
/*
 * Keyed on orientation and HEIGHT, at any width: an iPhone sideways is 667 to
 * 932px wide and 320 to 430px tall (717x329 in Chrome, with its tab strip).
 * The same zones as a desktop, smaller.
 */
@media (orientation: landscape) and (max-height: 500px) {
  .beta{ display: none; }
  .menu{
    --col: min(380px, 40vw);
    /* 15% of the height at most, with room for the logo's jelly squash. */
    --mark-h: 13.5vh;
    --top-h: 46px;
    --pad-t: calc(6px + var(--safe-t)); --pad-r: calc(12px + var(--safe-r)); --pad-b: calc(6px + var(--safe-b)); --pad-l: calc(12px + var(--safe-l));
    column-gap: 10px; row-gap: 4px;
    padding: calc(6px + var(--safe-t)) calc(12px + var(--safe-r)) calc(6px + var(--safe-b)) calc(12px + var(--safe-l));
  }
  .menu__eyebrow{ display: none; }
  .menu > .menu__core{ gap: 8px; }
  .menu__start{ gap: 8px; }
  .menu__field{ padding: 2px 8px 2px 14px; border-radius: 14px; }
  .menu__input{ padding: 6px 4px; font-size: 1.05rem; }
  .menu__start > .menu__play{ padding: 4px 20px 8px; font-size: clamp(1.4rem, 8vh, 2.1rem); border-radius: 18px; }
  .menu .menu__friends{ width: 100%; min-height: 40px; padding: 3px 12px 6px; border-radius: 16px; font-size: 1rem; gap: 6px; }
  .menu__avatarart{ width: 40px; height: 40px; border-radius: 12px; border-width: 2px; }
  .menu__avatar{ padding-bottom: 5px; }
  .menu__avatar .menu__levelbadge{ left: 24px; min-width: 22px; height: 22px; padding: 0 4px; border-width: 2px; border-radius: 7px; font-size: 0.8rem; }
  .menu__avatar .menu__levelbar{ width: clamp(36px, 8vw, 72px); height: 10px; margin-left: 6px; border-width: 1.5px; }
  .menu__avatar .menu__avatardot{ left: 30px; top: -4px; width: 13px; height: 13px; }
  .menu__who{ font-size: 1rem; }
  .menu__nav{ gap: 6px; }
  .menu .menu__menu > .menu__tile{ width: 36px; height: 36px; border-radius: 11px; --rim: 3px; }
  .menu .menu__menu > .menu__tile .menu__tileicon{ width: 20px; height: 20px; }
}
/* 320-340px: an iPhone sideways with the browser's bars showing. The frame gives a few pixels. */
@media (orientation: landscape) and (max-height: 340px) {
  .menu{ row-gap: 2px; padding-top: calc(4px + var(--safe-t)); padding-bottom: calc(4px + var(--safe-b)); --pad-t: calc(4px + var(--safe-t)); --pad-b: calc(4px + var(--safe-b)); }
  .menu .menu__friends{ min-height: 36px; font-size: 0.95rem; }
  .menu__start > .menu__play{ font-size: 1.4rem; }
}

/* ---------------------------------------------------- held upright */
@media (orientation: portrait) {
  .menu{
    --col: min(440px, 100%);
    /* Small enough not to dominate (Gray, second pass): about a quarter of the old upright logo's area. */
    --mark-h: 8.5vh;
    --t: clamp(58px, 9vh, 84px);
    --top-h: 54px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: auto auto minmax(0, 1fr) auto auto auto;
    grid-template-areas:
      "me     me     nav   nav"
      "brand  brand  brand brand"
      "pick   pick   pick  pick"
      "core   core   core  core"
      "burrow events board more"
      "foot   foot   foot  foot";
    /* 6px, not 10: the tiles' names need the width more than the gaps do (Gray's A17, 4 Nov 2026). */
    column-gap: 6px;
  }
  /* The garden theme, no timed tile on: three big buttons, not a gap where Events was. (The other themes show the timed icons themselves; see "THE FRONT SCREEN LIKE WORMS ZONE".) */
  [data-vibe="garden"] .menu:not(:has(.menu__side .button--tile:not([hidden]))){
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-areas:
      "me     nav   nav"
      "brand  brand brand"
      "pick   pick  pick"
      "core   core  core"
      "burrow board more"
      "foot   foot  foot";
  }
  /* The top row and the left column dissolve: each piece takes its own zone. More joins the bottom row. */
  .menu__top, .menu__nav, .menu__left{ display: contents; }
  /* The top row: you at the left end, the Nugget pill and the language button at the right end, each along the WHOLE row
     (columns 1 to -1), not in a zone of its own. They were zones of the menu's equal columns (you: two of four, or one of
     three when no timed tile is on), so a Log in pill wider than its zone ran onto the Nugget pill in every theme with
     chunkier pills (Gray, 8 Nov 2026: Overdrive, Wind Down, Garden). Along the whole row the only limit is the glass
     itself, and the level bar steps aside on a phone (below) so the two ends never meet. The language button is in the
     top-right corner and the Nugget pill steps left of it (Gray, 6 Nov 2026: "sort that random position of language
     selector"). */
  .menu__me{ grid-area: 1 / 1 / 2 / -1; }
  .menu__nav > .nuggetpill{ grid-area: 1 / 1 / 2 / -1; justify-self: end; align-self: center; margin-right: calc(var(--ib, 46px) + 10px); }
  .menu__lang{ grid-area: 1 / 1 / 2 / -1; justify-self: end; align-self: center; }
  .menu__menu{ grid-area: more; }
  /* The cards size from the room their row has, and step aside when it has none (short phones, the beta strip). */
  .menu .pickrow{ grid-area: pick; align-self: stretch; justify-self: center; width: var(--col); margin: 0; container-type: size; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-content: center; align-items: stretch; }
  .menu .pickrow .pickcard__art{ width: min(46cqw, 150px, calc((100cqh - 50px) / 0.577)); }
  .menu .pickrow .pickcard__art--floor{ width: auto; height: min(20cqw, 74px, calc(100cqh - 50px)); }
  .menu > .menu__core{ width: var(--col); }
  /* No keyword line upright (Gray: it was one more thing on a small screen). It stays in the page. */
  .menu__eyebrow{ display: none; }
  /* What's new, the music and Settings move into More; the corner keeps your Nuggets. */
  .menu__nav > .menu__navbtn{ display: none; }
  .menu .menu__bar > *, .menu .menu__tile--burrow{ min-width: 0; align-self: end; }
  .menu .menu__tile--burrow, .menu .menu__bar > .menu__tile, .menu .menu__bar > details > .menu__tile{ width: 100%; height: var(--t); }
  .menu__events{ display: block; }
  .menu__tile--board{ display: flex; }
  .menu__landonly{ display: none; }
  .menu__portraitonly{ display: list-item; }
  .menu__moredot{ display: block; }
  /* Upright, More is a big button like its row, and both drop-ups open up from the row. */
  .menu .menu__menu > .menu__tile{
    width: 100%; height: var(--t); padding: 4px 3px 6px; border-radius: calc(var(--t) * 0.22);
  }
  .menu .menu__menu > .menu__tile .button__label{ display: block; }
  .menu .menu__menu > .menu__tile .menu__tileicon{ width: calc(var(--t) * 0.5); height: calc(var(--t) * 0.5); }
  .menu :is(.menu__menu, .menu__events) > .navmenu__panel{
    top: auto; bottom: calc(var(--pad-b) + var(--t) + 12px);
    max-height: calc(100% - var(--pad-t) - var(--pad-b) - var(--top-h) - var(--t) - 24px);
  }
  .menu__avatarart{ width: 44px; height: 44px; border-radius: 13px; }
  .menu__avatar{ padding-bottom: 5px; }
  .menu__avatar .menu__levelbadge{ left: 26px; min-width: 24px; height: 24px; border-radius: 8px; font-size: 0.86rem; }
  .menu__avatar .menu__levelbar{ width: clamp(40px, 16vw, 90px); height: 11px; margin-left: 6px; }
  /* On a phone the level bar steps aside in every theme (the badge on the picture still says the level): the Log in pill, the Nuggets and the language button need that row. */
  @media (orientation: portrait) and (max-width: 520px){ .menu__avatar .menu__levelbar{ display: none; } .menu__avatar{ padding-right: 12px; } .menu__me{ gap: 6px; } }  /* 12px: the level badge hangs 6px past the picture, and its number keeps room inside the button */
  .menu__avatar .menu__avatardot{ left: 32px; }
  .menu__who{ max-width: 34vw; }
}
/* A short upright phone (Safari's bars showing): the cards shrink before anything else gives. */
@media (orientation: portrait) and (max-height: 720px) {
  .menu{ --mark-h: 8vh; --t: 58px; }
  .menu__start > .menu__play{ font-size: 1.9rem; padding: 6px 24px 10px; }
}
@container pickrow (max-height: 84px) {
  .pickcard{ display: none; }
}
/* Upright and narrow: Nuggets and the Log in button share 360px with your picture. */
@media (orientation: portrait) and (max-width: 400px) {
  .menu__nav > .nuggetpill{ gap: 4px; padding: 2px 10px 2px 3px; font-size: 1rem; }
  .menu__nav > .nuggetpill img{ width: 22px; height: 22px; }
}

/* Small round buttons on a phone: drawn 36px, with a 44px hit area round each. */
@media (orientation: landscape) and (max-height: 500px), (orientation: portrait) and (max-width: 520px) {
  .menu{ --ib: 36px; }   /* the round button's size, which the Nugget pill beside the language button steps aside by */
  .menu .iconbtn{ position: relative; width: 36px; height: 36px; border-radius: 11px; --rim: 3px; }
  .menu .iconbtn::after{ content: ""; position: absolute; inset: -4px; }
  .menu .menu__nav > .nuggetpill{ gap: 4px; padding: 2px 9px 2px 3px; font-size: 0.95rem; }
  .menu .menu__nav > .nuggetpill img{ width: 22px; height: 22px; }
}

/* The Log in panel: one provider button per row. */
.panel--signin .signin{ grid-template-columns: minmax(0, 1fr); margin-top: 8px; }
.signin > [hidden], .signin[hidden], .screen__card[data-account-signin][hidden]{ display: none; }
/* Three ways in and a line above them: on a short phone held sideways the rows sit closer so the panel never scrolls. */
@media (orientation: landscape) and (max-height: 500px){
  .panel--signin .signin{ gap: 6px; margin-top: 4px; }
  .panel--signin .signin > .button{ padding-block: 7px 9px; }
  .panel--signin > [data-signin-cta]{ margin-top: 0; font-size: 0.88rem; padding: 4px 14px 7px; }
  .panel--signin [data-signin-nudge-sub]{ margin-bottom: 6px; }
}
/* The same buttons in Settings → Account: one per row, in the controls column. */
.screen__card[data-account-signin] .signin{ grid-template-columns: minmax(0, 1fr); margin-top: 8px; }
.screen__card[data-account-signin] [data-signin-note]:empty{ display: none; }
.panel--signin .panel__note:empty{ display: none; }

/*
 * Save your progress (ui/saveNudge.ts). The prompt is the Log in panel with
 * the player's own numbers in it, so it is centred like the other confirm
 * panels; the badge is the passive version (Profile, the death screen, the
 * event) and never covers anything: a line of words with a glass button.
 */
.panel--signin:has([data-signin-nudge]:not([hidden])){ text-align: center; }
.signin__art{ display: block; width: 72px; height: 72px; margin: 0 auto 4px; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.5)); }
.signin__art[hidden]{ display: none; }
.panel--signin [data-signin-nudge-sub]{ margin-bottom: 10px; line-height: 1.45; }
.savebadge{
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 12px;
  margin: 0 0 12px; padding: 8px 12px; border-radius: var(--radius-sm);
  background: rgba(255, 209, 102, 0.1); border: 2px solid rgba(255, 209, 102, 0.38);
  color: var(--paper); font-size: 0.88rem; line-height: 1.35;
}
.savebadge[hidden]{ display: none; }
.savebadge__text{ min-width: 0; text-align: center; }
.savebadge .button{ flex: none; }
.death__save{ margin: 4px 0 8px; font-size: 0.82rem; }
/* The death screen sideways is already a full grid: the line stays off it, and the prompt and Profile carry the ask. */
@media (orientation: landscape) and (max-height: 500px){
  .signin__art{ display: none; }
  .death__save{ display: none; }
}


/* ======================================================= EVERY SCREEN ON A PHONE
 *
 * Gray, 11 Oct 2026: "text overflows everywhere on mobile ... every page inside
 * is shit too". The rules here are measured, not guessed: tools/check-overflow.mjs
 * opens every screen at 390x844, 430x932, 375x667, 844x390, 667x375, 932x430 and
 * 1180x820 with an iPhone's notch and home indicator, and fails on text outside
 * its box, anything clipped or under the notch, controls touching, and a
 * scroller that only just does not fit.
 */

/* Every screen keeps clear of the notch and the home indicator, not only the arena's layers. */
.overlay:not(.overlay--menu){
  padding: max(var(--ovpad, 16px), var(--safe-t)) max(var(--ovpad, 16px), var(--safe-r)) max(var(--ovpad, 16px), var(--safe-b)) max(var(--ovpad, 16px), var(--safe-l));
}
/* The full-size screens (Settings, The Burrow, Profile, Top players) use the edge of a phone. */
.overlay--screen{ --ovpad: clamp(6px, 2vw, 22px); }
@media (orientation: landscape) and (max-height: 500px){
  .overlay:not(.overlay--menu){
    padding: calc(6px + var(--safe-t)) calc(6px + var(--safe-r)) calc(6px + var(--safe-b)) calc(6px + var(--safe-l));
  }
}

/*
 * Tabs on a phone: icons only, all the same size, the chosen one in a lime rim,
 * and its name in the title instead (ui/tabWhere.ts). Sideways there is no room
 * for the word "Settings" as well, so the title is just where you are.
 */
.screen__where{ display: none; }
@media (max-width: 760px), (orientation: landscape) and (max-height: 500px){
  .screen__where:not(:empty){ display: inline; }
  .screen__where::before{ content: " · "; }
  .screen__title{ min-width: 0; }
  /* Settings and Profile: no room for Nuggets beside the title and the X (Account shows them; The Burrow keeps its pill). */
  .screen:not(.screen--burrow) .screen__bar > .nuggetpill{ display: none; }
}
@media (orientation: landscape) and (max-height: 500px){
  .screen:not(.screen--burrow) .screen__name{ display: none; }
  .screen__where::before{ content: none; }
  .screen .button--tab, .screen .button--tab.is-selected{ flex: 1 1 0; min-width: 0; max-width: 64px; padding: 3px 2px 5px; }
  .screen .button--tab.is-selected .button__label{ display: none; }
  .screen .button--tab.is-selected{ --rimA: #e8ff7a; --rimB: #c6f432; }
  /* Your Nuggets are on the front screen and in Account; here the tabs need the room. */
  .screen:not(.screen--burrow) .screen__bar > .nuggetpill{ display: none; }
}

/*
 * Options and Account have nothing to show in the window onto the arena, and
 * on a phone it took half the screen and pushed the cards below the fold
 * (Gray's screenshot: "Games played", then the top of the next card). Their
 * cards flow into as many columns as fit instead.
 */
.screen__pane--windowed:is([data-screen-pane="options"], [data-screen-pane="account"], [data-screen-pane="hidden"]){ grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
/* With no window, nothing paints the screen's ground: it is the solid screen again, not glass onto the arena (Gray, round 3). */
.screen.is-windowed:has(:is([data-screen-pane="options"], [data-screen-pane="account"], [data-screen-pane="hidden"]):not([hidden])){
  background: radial-gradient(ellipse 120% 80% at 50% 0%, #3d3196, var(--screen-fill) 70%);
}
.screen__pane--windowed:is([data-screen-pane="options"], [data-screen-pane="account"], [data-screen-pane="hidden"]) .screen__window{ display: none; }
:is([data-screen-pane="options"], [data-screen-pane="account"], [data-screen-pane="hidden"]) .screen__side{ align-items: start; align-content: start; padding-right: 0; }
.screen__card[data-account-signin] .button{ font-size: 0.95rem; padding: 8px 12px 9px; }
/*
 * Options: the volume card on the left, the rest stacked beside it. Account:
 * signing in in the widest column (so "Continue with Google" stays on one
 * line), your progress, then Erase. Upright on a phone, one column of each.
 */
@media (orientation: landscape), (min-width: 761px){
  [data-screen-pane="options"] .screen__side{ grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row dense; }
  [data-screen-pane="options"] .screen__side > .screen__card:first-child{ grid-column: 1; grid-row: span 3; }
  [data-screen-pane="options"] .screen__side > :not(:first-child){ grid-column: 2; }
  [data-screen-pane="account"] .screen__side{ grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); }
}
@media (orientation: landscape) and (max-height: 500px){
  /* Erase's warning is said again on the two screens it takes to erase; sideways the card is just its button. */
  [data-screen-pane="account"] .screen__card:has([data-account-erase]) .screen__note{ display: none; }
}
@media (orientation: landscape) and (max-height: 500px) and (max-width: 760px){
  [data-screen-pane="account"] .screen__side{ grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 0.9fr); }
  .screen__card[data-account-signin] .button{ font-size: 0.82rem; padding: 7px 8px 8px; gap: 6px; }
  .screen__card[data-account-signin] .button svg{ width: 16px; height: 16px; }
}

/* Themes' note under its two tiles: a size smaller where the pane is short, so it fits rather than peeking. */
@media (orientation: landscape) and (max-height: 500px), (orientation: portrait) and (max-height: 720px){
  /* Themes' note goes: the two tiles and the window say it, and a short pane then fits rather than peeking. */
  [data-screen-pane="themes"] .screen__note{ display: none; }
}
/* 320-330px sideways (Chrome on an iPhone, 667x320): the last few pixels. */
@media (orientation: landscape) and (max-height: 330px){
  .screen--burrow .burrow__grid{ --gap: 4px; }
  [data-screen-pane="account"] .keys--compact .keys__row{ padding: 1px 0; }
  .burrow__pane--upgrades{ padding-bottom: 0; }
  [data-screen-pane="account"] .screen__card{ gap: 4px; padding: 6px 10px; }
  [data-screen-pane="account"] .screen__side{ gap: 6px; }
  .screen:not(.screen--burrow) .screen__body{ padding-block: 6px 8px; }
}
@media (orientation: landscape) and (max-height: 360px){
  .burrow__pane--upgrades{ padding-bottom: 0; }
  .burrow__pane--upgrades .burrow__grid{ padding-bottom: calc(var(--drop) + 2px); }
  /* "This worm can't wear a spare head" sits in the middle of the pane, not 30% down and over its foot. */
  .burrow__empty.facelock{ inset: 50% 6% auto; translate: 0 -50%; gap: 8px; }
}

/* Floor, food and theme tiles: a long name ("Neon Motherboard") wraps inside its tile instead of running out of it. */
.station{ min-width: 0; }
.station--tile{ grid-template-columns: minmax(0, 1fr); }
.station--tile > *{ max-width: 100%; }
/* Your Nuggets keep their number inside the pill, everywhere they are shown. */
.nuggetpill{ flex: none; white-space: nowrap; }
.station__name, .station__desc{ min-width: 0; overflow-wrap: break-word; hyphens: manual; }
@media (max-width: 760px), (orientation: landscape) and (max-height: 500px){
  .screen__tiles{ grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
  .station--tile .station__name{ font-size: 0.8rem; line-height: 1.15; }
  .station--tile .station__desc{ font-size: 0.68rem; }
}

/* The reward reveal is a whole-screen layer of its own: it keeps clear of the notch and the home indicator too. */
.reward{ padding: calc(18px + var(--safe-t)) calc(18px + var(--safe-r)) calc(18px + var(--safe-b)) calc(18px + var(--safe-l)); }
@media (orientation: landscape) and (max-height: 500px){
  .reward{ padding: calc(8px + var(--safe-t)) calc(16px + var(--safe-r)) calc(8px + var(--safe-b)) calc(16px + var(--safe-l)); }
  /* Settings' side column: a little tighter, so a pane that nearly fits does fit. */
  .screen__side{ gap: 8px; }
  .screen__side .screen__note{ font-size: 0.82rem; }
  /* How to play and the privacy notice: their list in two columns, so Back is on screen without scrolling. */
  .panel:has(> .panel__list){ width: min(860px, 100%); }
  .panel > .panel__list{ columns: 2; column-gap: 22px; }
  .panel > .panel__list > li{ break-inside: avoid; }
}
/* A small phone sideways (667x375): cards and lists a size tighter, so a pane that nearly fits does. */
@media (orientation: landscape) and (max-height: 500px) and (max-width: 760px){
  .screen__card{ gap: 8px; padding: 10px 12px; }
  .screen__side .screen__note{ font-size: 0.78rem; line-height: 1.35; }
  .panel:has(> .panel__list){ padding: 14px 16px; }
  .panel > .panel__list{ font-size: 0.84rem; }
}
/* A phone with Safari's bars showing: the Burrow's card pills say their price in smaller letters, inside the card. */
@media (orientation: landscape) and (max-height: 360px){
  .burrowcard__tag{ font-size: min(0.64rem, 10.4cqi); padding: 1px 6px 4px; max-width: 100%; }
  /* Account fits without scrolling: tighter rows, and Erase's warning is said on the next screen anyway. */
  [data-screen-pane="account"] .keys--compact .keys__row{ padding: 3px 0; }
  :is([data-screen-pane="account"], [data-screen-pane="options"]) .screen__card{ gap: 6px; padding: 8px 10px; }
  [data-screen-pane="account"] .screen__side .screen__note{ font-size: 0.76rem; }
  [data-screen-pane="account"] .keys--compact .keys__row{ font-size: 0.8rem; }
  :is([data-screen-pane="account"], [data-screen-pane="options"]) .screen__heading{ font-size: 0.95rem; } .screen__links .button{ font-size: 0.82rem; padding-inline: 6px; }
  /* Options: the share card is its button; the line over it goes. */
  [data-screen-pane="options"] .screen__card--center .screen__heading{ display: none; }
  /* The Burrow: tighter gaps and smaller pills, so a short row of cards fits without a sliver to scroll. */
  .burrow__grid{ --gap: 6px; }
  .burrowcard__tag{ font-size: min(0.58rem, 10cqi); }
  .burrow__pane--upgrades{ padding-bottom: 0; }
  .panel > .panel__list{ font-size: 0.78rem; line-height: 1.32; }
  [data-screen-pane="account"] .screen__card:has([data-account-erase]) .screen__note{ display: none; }
}

/* The shortest screens there are, phones in a browser with its bars showing (Gray's phone, 1 Nov 2026): each rule buys back the last few pixels. */
@media (orientation: landscape) and (max-height: 330px){
  .burrow__rail{ gap: 5px; }
  .burrow__railbtn{ width: 36px; height: 36px; border-radius: 11px; }
  .burrowcard__tag{ font-size: 0.5rem; padding-inline: 2px; }
  :is([data-screen-pane="account"], [data-screen-pane="options"]) .screen__card{ gap: 3px; padding: 5px 10px; }
  :is([data-screen-pane="account"], [data-screen-pane="options"]) .screen__side{ gap: 4px; }
  .panel{ padding-top: 8px; padding-bottom: 8px; }
}
@media (orientation: portrait) and (max-height: 600px){
  .screen__side{ gap: 8px; }
  .burrow__upgrade{ gap: 6px; }
  .burrow__grid{ --gap: 6px; }
}

/* The front screen's Nuggets never squeeze below their number. */
.menu__nav > .nuggetpill{ flex: none; white-space: nowrap; }
/* Sideways on a small phone the top row is your picture, Log in, the logo and three buttons: the level bar and How to play (it is in More) give way. */
@media (orientation: landscape) and (max-height: 500px) and (max-width: 760px){
  .menu__avatar .menu__levelbar{ display: none; }
  .menu__nav > [data-game-howto-open]{ display: none; }
}

/* ======================================================= site theme: Overdrive
 *
 * Gray, 29 Sep 2026: "a techno high paced feel ... futuristic like the game
 * Extreme G on n64". One layer keyed on `data-vibe="overdrive"` on the
 * document (client main.ts applySiteTheme; the list is shared/themes.ts), so
 * Classic is untouched and every surface changes together. It works through
 * the house components' own tokens (--bodyA/B/C, --rimA/B, --edge, --glow,
 * --ts, --ink) wherever they have them, and restyles the shells (panel,
 * screen, menu, boot, HUD) that paint their own colours.
 *
 * Gunmetal and near-black, cyan and magenta neon, sharp corners, slanted
 * italic capitals. The heading face falls back through techno faces we may
 * host later (Orbitron, Exo 2) to a narrow system face.
 */
html[data-vibe="overdrive"]{
  --od-cyan: #19E3FF; --od-mag: #FF2BD6; --od-amber: #FFB020; --od-lime: #B6FF3B;
  --od-ink: #0B0E17; --od-steel: #1A2030; --od-steel-2: #242C3F; --od-line: rgba(25, 227, 255, 0.45);
  --od-font: "Orbitron", "Exo 2", "Rajdhani", "Eurostile", "Avenir Next Condensed", "Arial Narrow", system-ui, sans-serif;
  --accent: var(--od-cyan); --accent-2: #0FA9C4; --radius: 10px; --radius-sm: 6px;
}
html[data-vibe="overdrive"] body{ background: var(--od-ink); }

/* Buttons: gunmetal slabs with a neon edge; the primary burns magenta. */
[data-vibe="overdrive"] :is(.button, .menu__play, .iconbtn, .set-btn, .share__btn,
    .dock__icon, .dock__btn, .boostbutton, .beta__close, .settings__back){
  --rimA: #3a4760; --rimB: #1b2231; --edge: var(--od-line); --glow: rgba(25, 227, 255, 0.35);
  --bodyA: #2b3549; --bodyB: #171e2c; --bodyC: #0c1019; --ts: rgba(0, 0, 0, 0.55); --ink: #EAFBFF;
  --rim: 2px;
  border-radius: 7px;
  font-family: var(--od-font); font-weight: 800; font-style: italic; letter-spacing: 0.05em; text-transform: uppercase;
  text-shadow: 0 0.07em 0 var(--ts);
}
[data-vibe="overdrive"] :is(.button--primary, .menu__play, .boostbutton){
  --bodyA: #ff6be4; --bodyB: #e0149f; --bodyC: #8a0a62; --edge: rgba(255, 43, 214, 0.75); --glow: rgba(255, 43, 214, 0.55);
  --rimA: #ff9bef; --rimB: #b3108a;
  --ts: #3c0028;
}
/* Buy (a price, "yes, this one", Spin): neon lime, never the plain gunmetal slab it fell back to. */
[data-vibe="overdrive"] .button--buy{
  --bodyA: #6fd12a; --bodyB: #3c9a0c; --bodyC: #276a05; --edge: rgba(182, 255, 59, 0.75); --glow: rgba(182, 255, 59, 0.5);
  --rimA: #c9f58a; --rimB: #4a8f0c; --ink: #06210a;
  --ts: #0d2a00; color: #fff;
}
[data-vibe="overdrive"] :is(.button--quiet, .share__btn, .beta__close){
  --bodyA: #202838; --bodyB: #151b28; --bodyC: #0e131d; --ink: #BFEFFF;
}
[data-vibe="overdrive"] .button--glass{ --bodyA: rgba(20, 28, 44, 0.85); --bodyB: rgba(14, 19, 31, 0.85); --bodyC: rgba(10, 13, 22, 0.85); }
[data-vibe="overdrive"] .set-danger{ --bodyA: #ff5a6e; --bodyB: #c81b36; --bodyC: #6e0716; --edge: rgba(255, 70, 90, 0.7); }

/* The front screen's tiles: dark glass cards lit in their own neon. */
[data-vibe="overdrive"] .button--tile{ --bodyA: #273046; --bodyB: #151b28; --bodyC: #0b0f18; --rimA: var(--tone, var(--od-cyan)); --rimB: #0b0f18; }
[data-vibe="overdrive"] .button--tile[data-tone="pink"]{ --tone: var(--od-mag); --glow: rgba(255, 43, 214, 0.5); --edge: rgba(255, 43, 214, 0.6); }
[data-vibe="overdrive"] .button--tile[data-tone="orange"]{ --tone: var(--od-amber); --glow: rgba(255, 176, 32, 0.45); --edge: rgba(255, 176, 32, 0.6); }
[data-vibe="overdrive"] .button--tile[data-tone="blue"]{ --tone: var(--od-cyan); --glow: rgba(25, 227, 255, 0.45); --edge: rgba(25, 227, 255, 0.6); }
[data-vibe="overdrive"] .button--tile[data-tone="green"]{ --tone: var(--od-lime); --glow: rgba(182, 255, 59, 0.4); --edge: rgba(182, 255, 59, 0.55); }
[data-vibe="overdrive"] .button--tile[data-tone="violet"]{ --tone: #9D7BFF; --glow: rgba(157, 123, 255, 0.45); --edge: rgba(157, 123, 255, 0.6); }
[data-vibe="overdrive"] .button--tile[data-tone="teal"]{ --tone: #25F2C8; --glow: rgba(37, 242, 200, 0.4); --edge: rgba(37, 242, 200, 0.55); }
[data-vibe="overdrive"] .button--tile .button__label{ color: var(--tone, var(--od-cyan)); }

/* Panels and full screens: gunmetal plates with a neon rule round them. */
[data-vibe="overdrive"] .panel{
  background:
    linear-gradient(180deg, rgba(25, 227, 255, 0.08), transparent 30%),
    linear-gradient(160deg, #1f2738 0%, #121826 55%, #0b0f18 100%);
  border: 2px solid var(--od-line); border-radius: 12px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 0 30px -8px rgba(25, 227, 255, 0.45), 0 18px 40px -14px rgba(0, 0, 0, 0.8);
}
[data-vibe="overdrive"] .screen{
  --screen-fill: #0f1420;
  background: linear-gradient(170deg, #1a2131, var(--screen-fill) 60%);
  border: 2px solid var(--od-line); border-radius: 12px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 0 34px -8px rgba(25, 227, 255, 0.45), 0 18px 40px -14px rgba(0, 0, 0, 0.8);
}
[data-vibe="overdrive"] .screen__bar{ background: linear-gradient(180deg, #1c2434, #141a27); border-bottom: 1px solid var(--od-line); }
[data-vibe="overdrive"] .screen__bar::before{ opacity: 0; }
[data-vibe="overdrive"] :is(.screen__title, .panel__title, .panel__eyebrow, .screen__heading, .menu__eyebrow, .reward__eyebrow){
  font-family: var(--od-font); font-style: italic; text-transform: uppercase; letter-spacing: 0.06em;
  color: #EAFBFF; text-shadow: 0 0 12px rgba(25, 227, 255, 0.6);
}
[data-vibe="overdrive"] .station{ background: #161c29; border-radius: 6px; }
[data-vibe="overdrive"] .station.is-selected{ border-color: var(--od-cyan); box-shadow: 0 0 14px -4px rgba(25, 227, 255, 0.6); }

/* The front screen: darker edges, the logo lit up in neon. */
[data-vibe="overdrive"] .overlay--menu{
  background:
    linear-gradient(to bottom, rgba(6, 9, 18, 0.75) 0%, rgba(6, 9, 18, 0) 22%),
    linear-gradient(to top, rgba(6, 9, 18, 0.8) 0%, rgba(6, 9, 18, 0) 26%),
    radial-gradient(ellipse 120% 90% at 50% 45%, rgba(6, 9, 18, 0.1) 50%, rgba(6, 9, 18, 0.55) 100%);
}
/* A tight neon rim, not a wide haze: the wide one was clipped into a box (see .menu__mark). */
[data-vibe="overdrive"] .menu__mark{ filter: drop-shadow(0 0 3px rgba(25, 227, 255, 0.9)) drop-shadow(0 0 9px rgba(255, 43, 214, 0.55)) saturate(1.1); }

/* Loading screen and the ray-lit screens: cyan light on near-black. */
[data-vibe="overdrive"] .boot{
  background:
    radial-gradient(circle at 50% 35%, rgba(25, 227, 255, 0.18), transparent 45%),
    radial-gradient(ellipse 120% 100% at 50% 30%, #1a2236, #0d1220 55%, #06080f 100%);
}
[data-vibe="overdrive"] :is(.reward, .death__rays){ filter: hue-rotate(-60deg) saturate(1.2); }
/* The theme tints the reveal, never the worm in it: the picture turns back the way the screen turned it. */
[data-vibe="overdrive"] .reward__medal.is-worm{
  filter: hue-rotate(60deg) saturate(0.834) drop-shadow(0 10px 8px rgba(0, 0, 0, 0.4)) drop-shadow(0 0 30px color-mix(in oklab, var(--tint) 55%, transparent));
}

/* The HUD reads like a race dash. */
[data-vibe="overdrive"] :is(.hud__label, .hud__value){ font-family: var(--od-font); font-style: italic; }
[data-vibe="overdrive"] .hud__stat:first-child .hud__value{ color: var(--od-cyan); text-shadow: 0 0 10px rgba(25, 227, 255, 0.7); }

/* Settings' theme cards: a swatch drawn from the theme's own colours. */
/* A theme's card and the Themes window show a capture of the front screen wearing it. */
.station__shot{ display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.25), 0 3px 8px rgba(0, 0, 0, 0.3); }
.screen__window--shot{ position: relative; overflow: hidden; }
.screen__shot{ position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.screen__window--shot .screen__badge{ z-index: 1; }
/* Overdrive, the rest of the front screen and the Settings shell. */
[data-vibe="overdrive"] .pickcard{
  border-radius: 10px;
  background: linear-gradient(180deg, #1d2536, #111623);
  box-shadow: inset 0 0 0 1px var(--od-line), 0 0 0 1px rgba(0, 0, 0, 0.6), 0 0 18px -6px rgba(25, 227, 255, 0.4);
}
[data-vibe="overdrive"] .pickcard__label{ font-family: var(--od-font); font-style: italic; text-transform: uppercase; letter-spacing: 0.04em; }
[data-vibe="overdrive"] .menu__field{
  border-radius: 8px; background: #0d121c;
  box-shadow: inset 0 0 0 1px var(--od-line), 0 0 16px -6px rgba(25, 227, 255, 0.5);
}
[data-vibe="overdrive"] .menu__field:focus-within{ box-shadow: inset 0 0 0 2px var(--od-mag), 0 0 18px -4px rgba(255, 43, 214, 0.6); }
[data-vibe="overdrive"] .menu__label{ color: var(--od-cyan); }
[data-vibe="overdrive"] .menu__input{ color: #EAFBFF; }
[data-vibe="overdrive"] .menu__input::placeholder{ color: #6f86a3; }
[data-vibe="overdrive"] .screen__tabs{ background: #121826; border-bottom: 1px solid var(--od-line); }
[data-vibe="overdrive"] .button--tab{ --bodyA: #222b3d; --bodyB: #182030; --bodyC: #111723; --ts: rgba(0, 0, 0, 0.6); }
[data-vibe="overdrive"] .button--tab[aria-selected="true"]{ --bodyA: #0f5b6c; --bodyB: #0c4655; --bodyC: #08323d; --edge: var(--od-cyan); }
[data-vibe="overdrive"] .screen__window{ border-radius: 10px; border: 2px solid var(--od-line); }
/* A windowed screen stays see-through, or its window shows the panel, not the arena (3 Oct 2026). */
[data-vibe="overdrive"] .screen.is-windowed{ background: transparent; }
[data-vibe="overdrive"] .screen__badge{
  border-radius: 8px; border: 1px solid var(--od-line); background: rgba(8, 12, 20, 0.88);
  font-family: var(--od-font); font-style: italic; text-transform: uppercase; color: #EAFBFF;
}
[data-vibe="overdrive"] .screen__heading{ font-family: var(--od-font); font-style: italic; text-transform: uppercase; letter-spacing: 0.06em; }
/*
 * Profile and Achievements in Overdrive (3 Oct 2026 sweep): the stat cards, the
 * "you" card and the trophies were still Classic violet.
 */
[data-vibe="overdrive"] :is(.statcard, .trophy){
  border: 2px solid var(--od-line); border-radius: 10px;
  background: linear-gradient(180deg, #1f2738, #141a27);
  box-shadow: 0 0 16px -8px rgba(25, 227, 255, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
[data-vibe="overdrive"] .trophy[data-tier="bronze"]{ border-color: #c98a5a; }
[data-vibe="overdrive"] .dossier__me{ border-radius: 10px; background: #161c29; border: 1px solid var(--od-line); box-shadow: none; }
[data-vibe="overdrive"] :is(.statcard__label, .statcard__value){ text-shadow: 0 0 8px rgba(25, 227, 255, 0.45); }
[data-vibe="overdrive"] .statcard__label{ color: var(--od-cyan); font-family: var(--od-font); font-style: italic; text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.04em; }
/*
 * Overdrive's small labels (4 Oct 2026, Gray: "overdrive boost word is
 * overflowing on mobile, same as achievments"). Orbitron is a wide display
 * face: in a 64px tile "ACHIEVEMENTS" ran 16px past each side, the Burrow's
 * "BEST RUN 28K" tags 20px, a selected tab's name on a phone 22px. Orbitron
 * stays on titles, headings and the big buttons; the tight labels go back to
 * the game's own lettering, which Classic proves fits, in Overdrive's colours.
 */
[data-vibe="overdrive"] :is(.button--tile .button__label, .button--pill, .button--sm, .tile__badge){
  font-family: var(--font-label); font-weight: 400; font-style: normal;
  letter-spacing: 0.01em; text-transform: none;
}
@media (max-width: 1100px), (max-height: 540px){
  [data-vibe="overdrive"] .button--tab .button__label{
    font-family: var(--font-label); font-weight: 400; font-style: normal;
    letter-spacing: 0.01em; text-transform: none;
  }
}
/* Boost keeps Orbitron, sized to the button it is in (74px on a phone, 96px elsewhere). */
[data-vibe="overdrive"] .boostbutton{ letter-spacing: 0; font-size: calc(var(--boost-size) * 0.135); }
/*
 * A Burrow card's name shrinks to fit its card rather than run out of it: on a
 * phone on its side the cards are narrow and "Neon Amber" was 15px over, in
 * both themes.
 */
.burrowcard{ container-type: inline-size; }
.burrowcard .station__name{ font-size: max(11.5px, min(0.88em, 9.2cqi)); letter-spacing: -0.065em; line-height: 1.25; }

/*
 * "Weak connection" (main.ts watchConnection): its own line under the stats,
 * ringed text in amber like the rest of the HUD, never a box over the arena.
 */
/* No width of its own (contain: inline-size): it fills the stats' width and runs on past it, so it can never widen that column and squeeze the Top 10 and the minimap beside it (6 Oct 2026). */
.hud__net{
  flex-basis: 100%; margin: -10px 0 0; display: flex; align-items: center; gap: 6px;
  contain: inline-size; white-space: nowrap; overflow: visible;
  font-family: var(--font-label); font-size: 0.95rem; color: #ffc24a;
  animation: net-blink 1.2s ease-in-out infinite;
}
.hud__net[hidden]{ display: none; }
/*
 * The Halloween Party's event line (ui/hud.ts setEventLine): a line of the
 * stats strip, under the readouts, for as long as an event runs. Ringed text
 * like the rest of the strip, never a box over the arena (Gray, 18 Oct 2026:
 * "nobody knows whats going on"). It arrives big, then settles.
 */
.hud__event{
  /*
   * contain: inline-size, as .hud__net: the line takes the strip's width and
   * never sets it. Without it the strip (a max-content column) grew to the
   * line's whole length and the line sat beside Level, off the screen on a
   * phone (check-overflow's in-run scenarios, 18 Oct 2026).
   */
  flex-basis: 100%; max-width: min(26rem, 54vw, 86%); margin: 0; contain: inline-size;
  font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; line-height: 1.25;
  color: #ffb347; white-space: pre-line; overflow-wrap: anywhere;
  transform-origin: left top;
}
.hud__event[hidden]{ display: none; }
.hud__event.is-new{ animation: hud-event-in 900ms ease-out both; }
/* Bigger as it arrives, then settled: 1.15, so even the arriving line stays clear of the Top 10 (check-overflow). */
@keyframes hud-event-in{ 0%{ transform: scale(1.15); filter: brightness(1.5); } 55%{ transform: scale(1.15); filter: brightness(1.5); } 100%{ transform: scale(1); filter: none; } }
.hud__event.is-close{ color: #ff5c5c; }
@media (prefers-reduced-motion: reduce){ .hud__event.is-new{ animation: none; } }
.hud__net svg{ flex: none; filter: drop-shadow(0 1px 0 var(--board-ink)) drop-shadow(0 -1px 0 var(--board-ink)); }
/* The one-time "graphics lowered" note: the same ringed line, steady and allowed to wrap in two short lines so it stays clear of the Top 10. */
.hud__quality{ animation: none; white-space: normal; contain: none; max-width: min(15em, 42vw); line-height: 1.15; color: #fff; }
.hud__quality[hidden]{ display: none; }
@keyframes net-blink{ 0%, 100%{ opacity: 1; } 50%{ opacity: 0.55; } }
@media (prefers-reduced-motion: reduce){ .hud__net{ animation: none; } }

/*
 * Flags and titles (5 Oct 2026). A flag is a small real flag (shared flags.ts,
 * the flag-icons set) beside a name: on the in-run board, the leaderboard and
 * the profile. A title is an achievement's name a player has finished, shown
 * under their name on the profile and beside it on the leaderboard, never over
 * the arena (clean play area).
 */
.flagicon{
  display: inline-block; flex: none; width: 28px; height: 21px; object-fit: cover; border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35); vertical-align: -4px;
}
.flagicon[hidden]{ display: none; }
.squirm-board__name .flagicon{ width: 16px; height: 12px; margin-right: 5px; vertical-align: -1px; border-radius: 2px; }
.ranks__name .flagicon{ margin-right: 8px; vertical-align: -2px; }
.ranks__title{
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: inherit; font-size: 0.78rem; font-weight: 700; color: #ffd27a; text-shadow: none; -webkit-text-stroke: 0;
}
.dossier__title{
  margin: -6px 0 0; font-family: var(--font-label); font-size: 1rem; color: #ffd27a;
}
.dossier__title[hidden]{ display: none; }
.dossier__picks{ display: grid; gap: 8px; width: 100%; }
.dossier__username{ display: grid; gap: 8px; width: 100%; margin: 0; }
.dossier__username[hidden]{ display: none; }
.dossier__note{ margin: 0; min-height: 1.2em; text-align: center; font-weight: 700; font-size: 0.9rem; color: #c9bdf5; }
.dossier__note[data-tone="bad"]{ color: #ff8a8a; }
.dossier__note[data-tone="good"]{ color: #c6f432; }
.dossier__picks .button{ justify-content: center; gap: 8px; }

/* The list picker (client ui/listPicker.ts): the house panel, a search field, then the choices. */
.panel--picker{ width: min(460px, 100%); display: flex; flex-direction: column; max-height: min(640px, 100%); }
.panel--picker .panel__title{ margin: 0 0 4px; text-align: center; }
.panel--picker .panel__note{ margin: 0 0 10px; text-align: center; }
.pickerlist__search{ margin: 0 0 10px; }
.pickerlist__search[hidden]{ display: none; }
.pickerlist{
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  display: grid; gap: 6px; padding: 2px 4px 2px 2px;
}
.pickerlist__item{ justify-content: flex-start; gap: 10px; text-align: left; }
.pickerlist__item.is-selected{ box-shadow: 0 0 0 3px #c6f432; }
.pickerlist__text{ display: grid; min-width: 0; }
.pickerlist__text b{ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pickerlist__text small{ font-size: 0.75rem; font-weight: 600; opacity: 0.8; }

/*
 * Achievement rarity and Legends (5 Oct 2026, the research pack): how many
 * players hold the tier a card shows, and the Legend a top tier gives.
 */
.trophy__rarity{ margin: 0; font-size: 0.8rem; font-weight: 700; color: rgba(255, 255, 255, 0.75); }
.trophy__rarity.is-rare{ color: #ffd27a; }
.trophy__legend{
  margin: 0; display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 12px;
  background: linear-gradient(90deg, rgba(255, 210, 74, 0.28), rgba(255, 79, 173, 0.18));
  box-shadow: inset 0 0 0 2px rgba(255, 210, 74, 0.55);
  font-family: var(--font-label); font-size: 0.98rem; color: #fff; --ts: #35187f;
}
.trophy__legend canvas{ width: 64px; height: 30px; flex: none; }
.trophy__legend small{ font-family: inherit; font-size: 0.74rem; font-weight: 700; color: #ffd27a; text-shadow: none; -webkit-text-stroke: 0; }
.trophy__share{ flex: none; }
/* A phone held sideways (about 320px tall): the note goes, and everything else gives the list room. */
@media (orientation: landscape) and (max-height: 460px){
  .panel--picker{ padding: 10px 12px; }
  .panel--picker .panel__title{ font-size: 1.05rem; margin: 0 0 6px; }
  .panel--picker .panel__note{ display: none; }
  .pickerlist__search{ margin: 0 0 6px; }
  .pickerlist__search .menu__input{ padding: 4px; font-size: 1rem; }
  .panel--picker .panel__actions{ margin-top: 8px; }
  .panel--picker .panel__actions .button{ padding-block: 6px; }
}

/*
 * A limited event (client ui/eventPanel.ts, 7 Oct 2026; rebuilt 25 Oct 2026 as
 * a full screen after "people are confused mate ... a modal thats over large").
 * The leaders' pattern (Squirm Artefacts/research/2026-10-25-event-presentation):
 * the name, the time left and your candy on top over the event's art; the
 * worms to win as pictures on a track with your place on it, each with its
 * candy; how to earn as one line of icons; a short board with its prizes as
 * pictures; the fine print behind "Rules". The menu tile is a .button--tile
 * with its countdown on the .tile__badge, like Daily gift's.
 */
.screen--event{ grid-template-rows: auto auto minmax(0, 1fr); width: min(1040px, 100%); height: min(820px, 100%); }
.eventbar{
  position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: center; gap: 8px 10px;
  min-height: 112px; padding: 10px 14px;
  background: linear-gradient(180deg, #352a86 0, rgba(53, 42, 134, 0) 38%, rgba(20, 12, 60, 0.6) 100%), url(/ui/event-halloween-banner.webp?v=c1803346) center 30% / cover #352a86;
  border-bottom: 4px solid rgba(255, 255, 255, 0.14);
}
.eventbar__pill svg{ width: 26px; height: 26px; margin-left: 8px; flex: none; color: #ffe45c; filter: drop-shadow(0 2px 1px rgba(0, 0, 0, 0.55)); }
.eventbar__pill b{ font-weight: 400; font-variant-numeric: tabular-nums; }
.eventpage{ display: grid; gap: 18px; max-width: 980px; margin: 0 auto; }
.eventpage__main, .eventpage__side{ display: grid; gap: 12px; align-content: start; min-width: 0; }
.eventpage__more{ justify-self: center; }
.eventpage__more[hidden]{ display: none; }
.eventpage .screen__heading{ text-align: center; }
/* Halloween Day (ui/eventPanel.ts paintDay): the Party's pieces and its board stand aside, and the day's own page is one column. */
.screen--event[data-day] [data-event-party]{ display: none !important; }
.screen--event[data-day] .eventpage{ grid-template-columns: minmax(0, 1fr) !important; max-width: 640px; }
[data-event-day]{ display: grid; gap: 12px; }
[data-event-day][hidden]{ display: none; }
/* Happy Halloween's hero and perks (Gray, 29 Oct 2026: "the box is boring ... get people excited as they read it"). */
.dayhero{
  position: relative; display: grid; justify-items: center; gap: 8px; padding: 18px 64px 16px; border-radius: 20px; text-align: center; overflow: hidden;
  background: radial-gradient(120% 140% at 50% 0%, rgba(255, 154, 0, 0.42), rgba(124, 38, 160, 0.35) 55%, rgba(12, 8, 36, 0.6));
  box-shadow: inset 0 0 0 2px rgba(255, 190, 80, 0.45), 0 0 28px rgba(255, 140, 0, 0.25);
}
.dayhero__title{ margin: 0; font-family: "Lilita One", var(--font-display); font-size: clamp(1.5rem, min(7vw, 7vh), 2.9rem); rotate: -2deg; }
.dayhero__title::before{ color: #3b0a5a; -webkit-text-stroke: 0.24em #3b0a5a; filter: drop-shadow(0 0.06em 0 #1b0431) drop-shadow(0 0.1em 0.1em rgba(0, 0, 0, 0.5)); }
.dayhero__title::after{ color: #ff9a00; -webkit-text-stroke: 0.1em #ff9a00; }
.dayhero__title > span{ background-image: linear-gradient(180deg, #fffbe6 0%, #ffe45c 45%, #ffc21a 55%, #ff9a00 100%); }
.dayhero__sub{ margin: 0; max-width: 34ch; font-family: "Lilita One", var(--font-display); font-size: 1.02rem; line-height: 1.25; color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35); }
.dayhero__pumpkin{ position: absolute; top: 50%; width: 56px; height: 56px; margin-top: -28px; filter: drop-shadow(0 0 12px rgba(255, 150, 0, 0.75)); animation: day-bob 2.4s ease-in-out infinite; }
.dayhero__pumpkin--l{ left: 6px; rotate: -12deg; }
.dayhero__pumpkin--r{ right: 6px; rotate: 12deg; animation-delay: -1.2s; }
@keyframes day-bob{ 0%, 100%{ translate: 0 -4px; } 50%{ translate: 0 4px; } }
.dayperks{ grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
.dayperks :where(li){ background: linear-gradient(180deg, rgba(255, 154, 0, 0.22), rgba(12, 8, 36, 0.5)); box-shadow: inset 0 0 0 1.5px rgba(255, 190, 80, 0.35); }
.dayperks small{ color: #ffd27a; }
.dayperks__hot{ box-shadow: inset 0 0 0 2px #ffe45c, 0 0 16px rgba(255, 228, 92, 0.45) !important; animation: day-glow 1.8s ease-in-out infinite; }
@keyframes day-glow{ 50%{ box-shadow: inset 0 0 0 2px #ffe45c, 0 0 26px rgba(255, 228, 92, 0.75); } }
[data-event-day] .eventtask{ box-shadow: inset 0 0 0 1.5px rgba(255, 190, 80, 0.35); }
.eventtask__reward--worm{ display: inline-flex; flex-direction: column; align-items: center; gap: 2px; font-family: "Lilita One", var(--font-display); font-size: 0.74rem; color: #ffd27a; }
.eventtask__worm{ width: 64px; height: 44px; }
[data-event-day] .screen__note{ font-family: "Lilita One", var(--font-display); font-size: 0.98rem; line-height: 1.3; color: #ffe8b8; text-align: center; }
@media (max-width: 520px){
  .dayhero{ padding: 16px 48px 14px; }
  .dayhero__pumpkin{ width: 40px; height: 40px; margin-top: -20px; }
  .dayperks{ grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (prefers-reduced-motion: reduce){ .dayhero__pumpkin, .dayperks__hot{ animation: none; } }

/* How to earn: one line of pictures. */
.eventearn{ list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.eventearn :where(li){
  display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; padding: 8px 3px 7px; border-radius: 14px;
  background: rgba(12, 8, 36, 0.45); text-align: center; overflow-wrap: anywhere; hyphens: manual;
  font-family: "Lilita One", var(--font-display); font-size: 0.82rem; line-height: 1.15; color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
}
.eventearn img, .eventearn svg{ width: 40px; height: 40px; flex: none; }
.eventearn svg{ color: #ffe45c; filter: drop-shadow(0 2px 1px rgba(0, 0, 0, 0.55)); }
.eventearn small{ display: block; font-family: inherit; font-size: 0.74rem; color: #ffe45c; }
.eventearn small:empty{ display: none; }

/* The track: your place on a rail, then the worms in the order you win them. */
.eventtrack{ list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 6px; }
.eventtrack__rail{ grid-column: 1 / -1; padding: 26px 0 4px; }
.eventtrack__bar{ position: relative; display: block; height: 14px; border-radius: 999px; background: rgba(12, 8, 36, 0.75); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.16); }
.eventtrack__fill{ position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--at) * 100%); border-radius: inherit; background: linear-gradient(180deg, #ffd27a, #ff9f1c); }
.eventtrack__dot{ position: absolute; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px rgba(12, 8, 36, 0.8); }
.eventtrack__you{
  position: absolute; top: 50%; left: clamp(18px, calc(var(--at) * 100%), calc(100% - 18px)); transform: translate(-50%, -50%);
  display: grid; justify-items: center;
}
.eventtrack__youicon{ width: 34px; height: 34px; padding: 3px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px #ff9f1c, 0 3px 6px rgba(0, 0, 0, 0.5); }
.eventtrack__youtext{
  position: absolute; bottom: 100%; margin-bottom: 3px; padding: 0 8px; border-radius: 999px; background: #ff9f1c;
  font-family: "Lilita One", var(--font-display); font-size: 0.8rem; line-height: 1.3; color: #3a1b00; white-space: nowrap;
}
.eventstep{
  position: relative; display: grid; justify-items: center; align-content: start; gap: 3px; min-width: 0; padding: 6px 2px 8px;
  border: 3px solid transparent; border-radius: 16px; background: rgba(12, 8, 36, 0.45); text-align: center;
}
.eventstep[data-state="owned"]{ border-color: rgba(198, 244, 50, 0.7); }
.eventstep[data-state="next"]{ border-color: #ffb12e; background: linear-gradient(180deg, rgba(255, 177, 46, 0.26), rgba(12, 8, 36, 0.45)); }
.eventstep[data-state="locked"] .eventstep__art{ filter: brightness(0.55) saturate(0.7); }
.eventstep__stage{ position: relative; width: 100%; height: 100px; }
.eventstep__art{ display: block; width: 100%; height: 100%; }
.eventstep__badge{
  position: absolute; top: 0; right: 2px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(12, 8, 36, 0.85); color: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}
.eventstep[data-state="owned"] .eventstep__badge{ background: #6fd02c; }
.eventstep__badge svg{ width: 16px; height: 16px; }
/* What is left to win it: one small line under the name in the card's own orange, never over the worm. */
.eventstep__togo{ max-width: 100%; font-family: "Lilita One", var(--font-display); font-size: clamp(0.62rem, 3vw, 0.78rem); line-height: 1.1; color: #ffb12e; white-space: nowrap; }
.eventstep__name{ max-width: 100%; overflow-wrap: anywhere; font-family: "Lilita One", var(--font-display); font-size: clamp(0.66rem, 3.3vw, 0.86rem); line-height: 1.15; color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.3); }
.eventstep__candy{ font-size: 1rem; color: #ffe45c; }
.eventstep__nuggets{ min-height: 1.2em; font-size: 0.82rem; color: #fff; }
.eventamount__icon{ width: 1.15em; height: 1.15em; flex: none; object-fit: contain; }
.eventstep__candy, .eventstep__nuggets, .eventtask__reward, .eventprize__nuggets, .ranks__len{ display: inline-flex; align-items: center; justify-content: center; gap: 3px; }
.eventstep__candy b, .eventstep__nuggets b, .eventtask__reward b, .eventprize__nuggets b{ font-family: "Lilita One", var(--font-display); font-weight: 400; font-variant-numeric: tabular-nums; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.3); }

/* The Rider's worm: one small row in the track's own look. */
.eventrider{
  display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; padding: 4px 12px 4px 6px;
  border: 3px solid transparent; border-radius: 16px; background: rgba(12, 8, 36, 0.45);
}
.eventrider[data-state="owned"]{ border-color: rgba(198, 244, 50, 0.7); }
.eventrider[data-state="locked"] .eventrider__art{ filter: brightness(0.55) saturate(0.7); }
.eventrider__art{ display: block; width: 56px; height: 52px; }
.eventrider__ask{ min-width: 0; font-family: "Lilita One", var(--font-display); font-weight: 400; font-size: clamp(0.8rem, 3.8vw, 0.98rem); line-height: 1.15; color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.3); overflow-wrap: anywhere; }
.eventrider__state svg{ display: block; width: 22px; height: 22px; color: #fff; }
.eventrider[data-state="owned"] .eventrider__state svg{ color: #c6f432; }

/* Daily tasks. */
.eventtasks{ list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.eventtask{
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 4px 10px; padding: 8px 12px; border-radius: 14px;
  background: rgba(12, 8, 36, 0.45); font-size: 0.88rem; line-height: 1.2;
}
.eventtask__text{ min-width: 0; overflow-wrap: anywhere; }
.eventtask__reward{ color: #ffe45c; font-size: 0.92rem; }
.eventtask__state{ min-width: 3.6em; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text-dim); white-space: nowrap; }
.eventtask__state svg{ width: 20px; height: 20px; color: #c6f432; }
.eventtask.is-done{ background: rgba(198, 244, 50, 0.16); }

/* The prizes, as pictures, over the board's top places. */
.eventprizes{ list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.eventprize{ display: grid; justify-items: center; align-content: start; gap: 2px; min-width: 0; padding: 6px 2px 8px; border-radius: 14px; background: rgba(12, 8, 36, 0.45); }
.eventprize__art{ display: block; width: 100%; height: 72px; }
.eventprize__place{ font-family: "Lilita One", var(--font-display); font-weight: 400; font-size: 1rem; color: #ffe45c; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.3); }
.eventprize__nuggets{ font-size: 0.8rem; color: #fff; }
.ranks--event .ranks__row{ grid-template-columns: 40px minmax(0, 1fr) auto; gap: 8px; min-height: 46px; padding: 2px 12px 2px 6px; }
.ranks--event .ranks__rank img{ width: 36px; height: 36px; }
.ranks--event .ranks__rank{ font-size: 1.15rem; }
.ranks--event .ranks__name, .ranks--event .ranks__len{ font-size: 1.05rem; }
/* A 20-letter name beside a candy count on a narrow column wraps rather than ending in "..." (a player's own name: check-overflow leaves it out of WORD). */
.ranks--event .ranks__name{ white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; line-height: 1.1; }
.ranks--event .ranks__len{ gap: 4px; }

/* The fine print, behind one small link. */
.eventrules{ max-width: 980px; margin: 14px auto 0; font-size: 0.86rem; line-height: 1.4; color: var(--text-dim); }
.eventrules summary{ display: inline-flex; align-items: center; min-height: 40px; padding: 0 6px; cursor: pointer; list-style: none; font-family: "Lilita One", var(--font-display); font-size: 1rem; color: #fff; text-decoration: underline; }
.eventrules summary::-webkit-details-marker{ display: none; }
.eventrules ul{ margin: 4px 0 0; padding-left: 1.2em; display: grid; gap: 4px; }

@media (min-width: 760px){
  .eventpage{ grid-template-columns: minmax(0, 1.45fr) minmax(300px, 1fr); align-items: start; }
  .eventstep__stage{ height: 124px; }
  .eventstep__name{ font-size: 0.95rem; }
}
/* A phone with the address bar showing, or a short screen: the art steps back to a strip. */
@media (max-height: 700px){
  .eventbar{ min-height: 64px; }
  .eventstep__stage{ height: 84px; }
}
/* A phone held sideways: the art is gone, the two columns keep everything in sight. */
@media (orientation: landscape) and (max-height: 500px){
  /* The house sideways header is one row: title, then this, then the X (see the screens' own rule above). */
  .screen--event .eventbar{ grid-column: 2; grid-row: 1; min-height: 0; padding: 4px 6px 2px; background: none; border: 0; align-items: center; }
  .eventearn li{ flex-direction: row; justify-content: flex-start; gap: 6px; padding: 5px 6px; text-align: left; }
  /* Halloween Day's page is one column of three short rows: its note steps back so the rows are all there is to scroll. */
  [data-event-day] .screen__note{ display: none; }
  .eventearn small{ display: block; }
  .eventtrack__rail{ padding-top: 22px; }
  .eventpage{ grid-template-columns: minmax(0, 1.45fr) minmax(250px, 1fr); align-items: start; gap: 14px; }
  .eventstep__stage{ height: 78px; }
  .eventearn img, .eventearn svg{ width: 26px; height: 26px; }
  .eventprize__art{ height: 56px; }
}

/*
 * The weekly mini event (ui/miniEventPanel.ts, shared/miniEvents.ts): a race. The group runs along one track
 * toward the finish line, the stops that pay Nuggets sit under it, the results drop in when a race has ended.
 * The pictures are named slots (packages/site/EVENT-ART.md); everything that moves is a transform or an opacity,
 * and nothing moves for a player who has asked for less motion.
 */
.screen--mini{ grid-template-rows: auto auto minmax(0, 1fr); width: min(760px, 100%); height: min(820px, 100%); }
.minibar{
  position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 10px;
  min-height: 64px; padding: 10px 14px;
  background: linear-gradient(180deg, #352a86 0, rgba(20, 12, 60, 0.6) 100%); border-bottom: 4px solid rgba(255, 255, 255, 0.14);
}
/* The pill's room at its left is for a picture; this one has none, so the number sits in the middle. */
.minibar .nuggetpill{ justify-content: center; gap: 2px; padding-inline: 18px; padding-block: 8px; }
.minipage{ display: grid; gap: 12px; max-width: 720px; margin: 0 auto; min-width: 0; padding-bottom: 104px; }
.minipage > *{ min-width: 0; }
.minipage .screen__heading{ text-align: center; }
.minipage[hidden], .minipage__last[hidden]{ display: none; }
.screen--mini[data-results] .minipage{ padding-bottom: 72px; }
.minipage__next{ margin: 0; text-align: center; font-size: 0.9rem; color: var(--text-dim); overflow-wrap: anywhere; }
.minipage__last{ justify-self: center; }

/*
 * The race, as Worms Zone draws Worm Swim (race.xml: five lanes on an 84px pitch, a name plate at the left of each,
 * the worm along its lane, flags at the finish, the cups beyond it): one lane per racer, top to bottom in place
 * order. Our own look: the Grand Prix runs on dirt tracks across a lawn, the Dig tunnels through soil. Everything
 * that moves is a transform, an opacity or a background position, and nothing moves for a player who asked for less.
 */
.minilanes[hidden]{ display: none; }
.minilanes{
  position: relative; display: grid; gap: 6px; padding: 8px 8px 10px; border-radius: 20px; overflow: hidden; container-type: inline-size;
  border: 3px solid rgba(255, 255, 255, 0.5); box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.25), 0 4px 0 rgba(8, 4, 34, 0.7);
  background:
    radial-gradient(circle 3px at 12% 20%, rgba(255, 255, 255, 0.35) 99%, transparent), radial-gradient(circle 2px at 70% 60%, rgba(255, 255, 255, 0.3) 99%, transparent),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0 22px, transparent 22px 44px),
    linear-gradient(180deg, #6fd04a, #3f9a2c);
}
.minilanes[data-look="dig"]{
  background:
    radial-gradient(circle 3px at 18% 30%, #a07a52 99%, transparent), radial-gradient(circle 2px at 64% 72%, #c09068 99%, transparent),
    radial-gradient(circle 4px at 86% 18%, #5a3a1e 99%, transparent),
    linear-gradient(180deg, #8a5a2e, #5a3518 55%, #3a1f0c);
}
.minilanes__head{
  margin: 0; text-align: center; font-family: "Lilita One", var(--font-display); font-size: 1.05rem; line-height: 1.2; color: #fff;
  -webkit-text-stroke: 0.2em #1d4a10; paint-order: stroke fill; text-shadow: 0 0.1em 0 #1d4a10;
}
.minilanes[data-look="dig"] .minilanes__head{ -webkit-text-stroke-color: #2a1406; text-shadow: 0 0.1em 0 #2a1406; }
.minilanes__head[hidden], .minilanes__none[hidden]{ display: none; }
.minilanes__none{ margin: 0; padding: 18px 8px; text-align: center; font-family: "Lilita One", var(--font-display); font-size: 1.1rem; color: #fff; }
.minilanes__list{ list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.minilane{
  --lh: clamp(42px, 7.6cqw, 54px);
  display: grid; grid-template-columns: minmax(150px, 44cqw) minmax(0, 1fr) calc(var(--lh) * 0.9); align-items: center; gap: 6px; min-height: var(--lh);
  animation: minilane-in 0.45s cubic-bezier(0.3, 1.4, 0.5, 1) both; animation-delay: calc(var(--i, 0) * 70ms);
}
@keyframes minilane-in{ from{ opacity: 0; transform: translateX(-24px); } }
/* The name plate: blue, yours gold (race.xml: the player's plate gold, the others blue), the place in a coin. */
.minilane__plate{
  display: flex; align-items: center; gap: 5px; min-width: 0; min-height: var(--lh); padding: 3px 10px 3px 4px; border-radius: 999px; border: 2px solid rgba(255, 255, 255, 0.85);
  background: linear-gradient(180deg, #5cc2ff 0%, #2a86ea 55%, #2270d8 100%); box-shadow: 0 2px 0 rgba(10, 50, 110, 0.55);
}
.minilane[data-you] .minilane__plate{ background: linear-gradient(180deg, #ffe680 0%, #ffb02e 60%, #ff9a1f 100%); box-shadow: 0 2px 0 rgba(140, 60, 0, 0.6); }
.minilane__rank{
  flex: none; display: grid; place-items: center; width: 1.6em; height: 1.6em; border-radius: 999px; font-family: "Lilita One", var(--font-display); font-weight: 400;
  font-size: 0.95rem; color: #fff; background: radial-gradient(circle at 35% 30%, #c49bff, #7a3cf0 50%, #4b16b0); box-shadow: inset 0 -0.1em 0 rgba(30, 6, 80, 0.5);
  -webkit-text-stroke: 0.18em #2c0d6e; paint-order: stroke fill;
}
.minilane[data-medal="gold"] .minilane__rank{ background: radial-gradient(circle at 35% 30%, #fff2a0, #ffc21a 45%, #e08a00); -webkit-text-stroke-color: #8a4300; }
.minilane[data-medal="silver"] .minilane__rank{ background: radial-gradient(circle at 35% 30%, #ffffff, #cfdbe8 45%, #8aa0b8); -webkit-text-stroke-color: #3e5266; }
.minilane[data-medal="bronze"] .minilane__rank{ background: radial-gradient(circle at 35% 30%, #ffd2a8, #e08a4a 45%, #a0521e); -webkit-text-stroke-color: #5a2a08; }
.minilane__face{ flex: none; width: calc(var(--lh) * 0.66); height: calc(var(--lh) * 0.66); }
.minilane__plate[data-long] .minilane__face{ display: none; }
/* A long name wraps on its own lines, never an ellipsis (the house rule): the lane grows to hold it. */
.minilane__name{
  min-width: 0; line-height: 1.25; padding-block: 0.06em;
  font-family: "Lilita One", var(--font-display); font-size: clamp(0.75rem, 2.5cqw, 1.05rem); color: #fff;
  -webkit-text-stroke: 0.12em #0d3a7a; paint-order: stroke fill; padding-inline: 0.08em;
}
.minilane[data-you] .minilane__name{ -webkit-text-stroke-color: #8a3a00; }
/* What the racer has gained, on its lane just before the flag (and the Dig's layer, or Fastest Lap). */
.minilane__len{
  position: absolute; z-index: 2; right: 20px; top: 50%; translate: 0 -50%; max-width: calc(100% - 30px); padding: 1px 8px; border-radius: 999px;
  white-space: nowrap; font-size: 0.75rem; font-weight: 800; color: #fff; background: rgba(40, 18, 4, 0.62); font-variant-numeric: tabular-nums;
}
.minilanes[data-look="dig"] .minilane__len{ background: rgba(255, 170, 60, 0.28); }
.minilane[data-far] .minilane__len{ right: auto; left: 10px; }
/* The track: a dirt lane with its white line running past, a worn trail behind the worm, the chequered finish at its end. */
.minilane__track{
  --p: 0; --ww: calc(var(--lh) * 1.55);
  position: relative; height: calc(var(--lh) * 0.76); border-radius: 999px;
  background: linear-gradient(180deg, #e2ac70, #c0834a); box-shadow: inset 0 3px 0 rgba(80, 40, 10, 0.35), 0 2px 0 rgba(255, 255, 255, 0.25);
}
.minilane__track::before{
  content: ""; position: absolute; left: 10px; right: 14px; top: 50%; height: 3px; margin-top: -1.5px; border-radius: 2px;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.7) 0 14px, transparent 14px 30px); animation: minilane-run 1.1s linear infinite;
}
@keyframes minilane-run{ to{ background-position: -30px 0; } }
.minilanes[data-look="dig"] .minilane__track{ background: linear-gradient(180deg, #2a1608, #4a2a12); box-shadow: inset 0 3px 0 rgba(0, 0, 0, 0.5), 0 2px 0 rgba(255, 220, 160, 0.2); }
.minilanes[data-look="dig"] .minilane__track::before{ background: repeating-linear-gradient(90deg, rgba(255, 190, 90, 0.35) 0 6px, transparent 6px 20px); }
.minilane__trail{
  position: absolute; left: 4px; top: 22%; bottom: 22%; width: calc(var(--p) * (100% - var(--ww)) + var(--ww) * 0.4); border-radius: 999px;
  background: rgba(255, 255, 255, 0.28); transition: width 1.6s cubic-bezier(0.2, 0.8, 0.2, 1) calc(var(--i, 0) * 120ms);
}
.minilanes[data-look="dig"] .minilane__trail{ background: linear-gradient(90deg, rgba(255, 150, 40, 0.05), rgba(255, 170, 60, 0.4)); }
.minilane__flag{
  position: absolute; right: 0; top: 0; bottom: 0; width: 14px; border-radius: 0 999px 999px 0;
  background: conic-gradient(#fff 25%, #23203a 0 50%, #fff 0 75%, #23203a 0) 0 0 / 7px 7px;
}
.minilane__worm{
  position: absolute; z-index: 1; top: 50%; left: calc(var(--p) * (100% - var(--ww))); width: var(--ww); height: calc(var(--lh) * 0.9); translate: 0 -50%;
  transition: left 1.6s cubic-bezier(0.2, 0.8, 0.2, 1) calc(var(--i, 0) * 120ms);
}
/* The worm wriggles as it goes: Worms Zone's "jelly", a squash one way then the other (0.4s, sine). */
.minilane__body{ display: block; width: 100%; height: 100%; transform-origin: 60% 60%; animation: minilane-jelly 0.4s ease-in-out infinite alternate; animation-delay: calc(var(--i, 0) * -90ms); }
@keyframes minilane-jelly{ from{ transform: scale(1.04, 0.95); } to{ transform: scale(0.95, 1.05); } }
/* Beyond the finish: the cups for the top three, the leader's standing in turning rays (the gift tiles' trick). */
.minilane__end{ position: relative; display: grid; place-items: center; height: var(--lh); }
.minilane__cup{ position: relative; z-index: 1; width: 92%; height: auto; aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.3)); }
.minilane[data-medal="gold"] .minilane__end::before{
  content: ""; position: absolute; inset: -30%; border-radius: 50%;
  background: repeating-conic-gradient(rgba(255, 240, 150, 0.55) 0 12deg, transparent 12deg 30deg);
  mask: radial-gradient(closest-side, #000 30%, transparent); animation: dg-rays 9s linear infinite;
}
.minilane[data-medal="gold"] .minilane__cup{ animation: minilane-pulse 1s ease-in-out infinite alternate; }
@keyframes minilane-pulse{ from{ transform: scale(0.9); } to{ transform: scale(1.04); } }
.minilane[data-you] .minilane__track{ outline: 3px solid #ffe066; outline-offset: 1px; }
/* An upright phone or a small one on its side: the plate is a slim row over its lane, so a name has the lane's whole
   width, and the cup stands at the end of the lane. */
@container (max-width: 640px){
  .minilane{
    --lh: 38px; grid-template-columns: minmax(0, 1fr) 44px; grid-template-areas: "plate plate" "track end"; gap: 3px 4px;
  }
  .minilane__plate{ grid-area: plate; min-height: 0; padding: 1px 10px 1px 2px; border-width: 2px; border-radius: 999px; justify-self: start; max-width: 100%; }
  .minilane__face{ width: 26px; height: 26px; }
  .minilane__rank{ font-size: 0.8rem; }
  .minilane__track{ grid-area: track; }
  .minilane__end{ grid-area: end; height: auto; align-self: center; }
  .minilane__cup{ width: 40px; }
  /* The cup stands half up into the plate's row. */
  .minilane[data-medal] .minilane__end{ margin-top: -14px; }
}
@media (prefers-reduced-motion: reduce){
  .minilane, .minilane__body, .minilane__track::before, .minilane__cup, .minilane__end::before{ animation: none; }
  .minilane__worm, .minilane__trail{ transition: none; }
}

/*
 * The Big Dig's pit (ui/miniEventPanel.ts paintPit): the picture of the layers down to the Core (ui/event/dig-core.webp,
 * stretched to its box), a ruler beside it naming each layer and where it ends, and every digger's face in a shaft at
 * its depth. Two diggers share a shaft side by side. Under it the group is listed, a row each. The Core's lava moves.
 */
.minidig[hidden]{ display: none; }
.minidig{
  --ruler: clamp(56px, 15cqw, 92px);
  display: grid; grid-template-columns: var(--ruler) minmax(0, 1fr); gap: 5px; width: 100%; max-width: 520px; margin-inline: auto;
}
.minidig__ruler{ list-style: none; margin: 0; padding: 0; position: relative; }
.minidig__layer{
  position: absolute; left: 0; right: 0; top: var(--top); height: calc(var(--end) - var(--top)); display: grid; align-content: center; justify-items: center; gap: 1px;
  text-align: center; border-radius: 10px; background: rgba(30, 14, 4, 0.55); border: 2px solid rgba(255, 220, 160, 0.35);
}
.minidig__layername{
  font-family: "Lilita One", var(--font-display); font-size: 0.78rem; line-height: 1.2; color: #fff; padding-inline: 2px;
  -webkit-text-stroke: 0.14em #2a1406; paint-order: stroke fill;
}
.minidig__depth{ font-size: 0.72rem; line-height: 1.1; font-weight: 800; color: #ffd36a; font-variant-numeric: tabular-nums; }
.minidig__pit{
  position: relative; aspect-ratio: 980 / 880; container-type: inline-size; overflow: hidden; border-radius: 14px;
  border: 3px solid #2a1406; box-shadow: 0 3px 0 rgba(0, 0, 0, 0.4); background: #3a1f0c;
}
.minidig__bg{ position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* The lava is alive: a hot glow that swells and drifts across the Core, and embers rising off it. Light only, over the picture, under the diggers. */
.minidig__pit::before, .minidig__pit::after{ content: ""; position: absolute; left: 0; right: 0; pointer-events: none; z-index: 1; }
.minidig__pit::before{
  bottom: 0; height: 24%; mix-blend-mode: screen;
  background:
    radial-gradient(ellipse 30% 60% at 20% 70%, rgba(255, 200, 60, 0.55), transparent 70%),
    radial-gradient(ellipse 26% 55% at 65% 80%, rgba(255, 150, 30, 0.5), transparent 70%),
    radial-gradient(ellipse 22% 50% at 90% 60%, rgba(255, 220, 90, 0.45), transparent 70%);
  background-size: 200% 100%; animation: lavaflow 9s linear infinite, lavaglow 2.4s ease-in-out infinite alternate;
}
.minidig__pit::after{
  bottom: 4%; height: 38%;
  background:
    radial-gradient(circle 2px at 15% 90%, #ffd84a 99%, transparent), radial-gradient(circle 1.5px at 38% 80%, #ffb020 99%, transparent),
    radial-gradient(circle 2px at 61% 95%, #ffe27a 99%, transparent), radial-gradient(circle 1.5px at 84% 85%, #ff9a1f 99%, transparent),
    radial-gradient(circle 2px at 50% 70%, #ffd84a 99%, transparent);
  animation: lavaembers 3.6s ease-out infinite;
}
@keyframes lavaflow{ from{ background-position: 0% 0; } to{ background-position: -200% 0; } }
@keyframes lavaglow{ from{ opacity: 0.55; } to{ opacity: 1; } }
@keyframes lavaembers{ from{ transform: translateY(0); opacity: 0.9; } to{ transform: translateY(-60%); opacity: 0; } }
/* A line where each layer ends, across the picture, level with its ruler card. */
.minidig__diggers{
  --face: clamp(24px, 6.4cqw, 44px);
  list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; z-index: 2;
  background:
    linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.4)) 0 24% / 100% 2px no-repeat,
    linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.4)) 0 42% / 100% 2px no-repeat,
    linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.4)) 0 60% / 100% 2px no-repeat,
    linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.4)) 0 80% / 100% 2px no-repeat;
}
.minidig__digger{
  position: absolute; left: clamp(calc(var(--face) * 1.25), var(--x), calc(100% - var(--face) * 1.4)); top: var(--y); z-index: var(--z); width: var(--face); height: var(--face);
  translate: calc(-50% + var(--side) * var(--face) * 0.52) -50%;
  transition: top 1.8s cubic-bezier(0.2, 0.8, 0.2, 1) calc(var(--i, 0) * 110ms);
}
.minidig__face{
  display: block; width: 100%; height: 100%; border-radius: 50%; background: rgba(20, 10, 4, 0.55);
  box-shadow: 0 0 0 2px #fff, 0 3px 0 2px rgba(0, 0, 0, 0.45); animation: minilane-jelly 0.45s ease-in-out infinite alternate; animation-delay: calc(var(--i, 0) * -90ms);
}
.minidig__digger[data-you]{ --ring: #ffe066; }
.minidig__digger[data-you] .minidig__face{ box-shadow: 0 0 0 3px #ffe066, 0 0 12px 3px rgba(255, 224, 102, 0.8); }
.minidig__place{
  position: absolute; right: -30%; bottom: -26%; display: grid; place-items: center; min-width: 1.45em; height: 1.45em; padding: 0 0.2em; border-radius: 999px;
  font-family: "Lilita One", var(--font-display); font-weight: 400; font-size: 0.72rem; line-height: 1; color: #fff;
  background: radial-gradient(circle at 35% 30%, #c49bff, #7a3cf0 50%, #4b16b0); box-shadow: inset 0 -0.1em 0 rgba(30, 6, 80, 0.5);
  -webkit-text-stroke: 0.18em #2c0d6e; paint-order: stroke fill;
}
.minidig__digger[data-medal="gold"] .minidig__place{ background: radial-gradient(circle at 35% 30%, #fff2a0, #ffc21a 45%, #e08a00); -webkit-text-stroke-color: #8a4300; }
.minidig__digger[data-medal="silver"] .minidig__place{ background: radial-gradient(circle at 35% 30%, #ffffff, #cfdbe8 45%, #8aa0b8); -webkit-text-stroke-color: #3e5266; }
.minidig__digger[data-medal="bronze"] .minidig__place{ background: radial-gradient(circle at 35% 30%, #ffd2a8, #e08a4a 45%, #a0521e); -webkit-text-stroke-color: #5a2a08; }
.minidig__digger[data-you] .minidig__place{ background: radial-gradient(circle at 35% 30%, #ffe680, #ffb02e 60%, #ff9a1f); -webkit-text-stroke-color: #8a3a00; }
/* The group, a row each: the plate, then how far it has dug. */
/* The Dig's live page reads top to bottom: what the places get, the daily bonus, where you stand, then the pit and the group. */
.screen--mini:not([data-results]) .minipage[data-look="dig"] > .minipodium{ order: -3; }
.screen--mini:not([data-results]) .minipage[data-look="dig"] > .miniboost{ order: -2; }
.screen--mini:not([data-results]) .minipage[data-look="dig"] > .minime{ order: -1; }
.minilanes[data-look="dig"] .minilanes__list{ gap: 6px 8px; }
.minilanes[data-look="dig"] .minilane{ --lh: 36px; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: none; gap: 6px; }
.minilanes[data-look="dig"] .minilane__plate{ grid-area: auto; min-height: var(--lh); padding: 2px 6px 2px 3px; justify-self: stretch; }
/* A row is one line: a long name is set smaller to fit (fitNames), then its face steps aside. */
.minilanes[data-look="dig"] .minilane__name{ white-space: nowrap; }
.minidig__len{
  padding: 2px 7px; border-radius: 999px; white-space: nowrap; font-size: 0.8rem; font-weight: 800; color: #fff; background: rgba(30, 14, 4, 0.7);
  font-variant-numeric: tabular-nums; border: 2px solid rgba(255, 220, 160, 0.35);
}
.minilane[data-home] .minidig__len{ color: #ffd36a; border-color: #ffd36a; }
@container (min-width: 600px){
  .minilanes[data-look="dig"] .minilanes__list{ grid-template-columns: 1fr 1fr; }
}
/* A phone on its side: the pit stands at the left, the group beside it. */
@media (orientation: landscape) and (max-height: 500px){
  .minilanes[data-look="dig"]{ grid-template-columns: minmax(0, 340px) minmax(0, 1fr); align-items: start; column-gap: 10px; }
  .minilanes[data-look="dig"] .minilanes__head, .minilanes[data-look="dig"] .minilanes__none{ grid-column: 1 / -1; }
  .minilanes[data-look="dig"] .minidig{ grid-column: 1; }
  .minilanes[data-look="dig"] .minilanes__list{ grid-column: 2; grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce){
  .minidig__pit::before, .minidig__pit::after, .minidig__face{ animation: none; }
  .minidig__digger{ transition: none; }
}
/*
 * The countdown on a ribbon, as Worms Zone heads its race (race.xml: a ribbon header with six sparkles, each flaring
 * in turn: 0.3s up and a 60deg turn, 0.6s down and another 120deg, 1.25s to 2.25s in, then still).
 */
.screen--mini .minibar{ isolation: isolate; }
.screen--mini .minibar .nuggetpill{ position: relative; }
.screen--mini .minibar .nuggetpill::before{
  content: ""; position: absolute; z-index: -1; left: -54px; right: -54px; top: 50%; height: 46px; translate: 0 -50%;
  background: linear-gradient(180deg, #ff6cc0, #d61f7c 60%, #a8105e);
  clip-path: polygon(0 0, 100% 0, 95% 50%, 100% 100%, 0 100%, 5% 50%);
  filter: drop-shadow(0 3px 0 #5a0632);
}
.minibar__flare{
  position: absolute; z-index: 1; width: 18px; height: 18px; pointer-events: none; scale: 0;
  background: radial-gradient(closest-side, #fff 20%, transparent), conic-gradient(from 45deg, transparent 0 20deg, #fff8c0 20deg 25deg, transparent 25deg 110deg, #fff8c0 110deg 115deg, transparent 115deg 200deg, #fff8c0 200deg 205deg, transparent 205deg 290deg, #fff8c0 290deg 295deg, transparent 295deg);
  border-radius: 50%; animation: miniflare 4.9s ease-in-out infinite;
}
.minibar__flare:nth-child(1){ left: 22%; top: 18%; animation-delay: 1s; }
.minibar__flare:nth-child(2){ left: 74%; top: 62%; animation-delay: 1.25s; }
.minibar__flare:nth-child(3){ left: 31%; top: 66%; animation-delay: 1.5s; }
.minibar__flare:nth-child(4){ left: 68%; top: 14%; animation-delay: 1.75s; }
.minibar__flare:nth-child(5){ left: 15%; top: 48%; animation-delay: 2s; }
.minibar__flare:nth-child(6){ left: 83%; top: 36%; animation-delay: 2.25s; }
@keyframes miniflare{
  0%{ scale: 0; rotate: 0deg; }
  6%{ scale: 1; rotate: 60deg; }
  18%, 100%{ scale: 0; rotate: 180deg; }
}
@media (prefers-reduced-motion: reduce){ .minibar__flare{ display: none; } }
/* A place's power-up pack, under its Nuggets. */
.minicard__pack{ font-size: 1rem; }
.minicard .minicard__pack b, .minicard__pack{ color: #c6f432; }
/* Medals: the race's three worms, each with the medals it needs; held ones lit, the next one ringed. */
.minimedals{ display: grid; gap: 8px; }
.minimedals[hidden]{ display: none; }
.minimedals > .screen__heading{ margin: 0; }
.minimedals__list{ list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.minimedal{
  position: relative; display: grid; justify-items: center; gap: 2px; padding: 8px 6px 10px; text-align: center; border-radius: 14px;
  border: 3px solid transparent; background: rgba(12, 8, 36, 0.45);
}
.minimedal[data-state="owned"]{ border-color: rgba(198, 244, 50, 0.7); }
.minimedal[data-state="next"]{ border-color: #ffb12e; background: linear-gradient(180deg, rgba(255, 177, 46, 0.26), rgba(12, 8, 36, 0.45)); }
.minimedal__worm{ display: block; width: min(100%, 84px); height: 76px; }
.minimedal__name{ font-family: "Lilita One", var(--font-display); font-size: clamp(0.8rem, 3.6vw, 0.95rem); line-height: 1.25; color: #ffe45c; }
.minimedal__need{ font-size: 0.8rem; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.minimedal .ministop__state{ position: absolute; top: 6px; right: 6px; }
.minimedal[data-state="owned"] .ministop__state svg{ color: #c6f432; opacity: 1; }
/* "Worm7 just overtook you!": slides up over the bottom of the stage for a few seconds. */
.minirace__toast{
  position: absolute; left: 50%; bottom: 10px; translate: -50% 0; z-index: 30; margin: 0; max-width: calc(100% - 20px); box-sizing: border-box; padding: 0.35em 0.9em;
  width: max-content; border-radius: 16px; border: 2px solid #ff4fad; background: rgba(20, 8, 44, 0.9); color: #fff; font-weight: 700; font-size: clamp(0.78rem, 3cqw, 0.95rem);
  text-align: center; overflow-wrap: anywhere; animation: minitoast 0.4s ease-out both;
}
.minirace__toast[hidden]{ display: none; }
@keyframes minitoast{ from{ opacity: 0; transform: translateY(0.8em); } }
/* The race's own boost over the stage: Rush Hour (pink to orange, throbbing), Daily Dig (lime). */
.miniboost{
  display: grid; gap: 1px; margin: 0; padding: 9px 14px; border-radius: 16px; border: 3px solid #fff; text-align: center;
  background: linear-gradient(90deg, #ff5ab0, #ff9a1f); color: #fff; font-weight: 700; font-size: 0.92rem; line-height: 1.25;
}
.miniboost[hidden]{ display: none; }
.miniboost b{ font-family: "Lilita One", var(--font-display); font-weight: 400; font-size: 1.15rem; }
.miniboost[data-kind="rush"]{ animation: miniboost 1.2s ease-in-out infinite alternate; }
@keyframes miniboost{ to{ transform: scale(1.02); } }
.miniboost[data-kind="ready"]{ background: rgba(198, 244, 50, 0.16); border-color: #c6f432; }
.miniboost[data-kind="ready"] b{ color: #c6f432; }
.miniboost[data-kind="done"]{ background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.3); color: #c9bdf5; }
/* The Grand Prix's podium has a fourth box, Fastest Lap; the Dig has five layers. */
.ministops[data-count="5"]{ grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.ministops[data-count="5"] .ministop{ padding-inline: 6px; }
.ministops[data-count="5"] .ministop__n{ font-size: clamp(0.6rem, 2.6vw, 0.85rem); }
.ministops[data-count="5"] .ministop__nuggets{ font-size: clamp(0.64rem, 2.7vw, 0.85rem); flex-wrap: wrap; gap: 2px; }
.ministops[data-count="5"] .ministop__points{ font-size: clamp(0.6rem, 2.4vw, 0.74rem); }
.ministops[data-count="5"] .eventamount__icon{ width: 13px; height: 13px; }
.ministops[data-count="5"] .ministop__n{ line-height: 1.15; overflow-wrap: anywhere; }
/* An upright phone: five stops in a row put their words at 9-10px (SMALL, ui/uiRules.ts). Three and two, readable. */
@media (max-width: 480px){
  .ministops[data-count="5"]{ grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .ministops[data-count="5"] .ministop__n, .ministops[data-count="5"] .ministop__nuggets{ font-size: 0.8rem; overflow-wrap: normal; }
  .ministops[data-count="5"] .ministop__points{ font-size: 0.75rem; }
  .ministops[data-count="5"] .eventamount__icon{ width: 16px; height: 16px; }
}
.ministop[data-medal="lap"]{ border-color: #ff4fad; }
.ranks__tag{ margin-left: 4px; font-family: var(--font-display); font-weight: 600; font-size: 0.78em; color: #c9bdf5; -webkit-text-stroke: 0; text-shadow: none; }   /* the row's outline is not inherited by small print */
/* The celebration: the player's worm on the podium beside its cup, confetti falling over both. */
.miniresults{ position: relative; }
.miniresults__podium{ display: flex; align-items: flex-end; justify-content: center; gap: 4px; }
.miniresults__worm{ width: clamp(110px, 36vw, 170px); height: clamp(110px, 36vw, 170px); animation: miniworm 0.9s ease-in-out infinite alternate; }
@keyframes miniworm{ from{ transform: translateY(0) rotate(-3deg); } to{ transform: translateY(-8px) rotate(3deg); } }
.miniresults__party{ position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 2; border-radius: inherit; }
.miniresults__bit{
  position: absolute; top: -12px; left: var(--x); width: 9px; height: 14px; border-radius: 2px; background: hsl(var(--hue) 95% 60%);
  rotate: var(--r); animation: miniconfetti 2.6s linear var(--d) infinite;
}
@keyframes miniconfetti{ to{ transform: translateY(420px) rotate(540deg); opacity: 0.2; } }
@media (prefers-reduced-motion: reduce){ .miniresults__worm, .miniboost[data-kind="rush"], .minirace__toast{ animation: none; } }

/* A racer who has crossed the line: its length in the line's gold. */
.ranks--event .ranks__row.is-finished .ranks__len{ color: #ffd84a; }

/* The stops along the way, each with its Nuggets. */
.ministops{ list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.ministop[data-medal="gold"]{ border-color: rgba(255, 207, 58, 0.75); }
.ministop[data-medal="silver"]{ border-color: rgba(214, 226, 240, 0.6); }
.ministop[data-medal="bronze"]{ border-color: rgba(230, 150, 90, 0.65); }
.ministop{
  position: relative; display: grid; justify-items: center; align-content: start; gap: 2px; min-width: 0; padding: 8px 7px 6px; text-align: center;
  border: 3px solid transparent; border-radius: 14px; background: rgba(12, 8, 36, 0.45);
}
.ministop[data-state="owned"]{ border-color: rgba(198, 244, 50, 0.7); }
.ministop[data-state="next"]{ border-color: #ffb12e; background: linear-gradient(180deg, rgba(255, 177, 46, 0.26), rgba(12, 8, 36, 0.45)); }
.ministop__n{ font-family: "Lilita One", var(--font-display); font-size: clamp(0.7rem, 3.2vw, 0.9rem); line-height: 1.1; color: #ffe45c; overflow-wrap: anywhere; }
/* A word that must not break at its hyphen (ui/uiRules.ts keepWords, SPLIT). */
.nobreak{ white-space: nowrap; }
.ministop__nuggets{ display: inline-flex; align-items: center; justify-content: center; gap: 3px; font-size: 0.9rem; color: #fff; }
.ministop__nuggets b{ font-family: "Lilita One", var(--font-display); font-weight: 400; font-variant-numeric: tabular-nums; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.3); }
/* What an amount is ("Nuggets", "Power-ups"), on its own line under the count; beside it in the one-line Fastest Lap row. */
.ministop__nuggets{ flex-wrap: wrap; }
.ministop__what{ flex-basis: 100%; text-align: center; font-size: 0.68rem; font-weight: 700; color: var(--text-dim); line-height: 1.1; }
.minipodium__extra .ministop__what, .miniresults__reward .ministop__what{ flex-basis: auto; font-size: 0.85rem; }
.minicard .ministop__what{ font-size: 0.74rem; }
@media (min-width: 560px){ .minicard .ministop__what{ text-align: left; } }
.ministop__points{ font-size: 0.74rem; color: var(--text-dim); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ministop__state svg{ display: block; width: 18px; height: 18px; color: #fff; opacity: 0.6; }
.ministop[data-state="owned"] .ministop__state svg{ color: #c6f432; opacity: 1; }

/* The results: the trophy drops, then each line rises in. Shown in place of the live pieces. */
.miniresults{ display: none; justify-items: center; gap: 4px; padding: 12px 10px; text-align: center; border-radius: 18px; background: rgba(12, 8, 36, 0.45); }
.screen--mini[data-results] .miniresults{ display: grid; }
.screen--mini[data-results] :is([data-mini-me], [data-mini-podium-box]){ display: none; }
.miniresults__trophy{ display: block; width: clamp(72px, 22vw, 140px); height: auto; aspect-ratio: 1; transform-origin: 50% 100%; }
.miniresults__trophy.is-dropping{ animation: minidrop 0.9s cubic-bezier(0.3, 1.4, 0.5, 1) both; }
.miniresults__trophy.is-dropping[data-first]{ animation: minidrop 0.9s cubic-bezier(0.3, 1.4, 0.5, 1) both, minipulse 1.6s ease-in-out 1.2s infinite alternate; }
@keyframes minidrop{
  0%{ opacity: 0; transform: translateY(-140%) scale(0.6) rotate(-8deg); }
  60%{ opacity: 1; transform: translateY(6%) scale(1.08) rotate(2deg); }
  100%{ opacity: 1; transform: none; }
}
@keyframes minipulse{ from{ transform: scale(1); } to{ transform: scale(1.06); } }
.miniresults__title{ margin: 0; font-family: "Lilita One", var(--font-display); font-size: clamp(1.8rem, min(8vw, 7vh), 2.7rem); rotate: -2deg; }
.miniresults__title::before{ color: #3b0a5a; -webkit-text-stroke: 0.24em #3b0a5a; filter: drop-shadow(0 0.06em 0 #1b0431) drop-shadow(0 0.1em 0.1em rgba(0, 0, 0, 0.5)); }
.miniresults__title::after{ color: #ff9a00; -webkit-text-stroke: 0.1em #ff9a00; }
.miniresults__title > span{ background-image: linear-gradient(180deg, #fffbe6 0%, #ffe45c 45%, #ffc21a 55%, #ff9a00 100%); }
.miniresults__name{ margin: 0; font-size: 0.9rem; color: var(--text-dim); overflow-wrap: anywhere; }
.miniresults [hidden]{ display: none; }
/* The place and the worm it gave, the Nuggets, and when they arrive: the big lines of the reveal. */
.miniresults__place, .miniresults__reward{
  margin: 0; font-family: var(--font-label); line-height: 1.15; -webkit-text-stroke: 0.2em #1b1050; paint-order: stroke fill; text-shadow: 0 0.1em 0 #1b1050;
  overflow-wrap: anywhere; text-wrap: balance;
}
.miniresults__place{ font-size: clamp(1.5rem, 7.5vw, 2.1rem); color: #fff; }
.miniresults__reward{ display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: clamp(1.5rem, 7.5vw, 2.1rem); color: #ffe45c; }
.miniresults__reward .eventamount__icon{ width: 1.1em; height: 1.1em; flex: none; }
/* The pack beside the Nuggets is smaller type: its outline is its own size's, not the big line's. */
.miniresults__reward .minicard__pack, .miniresults__reward .minicard__pack *{ -webkit-text-stroke-width: 0.1em; text-shadow: 0 0.08em 0 #1b1050; }
.miniresults__tag{ margin: 0; padding: 2px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); font-size: 0.85rem; color: #d8cffa; }
.miniresults__next{ margin: 0; font-family: var(--font-label); font-size: 1.05rem; color: #c6f432; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.3); }
.miniresults__line{ margin: 0; max-width: 40ch; font-family: "Lilita One", var(--font-display); font-size: clamp(0.9rem, 3.8vw, 1.05rem); line-height: 1.25; color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.3); overflow-wrap: anywhere; }
.screen--mini[data-results] .miniresults > :not(.miniresults__trophy){ animation: minirise 0.5s ease-out both; }
.screen--mini[data-results] .miniresults > :nth-child(3){ animation-delay: 0.35s; }
.screen--mini[data-results] .miniresults > :nth-child(4){ animation-delay: 0.6s; }
.screen--mini[data-results] .miniresults > :nth-child(5){ animation-delay: 0.85s; }
.screen--mini[data-results] .miniresults > :nth-child(n+6){ animation-delay: 1.05s; }
@keyframes minirise{ from{ opacity: 0; transform: translateY(14px); } to{ opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce){
  .miniresults__trophy.is-dropping, .miniresults__trophy.is-dropping[data-first], .screen--mini[data-results] .miniresults > :not(.miniresults__trophy){ animation: none; }
  .miniresults__trophy{ opacity: 1; }
}
/* A phone held sideways: the header is one row (as the event's is), the track is a little lower. */
@media (orientation: landscape) and (max-height: 500px){
  .screen--mini .minibar{ grid-column: 2; grid-row: 1; min-height: 0; padding: 4px 6px 2px; background: none; border: 0; }
  /* The ribbon reaches less far here, and the pill keeps clear of the title it sits beside. */
  .screen--mini .minibar{ margin-inline: 22px; min-width: 0; }
  .screen--mini .minibar .nuggetpill{ font-size: 0.82em; }
  .screen--mini .minibar .nuggetpill::before{ left: -16px; right: -16px; height: 36px; }
  .minipage__next{ font-size: 0.8rem; }
  .miniresults__trophy{ width: 64px; }
  .miniresults__worm{ width: 84px; height: 84px; }
  .miniresults{ padding: 6px; }
}

/*
 * What the race gives and where the player is (ui/miniEventPanel.ts paintPrizes, paintMe): the three places under the
 * countdown, each card its place, its worm, the worm's name and its Nuggets, then the player's own place in one big line.
 */
.minipodium{ display: grid; gap: 8px; }
.minipodium > .screen__heading{ margin: 0; }
.minipodium__list{ list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.minicard{ gap: 4px; padding: 8px 6px 10px; align-content: space-between; }
.minicard__place{
  font-family: var(--font-label); font-size: 1.45rem; line-height: 1.1; color: #fff;
  -webkit-text-stroke: 0.2em #1b1050; paint-order: stroke fill; text-shadow: 0 0.1em 0 #1b1050;
}
.minicard[data-medal="gold"] .minicard__place{ color: #ffd84a; }
.minicard[data-medal="silver"] .minicard__place{ color: #e6eef8; }
.minicard[data-medal="bronze"] .minicard__place{ color: #f4a566; }
.minicard__worm{ display: block; width: min(100%, 92px); height: 84px; }
.minicard__cup{ width: 64px; height: 64px; object-fit: contain; }
.minicard__name{ font-family: var(--font-label); letter-spacing: -0.04em; font-size: 0.76rem; line-height: 1.1; color: #ffe45c; overflow-wrap: anywhere; }
.minicard .ministop__nuggets{ font-size: 1rem; }
.minicard__you{
  display: none; padding: 1px 10px; border-radius: 999px; font-family: var(--font-label); font-size: 0.8rem; line-height: 1.3; color: #3a1d00;
  background: linear-gradient(#ffd84a, #ff9a1f); box-shadow: 0 2px 0 #9a4300;
}
.minicard[data-me]{ border-color: #c6f432; background: linear-gradient(180deg, rgba(198, 244, 50, 0.22), rgba(12, 8, 36, 0.45)); }
.minicard[data-me] .minicard__you{ display: block; }
.minipodium__extra{
  display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0; padding: 6px 10px; border-radius: 14px; background: rgba(12, 8, 36, 0.45);
  font-family: var(--font-label); font-size: 0.95rem; color: #fff; box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.1), 0 3px 0 rgba(8, 4, 34, 0.7);
}
.minipodium__extra[hidden], .minime[hidden], .minime__join[hidden]{ display: none; }
.minipodium__cup{ width: 28px; height: 28px; object-fit: contain; }
.minime{
  display: grid; justify-items: center; gap: 6px; padding: 12px 14px 14px; text-align: center; border-radius: 18px; background: rgba(12, 8, 36, 0.45);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.1), 0 3px 0 rgba(8, 4, 34, 0.7);
}
.minime__place, .minime__gap{
  margin: 0; font-family: var(--font-label); line-height: 1.12; overflow-wrap: anywhere;
  -webkit-text-stroke: 0.2em #1b1050; paint-order: stroke fill; text-shadow: 0 0.1em 0 #1b1050;
}
.minime__place{ font-size: clamp(2rem, 10vw, 2.7rem); color: #ffe45c; }
.minime[data-joined="no"] .minime__place{ font-size: clamp(1.5rem, 7vw, 2rem); color: #fff; }
.minime__gap{ font-size: clamp(1.2rem, 5.6vw, 1.6rem); color: #fff; }
.minime__gap:empty{ display: none; }
.minigoal{
  position: relative; width: 100%; height: 28px; margin-top: 4px; border-radius: 10px; overflow: hidden;
  background: #2b2178; border: 2px solid rgba(255, 255, 255, 0.22); box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.45);
}
.minigoal__fill{ position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(180deg, #ffd27a, #ff9f1c 55%, #ff4fad); transition: width 0.6s ease-out; }
.minigoal__label{
  position: relative; display: block; text-align: center; line-height: 24px; white-space: nowrap; font-family: var(--font-label); font-size: 1rem; color: #fff;
  font-variant-numeric: tabular-nums; -webkit-text-stroke: 0.2em #1b1050; paint-order: stroke fill; text-shadow: 0 0.1em 0 #1b1050;
}
.minime__join{ margin-top: 4px; }
@media (prefers-reduced-motion: reduce){ .minigoal__fill{ transition: none; } }
/* Wide screens and phones held sideways: the cards lie down (worm left, words right) and the place and the gap share a line, so the first screen holds the prizes and where you are. */
@media (min-width: 560px){
  .minicard{
    grid-template-columns: auto 1fr; grid-template-areas: "worm place" "worm name" "worm nug" "worm pack" "worm you"; justify-items: start; align-items: center; align-content: center;
    column-gap: 10px; padding: 8px 10px; text-align: left;
  }
  .minicard > canvas, .minicard > .minicard__cup{ grid-area: worm; width: 76px; height: 76px; }
  .minicard__place{ grid-area: place; }
  .minicard__name{ grid-area: name; }
  .minicard > .ministop__nuggets{ grid-area: nug; justify-content: flex-start; }
  /* The power-up pack has its own line: it shares the Nuggets' class, and in one cell the two were drawn over each other. */
  .minicard > .minicard__pack{ grid-area: pack; }
  .minicard__you{ grid-area: you; }
  .minime{ grid-template-columns: auto auto; justify-content: center; align-items: center; column-gap: 28px; padding-block: 10px; }
  .minime__place{ font-size: 2.2rem; }
  .minime[data-joined="no"]{ grid-template-columns: auto; }
  .minime[data-joined="no"] .minime__place{ font-size: 1.8rem; }
  .minime > .minigoal, .minime > .minime__join{ grid-column: 1 / -1; }
}

/* Contact page (pages/contact.ts). The notes show by :target after the form posts back. */
.contact{display:grid;gap:16px;max-width:560px;margin:8px 0 24px}
.contact__field{display:grid;gap:6px;font-weight:600}
.contact__field em{font-style:normal;font-weight:400;color:var(--text-dim)}
.contact__field input,.contact__field select,.contact__field textarea{
  font:inherit;font-weight:400;color:var(--text);background:var(--ink-2);
  border:1px solid var(--line);border-radius:var(--radius-sm);padding:12px 14px;width:100%;box-sizing:border-box}
.contact__field textarea{resize:vertical;min-height:140px}
.contact__field :focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.contact .button{justify-self:start}
.contact__trap{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
.contact__note{display:none;padding:12px 16px;border-radius:var(--radius-sm);border:1px solid var(--warn);color:var(--text)}
.contact__note--ok{border-color:#3ddc84}
.contact__note:target{display:block}
/* The erase box on the delete-account page (pages/deleteAccount.ts): shown only when this browser holds an account. */
.erase{margin:16px 0 24px;padding:16px 18px;border:1px solid var(--warn);border-radius:var(--radius-sm)}
.erase[hidden]{display:none}
.erase h3{margin-top:0}
.erase .contact{margin-bottom:12px}
.erase .contact__note{margin-bottom:0}

/*
 * The phone app's Get Nuggets shop (ui/appPanels.ts NuggetShop, gameShell APP_PANELS): one
 * house Buy button per pack, the Nuggets on the left and the store's own price on the right.
 * The Notifications card in Settings uses the lobby's switch rows.
 */
.panel--shop{ width: min(440px, 100%); }
.overlay .panel.panel--shop .panel__title{ margin-bottom: 8px; }
.packs{ list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.shopvideo{ display: grid; gap: 8px; margin: 0 0 12px; }
.shopvideo[hidden]{ display: none; }
.pack{ justify-content: space-between; text-align: left; }
.pack__skin{ width: 56px; height: 56px; flex: none; margin-right: 10px; }
.pack__main{ flex: 1; }
.pack__amount{ font-size: 1.3rem; }
.pack__main{ display: grid; gap: 2px; justify-items: start; }
.pack__title{ font-family: var(--font-label); font-size: 1.05rem; }
.pack__price{ font-family: var(--font-label); font-size: 1.3rem; }
[data-notify-card] .lobby__switchlabel small{ color: var(--text-dim); font-size: 0.78rem; }
[data-notify-card] .button{ margin-top: 8px; }

/* ================================================================ House lettering
 * The one place the outline and the drop are DRAWN (the :root note says how they are
 * sized). A text rule elsewhere in this sheet picks its face, size and colour, sets
 * `--ts` to the dark tone it wants round its letters if the default plum is not it, and
 * lists its selector here. It does not write its own text-shadow: eight stacked offset
 * shadows were how this used to be done, and they smeared.
 *
 * Each element is listed itself rather than inheriting from a parent: a stroke width
 * is computed where it is declared, so a 14px note inside a 24px button would otherwise
 * wear the button's heavier outline.
 *
 * Kept off this list on purpose: the layered big-number type (.fx: its own outline is
 * a second copy of the word underneath), and the Overdrive theme, which has its glow.
 */
.beta__tag,
.menu__eyebrow,
.pickcard__name,
.menu__foot,
:where(h1),
:where(.page) :where(h2, h3):where(:not(.game *)),
:where(.siteheader__nav) :where(a),
.sitefooter__heading,
.field__label,
.contact__field > span,
:where(.prose, .faq, .related, .skingroup) :where(h2),
.revive__note,
.boot__tip,
.death__label,
.death__stat b,
.death__ribbon,
:is(.button, .menu__play, .siteheader__cta, .iconbtn, .set-btn, .set-danger, .share__btn, .dock__icon, .dock__btn, .boostbutton, .beta__close, .settings__back),
.lobby__countvalue,
.screen__title,
.nuggetpill,
.screen__heading,
.screen__badge,
.screen__ghostboost::after,
.stepper__label,
.ranks__rank,
.ranks__level,
.ranks__name,
.ranks__len,
.wheelstage__note,
.wheel__metertitle,
.wheel__step b,
.wheel__step.is-yours b,
.menu__levelbadge,
.dossier__name,
.statcard__label,
.statcard__value,
.podium__count,
.trophy__name,
.trophy__barlabel,
.trophy__prize,
.trophy__done,
.trophy__missed,
.reward__extratext b,
.reward__eyebrow,
.reward__bartext,
.death__xp,
.death__xp [data-death-level],
.death__xp .death__levelup,
.showcase__banner,
.showcase__rarity,
.showcase__route,
.showcase__bar,
.burrowcard .station__name,
.burrowcard__worn,
.burrow__count,
.powercard__name,
.powercard__duration,
.powercard__gain,
.powercard__price,
.powerarc__count,
.menu__loginbonus,
.menu__videomain,
.menu__who,
.hud__net,
.dossier__title,
.trophy__legend,
.pack__title,
.pack__price,
.button--tile[data-ready] .tile__badge,
.tile__badge,
.button__label,
.button small,
.button .button__timer,
.pack__note,
.pack__amount,
.panel__title,
.hud__label,
.hud__value,
.hud__of,
.squirm-board__row,
.hud__event,
.eventrun__n{
  -webkit-text-stroke: var(--lt-stroke) var(--ts);
  paint-order: stroke fill;
  text-shadow: 0 var(--lt-drop) 0 var(--ts);
}
/* Cream (quiet) buttons carry dark lettering with no outline (their own rule, Roles). The list above names every
   button and came later, so it put a tan outline back on dark letters and smudged them (Gray, 21 Nov 2026, admin). */
:is(.button--quiet, .share__btn, .beta__close), :is(.button--quiet, .share__btn, .beta__close) :is(.button__label, small){
  -webkit-text-stroke: 0; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}
/* No paint-order (very old browsers): an outline drawn over the letter would eat it, so draw none, keep a four-way hard edge. */
@supports not (paint-order: stroke fill) {
.beta__tag,
.menu__eyebrow,
.pickcard__name,
.menu__foot,
:where(h1),
:where(.page) :where(h2, h3):where(:not(.game *)),
:where(.siteheader__nav) :where(a),
.sitefooter__heading,
.field__label,
.contact__field > span,
:where(.prose, .faq, .related, .skingroup) :where(h2),
.revive__note,
.boot__tip,
.death__label,
.death__stat b,
.death__ribbon,
:is(.button, .menu__play, .siteheader__cta, .iconbtn, .set-btn, .set-danger, .share__btn, .dock__icon, .dock__btn, .boostbutton, .beta__close, .settings__back),
.lobby__countvalue,
.screen__title,
.nuggetpill,
.screen__heading,
.screen__badge,
.screen__ghostboost::after,
.stepper__label,
.ranks__rank,
.ranks__level,
.ranks__name,
.ranks__len,
.wheelstage__note,
.wheel__metertitle,
.wheel__step b,
.wheel__step.is-yours b,
.menu__levelbadge,
.dossier__name,
.statcard__label,
.statcard__value,
.podium__count,
.trophy__name,
.trophy__barlabel,
.trophy__prize,
.trophy__done,
.trophy__missed,
.reward__extratext b,
.reward__eyebrow,
.reward__bartext,
.death__xp,
.death__xp [data-death-level],
.death__xp .death__levelup,
.showcase__banner,
.showcase__rarity,
.showcase__route,
.showcase__bar,
.burrowcard .station__name,
.burrowcard__worn,
.burrow__count,
.powercard__name,
.powercard__duration,
.powercard__gain,
.powercard__price,
.powerarc__count,
.menu__loginbonus,
.menu__videomain,
.menu__who,
.hud__net,
.dossier__title,
.trophy__legend,
.pack__title,
.pack__price,
.button--tile[data-ready] .tile__badge,
.tile__badge,
.button__label,
.button small,
.button .button__timer,
.pack__note,
.pack__amount,
.panel__title,
.hud__label,
.hud__value,
.hud__of,
.squirm-board__row,
.hud__event,
.eventrun__n{
    -webkit-text-stroke: 0;
    text-shadow: 0 var(--lt-drop) 0 var(--ts), 0 calc(var(--lt-drop) * -1) 0 var(--ts), var(--lt-drop) 0 0 var(--ts), calc(var(--lt-drop) * -1) 0 0 var(--ts);
  }
}
/* The small print inside a button (the shop's notes, a price's "per month"): at least 14px, full strength, a thin outline. */
.button small, .pack__note{ font-family: var(--font-display); font-weight: 700; font-size: max(14px, 0.9rem); line-height: 1.15; opacity: 1; --lt-stroke: clamp(2px, 0.16em, 3px); --lt-drop: 1px; text-wrap: balance; }
/* Overdrive keeps its own glow and slab lettering: no outline there. */
[data-vibe="overdrive"] *{ -webkit-text-stroke: 0; }
/* Sign-in buttons wear their provider's own lettering: no outline, no drop. After the list so it wins. */
.button.button--flat{ -webkit-text-stroke: 0; text-shadow: none; }

/* ================================================================ Reading size floor
 * Gray, 20 Oct 2026, of a green button with small white lettering: "barely can read it". After the outline was fixed (House
 * lettering, above) the next cause of unreadable text was size: tile names at 9.6px, countdown pills at 9.9px, card names at 8px.
 * tools/check-overflow.mjs now fails any visible text under 11.5px, and this block is where the small ones were raised: 12px
 * for a pill or badge, 13px for a label or a note, 14px for a line of reading (a button's small print, in House lettering). It
 * comes last so no earlier media query can shrink a rule back under it.
 */
.menu .menu__tile{ font-size: max(0.84rem, calc(var(--t) * 0.15)); }
.menu .menu__tile .tile__badge, .button--tile .tile__badge{ font-size: max(0.78rem, calc(var(--t) * 0.13)); }
.menu__label{ font-size: 0.82rem; }
.menu__eyebrow, .menu__eyebrow-the{ font-size: max(0.8rem, 11.5px); }
.menu__loginbonus{ font-size: 0.82rem; }
.navmenu__group{ font-size: 0.8rem; }
.death__label{ font-size: 0.82rem; }
.panel__eyebrow{ font-size: 0.82rem; }
.share__label{ font-size: 0.82rem; }
.updates__date{ font-size: 0.82rem; }
.screen__version{ font-size: 0.82rem; }
.daily__label{ font-size: 0.95rem; }
.daily__gets{ font-size: 0.92rem; }
.wheel__step span{ font-size: 0.8rem; }
.powercard__effect, .powercard__perlevel{ font-size: 0.88rem; }
.powercard__charges{ font-size: 0.9rem; }
.burrowcard .station__name{ font-size: max(12px, min(0.88em, 10.5cqi)); }
.burrowcard__tag{ font-size: max(12px, min(0.8rem, 11cqi)); }
.station__desc, .station--tile .station__desc, .choices .station__desc, .choice__desc{ font-size: 0.8rem; }
.keys kbd, .menu__keys kbd, .keys--compact kbd{ font-size: 0.8rem; }
.showcase__route{ font-size: clamp(0.8rem, 1.2vw, 0.9rem); }
.pack__title{ font-size: 1.05rem; }
.updates__body{ font-size: 0.95rem; }
.revive__secs{ font-size: 0.95rem; }
/* The sideways cards (a phone on its side) are about 94px wide: a name there wraps to a second line before it is cut with an ellipsis, and the price pill is as small as it may be. */
@media (orientation: landscape) and (max-height: 500px){
  .burrowcard{ padding-inline: 4px; }
  .burrowcard .station__name{ font-size: max(11.5px, min(0.88em, 10.5cqi)); white-space: normal; line-height: 1.25; overflow-wrap: break-word; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .burrowcard__tag{ font-size: max(11.5px, min(0.8rem, 10cqi)); }
}
/* A panel scaled down to fit (never below 0.8 of its size, ui/fitPanels.ts) still has to read: these were drawn small for the short screens that scale them. */
html .updates__date{ font-size: 0.95rem; }
html .panel .death__label, html .panel .panel__eyebrow{ font-size: 0.9rem; }
html .panel--death .revive__note{ font-size: 0.92rem; }
html .panel--death .revive__secs{ font-size: 0.95rem; }
.wheel__step span{ font-size: 0.72rem; }
/* The video button resting (a wait, or today's videos used up): its first line is words, not the prize, so it is smaller and may wrap. */
.menu__video:not([data-kind="ready"]) .menu__videomain{ font-size: 1.1rem; white-space: normal; line-height: 1.25; }
@media (orientation: landscape) and (max-height: 500px){
  /* The daily gift on a phone on its side has the calendar and two buttons; its line of flavour goes (the title says it). */
  [data-game-daily] .panel__sub{ display: none; }
  .burrowcard__tag{ letter-spacing: -0.05em; padding-inline: 6px; }
}
.menu .menu__tile .button__label{ overflow-wrap: break-word; hyphens: manual; }
.station__desc, .station--tile .station__desc, .choices .station__desc, .choice__desc{ font-size: 0.76rem; }
.showcase__route{ font-size: clamp(0.76rem, 1.2vw, 0.9rem); }
@media (max-width: 700px){ .wheel__ladder{ padding: 4px; } .wheel__step{ padding: 2px 2px; } .wheel__step b{ font-size: 1.05rem; } }
.showcase__route{ letter-spacing: -0.02em; }
@media (max-width: 700px){ .wheel__ladder{ grid-template-columns: repeat(5, minmax(0, 1fr)); } .wheel__step{ min-width: 0; } }
/* Titan One is wider than the face the note was drawn in: on a narrow phone it wrapped. (The title keeps its own face and size.) */
@media (max-width: 480px){ .wheelstage__note{ font-size: 0.9rem; } }

/* ================================================================ House icon buttons
 * One place says how a picture sits in a round or square button, so a plus is never off by a pixel in one corner of the game
 * and right in another (Gray, 20 Oct 2026: the Settings "+" looked low, the Upgrades "+" tiny and off-centre, "best do a sweep").
 *
 *   - The button is a grid (or a flex row, where its own rule says so) with its picture a fixed 60% of its inside (the box less
 *     the rim), centred by the box: no line-height, no baseline, no text glyph standing in for a drawing. `display` is set at
 *     zero specificity so a rule that hides the button (a phone's menu) still wins. 60% of the inside is
 *     about 52% of the button at every size (44px: 23px, 30px: 14px, 56px: 30px).
 *   - The drawing has to be centred in ITS box too: where it is not, the viewBox is shifted (gameShell.ts RAIL_ICON) rather
 *     than the button nudged. tools/check-overflow.mjs measures the drawing's own bounds against the button's centre (ICON) and
 *     fails past 1.5px, or an icon under 40% of the button.
 *   - A button that still holds a text glyph (a "+" a script wrote with textContent, ui/burrowScreen.ts) is drawn by the
 *     fallback at the end of this block, the same plus in the same box.
 * Everything here is zero extra markup, so a new icon button is one class on the list.
 */
:where(.iconbtn:not(.menu__langbtn), .dock__icon, .beta__close, .share__btn--round, .button--step){ display: inline-grid; }
:is(.iconbtn:not(.menu__langbtn), .dock__icon, .beta__close, .share__btn--round, .button--step){
  grid-template: 100% / 100%; place-items: center; padding: 0; line-height: 0;
}
:is(.iconbtn:not(.menu__langbtn), .dock__icon, .beta__close, .share__btn--round, .button--step) > :is(svg, img){
  width: 60%; height: 60%; margin: 0; display: block; flex: none; max-width: none;
}
.burrowcard__heart > svg{ translate: 0 -1px; }
/* The glyph fallback: a plus or minus drawn in the same heavy strokes as ICON_PLUS and ICON_MINUS, shadow and all. */
.button.button--step:not(:has(> svg)){ font-size: 0; }
.button.button--step:not(:has(> svg))::before{
  content: ""; width: 60%; height: 60%;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke-linecap='round'><path d='M5 14.2h14M12 7.2v14' stroke='%230d3a66' stroke-width='3.6'/><path d='M5 12h14M12 5v14' stroke='white' stroke-width='3.6'/></svg>") center / contain no-repeat;
}
.button.button--step:not(:has(> svg)):is([data-step="-1"], [data-lobby-cpu-step="-1"])::before{
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke-linecap='round'><path d='M5 14.2h14' stroke='%230d3a66' stroke-width='3.6'/><path d='M5 12h14' stroke='white' stroke-width='3.6'/></svg>");
}
/* A button that is waiting wears no spinner beside its picture: it has no room, and the dimming says it. */
.button--step[aria-busy="true"]::after{ content: none; }

/* ================================================================ No hyphenation
 * Words break at the space, never in the middle with a hyphen (Gray, 20 Oct 2026: "The Bur-row" on a tile; "should break by
 * words, no hyphenation anywhere"). `break-word`, not `anywhere`: with `text-wrap: balance` the browser may take an `anywhere` break inside a word to even the lines out. tools/check-layout.mjs forbids automatic hyphenation in this sheet, and check-overflow.mjs fails a
 * word split across two lines. A label wraps at a space; only a single word wider than its whole box (a long German compound in a narrow card) is cut, with no hyphen, as the last resort.
 */
html{ hyphens: manual; -webkit-hyphens: manual; }
:is(.menu__tile, .button__label, .pickcard__name, .station__name, .trophy__name, .powercard__name, .screen__heading, .screen__title, .panel__title, :where(h1, h2, h3)){
  hyphens: manual; -webkit-hyphens: manual; overflow-wrap: break-word; word-break: normal; text-wrap: balance; min-width: 0; max-width: 100%;
}

/* ================================================================ Website lettering
 * The marketing pages (home's text, About, Skins, How to play, Tips, the legal pages, Contact) wear the game's lettering: Titan One
 * headings with the house outline and drop (their selectors are in House lettering, above), the nav, the footer's column titles
 * and the form labels in the same face. Reading text stays Fredoka at 17px and up with the page's own contrast; only what is a
 * heading, a label or a link in the bar is lettered. SEO markup and copy are untouched: this is paint.
 */
:where(.page) :where(h2, h3):where(:not(.game *)){ font-family: var(--font-label); font-weight: 400; letter-spacing: 0.01em; --ts: #3c146e; }
:where(.page) :where(h3):where(:not(.game *)){ font-size: 1.3rem; line-height: 1.2; --lt-stroke: clamp(2px, 0.2em, 4px); --lt-drop: 1.5px; }
:where(.siteheader__nav) :where(a){ font-family: var(--font-label); font-weight: 400; font-size: 0.92rem; letter-spacing: 0.04em; --ts: #1b1245; --lt-stroke: clamp(2px, 0.2em, 3px); --lt-drop: 1.5px; color: var(--paper); }
:where(.siteheader__nav) :where(a:hover, a[aria-current="page"]){ color: #ffe45c; }
.sitefooter__heading{ font-family: var(--font-label); font-weight: 400; font-size: 0.95rem; letter-spacing: 0.06em; margin-bottom: 12px; --ts: #1b1245; --lt-stroke: clamp(2px, 0.2em, 3px); --lt-drop: 1.5px; color: #ffe45c; }
.field__label{ font-family: var(--font-label); font-weight: 400; font-size: 0.95rem; letter-spacing: 0.04em; text-transform: none; color: var(--paper); --ts: #1b1245; --lt-stroke: clamp(2px, 0.2em, 3px); --lt-drop: 1.5px; }
.contact__field > span{ font-family: var(--font-label); font-weight: 400; font-size: 1rem; letter-spacing: 0.03em; color: var(--paper); --ts: #1b1245; --lt-stroke: clamp(2px, 0.2em, 3px); --lt-drop: 1.5px; }
.contact__field > span em{ font-family: var(--font-display); font-weight: 500; font-size: 0.92rem; letter-spacing: 0; -webkit-text-stroke: 0; text-shadow: none; color: var(--paper-dim); }
/* The Burrow's cards on a 360px phone: a long German name ("Sonnenuntergang", "Silberne Banshee") needs the 11.5px floor and a hair less tracking to fit its card. */
@media (max-width: 400px){ .burrowcard .station__name{ font-size: max(11.5px, min(0.88em, 10.5cqi)); letter-spacing: -0.03em; } }
/* Sideways, a Burrow card is about 95px wide: its name is set a hair tighter so a word like "Philippines" or "Griechenland" fits whole. */
@media (orientation: landscape) and (max-height: 500px){ .burrowcard .station__name{ letter-spacing: -0.06em; } }

/* ======================================================= site theme: Golden Hour
 *
 * A sunset garden for the front screen (shared/themes.ts, id "garden"; the owner's design, 1 Nov 2026): royal
 * purple panels and buttons, warm white lettering, lime where a thing is good, gold for Nuggets, and hot pink
 * for Play and nothing else. One layer keyed on `data-vibe="garden"` on the document, like Overdrive's, working
 * through the house components' own tokens (--bodyA/B/C, --rimA/B, --edge, --glow, --ts, --ink) so every button
 * everywhere follows, and restyling the front screen's shells.
 *
 * The scene behind the front screen (.garden*) is built by ui/gardenHome.ts and exists only while the front
 * screen is up. Everything in it that moves is a transform or an opacity. The layout is this theme's own pair of
 * grids, one per orientation, on the same named zones the other themes use, plus two new ones: `pick` (your worm
 * and arena cards) and `hero` (the big worm, a canvas the script puts in the menu).
 */
html[data-vibe="garden"]{
  --gh-purple: #6a2cc2; --gh-purple-2: #4a1a96; --gh-purple-3: #2c0f66; --gh-ink: #1d0a40;
  --gh-lime: #b9f03c; --gh-cream: #fff7e6; --gh-pink: #ff3fa4; --gh-gold: #ffc531;
}

/* Roles: purple is the house button, lime is "yes", pink is Play, and gold stays with the Nuggets. */
[data-vibe="garden"] :is(.button, .iconbtn, .set-btn, .share__btn, .dock__icon, .dock__btn, .settings__back){
  --rimA: #cfb4ff; --rimB: #9a6ee6; --edge: var(--gh-ink); --glow: rgba(24, 6, 64, 0.55);
  --bodyA: #8a4fe0; --bodyB: #6a2cc2; --bodyC: #45167f; --ts: var(--gh-ink); --ink: var(--gh-cream);
}
[data-vibe="garden"] .button--primary{ --bodyA: #d6ff7a; --bodyB: #9ae02c; --bodyC: #5f9d0e; --ts: #254a02; --rimA: #f3ffd0; --rimB: #c4f16a; --glow: rgba(95, 157, 14, 0.5); }
[data-vibe="garden"] :is(.menu__play, [data-death-again]){
  --bodyA: #ff9ddf; --bodyB: #ff3fa4; --bodyC: #d1146f; --ts: #6f0a40; --rimA: #ffd2f0; --rimB: #ff8ccd; --edge: #6b0d40; --glow: rgba(209, 31, 124, 0.55); --ink: #fff;
}
[data-vibe="garden"] :is(.button--blue, .button--glass){ --bodyA: #7f4bd6; --bodyB: #5a22ab; --bodyC: #3b1478; --rimA: #cfb4ff; --rimB: #9a6ee6; --ts: var(--gh-ink); }
[data-vibe="garden"] .button--buy{ --bodyA: #7fcf35; --bodyB: #4b9a12; --bodyC: #336b08; --ts: #183402; --glow: rgba(95, 157, 14, 0.5); }
[data-vibe="garden"] .button--quiet{ --bodyA: #fffaf0; --bodyB: #f1e4cc; --bodyC: #d8c5a4; --ink: #3a1c6e; --glow: rgba(0, 0, 0, 0.35); }
[data-vibe="garden"] .iconbtn[aria-pressed="false"]:has(.icon__slash){ --bodyA: #cfc3e6; --bodyB: #a898c8; --bodyC: #7f6ea6; --ink: #3a1c6e; --ts: rgba(255, 255, 255, 0); }
/* Panels: royal purple with a warm white edge. */
[data-vibe="garden"] .panel{
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 247, 230, 0.16), transparent 48%),
    radial-gradient(ellipse 120% 100% at 50% 10%, #6a2cc2, #4a1a96 52%, #2c0f66 100%);
  border-color: var(--gh-cream); box-shadow: 0 0 0 2px var(--gh-ink), 0 14px 30px -12px rgba(0, 0, 0, 0.6);
}
[data-vibe="garden"] :is(.screen__title, .panel__title){ color: var(--gh-cream); -webkit-text-stroke: var(--lt-stroke) var(--gh-ink); paint-order: stroke fill; stroke-linejoin: round; text-shadow: 0 var(--lt-drop) 0 var(--gh-ink); }
/* Nuggets are gold: the pill is a dark purple one with a gold edge. */
[data-vibe="garden"] .nuggetpill{
  background: linear-gradient(180deg, #3b1478, #230a52); color: #ffe9a8;
  box-shadow: 0 0 0 2px var(--gh-gold), 0 0 0 4px var(--gh-ink), 0 6px 12px -4px rgba(0, 0, 0, 0.5);
  text-shadow: 0 2px 0 var(--gh-ink), 1px 0 0 var(--gh-ink), -1px 0 0 var(--gh-ink);
}

/* ---- the scene ---------------------------------------------------------------------------------------- */
/* Never see-through: the sky is here before the pictures are. */
[data-vibe="garden"] .overlay--menu{
  display: block; padding: 0; overflow: hidden;
  background: linear-gradient(180deg, #3b1180 0%, #9b3a9d 42%, #ff8a3c 72%, #5a2a14 100%);
}
[data-vibe="garden"] .menu{ z-index: 1; }
.garden{ position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; contain: layout paint; }
/* A little darkening at the top and bottom, so the round buttons and the tiles read on any part of the picture. */
.garden::after{
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(34, 8, 76, 0.5) 0%, rgba(34, 8, 76, 0) 20%),
    linear-gradient(to top, rgba(30, 8, 40, 0.5) 0%, rgba(30, 8, 40, 0) 24%);
}
.garden__layer{ position: absolute; inset: 0; will-change: transform; }
.garden__layer--bg{ inset: -16px; }
.garden__bg{ display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; opacity: 0; transition: opacity 0.5s ease; }
.garden.is-lit .garden__bg{ opacity: 1; }
.garden__ray{
  position: absolute; left: 50%; bottom: 42%; width: 28vmax; height: 100vmax; margin-left: -14vmax;
  transform-origin: 50% 100%; opacity: 0.4;
  background: radial-gradient(ellipse 50% 100% at 50% 100%, rgba(255, 232, 150, 0.34), rgba(255, 200, 120, 0) 72%);
  animation: gh-ray 26s ease-in-out infinite alternate;
}
.garden__ray--0{ --a: -34deg; } .garden__ray--1{ --a: 22deg; animation-duration: 34s; animation-delay: -11s; }
@keyframes gh-ray{
  from{ transform: rotate(calc(var(--a) - 2deg)); opacity: 0.3; }
  to{ transform: rotate(calc(var(--a) + 2deg)); opacity: 0.55; }
}
.garden__dust{ position: absolute; inset: 0; }
.garden__mote{
  position: absolute; left: var(--x); bottom: 10%; width: var(--s); height: var(--s); border-radius: 50%; opacity: 0;
  background: radial-gradient(circle, rgba(255, 244, 205, 0.95), rgba(255, 214, 130, 0) 70%);
  animation: gh-mote var(--dur) ease-in-out var(--delay) infinite;
}
@keyframes gh-mote{
  0%{ transform: translate3d(0, 0, 0); opacity: 0; }
  25%{ opacity: 0.7; } 75%{ opacity: 0.5; }
  100%{ transform: translate3d(var(--drift), -50vh, 0); opacity: 0; }
}
/* The foliage at the foot of each side: the right is the left turned over. It leans from its root with a shear, never a slide. */
.garden__fol{ position: absolute; bottom: -10px; width: clamp(96px, 13vmax, 210px); }
.garden__fol--l{ left: -10px; }
.garden__fol--r{ right: -10px; transform: scaleX(-1); }
.garden__fol img{ display: block; width: 100%; height: auto; }
.garden__sway{ transform-origin: 50% 100%; animation: gh-sway 11s ease-in-out infinite alternate; }
.garden__fol--r .garden__sway{ animation-duration: 14s; animation-delay: -5s; }
@keyframes gh-sway{
  from{ transform: skewX(-1.4deg); }
  to{ transform: skewX(1.2deg); }
}
/* ---- the layout --------------------------------------------------------------------------------------- */
/* The big worm is painted art that will stand in the cell named `hero` (an empty cell until it does). */
[data-vibe="garden"] .menu__side{ display: none; }
[data-vibe="garden"] .menu__eyebrow{ display: none; }
[data-vibe="garden"] .menu__landonly{ display: none; }
[data-vibe="garden"] .menu__events{ display: block; }
[data-vibe="garden"] .menu__tile--board{ display: flex; }
[data-vibe="garden"] .menu__moredot{ display: block; }
/* The tiles: royal purple, the picture inside, the name under it. One size, from the screen's height. */
[data-vibe="garden"] .menu :is(.menu__tile--burrow, .menu__bar .menu__tile){
  width: 100%; height: var(--t); align-self: end; padding: 3px 3px 5px; gap: 1px; animation: none;
  transition: transform 0.4s cubic-bezier(0.3, 1.9, 0.5, 1), filter 0.12s ease;
}
[data-vibe="garden"] .menu .menu__tile{ animation: none; }
[data-vibe="garden"] .menu .menu__tile img{
  width: calc(var(--t) * 0.68); height: calc(var(--t) * 0.68); filter: drop-shadow(0 4px 3px rgba(20, 6, 50, 0.5));
  transition: transform 0.4s cubic-bezier(0.3, 1.9, 0.5, 1);
}
[data-vibe="garden"] .menu :is(.menu__tile--burrow, .menu__bar .menu__tile):active:where(:not(:disabled)){ transform: scale(0.9, 1.08); transition-duration: 0.08s; }
[data-vibe="garden"] .menu .menu__tile:active img{ transform: translateY(-3px) scale(1.08); }
[data-vibe="garden"] .menu .menu__tile .button__label{ color: var(--gh-cream); }
/* The pickers: purple panels with lime arrows. */
[data-vibe="garden"] .pickcard{
  background: linear-gradient(180deg, #5a22ab, #34127a); box-shadow: inset 0 0 0 2px #9a6ee6, 0 0 0 2px var(--gh-ink), 0 10px 18px -8px rgba(0, 0, 0, 0.55);
}
[data-vibe="garden"] .pickcard__arrow{ color: var(--gh-lime); }
[data-vibe="garden"] .pickcard__name{ color: var(--gh-cream); text-shadow: 0 2px 0 var(--gh-ink), 1px 0 0 var(--gh-ink), -1px 0 0 var(--gh-ink); }
[data-vibe="garden"] .pickcard__art{ overflow: hidden; }
[data-vibe="garden"] .pickcard__art.is-slithering canvas{ animation: gh-slither 0.62s ease-out; }
@keyframes gh-slither{
  0%{ transform: translateX(-120%) skewX(-18deg); opacity: 0; }
  35%{ transform: translateX(10%) skewX(10deg); opacity: 1; }
  55%{ transform: translateX(-5%) skewX(-6deg); }
  78%{ transform: translateX(2%) skewX(3deg); }
  100%{ transform: none; }
}
/* Your name: a warm white pill on the purple. */
[data-vibe="garden"] .menu__field{ background: var(--gh-cream); box-shadow: 0 0 0 3px var(--gh-ink), 0 0 0 5px rgba(255, 247, 230, 0.85), 0 8px 16px -6px rgba(0, 0, 0, 0.5); }
[data-vibe="garden"] .menu__field:focus-within{ box-shadow: 0 0 0 3px var(--gh-ink), 0 0 0 5px var(--gh-lime), 0 8px 16px -6px rgba(0, 0, 0, 0.5); }
[data-vibe="garden"] .menu__label{ color: #7b4bbf; }
[data-vibe="garden"] .menu__input{ color: #2a0e55; }
[data-vibe="garden"] .menu__input::placeholder{ color: #8e78b8; }
[data-vibe="garden"] .menu__login{ --bodyA: #d6ff7a; --bodyB: #9ae02c; --bodyC: #5f9d0e; --ts: #254a02; --rimA: #f3ffd0; --rimB: #c4f16a; --glow: rgba(95, 157, 14, 0.5); }
/* Play: it breathes, a shine crosses it now and then, and it squashes under the finger. */
[data-vibe="garden"] .menu__play{ position: relative; animation: gh-pulse 4.2s ease-in-out 1.7s infinite; transition: transform 0.4s cubic-bezier(0.3, 1.9, 0.5, 1), filter 0.12s ease; }
[data-vibe="garden"] .menu__play:active:where(:not(:disabled, [aria-busy="true"])){ animation: none; transform: scale(1.07, 0.88); transition-duration: 0.07s; }
@keyframes gh-pulse{ 0%, 100%{ transform: scale(1); } 50%{ transform: scale(1.022); } }
.garden__shine{ position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; }
.garden__shine b{
  position: absolute; top: -10%; bottom: -10%; left: 0; width: 34%; transform: translateX(-170%) skewX(-18deg);
  background: linear-gradient(100deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0));
  animation: gh-shine 9s ease-in-out 3.4s infinite;
}
@keyframes gh-shine{ 0%{ transform: translateX(-170%) skewX(-18deg); } 22%, 100%{ transform: translateX(400%) skewX(-18deg); } }
/* Something is waiting behind the gift (a dot in Events) or in your trophies (the dot on your picture): the picture wiggles now and then. */
[data-vibe="garden"] .menu:has(.menu__side :is(.iconbtn__dot:not([hidden]), [data-ready])) .menu__events > summary img{ animation: gh-wiggle 8s ease-in-out 2.3s infinite; transform-origin: 50% 90%; }
[data-vibe="garden"] .menu:has([data-profile-dot]:not([hidden])) .menu__tile--board img{ animation: gh-wiggle 11s ease-in-out 6.1s infinite; transform-origin: 50% 90%; }
@keyframes gh-wiggle{
  0%, 80%, 100%{ rotate: 0deg; scale: 1; }
  84%{ rotate: -5deg; scale: 1.04; } 90%{ rotate: 4deg; } 95%{ rotate: -2deg; }
}
/* The entrance, the first time only: the logo drops and lands with a squash, then everything pops in, one after another. */
/* The logo lands once and then rests: no jelly on this screen. */
[data-vibe="garden"] .menu__mark{ animation: none; }
.overlay--menu:is(.is-garden-wait, .is-garden-intro) .menu__mark{ animation: gh-drop 0.62s cubic-bezier(0.3, 0.9, 0.3, 1) both; }
@keyframes gh-drop{
  0%{ translate: 0 -90px; opacity: 0; scale: 1 1; }
  40%{ translate: 0 0; opacity: 1; scale: 1 1; }
  52%{ scale: 1.16 0.8; } 68%{ scale: 0.93 1.1; } 84%{ scale: 1.03 0.98; } 100%{ scale: 1 1; }
}
.overlay--menu:is(.is-garden-wait, .is-garden-intro) :is(.menu__me, .menu__nav, .menu__field, .menu__play, .menu__friends, .pickrow, .menu__tile--burrow, .menu__events, .menu__tile--board){
  animation: gh-pop-in 0.5s cubic-bezier(0.22, 1.2, 0.36, 1) backwards; animation-delay: calc(0.3s + var(--i, 0) * 0.08s);
}
.overlay--menu.is-garden-wait :is(.menu__mark, .menu__me, .menu__nav, .menu__field, .menu__play, .menu__friends, .pickrow, .menu__tile--burrow, .menu__events, .menu__tile--board){ animation-play-state: paused; }
.overlay--menu :is(.menu__me, .menu__nav){ --i: 0; }
.overlay--menu .menu__field{ --i: 1; } .overlay--menu .menu__play{ --i: 2; } .overlay--menu .menu__friends{ --i: 3; }
.overlay--menu .pickrow{ --i: 7; } .overlay--menu .menu__tile--burrow{ --i: 4; } .overlay--menu .menu__events{ --i: 5; } .overlay--menu .menu__tile--board{ --i: 6; }
@keyframes gh-pop-in{ 0%{ opacity: 0; transform: scale(0.8) translateY(12px); } 100%{ opacity: 1; transform: none; } }
/* A panel is over the front screen, or the tab is hidden: everything holds still. */
.overlay--menu[data-garden-paused] *{ animation-play-state: paused !important; }

/* ---- sideways and on a desktop ------------------------------------------------------------------------- */
@media (orientation: landscape){
  [data-vibe="garden"] .menu{
    --col: min(900px, 48vw);
    --t: clamp(70px, 21vh, 210px);
    --mark-h: min(25vh, 250px);
    grid-template-columns: minmax(0, 1fr) repeat(6, minmax(0, calc(var(--col) / 6))) minmax(0, 1fr);
    grid-template-rows: auto auto minmax(0, 1fr) auto auto;
    grid-template-areas:
      "top  top    top    top    top    top    top  top"
      "pick core   core   core   core   core   core .  "
      "hero core   core   core   core   core   core .  "
      "hero burrow burrow events events board  board ."
      "foot foot   foot   foot   foot   foot   foot foot";
  }
  [data-vibe="garden"] .menu:not(:has(.menu__side .button--tile:not([hidden]))){
    grid-template-areas:
      "top  top top    top    top   top  top top"
      "pick core core  core   core  core core ."
      "hero core core  core   core  core core ."
      "hero .    burrow burrow board board .   ."
      "foot foot foot  foot   foot  foot foot foot";
  }
  [data-vibe="garden"] .menu__left{ display: contents; }
  [data-vibe="garden"] .menu > .menu__core{ grid-area: core; }
  /* Name, Play and friends stay a column of their own over the wider row of tiles. */
  [data-vibe="garden"] .menu > .menu__core > *{ width: min(100%, calc(var(--col) * 0.68)); justify-self: center; align-self: center; margin-inline: auto; }
  /* The garden comes closer than the picture was framed, into the fruit and the soil. */
  .garden__bg{ transform: scale(1.22); transform-origin: 50% 72%; }
  /* The cards: your worm over your arena, small, in the top left, arrows beside the picture and the name under it. */
  [data-vibe="garden"] .menu .pickrow{ grid-area: pick; flex-direction: column; justify-self: start; align-self: start; width: clamp(128px, 14vw, 188px); gap: clamp(4px, 1.2vh, 10px); margin: 0; container-type: inline-size; }
  [data-vibe="garden"] .menu .pickcard{
    flex: none; padding: 4px 3px 3px; row-gap: 1px; column-gap: 2px; justify-items: center;
    grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "prev art next" "name name name";
  }
  [data-vibe="garden"] .menu .pickcard__art{ width: min(100%, clamp(58px, 16vh, 112px)); }
  [data-vibe="garden"] .menu .pickcard__art--floor{ width: auto; height: clamp(26px, 7.4vh, 50px); margin: 0; }
  [data-vibe="garden"] .menu .pickcard__label{ text-align: center; padding-inline: 2px; }
  [data-vibe="garden"] .menu .pickcard__kind, [data-vibe="garden"] .menu .pickcard__hint{ display: none; }
  [data-vibe="garden"] .menu .pickcard__name{ font-size: clamp(0.8rem, 2.6vh, 1.05rem); line-height: 1.1; }
  [data-vibe="garden"] .menu .pickcard__arrow{ width: 22px; height: clamp(26px, 7vh, 38px); }
  [data-vibe="garden"] .menu .pickcard__arrow svg{ width: 18px; height: 18px; }
  /* The Burrow joins the bottom row. */
  [data-vibe="garden"] .menu .menu__tile--burrow{ flex-direction: column; white-space: normal; font-size: max(0.6rem, calc(var(--t) * 0.15)); padding: 3px 3px 5px; }
  [data-vibe="garden"] .menu .menu__tile--burrow img{ width: calc(var(--t) * 0.68); height: calc(var(--t) * 0.68); margin: 0 auto; }
  /* Events opens upwards from the bottom row, as it does upright. */
  [data-vibe="garden"] .menu .menu__events > .navmenu__panel{
    top: auto; bottom: calc(var(--pad-b) + var(--t) + 14px); max-height: calc(100% - var(--pad-t) - var(--pad-b) - var(--top-h) - var(--t) - 28px);
    left: 50%; right: auto; translate: -50% 0; width: max-content; max-width: calc(100% - var(--pad-l) - var(--pad-r));
  }
  /* A tall desktop: a little more room for the logo and Play. */
  [data-vibe="garden"] .menu__start > .menu__play{ --h: clamp(60px, 17vh, 150px); font-size: clamp(1.8rem, 7.4vh, 4.6rem); }
}
/* A phone held sideways. */
@media (orientation: landscape) and (max-height: 500px){
  [data-vibe="garden"] .menu{ --col: min(420px, 40vw); --t: clamp(54px, 18vh, 78px); --mark-h: 15vh; }
  [data-vibe="garden"] .menu .pickrow{ width: clamp(116px, 16vw, 150px); margin-top: 6px; }
  [data-vibe="garden"] .menu .pickcard__art{ width: min(100%, clamp(48px, 15vh, 74px)); }
  [data-vibe="garden"] .menu .pickcard__art--floor{ height: clamp(22px, 7vh, 34px); }
  [data-vibe="garden"] .menu .pickcard__name{ font-size: clamp(0.72rem, 3.1vh, 0.92rem); }
  [data-vibe="garden"] .menu .menu__tile{ border-radius: calc(var(--t) * 0.26); }
}
/* ---- held upright -------------------------------------------------------------------------------------- */
@media (orientation: portrait){
  [data-vibe="garden"] .menu{
    --t: clamp(68px, 11.4vh, 124px);
    --mark-h: 10.5vh;
    grid-template-rows: auto auto auto minmax(0, 1fr) auto auto auto;
    grid-template-areas:
      "me     me     nav   nav"
      "brand  brand  brand brand"
      "pick   pick   pick  pick"
      "hero   hero   hero  hero"
      "core   core   core  core"
      "burrow events board more"
      "foot   foot   foot  foot";
  }
  [data-vibe="garden"] .menu:not(:has(.menu__side .button--tile:not([hidden]))){
    grid-template-areas:
      "me     nav   nav"
      "brand  brand brand"
      "pick   pick  pick"
      "hero   hero  hero"
      "core   core  core"
      "burrow board more"
      "foot   foot  foot";
  }
  /* The logo keeps clear of the language button at the end of its row. */
  [data-vibe="garden"] .menu__mark{ max-width: calc(100% - 92px); object-fit: contain; }
  /* Its row has no share of the height here, so the cards take the height they need. */
  /* A little air between Play with friends and the row of tiles under it. */
  [data-vibe="garden"] .menu > .menu__core{ margin-bottom: -1px; }
  /* The cards take the height they need; the worm gets what is left. */
  [data-vibe="garden"] .menu .pickrow{ align-self: start; height: auto; container-type: inline-size; }
  [data-vibe="garden"] .menu .pickcard{ --ch: clamp(74px, 12.5vh, 100px); --k: 0.4; }
}
@media (orientation: portrait) and (max-height: 720px){
  [data-vibe="garden"] .menu{ --t: clamp(58px, 11.5vh, 80px); --mark-h: 9.5vh; }
}
/* ---- the art ------------------------------------------------------------------------------------------- */
/*
 * Buttons, tiles, pickers, pills and inputs wear painted art (ui/garden/), with the control's own real, translated text
 * laid over it. The art is NOT border-image: its nine slices met edge to edge, and on a fraction of a device pixel (any
 * zoom, 1.5x, 2x, 2.625x, 3x) the page showed through each join as a hairline. Each control is pictures laid over each
 * other that overlap (tools/make-garden-parts.py writes the block below): end caps over a stretched middle, or four
 * corners over four edges over a middle, each carrying a margin of body past the part that is meant to show, so where
 * one ends another is already underneath in the same colour. `--h` is a pill's height, which its caps follow; `--k` is
 * what a source pixel is, in CSS pixels, for the pieces cut in nine. The Candy body, rim and glow it would otherwise
 * paint are off, and the corners it rounded are the controls' own. Lettering stays the house display face with an
 * outline and a crisp drop shadow (the stroke the rewards use, scaled to the type, and never on dark ink).
 */
[data-vibe="garden"] :is(.menu__play, [data-death-again], .menu__friends, .menu__login, .nuggetpill, .menu__field, .button:not(.button--tile, .button--tab, .button--flat, .button--step),
  .iconbtn, .dock__icon, .pickcard, .menu__tile, .panel){
  background-color: transparent; box-shadow: none; border: 0; background-repeat: no-repeat;
}
[data-vibe="garden"] :is(.menu__play, [data-death-again], .menu__friends, .menu__login, .nuggetpill, .button:not(.button--tile, .button--tab, .button--flat, .button--step, .button--quiet), .iconbtn, .dock__icon, .menu__tile){
  color: var(--gh-cream);
  -webkit-text-stroke: 0.13em var(--ts); paint-order: stroke fill; stroke-linejoin: round;
  text-shadow: 0 0.1em 0 var(--ts), 0 0.16em 0.08em rgba(10, 2, 30, 0.4);
}
/* Pills. The corners are the pill's own, so a keyboard ring round one is round too. */
[data-vibe="garden"] :where(.menu__play, [data-death-again], .menu__friends, .menu__login, .nuggetpill, .menu__field, .button:not(.button--tile, .button--tab, .button--flat, .button--step)){
  --h: 44px; height: var(--h); min-height: var(--h); border-radius: 999px;
}
/* The padding above is the painted rim (ui/classic/*-m: the face runs from 9% to 88% of the height), so a pill that
   grows to two lines grows round its words and they never sit on the rim (the app's video button, 4 Nov 2026). */
[data-vibe="garden"] :is(.menu__play, [data-death-again]){ --h: clamp(56px, 10.5vh, 80px); min-height: 0; }
[data-vibe="garden"] .menu__friends{ --h: clamp(40px, 7vh, 54px); width: min(340px, 100%); }
[data-vibe="garden"] .button:where(:not(.menu__friends, .menu__play)){ height: auto; }
[data-vibe="garden"] .button--sm{ --h: 36px; }
[data-vibe="garden"] .button--sm:not(.button--pill){ --pad-x: 10px; gap: 4px; }
[data-vibe="garden"] .button--lg{ --h: 54px; }
[data-vibe="garden"] :is(.button--primary, .button--buy){ --h: 46px; --ts: #1f4a02; }
[data-vibe="garden"] .menu__login{ --h: 38px; --ts: #6a3a00; }
/* The cream one reads as dark ink on paper, at the size of the buttons above it: no stroke, a hairline of light under the type. */
[data-vibe="garden"] .button--quiet{ color: #3a1c6e; -webkit-text-stroke: 0; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8); font-size: 1.05rem; }
[data-vibe="garden"] .menu__field{ --h: clamp(42px, 7.4vh, 56px); --pad-l: calc(var(--h) * 0.6); --pad-r: calc(var(--h) * 0.45); }
[data-vibe="garden"] .nuggetpill{ --h: 44px; --pad-l: calc(var(--h) * 0.22); --pad-r: calc(var(--h) * 0.4); gap: 8px; --ts: #2a0a5e; color: #ffe9a8; }
/* Round: the icon buttons, one picture, no joins. */
[data-vibe="garden"] :is(.iconbtn, .dock__icon){ background: url("/ui/garden/btn-round.webp?v=1f5ea71c") center / 100% 100% no-repeat; border-radius: 50%; }
[data-vibe="garden"] .menu{ --ib: clamp(40px, 7.4vh, 50px); }
[data-vibe="garden"] .menu .iconbtn{ --b: var(--ib); width: var(--b); height: var(--b); padding: 0; }
[data-vibe="garden"] .menu .iconbtn > svg:not(.menu__langcaret){ width: 52%; height: 52%; }
[data-vibe="garden"] .menu .iconbtn .icon{ width: 52%; height: 52%; }
[data-vibe="garden"] .menu .iconbtn::after{ inset: -4px; }
/* Tiles: the bottom row. */
[data-vibe="garden"] .menu .menu__tile{ --k: 0.42; border-radius: 22px; padding: 4px calc(24px * var(--k)) max(calc(24px * var(--k)), calc(var(--t, 90px) * 0.1)); --ts: #2a0a5e; }
[data-vibe="garden"] .menu .menu__tile .button__label{ font-size: max(0.7rem, calc(var(--t) * 0.17)); }
[data-vibe="garden"] .menu .menu__tile img{ margin-top: calc(var(--t) * -0.04); }
/* The tile that holds More upright; sideways More is a round button in the top rail. */
@media (orientation: landscape){
  [data-vibe="garden"] .menu .menu__menu > .menu__tile{ background: url("/ui/garden/btn-round.webp?v=1f5ea71c") center / 100% 100% no-repeat; border-radius: 50%; width: clamp(40px, 7.4vh, 50px); height: clamp(40px, 7.4vh, 50px); padding: 0; }
}
/* The pickers: your worm and your arena, each a picture in a frame with its name under it, arrows at the ends. */
[data-vibe="garden"] .menu .pickcard{
  --k: 0.5; --ch: clamp(74px, 17vh, 112px); height: max(var(--ch), calc(183px * var(--k))); min-height: 0; position: relative; border-radius: 18px;
  padding: calc(40px * var(--k)) calc(76px * var(--k)); row-gap: 0; column-gap: 0;
  grid-template-columns: minmax(0, 1fr); grid-template-areas: "art" "name"; justify-items: center; align-content: center;
}
@media (max-height: 500px){ [data-vibe="garden"] .menu .pickcard{ --k: 0.4; } }
[data-vibe="garden"] .menu .pickcard__art{ width: min(100%, calc(var(--ch) * 0.7)); }
[data-vibe="garden"] .menu .pickcard__art--floor{ width: auto; height: calc(var(--ch) * 0.36); }
[data-vibe="garden"] .menu .pickcard__name{ font-size: clamp(0.78rem, calc(var(--ch) * 0.14), 1.1rem); -webkit-text-stroke: 0.1em var(--gh-ink); paint-order: stroke fill; text-shadow: 0 0.08em 0 var(--gh-ink); }
/* The arrows are painted into the frame: the buttons lie over them, invisible, and still do what they did. */
[data-vibe="garden"] .menu .pickcard__arrow{ position: absolute; top: 0; bottom: 0; width: calc(76px * var(--k)); height: auto; opacity: 0; }
[data-vibe="garden"] .menu .pickcard__arrow--prev{ left: 0; }
[data-vibe="garden"] .menu .pickcard__arrow--next{ right: 0; }
/* Panels. */
[data-vibe="garden"] .panel{ --k: 0.45; border-radius: 22px; padding: 30px 32px; color: var(--gh-cream); }
@media (max-height: 700px){
  [data-vibe="garden"] .panel{ padding: 20px 22px; }
  [data-vibe="garden"] .screen__side{ padding-block: 0; gap: 6px; }
  [data-vibe="garden"] [data-screen-pane="options"] .screen__card{ gap: 3px; padding: 5px 10px; }
}
@media (max-height: 400px){ [data-vibe="garden"] .button.button--sm:not(.button--pill){ font-size: 0.76rem; --pad-x: 6px; } }

/* garden-art (generated by tools/make-garden-parts.py: do not edit between these markers) */
[data-vibe="garden"] :is(.menu__play, [data-death-again]){
  background: url("/ui/garden/pink-l.webp?v=326f1a84") left center / auto 100% no-repeat, url("/ui/garden/pink-r.webp?v=55cc6e2b") right center / auto 100% no-repeat,
    url("/ui/garden/pink-m.webp?v=b743c846") center / calc(100% - 2 * calc(var(--h) * 0.5000) + 2 * calc(var(--h) * 0.1014)) 100% no-repeat;
}
[data-vibe="garden"] :is(.menu__friends, .button:not(.button--tile, .button--tab, .button--flat, .button--step, .button--primary, .button--buy, .button--quiet, .menu__login)){
  background: url("/ui/garden/purple-l.webp?v=b1d31be7") left center / auto 100% no-repeat, url("/ui/garden/purple-r.webp?v=2329d9d3") right center / auto 100% no-repeat,
    url("/ui/garden/purple-m.webp?v=d8bd7832") center / calc(100% - 2 * calc(var(--h) * 0.4961) + 2 * calc(var(--h) * 0.1085)) 100% no-repeat;
}
[data-vibe="garden"] :is(.button--primary, .button--buy){
  background: url("/ui/garden/lime-l.webp?v=bee03a98") left center / auto 100% no-repeat, url("/ui/garden/lime-r.webp?v=f3a9bf8b") right center / auto 100% no-repeat,
    url("/ui/garden/lime-m.webp?v=bb50fc71") center / calc(100% - 2 * calc(var(--h) * 0.4961) + 2 * calc(var(--h) * 0.1102)) 100% no-repeat;
}
[data-vibe="garden"] :is(.menu__login){
  background: url("/ui/garden/gold-l.webp?v=524bc6b4") left center / auto 100% no-repeat, url("/ui/garden/gold-r.webp?v=5e812ee0") right center / auto 100% no-repeat,
    url("/ui/garden/gold-m.webp?v=f4bb57f7") center / calc(100% - 2 * calc(var(--h) * 0.4961) + 2 * calc(var(--h) * 0.1102)) 100% no-repeat;
}
[data-vibe="garden"] :is(.menu__field, .button--quiet){
  background: url("/ui/garden/cream-l.webp?v=d69835eb") left center / auto 100% no-repeat, url("/ui/garden/cream-r.webp?v=2ab708cc") right center / auto 100% no-repeat,
    url("/ui/garden/cream-m.webp?v=9dd2824e") center / calc(100% - 2 * calc(var(--h) * 0.4938) + 2 * calc(var(--h) * 0.1111)) 100% no-repeat;
}
[data-vibe="garden"] :is(.nuggetpill){
  background: url("/ui/garden/bar-l.webp?v=94e7868c") left center / auto 100% no-repeat, url("/ui/garden/bar-r.webp?v=2e2607ed") right center / auto 100% no-repeat,
    url("/ui/garden/bar-m.webp?v=83785f71") center / calc(100% - 2 * calc(var(--h) * 0.5000) + 2 * calc(var(--h) * 0.1047)) 100% no-repeat;
}
[data-vibe="garden"] :is(.menu .menu__tile){
  background: url("/ui/garden/tile-tl.webp?v=58ff489d") 0 0 / calc(80px * var(--k)) calc(80px * var(--k)) no-repeat,
    url("/ui/garden/tile-tr.webp?v=06a0b061") 100% 0 / calc(80px * var(--k)) calc(80px * var(--k)) no-repeat,
    url("/ui/garden/tile-bl.webp?v=dd557374") 0 100% / calc(80px * var(--k)) calc(80px * var(--k)) no-repeat,
    url("/ui/garden/tile-br.webp?v=4d1a3865") 100% 100% / calc(80px * var(--k)) calc(80px * var(--k)) no-repeat,
    url("/ui/garden/tile-t.webp?v=bc9a63cd") calc(calc(70px * var(--k)) - calc(10px * var(--k))) 0 / calc(100% - 2 * calc(70px * var(--k)) + 2 * calc(10px * var(--k))) calc(80px * var(--k)) no-repeat,
    url("/ui/garden/tile-b.webp?v=0a4e3624") calc(calc(70px * var(--k)) - calc(10px * var(--k))) 100% / calc(100% - 2 * calc(70px * var(--k)) + 2 * calc(10px * var(--k))) calc(80px * var(--k)) no-repeat,
    url("/ui/garden/tile-l.webp?v=e27390ea") 0 calc(calc(70px * var(--k)) - calc(10px * var(--k))) / calc(80px * var(--k)) calc(100% - 2 * calc(70px * var(--k)) + 2 * calc(10px * var(--k))) no-repeat,
    url("/ui/garden/tile-r.webp?v=36ad9d33") 100% calc(calc(70px * var(--k)) - calc(10px * var(--k))) / calc(80px * var(--k)) calc(100% - 2 * calc(70px * var(--k)) + 2 * calc(10px * var(--k))) no-repeat,
    url("/ui/garden/tile-m.webp?v=0519a7d7") calc(calc(70px * var(--k)) - calc(10px * var(--k))) calc(calc(70px * var(--k)) - calc(10px * var(--k))) / calc(100% - 2 * calc(70px * var(--k)) + 2 * calc(10px * var(--k))) calc(100% - 2 * calc(70px * var(--k)) + 2 * calc(10px * var(--k))) no-repeat;
}
[data-vibe="garden"] :is(.menu .pickcard){
  background: url("/ui/garden/picker-tl.webp?v=996a2a73") 0 0 / calc(86px * var(--k)) calc(50px * var(--k)) no-repeat,
    url("/ui/garden/picker-tr.webp?v=89009a86") 100% 0 / calc(86px * var(--k)) calc(50px * var(--k)) no-repeat,
    url("/ui/garden/picker-bl.webp?v=4461693c") 0 100% / calc(86px * var(--k)) calc(50px * var(--k)) no-repeat,
    url("/ui/garden/picker-br.webp?v=739a50b1") 100% 100% / calc(86px * var(--k)) calc(50px * var(--k)) no-repeat,
    url("/ui/garden/picker-t.webp?v=2f32087c") calc(calc(76px * var(--k)) - calc(10px * var(--k))) 0 / calc(100% - 2 * calc(76px * var(--k)) + 2 * calc(10px * var(--k))) calc(50px * var(--k)) no-repeat,
    url("/ui/garden/picker-b.webp?v=c67044c1") calc(calc(76px * var(--k)) - calc(10px * var(--k))) 100% / calc(100% - 2 * calc(76px * var(--k)) + 2 * calc(10px * var(--k))) calc(50px * var(--k)) no-repeat,
    url("/ui/garden/picker-l.webp?v=84decc82") 0 calc(calc(40px * var(--k)) - calc(10px * var(--k))) / calc(86px * var(--k)) calc(100% - 2 * calc(40px * var(--k)) + 2 * calc(10px * var(--k))) no-repeat,
    url("/ui/garden/picker-r.webp?v=b602258f") 100% calc(calc(40px * var(--k)) - calc(10px * var(--k))) / calc(86px * var(--k)) calc(100% - 2 * calc(40px * var(--k)) + 2 * calc(10px * var(--k))) no-repeat,
    url("/ui/garden/picker-m.webp?v=caf7dff0") calc(calc(76px * var(--k)) - calc(10px * var(--k))) calc(calc(40px * var(--k)) - calc(10px * var(--k))) / calc(100% - 2 * calc(76px * var(--k)) + 2 * calc(10px * var(--k))) calc(100% - 2 * calc(40px * var(--k)) + 2 * calc(10px * var(--k))) no-repeat;
}
[data-vibe="garden"] :is(.panel){
  background: url("/ui/garden/panel-tl.webp?v=7ffdd30a") 0 0 / calc(96px * var(--k)) calc(96px * var(--k)) no-repeat,
    url("/ui/garden/panel-tr.webp?v=d9abdb14") 100% 0 / calc(96px * var(--k)) calc(96px * var(--k)) no-repeat,
    url("/ui/garden/panel-bl.webp?v=b8729ef6") 0 100% / calc(96px * var(--k)) calc(96px * var(--k)) no-repeat,
    url("/ui/garden/panel-br.webp?v=25333fbb") 100% 100% / calc(96px * var(--k)) calc(96px * var(--k)) no-repeat,
    url("/ui/garden/panel-t.webp?v=6f2b9a28") calc(calc(86px * var(--k)) - calc(10px * var(--k))) 0 / calc(100% - 2 * calc(86px * var(--k)) + 2 * calc(10px * var(--k))) calc(96px * var(--k)) no-repeat,
    url("/ui/garden/panel-b.webp?v=c4a2b3bb") calc(calc(86px * var(--k)) - calc(10px * var(--k))) 100% / calc(100% - 2 * calc(86px * var(--k)) + 2 * calc(10px * var(--k))) calc(96px * var(--k)) no-repeat,
    url("/ui/garden/panel-l.webp?v=7cede37a") 0 calc(calc(86px * var(--k)) - calc(10px * var(--k))) / calc(96px * var(--k)) calc(100% - 2 * calc(86px * var(--k)) + 2 * calc(10px * var(--k))) no-repeat,
    url("/ui/garden/panel-r.webp?v=04a31d2a") 100% calc(calc(86px * var(--k)) - calc(10px * var(--k))) / calc(96px * var(--k)) calc(100% - 2 * calc(86px * var(--k)) + 2 * calc(10px * var(--k))) no-repeat,
    url("/ui/garden/panel-m.webp?v=787fa98d") calc(calc(86px * var(--k)) - calc(10px * var(--k))) calc(calc(86px * var(--k)) - calc(10px * var(--k))) / calc(100% - 2 * calc(86px * var(--k)) + 2 * calc(10px * var(--k))) calc(100% - 2 * calc(86px * var(--k)) + 2 * calc(10px * var(--k))) no-repeat;
}
/* end garden-art */

/* A phone held sideways has little height: the pills, the field and the cards shrink together, and the round buttons keep clear of each other. */
@media (orientation: landscape) and (max-height: 500px){
  [data-vibe="garden"] .menu__nav{ gap: 10px; }
  [data-vibe="garden"] .menu .pickrow{ margin-top: 12px; }
  [data-vibe="garden"] .menu__field{ --h: clamp(34px, 8.4vh, 44px); }
  [data-vibe="garden"] .menu__play{ --h: clamp(44px, 12vh, 58px); }
  [data-vibe="garden"] .menu__friends{ --h: clamp(34px, 8.6vh, 44px); }
  [data-vibe="garden"] .nuggetpill{ --h: 36px; }
  [data-vibe="garden"] .menu__login{ --h: 32px; }
}
@media (orientation: landscape) and (max-height: 340px){
  [data-vibe="garden"] .menu{ --t: 52px; --mark-h: 12vh; }
  [data-vibe="garden"] .menu__field{ --h: 32px; }
  [data-vibe="garden"] .menu__play{ --h: 40px; }
  [data-vibe="garden"] .menu__friends{ --h: 32px; }
  [data-vibe="garden"] .menu .pickcard{ --ch: 68px; --k: 0.37; }
}
/* Reduced motion: the scene is a picture, nothing slides, pulses or pops. */
@media (prefers-reduced-motion: reduce){
  .garden *, .garden__shine b, .overlay--menu :is(.menu__mark, .menu__me, .menu__nav, .menu__field, .menu__play, .menu__friends, .pickrow, .menu__tile--burrow, .menu__events, .menu__tile--board),
  [data-vibe="garden"] .menu__play, [data-vibe="garden"] .pickcard__art.is-slithering canvas,
  [data-vibe="garden"] .menu__events > summary img, [data-vibe="garden"] .menu__tile--board img{ animation: none !important; }
}

/* The death screen's two ways on: side by side and big, Play Again the wider. */
.death__pair{ display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 10px; align-items: stretch; width: 100%; }
.death__pair > .button{ min-width: 0; min-height: clamp(60px, 9vh, 76px); padding-inline: 10px; white-space: nowrap; }
.death__pair > [data-death-menu]{ font-size: clamp(1rem, 4.4vw, 1.4rem); }
.death__pair > [data-death-again]{ font-size: clamp(1.45rem, 6vw, 2rem); }
[data-vibe="garden"] .death__pair > .button{ --h: clamp(60px, 9vh, 76px); --pad-x: calc(var(--h) * 0.28); }
/* Overdrive's lettering is wide (italic capitals, tracked out): its two words get their room inside the rim (Gray, 3 Nov 2026). */
[data-vibe="overdrive"] .death__pair > .button{ padding-inline: 16px; letter-spacing: 0.02em; }
[data-vibe="overdrive"] .death__pair > [data-death-menu]{ font-size: clamp(0.82rem, 3.3vw, 1.1rem); }
[data-vibe="overdrive"] .death__pair > [data-death-again]{ font-size: clamp(1.1rem, 4.6vw, 1.55rem); }
[data-vibe="garden"] .death__pair > [data-death-menu]{ font-size: clamp(1rem, 4.4vw, 1.4rem); }
/* One line on a button, always: "Sign Up / Log In" broke in two inside its pill. */
.savebadge .button, [data-signin-open], [data-save-open]{ white-space: nowrap; }
@media (max-height: 460px){
  .death__pair > .button{ min-height: 48px; }
  [data-vibe="garden"] .death__pair > .button{ --h: 48px; }
  .death__pair > [data-death-again]{ font-size: 1.4rem; }
}

/*
 * What is chosen shows in every theme. The Candy look marks a chosen tab or rail button by changing its body and rim
 * colours, and a theme that paints its own buttons (Overdrive, Golden Hour) has neither, so all of them looked alike.
 * One mark that needs neither: a lime ring that follows the button's own corners, with a lift of light.
 */
[data-vibe] :is(.burrow__railbtn[aria-pressed="true"], .button--tab.is-selected, .station.is-selected, .station--tile.is-selected, .choice.is-selected, .skintile.is-selected, .swatch.is-selected){
  outline: 3px solid #c6f432; outline-offset: 2px; filter: brightness(1.18) saturate(1.1);
}
[data-vibe] .button--tab.is-selected .button__label{ color: #ffe45c; }
/* The ring sits 5px outside its card (3px line, 2px offset) and a settings column scrolls, which clips what is outside its padding box:
   the chosen theme's ring was cut off at the left edge (Gray, 6 Nov 2026). The column pads by the ring and pulls back by as much, so
   nothing else moves. */
[data-vibe] .screen__side{ padding: 6px; margin: -6px; }

/* The sign-in pill is as wide as its words, on the narrowest phone too. */
.menu__login{ flex: none; width: max-content; max-width: none; }
@media (max-width: 400px){ .menu__login{ font-size: 0.74rem; padding-inline: 10px; } }

/*
 * Every Burrow button says what it is: a word under its picture on the rail, and all three tabs named at every size. An
 * infinity sign or a clapperboard alone tells a new player nothing.
 */
.burrow .burrow__railbtn{ display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; width: 78px; height: 62px; padding: 3px 2px 5px; border-radius: 16px; }
.burrow .burrow__railbtn svg, .burrow .burrow__railbtn img{ width: 28px; height: 28px; flex: none; }
.burrow__raillabel{ display: block; max-width: 100%; font-family: "Lilita One", var(--font-display); font-size: 0.72rem; line-height: 1.1; color: #fff; white-space: nowrap; letter-spacing: -0.03em; -webkit-text-stroke: 0.08em var(--ts, #14275e); text-shadow: none; }
@media (orientation: portrait){
  .burrow .burrow__rail{ grid-auto-columns: minmax(0, 1fr); gap: 5px; }
  .burrow .burrow__railbtn{ width: 100%; }
}
/* A phone on its side: the picture beside its word, so five still fit down the rail. */
@media (orientation: landscape) and (max-height: 480px){
  .burrow .burrow__rail{ gap: 3px; }
  .burrow .burrow__railbtn, .burrow[data-catwalk] .burrow__railbtn{ flex-direction: row; justify-content: flex-start; gap: 4px; width: 96px; height: 33px; padding: 2px 6px; border-radius: 11px; }
  .burrow .burrow__railbtn svg, .burrow .burrow__railbtn img{ width: 20px; height: 20px; }
  .burrow__raillabel{ font-size: 0.72rem; }
  .burrow[data-catwalk] .burrow__rail{ gap: 5px; }
}
/* Each tab's word has room inside its rim (check-overflow SQUASH; Gray, 2 Nov 2026: "shits all squashed"). */
.screen .burrow__tabs .button--tab, .screen .burrow__tabs .button--tab.is-selected{ flex: 1 1 0; min-width: 0; max-width: none; width: auto; gap: 4px; padding-inline: 11px; }
.screen .burrow__tabs .button--tab .button__label, .screen .burrow__tabs .button--tab.is-selected .button__label{ display: inline; font-size: clamp(0.66rem, 2.9vw, 0.95rem); white-space: nowrap; }
/* Tab names are packed side by side: a lighter outline and no tracking, so they fit the tab at every width. */
.button--tab .button__label{ letter-spacing: 0; -webkit-text-stroke-width: 0.1em; }
.screen .burrow__tabs .button--tab svg, .screen .burrow__tabs .button--tab img{ width: 22px; height: 22px; }
/* A phone held upright: three tabs, each a word, no picture, so the word has its room. */
@media (max-width: 430px){
  .screen .burrow__tabs .button--tab svg, .screen .burrow__tabs .button--tab img{ display: none; }
  .screen .burrow__tabs .button--tab, .screen .burrow__tabs .button--tab.is-selected{ padding-inline: 10px; justify-content: center; }
  /* Two short lines rather than one cramped one: "Worms / Shop". */
  .screen .burrow__tabs .button--tab .button__label, .screen .burrow__tabs .button--tab.is-selected .button__label{ white-space: normal; text-align: center; line-height: 1.15; font-size: clamp(0.72rem, 3.4vw, 0.95rem); }
}
/* A short upright phone puts the tabs beside the wallet: no room for a word, so each is its picture (its name is its label). */
@media (orientation: portrait) and (max-width: 900px) and (max-height: 700px){
  .screen .burrow__tabs .button--tab .button__label, .screen .burrow__tabs .button--tab.is-selected .button__label{ display: none; }
  .screen .burrow__tabs .button--tab svg, .screen .burrow__tabs .button--tab img{ display: block; width: 26px; height: 26px; }
}

/* The smallest phones on their side: the Burrow's three named tabs and the close button all stay on the glass. */
@media (orientation: landscape) and (max-height: 400px) and (max-width: 760px){
  .screen .burrow__tabs .button--tab, .screen .burrow__tabs .button--tab.is-selected{ gap: 3px; padding-inline: 3px; }
  .screen .burrow__tabs .button--tab .button__label, .screen .burrow__tabs .button--tab.is-selected .button__label{ font-size: 0.64rem; }
  .screen .burrow__tabs .button--tab svg, .screen .burrow__tabs .button--tab img{ display: none; }
  .burrow__bar .screen__title{ font-size: 1rem; }
}
@media (orientation: landscape) and (max-height: 360px){
  .burrow .burrow__railbtn, .burrow[data-catwalk] .burrow__railbtn{ width: 84px; }
  .burrow[data-catwalk] .showcase__route{ -webkit-line-clamp: 2; }
  .burrow[data-catwalk] .showcase__rarity{ display: none; }
}



/* ======================================================= Classic's calm front screen
 *
 * Gray, 5 Nov 2026: "our animated homepage ... is way too much". Classic's home is the player's arena floor, still,
 * with their own worm swimming slowly across it (game/attract.ts startSolo): no other worms, no food. The usual
 * menu sits over it on the overlay's own soft vignette, a little deeper here so it reads on any floor. Only the logo
 * moves, once, when the game first loads. The tiles keep their pictures and lose their wiggle, shine, turn and pulse
 * (a red dot says something waits). The update button keeps its pulse: it has to be noticed. Play keeps its one slow
 * breath, a transform the compositor does.
 */
[data-vibe="classic"] .overlay--menu{
  background:
    linear-gradient(to bottom, rgba(12, 22, 58, 0.62) 0%, rgba(12, 22, 58, 0) 20%),
    linear-gradient(to top, rgba(12, 22, 58, 0.66) 0%, rgba(12, 22, 58, 0) 24%),
    radial-gradient(ellipse 120% 90% at 50% 45%, rgba(12, 22, 58, 0.12) 40%, rgba(12, 22, 58, 0.5) 100%);
}
/* The logo lands once, on the first load, and then holds still: no jelly on this screen. */
[data-vibe="classic"] .menu__mark{ animation: none; }
.overlay--menu:is(.is-calm-wait, .is-calm-intro) .menu__mark{ animation: markDrop 0.7s cubic-bezier(.2, 1.6, .4, 1) both; }
.overlay--menu.is-calm-wait .menu__mark{ animation-play-state: paused; }
/* Nothing on the home screen's tiles moves. */
[data-vibe="classic"] .menu .button--tile, [data-vibe="classic"] .menu .button--tile :is(img, .tile__badge), [data-vibe="classic"] .menu .menu__login{ animation: none; }
/* A panel is over the front screen, or the tab is hidden: everything holds still (the update button never does). */
.overlay--menu[data-calm-paused] :not(.menu__update){ animation-play-state: paused !important; }

/* ======================================================= THE FACE RULE (ui/uiRules.ts)
 *
 * Every painted pill (Classic and Golden Hour) is a picture with a dark outline, and its words sit on the face inside
 * it, never on the outline (Gray, 4 Nov 2026: "set a damn rule, a file that controls it all"). So a painted pill's
 * padding IS its rim, set here once and never anywhere else: 9% of its height above, 12% below, and at least 22% at
 * each end (where the rounded cap curves in). Generic rules elsewhere (.menu .menu__nav > .nuggetpill and the like)
 * used to win the cascade and put the words on the rim; !important is what makes this the rule rather than a wish.
 *
 * To change a painted pill: its size is --h (the caps follow it), extra room at the ends is --pad-x (or --pad-l and
 * --pad-r for one end), never `padding`. tools/check-overflow.mjs and tools/app-sweep.mjs hold every screen to it. */
[data-vibe="garden"] :is(.menu__play, [data-death-again], .menu__friends, .menu__login, .nuggetpill, .menu__field, .button:not(.button--tile, .button--tab, .button--flat, .button--step)){
  --face-x: calc(var(--h) * 0.22);
  padding: calc(var(--h) * 0.09) max(var(--face-x), var(--pad-r, var(--pad-x, calc(var(--h) * 0.5)))) calc(var(--h) * 0.12) max(var(--face-x), var(--pad-l, var(--pad-x, calc(var(--h) * 0.5)))) !important;
}
/* A button beside a field is the field's height (PAIR): Join was 44px beside the 56px code box. */
:is([data-vibe="classic"], [data-vibe="garden"]) .lobby__join > .button{ --h: clamp(42px, 7.4vh, 56px); }
/* Tiles: the name sits on the face at the bottom and the picture rises out of the top when the tile is short (a
   centred tile on a short phone pushed a two-line name off the bottom, onto the rim). The padding is the rim. */
:is([data-vibe="classic"], [data-vibe="garden"]) .menu .menu__tile:not(.menu__menu > .menu__tile){ justify-content: flex-end !important; }
/* The Burrow in the left column is a ROW (its picture beside its name): flex-end there pushed the pair to the right edge, the picture
   small and low with a hole at the left and the name on the rim (Gray, 6 Nov 2026: "burrow button fucked everywhere"). In a row the pair is centred. */
@media (orientation: landscape){
  :is([data-vibe="classic"], [data-vibe="garden"]) .menu .menu__left .menu__tile--burrow:not(.menu__menu > .menu__tile){ justify-content: center !important; }
}

/* ---- Classic's own look */
/* ======================================================= site theme: Classic
 *
 * The default theme gets the same finish as Golden Hour (shared/themes.ts; its block above), in Classic's own colours:
 * hot pink Play, royal blue-violet for everything that is a plain button, lime for "yes", gold for the sign-in, an
 * indigo panel, and a candy tile in the colour the tile always had (orange The Burrow, pink Events, blue Top players,
 * violet More). Its floor, its food and its layout are exactly what they were.
 *
 * Nothing in Classic is a picture any more (Gray, 8 Nov 2026, the buttons pass and the panels pass): buttons, tiles,
 * panels and pickers are all CSS in one language, so they scale cleanly and the lettering always sits on the box under
 * it: a solid dark border, one shine band on the top half, a hard darker lip, no blur and no glow. `--h` is a pill's
 * height. Lettering stays the house display face with an outline and a crisp drop shadow. Tabs, flat sign-in buttons
 * and steps keep the Candy body they always had.
 */
html[data-vibe="classic"]{ --cl-ink: #17135e; --cl-cream: #fff8e8; --cl-lime: #b9f03c; }
/* Roles, in Classic's calmer palette (the base roles in the Game buttons section are the same colours): blue for a plain
   button, lime for "yes", rose for Play, gold for the sign-in, cream for the quiet one, deep indigo for the Nuggets. */
[data-vibe="classic"] .button--primary{ --bodyA: #aee66b; --bodyB: #5fb92f; --bodyC: #44921c; --ts: #1b4709; }
[data-vibe="classic"] .button--buy{ --bodyA: #35b856; --bodyB: #12843a; --bodyC: #0a5a29; --ts: #053a19; }
[data-vibe="classic"] .menu__login{ --bodyA: #ffd978; --bodyB: #f5ab2a; --bodyC: #d68a12; --ts: #5e3504; }
[data-vibe="classic"] .nuggetpill{ --bodyA: #4a4f8f; --bodyB: #2e3270; --bodyC: #20244f; --ts: #0d0f2e; color: #ffe9a8; }
[data-vibe="classic"] .menu__field{ --bodyA: #fffdf7; --bodyB: #efe8d8; --bodyC: #d6ccb4; --ts: #7d7157; }

/* The controls that are not in the house list share its body: border, shine band, lip, outlined words. */
[data-vibe="classic"] :is(.menu__login, .nuggetpill, .menu__field){
  --lip: max(3px, calc(var(--h, 44px) * 0.085)); --bw: max(2px, calc(var(--h, 44px) * 0.06)); --drop: calc(var(--lip) * 0.7);
  border: var(--bw) solid var(--edge, var(--ts));
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1)) 0 0 / 100% 46% no-repeat,
    linear-gradient(180deg, var(--bodyA) 0%, var(--bodyB) 55%, var(--bodyC) 100%);
  box-shadow: inset 0 calc(var(--lip) * -1) 0 rgba(0, 0, 0, 0.2), inset 0 2px 0 rgba(255, 255, 255, 0.35), 0 var(--drop) 0 var(--edge, var(--ts));
}
[data-vibe="classic"] :is(.menu__login, .nuggetpill){
  color: #fff; font-family: var(--font-label); font-weight: 400;
  -webkit-text-stroke: 0.15em var(--ts); paint-order: stroke fill; stroke-linejoin: round; text-shadow: 0 0.07em 0 var(--ts); letter-spacing: 0.02em;
}
[data-vibe="classic"] .nuggetpill{ color: #ffe9a8; }
/* The name field is paper: a keyboard ring or the needed-name ring is a ring round it, never a glow. */
[data-vibe="classic"] .menu__field:focus-within{ box-shadow: inset 0 calc(var(--lip) * -1) 0 rgba(0, 0, 0, 0.12), 0 0 0 3px #f0457f, 0 var(--drop) 0 3px var(--ts); }
[data-vibe="classic"] .menu__field.is-needed{ box-shadow: inset 0 calc(var(--lip) * -1) 0 rgba(0, 0, 0, 0.12), 0 0 0 3px var(--hot), 0 var(--drop) 0 3px var(--ts); }

/* The panels and the pickers wear the same body as the buttons, calmer: the indigo of the Nuggets pill, the same dark border
   and the same shine band, a thinner lip and no lettering outline (a frame is not a button: nothing on it is pressed). */
[data-vibe="classic"] :is(.pickcard, .panel){
  --edge: #0d0f2e; --bw: 3px; --lip: 4px;
  border: var(--bw) solid var(--edge);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04)) 0 0 / 100% 42px no-repeat,
    linear-gradient(180deg, #3d4296 0%, #2c3079 55%, #22265f 100%);
  box-shadow: inset 0 calc(var(--lip) * -1) 0 rgba(0, 0, 0, 0.18), inset 0 2px 0 rgba(255, 255, 255, 0.28), 0 var(--lip) 0 var(--edge);
}
/* Words: the house lettering (the Game buttons section), sized from the pill's own height. The outline is half outside the
   letters, so the size leaves room for it, and ui/fitLabels.ts steps a label down when its words still run past the face. */
[data-vibe="classic"] :is(.menu__play, [data-death-again], .menu__friends, .menu__login, .nuggetpill, .button:not(.button--tile, .button--tab, .button--flat, .button--step, .button--quiet), .iconbtn, .dock__icon, .menu__tile){
  color: #fff;
}
/* The words sit at 36% of the pill's height; Play is the one big word at 40%. */
[data-vibe="classic"] :is(.menu__friends, .button:not(.button--tile, .button--tab, .button--flat, .button--step, .button--quiet, .button--sm)){
  font-size: max(1rem, calc(var(--h) * 0.36)); line-height: 1;
}
[data-vibe="classic"] :is(.menu__play, [data-death-again]){ font-size: max(1.2rem, calc(var(--h) * 0.4)); line-height: 1; }
[data-vibe="classic"] .button--sm:not(.button--tile, .button--tab, .button--flat, .button--step, .button--quiet){ font-size: max(0.85rem, calc(var(--h) * 0.36)); line-height: 1; }
/* The pills' corners are their own, so a keyboard ring round one is round too. */
[data-vibe="classic"] :where(.menu__play, [data-death-again], .menu__friends, .menu__login, .nuggetpill, .menu__field, .button:not(.button--tile, .button--tab, .button--flat, .button--step)){
  --h: 44px; height: var(--h); min-height: var(--h); border-radius: 999px;
}
/* A pill that grows to two lines grows round its words (the app's video button, 4 Nov 2026): the air is in the padding below. */
[data-vibe="classic"] :where(.menu__play, [data-death-again], .menu__friends, .menu__login, .nuggetpill, .button:not(.button--tile, .button--tab, .button--flat, .button--step)){
  --face-pad: max(calc(var(--h) * 0.3), var(--pad-x, 0px));
  padding: calc(var(--h) * 0.06) var(--pill-r, var(--face-pad)) calc(var(--h) * 0.06 + var(--lip) * 0.5) var(--pill-l, var(--face-pad));
}
[data-vibe="classic"] :is(.menu__play, [data-death-again]){ --h: clamp(56px, 10.5vh, 80px); min-height: 0; }
[data-vibe="classic"] .menu__friends{ --h: clamp(40px, 7vh, 54px); width: min(340px, var(--col, 100%)); }
[data-vibe="classic"] .button:where(:not(.menu__friends, .menu__play, .menu__tile)){ height: auto; }
[data-vibe="classic"] .button--sm{ --h: 36px; }
[data-vibe="classic"] .button--sm:not(.button--pill){ --pad-x: 10px; gap: 4px; }
[data-vibe="classic"] .button--lg{ --h: 54px; }
[data-vibe="classic"] :is(.button--primary, .button--buy){ --h: 46px; }
[data-vibe="classic"] .menu__login{ --h: 38px; }
/* The Nuggets keep their gold lettering over the painted pill. */
[data-vibe="classic"] .nuggetpill{ color: #ffe9a8; }
/* A narrow phone: the sign-in pill, the level bar and the Nuggets share one row, so each takes a little less. */
@media (max-width: 480px){
  [data-vibe="classic"] .menu__login{ --h: 32px; font-size: 0.72rem; --pad-x: calc(var(--h) * 0.36); }
  [data-vibe="classic"] .nuggetpill{ --h: 38px; --pill-l: calc(var(--h) * 0.14); --pill-r: calc(var(--h) * 0.22); gap: 4px; }
  [data-vibe="classic"] .menu__avatar .menu__levelbar{ width: 40px; }
  /* German words are longer: the bar steps aside, the level badge on the picture still says the level. */
  /* The bar steps aside for the sign-in pill (it sat under it), and the level badge on the picture still says the level. */
  [data-vibe="classic"] .menu__avatar .menu__levelbar{ display: none; }
}
/* The painted pill takes the width its one line of words needs (the plain button had a cap that let the words run out of it). */
[data-vibe="classic"] .menu__login{ max-width: none; white-space: nowrap; --pad-x: calc(var(--h) * 0.42); }
/* The cream one reads as dark ink on paper, at the size of the buttons above it: no stroke, a hairline of light under the type. */
[data-vibe="classic"] .button--quiet{ color: #2a2f45; -webkit-text-stroke: 0; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8); font-size: 1.05rem; }
[data-vibe="classic"] .menu__field{ --h: clamp(42px, 7.4vh, 56px); --pill-l: calc(var(--h) * 0.6); --pill-r: calc(var(--h) * 0.45); }
[data-vibe="classic"] .nuggetpill{ --h: 44px; --pill-l: calc(var(--h) * 0.22); --pill-r: calc(var(--h) * 0.4); gap: 8px; }
/* Round: the icon buttons, one picture, no joins. A switch that is off is dimmed as well as crossed out. */
[data-vibe="classic"] :is(.iconbtn, .dock__icon){ border-radius: 50%; }
[data-vibe="classic"] .iconbtn[aria-pressed="false"]:has(.icon__slash){ filter: grayscale(0.55) brightness(0.85); }
[data-vibe="classic"] .menu .iconbtn > svg:not(.menu__langcaret), [data-vibe="classic"] .menu .iconbtn .icon{ width: 52%; height: 52%; }
/* Sideways and on a desktop More is the last of the round buttons in the top rail: the same round picture. */
@media (orientation: landscape){
  [data-vibe="classic"] .menu .menu__menu > .menu__tile{ --bodyA: #7fb0ff; --bodyB: #3f77e6; --bodyC: #2d58bd; --ts: #14275e; --h: 46px; border-radius: 50%; width: 46px; height: 46px; padding: 0; }
}
@media (orientation: landscape) and (max-height: 500px){
  [data-vibe="classic"] .menu .menu__menu > .menu__tile{ width: 36px; height: 36px; }
}
/* Tiles: the colour each always had, in the same body, the picture inside it and the name under it. */
/* Padding keeps the name on the face: at 4px "Burrow" and "players" ran over the rim on a phone (Gray, 4 Nov 2026).
   ui/fitLabels.ts shrinks a word that is still too wide. */
[data-vibe="classic"] .menu .menu__tile{ border-radius: 22px; padding: 4px 6px max(8px, calc(var(--tile, 90px) * 0.1)); animation: none; }
/* The pickers: your worm and your arena, a picture in a frame with its name under it and an arrow either side of the name. */
[data-vibe="classic"] .menu .pickcard{
  --ch: clamp(74px, 17vh, 112px); height: auto; min-height: 0; position: relative; border-radius: 18px;
  padding: 7px 6px 6px; row-gap: 3px; column-gap: 0;
  grid-template-columns: 34px minmax(0, 1fr) 34px; grid-template-areas: "art art art" "prev name next"; justify-items: center; align-content: center;
}
[data-vibe="classic"] .menu .pickcard__art{ width: min(100%, calc(var(--ch) * 0.7)); overflow: hidden; }
[data-vibe="classic"] .menu .pickcard__art--floor{ width: auto; height: calc(var(--ch) * 0.36); }
[data-vibe="classic"] .menu .pickcard__kind, [data-vibe="classic"] .menu .pickcard__hint{ display: none; }
[data-vibe="classic"] .menu .pickcard__label{ text-align: center; }
[data-vibe="classic"] .menu .pickcard__name{ color: #fff; font-size: clamp(0.78rem, calc(var(--ch) * 0.14), 1.1rem); -webkit-text-stroke: 0.1em var(--edge); paint-order: stroke fill; text-shadow: 0 0.08em 0 var(--edge); }
/* The arrows are white chevrons with the lettering's drop shadow, as large a target as the row allows. */
[data-vibe="classic"] .menu .pickcard__arrow{ width: 34px; height: 30px; color: #fff; }
[data-vibe="classic"] .menu .pickcard__arrow svg{ width: 18px; height: 18px; filter: drop-shadow(0 2px 0 var(--edge)); }
/* Panels. */
/* The padding is the old padding less the 3px border, so what sits inside a panel keeps the room it had. */
[data-vibe="classic"] .panel{ border-radius: 20px; padding: 27px 29px; color: var(--cl-cream); }
[data-vibe="classic"] :is(.screen__title, .panel__title){ color: var(--cl-cream); -webkit-text-stroke: var(--lt-stroke) var(--cl-ink); paint-order: stroke fill; stroke-linejoin: round; text-shadow: 0 var(--lt-drop) 0 var(--cl-ink); }
@media (max-height: 700px){
  [data-vibe="classic"] .panel{ padding: 17px 19px; }
}
@media (max-height: 400px){ [data-vibe="classic"] .button.button--sm:not(.button--pill){ font-size: 0.76rem; --pad-x: 6px; } }

/* A phone held sideways has little height: the pills, the field and the cards shrink together. */
@media (orientation: landscape) and (max-height: 500px){
  [data-vibe="classic"] .menu__field{ --h: clamp(34px, 8.4vh, 44px); }
  [data-vibe="classic"] .menu__play{ --h: clamp(44px, 12vh, 58px); }
  [data-vibe="classic"] .menu__friends{ --h: clamp(34px, 8.6vh, 44px); }
  [data-vibe="classic"] .nuggetpill{ --h: 36px; }
  [data-vibe="classic"] .menu__login{ --h: 32px; }
}
@media (orientation: landscape) and (max-height: 340px){
  [data-vibe="classic"] .menu__field{ --h: 32px; }
  [data-vibe="classic"] .menu__play{ --h: 40px; }
  [data-vibe="classic"] .menu__friends{ --h: 32px; }
  [data-vibe="classic"] .menu .pickcard{ --ch: 56px; }
}
[data-vibe="classic"] .death__pair > .button{ --h: clamp(60px, 9vh, 76px); --pad-x: calc(var(--h) * 0.28); font-size: max(1rem, calc(var(--h) * 0.32)); }
@media (max-height: 460px){ [data-vibe="classic"] .death__pair > .button{ --h: 48px; } }


/* Upright the cards are sized from the screen's height. */
@media (orientation: portrait){
  [data-vibe="classic"] .menu .pickrow{ align-self: center; height: auto; container-type: inline-size; }
  [data-vibe="classic"] .menu .pickcard{ --ch: clamp(66px, 12.5vh, 100px); }
}
@media (orientation: portrait) and (max-height: 640px){ [data-vibe="classic"] .menu .pickcard{ --ch: 50px; } }
/* A countdown pill hanging off a tile keeps inside the frame, in any language. */
[data-vibe="classic"] .menu .menu__tile .tile__badge{ padding-inline: 6px; letter-spacing: -0.01em; }  /* 6px: the outline is half outside the letters (FACE) */
@media (orientation: landscape) and (max-height: 500px){ [data-vibe="classic"] .menu .menu__tile .tile__badge{ font-size: max(0.72rem, calc(var(--t) * 0.105)); letter-spacing: -0.03em; } }
/* A short screen: the reward and the panels give up a little height so nothing runs under the notch or needs a scroll to show its last row. */
@media (max-height: 400px){ [data-vibe="classic"] [data-reward] .button{ --h: 38px; } }
@media (max-height: 450px){ [data-vibe="classic"] .panel{ padding: 9px 15px; } }
/* In the in-game screens the pills are as tall as the Candy buttons were, so every pane keeps the height it had. */
[data-vibe="classic"] .screen .button:not(.button--tab, .button--sm){ --h: 52px; }
@media (max-height: 700px){ [data-vibe="classic"] .panel{ padding: 11px 17px; } }
/* The death panel has two pills side by side, so it keeps less at the sides and they keep room round their words on a narrow phone. */
[data-vibe="classic"] .panel--death{ padding-inline: 8px; }
/* A long page in a panel (Privacy) upright: the list scrolls and the Back button stays under it, so the panel itself never
   scrolls by a sliver with its button half cut off (ui/uiRules.ts NEARFIT). */
@media (orientation: portrait){
  [data-vibe="classic"] [data-game-privacy] .panel{ display: flex; flex-direction: column; overflow: hidden; }
  [data-vibe="classic"] [data-game-privacy] .panel > .panel__list{ flex: 1 1 auto; min-height: 0; overflow-y: auto; }
  [data-vibe="classic"] [data-game-privacy] .panel > .button{ flex: none; }
}
/* The shortest upright phones: the picker cards, the name field and the pills under the logo each take a little less. */
@media (orientation: portrait) and (max-height: 600px){
  [data-vibe="classic"] .menu .pickcard{ --ch: 40px; }
  [data-vibe="classic"] .menu__input{ padding-block: 2px; }
  [data-vibe="classic"] .menu__field{ --h: 36px; }
  [data-vibe="classic"] .menu__play{ --h: 50px; }
  [data-vibe="classic"] .menu__friends{ --h: 34px; }
}

/* A pill never shrinks to a coin around a short number (Gray, 2 Nov 2026: "0" Nuggets read as a ball), and the
   race's points pill, which has no icon, keeps room on both sides of its number in every theme. */
.nuggetpill{ min-width: 4.2em; justify-content: center; }

/* A registered username (ui/usernames.ts; Gray, 3 Nov 2026: "yeah do badge"): a gold tick after the name, wherever a
   name is listed. Only its owner can play under it (server nameGuard.ts), so the tick means it is really them. */

/* ======================================================= site theme: Wind Down
 *
 * Gray, 3 Nov 2026: "wind down looks awesome build it, add a wind down button to home". A rainy night: deep indigo with
 * a violet glow above and a teal one below, the house components in dark indigo with bright rims, the primary in
 * glowing violet. Like Overdrive it is one layer on `data-vibe="winddown"` that works through the components' own
 * tokens (--bodyA/B/C, --rimA/B, --edge, --glow, --ts, --ink), so the lettering keeps its outline and drop shadow, and
 * restyles only the shells that paint their own colours. Its floor, food, songs and rain come with it (themes.ts,
 * game/radio.ts, ui/rain.ts).
 */
html[data-vibe="winddown"]{
  --wd-night: #050818; --wd-deep: #0c1230; --wd-card: #121a4a; --wd-line: rgba(130, 150, 255, 0.55);
  --wd-moon: #e8edff; --wd-violet: #a98bff; --wd-pink: #FF7AD9; --wd-orange: #FFB347; --wd-blue: #5FA8FF; --wd-teal: #2EE6C9;
  --wd-sky:
    radial-gradient(ellipse 120% 55% at 50% -5%, rgba(124, 92, 255, 0.38), transparent 70%),
    radial-gradient(ellipse 120% 50% at 50% 108%, rgba(0, 190, 200, 0.26), transparent 70%),
    linear-gradient(180deg, #0c1230 0%, #050818 100%);
  --accent: var(--wd-violet); --accent-2: #7546ff;
}
html[data-vibe="winddown"] body{ background: var(--wd-night); }

/* Buttons: indigo glass slabs with a periwinkle rim; the primary glows violet. */
[data-vibe="winddown"] :is(.button, .menu__play, .iconbtn, .set-btn, .share__btn,
    .dock__icon, .dock__btn, .boostbutton, .beta__close, .settings__back){
  --rimA: #5466c4; --rimB: #141c48; --edge: var(--wd-line); --glow: rgba(124, 92, 255, 0.4);
  --bodyA: #2c3a78; --bodyB: #1a2356; --bodyC: #0c1236; --ts: #050818; --ink: var(--wd-moon);
}
[data-vibe="winddown"] :is(.button--primary, .menu__play, .boostbutton, [data-death-again]){
  --bodyA: #a98bff; --bodyB: #7546ff; --bodyC: #3d1bb0; --rimA: #d9ccff; --rimB: #4a22c8;
  --edge: rgba(169, 139, 255, 0.8); --glow: rgba(124, 92, 255, 0.85); --ts: #1b0a5c; --ink: #ffffff;
}
[data-vibe="winddown"] .button--buy{ --bodyA: #3fcfb6; --bodyB: #12907e; --bodyC: #0a5d55; --edge: rgba(46, 230, 201, 0.7); --glow: rgba(46, 230, 201, 0.45); --rimA: #c4fff1; --rimB: #12867a; }
[data-vibe="winddown"] :is(.button--quiet, .share__btn, .beta__close){ --bodyA: #222d66; --bodyB: #151d4c; --bodyC: #0b1130; --ink: #c9d4ff; }
[data-vibe="winddown"] .button--glass{ --bodyA: rgba(26, 35, 86, 0.82); --bodyB: rgba(18, 26, 74, 0.82); --bodyC: rgba(10, 16, 48, 0.82); }
[data-vibe="winddown"] .set-danger{ --bodyA: #ff7a96; --bodyB: #d02a52; --bodyC: #7a0f2c; --edge: rgba(255, 110, 140, 0.7); }

/* The moon: lit while Wind Down is on. */
[data-vibe="winddown"] .menu__moon[aria-pressed="true"]{
  --bodyA: #fff0c4; --bodyB: #ffd47a; --bodyC: #c98a2c; --rimA: #fff8dc; --rimB: #a8691c; --edge: rgba(255, 214, 130, 0.8);
  --glow: rgba(255, 214, 130, 0.7); --ink: #4a2c00; --ts: #fff3d2;
}
.menu__moon svg{ width: 52%; height: 52%; }
[data-vibe="winddown"] .menu__moon[aria-pressed="true"] svg{ fill: currentColor; fill-opacity: 0.25; }

/* The front screen's tiles: dark indigo cards with a bright rim each. */
[data-vibe="winddown"] .button--tile{
  --bodyA: #27327a; --bodyB: #161e50; --bodyC: #0a0f2e; --rimA: var(--tone, var(--wd-violet)); --rimB: #0a0f2e; --edge: var(--tone, var(--wd-violet));
}
[data-vibe="winddown"] .button--tile[data-tone="pink"]{ --tone: var(--wd-pink); --glow: rgba(255, 122, 217, 0.4); }
[data-vibe="winddown"] .button--tile[data-tone="orange"]{ --tone: var(--wd-orange); --glow: rgba(255, 179, 71, 0.4); }
[data-vibe="winddown"] .button--tile[data-tone="blue"]{ --tone: var(--wd-blue); --glow: rgba(95, 168, 255, 0.4); }
[data-vibe="winddown"] .button--tile[data-tone="green"], [data-vibe="winddown"] .button--tile[data-tone="teal"]{ --tone: var(--wd-teal); --glow: rgba(46, 230, 201, 0.4); }
[data-vibe="winddown"] .button--tile[data-tone="violet"]{ --tone: var(--wd-violet); --glow: rgba(169, 139, 255, 0.4); }
/* The tiles' own pictures are Classic's bright ones: a little dimmer and cooler, to sit in the night. */
[data-vibe="winddown"] img[data-art]{ filter: brightness(0.86) saturate(0.85) hue-rotate(-8deg); }

/* The front screen: the night sky over the arena, the logo with a soft violet halo. */
[data-vibe="winddown"] .overlay--menu{
  background:
    radial-gradient(ellipse 120% 55% at 50% -5%, rgba(124, 92, 255, 0.38), transparent 70%),
    radial-gradient(ellipse 120% 50% at 50% 108%, rgba(0, 190, 200, 0.26), transparent 70%),
    linear-gradient(180deg, rgba(12, 18, 48, 0.62) 0%, rgba(5, 8, 24, 0.74) 100%);
}
[data-vibe="winddown"] .menu__mark{ filter: drop-shadow(0 0 4px rgba(169, 139, 255, 0.8)) drop-shadow(0 0 14px rgba(124, 92, 255, 0.5)); }
[data-vibe="winddown"] .menu__eyebrow{ color: #b8c4ff; }
[data-vibe="winddown"] .pickcard{
  background: linear-gradient(180deg, #2a2380, #170f58 70%, #110b44);
  box-shadow: inset 0 0 0 2px #6a55e0, 0 0 20px -6px rgba(124, 92, 255, 0.6), 0 6px 14px -8px rgba(0, 0, 0, 0.7);
}
[data-vibe="winddown"] .pickcard__name{ color: #fff; }
[data-vibe="winddown"] .menu__field{
  background: var(--wd-card); border-radius: 18px;
  box-shadow: inset 0 0 0 2px rgba(130, 150, 255, 0.35), 0 0 16px -6px rgba(124, 92, 255, 0.5);
}
[data-vibe="winddown"] .menu__field:focus-within{ box-shadow: inset 0 0 0 2px var(--wd-violet), 0 0 20px -4px rgba(124, 92, 255, 0.8); }
[data-vibe="winddown"] .menu__label{ color: var(--wd-violet); }
[data-vibe="winddown"] .menu__input{ color: var(--wd-moon); }
[data-vibe="winddown"] .menu__input::placeholder{ color: #8a97d6; }

/* Panels and full screens: indigo plates with a periwinkle rule. */
[data-vibe="winddown"] .panel{
  background: linear-gradient(180deg, rgba(124, 92, 255, 0.14), transparent 32%), linear-gradient(165deg, #1b2468 0%, #0f1640 58%, #070b24 100%);
  border: 2px solid var(--wd-line); color: var(--wd-moon);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 0 34px -8px rgba(124, 92, 255, 0.55), 0 18px 40px -14px rgba(0, 0, 0, 0.8);
}
[data-vibe="winddown"] .screen{
  --screen-fill: #070b24;
  background: var(--wd-sky);
  border: 2px solid var(--wd-line);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 0 34px -8px rgba(124, 92, 255, 0.5), 0 18px 40px -14px rgba(0, 0, 0, 0.8);
}
[data-vibe="winddown"] .screen.is-windowed{ background: transparent; }
[data-vibe="winddown"] .screen__bar{ background: linear-gradient(180deg, #1a2262, #111848); border-bottom: 1px solid var(--wd-line); }
[data-vibe="winddown"] .screen__bar::before{ opacity: 0; }
[data-vibe="winddown"] .screen__tabs{ background: #0e1540; border-bottom: 1px solid var(--wd-line); }
[data-vibe="winddown"] .button--tab{ --bodyA: #222d66; --bodyB: #151d4c; --bodyC: #0e1540; }
[data-vibe="winddown"] .button--tab[aria-selected="true"]{ --bodyA: #6a4de0; --bodyB: #4d33b8; --bodyC: #32208a; --edge: var(--wd-violet); }
[data-vibe="winddown"] .screen__window{ border: 2px solid var(--wd-line); }
[data-vibe="winddown"] .screen__badge{ border: 1px solid var(--wd-line); background: rgba(8, 12, 40, 0.88); color: var(--wd-moon); }
[data-vibe="winddown"] .station{ background: #111848; }
[data-vibe="winddown"] .station.is-selected{ border-color: var(--wd-violet); box-shadow: 0 0 14px -4px rgba(169, 139, 255, 0.7); }
[data-vibe="winddown"] :is(.statcard, .trophy){
  border: 2px solid var(--wd-line);
  background: linear-gradient(180deg, #1b2468, #0f1640);
  box-shadow: 0 0 16px -8px rgba(124, 92, 255, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
[data-vibe="winddown"] .dossier__me{ background: #111848; border: 1px solid var(--wd-line); box-shadow: none; }
[data-vibe="winddown"] .statcard__label{ color: var(--wd-violet); }

/* Loading screen: the same night. */
[data-vibe="winddown"] .boot{ background: var(--wd-sky); }

/* The HUD: the first readout in moonlight. */
[data-vibe="winddown"] .hud__stat:first-child .hud__value{ color: #d9ccff; text-shadow: 0 0 10px rgba(169, 139, 255, 0.7); }

/* The rain canvas (ui/rain.ts): over the arena, under the HUD, never takes a touch. */
.rain{ position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* The death screen's pair of buttons: a little more air at the sides and a touch smaller lettering, so the longest German label (once "Nochmal spielen", now "Neue Runde") clears its edges (check-overflow). */
[data-vibe="winddown"] .death__pair > .button{ padding-inline: 16px; }
[data-vibe="winddown"] .death__pair > [data-death-again]{ font-size: clamp(1.25rem, 5.2vw, 1.75rem); }

/*
 * Boost on a touch screen, redrawn (Gray, 6 Nov 2026: "the boost button on mobile is ugly, redesign and also make it a
 * bit transparent"). A round see-through glass pad with a lightning bolt, the way Worms Zone's and slither's mobile
 * boost reads: it sits back over the arena (62%) until a thumb is on it, then lights up solid in the theme's colour.
 * Overrides the painted pill it used to borrow (the shared :is(.button ...) rules), so it is the last word here.
 */
.game .boostbutton.boostbutton{
  --boost-c: #ff4fad;
  display: grid; place-items: center; padding: 0;
  border: 3px solid rgba(255, 255, 255, 0.78);
  background: radial-gradient(circle at 50% 32%, rgba(255, 255, 255, 0.24), rgba(14, 12, 34, 0.42) 72%);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.32), inset 0 0 0 2px rgba(255, 255, 255, 0.10);
  color: #fff; text-shadow: none; font-size: 0;
  opacity: 0.62;
  transform-origin: 50% 50%;
  transition: opacity 0.12s ease, transform 0.09s ease-out, background 0.12s ease, box-shadow 0.12s ease;
}
[data-vibe="overdrive"] .game .boostbutton.boostbutton{ --boost-c: #19e3ff; }
[data-vibe="winddown"] .game .boostbutton.boostbutton{ --boost-c: #a98bff; }
[data-vibe="garden"] .game .boostbutton.boostbutton{ --boost-c: #ffb02e; }
.game .boostbutton.boostbutton .boostbutton__bolt{
  width: 58%; height: 58%; fill: #fff;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.35));
  transition: fill 0.12s ease;
}
.game .boostbutton.boostbutton.is-active{
  opacity: 1; transform: scale(0.94); filter: none;
  border-color: #fff;
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--boost-c) 55%, #fff), var(--boost-c) 70%);
  box-shadow: 0 0 22px color-mix(in srgb, var(--boost-c) 75%, transparent), 0 6px 14px rgba(0, 0, 0, 0.35);
}
.game .boostbutton.boostbutton.is-active .boostbutton__bolt{ fill: #fff; }
/* Power-ups round it sit back the same way while carried, and come up solid while one is running (Gray, 6 Nov 2026). */
.game .powerarc__item{ opacity: 0.62; transition: opacity 0.15s ease, scale 0.12s ease; }
.game .powerarc__item.is-running, .game .powerarc__item:not(:disabled):active{ opacity: 1; }

/*
 * The score strip holds still (Gray, 7 Nov 2026: "this keeps adjusting size, same as the leaderboard used to do, needs to be fixed
 * width, test it at largest scores"). Each stat keeps the width of its biggest value, so a number gaining a digit moves nothing
 * beside it: Length and Nuggets to 7 digits, Rank to "#999 of 999", Level to 3. Digits are tabular (.hud__value), so `ch` is a digit.
 */
/* 7 Nov 2026, later: the 7-digit reserve was "way too much" space (Gray). Each value now keeps the widest it has been this run
   instead (ui/hud.ts holdWidth), so it sits tight and still never jumps; the nugget keeps its icon beside the number. */
.hud__stat .hud__value{ display: inline-block; white-space: nowrap; }
.hud__stat .hud__value--nugget{ display: inline-flex; }

/* What the owner has switched off in the admin panel (client net/switches.ts paints html[data-off]): the tile goes, nothing else moves. */
html[data-off~="event"] [data-event-open], html[data-off~="mini"] [data-mini-open]{ display: none !important; }

/* ==========================================================================================================
 * BURROW (8 Nov 2026): the shop as a place. Everything for the redesign is in this one section so it stays
 * apart from the button pass (the house .button and .iconbtn rules above are used as they are).
 *
 * Gray, 7-8 Nov 2026: the Burrow should look like a pro mobile game shop, to the standard of Worms Zone's but
 * our own: an underground chamber, painted, with the worms standing on pedestals in a row (three, five on a
 * wide screen), a name plate over each, ONE price button under each and an "i" for the details. The painted
 * parts are ui/burrow-*.webp.
 * ======================================================================================================== */

/* ---- The chamber: painted behind everything, wide for landscape and tall for upright. ---- */
.screen--burrow{
  border-color: #6247d6; background: #120a38 url(/ui/burrow-chamber-wide.webp?v=77fe4b4c) center / cover no-repeat;
  box-shadow: 0 0 0 2px #0d0626, 0 18px 40px -14px rgba(0, 0, 0, 0.75);
}
@media (max-aspect-ratio: 1 / 1){ .screen--burrow{ background-image: url(/ui/burrow-chamber-tall.webp?v=6a4e18d3); } }
.burrow__bar{ background: linear-gradient(180deg, rgba(12, 6, 40, 0.86), rgba(12, 6, 40, 0.5)); border-bottom-color: rgba(255, 255, 255, 0.1); }
.burrow__bar::before{ display: none; }

/* ---- The title on its hanging sign. ---- */
.burrow__bar .screen__title{
  --sign-h: clamp(54px, 9vh, 76px);
  flex: none; display: grid; place-items: center; height: var(--sign-h); aspect-ratio: 900 / 278; margin: -12px 4px -8px 0;
  padding: calc(var(--sign-h) * 0.27) calc(var(--sign-h) * 0.4) calc(var(--sign-h) * 0.12); box-sizing: border-box;
  background: url(/ui/burrow-sign.webp?v=7ea845c9) center / 100% 100% no-repeat;
  font-size: calc(var(--sign-h) * 0.3); line-height: 1; white-space: nowrap; letter-spacing: 0.01em;
  filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.45));
}
@media (max-width: 900px){ .burrow__bar .screen__title{ --sign-h: clamp(46px, 7vh, 62px); } }
@media (orientation: landscape) and (max-height: 520px){ .burrow__bar .screen__title{ --sign-h: 48px; margin-block: -10px -6px; } }
@media (orientation: portrait) and (max-width: 900px){ .burrow__bar .screen__title{ --sign-h: clamp(56px, 7.5vh, 70px); margin-block: -10px -6px; } }
@media (orientation: portrait) and (max-width: 430px){ .burrow__bar .screen__title{ --sign-h: 46px; margin-right: 0; } .burrow__bar .nuggetpill{ font-size: 1rem; padding-left: 4px; } .burrow__bar .nuggetpill img{ width: 22px; height: 22px; } .burrow__plus{ width: 30px; height: 30px; } }
/* A short upright phone has no room for the sign: the title is for a screen reader only again. */
@media (orientation: portrait) and (max-width: 900px) and (max-height: 700px){
  .burrow__bar .screen__title{ position: absolute; display: block; width: 1px; height: 1px; aspect-ratio: auto; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); background: none; filter: none; white-space: nowrap; }
}

/* ---- Your Nuggets, with the "+" that opens the way to more. ---- */
.burrow__bar .nuggetpill{ gap: 6px; padding-right: 4px; border: 2px solid rgba(255, 255, 255, 0.22); background: rgba(10, 5, 34, 0.78); box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.4); }
.burrow__bar .nuggetpill b{ font-weight: 400; min-width: 2.4ch; text-align: right; }
.iconbtn--plus{ --bodyA: #b8ff6a; --bodyB: #5fd42a; --bodyC: #37a312; --ts: #1d5a06; --glow: rgba(55, 163, 18, 0.5); }
.burrow__plus{ width: 34px; height: 34px; border-radius: 11px; --rim: 3px; margin-left: 2px; }
.burrow__plus[hidden]{ display: none; }
.burrow__plus svg{ width: 20px; height: 20px; }

/* ---- Life: a crystal that breathes, a glow-worm drifting by, dust from the ceiling. Cheap sprites: a transform and an opacity. ---- */
.burrow__scene{ position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.burrow__crystal{ position: absolute; left: -1%; bottom: 7%; width: clamp(54px, 9vmin, 120px); opacity: 0.95; animation: burrow-breathe 5.5s ease-in-out infinite; }
.burrow__crystal img, .burrow__glowworm img{ display: block; width: 100%; height: auto; }
.burrow__crystal::before{
  content: ""; position: absolute; inset: -30% -40%; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(110, 200, 255, 0.55), rgba(110, 200, 255, 0));
}
.burrow__glowworm{ position: absolute; left: 0; bottom: 26%; width: clamp(34px, 6vmin, 72px); animation: burrow-drift 38s linear infinite; will-change: transform, opacity; }
.burrow__glowworm::before{
  content: ""; position: absolute; inset: -40%; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(220, 255, 90, 0.5), rgba(220, 255, 90, 0));
}
.burrow__dust{ position: absolute; top: -4%; left: 30%; width: 5px; height: 5px; border-radius: 50%; background: rgba(255, 220, 255, 0.8); opacity: 0; animation: burrow-dust 9s linear infinite; }
.burrow__dust--b{ left: 58%; animation-duration: 12s; animation-delay: 3s; width: 4px; height: 4px; }
.burrow__dust--c{ left: 77%; animation-duration: 10.5s; animation-delay: 6s; }
@keyframes burrow-breathe{ 0%, 100%{ transform: scale(1); opacity: 0.85; } 50%{ transform: scale(1.06); opacity: 1; } }
@keyframes burrow-drift{
  0%{ transform: translate3d(100vw, 0, 0); opacity: 0; } 6%{ opacity: 1; } 25%{ transform: translate3d(70vw, -22px, 0); } 50%{ transform: translate3d(42vw, 10px, 0); }
  75%{ transform: translate3d(16vw, -18px, 0); } 94%{ opacity: 1; } 100%{ transform: translate3d(-12vw, 0, 0); opacity: 0; }
}
@keyframes burrow-dust{ 0%{ transform: translate3d(0, 0, 0); opacity: 0; } 10%{ opacity: 0.9; } 100%{ transform: translate3d(14px, 70vh, 0); opacity: 0; } }
@media (prefers-reduced-motion: reduce){
  .burrow__crystal{ animation: none; }
  .burrow__glowworm, .burrow__dust{ display: none; }
}

/* ---- The stage: no panel, the chamber is the backdrop. ---- */
.showcase{ position: relative; background: linear-gradient(180deg, rgba(20, 10, 60, 0.62), rgba(12, 6, 40, 0.74)); border-color: rgba(255, 255, 255, 0.2); box-shadow: inset 0 0 28px color-mix(in srgb, var(--rarity) 35%, transparent), 0 0 0 2px rgba(10, 5, 34, 0.7); }
.burrow[data-catwalk] .showcase{
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: minmax(0, 1fr) auto; grid-template-areas: "stage stage" "foot heart";
  height: auto; row-gap: 4px; column-gap: 8px; padding: 4px 6px 6px; background: none; border: 0; box-shadow: none; border-radius: 0;
}
.burrow[data-catwalk] .showcase__stage{ --head: 0px; --pedestal: 0px; --ch: 100cqh; grid-area: stage; background: none; }
.burrow[data-catwalk] .showcase__stage::before, .burrow[data-catwalk] .showcase__light{ display: none; }
.burrow[data-catwalk] .showcase__banner, .burrow[data-catwalk] .showcase__action{ display: none; }
.burrow[data-catwalk] .showcase__heart{ grid-area: heart; align-self: center; justify-self: end; margin: 0; z-index: 2; }
.showcase__foot{ display: contents; }
.burrow[data-catwalk] .showcase__foot{ grid-area: foot; display: flex; align-items: center; gap: 12px; min-width: 0; padding-inline: 2px; }
.burrow[data-catwalk] .showcase__place{ flex: none; min-width: 5.5ch; text-align: left; text-shadow: 0 2px 0 #0d0626, 1px 0 0 #0d0626, -1px 0 0 #0d0626; }
.burrow[data-catwalk] .catwalk__scrub{ flex: 1 1 0; width: auto; min-width: 0; }
.burrow[data-catwalk] .catwalk__scrub::before{ background: rgba(8, 4, 28, 0.8); }

/* ---- The details: opened by a worm's "i", over the shelf. ---- */
.burrow[data-catwalk] .showcase__info{
  position: absolute; z-index: 6; left: 50%; top: 46%; transform: translate(-50%, -50%); width: min(calc(100% - 20px), 400px); max-height: calc(100% - 12px);
  display: none; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 8px; padding: 14px 16px 14px; overflow: hidden;
  border-radius: 20px; border: 3px solid var(--rarity); color: #fff;
  background: linear-gradient(180deg, rgba(48, 30, 120, 0.97), rgba(22, 12, 66, 0.98)); box-shadow: 0 0 0 2px #0d0626, 0 14px 34px rgba(0, 0, 0, 0.6), 0 0 26px color-mix(in srgb, var(--rarity) 45%, transparent);
}
.burrow[data-catwalk] .showcase[data-details] .showcase__info{ display: flex; }
.showcase__close{ position: absolute; top: 6px; right: 6px; width: 38px; height: 38px; border-radius: 12px; --rim: 3px; }
.showcase__close svg{ width: 20px; height: 20px; }
.burrow:not([data-catwalk]) .showcase__close{ display: none; }
.burrow[data-catwalk] .showcase__rarity{ margin: 0 40px 0 0; text-align: left; font-size: 1.15rem; color: var(--rarity); text-shadow: 0 2px 0 #0d0626, 1px 0 0 #0d0626, -1px 0 0 #0d0626; }
.burrow[data-catwalk] .showcase__route{ display: block; min-height: 0; margin: 0; text-align: left; font-size: 0.92rem; line-height: 1.3; overflow: visible; -webkit-line-clamp: unset; }
.burrow[data-catwalk] .showcase__route:empty{ display: none; }
.burrow[data-catwalk] .showcase__bar[data-off]{ display: none; }
.burrow[data-catwalk] .showcase__info > [data-burrow-get-nuggets], .burrow[data-catwalk] .showcase__info > [data-burrow-cash]{ align-self: flex-start; }
.burrow[data-catwalk] .burrow__count{ text-align: left; opacity: 0.8; }
.burrow[data-catwalk] .burrow__count:empty{ display: none; }

/* ---- The shelf: each worm on its own pedestal, a name plate over it, its price button under it. ---- */
.burrow[data-catwalk] .catwalk{ --sw: min(calc(var(--ch) * 0.5), calc((100cqw - 96px) / 2.66)); top: 0; height: var(--ch); }
@container (min-width: 860px){ .burrow[data-catwalk] .catwalk{ --sw: min(calc(var(--ch) * 0.5), calc((100cqw - 110px) / 4.2)); } }
.burrow[data-catwalk] .catwalk__nav{ top: calc(var(--ch) * 0.4 - 23px); }
.catwalk__slide{
  --plate-h: calc(var(--sw) * 0.3); --btn-h: clamp(34px, calc(var(--sw) * 0.2), 46px);
  --ped-h: calc(var(--sw) * 0.542); --ped-b: calc(var(--btn-h) + 8px);
}
.catwalk__slide::before{ display: none; }
.catwalk__slide::after{
  content: ""; position: absolute; left: 4%; right: 4%; bottom: calc(var(--ped-b) + var(--ped-h) * 0.18); height: calc(var(--ped-h) * 1.1); z-index: 0; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--rarity) 55%, transparent), transparent 100%);
}
/* The head (plate, tick or padlock, "i") is one piece that catwalk.ts keeps on one line along the top while the slide scales. */
.catwalk__head{ position: absolute; left: 0; right: 0; top: 0; height: calc(var(--plate-h) + 46px); z-index: 4; transform-origin: 50% 0; will-change: transform; pointer-events: none; }
.catwalk__head > .catwalk__info{ pointer-events: auto; }
.catwalk__plate{
  position: absolute; z-index: 3; left: 1%; right: 1%; top: 0; height: var(--plate-h); display: grid; place-items: center; box-sizing: border-box;
  padding: 0 2%; background: url(/ui/burrow-plate.webp?v=d16e6363) center / 100% 100% no-repeat; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.4));
}
.catwalk__name{
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; max-width: 100%; margin: 0; text-align: center; text-wrap: balance; overflow-wrap: anywhere;
  font-family: var(--font-label); font-weight: 400; font-size: clamp(0.72rem, calc(var(--sw) * 0.098), 1.2rem); line-height: 1.12; color: #fff; letter-spacing: -0.06em;   /* a long German name (Deutschland, Sonnenuntergang) stays whole on the smallest plate */
  --ts: #1a1150; -webkit-text-stroke: var(--lt-stroke) var(--ts); paint-order: stroke fill; stroke-linejoin: round; text-shadow: 0 var(--lt-drop) 0 var(--ts);
}
.catwalk__pedestal{
  position: absolute; z-index: 1; left: 0; right: 0; bottom: var(--ped-b); height: var(--ped-h); pointer-events: none;
  background: url(/ui/burrow-pedestal.webp?v=869f9737) center bottom / 100% 100% no-repeat; filter: drop-shadow(0 6px 5px rgba(0, 0, 0, 0.45));
}
/* A canvas is a replaced element: top and bottom alone leave it its own size, so its height is spelled out. */
.catwalk__art{ position: absolute; z-index: 2; left: calc(var(--pad, 0) * -100%); top: calc(var(--plate-h) + 2px); width: calc(100% * (1 + 2 * var(--pad, 0))); max-width: none; height: calc(100% - var(--plate-h) - 2px - var(--ped-b) - var(--ped-h) * 0.7); }
/* A slide is as tall as its worm needs, standing on the floor of the stage, not the whole height of it. */
.catwalk__slide{ height: min(100%, calc(var(--sw) * 2.9)); }
@container (max-width: 859px){ .catwalk__slide{ height: min(100%, calc(var(--sw) * 5.6)); } }
.catwalk__buy{
  position: absolute; z-index: 4; left: 50%; bottom: 0; transform: translateX(-50%); width: max-content; max-width: 100%; box-sizing: border-box;
  font-size: clamp(0.72rem, calc(var(--sw) * 0.105), 0.88rem); text-align: center; white-space: nowrap; padding-block: 8px 12px; padding-inline: 14px; min-width: min(4.4em, 100%);
}
/* "Best run 200k" is longer than a narrow slide: it wraps to two lines inside the pill rather than run out of it. */
.catwalk__slide .catwalk__buy[data-wrap]{ white-space: normal; text-wrap: balance; line-height: 1.15; }
.catwalk__buy svg{ width: 1.1em; height: 1.1em; flex: none; }
.catwalk__buy .nugamt__icon{ width: 1.1em; height: 1.1em; }
.catwalk__buy:disabled{ opacity: 1; filter: none; cursor: default; }
.catwalk__info{
  position: absolute; z-index: 4; right: 3%; top: calc(var(--plate-h) + 4px); width: clamp(28px, calc(var(--sw) * 0.22), 38px); height: clamp(28px, calc(var(--sw) * 0.22), 38px);
  border-radius: 50%; --rim: 3px; --bodyA: #8fd0ff; --bodyB: #2c8fd6; --bodyC: #1d6ba8; --ts: #0d3a66; --glow: rgba(29, 107, 168, 0.5);
  font-family: var(--font-label); font-size: clamp(0.9rem, calc(var(--sw) * 0.12), 1.25rem); line-height: 1; color: #fff;
}
/* The info button's "i": Overdrive sets every button italic and capitalised (0,2,0 selector, so this one is 0,3,0), where a lone "i" reads as "/" (Gray, 21 Nov 2026). Upright serif, lower case. */
.catwalk .catwalk__info.iconbtn{ font-family: Georgia, "Times New Roman", serif; font-style: normal; font-weight: 700; text-transform: none; letter-spacing: 0; font-size: clamp(1rem, calc(var(--sw) * 0.13), 1.35rem); }
.catwalk__badge{ left: 3%; right: auto; top: calc(var(--plate-h) + 6px); bottom: auto; margin: 0; z-index: 4; }

/* Very short screens (a phone on its side): the shelf is all height, so the plate and the pedestal take less. */
@media (max-height: 520px){
  .catwalk__slide{ --plate-h: calc(var(--sw) * 0.27); --btn-h: clamp(32px, calc(var(--sw) * 0.2), 40px); --ped-h: calc(var(--sw) * 0.46); }
  .burrow[data-catwalk] .showcase__info{ top: 50%; padding: 10px 12px; gap: 4px; }
  .burrow[data-catwalk] .showcase__route{ font-size: 0.8rem; line-height: 1.2; }
  .burrow[data-catwalk] .showcase__rarity{ font-size: 1rem; }
}
/* A phone on its side has the bar's width to share: the sign, the balance with its "+", the video offer, the tabs and Close all fit one row. */
@media (orientation: landscape) and (max-width: 900px){
  .burrow__bar .screen__title{ --sign-h: 34px; margin: -6px 0 -4px 0; }
  .burrow__bar .nuggetpill{ font-size: 0.95rem; padding-left: 3px; gap: 4px; }
  .burrow__bar .nuggetpill img{ width: 20px; height: 20px; }
  .burrow__plus{ width: 26px; height: 26px; border-radius: 9px; margin-left: 0; }
  .burrow__plus svg{ width: 15px; height: 15px; }
  /* One line (waiting, or done for today): the same height as the balance pill beside it, not a line taller (PAIR). */
  /* With the video offer on the bar the tabs' words are a little smaller: German "Meine Würmer" ran 3px out of its tab. */
  .screen .burrow__bar:has(.burrow__earn:not([hidden])) .burrow__tabs .button--tab .button__label{ font-size: clamp(0.72rem, 1.45vw, 0.95rem); }
  .burrow__bar .burrow__earn{ font-size: 0.72rem; letter-spacing: -0.02em; }   /* German "Nächstes Video in 1:12" took the tabs' room */
  [data-vibe] .burrow__bar .burrow__earn:has(small:empty){ height: 36px; min-height: 36px; padding-block: 0; }
}
/* The narrowest of them: no room for the sign (the tabs say where you are); the title is for a screen reader only. */
@media (orientation: landscape) and (max-width: 1000px){
  .burrow__bar .screen__title{ position: absolute; display: block; width: 1px; height: 1px; aspect-ratio: auto; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); background: none; filter: none; white-space: nowrap; }
  .burrow__bar .burrow__earn{ padding-inline: 6px; }
}

/* ==========================================================================================================
 * HAPPY HOUR (8 Nov 2026): the daily hour of 2x Nuggets. Its menu tile is the house tile (TIMED_TILES), its HUD marker
 * is ringed text in the score strip like everything beside it, and the results tile is the usual one in the Nugget gold.
 * ======================================================================================================== */
/* Before the hour the tile is only a clock: it takes no press (ui/happyHourTile.ts). */
.tile--happy[aria-disabled="true"], .tile--hunt[aria-disabled="true"]{ cursor: default; }
.hud__x2{
  font-family: var(--font-display); font-weight: 700; font-size: 0.72em; line-height: 1; color: #ffd84a;
  -webkit-text-stroke: 0.14em #3a2300; paint-order: stroke fill; stroke-linejoin: round; text-shadow: 0 0.08em 0 #3a2300;
}
.hud__x2[hidden]{ display: none; }
.death__stat--doubled b{ color: #ffd84a; }
.death__stat--doubled b i{ font-style: normal; font-size: 0.7em; opacity: 0.9; }

/* ==========================================================================================================
 * RESULTS SCREEN POLISH (8 Nov 2026): the death panel's own parts only (tiles, Nugget marker, killer line, revive clock,
 * entrance). The shared .panel / .button / top-bar rules are not touched here. Tiles take the buttons' language: solid dark
 * border, one shine band, a hard lip, crisp outlined lettering with one hard drop shadow, no blur.
 * ======================================================================================================== */
.panel--death .death__stat{
  position: relative; overflow: visible; border: 3px solid #160c4f;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0 34%, rgba(255, 255, 255, 0.08) 34% 100%), #3a2c9a;
  box-shadow: 0 4px 0 #160c4f;
  animation: deathTile 380ms cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
.panel--death .death__stat:nth-child(1){ animation-delay: 160ms; }
.panel--death .death__stat:nth-child(2){ animation-delay: 230ms; }
.panel--death .death__stat:nth-child(3){ animation-delay: 300ms; }
.panel--death .death__stat:nth-child(4){ animation-delay: 370ms; }
.panel--death .death__stat:nth-child(5){ animation-delay: 440ms; }
.panel--death .death__stat b{
  padding-bottom: 0.08em; color: #fff; -webkit-text-stroke: 0.16em #1b0431; paint-order: stroke fill; text-shadow: 0 0.08em 0 #1b0431;
}
.panel--death .death__stat small{
  font-family: var(--font-label); font-weight: 400; font-size: 0.74rem; letter-spacing: 0.04em;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; color: #d9d2ff; text-shadow: 0 2px 0 #160c4f;
}
/* Nuggets paying more than once (Happy Hour, Halloween Day): a gold tile with a tilted "x2" tag on its corner, off the number. */
.panel--death .death__stat--doubled{
  border-color: #6b3b00; box-shadow: 0 4px 0 #6b3b00;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.42) 0 34%, rgba(255, 255, 255, 0.1) 34% 100%), #d98a12;
}
.panel--death .death__stat--doubled small{ color: #fff3b0; text-shadow: 0 2px 0 #6b3b00; }
.panel--death .death__stat--doubled b i{
  position: absolute; top: -11px; right: -7px; rotate: 9deg; padding: 1px 7px 3px; border-radius: 999px;
  font: 400 0.92rem/1.1 var(--font-label); font-style: normal; opacity: 1; color: #fff;
  background: linear-gradient(180deg, #ff6fb8, #e0268f); border: 3px solid #6b0f48; box-shadow: 0 3px 0 #6b0f48;
  -webkit-text-stroke: 0.14em #6b0f48; paint-order: stroke fill; text-shadow: 0 0.08em 0 #6b0f48;
  animation: tile-pulse 1.3s ease-in-out infinite;
}
.panel--death .death__stat--doubled b{ color: #fff; }
/* What killed you: the plate in the game's lettering, long names wrap instead of widening it. */
.panel--death .death__cause{
  max-width: 100%; padding: 7px 16px 9px; border-radius: 18px; border: 3px solid #160c4f; box-shadow: 0 3px 0 #160c4f;
  background: #2a1d78; font-family: var(--font-display); font-weight: 600; font-size: 0.98rem; line-height: 1.25;
  color: #fff; text-shadow: 0 2px 0 #160c4f; overflow-wrap: anywhere;
}
.panel--death .revive__secs{ font-family: var(--font-label); font-weight: 400; color: #fff; text-shadow: 0 2px 0 #160c4f; }
/* The length lands with a bounce, then the tiles follow one by one. */
.panel--death .death__score{ animation: deathScore 520ms 90ms cubic-bezier(0.2, 1.5, 0.4, 1) both; }
@keyframes deathTile{ from{ opacity: 0; transform: translateY(14px) scale(0.85); } to{ opacity: 1; transform: none; } }
@keyframes deathScore{ from{ opacity: 0; transform: scale(0.6); } to{ opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce){
  .panel--death .death__stat, .panel--death .death__score, .panel--death .death__stat--doubled b i{ animation: none; }
}
@media (max-height: 420px) and (orientation: landscape){
  .panel--death .death__cause{ padding: 4px 14px 6px; font-size: 0.9rem; }
  .panel--death .death__stat small{ font-size: 0.68rem; }
}

/* ================================================================ Top players and Profile (polish-board, 8 Nov 2026)
 * The two screens in the house game style: every row a solid-bordered slab with a shine band and a hard lip, lettering
 * in Lilita One outlined in the slab's own dark edge with one hard drop (no blur, no glow), a podium that stands taller
 * than the crowd, rank numbers on a plate, each worm in its own dark lane, and rows that rise in once. CSS only.
 * Shared .panel / .button / top-bar rules are untouched; everything here is scoped to .screen--board and .screen--profile.
 */
:is(.screen--board, .screen--profile){ --edge: #1c1250; }
/* Outlined lettering: white fill, stroke painted under it, one hard drop. */
.screen--board :is(.ranks__name, .ranks__len, .ranks__rank, .ranks__level),
.screen--profile :is(.dossier__name, .statcard__label, .statcard__value, .podium__count, .trophy__name){
  -webkit-text-stroke: 0.16em var(--letters, var(--edge)); paint-order: stroke fill; stroke-linejoin: round;
  text-shadow: 0 0.08em 0 var(--letters, var(--edge));
}
.screen--board .ranks__name{ color: #fff; }
.screen--board .ranks__len{ color: #fff; letter-spacing: 0.01em; }
.screen--board .ranks__title{ -webkit-text-stroke: 0; text-shadow: 0 1px 0 var(--letters); }

/* The list: each row a slab on its own lip. */
.screen--board .ranks{ gap: 12px; padding-bottom: 4px; }
.screen--board .ranks__row{
  --rowA: #5a4cc4; --rowB: #3f3399; --letters: #1c1250;
  position: relative; border: 3px solid var(--letters); border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05)) 0 0 / 100% 46% no-repeat,
    linear-gradient(180deg, var(--rowA), var(--rowB));
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.2), inset 0 2px 0 rgba(255, 255, 255, 0.22), 0 4px 0 var(--letters);
  animation: board-rise 0.3s ease-out both;
}
.screen--board .ranks__row[data-medal="gold"]{ --rowA: #f5c23a; --rowB: #c98a0c; --letters: #5a3600; }
.screen--board .ranks__row[data-medal="silver"]{ --rowA: #c3d0e2; --rowB: #8294ae; --letters: #26334c; }
.screen--board .ranks__row[data-medal="bronze"]{ --rowA: #e59a5e; --rowB: #b0642a; --letters: #4a230e; }
.screen--board .ranks__row.is-me{ --rowA: #ff7cc4; --rowB: #d03d92; --letters: #5a0e3a; }
.screen--board .ranks__row[data-medal],
.screen--board .ranks__row.is-me{ border-color: var(--letters); }
.screen--board .ranks__row:nth-child(2){ animation-delay: 0.04s; }
.screen--board .ranks__row:nth-child(3){ animation-delay: 0.08s; }
.screen--board .ranks__row:nth-child(4){ animation-delay: 0.12s; }
.screen--board .ranks__row:nth-child(5){ animation-delay: 0.16s; }
.screen--board .ranks__row:nth-child(n+6){ animation-delay: 0.2s; }
@keyframes board-rise{ from{ opacity: 0; transform: translateY(10px); } to{ opacity: 1; transform: none; } }

/* The podium stands taller: gold the most, then silver, then bronze. */
@media (min-height: 501px){
  .screen--board .ranks__row[data-medal]{ min-height: 70px; }
  .screen--board .ranks__row[data-medal="gold"]{ min-height: 82px; }
  .screen--board .ranks__row[data-medal="gold"] :is(.ranks__name, .ranks__len){ font-size: 1.5rem; }
  .screen--board .ranks__row[data-medal="gold"] .ranks__rank img{ width: 64px; height: 64px; }
}
/* A number below the podium sits on a plate; a cup stands on its own. */
.screen--board .ranks__rank:not(:has(img)){
  justify-self: center; width: 40px; height: 40px; border-radius: 50%; color: #fff; font-size: 1.15rem;
  background: rgba(16, 8, 52, 0.5); box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.3), 0 2px 0 rgba(255, 255, 255, 0.14);
  -webkit-text-stroke-width: 0.12em;
}
.screen--board .ranks__rank img{ filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.35)); }
.screen--board .ranks__level{ filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.35)); -webkit-text-stroke-width: 0.12em; }
/* Each worm in its own dark lane. */
.screen--board .ranks__worm{
  border-radius: 999px; background: rgba(16, 8, 52, 0.38);
  box-shadow: inset 0 3px 0 rgba(0, 0, 0, 0.3), 0 2px 0 rgba(255, 255, 255, 0.12);
}
/* Your own place, pinned: a ledge with a hard edge, then your row. */
.screen--board .ranks__me{
  background: linear-gradient(180deg, #30257f, #231a66); border-top: 4px solid var(--edge);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.12);
  padding-bottom: 18px;
}
.screen--board .ranks__none{
  color: #fff; font-family: var(--font-label); font-weight: 400; letter-spacing: 0.01em;
  -webkit-text-stroke: 0.14em var(--edge); paint-order: stroke fill; text-shadow: 0 0.07em 0 var(--edge);
}
/* Loading and empty are states, not footnotes: a plate in the middle of the list. */
.screen--board .screen__note:not([hidden]){
  display: grid; place-items: center; min-height: 64px; margin: 4px 0 12px; padding: 12px 16px; text-align: center;
  border: 3px dashed rgba(255, 255, 255, 0.28); border-radius: 18px; background: rgba(16, 8, 52, 0.3);
  font-family: var(--font-label); font-size: 1.15rem; color: #fff; letter-spacing: 0.01em;
  -webkit-text-stroke: 0.14em var(--edge); paint-order: stroke fill; text-shadow: 0 0.07em 0 var(--edge);
}
.screen--board .screen__note[data-state="loading"]{ animation: board-pulse 0.9s ease-in-out infinite alternate; }
@keyframes board-pulse{ from{ opacity: 0.55; } to{ opacity: 1; } }

/* Phones: a smaller plate; a short, wide screen keeps its slim rows. */
@media (max-width: 480px){
  .screen--board .ranks{ gap: 10px; }
  /* The 3px border takes width from the name: the row gives it back in padding and gaps. */
  .screen--board .ranks__row{ grid-template-columns: 34px 32px minmax(0, 1fr) auto; gap: 6px; padding: 4px 8px 4px 4px; }
  .screen--board .ranks__level{ width: 32px; height: 32px; font-size: max(12.5px, calc(0.85rem * var(--lvk, 1))); }
  .screen--board .ranks__rank:not(:has(img)){ width: 30px; height: 30px; font-size: 0.95rem; }
  .screen--board .ranks__rank img,
  .screen--board .ranks__row[data-medal="gold"] .ranks__rank img{ width: 36px; height: 36px; }
  .screen--board .ranks__row[data-medal="gold"] :is(.ranks__name, .ranks__len){ font-size: 1.15rem; }
}
@media (orientation: landscape) and (max-height: 500px){
  .screen--board .ranks{ gap: 9px; }
  .screen--board .ranks__rank:not(:has(img)){ width: 30px; height: 30px; font-size: 0.95rem; }
  .screen--board .screen__note:not([hidden]){ min-height: 44px; padding: 6px 12px; font-size: 1rem; }
}

/* Profile: the same slab. Your card, your six numbers and the podium all get the hard edge and lip. */
.screen--profile .savebadge{
  border: 3px solid var(--edge); border-radius: 18px; background: rgba(16, 8, 52, 0.45);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.1), 0 3px 0 var(--edge);
  font-family: var(--font-label); color: #fff;
}
.screen--profile .dossier__me{
  border: 3px solid var(--edge); border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04)) 0 0 / 100% 22% no-repeat,
    linear-gradient(180deg, #5446c6, #3b2f8f);
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.22), inset 0 2px 0 rgba(255, 255, 255, 0.22), 0 5px 0 var(--edge);
}
.screen--profile .dossier__avatar{ border-color: #fff; box-shadow: 0 0 0 3px var(--edge), 0 8px 0 -1px var(--edge); }
.screen--profile .statcard{
  --letters: #231566; border-color: var(--edge);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.06)) 0 0 / 100% 40% no-repeat,
    linear-gradient(180deg, #7d8cff, #5a6ae6);
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.18), inset 0 2px 0 rgba(255, 255, 255, 0.3), 0 5px 0 var(--edge);
}
.screen--profile .statcard__label{ color: #ffe45c; -webkit-text-stroke-width: 0.14em; }
.screen--profile .statcard__value{ color: #fff; }
.screen--profile .podium__step{ border-color: var(--edge); box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.2), inset 0 3px 0 rgba(255, 255, 255, 0.45), 0 5px 0 var(--edge); }
.screen--profile .podium__count{ color: #fff; }
.screen--profile .trophy{ border-color: var(--edge); box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.2), inset 0 2px 0 rgba(255, 255, 255, 0.18), 0 4px 0 var(--edge); }
.screen--profile .trophy[data-tier="bronze"]{ border-color: #f2a36b; box-shadow: 0 0 0 3px var(--edge), inset 0 -5px 0 rgba(0, 0, 0, 0.2), 0 6px 0 var(--edge); }
.screen--profile .trophy[data-tier="silver"]{ border-color: #e3ecf7; box-shadow: 0 0 0 3px var(--edge), inset 0 -5px 0 rgba(0, 0, 0, 0.2), 0 6px 0 var(--edge); }
.screen--profile .trophy[data-tier="gold"]{ border-color: #ffd24a; box-shadow: 0 0 0 3px var(--edge), inset 0 -5px 0 rgba(0, 0, 0, 0.2), 0 6px 0 var(--edge); }
.screen--profile .trophy.is-ready{ border-color: #c6f432; }
.screen--profile .trophy__name{ color: #ffe45c; -webkit-text-stroke-width: 0.12em; }
/* A wide screen is tall enough for the card only if the avatar and the numbers give a little (it scrolled by a sliver). */
@media (min-width: 900px){
  .screen--profile .dossier__avatar{ width: 110px; height: 110px; }
  .screen--profile .dossier__me{ gap: 8px; padding-block: 14px 16px; }
  .screen--profile .statcard{ min-height: 138px; }
}
@media (prefers-reduced-motion: reduce){
  .screen--board .ranks__row{ animation: none; }
  .screen--board .screen__note[data-state="loading"]{ animation: none; }
}

/* ==========================================================================================================
 * MORE, SETTINGS AND PLAY WITH FRIENDS (8 Nov 2026): the same game-button language as the Burrow and the buttons pass
 * (solid dark border, one shine band, a hard lip, outlined lettering with one hard drop, no blur), so these screens stop
 * reading as a web page of links and form rows.
 *   - More: each row is a chunky plate with a chevron; the rows that are on or off carry a real switch with a lip.
 *     Group names are small gold ribbons at the reading floor, not 10px caps.
 *   - Settings: the cards are plates, the switches are lipped pills, key caps and tile captions keep the reading floor,
 *     the volume steps are full-size buttons.
 *   - Play with friends: the extra-worms count sits in a plate, the code is one big plate, the members are plates.
 * Only this section changes them; the shared panel, button and top-bar rules above are untouched.
 * ======================================================================================================== */
.menu__menupanel{
  --pl-ink: #0d0f2e; --pl-a: #4a4f8f; --pl-b: #2e3270; --pl-c: #232766;
  padding: 10px 12px 14px; border: 3px solid var(--pl-ink); border-radius: 22px;
  background: linear-gradient(180deg, #353a82, #1f2360);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.22), 0 5px 0 var(--pl-ink), 0 14px 22px -10px rgba(0, 0, 0, 0.5);
  scroll-padding-block: 8px;
}
.menu__menupanel .navmenu__group{
  margin: 14px 4px 6px; font-family: var(--font-label); font-weight: 400;
  font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: #ffd978;
  -webkit-text-stroke: 0.14em var(--pl-ink); paint-order: stroke fill; text-shadow: 0 0.08em 0 var(--pl-ink);
}
.menu__menupanel .navmenu__group:first-child{ margin-top: 2px; }
.menu__menupanel ul{ gap: 4px; }
.menu__menupanel .navmenu__sound, .menu__menupanel :where(a){
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 44px; padding: 8px 14px 10px; border: 2px solid var(--pl-ink); border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04)) 0 0 / 100% 46% no-repeat,
    linear-gradient(180deg, var(--pl-a), var(--pl-b) 60%, var(--pl-c));
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.22), inset 0 2px 0 rgba(255, 255, 255, 0.18), 0 3px 0 var(--pl-ink);
  font-family: var(--font-label); font-weight: 400; font-size: 1rem; line-height: 1.2;
  letter-spacing: 0.02em; text-align: left; text-decoration: none; overflow-wrap: break-word; hyphens: manual;
  color: #fff; -webkit-text-stroke: 0.13em var(--pl-ink); paint-order: stroke fill; stroke-linejoin: round;
  text-shadow: 0 0.07em 0 var(--pl-ink);
}
.menu__menupanel .navmenu__sound:active:not(:disabled), .menu__menupanel :where(a):active{
  transform: translateY(2px);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.22), inset 0 2px 0 rgba(255, 255, 255, 0.12), 0 1px 0 var(--pl-ink);
}
@media (hover: hover){
  .menu__menupanel .navmenu__sound:hover:not(:disabled), .menu__menupanel :where(a):hover{ filter: brightness(1.1); color: #fff; }
}
/* A row that goes somewhere carries a chevron drawn in CSS. */
.menu__menupanel .navmenu__sound:not(.navmenu__switch)::after, .menu__menupanel :where(a)::after{
  content: ""; flex: none; width: 9px; height: 9px; margin-right: 3px;
  border: solid #ffd978; border-width: 0 3px 3px 0; rotate: -45deg; filter: drop-shadow(0 1.5px 0 var(--pl-ink));
}
/* A row that is on or off: a lipped switch, lime when on, slate when off (the words stay put). */
.menu__menupanel .navmenu__switch::after{
  width: 46px; height: 26px; border: 2px solid var(--pl-ink); border-radius: 999px;
  background: radial-gradient(circle at 13px 50%, #e9ecf6 9px, transparent 9.5px), linear-gradient(180deg, #5b6080, #3a3e5e);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.25), 0 2px 0 var(--pl-ink);
}
.menu__menupanel .navmenu__switch[aria-pressed="true"]{ color: #fff; }
.menu__menupanel .navmenu__switch[aria-pressed="true"]::after{
  border-color: var(--pl-ink);
  background: radial-gradient(circle at 33px 50%, #fff 9px, transparent 9.5px), linear-gradient(180deg, #aee66b, #5fb92f 60%, #44921c);
}
.menu__menupanel .navmenu__switch[aria-pressed="false"]{ color: rgba(255, 255, 255, 0.78); }
@media (orientation: landscape) and (max-height: 500px){
  .menu__menupanel .navmenu__sound, .menu__menupanel :where(a){ min-height: 40px; padding-block: 6px 8px; }
  .menu__menupanel ul{ gap: 5px; }
}

/* ---- Settings */
.screen__card{
  border: 3px solid #0d0f2e; border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.05));
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.16), 0 3px 0 #0d0f2e;
}
.screen__card--switches{ gap: 0; padding: 4px 14px 6px; }
.screen__switchrow + .screen__switchrow{ border-top: 2px solid rgba(13, 15, 46, 0.45); }
.screen__heading{
  display: flex; align-items: center; gap: 8px; color: #fff; -webkit-text-stroke: 0.13em #0d0f2e; paint-order: stroke fill;
  text-shadow: 0 0.07em 0 #0d0f2e;
}
.screen__heading::before{ content: ""; flex: none; width: 10px; height: 10px; rotate: 45deg; border: 2px solid #0d0f2e; background: #ffd978; box-shadow: 0 2px 0 #0d0f2e; }
.screen__note{ padding: 8px 12px; border-radius: 12px; background: rgba(13, 15, 46, 0.28); font-size: 0.85rem; line-height: 1.35; }
.screen__switchrow .switch__track{
  width: 50px; height: 28px; border: 2px solid #0d0f2e; border-radius: 999px; box-sizing: border-box;
  background: linear-gradient(180deg, #5b6080, #3a3e5e); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.25), 0 2px 0 #0d0f2e;
}
.screen__switchrow .switch__knob{ width: 18px; height: 18px; margin: 3px; background: #e9ecf6; box-shadow: 0 1.5px 0 rgba(13, 15, 46, 0.55); }
.screen__switchrow .switch[aria-pressed="true"] .switch__track{ background: linear-gradient(180deg, #aee66b, #5fb92f 60%, #44921c); border-color: #0d0f2e; }
.screen__switchrow .switch[aria-pressed="true"] .switch__knob{ transform: translateX(22px); background: #fff; }
/* The volume steps and the extra-worms steps are full-size buttons whose sign has room all round (it sat in a 25px box). */
.button--step, [data-vibe] .button.button--step{
  display: inline-grid; place-items: center; width: 44px; height: 44px; min-height: 44px; padding: 0;
  font-size: 1.35rem; line-height: 1;
}
/* Tile captions and key caps keep the reading floor; a word is never split across two lines. */
.station__desc, .station--tile .station__desc, .choices .station__desc{ font-size: 0.75rem; hyphens: none; overflow-wrap: break-word; }
@media (max-width: 760px), (orientation: landscape) and (max-height: 500px){
  .station--tile .station__desc{ font-size: 0.75rem; }
}
.station__name{ hyphens: none; overflow-wrap: break-word; }
.keys kbd, .menu__keys kbd, .keys--compact kbd{ font-size: 0.75rem; }

/* ---- Play with friends */
.lobby__switchrow{
  padding: 8px 12px; border: 3px solid #0d0f2e; border-radius: 16px; margin: 12px 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.05));
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.16), 0 3px 0 #0d0f2e;
}
.lobby__switchlabel{
  font-family: var(--font-label); font-size: 1.05rem; color: #fff;
  -webkit-text-stroke: 0.13em #0d0f2e; paint-order: stroke fill; text-shadow: 0 0.07em 0 #0d0f2e;
}
.lobby__countvalue{ -webkit-text-stroke: 0.1em #0d0f2e; paint-order: stroke fill; text-shadow: 0 0.07em 0 #0d0f2e; }
.lobby__join > .menu__field, .lobby__join > .button{ --h: 44px; height: 44px; min-height: 44px; box-sizing: border-box; }
.panel--lobby .panel__display--code{
  padding: 6px 22px 10px; border: 3px solid #0d0f2e; border-radius: 18px; -webkit-text-stroke-color: #0d0f2e;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05)), #20245f;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.25), 0 4px 0 #0d0f2e;
}
.panel--lobby .panel__list{ display: grid; gap: 6px; margin-bottom: 12px; }
.panel--lobby .panel__list :where(li){
  margin: 0; padding: 7px 14px 9px; border: 2px solid #0d0f2e; border-radius: 14px; color: #fff;
  font-family: var(--font-label); font-size: 1rem; overflow-wrap: anywhere;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05)); box-shadow: 0 3px 0 #0d0f2e;
}
.panel--lobby .share__label{ margin-top: 12px; font-family: var(--font-label); font-size: 0.8rem; font-weight: 400; color: #ffd978; }
/* A phone on its side has the height of a letterbox: the account's cards trim their air so the pane fits without a sliver of scroll. */
@media (orientation: landscape) and (max-height: 500px){
  .screen__pane[data-screen-pane="account"] .screen__side{ gap: 8px; }
  .screen__pane[data-screen-pane="account"] .screen__card{ padding: 10px 12px; gap: 8px; }
}

/* ==========================================================================================================
 * EVENTS, DAILY GIFT AND DAILY WHEEL: the game look (8 Nov 2026, Gray: every screen a real mobile game).
 * Covers the front screen's timed tiles, the event screen, the weekly race screen, the daily gift and the wheel.
 * Lettering is white with a crisp outline and one hard drop shadow; cards have a solid dark border and a hard lip;
 * nothing blurs or glows. Everything that moves is a transform or an opacity, and stops for reduced motion.
 * ======================================================================================================== */

/* Every timed tile's countdown reads at the house minimum, wherever the tile is. */
.menu .menu__tile .tile__badge{ font-size: max(0.72rem, calc(var(--t) * 0.13)); }


/* ---------------------------------------------------------------------------------------------------------- */
/* The daily gift: fourteen BIG cards on one strip that swipes sideways, today's centred on opening (Gray, 10 Nov 2026,
   with Worms Zone's Daily Rewards: "not readable on small devices, make a better version of this scrollable"). Every
   size is one number, --dw (a card's width, from the window), so there are no per-phone patches: the old grid shrank
   all fourteen onto the screen and needed seven media queries to do it, and still read tiny.
   Each card is a game card on a LIGHT face with a dark rim, so it stands off the purple panel: a ribbon with the day,
   the picture, what it pays as dark chips with white numbers, and a foot that says its state: a green tick (collected),
   the Collect button (today), a padlock (to come; the next one with its countdown). Today's is gold, wider, lifted and
   breathing; collected days are greyed blue; the two big days are pale gold. The swipe is the strip's own and never the
   page's (touch-action, overscroll-behavior): in a portal's frame a sideways row used to fight the page and shake. */
.panel--daily{ width: min(1040px, 100%); text-align: center; --dw: clamp(100px, min(34vw, 36vh), 172px); }
.panel--daily .daily{
  list-style: none; margin: 0 -10px 6px; padding: 14px 26px 16px; display: flex; align-items: center; gap: calc(var(--dw) * 0.09);
  overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; scroll-padding-inline: 26px;
  overscroll-behavior: contain; touch-action: pan-x; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 22px, #000 calc(100% - 22px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 22px, #000 calc(100% - 22px), transparent);
}
.panel--daily .daily::-webkit-scrollbar{ display: none; }
.panel--daily .daily__day{
  --card-a: #f6f2ff; --card-b: #cdc2fa; --card-line: #1c1355; --ribbon-a: #5a43d4; --ribbon-b: #3b2799;
  position: relative; flex: 0 0 var(--dw); height: calc(var(--dw) * 1.42); scroll-snap-align: center;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; justify-items: center; gap: calc(var(--dw) * 0.035);
  padding: 0 4px calc(var(--dw) * 0.06); overflow: hidden; font-size: calc(var(--dw) * 0.1);
  border: 3px solid var(--card-line); border-radius: calc(var(--dw) * 0.12);
  background: radial-gradient(ellipse 80% 50% at 50% 50%, rgba(255, 255, 255, 0.85), transparent 72%), linear-gradient(180deg, var(--card-a), var(--card-b));
  box-shadow: inset 0 -4px 0 rgba(28, 19, 85, 0.12), 0 4px 0 var(--card-line), 0 0 0 2px rgba(255, 255, 255, 0.28);
}
.panel--daily .daily__day.is-big{ flex-basis: calc(var(--dw) * 1.4); }
.panel--daily .daily__day.is-big{ --card-a: #fff6d6; --card-b: #ffd77f; --card-line: #5c2c02; --ribbon-a: #b86a00; --ribbon-b: #8a4800; }
.panel--daily .daily__day.is-done{ --card-a: #d3daee; --card-b: #a3b2d8; --card-line: #1f2d63; --ribbon-a: #566da6; --ribbon-b: #3f5690; }
.panel--daily .daily__day.is-done .daily__art{ filter: saturate(0.5) brightness(0.92) drop-shadow(0 3px 0 rgba(10, 8, 40, 0.25)); opacity: 0.75; }
.panel--daily .daily__day.is-today{
  --card-a: #ffe25a; --card-b: #ff9f1c; --card-line: #5c2c02; --ribbon-a: #e5480a; --ribbon-b: #b52f00;
  flex-basis: calc(var(--dw) * 1.3); height: calc(var(--dw) * 1.56); z-index: 1;
  box-shadow: inset 0 -4px 0 rgba(92, 44, 2, 0.15), 0 4px 0 #5c2c02, 0 0 0 4px #fff, 0 0 0 7px #5c2c02;
}
.panel--daily .daily__day.is-today::after{
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  box-shadow: inset 0 0 0 4px #fff; animation: dg-today 1.4s ease-in-out infinite;
}
@keyframes dg-today{ 50%{ opacity: 0.85; } }
/* Rays turning slowly behind today's gift: Worms Zone's emphasis on the card to open (a rotating ray sprite and a shine).
   ONE mechanism: the front screen's icons that are ready (--rays-d wide, centred --rays-y down) use this same rule and keyframes. */
.panel--daily .daily__day.is-today::before,
html:not([data-vibe="garden"]) .menu .menu__side .menu__tile:is([data-ready], :has(> .iconbtn__dot:not([hidden])))::before{
  content: ""; position: absolute; left: 50%; top: var(--rays-y, 44%); width: var(--rays-d, calc(var(--dw) * 1.5)); aspect-ratio: 1; translate: -50% -50%;
  pointer-events: none; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0 14%, transparent 52%), repeating-conic-gradient(rgba(255, 255, 255, 0.5) 0 9deg, transparent 9deg 30deg);
  -webkit-mask-image: radial-gradient(circle, #000 30%, transparent 68%); mask-image: radial-gradient(circle, #000 30%, transparent 68%);
  animation: dg-rays 9s linear infinite;
}
.panel--daily .daily__day.is-today > *, html:not([data-vibe="garden"]) .menu .menu__side .menu__tile > *{ position: relative; }
@keyframes dg-rays{ to{ rotate: 1turn; } }
/* The ribbon with the day, a solid band edge to edge over the top of the card: white lettering (5:1 or better). */
.panel--daily .daily__label{
  justify-self: stretch; margin: 0 -4px; padding: 0.18em 2px 0.24em; border-bottom: 3px solid var(--card-line);
  background: linear-gradient(180deg, var(--ribbon-a), var(--ribbon-b));
  font-family: var(--font-label); font-weight: 400; font-size: max(0.95rem, 1.6em); color: #fff; line-height: 1.1;
  -webkit-text-stroke: 0.2em var(--card-line); paint-order: stroke fill; text-shadow: 0 0.1em 0 var(--card-line);
}
.panel--daily .daily__art{
  width: auto; height: 100%; max-width: 92%; min-height: 0; align-self: center; object-fit: contain;
  filter: drop-shadow(0 4px 0 rgba(28, 19, 85, 0.22));
}
/* Today's picture bobs (Worms Zone's open-me idle: a slow lift and settle). */
.panel--daily .daily__day.is-today .daily__art{ animation: dg-bob 1.8s ease-in-out infinite; }
@keyframes dg-bob{ 50%{ translate: 0 -5%; scale: 1.04; } }
/* What it pays: a solid dark chip each, picture and number, white on near-black blue (15:1), ringed so it reads on any card. */
.panel--daily .daily__gets{ display: flex; flex-wrap: wrap; justify-content: center; gap: 3px 4px; font-size: max(0.8rem, 1.3em); font-variant-numeric: tabular-nums; }
.panel--daily .daily__gets :where(span){
  display: inline-flex; align-items: center; gap: 2px; padding: 0 0.45em 0.06em 0.12em; border-radius: 999px; background: #170d4a; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.4);
  font-family: var(--font-label); font-weight: 400; line-height: 1.35; color: #fff; text-shadow: 0 0.1em 0 rgba(0, 0, 0, 0.45);
}
.panel--daily .daily__gets img{ width: 1.25em; height: 1.25em; }
/* The foot: one row, the same height on every card, so the strip lines up. */
.panel--daily .daily__foot{ display: grid; place-items: center; min-height: max(30px, 2.7em); width: 100%; }
.panel--daily .daily__mark{
  display: grid; place-items: center; width: max(26px, 2.5em); height: max(26px, 2.5em); border-radius: 50%; border: 3px solid #fff;
  background: linear-gradient(180deg, #8fe34a, #3da318); box-shadow: 0 2px 0 #1b4709; color: #fff; font-weight: 900; font-size: max(0.95rem, 1.5em); line-height: 1; text-shadow: 0 1px 0 #1b4709;
}
.panel--daily .daily__lock{ display: inline-flex; align-items: center; gap: 4px; color: var(--card-line); font-family: "Lilita One", var(--font-display); font-weight: 400; font-size: max(0.8rem, 1.2em); }
.panel--daily .daily__lock svg{ width: max(20px, 1.9em); height: max(20px, 1.9em); }
.panel--daily .daily__lock.is-next{ padding: 0.1em 0.6em 0.15em 0.3em; border-radius: 999px; background: #170d4a; color: #fff; }
/* Collect sits on today's card, as Worms Zone's Take does: the one thing to press. */
.panel--daily .daily__foot [data-daily-claim]{ width: 90%; min-height: 0; --h: max(34px, 2.9em); height: var(--h); padding: 0 6px 2px; font-size: max(0.95rem, 1.45em); }
.panel--daily .daily__foot [data-daily-claim]:not([hidden]){ animation: dg-ready 1.3s ease-in-out infinite; }
@keyframes dg-ready{ 50%{ scale: 1.05; } }
.panel--daily .panel__actions{ margin-top: 4px; grid-template-columns: minmax(0, 220px); justify-content: center; }
/* The note under the strip: a chip, like the wheel's. */
.panel--daily .panel__note{ margin: 0; }
.panel--daily .panel__note:not(:empty){
  justify-self: center; width: max-content; max-width: 100%; margin-inline: auto; padding: 3px 18px 5px; border-radius: 999px;
  background: rgba(14, 8, 48, 0.55); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.2);
  font-family: var(--font-label); font-weight: 400; font-size: 1.05rem; color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.4);
}
.panel--daily .panel__title{ margin: 0; }
.panel--daily .panel__sub{ margin: 0 0 2px; }
/* A short window (a phone on its side, a portal's frame): the line under the title goes, the cards keep their size. */
@media (max-height: 420px){
  .panel--daily{ padding-top: 6px; padding-bottom: 8px; }
  .panel--daily .panel__sub{ display: none; }
  .panel--daily .daily{ padding-top: 10px; padding-bottom: 12px; }
}

/* ---------------------------------------------------------------------------------------------------------- */
/* The event screen: its working rows are lettering like everything else, and a quest shows how far along it is. */
.screen--event .eventtask{
  position: relative; overflow: hidden; padding-bottom: 12px; font-family: var(--font-label); font-size: 1rem; color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
  border: 2px solid rgba(255, 255, 255, 0.1);
}
.screen--event .eventtask::after{
  content: ""; position: absolute; left: 10px; right: 10px; bottom: 4px; height: 5px; border-radius: 999px;
  background: linear-gradient(90deg, #ffd27a, #ff9f1c) 0 0 / calc(var(--p, 0) * 100%) 100% no-repeat, rgba(255, 255, 255, 0.14);
}
.screen--event .eventtask.is-done{ border-color: rgba(198, 244, 50, 0.6); }
.screen--event .eventtask.is-done::after{ background: #c6f432; }
.screen--event .eventtask__state{ font-family: inherit; font-weight: 400; }
/* A worm's name never breaks in the middle of a word. */
.screen--event .eventstep__name, .screen--event .eventearn li{ overflow-wrap: break-word; hyphens: manual; }
@media (prefers-reduced-motion: reduce){
  .panel--daily .daily__day.is-today::after, .panel--daily .daily__day.is-today::before, .menu .menu__side .menu__tile::before, .panel--daily [data-daily-claim], .panel--daily .daily__day.is-today .daily__art{ animation: none; }
}

/* The title and the line under it, as lettering (the daily gift and the advent calendar share it). */
.panel--daily .panel__title, .panel--advent .panel__title{
  font-family: var(--font-label); font-weight: 400; font-size: clamp(1.5rem, min(6vw, 8vh), 2.6rem); color: #ffe45c;
  -webkit-text-stroke: 0.2em #35187f; paint-order: stroke fill; text-shadow: 0 0.08em 0 #35187f;
}
.panel--daily .panel__sub, .panel--advent .panel__sub{ font-family: var(--font-label); font-size: 1.05rem; color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.4); }

/* ---------------------------------------------------------------------------------------------------------- */
/* The daily wheel: the level bonus rungs are game chips (solid border, hard lip, lettered), and yours is ringed, not lit. */
.wheel__meter{ box-shadow: 0 5px 0 rgba(10, 4, 40, 0.55); }
.wheel__step{
  border: 2px solid rgba(10, 4, 40, 0.55); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.14), 0 3px 0 rgba(10, 4, 40, 0.55);
  font-family: var(--font-label); font-weight: 400; text-shadow: 0 2px 0 var(--wh-ink);
}
.wheel__step.is-yours{ border-color: #7a3d00; box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5), 0 0 0 3px #fff, 0 6px 0 3px #7a3d00; text-shadow: none; }

/* ---------------------------------------------------------------------------------------------------------- */
/* The event and race screens: every card has the hard lip under it, and the section headings are lettering with the
   crisp outline and one drop shadow, not plain bold text. */
.screen--event :is(.eventearn li, .eventstep, .eventprize, .eventrider, .eventtask),
.screen--mini :is(.ministop, .eventtask){
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.1), 0 3px 0 rgba(8, 4, 34, 0.7);
}
.screen--event .ranks--event .ranks__row, .screen--mini .ranks--event .ranks__row{ box-shadow: 0 3px 0 rgba(8, 4, 34, 0.7); }
.screen--event .eventpage .screen__heading, .screen--mini .minipage .screen__heading{
  font-size: 1.35rem; color: #fff; -webkit-text-stroke: 0.2em #1b1050; paint-order: stroke fill; text-shadow: 0 0.1em 0 #1b1050;
}
/* The race's boost strip: solid border and lip like a button, not a white outline. */
.screen--mini .miniboost{ border: 3px solid #1b1050; box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35), 0 4px 0 #1b1050; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35); }
.screen--mini .miniboost b{ -webkit-text-stroke: 0.14em #1b1050; paint-order: stroke fill; }
/* The results line "You came #22 ..." and the race's standing line read as a lettered chip. */
.screen--event .dayresults__you, .screen--mini :is(.minime__gap, .minime__place){ text-wrap: balance; }

/* Event and race rows: a long name wraps on its own lines (never an ellipsis), with the house line spacing, and the
   small lines keep the house minimum size. */
.screen--event .ranks--event .ranks__name, .screen--mini .ranks--event .ranks__name{ line-height: 1.25; font-size: clamp(0.85rem, 3.4vw, 1.05rem); }
.screen--event .eventstep__togo{ font-size: max(0.72rem, min(3vw, 0.78rem)); }
@media (orientation: landscape) and (max-height: 500px){
  .screen--event .ranks--event .ranks__name{ font-size: 0.74rem; }
  .screen--event .ranks--event .ranks__row{ gap: 5px; padding-right: 8px; }
  .screen--event .ranks--event .ranks__len{ font-size: 0.95rem; }
}


/* ==========================================================================================================
 * THE FRONT SCREEN'S ROOM (Gray, 8 Nov 2026: "make play and play with friends smaller on mobile to fit more stuff, and on
 * desktop use free space, it ain't gotta just be on the sides").
 *
 *   - A phone: the name, Play and Play with friends are a step shorter (Play is still the biggest thing on the screen), and the
 *     room that gives goes to what was squeezed: held sideways the timed tiles are whole tiles again (picture, name,
 *     countdown) in two columns, not thin strips; held upright the two pickers are taller.
 *   - A desktop or tablet: your worm, your floor and The Burrow (left) and name, Play and friends (middle) are ONE block in the
 *     middle of the screen, and the timed tiles are a row under that block, in the middle too, not a column on the far right
 *     edge. The block is centred, so the margins either side are equal.
 * ======================================================================================================== */

/* ---- A phone upright: shorter pills, taller pickers. */
@media (orientation: portrait) and (max-width: 520px){
  :is([data-vibe="classic"], [data-vibe="garden"]) .menu__play{ --h: clamp(46px, 7.4vh, 62px); }
  :is([data-vibe="classic"], [data-vibe="garden"]) .menu__friends{ --h: clamp(34px, 5.2vh, 44px); }
  :is([data-vibe="classic"], [data-vibe="garden"]) .menu__field{ --h: clamp(36px, 5.6vh, 46px); }
  .menu__start{ gap: clamp(10px, 1.7vh, 14px); }
}
@media (orientation: portrait) and (max-width: 520px) and (min-height: 701px){
  [data-vibe="classic"] .menu .pickcard{ --ch: clamp(92px, 17.5vh, 160px); }
}

/* ---- A phone held sideways: shorter pills. */
@media (orientation: landscape) and (max-height: 500px){
  :is([data-vibe="classic"], [data-vibe="garden"]) .menu__play{ --h: clamp(38px, 10.4vh, 50px); }
  :is([data-vibe="classic"], [data-vibe="garden"]) .menu__friends{ --h: clamp(32px, 7.8vh, 38px); }
  :is([data-vibe="classic"], [data-vibe="garden"]) .menu__field{ --h: clamp(32px, 7.6vh, 38px); }
}

/* ---- The Events button where the column of icons was, and its pop-up (gameShell.ts data-events-modal), the same pop-up the garden theme uses. It
   is what a phone on its side with the browser's bars showing (360px tall or less) gets, and a narrow phone on its side with four or more things on
   (no room for two columns of icons). A taller phone, a tablet and a desktop show the icons themselves ("THE FRONT SCREEN LIKE WORMS ZONE", end of
   this sheet), which hides this button again. */
@media (orientation: landscape) and (max-height: 500px){
  html:not([data-vibe="garden"]) .menu__events{ display: flex; justify-content: flex-end; grid-area: side; align-self: center; justify-self: stretch; }
  .menu .menu__events > .menu__tile{ --t: clamp(60px, 26vh, 100px); width: min(calc(var(--t) * 1.3), 100%); height: calc(var(--t) * 1.04); }
  .menu .menu__events > .menu__tile img{ width: calc(var(--t) * 0.58); height: calc(var(--t) * 0.58); }
}
/* Safari's bars showing (360px tall or less): the login's "+2,500" pill hangs under the button, so the top row keeps that room and the worm picker never sits on it. */
@media (orientation: landscape) and (max-height: 360px){
  .menu__top{ padding-bottom: 18px; }
  .menu__loginbonus{ bottom: -10px; padding: 1px 8px 2px; font-size: 0.72rem; }
}
/* 300px tall and under (an iPhone sideways with the tab bar showing): the left column gives a few pixels so The Burrow stays off the home indicator. */
@media (orientation: landscape) and (max-height: 300px){
  .menu .menu__left .pickrow{ gap: 4px; }
  .menu .menu__left{ gap: 4px; }
  .menu .menu__left .pickcard__art{ width: min(100%, calc((32cqh - 30px) / 0.577), 190px); }
  .menu .menu__left .pickcard__art--floor{ height: clamp(22px, calc(17cqh - 30px), 90px); }
  .menu .menu__left .pickcard__arrow{ height: 26px; }
  .menu .menu__left .menu__tile--burrow{ height: clamp(36px, 15cqh, 72px); }
}

/* The same short phone on its narrowest screens, whatever the tile count: the pickers' arrows give their width to the names ("Ember" never splits). */
@media (orientation: landscape) and (max-height: 500px) and (max-width: 780px){
  .menu__avatar .menu__levelbadge{ left: 18px; }
  .menu .menu__left .menu__tile--burrow{ gap: 4px; padding-inline: 4px; }
  .menu .menu__left .pickcard{ grid-template-columns: 24px minmax(0, 1fr) 24px; }
  .menu .menu__left .pickcard__arrow{ width: 24px; }
  .menu .menu__left .pickcard__name{ font-size: 0.85rem; overflow-wrap: normal; }
}

/* ---- The Events pop-up: the timed tiles at full size, in the house overlay and panel. One mechanism for every screen that has an Events button. */
.overlay--events{
  z-index: 8; background: radial-gradient(circle at 50% 42%, rgba(10, 14, 26, 0.72), rgba(4, 6, 12, 0.92));
  padding: max(8px, var(--safe-t)) max(12px, var(--safe-r)) max(8px, var(--safe-b)) max(12px, var(--safe-l));
}
.panel--events{ width: min(500px, 100%); display: flex; flex-direction: column; padding: 8px 14px 12px; text-align: center; overflow: hidden; }
.events__bar{ position: relative; display: flex; align-items: center; justify-content: center; min-height: 44px; flex: none; }
.events__bar .panel__title{ margin: 0; font-size: 1.5rem; line-height: 1.2; }
.events__bar .iconbtn{ position: absolute; right: 0; top: 50%; translate: 0 -50%; }
/* Tiles keep their size and wrap, each a card: picture, name, countdown. A screen too short for the rows scrolls in here, it never squeezes them. */
.events__grid{
  display: flex; flex-wrap: wrap; justify-content: center; align-content: flex-start; gap: 10px; padding: 10px 6px 12px;
  min-height: 0; overflow-y: auto; overscroll-behavior: contain;
}
.events__grid .button--tile{
  width: 132px; min-height: 0; height: auto; margin: 0; padding: 8px 8px 8px; flex: none; gap: 3px; justify-content: flex-start; align-items: center;
  border-radius: 18px; font-size: 0.9rem; line-height: 1.2;
}
.events__grid .button--tile img{ width: 56px; height: 56px; margin: 0 auto; }
.events__grid .button--tile .button__label{ flex: 1 1 auto; display: flex; align-items: center; justify-content: center; }
.events__grid .button--tile .tile__badge{
  position: static; translate: none; margin-top: auto; min-width: 0; max-width: 100%; white-space: normal; font-size: 0.8rem; line-height: 1.2; padding: 1px 8px 2px; border-width: 2px;
}
.events__grid .button--tile:has(.tile__badge:not(:empty)){ padding-bottom: 8px; }
@media (orientation: landscape) and (max-height: 420px){
  .panel--events{ width: min(760px, 100%); padding: 2px 12px 6px; }
  .events__bar{ min-height: 44px; }
  .events__bar .panel__title{ font-size: 1.3rem; }
  .events__grid{ gap: 8px; padding: 12px 4px 8px; }
  .events__grid .button--tile{ width: 108px; padding: 5px 5px 6px; font-size: 0.8rem; line-height: 1.15; }
  .events__grid .button--tile img{ width: 40px; height: 40px; }
  .events__grid .button--tile .tile__badge{ font-size: 0.75rem; padding: 0 8px 1px; }
}

/* The shortest sideways phones (340px tall or less): a smaller picture, so the two rows fit with the Close button and no sliver of a third scroll. */
@media (orientation: landscape) and (max-height: 340px){
  .events__grid .button--tile img{ width: 22px; height: 22px; }
}
/* A short upright phone (600px tall or less): the same, a step smaller picture (a long countdown wraps to two lines, and the rows must not tip into a sliver of scroll). */
@media (orientation: portrait) and (max-height: 600px){
  .events__grid{ gap: 8px; padding-block: 6px 8px; }
  .events__grid .button--tile{ padding: 5px 6px 6px; }
  .events__grid .button--tile img{ width: 34px; height: 34px; }
}

/* A little taller (331 to 420px): three tiles to a row, so four to six are two even rows, not five and one. */
@media (orientation: landscape) and (min-height: 331px) and (max-height: 420px){
  .panel--events{ width: min(420px, 100%); }
}

/* ---- A desktop or tablet: one centred block. Your worm and floor stand over The Burrow, beside the name and the Play buttons; the timed
   icons stand in a column down each edge, the left group and the right group (Worms Zone's home screen), so nothing floats in the middle. */
@media (orientation: landscape) and (min-height: 501px){
  .menu{
    --col: min(900px, max(60vw, 700px));
    --tw: clamp(104px, calc((var(--col) - 56px) / 6), 150px);
    --left: clamp(210px, 18vw, 330px);
    --mark-h: min(17vh, 160px);
    --t: clamp(56px, min(10.2vh, calc(var(--tw) / 1.25)), 112px);
    --rail: clamp(96px, 11vw, 150px);
    grid-template-columns: minmax(var(--rail), 1fr) minmax(0, var(--left)) minmax(0, var(--col)) minmax(var(--rail), 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto auto minmax(0, 1fr) auto;
    grid-template-areas:
      "top    top    top  top"
      "sidea  .      .    sideb"
      "sidea  pick   core sideb"
      "sidea  burrow core sideb"
      "sidea  .      .    sideb"
      "foot   foot   foot foot";
    column-gap: clamp(14px, 2vw, 28px);
  }
  /* The column dissolves, as it does upright: the pickers take their zone and The Burrow takes its own. */
  .menu__left{ display: contents; }
  .menu .pickrow{ grid-area: pick; align-self: center; width: 100%; gap: clamp(8px, 1.6vh, 14px); margin: 0; }
  .menu__left .pickcard__name{ font-size: clamp(0.8rem, 2.2vh, 1.1rem); }
  .menu__left .pickcard__arrow{ height: clamp(28px, 4.6vh, 42px); }
  .menu > .menu__core{ align-self: center; }
  /* The Burrow and the timed tiles: one size, one row. A long name wraps on two lines and every tile in the row is as tall as the tallest. */
  /* Golden Hour keeps The Burrow in its own bottom row at that row's size (Gray's screenshot, 9 Nov 2026: it was shorter and lower than Events and Top players, with a tiny picture). */
  :where(:root:not([data-vibe="garden"])) .menu .menu__left .menu__tile--burrow{
    --t: clamp(56px, min(10.2vh, calc(var(--tw) / 1.25)), 112px); width: var(--tw); height: max(84px, calc(var(--t) * 1.12));
    flex-direction: column; gap: 2px; padding: 12px 4px 6px; font-size: max(0.72rem, calc(var(--t) * 0.15)); white-space: normal;
  }
  :where(:root:not([data-vibe="garden"])) .menu .menu__left .menu__tile--burrow{ grid-area: burrow; align-self: start; justify-self: center; }
  :is([data-vibe="classic"], [data-vibe="garden"]) .menu .menu__left .menu__tile--burrow:not(.menu__menu > .menu__tile){ justify-content: flex-end !important; }
  /* The pictures fill their tiles: at half of --t a laptop's 84px tile held a 28px picture under an empty band (Gray's screenshot, 9 Nov 2026). */
  :where(:root:not([data-vibe="garden"])) .menu .menu__left .menu__tile--burrow img{ width: calc(var(--t) * 0.75); height: calc(var(--t) * 0.75); margin: 0 auto; }
  /* A tall screen has the room for bigger pills and pickers than a laptop. */
  :is([data-vibe="classic"], [data-vibe="garden"]) .menu__play{ --h: clamp(56px, 10.5vh, 100px); }
  :is([data-vibe="classic"], [data-vibe="garden"]) .menu__friends{ --h: clamp(40px, 7vh, 62px); }
  :is([data-vibe="classic"], [data-vibe="garden"]) .menu__field{ --h: clamp(42px, 7.4vh, 62px); }
  [data-vibe="classic"] .menu .pickcard{ --ch: clamp(74px, 17vh, 170px); }
  .menu .menu__friends{ width: min(420px, 80%); }
}

/* A laptop window (1000x516): with six timed tiles on, the tiles wrap to a second row and the name box rises under the logo, so the jelly squash touched it.
   The logo is a little shorter at this height (the garden's front screen has its own layout, so it is kept out). */
@media (orientation: landscape) and (min-height: 501px) and (max-height: 600px){
  :where(:root:not([data-vibe="garden"])) .menu{ --mark-h: min(12vh, 160px); }
}

/* An upright phone: two tiles to a row in Settings' pickers, so a long German name ("Süßwarenladen", "Weihnachtsleckereien") has the room to stay whole. */
@media (orientation: portrait) and (max-width: 430px){
  .screen__tiles{ grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
/* A laptop window (1000x516): Settings' account column is a little tighter, so its long German note fits without scrolling (FITS). */
@media (orientation: landscape) and (min-height: 501px) and (max-height: 600px){
  .screen__side{ gap: 8px; }
  .screen__side .screen__note{ font-size: 0.8rem; line-height: 1.3; }
}

/* ==========================================================================================================
 * THE FRONT SCREEN LIKE WORMS ZONE (10 Nov 2026, Gray: "look how they fit stuff in on homepage" and "look at the animated
 * graphics, ours is still shit"). Worms Zone's timed things are not boxed tiles: each is a free-standing animated icon with a
 * small dark timer pill under it, stacked down the edges of the screen, each idling on its own loop, and the one that is ready
 * (a gift to collect) has rays turning behind it and a red dot. Ours are the same, with our own art:
 *   - the icon is the tile's picture, bigger, with no box; the name (when there is height for it) and the countdown pill sit under it;
 *   - each picture bobs and tilts on its own two loops (1.3s to 6s long, so no two move in step); a ready one also wiggles and
 *     has the daily gift's rays behind it (the same rule and keyframes: "dg-rays");
 *   - a desktop or tablet: a column down the left edge and one down the right; a phone on its side: one or two columns down the right
 *     edge; a phone upright: one strip under the logo that swipes sideways (the daily gift's method: touch-action,
 *     overscroll-behavior, the strip itself scrolls, never scrollIntoView);
 *   - a phone on its side with the browser's bars showing (360px tall or less) has no height for icons: the Events button and
 *     pop-up stay for it, and for the garden theme, which has its own front screen.
 * Everything that moves is a transform or an opacity and stops for reduced motion.
 * ======================================================================================================== */

/* The two groups: a phone merges them into the side's one row or column; a desktop gives each its own edge (below). */
.menu__sidea, .menu__sideb{ display: contents; }
/* Nothing on: no strip, no column. */
.menu:not(:has(.menu__side .button--tile:not([hidden]))) .menu__side{ display: none; }

html:not([data-vibe="garden"]) .menu .menu__side .menu__tile.button--tile{
  --lf: 0.8rem;                                /* the name */
  --pf: 0.78rem;                               /* the countdown */
  --slot-l: calc(var(--lf) * 2.3);             /* a name's two lines */
  --slot-p: calc(var(--pf) * 2.3 + 0.5rem);    /* a countdown's two lines: a long German one wraps rather than widening the column */
  --slots: calc(var(--slot-l) + var(--slot-p) + 6px);
  --tw: 112px; --ic: 64px;                     /* each place below sets its own */
  --rays-d: calc(var(--ic) * 1.9); --rays-y: calc(var(--ic) / 2);
  width: var(--tw); height: calc(var(--ic) + var(--slots)); min-height: 0; margin: 0; padding: 0; flex: none; gap: 2px;
  justify-content: flex-start !important; align-items: center; border: 0; border-radius: 14px; background: none; box-shadow: none; filter: none;
  font-size: var(--lf); line-height: 1.15; overflow: visible;
}
/* The picture: the icon itself, big, with the soft drop shadow the other pictures wear. */
html:not([data-vibe="garden"]) .menu .menu__side .menu__tile.button--tile img{
  flex: none; width: var(--ic); height: var(--ic); margin: 0; object-fit: contain; filter: drop-shadow(0 4px 0 rgba(20, 8, 60, 0.35));
  animation: wz-bob var(--bob, 3s) ease-in-out var(--bob-delay, 0s) infinite, wz-tilt var(--tilt-t, 4.5s) ease-in-out var(--tilt-delay, 0s) infinite;
}
/* One pair of loops each, of different lengths (Worms Zone's icons idle 1.3s to 6s), started at different moments. */
.menu__side .tile--event{ --bob: 3.33s; --tilt-t: 5.67s; --bob-delay: -0.4s; --tilt-delay: -2.1s; --tilt: 4deg; }
.menu__side .tile--mini{ --bob: 2.73s; --tilt-t: 4s; --bob-delay: -1.7s; --tilt-delay: -0.6s; --tilt: 3deg; }
.menu__side .tile--happy{ --bob: 4s; --tilt-t: 2.73s; --bob-delay: -2.6s; --tilt-delay: -1.1s; --tilt: 5deg; }
.menu__side .tile--hunt{ --bob: 5.67s; --tilt-t: 3.33s; --bob-delay: -3.2s; --tilt-delay: -2.4s; --tilt: 3deg; --lift: 7%; }
.menu__side [data-daily-open]{ --bob: 2.67s; --tilt-t: 6s; --bob-delay: -0.9s; --tilt-delay: -3.7s; --tilt: 3deg; }
.menu__side .tile--noads{ --bob: 3.67s; --tilt-t: 4.33s; --bob-delay: -2.2s; --tilt-delay: -1.4s; --tilt: 6deg; }
/* The No Ads sign is wider than tall, so in its square it reads smaller than the gift or the wheel: a little bigger. */
html:not([data-vibe="garden"]) .menu .menu__side .menu__tile.tile--noads img{ scale: 1.18; }
.menu__side .tile--wheel{ --bob: 2.73s; --tilt-t: 3.67s; --bob-delay: -1.9s; --tilt-delay: -0.2s; --tilt: 9deg; }
@keyframes wz-bob{ 0%, 100%{ translate: 0 0; } 50%{ translate: 0 calc(var(--lift, 5%) * -1); } }
@keyframes wz-tilt{ 0%, 100%{ rotate: calc(var(--tilt, 3deg) * -1); } 50%{ rotate: var(--tilt, 3deg); } }
/* Ready to collect (a live race, the gift, the wheel): the gift's wiggle on top of the bob, and the rays behind (the daily gift's rule, "dg-rays"). */
html:not([data-vibe="garden"]) .menu .menu__side .menu__tile.button--tile:is([data-ready], :has(> .iconbtn__dot:not([hidden]))) img{
  animation: wz-bob var(--bob, 3s) ease-in-out var(--bob-delay, 0s) infinite, tile-wiggle 2.6s ease-in-out infinite; transform-origin: 50% 90%;
}
html:not([data-vibe="garden"]) .menu .menu__side .menu__tile.button--tile::before{ animation: dg-rays 9s linear infinite; }
@media (hover: hover){ html:not([data-vibe="garden"]) .menu .menu__side .menu__tile.button--tile:hover img{ transform: scale(1.08); } }

/* The name: house lettering (white, outlined, one hard shadow) hugging the pill under it. */
html:not([data-vibe="garden"]) .menu .menu__side .menu__tile.button--tile .button__label{
  display: flex; align-items: flex-end; justify-content: center; width: 100%; min-height: var(--slot-l); padding: 0 2px; text-align: center;
  color: #fff; font-family: "Lilita One", var(--font-display); font-weight: 400; font-size: var(--lf); line-height: 1.15;
  -webkit-text-stroke: 0.2em var(--ts); paint-order: stroke fill; stroke-linejoin: round; text-shadow: 0 0.1em 0 var(--ts);
}
/* The countdown: a small dark timer pill (Worms Zone's 100x30 "timer back"), in the same lettering. */
html:not([data-vibe="garden"]) .menu .menu__side .menu__tile.button--tile .tile__badge:not(:empty){
  position: relative; inset: auto; translate: none; display: flex; align-items: center; justify-content: center; flex: none;
  width: max-content; max-width: 100%; min-width: 0; margin: 0; padding: 0.12em 0.65em 0.2em; border: 0; border-radius: 0.85em;
  background: #170d4a; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.38), 0 2px 0 rgba(10, 6, 40, 0.55);
  color: #fff; font-family: "Lilita One", var(--font-display); font-weight: 400; font-size: var(--pf); line-height: 1.15; text-align: center; white-space: normal;
  -webkit-text-stroke: 0.12em #170d4a; paint-order: stroke fill; text-shadow: 0 0.08em 0 rgba(0, 0, 0, 0.5); letter-spacing: 0;
  animation: none;
}
html:not([data-vibe="garden"]) .menu .menu__side .menu__tile.button--tile .tile__badge:empty{ display: none; }
/* Ready: the pill turns green and beats, as it always did. */
html:not([data-vibe="garden"]) .menu .menu__side .menu__tile.button--tile[data-ready] .tile__badge:not(:empty){
  background: linear-gradient(180deg, #aee66b, #44921c); box-shadow: inset 0 0 0 2px #1b4709, 0 2px 0 rgba(10, 6, 40, 0.55);
  -webkit-text-stroke-color: #1b4709; animation: tile-pulse 1.2s ease-in-out infinite;
}
/* The red dot sits on the icon's corner, not the box's. */
html:not([data-vibe="garden"]) .menu .menu__side .menu__tile.button--tile .iconbtn__dot{
  position: absolute; top: 0; right: auto; left: calc(50% + var(--ic) * 0.28); width: 18px; height: 18px;
}

/* Where the name is not drawn (a short screen) it is still there for a screen reader, and the tile is that much shorter. */
@media (orientation: landscape) and (max-height: 700px), (orientation: portrait) and (max-height: 760px){
  html:not([data-vibe="garden"]) .menu .menu__side .menu__tile.button--tile{ --slot-l: 0px; --slots: calc(var(--slot-p) + 4px); }
  html:not([data-vibe="garden"]) .menu .menu__side .menu__tile.button--tile .button__label{
    position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
}

/* ---- A phone held upright: one strip under the logo, swiping sideways. Three icons fit across, a fourth peeks in. */
@media (orientation: portrait){
  html:not([data-vibe="garden"]) .menu{
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: auto auto auto minmax(0, 1fr) auto auto auto;
    grid-template-areas:
      "me     nav   nav"
      "brand  brand brand"
      "timed  timed timed"
      "pick   pick  pick"
      "core   core  core"
      "burrow board more"
      "foot   foot  foot";
  }
  html:not([data-vibe="garden"]) .menu .menu__events{ display: none; }
  html:not([data-vibe="garden"]) .menu .menu__side{
    grid-area: timed; justify-self: center; width: var(--col); container-type: inline-size;
    display: flex; flex-direction: row; flex-wrap: nowrap; justify-content: flex-start; align-items: flex-start; gap: 0;
    /* A strip that scrolls sideways clips up and down too, and the rays behind a ready icon stand 0.45 of the icon above it (32px at most):
       the strip's own box reaches that far up (padding, taken back by the margin) so the rays fade out instead of ending in a straight edge. */
    padding: 38px 0 4px; margin-top: -32px; overflow-x: auto; overflow-y: hidden; overscroll-behavior: contain; touch-action: pan-x; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  html:not([data-vibe="garden"]) .menu .menu__side .menu__tile.button--tile{
    --tw: min(112px, calc(100cqw / 3 - 8px)); --ic: clamp(40px, calc(var(--tw) * 0.58), 70px); margin-inline: 3px;   /* margins, not a gap: the two end pieces below would add two gaps and make three icons scroll */
  }
  .menu .menu__side::-webkit-scrollbar{ display: none; }
  /* Few icons stand in the middle; many start at the left edge and scroll (the auto margins give way when there is no room). */
  .menu .menu__side::before, .menu .menu__side::after{ content: ""; flex: 0 0 0; }
  .menu .menu__side::before{ margin-left: auto; }
  .menu .menu__side::after{ margin-right: auto; }
  /* More than three icons: the strip scrolls, so the next icon peeks in at the right edge (a third of it shows) and the edge fades,
     the way an app store's shelf says "there is more this way". Three icons fit the width exactly, so the fourth was wholly off the
     screen and players never found it (Gray, 19 Nov 2026: "the icons below squirm logo dont show you can scroll sideways"). */
  html:not([data-vibe="garden"]) .menu:is(
    :has(.menu__sidea .button--tile:not([hidden]) ~ .button--tile:not([hidden]) ~ .button--tile:not([hidden]) ~ .button--tile:not([hidden])),
    :has(.menu__sidea .button--tile:not([hidden]) ~ .button--tile:not([hidden]) ~ .button--tile:not([hidden])):has(.menu__sideb .button--tile:not([hidden])),
    :has(.menu__sidea .button--tile:not([hidden]) ~ .button--tile:not([hidden])):has(.menu__sideb .button--tile:not([hidden]) ~ .button--tile:not([hidden])),
    :has(.menu__sidea .button--tile:not([hidden])):has(.menu__sideb .button--tile:not([hidden]) ~ .button--tile:not([hidden]) ~ .button--tile:not([hidden]))
  ) .menu__side{
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 22px), rgba(0, 0, 0, .35));
            mask-image: linear-gradient(to right, #000 calc(100% - 22px), rgba(0, 0, 0, .35));
  }
  html:not([data-vibe="garden"]) .menu:is(
    :has(.menu__sidea .button--tile:not([hidden]) ~ .button--tile:not([hidden]) ~ .button--tile:not([hidden]) ~ .button--tile:not([hidden])),
    :has(.menu__sidea .button--tile:not([hidden]) ~ .button--tile:not([hidden]) ~ .button--tile:not([hidden])):has(.menu__sideb .button--tile:not([hidden])),
    :has(.menu__sidea .button--tile:not([hidden]) ~ .button--tile:not([hidden])):has(.menu__sideb .button--tile:not([hidden]) ~ .button--tile:not([hidden])),
    :has(.menu__sidea .button--tile:not([hidden])):has(.menu__sideb .button--tile:not([hidden]) ~ .button--tile:not([hidden]) ~ .button--tile:not([hidden]))
  ) .menu__side .menu__tile.button--tile{ --tw: min(112px, calc(100cqw / 3.55 - 6px)); }
}

/* ---- A short upright phone (700px tall or less: an SE, a small Android, a phone with the browser's bars showing): the pickers and the
   buttons need all the height, so the strip gives way to the Events button in the bottom row and its pop-up, as before. */
@media (orientation: portrait) and (max-height: 700px){
  html:not([data-vibe="garden"]) .menu{
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: auto auto minmax(0, 1fr) auto auto auto;
    grid-template-areas:
      "me     me     nav   nav"
      "brand  brand  brand brand"
      "pick   pick   pick  pick"
      "core   core   core  core"
      "burrow events board more"
      "foot   foot   foot  foot";
  }
  html:not([data-vibe="garden"]) .menu:not(:has(.menu__side .button--tile:not([hidden]))){
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-areas:
      "me     nav   nav"
      "brand  brand brand"
      "pick   pick  pick"
      "core   core  core"
      "burrow board more"
      "foot   foot  foot";
  }
  html:not([data-vibe="garden"]) .menu .menu__events{ display: block; }
  html:not([data-vibe="garden"]) .menu .menu__side{ display: none; }
}

/* ---- The same short layout on a taller phone whose room is short anyway (ui/fitPanels.ts fitMenu sets data-menu-tight on <html>):
   the height a screen reports includes the notch and the home bar, which are not room, and a strip of timed icons plus the
   Nuggets video button needs more than an 874pt iPhone leaves (the picker cards were squeezed over the name box). */
@media (orientation: portrait){
  html[data-menu-tight]:not([data-vibe="garden"]) .menu{
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: auto auto minmax(0, 1fr) auto auto auto;
    grid-template-areas:
      "me     me     nav   nav"
      "brand  brand  brand brand"
      "pick   pick   pick  pick"
      "core   core   core  core"
      "burrow events board more"
      "foot   foot   foot  foot";
  }
  html[data-menu-tight]:not([data-vibe="garden"]) .menu:not(:has(.menu__side .button--tile:not([hidden]))){
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-areas:
      "me     nav   nav"
      "brand  brand brand"
      "pick   pick  pick"
      "core   core  core"
      "burrow board more"
      "foot   foot  foot";
  }
  html[data-menu-tight]:not([data-vibe="garden"]) .menu .menu__events{ display: block; }
  html[data-menu-tight]:not([data-vibe="garden"]) .menu .menu__side{ display: none; }
}

/* A phone on its side with the browser's bars showing (360px tall or less): no height for icons; the Events button above stands in. */
@media (orientation: landscape) and (max-height: 360px){
  html:not([data-vibe="garden"]) .menu .menu__side{ display: none; }
}
/* ---- A phone on its side: one column down the right edge, a second beside it when more than three are on (the groups merge; the grid fills a column of three, then the next). */
@media (orientation: landscape) and (min-height: 361px) and (max-height: 500px){
  html:not([data-vibe="garden"]) .menu .menu__side{
    container-type: size; display: grid; grid-auto-flow: column; grid-template-rows: repeat(3, max-content); justify-content: end; align-content: center; justify-items: center; gap: 4px 6px;
  }
  html:not([data-vibe="garden"]) .menu .menu__side .menu__tile.button--tile{
    --pf: 0.72rem; --tw: min(104px, calc((100cqw - 6px) / 2)); --ic: clamp(34px, calc((100cqh - 8px) / 3 - var(--slots) - 4px), 84px);
  }
  html:not([data-vibe="garden"]) .menu .menu__events{ display: none; }
}
/* A narrow one (a 667px iPhone) has no width for two columns: with four or more on, the Events button stands in (three or fewer: one column fits). */
@media (orientation: landscape) and (min-height: 361px) and (max-height: 500px) and (max-width: 760px){
  html:not([data-vibe="garden"]) .menu:is(
    :has(.menu__sidea .button--tile:not([hidden]) ~ .button--tile:not([hidden]) ~ .button--tile:not([hidden])):has(.menu__sideb .button--tile:not([hidden])),
    :has(.menu__sidea .button--tile:not([hidden]) ~ .button--tile:not([hidden])):has(.menu__sideb .button--tile:not([hidden]) ~ .button--tile:not([hidden])),
    :has(.menu__sidea .button--tile:not([hidden])):has(.menu__sideb .button--tile:not([hidden]) ~ .button--tile:not([hidden]) ~ .button--tile:not([hidden]))
  ) .menu__side{ display: none; }
  html:not([data-vibe="garden"]) .menu:is(
    :has(.menu__sidea .button--tile:not([hidden]) ~ .button--tile:not([hidden]) ~ .button--tile:not([hidden])):has(.menu__sideb .button--tile:not([hidden])),
    :has(.menu__sidea .button--tile:not([hidden]) ~ .button--tile:not([hidden])):has(.menu__sideb .button--tile:not([hidden]) ~ .button--tile:not([hidden])),
    :has(.menu__sidea .button--tile:not([hidden])):has(.menu__sideb .button--tile:not([hidden]) ~ .button--tile:not([hidden]) ~ .button--tile:not([hidden]))
  ) .menu__events{ display: flex; }
}

/* ---- A desktop or tablet: a column down each edge, the left group and the right group. */
@media (orientation: landscape) and (min-height: 501px){
  html:not([data-vibe="garden"]) .menu .menu__side{ display: contents; }
  html:not([data-vibe="garden"]) .menu .menu__sidea, html:not([data-vibe="garden"]) .menu .menu__sideb{
    container-type: size; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: clamp(10px, 2.6cqh, 24px);
  }
  html:not([data-vibe="garden"]) .menu .menu__sidea{ grid-area: sidea; }
  html:not([data-vibe="garden"]) .menu .menu__sideb{ grid-area: sideb; }
  html:not([data-vibe="garden"]) .menu .menu__side .menu__tile.button--tile{
    --tw: min(100cqw, 136px); --ic: clamp(48px, min(calc((100cqh - 48px) / 3 - var(--slots)), calc(var(--tw) * 0.82)), 124px);
  }
  html:not([data-vibe="garden"]) .menu .menu__events{ display: none; }
}

@media (prefers-reduced-motion: reduce){
  html:not([data-vibe="garden"]) .menu .menu__side .menu__tile.button--tile :is(img, .tile__badge){ animation: none; }
}

/* ------------------------------------------------- comparison tables (content pages) */
.gamecard__rank{
  font-size: 0.8rem; font-weight: 800; color: #1a1f47; background: var(--accent);
  border-radius: 999px; padding: 2px 10px; letter-spacing: 0.02em;
}
.compare{
  margin: 1.2em 0; overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 3px solid rgba(255, 255, 255, 0.55); border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
}
.compare table{ border-collapse: collapse; width: 100%; min-width: 640px; font-size: 0.92rem; }
.compare caption{ text-align: left; padding: 10px 14px 6px; font-weight: 700; color: var(--paper); }
.compare th, .compare td{ text-align: left; vertical-align: top; padding: 9px 14px; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.compare thead th{ color: var(--accent); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; border-top: 0; }
.compare tbody th{ color: var(--paper); white-space: nowrap; }
.compare td{ color: var(--paper-dim); }

/* ------------------------------------------------- the home page's written overview
 *
 * Below the game (Gray, 11 Nov 2026: "visible below the game"). The arena stays
 * pinned to the screen exactly as before (see "The homepage arena is pinned"):
 * this text starts one screen down, and scrolling the page slides it up over the
 * arena like a sheet. "Overview" at the foot of the menu jumps to it, "Back to
 * the game" goes back up.
 *
 * The page scrolls ONLY while the menu is up with nothing open over it. In a run,
 * on the death screen and under every panel the text is gone and the page is
 * locked as it always was, so nothing extra is over the play area and a drag can
 * never move the page. Website only: the app and the portal builds (portal.ts)
 * never carry this section.
 */
.homeprose{ display: none; }
html:has(body.page--home .overlay--menu:not([hidden])):not(:has(.game .overlay:not(.overlay--menu):not([hidden]))){
  overflow-y: auto; height: auto; scroll-behavior: smooth;
  scrollbar-width: none; /* the menu is a game screen: no bar down its side */
}
html:has(body.page--home .overlay--menu:not([hidden])):not(:has(.game .overlay:not(.overlay--menu):not([hidden]))) .homeprose{
  display: block; position: relative; z-index: 90; width: auto; max-width: none;
  /* One screen down: the large viewport, so the phone's address bar sliding away never shows its top edge. */
  margin: 100vh 0 0; margin-top: 100lvh;
  padding: 28px max(var(--safe-r), 16px) max(var(--safe-b), 32px) max(var(--safe-l), 16px);
  background: linear-gradient(180deg, rgba(14, 18, 52, 0.94), rgba(14, 18, 52, 0.98)), url("/ground/hex.png?v=d2a78a1a") 0 0 / 512px 512px, #1d4f9c;
  box-shadow: 0 -18px 40px rgba(0, 0, 0, 0.45);
}
/* A finger on the menu may slide the page up; in a run the arena takes every touch, as before. */
.page--home .game:has(> .overlay--menu:not([hidden])):not(:has(.overlay:not(.overlay--menu):not([hidden]))){ touch-action: pan-y; }
@media (prefers-reduced-motion: reduce){ html{ scroll-behavior: auto !important; } }
.homeprose__inner{ max-width: 900px; margin: 0 auto; }
.homeprose .prose{ margin-inline: auto; }
.homeprose__back{ margin: 0 0 1em; }
.homeprose .skingrid{ grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }

/* Words that wrap inside a button (the shop's packs, the free-Nuggets video button) keep the house line height: the face rules above set 1,
   which runs outlined lines together (ui/uiRules.ts WRAP_LINE_HEIGHT). */
html[data-vibe] .button.button--buy.button--buy, html[data-vibe] .button.button--video.button--video, html[data-vibe] .pack.pack.pack{ line-height: 1.25; }

/* The shop's packs keep air above and below their words (Titan One's line box is taller than the old face's). */
html[data-vibe] .pack.pack.pack{ padding-block: 9px 11px; }
/* A row's name gives way a little on a phone, so the longest names a board meets stay whole (CUT). */
@media (max-width: 460px){ .screen--board .ranks__row .ranks__name{ font-size: 0.9rem; letter-spacing: -0.03em; } }
/* The erase confirmation: its last word needs room at the sides. */
.panel--danger .set-danger{ font-size: 0.95rem; padding-inline: 14px; }
/* A phone on its side: Settings' Options pane (About, Report a bug) fits without a scroll. */
@media (orientation: landscape) and (max-height: 400px){
  .screen__pane[data-screen-pane="options"] .screen__side{ gap: 5px; }
  .screen__pane[data-screen-pane="options"] .screen__card{ padding: 5px 10px; gap: 4px; }
}

.nuggetpill.eventbar__pill{ padding-block: 8px; }
[data-vibe="classic"] .death__pair > [data-death-menu]{ font-size: max(1rem, calc(var(--h) * 0.27)); --pad-x: calc(var(--h) * 0.34); }

.minime[data-joined="no"] .minime__place{ line-height: 1.25; }
@media (orientation: landscape) and (max-height: 500px){ .burrow__tabs .button--tab .button__label{ font-size: 0.88rem; letter-spacing: -0.03em; } }
@media (max-width: 380px){ .screen--board .ranks__row .ranks__name{ font-size: 0.84rem; } }

/* The profile's body never scrolls sideways: its stat cards end at the glass's edge. */
.screen--profile .screen__body{ overflow-x: clip; }
/* A short phone upright (375x667) with the free-Nuggets video button showing: the pick cards and the name box keep air between them. */
@media (orientation: portrait) and (max-height: 700px){
  .menu .menu__left .pickrow{ margin-bottom: 6px; }
  [data-vibe="classic"] .menu .menu__video{ --h: 56px; }
}

/* A phone upright: the arena card's name (Friedhof, Event-Arena) stays whole beside the skin card. */
@media (orientation: portrait) and (max-width: 420px){
  [data-vibe="classic"] .menu .menu__left .pickcard__name, [data-vibe="classic"] .menu .pickcard__name{ font-size: clamp(0.78rem, calc(var(--ch) * 0.14), 0.95rem); letter-spacing: -0.04em; }
}
/* The narrowest phones (375px): the sign-in pill and the Nuggets pill beside it keep air between them. */
@media (max-width: 380px){
  [data-vibe] .menu .menu__nav > .nuggetpill{ gap: 3px; padding-inline: 3px 5px; font-size: 0.85rem; }
  [data-vibe] .menu .menu__login{ font-size: 0.78rem; padding-inline: 6px; }
  .menu .menu__nav{ gap: 3px; }
}
@media (max-width: 370px){
  [data-vibe] .menu .menu__nav > .nuggetpill{ font-size: 0.78rem; padding-inline: 3px 7px; gap: 2px; }
  .menu .menu__nav{ gap: 2px; }
  .menu .nuggetpill.is-offer::after{ content: none; }
}
/*
 * The advent calendar (ui/adventPanel.ts): 24 painted doors, four across upright and eight across on a wide, short
 * screen. Today's door wobbles in a slow ring of rays; opened and missed doors keep what was behind them on show.
 */
.panel--advent{ width: min(560px, 100%); text-align: center; }
.advent{
  list-style: none; margin: 10px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
}
@media (orientation: landscape) and (max-height: 600px){
  .panel--advent{ width: min(860px, 100%); }
  .advent{ grid-template-columns: repeat(8, 1fr); }
}
.advent__door{ position: relative; aspect-ratio: 1; display: grid; place-items: center; }
.advent__art{ position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.advent__num, .advent__open{
  position: relative; font-family: "Lilita One", var(--font-display); font-size: clamp(1.1rem, 5.4vw, 1.9rem);
  color: #fff; -webkit-text-stroke: 5px #1d1446; paint-order: stroke fill; text-shadow: 0 3px 0 #1d1446;
}
.advent__door.is-gold .advent__num{ color: #fff6c8; }
.advent__open{
  appearance: none; border: 0; background: none; padding: 0; cursor: pointer;
  width: 100%; height: 100%; display: grid; place-items: center; border-radius: 14px;
}
.advent__open:focus-visible{ outline: 3px solid #ffe36a; outline-offset: 2px; }
.advent__door.is-today{ z-index: 1; animation: advent-wobble 1.3s ease-in-out infinite; }
.advent__door.is-today::before{
  content: ""; position: absolute; inset: -16%; border-radius: 50%; pointer-events: none;
  background: repeating-conic-gradient(rgba(255, 227, 106, 0.45) 0 10deg, transparent 10deg 30deg);
  -webkit-mask: radial-gradient(circle, #000 30%, transparent 70%); mask: radial-gradient(circle, #000 30%, transparent 70%);
  animation: advent-spin 9s linear infinite;
}
@keyframes advent-wobble{ 0%, 100%{ transform: rotate(-3deg) scale(1.05); } 50%{ transform: rotate(3deg) scale(1.1); } }
@keyframes advent-spin{ to{ transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce){ .advent__door.is-today, .advent__door.is-today::before{ animation: none; } }
.advent__inside{ position: relative; width: 60%; height: 60%; object-fit: contain; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.35)); }
.advent__door.is-missed .advent__inside{ filter: grayscale(0.85) drop-shadow(0 2px 0 rgba(0, 0, 0, 0.35)); opacity: 0.9; }
.advent__tag{
  position: absolute; bottom: 2%; left: 50%; transform: translateX(-50%); white-space: nowrap;
  font-family: "Lilita One", var(--font-display); font-size: 0.72rem; line-height: 1; padding: 3px 7px;
  border-radius: 8px; border: 2px solid #1d1446; background: #3fae3f; color: #fff;
}
.advent__door.is-missed .advent__tag{ background: #5d6b86; }
.advent__star{
  display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 8px 12px; text-align: left;
  border-radius: 16px; background: rgba(20, 12, 70, 0.55); border: 3px solid rgba(20, 12, 70, 0.7);
}
.advent__star img{ width: 44px; height: 44px; object-fit: contain; flex: none; }
.advent__star-words{ flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.advent__star-words strong{ font-family: "Lilita One", var(--font-display); font-size: 1rem; }
.advent__star-words span{ font-size: 0.82rem; opacity: 0.9; }
.advent__bar{ display: block; height: 8px; border-radius: 4px; background: rgba(0, 0, 0, 0.35); overflow: hidden; }
.advent__bar i{ display: block; height: 100%; background: linear-gradient(90deg, #ffd23f, #ff9f1c); }
.advent__count{ font-family: "Lilita One", var(--font-display); font-size: 1.05rem; }
.advent__star.is-lost{ filter: grayscale(0.85); }
.advent__star.is-lost strong{ color: #ff9a9a; }
/* The calendar sits in its snowy burrow (ui/advent-scene-*.webp, set by ui/adventPanel.ts on opening so they are not part of the first load). */
.overlay[data-game-advent]{ background: linear-gradient(rgba(10, 6, 32, 0.35), rgba(10, 6, 32, 0.55)), var(--advent-tall, none) center / cover no-repeat; }
@media (orientation: landscape){ .overlay[data-game-advent]{ background-image: linear-gradient(rgba(10, 6, 32, 0.35), rgba(10, 6, 32, 0.55)), var(--advent-wide, none); } }
