/* Dune Climber - all UI styles. rem based (root font size is set by game.js from the window size); safe-area insets + 100dvh keep phones tidy.
   Sections: base, top bar, HUD, touch pedals, banner + hint, overlays (menu, worlds, stages, sheet, garage, cards, results), responsive */
:root { --acc: #FFA52E; --pn: linear-gradient(180deg, #2A2362, #181340); --sat: 0px; --sar: 0px; --sab: 0px; --sal: 0px; --gold: #FFD23F; }
html, body { margin: 0; height: 100%; height: 100dvh; overflow: hidden; background: #0F0C22; overscroll-behavior: none; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
body { font-family: var(--font-b); color: var(--paper); }
button { font-family: inherit; touch-action: manipulation; -webkit-tap-highlight-color: transparent; cursor: pointer; }
svg { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
svg.fill, .fill svg { fill: currentColor; stroke: none; }
#app, .dcx { position: fixed; inset: 0; width: 100%; height: 100dvh; overflow: hidden; background: #0F0C22; }
.cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.btn { gap: .5em; white-space: nowrap; min-height: 2.6em; font-size: 1rem; }
.btn svg { width: 1.2em; height: 1.2em; flex: none; }
.btn em { font-style: normal; opacity: .8; font-size: .8em; margin-left: .2em; }
.btn--ghost { --bg: rgba(255, 255, 255, .1); --sh: rgba(0, 0, 0, .38); }
.btn--big { font-size: 1.35rem; }
.btn--sm { font-size: .85rem; } .btn--xs { font-size: .7rem; padding: .45em .8em; min-height: 0; border-radius: 9px; }
.btn.ic { padding: .85em .9em; } .btn.ic svg { width: 1.4em; height: 1.4em; }
.btn.dis, .btn:disabled { opacity: .5; filter: grayscale(.5); }
.shake { animation: dcshake .35s; } @keyframes dcshake { 20% { transform: translateX(-5px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(3px); } }

/* ---------- top bar ---------- */
.bar { position: absolute; z-index: 45; left: 0; right: 0; top: 0; padding: calc(var(--sat) + .5rem) calc(var(--sar) + .6rem) 0 calc(var(--sal) + .6rem); display: flex; align-items: flex-start; justify-content: space-between; pointer-events: none; }
.bar > * { pointer-events: auto; }
.home { display: none; align-items: center; gap: 10px; text-decoration: none; padding: 6px 14px 6px 6px; border-radius: 14px; background: rgba(15, 12, 34, .55); }
.home img { width: 2.2rem; height: 2.2rem; } .home b { font-family: var(--font-d); font-weight: 400; font-size: .95rem; } .home b i { font-style: normal; color: var(--lime); }
body:not(.playing) .home { display: inline-flex; }
.tools { display: flex; gap: .4rem; margin-left: auto; }
.tool { width: 2.7rem; height: 2.7rem; border: 0; padding: 0; display: grid; place-items: center; border-radius: .85rem; background: rgba(22, 18, 58, .78); color: #fff; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .14) inset, 0 3px 0 rgba(0, 0, 0, .35); transition: transform .12s, background .15s; backdrop-filter: blur(4px); }
.tool:hover { background: rgba(60, 50, 130, .95); transform: translateY(-1px); } .tool:active { transform: translateY(2px); }
.tool svg { width: 1.35rem; height: 1.35rem; }
body:not(.playing) #bPause { display: none; }

/* ---------- HUD ---------- */
.hud { position: absolute; inset: 0; z-index: 20; pointer-events: none; display: none; }
body.playing .hud { display: block; }
.hud small { display: block; font-size: .58rem; font-weight: 800; letter-spacing: .16em; color: #CFC9F5; }
.hl { position: absolute; left: calc(var(--sal) + .8rem); top: calc(var(--sat) + .5rem); display: flex; flex-direction: column; gap: .35rem; align-items: flex-start; }
.hfuel, .hchip, .ptrack, .hspd { box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .14) inset, 0 4px 0 rgba(0, 0, 0, .3); }
.hfuel { display: flex; align-items: center; gap: .5rem; padding: .32rem .8rem .32rem .55rem; border-radius: 1rem; background: linear-gradient(180deg, rgba(34, 28, 80, .82), rgba(18, 14, 52, .82)); width: 11.5rem; }
.hfuel .hi { width: 1.4rem; height: 1.4rem; color: #7FFFB0; flex: none; } .hfuel .hi svg { width: 100%; height: 100%; }
.hbar { position: relative; flex: 1; height: .85rem; border-radius: 99px; background: rgba(10, 8, 34, .85); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .18) inset; overflow: hidden; }
.hbar i { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; border-radius: 99px; background: linear-gradient(90deg, #2EE6A6, #C6FF3D); box-shadow: 0 0 .8rem rgba(198, 255, 61, .6); transition: width .12s linear; }
.hbar u { position: absolute; top: 0; bottom: 0; width: 2px; background: rgba(0, 0, 0, .45); } .hbar u:nth-of-type(1) { left: 25%; } .hbar u:nth-of-type(2) { left: 50%; } .hbar u:nth-of-type(3) { left: 75%; }
.hfuel.low .hbar i { background: linear-gradient(90deg, #FF3D4B, #FFB04A); box-shadow: 0 0 .8rem rgba(255, 70, 60, .8); animation: lowf .5s ease-in-out infinite alternate; } .hfuel.low .hi { color: #FF6A6A; animation: lowf .5s ease-in-out infinite alternate; }
@keyframes lowf { to { filter: brightness(1.6); } }
.hspd { display: inline-flex; align-items: baseline; gap: .4rem; padding: .1rem .9rem; border-radius: 1rem; background: rgba(18, 14, 52, .72); text-shadow: 0 2px 0 rgba(0, 0, 0, .45); } .hspd b { font: 400 2.1rem/1.1 var(--font-d); font-variant-numeric: tabular-nums; min-width: 2.2ch; text-align: right; } .hspd small { margin: 0; letter-spacing: .08em; }
.hprog { position: absolute; left: 50%; top: calc(var(--sat) + .55rem); transform: translateX(-50%); width: min(34vw, 30rem); text-align: center; }
.ptrack { position: relative; height: .95rem; border-radius: 99px; background: rgba(10, 8, 34, .82); margin: 0 .9rem; }
.ptrack i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 99px; background: linear-gradient(90deg, #FFB04A, #FFD23F); box-shadow: 0 0 .8rem rgba(255, 190, 60, .6); }
.pm { position: absolute; top: 50%; left: 0; width: 1.5rem; height: 1.5rem; margin: -.75rem 0 0 -.75rem; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #FFD23F 55%, #E08A10); box-shadow: 0 3px 0 rgba(0, 0, 0, .4), 0 0 .9rem rgba(255, 210, 63, .8); }
.pf { position: absolute; right: -.95rem; top: 50%; margin-top: -.85rem; width: 1.7rem; height: 1.7rem; color: var(--lime); filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .5)); } .pf svg { width: 100%; height: 100%; stroke-width: 3; }
.pnum { margin-top: .22rem; text-shadow: 0 2px 0 rgba(0, 0, 0, .5); } .pnum b { font: 400 1.5rem var(--font-d); font-variant-numeric: tabular-nums; } .pnum em { font-style: normal; font-weight: 800; font-size: .8rem; color: #CFC9F5; margin-left: .3rem; }
.hr { position: absolute; right: calc(var(--sar) + .8rem); top: calc(var(--sat) + 3.65rem); display: flex; flex-direction: column; align-items: flex-end; gap: .35rem; }
.hchip { display: flex; align-items: center; gap: .4rem; padding: .25rem .8rem .25rem .55rem; border-radius: .9rem; background: rgba(20, 16, 56, .82); text-shadow: 0 2px 0 rgba(0, 0, 0, .45); }
.hchip svg { width: 1.2rem; height: 1.2rem; flex: none; } .hchip b { font: 400 1.15rem var(--font-d); font-variant-numeric: tabular-nums; } .hchip em { font-style: normal; font-weight: 800; font-size: .72rem; color: #B8B2E8; }
.hchip.coin svg { color: var(--gold); } .hchip.coin.got { box-shadow: 0 0 0 2px rgba(198, 255, 61, .8) inset, 0 4px 0 rgba(0, 0, 0, .3); } .hchip.coin.got em { color: var(--lime); }
.hchip.g3 svg { color: var(--cyan); } .hchip.g3.lost { opacity: .5; } .hchip.g3.lost b { text-decoration: line-through; }

/* ---------- touch pedals (touch devices only) ---------- */
.tc { position: absolute; inset: 0; z-index: 25; pointer-events: none; display: none; }
body.is-touch.playing .tc { display: block; }
.tcz { position: absolute; left: 0; right: 0; bottom: 0; height: 64%; pointer-events: auto; touch-action: none; }
.pedal { position: absolute; bottom: calc(var(--sab) + .9rem); pointer-events: none; border-radius: 1.5rem; display: grid; place-items: end center; align-content: end; padding-bottom: .8rem; color: #fff; font: 400 1.05rem var(--font-d); text-shadow: 0 2px 0 rgba(0, 0, 0, .4); box-shadow: 0 0 0 3px rgba(255, 255, 255, .28) inset, 0 7px 0 rgba(0, 0, 0, .38); transition: transform .06s, filter .1s; overflow: hidden; }
.pedal small { font: 700 .55rem var(--font-b); letter-spacing: .06em; opacity: .85; }
.pedal .pi { position: absolute; left: 12%; right: 12%; top: 10%; bottom: 34%; display: grid; gap: .45rem; align-content: space-evenly; } .pedal .pi i { display: block; height: .55rem; border-radius: 99px; background: rgba(0, 0, 0, .28); box-shadow: 0 2px 0 rgba(255, 255, 255, .2); }
.pedal.gas { right: calc(var(--sar) + 1rem); width: 9rem; height: 11rem; background: linear-gradient(180deg, #A6F060, #3E8A18); }
.pedal.brake { left: calc(var(--sal) + 1rem); width: 8rem; height: 9rem; background: linear-gradient(180deg, #FF8566, #B8281A); }
.pedal.on { transform: translateY(5px) scale(.97); filter: brightness(1.28); box-shadow: 0 0 0 3px rgba(255, 255, 255, .6) inset, 0 2px 0 rgba(0, 0, 0, .38); }
body.swapped .pedal.gas { right: auto; left: calc(var(--sal) + 1rem); } body.swapped .pedal.brake { left: auto; right: calc(var(--sar) + 1rem); }
.tcr { position: absolute; left: 50%; bottom: calc(var(--sab) + 1.1rem); margin-left: -1.45rem; width: 2.9rem; height: 2.9rem; border: 0; border-radius: 50%; background: rgba(22, 18, 58, .7); color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .2) inset; opacity: .7; pointer-events: auto; } .tcr svg { width: 1.4rem; height: 1.4rem; pointer-events: none; }

/* ---------- banner + hint ---------- */
.ban { position: absolute; z-index: 26; left: 50%; top: 28%; transform: translate(-50%, 0); text-align: center; pointer-events: none; opacity: 0; width: 90vw; }
.ban b { display: block; font: 400 clamp(2.2rem, 7vw, 4.6rem) var(--font-d); letter-spacing: .02em; color: #fff; text-shadow: 0 5px 0 rgba(0, 0, 0, .45), 0 0 1.6rem var(--acc); }
.ban small { display: inline-block; margin-top: .4rem; padding: .25rem .9rem; border-radius: 999px; background: rgba(14, 10, 40, .72); font-size: .95rem; font-weight: 800; color: #E8E4FF; }
.ban.show { animation: banin var(--dur, 1.4s) ease forwards; }
.ban.go b { font-size: clamp(3rem, min(14vw, 24vh), 9rem); color: var(--lime); text-shadow: 0 5px 0 rgba(0, 0, 0, .45), 0 0 2.4rem var(--lime); }
.ban.low b { color: #FF6A6A; font-size: clamp(1.8rem, 5vw, 3.2rem); text-shadow: 0 5px 0 rgba(0, 0, 0, .5), 0 0 2rem #FF2040; } .ban.crash b { color: #FF8A98; } .ban.fin b { color: var(--sun); font-size: clamp(3rem, min(12vw, 20vh), 7rem); }
.ban.map b { font-size: clamp(1.8rem, 5vw, 3.2rem); }
@keyframes banin { 0% { opacity: 0; transform: translate(-50%, -16px) scale(.8); } 14% { opacity: 1; transform: translate(-50%, 0) scale(1.06); } 22% { transform: translate(-50%, 0) scale(1); } 78% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -8px) scale(1.04); } }
.hint { position: absolute; z-index: 27; left: 50%; bottom: calc(var(--sab) + 2.2rem); transform: translate(-50%, 10px); max-width: min(86vw, 42rem); padding: .55rem 1.1rem; border-radius: 999px; text-align: center; font-weight: 700; font-size: .95rem; line-height: 1.3; background: rgba(14, 10, 40, .9); box-shadow: 0 0 0 2px rgba(255, 165, 46, .75) inset, 0 8px 24px rgba(0, 0, 0, .5); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
.hint.show { opacity: 1; transform: translate(-50%, 0); } .hint b { color: var(--sun); }
body.is-touch .hint { bottom: calc(var(--sab) + 11.5rem); max-width: min(52vw, 34rem); }

/* ---------- overlays ---------- */
.ovl { position: absolute; inset: 0; z-index: 40; display: none; overflow: auto; scrollbar-width: none; overscroll-behavior: contain; touch-action: pan-y; padding: calc(var(--sat) + 1rem) calc(var(--sar) + 1rem) calc(var(--sab) + 1rem) calc(var(--sal) + 1rem); }
.ovl::-webkit-scrollbar { display: none; }
.ovl.show { display: grid; animation: ovin .25s ease; } @keyframes ovin { from { opacity: 0; } }
.ovl.center { place-items: center; background: rgba(12, 8, 36, .62); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
.ovl.maps.mid { align-content: center; }
.ovl.maps { background: rgba(12, 8, 36, .86); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); align-content: start; }
.ovl.menuov { place-items: center start; background: linear-gradient(90deg, rgba(14, 10, 40, .92) 0%, rgba(14, 10, 40, .62) 40%, rgba(14, 10, 40, 0) 72%), linear-gradient(0deg, rgba(14, 10, 40, .5), transparent 35%); padding-left: calc(var(--sal) + clamp(1.2rem, 6vw, 7rem)); }
.ovl.res { background: rgba(12, 8, 36, .5); } .ovl.fin { background: rgba(12, 8, 36, .3); backdrop-filter: none; }
body:not(.playing) .bar .tools { pointer-events: auto; }
.menu { text-align: left; width: min(36rem, 100%); animation: arpop .5s var(--ease); } @keyframes arpop { from { opacity: 0; transform: translateY(14px) scale(.97); } }
.kick { display: inline-flex; align-items: center; gap: .6em; font-weight: 800; font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: var(--acc); } .kick::before { content: ""; width: 28px; height: 3px; border-radius: 3px; background: currentColor; }
.kick span { color: #CFC9F5; letter-spacing: .1em; padding: .15em .7em; border-radius: 99px; background: rgba(255, 255, 255, .09); }
.logo { margin: .1em 0; font-family: var(--font-d); font-weight: 400; text-transform: uppercase; line-height: .86; font-size: clamp(3rem, 8.4vw, 7rem); text-shadow: 0 6px 0 rgba(0, 0, 0, .4); position: relative; }
.logo span, .logo b { display: block; font-weight: 400; } .logo span { color: #fff; transform: skewX(-8deg); transform-origin: left; }
.logo b { transform: skewX(-8deg); transform-origin: left; background: linear-gradient(100deg, #FFE27A 0%, #FFA52E 45%, #FF5B2E 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 5px 0 rgba(0, 0, 0, .4)); }
.tag { margin: .5rem 0 1.1rem; font-size: 1.05rem; font-weight: 600; color: #DCD7FF; max-width: 29em; line-height: 1.45; }
.cta { display: flex; gap: .7rem; flex-wrap: wrap; } .sub2 { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .9rem; }
.stats { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1.2rem; } .stats > div { padding: .45rem .9rem; border-radius: .9rem; background: rgba(255, 255, 255, .07); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .1) inset; line-height: 1.05; }
.stats small { display: block; font-size: .6rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); } .stats b { font-family: var(--font-d); font-weight: 400; font-size: 1.4rem; } .stats em { font-style: normal; font-size: .8rem; opacity: .6; }
.orient { display: none; align-items: center; gap: .6rem; margin-top: .9rem; padding: .5rem .8rem; border-radius: .8rem; background: rgba(47, 214, 255, .12); box-shadow: 0 0 0 1.5px rgba(47, 214, 255, .35) inset; font-size: .8rem; font-weight: 700; color: #CDEFFF; } .orient.on { display: flex; } .orient svg { width: 1.4rem; height: 1.4rem; flex: none; stroke: var(--cyan); }
.scr { width: min(84rem, 100%); margin: 0 auto; } .scr-h { display: flex; align-items: center; gap: .9rem; margin-bottom: .9rem; flex-wrap: wrap; padding-top: 2.6rem; } .scr-h h2 { margin: 0; font: 400 clamp(1.3rem, 2.6vw, 2.2rem) var(--font-d); text-transform: uppercase; flex: 1; text-shadow: 0 3px 0 rgba(0, 0, 0, .4); }
.tot { display: flex; align-items: center; gap: .3rem; font-family: var(--font-d); font-size: 1.2rem; color: var(--gold); } .tot svg { width: 1.5rem; height: 1.5rem; } .tot b { font-weight: 400; }
.grid { display: grid; gap: .8rem; } .g3 { grid-template-columns: repeat(3, 1fr); } .g5 { grid-template-columns: repeat(6, 1fr); }
.g5 .tcard { grid-column: span 2; } .g5 .tcard:nth-child(4) { grid-column: 2 / span 2; } .g5 .tcard:nth-child(5) { grid-column: 4 / span 2; }
.tcard { position: relative; border: 0; padding: 0; text-align: left; color: #fff; border-radius: 1.1rem; overflow: hidden; background: var(--pn); box-shadow: 0 0 0 2px rgba(255, 255, 255, .14) inset, 0 8px 0 rgba(0, 0, 0, .35); transition: transform .15s, box-shadow .15s; display: block; }
.tcard:hover { transform: translateY(-3px); box-shadow: 0 0 0 2px var(--c) inset, 0 11px 0 rgba(0, 0, 0, .35), 0 0 1.5rem var(--c); }
.tcard .th { position: relative; aspect-ratio: 16 / 9; background: #222; } .tcard.stage .th { aspect-ratio: 16 / 10; } .tcard canvas { width: 100%; height: 100%; display: block; }
.tcard .no { position: absolute; left: .5rem; top: .4rem; width: 1.8rem; height: 1.8rem; display: grid; place-items: center; border-radius: 50%; background: var(--c); color: var(--ink); font: 400 1rem var(--font-d); box-shadow: 0 2px 0 rgba(0, 0, 0, .4); }
.tcard .cup { position: absolute; right: .5rem; top: .4rem; width: 2rem; height: 2rem; color: var(--gold); filter: drop-shadow(0 2px 3px #000); } .tcard .cup svg { width: 100%; height: 100%; }
.tcard .mi { padding: .45rem .7rem .6rem; } .tcard .mi b { display: block; font: 400 1.05rem var(--font-d); line-height: 1.1; } .tcard .mi small { display: block; font-size: .72rem; font-weight: 700; color: #B8B2E8; margin-top: .15rem; }
.mr { display: flex; align-items: center; gap: .5rem; margin-top: .35rem; min-height: 1.2rem; } .mr em { font-style: normal; font-size: .72rem; font-weight: 800; color: #DCD7FF; display: flex; align-items: center; gap: .25rem; } .mr svg.mini { width: .9rem; height: .9rem; color: var(--gold); }
.mp, .pips, .lv { display: inline-flex; gap: .18rem; } .mp i, .pips i, .lv i { width: .7rem; height: .7rem; border-radius: 50%; background: rgba(255, 255, 255, .14); } .mp i.on { background: linear-gradient(180deg, #FFE27A, #FF9B3C); box-shadow: 0 0 .5rem rgba(255, 190, 60, .6); } .lv i { border-radius: 3px; width: .9rem; height: .55rem; } .lv i.on { background: linear-gradient(180deg, #8EE04A, #4C9A1E); }
.stars { display: inline-flex; gap: .12rem; } .st { display: block; width: 1.15rem; height: 1.15rem; color: rgba(255, 255, 255, .2); } .st svg { width: 100%; height: 100%; } .st.on { color: #FFD23F; filter: drop-shadow(0 0 .35rem rgba(255, 190, 40, .7)); }
.st.big { width: 3.6rem; height: 3.6rem; transform: scale(.7); opacity: .5; } .st.big.on { transform: scale(.7); opacity: .3; } .st.big.on.pop { animation: starpop .6s cubic-bezier(.3, 1.8, .5, 1) forwards; } .st.big:not(.on) { opacity: .45; transform: scale(.85); }
@keyframes starpop { 0% { transform: scale(.2) rotate(-40deg); opacity: 0; } 100% { transform: scale(1) rotate(0); opacity: 1; } }
.starrow { display: flex; justify-content: center; margin: .3rem 0 .5rem; } .starrow .stars { gap: .5rem; }
.tcard.lock .th canvas { filter: grayscale(.9) brightness(.45); } .tcard.lock { cursor: default; opacity: .92; } .tcard .lk { position: absolute; inset: 0; display: grid; place-items: center; } .tcard .lk svg { width: 2.4rem; height: 2.4rem; color: #fff; filter: drop-shadow(0 2px 4px #000); }
.tcard.fresh { animation: fresh 1.8s ease-in-out infinite; } @keyframes fresh { 50% { box-shadow: 0 0 0 2px var(--c) inset, 0 8px 0 rgba(0, 0, 0, .35), 0 0 1.6rem var(--c); } }
.sheet { width: min(62rem, 100%); align-items: center; display: grid; grid-template-columns: 1.05fr 1fr; gap: 1.2rem; padding: 1rem; border-radius: 1.6rem; background: var(--pn); box-shadow: 0 0 0 2px rgba(255, 255, 255, .14) inset, 0 30px 80px rgba(0, 0, 0, .6); animation: arpop .35s var(--ease); }
.sh-l canvas { width: 100%; border-radius: 1rem; box-shadow: 0 0 0 3px var(--c), 0 10px 30px rgba(0, 0, 0, .5); display: block; }
.kick2 { font-size: .75rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--c); } .sh-r h2 { margin: .1em 0 .2em; font: 400 clamp(1.5rem, 3vw, 2.4rem) var(--font-d); text-transform: uppercase; line-height: 1; } .sh-r p { margin: 0 0 .7rem; font-weight: 600; color: #DCD7FF; }
.facts { display: flex; gap: .4rem; flex-wrap: wrap; } .facts > div { padding: .35rem .7rem; border-radius: .8rem; background: rgba(255, 255, 255, .07); line-height: 1.05; } .facts small { display: block; font-size: .6rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); } .facts b { font: 400 1.1rem var(--font-d); }
ul.goals { list-style: none; padding: 0; margin: .7rem 0 .4rem; display: grid; gap: .25rem; font-weight: 800; font-size: .85rem; color: #DCD7FF; }
.goals li { display: flex; align-items: center; gap: .5rem; } .goals li svg { width: 1.2rem; height: 1.2rem; color: rgba(255, 255, 255, .25); flex: none; } .goals li.ok { color: #fff; } .goals li.ok svg { color: #FFD23F; filter: drop-shadow(0 0 .3rem rgba(255, 190, 40, .7)); } .goals.res3 li.no { opacity: .6; }
.best { display: flex; align-items: center; gap: .5rem; min-height: 1.8rem; font-size: .85rem; font-weight: 700; color: #DCD7FF; margin-bottom: .5rem; }
.carline { display: flex; align-items: center; gap: .5rem; font-size: .8rem; font-weight: 800; color: #B8B2E8; margin-bottom: .7rem; } .carline svg { width: 1.4rem; height: 1.4rem; } .carline span { flex: 1; }
.acts { display: grid; gap: .6rem; } .acts .row { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.cardw { width: min(30rem, 100%); text-align: center; padding: 1.6rem 1.6rem 1.4rem; border-radius: 1.8rem; background: var(--pn); box-shadow: 0 0 0 2px rgba(255, 255, 255, .14) inset, 0 30px 80px rgba(0, 0, 0, .6); animation: arpop .35s var(--ease); max-height: 100%; overflow: auto; scrollbar-width: none; }
.cardw.wide { width: min(38rem, 100%); text-align: left; } .cardw h2 { margin: 0 0 .3rem; font: 400 clamp(1.8rem, 4vw, 2.8rem) var(--font-d); text-transform: uppercase; text-shadow: 0 4px 0 rgba(0, 0, 0, .4); line-height: 1; } .cardw.wide h2 { text-align: center; margin-bottom: 1rem; }
.sub { margin: 0 0 .8rem; color: #CFC9F5; font-weight: 600; } .sub.tip { font-size: .85rem; margin: .8rem 0; color: #B8B2E8; }
.steps { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; margin-bottom: 1rem; } .step { display: flex; gap: .7rem; padding: .7rem; border-radius: 1rem; background: rgba(255, 255, 255, .06); } .step i { flex: none; width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; font: 400 1rem var(--font-d); font-style: normal; background: var(--acc); color: #1b1030; } .step b { font: 400 1rem var(--font-d); } .step p { margin: .15rem 0 0; font-size: .82rem; font-weight: 600; color: #DCD7FF; line-height: 1.35; }
.rows { display: grid; gap: .7rem; margin-bottom: 1.1rem; } .row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-weight: 800; }
.acts .row { display: grid; } .acts .row > .btn:only-child { grid-column: 1 / -1; }
.sw { border: 0; padding: .45rem 1rem; border-radius: 999px; background: rgba(255, 255, 255, .12); color: #fff; font: 800 .85rem var(--font-b); min-width: 5rem; } .sw.on { background: linear-gradient(180deg, #8EE04A, #4C9A1E); color: #10220a; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 55%; height: 1.6rem; background: transparent; touch-action: pan-x; } input[type=range]::-webkit-slider-runnable-track { height: .55rem; border-radius: 99px; background: linear-gradient(90deg, var(--acc) var(--v, 100%), rgba(255, 255, 255, .15) var(--v, 100%)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 1.4rem; height: 1.4rem; margin-top: -.43rem; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .5); } input[type=range]::-moz-range-track { height: .55rem; border-radius: 99px; background: rgba(255, 255, 255, .15); } input[type=range]::-moz-range-progress { height: .55rem; border-radius: 99px; background: var(--acc); } input[type=range]::-moz-range-thumb { width: 1.4rem; height: 1.4rem; border: 0; border-radius: 50%; background: #fff; }
/* garage */
.gg { display: grid; grid-template-columns: 1.25fr 1fr; gap: 1rem; }
.gl, .gr { padding: 1rem; border-radius: 1.4rem; background: var(--pn); box-shadow: 0 0 0 2px rgba(255, 255, 255, .14) inset, 0 8px 0 rgba(0, 0, 0, .3); }
.showroom { position: relative; display: flex; align-items: center; gap: .3rem; border-radius: 1rem; background: radial-gradient(ellipse at 50% 70%, rgba(255, 165, 46, .22), transparent 70%), rgba(0, 0, 0, .25); } .showroom canvas { flex: 1; min-width: 0; width: 100%; height: auto; display: block; }
.nav { flex: none; width: 2.6rem; height: 2.6rem; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; display: grid; place-items: center; } .nav:hover { background: rgba(255, 255, 255, .24); } .nav svg { width: 1.3rem; height: 1.3rem; stroke-width: 3; }
.cn h3 { margin: .6rem 0 .1rem; font: 400 1.6rem var(--font-d); text-transform: uppercase; } .cn p { margin: 0 0 .6rem; font-size: .85rem; font-weight: 600; color: #DCD7FF; }
.sbs { display: grid; gap: .3rem; margin-bottom: .8rem; } .sb { display: grid; grid-template-columns: 7rem 1fr; align-items: center; gap: .6rem; font-size: .75rem; font-weight: 800; color: #CFC9F5; } .sb div { height: .6rem; border-radius: 99px; background: rgba(255, 255, 255, .12); overflow: hidden; } .sb i { display: block; height: 100%; border-radius: 99px; }
.buyrow { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; } .inuse { display: inline-flex; align-items: center; gap: .4rem; padding: .55rem 1rem; border-radius: .9rem; background: rgba(142, 224, 74, .18); box-shadow: 0 0 0 1.5px rgba(142, 224, 74, .5) inset; font-weight: 800; color: #C6FF3D; } .inuse svg { width: 1.2rem; height: 1.2rem; }
.sws { display: flex; gap: .4rem; flex-wrap: wrap; } .sw2 { width: 1.9rem; height: 1.9rem; border-radius: 50%; border: 0; box-shadow: 0 0 0 2px rgba(0, 0, 0, .4) inset, 0 3px 0 rgba(0, 0, 0, .35); } .sw2.on { box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(0, 0, 0, .4), 0 3px 0 rgba(0, 0, 0, .35); transform: scale(1.1); }
.gr h3 { margin: 0 0 .7rem; font: 400 1.2rem var(--font-d); text-transform: uppercase; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; } .gr h3 svg { width: 1.4rem; height: 1.4rem; } .gr h3 small { font: 700 .72rem var(--font-b); color: #B8B2E8; text-transform: none; letter-spacing: 0; }
.up { padding: .7rem .8rem; border-radius: 1rem; background: rgba(255, 255, 255, .06); margin-bottom: .6rem; } .uh { display: flex; align-items: center; justify-content: space-between; } .uh b { font: 400 1.05rem var(--font-d); } .up small { display: block; font-size: .75rem; font-weight: 600; color: #CFC9F5; margin: .15rem 0 .5rem; } .max { font: 400 .8rem var(--font-d); color: var(--lime); }
/* results */
.res .rh { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-bottom: .5rem; text-align: left; } .res .rh small { font-size: .7rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #B8B2E8; } .res .rh h2 { margin: 0; font-size: clamp(1.6rem, 3.6vw, 2.5rem); } .res.win h2 { color: var(--sun); } .res.lose h2 { color: #FF8A98; }
.pos { font: 400 clamp(2rem, 5vw, 3.2rem) var(--font-d); line-height: 1; color: #fff; text-shadow: 0 5px 0 rgba(0, 0, 0, .4); } .pos em { font-style: normal; font-size: .4em; color: #B8B2E8; }
.crash svg { width: 4rem; height: 4rem; color: #FF8A98; }
.prog { height: .8rem; border-radius: 99px; background: rgba(255, 255, 255, .12); overflow: hidden; margin: .4rem 0 .6rem; } .prog i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #FFB04A, #FFD23F); }
.stats4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(6rem, 1fr)); gap: .5rem; margin: .8rem 0; } .stats4 > div { padding: .5rem .3rem; border-radius: .9rem; background: rgba(255, 255, 255, .06); line-height: 1.1; } .stats4 small { display: block; font-size: .58rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); margin-bottom: .2rem; } .stats4 b { font: 400 1.15rem var(--font-d); } .stats4 em { font-style: normal; font-size: .7em; opacity: .6; }
.rec { display: inline-block; margin: .1rem 0 .5rem; padding: .3em 1em; border-radius: 999px; background: var(--sun); color: var(--ink); font: 400 .9rem var(--font-d); transform: rotate(-3deg); box-shadow: 0 3px 0 #B68A00; }
.coins { display: flex; gap: .5rem; justify-content: center; margin-bottom: .6rem; } .coins > div { flex: 1; padding: .35rem .4rem; border-radius: .8rem; background: rgba(255, 210, 63, .1); box-shadow: 0 0 0 1.5px rgba(255, 210, 63, .3) inset; } .coins small { display: block; font-size: .55rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #E8D79A; } .coins b { font: 400 1.1rem var(--font-d); color: var(--gold); }
.unl { display: flex; align-items: center; justify-content: center; gap: .5rem; margin: .2rem 0 .7rem; padding: .45rem .8rem; border-radius: .9rem; background: rgba(47, 214, 255, .14); box-shadow: 0 0 0 1.5px rgba(47, 214, 255, .4) inset; font-weight: 800; font-size: .85rem; color: #CDEFFF; } .unl svg { width: 1.2rem; height: 1.2rem; } .unl.cup { background: rgba(255, 210, 63, .14); box-shadow: 0 0 0 1.5px rgba(255, 210, 63, .5) inset; color: var(--sun); }
.cardw.fin { width: min(34rem, 100%); } .crown { width: 4.4rem; margin: 0 auto .4rem; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .5)); animation: starpop .8s cubic-bezier(.3, 1.8, .5, 1); } .crown svg { stroke: none; fill: none; }

/* ---------- responsive ---------- */
body.short .cardw.res { width: min(46rem, 100%); padding: .7rem 1rem .8rem; } body.short .rcols { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; align-items: start; } body.short .res .rh { justify-content: flex-start; }
body.short .res .acts { grid-template-columns: 1.5fr 1fr 1fr; align-items: stretch; } body.short .res .acts .row { display: contents; } body.short .res .acts .btn--big { font-size: 1.05rem; } body.short .res .stats4 { margin: .3rem 0; } body.short .res .unl { margin: .3rem 0; padding: .3rem .6rem; } body.short .res .sub.tip { display: none; }
body.short .st.big { width: 2.6rem; height: 2.6rem; } body.short .res .goals { margin: .3rem 0; font-size: .75rem; } body.short .starrow { margin: 0 0 .2rem; }
body.short .scr-h { padding-right: 6.4rem; }
body.short .logo { font-size: clamp(2.2rem, 12vh, 4.2rem); } body.short .tag { font-size: .85rem; margin: .3rem 0 .6rem; } body.short .stats { margin-top: .6rem; } body.short .stats > div { padding: .25rem .6rem; } body.short .stats b { font-size: 1.1rem; }
body.short .btn--big { font-size: 1.1rem; padding: .6em 1.3em; } body.short .sub2 { margin-top: .5rem; } body.short .kick { font-size: .7rem; }
body.short .ovl { padding-top: calc(var(--sat) + .5rem); padding-bottom: calc(var(--sab) + .5rem); }
body.short .tool { width: 2.4rem; height: 2.4rem; } body.short .scr-h { margin-bottom: .4rem; padding-top: 0; padding-left: 3.4rem; min-height: 2.8rem; } body.short .scr-h .btn { min-height: 0; padding: .45em .9em; }
body.short .grid { gap: .45rem; } body.short .tcard .mi { padding: .3rem .5rem .4rem; } body.short .tcard .mi b { font-size: .8rem; } body.short .tcard .mi small { font-size: .62rem; } body.short .mr { margin-top: .2rem; } body.short .mr em { font-size: .62rem; } body.short .st { width: .9rem; height: .9rem; }
body.short .g5 { grid-template-columns: repeat(5, 1fr); } body.short .g5 .tcard, body.short .g5 .tcard:nth-child(4), body.short .g5 .tcard:nth-child(5) { grid-column: auto; } body.short .g3.gs { grid-template-columns: repeat(6, 1fr); }
body.short .sheet { padding: .6rem; gap: .8rem; } body.short .sh-r p { display: none; } body.short ul.goals { margin: .4rem 0 .2rem; font-size: .75rem; } body.short .carline { margin-bottom: .4rem; } body.short .facts > div { padding: .2rem .5rem; } body.short .best { min-height: 0; margin-bottom: .3rem; }
body.short .cardw { padding: .9rem 1.2rem; } body.short .cardw h2 { font-size: 1.6rem; } body.short .stats4 { margin: .4rem 0; } body.short .pos { font-size: 2rem; } body.short .coins { margin-bottom: .4rem; }
body.short .gg { gap: .6rem; } body.short .gl, body.short .gr { padding: .6rem; } body.short .cn h3 { font-size: 1.2rem; margin-top: .3rem; } body.short .cn p { font-size: .75rem; margin-bottom: .3rem; } body.short .sbs { margin-bottom: .4rem; } body.short .up { padding: .4rem .6rem; margin-bottom: .4rem; } body.short .up small { margin-bottom: .3rem; } body.short .showroom canvas { max-height: 34vh; object-fit: contain; }
body.short .hspd b { font-size: 1.7rem; } body.short .ban { top: 22%; } body.short .step p { font-size: .72rem; } body.short .step { padding: .45rem; } body.short .hprog { top: calc(var(--sat) + .5rem); }
body.short:not(.playing) .home { padding: 4px; } body.short:not(.playing) .home b { display: none; }
body.short .sub2 .btn { font-size: .8rem; padding: .55em .9em; }
body.short .hint { font-size: .8rem; padding: .35rem .8rem; }
body.short.is-touch .hint { bottom: calc(var(--sab) + 9.4rem); }
body.short .pedal.gas { width: 8.4rem; height: 9.4rem; } body.short .pedal.brake { width: 7.4rem; height: 7.8rem; }
body.narrow .hprog { width: min(30vw, 20rem); } body.narrow .hfuel { width: 9.5rem; }
body.portrait .g3 { grid-template-columns: repeat(2, 1fr); } body.portrait .g5 { grid-template-columns: repeat(2, 1fr); } body.portrait .g5 .tcard, body.portrait .g5 .tcard:nth-child(4), body.portrait .g5 .tcard:nth-child(5) { grid-column: auto; } body.portrait .sheet, body.portrait .gg, body.portrait .steps { grid-template-columns: 1fr; } body.portrait .ovl.menuov { padding-left: calc(var(--sal) + 1rem); background: rgba(14, 10, 40, .78); }
@media (prefers-reduced-motion: reduce) { .ban.show { animation-duration: .01s; } .tcard.fresh, .hfuel.low .hbar i { animation: none; } .menu, .cardw, .sheet, .crown, .st.big.pop { animation: none; } .st.big.on { opacity: 1; transform: scale(1); } }
