* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
html, body { -webkit-touch-callout: none; width: 100%; height: 100%; overflow: hidden; background: #cfe9fb; font-family: 'Lilita One', system-ui, sans-serif; color: #fff; touch-action: none; overscroll-behavior: none; }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.hidden { display: none !important; }

.txt, #score, .title, .tap, .tapcta, .pop, .rTitle, #speedN, #hint {
  text-shadow: 0 3px 0 rgba(20, 40, 80, .55), 0 0 10px rgba(20, 40, 80, .25);
  -webkit-text-stroke: 1px rgba(20, 40, 80, .35);
}

#hud { position: fixed; inset: 0; pointer-events: none; }
#top { position: absolute; top: calc(env(safe-area-inset-top) + 12px); left: 12px; right: 12px; display: flex; justify-content: space-between; align-items: flex-start; }
.chip { background: rgba(25, 45, 80, .55); border-radius: 999px; padding: 5px 12px 5px 6px; display: flex; align-items: center; gap: 6px; font-size: 20px; min-width: 64px; }
.chip svg { width: 26px; height: 26px; }
#mult { padding: 5px 12px; justify-content: center; color: #ffd84a; transition: transform .15s; }
#mult.bump, #coins.bump { transform: scale(1.25); }
#coins { transition: transform .12s; }
#scoreBox { text-align: center; }
#score { font-size: 46px; line-height: 1; transition: transform .1s; }
#score.bump { transform: scale(1.15); }
#goal { font-size: 15px; opacity: .95; margin-top: 2px; background: rgba(25, 45, 80, .4); border-radius: 999px; padding: 2px 10px; }
#goal.done { background: #2fbf5b; }
#goal { transition: transform .15s; } #goal.bump { animation: goalBump .6s ease-out; }
@keyframes goalBump { 0% { transform: scale(1); } 30% { transform: scale(1.35); background: #ffd84a; color: #1d3561; } 100% { transform: scale(1); } }

#prog { position: absolute; right: 16px; top: 22%; height: 42%; width: 8px; border-radius: 4px; background: rgba(25, 45, 80, .35); }
#progFill { position: absolute; bottom: 0; left: 0; right: 0; border-radius: 4px; background: linear-gradient(#7ff0ff, #2fc8f0); height: 0; }
#progDot { position: absolute; left: 50%; width: 18px; height: 18px; margin: 0 0 -9px -9px; border-radius: 50%; background: #fff; border: 3px solid #2fc8f0; bottom: 0; }
#progFlag { position: absolute; top: -18px; left: -4px; width: 16px; height: 12px; background:
  conic-gradient(#222 25%, #fff 0 50%, #222 0 75%, #fff 0) 0 0 / 8px 6px; border: 1px solid #fff; }

#speedo { position: absolute; left: 14px; bottom: calc(env(safe-area-inset-bottom) + 18px); width: 104px; height: 104px; }
#speedo svg { width: 100%; height: 100%; transform: rotate(135deg); }
#speedo .track, #speedo .arc { fill: none; stroke-width: 9; stroke-linecap: round; stroke-dasharray: 188.5 251.3; }
#speedo .track { stroke: rgba(25, 45, 80, .35); }
#speedo .arc { stroke: #5fe3ff; stroke-dasharray: 0 251.3; }
#speedN { position: absolute; top: 28px; width: 100%; text-align: center; font-size: 30px; }
#speedU { position: absolute; top: 62px; width: 100%; text-align: center; font-size: 13px; opacity: .9; }

#popups { position: absolute; top: 17%; left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; pointer-events: none; }
/* kept small and quick so they never crowd the screen */
.pop { font-size: 18px; animation: pop 1s ease-out forwards; white-space: nowrap; text-shadow: 0 2px 0 rgba(20, 40, 80, .5); -webkit-text-stroke: 0; }
.pop.small { font-size: 14px; opacity: .9; }
.pop.gold { color: #ffd84a; font-size: 21px; }
.pop.bad { color: #ff7a7a; font-size: 20px; }
.pop.perfect { color: #7ff0ff; font-size: 22px; }
@keyframes pop {
  0% { transform: scale(.6); opacity: 0; }
  12% { transform: scale(1.05); opacity: 1; }
  22% { transform: scale(1); }
  70% { opacity: 1; transform: translateY(-3px); }
  100% { opacity: 0; transform: translateY(-12px); }
}
#hint { position: absolute; bottom: 24%; left: 0; right: 0; text-align: center; font-size: 24px; opacity: 0; transition: opacity .3s; padding: 0 20px; }
#hint.show { opacity: 1; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.06); } }

.overlay { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
#menu { justify-content: flex-start; padding-top: 9vh; background: linear-gradient(rgba(60, 130, 200, .25), transparent 40%, transparent 70%, rgba(60, 130, 200, .25)); }
.title { font-size: 64px; letter-spacing: 2px; }
.sub { font-size: 26px; text-shadow: 0 2px 0 rgba(20, 40, 80, .5); }
.goalCard { background: rgba(25, 45, 80, .5); border-radius: 14px; padding: 8px 16px; font-size: 18px; }

/* level briefing before the start gate */
#brief { z-index: 8; background: rgba(20, 45, 95, .35); }
#brief .card { padding-top: 34px; }
#brief .bLvl { font-size: 20px; opacity: .85; margin-top: 2px; }
#brief .bGoal { display: flex; align-items: center; gap: 12px; margin: 12px 0 4px; padding: 10px 14px; border-radius: 16px; background: linear-gradient(#ffffff, #e6f1ff); color: #1d3561; box-shadow: 0 3px 0 rgba(20, 50, 100, .3); text-align: left; text-shadow: none; }
#brief .bGoal svg { width: 44px; height: 44px; flex: none; }
#brief .bGoal small { display: block; font-size: 14px; opacity: .65; }
#brief .bGoal b { font-weight: normal; font-size: 22px; }
#loading { background: #cfe9fb; }

#results { justify-content: flex-end; padding-bottom: calc(env(safe-area-inset-bottom) + 3vh); background: linear-gradient(transparent 45%, rgba(25, 55, 110, .5)); }
.fly { position: fixed; width: 30px; height: 30px; margin: -15px 0 0 -15px; z-index: 6; pointer-events: none; transition: transform .52s cubic-bezier(.45, -0.45, .75, .55), opacity .52s; }
.fly svg { width: 100%; height: 100%; filter: drop-shadow(0 2px 2px rgba(0,0,0,.25)); }
.card {
  position: relative; width: min(340px, calc(100vw - 28px)); padding: 30px 16px 16px; text-align: center; border-radius: 26px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cg stroke='%23ffffff' stroke-opacity='.08' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M15 5v20M5 15h20M8 8l14 14M22 8L8 22'/%3E%3Cpath d='M45 35v14M38 42h14M40 37l10 10M50 37L40 47'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(#48a6f2, #2a6fd0 70%, #245fbb);
  border: 4px solid #fff; box-shadow: 0 0 0 3px #1c4f9c, 0 12px 0 rgba(20, 50, 100, .35), inset 0 2px 0 rgba(255,255,255,.4);
  animation: cardIn .5s cubic-bezier(.2, 1.4, .4, 1) .5s both;
}
@keyframes cardIn { from { transform: translateY(40px) scale(.6); opacity: 0; } }
.ribbon { position: absolute; top: -24px; left: 50%; transform: translateX(-50%); width: 92%; height: 46px; }
.ribbon span { position: relative; z-index: 2; display: block; height: 100%; line-height: 44px; font-size: 26px; letter-spacing: .5px; color: #fff;
  background: linear-gradient(#ff6a55, #e2382b); border-radius: 10px; border: 3px solid #fff; box-shadow: 0 4px 0 #a5231a;
  text-shadow: 0 3px 0 #a5231a; }
.ribbon::before, .ribbon::after { content: ''; position: absolute; top: 12px; width: 34px; height: 38px; background: #c22b20; z-index: 1;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 30% 50%); }
.ribbon::before { left: -22px; } .ribbon::after { right: -22px; transform: scaleX(-1); }
.starRow { position: relative; height: 86px; margin: 4px 0 4px; display: flex; align-items: center; justify-content: center; }
.rays { position: absolute; width: 230px; height: 230px; border-radius: 50%; opacity: .55; pointer-events: none;
  background: repeating-conic-gradient(rgba(255, 240, 160, .55) 0 9deg, transparent 9deg 22deg);
  -webkit-mask: radial-gradient(circle, #000 18%, transparent 62%); mask: radial-gradient(circle, #000 18%, transparent 62%);
  animation: chSpin 14s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#stars { position: relative; display: flex; justify-content: center; align-items: flex-end; gap: 2px; }
#stars svg { width: 66px; height: 66px; opacity: 0; transform: scale(.2) rotate(-30deg); filter: drop-shadow(0 4px 0 rgba(20, 50, 100, .35)); }
#stars svg:nth-child(2) { width: 84px; height: 84px; margin-bottom: 10px; }
#stars svg.on { animation: starIn .45s cubic-bezier(.2, 1.7, .4, 1) forwards; }
#stars svg.off { animation: starOff .3s forwards; }
@keyframes starIn { to { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes starOff { to { opacity: 1; transform: scale(.92); } }
.statList { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; }
.stat { position: relative; display: flex; align-items: center; gap: 10px; padding: 5px 12px 5px 6px; border-radius: 14px;
  background: linear-gradient(#ffffff, #e6f1ff); color: #22406f; box-shadow: 0 3px 0 rgba(20, 50, 100, .3); text-shadow: none; }
.stat > span { font-size: 17px; flex: 1; text-align: left; opacity: .85; }
.stat b { font-size: 24px; font-weight: normal; color: #1d3561; }
.stat b small { font-size: 14px; opacity: .55; margin-left: 2px; }
.ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; box-shadow: inset 0 -3px 0 rgba(0,0,0,.15); }
.ic svg { width: 26px; height: 26px; }
.ic-score { background: linear-gradient(#7fd0ff, #3f9bea); } .ic-coin { background: linear-gradient(#ffe9a0, #ffcf4a); } .ic-best { background: linear-gradient(#c9a2ff, #8e5cf0); }
#rNew { position: absolute; right: -8px; top: -10px; font-style: normal; font-size: 13px; color: #fff; background: #ff4b6e; padding: 2px 8px; border-radius: 999px;
  border: 2px solid #fff; transform: rotate(10deg); animation: pulse 1s ease-in-out infinite; }
#rGoals { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 10px 0 2px; }
.goal { display: flex; align-items: center; gap: 5px; font-size: 12px; padding: 4px 9px 4px 4px; border-radius: 999px; background: rgba(10, 35, 80, .3); }
.goal svg { width: 18px; height: 18px; }
.goal.ok { background: rgba(70, 200, 90, .35); }
#again, .gbtn { position: relative; overflow: hidden; margin-top: 12px; width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-size: 26px; color: #fff; background: linear-gradient(#7be05a, #3cb83a); border: 3px solid #fff; border-radius: 18px;
  padding: 10px 20px; box-shadow: 0 6px 0 #23842a; text-shadow: 0 2px 0 #23842a; cursor: pointer; }
#again svg, .gbtn svg { width: 26px; height: 26px; }
#again::after, .gbtn::after { content: ''; position: absolute; top: -20%; left: -40%; width: 30%; height: 140%; background: rgba(255,255,255,.35); transform: skewX(-20deg); animation: shine 2.6s ease-in-out 1.5s infinite; }
@keyframes shine { 0%, 60% { left: -40%; } 100% { left: 130%; } }
#again:active, .gbtn:active { transform: translateY(4px); box-shadow: 0 2px 0 #23842a; }

/* floating joystick: appears under the finger (or mouse) */
#stick { --r: 60px; position: fixed; left: 0; top: 0; width: 0; height: 0; z-index: 4; pointer-events: none; opacity: 0; transition: opacity .15s; }
#stick.on { opacity: 1; transition: opacity .05s; }
#stick::before { content: ''; position: absolute; left: calc(var(--r) * -1); top: calc(var(--r) * -1); width: calc(var(--r) * 2); height: calc(var(--r) * 2); border-radius: 50%;
  background: radial-gradient(circle, rgba(25, 55, 110, .16) 40%, rgba(25, 55, 110, .38)); border: 3px solid rgba(255, 255, 255, .85); box-sizing: border-box;
  box-shadow: 0 2px 10px rgba(20, 40, 80, .2); }
#knob { position: absolute; left: calc(var(--r) * -0.42); top: calc(var(--r) * -0.42); width: calc(var(--r) * 0.84); height: calc(var(--r) * 0.84); border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #ffffff, #e2eefc 60%, #b9d0ee); border: 2px solid rgba(255, 255, 255, .9); box-shadow: 0 3px 8px rgba(20, 40, 80, .35); }
#ui { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 20; pointer-events: none; }
.ic-coin.bump { animation: icBump .16s ease-out; }
@keyframes icBump { 50% { transform: scale(1.3); } }

/* live grind counter */
#grind { --p: 0; position: absolute; top: 19%; left: 0; right: 0; text-align: center; font-size: 22px; color: #fff; letter-spacing: 1px; opacity: 0; transform: scale(.6);
  transition: opacity .2s, transform .2s; text-shadow: 0 3px 0 rgba(120, 50, 0, .6), 0 0 14px rgba(255, 170, 40, .9); }
#grind.on { opacity: 1; transform: scale(calc(1 + var(--p) * .25)); animation: grindBuzz .09s linear infinite; }
#grind b { display: block; font-weight: normal; font-size: 44px; color: #ffd84a; text-shadow: 0 3px 0 #a5520a, 0 0 18px rgba(255, 190, 60, .95); }
@keyframes grindBuzz { 50% { translate: 0 1px; } }

/* phones: cheap text (one hard shadow, no outline stroke, no glow blurs) so Safari isn't repainting heavy effects */
body.lite .txt, body.lite #score, body.lite .title, body.lite .tap, body.lite .tapcta, body.lite .pop, body.lite .rTitle, body.lite #speedN, body.lite #hint {
  text-shadow: 0 2px 0 rgba(20, 40, 80, .55); -webkit-text-stroke: 0; }
body.lite #grind, body.lite #grind b { text-shadow: 0 3px 0 rgba(120, 50, 0, .6); }
body.lite #grind.on { animation: none; }
body.lite .chip, body.lite #goal { backdrop-filter: none; }

/* ?perf readout */
#perf { position: fixed; left: 6px; top: calc(env(safe-area-inset-top) + 64px); z-index: 30; font: 11px/1.35 ui-monospace, Menlo, monospace; color: #fff;
  background: rgba(0, 0, 0, .55); border-radius: 8px; padding: 6px 8px; pointer-events: auto; text-shadow: none; }
#perf pre { margin: 0; white-space: pre; }
#perf .pb { display: flex; gap: 4px; margin-top: 5px; }
#perf button { font: 11px ui-monospace, Menlo, monospace; padding: 4px 7px; border-radius: 6px; border: 0; background: #2f8cff; color: #fff; }

/* start in-run speed gauge */
#launch { position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 13%); width: 150px; transform: translateX(-50%); text-align: center; opacity: 0; transition: opacity .2s; }
#launch.on { opacity: 1; }
#launch svg { width: 150px; height: 85px; display: block; overflow: visible; }
#launch .ltrack, #launch .larc { fill: none; stroke-width: 12; stroke-linecap: round; }
#launch .ltrack { stroke: rgba(25, 45, 80, .35); }
#launch .larc { stroke: #5fe3ff; stroke-dasharray: 0 157.1; filter: drop-shadow(0 0 4px rgba(95, 227, 255, .6)); }
#launch.max .larc { stroke: #ffd84a; filter: drop-shadow(0 0 6px rgba(255, 216, 74, .9)); }
#lpct { position: absolute; left: 0; right: 0; top: 50px; font-size: 34px; text-shadow: 0 2px 0 rgba(20, 40, 80, .55); }
#launch.max #lpct { color: #ffd84a; animation: pulse .5s ease-in-out infinite; }

/* combo: multiplier chip with a draining ring, banked points under the score */
#mult { --ct: 0; position: relative; }
#mult.live { color: #fff; background: conic-gradient(#ffd84a calc(var(--ct) * 360deg), rgba(25, 45, 80, .55) 0); box-shadow: 0 0 0 3px rgba(255, 216, 74, .35); }
#mult.live::after { content: ''; position: absolute; inset: 4px; border-radius: 999px; background: rgba(25, 45, 80, .85); z-index: -1; }
#mult { isolation: isolate; }
#bank { margin-top: 4px; font-size: 20px; color: #ffd84a; opacity: 0; transform: scale(.7); transition: opacity .15s, transform .15s; text-shadow: 0 2px 0 rgba(20, 40, 80, .55); }
#bank.on { opacity: 1; transform: scale(1); }

#lunit { position: absolute; left: 0; right: 0; top: 89px; font-size: 12px; opacity: .85; }
#lpct, #lunit { color: #fff; }
#lpct { text-shadow: 0 2px 0 rgba(20, 40, 80, .8), 0 0 8px rgba(20, 40, 80, .5); }
#lunit { text-shadow: 0 1px 2px rgba(20, 40, 80, .9); }
#launch.bump svg, #launch.bump #lpct { animation: bump .18s ease-out; }
@keyframes bump { 40% { transform: scale(1.12); } }
/* warp-speed lines round the edge of the screen */
#warp { position: fixed; inset: -10%; pointer-events: none; opacity: 0; background: center / cover no-repeat; will-change: transform, opacity; transition: opacity .3s linear; }
#warp.on { animation: warpPulse .9s ease-in-out infinite alternate; }
#warp.fast { animation-duration: .35s; }
@keyframes warpPulse { from { transform: scale(1.03) rotate(0deg); } to { transform: scale(1.1) rotate(3deg); } }
/* single level goal on the results card */
#goalMark { position: relative; width: 84px; height: 84px; opacity: 0; transform: scale(.2) rotate(-30deg); filter: drop-shadow(0 4px 0 rgba(20, 50, 100, .35)); }
#goalMark svg { width: 100%; height: 100%; }
#goalMark.in { animation: starIn .45s cubic-bezier(.2, 1.7, .4, 1) forwards; }
#hud.gate #speedo, #hud.gate #prog { opacity: 0; }
/* start-gate timing meter */
#meter { position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 7%); width: min(330px, 86vw); transform: translateX(-50%); opacity: 0; transition: opacity .25s; perspective: 520px; }
#meter.on { opacity: 1; }
/* lies on the snow like a mat: tilted back in perspective */
#meter .mgauge { display: block; width: 100%; overflow: visible; transform: rotateX(52deg); transform-origin: 50% 85%; }
#meter .mgauge g g { transform-box: fill-box; transform-origin: 50% 50%; transition: transform .08s; }
#meter .mgauge g g.on { transform: translateY(-4px) scale(1.06); }
#meter.hit .mgauge g g.on { animation: tilePop .3s ease-out 2; }
@keyframes tilePop { 40% { transform: translateY(-9px) scale(1.18); } }
.tapcta { position: absolute; left: 0; right: 0; top: 68%; transform-origin: 50% 50%; white-space: nowrap; text-align: center; font-size: 28px; line-height: 1; padding: 10px 20px 12px; border-radius: 999px;
  color: #ffd84a; opacity: 0; transition: opacity .2s; animation: ctaPulse 1.2s ease-in-out infinite; }
body .tapcta, body.lite .tapcta { -webkit-text-stroke: 0; text-shadow: 0 2px 0 #a5520a, 0 2px 8px rgba(20, 30, 70, .45); } /* just the text, no pill behind it */
.tapcta.on { opacity: 1; }

/* gauges sit on a dark disc so the white numbers read against bright snow */
#speedo::before { content: ''; position: absolute; inset: 14px; border-radius: 50%; background: rgba(22, 42, 84, .72); box-shadow: 0 3px 0 rgba(10, 22, 50, .35); }
#speedo svg, #speedN, #speedU { position: absolute; left: 0; top: 0; }
#speedN { top: 28px; } #speedU { top: 62px; }
#launch::before { content: ''; position: absolute; left: 50%; top: 30px; width: 96px; height: 96px; margin-left: -48px; border-radius: 50%; background: rgba(22, 42, 84, .72); box-shadow: 0 3px 0 rgba(10, 22, 50, .35); }
#launch svg { position: relative; }

#playBtn { position: absolute; bottom: calc(env(safe-area-inset-bottom) + 11vh); left: 50%; width: min(280px, 76vw); margin: 0 0 0 calc(min(280px, 76vw) / -2); font-size: 32px; animation: pulse 1.4s ease-in-out infinite; }
#brief .card { animation-delay: .1s; }

/* ---------- level map ---------- */
#map { position: fixed; inset: 0; z-index: 7; display: flex; flex-direction: column; background: #f4f9ff; }
#map.hidden { display: none; }
.mapHead { position: relative; z-index: 2; display: flex; align-items: center; gap: 10px; padding: calc(env(safe-area-inset-top) + 10px) 12px 10px; background: linear-gradient(#2d5aa8, #1d3561); box-shadow: 0 4px 0 rgba(10, 22, 50, .3); }
.mTitle { flex: 1; text-align: center; font-size: 26px; line-height: 1; }
.mTitle small { display: block; font-size: 13px; letter-spacing: 1px; color: #ffd84a; margin-bottom: 3px; }
.mBackSp { width: 46px; flex: none; }
.mBack, #backBtn { width: 46px; height: 46px; flex: none; border-radius: 50%; border: 3px solid #fff; background: linear-gradient(#ff6a55, #e2382b); box-shadow: 0 4px 0 #a5231a; display: grid; place-items: center; padding: 0; cursor: pointer; }
.mBack svg, #backBtn svg { width: 24px; height: 24px; }
.mBack:active, #backBtn:active { transform: translateY(3px); box-shadow: 0 1px 0 #a5231a; }
.mapScroll { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
.mapInner { position: relative; width: 100%; max-width: 560px; margin: 0 auto; aspect-ratio: 390 / 800; overflow: hidden; }
.mapArt { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.mSmoke { animation: smoke 4s ease-in-out infinite; transform-box: fill-box; }
@keyframes smoke { 50% { transform: translate(3px, -4px); opacity: .7; } }
.mSnow { position: absolute; inset: 0; pointer-events: none; opacity: .7;
  background-image: radial-gradient(circle, #fff 1.4px, transparent 1.6px), radial-gradient(circle, #fff 1px, transparent 1.2px);
  background-size: 90px 110px, 60px 70px; background-position: 0 0, 30px 20px; animation: mapSnow 9s linear infinite; }
@keyframes mapSnow { to { background-position: 30px 440px, 50px 300px; } }
/* level buttons: chunky pucks lying on the snow */
.mNode { position: absolute; z-index: 1; width: 13vw; height: 13vw; max-width: 60px; max-height: 60px; transform: translate(-50%, -50%); border-radius: 50%; border: 3.5px solid #fff; padding: 0; cursor: pointer;
  font-family: inherit; font-size: min(7.4vw, 34px); color: #fff; text-shadow: 0 2px 0 rgba(20, 35, 70, .3); display: grid; place-items: center; }
.mNode > span { line-height: 1; margin-top: 2px; }
.mNode.locked { background: linear-gradient(#a3b2c8, #8798b2); box-shadow: 0 5px 0 #6b7d99, 0 9px 8px rgba(60, 90, 140, .25); }
.mNode.open, .mNode.done { background: linear-gradient(#4c8fe8, #2b62c6); box-shadow: 0 5px 0 #1d4796, 0 0 0 4px rgba(255, 214, 90, .55), 0 0 22px 6px rgba(255, 214, 90, .55); }
.mNode.cur { width: 15vw; height: 15vw; max-width: 68px; max-height: 68px; font-size: min(8.6vw, 40px); animation: nodePulse 1.4s ease-in-out infinite; }
.mNode:active { translate: 0 3px; }
.mNode.shake { animation: nodeShake .35s; }
.mBadge { position: absolute; right: -9px; bottom: -7px; width: 46%; height: 46%; border-radius: 50%; background: #33476b; border: 2.5px solid #fff; display: grid; place-items: center; }
.mBadge svg { width: 78%; height: 78%; display: block; }
.mBadge.ok { background: none; border: 0; width: 50%; height: 50%; }
.mBadge.ok svg { width: 100%; height: 100%; }
.mBear { position: absolute; left: 50%; bottom: 92%; width: 54px; margin-left: -27px; animation: bearBob 1.3s ease-in-out infinite; filter: drop-shadow(0 4px 0 rgba(20, 50, 100, .25)); }
.mBear svg { display: block; width: 100%; }
@keyframes nodePulse { 50% { box-shadow: 0 5px 0 #1d4796, 0 0 0 7px rgba(255, 214, 90, .6), 0 0 30px 10px rgba(255, 214, 90, .6); } }
@keyframes bearBob { 50% { transform: translateY(-7px); } }
@keyframes nodeShake { 25% { translate: -6px 0; } 75% { translate: 6px 0; } }
.mToast { position: absolute; z-index: 3; transform: translate(-50%, -260%); padding: 6px 12px; border-radius: 999px; background: #1d3561; color: #fff; font-size: 15px; white-space: nowrap; pointer-events: none; opacity: 0; }
.mToast.on { animation: toast 1.4s ease-out; }
@keyframes toast { 10%, 75% { opacity: 1; } 100% { opacity: 0; } }

/* back to home from the start gate */
#backBtn { position: fixed; z-index: 9; left: 12px; top: calc(env(safe-area-inset-top) + 12px); }
#backBtn.hidden { display: none; }
#hud.gate #coins { visibility: hidden; }

/* results: small secondary buttons */
.rRow { display: flex; gap: 10px; margin-top: 12px; }
.sbtn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; font-family: inherit; font-size: 18px; color: #fff; padding: 8px 10px; border-radius: 14px;
  border: 3px solid #fff; background: linear-gradient(#3f7fd8, #2a5fb8); box-shadow: 0 4px 0 #1c4f9c; cursor: pointer; text-shadow: 0 2px 0 rgba(0, 0, 0, .2); }
.sbtn svg { width: 20px; height: 20px; }
.sbtn.hidden { display: none; }
.sbtn:active { transform: translateY(3px); box-shadow: 0 1px 0 #1c4f9c; }
/* time challenge */
.ic-time { background: linear-gradient(#bfe6ff, #7cc2f5); }
#rTimeNote { position: absolute; right: -8px; top: -10px; font-style: normal; font-size: 12px; color: #fff; padding: 2px 8px; border-radius: 999px; border: 2px solid #fff; transform: rotate(6deg); }
#rTimeNote.good { background: #2fbf5b; } #rTimeNote.bad { background: #ff4b6e; }
#goal.late { background: #e5484d; }
.stat.hidden { display: none; }
/* avalanche (night run) */
#ava { position: absolute; left: 50%; top: calc(env(safe-area-inset-top) + 96px); transform: translateX(-50%); display: flex; align-items: center; gap: 6px; padding: 4px 12px 4px 8px; border-radius: 999px; background: rgba(25, 45, 80, .55); color: #fff; font-size: 15px; white-space: nowrap; }
#ava svg { width: 20px; height: 20px; } #ava b { font-weight: normal; font-size: 18px; min-width: 52px; text-align: right; }
#ava.danger { background: #e5484d; animation: pulse .5s ease-in-out infinite; }
#ava.hidden { display: none; }
#progAva { position: absolute; left: 50%; width: 22px; height: 12px; margin: 0 0 -6px -11px; border-radius: 6px 6px 3px 3px; background: #fff; border: 2px solid #e5484d; bottom: 0; display: none; }
#hud:has(#ava:not(.hidden)) #progAva { display: block; }
#rTeaser { margin: -4px 0 10px; font-size: 16px; color: #1d5fa8; text-align: center; }
#rTeaser.hidden { display: none; }

/* ---- arcade pass ---- */
/* speed blur: the edges of the screen smear at speed, the middle stays sharp */
#speedBlur { position: fixed; inset: 0; pointer-events: none; opacity: 0; -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  -webkit-mask-image: radial-gradient(ellipse 62% 58% at 50% 55%, transparent 55%, #000 100%); mask-image: radial-gradient(ellipse 62% 58% at 50% 55%, transparent 55%, #000 100%); }
/* trick popups: the name on top, the points big and gold underneath */
.pop.trick { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.pop.trick .tn { font-size: 12px; color: #fff; letter-spacing: .5px; text-transform: uppercase; transform: skewX(-8deg); }
.pop.trick .tp { font-size: 26px; color: #ffd84a; margin-top: 1px; transform: skewX(-8deg); text-shadow: 0 2px 0 #b5610a; }
.pop.trick.small .tn { font-size: 11px; } .pop.trick.small .tp { font-size: 18px; }
/* multiplier: a gold pill once a combo is going */
#mult { font-size: 24px; min-width: 70px; }
#mult.live { color: #20304d; background: linear-gradient(#ffe36a, #ffb92e); box-shadow: 0 3px 0 #b56a00, 0 0 0 calc(var(--ct) * 4px) rgba(255, 216, 74, .45); }
#mult.live::after { display: none; }
/* score: bigger, chunkier */
#score { font-size: 52px; }
/* speedometer: bigger, a cyan-to-blue arc that turns gold when you're boosting */
#speedo { width: 124px; height: 124px; }
#speedo .arc { stroke: url(#gSpeed); stroke-width: 11; }
#speedo .track { stroke-width: 11; }
#speedo.boost .arc { stroke: #ffc53a; filter: drop-shadow(0 0 6px rgba(255, 197, 58, .9)); }
#speedN { top: 34px; font-size: 38px; } #speedU { top: 76px; font-size: 14px; }

/* ---- dark arcade theme (menus, map, cards): deep navy glass, glowing rims, chunky gold titles ---- */
:root { --nv0: #070c22; --nv1: #0f1838; --nv2: #1a2858; --rim: rgba(120, 175, 255, .38); --gold1: #fff27a; --gold2: #ffc21f; --gold3: #f08a00; }
html, body, #loading { background: radial-gradient(ellipse at 50% 30%, #1b2a62, var(--nv0) 75%); }
/* chunky gold arcade lettering: a gradient fill, a thick dark outline, a hard drop underneath */
.arcadeTxt, .title, .ribbon span { background: linear-gradient(var(--gold1), var(--gold2) 55%, var(--gold3)); -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 0; paint-order: stroke fill; filter: drop-shadow(0 2px 0 #3a1c00) drop-shadow(0 -2px 0 #3a1c00) drop-shadow(2px 0 0 #3a1c00) drop-shadow(-2px 0 0 #3a1c00) drop-shadow(0 5px 0 rgba(4, 8, 25, .75)); text-shadow: none; }
body.lite .title { text-shadow: none; }

/* home */
#menu { padding-top: 11vh; background: linear-gradient(rgba(7, 12, 34, .82), rgba(7, 12, 34, .2) 34%, transparent 52%, rgba(7, 12, 34, .35) 72%, rgba(7, 12, 34, .88)); }
#menu .title { font-size: min(19vw, 84px); line-height: .95; letter-spacing: 1px; transform: rotate(-4deg) skewX(-6deg); animation: titleBob 3s ease-in-out infinite; }
@keyframes titleBob { 50% { transform: rotate(-4deg) skewX(-6deg) translateY(-6px) scale(1.03); } }
#menu .sub { margin-top: 10px; font-size: 17px; letter-spacing: 1.5px; padding: 6px 16px; border-radius: 999px; background: rgba(15, 24, 56, .8); border: 2px solid var(--rim); color: #9fd2ff; text-shadow: none; box-shadow: 0 0 18px rgba(80, 150, 255, .25); }

/* cards: level intro + results */
.card { background: linear-gradient(rgba(36, 54, 112, .94), rgba(13, 21, 51, .96)); border: 2px solid var(--rim); border-radius: 22px; padding: 46px 16px 18px;
  box-shadow: 0 0 0 1px rgba(5, 9, 28, .9), 0 0 34px rgba(70, 140, 255, .28), 0 14px 30px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .18); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.ribbon { top: -40px; height: auto; width: 110%; }
.ribbon span { background-color: transparent; border: 0; box-shadow: none; border-radius: 0; height: auto; line-height: 1; font-size: min(11vw, 44px); letter-spacing: .5px; transform: rotate(-3deg) skewX(-6deg); white-space: nowrap; }
.ribbon::before, .ribbon::after { display: none; }
#brief, #results { background: radial-gradient(ellipse at 50% 60%, rgba(7, 12, 34, .35), rgba(7, 12, 34, .8)); }
#results { justify-content: center; padding-bottom: 0; }
#brief .bGoal { background: rgba(5, 10, 30, .55); color: #fff; border: 1px solid rgba(120, 175, 255, .22); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .35); }
#brief .bGoal small { color: #8fb6e8; opacity: 1; letter-spacing: 1px; }
#brief .bGoal svg circle { fill: #2b4fb0; }
/* stat rows: one dark inset panel with thin dividers */
.statList { gap: 0; padding: 4px 12px; border-radius: 16px; background: rgba(5, 10, 30, .55); border: 1px solid rgba(120, 175, 255, .2); box-shadow: inset 0 2px 8px rgba(0, 0, 0, .4); }
.stat { background: none; box-shadow: none; border-radius: 0; color: #fff; padding: 9px 2px; border-bottom: 1px solid rgba(140, 180, 255, .14); }
.stat:last-child { border-bottom: 0; }
.stat > span { color: #c6d8f5; opacity: 1; font-size: 18px; }
.stat b { color: #fff; font-size: 26px; text-shadow: 0 2px 0 rgba(0, 0, 0, .45); }
.ic { width: 32px; height: 32px; border-radius: 50%; background: none !important; box-shadow: none; }
.ic svg { width: 30px; height: 30px; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .4)); }
#rTeaser { color: #9fd2ff; }
.rays { opacity: .35; }
/* buttons: the green go button glows; secondary ones are dark with a bright rim */
#again, .gbtn { border: 3px solid #c9ffb0; border-radius: 16px; box-shadow: 0 6px 0 #1f7a26, 0 0 22px rgba(110, 230, 90, .45); font-size: 28px; letter-spacing: .5px; transform: skewX(-4deg); }
#again:active, .gbtn:active { transform: skewX(-4deg) translateY(4px); }
.sbtn { background: linear-gradient(#22356f, #142150); border: 2px solid #7fb4ff; box-shadow: 0 4px 0 #0a1233, 0 0 14px rgba(90, 160, 255, .3); color: #fff; }
.sbtn:active { box-shadow: 0 1px 0 #0a1233; }

/* level map: the same snowy art graded to dusk, with a dark header and glowing level pucks */
#map { background: var(--nv0); }
.mapHead { background: linear-gradient(#1a2858, #0d1533); border-bottom: 2px solid var(--rim); box-shadow: 0 4px 18px rgba(0, 0, 0, .5); }
.mTitle { font-size: 28px; }
.mTitle small { color: #7fd0ff; }
.mapArt { filter: brightness(.6) saturate(1.25) contrast(1.08); }
.mapInner::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; mix-blend-mode: multiply;
  background: linear-gradient(#6a5bd8, #8a8ff0 35%, #a7c4ff 70%, #7a86e8); opacity: .55; }
.mNode.open, .mNode.done { background: linear-gradient(#5aa8ff, #2b5fd6); box-shadow: 0 5px 0 #142d7a, 0 0 0 4px rgba(255, 214, 90, .7), 0 0 26px 8px rgba(255, 196, 60, .6); }
.mNode.locked { background: linear-gradient(#4a5878, #343f5c); box-shadow: 0 5px 0 #1d2540, 0 9px 10px rgba(0, 0, 0, .4); color: #9aa8c4; }
.mNode { z-index: 2; }
.mToast { background: #0d1533; border: 1px solid var(--rim); }

/* ---- arcade pass 2: Rubik type, hex level badges, glass buttons ---- */
html, body { font-family: 'Rubik', system-ui, sans-serif; font-weight: 800; }
button, .gbtn, #again, .sbtn, .mNode { font-family: 'Rubik', system-ui, sans-serif; font-weight: 900; }
.stat b, #brief .bGoal b, .mTitle, #speedN, #score, .chip, #lpct { font-weight: 900; }
.title, .ribbon span, .pop, .tapcta, #score, #speedN, #grind b, #mult, .gbtn span, #again span, .mNode > span { font-style: italic; font-weight: 900; }
.title, .ribbon span { letter-spacing: -0.5px; }
.ribbon span { font-size: min(10vw, 40px); }
#menu .title { font-size: min(17vw, 76px); }
.stat > span { font-weight: 700; font-size: 17px; }
.mTitle { font-style: italic; font-size: 25px; letter-spacing: -0.3px; }
.mTitle small { font-style: normal; font-weight: 800; letter-spacing: 2px; font-size: 12px; }
#again, .gbtn { font-size: 25px; letter-spacing: 0; }
.sbtn { font-weight: 800; font-size: 16px; letter-spacing: .5px; }

/* back buttons: dark glass with a neon rim */
.mBack, #backBtn { border-radius: 14px; border: 2px solid #7fc4ff; background: linear-gradient(#2a3f88, #121c45); box-shadow: 0 4px 0 #050a1e, 0 0 14px rgba(90, 170, 255, .5), inset 0 1px 0 rgba(255, 255, 255, .25); }
.mBack:active, #backBtn:active { box-shadow: 0 1px 0 #050a1e, 0 0 10px rgba(90, 170, 255, .5); }

/* level badges: shield hexes with a metal rim, a glossy face and a glow */
.mNode { --rim: linear-gradient(#e9f2ff, #7f93b8 45%, #3a4868); --face: linear-gradient(#323d5e, #182038); --glow: rgba(0, 0, 0, 0);
  background: none !important; border: 0; box-shadow: none !important; border-radius: 0; color: #fff;
  filter: drop-shadow(0 5px 0 #050a1e) drop-shadow(0 0 12px var(--glow)); }
.mNode::before, .mNode::after { content: ''; position: absolute; clip-path: polygon(50% 0, 96% 25%, 96% 75%, 50% 100%, 4% 75%, 4% 25%); }
.mNode::before { inset: 0; background: var(--rim); }
.mNode::after { inset: 4.5px; background: linear-gradient(165deg, rgba(255, 255, 255, .32) 0 36%, rgba(255, 255, 255, 0) 37%), var(--face); }
.mNode > span { position: relative; z-index: 2; text-shadow: 0 3px 0 rgba(5, 10, 30, .55); }
.mNode .mBadge, .mNode .mBear { z-index: 3; }
.mNode.done { --rim: linear-gradient(#fff6b0, #ffc21f 45%, #b85f00); --face: linear-gradient(#4f8dff, #1c3aa6); --glow: rgba(255, 190, 50, .55); }
.mNode.open { --rim: linear-gradient(#e6fdff, #4fe0ff 45%, #1677c9); --face: linear-gradient(#56a2ff, #1f45c4); --glow: rgba(80, 220, 255, .75); }
.mNode.locked { --glow: rgba(0, 0, 0, 0); color: #6f7c9c; }
.mNode.locked > span { text-shadow: none; }
.mNode.cur { animation: hexPulse 1.4s ease-in-out infinite; }
@keyframes hexPulse { 50% { transform: translate(-50%, -50%) scale(1.08); filter: drop-shadow(0 5px 0 #050a1e) drop-shadow(0 0 22px var(--glow)); } }
.mBadge { background: linear-gradient(#3b4970, #1d2540); border: 2px solid #9fb2d8; box-shadow: 0 2px 0 #050a1e; }
.mBadge.ok svg circle { fill: #2fd06a; }
/* home: skis or snowboard */
#gearPick { display: flex; gap: 4px; padding: 4px; border-radius: 16px; margin: 8px 0 4px;
  background: rgba(5, 10, 30, .55); border: 1px solid rgba(120, 175, 255, .22); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .35); }
#gearPick button { flex: 1; justify-content: center; }
/* home: settings (gear choice lives here) */
#setBtn { position: fixed; z-index: 7; right: 12px; top: calc(env(safe-area-inset-top) + 12px); width: 46px; height: 46px; padding: 0; display: grid; place-items: center; cursor: pointer;
  border-radius: 14px; border: 2px solid #7fc4ff; background: linear-gradient(#2a3f88, #121c45); box-shadow: 0 4px 0 #050a1e, 0 0 14px rgba(90, 170, 255, .5), inset 0 1px 0 rgba(255, 255, 255, .25); }
#setBtn svg { width: 26px; height: 26px; }
#setBtn:active { transform: translateY(3px); box-shadow: 0 1px 0 #050a1e, 0 0 10px rgba(90, 170, 255, .5); }
#setBtn.hidden { display: none; }
#settings { z-index: 8; background: radial-gradient(ellipse at 50% 60%, rgba(7, 12, 34, .35), rgba(7, 12, 34, .8)); }
#settings .card { width: min(88vw, 340px); padding-top: 40px; }
#settings .setLbl { font-family: 'Rubik', system-ui, sans-serif; font-weight: 800; font-size: 14px; letter-spacing: 1.5px; color: #9fd2ff; text-align: left; margin-left: 4px; }
#gearPick button { display: flex; align-items: center; gap: 6px; padding: 8px 14px; border: 0; border-radius: 12px; background: none; color: #b9cbea; font-family: 'Rubik', system-ui, sans-serif; font-weight: 900; font-style: italic; font-size: 16px; letter-spacing: .3px; cursor: pointer; transition: background .15s, color .15s; }
#gearPick button svg { width: 22px; height: 22px; }
#gearPick button.on { color: #111a3a; background: linear-gradient(#fff27a, #ffc21f 55%, #f08a00); box-shadow: 0 3px 0 #9a4f00, inset 0 1px 0 rgba(255, 255, 255, .6); }
/* in-run text: big enough to read at a glance */
.pop { font-size: 26px; } .pop.small { font-size: 18px; } .pop.gold { font-size: 28px; } .pop.bad { font-size: 26px; } .pop.perfect { font-size: 30px; }
.pop.trick { flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 0 8px; max-width: 92vw; white-space: normal; text-align: center; }
.pop.trick .tn { font-size: 19px; letter-spacing: .3px; } .pop.trick .tp { font-size: 34px; margin-top: 0; text-shadow: 0 2px 0 #b5610a; }
.pop.trick.small .tn { display: none; } .pop.trick.small .tp { font-size: 22px; }
#hint { font-size: 18px; bottom: 21%; }
#hint.show { animation: none; }
#grind { font-size: 14px; letter-spacing: .5px; }
#grind b { font-size: 26px; text-shadow: 0 2px 0 #a5520a; }
#grind.on { transform: none; animation: none; }
#bank { font-size: 16px; }
/* race: your place (text only, no pill) and the rivals' dots on the progress bar */
#place { position: absolute; left: 16px; top: calc(env(safe-area-inset-top) + 66px); font-family: 'Rubik', system-ui, sans-serif; font-weight: 900; font-style: italic; font-size: 44px; line-height: 1;
  color: #fff; text-shadow: 0 3px 0 #0d1533, 0 0 2px #0d1533, 2px 0 0 #0d1533, -2px 0 0 #0d1533; transform-origin: left center; }
#place small { font-size: 22px; margin-left: 1px; }
#place i { font-size: 20px; font-style: italic; margin-left: 4px; opacity: .8; }
#place.bump { animation: placeBump .35s ease-out; }
@keyframes placeBump { 40% { transform: scale(1.3); color: #ffd84a; } }
#place.hidden { display: none; }
.rdot { position: absolute; left: 50%; width: 12px; height: 12px; margin: 0 0 -6px -6px; border-radius: 50%; border: 2px solid #fff; bottom: 0; }
/* map: what kind of challenge each level is */
.mType { position: absolute; left: -13px; top: -11px; width: 56%; height: 56%; border-radius: 50%; display: grid; place-items: center; border: 2.5px solid #fff; background: #1a2a5e; box-shadow: 0 2px 0 #050a1e; font-style: normal; }
.mType svg { width: 72%; height: 72%; }
.mType.k-race { background: #2b3a78; } .mType.k-escape { background: #5a1f3a; } .mType.k-score { background: #3b2a6e; } .mType.k-time { background: #1d4b7a; } .mType.k-coins { background: #5a3b12; }
.mKind { position: absolute; left: 50%; top: 100%; transform: translateX(-50%); margin-top: 7px; font-family: 'Rubik', system-ui, sans-serif; font-weight: 900; font-style: italic; font-size: 12px; letter-spacing: .6px; color: #fff;
  text-shadow: 0 2px 0 #0d1533, 1.5px 0 0 #0d1533, -1.5px 0 0 #0d1533, 0 -1.5px 0 #0d1533; white-space: nowrap; pointer-events: none; }
.mNode.locked .mKind { color: #b9c4da; }
/* home: how far through the world you are: a thin segmented bar and a small count */
#homeProg { margin-top: 16px; width: min(56vw, 230px); }
#hpBar { display: flex; gap: 4px; }
.hpSeg { flex: 1; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .28); }
.hpSeg.done { background: #ffd23a; }
.hpSeg.cur { background: rgba(255, 255, 255, .85); animation: hpPulse 1.4s ease-in-out infinite; }
@keyframes hpPulse { 50% { opacity: .45; } }
#hpCount { margin-top: 7px; text-align: center; font-family: 'Rubik', system-ui, sans-serif; font-weight: 800; font-size: 12px; letter-spacing: 1.5px; color: rgba(255, 255, 255, .85); text-shadow: 0 1px 2px rgba(7, 12, 34, .8); }
/* home: drags on the open screen reach the 3D view (spin the bear); only the buttons take taps */
#menu, #menu * { pointer-events: none; }
#menu button { pointer-events: auto; }
#brief .bName { font-family: 'Rubik', system-ui, sans-serif; font-weight: 900; font-style: italic; font-size: 22px; letter-spacing: .5px; color: #9fd2ff; margin-top: 2px; }

/* level card at the start gate: gold arcade level, blue name, navy-glass goal panel (same look as the menus and results) */
#startCard { position: absolute; left: 50%; top: calc(env(safe-area-inset-top) + 13%); transform: translate(-50%, -10px) scale(.92); width: min(86vw, 360px); text-align: center; pointer-events: none;
  opacity: 0; transition: opacity .35s, transform .35s cubic-bezier(.2, 1.5, .4, 1); }
#startCard.on { opacity: 1; transform: translate(-50%, 0) scale(1); }
#startCard.gone { opacity: 0; transform: translate(-50%, -40px) scale(.9); transition: opacity .3s, transform .4s ease-in; }
#startCard .sLvl { font-family: 'Rubik', system-ui, sans-serif; font-weight: 900; font-style: italic; font-size: min(11vw, 46px); line-height: 1; letter-spacing: -0.5px; transform: rotate(-3deg) skewX(-6deg); white-space: nowrap; }
#startCard .sName { font-family: 'Rubik', system-ui, sans-serif; font-weight: 900; font-style: italic; font-size: 20px; letter-spacing: .5px; color: #9fd2ff; margin-top: 6px; text-shadow: 0 2px 0 rgba(4, 8, 25, .6); }
#startCard .sGoal { display: flex; align-items: center; gap: 12px; margin: 10px auto 0; padding: 9px 14px; border-radius: 16px; text-align: left; width: fit-content; max-width: 100%;
  background: rgba(5, 10, 30, .62); color: #fff; border: 1px solid rgba(120, 175, 255, .3); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .35), 0 6px 16px rgba(4, 8, 25, .3); }
#startCard .sGoal svg { width: 40px; height: 40px; flex: none; }
#startCard .sGoal small { display: block; font-size: 13px; color: #8fb6e8; letter-spacing: 1px; font-weight: 800; }
#startCard .sGoal b { font-family: 'Rubik', system-ui, sans-serif; font-weight: 900; font-size: 20px; }

#hud.gate .tapcta { top: 45%; } /* at the line the prompt sits up over the slope, clear of him and of your thumb */
#hud.gate #hint { bottom: 7%; }

/* the prompt box spans the screen with the text centred in it (no measuring), so its animations only scale */
@keyframes ctaPulse { 50% { transform: scale(1.06); } }

/* the start charge: a soft glow that swells under your finger, warming from icy blue to gold, and throbs once it's full */
#charge { position: fixed; left: 0; top: 0; width: 0; height: 0; z-index: 4; pointer-events: none; opacity: 0; transition: opacity .15s; }
#charge.on { opacity: 1; }
#cglow { position: absolute; left: -90px; top: -90px; width: 180px; height: 180px; border-radius: 50%; transform: scale(var(--k, .3));
  background: radial-gradient(circle, rgba(225, 250, 255, .95) 0%, rgba(120, 225, 255, .6) 30%, rgba(95, 200, 255, .2) 55%, rgba(95, 200, 255, 0) 70%); }
#charge.full #cglow { background: radial-gradient(circle, rgba(255, 252, 225, 1) 0%, rgba(255, 216, 74, .75) 30%, rgba(255, 170, 40, .3) 55%, rgba(255, 170, 40, 0) 70%); animation: glowThrob .3s ease-in-out infinite alternate; }
@keyframes glowThrob { to { transform: scale(calc(var(--k, 1) * 1.12)); } }
/* in the in-run the tuck prompt sits under the speed gauge, not across it */
#hud.gate .tapcta.low { top: auto; bottom: calc(env(safe-area-inset-bottom) + 1.5%); font-size: 20px; }

/* ==================== theme v3: bright cartoon daylight ====================
   Chunky Lilita One lettering in white with a thick navy outline, rounded Fredoka for small labels,
   slate-navy tiles and pills, a fat green PLAY button, round glossy level bubbles on a sunny map. */
:root { --ink: #1b2d5e; --tile1: #4f6fb8; --tile2: #34508f; --tileSh: #1f3366; --pill: rgba(36, 58, 116, .78);
  --ol: 0 -2.5px 0 var(--ink), 0 2.5px 0 var(--ink), 2.5px 0 0 var(--ink), -2.5px 0 0 var(--ink), 1.8px 1.8px 0 var(--ink), -1.8px 1.8px 0 var(--ink), 1.8px -1.8px 0 var(--ink), -1.8px -1.8px 0 var(--ink);
  --olS: 0 -1.5px 0 var(--ink), 0 1.5px 0 var(--ink), 1.5px 0 0 var(--ink), -1.5px 0 0 var(--ink), 1.1px 1.1px 0 var(--ink), -1.1px 1.1px 0 var(--ink), 1.1px -1.1px 0 var(--ink), -1.1px -1.1px 0 var(--ink); }
html, body { font-family: 'Fredoka', system-ui, sans-serif; font-weight: 700; }
html, body, #loading { background: linear-gradient(#7fa6ea, #c9d9fb 60%, #eef2fd); }
#loading .sub { font-family: 'Lilita One', system-ui, sans-serif; font-weight: 400; text-shadow: var(--ol), 0 5px 0 rgba(27, 45, 94, .35); }
button { font-family: 'Fredoka', system-ui, sans-serif; }

/* display type: Lilita One, upright (it has one weight, so never fake-bold or slant it) */
.title, .title span, #menu .sub, .ribbon span, .arcadeTxt, #score, #speedN, .chip, #mult, #coinN, .pop, .pop .tn, .pop .tp, .tapcta, #grind, #grind b, #place,
.gbtn, .gbtn span, #again, #again span, .sbtn, .navBtn span, .mNode, .mNode > span, .mKind, .mTitle, #walletN, .stat b, .stat > span, #startCard .sLvl, #startCard .sName,
#startCard .sGoal b, #lpct, #hint, .mToast, #homeToast, #gearPick button, #ava, #ava b, #bank, #rNew, #rTimeNote, #rTeaser, #settings .setLbl, #lunit {
  font-family: 'Lilita One', system-ui, sans-serif !important; font-weight: 400 !important; font-style: normal !important; font-synthesis: none; letter-spacing: .3px; }
.title, .ribbon span, .arcadeTxt, #score, #speedN, .chip, #mult, .tapcta, #grind, #place, .gbtn span, #again span, .sbtn, .mNode > span, .mTitle, #startCard .sName, #lpct, #hint, .navBtn span, #walletN, .pop {
  -webkit-text-stroke: 0 !important; }
/* the gold gradient lettering becomes white with a thick navy outline and a soft drop */
.arcadeTxt, .title, .ribbon span { background: none !important; -webkit-background-clip: border-box; background-clip: border-box; color: #fff !important; filter: none !important;
  text-shadow: var(--ol), 0 5px 0 var(--ink), 0 8px 10px rgba(20, 35, 80, .3) !important; }
#score, #speedN, .chip, #lpct, .mNode > span, .mTitle, #walletN, .navBtn span, #hint, #place { text-shadow: var(--ol), 0 4px 0 var(--ink) !important; }
.pop { text-shadow: var(--ol), 0 4px 0 var(--ink) !important; }
.pop.trick .tp, .pop.gold { color: #ffd23a; } .pop.trick .tp { text-shadow: var(--ol), 0 4px 0 var(--ink) !important; }
.pop.trick .tn, #grind { text-shadow: var(--olS), 0 2px 0 var(--ink) !important; transform: none; }
#grind b { color: #ffd23a; text-shadow: var(--ol), 0 4px 0 var(--ink), 0 0 16px rgba(255, 200, 60, .8) !important; }
body .tapcta, body.lite .tapcta { color: #ffd23a; text-shadow: var(--ol), 0 4px 0 var(--ink) !important; }

/* ---------- HUD ---------- */
.chip { background: var(--pill); border: 2px solid rgba(255, 255, 255, .22); box-shadow: 0 3px 0 rgba(20, 32, 70, .35); font-size: 24px; padding: 4px 14px 4px 5px; }
.chip svg { width: 30px; height: 30px; filter: drop-shadow(0 2px 0 rgba(20, 32, 70, .4)); }
#mult { color: #ffd23a; font-size: 26px; padding: 4px 14px; }
#mult.live { color: var(--ink); text-shadow: none !important; }
#score { font-size: 58px; }
#goal { font-family: 'Fredoka', system-ui, sans-serif; font-weight: 700; font-size: 16px; background: var(--pill); border: 2px solid rgba(255, 255, 255, .2); padding: 3px 14px; margin-top: 6px; display: inline-block; text-shadow: 0 1px 0 var(--ink); }
#bank { text-shadow: var(--olS); }
#prog { width: 10px; background: rgba(36, 58, 116, .45); border: 2px solid rgba(255, 255, 255, .7); border-radius: 6px; }
#progFill { background: linear-gradient(#9ff2ff, #3fa2ff); border-radius: 4px; }
#progDot { background: #fff; border: 4px solid #2f7bff; width: 22px; height: 22px; margin: 0 0 -11px -11px; box-shadow: 0 2px 0 var(--ink); }
#speedo::before { background: radial-gradient(circle at 50% 35%, #3d5ea6, #22396f); box-shadow: 0 4px 0 rgba(20, 32, 70, .45); border: 2px solid rgba(255, 255, 255, .25); }
#speedo .track { stroke: rgba(36, 58, 116, .55); }
#speedU, #lunit { font-family: 'Fredoka', system-ui, sans-serif; font-weight: 700; text-shadow: 0 1px 0 var(--ink); }
#launch::before { background: radial-gradient(circle at 50% 35%, #3d5ea6, #22396f); }
#ava { background: var(--pill); }

/* ---------- buttons ---------- */
#again, .gbtn { transform: none; border: 4px solid #d9ffc4; border-radius: 22px; background: linear-gradient(#8deb63, #4cc63f 50%, #34ad37); color: #fff;
  box-shadow: 0 7px 0 #1f7a26, 0 12px 18px rgba(20, 70, 30, .3), inset 0 3px 0 rgba(255, 255, 255, .45), inset 0 -4px 0 rgba(20, 110, 30, .35); }
#again span, .gbtn span { text-shadow: 0 -2.5px 0 #1e6b1c, 0 2.5px 0 #1e6b1c, 2.5px 0 0 #1e6b1c, -2.5px 0 0 #1e6b1c, 1.8px 1.8px 0 #1e6b1c, -1.8px 1.8px 0 #1e6b1c, 1.8px -1.8px 0 #1e6b1c, -1.8px -1.8px 0 #1e6b1c, 0 4px 0 #1e6b1c; }
#again:active, .gbtn:active { transform: translateY(5px); box-shadow: 0 2px 0 #1f7a26, inset 0 3px 0 rgba(255, 255, 255, .45); }
#again svg, .gbtn svg { filter: drop-shadow(0 2px 0 #1e6b1c); }
.sbtn, .navBtn, #setBtn, .mBack, #backBtn { background: linear-gradient(var(--tile1), var(--tile2)); border: 2px solid rgba(255, 255, 255, .28); color: #fff;
  box-shadow: 0 5px 0 var(--tileSh), 0 8px 14px rgba(20, 32, 70, .25), inset 0 2px 0 rgba(255, 255, 255, .25); }
.sbtn { border-radius: 16px; font-size: 18px; text-shadow: var(--olS), 0 2px 0 var(--ink); }
.sbtn:active, .navBtn:active, #setBtn:active, .mBack:active, #backBtn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--tileSh), inset 0 2px 0 rgba(255, 255, 255, .25); }
.mBack, #backBtn, #setBtn { border-radius: 14px; width: 48px; height: 48px; }
.mBack svg, #backBtn svg { filter: drop-shadow(0 2px 0 var(--ink)); }
#setBtn { left: 14px; right: auto; top: calc(env(safe-area-inset-top) + 14px); }
#setBtn svg { width: 28px; height: 28px; filter: drop-shadow(0 2px 0 var(--ink)); }
#setBtn svg circle[fill="#1a2a5e"] { fill: var(--tile2); }

/* ---------- home ---------- */
#menu { padding-top: calc(env(safe-area-inset-top) + 9vh); background: linear-gradient(rgba(120, 160, 235, .35), rgba(120, 160, 235, 0) 38%, rgba(120, 160, 235, 0) 62%, rgba(40, 60, 120, .25)); }
#logo { display: flex; flex-direction: column; align-items: center; transform: rotate(-3deg); animation: logoBob 3s ease-in-out infinite; }
@keyframes logoBob { 50% { transform: rotate(-3deg) translateY(-5px) scale(1.02); } }
.logoPeak { width: min(30vw, 120px); margin-bottom: -6vw; position: relative; z-index: 0; filter: drop-shadow(0 4px 0 rgba(27, 45, 94, .35)); }
#menu .title { position: relative; z-index: 1; display: flex; gap: .18em; font-size: min(21vw, 96px); line-height: 1; letter-spacing: 0; transform: none; animation: none;
  text-shadow: 0 -4px 0 var(--ink), 0 4px 0 var(--ink), 4px 0 0 var(--ink), -4px 0 0 var(--ink), 3px 3px 0 var(--ink), -3px 3px 0 var(--ink), 3px -3px 0 var(--ink), -3px -3px 0 var(--ink),
    0 9px 0 var(--ink), 0 14px 16px rgba(20, 35, 80, .35) !important; }
#menu .title span:first-child { color: #fff; }
#menu .sub { margin-top: 12px; font-size: min(4.6vw, 19px); letter-spacing: 1px; padding: 7px 20px 6px; border-radius: 999px; background: linear-gradient(#5574bb, #3a5596); border: 2px solid rgba(255, 255, 255, .35);
  color: #fff; box-shadow: 0 4px 0 var(--tileSh), 0 8px 14px rgba(20, 35, 80, .25); text-shadow: var(--olS), 0 2px 0 var(--ink) !important; }
#playBtn { bottom: calc(env(safe-area-inset-bottom) + 136px); width: min(340px, 84vw); margin-left: calc(min(340px, 84vw) / -2); padding: 12px 20px 14px; gap: 14px; font-size: min(12vw, 50px); border-radius: 26px; animation: playPulse 1.6s ease-in-out infinite; }
#playBtn svg { width: min(9vw, 38px); height: min(9vw, 38px); }
@keyframes playPulse { 50% { scale: 1.04; } }
#homeNav { position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 22px); width: min(360px, calc(100vw - 32px)); transform: translateX(-50%); display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.navBtn { height: 84px; border-radius: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; cursor: pointer; padding: 0; }
.navBtn svg { width: 36px; height: 36px; filter: drop-shadow(0 2px 0 var(--ink)); }
.navBtn span { font-size: 17px; text-shadow: var(--olS), 0 2px 0 var(--ink) !important; }
#wallet { position: absolute; right: 14px; top: calc(env(safe-area-inset-top) + 16px); display: flex; align-items: center; gap: 6px; padding: 4px 4px 4px 5px; border-radius: 999px;
  background: var(--pill); border: 2px solid rgba(255, 255, 255, .22); box-shadow: 0 3px 0 rgba(20, 32, 70, .35); }
#wallet > svg { width: 32px; height: 32px; filter: drop-shadow(0 2px 0 rgba(20, 32, 70, .4)); }
#walletN { font-size: 22px; min-width: 26px; text-align: center; color: #fff; }
#walletAdd { width: 32px; height: 32px; border-radius: 10px; border: 2px solid #d9ffc4; background: linear-gradient(#8deb63, #3cb83a); box-shadow: 0 3px 0 #1f7a26; display: grid; place-items: center; padding: 0; cursor: pointer; }
#walletAdd svg { width: 20px; height: 20px; filter: drop-shadow(0 1px 0 #1e6b1c); }
#walletAdd:active { transform: translateY(2px); box-shadow: 0 1px 0 #1f7a26; }
#homeToast { position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 236px); transform: translateX(-50%); padding: 8px 18px 7px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 18px;
  white-space: nowrap; opacity: 0; box-shadow: 0 4px 12px rgba(20, 35, 80, .35); }
#homeToast.on { animation: toast 1.6s ease-out; }

/* ---------- cards: results, settings, level card ---------- */
.card { background: linear-gradient(#5a7cc8, #3a5aa6 55%, #2f4a8c); border: 3px solid rgba(255, 255, 255, .85); border-radius: 26px;
  box-shadow: 0 7px 0 var(--ink), 0 18px 34px rgba(20, 35, 80, .4), inset 0 3px 0 rgba(255, 255, 255, .3); -webkit-backdrop-filter: none; backdrop-filter: none; }
#brief, #results, #settings { background: radial-gradient(ellipse at 50% 55%, rgba(40, 64, 130, .2), rgba(27, 45, 94, .6)); }
.ribbon span { font-size: min(11vw, 42px); transform: rotate(-3deg); }
.statList { background: rgba(22, 36, 80, .38); border: 0; box-shadow: inset 0 3px 8px rgba(15, 25, 60, .35); }
.stat { border-bottom-color: rgba(255, 255, 255, .14); }
.stat > span { color: #dfe9ff; font-size: 19px; }
.stat b { font-size: 28px; text-shadow: var(--olS), 0 3px 0 var(--ink) !important; }
#rTeaser { color: #fff; }
#gearPick { background: rgba(22, 36, 80, .38); border: 0; }
#gearPick button { color: #dfe9ff; font-size: 17px; }
#gearPick button.on { color: var(--ink); background: linear-gradient(#ffe36a, #ffc21f); box-shadow: 0 3px 0 #b56a00, inset 0 2px 0 rgba(255, 255, 255, .6); }
#settings .setLbl { color: #dfe9ff; }
#startCard .sName { color: #fff; font-size: 22px; text-shadow: var(--olS), 0 3px 0 var(--ink) !important; }
#startCard .sLvl { transform: rotate(-3deg); font-size: min(12vw, 50px); }
#startCard .sGoal { background: var(--pill); border: 2px solid rgba(255, 255, 255, .25); box-shadow: 0 4px 0 rgba(20, 32, 70, .35); }
#startCard .sGoal small { color: #cfe0ff; font-family: 'Fredoka', system-ui, sans-serif; font-weight: 700; }
#startCard .sGoal b { font-size: 21px; text-shadow: var(--olS) !important; }

/* ---------- level map: sunny, with the header floating over the slope ---------- */
#map { background: #e9eefc; }
.mapArt { filter: saturate(1.12); }
.mapInner::after { mix-blend-mode: multiply; background: linear-gradient(#c3cdf5, #dfe5fb 45%, #cfd8f7); opacity: .55; }
.mapHead { position: absolute; left: 0; right: 0; top: 0; z-index: 4; align-items: flex-start; border: 0; box-shadow: none; pointer-events: none; padding-bottom: 34px;
  background: linear-gradient(rgba(125, 155, 225, .95), rgba(125, 155, 225, .75) 55%, rgba(125, 155, 225, 0)); }
.mapHead .mBack { pointer-events: auto; }
.mTitle { font-size: min(9vw, 36px); line-height: 1.05; }
.mTitle small { font-family: 'Lilita One', system-ui, sans-serif; font-size: 14px; letter-spacing: 2px; color: #e3ecff; margin-bottom: 2px; text-shadow: var(--olS) !important; }
.mProg { display: flex; justify-content: center; gap: 6px; margin-top: 8px; }
.mProg i { width: 26px; height: 10px; border-radius: 5px; background: rgba(255, 255, 255, .35); border: 2px solid rgba(255, 255, 255, .9); box-shadow: 0 2px 0 rgba(27, 45, 94, .45); }
.mProg i.done { background: linear-gradient(#ffe36a, #ffb91f); border-color: #fff4c4; }
.mProg i.cur { animation: hpPulse 1.4s ease-in-out infinite; background: rgba(255, 255, 255, .8); }
.mCount { margin-top: 6px; font-family: 'Fredoka', system-ui, sans-serif; font-weight: 700; font-size: 12px; letter-spacing: 1.5px; text-shadow: var(--olS); }
.mapScroll { position: relative; }
/* level bubbles: round and glossy, white rim, a hard drop underneath */
.mNode { width: 15vw; height: 15vw; max-width: 62px; max-height: 62px; border-radius: 50% !important; border: 4px solid #fff !important; color: #fff; font-size: min(8.2vw, 34px);
  background: radial-gradient(circle at 38% 30%, #8cc0ff, #3a7cf0 50%, #2457c9) !important; box-shadow: 0 5px 0 #173b8a, 0 10px 14px rgba(20, 40, 100, .3) !important; filter: none; }
.mNode::before { inset: 7% 18% 52% 18%; border-radius: 50%; clip-path: none; background: linear-gradient(rgba(255, 255, 255, .6), rgba(255, 255, 255, 0)); z-index: 1; }
.mNode::after { display: none; }
.mNode > span { margin-top: 3px; }
.mNode.done { background: radial-gradient(circle at 38% 30%, #a8f58c, #4cc83f 50%, #2f9f31) !important; box-shadow: 0 5px 0 #1d6e22, 0 10px 14px rgba(20, 80, 30, .3) !important; }
.mNode.locked { color: #fff; background: radial-gradient(circle at 38% 30%, #a7bde6, #6f8fcf 50%, #5473b4) !important; border-color: #eef3ff !important; box-shadow: 0 5px 0 #34508f, 0 10px 14px rgba(20, 40, 100, .25) !important; }
.mNode.locked > span { text-shadow: var(--ol), 0 4px 0 var(--ink) !important; opacity: .92; }
.mNode.cur { width: 18vw; height: 18vw; max-width: 74px; max-height: 74px; font-size: min(10vw, 42px); animation: curPulse 1.5s ease-in-out infinite;
  box-shadow: 0 0 0 5px #ffd23a, 0 0 0 9px rgba(255, 220, 90, .45), 0 0 30px 12px rgba(255, 220, 90, .7), 0 9px 0 #173b8a !important; }
@keyframes curPulse { 50% { transform: translate(-50%, -50%) scale(1.07); } }
.mBadge { width: 42%; height: 42%; top: auto; bottom: auto; left: auto; right: auto; z-index: 3; box-shadow: 0 2px 0 rgba(20, 32, 70, .45); }
.mBadge.lock { top: -12%; right: -14%; background: linear-gradient(#3f5ca0, #24396f); border: 2.5px solid #fff; }
.mBadge.ok { bottom: -8%; right: -14%; width: 46%; height: 46%; box-shadow: none; }
.mBadge.star { top: -14%; left: -16%; background: linear-gradient(#3f5ca0, #24396f); border: 2.5px solid #fff; }
.mBadge.star svg { width: 84%; height: 84%; }
.mType { display: none; }
.mKind { display: flex; align-items: center; gap: 4px; margin-top: 10px; padding: 3px 10px 3px 4px; border-radius: 999px; background: rgba(30, 48, 100, .9); border: 1.5px solid rgba(255, 255, 255, .3);
  font-size: 13px; letter-spacing: .6px; color: #fff; box-shadow: 0 3px 0 rgba(15, 25, 60, .4); text-shadow: 0 1px 0 var(--ink) !important; z-index: 2; }
.mKind i { width: 19px; height: 19px; display: grid; place-items: center; flex: none; }
.mKind i svg { width: 100%; height: 100%; display: block; }
.mKind.k-finish i, .mKind.k-time i, .mKind.k-race i { background: #3a7cf0; border-radius: 50%; padding: 2px; }
.mKind.k-escape i { background: #e5484d; border-radius: 50%; padding: 2px; }
.mNode.locked .mKind { color: #fff; }
.mToast { background: var(--ink); border: 0; font-size: 16px; }
.mapInner { margin-top: calc(env(safe-area-inset-top) + 104px); }
.logoPeak { width: min(36vw, 150px); margin-bottom: -7vw; }
/* home: smaller buttons so the bear gets the room */
#playBtn { bottom: calc(env(safe-area-inset-bottom) + 112px); width: min(270px, 70vw); margin-left: calc(min(270px, 70vw) / -2); padding: 8px 18px 10px; gap: 10px; font-size: min(10vw, 38px); border-radius: 22px; }
#playBtn svg { width: min(7vw, 28px); height: min(7vw, 28px); }
#homeNav { width: min(290px, calc(100vw - 64px)); gap: 10px; bottom: calc(env(safe-area-inset-bottom) + 22px); }
.navBtn { height: 66px; border-radius: 16px; gap: 3px; }
.navBtn svg { width: 28px; height: 28px; }
.navBtn span { font-size: 14px; }
#homeToast { bottom: calc(env(safe-area-inset-bottom) + 190px); }
/* home title: SVG lettering (stroked outline + drop) so iPhone Safari draws the outline too */
#logoTxt { position: relative; z-index: 1; width: min(92vw, 420px); height: auto; overflow: visible; display: block; filter: drop-shadow(0 8px 10px rgba(20, 35, 80, .3)); }
body.lite #logoTxt { filter: none; }
.arcadeTxt, .title, .ribbon span { paint-order: normal; -webkit-background-clip: border-box !important; background-clip: border-box !important; }
/* settings: pop in straight away (the shared card animation waits .5 s for the results tally) */
#settings .card { animation: cardIn .22s cubic-bezier(.2, 1.3, .4, 1) both; }
/* at the start line the level card already shows the goal: the HUD's goal pill waits until you drop in */
#hud.gate #goal { visibility: hidden; }
/* one speedometer, always bottom left: it shows the drop-in speed at the start too (the centred start gauge is gone) */
#launch { display: none !important; }
#hud.gate #speedo { opacity: 1; }
/* ---------- shop: top bar over the bear, a panel of tiles at the bottom ---------- */
#shop { position: fixed; inset: 0; z-index: 7; pointer-events: none; display: flex; flex-direction: column; justify-content: space-between; }
#shop.hidden { display: none; }
#shop button, .shSheet { pointer-events: auto; }
.shTop { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(env(safe-area-inset-top) + 14px) 14px 0; }
.shTitle { font-family: 'Lilita One', system-ui, sans-serif; font-size: 40px; color: #fff; letter-spacing: .5px; transform: rotate(-3deg); text-shadow: var(--ol), 0 5px 0 var(--ink); }
.shWallet { display: flex; align-items: center; gap: 6px; padding: 4px 14px 4px 5px; border-radius: 999px; background: var(--pill); border: 2px solid rgba(255, 255, 255, .22); box-shadow: 0 3px 0 rgba(20, 32, 70, .35); }
.shWallet svg { width: 30px; height: 30px; }
.shWallet b { font-family: 'Lilita One', system-ui, sans-serif; font-weight: 400; font-size: 22px; color: #fff; text-shadow: var(--ol), 0 3px 0 var(--ink); }
.shSheet { margin: 0 auto; width: min(440px, 100vw); padding: 14px 16px calc(env(safe-area-inset-bottom) + 16px); border-radius: 26px 26px 0 0;
  background: linear-gradient(#5a7cc8, #3a5aa6 55%, #2f4a8c); border: 3px solid rgba(255, 255, 255, .85); border-bottom: 0;
  box-shadow: 0 -10px 30px rgba(20, 35, 80, .35), inset 0 3px 0 rgba(255, 255, 255, .3); animation: shUp .28s cubic-bezier(.2, 1.2, .4, 1) both; }
@keyframes shUp { from { transform: translateY(60%); opacity: 0; } }
.shTabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; border-radius: 16px; background: rgba(22, 36, 80, .4); }
.shTabs button { border: 0; border-radius: 12px; padding: 8px 0 7px; background: none; color: #dfe9ff; cursor: pointer; font-family: 'Lilita One', system-ui, sans-serif; font-size: 18px; letter-spacing: .5px; }
.shTabs button.on { color: var(--ink); background: linear-gradient(#ffe36a, #ffc21f); box-shadow: 0 3px 0 #b56a00, inset 0 2px 0 rgba(255, 255, 255, .6); }
.shName { margin: 10px 0 8px; text-align: center; font-family: 'Lilita One', system-ui, sans-serif; font-size: 24px; color: #fff; text-shadow: var(--olS), 0 3px 0 var(--ink); }
.shGrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-height: 34vh; overflow-y: auto; padding: 2px 2px 6px; }
.shTile { position: relative; aspect-ratio: 1 / 1.08; border-radius: 16px; border: 2.5px solid rgba(255, 255, 255, .35); background: radial-gradient(circle at 50% 35%, #e9f2ff, #b9cdf2);
  box-shadow: 0 4px 0 var(--tileSh); display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 4px 2px 0; cursor: pointer; }
.shTile svg { width: 78%; height: auto; flex: none; }
.shTile.locked { background: radial-gradient(circle at 50% 35%, #c9d6ee, #94a9d2); }
.shTile.locked > svg { filter: saturate(.85); }
.shTile.sel { border-color: #ffd23a; box-shadow: 0 0 0 3px #ffd23a, 0 4px 0 var(--tileSh), 0 0 18px rgba(255, 210, 60, .7); }
.shTile:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--tileSh); }
.shTile em { position: absolute; left: 50%; bottom: -7px; transform: translateX(-50%); display: flex; align-items: center; gap: 2px; white-space: nowrap; padding: 2px 7px 1px 3px; border-radius: 999px;
  font-style: normal; font-family: 'Lilita One', system-ui, sans-serif; font-size: 12.5px; color: #fff; background: var(--ink); border: 1.5px solid rgba(255, 255, 255, .5); }
.shTile em svg { width: 14px; height: 14px; }
.shTile em.own, .shTile em.eq { padding: 2px 7px 1px; }
.shTile em.eq { background: linear-gradient(#5fd651, #34ad37); border-color: #d9ffc4; }
#shAct { margin-top: 16px; padding: 9px 16px 10px; font-size: 24px; border-radius: 20px; gap: 6px; }
#shAct svg { width: 26px; height: 26px; filter: drop-shadow(0 2px 0 #8a5300); }
#shAct.buy { background: linear-gradient(#ffe36a, #ffc21f 50%, #f0a000); border-color: #fff4c4; box-shadow: 0 7px 0 #b56a00, 0 12px 18px rgba(120, 70, 0, .3), inset 0 3px 0 rgba(255, 255, 255, .5); }
#shAct.buy span { text-shadow: 0 -2.5px 0 #8a5300, 0 2.5px 0 #8a5300, 2.5px 0 0 #8a5300, -2.5px 0 0 #8a5300, 1.8px 1.8px 0 #8a5300, -1.8px 1.8px 0 #8a5300, 1.8px -1.8px 0 #8a5300, -1.8px -1.8px 0 #8a5300, 0 4px 0 #8a5300; }
#shAct.off { background: linear-gradient(#8ea3cf, #6f86b8); border-color: rgba(255, 255, 255, .5); box-shadow: 0 5px 0 var(--tileSh); cursor: default; }
#shAct.off span { text-shadow: var(--olS), 0 2px 0 var(--ink); }
#shAct.off::after { display: none; }
.shToast { position: absolute; left: 50%; top: 42%; transform: translateX(-50%); padding: 10px 22px 9px; border-radius: 999px; background: linear-gradient(#ffe36a, #ffc21f); color: var(--ink);
  font-family: 'Lilita One', system-ui, sans-serif; font-size: 22px; white-space: nowrap; opacity: 0; box-shadow: 0 5px 0 #b56a00, 0 0 30px rgba(255, 210, 60, .8); }
.shToast.on { animation: toast 1.8s ease-out; }
/* settings: music / sound switches */
#audioPick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 4px; }
#audioPick button { display: flex; align-items: center; gap: 6px; padding: 9px 10px; border-radius: 14px; border: 0; cursor: pointer; background: rgba(22, 36, 80, .38); color: #9fb2da;
  font-family: 'Lilita One', system-ui, sans-serif; font-size: 16px; letter-spacing: .3px; }
#audioPick svg { width: 22px; height: 22px; flex: none; }
#audioPick i { margin-left: auto; font-style: normal; font-size: 12px; padding: 2px 7px; border-radius: 999px; background: rgba(0, 0, 0, .25); }
#audioPick button.on { color: #fff; background: linear-gradient(#5fd651, #34ad37); box-shadow: 0 3px 0 #1f7a26, inset 0 2px 0 rgba(255, 255, 255, .4); text-shadow: 0 1px 0 #1e6b1c; }
#audioPick button.on i { background: rgba(255, 255, 255, .25); }
/* level map: switch worlds from the header */
.mWorld { position: absolute; top: calc(env(safe-area-inset-top) + 150px); display: flex; align-items: center; gap: 3px; padding: 6px 10px; border-radius: 14px; pointer-events: auto; cursor: pointer;
  background: linear-gradient(var(--tile1), var(--tile2)); border: 2px solid rgba(255, 255, 255, .3); box-shadow: 0 4px 0 var(--tileSh); color: #fff; font-family: 'Lilita One', system-ui, sans-serif; font-size: 13px; letter-spacing: .3px; }
.mWorld svg { width: 18px; height: 18px; filter: drop-shadow(0 1px 0 var(--ink)); }
.mWorld span { text-shadow: var(--olS); }
.mWorld.prev { left: 12px; } .mWorld.next { right: 12px; flex-direction: row-reverse; }
.mWorld:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--tileSh); }

/* ---------- Avalanche Run prototype (escape.js): home button, best marker, results + upgrade shop ---------- */
#progBest { display: none; position: absolute; left: -7px; right: -7px; height: 3px; margin-bottom: -1.5px; bottom: 0; background: #ffd23a; border-radius: 2px; box-shadow: 0 0 0 1.5px var(--ink); }
#progBest::after { content: 'BEST'; position: absolute; right: 100%; top: -6px; margin-right: 4px; font: 900 10px 'Rubik', system-ui, sans-serif; color: #ffd23a; text-shadow: var(--olS); }
#hud.esc #progBest { display: block; }

#eAdPlay { position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: #000; color: #fff; font: 900 26px 'Rubik', system-ui, sans-serif; }
#eAdPlay small { font: 600 13px 'Fredoka', system-ui, sans-serif; color: #aaa; }
#eAdPlay.hidden { display: none; }
/* Slingshot Run: the centred 0-100% power gauge is back while you pull (the speedo waits until you're off) */
#hud.esc #launch { display: block !important; }
#hud.esc.gate #speedo { opacity: 0; }

/* ---------- Slingshot Run (/slingshot) home: coins + level up top, tap to play, three upgrade cards along the bottom ---------- */
body.app-sling #gearPick, body.app-sling #rideLbl { display: none; }
body.app-sling #setBtn { left: auto; right: 14px; }
#appSwitch { width: 100%; margin-top: 14px; padding: 10px; }
#slHome { position: fixed; inset: 0; z-index: 3; pointer-events: none; }
#slHome.hidden { display: none; }
#slCoins { position: absolute; left: 50%; top: calc(env(safe-area-inset-top) + 16px); transform: translateX(-50%); display: flex; align-items: center; gap: 6px; padding: 3px 14px 3px 4px;
  border-radius: 999px; background: var(--pill); border: 2px solid rgba(255, 255, 255, .25); box-shadow: 0 3px 0 rgba(15, 25, 60, .35); transition: opacity .25s; }
#slCoins svg { width: 30px; height: 30px; }
#slCoins b { font: italic 900 21px 'Rubik', system-ui, sans-serif; color: #fff; text-shadow: var(--olS), 0 2px 0 var(--ink); }
#slLevel { position: absolute; left: 0; right: 0; top: calc(env(safe-area-inset-top) + 66px); text-align: center; font: italic 900 min(10vw, 42px) 'Rubik', system-ui, sans-serif; color: #fff;
  letter-spacing: 1px; text-shadow: var(--ol), 0 4px 0 var(--ink); transition: opacity .25s; }
#slTap { position: absolute; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom) + min(64vw, 262px)); text-align: center; font: italic 900 24px 'Rubik', system-ui, sans-serif; color: #fff;
  text-shadow: var(--ol), 0 3px 0 var(--ink); animation: slTap 1.3s ease-in-out infinite; transition: opacity .25s; }
@keyframes slTap { 50% { opacity: .55; transform: scale(.96); } }
#slCards { position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 14px); transform: translateX(-50%); width: min(440px, calc(100vw - 20px)); display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; transition: opacity .25s, transform .25s; }
.slCard { --c: #ff5a4e; --btn: linear-gradient(#ff8a5c, #ff4d3d 55%, #e0262e); --btnSh: #8f1f22; --btnB: #ffd2c4; position: relative; pointer-events: auto; display: flex; flex-direction: column; gap: 5px; padding: 7px 6px 7px; border-radius: 16px;
  background: linear-gradient(var(--tile1), var(--tile2)); border: 3px solid rgba(255, 255, 255, .32); box-shadow: 0 5px 0 var(--tileSh), 0 8px 14px rgba(20, 32, 70, .25); color: #fff; font-family: 'Rubik', system-ui, sans-serif; text-align: center; }
.slCard[data-id="board"] { --c: #4fb8ff; --btn: linear-gradient(#6fe0ff, #2fa8ff 55%, #1f7ae8); --btnSh: #124a9a; --btnB: #c8f2ff; }
.slCard[data-id="income"] { --c: #ffc21f; --btn: linear-gradient(#9dff6a, #4fd34a 55%, #2fae36); --btnSh: #1f7a26; --btnB: #e0ffc8; }
.slHead { display: flex; align-items: center; justify-content: flex-start; padding-left: 3px; }
.slHead span { font-weight: 900; font-size: min(3.4vw, 14px); letter-spacing: .3px; text-shadow: var(--olS), 0 2px 0 var(--ink); }
.slLv { position: absolute; top: -12px; right: -8px; min-width: 30px; height: 30px; padding: 0 5px; border-radius: 15px; display: grid; place-items: center; background: #1b2d5e; border: 2px solid rgba(255, 255, 255, .5);
  font: normal 900 15px 'Rubik', system-ui, sans-serif; box-shadow: 0 2px 0 rgba(0, 0, 0, .3); }
.slArt { aspect-ratio: 5 / 4; border-radius: 10px; background: linear-gradient(#f4f9ff, #cddff5); overflow: hidden; }
.slArt svg { width: 100%; height: 100%; display: block; }
.slSub { font: 700 min(2.9vw, 12px) 'Fredoka', system-ui, sans-serif; color: #d6e8ff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: -1px; }
.slPips { display: flex; gap: 3px; }
.slPips i { flex: 1; height: 9px; border-radius: 3px; background: rgba(5, 10, 30, .4); }
.slPips i.on { background: var(--c); box-shadow: 0 0 6px var(--c); }
.slPips i.next { animation: pipNext .8s ease-in-out infinite; }
@keyframes pipNext { 50% { background: var(--c); } }
.slBuy { display: flex; flex-direction: column; align-items: center; padding: 5px 2px 6px; border-radius: 12px; background: var(--btn); border: 2px solid var(--btnB); box-shadow: 0 4px 0 var(--btnSh), 0 0 12px rgba(255, 255, 255, .25), inset 0 2px 0 rgba(255, 255, 255, .45); }
.slBuy span, .slBuy b { text-shadow: var(--olS), 0 2px 0 var(--ink) !important; }
.slBuy span { font-weight: 900; font-size: min(3.3vw, 14px); text-shadow: 0 2px 0 rgba(0, 0, 0, .3); }
.slBuy b { display: flex; align-items: center; gap: 3px; font: italic 900 min(3.8vw, 16px) 'Rubik', system-ui, sans-serif; text-shadow: 0 2px 0 rgba(0, 0, 0, .35); }
.slBuy b svg { width: 16px; height: 16px; }
.slBuy.poor { filter: saturate(.45) brightness(.8); box-shadow: 0 4px 0 var(--btnSh); }
.slBuy.evolve { background: linear-gradient(#ffe36a, #ffc21f 55%, #f09000); border-color: #fff6c0; box-shadow: 0 4px 0 #9a5a00, 0 0 14px rgba(255, 200, 40, .7), inset 0 2px 0 rgba(255, 255, 255, .5); color: #fff; animation: evolve 1s ease-in-out infinite; }
.slBuy.evolve.poor { animation: none; box-shadow: 0 4px 0 #9a5a00; }
@keyframes evolve { 50% { transform: scale(1.05); } }
.slBuy.max { background: rgba(5, 10, 30, .45); box-shadow: none; }
.slCard:active { transform: translateY(3px); }
.slCard.pop { animation: cardPop .3s ease-out; }
@keyframes cardPop { 40% { transform: scale(1.07); } }
.slCard.nope { animation: nope .3s; }
@keyframes nope { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
#slHome.cut #slCards { opacity: 0; transform: translate(-50%, 40px); pointer-events: none; }
#slHome.cut #slCards .slCard { pointer-events: none; }
#slHome.cut #slTap, #slHome.cut #slLevel, #slHome.cut #slCoins { opacity: 0; }
#cutCard { position: absolute; left: 50%; top: calc(env(safe-area-inset-top) + 9vh); width: min(86vw, 360px); transform: translate(-50%, -20px) scale(.8); opacity: 0; transition: opacity .3s, transform .35s cubic-bezier(.2, 1.4, .4, 1);
  pointer-events: none; text-align: center; color: #fff; font-family: 'Rubik', system-ui, sans-serif; }
#cutCard.on { opacity: 1; transform: translate(-50%, 0) scale(1); pointer-events: auto; }
#cutKind { font: italic 900 min(9vw, 36px) 'Rubik', system-ui, sans-serif; color: #ffd23a; text-shadow: var(--ol), 0 4px 0 var(--ink); }
#cutName { margin-top: 4px; font-weight: 900; font-size: 24px; text-shadow: var(--ol), 0 3px 0 var(--ink); }
#cutStat { display: inline-block; margin-top: 8px; padding: 4px 14px; border-radius: 999px; background: var(--pill); font-weight: 800; font-size: 16px; }
#cutFrom { margin-top: 6px; font: 700 13px 'Fredoka', system-ui, sans-serif; color: #fff; text-shadow: var(--olS); opacity: .85; }
#cutFlash { position: fixed; inset: 0; z-index: 4; background: #fff; opacity: 0; pointer-events: none; }
#cutFlash.on { animation: flash .6s ease-out; }
@keyframes flash { 0% { opacity: .95; } 100% { opacity: 0; } }

/* ---------- Slingshot Run: end of run. Coins burst up next to him into a big counter, then the run report slides up ---------- */
#report { position: fixed; inset: 0; z-index: 6; pointer-events: none; font-family: 'Rubik', system-ui, sans-serif; color: #fff; }
#report.hidden { display: none; }
#rpWallet { position: absolute; left: 14px; top: calc(env(safe-area-inset-top) + 14px); display: flex; align-items: center; gap: 6px; padding: 3px 14px 3px 4px; border-radius: 999px;
  background: var(--pill); border: 2px solid rgba(255, 255, 255, .25); box-shadow: 0 3px 0 rgba(15, 25, 60, .35); }
#rpWallet svg { width: 30px; height: 30px; }
#rpWallet b { font: italic 900 20px 'Rubik', system-ui, sans-serif; text-shadow: var(--olS), 0 2px 0 var(--ink); }
#rpWallet.bump { animation: bump .18s ease-out; }
#rpBurst { position: absolute; left: 0; right: 0; top: 17vh; display: flex; align-items: center; justify-content: center; gap: 8px; opacity: 0; transform: scale(.6); transition: opacity .3s, transform .35s cubic-bezier(.2, 1.5, .4, 1); }
#rpBurst.on { opacity: 1; transform: scale(1); }
#rpBurst.off { opacity: 0; transform: translateY(-30px) scale(.8); }
#rpBurstIc svg { width: 52px; height: 52px; display: block; filter: drop-shadow(0 3px 0 rgba(27, 45, 94, .5)); }
#rpBurstIc.bump { animation: bump .14s ease-out; }
#rpBurstN { font: italic 900 min(15vw, 64px) 'Rubik', system-ui, sans-serif; color: #ffe36a; text-shadow: var(--ol), 0 5px 0 var(--ink); }
#rpCard { position: absolute; left: 50%; top: calc(env(safe-area-inset-top) + 7vh); width: min(90vw, 360px); transform: translate(-50%, 110vh); transition: transform .5s cubic-bezier(.2, 1.15, .4, 1); pointer-events: auto; }
#rpCard.on { transform: translate(-50%, 0); }
#rpTitle { text-align: center; font: italic 900 min(11vw, 44px) 'Rubik', system-ui, sans-serif; line-height: 1; color: #fff; text-shadow: var(--ol), 0 5px 0 var(--ink); transform: rotate(-3deg); }
#rpTitle.best { color: #ffd23a; }
#rpHero { display: flex; flex-direction: column; align-items: center; margin: 10px 0 12px; }
#rpDistM { font: italic 900 min(14vw, 58px) 'Rubik', system-ui, sans-serif; line-height: 1; color: #fff; text-shadow: var(--ol), 0 5px 0 var(--ink); }
#rpNote { min-height: 18px; margin-top: 6px; font: 800 15px 'Rubik', system-ui, sans-serif; text-shadow: var(--olS), 0 2px 0 var(--ink); }
#rpNote.good { color: #9dff6a; }
#rpTrackBar { position: relative; width: 82%; height: 12px; margin-top: 10px; border-radius: 6px; background: var(--pill); border: 2px solid rgba(255, 255, 255, .5); }
#rpFill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 4px; background: linear-gradient(90deg, #5fe3ff, #2f7bff); transition: width .9s cubic-bezier(.2, .8, .2, 1); }
#rpBestM { position: absolute; top: -5px; bottom: -5px; width: 4px; margin-left: -2px; border-radius: 2px; background: #ffd23a; box-shadow: 0 0 0 1.5px var(--ink); }
#rpFlag { position: absolute; right: -8px; top: -9px; width: 14px; height: 26px; border-radius: 2px; background: repeating-conic-gradient(#fff 0 25%, #1b2d5e 0 50%) 0 0 / 7px 7px; box-shadow: 0 0 0 1.5px var(--ink); }
#rpPanel { padding: 6px 12px; border-radius: 18px; background: linear-gradient(var(--tile1), var(--tile2)); border: 3px solid rgba(255, 255, 255, .32); box-shadow: 0 5px 0 var(--tileSh), 0 10px 18px rgba(20, 32, 70, .25); }
.rpRow { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-bottom: 2px solid rgba(255, 255, 255, .12); opacity: 0; transform: translateX(-14px); transition: opacity .25s, transform .25s; }
.rpRow:last-child { border-bottom: 0; }
.rpRow.in { opacity: 1; transform: none; }
.rpIc { width: 28px; height: 28px; flex: none; } .rpIc svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 2px 0 rgba(20, 32, 70, .4)); }
.rpRow span { flex: 1; font: 700 min(4.4vw, 18px) 'Fredoka', system-ui, sans-serif; text-shadow: var(--olS), 0 2px 0 var(--ink); }
.rpRow b { font: italic 900 min(5.6vw, 24px) 'Rubik', system-ui, sans-serif; color: #fff; text-shadow: var(--olS), 0 2px 0 var(--ink); }
.rpMulRow b { color: #9dff6a; }
#rpTotal { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding: 8px 16px; border-radius: 18px; background: linear-gradient(#ffe36a, #ffc21f 60%, #f0a000);
  border: 3px solid #fff6c0; box-shadow: 0 5px 0 #a35a00, 0 10px 18px rgba(120, 70, 0, .3); opacity: 0; transform: scale(.85); transition: opacity .25s, transform .3s cubic-bezier(.2, 1.5, .4, 1); }
#rpTotal.in { opacity: 1; transform: none; }
#rpTotal span { font: italic 900 22px 'Rubik', system-ui, sans-serif; color: #7a3f00; text-shadow: 0 1px 0 rgba(255, 255, 255, .5); }
#rpTotal div { display: flex; align-items: center; gap: 6px; }
#rpTotal div svg { width: 34px; height: 34px; filter: drop-shadow(0 2px 0 rgba(120, 60, 0, .5)); }
#rpTotal b { font: italic 900 min(11vw, 44px) 'Rubik', system-ui, sans-serif; line-height: 1.05; color: #fff; text-shadow: var(--ol), 0 4px 0 var(--ink); }
#rpTotal b.bump { animation: bump .2s ease-out; }
#rpBtns { display: flex; gap: 10px; margin-top: 16px; }
#rpAd { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px; border-radius: 18px; background: linear-gradient(#ffe36a, #f0a000);
  border: 3px solid #fff6c0; box-shadow: 0 5px 0 #a35a00; color: #fff; font: italic 900 16px 'Rubik', system-ui, sans-serif; text-shadow: var(--olS), 0 2px 0 var(--ink); }
#rpAd svg { width: 30px; height: 24px; filter: drop-shadow(0 2px 0 rgba(120, 60, 0, .5)); }
#rpAd.hidden { display: none; }
#rpNext { flex: 1.7; margin-top: 0; padding: 12px; font-size: min(7vw, 28px); }
#rpBtns button:active { transform: translateY(4px); }
#rpBtns.done { opacity: .5; pointer-events: none; }
#eAdPlay { pointer-events: auto; }
#hud.esc #mult, #hud.esc #grind, #hud.esc #bank { display: none !important; } /* Slingshot Run: no score, combos or grind points */
/* Slingshot Run: card pictures are renders of the real 3D slingshot / board / coins */
.slArt { position: relative; }
.slArt img { width: 100%; height: 100%; object-fit: contain; display: block; }
.slMul { position: absolute; right: 6px; bottom: 2px; font: italic 900 min(5vw, 22px) 'Rubik', system-ui, sans-serif; color: #fff; text-shadow: var(--ol), 0 2px 0 var(--ink); }
.coinI { width: 18px; height: 18px; display: block; filter: drop-shadow(0 1px 0 rgba(90, 50, 0, .5)); }
#slCoins .coinI { width: 32px; height: 32px; }
/* ---------- Slingshot Run: diamonds and rockets ---------- */
#slTopBar { position: absolute; left: 50%; top: calc(env(safe-area-inset-top) + 16px); transform: translateX(-50%); display: flex; gap: 8px; transition: opacity .25s; }
#slTopBar #slCoins { position: static; transform: none; }
#slGems { display: flex; align-items: center; gap: 5px; padding: 3px 14px 3px 6px; border-radius: 999px; background: var(--pill); border: 2px solid rgba(255, 255, 255, .25); box-shadow: 0 3px 0 rgba(15, 25, 60, .35); }
#slGems svg, #slGems img { width: 28px; height: 28px; display: block; }
#slGems b { font: italic 900 21px 'Rubik', system-ui, sans-serif; color: #fff; text-shadow: var(--olS), 0 2px 0 var(--ink); }
#slHome.cut #slTopBar, #slHome.cut #rocketCard { opacity: 0; pointer-events: none; }
#rocketCard { --c: #7fe8ff; --btn: linear-gradient(#8ff0ff, #3fb8ff 55%, #1f8ae8); --btnSh: #124a9a; --btnB: #d6f8ff; position: absolute; right: 10px; bottom: calc(env(safe-area-inset-bottom) + min(64vw, 262px) + 6px);
  width: min(26vw, 108px); pointer-events: auto; display: flex; flex-direction: column; gap: 5px; padding: 6px; border-radius: 14px; background: linear-gradient(var(--tile1), var(--tile2));
  border: 3px solid rgba(255, 255, 255, .32); box-shadow: 0 5px 0 var(--tileSh), 0 8px 14px rgba(20, 32, 70, .25); color: #fff; font-family: 'Rubik', system-ui, sans-serif; transition: opacity .25s; }
#rocketCard .slLv { top: -11px; right: -9px; }
#rocketCard .rkArt { aspect-ratio: 1; border-radius: 9px; background: linear-gradient(#f4f9ff, #cddff5); overflow: hidden; }
#rocketCard .rkArt img { width: 100%; height: 100%; object-fit: contain; display: block; }
#rocketCard:active { transform: translateY(3px); }
#rocketCard.pop { animation: cardPop .3s ease-out; }
.slBuy b img.gemI, .gemI { width: 18px; height: 18px; display: block; filter: drop-shadow(0 1px 0 rgba(20, 50, 100, .5)); }
.slBuy.gem { background: linear-gradient(#8ff0ff, #3fb8ff 55%, #1f8ae8); border-color: #d6f8ff; box-shadow: 0 4px 0 #124a9a, 0 0 14px rgba(80, 200, 255, .7), inset 0 2px 0 rgba(255, 255, 255, .5); animation: evolve 1s ease-in-out infinite; }
#gemsChip { display: none; }
#hud.esc #gemsChip { display: flex; }
#gemsChip svg { width: 24px; height: 24px; }
#gemsChip.bump { animation: bump .2s ease-out; }
#rocketBtn.hidden { display: none; }
#rocketBtn:active { transform: translateY(3px); }
@keyframes rocketPulse { 50% { transform: scale(1.1); box-shadow: 0 4px 0 #9a3200, 0 0 30px rgba(255, 150, 40, 1); } }
.rpRow.hidden { display: none; }

.progGem { position: absolute; left: 50%; width: 38px; height: 38px; margin: 0 0 -19px -19px; z-index: 2; filter: drop-shadow(0 0 4px #fff) drop-shadow(0 0 8px rgba(80, 220, 255, 1)); animation: gemTwinkle 1.4s ease-in-out infinite; }
.progGem.got { opacity: .3; filter: grayscale(1); animation: none; }
@keyframes gemTwinkle { 50% { transform: scale(1.15); filter: drop-shadow(0 0 9px rgba(160, 245, 255, 1)); } }
#rocketBtn { position: absolute; right: -22px; top: -26px; width: 64px; height: 64px; padding: 4px; border-radius: 50%; pointer-events: auto; z-index: 3;
  background: radial-gradient(circle at 50% 30%, #fff1b0, #ffb02a 45%, #ff4d1f 85%); border: 3px solid #fff; box-shadow: 0 4px 0 #9a3200, 0 0 0 3px #ff7a1a, 0 0 22px rgba(255, 120, 30, .9);
  animation: rocketPulse 1s ease-in-out infinite; }
#rocketBtn img { width: 100%; height: 100%; display: block; transform: rotate(-12deg); filter: drop-shadow(0 2px 0 rgba(120, 40, 0, .5)); }
#rocketBtn i { position: absolute; left: 50%; bottom: -12px; transform: translateX(-50%); padding: 1px 6px; border-radius: 6px; background: #1b2d5e; font: italic 900 10px 'Rubik', system-ui, sans-serif; color: #ffd23a; letter-spacing: .5px; }
#rocketBtn svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 2px 0 rgba(120, 30, 0, .45)); }
#rocketBtn { padding: 7px; background: radial-gradient(circle at 50% 35%, #2f4fa8, #1b2d5e); border-color: #ffd23a; box-shadow: 0 4px 0 #0f1a3a, 0 0 0 3px #ff7a1a, 0 0 22px rgba(255, 120, 30, .9); }
#gemsChip img { width: 26px !important; height: 26px !important; }

/* flat flame button (like Sled Surfers): solid orange disc, dark rim, darker lip, white flame */
#rocketBtn { width: 62px; height: 62px; padding: 9px; right: -20px; top: -24px; background: #e8793a; border: 3px solid #1b2033; box-shadow: inset 0 -6px 0 #b8541f, 0 3px 0 rgba(0, 0, 0, .25); animation: rocketPulse2 1.1s ease-in-out infinite; }
#rocketBtn svg { filter: none; }
@keyframes rocketPulse2 { 50% { transform: scale(1.08); } }
/* home: smaller rocket box, and fewer outlines everywhere */
#rocketCard { width: min(21vw, 84px); padding: 5px; gap: 4px; border: 0; border-radius: 14px; }
#rocketCard .slLv { min-width: 26px; height: 26px; font-size: 12px; top: -9px; right: -8px; border: 2.5px solid #fff; }
#rocketCard .slBuy span { font-size: 11px; } #rocketCard .slBuy b { font-size: 13px; }
.slCard { border: 0; box-shadow: 0 5px 0 var(--tileSh), 0 8px 14px rgba(20, 32, 70, .2); }
.slLv { border: 2.5px solid #fff; box-shadow: 0 2px 0 rgba(15, 25, 60, .35); } /* level badges: white ring */
.slBuy { border: 0 !important; box-shadow: 0 4px 0 var(--btnSh), inset 0 2px 0 rgba(255, 255, 255, .35) !important; }
.slBuy.gem, .slBuy.evolve { box-shadow: 0 4px 0 #9a5a00, inset 0 2px 0 rgba(255, 255, 255, .45) !important; }
.slBuy.gem { box-shadow: 0 4px 0 #124a9a, inset 0 2px 0 rgba(255, 255, 255, .45) !important; }
#slCoins, #slGems { border: 0; }
.progGem { filter: drop-shadow(0 2px 0 rgba(15, 42, 90, .5)); width: 30px; height: 30px; margin: 0 0 -15px -15px; }
@keyframes gemTwinkle { 50% { transform: scale(1.12); } }
/* the flame lives inside #speedo, whose arc svg is rotated 135deg: keep the flame upright and in its button */
#speedo #rocketBtn svg { transform: none; position: static; width: 100%; height: 100%; }
#rocketBtn { width: 52px; height: 52px; padding: 7px; right: -16px; top: -20px; background: #ff8c1a; border: 3px solid #1b2033; box-shadow: inset 0 -5px 0 #d8620a, 0 3px 0 rgba(0, 0, 0, .25); animation: none; }
#slTap { bottom: calc(env(safe-area-inset-bottom) + min(60vw, 244px)); }
/* Slingshot Run: no metres up top; how far down the course you are sits beside the progress bar */
#hud.esc #score { display: none; }
#progPct { display: none; position: absolute; right: calc(100% + 14px); bottom: 0; margin-bottom: -11px; padding: 1px 7px; border-radius: 999px; background: #2f7bff; border: 2px solid #fff;
  font: italic 900 14px/18px 'Rubik', system-ui, sans-serif; color: #fff; text-shadow: 0 1px 0 var(--ink); white-space: nowrap; z-index: 2; }
#hud.esc #progPct { display: block; }
/* Slingshot Run progress bar, lighter: plain % text, a smaller dot, smaller diamonds */
#hud.esc #progPct { padding: 0; background: none; border: 0; right: calc(100% + 9px); margin-bottom: -9px; font-size: 15px; text-shadow: var(--olS), 0 2px 0 var(--ink); }
#hud.esc #progDot { width: 14px; height: 14px; margin: 0 0 -7px -7px; border-width: 3px; }
#hud.esc .progGem { width: 22px; height: 22px; margin: 0 0 -11px -11px; }
/* Slingshot Run: no coin or diamond count while you pull the slingshot back */
#hud.esc.gate #coins, #hud.esc.gate #gemsChip { display: none !important; }
/* Slingshot Run: the diamond count sits top right during the run (coins stay top left) */
#hud.esc #gemsChip { order: 9; margin-left: auto; }
/* can't afford it: the card rocks side to side on its base, settling out (and a short buzz from js) */
.slCard.nope, #rocketCard.nope { animation: cardRock .5s ease-out; transform-origin: 50% 90%; }
@keyframes cardRock { 0% { transform: rotate(0); } 15% { transform: rotate(-7deg); } 35% { transform: rotate(6deg); } 55% { transform: rotate(-4deg); } 75% { transform: rotate(2deg); } 100% { transform: rotate(0); } }
/* the TAP TO PLAY pulse animates opacity, which beat the cutscene's opacity: 0, so stop it and hide it outright */
#slHome.cut #slTap { animation: none; visibility: hidden; }

/* Slingshot Run report: title stamps in, numbers pop as they finish counting, Income stamps, confetti on a new best */
#rpCard.on #rpTitle { animation: rpStamp .45s cubic-bezier(.2, 1.6, .4, 1) .15s both; }
@keyframes rpStamp { from { opacity: 0; transform: scale(2.4) rotate(-10deg); } to { opacity: 1; transform: rotate(-3deg); } }
#rpTitle.best { animation: rpStamp .45s cubic-bezier(.2, 1.6, .4, 1) .15s both, rpGlow 1.1s ease-in-out .6s infinite alternate !important; }
@keyframes rpGlow { to { filter: drop-shadow(0 0 10px rgba(255, 220, 80, .95)); } }
#rpDistM.bump, .rpRow b.bump, #rpBestM.bump { animation: bump .22s ease-out; }
#rpBestM.bump { animation: rpBestHit .5s ease-out; }
@keyframes rpBestHit { 30% { transform: scaleY(1.8); box-shadow: 0 0 0 1.5px var(--ink), 0 0 14px 4px #ffd23a; } }
.rpRow b.stamp { display: inline-block; animation: rpStampB .35s cubic-bezier(.2, 1.8, .4, 1) both; }
@keyframes rpStampB { from { opacity: 0; transform: scale(2.8) rotate(-14deg); } to { opacity: 1; transform: none; } }
#rpTotal.in b { display: inline-block; }
#rpConf { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 3; }
#rpConf i { position: absolute; top: -24px; height: 14px; border-radius: 2px; animation: rpConf linear forwards; }
@keyframes rpConf { to { transform: translate(var(--dx), 112vh) rotate(var(--r)); } }
/* Slingshot Run settings: classic Ski Bear is a quiet text link, not a big button */
body.app-sling #appSwitch { background: none; border: 0; box-shadow: none; color: rgba(223, 233, 255, .55); font-size: 12px; letter-spacing: 1px; text-decoration: underline; margin-top: 8px; padding: 6px; }

/* ---------- free chest: home button (left, mirrors the rocket card) + the open-it overlay ---------- */
#chestBtn { position: absolute; left: 10px; bottom: calc(env(safe-area-inset-bottom) + min(64vw, 262px) + 6px); width: min(21vw, 84px); padding: 5px; display: flex; flex-direction: column; gap: 4px;
  pointer-events: auto; border: 0; border-radius: 14px; background: linear-gradient(var(--tile1), var(--tile2)); box-shadow: 0 5px 0 var(--tileSh), 0 8px 14px rgba(20, 32, 70, .25); transition: opacity .25s; }
#chestBtn .chArt { aspect-ratio: 1; border-radius: 9px; background: linear-gradient(#f4f9ff, #cddff5); display: grid; place-items: center; overflow: hidden; }
#chestBtn .chArt img { width: 100%; display: block; }
#chestLbl { font: italic 900 13px 'Rubik', system-ui, sans-serif; color: #fff; text-align: center; padding: 4px 0 5px; border-radius: 8px; background: rgba(15, 25, 60, .45); text-shadow: var(--olS); letter-spacing: .5px; font-variant-numeric: tabular-nums; }
#chestBtn.ready #chestLbl { background: linear-gradient(#9dff6a, #4fd34a 55%, #2fae36); box-shadow: 0 3px 0 #1f7a26; font-size: 15px; }
#chestBtn.ready .chArt img { animation: chWiggle 2.4s ease-in-out infinite; transform-origin: 50% 90%; }
#chestBtn:active { transform: translateY(3px); }
#chestBtn.nope { animation: nope .3s; }
#slHome.cut #chestBtn { opacity: 0; pointer-events: none; }
@keyframes chWiggle { 0%, 70%, 100% { transform: rotate(0) scale(1); } 74% { transform: rotate(-9deg) scale(1.08); } 80% { transform: rotate(8deg) scale(1.08); } 86% { transform: rotate(-6deg) scale(1.05); } 92% { transform: rotate(3deg); } }
#chestOpen { position: fixed; inset: 0; z-index: 9; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: radial-gradient(ellipse at 50% 45%, rgba(30, 50, 110, .82), rgba(7, 12, 34, .93)); animation: chFade .2s; }
#chestOpen.hidden { display: none; }
#chCanvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#chStage { position: relative; width: min(78vw, 320px); aspect-ratio: 1.1; pointer-events: none; }
#chStage i { position: absolute; width: 18px; height: 18px; background: #fff; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); filter: drop-shadow(0 0 6px #ffe680); animation: chTwinkle 1.6s ease-in-out infinite; opacity: 0; }
#chStage i:nth-child(1) { left: 6%; top: 18%; } #chStage i:nth-child(2) { left: 88%; top: 10%; animation-delay: .5s; width: 14px; height: 14px; }
#chStage i:nth-child(3) { left: 92%; top: 62%; animation-delay: 1s; } #chStage i:nth-child(4) { left: 2%; top: 70%; animation-delay: .8s; width: 12px; height: 12px; }
#chStage i:nth-child(5) { left: 30%; top: 0; animation-delay: 1.3s; width: 12px; height: 12px; } #chStage i:nth-child(6) { left: 66%; top: 2%; animation-delay: .25s; }
@keyframes chTwinkle { 0%, 100% { opacity: 0; transform: scale(.3) rotate(0); } 50% { opacity: 1; transform: scale(1) rotate(45deg); } }
#chRays { position: absolute; left: 50%; top: 45%; width: 150vmax; height: 150vmax; transform: translate(-50%, -50%); opacity: 0; transition: opacity .4s; pointer-events: none;
  background: repeating-conic-gradient(rgba(255, 230, 140, .16) 0 9deg, transparent 9deg 22deg); -webkit-mask: radial-gradient(circle, #000 0, transparent 38%); mask: radial-gradient(circle, #000 0, transparent 38%); animation: chSpin 14s linear infinite; }
#chGlow { position: absolute; left: 50%; top: 45%; width: 70vmin; height: 70vmin; transform: translate(-50%, -50%) scale(.3); border-radius: 50%; background: radial-gradient(circle, rgba(255, 240, 170, .9), rgba(255, 200, 60, .35) 35%, transparent 65%); opacity: 0; pointer-events: none; transition: opacity .3s, transform .5s cubic-bezier(.2, 1.4, .4, 1); }
#chestOpen.open #chRays { opacity: 1; } #chestOpen.open #chGlow { opacity: 1; transform: translate(-50%, -50%) scale(1); }
#chPrize { position: relative; display: flex; gap: 18px; min-height: 52px; align-items: center; }
#chPrize > div { display: flex; align-items: center; gap: 6px; font: italic 900 38px 'Rubik', system-ui, sans-serif; color: #fff; text-shadow: var(--ol), 0 4px 0 var(--ink); animation: stampIn .35s cubic-bezier(.2, 1.6, .4, 1) both; }
#chPrize > div:nth-child(2) { animation-delay: .15s; }
#chPrize img { width: 40px; height: 40px; display: block; }
#chHint { position: relative; margin-top: 6px; font: 400 34px 'Lilita One', system-ui, sans-serif; color: #fff; letter-spacing: 1px; text-shadow: var(--ol), 0 5px 0 var(--ink), 0 0 24px rgba(255, 220, 120, .55); animation: chHintPulse .9s ease-in-out infinite; }
@keyframes chHintPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.14); color: #ffe680; } }
#chestOpen.open #chHint { visibility: hidden; }
#chCollect { position: relative; width: min(64vw, 240px); visibility: hidden; }
#chestOpen.done #chCollect { visibility: visible; animation: stampIn .3s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes stampIn { 0% { transform: scale(2.2); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes chSpin { from { transform: translate(-50%, -50%) rotate(0); } to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes chFade { from { opacity: 0; } }
#slCoins.bump, #slGems.bump { animation: bump .18s ease-out; }
#slHome.chesting #slCards, #slHome.chesting #slTap, #slHome.chesting #slLevel, #slHome.chesting #rocketCard, #slHome.chesting #chestBtn { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .2s; }
#chPrize img.bump { animation: chBump .14s ease-out; }
@keyframes chBump { 40% { transform: scale(1.3); } }
#chPrize b { font: inherit; min-width: 2ch; font-variant-numeric: tabular-nums; }

/* chest button: one light tile with a soft shadow (no navy frame), the label without the heavy outline */
#chestBtn { background: none; box-shadow: none; padding: 0; gap: 0; }
#chestBtn .chArt { border-radius: 16px; background: linear-gradient(#f7fbff, #d6e6f8); box-shadow: 0 4px 0 rgba(30, 50, 100, .22), 0 8px 14px rgba(20, 32, 70, .18); }
#chestLbl { margin: -12px 8px 0; position: relative; padding: 3px 0 4px; border-radius: 10px; background: rgba(27, 45, 94, .78); text-shadow: 0 1.5px 0 rgba(10, 20, 50, .45); }
#chestBtn.ready #chestLbl { box-shadow: 0 3px 0 #1f7a26; text-shadow: 0 1.5px 0 rgba(20, 80, 30, .55); }
/* chest button: a bit smaller than the rocket card */
#chestBtn { width: min(17vw, 68px); left: 14px; }
#chestLbl { font-size: 11px; margin: -10px 7px 0; padding: 2px 0 3px; border-radius: 8px; }
#chestBtn.ready #chestLbl { font-size: 12px; }
.privLink { display: block; margin-top: 12px; text-align: center; font: 600 13px Fredoka, system-ui, sans-serif; color: rgba(255, 255, 255, .7); text-decoration: underline; }
body.clean #hud > :not(#popups):not(#grind), body.clean #stick, body.clean #setBtn { visibility: hidden !important; }
/* wide screens: the chest, rocket card and settings gear sit in a 600px column round the bear instead of out at the window edges */
@media (min-width: 760px) {
  #chestBtn { left: calc(50vw - 300px); }
  #rocketCard { right: calc(50vw - 300px); }
  body.app-sling #setBtn { right: calc(50vw - 300px); }
}
/* wide screens: the run HUD (coins, gems, speedometer + rocket, progress bar) sits in a 760px column round the rider instead of the window corners */
@media (min-width: 760px) {
  #hud { left: max(0px, calc(50vw - 380px)); right: max(0px, calc(50vw - 380px)); }
}
#rocketBtn .key { position: absolute; left: auto; right: -6px; bottom: -6px; transform: none; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 6px; background: #fff; color: #1b2033;
  font: 800 13px/18px 'Rubik', system-ui, sans-serif; font-style: normal; border: 2px solid #1b2033; box-shadow: 0 2px 0 #1b2033; text-align: center; }
