/* Vazirmatn is served through the platform's same-origin font proxy. */
:root{--ink:#254f46;--deep:#286958;--cream:#fffae9;--yellow:#ffdc69;--coral:#ec8269;--mint:#80bda2;--muted:#759080;--line:#e6e5cb;--shadow:0 5px 0 rgba(43,79,63,.17)}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}html,body{width:100%;height:100%;margin:0;overflow:hidden;overscroll-behavior:none;background:#a8c885}body{font-family:Vazirmatn,Tahoma,sans-serif;color:var(--ink);line-height:1.8;user-select:none;-webkit-user-select:none}button{font:inherit;color:inherit;cursor:pointer;touch-action:manipulation}button,input{outline:none}button:focus-visible{outline:3px solid #ed9e35;outline-offset:5px}button:disabled{cursor:wait}h1,h2,h3,p{margin:0}h1,h2,h3{font-weight:900}button,span,p,h1,h2,h3{overflow-wrap:anywhere;min-width:0}img{max-width:100%;pointer-events:none;object-fit:contain}svg{flex-shrink:0}.icon{width:24px;height:24px;display:inline-block;vertical-align:middle}#game-root{position:relative!important;width:100vw!important;max-width:none!important;height:100dvh;margin:0!important;isolation:isolate}#game{position:absolute;inset:0;overflow:hidden;touch-action:none}#game canvas{display:block!important;width:100%!important;height:100%!important;touch-action:none}#dpad,#dpad-action{display:none!important}.hidden,[hidden]{display:none!important}#ui-layer{position:absolute;inset:0;z-index:5;pointer-events:none}#ui-layer button,#ui-layer .interactive{pointer-events:auto}.screen{position:absolute;inset:0;display:none;overflow:hidden;pointer-events:auto}.screen.active{display:block;animation:screen-in .28s ease-out}.menu-backdrop{position:absolute;inset:0;background:#b9dca7 url('./assets/title_bg.webp') center 50%/cover no-repeat;z-index:-3}.menu-backdrop:after{content:'';position:absolute;inset:0;background:linear-gradient(180deg,rgba(232,247,216,.35),rgba(217,240,205,.04) 34%,rgba(235,245,208,.07) 51%,rgba(244,244,215,.92) 77%,#f7f2d9 100%)}.menu-shell{position:relative;max-width:440px;height:100%;margin:auto;padding:0 25px;display:flex;flex-direction:column;align-items:center}.menu-top{width:100%;height:80px;padding-top:max(18px,env(safe-area-inset-top));display:flex;align-items:flex-start;justify-content:space-between;flex-shrink:0;gap:10px}.top-actions{display:flex;gap:9px}.icon-button{width:43px;height:43px;border-radius:15px;border:1.5px solid rgba(71,104,74,.18);background:rgba(255,252,235,.94);box-shadow:0 3px 0 rgba(63,105,70,.12);display:inline-flex;align-items:center;justify-content:center;transition:transform .15s,box-shadow .15s}.icon-button .icon{width:21px;height:21px}.icon-button:active,.round-icon:active{transform:translateY(3px);box-shadow:none}.wallet{display:flex;align-items:center;gap:7px;min-width:82px;height:42px;padding:4px 10px 4px 14px;border:1.5px solid rgba(96,123,70,.16);border-radius:15px;background:rgba(255,251,230,.96);font-weight:900;font-size:18px;box-shadow:0 3px 0 rgba(63,105,70,.12)}.wallet img{width:28px;height:28px}.wallet small{font-size:10px;font-weight:500;color:#7a8c70}.brand{position:relative;text-align:center;width:100%;z-index:2;flex-shrink:0}.eyebrow{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:700;color:#436f5c;background:rgba(255,251,226,.84);padding:2px 13px;border:1px solid rgba(92,131,94,.18);border-radius:30px}.eyebrow .icon{width:13px;height:13px}.game-title{font-size:57px;line-height:1.28;margin:8px 0 2px;text-shadow:0 3px 0 #fff6d6,0 6px 0 rgba(75,104,58,.13);color:#315b45;transform:rotate(-3deg)}.game-title .rally{display:inline-block;font-size:.66em;color:#fff9db;-webkit-text-stroke:1px #3e6652;paint-order:stroke fill;text-shadow:0 3px 0 #315d45;vertical-align:8px;margin-inline-end:7px}.game-title .haft{color:#ffeb93;-webkit-text-stroke:5px #315b45;paint-order:stroke fill;text-shadow:0 6px 0 #315b45,0 9px 0 rgba(41,74,49,.16)}.tagline{font-size:12px;font-weight:700;margin-top:10px;color:#416b50;text-shadow:0 1px 0 #f8f4d9}.hero-stage{position:relative;width:100%;flex:1;min-height:150px;max-height:310px;display:grid;place-items:center}.hero-halo{position:absolute;width:245px;height:245px;border-radius:50%;background:radial-gradient(circle,rgba(255,249,208,.87),rgba(255,249,208,0) 68%);filter:blur(1px)}.hero-emblem{position:relative;width:min(78%,275px);height:100%;max-height:285px;object-fit:contain;filter:drop-shadow(0 15px 8px rgba(44,72,35,.15));animation:hero-bob 4.2s ease-in-out infinite;z-index:1}.hero-sticker{position:absolute;inset-inline-start:0;top:64%;transform:rotate(8deg);background:#fff8df;border:1px solid #e6d6a5;padding:3px 12px 3px 8px;border-radius:12px;box-shadow:0 3px 0 #b7ba8e;z-index:2;font-size:10px;display:flex;align-items:center;gap:6px}.hero-sticker .icon{color:#de9c32;width:19px;height:19px}.hero-sticker strong{font-size:12px;display:block}.hero-sticker small{display:block;line-height:1.7;color:#84906c;font-size:9px}.sparkle{position:absolute;color:#fffcde;font-size:22px;text-shadow:0 1px 2px #87a76b;animation:twinkle 3s ease-in-out infinite}.sparkle.a{top:18%;inset-inline-start:13%}.sparkle.b{top:38%;inset-inline-end:4%;animation-delay:1s}.sparkle.c{top:80%;inset-inline-end:22%;font-size:14px;animation-delay:2s}.menu-actions{width:100%;max-width:330px;flex-shrink:0;text-align:center;z-index:3}.primary,#startBtn,#retryBtn{position:relative!important;inset:auto!important;transform:none!important;min-width:0!important;min-height:58px!important;width:100%;padding:8px 18px!important;border:2px solid #856c33!important;border-radius:19px!important;background:linear-gradient(#ffe48b,#ffd25c);box-shadow:0 6px 0 #a7853d,0 10px 14px rgba(70,85,38,.13),inset 0 2px 0 #fff3b5;color:#4c492c;font-family:inherit!important;font-size:19px!important;font-weight:900!important;display:flex;justify-content:center;align-items:center;gap:12px;transition:filter .15s,translate .15s,box-shadow .15s;line-height:1.8;z-index:auto!important}.primary:after,#startBtn:after{content:'';position:absolute;top:5px;inset-inline:13px;height:2px;background:rgba(255,255,255,.45);border-radius:10px}.primary:active,#startBtn:active,#retryBtn:active{transform:none!important;translate:0 4px;box-shadow:0 2px 0 #a7853d,0 3px 5px #41533119}.primary .icon{width:25px;height:25px}.level-preview{font-size:10px;margin-top:13px;color:#6e8365;display:flex;justify-content:center;align-items:center;gap:6px}.level-preview .dot{width:5px;height:5px;background:#78a96a;border-radius:50%}.menu-links{display:grid;grid-template-columns:1fr 1fr;gap:13px;margin-top:15px}.menu-link{display:flex;align-items:center;justify-content:center;gap:9px;height:59px;background:rgba(255,252,234,.91);border:1.5px solid #cdd7b8;border-radius:18px;box-shadow:0 4px 0 #c9d3ac;color:#4c6d55;font-size:13px;font-weight:800;transition:translate .15s}.menu-link:active{translate:0 3px;box-shadow:0 1px 0 #b8c6a5}.menu-link .icon{width:25px;height:25px}.menu-link.shop .icon{color:#d17e59}.sin-shelf{flex-shrink:0;text-align:center;width:100%;padding-top:20px;padding-bottom:8px}.shelf-title{font-size:10px;font-weight:600;display:flex;justify-content:center;align-items:center;gap:8px;color:#6c8361}.shelf-title:before,.shelf-title:after{content:'';height:1px;width:28px;background:#c9d1ae}.sin-icons{display:flex;justify-content:center;gap:4px;direction:rtl;margin-top:7px}.sin-mini{width:36px;height:36px;display:grid;place-items:center;background:none;padding:0;border:0;transition:transform .2s}.sin-mini:active{transform:scale(1.2) rotate(6deg)}.sin-mini img{width:34px;height:34px;filter:drop-shadow(0 2px 0 #556b3b20)}.save-note{font-size:9px;opacity:.68;display:flex;align-items:center;justify-content:center;gap:4px;padding:4px 0 max(12px,env(safe-area-inset-bottom));flex-shrink:0}.save-note .icon{width:12px;height:12px}.petals{position:absolute;inset:0;z-index:-1;pointer-events:none;overflow:hidden}.petal{position:absolute;width:10px;height:6px;border-radius:70% 0 70% 0;background:#ffd3c4;top:-40px;animation:petal-fall var(--duration) linear infinite;animation-delay:var(--delay);inset-inline-start:var(--x);box-shadow:inset 0 1px 0 #ffe4d4}.bunting{position:absolute;top:86px;inset-inline:-25px;height:55px;z-index:-1;opacity:.65;pointer-events:none}.bunting svg{width:100%;height:100%}
/* Shared screens */
.page-shell{position:relative;width:min(100%,460px);height:100%;margin:auto;display:flex;flex-direction:column;padding:0 22px}.page-header{height:92px;padding-top:max(22px,env(safe-area-inset-top));flex-shrink:0;display:flex;align-items:flex-start;gap:12px}.page-title{flex:1}.page-title h2{font-size:22px;line-height:1.7}.page-title p{font-size:10px;color:#7e8d71;margin-top:-2px}.page-header .wallet{min-width:67px;font-size:16px;gap:4px}.page-header .wallet img{width:25px}.map-background{position:absolute;inset:0;z-index:-2;background:#bfd5a1 url('./assets/map_bg.webp') center/cover no-repeat}.map-background:after{content:'';position:absolute;inset:0;background:linear-gradient(#f8f7dfef 0,rgba(247,245,221,.38) 25%,rgba(226,237,192,.15) 80%,#f8f3db 100%)}.map-intro{background:#fff9e7e8;padding:6px 12px;border:1px solid #d8dfbc;border-radius:13px;display:flex;gap:8px;align-items:center;justify-content:center;font-size:10px;flex-shrink:0}.map-intro .icon{color:#ce9c41;width:18px;height:18px}.map-board{position:relative;flex:1;min-height:300px;margin:22px 0 0;direction:rtl}.map-route{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none}.stage{position:absolute;inset-inline-start:var(--x);top:var(--y);transform:translate(50%,-50%);width:138px;text-align:center;display:flex;flex-direction:column;align-items:center}.stage-button{position:relative;width:59px;height:59px;border-radius:50%;background:linear-gradient(#fff5c0,#eab54d);border:3px solid #fbf8df;outline:2px solid #b58d45;color:#805d29;box-shadow:0 5px 0 #a28a4b,0 8px 10px #49582b29;display:grid;place-items:center;font-size:25px;font-weight:900;transition:transform .15s}.stage-button:active{transform:scale(.92)}.stage.locked .stage-button{background:linear-gradient(#e0e5cc,#b8c7a3);outline-color:#99ae8e;box-shadow:0 4px 0 #879d77;color:#879a7e}.stage.locked .stage-button .icon{width:23px;height:23px}.stage.current .stage-button{background:linear-gradient(#91d2a4,#4eac87);color:#fffee6;outline-color:#3d9376;box-shadow:0 5px 0 #36795f,0 0 0 8px #ffffdc4a;animation:node-pulse 2s infinite}.stage-name{font-size:11px;font-weight:800;line-height:1.7;margin-top:9px;padding:1px 8px;border-radius:9px;background:#fffae9e6;box-shadow:0 1px 4px #64804b0d;white-space:nowrap}.stage.locked .stage-name{color:#788d6e;background:#f5f4dee0}.stage-stars{display:flex;direction:ltr;gap:1px;line-height:1;margin-top:4px}.star-icon{width:15px;height:15px;color:#e3e2bd;fill:currentColor;stroke:#b3ba96;stroke-width:1}.star-icon.filled{color:#f9ca4e;stroke:#b58b35}.map-footer{flex-shrink:0;margin:5px 0 max(17px,env(safe-area-inset-bottom));background:#fff9e8d9;border:1px solid #d3ddba;border-radius:16px;padding:9px 13px;display:flex;justify-content:space-between;align-items:center;font-size:11px}.map-footer b{font-size:14px}.map-footer .icon{color:#d2a23a;width:21px;height:21px;margin-inline-end:5px}
/* Garage */
.garage-background{position:absolute;inset:0;background:#f5f1d9;z-index:-2}.garage-background:after{content:'';position:absolute;inset:0;background:radial-gradient(ellipse at 50% 35%,#d7e8c3 0,transparent 58%),url('./assets/title_bg.webp') center/cover;opacity:.13}.garage-preview{position:relative;flex:1;min-height:140px;max-height:265px;display:flex;align-items:center;justify-content:center;flex-direction:column}.garage-preview:before{content:'';position:absolute;width:210px;height:83px;top:50%;border:2px dashed #b8cda7;border-radius:50%;background:#e5e8c9;transform:rotate(-7deg);box-shadow:0 8px 0 #d3dcb7}.preview-car{position:relative;width:160px;height:170px;object-fit:contain;filter:drop-shadow(0 12px 5px #46664433);transform:rotate(-14deg);animation:garage-bob 3s ease-in-out infinite}.skin-name{position:relative;background:#fffae8d9;border:1px solid #d8ddbc;border-radius:20px;font-size:11px;padding:2px 16px;margin-top:3px;font-weight:700}.garage-caption{font-size:10px;color:#82906f;display:flex;justify-content:space-between;align-items:center;margin:10px 0 9px}.garage-caption b{font-size:13px;color:#426d56}.shop-list{display:grid;gap:11px;flex-shrink:0}.shop-row{min-height:103px;display:flex;align-items:center;gap:12px;padding:12px;background:#fffcf0;border:1.5px solid #dce1c7;border-radius:21px;box-shadow:0 4px 0 #dce0c0}.shop-image{width:65px;height:69px;display:flex;align-items:center;justify-content:center;border-radius:16px;background:#e7f2df;flex-shrink:0}.shop-image img{width:62px;height:66px;transform:rotate(-15deg)}.shop-image.red{background:#f9e4d9}.shop-image.shield{background:#e1ece9}.shop-image.shield .icon{width:37px;height:37px;color:#559a97;fill:#afd4c8}.shop-copy{flex:1;min-width:0}.shop-copy h3{font-size:13px;line-height:1.8}.shop-copy p{font-size:9px;color:#87947c;margin-top:3px}.buy-button{border:1px solid #cbad5e;border-radius:12px;background:#ffe499;min-height:39px;min-width:68px;padding:4px 8px;font-size:11px;font-weight:800;box-shadow:0 3px 0 #d4bb74}.buy-button .icon{width:15px;height:15px;color:#ba922e}.buy-button.owned{background:#e8f1d7;border-color:#b1c393;box-shadow:0 3px 0 #bdcda8;color:#5f7e4b}.buy-button.selected{background:#d6eddd;border-color:#9ac9ac;box-shadow:0 3px 0 #9cbaa1}.shop-bottom{padding:17px 0 max(17px,env(safe-area-inset-bottom));font-size:10px;text-align:center;color:#81916f}.original-skin{background:none;border:0;font-size:10px;color:#678369;text-decoration:underline;text-underline-offset:4px;min-height:35px}
/* Racing HUD */
#hud{position:absolute!important;inset:0!important;z-index:15!important;display:block!important;pointer-events:none!important;font-family:inherit!important;color:var(--ink)!important}#hud.hidden{display:none!important}.hud-wrap{width:min(100%,510px);margin:auto;padding:0 16px}.hud-top{display:flex;align-items:center;gap:9px;padding-top:max(17px,env(safe-area-inset-top))}.hud-top .icon-button{pointer-events:auto;width:43px;height:47px;background:#fffbe9;flex-shrink:0}.hud-stat{border:1.5px solid #c0cfa3;background:#fffae9f5;border-radius:15px;box-shadow:0 4px 0 #627f5429;padding:5px 11px;min-height:47px;display:flex;align-items:center;gap:9px;flex:1}.hud-stat .label{font-size:9px;color:#7c8c68;line-height:1.7}.hud-stat .value{font-size:19px;font-weight:900;line-height:1.7;direction:ltr}.hud-stat.score-stat{min-width:95px;flex:1.1}.hud-stat .icon{width:20px;height:20px;color:#dbab3f;fill:#f8d579}.hud-stat.lives-stat{flex:.9;display:block;text-align:center;padding:3px 8px}.hearts{display:flex;justify-content:center;gap:4px;direction:ltr}.heart{width:17px;height:17px;fill:#ed826d;stroke:#c26959;stroke-width:1.5}.heart.empty{fill:#dadac0;stroke:#b6c1a7}.race-heading{display:flex;justify-content:space-between;align-items:center;margin:12px 3px 5px;font-size:10px;font-weight:700;text-shadow:0 1px 0 #f6f4d4}.race-heading span:last-child{color:#617d53;font-size:10px}.race-progress{height:8px;background:#779b6655;border:1px solid #7f9f6355;border-radius:20px;overflow:visible;position:relative;margin:0 3px;direction:ltr}.race-progress-fill{height:100%;width:0;background:#fff0a1;border-radius:20px;box-shadow:0 0 0 1px #d9bd67;transition:width .15s linear}.progress-flag{position:absolute;inset-inline-end:-3px;top:-9px;width:19px;height:22px;filter:drop-shadow(0 1px 0 #fff4ce)}.race-minirow{display:flex;align-items:center;justify-content:space-between;margin:10px 1px;gap:8px}.rank-pill,.coin-pill{font-size:11px;font-weight:700;display:flex;gap:6px;align-items:center;background:#fffae8e6;border:1px solid #e0debb;border-radius:10px;padding:3px 9px;box-shadow:0 2px 0 #6c82551a}.rank-pill b{font-size:15px}.rank-pill .icon{width:16px;height:16px;color:#c29738}.coin-pill img{width:19px;height:19px}.race-buffs{display:flex;justify-content:center;gap:5px;flex:1;min-width:0}.buff-chip{width:29px;height:31px;position:relative;border-radius:9px;background:#fff9e8ed;border:1px solid #c4d3ac;display:grid;place-items:center;animation:pop .2s ease-out}.buff-chip img{width:22px;height:22px}.buff-chip b{position:absolute;bottom:-5px;inset-inline-end:-4px;font-size:8px;line-height:1.6;border-radius:6px;padding:0 3px;background:#487a62;color:#fff7dc}.sin-tray{position:absolute;bottom:max(16px,env(safe-area-inset-bottom));inset-inline:16px;max-width:478px;margin:auto;background:linear-gradient(#fffbeaee,#f8f1d6f5);border:1.5px solid #e5dcaf;border-radius:20px;box-shadow:0 5px 0 #42613633,0 8px 14px #4261361a;padding:8px 11px 9px;pointer-events:none}.tray-label{display:flex;align-items:center;justify-content:space-between;font-size:9px;color:#7b8c69;padding:0 3px 4px}.tray-label strong{font-size:10px;color:#557253}.tray-label b{font-weight:800;color:#a18a45}.tray-slots{display:flex;justify-content:space-between;gap:4px;direction:rtl}.tray-slot{position:relative;display:flex;align-items:center;flex-direction:column;flex:1;min-width:0;gap:2px}.tray-slot .slot-image{width:35px;height:35px;border-radius:11px;background:#e7e4cf;border:1px solid #dbd9be;display:flex;justify-content:center;align-items:center;transition:background .25s,transform .25s}.tray-slot img{width:29px;height:29px;filter:grayscale(.7);opacity:.35;transition:.2s}.tray-slot.active .slot-image{background:#e9f0d4;border-color:#a6c589;animation:pickup-pop .4s ease-out}.tray-slot.active img{opacity:1;filter:drop-shadow(0 1px 0 #73884f26)}.tray-slot small{font-size:8px;line-height:1.7;color:#81906f}.tray-slot.active small{color:#496b47;font-weight:700}.driving-hint{position:absolute;bottom:133px;inset-inline:0;text-align:center;font-size:10px;color:#5e7652;text-shadow:0 1px #fff6d3;transition:opacity 1s}.driving-hint .icon{width:15px;height:15px;margin-inline-end:4px}.race-alert{position:absolute;top:26%;inset-inline:20px;max-width:350px;margin:auto;display:flex;align-items:center;justify-content:center;gap:8px;color:#fffce8;text-shadow:0 2px 0 #355545;font-weight:900;font-size:20px;opacity:0;transform:scale(.9);transition:opacity .15s,transform .2s;text-align:center;pointer-events:none}.race-alert.show{opacity:1;transform:scale(1)}.race-alert img{width:38px;height:38px;filter:drop-shadow(0 3px 0 #2e57304a)}.race-alert small{display:block;font-size:11px;line-height:1.8;font-weight:600}.race-alert .alert-copy{padding:8px 20px;background:#4c8d6eee;border:2px solid #e5edb4;border-radius:19px;box-shadow:0 5px 0 #3d6e5044}
/* In-game overlays */
.modal-layer{position:absolute;inset:0;z-index:30;display:none;place-items:center;background:#224c3d70;backdrop-filter:blur(5px);pointer-events:auto;padding:22px}.modal-layer.active{display:grid;animation:fade-in .2s}.modal-card{position:relative;width:min(100%,365px);max-height:calc(100dvh - 48px);background:#fff9e8;border:3px solid #f6f0cd;outline:2px solid #b8c592;border-radius:29px;box-shadow:0 10px 0 #365e3e45,0 20px 50px #22473026;padding:27px 24px 24px;text-align:center;animation:modal-pop .3s cubic-bezier(.2,1.3,.5,1);overflow:auto;scrollbar-width:thin}.modal-kicker{font-size:11px;color:#80916e}.modal-card h2{font-size:24px;line-height:1.7;margin:5px 0 4px}.modal-card .description{font-size:11px;color:#81916e;line-height:1.9}.modal-emblem{width:64px;height:64px;border-radius:21px;background:#dcebd0;border:1px solid #bad5ab;color:#528970;display:grid;place-items:center;margin:0 auto 12px;transform:rotate(-6deg);box-shadow:0 4px 0 #c4d7b6}.modal-emblem .icon{width:32px;height:32px}.modal-actions{display:flex;flex-direction:column;gap:14px;margin-top:24px}.secondary-button{min-height:48px;border:1.5px solid #ccd5b6;background:#eff1da;color:#587550;border-radius:16px;font-size:12px;font-weight:800;box-shadow:0 3px 0 #c4d0ad;display:flex;align-items:center;justify-content:center;gap:8px}.secondary-button .icon{width:19px;height:19px}.text-button{background:none;border:0;font-size:11px;min-height:40px;color:#81916c;display:flex;align-items:center;justify-content:center;gap:6px}.text-button .icon{width:16px;height:16px}.tutorial-demo{position:relative;height:115px;margin:12px 0;background:#e9dfb9;border:1px solid #d7c99f;border-radius:19px;overflow:hidden}.tutorial-demo:before,.tutorial-demo:after{content:'';position:absolute;top:0;bottom:0;width:2px;border-inline-start:2px dashed #d0bd83;inset-inline-start:30%}.tutorial-demo:after{inset-inline-start:70%}.demo-car{position:absolute;width:90px;height:95px;top:4px;inset-inline-start:calc(50% - 45px);animation:demo-drive 2.8s ease-in-out infinite}.demo-hand{position:absolute;bottom:5px;inset-inline-start:calc(50% - 9px);color:#fffceb;filter:drop-shadow(0 2px 0 #406b55);animation:demo-drive 2.8s ease-in-out infinite}.demo-hand .icon{width:34px;height:34px;fill:#fffceb;stroke:#4e7157}.tutorial-steps{display:grid;gap:8px;text-align:start;margin:18px 0 3px}.tutorial-step{display:flex;align-items:center;gap:9px;font-size:10px;color:#6d805f}.tutorial-step .step-icon{width:25px;height:25px;border-radius:8px;background:#e7edd5;color:#63835c;display:grid;place-items:center;flex-shrink:0}.tutorial-step .icon{width:15px;height:15px}.tutorial-footer{font-size:9px;color:#99a285;margin-top:13px}.help-list{margin:16px 0 0;display:grid;gap:8px;text-align:start}.help-row{display:flex;align-items:center;gap:10px;background:#f2f0d9;border-radius:13px;padding:7px 9px}.help-row img{width:36px;height:36px;flex-shrink:0}.help-row strong{font-size:11px}.help-row p{font-size:9px;line-height:1.8;color:#81916e}.help-controls{font-size:10px;color:#6c815d;margin-top:15px}.modal-close{position:absolute;top:15px;inset-inline-end:15px;width:32px;height:32px;border:none;background:#ecefd8;border-radius:10px;color:#738b61;display:grid;place-items:center}.modal-close .icon{width:17px;height:17px}.result-stars{display:flex;justify-content:center;align-items:center;gap:12px;direction:ltr;margin:8px 0 18px;height:66px}.result-stars .icon{width:48px;height:48px;fill:#d9ddbe;stroke:#aab694;filter:drop-shadow(0 3px 0 #b8c095)}.result-stars .icon:nth-child(2){width:65px;height:65px;margin-top:-13px}.result-stars .earned{fill:#ffd15b;stroke:#cf9a40;filter:drop-shadow(0 5px 0 #d8af59);animation:star-in .55s both}.result-stars .earned:nth-child(2){animation-delay:.15s}.result-stars .earned:nth-child(3){animation-delay:.3s}.result-cup{width:44px;height:44px;color:#92aa75;margin:0 auto 10px}.result-cup .icon{width:100%;height:100%}.result-stats{display:grid;grid-template-columns:repeat(3,1fr);margin:22px 0 15px;padding:12px 0;background:#eff0d9;border-radius:17px}.result-stats>div+div{border-inline-start:1px solid #dce0be}.result-stats strong{display:block;font-size:19px;line-height:1.8}.result-stats span{font-size:9px;color:#84916d}.result-reward{padding:10px 13px;border-radius:16px;border:1px solid #e6d49b;background:#fff0bd;display:flex;align-items:center;justify-content:space-between;font-size:11px}.result-reward img{width:30px;height:30px}.result-reward strong{font-size:20px;color:#9b762f;direction:ltr}.result-reward div{display:flex;gap:7px;align-items:center}.reward-breakdown{font-size:9px;color:#99a078;margin-top:6px}.unlock-note{font-size:11px;color:#518362;font-weight:800;margin-top:13px}.unlock-note .icon{width:16px;height:16px}.result-card .modal-actions{margin-top:20px}.result-card h2{font-size:22px}.result-card .primary{font-size:16px!important;min-height:53px!important}.result-card #retryBtn{font-size:15px!important;min-height:49px!important}.result-card .secondary-button{min-height:43px}.confetti{position:absolute;inset:0;pointer-events:none;overflow:hidden}.confetti i{position:absolute;width:7px;height:11px;top:-30px;inset-inline-start:var(--x);background:var(--c);animation:confetti-fall 3s ease-out forwards;animation-delay:var(--delay);border-radius:2px}.toast{position:absolute;bottom:125px;inset-inline:24px;max-width:375px;margin:auto;z-index:60;background:#315e4def;color:#fff8de;border:1px solid #accca1;border-radius:14px;box-shadow:0 6px 18px #214c362c;padding:10px 15px;text-align:center;font-size:12px;font-weight:700;opacity:0;transform:translateY(9px);pointer-events:none;transition:opacity .2s,transform .2s}.toast.visible{opacity:1;transform:translateY(0)}.screen-reader{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
@keyframes hero-bob{0%,100%{transform:translateY(0) rotate(-3deg)}50%{transform:translateY(-8px) rotate(1deg)}}@keyframes garage-bob{0%,100%{transform:translateY(0) rotate(-14deg)}50%{transform:translateY(-5px) rotate(-12deg)}}@keyframes twinkle{0%,100%{transform:scale(.6);opacity:.4}50%{transform:scale(1.1);opacity:1}}@keyframes petal-fall{0%{transform:translate(0,-30px) rotate(0);opacity:0}10%{opacity:.9}90%{opacity:.8}100%{transform:translate(70px,100vh) rotate(390deg);opacity:0}}@keyframes screen-in{from{opacity:0}to{opacity:1}}@keyframes fade-in{from{opacity:0}to{opacity:1}}@keyframes modal-pop{from{opacity:0;transform:translateY(12px) scale(.95)}to{opacity:1;transform:none}}@keyframes node-pulse{50%{box-shadow:0 5px 0 #36795f,0 0 0 13px #ffffdc21}}@keyframes pop{from{transform:scale(.7)}to{transform:scale(1)}}@keyframes pickup-pop{0%,100%{transform:scale(1)}40%{transform:scale(1.22)}}@keyframes demo-drive{0%,100%{translate:35px 0}50%{translate:-35px 0}}@keyframes star-in{0%{opacity:0;transform:scale(.2) rotate(-35deg)}75%{transform:scale(1.18) rotate(7deg)}100%{opacity:1;transform:scale(1) rotate(0)}}@keyframes confetti-fall{0%{transform:translateY(-50px) rotate(0);opacity:1}100%{transform:translateY(880px) rotate(800deg);opacity:0}}
@media(max-height:760px){.menu-top{height:66px;padding-top:13px}.game-title{font-size:51px;margin-top:3px}.tagline{margin-top:6px;font-size:11px}.hero-stage{min-height:122px;max-height:245px}.hero-emblem{max-height:230px}.hero-halo{width:200px;height:200px}.sin-shelf{padding-top:13px}.sin-mini{width:31px;height:31px}.sin-mini img{width:30px;height:30px}.menu-links{margin-top:11px}.menu-link{height:51px}.level-preview{margin-top:11px}.save-note{padding-bottom:8px}.primary,#startBtn{min-height:54px!important}.garage-preview{max-height:190px;min-height:90px}.preview-car{height:125px;width:125px}.garage-preview:before{height:65px;width:170px}.shop-row{min-height:90px;padding:9px}.shop-list{gap:9px}.shop-bottom{padding-top:10px}.page-header{height:82px;padding-top:16px}.modal-card{padding:23px 20px 20px}.tutorial-demo{height:100px}.modal-actions{margin-top:18px}.result-card .result-stars{margin-bottom:10px}.result-card .result-stats{margin-top:16px}.map-board{margin-top:15px}.stage-button{width:51px;height:51px}.stage-name{font-size:10px;margin-top:7px}.map-footer{margin-bottom:12px}.modal-card h2{font-size:22px}.result-card .result-cup{height:32px;width:32px;margin-bottom:6px}}
@media(max-width:370px){.menu-shell{padding-inline:22px}.game-title{font-size:51px}.menu-link{font-size:12px}.sin-icons{gap:3px}.hero-sticker{inset-inline-start:-5px}.page-shell{padding-inline:16px}.hud-wrap{padding-inline:12px}.hud-stat{padding-inline:8px;gap:5px}.hud-stat.score-stat{min-width:85px}.sin-tray{inset-inline:12px;padding-inline:8px}.tray-slot .slot-image{width:32px;height:32px}.shop-copy h3{font-size:12px}.shop-row{gap:8px}.shop-image{width:57px}.buy-button{min-width:62px;padding-inline:6px}.stage{width:128px}}
@media(min-width:700px){.menu-backdrop{background-size:cover;background-position:center 65%}.menu-backdrop:after{background:linear-gradient(90deg,#f5f3dc22,#f6f3d69c 30%,#f6f3d6bd 50%,#f6f3d69c 70%,#f5f3dc22)}.menu-shell{background:linear-gradient(90deg,transparent,#f7f4d977 20%,#f7f4d977 80%,transparent);padding-inline:35px;max-width:450px}.hero-stage{max-height:295px}.map-background{background-size:cover}.map-background:after{background:#f4f3d585}.page-shell{max-width:470px;background:linear-gradient(90deg,transparent,#f7f4d966 20%,#f7f4d966 80%,transparent)}.garage-background:after{opacity:.28}.sin-tray{bottom:20px}.driving-hint{bottom:138px}.hud-wrap{max-width:610px}.race-alert{top:27%}}
/* The illustrated menu is deliberately calmer than the active racetrack. */
.menu-backdrop{background-image:url('./assets/menu_landscape.webp');background-position:center;background-color:#e8efda}
.menu-backdrop:after{background:linear-gradient(180deg,#f9f4de18 0%,#f4f4dd00 48%,#f6f2da88 75%,#f7f3dcf5 100%)}
.menu-top{height:91px;padding-top:max(24px,env(safe-area-inset-top))}
.game-title{font-size:56px;line-height:1.7;margin-top:4px;white-space:nowrap}
.game-title .rally{-webkit-text-stroke:2px #3e6652;vertical-align:5px}
.tagline{margin-top:0;font-size:12px;font-weight:600}
.hero-stage{min-height:180px;max-height:none}
.hero-emblem{width:min(100%,330px);max-height:330px}
.hero-halo{width:290px;height:290px}
.hero-sticker{top:76%;inset-inline-start:0}
.garage-background:after{background:radial-gradient(ellipse at 50% 35%,#d7e8c3 0,transparent 58%),url('./assets/menu_landscape.webp') center/cover;opacity:.44}
.shop-bottom>.icon{width:15px;height:15px;margin-inline-end:3px}
@media(max-height:760px){.menu-top{height:67px;padding-top:16px}.game-title{font-size:50px}.hero-stage{min-height:125px;max-height:none}.hero-emblem{max-height:250px}.hero-halo{width:230px;height:230px}}
@media(max-width:370px){.game-title{font-size:50px}.game-title .rally{margin-inline-end:4px}.tagline{font-size:11px}}
@media(min-width:700px){.menu-backdrop{background-position:center 58%}.menu-backdrop:after{background:linear-gradient(90deg,#f4f2d900,#f6f3d960 32%,#f6f3d96b 50%,#f6f3d960 68%,#f4f2d900)}}
@media(prefers-reduced-motion:reduce){.hero-emblem,.petal,.sparkle,.stage.current .stage-button,.demo-car,.demo-hand,.preview-car{animation:none}.screen.active,.modal-layer.active,.modal-card{animation:none}}
