/* Neon Drift - 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, worlds, tracks, sheet, garage, cards, results), responsive */
:root { --acc: #FF3D8B; --acc2: #2FD6FF; --pn: linear-gradient(180deg, rgba(34, 24, 88, .96), rgba(16, 11, 48, .96)); --sat: 0px; --sar: 0px; --sab: 0px; --sal: 0px; --gold: #FFD23F; --glass: linear-gradient(180deg, rgba(30, 22, 78, .78), rgba(12, 8, 38, .8)); }
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; }
svg.medal { stroke: none; fill: none; }
#app, .nd { 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; }
.shake { animation: ndshake .35s; } @keyframes ndshake { 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: .56rem; font-weight: 800; letter-spacing: .16em; color: #CFC9F5; }
.hscore, .htime, .hchain, .hs, .hmini canvas { text-shadow: 0 2px 0 rgba(0, 0, 0, .45); }
.hscore { position: absolute; left: calc(var(--sal) + .8rem); top: calc(var(--sat) + .5rem); width: 11.5rem; padding: .3rem .8rem .5rem; border-radius: 1rem; background: var(--glass); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .14) inset, 0 0 1.6rem -.4rem var(--acc), 0 4px 0 rgba(0, 0, 0, .3); }
.hscore b { display: block; font: 400 2.2rem/1.05 var(--font-d); font-variant-numeric: tabular-nums; color: #fff; text-shadow: 0 0 1rem var(--acc), 0 3px 0 rgba(0, 0, 0, .45); }
.mbar { position: relative; height: .62rem; margin-top: .5rem; border-radius: 99px; background: rgba(8, 5, 28, .85); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .16) inset; }
.mbar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 99px; background: linear-gradient(90deg, #7B6BFF, var(--acc)); box-shadow: 0 0 .7rem var(--acc); transition: width .15s linear; }
.mbar.t1 i { background: linear-gradient(90deg, #E9A27A, #FFC48A); box-shadow: 0 0 .8rem #FF9B4A; } .mbar.t2 i { background: linear-gradient(90deg, #BFC8E0, #F2F6FF); box-shadow: 0 0 .8rem #D8E4FF; } .mbar.t3 i { background: linear-gradient(90deg, #FFC93F, #FFF1A0); box-shadow: 0 0 1rem #FFD23F; }
.mbar u { position: absolute; top: -.18rem; bottom: -.18rem; width: 2px; background: rgba(255, 255, 255, .6); }
.mbar .ml { position: absolute; top: .7rem; transform: translateX(-50%); font: 400 .5rem var(--font-d); color: #B8B2E8; } .mbar .m3 { left: 100%; transform: translateX(-80%); }
.htime { position: absolute; left: 50%; top: calc(var(--sat) + .5rem); transform: translateX(-50%); text-align: center; padding: .2rem 1rem .3rem; border-radius: 1rem; background: var(--glass); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .14) inset, 0 4px 0 rgba(0, 0, 0, .3); min-width: 9.5rem; }
.htime .hl { display: flex; align-items: baseline; justify-content: center; gap: .35rem; } .htime .hl small { margin: 0; } .htime .hl b { font: 400 1.05rem var(--font-d); } .htime .hl em { font: 400 .75rem var(--font-d); font-style: normal; color: #B8B2E8; }
.htime .tt { display: block; font: 400 1.6rem/1.05 var(--font-d); font-variant-numeric: tabular-nums; }
.hpar { display: block; font-size: .62rem; font-weight: 800; letter-spacing: .1em; color: #B8B2E8; min-height: .9em; } .hpar.behind { color: #FF8A99; } .hpar.ahead { color: #7DF9FF; }
.hchain { position: absolute; left: 50%; top: calc(var(--sat) + 5.6rem); transform: translateX(-50%) scale(.9); width: 14rem; text-align: center; padding: .2rem .8rem .5rem; border-radius: 1rem; background: linear-gradient(180deg, rgba(60, 24, 110, .85), rgba(24, 10, 60, .88)); box-shadow: 0 0 0 2px var(--acc) inset, 0 0 1.6rem var(--acc), 0 4px 0 rgba(0, 0, 0, .3); opacity: 0; transition: opacity .15s, transform .15s; }
.hchain.on { opacity: 1; transform: translateX(-50%) scale(1); }
.hchain small { color: #FFD6EA; } .hchain b { display: inline-block; font: 400 1.9rem/1.05 var(--font-d); font-variant-numeric: tabular-nums; color: #fff; text-shadow: 0 0 .9rem var(--acc), 0 3px 0 rgba(0, 0, 0, .45); }
.hx { display: inline-block; vertical-align: top; margin-left: .45rem; padding: .1rem .55rem; border-radius: .6rem; background: var(--acc); color: #fff; font: 400 1.15rem var(--font-d); transform: rotate(-4deg); box-shadow: 0 3px 0 rgba(0, 0, 0, .35); }
.hcb { height: .38rem; margin-top: .3rem; border-radius: 99px; background: rgba(0, 0, 0, .5); overflow: hidden; } .hcb i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #FFD23F, #fff); }
.hchain em { position: absolute; right: -.3rem; top: -.7rem; padding: .08rem .55rem; border-radius: .6rem; font: 400 .72rem var(--font-d); font-style: normal; background: var(--gold); color: #1B1240; opacity: 0; transform: scale(.7) rotate(5deg); transition: opacity .12s, transform .12s; box-shadow: 0 3px 0 #B68A00; }
.hchain.zone em { opacity: 1; transform: scale(1) rotate(5deg); }
.hmini { position: absolute; right: calc(var(--sar) + .8rem); top: calc(var(--sat) + 3.7rem); width: 11.5rem; }
.hmini canvas { width: 100%; height: auto; aspect-ratio: 300 / 210; 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); }
.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.3rem/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, #9B7BFF, #2FD6FF); 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.3rem rgba(47, 214, 255, 1); }
@keyframes nit { 50% { filter: brightness(1.4); } }
.hwrong { position: absolute; left: 50%; top: 30%; 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(42vw, 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 var(--acc) 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, #FF8FC0 45%, var(--acc)); box-shadow: 0 4px 0 rgba(0, 0, 0, .35), 0 0 1.2rem var(--acc); pointer-events: none; }
.tcb { position: absolute; border: 0; border-radius: 50%; display: grid; place-items: center; align-content: center; color: #fff; font: 400 .9rem 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, .tcb small { pointer-events: none; } .tcb svg { width: 1.8rem; height: 1.8rem; } .tcb small { font: 700 .46rem var(--font-b); letter-spacing: .04em; opacity: .85; }
.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.boost { right: calc(var(--sar) + .9rem); bottom: calc(var(--sab) + .9rem); width: 6.4rem; height: 6.4rem; background: radial-gradient(circle at 35% 30%, #A5F0FF, #7B4DFF 75%); }
.tcb.hand { right: calc(var(--sar) + 7.8rem); bottom: calc(var(--sab) + .9rem); width: 6rem; height: 6rem; background: radial-gradient(circle at 35% 30%, #FF9BC5, #D4206A 75%); }
.tcb.brake { right: calc(var(--sar) + 4.4rem); bottom: calc(var(--sab) + 7.4rem); width: 4.2rem; height: 4.2rem; background: radial-gradient(circle at 35% 30%, #FFB28A, #D4481F 75%); font-size: .7rem; }
.tcb.gas { display: none; right: calc(var(--sar) + 13.6rem); bottom: calc(var(--sab) + .9rem); width: 5rem; height: 5rem; background: radial-gradient(circle at 35% 30%, #B8FF70, #4C9A1E 70%); } body.noauto .tcb.gas { display: grid; }
.tcr { position: absolute; right: calc(var(--sar) + .9rem); bottom: calc(var(--sab) + 7.8rem); width: 2.8rem; height: 2.8rem; 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: 24%; 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.fin b { color: var(--sun); }
.ban.map b { font-size: clamp(1.8rem, 5vw, 3.2rem); } .ban.lap 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) + 5.6rem); 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, .92); box-shadow: 0 0 0 2px var(--acc) 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.4rem); }

/* ---------- 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(10, 6, 32, .88); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); align-content: start; }
.ovl.menuov { place-items: center start; background: linear-gradient(90deg, rgba(10, 6, 30, .94) 0%, rgba(10, 6, 30, .66) 40%, rgba(10, 6, 30, 0) 72%), linear-gradient(0deg, rgba(10, 6, 30, .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(--acc2); } .kick::before { content: ""; width: 28px; height: 3px; border-radius: 3px; background: currentColor; box-shadow: 0 0 10px 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); position: relative; }
.logo span, .logo b { display: block; font-weight: 400; transform: skewX(-9deg); transform-origin: left; }
.logo span { color: #EAFBFF; text-shadow: 0 0 .15em #2FD6FF, 0 0 .4em #2FD6FF, 0 0 .9em rgba(47, 214, 255, .8), 0 6px 0 rgba(0, 0, 0, .45); }
.logo b { color: #FFE9F4; text-shadow: 0 0 .12em #FF3D8B, 0 0 .35em #FF3D8B, 0 0 .9em rgba(255, 61, 139, .85), 0 6px 0 rgba(0, 0, 0, .45); animation: flick 5s steps(1) infinite; }
@keyframes flick { 0%, 91%, 94%, 100% { opacity: 1; } 92% { opacity: .62; } 93% { opacity: .95; } }
.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; } .g4w { grid-template-columns: repeat(4, 1fr); } .g3t { grid-template-columns: repeat(3, 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 .gh { position: absolute; left: .5rem; bottom: .4rem; width: 1.5rem; height: 1.5rem; color: #7DF9FF; filter: drop-shadow(0 2px 3px #000); } .tcard .gh svg { width: 100%; height: 100%; }
.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); }
.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, 170, 60, .7); } .pips i.on, .lv i.on { background: var(--c, #FF3D8B); box-shadow: 0 0 .4rem var(--c, #FF3D8B); }
.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 .6rem; font-size: .9rem; 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.05rem var(--font-d); }
.goals { display: flex; gap: .7rem; flex-wrap: wrap; margin: .7rem 0 .4rem; font-weight: 800; font-size: .85rem; color: #DCD7FF; } .goals span { display: inline-flex; align-items: center; gap: .3rem; opacity: .85; } .goals span.got { opacity: 1; color: #fff; } .goals svg.medal { display: block; } .goals .ts svg { width: 1.2rem; height: 1.2rem; color: var(--cyan); } .goals .ts.got svg { 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::-webkit-scrollbar { display: 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%; background: var(--acc); color: #fff; display: grid; place-items: center; font: 400 1rem var(--font-d); font-style: normal; } .step b { font: 400 1rem var(--font-d); text-transform: uppercase; } .step p { margin: .1rem 0 0; font-size: .8rem; font-weight: 600; color: #CFC9F5; 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, 50%), rgba(255, 255, 255, .15) var(--v, 50%)); }
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, 61, 139, .24), transparent 70%), rgba(0, 0, 0, .3); overflow: hidden; } .showroom canvas { flex: 1; min-width: 0; width: 100%; height: auto; display: block; } .showroom.locked canvas { filter: grayscale(1) brightness(.35); }
.lkov { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; } .lkov svg { width: 2.6rem; height: 2.6rem; margin: 0 auto .3rem; } .lkov b { font: 400 1.1rem var(--font-d); } .lkov small { font-weight: 700; color: #CFC9F5; }
.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; z-index: 2; } .nav:hover { background: rgba(255, 255, 255, .24); } .nav svg { width: 1.3rem; height: 1.3rem; }
.cdots { display: flex; justify-content: center; gap: .4rem; margin-top: .7rem; } .cdots i { width: .6rem; height: .6rem; border-radius: 50%; background: rgba(255, 255, 255, .18); } .cdots i.on { background: var(--acc); box-shadow: 0 0 .6rem var(--acc); } .cdots i.lk { opacity: .5; }
.cn h3 { margin: 0 0 .1rem; font: 400 1.6rem var(--font-d); text-transform: uppercase; } .cn p { margin: 0 0 .7rem; font-size: .85rem; font-weight: 600; color: #DCD7FF; }
.sbs { display: grid; gap: .35rem; 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, .1); overflow: hidden; } .sb i { display: block; height: 100%; border-radius: 99px; }
.buyrow { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .6rem; } .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: #C8F59A; } .ok svg { width: 1.2rem; height: 1.2rem; }
.need { display: flex; align-items: center; gap: .5rem; padding: .5rem .8rem; border-radius: .9rem; background: rgba(255, 210, 63, .1); box-shadow: 0 0 0 1.5px rgba(255, 210, 63, .35) inset; font-size: .8rem; font-weight: 800; color: #FFE9A0; } .need svg { width: 1.2rem; height: 1.2rem; flex: none; }
.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, .5); }
/* 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.4rem, 3vw, 2rem); }
.pos { font: 400 clamp(2.2rem, 5.4vw, 3.6rem) var(--font-d); line-height: 1; color: #fff; text-shadow: 0 0 1rem var(--acc), 0 5px 0 rgba(0, 0, 0, .4); font-variant-numeric: tabular-nums; } .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; } }
.gbar { position: relative; height: .7rem; margin: .5rem 0 1.4rem; border-radius: 99px; background: rgba(0, 0, 0, .45); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .14) inset; } .gbar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: linear-gradient(90deg, #7B6BFF, var(--acc)); box-shadow: 0 0 .8rem var(--acc); } .gbar u { position: absolute; top: -.15rem; bottom: -.15rem; width: 2px; background: rgba(255, 255, 255, .55); } .gbar span { position: absolute; top: .9rem; transform: translateX(-50%); } .gbar span svg { display: block; }
.bd { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: .4rem 0; } .bd > div { padding: .4rem .3rem; border-radius: .9rem; background: rgba(255, 255, 255, .06); line-height: 1.1; } .bd small { display: block; font-size: .56rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); } .bd b { font: 400 1.1rem var(--font-d); } .bd em { font-style: normal; font-size: .7rem; font-weight: 800; color: #B8B2E8; margin-left: .25rem; }
.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); } .stats4 b { font: 400 1.2rem var(--font-d); } .stats4 em { font-style: normal; font-size: .75rem; opacity: .6; }
.stats4 .ok { padding: .5rem .3rem; gap: 0; display: block; font-weight: 400; background: rgba(255, 210, 63, .14); box-shadow: 0 0 0 1.5px rgba(255, 210, 63, .45) inset; color: #fff; } .stats4 .ok b { color: var(--sun); }
.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; }
.unl { display: flex; align-items: center; justify-content: center; gap: .5rem; margin: .2rem 0 .5rem; 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; } .unl svg { width: 1.2rem; height: 1.2rem; flex: none; } .unl.cup { background: rgba(255, 210, 63, .14); box-shadow: 0 0 0 1.5px rgba(255, 210, 63, .45) inset; color: #FFE9A0; } .unl.car { background: rgba(255, 61, 139, .14); box-shadow: 0 0 0 1.5px rgba(255, 61, 139, .45) inset; }
.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; }
.cardw.res { width: min(34rem, 100%); }

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: .2rem 0; padding: .3rem .6rem; } body.short .res .gbar { margin: .3rem 0 1.2rem; }
/* ---------- responsive ---------- */
@media (max-width: 900px) { .g3t { grid-template-columns: repeat(3, 1fr); gap: .5rem; } .g4w { 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: 0; padding-left: 3.4rem; min-height: 2.8rem; padding-right: 6.4rem; } body.short .scr-h .btn { min-height: 0; padding: .45em .9em; }
body.short .ovl.maps.mid { align-content: start; } body.short .tcard.track .th { aspect-ratio: 16 / 8; } body.short .tcard.world .th { aspect-ratio: 16 / 7.5; } body.short .tcard .no { width: 1.5rem; height: 1.5rem; font-size: .8rem; } 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 .gg { gap: .6rem; } body.short .gl, body.short .gr { padding: .6rem; } body.short .cn h3 { font-size: 1.2rem; } body.short .cn p { font-size: .75rem; margin-bottom: .3rem; } body.short .sbs { margin-bottom: .4rem; gap: .2rem; }
body.short .hscore { width: 9.4rem; padding: .2rem .6rem .45rem; } body.short .hscore b { font-size: 1.6rem; } body.short .htime .tt { font-size: 1.25rem; } body.short .htime { min-width: 8rem; } body.short .hchain { top: calc(var(--sat) + 4.4rem); width: 11rem; } body.short .hchain b { font-size: 1.4rem; }
body.short .hmini { width: 9rem; top: calc(var(--sat) + 3.2rem); } body.short .hs b { font-size: 1.9rem; } body.short .hspd { width: 9rem; }
body.short .hint { font-size: .8rem; padding: .35rem .8rem; bottom: calc(var(--sab) + 4.6rem); } body.short.is-touch .hint { bottom: calc(var(--sab) + 9rem); }
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 .pad { min-height: 5.6rem; height: 7.6rem; } body.short .tcb.boost { width: 5.4rem; height: 5.4rem; } body.short .tcb.hand { width: 5.2rem; height: 5.2rem; right: calc(var(--sar) + 6.8rem); } body.short .tcb.brake { width: 3.6rem; height: 3.6rem; bottom: calc(var(--sab) + 6rem); right: calc(var(--sar) + 3.8rem); } body.short .tcr { bottom: calc(var(--sab) + 6.4rem); }
body.narrow .htime { min-width: 7rem; } body.narrow .hmini { width: 9.5rem; }
body.portrait .g3t, body.portrait .g4w { 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(10, 6, 30, .8); }
@media (prefers-reduced-motion: reduce) { .ban.show { animation-duration: .01s; } .tcard.fresh, .hn.use i, .hwrong.show, .logo b { animation: none; } .menu, .cardw, .sheet, .crown, .mdl.pop { animation: none; } }
