/* Pura Ruta (earlier names: ¿Hasta Dónde Llegás?, Esquiva los Huecos). Tokens copied unchanged from the design system (tokens/*.css), then the game's screens. */
@font-face { font-family: "Lilita One"; font-weight: 400; font-display: swap; src: url(fonts/lilita-one-400.woff2) format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 400; font-display: swap; src: url(fonts/atkinson-hyperlegible-400.woff2) format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 700; font-display: swap; src: url(fonts/atkinson-hyperlegible-700.woff2) format("woff2"); }
:root{
  /* PuraAutos brand teal (site theme-color #0D9488) */
  --teal-50:#F0FDFA; --teal-100:#CCFBF1; --teal-300:#5EEAD4; --teal-500:#14B8A6;
  --teal-600:#0D9488; --teal-700:#0F766E; --teal-800:#115E59; --teal-900:#134E4A;
  /* Tropical accents */
  --mango-200:#FFE7A3; --mango-400:#FFB627; --mango-600:#E39500;
  --guayaba-400:#F2603F; --guayaba-700:#C2412B; --guayaba-900:#8F2F1F;
  --selva-300:#5DBE6E; --selva-400:#4FAF62; --selva-500:#3E8E50; --selva-700:#1F7A45; --selva-900:#1F5A38;
  --cafe-500:#8A5A33; --cafe-700:#6B4426;
  --cielo-200:#BFE9F0; --agua-500:#4E7F8C;
  /* Neutrals */
  --papaya-50:#FFF9F0; --papaya-100:#FFF3DF; --arena-200:#F4D9A8;
  --asfalto-500:#4A5056; --asfalto-700:#3B4045; --asfalto-900:#2E3236;
  --linea:#F5F1E8; --linea-amarilla:#FFC93C;
  --ink:#1A2321; --ink-2:#4B524F; --white:#FFFFFF;

  /* Semantic */
  --surface-page:var(--papaya-100);
  --surface-card:var(--white);
  --surface-sheet:var(--papaya-50);
  --surface-night:var(--teal-900);
  --surface-scrim:rgba(19,78,74,.72);
  --text-1:var(--ink);
  --text-2:var(--ink-2);
  --text-on-dark:var(--white);
  --text-on-dark-2:var(--teal-100);
  --border-ink:var(--ink);
  --action-primary:var(--teal-700);
  --action-primary-lip:var(--teal-900);
  --action-whatsapp:var(--selva-700);
  --action-whatsapp-lip:var(--selva-900);
  --action-accent:var(--mango-400);
  --action-accent-lip:var(--mango-600);
  --status-danger:var(--guayaba-700);
  --status-win:var(--selva-700);
  --status-coin:var(--mango-400);
  --focus-ring:var(--mango-400);
}
:root{
  --font-display:"Lilita One","Arial Black",system-ui,sans-serif;
  --font-body:"Atkinson Hyperlegible",system-ui,-apple-system,"Segoe UI",sans-serif;
  --fs-hero:56px; --fs-score:72px; --fs-h1:36px; --fs-h2:26px; --fs-h3:20px;
  --fs-body:17px; --fs-small:15px; --fs-micro:13px; --fs-hud:28px;
  --lh-tight:1.0; --lh-head:1.1; --lh-body:1.45;
  --ls-display:0.01em; --ls-caps:0.08em;
}
:root{
  --sp-1:4px; --sp-2:8px; --sp-3:12px; --sp-4:16px; --sp-5:20px; --sp-6:24px; --sp-8:32px; --sp-10:40px; --sp-12:48px;
  --radius-s:10px; --radius-m:16px; --radius-l:22px; --radius-xl:28px; --radius-pill:999px;
  --stroke:3px; --stroke-thin:2px;
  /* Hard "sticker" shadows: no blur, offset straight down */
  --shadow-sticker:0 4px 0 var(--ink);
  --shadow-sticker-s:0 2px 0 var(--ink);
  --shadow-lift:0 6px 0 var(--ink);
  --shadow-sheet:0 -6px 0 rgba(26,35,33,.18);
  --tap-min:48px; --tap-primary:64px; --tap-whatsapp:72px;
  --safe-top:env(safe-area-inset-top,0px); --safe-bottom:env(safe-area-inset-bottom,0px);
  --game-w:360px; --lane-w:88px;
}
:root{
  --ease-pop:cubic-bezier(.34,1.56,.64,1);
  --ease-out:cubic-bezier(.22,1,.36,1);
  --dur-press:80ms; --dur-fast:140ms; --dur-base:220ms; --dur-slow:360ms;
  --shake-amp:6px; --shake-dur:240ms;
}
@media (prefers-reduced-motion: reduce){
  :root{ --dur-fast:0ms; --dur-base:0ms; --dur-slow:0ms; --shake-amp:0px; }
}

