/* Rally Sprint - 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 controls, banner + hint, overlays (menu, championships, tracks, sheet, garage, cards, results), responsive */
:root { --acc: #FF5B2E; --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, .rs { 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: rsshake .35s; } @keyframes rsshake { 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; }
.hpos, .hlap, .htime, .hspd .hs, .hcoin { text-shadow: 0 2px 0 rgba(0, 0, 0, .45); }
.hpos { position: absolute; left: calc(var(--sal) + .8rem); top: calc(var(--sat) + .5rem); padding: .3rem .8rem .35rem .7rem; border-radius: 1rem; background: linear-gradient(180deg, rgba(34, 28, 80, .82), rgba(18, 14, 52, .82)); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .14) inset, 0 4px 0 rgba(0, 0, 0, .3); }
.hpos b { font: 400 3.1rem/1 var(--font-d); color: #fff; } .hpos i { font: 400 1.2rem var(--font-d); font-style: normal; color: #B8B2E8; margin-left: .15rem; }
.hpos .first b { color: var(--sun); text-shadow: 0 0 1.2rem rgba(255, 210, 63, .55), 0 3px 0 rgba(0, 0, 0, .45); }
.hlap { position: absolute; left: calc(var(--sal) + .8rem); top: calc(var(--sat) + 6.2rem); padding: .25rem .8rem; border-radius: .8rem; background: rgba(20, 16, 56, .8); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .12) inset; display: flex; align-items: baseline; gap: .5rem; }
.hlap small { margin: 0; } .hlap > div { display: flex; align-items: baseline; } .hlap b { font: 400 1.5rem var(--font-d); } .hlap i { font: 400 .95rem var(--font-d); font-style: normal; color: #B8B2E8; }
.htime { position: absolute; left: 50%; top: calc(var(--sat) + .5rem); transform: translateX(-50%); text-align: center; padding: .25rem 1rem .3rem; border-radius: 1rem; background: linear-gradient(180deg, rgba(34, 28, 80, .8), rgba(18, 14, 52, .8)); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .14) inset, 0 4px 0 rgba(0, 0, 0, .3); min-width: 9rem; }
.htime b { display: block; font: 400 1.7rem/1.1 var(--font-d); font-variant-numeric: tabular-nums; } .htime em { display: block; font-style: normal; font-size: .62rem; font-weight: 800; letter-spacing: .1em; color: #B8B2E8; min-height: .9em; }
.hmini { position: absolute; right: calc(var(--sar) + .8rem); top: calc(var(--sat) + 3.8rem); width: 12.5rem; }
.hmini canvas { width: 100%; height: auto; aspect-ratio: 300 / 220; display: block; border-radius: 1rem; background: radial-gradient(circle at 50% 40%, rgba(40, 34, 96, .78), rgba(14, 10, 44, .78)); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .14) inset, 0 4px 0 rgba(0, 0, 0, .3); }
.hcoin { margin: .35rem 0 0 auto; width: max-content; display: flex; align-items: center; gap: .35rem; padding: .25rem .8rem .25rem .5rem; border-radius: .8rem; background: rgba(20, 16, 56, .8); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .12) inset; }
.hcoin svg { width: 1.2rem; height: 1.2rem; color: var(--gold); } .hcoin b { font: 400 1.15rem var(--font-d); font-variant-numeric: tabular-nums; }
.hspd { position: absolute; left: 50%; bottom: calc(var(--sab) + .8rem); transform: translateX(-50%); width: 11.5rem; text-align: center; }
.hs { display: inline-flex; align-items: baseline; gap: .4rem; padding: .1rem .9rem; border-radius: 1rem; background: rgba(18, 14, 52, .7); } .hs b { font: 400 2.4rem/1.1 var(--font-d); font-variant-numeric: tabular-nums; } .hs small { margin: 0; letter-spacing: .08em; }
.hn { position: relative; height: .95rem; margin-top: .35rem; border-radius: 99px; background: rgba(10, 8, 34, .78); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .18) inset; overflow: hidden; }
.hn i { position: absolute; left: 0; top: 0; bottom: 0; width: 50%; border-radius: 99px; background: linear-gradient(90deg, #2FD6FF, #9FF0FF); box-shadow: 0 0 .8rem rgba(47, 214, 255, .8); transition: width .1s linear; }
.hn span { position: absolute; left: .35rem; top: 50%; transform: translateY(-50%); width: .75rem; height: .75rem; color: #0F0C22; display: grid; place-items: center; } .hn span svg { width: 100%; height: 100%; }
.hn.use i { background: linear-gradient(90deg, #fff, #9FF0FF); animation: nit .25s linear infinite; } .hn.low i { background: linear-gradient(90deg, #FF5B2E, #FFB04A); box-shadow: 0 0 .8rem rgba(255, 91, 46, .7); } .hn.full i { box-shadow: 0 0 1.2rem rgba(47, 214, 255, 1); }
@keyframes nit { 50% { filter: brightness(1.4); } }
.hwrong { position: absolute; left: 50%; top: 26%; transform: translateX(-50%) scale(.9); padding: .4rem 1.4rem; border-radius: .9rem; font: 400 1.7rem var(--font-d); letter-spacing: .06em; color: #fff; background: rgba(214, 40, 60, .92); box-shadow: 0 0 2rem rgba(255, 40, 70, .7), 0 5px 0 rgba(0, 0, 0, .4); opacity: 0; transition: opacity .15s, transform .15s; }
.hwrong.show { opacity: 1; transform: translateX(-50%) scale(1); animation: wrong .5s ease-in-out infinite alternate; } @keyframes wrong { to { filter: brightness(1.3); } }

/* ---------- touch controls (touch devices only) ---------- */
.tc { position: absolute; inset: 0; z-index: 25; pointer-events: none; display: none; }
body.is-touch.playing .tc { display: block; }
.tc > * { pointer-events: auto; touch-action: none; }
.pad { position: absolute; left: calc(var(--sal) + .9rem); bottom: calc(var(--sab) + .9rem); width: min(40vw, 24rem); height: min(34vh, 9.5rem); min-height: 6.4rem; border-radius: 99px; background: linear-gradient(180deg, rgba(36, 30, 86, .55), rgba(18, 14, 52, .55)); box-shadow: 0 0 0 2px rgba(255, 255, 255, .2) inset, 0 6px 0 rgba(0, 0, 0, .3); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: space-between; padding: 0 1.2rem; color: rgba(255, 255, 255, .55); }
.pad.on { background: linear-gradient(180deg, rgba(60, 50, 130, .6), rgba(30, 24, 80, .6)); box-shadow: 0 0 0 2.5px rgba(198, 255, 61, .6) inset, 0 6px 0 rgba(0, 0, 0, .3); }
.pad i { width: 2.4rem; height: 2.4rem; display: grid; place-items: center; } .pad i svg { width: 100%; height: 100%; stroke-width: 3.2; }
.pad em { position: absolute; left: 0; right: 0; bottom: .5rem; text-align: center; font-style: normal; font-size: .55rem; font-weight: 800; letter-spacing: .18em; color: rgba(255, 255, 255, .4); pointer-events: none; }
.knob { position: absolute; left: 50%; top: 50%; width: 4.2rem; height: 4.2rem; margin: -2.1rem 0 0 -2.1rem; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #C6FF3D 45%, #7FBF10); box-shadow: 0 4px 0 rgba(0, 0, 0, .35), 0 0 1.2rem rgba(198, 255, 61, .5); pointer-events: none; }
.tcb { position: absolute; border: 0; border-radius: 50%; display: grid; place-items: center; align-content: center; color: #fff; font: 400 .95rem var(--font-d); box-shadow: 0 0 0 3px rgba(255, 255, 255, .25) inset, 0 6px 0 rgba(0, 0, 0, .35); transition: transform .06s; }
.tcb span, .tcb svg { pointer-events: none; } .tcb svg { width: 1.8rem; height: 1.8rem; } .tcb small { font: 700 .5rem var(--font-b); letter-spacing: .04em; opacity: .85; pointer-events: none; }
.tcb.on { transform: translateY(4px) scale(.96); box-shadow: 0 0 0 3px rgba(255, 255, 255, .5) inset, 0 2px 0 rgba(0, 0, 0, .35); filter: brightness(1.2); }
.tcb.nitro { right: calc(var(--sar) + .9rem); bottom: calc(var(--sab) + .9rem); width: 6.8rem; height: 6.8rem; background: radial-gradient(circle at 35% 30%, #7FE9FF, #1E90E0 70%); }
.tcb.brake { right: calc(var(--sar) + 8.1rem); bottom: calc(var(--sab) + .9rem); width: 5.6rem; height: 5.6rem; background: radial-gradient(circle at 35% 30%, #FF8A6A, #D43A22 70%); }
.tcb.gas { display: none; right: calc(var(--sar) + 14.5rem); bottom: calc(var(--sab) + .9rem); width: 5.2rem; height: 5.2rem; background: radial-gradient(circle at 35% 30%, #B8FF70, #4C9A1E 70%); } body.noauto .tcb.gas { display: grid; }
.tcr { position: absolute; right: calc(var(--sar) + 2.4rem); bottom: calc(var(--sab) + 8.2rem); 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: .75; } .tcr svg { width: 1.4rem; height: 1.4rem; pointer-events: none; }

/* ---------- banner + hint ---------- */
.ban { position: absolute; z-index: 26; left: 50%; top: 30%; 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.count b { font-size: clamp(3rem, min(14vw, 24vh), 9rem); color: var(--sun); } .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.last b { color: #FF5B2E; text-shadow: 0 5px 0 rgba(0, 0, 0, .5), 0 0 2rem #FF2040; } .ban.mini b { font-size: clamp(1.6rem, 4vw, 2.8rem); color: #7FE9FF; } .ban.fin b { color: var(--sun); }
.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) + 6.4rem); 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, 91, 46, .7) 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) + 10.6rem); }

/* ---------- 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%, #FF9B3C 45%, #FF4B2E 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); } .g4 { grid-template-columns: repeat(4, 1fr); }
.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.track .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 .md { position: absolute; right: .5rem; top: .35rem; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .5)); } .tcard .md svg { display: block; }
.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 em u { text-decoration: none; color: var(--sun); } .mr svg.mini { width: .9rem; height: .9rem; }
.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); } .pips i { width: .55rem; height: .55rem; border-radius: 2px; } .pips i.on { background: var(--c, #FF5B2E); } .lv i { border-radius: 3px; width: .9rem; height: .55rem; } .lv i.on { background: linear-gradient(180deg, #8EE04A, #4C9A1E); }
.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); }
.goals { display: flex; gap: .7rem; flex-wrap: wrap; margin: .7rem 0 .4rem; font-weight: 800; font-size: .8rem; color: #DCD7FF; } .goals span { display: inline-flex; align-items: center; gap: .3rem; } .goals svg.medal { display: block; } .goals .ts svg { width: 1.3rem; height: 1.3rem; color: var(--sun); }
.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: #fff; } .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, 91, 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; } .ok { 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; } .ok 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(2.4rem, 6vw, 4rem) 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; }
.mdl svg { display: block; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .5)); } .mdl.pop { animation: mpop .7s cubic-bezier(.3, 1.8, .5, 1); } @keyframes mpop { from { transform: scale(.2) rotate(-30deg); opacity: 0; } }
.clk svg { width: 4.2rem; height: 4.2rem; color: var(--cyan); }
.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; } .stats4 .ok { box-shadow: 0 0 0 1.5px var(--sun) inset; background: rgba(255, 210, 63, .12); } .stats4 .ok b { color: var(--sun); display: block; padding: 0; }
.stats4 .ok { padding: .5rem .3rem; gap: 0; display: block; font-weight: 400; }
.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); }
.table { display: grid; gap: .25rem; margin-bottom: .6rem; } .tr { display: grid; grid-template-columns: .9rem 1.4rem 1fr auto; align-items: center; gap: .5rem; padding: .22rem .6rem; border-radius: .6rem; background: rgba(255, 255, 255, .05); font-size: .82rem; text-align: left; } .tr i { width: .9rem; height: .55rem; border-radius: 3px; } .tr .p { font: 400 .8rem var(--font-d); color: #B8B2E8; } .tr b { font-weight: 800; } .tr em { font-style: normal; font-weight: 800; color: #CFC9F5; font-variant-numeric: tabular-nums; } .tr.me { background: rgba(198, 255, 61, .16); box-shadow: 0 0 0 1.5px rgba(198, 255, 61, .55) inset; } .tr.me b { color: var(--lime); }
.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: mpop .8s cubic-bezier(.3, 1.8, .5, 1); } .crown svg { stroke: none; fill: none; }

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 .scr-h { padding-right: 6.4rem; }
/* ---------- responsive ---------- */
@media (max-width: 900px) { .g4 { grid-template-columns: repeat(4, 1fr); gap: .5rem; } .steps { grid-template-columns: 1fr 1fr; } }
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: 2.2rem; } 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 .sheet { padding: .6rem; gap: .8rem; } body.short .sh-r p { display: none; } body.short .goals { margin: .4rem 0 .2rem; } 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: 2.2rem; } body.short .mdl svg { width: 3.2rem; height: auto; } body.short .coins { margin-bottom: .4rem; } body.short .table { gap: .15rem; } body.short .tr { padding: .12rem .5rem; font-size: .74rem; } body.short .res .rh { margin-bottom: .2rem; }
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.trial .hpos { display: none; } body.trial .hlap { top: calc(var(--sat) + .5rem); }
body.short .hpos b { font-size: 2.4rem; } body.short .hlap { top: calc(var(--sat) + 4.9rem); } body.short .htime b { font-size: 1.4rem; } body.short .hmini { width: 10.5rem; top: calc(var(--sat) + 3.3rem); } body.short .hs b { font-size: 2rem; } body.short .ban { top: 22%; } body.short .step p { font-size: .72rem; } body.short .step { padding: .45rem; }
body.short:not(.playing) .home { padding: 4px; } body.short:not(.playing) .home b { display: none; } body.short .scr-h { padding-top: 0; padding-left: 3.4rem; min-height: 2.8rem; }
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) + 9rem); }
body.narrow .htime { min-width: 7rem; } body.narrow .hmini { width: 9.5rem; }
body.portrait .g3, body.portrait .g4 { grid-template-columns: repeat(2, 1fr); } 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, .hn.use i, .hwrong.show { animation: none; } .menu, .cardw, .sheet, .crown, .mdl.pop { animation: none; } }
