/* SUMZ's own look, over the shared layout in application.css and arcade.css (this loads last). Chunky slab
   type for the title, headings, scores and the questions themselves; everything else in Lexend. Cards, buttons and
   keys are "stickers": a thick ink outline and a hard shadow, and buttons and keys press down into their shadow */

:root {
  --edge: 3px solid var(--line);
  --lift: 4px 4px 0 var(--shadow);
  --lift-small: 3px 3px 0 var(--shadow);
}

/* ── Type ─────────────────────────────────────────── */

.app-shell :is(.heading, .settings__heading, .ui-home__heading, .ui-header__hello, .home-action__label, .dialog__title,
  .card__number, .live-code, .group-code__code, .test__score, .test__right, .test__seconds, .question, .answer,
  .leaderboard__score, .leaderboard__rank, .stats dd, .score-pop, .result__score) {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0;
}
.app-shell .heading { font-size: clamp(32px, 6vw, 46px); line-height: 1.05; }
.app-shell .settings__heading { font-size: 20px; }
.app-shell .heading .icon { width: 0.9em; height: 0.9em; vertical-align: -0.08em; }

/* ── The title: crossed swords, then MATHS in ink and BATTLE in blaze orange, outlined, with a hard shadow ── */

.ui-brand, .logo { gap: 0.25em; font-family: var(--font-display); font-weight: 400; letter-spacing: 0; text-transform: uppercase; }
.app-shell .ui-brand { font-size: clamp(54px, 19vw, 96px); white-space: nowrap; }
.ui-brand__mark, .logo__mark { width: 1em; height: 1em; flex: none; filter: drop-shadow(3px 3px 0 var(--shadow)); }
/* SUMZ in Monoton, a neon of parallel lines: SUM in yellow, the Z in red, like its title card */
.ui-brand > span, .logo__word {
  font-family: var(--font-title);
  font-weight: 400;
  color: var(--yellow);
  letter-spacing: 0.04em;
  text-shadow: none;
}
.ui-brand__minute, .logo__minute { margin-left: 0.03em; color: var(--pink); }
.logo__word { font-family: var(--font-display); font-weight: 400; letter-spacing: 0; }
.app-shell .ui-home__heading { margin: 0; font-size: clamp(16px, 4.5vw, 30px); text-align: center; }
.app-shell .ui-home__heading span { color: var(--pink-text); }

/* ── Stickers ─────────────────────────────────────── */

