/* One 9:16 frame centered on any screen. Everything the clip needs is drawn in the canvas;
   these DOM screens are only for buttons and never appear in the recording. */
:root {
  --ink: #1b1530;
  --pop: #ffcb05;
  --go: #3ddc84;
  --bad: #ff4d6d;
  --display: 'Bricolage Grotesque', system-ui, -apple-system, sans-serif;

  /* Game HUD tokens. The HUD is drawn on the canvas (so it's in the recorded clip); render.js reads these. */
  --hud-ink: #141829;          /* outlines, extrusions, drop shadows */
  --hud-white: #ffffff;
  --hud-bevel: #d5dcec;        /* the lip along the bottom inside of a capsule */
  --hud-yellow: #ffcb05;
  --hud-yellow-deep: #ffa400;
  --hud-cyan: #7fe3ff;
  --hud-pale-cyan: #d9f7ff;
  --hud-green: #3ddc84;
  --hud-red: #ff4d6d;
  --hud-red-deep: #d52f52;
  --hud-pink: #ffa8cf;
  --hud-plate: rgba(20, 24, 41, 0.7);   /* dark translucent panels */
  --hud-plate-edge: rgba(255, 255, 255, 0.24);
  --hud-font-display: 'Lilita One';     /* big callouts */
  --hud-font: 'Fredoka';                /* numbers and labels */
  --toy-lip: #E6E2D2;                   /* the lip along the bottom inside of a white toy chip (info cards) */
  --toy-ink: #1E1E24;                   /* the toy cards' outline (Info & tips, Paused, Whale Mode, the canvas TIME! card) */
  --toy-cream: #FFF8E7;                 /* their warm cream surface */
  --toy-cream-lip: #EADFC0;             /* and the lip along its bottom inside */
  --hud-slate: #5A6280;                 /* a muted secondary pill on the dark panels (Quit to home) */
  --hud-slate-deep: #3E4560;            /* its lip */
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; background: var(--ink); color: #fff; font-family: var(--display); overflow: hidden; -webkit-user-select: none; user-select: none; touch-action: manipulation; }
/* the page runs under the notch (viewport-fit=cover): keep the game frame inside the safe area */
body { display: grid; place-items: center; padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); }

