@font-face{font-family:Rally;src:url('../fonts/russo.ttf') format('truetype');font-display:swap}
*{box-sizing:border-box}html{font-size:16px;-webkit-text-size-adjust:100%;text-size-adjust:100%}body{position:fixed;inset:0;touch-action:manipulation;user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent;background:#123a48 url('../img/asphalt.webp') repeat;background-size:256px;color:#fff4d8;font-family:Rally,Arial,sans-serif}button{font:inherit;cursor:pointer;touch-action:manipulation;color:inherit;outline:none;border:0;background:none;padding:0}button:focus-visible{outline:3px solid #fff8dc;outline-offset:3px}button:active{translate:0 3px;scale:.97}button:disabled{cursor:default}button svg,svg{width:24px;height:24px;flex:none}.svg-library{position:absolute;width:0;height:0;overflow:hidden;pointer-events:none}
#app{inset:auto;box-shadow:0 0 90px #051e29c0;background:#80d4e5}#world{position:absolute;inset:0;display:block;touch-action:none;width:100%;height:100%}.screen{z-index:3;pointer-events:none;flex-direction:column;overflow:hidden}.screen button,.screen .pedals{pointer-events:auto}.scene-shade{position:absolute;inset:0;pointer-events:none;z-index:1;background:linear-gradient(#0d3a4626,transparent 43%,#0c293833);transition:opacity .4s}.menu-top,.play-top{position:absolute;top:max(14px,env(safe-area-inset-top));left:18px;right:18px;display:flex;align-items:center;justify-content:space-between;gap:8px}.edition{font-size:11px;letter-spacing:1.7px;color:#fff4ce;display:inline-flex;align-items:center;gap:7px;text-shadow:0 1px 4px #073747}.edition i{width:7px;height:7px;background:#ffd344;border-radius:50%;box-shadow:0 0 0 3px #133f4a30}.icon-button{width:46px;height:44px;background:url('../img/plaque.webp') center/100% 100% no-repeat;display:flex;align-items:center;justify-content:center;color:#f6f1d2;flex:none}.icon-button svg{width:22px;height:22px}.brand{position:absolute;top:9.4%;left:9%;width:82%;text-align:center;transform:rotate(-4deg)}.brand img{display:block;width:100%;height:auto;filter:drop-shadow(0 5px 0 #123d4c25)}.brand p{font-size:10px;letter-spacing:1.55px;margin:8px -12px 0;text-shadow:0 1px 3px #153645}.car-caption{position:absolute;bottom:267px;left:0;right:0;text-align:center;text-shadow:0 2px 6px #123848}.small-caps{font-size:9px;letter-spacing:2px}.car-caption b{display:block;font-size:20px;margin-top:4px;letter-spacing:1px}.car-caption em{font-style:normal;color:#ffcf32;font-size:14px;vertical-align:2px;border-left:2px solid #fff6d95c;margin-left:6px;padding-left:10px}.menu-bottom{position:absolute;left:24px;right:24px;bottom:max(14px,env(safe-area-inset-bottom));display:flex;align-items:center;flex-direction:column}.level-caption{display:flex;align-items:center;justify-content:center;gap:9px;margin-bottom:5px;text-shadow:0 1px 5px #123747}.level-caption svg{width:25px;height:27px;color:#ffcf32}.level-caption>span{font-size:14px;letter-spacing:1px}.level-caption small{display:block;font-family:Arial,sans-serif;font-size:12px;letter-spacing:.1px;margin-top:4px;color:#d7ece5}.art-button{position:relative;height:88px;width:100%;display:flex;align-items:center;justify-content:center;gap:14px;font-size:27px;letter-spacing:1px;color:#143747;text-shadow:0 1px #fff9d5;transition:scale .1s,translate .1s;background-position:center;background-size:100% 100%;background-repeat:no-repeat;flex-shrink:0}.art-button svg{width:27px;height:27px}.gold{background-image:url('../img/button-gold.webp')}.teal{background-image:url('../img/button-teal.webp');color:#fff6dd;text-shadow:0 2px #115460}.menu-sub{width:100%;display:flex;flex-direction:column;align-items:center;gap:5px;font:11px Arial,sans-serif;color:#e6eee0;line-height:1.3;margin-top:8px}.free-repair{font-size:10px;color:#a8d9cf}.all-games{font-family:Rally,Arial,sans-serif;display:flex;align-items:center;justify-content:center;gap:8px;font-size:13px;min-height:44px;margin-top:9px;letter-spacing:.2px}.all-games svg{width:18px;height:18px}.loading-tag{position:absolute;bottom:28px;font:9px Rally,Arial,sans-serif;letter-spacing:1.5px;color:#a5d5d2}
.challenge{display:flex;gap:9px;align-items:center;text-shadow:0 2px 4px #0a3049}.challenge>b{font-size:26px;color:#ffd550;border:2px solid #fff8d5;transform:skew(-6deg);padding:4px 8px;line-height:1}.challenge>span{font-size:12px;letter-spacing:.4px}.challenge small{display:block;font:11px Arial,sans-serif;color:#e1f1e9;margin-top:5px}.run-status{position:absolute;top:85px;left:20px;right:20px;text-shadow:0 1px 4px #123a47}.distance-line{display:flex;justify-content:space-between;font-size:10px;margin-bottom:6px;gap:6px}.distance-line b{font-size:10px;font-weight:normal;color:#fff1b2}.run-bar{height:6px;background:#092d4780;border:1px solid #e7f3db80;transform:skew(-14deg);overflow:hidden}.run-bar>div{height:100%;width:0;background:#ffd139;transition:width .1s linear}.drive-hint{position:absolute;top:25%;left:0;right:0;text-align:center;text-shadow:0 2px 6px #123847;transition:opacity .25s}.drive-hint b{display:block;font-size:20px;letter-spacing:.6px}.drive-hint span{display:block;font:13px Arial,sans-serif;margin-top:7px}.shift-note{position:absolute;top:23%;left:0;right:0;text-align:center;font-size:20px;color:#ffe27b;text-shadow:0 2px 6px #0a3145;opacity:0;transition:opacity .15s;letter-spacing:1px}.bullet-label{position:absolute;top:86px;left:0;right:0;align-items:center;justify-content:center;gap:7px;font-size:9px;letter-spacing:1.2px;color:#fff7cf;display:none;text-shadow:0 1px 4px #133b4a}.bullet-label i{width:6px;height:6px;border-radius:50%;background:#ffd344;animation:blink 1.1s ease-in-out infinite}.driving-hud{position:absolute;bottom:max(12px,env(safe-area-inset-bottom));left:20px;right:20px;transition:opacity .25s}.speedometer{width:155px;margin:0 auto 12px;text-align:center;position:relative;text-shadow:0 2px 5px #163f4c}.speedometer strong{font-size:59px;line-height:1;letter-spacing:-2px;font-weight:normal}.speedometer>span{font-size:10px;display:block;letter-spacing:2px;margin-top:3px}.speedometer>b{position:absolute;right:-12px;bottom:17px;font-size:18px;color:#ffd844}.gear-bar{display:flex;gap:3px;justify-content:center;transform:skew(-15deg);margin-bottom:5px}.gear-bar i{display:block;width:23px;height:5px;background:#ffedba55}.gear-bar i.on{background:#ffce3b}.pedals{display:flex;justify-content:space-between;align-items:flex-end}.gas-pedal,.boost-pedal{display:flex;flex-direction:column;align-items:center;justify-content:center;transition:scale .1s,translate .1s;touch-action:none;background-repeat:no-repeat;background-position:center;background-size:100% 100%}.gas-pedal{width:114px;height:116px;color:#183a41;background-image:url('../img/button-gold.webp')}.gas-pedal svg{width:34px;height:43px}.gas-pedal b{font-size:21px;margin-top:3px;letter-spacing:1px}.gas-pedal.held{translate:0 5px;scale:.95;filter:brightness(1.13)}.boost-pedal{width:125px;height:91px;color:#fff2cf;background-image:url('../img/button-teal.webp')}.boost-pedal svg{width:24px;height:28px}.boost-pedal b{font-size:13px;letter-spacing:.5px;margin-top:2px}.boost-pedal small{font:8px Rally,Arial,sans-serif;margin-top:3px;color:#e0f8ec}.boost-pedal.used{filter:saturate(.4) brightness(.75)}.desktop-hint{font:8px Rally,Arial,sans-serif;text-align:center;margin-top:10px;color:#cce7de;letter-spacing:.5px}.desktop-hint span{padding:0 5px}@media(pointer:coarse){.desktop-hint{display:none}}
.art-panel{background-image:url('../img/panel.webp');background-size:100% 100%;color:#153b48}.overlay{position:absolute;inset:0;z-index:50;display:none;align-items:center;justify-content:center;background:#062e497d;backdrop-filter:blur(3px)}.overlay.show{display:flex}.pause-panel{width:min(342px,calc(100% - 30px));padding:36px 22px 28px;text-align:center}.pause-panel h2{font-size:38px;letter-spacing:3px;margin:12px 0 16px}.pause-panel .art-button{height:71px;font-size:18px;margin-top:7px}.pause-foot{display:flex;align-items:center;justify-content:space-around;margin-top:14px}.pause-foot button{min-height:42px;font-size:12px}.result-heading{position:absolute;top:4%;left:12px;right:12px;text-align:center;animation:resultIn .4s ease-out}.result-heading h1{font-size:45px;font-weight:normal;line-height:1.02;letter-spacing:-1px;margin:12px 0 8px;color:#ffe268;-webkit-text-stroke:1px #193b46;text-shadow:0 4px #153b49,2px 0 #153b49,-2px 0 #153b49,0 -2px #153b49}.result-heading p{font:13px Arial,sans-serif;text-shadow:0 2px 5px #133848;margin:8px 0}.result-heading .edition{font-size:9px}.result-bottom{position:absolute;bottom:max(12px,env(safe-area-inset-bottom));left:24px;right:24px;animation:resultIn .35s ease-out}.result-panel{padding:22px 28px 19px;margin:0 auto 8px;max-width:370px}.result-score{text-align:center}.result-score>span{font-size:10px;letter-spacing:1.8px;display:block}.result-score strong{font-size:41px;display:block;font-weight:normal;line-height:1.2;margin-top:3px}.result-score small{display:block;font-size:9px;letter-spacing:.6px;color:#bd6634;margin:3px 0 12px}.result-details{display:flex;justify-content:space-around;border-top:1px solid #35575e30;padding-top:10px;gap:5px}.result-details span{font:11px Arial,sans-serif;text-align:center;color:#446772}.result-details b{display:block;font:16px Rally,Arial,sans-serif;margin-top:5px;color:#153e49}.result-bottom>.art-button{height:79px;font-size:23px}.result-actions{display:flex;justify-content:space-between;gap:8px;margin-top:8px}.result-actions button{min-height:44px;font-size:11px;display:flex;align-items:center;justify-content:center;gap:6px}.result-actions svg{width:19px;height:19px}#toast{position:absolute;z-index:65;top:18%;left:6%;right:6%;padding:14px 20px;pointer-events:none;opacity:0;transition:opacity .2s,translate .2s;translate:0 -8px;text-align:center;font:12px Rally,Arial,sans-serif;color:#fff5d5;background:url('../img/plaque.webp') center/100% 100% no-repeat}#toast.show{opacity:1;translate:0 0}#impact-flash{position:absolute;inset:0;z-index:60;background:#fff7da;opacity:0;pointer-events:none}#impact-flash.hit{animation:flash .24s ease-out}@keyframes flash{0%{opacity:.65}100%{opacity:0}}@keyframes resultIn{from{opacity:0;translate:0 15px}to{opacity:1;translate:0 0}}@keyframes blink{50%{opacity:.3}}@keyframes readyPulse{50%{filter:brightness(1.15);scale:1.025}}
@media(max-height:660px) and (max-aspect-ratio:1/1){.brand{top:9%;width:72%;left:14%}.brand p{font-size:9px}.car-caption{bottom:235px}.menu-bottom{bottom:6px}.menu-bottom>.art-button{height:76px}.all-games{margin-top:2px}.menu-sub{margin-top:5px}.level-caption{margin-bottom:2px}.level-caption small{font-size:11px}.result-heading h1{font-size:39px}.result-panel{padding:19px 25px 14px}.result-score strong{font-size:34px}.result-score small{margin-bottom:9px}.result-bottom>.art-button{height:72px}.result-actions{margin-top:2px}.driving-hud{bottom:9px}.gas-pedal{height:99px;width:106px}.boost-pedal{height:82px;width:119px}.speedometer{margin-bottom:8px}.speedometer strong{font-size:51px}.drive-hint{top:27%}}
@media(max-height:440px) and (min-aspect-ratio:1/1){.menu-top{top:9px}.brand{left:4%;top:16%;width:38%}.brand p{font-size:8px;letter-spacing:.7px}.car-caption{left:3%;right:auto;width:40%;bottom:12px}.car-caption .small-caps{display:none}.car-caption b{font-size:16px}.menu-bottom{left:auto;right:25px;width:41%;bottom:10px}.menu-bottom>.art-button{height:73px;font-size:26px}.level-caption{margin-bottom:6px}.level-caption>span{font-size:12px}.level-caption small{font-size:10px}.menu-sub{margin-top:6px;font-size:10px}.all-games{min-height:38px;margin-top:3px}.free-repair{display:none}.play-top{top:9px}.run-status{top:65px;left:22%;right:22%}.challenge small{display:none}.challenge>span{font-size:10px}.challenge>b{font-size:21px}.icon-button{height:40px;width:42px}.driving-hud{bottom:9px;left:18px;right:18px}.speedometer{position:absolute;bottom:4px;left:calc(50% - 77px);margin:0}.speedometer strong{font-size:45px}.gas-pedal{width:95px;height:91px}.boost-pedal{width:118px;height:79px}.desktop-hint{display:none}.drive-hint{top:35%}.drive-hint b{font-size:17px}.drive-hint span{font-size:11px}.bullet-label{top:60px}.shift-note{top:30%;font-size:16px}.result-heading{left:2%;right:51%;top:13%}.result-heading h1{font-size:37px}.result-heading p{font-size:11px}.result-bottom{left:auto;right:16px;width:44%;bottom:7px}.result-panel{padding:15px 22px 12px;margin-bottom:3px}.result-score>span{font-size:8px}.result-score strong{font-size:28px}.result-score small{font-size:8px;margin:2px 0 6px}.result-details{padding-top:6px}.result-details span{font-size:10px}.result-details b{font-size:12px;margin-top:3px}.result-bottom>.art-button{height:63px;font-size:20px}.result-actions{margin-top:0}.result-actions button{font-size:10px;min-height:36px}.pause-panel{width:420px;padding:23px 30px 18px}.pause-panel h2{font-size:29px;margin:6px 0}.pause-panel .art-button{height:53px;font-size:16px;margin-top:4px}.pause-panel .small-caps{font-size:8px}.pause-foot{margin-top:4px}.pause-foot button{min-height:34px}.loading-tag{bottom:14px}#scr-loading img{width:200px}.load-bar{margin-top:12px}}
@media(prefers-reduced-motion:reduce){.brand{transform:none}.boost-pedal.ready{animation:none}}
.car-caption{bottom:247px}
@media(max-height:660px) and (max-aspect-ratio:1/1){.car-caption{bottom:228px}}
@media(max-height:560px) and (max-aspect-ratio:1/1){.car-caption{bottom:228px}.car-caption .small-caps{display:none}.car-caption b{font-size:16px}.brand p{font-size:8px}}
@media(max-height:440px) and (min-aspect-ratio:1/1){.car-caption{bottom:12px}}
@media(max-height:440px) and (min-aspect-ratio:1/1){.brand{width:28%;left:6%;top:8%}.brand p{font-size:7px;letter-spacing:.2px}}
@media(max-height:440px) and (min-aspect-ratio:1/1){.all-games{min-height:44px}.result-actions button,.pause-foot button{min-height:40px}}
.scene-shade{background:linear-gradient(#0d3a4626,transparent 42%,#0c2938a6)}
@media(max-height:660px) and (max-aspect-ratio:1/1){.brand{top:8%;width:62%;left:19%}}
@media(max-height:560px) and (max-aspect-ratio:1/1){.brand{width:58%;left:21%}}
@media(max-height:440px) and (min-aspect-ratio:1/1){.menu-top .edition{display:none}.menu-top{justify-content:flex-end}}
#scr-loading{background:#08485a url('../img/loading-scene.webp') center/cover no-repeat;justify-content:flex-start}
#scr-loading>img{width:min(78%,330px);max-height:31%;object-fit:contain;margin-top:4%;filter:drop-shadow(0 5px 2px #08374599)}
#scr-loading .load-body{position:absolute;bottom:max(6%,env(safe-area-inset-bottom));width:min(84%,350px);text-align:center;font-family:Rally,Arial,sans-serif;text-shadow:0 2px 3px #072c3c}
.load-head{display:flex;align-items:end;justify-content:space-between;padding:0 9px 4px;color:#dffcff;font-size:12px;letter-spacing:1px}.load-head b{color:#ffdf55;font-size:27px;line-height:1}
.load-digit{display:inline-block;width:21px;height:28px;background:url('../img/loading-digits.webp') 0 0/1100% 100% no-repeat;vertical-align:bottom}
#scr-loading #load-stage img{display:inline-block;width:auto;max-width:100%;height:14px;vertical-align:middle}
#scr-loading .load-caption{position:static;width:170px;max-width:65%;height:auto;filter:drop-shadow(0 2px 2px #06303a)}
#scr-loading .load-bar{position:relative;height:44px;margin:0;background:url('../img/nitro-frame.webp') center/100% 100% no-repeat;overflow:visible;border-radius:0}
.load-track{position:absolute;left:6%;right:6%;top:29%;bottom:30%;overflow:hidden;transform:skew(-12deg)}
#load-fill{height:100%;background:#18d9ef url('../img/nitro-fill.webp') center/100% 100% no-repeat;transform:scaleX(0);transform-origin:left;transition:transform .2s}
#scr-loading #load-stage{font:12px Rally,Arial,sans-serif;color:#efffff;letter-spacing:.4px;margin:8px 0 10px;min-height:16px}
#scr-loading .loading-tag{position:static;width:min(96%,315px);height:auto;max-width:none;filter:drop-shadow(0 2px 2px #06303a)}
@media(max-height:440px) and (min-aspect-ratio:1/1){#scr-loading{background-position:center 56%}#scr-loading>img{position:absolute;left:5%;top:4%;width:30%;max-height:52%;margin:0}#scr-loading .load-body{left:auto;right:5%;bottom:8%;width:43%}#scr-loading .load-bar{height:36px}.load-head b{font-size:21px}#scr-loading #load-stage{margin:4px 0;font-size:10px}#scr-loading .loading-tag{width:90%}}
.brand img{filter:drop-shadow(0 4px 0 #e68022) drop-shadow(0 7px 0 #123d4c55)}
.play-button{filter:drop-shadow(0 4px 7px #f49b3280)}
.level-caption svg,.challenge>b{color:#ffe454}
@media(max-height:560px) and (max-aspect-ratio:1/1){.result-heading{top:2%}.result-heading h1{font-size:32px}.result-heading p{font-size:11px}}

/* Natural-light trial: preserve the approved controls and layout. */
.scene-shade{background:linear-gradient(#17232b33,transparent 42%,#10191f44)}
.car-caption b{font-size:18px}.brand{filter:saturate(.75)}
/* Embossed launch button. */
.menu-bottom>.launch-card{display:grid;grid-template-columns:46px minmax(0,1fr) 32px;align-items:center;column-gap:10px;width:100%;height:auto;min-height:78px;padding:13px 23px;letter-spacing:0;text-align:left;white-space:normal;border:0;border-radius:12px;box-shadow:0 5px 0 #061b2766,0 9px 20px #061b2740;background-size:100% 100%;isolation:isolate;overflow:visible;line-height:1.15;transition:transform .12s,filter .12s}.menu-bottom>.launch-card::after{content:'';position:absolute;inset:7px 10px;pointer-events:none;border:1px solid #fff5d32e;border-radius:9px}.launch-emblem{display:flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:12px;background:#392f1217;border:1px solid #5b4d213d;box-shadow:inset 0 1px 0 #fff9d66b,0 2px 3px #53371320}.launch-emblem svg{width:27px;height:27px}.launch-copy{display:block;min-width:0}.launch-copy b{display:block;font-size:24px;font-weight:normal;overflow-wrap:anywhere}.launch-copy small{display:block;font:11px/1.35 Arial,sans-serif;letter-spacing:0;margin-top:5px;color:#344a3d;text-shadow:none}.launch-arrow{font:38px/1 Arial,sans-serif;text-align:center;opacity:.65}.menu-bottom>.launch-card:active{transform:translateY(2px);filter:brightness(1.06)}
@media(max-height:660px) and (max-aspect-ratio:1/1){.menu-bottom>.launch-card{min-height:68px;padding:10px 21px;column-gap:8px}.launch-copy b{font-size:22px}}
@media(max-height:560px) and (max-aspect-ratio:1/1){.menu-bottom>.launch-card{min-height:62px;padding:8px 19px;grid-template-columns:38px minmax(0,1fr) 24px;column-gap:8px}.launch-emblem{width:36px;height:36px;border-radius:9px}.launch-copy b{font-size:21px}.launch-copy small{font-size:10px;margin-top:3px}}
@media(max-height:440px) and (min-aspect-ratio:1/1){.menu-bottom>.launch-card{min-height:59px;padding:8px 17px;grid-template-columns:32px minmax(0,1fr) 20px;column-gap:7px}.launch-emblem{width:32px;height:32px;border-radius:8px}.launch-emblem svg{width:23px;height:23px}.launch-copy b{font-size:20px}.launch-copy small{font-size:9px;margin-top:3px}}

/* The pedal keeps pointer capture while the finger leaves its bounds. */
#gas-pedal{touch-action:none;transform:translateX(var(--steer-x,0px));will-change:transform}#gas-pedal:not(.held){transition:transform .18s ease-out}.pedals{touch-action:none}#gas-pedal b{white-space:nowrap}

#gas-pedal{margin-right:clamp(24px,8vw,40px);flex-shrink:0}
.wallet{position:absolute;top:max(65px,calc(env(safe-area-inset-top) + 52px));right:20px;z-index:7;display:flex;align-items:center;gap:7px;padding:8px 13px;border:1px solid #e8c57577;border-radius:20px;background:#102b35dc;font-size:14px;pointer-events:none}.wallet i{font-style:normal;color:#ffd24d;font-size:22px}.wallet.invisible{display:none}.garage-link{display:block;min-height:38px;width:100%;font-size:12px;color:#ffdf86;letter-spacing:.5px}.garage-drive{display:block;min-height:46px;width:100%;font-size:14px;color:#ffe2a2}.engine-panel{position:relative;width:min(94%,430px);max-height:94%;overflow:auto;padding:18px 22px;border-radius:22px;background:linear-gradient(145deg,#213b43,#0b202b);border:1px solid #97b6b655;box-shadow:0 15px 60px #0008;pointer-events:auto}.garage-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.engine-panel h2{font-size:25px;letter-spacing:1px;margin:8px 0}.engine-panel p{font-family:Arial,sans-serif;font-size:13px;line-height:1.45;color:#d2e1de;margin:8px 0}.engine-art{width:min(100%,260px);aspect-ratio:1;margin:0 auto;background-image:url('../img/engine-stages.webp');background-size:300% 200%;border-radius:18px}.engine-title{display:flex;align-items:center;justify-content:space-between;gap:8px}.engine-title b{font-size:19px;color:#ffe0a1}.engine-title>span{font-size:10px;color:#b5cece;white-space:nowrap}.engine-stats{display:flex;justify-content:space-between;padding:12px 0;border-bottom:1px solid #aec2c333}.engine-stats span{font:11px Arial;color:#adc6c6}.engine-stats b{display:block;font:15px Rally,Arial;color:#fff7e5;margin-top:4px}.engine-stages{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:4px;margin-top:12px}.engine-step{position:relative;border:1px solid #5e7b8255;border-radius:8px;overflow:hidden;min-height:45px;opacity:.65}.engine-step.selected{border-color:#ffd35d;opacity:1;box-shadow:0 0 12px #ffcc4422}.engine-step.installed{opacity:1}.mini-engine{display:block;aspect-ratio:1;background-image:url('../img/engine-stages.webp');background-size:300% 200%}.engine-step b{position:absolute;bottom:0;right:3px;font-size:10px;color:#ffe099}.engine-panel .art-button{height:auto;min-height:66px;font-size:17px;line-height:1.2;padding:15px 22px;white-space:normal}.engine-panel .art-button:disabled{filter:grayscale(.8);opacity:.65}#garage-overlay,#complete-overlay{z-index:15;background:#071c27bb;backdrop-filter:blur(6px)}.result-details{gap:8px}.result-details span{font-size:11px}.result-details b{font-size:17px}.result-heading p{max-width:330px;margin-left:auto;margin-right:auto;line-height:1.4}#result-main{font-size:20px;line-height:1.15;padding:12px 26px;white-space:normal}.completion{text-align:center;padding:32px 24px}.completion-medal{display:block;font-size:78px;color:#ffd45e;text-shadow:0 3px 0 #a67b1a,0 0 45px #e8ac5066}.completion .small-caps{display:block;margin-top:15px}.completion h2{font-size:29px}.completion p{margin:18px 0}#coin-flight{position:absolute;inset:0;pointer-events:none;z-index:12;overflow:hidden}#coin-flight i{position:absolute;left:50%;top:55%;color:#ffcf48;font-style:normal;font-size:26px;text-shadow:0 2px 0 #a86a15;animation:coin-up 1.4s var(--delay) both cubic-bezier(.2,.6,.5,1)}#coin-flight>b{position:absolute;left:0;right:0;text-align:center;top:40%;color:#ffde76;font-size:35px;text-shadow:0 3px 6px #10232e;animation:reward-up 2.3s both}@keyframes coin-up{0%{opacity:0;transform:translate(0,0) scale(.5)}15%{opacity:1}45%{transform:translate(var(--dx),-90px) scale(1)}100%{opacity:0;transform:translate(120px,-330px) scale(.3)}}@keyframes reward-up{0%{opacity:0;transform:translateY(15px) scale(.8)}20%,70%{opacity:1;transform:translateY(0) scale(1)}100%{opacity:0;transform:translateY(-60px)}}.installed-flash{animation:install .65s ease-out}@keyframes install{0%{filter:brightness(2);transform:scale(.92)}100%{filter:brightness(1);transform:scale(1)}}@media(max-height:700px){.engine-art{width:190px}.engine-panel{padding:12px 18px}.engine-panel h2{font-size:22px}.engine-panel p{font-size:12px}.engine-stats{padding:8px 0}.engine-stages{margin-top:8px}.car-caption{bottom:280px}}@media(max-height:440px) and (min-aspect-ratio:1/1){.engine-panel{width:min(96%,650px)}.engine-art{float:left;width:190px;margin-right:18px}.engine-stages{clear:both}.engine-panel .art-button{min-height:52px}.wallet{top:9px;right:80px}.car-caption{bottom:12px}}
[hidden]{display:none!important}.shop-tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:4px;margin:12px 0}.shop-tabs button{min-height:42px;padding:6px 3px;border:1px solid #718b8c55;border-radius:9px;font:12px Arial;color:#b6cece}.shop-tabs button.active{color:#ffe2a1;background:#b5882633;border-color:#dbb253}.engine-art,.engine-step{position:relative}.unowned{filter:grayscale(1)}.covered:after{content:'🔒';position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#6d757c;font-size:24px;border-radius:30% 35% 12% 12%;background:linear-gradient(102deg,transparent 0%,#b8bec5 2%,#f7f8fa 14%,#c2c6cd 19%,#fff 33%,#ced3db 37%,#f6f6f8 52%,#aeb5bf 59%,#fff 72%,#bec6cf 79%,#eee 96%);box-shadow:inset 0 -14px 20px #626b7644;z-index:2}.engine-step.covered:after{border-radius:12px;font-size:15px}.engine-art.covered{background-image:none}.shop-warning{margin:10px 0;padding:10px 12px;border:1px solid #c35d55;background:#702f3477;color:#ffd9d5;border-radius:9px;font:12px/1.4 Arial;min-height:38px}.shop-warning:empty{display:none}.shop-warning.affordable{border-color:#6caa85;background:#245c3d66;color:#d4ffe5}.wheels-art,.armor-art{background-image:none;display:flex;align-items:center;justify-content:center;font-size:170px;color:#abc1c9;text-shadow:0 5px 0 #17212c,0 0 5px #fff}.wheels-art{background:radial-gradient(ellipse,#79939c55,transparent 65%);color:#2a3038;-webkit-text-stroke:5px #aab3b9}.armor-art{color:#a5b6be;-webkit-text-stroke:4px #566e78}.mini-engine{display:flex;align-items:center;justify-content:center;font-size:35px}.car-preview{width:min(100%,280px);aspect-ratio:1;background-image:url('../img/vehicle-catalog.webp');background-size:300% 200%;margin:auto;border-radius:16px}.car-list{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.car-card{border:1px solid #82989e55;border-radius:9px;overflow:hidden;padding:3px;min-width:0}.car-card.selected{border-color:#ffd575}.car-card b{font:9px Arial;display:block;padding:5px 0;color:#d3dddd}.car-thumb{display:block;width:100%;aspect-ratio:1;background-image:url('../img/vehicle-catalog.webp');background-size:300% 200%}#car-name{color:#ffe0a1;margin:10px 0}.engine-panel{scrollbar-width:thin}
/* Illustrated garage: text labels are image assets, numbers stay readable. */
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.menu-shop-buttons{display:flex;justify-content:center;gap:4px}.draw-button{display:block;position:relative;border:0;background-color:transparent!important;background-position:center!important;background-size:contain!important;background-repeat:no-repeat!important;box-shadow:none!important;color:transparent;font-size:0!important;padding:0!important;min-width:0;touch-action:manipulation}.draw-button:active{filter:brightness(1.3);transform:scale(.97)}.draw-workshop{background-image:url('../img/shop/workshop.webp')!important}.draw-cars{background-image:url('../img/shop/cars.webp')!important}.draw-engine{background-image:url('../img/shop/engine.webp')!important}.draw-wheels{background-image:url('../img/shop/wheels.webp')!important}.draw-armor{background-image:url('../img/shop/armor.webp')!important}.draw-upgrade{background-image:url('../img/shop/upgrade.webp')!important}.draw-drive{background-image:url('../img/shop/drive.webp')!important}.draw-back{background-image:url('../img/shop/labels-14.webp')!important}.menu-shop-buttons .draw-button{width:min(48%,180px);height:54px}#result-garage{width:180px;height:50px;margin:0 auto}#result-main[data-act="garage"]{background:url('../img/shop/workshop.webp') center/contain no-repeat!important;font-size:0!important}
#garage-overlay .engine-panel{width:min(96%,430px);height:min(96dvh,760px);max-height:96dvh;overflow:hidden;display:flex;flex-direction:column;padding:10px 14px;background:linear-gradient(#0a202be8,#102f35f2),url('../img/shop/plaque.webp') center/cover;border:3px solid #a47d39;box-shadow:inset 0 0 0 3px #382f22,0 20px 65px #000c}
.garage-heading{height:42px;flex:none}.garage-heading .shop-title{height:36px;width:auto;max-width:75%;object-fit:contain}.garage-heading .icon-button{font-size:24px!important}.shop-tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:2px;margin:2px 0;flex:none}.shop-tabs .draw-button{height:53px;border:0;border-radius:0;filter:brightness(.65);background-color:transparent}.shop-tabs .draw-button.active{filter:brightness(1.2) drop-shadow(0 0 6px #ffc552)}.draw-back{height:40px;width:120px;flex:none}
#parts-shop,#cars-shop{min-height:0;flex:1;display:flex;flex-direction:column;align-items:center;justify-content:space-evenly;width:100%}#parts-shop[hidden],#cars-shop[hidden]{display:none!important}#engine-note,#engine-detail,#car-description{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
#garage-overlay .engine-art,#garage-overlay .car-preview{width:auto;height:min(28dvh,220px);max-height:36%;aspect-ratio:1;flex:none;margin:0 auto;border:2px solid #ad853f;border-radius:16px;box-shadow:0 0 25px #0007;background-color:#020a1b}.wheels-art,.armor-art{background-image:url('../img/shop-parts.webp')!important;background-size:300% 200%!important;-webkit-text-stroke:0}.engine-title{width:100%;justify-content:center;flex:none;height:37px}.engine-title img,.car-name-image{max-width:100%;width:min(100%,300px);height:36px;object-fit:contain}.car-name-image{height:34px;flex:none}.engine-stats{display:flex;width:100%;padding:3px 0;border:0;justify-content:space-evenly;flex:none}.engine-stats span{font-size:0;display:flex;flex-direction:column;align-items:center;min-width:25%}.engine-stats span:before{content:'';width:90px;max-width:100%;height:17px;background:center/contain no-repeat url('../img/shop/labels-9.webp')}.engine-stats span:nth-child(2):before{background-image:url('../img/shop/labels-10.webp')}.engine-stats span:nth-child(3):before{background-image:url('../img/shop/labels-11.webp')}.engine-stats[data-tab="wheels"] span:first-child:before{background-image:url('../img/shop/labels-12.webp')}.engine-stats[data-tab="armor"] span:first-child:before{background-image:url('../img/shop/labels-13.webp')}.engine-stats[data-tab="wheels"] span:nth-child(2):before,.engine-stats[data-tab="armor"] span:nth-child(2):before{background-image:url('../img/shop/labels-11.webp')}.engine-stats b{font:16px Rally,Arial;color:#fff2c5;margin:0;white-space:nowrap}
.engine-stages{width:100%;gap:4px;margin:4px 0;flex:none}.engine-step{background:#061e2c}.engine-step b{font-size:11px}.engine-step.selected{border:2px solid #ffd45d}.engine-panel .draw-upgrade{width:70%;height:min(11dvh,76px);min-height:42px;flex:none}.draw-upgrade:disabled{filter:grayscale(.85) brightness(.72)}.draw-upgrade.owned{background-image:url('../img/shop/labels-2.webp')!important}.draw-upgrade.covered-button{background-image:url('../img/shop/labels-3.webp')!important}.draw-upgrade span{position:absolute;bottom:0;right:0;border-radius:10px;padding:2px 7px;background:#0d2d38;color:#ffe494;font:14px Rally,Arial;white-space:nowrap}
#garage-overlay .draw-drive{width:65%;height:min(9dvh,60px);min-height:42px;align-self:center;flex:none}.shop-warning{position:relative;width:85%;height:min(8dvh,52px);min-height:28px;padding:0;margin:0;background:center/contain no-repeat url('../img/shop/warning.webp');border:0;font-size:0!important;flex:none}.shop-warning[data-kind="none"]{visibility:hidden}.shop-warning[data-kind="available"]{background-image:url('../img/shop/labels-5.webp')}.shop-warning[data-kind="trial"]{background-image:url('../img/shop/labels-4.webp')}.shop-warning[data-kind="locked"]{background-image:url('../img/shop/labels-3.webp')}.shop-warning[data-kind="owned"]{background-image:url('../img/shop/labels-6.webp')}.shop-warning[data-amount]:not([data-amount=""]):after{content:attr(data-amount) ' ◉';position:absolute;right:0;bottom:0;color:#fff2c2;font:14px Rally,Arial;background:#632e2c;border-radius:7px;padding:2px 6px}.car-list{display:grid;grid-template-columns:repeat(5,1fr);width:100%;gap:3px;flex:none}.car-card{min-width:0;padding:2px}.car-card b{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
@media(max-height:600px){#garage-overlay .engine-panel{height:98dvh;max-height:98dvh;padding:5px 10px}.garage-heading{height:34px}.garage-heading .shop-title{height:28px}.shop-tabs .draw-button{height:40px}.engine-title,.car-name-image{height:25px}.engine-title img{height:25px}.engine-stats span:before{height:13px}.engine-stats b{font-size:13px}.engine-stages{margin:0}.engine-step{min-height:28px}.engine-panel .draw-upgrade{min-height:35px}.shop-warning{min-height:22px}#garage-overlay .draw-drive{min-height:32px}}
@media(max-height:440px) and (min-aspect-ratio:1/1){#garage-overlay .engine-panel{display:block;overflow:auto;height:96dvh;width:min(94%,620px)}#parts-shop,#cars-shop{display:block;min-height:250px}#garage-overlay .engine-art,#garage-overlay .car-preview{height:165px;float:left;margin:0 12px 0 0}.engine-stages,.car-list{clear:both}.shop-tabs{margin:0}.garage-heading{height:30px}#garage-overlay .draw-drive{margin:0 auto}.shop-warning{margin:auto}.draw-back{display:block}}
#garage-overlay .shop-warning.affordable{background:center/contain no-repeat url('../img/shop/labels-5.webp');border:0}.shop-wallet{order:2;color:#ffd26a;font:15px Rally,Arial;margin-left:auto;margin-right:8px;white-space:nowrap}.garage-heading .icon-button{order:3;flex-shrink:0}.garage-heading .shop-title{order:1;max-width:58%}
/* Clear three-way menu and a single coin identity. */
.menu-shop-buttons{gap:8px;margin-top:4px}.menu-shop-buttons .draw-button{width:49%;max-width:none;height:58px}.draw-workshop{background-image:url('../img/shop/improve-clean.webp')!important}.draw-cars{background-image:url('../img/shop/transport-clean.webp')!important}.clean-play{background:url('../img/shop/play-clean.webp') center/contain no-repeat!important;box-shadow:none!important;border:0!important;min-height:76px!important;height:76px!important}.clean-play>*{visibility:hidden}.coin-icon{display:inline-block!important;width:30px;height:30px;background:url('../img/shop/coin.webp') center/contain no-repeat;border-radius:50%;font-size:0!important;flex:none}.wallet{top:max(64px,calc(env(safe-area-inset-top) + 50px));padding:5px 12px 5px 5px;background:linear-gradient(#244652,#0a2633);border:2px solid #c99d4b;box-shadow:0 4px 10px #0006}.wallet b{font-size:18px;color:#ffe7a8}.shop-wallet{display:flex;align-items:center;gap:4px}.shop-wallet .coin-icon{width:25px;height:25px}.shop-warning[data-kind="soon"]{background-image:url('../img/shop/labels-7.webp')}.engine-step:disabled,.car-card:disabled{cursor:default;filter:brightness(.8)}.engine-step:disabled:active,.car-card:disabled:active{translate:0;scale:1}.draw-upgrade span:after{content:'';display:inline-block;width:20px;height:20px;background:url('../img/shop/coin.webp') center/contain;vertical-align:middle;border-radius:50%;margin-left:4px}#coin-flight i.reward-coin{width:29px;height:29px;background:url('../img/shop/coin.webp') center/contain;border-radius:50%;font-size:0;filter:drop-shadow(0 2px 3px #9c621a);animation:coin-collect 1.15s var(--delay) both cubic-bezier(.24,.65,.45,1)}@keyframes coin-collect{0%{opacity:0;transform:translate(0,0) scale(.5)}18%{opacity:1;transform:translate(var(--dx),-30px) scale(1.1)}45%{opacity:1;transform:translate(var(--dx),-90px) scale(1)}100%{opacity:0;transform:translate(var(--end-x),var(--end-y)) scale(.45)}}
@media(max-height:660px){.menu-shop-buttons .draw-button{height:45px}.clean-play{min-height:65px!important;height:65px!important}}@media(max-height:440px) and (min-aspect-ratio:1/1){.wallet{top:8px;right:75px}.menu-shop-buttons .draw-button{height:40px}.clean-play{min-height:55px!important;height:55px!important}}
/* Transparent, tightly trimmed button silhouettes. */
.clean-play{width:100%!important;max-width:none!important;aspect-ratio:3.35/1;height:auto!important;min-height:0!important;background-image:url('../img/shop/play-v3.webp')!important;background-size:100% 100%!important}.draw-workshop{background-image:url('../img/shop/improve-v3.webp')!important}.draw-cars{background-image:url('../img/shop/change-v3.webp')!important}.draw-owned{background-image:url('../img/shop/owned-v3.webp')!important}.draw-buycars{background-image:url('../img/shop/buy-v3.webp')!important}.draw-back{background-image:url('../img/shop/back-v3.webp')!important}.draw-engine{background-image:url('../img/shop/engine-v3.webp')!important}.draw-wheels{background-image:url('../img/shop/wheels-v3.webp')!important}.draw-armor{background-image:url('../img/shop/armor-v3.webp')!important}.draw-upgrade{background-image:url('../img/shop/upgrade-v3.webp')!important}.draw-drive{background-image:url('../img/shop/drive-v3.webp')!important}.shop-warning[data-kind="money"]{background-image:url('../img/shop/warning-v3.webp')!important}#result-main[data-act="garage"]{background-image:url('../img/shop/improve-v3.webp')!important}.menu-shop-buttons{width:100%;gap:7px}.menu-shop-buttons .draw-button{height:auto!important;aspect-ratio:3.3/1;min-height:42px;background-size:100% 100%!important}.vehicle-tabs{display:grid;grid-template-columns:1fr 1fr;gap:7px;width:100%;flex:none;margin:5px 0}.vehicle-tabs .draw-button{width:100%;height:auto;aspect-ratio:3.3/1;min-height:40px;filter:brightness(.6)}.vehicle-tabs .draw-button.active{filter:brightness(1.15) drop-shadow(0 0 5px #ffcf6b)}#cars-shop .car-list{grid-template-columns:repeat(4,minmax(0,1fr))}#cars-shop .car-list:has(.car-card:only-child){grid-template-columns:100px;justify-content:center}.draw-back{min-height:35px;width:105px}.shop-tabs .draw-button{height:auto;min-height:40px;aspect-ratio:3.3/1}.car-caption{bottom:325px}@media(max-height:660px){.car-caption{bottom:280px}}@media(max-height:440px) and (min-aspect-ratio:1/1){.car-caption{bottom:12px}}
#shop-warning[data-kind="money"]{display:none!important}#shop-alert{position:absolute;left:8%;right:8%;bottom:18%;height:90px;z-index:40;pointer-events:none;background:url('../img/shop/warning-v3.webp') center/contain no-repeat;opacity:0;transform:translateY(15px);transition:opacity .2s,transform .2s;visibility:hidden}#shop-alert.show{visibility:visible;opacity:1;transform:translateY(0)}#shop-alert-amount{position:absolute;right:6%;bottom:1%;font:16px Rally,Arial;color:#ffe8aa;border:1px solid #d59c46;border-radius:9px;background:#732d26;padding:3px 9px}#shop-alert-amount:after{content:'';display:inline-block;width:20px;height:20px;vertical-align:middle;margin-left:4px;background:url('../img/shop/coin.webp') center/contain;border-radius:50%}
#garage-overlay #shop-warning[data-kind="money"]{display:block!important;visibility:hidden}
/* Coins share the top row; objective bar keeps its original position. */
.wallet{top:max(12px,env(safe-area-inset-top));right:76px;max-width:110px;padding:3px 8px 3px 3px}.wallet .coin-icon{width:23px;height:23px}.wallet b{font-size:15px}.challenge{max-width:calc(100% - 175px)}.challenge>span{font-size:11px}.challenge small{font-size:9px}.menu-top .edition{max-width:calc(100% - 170px);font-size:9px}
#map-entry{width:100%;height:36px;background:url('../img/shop/map.webp') center/contain no-repeat;min-height:32px}#map-overlay{z-index:18;background:#071c2be8;backdrop-filter:blur(6px)}.map-panel{width:min(94%,430px);max-height:94%;overflow:auto;background:linear-gradient(145deg,#1b3e44,#091d2b);border:2px solid #ba9552;border-radius:20px;padding:18px}.map-heading{display:flex;align-items:center;justify-content:space-between}.map-heading>img{width:80%;height:40px;object-fit:contain}.map-route{display:flex;flex-direction:column;align-items:center;padding:15px 0}.map-card{width:92%;height:145px;border:2px solid #789b9b;border-radius:16px;position:relative;overflow:hidden;display:flex;align-items:flex-end;justify-content:center;padding:8px;background:linear-gradient(transparent,#0a2634),url('../img/natural-rock.webp') center/cover}.map-card.alpine{background-color:#83b2a1;background-blend-mode:multiply}.map-card.rose{background-image:linear-gradient(#a578a033,#502a2688),url('../img/brick-rose.webp');background-color:#e3b4a5}.map-card.selected{border-color:#ffdb75;box-shadow:0 0 18px #ffd65a55}.map-card>img{width:95%;height:40px;object-fit:contain}.map-number{position:absolute;left:15px;top:12px;font:26px Rally,Arial;color:#ffde8b}.map-connector{height:36px;border-left:3px dashed #cfb476}.map-connector.faded{opacity:.4}.map-unknown{font-size:25px;color:#9eb1b6;padding:12px}.completion-map{width:100%;height:65px}.completion-map img{width:100%;height:100%;object-fit:contain}
.draw-nitro{background-image:url('../img/shop/nitro-tab.webp')!important}.shop-tabs{grid-template-columns:repeat(2,1fr)}.shop-tabs .draw-button{min-height:32px;max-height:43px}.nitro-art{background:url('../img/shop/nitro-item.webp') center/contain no-repeat!important}.victory-banner{display:block;width:100%;max-height:160px;object-fit:contain}.victory-sub{display:block;width:95%;height:80px;object-fit:contain;margin:8px auto}.completion{padding:20px}.completion p{margin:10px 0}.engine-stats[data-tab="nitro"] span:first-child:before{background-image:url('../img/shop/nitro-tab.webp')}.engine-stats[data-tab="nitro"] span:nth-child(2):before{background-image:url('../img/shop/labels-9.webp')}
/* Unlocking the map must not add a row to the menu flow. */
#map-entry{position:absolute;left:0;right:0;top:-45px;height:36px;margin:0;pointer-events:auto}#map-entry[hidden]{display:none!important}.car-caption{bottom:370px}#vehicle-action{width:70%;height:55px;min-height:40px;flex:none;margin:4px auto}#cars-shop{gap:3px}#cars-shop .car-preview{height:min(23dvh,185px)}@media(max-height:660px){.car-caption{bottom:315px}}@media(max-height:440px) and (min-aspect-ratio:1/1){#map-entry{top:-35px;height:28px}.car-caption{bottom:12px}#vehicle-action{height:42px}}
#map-entry{background-image:url('../img/shop/map-button.webp')!important;background-size:contain!important;top:-57px;height:49px;min-height:44px}#map-entry:hover{filter:brightness(1.12)}@media(max-height:440px) and (min-aspect-ratio:1/1){#map-entry{top:-40px;height:35px;min-height:32px}}

/* Third vehicle: title fits without moving the drawn controls. */
.truck-name-label{font-family:Rally,sans-serif;text-align:center;color:#ffe4a7;text-shadow:0 2px 0 #3a2015,0 0 10px #000;font-size:clamp(16px,5vw,24px);padding:5px 0;letter-spacing:.04em}.truck-name-label[hidden],.car-name-image[hidden]{display:none!important}

#cars-shop .truck-name-label{height:34px;min-height:34px;padding:0;display:flex;align-items:center;justify-content:center;flex:none} @media(max-height:600px){#cars-shop .truck-name-label{height:25px;min-height:25px;font-size:18px}}

/* Shared workshop: stable five-slot navigation and scroll only inside the dialog. */
#garage-overlay .engine-panel{overflow-y:auto;overscroll-behavior:contain;justify-content:flex-start;gap:6px}
.workshop-context{flex:none;width:100%;padding:5px 8px;background:#061b26b8;border:1px solid #d6ad6355;border-radius:10px}
.workshop-car-switch{display:grid;grid-template-columns:34px minmax(0,1fr) 34px;gap:6px;align-items:center;text-align:center}
.workshop-car-switch button{height:34px;border:1px solid #9f844b;background:linear-gradient(#375560,#132f3a);border-radius:8px;color:#ffe1a1;font:28px Rally,Arial;line-height:1}
.workshop-car-switch button:disabled{opacity:.3}.workshop-car-switch b{display:block;overflow-wrap:anywhere;color:#ffe1aa;font:13px/1.2 Rally,Arial}.workshop-car-switch span{display:block;color:#a9c5c8;font:10px Arial;margin-top:2px}
#workshop-shared{position:static;width:auto;height:auto;clip:auto;text-align:center;font:10px/1.3 Arial;margin:5px 0 0;color:#b5d1ce}
#garage-overlay .upgrade-nav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;width:100%;margin:0}
.upgrade-nav-button{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;min-height:83px;min-width:0;padding:4px 1px;background:linear-gradient(#23414a,#0a202b);border:1px solid #5d777d;border-radius:9px;overflow:hidden;filter:none}
.upgrade-nav-button.active{border:2px solid #f0c56b;background:linear-gradient(#47564c,#172f35);box-shadow:0 0 10px #d7a55233;padding:3px 0}
.upgrade-nav-icon{display:block;width:45px;height:39px;max-width:95%;background:center/contain no-repeat}
.nav-engine{background-image:url('../img/engine-stages.webp');background-size:300% 200%;background-position:0 0}.nav-wheels,.nav-armor{background-image:url('../img/shop-parts.webp');background-size:300% 200%;background-position:0 0}.nav-armor{background-position:0 100%}.nav-nitro{background-image:url('../img/shop/nitro-item.webp')}.nav-transmission{background-image:url('../img/transmission.svg')}
.upgrade-nav-name{font:10px/1.12 Rally,Arial;color:#f0e5c5;max-width:100%;overflow-wrap:anywhere;min-height:23px;display:flex;align-items:center;text-align:center}.upgrade-nav-level{font:11px/1.15 Rally,Arial;color:#d0ac64;min-height:13px}.upgrade-nav-button[data-state="locked"] .upgrade-nav-icon{filter:grayscale(1);opacity:.6}
.upgrade-nav-button[data-state="covered"] .upgrade-nav-icon{visibility:hidden}.upgrade-nav-button[data-state="covered"]:before{content:'';position:absolute;inset:3px 3px 27px;background:linear-gradient(110deg,#8899a2,#e4e9e9 18%,#93a1ad 25%,#f9f9ec 46%,#9aaab3 57%,#e6ebeb 75%,#8799a3);border-radius:28% 30% 12% 13%;box-shadow:inset 0 -8px 8px #354b5766}.upgrade-nav-button[data-state="covered"] .upgrade-nav-name{color:#81979f}
#parts-shop{justify-content:flex-start;gap:7px;flex:1 0 auto}#garage-overlay .engine-art{height:clamp(95px,20dvh,160px);max-height:none;flex:none}
#engine-stages{grid-template-columns:repeat(5,minmax(0,1fr));gap:5px;margin:0}.engine-step{min-height:46px}.engine-step .mini-engine{max-height:45px}
#garage-overlay .engine-title{height:29px;min-height:29px}#engine-name-text{font:14px/1.2 Rally,Arial;text-align:center;color:#ffe1a5}
.workshop-progress{font:12px/1.3 Rally,Arial;color:#ffdb8c;text-align:center}.workshop-effect{font:11px/1.35 Arial!important;line-height:1.35;color:#bcd2d0!important;margin:0!important;text-align:center;max-width:100%}
#garage-overlay .engine-stats{gap:6px;padding:3px 0}#garage-overlay .engine-stats span{font:10px/1.3 Arial;color:#bdd0cb;min-width:0;flex:1;text-align:center}#garage-overlay .engine-stats span:before{display:none}#garage-overlay .engine-stats b{font:12px/1.5 Rally,Arial;white-space:normal;overflow-wrap:anywhere}
.transmission-art{background:url('../img/transmission.svg') center/contain no-repeat!important}
#garage-overlay #shop-warning{height:22px;min-height:22px;width:100%;font:11px/1.3 Arial!important;color:#a9c9be;background:none!important;visibility:visible!important;text-align:center}
#garage-overlay .draw-upgrade{height:57px;min-height:44px}#garage-overlay .draw-drive{position:sticky;bottom:-1px;margin:3px auto 0;min-height:42px;background-color:#0d2830;z-index:4;box-shadow:0 -5px 12px #0d2830}
#toast{z-index:60;max-width:90%;white-space:normal;overflow-wrap:anywhere;line-height:1.4;pointer-events:none}
@media(max-height:600px){.upgrade-nav-button{min-height:71px}.upgrade-nav-icon{height:30px}.upgrade-nav-name{font-size:9px;min-height:20px}#garage-overlay .engine-art{height:100px}.workshop-effect{font-size:10px!important}.workshop-context{padding:3px 6px}#workshop-shared{font-size:9px}#garage-overlay .engine-panel{gap:4px}}
@media(max-height:440px) and (min-aspect-ratio:1/1){#garage-overlay .engine-panel{display:flex;overflow-y:auto}#parts-shop,#cars-shop{min-height:0;display:flex}#garage-overlay .engine-art,#garage-overlay .car-preview{float:none;margin:0 auto}#parts-shop[hidden],#cars-shop[hidden]{display:none!important}}

#garage-overlay .engine-panel{overflow:hidden}#parts-shop{flex:1 1 auto;min-height:0;overflow:hidden;gap:5px}.part-browser{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;display:flex;flex-direction:column;align-items:center;gap:7px;width:100%;padding:3px 2px 6px}.part-browser>*{flex:none}#cars-shop{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain}#garage-overlay .draw-drive{position:static;box-shadow:none;margin:0 auto}#garage-overlay .draw-upgrade{margin:0 auto;flex:none}#garage-overlay #shop-warning{flex:none}.upgrade-nav-button[data-state="covered"]:before{bottom:36px}

.workshop-fleet{display:block;width:100%;margin-top:4px;min-height:24px;padding:3px 7px;border:1px solid #8e794b;border-radius:6px;background:linear-gradient(#2e5159,#15343f);font:10px/1.25 Rally,Arial;color:#f8d995}.workshop-fleet:active{transform:translateY(1px)}

/* Distance-based crash result and the flight counter remain legible on phones. */
.result-details{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%}.result-details span{min-width:0;white-space:normal;overflow-wrap:anywhere}.result-details b{font-size:clamp(12px,3.6vw,17px)}#result-score{font-size:clamp(27px,9vw,46px)}.distance-line{gap:7px;align-items:center}.distance-line>span,.distance-line>b{white-space:normal;line-height:1.25;min-width:0}#bullet-label{max-width:90%;white-space:normal;text-align:center;line-height:1.35}

.workshop-range{font:10px/1.35 Arial;color:#b7d8d2;text-align:center;max-width:100%;overflow-wrap:anywhere}

/* v10: floating result type, with the crash scene visible through the layout. */
#scr-result .result-panel{background:none;border:0;box-shadow:none;backdrop-filter:none;color:#fff4d7;padding:0;max-width:390px;margin:0 auto 9px}
#scr-result .result-bottom{left:16px;right:16px;bottom:max(8px,env(safe-area-inset-bottom))}
#scr-result .result-score>span{display:inline-block;padding:3px 8px;border-radius:6px;background:#0718238f;border:1px solid #e8dca52b;font-size:9px;letter-spacing:1px;color:#fff3cd;text-shadow:0 1px 2px #000}
#scr-result #result-score{font-size:clamp(30px,9vw,40px);line-height:1.07;margin:4px 0;color:#ffe8a0;-webkit-text-stroke:3px #102431;paint-order:stroke fill;text-shadow:0 3px 0 #08131c,0 5px 8px #000b}
#scr-result #result-record{display:inline-block;max-width:100%;margin:3px 0 7px;padding:4px 7px;border-radius:7px;background:#0718239c;border:1px solid #f0d79c30;color:#fff2bd;font:10px/1.4 Rally,Arial;letter-spacing:0;white-space:normal;overflow-wrap:anywhere;text-shadow:0 1px 2px #000}
#scr-result .result-details{border:0;padding:0;gap:8px}
#scr-result .result-details span{font:10px/1.3 Arial;color:#fff4d8;text-shadow:1px 1px 2px #000,-1px -1px 2px #102431,0 2px 4px #000}
#scr-result .result-details b{display:table;max-width:100%;margin:3px auto 0;padding:3px 8px;background:#0718238f;border:1px solid #d9e4e333;border-radius:7px;color:#fff6db;font:14px/1.25 Rally,Arial;text-shadow:0 2px 2px #000;overflow-wrap:anywhere}
#scr-result .result-heading{top:max(12px,env(safe-area-inset-top));left:14px;right:14px}
#scr-result .result-heading h1{font-size:clamp(27px,8.8vw,37px);line-height:1.03;letter-spacing:0;margin:7px 0;-webkit-text-stroke:3px #102431;paint-order:stroke fill;text-shadow:0 3px 0 #08131c,0 5px 8px #0009}
#scr-result .result-heading .edition{padding:3px 8px;border:1px solid #dbe1ce33;border-radius:6px;background:#07182380;color:#fff0c6;font:9px/1.35 Rally,Arial;text-shadow:0 1px 3px #000}
#scr-result .result-heading p{display:table;margin:5px auto 0;padding:4px 8px;max-width:min(100%,330px);border-radius:7px;background:#0718237d;border:1px solid #f1e7cc24;color:#fff5dc;font:12px/1.4 Arial;text-shadow:0 1px 3px #000}
#scr-result .result-choices{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);align-items:center;gap:7px;width:100%}
#scr-result .result-choices:has(#result-main[hidden]){grid-template-columns:1fr}
#scr-result .result-choices #result-main{width:100%;height:60px;min-height:48px;font-size:15px;line-height:1.15;padding:7px 13px;letter-spacing:0}
#scr-result .result-choices #result-garage{width:100%;height:51px;margin:0}
#scr-result .result-actions{gap:8px;margin-top:2px}
#scr-result .result-actions button{flex:1;min-height:38px;padding:2px 5px;border-radius:7px;color:#fff2d2;background:#0718236b;border:1px solid #dce6db2b;text-shadow:0 1px 3px #000;font-size:10px}
@media(max-height:560px) and (max-aspect-ratio:1/1){#scr-result .result-heading{top:8px}#scr-result .result-heading h1{font-size:27px;margin:5px 0}#scr-result .result-heading p{font-size:11px;padding:3px 6px}#scr-result .result-bottom{left:12px;right:12px;bottom:5px}#scr-result #result-score{font-size:29px}#scr-result #result-record{font-size:9px;margin-bottom:5px}#scr-result .result-panel{margin-bottom:5px}#scr-result .result-details b{font-size:12px}#scr-result .result-choices #result-main{height:52px;min-height:44px;font-size:14px}#scr-result .result-choices #result-garage{height:44px}#scr-result .result-actions button{min-height:34px}}
@media(max-height:440px) and (min-aspect-ratio:1/1){#scr-result .result-heading{left:12px;right:auto;width:43%;top:20px}#scr-result .result-heading h1{font-size:29px}#scr-result .result-heading p{font-size:11px}#scr-result .result-bottom{left:auto;right:12px;width:47%;bottom:5px}#scr-result #result-score{font-size:29px}#scr-result #result-record{font-size:8px;margin-bottom:4px}#scr-result .result-score>span{font-size:8px}#scr-result .result-details b{font-size:12px;padding:2px 5px}#scr-result .result-choices #result-main{height:48px;min-height:40px;font-size:13px}#scr-result .result-choices #result-garage{height:42px}#scr-result .result-actions button{min-height:32px;font-size:9px}}

#app:has(#scr-result.active)>.wallet{top:max(6px,env(safe-area-inset-top));right:12px;padding:4px 8px;border-radius:10px;font-size:11px;gap:4px}#app:has(#scr-result.active)>.wallet i{font-size:17px}

/* Owned cars equip immediately; preview and purchases remain separate. */
#cars-shop .car-card{position:relative}#cars-shop .car-card[data-owned="true"][aria-pressed="true"]:after{content:'✓';position:absolute;top:3px;right:3px;width:20px;height:20px;border-radius:50%;background:#e6b94d;border:1px solid #fff0a8;color:#153537;font:14px/18px Rally,Arial;text-align:center;box-shadow:0 2px 4px #0008}#cars-shop .car-card b{position:static;display:block;width:auto;height:auto;clip:auto;overflow-wrap:anywhere;font:8px/1.25 Rally,Arial;min-height:16px;padding:3px 1px;color:#e4e4cb;text-align:center}#cars-shop .car-card[aria-pressed="true"] b{color:#ffe19b}#car-selection-status{position:static;width:100%;height:auto;clip:auto;flex:none;margin:2px 0 4px;font:12px/1.35 Rally,Arial;color:#ffe0a0;text-align:center;overflow-wrap:anywhere;text-shadow:0 2px 3px #000}

#cars-shop .car-list{grid-template-columns:repeat(5,minmax(0,1fr))}

/* v13: next/retry share the upper row; workshop stays below. */
#scr-result .result-choices{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
#scr-result .result-choices .art-button{width:100%;height:56px;min-height:44px;font-size:15px;line-height:1.15;padding:7px 12px;letter-spacing:0}
#scr-result .result-choices #result-main{height:56px;min-height:44px}
#scr-result .result-choices [hidden]{display:none!important}
#scr-result #result-garage{display:block;width:100%;height:54px;min-height:44px;margin:5px 0 0}
@media(max-height:560px){#scr-result .result-choices .art-button,#scr-result .result-choices #result-main{height:48px;min-height:44px;font-size:14px}#scr-result #result-garage{height:48px;margin-top:3px}}
/* v14: single-layer material inspection. */
.lab-map-note{font:12px/1.5 Arial,sans-serif;color:#d9d9bc;margin:10px 0 0;text-align:center}.map-panel{overscroll-behavior:contain}.track-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;align-items:stretch;padding:14px 0 0}.track-card{position:relative;min-height:156px;padding:12px 8px 10px;border:1px solid #6f807c;border-radius:12px;background:linear-gradient(145deg,#284348,#112630);color:#fff0d0;text-align:center;display:flex;align-items:center;flex-direction:column;gap:7px;min-width:0}.track-card.selected{border:2px solid #ffd16a;box-shadow:0 0 12px #ffce5330}.track-card b{font:12px/1.3 Rally,Arial,sans-serif;overflow-wrap:anywhere}.track-card small{font:11px/1.3 Arial,sans-serif;color:#c9d4cf}.track-number{position:absolute;left:9px;top:8px;color:#ffd16a;font-size:14px}.track-icon{width:80px;height:58px;display:block;margin:12px 0 0;background:var(--track-color);border-radius:4px;box-shadow:5px 5px 0 #0004;flex:none}.track-brick,.track-rose,.track-silicate{background:linear-gradient(90deg,transparent 94%,#e6dcc7 94%),linear-gradient(transparent 89%,#e6dcc7 89%),var(--track-color);background-size:27px 19px}.track-wood{background:repeating-linear-gradient(0deg,#77522e 0 2px,transparent 2px 12px),#c59356;border:5px solid #936438}.track-tire{width:58px;border:15px solid #293238;border-radius:50%;background:transparent;box-shadow:4px 5px 0 #0005,inset 0 0 0 2px #526065}.track-block{background:linear-gradient(90deg,transparent 10%,#26383c 10% 43%,transparent 43% 57%,#26383c 57% 90%,transparent 90%),#9ba8a8;border-top:9px solid #9ba8a8;border-bottom:9px solid #9ba8a8}.track-concrete{background:url('../img/natural-rock.webp') center/cover;filter:saturate(.2)}.track-steel{background:repeating-linear-gradient(90deg,#467b8c 0 7px,#79a2ac 7px 10px,#315769 10px 14px)}.track-stone{background:url('../img/natural-rock.webp') center/cover;clip-path:polygon(12% 4%,80% 0,100% 28%,92% 88%,26% 100%,0 60%)}.track-glass{background:linear-gradient(135deg,#c6ffff99,#5f9eacbb 45%,#dbffffaa 49%,#83cbd8aa 55%);border:5px solid #a6d9df;box-shadow:3px 4px 0 #366d7c}
.inspect-head{position:absolute;top:max(22px,env(safe-area-inset-top));left:16px;right:16px;text-align:center;text-shadow:0 2px 5px #062535,0 0 12px #062535;background:linear-gradient(#102e3cbb,#102e3c00);padding:15px 8px 30px}.inspect-head>span{font:10px Rally,Arial;letter-spacing:2px;color:#ffe29e}.inspect-head h2{font-size:clamp(17px,4.5vw,24px);line-height:1.3;margin:9px 0}.inspect-head p{font:14px/1.4 Arial,sans-serif;margin:0;color:#fff4d8}.inspect-bottom{position:absolute;bottom:max(14px,env(safe-area-inset-bottom));left:18px;right:18px;display:flex;flex-direction:column;gap:6px}.inspect-arrows{display:grid;grid-template-columns:52px 1fr 52px;gap:6px}.inspect-arrows .art-button{height:48px;min-height:48px;font-size:15px;background:linear-gradient(#365c64,#183a45);border:1px solid #a8aa86;border-radius:10px;color:#fff0ca;text-shadow:none}.inspect-arrows .art-button:first-child,.inspect-arrows .art-button:last-child{font-size:26px}.inspect-bottom>.gold{height:68px;font-size:23px}.inspect-home{min-height:40px;color:#fff4d0;font:13px Arial,sans-serif;text-shadow:0 2px 4px #102c37}.edition{font-size:10px}@media(max-height:560px){.track-card{min-height:138px}.inspect-head{top:8px;padding-top:6px}.inspect-bottom>.gold{height:55px}.inspect-bottom{bottom:5px;gap:3px}}
.track-barrel{width:53px;height:65px;border:3px solid #8f9a94;border-radius:9px;background:linear-gradient(transparent 24%,#778c8e 24% 29%,transparent 29% 71%,#778c8e 71% 76%,transparent 76%),linear-gradient(90deg,#a03929,#d56137 45%,#903725);position:relative}.track-barrel:after{content:'!';position:absolute;left:15px;top:22px;background:#f1d69b;color:#743b25;width:20px;height:23px;font:bold 20px Arial;border-radius:2px}.lab-map-note{font-size:11px}.track-card b{font-size:11px}

.inspect-test-row{display:grid;grid-template-columns:1fr 1.2fr;gap:7px}.inspect-test-row .art-button{height:65px;min-height:52px;font-size:clamp(12px,3.4vw,17px);letter-spacing:0}.inspect-test-row .teal{color:#fff2d1}.inspect-test-row button{padding:0 10px;line-height:1.2}@media(max-height:560px){.inspect-test-row .art-button{height:53px}}

.inspect-test-row{grid-template-columns:1fr}.track-card:disabled{cursor:default}.challenge>span{max-width:205px}.challenge small{white-space:normal;line-height:1.3}