.app-shell :is(.ui-actions .home-action, .stats > div, .groups > section, .settings__section, .live-status, .result,
  .group-card, .group-code, .leaderboard__row, .banner, .flash, .save-nudge, .ui-progress, .how-to, .league,
  .group-members, .dialog) {
  border: var(--edge);
  border-radius: var(--radius-big);
  background: var(--paper-alt);
  box-shadow: var(--lift);
}
.app-shell :is(.ui-progress, .how-to) { display: grid; gap: 16px; padding: 24px 22px; }
.app-shell :is(.groups > section, .settings__section, .live-status, .result, .league, .group-code, .group-members) { padding: 24px 22px; }
.app-shell .group-card { padding: 20px 22px; }
.app-shell .stats > div { padding: 18px 16px; }
.app-shell .leaderboard__row { padding: 14px 16px; }
.app-shell :is(.banner, .flash, .save-nudge) { padding: 16px 20px; }
.app-shell .ui-actions .home-action { padding: 22px 20px; }
.app-shell .dialog { padding: 26px 24px; }
.app-shell .ui-progress .hint { margin: 0; }
.app-shell .leaderboard__row { border-radius: var(--radius); box-shadow: var(--lift-small); }
.app-shell .leaderboard__row--you { background: var(--ui-soft); }
.app-shell .leaderboard__rank { display: grid; place-items: center; width: 2rem; height: 2rem; border: 2px solid var(--line); border-radius: 50%; background: var(--paper); color: var(--ink); font-size: 15px; }
.app-shell .leaderboard__rank--1 { background: var(--yellow); color: var(--on-neon); }
.app-shell .leaderboard__rank--2 { background: var(--blue); color: var(--on-neon); }
.app-shell .leaderboard__rank--3 { background: var(--pink); color: #fff; }
.app-shell .leaderboard__score { font-size: 20px; }
/* Good news, like a new personal best, is green; a notice is too, and an alert keeps its red edge. As specific as
   the sticker rule above, whose :is() takes its most specific selector's weight, so these come after it to win */
.app-shell .page :is(.banner, .flash) { background: var(--green); color: var(--on-neon); font-weight: 700; }
.app-shell .page .flash--alert { background: var(--paper-alt); color: var(--ink); border-color: var(--pink); }
.app-shell .avatar { border: 2px solid var(--line); }

/* The two ways to play, on the home page: big, bright and tilted a touch, like stickers slapped on */
.app-shell .home-actions--modes .home-action { min-height: 170px; transition: transform 120ms, box-shadow 120ms; }
.app-shell .ui-actions .home-action--solo { background: var(--yellow); color: var(--on-neon); transform: rotate(-1.2deg); }
.app-shell .ui-actions .home-action--battle { background: var(--pink); color: #fff; transform: rotate(1.2deg); }
.app-shell .home-actions--modes .home-action .ui-secondary__description { color: inherit; opacity: 0.92; }
.app-shell .home-actions--modes .home-action .ui-secondary__icon { border: 2px solid var(--line); background: var(--paper-alt); }
.app-shell .home-actions--modes .home-action .home-action__label { font-size: clamp(18px, 5vw, 30px); line-height: 1.05; overflow-wrap: anywhere; }
.app-shell .home-actions--modes .home-action:hover { transform: rotate(0) translate(-1px, -1px); box-shadow: 6px 6px 0 var(--shadow); }
.app-shell .home-actions--modes .home-action:active { transform: rotate(0) translate(3px, 3px); box-shadow: 1px 1px 0 var(--shadow); }

/* ── Buttons and fields ───────────────────────────── */

.app-shell .button {
  border: var(--edge);
  border-radius: var(--radius);
  background: var(--paper-alt);
  color: var(--ink);
  box-shadow: var(--lift-small);
  font-weight: 700;
  transition: transform 80ms, box-shadow 80ms;
}
.app-shell .button:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--shadow); }
.app-shell :is(.button--start, .button--go) { background: var(--pink); color: #fff; }
.app-shell .button--start { font-family: var(--font-display); font-weight: 400; font-size: 22px; letter-spacing: 0.01em; }
.app-shell .button--blue { background: var(--green); color: var(--on-neon); }
.app-shell .button--share { background: var(--yellow); color: var(--on-neon); }
.app-shell .back-link { padding: 6px 12px; border: 2px solid var(--line); border-radius: 999px; background: var(--paper-alt); color: var(--ink); font-weight: 600; }
.app-shell :is(.form input[type="text"], .form input[type="password"], .form__select, .group-join__code) { border: var(--edge); border-radius: var(--radius); }
.app-shell .choice__option { border: var(--edge); border-radius: var(--radius); }
.app-shell .choice__option:has(:checked) { border-color: var(--line); background: var(--yellow); color: var(--on-neon); }
.app-shell .live-code, .app-shell .group-code__code { color: var(--pink-text); }

/* ── Header and tab bar ───────────────────────────── */

.app-shell .ui-header__hello { font-size: clamp(26px, 7vw, 36px); }
.app-shell .ui-navigation { border: var(--edge); border-radius: var(--radius-big); background: var(--paper-alt); box-shadow: var(--lift); }
.ui-navigation nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.app-shell .ui-navigation .site-footer__tab { color: var(--muted); font-weight: 700; }
/* The tab's own colours follow its text (arcade.css), so the gold comes from --ui-hero */
.app-shell .ui-navigation .site-footer__tab[aria-current] { border: 2px solid var(--line); background: var(--ui-hero); color: var(--ui-hero-ink); }

/* ── Find a match ─────────────────────────────────── */

.match__radar { border: var(--edge); background: var(--yellow); box-shadow: var(--lift); }

/* ── The game ─────────────────────────────────────── */

/* The score and clock on top, then the strip with the level, the power-up spinner and the streak, then the
   question, which gets all the room left above the keypad. A battle has its rivals' scores under the strip */
/* The question's row can never grow with what's in it (minmax(0, 1fr)), so nothing in it moves the keypad */
.test { grid-template-rows: auto auto minmax(0, 1fr) auto; row-gap: 0.5rem; }
.test--live { grid-template-rows: auto auto auto minmax(0, 1fr) auto; }
/* The score, right answers and streak on the left (clear of the stop button), the seconds on the right */
.app-shell .test__bar { grid-template-columns: 1fr auto; gap: 10px; padding: 8px 4px 12px 56px; border-bottom: var(--edge); }
.app-shell .test__tally { align-items: flex-start; justify-self: start; }
.app-shell .test__counts { align-items: flex-end; gap: 14px; }
.app-shell .test__score { font-size: 40px; }
.app-shell .test__right { font-size: 30px; }

/* The streak: a flame and the run, grey until there's one going, then red and pulsing as it grows */
.test__streak-number { display: inline-flex; align-items: center; gap: 2px; font-family: var(--font-display); font-size: 30px; line-height: 1; color: var(--muted); }
.test__streak-number .icon { width: 0.95em; height: 0.95em; filter: grayscale(1); opacity: 0.5; transition: filter 150ms, opacity 150ms; }
.test__streak--hot .test__streak-number { color: var(--pink-text); }
.test__streak--hot .test__streak-number .icon { filter: none; opacity: 1; }
.test__streak--new .test__streak-number { animation: combo-pulse 450ms ease-out; }

/* The seconds left, big in a pill that turns from green to blue, gold and red as the minute goes */
.test__timer { display: flex; flex-direction: column; align-items: center; justify-self: end; }
.app-shell .test__timer .test__seconds {
  display: grid;
  place-items: center;
  min-width: 2.1em;
  padding: 4px 10px;
  border: var(--edge);
  border-radius: var(--radius);
  background: var(--green);
  box-shadow: var(--lift-small);
  color: var(--on-neon);
  font-size: 38px;
  line-height: 1;
}
.test[data-quarter="1"] .test__timer .test__seconds { background: var(--blue); color: var(--on-neon); }
.test[data-quarter="2"] .test__timer .test__seconds { background: var(--yellow); color: var(--on-neon); }
.test[data-quarter="3"] .test__timer .test__seconds { background: var(--pink); color: #fff; }
.test__timer .test__count-label { margin-top: 5px; }
.app-shell .test__count-label { font-family: var(--font); font-weight: 700; }

.test__powers {
  display: grid;
  place-items: center;
  height: 4.6rem;
  min-height: 0;
}
/* The power-up spinner: big, gold and bouncing, so it can't be missed */
.test__spinner { gap: 0.6rem; padding: 0.35rem 1.4rem 0.35rem 0.45rem; border: var(--edge); box-shadow: var(--lift); font-family: var(--font-display); font-weight: 400; font-size: 1.6rem; }
.test__spinner-icon { width: 3.4rem; height: 3.4rem; border: 2px solid var(--line); }
.test__spinner-icon .icon { width: 2.5rem; height: 2.5rem; }

/* What a power-up did: over the top of the question, so it takes no room of its own */
.test__stage .test__power-news { position: absolute; top: 0; right: 0; left: 0; z-index: 4; margin: 0; pointer-events: none; }

/* As big as the room allows: the question sized to the stage's own width and height (cqw, cqh), smaller only for
   the longest, like 0.08 × 700 */
/* The top of the stage is kept for what floats up and what a power-up did, so neither covers the question */
.test__stage { justify-content: center; gap: 0.4rem; padding-top: 3.2rem; }
.test .question--current:not(.question--done) { font-size: clamp(2.75rem, min(21cqw, 50cqh), 10rem); line-height: 1; }
/* Rows of their own, sized by the screen rather than by what's in them: the question in the middle of the room
   above, the answer under it, and anything else (Saving…) below. However tall a question's characters come out
   (× and ÷ can come from a fallback font, taller than the slab's own), the answer line stays put */
.test .test__stage { display: grid; grid-template-rows: minmax(0, 1fr) auto minmax(0, 0.3fr); justify-items: center; align-items: center; }
.test .question--current { grid-row: 1; line-height: 1; overflow: visible; }
.test .test__stage .answer { grid-row: 2; }
.test .test__stage .test__status { grid-row: 3; align-self: start; }
.test .question--current.question--long:not(.question--done) { font-size: clamp(2.4rem, min(15cqw, 42cqh), 8rem); }
.test .question--current.question--longer:not(.question--done) { font-size: clamp(2.1rem, min(12cqw, 36cqh), 6.5rem); }
.test .question--done { font-size: clamp(2.5rem, min(14cqw, 26cqh), 5.5rem); }
.test__stage .answer {
  min-width: 3ch;
  height: clamp(2.4rem, min(15cqw, 22cqh), 5.5rem);
  font-size: clamp(2rem, min(13cqw, 19cqh), 4.75rem);
  border-bottom: 7px solid var(--pink);
}
.test__stage .answer--wrong { border-color: var(--wrong); }

/* What floats up rises from the top of the stage, above the question, and fades */
/* +10, +20…: chunky gold with an ink outline and shadow, bigger once a streak's worth 100 or more. Gold in dark
   mode too, over the green the older rules give it there */
.app-shell .test .test__stage .score-pop {
  top: 1.1rem;
  color: var(--yellow);
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 400;
  text-shadow: -1.5px -1.5px 0 var(--shadow), 1.5px -1.5px 0 var(--shadow), -1.5px 1.5px 0 var(--shadow), 3px 3px 0 var(--shadow);
  animation: battle-pop 1.1s ease-out forwards;
}
.app-shell .test .test__stage .score-pop--lightning { color: var(--pink); font-size: 2.8rem; }
.app-shell .test .test__stage .score-pop--wrong { color: var(--paper-alt); font-size: 1.7rem; }
@keyframes battle-pop {
  0% { opacity: 0; transform: translate(calc(-50% + var(--drift) * 0.2), 0.4rem) scale(0.6); }
  15% { opacity: 1; transform: translate(calc(-50% + var(--drift) * 0.4), 0) scale(1.15); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--drift) * 0.6), -0.9rem) scale(1); }
}

