:root{color-scheme:dark;--bg:#0c1423;--ink:#f6f9ff;--muted:#b0c0d4;--gold:#ffbc3d;--red:#fe465b;--blue:#27afff;--panel:rgba(10,20,37,.91)}*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:var(--bg);color:var(--ink);font-family:system-ui,-apple-system,'Segoe UI',Arial,sans-serif}button,select,input{font:inherit}button{cursor:pointer;border:1px solid #67809a;background:linear-gradient(#27425d,#14283b);color:#fff;border-radius:10px;padding:12px 16px;font-size:13px;font-weight:900;letter-spacing:.04em;min-height:43px;touch-action:manipulation;transition:transform .09s,border-color .15s}button:active{transform:scale(.97)}button:hover{border-color:#fbc14b}button:disabled{opacity:.43;cursor:not-allowed}button.primary{color:#171f2b;border-color:#ffe48b;background:linear-gradient(160deg,#fff079,#f9a52f 68%,#da611a);box-shadow:0 5px 0 #9b4f17,0 8px 28px #ffbc3a28}button.giant{padding:16px 24px;font-size:17px}button.back{border:0;background:#192b3c}button.rewarded{border:1px solid #6de0fa;background:linear-gradient(100deg,#08656b,#19316b);margin-top:16px}h1,h2,h3,p{margin-top:0}h2{font-size:clamp(23px,3vw,36px);letter-spacing:-.03em}#app{position:relative;width:100%;height:100%;overflow:hidden;background:#0a1422}#world{position:absolute;inset:0;width:100%;height:100%;display:block;touch-action:none}#panels{position:absolute;inset:0;pointer-events:none}.screen{position:absolute;inset:0;overflow-y:auto;overscroll-behavior:contain;padding:clamp(12px,3.2vh,34px) max(16px,4.5vw);background:linear-gradient(105deg,rgba(3,9,20,.96),rgba(5,14,26,.94) 51%,rgba(7,17,28,.78));opacity:0;visibility:hidden;pointer-events:none;transition:opacity .15s}.screen.active{opacity:1;visibility:visible;pointer-events:auto}#home{padding:0;background:linear-gradient(93deg,rgba(5,12,25,.94) 3%,rgba(5,12,25,.93) 44%,rgba(5,12,25,.35) 100%),url('cover.jpg') center 52%/cover no-repeat}.hero{height:100%;min-height:420px;display:flex;align-items:center;justify-content:space-between;padding:2.4vh 4.3vw}.hero-copy{width:min(650px,60%);position:relative;z-index:1}.eyebrow{color:#ffc54d;font-size:clamp(10px,1.2vw,14px);font-weight:900;letter-spacing:.12em}.hero h1{font-size:clamp(33px,5.65vw,90px);line-height:.94;margin:13px 0 8px;font-style:italic;letter-spacing:-.057em;text-shadow:0 6px 25px #0009}.hero h1 em{font-style:italic;color:#ffbb41}.hero h2{font-size:clamp(17px,2.5vw,40px);color:#fff;margin:0 0 12px;letter-spacing:-.01em;text-shadow:0 3px 9px #000}.hero p{color:#dce5f3;line-height:1.38;max-width:460px;font-size:clamp(13px,1.35vw,19px);text-shadow:0 2px 10px #000}.home-actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:15px}.secondary-actions{margin-top:10px}.secondary-actions button{font-size:12px;padding:9px 13px}.hero-racer{flex:1;align-self:end;text-align:center}.featured-car{font-size:105px;filter:drop-shadow(0 20px 24px #000c);animation:bob 3s ease-in-out infinite}.hero-label{color:#ffde88;font-size:12px;font-weight:900;text-shadow:0 2px 10px #000}.home-stats{font-size:13px;color:#ffd17b;font-weight:800;margin-top:18px}.section-head{display:flex;align-items:center;justify-content:space-between;gap:15px;padding-bottom:15px}.section-head h2{margin:0}.section-head .money{color:#ffce55;font-weight:900}.garage-layout{display:grid;grid-template-columns:minmax(0,1.08fr) minmax(300px,.9fr);gap:20px;max-width:1300px;margin:0 auto}.garage-display,.garage-side{border:1px solid #3e5d76;border-radius:18px;background:#12243be9;padding:16px;box-shadow:0 10px 35px #0004}.turntable{border-radius:14px;overflow:hidden;background:radial-gradient(#456885,#142c43 60%,#071220);height:min(46vh,440px);min-height:220px}.turntable canvas{width:100%;height:100%}.garage-caption{font-size:22px;font-weight:900;text-align:center;padding:9px}.colors,.arrows{display:flex;gap:7px;justify-content:center;margin-top:7px;flex-wrap:wrap}.swatch{width:32px;height:32px;min-height:32px;padding:0;border-radius:50%;border:3px solid white}.swatch.selected{outline:3px solid #f6bd47}.garage-side{overflow-y:auto;max-height:calc(100vh - 115px)}.panel-label{font-size:11px;color:#a7b9d1;font-weight:900;letter-spacing:.1em;margin-bottom:14px}.statrow{display:grid;grid-template-columns:110px 1fr 45px;align-items:center;font-size:12px;gap:8px;margin:9px 0}.bar{height:9px;border-radius:99px;background:#2a4057;overflow:hidden}.bar i{display:block;height:100%;background:linear-gradient(90deg,#3ae4ff,#edce66)}.upgrade{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 0;border-top:1px solid #2d4358;font-size:12px}.upgrade b{color:#ffd065}.upgrade button{font-size:11px;padding:7px 9px;min-height:31px}.garage-action{display:flex;gap:10px;margin-top:12px;flex-wrap:wrap}.section-intro{color:#bbc9db;margin-bottom:13px}.league-list{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));max-width:1250px}.league,.mode-card,.record-card{border:1px solid #415c73;border-radius:15px;padding:16px;background:linear-gradient(145deg,#1c324b,#0e1c31);box-shadow:0 5px 15px #0003}.league h3,.mode-card h3{margin:3px 0 9px;color:#ffca5c}.league small{color:#adc0d3}.league .events{display:flex;gap:5px;margin:11px 0}.league .events span{padding:7px 9px;background:#28415b;border-radius:7px}.league .events .done{background:#2b7353}.league button{width:100%}.modes-grid,.record-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(225px,1fr));gap:14px;max-width:1280px}.mode-card p{font-size:13px;color:#bdd0e3;min-height:46px}.mode-card button{width:100%}.record-card strong{display:block;font-size:30px;color:#ffce62}.achievements{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:10px}.achievement{background:#182d43;padding:12px;border-radius:12px;border:1px solid #3d5166}.achievement.locked{opacity:.44}.setting-list{max-width:620px}.setting-list label{display:flex;justify-content:space-between;align-items:center;gap:10px;background:#17283b;padding:16px;margin-bottom:8px;border:1px solid #38506c;border-radius:10px}.setting-list input{width:24px;height:24px}.setting-list select{padding:8px;background:#1e3447;color:white;border-radius:8px}.help{line-height:1.6;color:#bad0e1;max-width:750px;font-size:14px;margin-top:15px}.result-wrap{max-width:740px;margin:2vh auto;text-align:center;padding:10px}.result-medal{font-size:66px}.result-wrap h2{color:#ffd17d;font-size:clamp(27px,4vw,48px);margin:10px}.result-wrap p{color:#c6d7e5}.result-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:16px 0}.result-stats div{padding:16px 8px;border:1px solid #4c6179;background:#192c45;border-radius:10px}.result-stats b{display:block;color:#ffcc57;font-size:clamp(17px,3vw,27px)}.result-buttons{display:flex;flex-wrap:wrap;justify-content:center;gap:10px}.result-wrap #adHint{font-size:12px;margin-top:8px}#raceHud{position:absolute;inset:0;pointer-events:none}#raceHud.hidden{display:none}.hud-top{position:absolute;top:0;left:0;right:0;display:flex;align-items:flex-start;justify-content:space-between;padding:clamp(6px,1vw,15px);gap:9px}.hud-box{background:rgba(7,19,36,.79);border:1px solid #8cb2d077;border-radius:11px;padding:8px 12px;backdrop-filter:blur(5px);box-shadow:0 3px 14px #0006;color:#fff;font-weight:900;text-shadow:0 2px 3px #000}.hud-box strong{color:#ffdb72}.hud-center{text-align:center;max-width:40vw}.ticker{margin:6px auto;color:#f9e7bd;font-size:clamp(10px,1vw,15px);font-weight:800;text-shadow:0 2px 4px black}.hud-right{display:flex;align-items:flex-start;gap:8px}#minimap{border-radius:12px;background:#07131ab8;border:1px solid #7c9eaf99;width:140px;height:90px}.hud-small{pointer-events:auto;padding:8px 11px;min-height:33px;font-size:20px}.race-bottom{position:absolute;bottom:10px;left:10px;right:10px;display:flex;align-items:flex-end;justify-content:space-between;pointer-events:none}.dash{border-radius:13px;padding:10px 16px;background:#061420b3;border:1px solid #66849a88}.speed{font-weight:1000;font-style:italic;font-size:clamp(32px,4.3vw,66px);color:white}.units{color:#bed0de;font-size:11px;font-weight:800}.condition{display:block;color:#ffdb8e;font-size:11px}.meters{width:210px;border-radius:12px;background:#071523cf;padding:10px 12px;border:1px solid #698ca98a}.meters label{display:flex;justify-content:space-between;color:#c6d8eb;font-size:10px;font-weight:900}.meter{height:9px;border-radius:10px;background:#4e2433;overflow:hidden;margin:5px 0}.meter i{display:block;width:100%;height:100%;background:linear-gradient(90deg,#f63c64,#fac44c)}.meter.nitro{background:#163b55}.meter.nitro i{background:linear-gradient(90deg,#219cfa,#6dffed)}.ability{font-size:10px;color:#e9f3ff;margin-top:5px}.mobile-controls{display:none;pointer-events:auto}#modal{position:absolute;inset:0;background:#000a;display:flex;align-items:center;justify-content:center;z-index:10;padding:12px}#modal.hidden{display:none}.modal-card{max-width:440px;width:100%;border:1px solid #7c98b3;border-radius:18px;padding:20px;background:linear-gradient(145deg,#243d5b,#091523);text-align:center;box-shadow:0 20px 90px #000b}.modal-card h2{color:#ffc659}.modal-actions{display:flex;flex-direction:column;gap:9px}#toast{position:absolute;top:22%;left:50%;transform:translate(-50%,-10px);background:rgba(8,25,38,.9);border:1px solid #ffd56a;border-radius:12px;padding:9px 18px;font-size:16px;font-weight:900;text-align:center;pointer-events:none;opacity:0;transition:opacity .18s;max-width:80vw;text-shadow:0 2px 8px black;z-index:4}#toast.show{opacity:1}#loading{position:absolute;inset:0;z-index:99;display:flex;justify-content:center;align-items:center;background:#101a2b;transition:opacity .25s}#loading.hidden{opacity:0;pointer-events:none}.load-inner{text-align:center}.load-icon{font-size:68px}.load-inner h1{font-size:24px;color:#ffc04e}.load-inner p{font-size:12px;color:#bed1e3}.loading-bar{height:9px;width:240px;background:#28364b;border-radius:10px;overflow:hidden;margin:auto}.loading-bar div{height:100%;width:100%;background:#ffce45;animation:load 1.1s ease-in-out}.hidden{display:none!important}@keyframes bob{50%{transform:translateY(-15px)}}@keyframes load{from{width:5%}to{width:100%}}
@media(max-width:900px){.hero-copy{width:75%}.hero-racer{display:none}.garage-layout{grid-template-columns:1fr}.turntable{height:250px}.garage-side{max-height:unset}.screen{padding:10px 13px}.section-head{gap:5px}.section-head h2{font-size:23px}.hero{padding:15px 23px}.hud-top{padding:5px}.hud-box{padding:5px 7px}.hud-right #minimap{width:105px;height:68px}.meters{width:155px}}
@media(pointer:coarse), (max-width:650px){.mobile-controls{display:flex;position:absolute;bottom:max(8px,env(safe-area-inset-bottom));left:8px;right:8px;justify-content:space-between;align-items:flex-end;gap:12px}.mobile-controls .move,.mobile-controls .actions{display:flex;gap:6px;align-items:center}.mobile-controls button{width:clamp(44px,8vw,68px);height:clamp(44px,9vh,67px);border-radius:12px;padding:2px;font-size:12px;background:#071c32dd;border:2px solid #a1d8f6aa;text-shadow:0 2px 4px #000;user-select:none;-webkit-user-select:none;touch-action:none}.mobile-controls .move button{font-size:24px}.mobile-controls button.boost{background:#1775a2df}.mobile-controls button.special{background:#b65a13df}.race-bottom{bottom:clamp(61px,12vh,85px)}.race-bottom .dash{padding:5px 9px}.race-bottom .speed{font-size:clamp(23px,5vw,45px)}.race-bottom .meters{padding:6px 8px}.mobile-controls .actions{flex-wrap:wrap;justify-content:end;max-width:53vw}.mobile-controls .move{align-self:end}.hud-center{max-width:48vw}.hud-top #minimap{display:none}}
@media(max-width:600px){#home{background-position:61% 50%}.hero{min-height:0;padding:8px 13px;height:100%;align-items:center}.hero-copy{width:100%;padding:5px 0;background:linear-gradient(90deg,#07111eb5,#07111e3b);border-radius:14px}.hero h1{font-size:clamp(29px,8vw,48px)}.hero h2{font-size:clamp(17px,5vw,25px)}.hero p{font-size:12px;max-width:330px}.home-actions{gap:5px;margin-top:9px}.home-actions button{padding:8px 10px;min-height:37px;font-size:11px}.home-actions button.giant{font-size:13px;padding:11px}.home-stats{margin-top:7px;font-size:11px}.eyebrow{font-size:9px}.section-head button{font-size:10px;min-height:33px;padding:5px 8px}.garage-display,.garage-side{padding:10px}.turntable{height:190px;min-height:165px}.league-list{grid-template-columns:1fr}.screen{padding:8px}.modes-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.mode-card{padding:9px}.mode-card h3{font-size:14px}.mode-card p{font-size:11px;min-height:55px}.mode-card button{padding:7px;font-size:10px}.race-bottom .meters{width:130px}.race-bottom .meters label{font-size:8px}.hud-top #rank{font-size:10px}.hud-top #elim{font-size:10px}.hud-center .ticker{font-size:9px}.hud-small{padding:5px;font-size:15px}.result-stats{gap:4px}.result-stats div{padding:9px 3px}.result-wrap{padding:2px}}
@media(max-height:540px){.hero h1{font-size:clamp(31px,4.4vw,62px)}.hero h2{font-size:clamp(17px,2vw,25px)}.hero p{font-size:12px;margin:5px 0}.hero{align-items:center}.home-actions{margin-top:8px}.hero .home-stats{margin-top:8px}.result-medal{font-size:36px}.result-wrap h2{font-size:28px;margin:4px}.result-wrap p{font-size:12px;margin:4px}.result-stats{margin:8px 0}.result-wrap .result-buttons button{padding:7px}.hud-box{padding:4px 8px}.hud-top #minimap{height:60px}.race-bottom .speed{font-size:35px}}
@media(max-width:600px){.mobile-controls{bottom:max(5px,env(safe-area-inset-bottom));left:5px;right:5px;align-items:flex-end}.mobile-controls .move{gap:5px}.mobile-controls .move button{width:45px;height:51px;min-height:51px}.mobile-controls .actions{display:grid;grid-template-columns:repeat(2,minmax(58px,1fr));gap:4px;width:146px;max-width:48vw}.mobile-controls .actions button{width:100%;height:41px;min-height:41px;font-size:9px;line-height:1.12;padding:1px 2px}.race-bottom{bottom:99px;left:5px;right:5px}.race-bottom .dash{padding:5px 8px}.race-bottom .meters{width:134px;padding:6px 7px}.race-bottom .speed{font-size:26px}.race-bottom .condition{font-size:9px;max-width:145px}.hud-center{max-width:49vw}.hud-top{gap:4px}.hud-top #rank{max-width:28vw;font-size:10px}.hud-top #elim{font-size:10px}.hud-top .ticker{font-size:9px}}