/* ---------- Page ---------- */
*, *::before, *::after { box-sizing: border-box; }
/* No zoom, no page scroll or bounce, no text selection or callouts: it's a game, not a page */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; touch-action: manipulation; }
html, body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; background: var(--teal-900); }
body { position: fixed; inset: 0; font-family: var(--font-body); font-size: var(--fs-body); line-height: var(--lh-body); color: var(--text-1);
    -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
body.playing { touch-action: none; } /* the whole screen steers while a round is on, iPad margins included */
button, a, .btn { touch-action: manipulation; }
input, select, textarea { font-size: max(16px, 1em); -webkit-user-select: text; user-select: text; } /* 16px+: focusing doesn't zoom */
#app { position: relative; height: 100dvh; max-width: 430px; margin: 0 auto; overflow: hidden; background: var(--teal-700); }
.scr { position: absolute; inset: 0; display: none; flex-direction: column; }
#app[data-screen="inicio"] #s-inicio, #app[data-screen="intro"] #s-intro, #app[data-screen="juego"] #s-juego, #app[data-screen="over"] #s-juego, #app[data-screen="over"] #s-over, #app[data-screen="garage"] #s-garage { display: flex; }
button { font: inherit; }
button, .btn { -webkit-user-select: none; user-select: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
.deco { position: absolute; pointer-events: none; }
h1, h2, p { margin: 0; }

/* ---------- Components (from components/**) ---------- */
.btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: var(--tap-primary); padding: 0 22px;
    border: var(--stroke) solid var(--ink); border-radius: var(--radius-l); box-shadow: var(--shadow-sticker); cursor: pointer; text-decoration: none;
    font-family: var(--font-display); font-size: 22px; letter-spacing: var(--ls-display); transition: transform var(--dur-press), box-shadow var(--dur-press); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn-xl { min-height: var(--tap-whatsapp); font-size: 26px; }
.btn-accent { background: var(--action-accent); color: var(--ink); }
.btn-primary { background: var(--action-primary); color: var(--white); }
.btn-whatsapp { background: var(--action-whatsapp); color: var(--white); }
.btn-white { background: var(--white); color: var(--ink); }
.ibtn { width: var(--tap-min); height: var(--tap-min); flex: none; display: grid; place-items: center; padding: 0; cursor: pointer;
    border: var(--stroke) solid var(--ink); border-radius: var(--radius-m); box-shadow: var(--shadow-sticker-s); background: var(--white); color: var(--ink); }
.ibtn:active { transform: translateY(2px); box-shadow: none; }
.ibtn-dark { background: var(--teal-900); color: var(--white); }
.sbtn { height: var(--tap-min); flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px 0 10px; cursor: pointer;
    border: var(--stroke) solid var(--ink); border-radius: var(--radius-m); box-shadow: var(--shadow-sticker-s); background: var(--white); color: var(--ink);
    font-family: var(--font-display); font-size: 17px; }
.sbtn:active { transform: translateY(2px); box-shadow: none; }
.sbtn .i-on, .sbtn[aria-pressed="true"] .i-off { display: none; }
.sbtn[aria-pressed="true"] .i-on { display: block; }
.sbtn[aria-pressed="true"] { background: var(--mango-400); }
.seg { display: flex; gap: 4px; padding: 4px; background: var(--teal-900); border: var(--stroke) solid var(--ink); border-radius: var(--radius-pill); }
.seg button { height: 36px; min-width: 48px; padding: 0 14px; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--white);
    font-family: var(--font-display); font-size: 16px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--mango-400); color: var(--ink); }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--radius-pill); border: 2px solid var(--ink);
    font-family: var(--font-body); font-weight: 700; font-size: var(--fs-small); white-space: nowrap; width: max-content; }