/* Chunky keys that press down */
.app-shell .test .keypad__key {
  height: clamp(48px, 7dvh, 68px);
  min-height: 48px;
  border: var(--edge);
  border-radius: var(--radius);
  background: var(--paper-alt);
  box-shadow: var(--lift-small);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.9rem;
  transition: transform 60ms, box-shadow 60ms;
}
.app-shell .test .keypad__key:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--shadow); background: var(--yellow); color: var(--on-neon); }
.app-shell .test .keypad__key--back { background: var(--paper); }
.app-shell .test .keypad__key--submit { background: var(--pink); color: #fff; font-family: var(--font); font-weight: 800; font-size: 1.05rem; }
.app-shell .test__stop { border: 2px solid var(--line); background: var(--paper-alt); }

/* Short phones: a smaller bar and slimmer keys, so the question keeps its room */
@media (max-height: 740px) {
  .app-shell .test__score { font-size: 32px; }
  .app-shell .test__right, .test__streak-number { font-size: 26px; }
  .app-shell .test__timer .test__seconds { font-size: 30px; }
  .app-shell .test__bar { padding-block: 6px 8px; }
  .test__powers { height: 4rem; }
  .test__spinner-icon { width: 2.9rem; height: 2.9rem; }
  .app-shell .test .keypad__key { height: 46px; min-height: 46px; font-size: 1.6rem; }
  .app-shell .test .keypad__key--submit { height: 40px; min-height: 40px; font-size: 1rem; }
  .test .keypad { gap: 0.4rem; }
}

/* ── Fitting a phone ──────────────────────────────── */

/* Nothing pans the page sideways: score pops drifting, awards spinning in and confetti can pass the edge as they
   move, and a phone would let the whole page slide with them */
html, body { overflow-x: clip; overscroll-behavior-x: none; }

/* ── Racing touches ───────────────────────────────── */

/* A checkered flag stripe under the header */
.app-shell .ui-header::after {
  content: "";
  display: block;
  height: 12px;
  margin: 4px -24px 0;
  border-block: 3px solid var(--line);
  background: repeating-conic-gradient(var(--ink) 0 25%, var(--paper-alt) 0 50%) 0 0 / 12px 12px;
}

/* ── Records, awards and results ──────────────────── */

.app-shell .stats--records { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.app-shell .stats--records > div { display: flex; flex-direction: column; justify-content: space-between; min-width: 0; padding: 14px 12px; }
.app-shell .stats--records dt { font-size: 13px; line-height: 1.3; }
.app-shell .stats--records dt .icon { display: block; width: 22px; height: 22px; margin-bottom: 6px; }
.app-shell .stats--records dd { margin: 8px 0 0; font-size: clamp(15px, 4.6vw, 30px); line-height: 1; white-space: nowrap; }
.how-link { margin: 0; text-align: center; font-size: 15px; }

.app-shell .badges { gap: 14px; }
.app-shell .badges__list { grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 14px; }
.app-shell .badge { padding: 18px 12px 16px; border: var(--edge); border-radius: var(--radius); background: var(--paper-alt); box-shadow: var(--lift-small); }
.app-shell .badge:not(.badge--locked) .badge__icon { display: grid; place-items: center; width: 3.2rem; height: 3.2rem; border: 2px solid var(--line); border-radius: 50%; background: var(--yellow); }
.app-shell .badge__icon .icon { width: 2rem; height: 2rem; }
.app-shell .badge--locked { background: var(--paper); box-shadow: none; border-style: dashed; }
/* Awards in a run of colours, so a page of them isn't all one: each earned one's medal, and each new one after a game */
.app-shell .badge:not(.badge--locked):nth-child(4n + 1) .badge__icon { background: var(--green); }
.app-shell .badge:not(.badge--locked):nth-child(4n + 2) .badge__icon { background: var(--blue); }
.app-shell .badge:not(.badge--locked):nth-child(4n + 3) .badge__icon { background: var(--pink); }
.app-shell .badge:not(.badge--locked):nth-child(4n + 4) .badge__icon { background: var(--yellow); }
.app-shell .badges--new .badge { color: var(--on-neon); }
.app-shell .badges--new .badge:nth-child(4n + 1) { background: var(--green); }
.app-shell .badges--new .badge:nth-child(4n + 2) { background: var(--blue); }
.app-shell .badges--new .badge:nth-child(4n + 3) { background: var(--pink); color: #fff; }
.app-shell .badges--new .badge:nth-child(4n + 4) { background: var(--yellow); }
.app-shell .badges--new .badge .badge__icon { background: var(--paper-alt); }

/* After a game, Play again is the big one */
.app-shell .button--again { min-height: 76px; font-size: 28px; }
.app-shell .button--again .icon { width: 1em; height: 1em; }

/* Four tabs on a small phone: smaller labels so "Multiplayer" fits */
@media (max-width: 400px) {
  .app-shell .ui-navigation .site-footer__tab { font-size: 11px; padding-inline: 2px; }
}

/* On a phone, Single player and Multiplayer each get a line of their own */
@media (max-width: 600px) {
  .app-shell .ui-actions.home-actions--modes { grid-template-columns: 1fr; gap: 18px; }
  .app-shell .home-actions--modes .home-action { min-height: 0; }
  .app-shell .home-actions--modes .home-action .home-action__label { font-size: clamp(26px, 7.5vw, 34px); }
}

/* ── Power-ups at work ────────────────────────────── */

/* Solo: the score turns red while it's multiplied, green while it's boosted, and the streak gets a blue ring while
   a shield's held */
.app-shell .test--doubled .test__score { color: var(--pink-text); }
.app-shell .test--boosted .test__score { color: var(--green-deep); }
.test--shielded .test__streak-number { border-radius: 999px; box-shadow: 0 0 0 3px var(--blue); padding-inline: 4px; }

/* Mini text: the question shrinks to almost nothing */
.test--mini .question--current, .test--mini .answer { transform: scale(0.22); transition: transform 250ms; }
.question--current, .answer { transition: transform 250ms; }

/* Ink blot: five blots of ink fall down the whole screen, one after another, stretching into drips as they go */
/* Over the one big splat the shared styles draw: here it's only the frame the blots fall through */
.test .test__ink, .test--ink .test__ink { position: absolute; inset: 0; z-index: 6; overflow: hidden; border-radius: 0; background: none; opacity: 1; animation: none; pointer-events: none; }
.test__blot {
  position: absolute;
  top: -40%;
  width: 52%;
  aspect-ratio: 1;
  border-radius: 46% 54% 41% 59% / 57% 43% 57% 43%;
  background: #0b0a12;
  opacity: 0;
}
.test__blot::after {
  content: "";
  position: absolute;
  top: 70%;
  left: 38%;
  width: 22%;
  height: 90%;
  border-radius: 0 0 999px 999px;
  background: inherit;
}
.test__blot:nth-child(1) { left: 2%; }
.test__blot:nth-child(2) { left: 46%; width: 60%; }
.test__blot:nth-child(3) { left: 18%; width: 44%; }
.test__blot:nth-child(4) { left: 52%; width: 40%; }
.test__blot:nth-child(5) { left: -6%; width: 58%; }
.test--ink .test__blot { animation: ink-run 4.2s ease-in forwards; }
.test--ink .test__blot:nth-child(2) { animation-delay: 0.35s; }
.test--ink .test__blot:nth-child(3) { animation-delay: 0.9s; }
.test--ink .test__blot:nth-child(4) { animation-delay: 1.4s; }
.test--ink .test__blot:nth-child(5) { animation-delay: 1.8s; }
@keyframes ink-run {
  0% { top: -35%; opacity: 0.96; transform: scale(0.7, 0.7); }
  12% { top: -5%; transform: scale(1.05, 0.95); }
  100% { top: 110%; opacity: 0.92; transform: scale(0.95, 1.35); }
}
@media (prefers-reduced-motion: reduce) {
  .test--ink .test__blot { animation: ink-fade 6s linear forwards; top: 20%; }
}

/* The Bomb: the whole game shakes */
.test--bombed { animation: bomb-shake 500ms ease-out; }
@keyframes bomb-shake {
  0%, 100% { transform: none; }
  15% { transform: translate(-8px, 4px) rotate(-1deg); }
  35% { transform: translate(7px, -5px) rotate(1deg); }
  55% { transform: translate(-5px, 3px); }
  75% { transform: translate(3px, -2px); }
}
@media (prefers-reduced-motion: reduce) { .test--bombed { animation: none; } }

/* ── The home page's four boxes: the world league, then the records ── */

.app-shell .stats--home { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; width: 100%; margin: 0; }
.app-shell .stats--home .stats__tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  padding: 18px 16px;
  border: var(--edge);
  border-radius: var(--radius-big);
  background: var(--paper-alt);
  box-shadow: var(--lift);
  color: var(--ink);
  text-decoration: none;
}
.app-shell .stats--home dt { color: var(--muted); font-size: 14px; font-weight: 700; line-height: 1.3; }
.app-shell .stats--home dt .icon { display: block; width: 26px; height: 26px; margin-bottom: 8px; }
.app-shell .stats--home dd { margin: 10px 0 0; font-family: var(--font-display); font-size: clamp(26px, 8vw, 40px); line-height: 1; white-space: nowrap; }
.app-shell .stats--home .stats__unit { font-family: var(--font); font-size: 15px; font-weight: 700; color: var(--muted); }
.app-shell .stats--home .stats__tile--league { --trophy: #fff; background: var(--green); }
.app-shell .stats--home .stats__tile--league :is(dt, .stats__unit) { color: var(--on-neon); }
.app-shell .stats--home .stats__tile--league dd { color: var(--on-neon); }
.app-shell .stats--home a.stats__tile:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--shadow); }

/* Mirror: the question shows back to front */
.test--mirror .question--current { transform: scaleX(-1); }

/* A Superstar running: the score glows gold. A Superstar's pop is gold too */
.app-shell .test--starred .test__score { color: var(--yellow); text-shadow: 2px 2px 0 var(--shadow); }
.app-shell .test .test__stage .score-pop--level { color: var(--yellow); font-size: 1.9rem; }

/* ── The tab bar: along the bottom, the whole width, part of the page rather than floating over it ── */

.app-shell .ui-navigation,
.app-shell .ui-navigation[class] {
  position: fixed;
  top: auto;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 6px max(8px, env(safe-area-inset-left)) calc(6px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-right));
  border: 0;
  border-top: var(--edge);
  border-radius: 0;
  background: var(--paper-alt);
  box-shadow: none;
}
.app-shell .ui-navigation nav { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; max-width: 640px; margin: 0 auto; }
.app-shell .ui-navigation .site-footer__tab { min-height: 56px; }