.frame { position: relative; height: min(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px), 177.78vw); aspect-ratio: 9 / 16; max-width: 100vw; overflow: hidden; container-type: size; }
#stage { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* the page can be pinch-zoomed (menus, rules, the entry form), but not the game itself mid-round */
#stage, .pause-btn, .stop-btn { touch-action: none; }
#cam { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
/* Stop: lines up with the top HUD row the canvas draws (7.5% down), inside the right safe line. Not in the recording. */
.stop-btn { position: absolute; z-index: 6; top: 9cqh; right: 13.9cqw; height: 4.8cqh; padding: 0 2cqh; display: flex; align-items: center; gap: 1cqh; font: 800 2.1cqh var(--display); color: var(--ink); background: #fff; border: .4cqh solid var(--ink); border-radius: 999px; box-shadow: 0 .5cqh 0 var(--ink); cursor: pointer; }
.stop-btn span { width: 1.5cqh; height: 1.5cqh; border-radius: .3cqh; background: #ff4d6d; }
/* Pause: a round navy button at the bottom center, under the watermark (DOM only, so it's not in the clip) */
.pause-btn { /* a small white capsule-style button in the top HUD row; main.js sets --pause-x/y/size from the canvas layout */
  position: absolute; z-index: 6; left: calc(var(--pause-x, 59) * 1cqw); top: calc(var(--pause-y, 7.5) * 1cqh); width: calc(var(--pause-size, 4.5) * 1cqh); height: calc(var(--pause-size, 4.5) * 1cqh);
  display: flex; align-items: center; justify-content: center; gap: .7cqh; padding: 0; border-radius: 50%;
  /* the timer pill's surface: white face, a cool bevel lip inside the bottom, the same ink border; a tighter drop
     than the pill's (it's a small circle), and the bars centred on the face above the lip */
  background: var(--hud-white); border: .31cqh solid var(--hud-ink); box-shadow: inset 0 -.7cqh 0 var(--hud-bevel), 0 .28cqh 0 var(--hud-ink); cursor: pointer; }
.pause-btn span { width: .7cqh; height: 1.7cqh; border-radius: .25cqh; background: var(--hud-ink); transform: translateY(-.15cqh); } /* (centred in the circle, nudged a hair up for its lip) */
.pause-btn:active { transform: translateY(.2cqh); box-shadow: inset 0 -.7cqh 0 var(--hud-bevel), 0 .08cqh 0 var(--hud-ink); }
/* Top 3 (start screen and pause menu): a small navy plate; quiet one-liner when empty or offline */
.board { padding: 1cqh 1.8cqh; border-radius: 1.8cqh; background: var(--hud-plate); border: .25cqh solid var(--hud-plate-edge); color: #fff; font: 600 1.6cqh var(--hud-font), var(--display); text-align: left; }
.board-title { margin: 0 0 .4cqh; font: 400 1.7cqh var(--hud-font-display), var(--display); letter-spacing: .04em; color: var(--hud-yellow); text-align: center; }
.board ol { margin: 0; padding: 0 0 0 2.4cqh; display: flex; flex-direction: column; gap: .2cqh; }
.board li { padding-left: .4cqh; }
.board li::marker { color: var(--hud-yellow); font-weight: 700; }
.board li span { display: inline-block; max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.board li b { float: right; margin-left: 1.5cqh; font-weight: 700; }
.board-empty { margin: 0; text-align: center; opacity: .75; font-size: 1.45cqh; }
/* The start screen's two top cards (fun fact on the left, top 3 on the right): a light ice-periwinkle toy card with
   dark ink text (high contrast, like the how-to card), the same even ink
   border as the rest of the start screen with a top highlight and a 3D shade inside it, and a candy-gold ribbon tab
   riding the top edge (the fact's warm gold, the board's orange-gold). */
#startScreen .board, #startScreen .fact { position: absolute; top: 3.4cqh; width: 43cqw; padding: 1.9cqh 1.4cqh .9cqh; border-radius: 2.2cqh; color: #fff;
  background: var(--card-light); color: #1E1E24; border: .4cqh solid #1E1E24;
  box-shadow: var(--card-lip), 0 .5cqh 1.2cqh rgba(0, 0, 0, .15); }
#startScreen .board li::marker { color: #C27A00; }
/* the way to the full board: a small tab hanging off the card's bottom right (mirrors the title tab on top), so the
   card stays as short as the fun fact card and its bottom left corner clears the logo */
#startScreen .board-more { position: absolute; right: 1.2cqh; bottom: -1.5cqh; padding: .2cqh 1cqh .3cqh; white-space: nowrap;
  font: 700 1.15cqh var(--hud-font), var(--display); color: #fff; text-decoration: none;
  background: #2E5BD6; border: .3cqh solid #1E1E24; border-radius: 999px; box-shadow: inset 0 .3cqh 0 rgba(255, 255, 255, .35); }
#startScreen .board { right: 2.8cqw; font-size: 1.35cqh; line-height: 1.22; }
#startScreen .board-empty { font-size: 1.3cqh; opacity: 1; color: #1E1E24; }
#startScreen .fact { left: 2.8cqw; }
/* the corner pills (top left: info & tips, top right: the leaderboard's #1): one line each, the same height, cream on
   the dark outline with the arcade lip, so the top of the screen is two small buttons and open sky */
#startScreen .corner-pill { position: absolute; top: 3.2cqh; left: 2.8cqw; z-index: 2; display: flex; align-items: center; gap: .8cqh;
  max-width: 46cqw; height: 4.8cqh; padding: 0 1.8cqh; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: pointer;
  font: 700 1.55cqh var(--hud-font), var(--display); letter-spacing: .04em; text-transform: uppercase; color: #1E1E24;
  background: linear-gradient(#FFF6D6, #FFE28A); border: .4cqh solid #1E1E24; border-radius: 999px;
  box-shadow: inset 0 .35cqh 0 rgba(255, 255, 255, .8), inset 0 -.45cqh 0 rgba(190, 130, 0, .35), 0 .5cqh 0 #1E1E24; }
#startScreen .corner-pill.right { left: auto; right: 2.8cqw; }
#startScreen .corner-pill .ico { flex: none; display: inline-flex; width: 2.3cqh; height: 2.3cqh; }
#startScreen .corner-pill .ico svg { width: 100%; height: 100%; }
#startScreen .corner-pill:active { transform: translateY(.3cqh); box-shadow: inset 0 .35cqh 0 rgba(255, 255, 255, .8), 0 .2cqh 0 #1E1E24; }
#topLabel { overflow: hidden; text-overflow: ellipsis; }
#startScreen .fact:has(.info-tab) { padding-bottom: 1.9cqh; } /* room for the tab hanging off its bottom */
#startScreen .info-tab { right: auto; left: 1.2cqh; cursor: pointer; background: #7A3FE0; }
/* How it works: a light card of rows, a Pokémon's picture beside what it does */
/* THE POP-UPS (Info & tips, Leaderboard): the home screen's toy look. A cream card with a thick ink outline, a lip and a
   hard drop; the title a glossy gold pill hanging over its top edge; tabs, podium and rows are chunky outlined pieces. */
#infoScreen, #boardScreen, #hardIntro, #compIntro, #pauseScreen { background: rgba(20, 24, 41, .62); }
.info-card { --ink: var(--toy-ink); --card-btn-edge: .45cqh; --card-btn-drop: .6cqh; --card-btn-press: .4cqh; position: relative; width: 86cqw; max-height: 84cqh; display: flex; flex-direction: column; gap: 1.4cqh; padding: 3.6cqh 4cqw 2.4cqh; margin-top: 2cqh;
  border-radius: 3cqh; background: var(--toy-cream); color: var(--ink); border: .45cqh solid var(--ink); text-align: left;
  box-shadow: inset 0 .45cqh 0 #fff, inset 0 -.7cqh 0 var(--toy-cream-lip), 0 .8cqh 0 var(--ink); }
/* the scroll area fades out at its edges instead of slicing a card along a hard line; its padding is as deep as the
   fades, so at either end of the scroll the first and last cards sit clear of them */
.info-card .card-scroll, .info-card #boardBody { --fade-top: 1.2cqh; --fade-bottom: 3cqh; flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 1.4cqh;
  padding: var(--fade-top) .4cqh var(--fade-bottom); margin: 0 -.4cqh; scroll-padding-block: var(--fade-top) var(--fade-bottom);
  -webkit-mask-image: linear-gradient(transparent, #000 var(--fade-top), #000 calc(100% - var(--fade-bottom)), transparent);
  mask-image: linear-gradient(transparent, #000 var(--fade-top), #000 calc(100% - var(--fade-bottom)), transparent); }
.info-card .card-scroll + .btn { margin-top: .6cqh; } /* (a little air between the fade and Got it) */
.info-card h2.toy-tab { position: absolute; top: -2.6cqh; left: 0; right: 0; width: max-content; max-width: 90%; margin: 0 auto; display: flex; align-items: center; gap: .9cqh;
  padding: .5cqh 2.2cqh .7cqh 1.6cqh; white-space: nowrap; font: 400 2.8cqh var(--hud-font-display), var(--display); letter-spacing: .05em; text-transform: uppercase;
  color: var(--ink); background: linear-gradient(#FFE033, #FFB800); border: .45cqh solid var(--ink); border-radius: 999px;
  box-shadow: inset 0 .4cqh 0 rgba(255, 255, 255, .6), inset 0 -.45cqh 0 #D48800, 0 .5cqh 0 var(--ink); }
.info-card h2.toy-tab .ico { display: inline-flex; width: 3.4cqh; height: 3.4cqh; flex: none; }
.info-card h2.toy-tab .ico :is(img, svg) { width: 100%; height: 100%; }
.info-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1cqh; }
.info-list li { display: flex; align-items: center; gap: 3cqw; padding: .8cqh 1.4cqh; background: #fff; border: .3cqh solid var(--ink); border-radius: 2cqh; box-shadow: inset 0 -.4cqh 0 #E6E2D2; }
.info-list img { width: 6.6cqh; height: 6.6cqh; object-fit: contain; flex: none; }
.say-balls { flex: none; width: 6.6cqh; height: 6.6cqh; position: relative; }
.say-balls i { position: absolute; display: grid; place-items: center; width: 3.3cqh; height: 3.3cqh; font: 400 1.9cqh var(--hud-font-display), var(--display); font-style: normal; color: #1E1E24;
  background: linear-gradient(#FFF3B0, #FFC700); border: .28cqh solid #1E1E24; border-radius: 50%; box-shadow: inset 0 .25cqh 0 rgba(255, 255, 255, .7); }
.say-balls i:nth-child(1) { left: 0; top: 2.6cqh; } .say-balls i:nth-child(2) { left: 1.65cqh; top: .4cqh; } .say-balls i:nth-child(3) { left: 3.3cqh; top: 2.2cqh; }
.info-list p { margin: 0; font: 600 1.55cqh/1.3 var(--hud-font), var(--display); }
.info-list b:first-child { display: block; font: 400 2cqh var(--hud-font-display), var(--display); }
.info-card .btn { align-self: center; min-width: 40cqw; padding: 1.3cqh 4cqw; font: 400 3cqh var(--hud-font-display), var(--display); border: var(--card-btn-edge) solid var(--ink); box-shadow: 0 var(--card-btn-drop) 0 var(--ink); }
.info-card .btn:active { transform: translateY(var(--card-btn-press)); box-shadow: 0 calc(var(--card-btn-drop) - var(--card-btn-press)) 0 var(--ink); } /* (the same chunky face as Resume, Restart, End round) */
.info-card h3 { align-self: flex-start; margin: .4cqh 0 0; padding: .2cqh 1.4cqh .35cqh; font: 400 1.9cqh var(--hud-font-display), var(--display); letter-spacing: .04em; text-transform: uppercase;
  color: #fff; background: var(--sky-slate, linear-gradient(180deg, #7C8CB5, #66769E)); border: .3cqh solid var(--ink); border-radius: 999px; text-shadow: 0 .15cqh 0 var(--ink); box-shadow: inset 0 .3cqh 0 rgba(255, 255, 255, .35); }
/* the rotating Did you know? / Pro tip */
.tip-card, .info-card .callout { padding: 1.2cqh 1.8cqh 1.4cqh; border-radius: 2cqh; background: linear-gradient(#FFF1BF, #FFE28A); border: .35cqh solid var(--ink); box-shadow: inset 0 .35cqh 0 rgba(255, 255, 255, .8), inset 0 -.45cqh 0 rgba(190, 130, 0, .35), 0 .4cqh 0 var(--ink); }
.tip-card { cursor: pointer; }
.tip-card p, .info-card .callout { margin: 0; font: 600 1.6cqh/1.3 var(--hud-font), var(--display); }
.info-card .callout b { font-weight: 700; }
.tip-card .tip-head { display: flex; align-items: center; justify-content: space-between; gap: 1.2cqh; margin-bottom: .6cqh; }
.tip-card .tip-kind { font: 400 1.9cqh var(--hud-font-display), var(--display); color: #A85F00; }
/* Next tip: a small white toy chip with an ink outline and a lip that presses down - smaller than the HOW IT WORKS pill and
   the Got it button. It presses with the card too, since tapping anywhere on the card does the same (main.js) */
.tip-card .tip-next { position: relative; flex: none; display: inline-flex; align-items: center; gap: .5cqh; padding: .35cqh 1.2cqh .5cqh;
  font: 700 1.45cqh var(--hud-font), var(--display); color: var(--ink); background: var(--hud-white); border: .28cqh solid var(--ink); border-radius: 999px;
  box-shadow: inset 0 -.35cqh 0 var(--toy-lip), 0 .3cqh 0 var(--ink); cursor: pointer; transition: transform .06s, box-shadow .06s; }
.tip-card .tip-next::before { content: ''; position: absolute; inset: -1.2cqh -1cqh; } /* a bigger tap target than it looks */
.tip-card:active .tip-next, .tip-card .tip-next:active { transform: translateY(.25cqh); box-shadow: inset 0 -.2cqh 0 var(--toy-lip), 0 .05cqh 0 var(--ink); }
.tip-card .tip-next:focus-visible { outline: .3cqh solid var(--ink); outline-offset: .3cqh; }
.rules { margin: 0; padding: 1.2cqh 1.6cqh 1.2cqh 3.6cqh; display: flex; flex-direction: column; gap: .6cqh; font: 600 1.55cqh/1.3 var(--hud-font), var(--display);
  background: #fff; border: .3cqh solid var(--ink); border-radius: 2cqh; box-shadow: inset 0 -.4cqh 0 #E6E2D2; }
/* the leaderboard: Normal / Whale Mode as two chunky pills in an ink track, the pressed one gold */
.board-tabs { display: flex; gap: .6cqh; padding: .5cqh; background: var(--ink); border-radius: 999px; }
.board-tabs button { flex: 1; padding: .9cqh .6cqh 1.1cqh; font: 400 1.85cqh var(--hud-font-display), var(--display); letter-spacing: .04em; text-transform: uppercase; cursor: pointer;
  border: 0; border-radius: 999px; background: #5A6280; color: #D9DDF0; box-shadow: inset 0 -.35cqh 0 rgba(0, 0, 0, .25); }
.board-tabs button.on { color: var(--ink); background: linear-gradient(#FFE033, #FFB800); box-shadow: inset 0 .35cqh 0 rgba(255, 255, 255, .6), inset 0 -.4cqh 0 #D48800; }
/* the top 3 on podium blocks of three heights, gold in the middle; a round medal on top, the score on a dark chip */
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 1cqh; margin-top: 2.4cqh; flex: none; }
.podium div { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: .6cqh; padding: 2.8cqh .6cqh 1.2cqh;
  border: .4cqh solid var(--ink); border-radius: 1.8cqh 1.8cqh .8cqh .8cqh; font: 700 1.45cqh var(--hud-font), var(--display); box-shadow: inset 0 .4cqh 0 rgba(255, 255, 255, .65), inset 0 -.6cqh 0 rgba(0, 0, 0, .14), 0 .5cqh 0 var(--ink); }
.podium div span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium div b { padding: .2cqh 1cqh .35cqh; font: 400 1.9cqh var(--hud-font-display), var(--display); color: #fff; background: var(--ink); border-radius: 999px; }
.podium .medal { position: absolute; top: -2.3cqh; display: grid; place-items: center; width: 4.2cqh; height: 4.2cqh; font: 400 2.3cqh var(--hud-font-display), var(--display); font-style: normal;
  color: var(--ink); border: .38cqh solid var(--ink); border-radius: 50%; box-shadow: inset 0 .3cqh 0 rgba(255, 255, 255, .7), inset 0 -.35cqh 0 rgba(0, 0, 0, .2); }
.podium .p1 { background: linear-gradient(#FFE45C, #FFC21A); padding-top: 4.4cqh; } .podium .p1 .medal { background: #FFD000; width: 5cqh; height: 5cqh; top: -2.7cqh; font-size: 2.7cqh; }
.podium .p2 { background: linear-gradient(#F4F6FF, #D3D9EC); padding-top: 3.4cqh; } .podium .p2 .medal { background: #E3E7F5; }
.podium .p3 { background: linear-gradient(#FBD9B4, #EBAE78); } .podium .p3 .medal { background: #F0B47E; }
/* the rest of the top 25 as white outlined pills, the rank on a little round badge */
.ranks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .8cqh; font: 700 1.55cqh var(--hud-font), var(--display); }
.ranks li { display: flex; align-items: center; gap: 1.2cqh; padding: .55cqh 1.4cqh .55cqh .6cqh; background: #fff; border: .3cqh solid var(--ink); border-radius: 999px; box-shadow: inset 0 -.35cqh 0 #E6E2D2; }
.ranks li i { flex: none; display: grid; place-items: center; width: 3.2cqh; height: 3.2cqh; font: 400 1.6cqh var(--hud-font-display), var(--display); font-style: normal; color: #fff; background: #7C8CB5; border: .25cqh solid var(--ink); border-radius: 50%; }
.ranks li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranks li b { font: 400 1.8cqh var(--hud-font-display), var(--display); }
.board-none { text-align: center; font: 600 1.6cqh var(--hud-font), var(--display); padding: 2cqh 0; }
.info-card .board-full { font-size: 1.8cqh; text-decoration: none; } /* (the white secondary pill, a size down so it never competes with the yellow Close; ↗ as it opens a new tab) */
#startScreen .fact p { margin: 0; font: 600 1.3cqh/1.22 var(--hud-font), var(--display); }
#startScreen .board .board-title, #startScreen .fact .board-title { position: absolute; top: -1.8cqh; left: 0; right: 0; width: max-content; margin: 0 auto; padding: .35cqh 1.4cqh .45cqh;
  white-space: nowrap; font: 400 1.6cqh var(--hud-font-display), var(--display); letter-spacing: .05em; text-transform: uppercase;
  color: #1E1E24; background: #FFC000; border: .35cqh solid #1E1E24; border-radius: 999px; text-shadow: none;
  box-shadow: inset 0 .35cqh 0 rgba(255, 255, 255, .55), inset 0 -.3cqh 0 rgba(160, 90, 0, .3); }
#startScreen .board .board-title { background: #FF9F00; }
/* the sticker icons (js/icons.js) sit centred on the text line, a bit bigger than the letters */
.icon { display: inline-block; width: 1.5em; height: 1.5em; vertical-align: -.38em; overflow: visible; object-fit: contain; }
.end .board-save { align-self: center; display: flex; align-items: center; gap: 1cqw; width: 70cqw; padding: .5cqh .5cqh .5cqh 1.6cqh; background: #fff; border: .35cqh solid var(--ink); border-radius: 999px; box-shadow: 0 .4cqh 0 var(--ink); }
.end .board-save .at { font: 700 2cqh var(--hud-font), var(--display); color: var(--ink); opacity: .6; }
.end .board-save input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: 700 2cqh var(--hud-font), var(--display); color: var(--ink); }
.end .board-save .btn { min-width: 0; padding: .9cqh 2.4cqh; font-size: 1.9cqh; }
.end .rank { align-self: center; margin: 0 0 .4cqh; padding: .6cqh 1.8cqh; border-radius: 999px; font: 700 1.8cqh var(--hud-font), var(--display); color: #fff; background: var(--hud-plate); border: .25cqh solid var(--hud-plate-edge); }
.stop-btn:active { transform: translateY(.4cqh); box-shadow: 0 .1cqh 0 var(--ink); }

.screen { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2.2vh; text-align: center; padding: 13% 9% 15% 6%; background: rgba(27, 21, 48, .62); }
/* Results: the buttons start just under the canvas's TIME! panel (it ends ~47% down) and stay above the
   watermark badge (~82% down). Arcade type and the HUD's navy ink; yellow = the one thing to do next. */
.screen.end { background: none; justify-content: flex-start; padding: calc(var(--result-bottom, 57.6) * 1cqh + 2.4cqh) 0 0; } /* right under the canvas TIME! card */
.end-actions { width: 70cqw; display: flex; flex-direction: column; align-items: stretch; gap: 1.2cqh; }
.end-row { display: flex; gap: 2.5cqw; }
.end-row .btn { flex: 1; }
.end .btn { min-width: 0; padding: 1.1cqh 0; font: 400 2.8cqh var(--hud-font-display), var(--display); letter-spacing: .02em; color: var(--hud-ink); border: .45cqh solid var(--hud-ink); box-shadow: 0 .6cqh 0 var(--hud-ink); }
.end .btn:active { transform: translateY(.4cqh); box-shadow: 0 .2cqh 0 var(--hud-ink); }
.end .btn:not(.white) { background: var(--hud-yellow); }
.end .entered, .end .fine, .end .link { align-self: center; }
.end .entered { font: 700 1.9cqh var(--hud-font), var(--display); border-color: var(--hud-ink); }
.end .fine { font: 600 1.5cqh var(--hud-font), var(--display); color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .7); opacity: 1; }
.end .link { font: 600 1.6cqh var(--hud-font), var(--display); }
.replay { /* over Snorlax on the top edge of the canvas TIME! card (--result-top): 15% of the frame tall, one sprite cell wide */
  position: absolute; left: 50%; bottom: calc(100cqh - var(--result-top, 27) * 1cqh - 1.4cqh); height: 15cqh; aspect-ratio: var(--sprite-aspect, 1.09);
  transform: translateX(-50%); padding: 0; border: 0; background: none; pointer-events: none; }
/* Snorlax himself is drawn on the canvas (render.js) so he's in the saved clip. Only his round cream belly takes the
   tap (the rest of the button lets touches through), and the tap bubbles up to the button. */
.replay-belly { position: absolute; left: 24%; right: 22%; top: 40%; bottom: 6%; border-radius: 50%; pointer-events: auto; cursor: pointer; }
/* no grey tap-highlight box over him on phones, and no focus ring on a tap (a keyboard still gets one) */
.replay, .replay-belly { -webkit-tap-highlight-color: transparent; }
.replay:focus:not(:focus-visible) { outline: none; }
/* his sign, centred above his head */
.replay-tag { position: absolute; left: -40%; right: -40%; bottom: 96%; width: max-content; max-width: 180%; margin: 0 auto; padding: .45cqh 1.2cqh .55cqh; text-align: center; line-height: 1.15; white-space: nowrap;
  font: 700 1.5cqh var(--hud-font), var(--display); color: var(--hud-ink); background: #fff; border: .25cqh solid var(--hud-ink); border-radius: 1.6cqh;
  box-shadow: 0 .3cqh 0 var(--hud-ink); transform: rotate(-3deg); pointer-events: none; }
.replay-tag b { color: #e5383b; }
/* while he sings he gets wound up about it */
.replay.singing .replay-tag { animation: bellyShake .35s ease-in-out infinite; }
@keyframes bellyShake { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg) scale(1.05); } }
@media (prefers-reduced-motion: reduce) { .replay.singing .replay-tag { animation: none; } }
.end .data-link { position: absolute; left: 50%; bottom: 1.5cqh; transform: translateX(-50%); font-size: 1.25cqh; font-weight: 500; opacity: .45; text-shadow: none; white-space: nowrap; }

/* Start screen: a looping 9:16 art video (assets/start.mp4) fills the frame, and the real controls sit
   on top at fixed frame positions (cqh/cqw), matching where the video draws its panel and START button. */
/* the still frame sits behind the video, so it shows while loading or if the phone won't autoplay (Low Power Mode) */
#startScreen { --ink: #16204d; display: block; padding: 0; background: #ead9f2 url(../assets/start.jpg) center / cover no-repeat; }
.start-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; pointer-events: none; }
#startScreen.still .start-video { visibility: hidden; }
/* never show iOS Safari's own play button over the background video */
.start-video::-webkit-media-controls,
.start-video::-webkit-media-controls-start-playback-button,
.start-video::-webkit-media-controls-overlay-play-button { display: none !important; -webkit-appearance: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#startScreen .logo { position: absolute; top: 12.6cqh; left: 50%; width: 17cqw; height: auto; transform: translateX(-50%); filter: drop-shadow(0 .5cqh .8cqh rgba(0, 0, 0, .3)); }
#startScreen .err { position: absolute; top: 44.5cqh; left: 10cqw; right: 10cqw; padding: .8cqh 1.6cqh; font-size: 1.7cqh; color: #c2183c; background: #fff; border: .4cqh solid var(--ink); border-radius: 1.6cqh; max-width: none; }
/* the how-to panel: warm cream, one even ink border, its 3D lip inside it, covering the "Yell to fly." bar drawn at
   69-76% of the height. (Toy-button rule for the whole start screen: the ink border is the same all the way round and
   the 3D depth lives inside it as inset shadows; outside it, only a soft diffused shadow, never a solid dark ledge,
   which merges with the bottom border and reads as one heavy black slab.) */
#startScreen .how { position: absolute; left: 8.5cqw; right: 8.5cqw; bottom: 24.2cqh; max-width: none; display: flex; flex-direction: column; gap: .3cqh; padding: .5cqh 1.4cqh .5cqh;
  font-size: 1.75cqh; line-height: 1.28; color: #1E1E24; background: #FFFDF0; border: .55cqh solid #1E1E24; border-radius: 2.6cqh;
  box-shadow: inset 0 .4cqh 0 #fff, inset 0 -.6cqh 0 #E2DEC9, 0 .6cqh 1.4cqh rgba(0, 0, 0, .15); }
/* the secondary cards and pills share one airy periwinkle sky-slate: the colour, its top highlight, and the hard
   little ink drop shadow on their white and gold lettering */
#startScreen { --sky-slate: linear-gradient(180deg, #7C8CB5 0%, #66769E 100%); --sky-hi: inset 0 .3cqh 0 rgba(255, 255, 255, .35); --sky-text: 0 .15cqh 0 #1E1E24;
  /* the light toy-card surface the info cards use (fact, top 3, giveaway): ice-periwinkle with dark ink text */
  --card-light: #F4F6FF; --card-lip: inset 0 -.55cqh 0 #DCE2F2, inset 0 .3cqh 0 #fff; }
/* 15K GIVEAWAY: a light toy card (dark text, the prizes on gold pills) with a gold ribbon, in the slot where the start video draws its "Yell to fly."
   bubble (pulsing out to ~31-71% wide, ~57-66% high) between Doduo and the mic, resting on the how-to card, which
   covers the rest of it. Opaque, so none of the drawn bubble shows; the prizes on two lines to stay narrow. */
#startScreen .giveaway { position: absolute; z-index: 1; left: 30.4cqw; width: 41.8cqw; top: 55.1cqh; height: 7cqh; display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding: 0 1.2cqw .75cqh; background: var(--card-light); border: .4cqh solid #1E1E24; border-radius: 1.8cqh; box-shadow: var(--card-lip); pointer-events: none; }
#startScreen .gw-title { position: absolute; top: -1.55cqh; left: 50%; width: max-content; margin: 0; transform: translateX(-50%); padding: .2cqh 1cqh .3cqh; display: flex; align-items: center; gap: .4cqh; white-space: nowrap; text-decoration: none; pointer-events: auto; cursor: pointer; font: 400 1.45cqh var(--hud-font-display), var(--display); letter-spacing: .045em; text-transform: uppercase;
  color: #1E1E24; background: linear-gradient(#FFE033, #FFB800); border: .35cqh solid #1E1E24; border-radius: 999px; box-shadow: inset 0 .3cqh 0 rgba(255, 255, 255, .55), inset 0 -.35cqh 0 #D48800; }
#startScreen .gw-prizes { display: flex; flex-direction: column; align-items: center; gap: .3cqh; margin: 0; white-space: nowrap; font: 700 1.25cqh/1.2 var(--hud-font), var(--display); color: #1E1E24; }
#startScreen .gw-prizes b { display: inline-block; margin-left: .3cqh; padding: 0 .8cqh .1cqh; color: #1E1E24; background: #FFD83B; border-radius: 999px; box-shadow: inset 0 0 0 .18cqh rgba(30, 30, 36, .35); }
/* the header pill links to Instagram: its camera and an ↗ in ink, and a press-down */
#startScreen .gw-title svg { width: 1.4cqh; height: 1.4cqh; flex: none; color: #1E1E24; }
#startScreen .gw-title i { font-style: normal; font-size: 1.2cqh; line-height: 1; }
#startScreen .gw-title:active { transform: translate(-50%, .2cqh); box-shadow: inset 0 .3cqh 0 rgba(255, 255, 255, .55), inset 0 -.15cqh 0 #D48800; }
@media (hover: hover) { #startScreen .gw-title:hover { filter: brightness(1.05); } }
/* the sliver of sky between the giveaway card and the how-to card: the video's sky lavender, behind both cards, so the
   drawn bubble under it never shows in the gap */
#startScreen .gw-mask { position: absolute; left: 30.4cqw; width: 41.8cqw; top: 59.5cqh; height: 4.5cqh; background: rgb(228, 207, 235); border-radius: 1cqh; }
/* the controls as a legend, not buttons: two full-width strips stacked (soft gold for up, soft sky blue for down),
   each an icon and one line of bold text, with only a thin soft border and no 3D lip. START and WHALE MODE stay the
   only things that look pressable. */
#startScreen .ctl-row { display: flex; flex-direction: column; gap: .8cqh; padding: .3cqh 0; } /* room for the medallions' overhang */
#startScreen .ctl { display: flex; align-items: center; gap: 1.6cqw; padding: .12cqh 2.4cqw .12cqh 0; overflow: visible; color: #1E1E24; border-radius: 999px; border: .2cqh solid rgba(30, 30, 36, .22); white-space: nowrap; }
#startScreen .ctl.up { background: #FFF0B8; }
#startScreen .ctl.down { background: #D9F3FF; }
/* the round medallion sits on the strip's left end like a pin badge: flush with its rounded cap (overhanging it a touch),
   bigger than the strip so it overlaps the top and bottom edges, with ~10px of room before the text */
#startScreen .ctl .icon { width: 3.4cqh; height: 3.4cqh; margin: -.6cqh calc(1.5cqh - 1.6cqw) -.6cqh -.5cqh; flex: none; }
#startScreen .ctl-key { font: 400 1.7cqh var(--hud-font-display), var(--display); letter-spacing: .03em; }
#startScreen .ctl b { font: 700 1.45cqh var(--hud-font), var(--display); opacity: .75; }
/* the goal: flat little sticker pills under a dashed divider */
#startScreen .goal-row { display: flex; flex-wrap: nowrap; justify-content: center; gap: .6cqh 1.6cqw; padding-top: .3cqh; border-top: .2cqh dashed rgba(22, 32, 77, .28); }
#startScreen .goal { white-space: nowrap; padding: .15cqh 1.1cqh .2cqh .7cqh; font: 400 1.45cqh var(--hud-font-display), var(--display); letter-spacing: .03em; color: #1E1E24; background: #DDF2FF; border: .3cqh solid #1E1E24; border-radius: 999px; box-shadow: inset 0 .25cqh 0 #fff; }
#startScreen .goal.gold { color: #1E1E24; background: #FFC700; text-shadow: none; }
/* the video's sky between the how-to card and START is an even lavender (sampled ~rgb(228,207,235)); this strip of it,
   feathered at both ends, hides the old drawn START's rounded top corners in that gap */
#startScreen .sky-patch { position: absolute; left: 16cqw; right: 16cqw; top: 75.6cqh; height: 1.9cqh; background: rgb(228, 207, 235);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
/* START!: a big bulging candy-gold capsule laid exactly over (and hiding) the softer START drawn in the video
   (77.5-86.6% high with its lip, 21.5-78.5% wide): one even thick ink border, a white top sheen and an amber 3D lip
   inside it, and a slow bounce that stops when you press it (the press squashes the lip) */
#startScreen #startBtn { position: absolute; top: 77.3cqh; left: 20.5cqw; width: 59cqw; height: 9.5cqh; min-width: 0; padding: 0 0 .7cqh;
  font: 400 4.7cqh var(--hud-font-display), var(--display); letter-spacing: .06em; text-transform: uppercase;
  /* outlined arcade lettering like the SOUND DASH logo: cream fill, thick ink stroke behind it, a hard drop shadow */
  color: #FFF3B0; -webkit-text-stroke: .7cqh #1E1E24; paint-order: stroke fill; text-shadow: 0 .45cqh 0 #1E1E24;
  background: linear-gradient(#FFD000, #FF9000); border: .75cqh solid #1E1E24; border-radius: 999px;
  box-shadow: inset 0 .45cqh 0 rgba(255, 255, 255, .65), inset 0 -.9cqh 0 #D48800, 0 .6cqh 1.4cqh rgba(0, 0, 0, .15);
  animation: startBob 1.8s ease-in-out infinite; }
#startScreen #startBtn:active { animation: none; transform: translateY(.4cqh); box-shadow: inset 0 .45cqh 0 rgba(255, 255, 255, .65), inset 0 -.45cqh 0 #D48800, 0 .2cqh .6cqh rgba(0, 0, 0, .15); }
#startScreen #startBtn:disabled { opacity: .7; animation: none; }
@keyframes startBob { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-.35cqh) scale(1.025); } }
.start-more { position: absolute; top: 88.4cqh; left: 8cqw; right: 8cqw; display: flex; flex-direction: column; align-items: center; gap: .5cqh; }
/* WHALE MODE: the same toy treatment in cool ice (an ice-blue lip inside an even ink border), its lettering icy blue with an ink stroke */
#startScreen #hardBtn { width: 57cqw; min-width: 0; padding: .6cqh 0 .9cqh; font: 400 2.7cqh var(--hud-font-display), var(--display); letter-spacing: .05em; text-transform: uppercase;
  color: #9AD9FF; -webkit-text-stroke: .5cqh #1E1E24; paint-order: stroke fill; text-shadow: 0 .3cqh 0 #1E1E24;
  background: linear-gradient(#F6FCFF, #D3ECFF); border: .65cqh solid #1E1E24; border-radius: 999px;
  box-shadow: inset 0 .3cqh 0 rgba(255, 255, 255, .8), inset 0 -.6cqh 0 #9CC5E8, 0 .6cqh 1.4cqh rgba(0, 0, 0, .15); }
#startScreen #hardBtn:active { transform: translateY(.3cqh); box-shadow: inset 0 .3cqh 0 rgba(255, 255, 255, .8), inset 0 -.3cqh 0 #9CC5E8, 0 .2cqh .6cqh rgba(0, 0, 0, .15); }
/* the mode row (2026-11-06): Whale Mode and Competitive side by side under START, each half the width it had alone */
#startScreen .mode-row { display: flex; gap: 2.4cqw; width: 84cqw; justify-content: center; }
#startScreen .mode-row #hardBtn, #startScreen .mode-row #compBtn { flex: 1; width: auto; font-size: 2.2cqh; letter-spacing: .03em; padding: .7cqh 0 1cqh; }
#startScreen .mode-row .ico { display: inline-flex; width: 2.6cqh; height: 2.6cqh; vertical-align: -.5cqh; }
#startScreen .mode-row .ico :is(img, svg) { width: 100%; height: 100%; }
/* Whale Mode before you've beaten Normal: greyed, with a lock (a tap says how to unlock it) */
#startScreen #hardBtn.locked { color: #C9CEDF; background: linear-gradient(#EEF0F6, #D9DCE6); box-shadow: inset 0 .3cqh 0 rgba(255, 255, 255, .8), inset 0 -.6cqh 0 #B8BDCC, 0 .6cqh 1.4cqh rgba(0, 0, 0, .15); }
/* COMPETITIVE: the same toy button in sky blue (its briefing's tab colour), white lettering with an ink stroke */
#startScreen #compBtn { min-width: 0; font: 400 2.2cqh var(--hud-font-display), var(--display); text-transform: uppercase;
  color: #fff; -webkit-text-stroke: .5cqh #1E1E24; paint-order: stroke fill; text-shadow: 0 .3cqh 0 #1E1E24;
  background: linear-gradient(#9AE8FF, #3FB8F0); border: .65cqh solid #1E1E24; border-radius: 999px;
  box-shadow: inset 0 .3cqh 0 rgba(255, 255, 255, .6), inset 0 -.6cqh 0 #1F8FC8, 0 .6cqh 1.4cqh rgba(0, 0, 0, .15); }
#startScreen #compBtn:active { transform: translateY(.3cqh); box-shadow: inset 0 .3cqh 0 rgba(255, 255, 255, .6), inset 0 -.3cqh 0 #1F8FC8, 0 .2cqh .6cqh rgba(0, 0, 0, .15); }
#startScreen .lock { margin: 0; padding: .5cqh 2cqh; font-size: 1.65cqh; opacity: 1; color: #fff; text-shadow: var(--sky-text); background: var(--sky-slate); border: .35cqh solid #1E1E24; border-radius: 999px; box-shadow: var(--sky-hi); }
#startScreen .lock b { color: var(--pop); }
#startScreen .lock svg { height: 1.7cqh; width: auto; vertical-align: -.25cqh; margin-right: .3cqh; }
/* the camera / mic note: dark ink on a soft frosted pill, readable on the bright clouds without pulling focus from START */
#startScreen .fine { margin: 0; padding: .45cqh 1.4cqh; font: 600 1.15cqh/1.3 var(--hud-font), var(--display); max-width: none; white-space: nowrap; opacity: 1; color: rgba(30, 30, 36, .8); text-shadow: none;
  background: rgba(255, 255, 255, .55); border: 1.5px solid rgba(30, 30, 36, .18); border-radius: 999px; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
#startScreen .fine { display: flex; align-items: center; gap: .8cqh; padding-left: .45cqh; }
/* its Camera switch (main.js camOn): a small toy pill, grey when off, mint when on */
#startScreen .cam-pill { display: inline-flex; align-items: center; gap: .5cqh; padding: .15cqh 1cqh .2cqh .5cqh; cursor: pointer;
  font: 400 1.3cqh var(--hud-font-display), var(--display); letter-spacing: .04em; text-transform: uppercase; color: #1E1E24;
  background: #E4E6EE; border: .25cqh solid #1E1E24; border-radius: 999px; box-shadow: inset 0 .2cqh 0 #fff, 0 .2cqh 0 #1E1E24; }
#startScreen .cam-pill b { font-weight: 400; color: #8A90A6; }
#startScreen .cam-pill[aria-pressed="true"] { background: #B8F5C8; }
#startScreen .cam-pill[aria-pressed="true"] b { color: #138A3A; }
#startScreen .cam-pill .ico { display: inline-flex; width: 1.7cqh; height: 1.7cqh; }
#startScreen .cam-pill .ico svg { width: 100%; height: 100%; }
#startScreen .cam-pill:active { transform: translateY(.2cqh); box-shadow: inset 0 .2cqh 0 #fff; }
.kicker { margin: 0; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; font-size: 13px; }
.how { margin: 0; font-size: clamp(16px, 2.6dvh, 22px); line-height: 1.35; font-weight: 500; max-width: 24ch; }
.fine { margin: 0; font-size: 13px; opacity: .85; max-width: 30ch; line-height: 1.35; }
.lock { opacity: .75; }
.tagline { margin: -1vh 0 0; font-weight: 800; font-size: clamp(18px, 3dvh, 26px); letter-spacing: .02em; }
.err { margin: 0; color: #ffd0d8; font-weight: 800; max-width: 30ch; }

.btn { font: 800 clamp(18px, 2.8dvh, 22px) var(--display); min-width: 220px; padding: 14px 30px; border-radius: 999px; border: 3px solid var(--ink); background: var(--pop); color: var(--ink); box-shadow: 0 6px 0 var(--ink); cursor: pointer; }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }
.btn:focus-visible, .link:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
/* the secondary toy pill (Quit to home, Back): a smaller capsule in the display face, with a lip that presses down */
.pill-btn { --pill-bg: var(--hud-white); --pill-fg: var(--ink); --pill-lip: var(--toy-lip); --pill-edge: var(--ink);
  align-self: center; padding: .7cqh 2.6cqh .9cqh; font: 400 2.1cqh var(--hud-font-display), var(--display); letter-spacing: .03em; color: var(--pill-fg);
  background: var(--pill-bg); border: .35cqh solid var(--pill-edge); border-radius: 999px; box-shadow: inset 0 -.45cqh 0 var(--pill-lip), 0 .35cqh 0 var(--pill-edge); cursor: pointer; }
.pill-btn:active { transform: translateY(.25cqh); box-shadow: inset 0 -.25cqh 0 var(--pill-lip), 0 .1cqh 0 var(--pill-edge); }
.pill-btn:focus-visible { outline: .3cqh solid var(--hud-white); outline-offset: .3cqh; }
/* a toy button or pill on a card (Got it, Close, Resume, Let's go, Quit to home, Full leaderboard) shows keyboard focus
   by underlining its label, not with a ring: a ring round its own border and lip read as a double outline */
.info-card :is(.btn, .pill-btn):focus-visible { outline: none; text-decoration: underline; text-decoration-thickness: .35cqh; text-underline-offset: .5cqh; }
.pill-btn.slate { --pill-bg: var(--hud-slate); --pill-fg: var(--hud-white); --pill-lip: var(--hud-slate-deep); --pill-edge: var(--ink); }
/* Paused (an .info-card): Resume across the card, Restart and End round side by side, Quit to home a small slate pill under them */
.info-card.pause-card { width: 60cqw; } /* (narrow enough to clear the HUD's vertical meter on the right) */
.pause-card > .btn { align-self: stretch; min-width: 0; }
.pause-row { display: grid; grid-template-columns: 1fr 1fr; gap: 3cqw; }
.pause-row .btn { min-width: 0; padding: 1.1cqh 0; font-size: 2.3cqh; }
/* its top 3: a white ink-bordered card like Info & tips' rows, ranks in little badges (#1 gold) */
.pause-card .board { padding: 1cqh 1.8cqh 1.3cqh; color: var(--ink); background: var(--hud-white); border: .3cqh solid var(--ink); border-radius: 2cqh; box-shadow: inset 0 -.4cqh 0 var(--toy-lip); }
.pause-card .board-title { color: var(--ink); font-size: 1.9cqh; }
.pause-card .board ol { list-style: none; padding: 0; gap: .5cqh; counter-reset: rank; }
.pause-card .board li { display: flex; align-items: center; gap: 1.2cqh; padding: 0; counter-increment: rank; font: 700 1.6cqh var(--hud-font), var(--display); }
.pause-card .board li::before { content: counter(rank); flex: none; width: 2.5cqh; height: 2.5cqh; display: grid; place-items: center; font: 400 1.5cqh var(--hud-font-display), var(--display);
  background: var(--toy-lip); border: .25cqh solid var(--ink); border-radius: 50%; }
.pause-card .board li:first-child::before { background: linear-gradient(var(--hud-yellow), var(--hud-yellow-deep)); }
.pause-card .board li span { flex: 1; max-width: none; }
.pause-card .board li b { float: none; margin-left: auto; }
.pause-card .board-empty { opacity: .7; }
/* Whale Mode's briefing (an .info-card): a coral title pill, a centred sub-head, Back and Let's go side by side */
.info-card h2.toy-tab.comp { background: linear-gradient(#9AE8FF, #3FB8F0); box-shadow: inset 0 .4cqh 0 rgba(255, 255, 255, .55), inset 0 -.45cqh 0 #1F8FC8, 0 .5cqh 0 var(--ink); }
#compIntro .brief-actions .btn { background: #3FB8F0; }
.info-card h2.toy-tab.whale { background: linear-gradient(var(--hud-pink), var(--hud-red)); box-shadow: inset 0 .4cqh 0 rgba(255, 255, 255, .5), inset 0 -.45cqh 0 var(--hud-red-deep), 0 .5cqh 0 var(--ink); }
.brief-sub { margin: .6cqh 0 0; text-align: center; font: 400 2.6cqh var(--hud-font-display), var(--display); color: var(--ink); }
/* (Back keeps its white secondary look but takes Let's go's border, drop and press, and the row stretches them to one height) */
.brief-actions { display: flex; align-items: stretch; gap: 3cqw; }
.brief-actions .btn { flex: 1; min-width: 0; align-self: stretch; background: var(--hud-red); color: var(--hud-white); text-shadow: 0 .25cqh 0 var(--ink); }
.brief-actions .pill-btn { align-self: stretch; padding: 0 3cqw; border-width: var(--card-btn-edge); box-shadow: inset 0 -.45cqh 0 var(--pill-lip), 0 var(--card-btn-drop) 0 var(--pill-edge); }
.brief-actions .pill-btn:active { transform: translateY(var(--card-btn-press)); box-shadow: inset 0 -.25cqh 0 var(--pill-lip), 0 calc(var(--card-btn-drop) - var(--card-btn-press)) 0 var(--pill-edge); }
.btn[disabled] { opacity: .6; }
/* Share Snorlax's song while the video is being made: candy stripes sliding along, the label pulsing */
.btn.song.busy { background: repeating-linear-gradient(-45deg, #ffe58a 0 14px, #ffcb05 14px 28px); background-size: 200% 100%; animation: songPrep 1s linear infinite, songPulse 1.2s ease-in-out infinite; cursor: progress; }
@keyframes songPrep { to { background-position: -40px 0; } }
@keyframes songPulse { 50% { transform: scale(1.03); } }
.btn.ghost, .btn.white { background: #fff; }
.entered { margin: 0; padding: 10px 18px; border-radius: 14px; background: var(--go); color: var(--ink); font-weight: 800; border: 3px solid var(--ink); }
/* personal best: a dark badge so it reads over the bright road */

.entry { width: min(340px, 100%); display: flex; flex-direction: column; align-items: stretch; gap: 12px; text-align: left; padding: 22px 20px; border-radius: 24px; background: #fffaf2; color: var(--ink); border: 3px solid var(--ink); box-shadow: 0 8px 0 var(--ink); }
.entry h2 { margin: 0; font-size: 34px; line-height: 1; }
.entry .kicker { color: #6b5a7a; }
.entry .how { max-width: none; font-size: 16px; }
.entry > label:not(.check) { font-weight: 800; font-size: 14px; margin-bottom: -6px; }
.handle { display: flex; align-items: center; border: 3px solid var(--ink); border-radius: 14px; background: #fff; padding: 0 12px; }
.handle span { font-weight: 800; font-size: 20px; color: #6b5a7a; }
.handle input { flex: 1; min-width: 0; border: 0; outline: 0; font: 700 20px var(--display); padding: 12px 6px; background: transparent; color: var(--ink); }
.handle:focus-within { outline: 3px solid var(--pop); outline-offset: 2px; }
.platforms { border: 0; margin: 0; padding: 0; display: flex; gap: 10px; flex-wrap: wrap; }
.platforms legend { font-weight: 800; font-size: 14px; margin-bottom: 6px; }
.platforms label { flex: 1; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 3px solid var(--ink); border-radius: 14px; font-weight: 700; background: #fff; }
.platforms label:has(input:checked) { background: var(--pop); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.35; }
.check input { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.entry .err { color: #c2183c; }
/* the form is taller than a short phone's frame with the bonus note: less padding, and it scrolls instead of clipping */
#entryScreen { justify-content: safe center; overflow-y: auto; padding: 16px 12px; }
.entry .bonus { margin: 0; padding: 9px 12px; font-size: 13.5px; line-height: 1.35; background: #FFF0B8; border: 2px dashed rgba(30, 30, 36, .35); border-radius: 14px; }
.entry .bonus b { display: block; margin-bottom: 2px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.entry .btn { min-width: 0; }
.entry .link { color: var(--ink); text-shadow: none; align-self: center; }
.link { background: none; border: 0; color: #fff; font: 500 14px var(--display); text-decoration: underline; cursor: pointer; padding: 6px; text-shadow: 0 1px 3px rgba(0,0,0,.6); }

.sim { position: fixed; left: 8px; top: 40%; opacity: .9; z-index: 20; width: 190px; padding: 8px; border-radius: 12px; background: rgba(255,255,255,.94); color: var(--ink); border: 2px solid var(--ink); font: 500 12px system-ui, sans-serif; display: flex; flex-direction: column; gap: 6px; }
.sim p { margin: 0; font-weight: 700; }
.sim-row { display: flex; gap: 6px; }
.sim button { flex: 1; font: 700 13px system-ui, sans-serif; padding: 8px; border-radius: 10px; border: 2px solid var(--ink); background: #fff; touch-action: none; }
.sim .sim-keys { font-weight: 400; opacity: .7; }

/* Preview mode (no mic): two big hold buttons along the bottom */
.sim.preview { left: 50%; top: auto; bottom: max(10px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); width: min(340px, 92vw); background: rgba(27,21,48,.85); color: #fff; border-color: #fff; opacity: 1; }
.sim.preview > p:first-child::after { content: ': no mic here, hold to steer'; font-weight: 500; }
.sim.preview button { padding: 16px 8px; font-size: 18px; }
.sim.preview .sim-keys, .sim.preview input, .sim.preview label { display: none; }

@media (prefers-reduced-motion: reduce) { .pill-btn:active, .info-card .btn:active, .btn:active, #startScreen .btn:active { transform: none; } #startScreen #startBtn { animation: none; } }
/* the results' way home: a compact dark pill in the top-left corner, legible on any background, clear of the
   buttons and the URL badge at the bottom */
#endScreen .home-pill { position: absolute; top: 3.2cqh; left: 2.8cqw; z-index: 2; padding: .8cqh 1.8cqh; font: 700 1.6cqh var(--hud-font), var(--display); color: #fff;
  background: rgba(30, 30, 36, .82); border: 2px solid #1E1E24; border-radius: 999px; box-shadow: inset 0 .25cqh 0 rgba(255, 255, 255, .18), 0 .3cqh 0 rgba(0, 0, 0, .35); cursor: pointer; }
#endScreen .home-pill:active { transform: translateY(.2cqh); }
/* the entry's follow link: ink, bold, underlined, so it reads as the link it is */
.entry .check a { color: inherit; font-weight: 700; }