.pill-mango { background: var(--mango-400); color: var(--ink); }
.pill-teal { background: var(--teal-700); color: var(--white); }
.pill-white { background: var(--white); color: var(--ink); }
.pill-coin, .pill-star { padding-left: 4px; }
.foot { display: block; padding: 9px 16px calc(10px + var(--safe-bottom)); background: var(--teal-900); color: var(--teal-100); font-size: var(--fs-micro);
    line-height: 1.35; text-align: center; text-decoration: none; }
.h2 { font-family: var(--font-display); font-size: var(--fs-h2); line-height: var(--lh-head); }

/* ---------- 01 Inicio ---------- */
.scr-inicio { background: var(--teal-700); }
.inicio-top { padding: calc(40px + var(--safe-top)) 24px 0; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.hero { font-family: var(--font-display); font-weight: 400; font-size: clamp(44px, 13vw, 58px); line-height: .92; white-space: nowrap; color: var(--white); text-shadow: 0 5px 0 var(--ink); }
.lead { align-self: stretch; font-size: var(--fs-body); color: var(--teal-100); line-height: 1.4; white-space: nowrap; overflow: hidden; } /* one line: game.js fitLine shrinks it */
.inicio-road { position: relative; flex: 1; min-height: 140px; margin-top: 20px; overflow: hidden;
    background: url(art/carretera-tile.svg) center top / 390px 260px repeat-y; border-top: var(--stroke) solid var(--ink); border-bottom: var(--stroke) solid var(--ink); }
.inicio-actions { padding: 20px 24px 16px; display: flex; flex-direction: column; gap: 14px; }
.inicio-actions .btn-xl { font-size: 30px; }
.row { display: flex; gap: 10px; align-items: center; }

/* ---------- 02 Jugando ---------- */
.scr-juego { background: var(--asfalto-700); touch-action: none; }
#cv { touch-action: none; }
#cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.shake { animation: shake var(--shake-dur) linear; }
@keyframes shake { 20% { transform: translateX(var(--shake-amp)); } 40% { transform: translateX(calc(var(--shake-amp) * -1)); }
    60% { transform: translateX(calc(var(--shake-amp) * .6)); } 80% { transform: translateX(calc(var(--shake-amp) * -.4)); } }
.flash { position: absolute; inset: 0; background: var(--white); opacity: 0; pointer-events: none; }
.flash.on { opacity: .9; }
.hud { position: absolute; top: calc(18px + var(--safe-top)); left: 16px; right: 16px; display: flex; align-items: flex-start; justify-content: space-between; pointer-events: none; }
.hud .ibtn { pointer-events: auto; }
.hud-l { display: flex; flex-direction: column; gap: 6px; }
.hud-m { font-family: var(--font-display); font-size: 40px; line-height: 1; color: var(--white); font-variant-numeric: tabular-nums;
    text-shadow: 0 3px 0 var(--ink), 2px 0 0 var(--ink), -2px 0 0 var(--ink), 0 -2px 0 var(--ink); }
.hint { position: absolute; left: 16px; right: 16px; top: 58%; margin: 0 auto; width: max-content; max-width: calc(100% - 32px); display: flex; align-items: center; justify-content: center; gap: 12px; white-space: nowrap;
    padding: 12px 18px; background: rgba(19, 78, 74, .92); color: var(--white); border: var(--stroke) solid var(--ink); border-radius: var(--radius-l);
    font-family: var(--font-display); font-size: clamp(17px, 5.4vw, 22px); line-height: 1.1; pointer-events: none; transition: opacity var(--dur-slow); }
.hint span[aria-hidden] { font-size: 26px; }
.hint.off { opacity: 0; }
.pop { position: absolute; left: 0; right: 0; bottom: 30%; text-align: center; font-family: var(--font-display); font-size: 26px; color: var(--mango-400);
    text-shadow: 0 3px 0 var(--ink), 2px 0 0 var(--ink), -2px 0 0 var(--ink); pointer-events: none; }
.pop span { display: inline-block; transform: rotate(-8deg); animation: pop var(--dur-base) var(--ease-pop); }
@keyframes pop { from { transform: rotate(-8deg) scale(.6); opacity: 0; } to { transform: rotate(-8deg) scale(1); opacity: 1; } }
.pill-star { position: absolute; left: 24px; bottom: calc(34px + var(--safe-bottom)); }
.paused { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 32px;
    background: var(--surface-scrim); color: var(--white); }
.paused .btn { max-width: 280px; }

/* ---------- 03 Game over ---------- */
.scr-over { background: var(--surface-scrim); animation: fade var(--dur-base) var(--ease-out); }
@keyframes fade { from { opacity: 0; } }
/* The crash scene shrinks first so the sheet never scrolls: 84 px on an SE in a browser, 216 px on tall phones */
#app[data-screen="over"] .hud { visibility: hidden; } /* the sheet shows the score; the HUD would show through the short crash scene */
.over-top { position: relative; height: clamp(84px, calc(100dvh - 560px), 216px); flex: none; }
.pum { position: absolute; left: calc(50% - 140px); bottom: 18px; transform: rotate(-8deg); font-family: var(--font-display); font-size: 30px; color: var(--white); text-shadow: 0 3px 0 var(--ink); }
.sheet { position: relative; flex: 1; display: flex; flex-direction: column; background: var(--papaya-100); border-top: var(--stroke) solid var(--ink);
    border-radius: 32px 32px 0 0; animation: up var(--dur-base) var(--ease-out); overflow: auto; }
@keyframes up { from { transform: translateY(40px); } }
.sheet-body { padding: 18px 20px 0; display: flex; flex-direction: column; gap: 6px; }
.over-title { font-family: var(--font-display); font-weight: 400; font-size: 25px; line-height: 1.05; text-wrap: balance; }
.score { font-family: var(--font-display); font-size: clamp(54px, 17vw, 68px); line-height: .95; font-variant-numeric: tabular-nums; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.rank.wait { color: var(--text-2); font-weight: 400; }
.rank { min-height: 1.4em; margin-top: 6px; font-weight: 700; font-size: var(--fs-small); line-height: 1.3; }
.rank.top { display: inline-block; align-self: flex-start; padding: 4px 10px; border-radius: 8px; background: var(--mango-200); }
.sheet-actions { padding: 14px 20px 12px; display: flex; flex-direction: column; gap: 12px; margin-top: auto; }
/* One main button; the round's colones sit inside it, where they get spent */
.btn-again { flex-direction: column; gap: 3px; min-height: 72px; font-size: 24px; }
.btn-again .again-l { display: flex; align-items: center; gap: 10px; }
.btn-again small { font-family: var(--font-body); font-weight: 700; font-size: var(--fs-small); letter-spacing: 0; font-variant-numeric: tabular-nums; }
.btn-again small:empty { display: none; }
.share-row { display: flex; gap: 10px; }
.share-row .btn-whatsapp { flex: 1; min-height: 58px; font-size: 21px; padding: 0 14px; }
.btn-sq { flex: none; width: 58px; min-height: 58px; padding: 0; }

.toast { position: absolute; left: 24px; right: 24px; bottom: calc(110px + var(--safe-bottom)); padding: 12px 16px; background: var(--ink); color: var(--white);
    border-radius: var(--radius-m); text-align: center; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .pop span, .scr-over, .sheet { animation: none; } }

/* ---------- 01b Intro (once per session) ---------- */
.scr-intro { background: var(--teal-700); padding: calc(18px + var(--safe-top)) 16px 0; gap: 12px; overflow-y: auto; outline: none; }
.intro-card { background: var(--papaya-50); border: var(--stroke) solid var(--ink); border-radius: var(--radius-xl); box-shadow: var(--shadow-sticker);
    padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 8px; animation: up var(--dur-base) var(--ease-out); }
.intro-h { font-family: var(--font-display); font-weight: 400; font-size: 30px; line-height: 1.05; }
.intro-h3 { margin: 6px 0 0; font-family: var(--font-display); font-weight: 400; font-size: var(--fs-h3); line-height: 1.1; color: var(--teal-700); }
.intro-how { display: flex; align-items: center; gap: 10px; font-size: var(--fs-small); line-height: 1.3; }
.intro-how span:not(.key) { flex: 1; }
.key { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border: var(--stroke) solid var(--ink); border-radius: var(--radius-s);
    background: var(--teal-700); color: var(--white); font-size: 18px; box-shadow: var(--shadow-sticker-s); }
.intro-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px 4px; }
.intro-grid li { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; font-size: var(--fs-micro); font-weight: 700; line-height: 1.15; }
.intro-grid img { width: 46px; height: 40px; object-fit: contain; }
.intro-grab { grid-template-columns: repeat(3, 1fr); }
.intro-grab small { font-weight: 400; color: var(--ink-2); font-size: 12px; }
.snacks { display: flex; height: 40px; align-items: center; }
.snacks img { width: 30px; }
.intro-score { margin-top: 4px; font-size: var(--fs-small); font-weight: 700; }
/* Card and button sit together, centred on tall screens (auto margins collapse to 0 when it scrolls) */
.intro-card { margin-top: auto; }
.intro-actions { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 4px 8px calc(10px + var(--safe-bottom)); margin-bottom: auto; }
.lnk { border: 0; background: none; color: var(--teal-100); font-weight: 700; font-size: var(--fs-small); min-height: 44px; padding: 0 16px; cursor: pointer; text-decoration: underline; }
@media (prefers-reduced-motion: reduce) { .intro-card { animation: none; } }

/* Game over: a gentle pulse on one share button at a time (game.js nudge) */
.btn.nudge { animation: nudge 1.1s var(--ease-pop) 1; position: relative; }
.btn.nudge::after { content: ''; position: absolute; inset: -3px; border-radius: inherit; pointer-events: none;
  box-shadow: 0 0 0 0 rgba(255, 182, 39, .85); animation: nudge-ring 1.1s ease-out 1; }
@keyframes nudge { 0%, 100% { transform: scale(1); } 30% { transform: scale(1.045); } 60% { transform: scale(.99); } }
@keyframes nudge-ring { 0% { box-shadow: 0 0 0 0 rgba(255, 182, 39, .85); } 100% { box-shadow: 0 0 0 14px rgba(255, 182, 39, 0); } }
@media (prefers-reduced-motion: reduce) { .btn.nudge, .btn.nudge::after { animation: none; } }

/* PuraAutos fact (game over, pause): quiet, one line or two */
.fact { margin-top: 10px; font-size: var(--fs-micro); line-height: 1.4; color: var(--text-2); }
.fact-k { font-weight: 700; color: var(--text-1); }
.fact-a { color: var(--teal-700); font-weight: 700; text-decoration: underline; white-space: nowrap; }
.fact-dark { max-width: 300px; text-align: center; color: var(--teal-100); }
.fact-dark .fact-k { color: var(--white); }
.fact-dark .fact-a { color: var(--white); }
/* Short phones: the game-over fact would push "Jugar otra vez" off screen; it stays on pause */
@media (max-height: 620px) { #o-fact { display: none; } }

/* Game over: how much of the total came from near-miss bonuses */
.bonus-line { margin: -4px 0 8px; font-size: 15px; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* ---------- 03b Garage: pick the next car with this round's colones ---------- */
.scr-garage { background: var(--teal-700); }
.garage-card { flex: 1; min-height: 0; overflow-y: auto; padding: calc(16px + var(--safe-top)) 16px 12px; display: flex; flex-direction: column; gap: 12px; animation: up var(--dur-base) var(--ease-out); }
.ghd { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ghd-t { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 27px; line-height: 1.02; color: var(--white); text-shadow: 0 3px 0 var(--ink); text-wrap: balance; }
.wallet { flex: none; margin: 0; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px 0 5px; border-radius: var(--radius-pill); background: var(--mango-400);
    border: var(--stroke) solid var(--ink); box-shadow: var(--shadow-sticker-s); font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gcards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; margin-top: 6px; }
.gcard { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 8px 10px; min-height: 44px; cursor: pointer;
    background: var(--white); border: var(--stroke) solid var(--ink); border-radius: var(--radius-l); box-shadow: var(--shadow-sticker); color: var(--ink); font: inherit; }
.gcard:active:not(.short) { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.gcard.best { background: var(--mango-200); outline: 3px solid var(--mango-400); outline-offset: 3px; }
.gcard.short { background: var(--papaya-100); box-shadow: var(--shadow-sticker-s); cursor: default; }
.gcard.short .gpic { opacity: .4; filter: grayscale(.6); }
.gbadge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 11.5px; font-weight: 700; line-height: 1;
    padding: 5px 9px; color: var(--white); background: var(--ink); border-radius: var(--radius-pill); }
.gpic img { display: block; width: 40px; height: 68px; }
.gname { font-weight: 700; font-size: var(--fs-small); margin-top: 4px; }
.gprice { font-family: var(--font-display); font-size: 25px; line-height: 1.05; color: var(--teal-700); font-variant-numeric: tabular-nums; }
.gcard.short .gprice { color: var(--ink-2); }
.gmeter { width: 100%; height: 8px; margin-top: 4px; border-radius: var(--radius-pill); background: var(--arena-200); border: var(--stroke-thin) solid var(--ink); overflow: hidden; }
.gmeter i { display: block; height: 100%; background: var(--mango-400); }
.gnote { font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.gnote:empty { display: none; }
.gtap { text-align: center; color: var(--teal-100); font-weight: 700; font-size: var(--fs-small); }
.greal { flex: none; padding: 12px 16px calc(14px + var(--safe-bottom)); background: var(--teal-900); display: flex; flex-direction: column; gap: 8px; }
.greal > span { color: var(--teal-100); font-size: var(--fs-micro); font-weight: 700; }
.glinks { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.glinks a { display: inline-flex; align-items: center; min-height: 32px; padding: 0 11px; border-radius: var(--radius-pill); background: var(--white); border: var(--stroke-thin) solid var(--ink);
    color: var(--teal-700); font-weight: 700; font-size: var(--fs-micro); text-decoration: none; text-transform: capitalize; }
@media (max-height: 600px) { .gpic img { width: 34px; height: 58px; } .gcards { gap: 12px; } }
@media (prefers-reduced-motion: reduce) { .garage-card { animation: none; } .gcard:active { transform: none; } }

/* Challenge links (?reto=): the friend's score on the start screen, and how this round compared */
.reto-pill { margin: 2px 0 0; padding: 8px 14px; border-radius: var(--radius-pill); background: var(--mango-400); color: var(--ink); border: var(--stroke) solid var(--ink);
    box-shadow: var(--shadow-sticker-s); font-weight: 700; font-size: var(--fs-small); font-variant-numeric: tabular-nums; }
.reto-line { margin: 2px 0 0; font-weight: 700; font-size: var(--fs-small); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.reto-line.won { color: var(--selva-700); }
.reto-line.won::before { content: '✓ '; }

/* Game over: badges are labels, not buttons. No ink border or sticker shadow (those mean "tap me"),
   a soft tint and squarer corners; the buttons below keep the bold mango and white */
.scr-over .pill { height: 28px; padding: 0 10px; border: 0; border-radius: 8px; font-size: 14px; }
.scr-over .pill-mango { background: var(--mango-200); }
.scr-over .pill-mango::before { content: '★'; color: var(--mango-600); }
.scr-over .pill-white { background: rgba(26, 35, 33, .07); }