/* The home page's two ways to play: each a single line, its icon then its name */
.app-shell .ui-actions.home-actions--modes .home-action {
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  min-height: 0;
  padding: 16px 20px;
}
.app-shell .home-actions--modes .home-action .ui-secondary__icon { flex: none; width: 52px; height: 52px; margin: 0; }
.app-shell .home-actions--modes .home-action .ui-secondary__icon .icon { width: 30px; height: 30px; }
.app-shell .home-actions--modes .home-action .home-action__label { margin: 0; font-size: clamp(24px, 6.6vw, 32px); overflow-wrap: normal; white-space: nowrap; }

/* The power-up strip: the spinner in the middle, a Skip held on the right */
.test__powers { grid-template-columns: 1fr auto 1fr; }
.test__spinner { grid-column: 2; }
.test__skip {
  grid-column: 3;
  justify-self: end;
  padding: 0.4rem 0.9rem;
  border: var(--edge);
  border-radius: 999px;
  background: var(--blue);
  box-shadow: var(--lift-small);
  color: var(--on-neon);
  font: inherit;
  font-family: var(--font-display);
  font-size: 1.15rem;
  cursor: pointer;
  touch-action: manipulation;
}
.test__skip:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--shadow); }

/* The home page's two ways to play: just the icon, no box around it */
.app-shell .home-actions--modes .home-action .ui-secondary__icon { width: auto; height: auto; border: 0; border-radius: 0; background: none; }
.app-shell .home-actions--modes .home-action .ui-secondary__icon .icon { width: 36px; height: 36px; }

/* The strapline: just "Every answer counts.", in white */
.app-shell .ui-home__heading { color: var(--ink); }
