@font-face{font-family:"Fredoka";src:url("fonts/Fredoka.ttf") format("truetype");font-weight:300 700;font-display:swap}
/* Hill Dash v2.0.0 */
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
:root{--ink:#2b2140;--gold:#ffd23f;--green:#3ccf5a;--font:"Fredoka","Arial Rounded MT Bold","Avenir Next Rounded","Nunito","Trebuchet MS",system-ui,sans-serif}
html,body{margin:0;height:100%;overflow:hidden;background:#5ec8ff;font-family:var(--font);color:var(--ink);touch-action:none}
canvas{display:block}
#game{position:fixed;inset:0}
.hidden{display:none!important}
.screen{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:radial-gradient(ellipse at center,rgba(20,10,50,.05),rgba(20,10,50,.42));z-index:10;padding:16px;animation:fadein .25s ease}
@keyframes fadein{from{opacity:0}to{opacity:1}}
.panel{background:linear-gradient(#ffffffef,#f4f1ffef);border-radius:30px;padding:22px 28px;box-shadow:0 10px 0 rgba(40,20,80,.18),0 24px 60px rgba(20,0,60,.35);text-align:center;max-width:580px;width:100%;border:4px solid #fff;max-height:94vh;overflow:auto;animation:popin .35s cubic-bezier(.2,1.6,.4,1)}
@keyframes popin{from{transform:scale(.85) translateY(20px);opacity:0}to{transform:none;opacity:1}}
.panel.wide{max-width:980px}
h2{font-size:38px;margin:4px 0 12px;text-shadow:0 3px 0 rgba(0,0,0,.08)}
h4{margin:10px 0 6px;font-size:20px;text-align:left}
.muted{color:#777;font-size:14px}
/* title */
.title-screen{background:linear-gradient(180deg,rgba(20,10,60,0) 40%,rgba(20,10,60,.35));align-items:flex-start;padding-top:4vh}
.title-wrap{text-align:center;max-width:820px;width:100%}
.logo{font-size:clamp(64px,11vw,132px);margin:0;line-height:.95;letter-spacing:2px;font-weight:900;filter:drop-shadow(0 8px 0 rgba(40,10,60,.25)) drop-shadow(0 14px 24px rgba(0,0,40,.25))}
.logo i{font-style:normal;display:inline-block;animation:bob 2.4s ease-in-out infinite;-webkit-text-stroke:6px #fff;paint-order:stroke fill}
.logo .l1 i{color:#ff7a1a;text-shadow:0 7px 0 #c24d00}
.logo .l2 i{color:#2bb24c;text-shadow:0 7px 0 #157a2e}
.logo i:nth-child(2){animation-delay:.12s}.logo i:nth-child(3){animation-delay:.24s}.logo i:nth-child(4){animation-delay:.36s}
.logo .l2 i:nth-child(1){animation-delay:.5s}.logo .l2 i:nth-child(2){animation-delay:.62s}.logo .l2 i:nth-child(3){animation-delay:.74s}.logo .l2 i:nth-child(4){animation-delay:.86s}
@keyframes bob{0%,100%{transform:translateY(0) rotate(-2deg)}50%{transform:translateY(-10px) rotate(2deg)}}
.tag{font-size:22px;margin:8px 0 12px;color:#fff;text-shadow:0 2px 0 rgba(0,0,0,.35),0 0 12px rgba(0,0,0,.25);font-weight:800}
.chips{display:flex;gap:10px;justify-content:center;align-items:center;flex-wrap:wrap;margin:6px 0}
.chip{background:rgba(255,255,255,.88);border-radius:999px;padding:6px 14px;font-weight:800;font-size:17px;box-shadow:0 3px 0 rgba(0,0,0,.12)}
.ver{position:fixed;left:12px;bottom:10px;color:#fff;font-size:13px;opacity:.75;text-shadow:0 1px 2px #000}
.menu-row{gap:4px;margin-top:6px}
/* buttons */
.btn{font:inherit;font-size:21px;font-weight:900;border:0;border-radius:18px;padding:13px 22px;margin:7px;cursor:pointer;background:linear-gradient(#ffe57a,#ffc61a);color:#3a2a00;box-shadow:0 6px 0 #c99a00,0 10px 18px rgba(0,0,0,.18),inset 0 2px 0 rgba(255,255,255,.7);transition:transform .1s,box-shadow .1s,filter .1s;position:relative}
.btn:hover{transform:translateY(-3px) scale(1.03);filter:brightness(1.05)}
.btn:active{transform:translateY(4px);box-shadow:0 2px 0 #c99a00,inset 0 2px 0 rgba(255,255,255,.5)}
.btn.play{background:linear-gradient(#6cf07e,#2fbd4c);color:#fff;box-shadow:0 7px 0 #1f8e37,0 12px 24px rgba(0,60,20,.3),inset 0 2px 0 rgba(255,255,255,.5);font-size:34px;padding:16px 58px;text-shadow:0 2px 0 rgba(0,80,20,.4);overflow:hidden}
.title-screen .btn.play{animation:pulse 1.6s ease-in-out infinite}
@keyframes pulse{0%,100%{filter:brightness(1)}50%{filter:brightness(1.12)}} /* v3.3: glow only, never changes size */
.btn.play::after{content:"";position:absolute;top:0;left:-60%;width:40%;height:100%;background:linear-gradient(90deg,transparent,rgba(255,255,255,.45),transparent);transform:skewX(-20deg);animation:shine 2.8s ease-in-out infinite}
@keyframes shine{0%,60%{left:-60%}100%{left:130%}}
.btn.tile{display:flex;flex-direction:column;align-items:center;min-width:112px;padding:10px 14px;font-size:17px;background:linear-gradient(#ffffff,#e9e4ff);color:var(--ink);box-shadow:0 6px 0 #b9b0e0,0 10px 18px rgba(0,0,0,.18),inset 0 2px 0 #fff}
.btn.tile em{font-style:normal;font-size:34px;line-height:1.1}
.btn.small{font-size:17px;padding:10px 16px}
.btn.danger{background:linear-gradient(#ff8a7a,#e8402a);color:#fff;box-shadow:0 6px 0 #a8221a}
.btn.buy{background:linear-gradient(#8fd8ff,#3aa8f0);color:#fff;box-shadow:0 6px 0 #1f78b8}
.btn.bag{background:linear-gradient(#ffd76a,#f0a820);color:#3a2410;box-shadow:0 7px 0 #b87310,0 12px 24px rgba(80,40,0,.25),inset 0 2px 0 rgba(255,255,255,.55);font-size:26px;padding:14px 28px;width:100%;margin-top:10px}
.btn:disabled{background:#ddd;color:#888;box-shadow:0 6px 0 #aaa;cursor:not-allowed;transform:none;filter:none}
.daily-btn{font-size:17px;background:linear-gradient(#ffb7e0,#ff6fae);color:#fff;box-shadow:0 5px 0 #c2407a;padding:9px 18px}
.daily-btn.done{background:linear-gradient(#c8f5d0,#8fe0a0);color:#1f6e33;box-shadow:0 5px 0 #4faa62}
.row{display:flex;justify-content:center;flex-wrap:wrap}
.keys{font-size:15px;color:#fff;margin-top:8px;text-shadow:0 1px 3px rgba(0,0,0,.6)}
/* coins */
.coinpill{display:inline-flex;align-items:center;gap:8px;background:linear-gradient(#fffbe6,#fff0b0);border:3px solid var(--gold);border-radius:999px;padding:4px 16px 4px 6px;font-weight:900;font-size:22px;box-shadow:0 3px 0 rgba(160,110,0,.35)}
.coinpill.big{font-size:28px;margin:4px 0}
.coinpill.bump{animation:bump .3s ease}
@keyframes bump{0%{transform:scale(1)}40%{transform:scale(1.22)}100%{transform:scale(1)}}
.coin-ic{width:26px;height:26px;border-radius:50%;background:radial-gradient(circle at 35% 35%,#fff7b0,#ffd23f 45%,#e0a000);border:2px solid #b27c00;display:inline-block;vertical-align:middle;box-shadow:inset 0 -2px 0 rgba(150,90,0,.4)}
.coin-ic.sm{width:16px;height:16px;border-width:1.5px;margin:-3px 2px 0}
/* cards */
.cards{display:flex;gap:16px;justify-content:center;flex-wrap:wrap;margin:6px 0 12px}
.card{width:280px;border-radius:24px;overflow:hidden;border:5px solid #fff;cursor:pointer;background:#fff;box-shadow:0 6px 0 rgba(40,20,80,.15),0 12px 24px rgba(0,0,0,.12);text-align:center;position:relative;transition:transform .15s;padding-bottom:8px}
.card:hover{transform:translateY(-4px) rotate(-.5deg)}
.card.sel{border-color:var(--green);box-shadow:0 0 0 4px rgba(60,207,90,.35),0 6px 0 rgba(40,20,80,.15)}
.card canvas{width:100%;height:auto;display:block}
.card.veh canvas{background:linear-gradient(#dff3ff,#f7fbff)}
.card h3{margin:8px 0 2px;font-size:22px}
.card p{margin:2px 12px 8px;font-size:15px;color:#555;min-height:38px}
.card .cbest{font-weight:800;margin-bottom:6px}
.card.locked canvas{filter:grayscale(.75) brightness(.8)}
.card .lock{position:absolute;top:10px;right:12px;font-size:30px;filter:drop-shadow(0 2px 2px rgba(0,0,0,.4))}
.cstars span{display:inline-block;min-width:96px;text-align:left;font-size:15px;font-weight:800;color:#6a5f8a}
.cmed{margin:2px 12px 0;font-size:13px;font-weight:800;color:#6a5f8a}
.cgoals{list-style:none;margin:2px 12px 4px;padding:0;font-size:13px;line-height:1.35;text-align:left;color:#555}
.cgoals li.done{color:#2a9d3a;font-weight:800}
.lvlegend{margin:2px 0 8px;font-size:14px;font-weight:800;color:#6a5f8a;text-align:center}
.cstars i{font-style:normal;color:#d6d0e6;font-size:22px;margin:0 1px}
.cstars i.on{color:#ffc61a;text-shadow:0 2px 0 #c99a00}
.rate{display:flex;align-items:center;gap:8px;margin:3px 16px;font-size:14px;font-weight:800}
.rate span{width:60px;text-align:left}
.rate div{display:flex;gap:4px;flex:1}
.rate i{flex:1;height:10px;border-radius:5px;background:#e4e0f0}
.rate i.on{background:linear-gradient(#7ff08e,#2fbd4c)}
/* garage */
.garhead{display:flex;align-items:center;justify-content:center;gap:18px;margin-bottom:6px;flex-wrap:wrap}
.garhead canvas{width:300px;height:160px;border-radius:20px;background:linear-gradient(#dff3ff,#f7fbff)}
.garname{font-size:28px;font-weight:900}
.upg{display:flex;align-items:center;gap:14px;background:linear-gradient(#f7f9ff,#eaf0ff);border-radius:20px;padding:10px 14px;margin:10px 0;text-align:left;box-shadow:inset 0 -3px 0 rgba(40,20,80,.06)}
.upg.flash{animation:flash .6s ease}
@keyframes flash{0%{background:#c8ffd0}100%{background:#eaf0ff}}
.upg .ic{font-size:40px;width:56px;text-align:center}
.upg .info{flex:1}
.upg .nm{font-size:22px;font-weight:900}
.upg .nm small{font-size:14px;color:#777}
.upg .ds{font-size:15px;color:#555}
.pips{display:flex;gap:6px;margin-top:6px}
.pip{width:30px;height:12px;border-radius:6px;background:#d6dcea}
.pip.on{background:linear-gradient(#7ff08e,#2fbd4c)}
.upg .btn{min-width:150px}
/* goals */
.tabs{display:flex;justify-content:center;gap:8px;margin-bottom:10px}
.tab{font:inherit;font-weight:900;font-size:18px;border:0;border-radius:14px;padding:10px 18px;background:#ece8fa;color:#6a5f8a;cursor:pointer}
.tab.on{background:var(--ink);color:#fff}
#goalbody{text-align:left;max-height:56vh;overflow:auto;padding:0 4px}
.daily{display:flex;align-items:center;gap:12px;background:linear-gradient(#ffe3f1,#ffd0e8);border-radius:18px;padding:12px 16px;margin-bottom:8px}
.daily>div{flex:1;display:flex;flex-direction:column;gap:3px}
.daily b{font-size:19px}
.mgroup{background:#f6f4ff;border-radius:18px;padding:6px 14px 10px;margin:8px 0}
.mgroup.locked{opacity:.55}
.mission{display:flex;align-items:center;gap:10px;padding:5px 0;font-size:17px}
.mission .chk{width:26px;height:26px;border-radius:8px;border:3px solid #cfc8e8;display:inline-flex;align-items:center;justify-content:center;font-weight:900;color:#fff}
.mission.done .chk{background:var(--green);border-color:var(--green)}
.mission.done .mt{text-decoration:line-through;color:#888}
.mission .mt{flex:1}
.mission .mr{font-weight:900}
.awards{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:10px}
.award{background:#f1eef9;border-radius:16px;padding:10px;text-align:center;display:flex;flex-direction:column;gap:3px;opacity:.6}
.award.got{background:linear-gradient(#fff8d8,#ffeaa0);opacity:1;box-shadow:0 3px 0 #e0b84a}
.award .aic{font-size:32px}
.award span{font-size:13px;color:#555}
.award em{font-style:normal;font-weight:900;font-size:14px}
/* settings */
.setrow{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#f6f4ff;border-radius:16px;padding:10px 16px;margin:8px 0;font-size:19px;font-weight:800}
.toggle{font:inherit;border:0;width:110px;height:44px;border-radius:22px;background:#d6d0e6;position:relative;cursor:pointer;font-weight:900;color:#776}
.toggle i{position:absolute;top:4px;left:4px;width:36px;height:36px;border-radius:50%;background:#fff;box-shadow:0 2px 4px rgba(0,0,0,.25);transition:left .2s}
.toggle b{position:absolute;right:16px;top:12px}
.toggle.on{background:var(--green);color:#fff}
.toggle.on i{left:70px}
.toggle.on b{right:auto;left:16px}
.seg{display:flex;background:#e4def5;border-radius:14px;padding:3px}
.seg button{font:inherit;font-weight:900;border:0;background:transparent;padding:8px 12px;border-radius:11px;cursor:pointer;color:#776;font-size:15px}
.seg button.on{background:#fff;color:var(--ink);box-shadow:0 2px 4px rgba(0,0,0,.15)}
/* results */
.results h2{margin-bottom:2px}
.resplace{color:#777;font-weight:800;margin-bottom:6px}
.medalrow{display:flex;align-items:center;justify-content:center;gap:22px;margin:4px 0}
.medal{display:flex;flex-direction:column;align-items:center;font-weight:900;animation:popin .6s .2s both cubic-bezier(.2,1.8,.4,1)}
.medal .disc{width:74px;height:74px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#fff,#ccc 50%,#999);border:5px solid #fff;box-shadow:0 5px 0 rgba(0,0,0,.2);position:relative}
.medal .disc::before{content:"";position:absolute;left:18px;top:-30px;width:28px;height:34px;background:linear-gradient(90deg,#2b8cff 50%,#ff4f6d 50%);z-index:-1;clip-path:polygon(0 0,100% 0,100% 100%,50% 75%,0 100%)}
.medal.m1 .disc{background:radial-gradient(circle at 35% 30%,#ffe0c0,#d9884a 50%,#9a5a2a)}
.medal.m2 .disc{background:radial-gradient(circle at 35% 30%,#ffffff,#c8d0dc 50%,#8a94a4)}
.medal.m3 .disc{background:radial-gradient(circle at 35% 30%,#fff8c0,#ffc61a 50%,#c48a00);box-shadow:0 5px 0 rgba(0,0,0,.2),0 0 30px #ffd23f}
.medal.m0 .disc{background:radial-gradient(circle at 35% 30%,#fff,#e4e0f0 60%,#c8c0dc)}
.rstars{display:flex;gap:6px}
.rstar{font-style:normal;font-size:56px;color:#ddd6ee;text-shadow:0 4px 0 #b9b0d0;display:inline-block}
.rstar.on{color:#ffc61a;text-shadow:0 4px 0 #c99a00,0 0 18px rgba(255,200,40,.8);animation:starpop .5s both cubic-bezier(.2,1.8,.4,1)}
@keyframes starpop{from{transform:scale(0) rotate(-90deg)}to{transform:none}}
.resnext{font-weight:800;color:#6a5f8a}
.stats{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:10px 0 12px}
.stats.big{grid-template-columns:1fr 1fr}
.stats div{background:#f3f1ff;border-radius:16px;padding:10px;text-align:center}
.stats span{display:block;font-size:15px;color:#666}
.stats b{font-size:28px}
.resextra{list-style:none;padding:0;margin:4px 0 10px;text-align:left}
.resextra li{background:#fff7d6;border-radius:12px;padding:6px 12px;margin:4px 0;font-weight:800;display:flex;justify-content:space-between}
.resextra li.p{background:#dff3ff}
.newbest{font-size:26px;font-weight:900;color:#ff7a1a;animation:pop .6s ease infinite alternate}
@keyframes pop{from{transform:scale(1)}to{transform:scale(1.1)}}
/* HUD */
#hud{position:fixed;top:0;left:0;right:0;display:flex;justify-content:space-between;align-items:flex-start;padding:10px 16px;z-index:5;pointer-events:none}
.hud-left{display:flex;align-items:flex-start;gap:6px;min-width:260px}
#fueldial{width:128px;height:128px;filter:drop-shadow(0 4px 0 rgba(0,0,0,.15))}
.hud-fueltext{display:flex;flex-direction:column;gap:6px;margin-top:14px}
.hud-right{display:flex;align-items:center;justify-content:flex-end;gap:10px;min-width:260px;margin-top:6px}
.hud-mid{text-align:center;color:#fff;text-shadow:0 3px 0 rgba(0,0,0,.35)}
#dist{font-size:52px;font-weight:900;line-height:1;-webkit-text-stroke:2px rgba(40,20,60,.35)}
#bestline{font-size:17px;font-weight:800}
.prog{position:relative;width:220px;height:16px;background:rgba(0,0,0,.25);border-radius:8px;margin:6px auto 0;overflow:hidden;border:2px solid rgba(255,255,255,.7)}
#progfill{height:100%;background:linear-gradient(#fff07a,#ffc61a);width:0;transition:width .2s}
#proglabel{position:absolute;inset:0;font-size:11px;line-height:12px;color:#3a2a00;text-shadow:none;font-weight:900}
#lowfuel{background:#e8402a;color:#fff;font-weight:900;border-radius:12px;padding:4px 10px;animation:pop .4s ease infinite alternate}
.iconbtn{pointer-events:auto;font-size:26px;width:52px;height:52px;border-radius:50%;border:0;background:rgba(255,255,255,.9);cursor:pointer;box-shadow:0 4px 0 rgba(0,0,0,.15)}
.iconbtn.floating{position:fixed;right:16px;bottom:16px;z-index:20}
body.playing .iconbtn.floating{top:16px;bottom:auto;right:82px}
.hud-right .coinpill{margin-right:62px}
.nextfuel{background:rgba(255,255,255,.88);border-radius:10px;padding:3px 10px;font-weight:800;font-size:15px}
.nextfuel:empty{display:none}
#pedals{position:fixed;left:0;right:0;bottom:0;display:flex;justify-content:space-between;padding:0 20px 20px;z-index:6;pointer-events:none}
.pedal{pointer-events:auto;width:150px;height:150px;border-radius:30px;border:0;font:inherit;font-weight:900;color:#fff;font-size:28px;display:flex;flex-direction:column;align-items:center;justify-content:center;opacity:.88;touch-action:none;text-shadow:0 2px 0 rgba(0,0,0,.25)}
.pedal small{font-size:13px;font-weight:700;opacity:.9}
.pedal.gas{background:linear-gradient(#6cf07e,#2fbd4c);box-shadow:0 8px 0 #1f8e37,inset 0 3px 0 rgba(255,255,255,.4)}
.pedal.brake{background:linear-gradient(#ff8a7a,#ff4a3a);box-shadow:0 8px 0 #b52a1d,inset 0 3px 0 rgba(255,255,255,.4)}
.pedal.down{transform:translateY(6px) scale(.97);box-shadow:0 2px 0 rgba(0,0,0,.3);opacity:1}
#toasts{position:fixed;top:90px;right:16px;z-index:30;display:flex;flex-direction:column;gap:8px;pointer-events:none}
.toast{background:#fff;border-radius:16px;padding:10px 16px;box-shadow:0 6px 0 rgba(0,0,0,.12),0 10px 24px rgba(0,0,0,.2);display:flex;flex-direction:column;animation:slidein .4s cubic-bezier(.2,1.6,.4,1);border-left:8px solid var(--gold);max-width:320px}
.toast span{font-size:14px;color:#555}
.toast.goal{border-color:#ff7a1a}.toast.place{border-color:#2b8cff}
.toast.out{opacity:0;transform:translateX(30px);transition:all .5s}
@keyframes slidein{from{transform:translateX(120%)}to{transform:none}}
#fps{position:fixed;left:8px;bottom:40px;background:rgba(0,0,0,.6);color:#fff;font:12px monospace;padding:3px 6px;border-radius:6px;z-index:40}
@media (max-height:700px){.logo{font-size:72px}.btn.play{font-size:26px;padding:12px 40px}.btn.tile{min-width:92px;font-size:15px}.btn.tile em{font-size:26px}.tag{font-size:17px}#dist{font-size:40px}}

#vehlist .card{width:212px}
#vehlist .card p{min-height:58px;font-size:14px}
.medal{margin-top:28px}
.resextra{display:grid;grid-template-columns:1fr 1fr;gap:6px;max-height:150px;overflow:auto}
.resextra li{margin:0;font-size:14px;padding:5px 10px}
.panel.results{max-width:640px}
.results .stats b{font-size:24px}
.results .stats div{padding:6px}

/* v2.2 controls + engine slider */
.keys2{display:flex;gap:8px}
.keybtn{font:inherit;font-weight:900;font-size:17px;min-width:110px;height:42px;border:3px solid #cfc6ea;border-radius:12px;background:#fff;color:var(--ink);cursor:pointer}
.keybtn:hover{border-color:#8f7be0}
.keybtn.wait{background:#fff3c4;border-color:#ffb800;animation:pulse 1s infinite}
.keymsg{min-height:24px;font-weight:800;color:#b35a00;font-size:16px;margin:6px 0}
.ctlrow{padding:6px 14px;margin:5px 0}
#setengvol{flex:1;max-width:220px;accent-color:var(--green);height:28px}
#engvoltxt{min-width:52px;text-align:right}
#controls .panel{max-height:92vh;overflow:auto}

/* v2.3 parking brake: the icon's spot is always reserved (fixed position, only visibility changes) so nothing jumps */
#parkicon{position:fixed;left:24px;top:150px;width:64px;height:64px;border-radius:50%;background:#fff;border:5px solid #e53b2c;color:#e53b2c;display:flex;flex-direction:column;align-items:center;justify-content:center;font-weight:900;line-height:1;box-shadow:0 4px 0 rgba(0,0,0,.18);visibility:hidden;pointer-events:none;z-index:6}
#parkicon b{font-size:26px}#parkicon span{font-size:9px;letter-spacing:.5px}
#parkicon.on{visibility:visible}
#parkicon.air{opacity:.45}
.pedal.park{width:110px;height:110px;align-self:flex-end;margin-bottom:20px;background:linear-gradient(#9aa6c4,#5d6a8c);box-shadow:0 8px 0 #3b4560,inset 0 3px 0 rgba(255,255,255,.4);font-size:34px}
.pedal.park small{font-size:12px}
.pedal.park.down{background:linear-gradient(#ff8a7a,#e53b2c);box-shadow:0 2px 0 #9e2418}

/* v2.4 cruise badge: fixed spot next to P BRAKE, always reserved */
#cruiseicon{position:fixed;left:96px;top:166px;width:86px;height:32px;border-radius:16px;background:#2fbd4c;color:#fff;font-weight:900;font-size:15px;letter-spacing:1px;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 0 #1f8e37;visibility:hidden;pointer-events:none;z-index:6}
#cruiseicon.on{visibility:visible;pointer-events:auto;cursor:pointer}

/* v2.6 extreme toggle on place cards */
.xbtn{margin-top:6px;background:linear-gradient(#ffd9c2,#ffb48a);color:#7a2a00}
.xbtn.on{background:linear-gradient(#ff8a3a,#e8401a);color:#fff;box-shadow:0 4px 0 #9e2418}
.xbtn:disabled{opacity:.55;filter:grayscale(.6)}

/* v2.6 HUD polish: glassy pill behind the distance; settings panel scrolls if tall */
.hud-mid{background:linear-gradient(rgba(30,20,60,.32),rgba(30,20,60,.12));border-radius:22px;padding:6px 26px 10px;backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);box-shadow:inset 0 1px 0 rgba(255,255,255,.35)}
.prog{box-shadow:0 2px 6px rgba(0,0,0,.2)}
#settings .panel{max-height:94vh;overflow:auto}

/* v2.7.1 jesselander.com Beta */
.beta-tag{display:inline-block;font-weight:900;letter-spacing:3px;font-size:18px;color:#fff;background:linear-gradient(#ff8a3a,#e8402a);padding:5px 16px;border-radius:12px;box-shadow:0 4px 0 rgba(120,30,0,.35);transform:rotate(-4deg);margin-bottom:6px}
.beta-mini{display:inline-block;font-size:11px;font-weight:900;letter-spacing:2px;background:#e8402a;color:#fff;border-radius:7px;padding:1px 7px;text-shadow:none}
html.hd-playing #aeParentNav,html.hd-playing #aeAetherPill,html.hd-playing #aeBayPill,html.hd-playing body>[id^="ae"]:not([id^="aeFuel"]){opacity:0!important;visibility:hidden!important;pointer-events:none!important}
#pedals{padding-bottom:68px}  /* keep the site's bottom-left tray zone (~320x48) free */
/* v3.0 Levels */
.moderow{display:flex;gap:16px;justify-content:center;align-items:center;flex-wrap:wrap}
.btn.play.surv{background:linear-gradient(#7cc8ff,#2f8ee8);box-shadow:0 7px 0 #1f5fae,0 12px 24px rgba(0,30,80,.3),inset 0 2px 0 rgba(255,255,255,.5);font-size:24px;padding:14px 30px;animation:none}
.lvtabs{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin:4px 0 12px}
.lvtab{border:3px solid #fff;border-radius:14px;padding:6px 12px;font:700 15px var(--font,inherit);background:#efe9ff;color:#3a2a5e;cursor:pointer;display:flex;flex-direction:column;align-items:center;min-width:120px}
.lvtab small{font-size:12px;opacity:.8}.lvtab.on{background:#ffd23f;color:#2a1a2e}.lvtab.locked{opacity:.5;cursor:default}
.lvgrid{display:grid;grid-template-columns:repeat(4,150px);gap:12px;justify-content:center;margin:0 0 10px}
@media (max-width:700px){.lvgrid{grid-template-columns:repeat(2,150px)}}
.lvtile{height:132px;border:4px solid #fff;border-radius:20px;background:linear-gradient(#ffffff,#e9f6ff);box-shadow:0 5px 0 rgba(40,20,80,.15);cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-family:inherit;color:#2a1a2e}
.lvtile b{font-size:34px;line-height:1}.lvtile .lvst i{font-style:normal;font-size:20px;color:#d6d0e4}.lvtile .lvst i.on{color:#ffb800;text-shadow:0 1px 0 #b07800}
.lvtile .lvinfo{font-size:12px;opacity:.75}.lvtile .lvbest{font-size:13px;font-weight:700;color:#2f8e4a}
.lvtile.done{background:linear-gradient(#fffbe6,#ffefb0)}.lvtile.locked{opacity:.55;cursor:default;background:#ece8f4}.lvtile.locked .lvbest{color:#7a7090}
.lvtile:not(.locked):hover{transform:translateY(-3px)}
.lvhelp{font-size:14px;opacity:.8;margin:0 0 10px}
.btn.next{font-size:24px;padding:12px 30px;margin:6px 0}
.invis{visibility:hidden}

.raceplace{display:inline-block;margin:4px auto 0;padding:2px 12px;border-radius:999px;background:linear-gradient(#ffd76a,#f0a820);color:#3a2410;font-weight:900;font-size:18px;box-shadow:0 3px 0 #b87310}
.raceplace.hidden{display:none}
.raceplace{max-width:min(100%,440px);box-sizing:border-box;font-size:clamp(12px,2.8vw,18px);line-height:1.25;white-space:normal}
.podium{display:flex;justify-content:center;gap:8px;margin:8px 0 4px;align-items:flex-end}
.podium .p{min-width:72px;padding:8px 6px;border-radius:12px;background:#fff;box-shadow:0 4px 0 #c8bddf;text-align:center;font-weight:800;font-size:13px;color:#2a1a3a}
.podium .p.you{background:linear-gradient(#fff6c8,#ffe08a);box-shadow:0 4px 0 #d0a820}
.podium .p b{display:block;font-size:22px;line-height:1.1}
.podium .p.p1{min-height:78px}.podium .p.p2{min-height:62px}.podium .p.p3{min-height:52px}

/* ===== v3.3.0 polish: drawn icons, no layout jumps, iPad touch ===== */
.ico{width:1.05em;height:1.05em;vertical-align:-.16em;display:inline-block;flex:none}
[data-ic]{font-style:normal;display:inline-flex;align-items:center;justify-content:center}
.btn.tile em .ico{width:34px;height:34px}
.iconbtn{display:inline-flex;align-items:center;justify-content:center;color:var(--ink)}
.iconbtn .ico{width:28px;height:28px}
.lvtile b .ico{width:30px;height:30px}
.pedal .pmark{display:inline-flex;align-items:center;justify-content:center;width:46px;height:46px;border-radius:12px;background:#2f6fe0;color:#fff;font-size:32px;font-weight:900;border:3px solid #fff;line-height:1}
.resumeinfo{font-size:22px;font-weight:900;margin:4px 0 6px}
#resume .btn.play{width:100%;margin:8px 0}
/* hover lift only on real mice: on touch screens a "stuck" hover made buttons jump */
@media (hover:none),(pointer:coarse){.btn:hover,.card:hover,.lvtile:not(.locked):hover{transform:none;filter:none}}
.btn:active{transform:translateY(4px)}
/* fixed slots so text changes never move neighbours */
.hud-fueltext{width:150px}
#lowfuel{text-align:center;font-size:14px}
#setreset{min-width:250px}
.seg button{min-height:44px;min-width:44px}
.keybtn{min-height:44px}
.toggle{min-height:44px}
.tab{min-height:44px}
.dailybtn,#dailybtn{min-width:250px}
/* touch: keyboard hints are noise on a tablet */
body.touch .keys{visibility:hidden}
/* narrow / portrait tablets: HUD must fit 768 px */
@media (max-width:900px){
  .hud-left{min-width:0}.hud-right{min-width:0;gap:8px}
  #fueldial{width:104px;height:104px}
  .hud-fueltext{width:118px;margin-top:8px}.nextfuel{font-size:13px}
  #hud{padding:10px 10px}
  .hud-mid{padding:6px 14px 10px}
  .prog{width:190px}
  .hud-right .coinpill{margin-right:58px;font-size:18px;padding:3px 10px 3px 4px}
  body.playing .iconbtn.floating{right:70px}
  #parkicon{top:124px;left:18px}#cruiseicon{top:140px;left:90px}
  .lvgrid{grid-template-columns:repeat(4,1fr)}
  .lvtab{min-width:100px}
}
@media (max-width:700px){.lvgrid{grid-template-columns:repeat(2,150px)}}
/* very tall portrait: keep pedals large but closer to the thumbs */
@media (orientation:portrait) and (min-height:900px){#pedals{padding-bottom:88px}}
#dailybtn{min-height:46px}
.keybtn{width:132px;min-width:132px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:16px}.lvtab small .ico{width:12px;height:12px}
.lvinfo .lvth{display:block;font-style:normal;font-weight:900;color:#c2410c;font-size:12px}
.rjbanner{background:#2b2140;color:#ffd23f;font-weight:900;font-size:13px;border-radius:10px;padding:6px 10px;margin:0 0 8px;letter-spacing:.5px}

/* v3.6.0 new-content bar: fixed overlay (never shifts layout), hidden while driving so it never covers HUD controls */
.updbar{position:fixed;top:10px;left:50%;transform:translateX(-50%);z-index:60;display:none;align-items:center;gap:6px;background:#2b2140;border:3px solid #ffd23f;border-radius:16px;padding:4px;box-shadow:0 6px 18px rgba(0,0,0,.3)}
.updbar.on{display:flex}
html.hd-playing .updbar.on{display:none}
.updgo{font:inherit;font-weight:900;font-size:17px;color:#2b2140;background:linear-gradient(#ffe57a,#ffc61a);border:0;border-radius:12px;min-height:44px;padding:0 16px;cursor:pointer}
.updx{width:44px;height:44px;border:0;border-radius:12px;background:rgba(255,255,255,.12);color:#fff;cursor:pointer;display:inline-flex;align-items:center;justify-content:center}
.updx .ico{width:22px;height:22px}
#results.rjtest .coinpill,#results.rjtest #resextra,#results.rjtest .stats div:nth-child(3){display:none}
#results.rjtest .resnext::after{content:"Test run, nothing saved";display:block;color:#c2410c;font-weight:900}

/* v3.6.0: distance readout top-left (next to the gas dial), track map drawn top-right under the buttons */
#hud{justify-content:flex-start}
.hud-left{min-width:0}
.hud-mid{text-align:left;margin-left:6px}
.hud-mid .prog{margin:6px 0 0}
.hud-right{margin-left:auto;min-width:0}
html.hd-playing #toasts,body.playing #toasts{top:var(--maptop,90px)}
body.playing .updbar{top:auto;bottom:18px} /* in a run (paused): sit below everything at the bottom centre, clear of the HUD, map, pause and sound buttons */

/* v3.6.0 coin-bag celebration overlay (fixed, no layout impact) + wallet pulse */
#coinfx{position:fixed;inset:0;width:100vw;height:100vh;z-index:80;pointer-events:none;display:none}
#coinfx.on{display:block}
.coinpill.cpulse{animation:cpulse .22s ease-out}
@keyframes cpulse{0%{transform:scale(1.12);box-shadow:0 0 0 0 rgba(255,210,63,.9),0 0 22px rgba(255,210,63,.9)}100%{transform:scale(1);box-shadow:0 0 0 10px rgba(255,210,63,0),0 0 0 rgba(255,210,63,0)}}
#fxwallet{position:fixed!important;top:12px;left:0;right:0;margin:0 auto!important;width:max-content;z-index:79;display:none;pointer-events:none}
#fxwallet.on{display:flex}


/* v3.7.0 paint shop */
.paintshop{margin:10px 0 6px;padding:10px;border-radius:18px;background:rgba(43,33,64,.06)}
.pshead{display:flex;align-items:center;gap:10px}.pshead h3{margin:0;font-size:20px;display:flex;align-items:center;gap:6px}
.betabadge{font-size:12px;font-weight:900;letter-spacing:1.5px;color:#fff;background:linear-gradient(90deg,#ff2d6f,#5b2dff);border-radius:999px;padding:4px 10px;box-shadow:0 2px 0 rgba(0,0,0,.2)}
.ptabs{display:flex;gap:6px;flex-wrap:wrap;margin:8px 0}
.ptab{min-height:44px;padding:0 14px;border-radius:12px;border:2px solid rgba(43,33,64,.15);background:#fff;font:inherit;font-weight:800;color:#2b2140;cursor:pointer}
.ptab.on{background:#2b2140;color:#ffd23f;border-color:#2b2140}
.pswatches{display:grid;grid-template-columns:repeat(auto-fill,minmax(92px,1fr));gap:8px;max-height:236px;overflow-y:auto;padding:2px}
.psw{min-height:88px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;border-radius:14px;border:3px solid transparent;background:#fff;box-shadow:0 2px 0 rgba(0,0,0,.08);font:inherit;color:#2b2140;cursor:pointer;padding:6px 4px}
.psw.sel{border-color:#ffd23f;box-shadow:0 0 0 3px rgba(255,210,63,.35)}
.psw .chip{width:34px;height:34px;border-radius:50%;box-shadow:inset 0 -6px 10px rgba(0,0,0,.25),inset 0 4px 6px rgba(255,255,255,.5),0 0 0 2px rgba(43,33,64,.25);display:block}
.psw .nm{font-size:12px;font-weight:800;line-height:1.1;text-align:center}.psw .pr{font-size:11px;font-weight:800;opacity:.8;display:flex;align-items:center;gap:3px}
.psw.own .pr{color:#1f8e47}.psw.beta .pr{color:#ff2d6f}
.chip.fx-gloss{background:radial-gradient(circle at 35% 30%,#fff 0 12%,#ff7a1a 30%,#a33d00)}.chip.fx-matte{background:#c25a1a}
.chip.fx-metal{background:radial-gradient(circle at 35% 30%,#fff 0 8%,#ff9a4a 25%,#5a2000),repeating-conic-gradient(rgba(255,255,255,.15) 0 5deg,transparent 5deg 10deg)}
.chip.fx-pearl{background:linear-gradient(135deg,#fff 0,#ffd1e8 40%,#b8d8ff 80%)}.chip.fx-neon{background:#ff2d9a;box-shadow:0 0 12px 3px #ff2d9a,inset 0 0 6px #fff}
.chip.fx-chrome{background:linear-gradient(#fff,#8a93a6 48%,#3a3f4a 52%,#dfe4ec)}
.chip.fx-none{background:#ff7a1a}.chip.fx-stripes{background:linear-gradient(#ff7a1a 0 40%,#fff 40% 52%,#ff7a1a 52% 60%,#fff 60% 66%,#ff7a1a 66%)}
.chip.fx-number{background:radial-gradient(circle,#fff 0 45%,#ff7a1a 46%)}.chip.fx-checker{background:repeating-conic-gradient(#222 0 25%,#fff 0 50%) 0 0/12px 12px}
.chip.fx-camo{background:radial-gradient(circle at 30% 30%,#5d6b32 0 20%,transparent 21%),radial-gradient(circle at 70% 60%,#2f3a1a 0 22%,transparent 23%),#8a9a5a}
.chip.fx-flames{background:linear-gradient(90deg,#1d1f27 30%,#ff7a1a 55%,#ffd23f 75%,#fff)}.chip.fx-lightning,.chip.fx-betabolt{background:linear-gradient(135deg,#2b7bff 40%,#ffd23f 41% 55%,#2b7bff 56%)}
.chip.fx-tiger{background:repeating-linear-gradient(100deg,#ff8a1a 0 6px,#1d1f27 6px 9px)}.chip.fx-galaxy{background:radial-gradient(circle at 30% 30%,#ff50c8 0 10%,transparent 40%),radial-gradient(circle at 70% 70%,#50c8ff 0 10%,transparent 40%),#1a0b3d}
.pbuy{display:flex;align-items:center;gap:8px;margin-top:8px;min-height:48px}.pbuy span#pbuytext{flex:1;font-size:13px;font-weight:700;opacity:.85}
#garprev.flashp{animation:flashp .5s ease-out}@keyframes flashp{0%{filter:brightness(1.6) drop-shadow(0 0 12px #ffd23f)}100%{filter:none}}

/* v3.7.1 level readout */
.lvline{font-size:13px;font-weight:800;opacity:.85;height:17px;line-height:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:230px}
.pauselv{text-align:center;font-weight:800;margin:-.3rem 0 .7rem;opacity:.8;min-height:1.2em}

/* v3.7.1 Settings */
.settabs{display:grid;grid-template-columns:repeat(5,1fr);gap:6px;margin:0 0 10px}
.settabs button{border:0;border-radius:12px;padding:7px 2px;font:inherit;font-weight:800;font-size:13px;background:rgba(0,0,0,.06);color:inherit;display:flex;flex-direction:column;align-items:center;gap:2px;cursor:pointer}
.settabs button.on{background:#5b4bff;color:#fff}.settabs i svg{width:20px;height:20px}
.setpane{min-height:300px;max-height:52vh;overflow:auto}.setval{min-width:48px;text-align:right}
.setfoot{display:flex;gap:8px;justify-content:space-between;flex-wrap:wrap;margin-top:10px}
body.bigtext{font-size:115%}body.bigtext .toast,body.bigtext #bestline,body.bigtext .lvline{font-size:120%}
.pedal{transform:scale(var(--pedscale,1));transform-origin:bottom center}
body.pedswap #pedals{flex-direction:row-reverse}
body.redmo *{animation-duration:.01ms!important;transition-duration:.01ms!important}
.hud-right.hrcol{flex-direction:column;align-items:flex-end;gap:6px}.hud-right.hrcol .coinpill{margin-right:0}

/* v3.16.1 goal list on pause + results */
.glist{margin:8px auto 6px;max-width:420px;text-align:left;font-size:14px;line-height:1.4}
.glist b{display:block;color:#6a5f8a;margin-bottom:2px}
.glist ul{list-style:none;margin:0;padding:0}
.glist li{margin:2px 0;color:#444}
.glist li.done{color:#2a9d3a;font-weight:800}
.glist em{font-style:normal;color:#8a7fae;font-weight:700}

/* Keep the longer race gap readable on phones without stretching the top HUD row. */
@media (max-width:600px){
  #hud{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px}
  .hud-mid{grid-column:1/-1;min-width:0;max-width:100%;margin-left:0;box-sizing:border-box;grid-row:2}
  .raceplace{max-width:100%}
}

/* v3.17.1 polish: race place tabs = one scrolling row (races visible right away) */
.lvtabs{flex-wrap:nowrap;justify-content:flex-start;overflow-x:auto;overflow-y:hidden;padding:2px 18px 8px;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch;scrollbar-width:thin;
  -webkit-mask-image:linear-gradient(90deg,transparent 0,#000 18px,#000 calc(100% - 18px),transparent 100%);mask-image:linear-gradient(90deg,transparent 0,#000 18px,#000 calc(100% - 18px),transparent 100%)}
.lvtab{flex:0 0 auto;scroll-snap-align:center}
/* phone portrait: the whole title menu fits (5 tiles in one row, Race + Survival side by side, Daily Drive visible) */
@media (max-width:520px){
  .title-screen{padding-top:2vh}
  .title-screen .logo{font-size:58px}
  .title-screen .tag{font-size:14px;margin:2px 8px 6px}
  .title-screen .moderow{flex-wrap:nowrap;gap:8px}
  .title-screen .btn.play{font-size:21px;padding:10px 14px;min-width:0}
  .title-screen .menu-row{flex-wrap:nowrap;gap:5px}
  .title-screen .btn.tile{min-width:0;width:64px;padding:8px 2px;font-size:11px}
  .title-screen .btn.tile em{font-size:22px}
  .title-screen .btn.tile em .ico{width:24px;height:24px}
  #dailybtn{min-width:0;padding-left:18px;padding-right:18px}
  .title-screen .keys{font-size:12px;margin:6px 10px}
}
/* phone: compact toasts; while driving they sit above the pedals instead of over the HUD */
@media (max-width:600px){
  #toasts{left:10px;right:10px;align-items:center}
  .toast{padding:7px 12px;max-width:100%}
  .toast span{font-size:12px}
  .upg{gap:8px;padding:8px 10px}
  .upg .ic{font-size:30px;width:36px}
  .upg .nm{font-size:18px}
  .upg .ds{font-size:13px}
  .upg .btn{min-width:0;padding-left:12px;padding-right:12px;flex:0 0 auto}
  .upg .info{min-width:0}
  .pip{width:22px}
  #results .panel > .coinpill.big{display:none} /* the screen's own coin pill already shows the balance */
  #results .panel{max-height:calc(100dvh - 20px);overflow-y:auto}
  #results #retrybtn{position:sticky;bottom:6px;z-index:2}
}

/* v3.17.4: ALT LANE sits above the Gas pedal; desktop has the same accessible control. */
#altlanebtn{position:fixed;right:max(20px,env(safe-area-inset-right));bottom:max(76px,env(safe-area-inset-bottom));z-index:7;min-width:176px;min-height:56px;max-width:190px;padding:10px;border:2px solid #d3e3a4;border-radius:14px;background:#28342e;color:#f4ffda;font:800 14px system-ui;touch-action:none;box-shadow:0 4px 0 #111b16;cursor:pointer}
#altlanebtn.armed{background:#d6f29c;color:#172619;border-color:#fff;box-shadow:0 0 14px #d4ef8a70,0 4px 0 #60763e}
#altlanebtn:focus-visible{outline:3px solid #fff;outline-offset:3px}

#altlanebtn{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px}
#altlanebtn small{font-size:10px;letter-spacing:1.2px}

/* v3.19.2 (Jesse): world + track name at the top while racing (replaces the small grey level line) */
.trackname{margin:0 auto;padding:4px 12px 6px;flex:0 1 auto;text-align:center;color:#fff;text-shadow:0 2px 0 rgba(0,0,0,.4);background:linear-gradient(rgba(30,20,60,.42),rgba(30,20,60,.18));border-radius:16px;backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);box-shadow:inset 0 1px 0 rgba(255,255,255,.3);min-width:0;max-width:min(40vw,460px);line-height:1.15;pointer-events:none}
.trackname b{display:block;font-size:12px;font-weight:900;letter-spacing:.14em;text-transform:uppercase;opacity:.92;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.trackname span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:clamp(14px,1.5vw,20px);font-weight:900;white-space:normal;overflow:hidden;overflow-wrap:anywhere}
.trackname.hidden{display:none}
#hud .trackname:not(.hidden)~.hud-right{margin-left:0}
#hud .lvline{display:none}
body.bigtext .trackname span{font-size:120%}
@media (max-width:600px){
  .trackname{grid-row:2;grid-column:1/-1;justify-self:center;max-width:100%;box-sizing:border-box;padding:3px 12px 4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .trackname b,.trackname span{display:inline;-webkit-line-clamp:unset}.trackname b{font-size:11px;letter-spacing:.08em}.trackname b::after{content:' · '}.trackname span{font-size:15px}
  #hud .hud-mid{grid-row:3}
}

/* v3.19.6: Survival → Ruin City card says what it needs */
/* v3.19.7 (Jesse): bigger, brighter, more obvious; any ride may still start */
.cneed,.trban.warn{margin:8px 0 6px;padding:10px 12px;border-radius:12px;background:linear-gradient(#ffe95c,#ffb700);color:#3a2200;font-weight:800;font-size:15px;line-height:1.3;border:3px solid #e07800;box-shadow:0 3px 0 #b05a00;text-align:left}
.cneed b,.trban.warn b{display:block;font-size:19px;font-weight:900;letter-spacing:.02em;margin-bottom:2px}
.cneed .cswitch{display:block;margin-top:8px}
.toast.rubble{background:linear-gradient(#ffe95c,#ffb700);color:#3a2200;border:3px solid #e07800;padding:12px 18px;font-size:16px}
.toast.rubble b{font-size:20px}
@media (prefers-reduced-motion:no-preference){.cneed,.trban.warn{animation:rubblePulse 1.8s ease-in-out infinite}}
@keyframes rubblePulse{0%,100%{box-shadow:0 3px 0 #b05a00,0 0 0 0 rgba(255,183,0,.0)}50%{box-shadow:0 3px 0 #b05a00,0 0 0 6px rgba(255,183,0,.45)}}

/* v3.20.0 How it works card (RULES §32) */
.howit{position:fixed;inset:0;z-index:60;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(20,10,50,.55)}
.howit.hidden{display:none!important}
.howpanel{max-width:620px;text-align:left;max-height:90vh;overflow:auto;position:relative}
.howpanel h2{text-align:center;margin:0 0 6px}
.howbody h3{margin:12px 0 4px;font-size:18px;color:#4a2f8a}
.howbody ul{margin:0;padding-left:20px}
.howbody li{margin:3px 0;font-size:16px;line-height:1.35;color:#2a2440}
#howclose{display:block;margin:14px auto 0;min-width:160px}
.howbtn{min-width:44px;min-height:44px;border-radius:22px;border:3px solid #fff;background:#6a4fd8;color:#fff;font:800 22px/1 inherit;font-family:inherit;cursor:pointer;box-shadow:0 3px 0 rgba(40,20,80,.25)}
.howbtn.inl{vertical-align:middle;margin-left:6px;min-width:44px;min-height:44px;font-size:20px}
#pause .panel{position:relative}
.howbtn.corner{position:absolute;top:12px;right:12px}
.howchip{cursor:pointer;min-height:44px;border:0;font:inherit;font-weight:800}

/* ===== v3.20.1 (Hill Dash Builder): Controls tab, pad hints, results podium row, FLUX card spot ===== */
.settabs{grid-template-columns:repeat(6,minmax(0,1fr))}
.settabs button span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media (max-width:480px){.settabs button{font-size:11px;padding:6px 1px}.settabs i svg{width:18px;height:18px}}
.ctlbox .padh{margin:12px 0 2px;font-size:18px}.ctlbox .padh:first-child{margin-top:2px}
.ctlbox .ctlrow{padding:4px 10px;margin:4px 0}.ctlbox .keybtn{min-width:92px}
@media (max-width:480px){.ctlbox .ctlrow{flex-wrap:wrap;gap:4px}.ctlbox .keybtn{min-width:76px;font-size:15px}}
.keys kbd{font:inherit;font-weight:900;padding:0 5px;border-radius:5px;background:rgba(255,255,255,.2);border:1px solid rgba(255,255,255,.55)}
.resextra{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.resextra li{min-width:0}.resextra li:not(.podli){overflow-wrap:anywhere}
.resextra li.podli{grid-column:1/-1;flex-direction:column;align-items:center;justify-content:center;gap:2px}
.resextra li.podli .podium{margin:2px 0;max-width:100%;flex-wrap:nowrap}.resextra li.podli .podium .p{flex:0 0 auto}
.podfin{font-weight:800}
#results .panel{overflow-x:hidden}
.setpane{height:max(300px,52vh)} /* v3.20.1: every Settings tab the same height, so switching tabs never moves the panel */

/* v3.21 fastcars: separate from gas; above its touch pedal and beside ALT LANE. */
#rocketbtn{position:fixed;right:max(20px,env(safe-area-inset-right));bottom:calc(240px + env(safe-area-inset-bottom));z-index:7;min-width:118px;min-height:52px;padding:8px 12px;border:2px solid #bfe8ff;border-radius:14px;background:#123a60;color:#edfbff;font:800 14px system-ui;touch-action:none;box-shadow:0 4px 0 #071b2f;cursor:pointer}
#rocketbtn small{display:block;font-size:10px;margin-top:3px}#rocketbtn.down{background:#226faa;box-shadow:0 0 12px #4aa8ff80,0 2px 0 #071b2f}#rocketbtn:focus-visible{outline:3px solid white;outline-offset:3px}
#rocketmeter{position:relative;width:112px;height:22px;border:2px solid #bfe8ff;border-radius:8px;background:#102537;z-index:5;overflow:hidden;color:white;font:800 11px system-ui;text-align:center;line-height:18px;pointer-events:none}
#rocketfill{height:100%;background:#246fac;width:100%}#rocketlabel{position:absolute;inset:0;text-shadow:0 1px 2px #000}
body.pedswap #rocketbtn{right:auto;left:max(20px,env(safe-area-inset-left))}
body.inmenu #rocketbtn,body.inmenu #rocketmeter{display:none}
@media(max-height:500px){#rocketbtn{bottom:calc(164px + env(safe-area-inset-bottom));min-height:44px;padding:5px 10px}}
/* /v3.21 fastcars */
/* v3.21 rebuild: compact progress and the third road fit touch controls. */
.rebuild-meter { padding: 10px 12px; margin: 8px 0; border: 1px solid #6b9e88; border-radius: 12px; background: #173c36; color: #f8e9c5; text-align: left; }
.rebuild-meter b, .rebuild-meter span { display: block; font-size: 13px; line-height: 1.4; }
.rebuild-meter progress { display: block; width: 100%; height: 10px; margin: 6px 0; accent-color: #e8c25c; }
#altlanebtn small:last-child { font-size: 10px; }
#pswatches .chip canvas { display: block; width: 100%; height: 100%; }
@media (prefers-reduced-motion: reduce) { .rebuild-meter, #altlanebtn { animation: none; transition: none; } }

.lvtile.rebuild-race { height: auto; min-height: 236px; padding: 12px 8px; justify-content: flex-start; }
.lvtile.rebuild-race .glist { margin-top: 10px; font-size: 11px; }
.lvtile.rebuild-race .glist b { font-size: 12px; line-height: 1.3; }

/* v3.22 halloween: readable choices above pedals; map information remains on canvas. */
#hauntbag{position:fixed;left:12px;top:88px;z-index:20;color:#ffedb8;background:#201331ed;border:1px solid #aa81ca;border-radius:12px;padding:6px 10px;font-size:12px;font-weight:800;pointer-events:none}
#hauntchoices{position:fixed;left:50%;transform:translateX(-50%);width:min(560px,calc(100vw - 24px));z-index:30;padding:8px;border-radius:14px;background:#180d29f5;border:1px solid #b18bcf;box-shadow:0 3px 18px #09031680;touch-action:manipulation}
#hauntchoicehint{text-align:center;font-size:12px;font-weight:900;color:#ffe6ad;margin-bottom:6px}
#hauntbuttons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.haunt-route{min-height:46px;border:1px solid #9478ae;border-radius:9px;background:linear-gradient(#49315f,#2c1d3d);color:#fff3df;padding:5px 8px;cursor:pointer;text-align:left;touch-action:manipulation}.haunt-route b,.haunt-route span{display:block;white-space:nowrap}.haunt-route b{font-size:12px}.haunt-route span{font-size:11px;color:#d9c8ee}.haunt-route.chosen{border:2px solid #ffd88c;background:#684722;opacity:1}.haunt-route.pad-focus{outline:2px solid #c6a2ff;outline-offset:-4px}.haunt-route:disabled{opacity:.65}.haunt-route.chosen:disabled{opacity:1}.haunt-meter{display:grid;gap:5px;background:#251735;color:#ffe3ae;border-radius:10px;padding:10px;margin-top:10px;font-size:12px}.haunt-meter progress{width:100%;accent-color:#e9a74c}.haunt-meter span{font-size:11px}
@media(max-width:600px){#hauntbag{top:90px;font-size:11px;padding:4px 8px}#hauntchoices{padding:6px}.haunt-route b{font-size:11px}.haunt-route span{font-size:10px}}
@media(prefers-reduced-motion:reduce){#hauntchoices,#hauntbag{animation:none;transition:none}}

/* v3.22 halloween (Claude gate): race tiles hold the 3 Halloween goals without the 34px tile-number font leaking into them */
.lvtile.haunt-race { height: auto; min-height: 236px; padding: 12px 8px; justify-content: flex-start; }
.lvtile.haunt-race .glist { margin-top: 10px; font-size: 11px; text-align: left; }
.lvtile.haunt-race .glist b { font-size: 12px; line-height: 1.3; }
.lvtile.haunt-race .glist ul { margin: 4px 0 0; padding-left: 0; list-style: none; }
.lvtile.haunt-race .lvth { display: block; font-style: normal; font-weight: 800; color: #b5541c; }
/* v3.22 halloween (Claude gate): on upright phones the distance card covered the path map; fade it (and the track name) while a path choice is open */
@media (max-width: 600px) and (orientation: portrait) {
  .hud-mid, #trackname { transition: opacity .25s; }
  body:has(#hauntchoices:not(.hidden)) .hud-mid, body:has(#hauntchoices:not(.hidden)) #trackname { opacity: 0; }
}

/* ===== v3.22.1 layout: car pedals (Jesse: "make it look like car pedal, and smaller, less hideous") =====
   The <button> is the (generous, transparent) hit area; .pad is the visible pedal: brushed aluminium plate, black rubber
   grip ribs, corner bolts, a hanging arm above it, and a pressed state that tilts the pad away like a real pedal.
   GAS = tall + narrow, BRAKE = wide + short (shape carries the meaning; the green / red lamp only reinforces it). */
#pedals{align-items:flex-end;padding:0 max(18px,env(safe-area-inset-right)) 68px max(18px,env(safe-area-inset-left));--brkW:136px;--brkH:116px;--gasW:104px;--gasH:152px}
.pedal{position:relative;padding:0;border:0;border-radius:14px;background:none;box-shadow:none;opacity:1;color:#2b3036;text-shadow:none;font-size:0;
  perspective:360px;perspective-origin:50% 0;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.pedal.down{transform:scale(var(--pedscale,1));box-shadow:none;opacity:1}
.pedal.gas,.pedal.brake{background:none;box-shadow:none}
.pedal.brake{width:var(--brkW);height:var(--brkH);--padX:8px;--padH:84px;transform-origin:bottom left}
.pedal.gas{width:var(--gasW);height:var(--gasH);--padX:15px;--padH:124px;transform-origin:bottom right}
body.pedswap .pedal.brake{transform-origin:bottom right}body.pedswap .pedal.gas{transform-origin:bottom left}
/* the arm: comes down out of the dark above and meets the top of the pad */
.pedal.gas::before,.pedal.brake::before{content:'';position:absolute;left:50%;top:0;width:10px;margin-left:-5px;height:calc(100% - var(--padH) + 6px);border-radius:3px;
  background:linear-gradient(90deg,#3a4048,#aab2bb 35%,#eef1f4 50%,#8c949d 68%,#2f343b);
  -webkit-mask-image:linear-gradient(transparent,#000 45%);mask-image:linear-gradient(transparent,#000 45%)}
.pedal .pad{position:absolute;left:var(--padX);right:var(--padX);bottom:6px;height:var(--padH);display:block;border-radius:11px 11px 15px 15px;transform-origin:50% 0;
  transition:transform .07s ease-out,box-shadow .07s ease-out,filter .07s;
  background:linear-gradient(180deg,rgba(255,255,255,.6),rgba(255,255,255,0) 14%),
    repeating-linear-gradient(90deg,rgba(255,255,255,.07) 0 1px,rgba(0,0,0,.05) 1px 3px),
    linear-gradient(160deg,#f5f7f9 0%,#c9cfd6 28%,#9ba3ac 52%,#dde1e6 76%,#a8afb7 100%);
  box-shadow:inset 0 0 0 1.5px rgba(255,255,255,.55),inset 0 -3px 0 rgba(0,0,0,.22),0 0 0 2px #252a31,0 6px 0 #171a1f,0 8px 0 2px rgba(23,26,31,.55),0 12px 18px rgba(0,0,0,.4)}
/* rubber grip ribs */
.pedal .pad::before{content:'';position:absolute;left:9px;right:9px;top:9px;bottom:23px;border-radius:6px;
  background:repeating-linear-gradient(180deg,#363c44 0 1px,#1c2025 1px 6px,#0a0b0d 6px 7px,transparent 7px 10px);
  box-shadow:0 0 0 1px rgba(0,0,0,.25)}
/* corner bolts + a soft specular sweep */
.pedal .pad::after{content:'';position:absolute;inset:0;border-radius:inherit;pointer-events:none;
  background:radial-gradient(circle,#f4f6f8 0 1.1px,#5d656e 1.6px 2.8px,transparent 3.2px) left 2px bottom 6px/9px 9px no-repeat,
    radial-gradient(circle,#f4f6f8 0 1.1px,#5d656e 1.6px 2.8px,transparent 3.2px) right 2px bottom 6px/9px 9px no-repeat,
    linear-gradient(115deg,transparent 30%,rgba(255,255,255,.22) 44%,transparent 58%)}
/* small engraved label with a lamp: green = go, red = stop */
.pedal .pad b{position:absolute;left:0;right:0;bottom:5px;font:900 10px/13px system-ui,sans-serif;letter-spacing:.14em;text-align:center;color:#2a2f36;text-shadow:0 1px 0 rgba(255,255,255,.55);white-space:nowrap}
.pedal .pad b::before{content:'';display:inline-block;width:6px;height:6px;margin:0 5px 1px 0;border-radius:50%;vertical-align:middle;background:#6b7380}
.pedal.gas .pad b::before{background:#3fdc63;box-shadow:0 0 4px #3fdc63}
.pedal.brake .pad b::before{background:#ff5544;box-shadow:0 0 4px #ff5544}
/* pressed: the pad swings away on its arm, loses depth and the lamp brightens */
.pedal.down .pad{transform:rotateX(26deg) translateY(2px);filter:brightness(.93);
  box-shadow:inset 0 0 0 1.5px rgba(255,255,255,.45),inset 0 -2px 0 rgba(0,0,0,.25),0 0 0 2px #252a31,0 2px 0 #171a1f,0 4px 8px rgba(0,0,0,.45)}
.pedal.gas.down .pad b::before{box-shadow:0 0 9px 2px #3fdc63}.pedal.brake.down .pad b::before{box-shadow:0 0 9px 2px #ff5544}
.pedal:focus-visible{outline:3px solid #fff;outline-offset:2px}
/* P: a small round metal-rimmed button between the pedals; red when the parking brake is on */
.pedal.park{width:52px;height:52px;margin:0 0 16px;align-self:flex-end;border-radius:50%;font-size:0;transform-origin:bottom center;
  background:radial-gradient(circle at 50% 32%,#46505e,#151a21 72%);
  box-shadow:inset 0 0 0 3px #a9b1ba,inset 0 0 0 4.5px #2a2f36,inset 0 3px 5px rgba(255,255,255,.18),0 0 0 1.5px #1b1f25,0 3px 0 #11151a,0 6px 12px rgba(0,0,0,.45)}
.pedal.park .pmark{width:auto;height:auto;border:0;border-radius:0;background:none;font:900 22px/1 system-ui,sans-serif;color:#d4e3ff;text-shadow:0 0 6px rgba(120,170,255,.55)}
.pedal.park.down{background:radial-gradient(circle at 50% 32%,#ff7b6b,#b31d16 74%);box-shadow:inset 0 0 0 3px #e3e7eb,inset 0 0 0 4.5px #6d1410,0 0 12px rgba(255,80,60,.65),0 0 0 1.5px #1b1f25,0 1px 0 #11151a}
.pedal.park.down .pmark{color:#fff;text-shadow:0 0 6px #ffd1ca}
/* ROCKET + ALT LANE: smoked glass in a dark metal bezel, to match */
#rocketbtn{min-width:120px;min-height:44px;padding:5px 12px 6px;border:0;border-radius:12px;color:#e2f4ff;font:800 13px/1.15 system-ui,sans-serif;letter-spacing:.08em;
  background:linear-gradient(180deg,rgba(46,78,120,.94),rgba(12,24,44,.95));-webkit-tap-highlight-color:transparent;
  box-shadow:inset 0 0 0 1.5px rgba(176,222,255,.6),inset 0 1px 0 rgba(255,255,255,.35),0 0 0 2px #22272e,0 4px 0 #101317,0 7px 12px rgba(0,0,0,.4)}
#rocketbtn b{font-weight:900}#rocketbtn small{font-size:9px;letter-spacing:.06em;margin-top:2px;opacity:.82;font-weight:700}
#rocketbtn.down{transform:translateY(3px);background:linear-gradient(180deg,rgba(70,160,240,.96),rgba(22,74,146,.96));box-shadow:inset 0 0 0 1.5px #c9ecff,0 0 16px rgba(74,168,255,.75),0 0 0 2px #22272e,0 1px 0 #101317}
#altlanebtn{border:0;border-radius:12px;color:#eaf6d6;background:linear-gradient(180deg,rgba(54,70,56,.94),rgba(18,26,20,.95));-webkit-tap-highlight-color:transparent;
  box-shadow:inset 0 0 0 1.5px rgba(214,242,156,.6),inset 0 1px 0 rgba(255,255,255,.3),0 0 0 2px #22272e,0 4px 0 #101317,0 7px 12px rgba(0,0,0,.4)}
#altlanebtn.armed{background:linear-gradient(180deg,#e6f8b8,#b5d877);color:#172619;box-shadow:inset 0 0 0 1.5px #fff,0 0 14px rgba(212,239,138,.6),0 0 0 2px #22272e,0 4px 0 #3e4d28}
/* route buttons: key badge + short name exist for sideways phones only (everywhere else the button reads exactly as before) */
.haunt-route .hr-key,.haunt-route .hr-short{display:none}.haunt-route b em{font-style:normal}

/* ===== v3.22.1 layout: sideways phones (short landscape: height <= 500, width >= 560; same query as slMode() in game.js) ===== */
@media (orientation:landscape) and (max-height:500px) and (min-width:560px){
  #pedals{--brkW:116px;--brkH:98px;--gasW:96px;--gasH:126px;padding:0 max(14px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left))}
  .pedal.brake{--padX:6px;--padH:70px}.pedal.gas{--padX:16px;--padH:104px} /* gas hit area 96 px wide (67 px even at the 70 % size), visible pad 64 */
  .pedal.park{width:48px;height:48px;margin:0 auto 12px 12px}.pedal.park .pmark{font-size:20px} /* P rides next to Brake (left thumb), leaving the Gas side free for ALT LANE */
  body.pedswap .pedal.park{margin:0 12px 12px auto}
  /* compact HUD: gas dial, distance card, track name, then coins / sound / pause */
  #hud{display:flex;padding:6px max(10px,env(safe-area-inset-right)) 6px max(10px,env(safe-area-inset-left))} /* flex even under 600 px wide (the portrait grid is for upright phones) */
  .hud-mid{margin-left:6px;max-width:none}
  #fueldial{width:76px;height:76px}
  .hud-fueltext{width:104px;margin-top:2px;gap:4px}.nextfuel{font-size:12px;padding:2px 8px}#lowfuel{font-size:12px;padding:3px 8px}
  #rocketmeter{width:100px;height:20px;line-height:16px;font-size:10px}
  .hud-mid{padding:3px 12px 6px;border-radius:16px}#dist{font-size:26px}.raceplace{font-size:13px;padding:1px 10px}#bestline{font-size:12px}
  .hud-mid .prog{width:150px;height:12px;margin-top:4px}
  .trackname{max-width:min(22vw,210px);padding:3px 10px 4px}.trackname b{font-size:10px}.trackname span{font-size:13px}
  #toasts{left:auto}
  .hud-right{gap:8px;margin-top:0}
  #hud .iconbtn{width:44px;height:44px}#hud .iconbtn .ico{width:24px;height:24px}
  .hud-right .coinpill{margin-right:52px;font-size:16px;padding:2px 10px 2px 3px}
  body.playing .iconbtn.floating{width:44px;height:44px;top:6px;right:calc(max(10px,env(safe-area-inset-right)) + 52px)}
  body.playing .iconbtn.floating .ico{width:24px;height:24px}
  #parkicon{top:134px;left:max(14px,env(safe-area-inset-left));width:56px;height:56px}#parkicon b{font-size:22px}#cruiseicon{top:146px;left:calc(max(14px,env(safe-area-inset-left)) + 62px);width:80px}
  #hauntbag{top:86px;left:max(10px,env(safe-area-inset-left));max-width:180px;white-space:normal;font-size:11px;line-height:1.3;padding:3px 8px}
  /* toasts: JS puts them under the distance card, left of the mini map; one at a time */
  #toasts{right:auto;align-items:flex-start}.toast{max-width:100%;padding:6px 12px;border-left-width:6px;border-radius:12px}.toast b{font-size:14px}.toast span{font-size:12px}
  #altlanebtn{min-width:150px;max-width:172px;min-height:46px;padding:5px 10px}
  #altlanebtn small{font-size:9px}
  /* the path call: map at the top (JS), choices in the bottom gap between Brake and Gas */
  #hauntchoices{bottom:max(12px,env(safe-area-inset-bottom));transform:none;padding:6px;border-radius:12px}
  #hauntchoicehint{font-size:11px;margin-bottom:4px;letter-spacing:.03em}
  .haunt-route{display:flex;align-items:center;gap:5px;min-height:46px;padding:4px 5px}
  .haunt-route .hr-key{display:inline-flex;flex:none;align-items:center;justify-content:center;width:24px;height:26px;border-radius:7px;background:linear-gradient(#ffe9b8,#f5c46a);color:#2a1640;font:900 15px/1 system-ui,sans-serif;font-style:normal;box-shadow:inset 0 -2px 0 rgba(0,0,0,.2)}
  .haunt-route b{min-width:0;overflow:hidden;text-overflow:ellipsis;font-size:12px;letter-spacing:-.01em}
  .haunt-route .hr-full,.haunt-route span{display:none}.haunt-route .hr-short{display:inline}
  .hb-wide .haunt-route .hr-full{display:inline}.hb-wide .haunt-route .hr-short{display:none}
  .hud-mid,#trackname,.hud-fueltext,#hauntbag,#cruiseicon{transition:opacity .2s}
  body.hw-call .hud-mid,body.hw-call #trackname,body.hw-call .hud-fueltext,body.hw-call #hauntbag,body.hw-call #cruiseicon{opacity:0;pointer-events:none}
  body.hw-call #parkbtn{visibility:hidden;pointer-events:none}
}
/* v3.22.1 layout: the smallest sideways phones (under 640 px wide): no room for the track name in the top row (it is on the Pause screen) */
@media (orientation:landscape) and (max-height:500px) and (min-width:560px) and (max-width:639px){#hud .trackname{display:none}}
/* v3.23 survival: the track name flashes when you cross into the next race of the chain */
.trackname.svflash{animation:svflash 1.8s ease-out}
@keyframes svflash{0%{transform:scale(1.14);background:linear-gradient(rgba(255,168,40,.92),rgba(232,90,26,.78));box-shadow:0 0 0 3px rgba(255,226,120,.95),0 6px 18px rgba(0,0,0,.35)}60%{transform:scale(1.02)}100%{transform:scale(1)}}
@media (prefers-reduced-motion:reduce){.trackname.svflash{animation:svflashrm 1.8s linear}@keyframes svflashrm{0%,70%{background:linear-gradient(rgba(255,168,40,.92),rgba(232,90,26,.78))}}}
.resextra li.svlaps{grid-column:1/-1}

/* ===== v3.23 menu: title front end — a racing-game menu over the live HD demo drive. Scoped to #title (and #mutebtn while
   the title shows); no other screen, HUD or gameplay style changes. Reserved corners for the site's injected chrome:
   top-left 52×52 (§17 parent mark), bottom-left 320×48 (§4 tray), bottom-right ~150×108 (✦ Aether + ◆⚡ pills). ===== */
#title{
  --m-glass:rgba(11,19,30,.76); --m-glass-hi:rgba(20,31,46,.86); --m-line:rgba(255,255,255,.13);
  --m-amber:#ffb22e; --m-amber-hi:#ffd66b; --m-orange:#ff8a1a; --m-brown:#3a1703;
  --m-text:#f6f2ea; --m-muted:#b4bdc8; --m-ui:system-ui,-apple-system,"SF Pro Text","Segoe UI",Roboto,"Helvetica Neue",sans-serif;
  --u:clamp(.82px,min(.1vw,calc((100vh - 70px) / 700)),1.5px);
  --m-r:calc(var(--u) * 18); --m-rs:calc(var(--u) * 12); --m-gap:calc(var(--u) * 14);
  --m-shadow:0 10px 28px rgba(2,6,12,.36),0 2px 6px rgba(2,6,12,.22);
  display:flex;align-items:flex-start;justify-content:flex-start;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;
  padding:calc(66px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) calc(62px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left));
  color:var(--m-text);font-family:var(--m-ui);-webkit-font-smoothing:antialiased;
  background:radial-gradient(130% 95% at 50% 42%,rgba(4,8,15,0) 52%,rgba(4,8,15,.5) 100%),
    linear-gradient(180deg,rgba(4,8,15,.45) 0%,rgba(4,8,15,0) 20%,rgba(4,8,15,0) 62%,rgba(4,8,15,.55) 100%);
}
#title .title-wrap{position:relative;isolation:isolate;margin:auto;width:100%;max-width:calc(var(--u) * 1060);min-height:100%;display:grid;gap:var(--m-gap);
  grid-template-columns:minmax(0,1fr) minmax(260px,31%);grid-template-rows:auto minmax(calc(var(--u) * 190),1fr) auto auto auto;
  grid-template-areas:"brand ." "show race" "feat race" "dock ." "keys keys";text-align:left}
#title button{font-family:var(--m-ui);-webkit-tap-highlight-color:transparent;touch-action:manipulation;cursor:pointer;min-height:44px;min-width:44px;
  transition:transform .14s ease,filter .14s ease,box-shadow .14s ease,background-color .16s ease,border-color .16s ease}
#title button:focus-visible,#title button.pad-focus{outline:3px solid #fff1bd;outline-offset:3px}
#title .btn:hover,#title .menu-card:hover{transform:translateY(-2px);filter:brightness(1.07)}
#title button:active{transform:translateY(2px) scale(.985);filter:brightness(.94)}

/* --- top bar: screen-level HUD pinned to the corners (profile left, wallet right; the mute button sits beside it) --- */
#title{--hud:clamp(44px,calc(var(--u) * 46),50px)}
#title .menu-topbar{position:fixed;z-index:3;top:calc(8px + env(safe-area-inset-top));left:calc(60px + env(safe-area-inset-left));right:calc(var(--hud) + 24px + env(safe-area-inset-right));
  display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:var(--hud);pointer-events:none}
#title .menu-topbar>*{pointer-events:auto}
#title .chips.sub{display:flex;margin:0;gap:0;min-width:0;flex:0 1 auto}
#title .slotchip{display:inline-flex;align-items:center;gap:9px;min-height:var(--hud);max-width:calc(var(--u) * 240);margin:0;padding:4px 15px 4px 5px;border-radius:999px;
  background:var(--m-glass);border:1px solid var(--m-line);color:var(--m-text);font:650 max(13px,calc(var(--u) * 13.5))/1.1 var(--m-ui);box-shadow:var(--m-shadow);
  -webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}
#title .slotchip b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:650}
#title .menu-avatar{flex:none;display:grid;place-items:center;width:calc(var(--hud) - 10px);height:calc(var(--hud) - 10px);border-radius:50%;background:linear-gradient(160deg,#ffd76a,#ff8a1a);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.65),inset 0 -2px 0 rgba(130,45,0,.35),0 0 0 2px rgba(255,178,46,.25)}
#title .menu-avatar{color:var(--m-brown);font:700 calc((var(--hud) - 10px) * .5)/1 var(--font);text-shadow:0 1px 0 rgba(255,255,255,.45)}
#title .menu-hud{display:flex;align-items:center;flex:0 1 auto;min-width:0;min-height:var(--hud);padding:0 4px 0 14px;border-radius:999px;background:var(--m-glass);
  border:1px solid var(--m-line);box-shadow:var(--m-shadow);-webkit-backdrop-filter:blur(14px) saturate(1.2);backdrop-filter:blur(14px) saturate(1.2);
  font:750 max(14px,calc(var(--u) * 14.5))/1 var(--m-ui);white-space:nowrap;font-variant-numeric:tabular-nums}
#title .menu-wallet,#title .menu-stars{display:flex;align-items:center;gap:7px;padding:0 12px;height:26px}
#title .menu-wallet{padding-left:0;color:#ffe7a6}
#title .menu-stars{border-left:1px solid var(--m-line)}
#title .menu-wallet .coin-ic{width:max(22px,calc(var(--u) * 23));height:max(22px,calc(var(--u) * 23));border-width:1.5px;flex:none}
#title .menu-wallet.bump{animation:bump .3s ease}
#title .menu-stars .ico{width:max(20px,calc(var(--u) * 21));height:max(20px,calc(var(--u) * 21));color:var(--m-amber-hi);flex:none}
#title .menu-stars .ico path{fill-opacity:.85}
#title .menu-hud .crw-chip{margin:0 4px;padding:6px 9px;font-size:10.5px;flex:none}
#title .menu-hud .crw-chip .crw-blaze{width:14px;height:14px}
#title .howchip{display:inline-flex;align-items:center;gap:7px;min-height:var(--hud);margin:-1px -1px -1px 2px;padding:0 12px 0 8px;border:0;border-left:1px solid var(--m-line);border-radius:0 999px 999px 0;
  background:transparent;color:var(--m-text);font:650 max(13px,calc(var(--u) * 13.5))/1 var(--m-ui);box-shadow:none}
#title .howchip:hover{background:rgba(255,255,255,.07)}
#title .how-q{display:grid;place-items:center;width:max(24px,calc(var(--u) * 25));height:max(24px,calc(var(--u) * 25));border-radius:50%;background:rgba(255,178,46,.16);color:var(--m-amber-hi);border:1.5px solid rgba(255,178,46,.6);font:800 13px/1 var(--m-ui)}
body.inmenu:has(#title:not(.hidden)) #mutebtn{--hud:clamp(44px,calc(clamp(.82px,min(.1vw,calc((100vh - 70px) / 700)),1.5px) * 46),50px);top:calc(8px + env(safe-area-inset-top));right:calc(16px + env(safe-area-inset-right));bottom:auto;width:var(--hud);height:var(--hud);
  background:rgba(11,19,30,.76);color:#ffd66b;border:1px solid rgba(255,255,255,.14);box-shadow:0 8px 22px rgba(2,6,12,.35);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}
body.inmenu:has(#title:not(.hidden)) #mutebtn .ico{width:56%;height:56%}

/* --- brand: the wordmark is one SVG (Fredoka, beveled face, dark rim, extruded depth, gloss and a sheen sweep) --- */
#title .menu-brand{grid-area:brand;position:relative;align-self:end;justify-self:start;width:fit-content;max-width:100%;min-width:0}
#title .logo{display:block;margin:0;font-size:0;line-height:0;letter-spacing:0;filter:none;width:calc(var(--u) * 470);max-width:100%}
#title .logo-svg{display:block;width:100%;height:auto;overflow:visible;filter:drop-shadow(0 calc(var(--u) * 8) calc(var(--u) * 12) rgba(0,0,0,.38));animation:m-logo-in .75s cubic-bezier(.2,.9,.25,1.12) both}
#title .lg-sheen{animation:m-sheen 7.5s 1.1s ease-in-out infinite}
#title .lg-streaks rect{animation:m-streak .75s .15s cubic-bezier(.2,.9,.25,1) both}
#title .logo.tap .logo-svg{animation:m-logo-tap .28s ease}
#title .menu-logo{position:relative}
#title .menu-brandline{position:absolute;top:100%;right:1.5%;margin-top:calc(var(--u) * 2);display:flex;flex-direction:row;align-items:center;gap:7px}
#title .beta-tag{display:inline-block;margin:0;padding:4px 7px 3px;border-radius:6px;transform:none;box-shadow:0 2px 8px rgba(0,0,0,.35);
  background:rgba(11,19,30,.82);border:1px solid rgba(255,178,46,.65);color:#ffd27a;font:800 max(10px,calc(var(--u) * 10.5))/1 var(--m-ui);letter-spacing:.16em}
#title .ver{position:static;margin:0 0 0 2px;opacity:.8;color:#e7ecf2;font:600 max(9.5px,calc(var(--u) * 10))/1 var(--m-ui);text-shadow:0 1px 3px rgba(0,0,0,.8);white-space:nowrap;pointer-events:none}
#title .tag{margin:calc(var(--u) * 4) 0 0 calc(var(--u) * 34);color:#f3eee6;font:600 calc(var(--u) * 15)/1.3 var(--m-ui);letter-spacing:.02em;text-shadow:0 2px 6px rgba(0,0,0,.65)}

/* --- modes: RACE owns the screen, SURVIVAL is the strong second --- */
#title .moderow{grid-area:race;display:flex;flex-direction:column;gap:var(--m-gap);margin:0;min-width:0;flex-wrap:nowrap}
#title .btn.play{position:relative;display:flex;align-items:center;gap:calc(var(--u) * 14);width:100%;min-width:0;margin:0;padding:calc(var(--u) * 16) calc(var(--u) * 20);
  border:0;border-radius:var(--m-r);text-align:left;text-shadow:none;overflow:hidden;animation:none;font:inherit}
#title #levelsbtn{flex:1 1 auto;min-height:calc(var(--u) * 120);color:var(--m-brown);
  background:repeating-linear-gradient(115deg,rgba(255,255,255,.08) 0 14px,rgba(255,255,255,0) 14px 30px),
    linear-gradient(180deg,#ffdb6e 0%,#ffb12a 48%,#ff9416 52%,#ef690b 100%);
  box-shadow:inset 0 2px 0 rgba(255,255,255,.7),inset 0 -4px 0 rgba(140,45,0,.32),0 5px 0 #9c4108,0 16px 34px rgba(255,128,18,.42)}
#title #levelsbtn:active{box-shadow:inset 0 2px 0 rgba(255,255,255,.6),inset 0 -3px 0 rgba(140,45,0,.3),0 2px 0 #9c4108,0 8px 18px rgba(255,128,18,.35)}
#title #levelsbtn::before{content:"";position:absolute;top:0;right:0;bottom:0;width:58%;pointer-events:none;opacity:.16;
  background:conic-gradient(#3a1703 25%,rgba(0,0,0,0) 0 50%,#3a1703 0 75%,rgba(0,0,0,0) 0) 0 0/calc(var(--u) * 26) calc(var(--u) * 26);
  -webkit-mask-image:linear-gradient(90deg,rgba(0,0,0,0),#000 85%);mask-image:linear-gradient(90deg,rgba(0,0,0,0),#000 85%)}
#title #levelsbtn>*{position:relative;z-index:1}
#title #levelsbtn>.race-chev{position:absolute}
/* big screens: RACE is a poster (icon top-left, progress top-right, name bottom-left, chevrons bottom-right) */
#title #levelsbtn{flex-direction:column;align-items:flex-start;justify-content:space-between;padding:calc(var(--u) * 20) calc(var(--u) * 22) calc(var(--u) * 22)}
#title #levelsbtn>.mode-copy{position:static;justify-content:flex-end;padding-right:calc(var(--u) * 70)}
#title #levelsbtn .race-prog{position:absolute;top:calc(var(--u) * 24);right:calc(var(--u) * 22);margin:0}
#title #levelsbtn::after{content:"";position:absolute;top:-10%;bottom:-10%;left:-45%;width:28%;background:linear-gradient(90deg,rgba(255,255,255,0),rgba(255,255,255,.6),rgba(255,255,255,0));
  transform:skewX(-20deg);pointer-events:none;animation:m-shine 4.8s 1.4s ease-in-out infinite}
#title #playbtn{flex:0 0 auto;min-height:calc(var(--u) * 92);color:var(--m-text);border:1.5px solid rgba(255,178,46,.6);
  background:linear-gradient(180deg,rgba(30,43,60,.9),rgba(12,20,31,.92));box-shadow:inset 0 1px 0 rgba(255,255,255,.09),0 4px 0 rgba(2,6,12,.55),var(--m-shadow);
  -webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}
#title #playbtn::after{display:none}
#title .mode-ic{flex:none;display:grid;place-items:center;width:calc(var(--u) * 58);height:calc(var(--u) * 58);border-radius:50%;
  background:rgba(58,23,3,.88);color:var(--m-amber-hi);box-shadow:inset 0 1px 0 rgba(255,255,255,.18),0 3px 8px rgba(80,25,0,.35)}
#title .mode-ic .ico{width:56%;height:56%}
#title #playbtn .mode-ic{width:calc(var(--u) * 48);height:calc(var(--u) * 48);background:rgba(255,178,46,.14);border:1.5px solid rgba(255,178,46,.6);box-shadow:none}
#title .mode-copy{display:flex;flex-direction:column;gap:calc(var(--u) * 5);min-width:0}
#title .mode-name{font:700 calc(var(--u) * 58)/.95 var(--font);letter-spacing:.02em;text-transform:uppercase}
#title #playbtn .mode-name{font-size:calc(var(--u) * 30)}
#title .btn.play small{display:block;font:650 calc(var(--u) * 13.5)/1.25 var(--m-ui);opacity:.82;white-space:normal}
#title .race-prog{display:inline-flex;align-self:flex-start;align-items:center;gap:7px;margin-top:calc(var(--u) * 6);padding:calc(var(--u) * 5) calc(var(--u) * 10);border-radius:999px;
  background:rgba(58,23,3,.82);color:#ffe9b8;font:650 calc(var(--u) * 12)/1 var(--m-ui);white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}
#title .race-prog b{color:var(--m-amber-hi);font-weight:800}
#title .race-prog:empty{display:none}
#title #levelsbtn .mode-copy{flex:1 1 auto}
#title .race-chev{position:absolute;z-index:1;right:calc(var(--u) * 20);bottom:calc(var(--u) * 20);flex:none;width:calc(var(--u) * 58);height:auto;fill:none;stroke:var(--m-brown);stroke-width:4.2;stroke-linecap:round;stroke-linejoin:round;opacity:.85;animation:m-chev 1.4s ease-in-out infinite}

/* --- showcase: your ride (live garage render) and the place (the Places tile art) --- */
#title .menu-showcase{grid-area:show;display:grid;grid-template-columns:minmax(0,1.12fr) minmax(0,1fr);gap:var(--m-gap);min-width:0;min-height:0}
#title .menu-card{position:relative;display:flex;flex-direction:column;min-width:0;min-height:0;margin:0;padding:calc(var(--u) * 13) calc(var(--u) * 15);overflow:hidden;
  border-radius:var(--m-r);border:1px solid var(--m-line);background:var(--m-glass);color:var(--m-text);text-align:left;box-shadow:var(--m-shadow);font:inherit}
#title .menu-cardhead{position:relative;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:8px;font:800 calc(var(--u) * 11.5)/1 var(--m-ui);
  letter-spacing:.15em;text-transform:uppercase;color:var(--m-amber-hi);text-shadow:0 1px 3px rgba(0,0,0,.6)}
#title .menu-go{display:inline-flex;align-items:center;gap:6px;padding:calc(var(--u) * 6) calc(var(--u) * 9) calc(var(--u) * 6) calc(var(--u) * 11);border-radius:999px;background:rgba(8,14,22,.55);border:1px solid rgba(255,255,255,.2);
  color:#fff;font:700 max(10px,calc(var(--u) * 11.5))/1 var(--m-ui);letter-spacing:.02em;text-transform:none}
#title .menu-go i{width:max(6px,calc(var(--u) * 6));height:max(6px,calc(var(--u) * 6));border-right:2px solid currentColor;border-top:2px solid currentColor;transform:rotate(45deg);margin:0 2px 0 -1px}
#title .menu-cardfoot{position:relative;z-index:2;display:flex;align-items:flex-end;justify-content:space-between;gap:10px;margin-top:auto;min-width:0}
#title .menu-cardfoot>b{min-width:0;font:700 calc(var(--u) * 22)/1.1 var(--font);letter-spacing:.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-shadow:0 2px 6px rgba(0,0,0,.6)}
#title .ride-card{background:radial-gradient(70% 55% at 50% 0%,rgba(255,214,150,.2),rgba(255,214,150,0) 70%),
    radial-gradient(58% 26% at 50% 80%,rgba(255,150,40,.32),rgba(255,150,40,0) 72%),linear-gradient(180deg,#1d2b3d 0%,#101a27 60%,#0a111b 100%)}
#title .ride-card::before{content:"";position:absolute;left:-20%;right:-20%;bottom:0;height:46%;pointer-events:none;
  background:repeating-linear-gradient(90deg,rgba(255,255,255,.07) 0 1px,rgba(255,255,255,0) 1px 38px),repeating-linear-gradient(0deg,rgba(255,255,255,.05) 0 1px,rgba(255,255,255,0) 1px 22px);
  transform:perspective(260px) rotateX(58deg);transform-origin:50% 100%;-webkit-mask-image:linear-gradient(rgba(0,0,0,0),#000 70%);mask-image:linear-gradient(rgba(0,0,0,0),#000 70%)}
#title .ride-stage{position:absolute;z-index:1;left:3%;right:3%;top:15%;bottom:19%}
#title .ride-stage canvas{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 calc(var(--u) * 10) calc(var(--u) * 8) rgba(0,0,0,.5))}
#title .menu-artstatus{position:absolute;z-index:2;left:0;right:0;top:50%;text-align:center;font:600 12px/1.2 var(--m-ui);color:#e5d3b8}
#title .menu-artstatus:empty{display:none}
#title .ride-ups{flex:none;display:flex;flex-direction:column;align-items:flex-end;gap:calc(var(--u) * 5)}
#title .ride-ups em{font:750 calc(var(--u) * 9.5)/1 var(--m-ui);font-style:normal;letter-spacing:.12em;text-transform:uppercase;color:var(--m-muted);white-space:nowrap}
#title .ride-ups em b{color:var(--m-amber-hi);letter-spacing:.04em}
#title .ups-bar{display:grid;grid-template-columns:repeat(4,calc(var(--u) * 24));gap:calc(var(--u) * 3)}
#title .ups-bar i{display:block;height:calc(var(--u) * 6);border-radius:3px;
  background:repeating-linear-gradient(90deg,rgba(0,0,0,0) 0 calc(20% - 1px),rgba(10,17,27,.95) calc(20% - 1px) 20%),
    linear-gradient(90deg,var(--m-amber-hi),var(--m-orange)) 0 0/calc(var(--n,0) * 100%) 100% no-repeat,rgba(255,255,255,.16)}
#title .place-card{background:#14212f}
#title .place-card canvas{position:absolute;left:0;top:0;width:100%;height:128%;object-fit:cover;object-position:50% 0;transform-origin:50% 30%;transition:transform .6s ease}
#title .place-card:hover canvas{transform:scale(1.04)}
#title .place-card::after{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;
  background:linear-gradient(180deg,rgba(5,10,18,.6) 0%,rgba(5,10,18,0) 30%,rgba(5,10,18,0) 50%,rgba(5,10,18,.9) 100%)}
#title .place-meta{flex:none;display:flex;flex-direction:column;align-items:flex-end;gap:3px;font:650 max(11px,calc(var(--u) * 11.5))/1.1 var(--m-ui);color:#e3e9f0;white-space:nowrap;text-shadow:0 1px 3px rgba(0,0,0,.8)}
#title .pm-stars{color:var(--m-amber-hi);font-size:calc(var(--u) * 14);letter-spacing:1px}
#title .pm-stars em{font:750 calc(var(--u) * 9.5)/1 var(--m-ui);font-style:normal;letter-spacing:.12em;text-transform:uppercase;color:var(--m-muted);vertical-align:2px;margin-right:2px}
#title.menu-lite *,body.inmenu:has(#title.menu-lite:not(.hidden)) #mutebtn{-webkit-backdrop-filter:none!important;backdrop-filter:none!important}
#title.menu-lite{--m-glass:rgba(11,19,30,.9)}

/* --- featured event + Daily Drive --- */
#title .menu-feature{grid-area:feat;display:grid;grid-template-columns:minmax(0,1.75fr) minmax(0,1fr);gap:var(--m-gap);min-width:0}
#title.menu-noevent .menu-feature{grid-template-columns:minmax(0,1fr)}
#title .menu-event{flex-direction:row;align-items:center;gap:calc(var(--u) * 12);min-height:calc(var(--u) * 92);padding:calc(var(--u) * 10) calc(var(--u) * 14) calc(var(--u) * 10) calc(var(--u) * 10);
  border-color:rgba(255,178,46,.45);background:radial-gradient(55% 130% at 9% 50%,rgba(255,178,46,.32),rgba(255,178,46,0) 70%),linear-gradient(100deg,#1d2a3d 0%,#121c2b 48%,#0b121c 100%)}
/* event themes (TITLE_EVENTS[].theme): the default card is the menu's own navy + amber; 'halloween' adds the jack-o'-lantern night */
#title .menu-event[data-theme="halloween"]{border-color:rgba(255,138,30,.5);background:radial-gradient(55% 130% at 9% 50%,rgba(255,128,20,.5),rgba(255,128,20,0) 70%),linear-gradient(100deg,#2b0f2c 0%,#1c0c22 48%,#110916 100%)}
#title .menu-event:not([data-theme="halloween"]) .ev-pumpkin{display:none}
#title .menu-event img{position:absolute;top:0;right:0;width:72%;height:100%;object-fit:cover;object-position:62% 60%;opacity:.9;
  -webkit-mask-image:linear-gradient(90deg,rgba(0,0,0,0),#000 45%);mask-image:linear-gradient(90deg,rgba(0,0,0,0),#000 45%)}
#title .menu-event::before{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;background:linear-gradient(90deg,rgba(17,9,22,.25),rgba(17,9,22,0) 40%,rgba(17,9,22,.15) 75%,rgba(17,9,22,.5))}
#title #titleeventride{position:absolute;z-index:1;right:calc(var(--u) * 8);bottom:calc(var(--u) * -4);height:88%;width:auto;aspect-ratio:420/220;max-width:36%;
  filter:drop-shadow(0 6px 8px rgba(0,0,0,.65)) drop-shadow(0 0 16px rgba(255,120,20,.4))}
#title #titleeventride[hidden]{display:none}
#title .ev-pumpkin{position:relative;z-index:2;flex:none;width:calc(var(--u) * 60);height:calc(var(--u) * 60);overflow:visible;filter:drop-shadow(0 0 calc(var(--u) * 12) rgba(255,150,30,.85))}
#title .ev-face{animation:m-flicker 2.8s ease-in-out infinite}
#title .menu-eventcopy{position:relative;z-index:2;display:flex;flex-direction:column;gap:calc(var(--u) * 5);min-width:0;max-width:calc(64% - var(--u) * 80);text-shadow:0 2px 6px rgba(0,0,0,.7)}
#title .menu-eyebrow{display:flex;align-items:center;gap:7px;font:800 calc(var(--u) * 10.5)/1 var(--m-ui);letter-spacing:.15em;text-transform:uppercase;color:#ffc58a;white-space:nowrap}
#title .menu-new{padding:3px 6px 2px;border-radius:5px;background:linear-gradient(180deg,#ffd25e,#ff8a1a);color:var(--m-brown);letter-spacing:.1em;text-shadow:none;box-shadow:0 0 12px rgba(255,140,30,.65)}
#title .menu-event strong{font:700 calc(var(--u) * 27)/1 var(--font);color:#fff4e2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#title .menu-event small{font:600 calc(var(--u) * 12.5)/1.25 var(--m-ui);color:#f5dcc4}
#title .ev-go{position:absolute;z-index:2;top:calc(var(--u) * 10);right:calc(var(--u) * 10);background:linear-gradient(180deg,#ffd25e,#ff8a1a);border:0;color:var(--m-brown);box-shadow:0 2px 10px rgba(255,130,20,.5)}
#title #dailybtn{display:flex;flex-direction:row;align-items:center;gap:calc(var(--u) * 12);min-height:calc(var(--u) * 92);margin:0;padding:calc(var(--u) * 10) calc(var(--u) * 14);font-size:inherit;
  background:var(--m-glass);box-shadow:var(--m-shadow);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}
#title .dd-ic{flex:none;display:grid;place-items:center;width:calc(var(--u) * 48);height:calc(var(--u) * 48);border-radius:calc(var(--u) * 13);color:var(--m-amber-hi);
  background:linear-gradient(160deg,rgba(255,214,107,.22),rgba(255,138,26,.1));border:1px solid rgba(255,178,46,.5)}
#title .dd-ic .ico{width:55%;height:55%}
#title .dd-copy{display:flex;flex-direction:column;gap:calc(var(--u) * 4);min-width:0}
#title .dd-k{font:800 calc(var(--u) * 10.5)/1 var(--m-ui);letter-spacing:.15em;text-transform:uppercase;color:var(--m-amber-hi);white-space:nowrap}
#title #dailytxt{font:700 calc(var(--u) * 26)/1 var(--font);color:#fff;white-space:nowrap}
#title #dailycountdown{font:600 calc(var(--u) * 12)/1.2 var(--m-ui);color:var(--m-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-variant-numeric:tabular-nums}
#title #dailybtn.done{border-color:rgba(120,230,150,.5)}
#title #dailybtn.done .dd-ic{color:#8ff0a8;border-color:rgba(120,230,150,.55);background:rgba(80,200,120,.14)}

/* --- dock: one glass bar --- */
#title .menu-row{grid-area:dock;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:calc(var(--u) * 4);margin:0;padding:calc(var(--u) * 5);
  border-radius:calc(var(--m-r) + 4px);background:var(--m-glass);border:1px solid var(--m-line);box-shadow:var(--m-shadow);
  -webkit-backdrop-filter:blur(14px) saturate(1.2);backdrop-filter:blur(14px) saturate(1.2)}
#title .btn.tile{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:calc(var(--u) * 5);min-width:0;width:auto;min-height:max(48px,calc(var(--u) * 62));margin:0;
  padding:calc(var(--u) * 7) 2px;border:0;border-radius:var(--m-rs);background:transparent;color:#e9eef4;box-shadow:none;text-shadow:none;
  font:650 calc(var(--u) * 13)/1.05 var(--m-ui);letter-spacing:.01em;white-space:nowrap}
#title .btn.tile em{display:grid;place-items:center;font-size:0;color:var(--m-amber-hi)}
#title .btn.tile em .ico{width:calc(var(--u) * 25);height:calc(var(--u) * 25)}
#title .btn.tile:hover{background:rgba(255,255,255,.08);transform:none}
#title .btn.tile:active{background:rgba(255,178,46,.16)}
#title .keys{grid-area:keys;margin:0;max-width:none;color:rgba(234,239,245,.74);font:500 max(12px,calc(var(--u) * 12))/1.55 var(--m-ui);text-shadow:0 1px 3px rgba(0,0,0,.85)}
#title .keys kbd{background:rgba(255,255,255,.12);border-color:rgba(255,255,255,.35)}
@media (hover:none),(pointer:coarse){#title .keys{display:none}}

/* --- entrance + juice (all of it off under reduced motion / ?motion=off) --- */
#title .menu-topbar,#title .moderow,#title .menu-showcase,#title .menu-feature,#title .menu-row{animation:m-rise .55s cubic-bezier(.2,.8,.25,1) both}
#title .menu-topbar{animation-name:m-drop}
#title .moderow{animation-delay:.08s}#title .menu-showcase{animation-delay:.14s}#title .menu-feature{animation-delay:.2s}#title .menu-row{animation-delay:.26s}
@keyframes m-logo-in{from{opacity:0;transform:translateX(calc(var(--u) * -28)) scale(.96)}to{opacity:1;transform:none}}
@keyframes m-logo-tap{50%{transform:scale(1.035) rotate(-.7deg)}}
@keyframes m-streak{from{opacity:0;transform:translateX(40px)}to{opacity:1;transform:none}}
@keyframes m-sheen{0%{transform:translateX(0)}24%,100%{transform:translateX(1150px)}}
@keyframes m-shine{0%,62%{left:-45%}100%{left:125%}}
@keyframes m-chev{0%,100%{transform:translateX(0)}50%{transform:translateX(5px)}}
@keyframes m-flicker{0%,100%{opacity:1}40%{opacity:.8}52%{opacity:.96}70%{opacity:.86}}
@keyframes m-rise{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
@keyframes m-drop{from{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:none}}

/* --- phone sideways (Jesse's main way to play): logo shares the top row with the HUD, RACE column on the right --- */
@media (orientation:landscape) and (max-height:520px){
  #title{--u:1px;--m-gap:8px;--m-r:14px;--m-rs:10px;--m-right:max(36px,calc(14px + env(safe-area-inset-right)));padding:calc(8px + env(safe-area-inset-top)) var(--m-right) calc(58px + env(safe-area-inset-bottom)) calc(14px + env(safe-area-inset-left))}
  #title .title-wrap{max-width:none;grid-template-columns:minmax(0,1fr) minmax(190px,31%);grid-template-rows:auto minmax(96px,1fr) auto auto;grid-template-areas:"brand ." "show race" "feat race" "dock ."}
  #title .menu-topbar{right:calc(66px + env(safe-area-inset-right));left:auto;justify-content:flex-end} /* HUD flush to the corner like the mute; only the RACE column keeps clear of the bell tab */
  #title .menu-brand{margin-left:40px;align-self:start}
  #title .logo{width:236px}
  #title .tag,#title .keys{display:none} /* no keys area in this grid (an unplaced item would add an implicit column) */
  #title .menu-brandline{top:50%;left:100%;right:auto;transform:translateY(-50%);margin:0 0 0 4px;flex-direction:column;align-items:flex-start;gap:3px}
  #title .slotchip{padding-right:12px;max-width:128px;font-size:12px}
  #title .menu-hud{padding-left:12px;font-size:13px}
  #title .how-t{display:none}
  #title .howchip{padding:0 10px 0 8px}
  #title .btn.play,#title #levelsbtn{padding:10px 14px;gap:10px;flex-direction:row;align-items:center;justify-content:flex-start}
  #title #levelsbtn>.mode-copy{position:relative;padding-right:0}
  #title #levelsbtn .race-prog{position:static;margin-top:5px}
  #title #levelsbtn{min-height:96px}
  #title #playbtn{min-height:54px}
  #title .mode-ic{width:44px;height:44px}
  #title #playbtn .mode-ic{width:34px;height:34px}
  #title .mode-name{font-size:36px}
  #title #playbtn .mode-name{font-size:21px}
  #title .btn.play small{font-size:11px}
  #title #playbtn small{display:none}
  #title .race-chev,#title .rp-where{display:none}
  #title #levelsbtn small{white-space:nowrap}
  #title .menu-card{padding:9px 11px}
  #title .menu-cardhead{font-size:10px;letter-spacing:.13em}
  #title .menu-go{padding:4px 7px 4px 9px;font-size:10px}
  #title .menu-cardfoot>b{font-size:16px}
  #title .ride-stage{min-height:40px;margin:0 -4px}
  #title .ride-ups,#title .dd-where{display:none}
  #title .ride-stage{top:17%;bottom:17%}
  #title .race-prog{margin-top:5px;padding:4px 8px;font-size:10.5px}
  #title .menu-eventcopy{max-width:calc(66% - 50px)}
  #title .place-meta{font-size:10px}
  #title .menu-event,#title #dailybtn{min-height:56px;padding:6px 10px}
  #title .menu-event{padding-left:6px;gap:8px}
  #title .ev-pumpkin{width:42px;height:42px}
  #title .menu-eventcopy{gap:3px}
  #title .menu-eyebrow,#title .dd-k{font-size:9px;letter-spacing:.12em}
  #title .menu-event strong{font-size:19px}
  #title .menu-event small{font-size:10.5px}
  #title .ev-go{display:none}
  #title #dailytxt{font-size:19px}
  #title #dailycountdown{font-size:10.5px}
  #title .dd-ic{width:36px;height:36px;border-radius:10px}
  #title .btn.tile{min-height:48px;padding:5px 2px;gap:3px;font-size:11px}
  #title .btn.tile em .ico{width:20px;height:20px}
}
@media (orientation:landscape) and (max-height:520px) and (max-width:900px){
  #title .slotchip b{display:none}
  #title .slotchip{padding:4px}
  #title .logo{width:206px}
  #title .menu-wallet,#title .menu-stars{padding:0 9px;gap:6px}
  #title .menu-wallet{padding-left:0}
  #title .menu-hud .crw-chip{margin:0 2px;padding:5px 7px;font-size:10px;letter-spacing:.02em}
}
@media (orientation:landscape) and (max-height:520px) and (max-width:720px){
  #title .logo{width:170px}
  #title .menu-topbar{gap:6px}
  #title .menu-hud{font-size:12px}
  #title .menu-wallet,#title .menu-stars{padding:0 7px;gap:5px}
  #title .menu-wallet{padding-left:0}
  #title .menu-hud{padding-left:10px}
  #title .title-wrap{grid-template-columns:minmax(0,1fr) minmax(176px,32%)}
  #title .mode-name{font-size:31px}
  #title .slotchip b{display:none}
  #title .slotchip{padding:4px}
  #title .menu-hud .crw-chip{font-size:0;gap:0;padding:6px}
  #title .ride-ups,#title .evh-x{display:none}
  #title #titleeventride{max-width:33%;right:2px}
  #title .menu-event strong{font-size:18px}
  #title #levelsbtn small{white-space:normal}
}

/* --- phone portrait: one column; RACE sits in the thumb zone above the dock --- */
@media (orientation:portrait) and (max-width:600px){
  #title{--u:1px;--m-gap:9px;--m-r:16px;padding:calc(58px + env(safe-area-inset-top)) calc(14px + env(safe-area-inset-right)) calc(110px + env(safe-area-inset-bottom)) calc(14px + env(safe-area-inset-left))}
  #title .title-wrap{max-width:none;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto minmax(140px,1fr) auto auto auto;
    grid-template-areas:"hud" "brand" "show" "race" "feat" "dock"}
  /* two rows up top: profile + mute pinned to the corners, the wallet bar centred under them (a six-figure wallet still fits) */
  #title .menu-topbar{display:contents}
  #title .chips.sub{position:fixed;z-index:3;top:calc(8px + env(safe-area-inset-top));left:calc(58px + env(safe-area-inset-left));animation:m-drop .55s both}
  #title .menu-hud{grid-area:hud;justify-self:center;max-width:100%;margin-top:-2px;padding-left:12px;font-size:13px;animation:m-drop .55s both}
  #title .slotchip{max-width:calc(100vw - 150px)}
  #title .menu-wallet,#title .menu-stars{padding:0 9px;gap:6px}
  #title .menu-wallet{padding-left:0}
  #title .menu-hud .crw-chip{font-size:0;gap:0;padding:6px;margin:0 2px}
  #title .how-t{display:none}
  #title .howchip{padding:0 9px 0 7px}
  #title .keys{display:none}
  #title .menu-brand{justify-self:center;align-self:center;margin:2px 0 0}
  #title .logo{width:min(290px,78vw)}
  #title .tag{text-align:left;margin:4px 0 0 11%;font-size:13px}
  #title .menu-brandline{right:0}
  #title .moderow{flex-direction:row;gap:10px}
  #title #levelsbtn{flex:1.45 1 0;min-height:88px;padding:10px 12px;gap:9px;flex-direction:row;align-items:center;justify-content:flex-start}
  #title #levelsbtn>.mode-copy{position:relative;padding-right:0}
  #title #levelsbtn .race-prog{position:static;margin-top:6px}
  #title #playbtn{flex:1 1 0;min-height:88px;padding:10px 10px;gap:8px;flex-direction:column;align-items:flex-start;justify-content:center}
  #title .mode-ic{width:40px;height:40px}
  #title #playbtn .mode-ic{display:none}
  #title .mode-name{font-size:34px}
  #title #playbtn .mode-name{font-size:21px}
  #title .btn.play small{font-size:11px}
  #title .race-chev,#title #levelsbtn .mode-ic{display:none}
  #title .race-prog{font-size:11px;padding:4px 9px}
  #title .menu-card{padding:10px 12px}
  #title .menu-cardhead{font-size:10px;letter-spacing:.12em}
  #title .menu-go{padding:4px 7px 4px 9px;font-size:10px}
  #title .menu-cardfoot{flex-direction:column;align-items:flex-start;gap:5px}
  #title .menu-cardfoot>b{font-size:17px;max-width:100%}
  #title .place-meta{flex-direction:row;gap:8px}
  #title .ride-ups{align-items:flex-start}
  #title .ride-stage{top:17%;bottom:31%}
  #title .ups-bar{grid-template-columns:repeat(4,minmax(0,26px))}
  #title .menu-feature{grid-template-columns:minmax(0,1fr)}
  #title .menu-event{min-height:84px}
  #title .ev-pumpkin{width:50px;height:50px}
  #title .menu-event strong{font-size:23px}
  #title .menu-event small{font-size:11.5px}
  #title .ev-go{display:none}
  #title #titleeventride{max-width:44%;height:80%}
  #title .menu-eventcopy{max-width:calc(58% - 62px)}
  #title #dailybtn{min-height:56px;padding:6px 12px}
  #title .dd-copy{flex-direction:row;flex-wrap:wrap;align-items:baseline;column-gap:10px;row-gap:3px}
  #title .dd-k{flex-basis:100%}
  #title #dailytxt{font-size:20px}
  #title .dd-ic{width:38px;height:38px;border-radius:11px}
  #title .btn.tile{min-height:56px;font-size:11px;gap:4px}
  #title .btn.tile em .ico{width:22px;height:22px}
}
@media (max-width:1599px){#title .evh-x{display:none}} /* the extra hint line only where the card is wide; the car art says it anyway */
/* --- tablet portrait: the phone column, larger --- */
@media (orientation:portrait) and (min-width:601px){
  #title{--u:clamp(1px,calc(100vw / 760),1.5px);padding-top:calc(72px + env(safe-area-inset-top));padding-bottom:calc(112px + env(safe-area-inset-bottom))}
  #title .title-wrap{max-width:calc(var(--u) * 660);grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(calc(var(--u) * 220),calc(var(--u) * 300)) auto auto auto;align-content:center;
    grid-template-areas:"brand" "show" "race" "feat" "dock"}
  #title .keys{display:none}
  #title .menu-brand{justify-self:center}
  #title .logo{width:calc(var(--u) * 520)}
  #title .tag{text-align:center;margin-left:0}
  #title .moderow{flex-direction:row}
  #title #levelsbtn{flex:1.5 1 0;min-height:calc(var(--u) * 116);flex-direction:row;align-items:center;justify-content:flex-start;padding:calc(var(--u) * 14) calc(var(--u) * 18)}
  #title #levelsbtn>.mode-copy{position:relative}
  #title #levelsbtn .race-prog{position:static;margin-top:calc(var(--u) * 6)}
  #title .mode-name{font-size:calc(var(--u) * 48)}
  #title #playbtn{flex:1 1 0;min-height:calc(var(--u) * 116)}
}

/* --- reduced motion (OS, the site's Less-motion setting) and ?motion=off --- */
@media (prefers-reduced-motion:reduce){
  #title *,#title *::before,#title *::after{animation:none!important;transition:none!important}
  #title button:active,#title .btn:hover,#title .menu-card:hover{transform:none}
}
#title.menu-still *,#title.menu-still *::before,#title.menu-still *::after{animation:none!important;transition:none!important}
/* ===== v3.23 menu: end title front end ===== */

/* ===== v3.24 gift: Halloween Week receipt card (code-drawn: emoji + CSS; tap outside / Esc / Collect close it) ===== */
.hdgift{position:fixed;inset:0;z-index:70;display:none;align-items:center;justify-content:center;padding:max(12px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));background:radial-gradient(ellipse at center,rgba(46,12,60,.6),rgba(10,4,20,.86));animation:fadein .25s ease}
.hdgift.on{display:flex}
.hg-panel{position:relative;overflow-x:hidden;overflow-y:auto;width:min(440px,100%);max-height:100%;text-align:center;padding:20px 22px 14px;border-radius:28px;border:3px solid #ff9a2e;color:#fff4e2;
  background:radial-gradient(70% 55% at 50% 0%,rgba(255,140,30,.38),rgba(255,140,30,0) 70%),linear-gradient(180deg,#3d1554 0%,#24103c 55%,#140a22 100%);
  box-shadow:0 0 0 5px rgba(255,154,46,.16),0 0 44px rgba(255,130,20,.45),0 24px 60px rgba(0,0,0,.55);animation:popin .45s cubic-bezier(.2,1.6,.4,1)}
.hg-sky{position:absolute;inset:0;pointer-events:none}
.hg-sky i{position:absolute;font-style:normal;line-height:1}
.hg-moon{top:14px;right:20px;width:40px;height:40px;border-radius:50%;background:radial-gradient(circle at 36% 34%,#fffbe0,#ffe08a 58%,#e9b94a);box-shadow:0 0 24px rgba(255,224,138,.7)}
.hg-st{width:4px;height:4px;border-radius:50%;background:#fff;box-shadow:0 0 6px #fff;animation:hgtw 2.2s ease-in-out infinite}
.hg-st.s1{top:22px;left:28px}.hg-st.s2{top:64px;left:70px;animation-delay:.7s}.hg-st.s3{top:30px;right:84px;animation-delay:1.3s}
.hg-bat{font-size:22px;top:18px;left:17%;animation:hgbat 3.2s ease-in-out infinite}
.hg-bat.b2{font-size:16px;top:46px;left:auto;right:24%;animation-delay:-1.4s}
.hg-ghost{font-size:26px;bottom:58px;left:14px;opacity:.85;animation:hgfloat 3.6s ease-in-out infinite}
.hg-candy{font-size:22px;bottom:60px;right:16px;animation:hgfloat 3s ease-in-out infinite;animation-delay:-1s}
.hg-pk{position:relative;font-size:62px;line-height:1;margin:2px 0;filter:drop-shadow(0 0 16px rgba(255,150,30,.85));animation:hgbob 1.6s ease-in-out infinite}
.hg-kick{position:relative;margin:6px 0 8px;font:800 16px/1.15 var(--font);letter-spacing:.14em;text-transform:uppercase;color:#ffc58a;text-shadow:0 2px 6px rgba(0,0,0,.6)}
.hg-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.hg-amt{position:relative;display:inline-flex;align-items:center;gap:10px;margin:0 0 4px;padding:6px 18px 6px 8px;border-radius:999px;background:linear-gradient(#fffbe6,#fff0b0);border:3px solid var(--gold);color:#3a2a00;box-shadow:0 4px 0 rgba(160,110,0,.45),0 0 28px rgba(255,210,63,.5)}
.hg-amt .coin-ic{width:34px;height:34px;flex:none}
.hg-amt b{font:900 40px/1 var(--font);font-variant-numeric:tabular-nums;min-width:4.4em;text-align:left}
.hg-unit{font:800 18px/1 var(--font)}
.hdgift.done .hg-amt{animation:hgpop .45s cubic-bezier(.2,1.6,.4,1)}
.hg-sub{position:relative;margin:8px auto 2px;max-width:30ch;font:600 15px/1.35 var(--font);color:#f5dcc4}
.hdgift .btn.play{font-size:28px;padding:12px 46px;margin:10px 0 4px;min-height:48px;background:linear-gradient(#ffd25e,#ff8a1a);color:#3a1703;box-shadow:0 7px 0 #b4570a,0 12px 24px rgba(0,0,0,.35),inset 0 2px 0 rgba(255,255,255,.6);text-shadow:none}
.hdgift .btn.play:focus-visible{outline:3px solid #fff;outline-offset:3px}
.hg-foot{position:relative;margin:6px 0 0;font:700 12px/1.2 var(--font);letter-spacing:.08em;color:#cfb0ea}
@keyframes hgbob{50%{transform:translateY(-6px) rotate(-4deg)}}
@keyframes hgbat{0%,100%{transform:translate(0,0)}50%{transform:translate(12px,-6px)}}
@keyframes hgfloat{50%{transform:translateY(-8px)}}
@keyframes hgtw{50%{opacity:.25}}
@keyframes hgpop{40%{transform:scale(1.12)}}
@media (orientation:landscape) and (max-height:500px){ /* sideways phones */
  .hg-panel{width:min(500px,100%);padding:8px 18px 8px;border-radius:22px}
  .hg-pk{font-size:38px;margin:0}.hg-kick{font-size:12.5px;margin:2px 0 5px}
  .hg-amt{padding:4px 14px 4px 6px}.hg-amt b{font-size:28px}.hg-amt .coin-ic{width:24px;height:24px}.hg-unit{font-size:14px}
  .hg-sub{font-size:13px;margin:4px auto 0;max-width:40ch}.hdgift .btn.play{font-size:21px;padding:7px 36px;margin:6px 0 2px;min-height:44px}
  .hg-foot{margin-top:4px;font-size:11px}.hg-moon{width:28px;height:28px;top:10px;right:14px}.hg-ghost,.hg-candy{bottom:12px;font-size:20px}.hg-bat{font-size:17px}.hg-bat.b2{font-size:13px}
}
@media (max-width:380px){.hg-amt b{font-size:32px}.hdgift .btn.play{font-size:24px;padding:10px 34px}}
@media (prefers-reduced-motion:reduce){.hdgift,.hdgift *,.hdgift *::before,.hdgift *::after{animation:none!important;transition:none!important}}
body.redmo .hdgift,body.redmo .hdgift *,body.redmo .hdgift *::before,body.redmo .hdgift *::after{animation:none!important;transition:none!important}
/* ===== v3.24 gift: end ===== */

/* v3.25 perf: Cars menu thumbnails (same box and look as the old live canvas; the gradient shows while a picture loads) */
.card img.vthumb{width:100%;height:auto;aspect-ratio:420/230;display:block;background:linear-gradient(#dff3ff,#f7fbff);-webkit-user-drag:none;-webkit-touch-callout:none;user-select:none}
.card.locked img.vthumb{filter:grayscale(.75) brightness(.8)}

/* ===== v3.27 menus: every screen after the title in the title's language (Jesse: "upgrade all menus to match main menu").
   Dark glass sheets over the live HD drive, the one amber family, Fredoka headings + the clean UI face for labels, one
   obvious primary action per screen (amber), quiet glass for everything else. Look only: every id, handler and the DOM
   (= keyboard / controller focus) order is unchanged; CSS flex `order` only shows Back in the sheet's header bar.
   Scope: .screen:not(#title) (specificity beats the old class rules and the injected slot / vehicle-tab styles),
   #howit, the toasts and #mutebtn while a menu shows. Site chrome kept clear like the title: top-left parent mark,
   top-right mute, bottom band (tray, ✦ and ◆⚡ pills). ===== */
:root{
  --m-glass:rgba(11,19,30,.76); --m-line:rgba(255,255,255,.13); --m-amber:#ffb22e; --m-amber-hi:#ffd66b; --m-orange:#ff8a1a; --m-brown:#3a1703;
  --m-text:#f6f2ea; --m-muted:#b4bdc8; --m-ui:system-ui,-apple-system,"SF Pro Text","Segoe UI",Roboto,"Helvetica Neue",sans-serif;
  --m-shadow:0 10px 28px rgba(2,6,12,.36),0 2px 6px rgba(2,6,12,.22);
  --m-sheet:linear-gradient(180deg,rgba(25,37,54,.9) 0%,rgba(12,20,31,.93) 100%); --m-head:rgba(22,33,49,.97);
  --m-well:rgba(255,255,255,.05); --m-well-hi:rgba(255,255,255,.08); --m-well-line:rgba(255,255,255,.1);
  --m-amber-grad:linear-gradient(180deg,#ffdb6e 0%,#ffb12a 48%,#ff9416 52%,#ef690b 100%);
  --m-amber-bevel:inset 0 2px 0 rgba(255,255,255,.7),inset 0 -3px 0 rgba(140,45,0,.32),0 4px 0 #9c4108,0 10px 22px rgba(255,128,18,.32);
  --m-amber-tint:linear-gradient(180deg,rgba(255,190,70,.2),rgba(255,138,26,.08)); --m-amber-line:rgba(255,178,46,.72);
  --m-ok:#8ff0a8; --m-ok-bg:rgba(80,200,120,.14); --m-ok-line:rgba(120,230,150,.55);
  --m-bad:#ffab9c; --m-bad-bg:rgba(255,90,70,.14); --m-bad-line:rgba(255,120,100,.55);
  --m-stage:radial-gradient(70% 60% at 50% 0%,rgba(255,214,150,.16),rgba(255,214,150,0) 70%),radial-gradient(60% 28% at 50% 86%,rgba(255,150,40,.26),rgba(255,150,40,0) 72%),linear-gradient(180deg,#22324a 0%,#142030 62%,#0d1622 100%);
}

/* --- the screen: a soft vignette over the live drive; the sheet keeps clear of the site chrome (like the title) --- */
.screen:not(#title){align-items:center;justify-content:center;
  padding:calc(12px + env(safe-area-inset-top)) calc(74px + env(safe-area-inset-right)) calc(64px + env(safe-area-inset-bottom)) calc(68px + env(safe-area-inset-left));
  background:radial-gradient(120% 100% at 50% 45%,rgba(4,8,15,.3) 0%,rgba(4,8,15,.66) 100%);animation:m-fade .22s ease both}
@media (orientation:portrait){.screen:not(#title){padding:calc(66px + env(safe-area-inset-top)) calc(12px + env(safe-area-inset-right)) calc(64px + env(safe-area-inset-bottom)) calc(12px + env(safe-area-inset-left))}}
@media (orientation:landscape) and (max-height:520px){.screen:not(#title){padding:calc(8px + env(safe-area-inset-top)) calc(70px + env(safe-area-inset-right)) calc(58px + env(safe-area-inset-bottom)) calc(62px + env(safe-area-inset-left))}}

/* --- the sheet --- */
.screen:not(#title) .panel,#howit .howpanel{position:relative;display:flex;flex-direction:column;align-items:stretch;width:100%;max-width:640px;max-height:100%;margin:auto;--px:20px;padding:0 var(--px) 18px;
  border-radius:22px;border:1px solid var(--m-line);background:var(--m-sheet);color:var(--m-text);text-align:left;font-family:var(--m-ui);-webkit-font-smoothing:antialiased;
  box-shadow:0 24px 60px rgba(2,6,12,.5),0 2px 8px rgba(2,6,12,.3),inset 0 1px 0 rgba(255,255,255,.08);
  -webkit-backdrop-filter:blur(18px) saturate(1.25);backdrop-filter:blur(18px) saturate(1.25);overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;
  scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.22) transparent;animation:m-sheet-in .34s cubic-bezier(.2,.8,.25,1) both;
  scroll-padding:76px 0 16px} /* keyboard / controller focus scrolls clear of the sticky header bar */
.screen:not(#title) .panel.wide{max-width:1000px}
.screen:not(#title) .panel>*{flex:none;animation:m-rise .42s cubic-bezier(.2,.8,.25,1) both}
.screen:not(#title) .panel>:nth-child(2){animation-delay:.04s}.screen:not(#title) .panel>:nth-child(3){animation-delay:.08s}.screen:not(#title) .panel>:nth-child(4){animation-delay:.12s}
.screen:not(#title) .panel>:nth-child(5){animation-delay:.16s}.screen:not(#title) .panel>:nth-child(6){animation-delay:.2s}.screen:not(#title) .panel>:nth-child(n+7){animation-delay:.24s}
.screen:not(#title) .panel p{margin:0 0 8px}
.screen:not(#title) .muted,#howit .muted{color:var(--m-muted);font-size:13px;line-height:1.4}

/* header bar (sheets): [‹ Back]  icon Title  [coins]. h2 is sticky; Back (last in the DOM, so last in Tab order as before) is
   shown first with flex `order` and pulled up into the bar with a negative margin. */
.screen:not(#title) .panel>h2{position:sticky;top:0;z-index:3;display:flex;align-items:center;justify-content:center;gap:10px;min-height:64px;margin:0 calc(-1 * var(--px)) 12px;padding:10px 128px;
  background:var(--m-head);border-bottom:1px solid var(--m-line);color:#fff;font:700 28px/1.1 var(--font);letter-spacing:.01em;text-align:center;text-shadow:0 2px 8px rgba(0,0,0,.45)}
.screen:not(#title) .panel>h2>[data-ic],.screen:not(#title) .panel>h2>.ico{flex:none;display:grid;place-items:center;width:36px;height:36px;padding:0;border-radius:11px;color:var(--m-amber-hi);
  background:linear-gradient(160deg,rgba(255,214,107,.22),rgba(255,138,26,.1));border:1px solid rgba(255,178,46,.5)}
.screen:not(#title) .panel>h2>.ico{padding:7px}
.screen:not(#title) .panel>h2>[data-ic] .ico{width:20px;height:20px}
.screen:not(#title) .panel>[data-back],.screen:not(#title) .panel>.row>[data-back],#controls #ctlback{order:-1;align-self:flex-start;position:sticky;top:10px;z-index:4;margin:10px 0 -54px -6px}
#garage.screen .panel>.row,#slots.screen .panel>.row{display:contents}
#vehicles.screen .panel>.coinpill{order:-1;align-self:flex-end;position:sticky;top:12px;z-index:4;margin:12px -6px -52px 0}
.screen:not(#title) .panel>[data-back],.screen:not(#title) .panel>.row>[data-back],#controls #ctlback,#vehicles.screen .panel>.coinpill{animation:m-fade .3s .05s ease both}
/* the sheet's one primary: Garage → Play sits at the right end of the header bar (where Vehicles shows the wallet);
   Save slots → New Game closes the list */
#garage.screen #garageplay{order:-1;align-self:flex-end;position:sticky;top:8px;z-index:4;min-height:48px;margin:8px -8px -56px 0;padding:8px 22px;font-size:20px}
#slots.screen #slotnew{order:9;align-self:center;margin:14px 0 0;min-width:210px}

/* --- buttons: quiet glass by default; amber = the primary action; amber rim = buy / upgrade; red tint = delete --- */
.screen:not(#title) .btn,#howit .btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;margin:0;padding:10px 18px;border:1px solid rgba(255,255,255,.16);border-radius:12px;
  background:linear-gradient(180deg,rgba(255,255,255,.13),rgba(255,255,255,.05));color:var(--m-text);font:700 15px/1.15 var(--m-ui);letter-spacing:.01em;text-shadow:none;text-align:center;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.12),0 2px 0 rgba(2,6,12,.45),0 6px 14px rgba(2,6,12,.22);filter:none;transform:none;
  transition:transform .14s ease,filter .14s ease,box-shadow .14s ease,background-color .16s ease,border-color .16s ease;-webkit-tap-highlight-color:transparent;touch-action:manipulation}
.screen:not(#title) .btn .ico,#howit .btn .ico{width:18px;height:18px}
.screen:not(#title) .btn>span,#howit .btn>span{display:inline-flex;align-items:center;gap:8px}
.screen:not(#title) .btn.small{padding:9px 14px;font-size:14px}
.screen:not(#title) .btn:hover,#howit .btn:hover{transform:none;filter:none}
@media (hover:hover) and (pointer:fine){.screen:not(#title) .btn:hover:not(:disabled),#howit .btn:hover{transform:translateY(-1px);filter:brightness(1.1)}}
.screen:not(#title) .btn:active:not(:disabled),#howit .btn:active{transform:translateY(1px) scale(.975);filter:brightness(.92)}
.screen:not(#title) button:focus-visible,#howit button:focus-visible,.screen:not(#title) input:focus-visible{outline:3px solid #fff1bd;outline-offset:3px}
.screen:not(#title) .btn.play,.screen:not(#title) .btn.next,#howit .btn.play{min-height:52px;padding:12px 30px;border:0;border-radius:14px;background:var(--m-amber-grad);color:var(--m-brown);
  font:700 22px/1 var(--font);letter-spacing:.02em;box-shadow:var(--m-amber-bevel);overflow:hidden;animation-name:m-rise}
.screen:not(#title) .btn.play::after,#howit .btn.play::after{background:linear-gradient(90deg,transparent,rgba(255,255,255,.55),transparent);animation:m-shine 4.8s 1.2s ease-in-out infinite}
.screen:not(#title) .btn.play:active:not(:disabled),#howit .btn.play:active{box-shadow:inset 0 2px 0 rgba(255,255,255,.6),inset 0 -2px 0 rgba(140,45,0,.3),0 1px 0 #9c4108,0 4px 12px rgba(255,128,18,.3)}
.screen:not(#title) .btn.buy,.screen:not(#title) .btn.bag{background:var(--m-amber-tint);border-color:var(--m-amber-line);color:#ffe2a0;box-shadow:inset 0 1px 0 rgba(255,230,170,.18),0 2px 0 rgba(2,6,12,.45),0 6px 14px rgba(2,6,12,.22)}
.screen:not(#title) .btn.danger{background:var(--m-bad-bg);border-color:var(--m-bad-line);color:var(--m-bad);box-shadow:inset 0 1px 0 rgba(255,200,190,.12),0 2px 0 rgba(2,6,12,.45)}
.screen:not(#title) .btn:disabled{background:rgba(255,255,255,.04);border-color:rgba(255,255,255,.08);color:rgba(246,242,234,.5);box-shadow:none;cursor:not-allowed;transform:none;filter:none}
.screen:not(#title) .btn:disabled .coin-ic{filter:grayscale(.7) brightness(.8)}
.screen:not(#title) .btn small{font:650 12px/1.1 var(--m-ui);opacity:.9}
.screen:not(#title) .coin-ic.sm{width:15px;height:15px;margin:0}

/* the wallet, as on the title's top bar */
.screen:not(#title) .coinpill{display:inline-flex;align-items:center;gap:8px;min-height:40px;margin:0;padding:0 14px 0 7px;border-radius:999px;border:1px solid var(--m-line);background:var(--m-glass);
  color:#ffe7a6;font:750 17px/1 var(--m-ui);font-variant-numeric:tabular-nums;box-shadow:var(--m-shadow);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}
.screen:not(#title) .coinpill .coin-ic{width:24px;height:24px;border-width:1.5px;flex:none}

/* the small round "?" (How it works) */
.screen:not(#title) .howbtn{display:inline-grid;place-items:center;width:44px;height:44px;min-width:44px;min-height:44px;padding:0;border-radius:50%;border:1.5px solid rgba(255,178,46,.6);
  background:rgba(255,178,46,.14);color:var(--m-amber-hi);font:800 18px/1 var(--m-ui);box-shadow:none;cursor:pointer;vertical-align:middle}
.screen:not(#title) .howbtn.corner{position:absolute;top:12px;right:12px;z-index:5}

/* tabs: one segmented control everywhere (Race worlds, Vehicles, Goals, Settings, Paint) */
.screen:not(#title) .tabs,.screen:not(#title) .settabs,.screen:not(#title) .ptabs{display:flex;gap:4px;margin:0 0 12px;padding:4px;border-radius:14px;background:rgba(0,0,0,.28);border:1px solid var(--m-line)}
.screen:not(#title) .tabs{align-self:center}
.screen:not(#title) .tab,.screen:not(#title) .settabs button,.screen:not(#title) .ptab,.screen:not(#title) .lvtab{min-height:44px;margin:0;border:1px solid transparent;border-radius:10px;background:transparent;color:var(--m-muted);
  font:700 14px/1.15 var(--m-ui);box-shadow:none;cursor:pointer;transition:background-color .16s,color .16s,transform .12s}
.screen:not(#title) .tab{padding:0 18px}
.screen:not(#title) .tab:active,.screen:not(#title) .settabs button:active,.screen:not(#title) .ptab:active,.screen:not(#title) .lvtab:not(:disabled):active{transform:scale(.96)}
@media (hover:hover) and (pointer:fine){.screen:not(#title) .tab:hover,.screen:not(#title) .settabs button:hover,.screen:not(#title) .ptab:hover,.screen:not(#title) .lvtab:not(.locked):hover{background:rgba(255,255,255,.07);color:var(--m-text)}}
.screen:not(#title) .tab.on,.screen:not(#title) .settabs button.on,.screen:not(#title) .ptab.on,.screen:not(#title) .lvtab.on{background:var(--m-amber-grad);color:var(--m-brown);border-color:transparent;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.6),inset 0 -2px 0 rgba(140,45,0,.25),0 2px 8px rgba(255,128,18,.3)}
.screen:not(#title) .lvtabs{display:flex;flex-wrap:nowrap;gap:6px;margin:0 calc(-1 * var(--px)) 12px;padding:2px var(--px) 6px;-webkit-mask-image:linear-gradient(90deg,transparent 0,#000 20px,#000 calc(100% - 20px),transparent 100%);mask-image:linear-gradient(90deg,transparent 0,#000 20px,#000 calc(100% - 20px),transparent 100%)}
.screen:not(#title) .lvtab{flex:0 0 auto;min-width:118px;padding:6px 14px;gap:3px;border-color:var(--m-well-line);background:var(--m-well);color:var(--m-text)}
.screen:not(#title) .lvtab small{display:inline-flex;align-items:center;gap:3px;font:650 11.5px/1 var(--m-ui);color:var(--m-muted);opacity:1}
.screen:not(#title) .lvtab.on small{color:rgba(58,23,3,.8)}
.screen:not(#title) .lvtab small .ico{width:11px;height:11px;color:var(--m-amber-hi)}.screen:not(#title) .lvtab.on small .ico{color:var(--m-brown)}
.screen:not(#title) .lvtab.locked{opacity:.45}
.screen:not(#title) .lvtab .ico{width:13px;height:13px}
.screen:not(#title) .vtabs{align-items:center}
.screen:not(#title) .vtab{flex-direction:row;min-width:0;padding:0 16px;font-size:14px}
.screen:not(#title) .vtabs .vhint{flex:none;margin-left:6px;font:650 11px/1 var(--m-ui);letter-spacing:.06em;color:var(--m-muted);opacity:.8;white-space:nowrap}

/* --- cards (Places, Vehicles): art full-bleed on top, glass body, amber ring = selected --- */
.screen:not(#title) .cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:12px;margin:0 0 6px;justify-content:stretch}
.screen:not(#title) .card{position:relative;display:flex;flex-direction:column;width:auto;margin:0;padding:0 0 12px;border-radius:16px;border:1px solid var(--m-well-line);overflow:hidden;
  background:linear-gradient(180deg,rgba(255,255,255,.075),rgba(255,255,255,.03));color:var(--m-text);text-align:left;cursor:pointer;
  box-shadow:0 8px 22px rgba(2,6,12,.32),inset 0 1px 0 rgba(255,255,255,.06);transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease}
.screen:not(#title) .card.vhide{display:none!important}
@media (hover:hover) and (pointer:fine){.screen:not(#title) .card:not(.vempty):hover{transform:translateY(-3px);border-color:rgba(255,255,255,.22);box-shadow:0 14px 30px rgba(2,6,12,.42)}}
.screen:not(#title) .card:not(.vempty):active{transform:scale(.985)}
.screen:not(#title) .card>canvas,.screen:not(#title) .card>img{flex:none;width:100%;height:auto;border-bottom:1px solid rgba(255,255,255,.08)}
.screen:not(#title) .card.sel{border-color:rgba(255,178,46,.95);box-shadow:0 0 0 2px rgba(255,178,46,.5),0 12px 30px rgba(255,128,18,.22)}
.screen:not(#title) .card.sel::after{content:"✓";position:absolute;top:10px;left:10px;z-index:2;display:grid;place-items:center;width:28px;height:28px;border-radius:50%;
  background:var(--m-amber-grad);color:var(--m-brown);font:900 15px/1 var(--m-ui);box-shadow:0 2px 8px rgba(0,0,0,.4)}
.screen:not(#title) .card h3{margin:10px 14px 4px;font:700 20px/1.15 var(--font);color:#fff;letter-spacing:.01em}
.screen:not(#title) .card p{margin:2px 14px 8px;min-height:0;font:500 13px/1.4 var(--m-ui);color:var(--m-muted)}
.screen:not(#title) .card .lock{top:10px;right:10px;display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:rgba(8,14,22,.72);border:1px solid rgba(255,255,255,.2);font-size:16px;filter:none}
.screen:not(#title) .card .cbest{margin:0 14px 4px;font:700 13px/1.35 var(--m-ui);color:#ffe7a6}
.screen:not(#title) .cstars{display:flex;align-items:center;gap:2px;margin:0 14px 2px}
.screen:not(#title) .cstars span{min-width:76px;font:750 10.5px/1 var(--m-ui);letter-spacing:.12em;text-transform:uppercase;color:var(--m-muted)}
.screen:not(#title) .cstars i{color:rgba(255,255,255,.2);font-size:17px;text-shadow:none;margin:0}
.screen:not(#title) .cstars i.on{color:var(--m-amber-hi);text-shadow:0 0 8px rgba(255,190,60,.45)}
.screen:not(#title) .cmed{margin:6px 14px 2px;font:650 12px/1.3 var(--m-ui);color:var(--m-muted)}
.screen:not(#title) .cgoals{margin:2px 14px 6px;font:500 12.5px/1.4 var(--m-ui);color:#d5dce4}
.screen:not(#title) .cgoals li.done{color:var(--m-ok);font-weight:700}
.screen:not(#title) .card>.btn{align-self:stretch;margin:8px 12px 0}
.screen:not(#title) .card>.btn:first-of-type{margin-top:auto}
.screen:not(#title) .card>p+.btn,.screen:not(#title) .card>.cbest+.btn{margin-top:auto}
.screen:not(#title) .card.sel>.btn:disabled{background:rgba(255,178,46,.1);border-color:rgba(255,178,46,.35);color:var(--m-amber-hi)}
.screen:not(#title) .xbtn{background:linear-gradient(180deg,rgba(255,255,255,.1),rgba(255,255,255,.04));color:#ffd0b0}
.screen:not(#title) .xbtn.on{background:linear-gradient(180deg,rgba(255,120,40,.36),rgba(230,60,20,.22));border-color:rgba(255,140,60,.8);color:#fff1e6}
.screen:not(#title) .xbtn:disabled{opacity:1}
/* vehicle art sits on the title's spotlit stage */
.screen:not(#title) .card.veh canvas,.screen:not(#title) .card img.vthumb{background:var(--m-stage)}
.screen:not(#title) #vehlist{grid-template-columns:repeat(auto-fill,minmax(196px,1fr))}
.screen:not(#title) #vehlist .card p{min-height:0;font-size:12.5px}
.screen:not(#title) .rate{display:flex;align-items:center;gap:8px;margin:2px 14px;font:750 10px/1 var(--m-ui);letter-spacing:.1em;text-transform:uppercase;color:var(--m-muted)}
.screen:not(#title) .rate span{width:52px;flex:none}
.screen:not(#title) .rate div{display:grid;grid-template-columns:repeat(5,1fr);gap:3px;flex:1}
.screen:not(#title) .rate i{height:6px;border-radius:3px;background:rgba(255,255,255,.13)}
.screen:not(#title) .rate i.on{background:linear-gradient(90deg,var(--m-amber-hi),var(--m-orange))}
.screen:not(#title) .trb{margin:6px 14px 0;gap:4px}
.screen:not(#title) .trb i{padding:3px 7px;border-radius:999px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.12);color:#e7ecf2;font:700 10px/1 var(--m-ui)}
.screen:not(#title) .vempty{grid-column:1/-1;max-width:none;padding:16px 18px!important;background:var(--m-amber-tint)!important;border-color:rgba(255,178,46,.45);cursor:default;box-shadow:none}
.screen:not(#title) .vempty>b{font:700 19px/1.2 var(--font);color:#fff}
.screen:not(#title) .vempty p{margin:6px 0 12px;color:#e3d6c4;font-size:14px}
.screen:not(#title) .vempty .btn{align-self:flex-start}
/* world meters + warnings inside cards and race lists */
.screen:not(#title) .rebuild-meter,.screen:not(#title) .haunt-meter{display:grid;gap:5px;margin:10px 12px 0;padding:10px 12px;border-radius:12px;border:1px solid var(--m-well-line);background:rgba(0,0,0,.24);color:#f3e6cc;font:600 12px/1.35 var(--m-ui)}
.screen:not(#title) .rebuild-meter b,.screen:not(#title) .haunt-meter b{font:750 12.5px/1.3 var(--m-ui);color:#fff}
.screen:not(#title) .rebuild-meter span,.screen:not(#title) .haunt-meter span{font-size:11.5px;color:var(--m-muted)}
.screen:not(#title) progress,#howit progress{-webkit-appearance:none;appearance:none;display:block;width:100%;height:8px;margin:2px 0;border:0;border-radius:4px;background:rgba(255,255,255,.12);overflow:hidden;accent-color:var(--m-amber)}
.screen:not(#title) progress::-webkit-progress-bar{background:rgba(255,255,255,.12);border-radius:4px}
.screen:not(#title) progress::-webkit-progress-value{background:linear-gradient(90deg,var(--m-amber-hi),var(--m-orange));border-radius:4px}
.screen:not(#title) progress::-moz-progress-bar{background:linear-gradient(90deg,var(--m-amber-hi),var(--m-orange));border-radius:4px}
.screen:not(#title) .cneed,.screen:not(#title) .trban.warn{margin:8px 12px 6px;padding:10px 12px;border-radius:12px;border:1px solid var(--m-amber-line);background:var(--m-amber-tint);color:#ffe2a0;font:600 13px/1.35 var(--m-ui);box-shadow:none}
.screen:not(#title) .cneed b,.screen:not(#title) .trban.warn b{font:750 15px/1.25 var(--m-ui);color:#fff}
.screen:not(#title) .cneed .cswitch{margin-top:8px}
@keyframes rubblePulse{0%,100%{box-shadow:0 0 0 0 rgba(255,183,0,0)}50%{box-shadow:0 0 0 5px rgba(255,183,0,.22)}}
.screen:not(#title) .trban{grid-column:1/-1;margin:0 0 4px;padding:10px 12px;border-radius:12px;border:1px solid var(--m-well-line);background:rgba(0,0,0,.24);color:#e7ecf2;font:600 13px/1.4 var(--m-ui)}
.screen:not(#title) .trban.warn{margin:0 0 4px}

/* --- Race: world tabs + race tiles; the next race to drive is the amber one --- */
.screen:not(#title) .lvlegend{display:flex;align-items:center;justify-content:center;gap:10px;margin:0 0 10px;font:650 12.5px/1.35 var(--m-ui);color:var(--m-muted);text-align:center}
.screen:not(#title) .lvlegend .howbtn{flex:none;margin:0}
.screen:not(#title) .rjbanner{margin:0 0 10px;padding:8px 12px;border-radius:10px;border:1px solid var(--m-amber-line);background:var(--m-amber-tint);color:#ffe2a0;font:800 12px/1.3 var(--m-ui);letter-spacing:.06em;text-align:center}
.screen:not(#title) .lvgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:10px;margin:0 0 10px}
.screen:not(#title) .lvtile{position:relative;height:auto;min-height:118px;margin:0;padding:12px 8px 10px;border:1px solid var(--m-well-line);border-radius:14px;
  background:linear-gradient(180deg,rgba(255,255,255,.075),rgba(255,255,255,.03));color:var(--m-text);font-family:var(--m-ui);box-shadow:0 6px 16px rgba(2,6,12,.28),inset 0 1px 0 rgba(255,255,255,.06);
  transition:transform .14s ease,border-color .16s ease,box-shadow .16s ease}
.screen:not(#title) .lvtile b{font:700 32px/1 var(--font);color:#fff}
.screen:not(#title) .lvtile b .ico{width:26px;height:26px;color:var(--m-muted)}
.screen:not(#title) .lvtile .lvst i{font-size:17px;color:rgba(255,255,255,.2);text-shadow:none}
.screen:not(#title) .lvtile .lvst i.on{color:var(--m-amber-hi);text-shadow:0 0 8px rgba(255,190,60,.45)}
.screen:not(#title) .lvtile .lvinfo{font:600 11.5px/1.35 var(--m-ui);color:var(--m-muted);opacity:1;text-align:center}
.screen:not(#title) .lvinfo .lvth{display:block;color:#ffc58a;font:750 11.5px/1.3 var(--m-ui);letter-spacing:.01em}
.screen:not(#title) .lvinfo .trneed{color:#e7ecf2}
.screen:not(#title) .lvtile .lvbest{font:750 12px/1.2 var(--m-ui);color:var(--m-ok)}
.screen:not(#title) .lvtile.done{border-color:rgba(255,214,107,.28);background:linear-gradient(180deg,rgba(255,200,90,.1),rgba(255,255,255,.03))}
.screen:not(#title) .lvtile:not(.locked):not(.done){border-color:rgba(255,178,46,.85);background:linear-gradient(180deg,rgba(255,178,46,.2),rgba(255,138,26,.05));box-shadow:0 0 0 1px rgba(255,178,46,.35),0 10px 24px rgba(255,128,18,.2)}
.screen:not(#title) .lvtile:not(.locked):not(.done) .lvbest{display:inline-block;padding:3px 8px;border-radius:999px;background:var(--m-amber-grad);color:var(--m-brown);font-weight:800}
.screen:not(#title) .lvtile.locked{opacity:.5;background:rgba(255,255,255,.03);box-shadow:none}
.screen:not(#title) .lvtile.locked .lvbest{color:var(--m-muted)}
@media (hover:hover) and (pointer:fine){.screen:not(#title) .lvtile:not(.locked):hover{transform:translateY(-2px);border-color:rgba(255,214,107,.6)}}
.screen:not(#title) .lvtile:not(.locked):active{transform:scale(.97)}
.screen:not(#title) .lvtile.rebuild-race,.screen:not(#title) .lvtile.haunt-race{min-height:200px;padding:12px 10px 10px}
.screen:not(#title) .lvtile .glist{align-self:stretch;margin:8px 0 0;padding-top:8px;border-top:1px solid rgba(255,255,255,.1);font:500 11px/1.35 var(--m-ui);color:var(--m-muted)}
.screen:not(#title) .lvtile .glist b{color:#e7ecf2;font:750 11px/1.3 var(--m-ui)}
.screen:not(#title) .lvhelp{margin:4px 0 0;font:600 12px/1.4 var(--m-ui);color:var(--m-muted);opacity:1;text-align:center}

/* --- Garage: the ride on the title's stage, upgrades as cards, the paint shop as one well --- */
.screen:not(#title) .garhead{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:6px 18px;margin:0 0 12px;padding:10px 16px 10px 10px;border-radius:16px;border:1px solid var(--m-well-line);background:var(--m-stage);box-shadow:inset 0 1px 0 rgba(255,255,255,.06)}
.screen:not(#title) .garhead canvas{width:300px;height:160px;border-radius:12px;background:none;filter:drop-shadow(0 10px 8px rgba(0,0,0,.45))}
.screen:not(#title) .garhead>div{display:flex;flex-wrap:wrap;align-items:center;gap:10px;min-width:0}
.screen:not(#title) .garhead .garname{flex:1 1 100%}
.screen:not(#title) .garname{font:700 30px/1.05 var(--font);color:#fff;text-shadow:0 2px 8px rgba(0,0,0,.5);overflow-wrap:anywhere}
.screen:not(#title) .garname::before{content:"Your ride";display:block;margin-bottom:6px;font:800 11px/1 var(--m-ui);letter-spacing:.15em;text-transform:uppercase;color:var(--m-amber-hi)}
.screen:not(#title) #upglist{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0 0 12px}
.screen:not(#title) .upg{display:grid;grid-template-columns:48px minmax(0,1fr) auto;align-items:center;gap:12px;margin:0;padding:12px;border-radius:14px;border:1px solid var(--m-well-line);background:var(--m-well);box-shadow:none;text-align:left}
.screen:not(#title) .upg .ic{display:grid;place-items:center;width:48px;height:48px;border-radius:50%;background:rgba(0,0,0,.28);border:1px solid rgba(255,178,46,.4);font-size:26px;line-height:1}
.screen:not(#title) .upg .nm{font:700 17px/1.15 var(--font);color:#fff}
.screen:not(#title) .upg .nm small{display:block;margin-top:3px;font:750 10px/1 var(--m-ui);letter-spacing:.12em;text-transform:uppercase;color:var(--m-muted)}
.screen:not(#title) .upg .ds{margin-top:4px;font:500 12.5px/1.35 var(--m-ui);color:var(--m-muted)}
.screen:not(#title) .pips{display:grid;grid-template-columns:repeat(5,1fr);gap:3px;margin-top:8px;max-width:180px}
.screen:not(#title) .pip{width:auto;height:6px;border-radius:3px;background:rgba(255,255,255,.13)}
.screen:not(#title) .pip.on{background:linear-gradient(90deg,var(--m-amber-hi),var(--m-orange))}
.screen:not(#title) .upg .btn{flex-direction:column;gap:3px;min-width:104px;padding:8px 12px;background:var(--m-amber-tint);border-color:var(--m-amber-line);color:#ffe2a0}
.screen:not(#title) .upg .btn small{display:inline-flex;align-items:center;gap:4px;color:#fff3d6}
.screen:not(#title) .upg .btn:disabled{background:rgba(255,255,255,.04);border-color:rgba(255,255,255,.08);color:rgba(246,242,234,.5)}
.screen:not(#title) .upg .btn:disabled:not(:has(small)){background:var(--m-ok-bg);border-color:var(--m-ok-line);color:var(--m-ok)}
.screen:not(#title) .upg.flash{animation:m-upflash .7s ease}
.screen:not(#title) .trstud{grid-column:1/-1;margin:0;padding:10px 12px;border-radius:14px;border:1px solid rgba(140,200,255,.3);background:rgba(95,180,255,.1);color:#e3f1ff;font:600 13px/1.35 var(--m-ui);flex-wrap:wrap}
.screen:not(#title) .trstud .btn{margin-left:auto}
.screen:not(#title) .paintshop{margin:0 0 4px;padding:12px;border-radius:16px;border:1px solid var(--m-well-line);background:var(--m-well)}
.screen:not(#title) .pshead{margin:0 0 10px}
.screen:not(#title) .pshead h3{margin:0;font:700 19px/1.1 var(--font);color:#fff}
.screen:not(#title) .pshead h3 .ico{color:var(--m-amber-hi)}
.screen:not(#title) .betabadge{padding:4px 8px 3px;border-radius:6px;background:rgba(11,19,30,.82);border:1px solid rgba(255,178,46,.65);color:#ffd27a;font:800 10.5px/1 var(--m-ui);letter-spacing:.14em;box-shadow:none}
.screen:not(#title) .ptabs{flex-wrap:wrap;margin:0 0 10px}
.screen:not(#title) .ptab{flex:1 1 auto;padding:0 12px}
.screen:not(#title) .pswatches{grid-template-columns:repeat(auto-fill,minmax(86px,1fr));gap:8px;max-height:236px;padding:2px 2px 4px}
.screen:not(#title) .psw{min-height:88px;border:1px solid var(--m-well-line);border-radius:12px;background:rgba(0,0,0,.22);color:var(--m-text);box-shadow:none;font-family:var(--m-ui);transition:transform .12s,border-color .16s}
.screen:not(#title) .psw:active{transform:scale(.95)}
.screen:not(#title) .psw.sel{border-color:var(--m-amber);box-shadow:0 0 0 2px rgba(255,178,46,.45)}
.screen:not(#title) .psw .chip{box-shadow:inset 0 -6px 10px rgba(0,0,0,.25),inset 0 4px 6px rgba(255,255,255,.5),0 0 0 2px rgba(255,255,255,.18)}
.screen:not(#title) .psw .nm{font:650 11.5px/1.15 var(--m-ui)}
.screen:not(#title) .psw .pr{font:700 11px/1 var(--m-ui);color:var(--m-muted);opacity:1}
.screen:not(#title) .psw.own .pr{color:var(--m-ok)}.screen:not(#title) .psw.beta .pr{color:var(--m-amber-hi)}
.screen:not(#title) .pbuy{gap:8px;margin-top:10px}
.screen:not(#title) .pbuy span#pbuytext{font:600 12.5px/1.35 var(--m-ui);color:var(--m-muted);opacity:1}

/* --- Goals & Awards --- */
.screen:not(#title) #goalbody{max-height:none;overflow:visible;padding:0;text-align:left}
.screen:not(#title) .daily{display:flex;align-items:center;gap:14px;margin:0 0 10px;padding:14px 16px;border-radius:16px;border:1px solid var(--m-amber-line);background:var(--m-amber-tint);color:#f3e6cc}
.screen:not(#title) .daily>div{gap:4px;font:500 13px/1.4 var(--m-ui)}
.screen:not(#title) .daily>div>b:first-child{font:700 19px/1.15 var(--font);color:#fff}
.screen:not(#title) .daily b{color:#fff}
.screen:not(#title) .daily .btn{background:var(--m-amber-grad);border:0;color:var(--m-brown);font:700 18px/1 var(--font);box-shadow:var(--m-amber-bevel);min-width:84px}
.screen:not(#title) .mgroup{margin:0 0 8px;padding:10px 14px 8px;border-radius:14px;border:1px solid var(--m-well-line);background:var(--m-well)}
.screen:not(#title) .mgroup.locked{opacity:.5}
.screen:not(#title) h4{display:flex;align-items:center;gap:8px;margin:2px 0 6px;font:700 16px/1.2 var(--font);color:#fff;text-align:left}
.screen:not(#title) h4 .cstars{margin:0}
.screen:not(#title) .mission{gap:10px;padding:6px 0;border-top:1px solid rgba(255,255,255,.06);font:550 14px/1.3 var(--m-ui);color:#e7ecf2}
.screen:not(#title) .mission .chk{flex:none;width:22px;height:22px;border-radius:7px;border:2px solid rgba(255,255,255,.28);font-size:13px}
.screen:not(#title) .mission.done .chk{background:#45c46c;border-color:#45c46c}
.screen:not(#title) .mission.done .mt{color:var(--m-muted)}
.screen:not(#title) .mission .mr{display:inline-flex;align-items:center;gap:5px;color:#ffe7a6;font-weight:750;font-variant-numeric:tabular-nums}
.screen:not(#title) .awards{grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:10px}
.screen:not(#title) .award{gap:4px;padding:12px 10px;border-radius:14px;border:1px solid var(--m-well-line);background:var(--m-well);opacity:.55;box-shadow:none}
.screen:not(#title) .award.got{opacity:1;border-color:rgba(255,178,46,.6);background:var(--m-amber-tint);box-shadow:none}
.screen:not(#title) .award .aic{font-size:30px}
.screen:not(#title) .award b{font:700 14.5px/1.2 var(--font);color:#fff}
.screen:not(#title) .award span{font:500 12px/1.35 var(--m-ui);color:var(--m-muted)}
.screen:not(#title) .award em{display:inline-flex;align-items:center;justify-content:center;gap:4px;font:750 12.5px/1 var(--m-ui);color:#ffe7a6}
.screen:not(#title) .stats{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px;margin:0 0 12px}
.screen:not(#title) .stats div{padding:10px 12px;border-radius:12px;border:1px solid var(--m-well-line);background:var(--m-well);text-align:left}
.screen:not(#title) .stats span{display:block;margin-bottom:5px;font:750 10px/1.2 var(--m-ui);letter-spacing:.12em;text-transform:uppercase;color:var(--m-muted)}
.screen:not(#title) .stats b{display:block;font:700 21px/1.1 var(--font);color:#fff;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}

/* --- Settings (+ the Controls tab) --- */
#settings .panel{height:min(660px,100%)}
.screen:not(#title) .settabs{display:grid;grid-template-columns:repeat(6,minmax(0,1fr))}
.screen:not(#title) .settabs button{flex-direction:column;gap:3px;padding:6px 2px;font-size:12px}
.screen:not(#title) .settabs i svg{width:19px;height:19px}
.screen:not(#title) .setpane{height:auto;min-height:0;max-height:none;overflow:visible}
.screen:not(#title) .setrow{gap:12px;margin:0 0 8px;padding:8px 8px 8px 14px;border-radius:12px;border:1px solid var(--m-well-line);background:var(--m-well);font:650 14.5px/1.3 var(--m-ui);color:var(--m-text)}
.screen:not(#title) .setrow>span{min-width:0}
.screen:not(#title) .setval{color:var(--m-amber-hi);font:750 14px/1 var(--m-ui);font-variant-numeric:tabular-nums}
.screen:not(#title) input[type=range]{flex:1;max-width:220px;height:28px;accent-color:var(--m-amber)}
.screen:not(#title) .toggle{flex:none;width:92px;height:44px;border:1px solid rgba(255,255,255,.16);border-radius:22px;background:rgba(0,0,0,.32);color:var(--m-muted);font:800 12px/1 var(--m-ui);transition:background-color .18s}
.screen:not(#title) .toggle i{top:4px;left:4px;width:34px;height:34px;background:linear-gradient(180deg,#fff,#dfe5ec);box-shadow:0 2px 5px rgba(0,0,0,.4)}
.screen:not(#title) .toggle b{top:15px;right:14px}
.screen:not(#title) .toggle.on{background:var(--m-amber-grad);border-color:transparent;color:var(--m-brown);box-shadow:inset 0 1px 0 rgba(255,255,255,.5)}
.screen:not(#title) .toggle.on i{left:52px}
.screen:not(#title) .toggle.on b{left:14px;right:auto}
.screen:not(#title) .seg{flex:none;padding:3px;gap:2px;border-radius:12px;background:rgba(0,0,0,.3);border:1px solid var(--m-line)}
.screen:not(#title) .seg button{min-height:44px;padding:0 12px;border-radius:9px;color:var(--m-muted);font:700 13px/1 var(--m-ui)}
.screen:not(#title) .seg button.on{background:var(--m-amber-grad);color:var(--m-brown);box-shadow:inset 0 1px 0 rgba(255,255,255,.55)}
.screen:not(#title) .setfoot{gap:8px;margin-top:8px}
.screen:not(#title) .setfoot+.muted{margin-top:10px;text-align:center}
.screen:not(#title) .ctlbox .padh,.screen:not(#title) .padh{margin:14px 0 6px;font:700 17px/1.2 var(--font);color:#fff}
.screen:not(#title) .ctlbox .padh:first-child{margin-top:2px}
.screen:not(#title) .keybtn{border:1px solid rgba(255,255,255,.2);border-bottom:3px solid rgba(0,0,0,.5);border-radius:10px;background:linear-gradient(180deg,rgba(255,255,255,.15),rgba(255,255,255,.06));color:#fff;font:700 14px/1 var(--m-ui)}
@media (hover:hover) and (pointer:fine){.screen:not(#title) .keybtn:hover{border-color:rgba(255,214,107,.6)}}
.screen:not(#title) .keybtn.wait{background:var(--m-amber-tint);border-color:var(--m-amber);color:#ffe2a0}
.screen:not(#title) .keymsg{color:var(--m-amber-hi);font:700 14px/1.3 var(--m-ui)}
.screen:not(#title) .ctlbox .row,.screen:not(#title) #ctlbody .row{justify-content:flex-start;gap:8px}

/* --- Save slots: the title's round amber profile badge --- */
.screen:not(#title) .slothelp{margin:0 0 12px;font:500 13px/1.4 var(--m-ui);color:var(--m-muted);text-align:center}
.screen:not(#title) #slotlist{gap:8px;margin:0 0 4px;max-width:none}
.screen:not(#title) .slot{gap:14px;min-height:76px;padding:10px 12px;border:1px solid var(--m-well-line);border-radius:16px;background:var(--m-well);box-shadow:none}
.screen:not(#title) .slot.on{border-color:rgba(255,178,46,.85);background:var(--m-amber-tint);box-shadow:0 0 0 1px rgba(255,178,46,.3)}
.screen:not(#title) .slot.empty{background:transparent;border-style:dashed;opacity:1}
.screen:not(#title) .slot .sn{display:grid;place-items:center;width:44px;height:44px;border-radius:50%;background:linear-gradient(160deg,#ffd76a,#ff8a1a);color:var(--m-brown);font:700 22px/1 var(--font);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.65),inset 0 -2px 0 rgba(130,45,0,.35)}
.screen:not(#title) .slot.empty .sn{background:rgba(255,255,255,.08);color:var(--m-muted);box-shadow:none}
.screen:not(#title) .slot .nm{font:700 16px/1.2 var(--font);color:#fff}
.screen:not(#title) .slot .nm input{width:min(220px,100%);min-height:44px;padding:4px 10px;border:1px solid rgba(255,255,255,.18);border-radius:10px;background:rgba(0,0,0,.3);color:#fff;font:700 16px/1.2 var(--font);user-select:text;-webkit-user-select:text}
.screen:not(#title) .slot .meta{gap:12px;margin-top:5px;font:600 12.5px/1.3 var(--m-ui);color:var(--m-muted)}
.screen:not(#title) .slot .meta>span{display:inline-flex;align-items:center;gap:4px}
.screen:not(#title) .slot .acts{gap:8px;min-width:0}
.screen:not(#title) .slot .acts .q{font:700 13px/1.3 var(--m-ui);color:var(--m-bad)}
.screen:not(#title) .slot .tagon{padding:5px 10px;border-radius:999px;background:var(--m-amber-grad);color:var(--m-brown);font:800 11px/1 var(--m-ui);letter-spacing:.1em;text-transform:uppercase}
.screen:not(#title) .slot .btn .ico{width:18px;height:18px}

/* --- dialogs: How it works, Resume, Pause, Results (centred, one primary, no header bar) --- */
.howit{background:radial-gradient(120% 100% at 50% 45%,rgba(4,8,15,.4) 0%,rgba(4,8,15,.75) 100%)}
#howit .howpanel{max-width:620px;max-height:calc(100% - 8px);--px:22px;padding:20px var(--px) 0}
#howit .howpanel h2{margin:0 0 6px;font:700 28px/1.1 var(--font);color:#fff;text-align:center}
#howit .howbody h3{margin:16px 0 6px;font:800 11.5px/1.2 var(--m-ui);letter-spacing:.15em;text-transform:uppercase;color:var(--m-amber-hi)}
#howit .howbody ul{padding-left:18px}
#howit .howbody li{margin:4px 0;font:500 14.5px/1.45 var(--m-ui);color:#e7ecf2}
#howit .howbody li::marker{color:var(--m-amber)}
#howit .howbody b{color:#fff}
#howit .how-foot{position:sticky;bottom:0;z-index:2;display:flex;justify-content:center;margin:8px calc(-1 * var(--px)) 0;padding:12px var(--px) 16px;background:linear-gradient(180deg,rgba(13,21,32,0),rgba(13,21,32,.96) 16px);border-radius:0 0 22px 22px}
#howit #howclose{margin:0;min-width:180px}
#settings.screen .panel,#controls.screen .panel{max-width:680px}
#resume.screen .panel{max-width:440px}
#pause.screen .panel{max-width:460px}
#resume.screen .panel,#pause.screen .panel,#results.screen .panel{padding:20px 22px;text-align:center}
#resume.screen .panel>h2,#pause.screen .panel h2,#results.screen .panel h2{position:static;display:block;min-height:0;margin:0 0 4px;padding:0;background:none;border:0;font:700 32px/1.1 var(--font);color:#fff}
#resume.screen .resumeinfo{margin:2px 0 4px;font:700 20px/1.2 var(--font);color:var(--m-amber-hi)}
#resume.screen .panel>.btn{align-self:stretch;margin:6px 0 0}
#resume.screen .panel>.btn.play{margin-top:12px}
/* Pause: info | actions */
#pause.screen .pz-info,#pause.screen .pz-acts{display:flex;flex-direction:column;min-width:0}
#pause.screen .pauselv{margin:0 0 10px;font:650 13px/1.3 var(--m-ui);color:var(--m-muted);opacity:1;letter-spacing:.02em}
#pause.screen .pz-acts{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:8px}
#pause.screen .pz-acts>*{grid-column:1/-1}
#pause.screen #restartbtn{grid-column:1}#pause.screen #pausesetbtn{grid-column:2}
#pause.screen #resumebtn{min-height:56px;font-size:24px}
#pause.screen .btn.bag{min-height:48px;font:700 18px/1 var(--font)}
#pause.screen #baghint{margin:-2px 0 4px!important;font-size:12px}
#pause.screen .pz-acts .btn.small{padding:9px 8px;gap:6px;white-space:nowrap}
.screen:not(#title) .glist{margin:0 0 6px;max-width:none;padding:10px 12px;border-radius:12px;border:1px solid var(--m-well-line);background:var(--m-well);font:500 13px/1.45 var(--m-ui);text-align:left}
.screen:not(#title) .glist b{color:#fff;font:750 12.5px/1.3 var(--m-ui);margin-bottom:4px}
.screen:not(#title) .glist li{color:#d5dce4}
.screen:not(#title) .glist li.done{color:var(--m-ok)}
.screen:not(#title) .glist em{color:var(--m-amber-hi)}
/* Results: score | rewards + actions */
#results.screen .panel.results{max-width:600px;gap:0}
#results.screen .res-main,#results.screen .res-side,#results.screen .res-acts{display:flex;flex-direction:column;align-items:stretch;min-width:0}
#results.screen .resplace{margin:0 0 4px;font:650 13px/1.3 var(--m-ui);color:var(--m-muted)}
#results.screen .medalrow{margin:0 0 4px;gap:18px}
#results.screen .medal{margin-top:26px;font:750 12px/1 var(--m-ui);letter-spacing:.12em;text-transform:uppercase;color:#e7ecf2}
#results.screen .medal span{margin-top:6px}
#results.screen .medal .disc{width:64px;height:64px;border:4px solid rgba(255,255,255,.85);box-shadow:0 4px 0 rgba(0,0,0,.3),0 8px 18px rgba(0,0,0,.35)}
#results.screen .medal.m3 .disc{box-shadow:0 4px 0 rgba(0,0,0,.3),0 0 26px rgba(255,210,63,.75)}
#results.screen .rstar{font-size:46px;color:rgba(255,255,255,.16);text-shadow:none}
#results.screen .rstar.on{color:var(--m-amber-hi);text-shadow:0 3px 0 #b8640c,0 0 18px rgba(255,190,60,.7)}
#results.screen .resnext{margin:2px 0;font:650 13px/1.35 var(--m-ui);color:#e3d6c4}
#results.screen .newbest{margin:2px 0;font:700 22px/1.1 var(--font);color:var(--m-amber-hi);text-shadow:0 0 16px rgba(255,170,40,.55);animation:m-glow 1.4s ease-in-out infinite alternate}
#results.screen .stats{grid-template-columns:1fr 1fr;margin:8px 0 10px}
#results.screen .stats div{padding:8px 10px;text-align:left}
#results.screen .stats b{font-size:20px}
#results.screen .resextra{margin:0 0 8px;max-height:none;overflow:visible;gap:6px}
#results.screen .resextra li{flex-wrap:wrap;gap:2px 8px;margin:0;padding:7px 10px;border-radius:10px;border:1px solid var(--m-well-line);background:var(--m-well);color:#e7ecf2;font:650 12.5px/1.35 var(--m-ui);box-shadow:none}
#results.screen .resextra li.p{background:var(--m-amber-tint);border-color:rgba(255,178,46,.4)}
#results.screen .podium .p{min-width:66px;padding:7px 6px;border-radius:10px;border:1px solid var(--m-well-line);background:rgba(255,255,255,.07);color:#e7ecf2;box-shadow:none;font:700 12px/1.2 var(--m-ui)}
#results.screen .podium .p.you{background:var(--m-amber-grad);border-color:transparent;color:var(--m-brown)}
#results.screen .podium .p b{font:700 20px/1.1 var(--font)}
#results.screen #resgoals{display:flex;flex-direction:column;gap:6px}
#results.screen #hauntresults{padding:10px 12px;border-radius:12px;border:1px solid rgba(255,138,30,.45);background:rgba(120,40,140,.2);font:600 12.5px/1.4 var(--m-ui);color:#f5dcc4;text-align:left}
#results.screen #hauntresults b{color:#fff}#results.screen #hauntresults p{margin:2px 0 0}
#results.screen .res-side>.coinpill{align-self:center;margin:2px 0 10px}
#results.screen .res-acts{gap:8px}
#results.screen #retrybtn,#results.screen #nextlvbtn{align-self:stretch;margin:0}
#results.screen #nextlvbtn.invis{display:none}
#results.screen:has(#nextlvbtn:not(.invis)) #retrybtn{min-height:48px;padding:10px 18px;border:1px solid var(--m-amber-line);background:var(--m-amber-tint);color:#ffe2a0;box-shadow:inset 0 1px 0 rgba(255,230,170,.18),0 2px 0 rgba(2,6,12,.45);font-size:19px;order:2}
#results.screen:has(#nextlvbtn:not(.invis)) #retrybtn::after{display:none}
#results.screen:has(#nextlvbtn:not(.invis)) #nextlvbtn{order:1}
#results.screen .res-acts>.row{order:3;display:grid;grid-template-columns:1fr 1fr;gap:8px}
#results.screen .res-side>#resextra,#results.screen .res-side>#resgoals,#results.screen .res-side>.coinpill{order:0}
@media (orientation:landscape) and (min-width:640px){
  #results.screen .panel.results{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);gap:0 20px;max-width:900px;align-items:start}
  #results.screen .res-main{justify-content:center;align-self:stretch;text-align:left}
  #results.screen .res-main .medalrow{justify-content:flex-start;padding-left:4px}
  #results.screen .res-side{padding-top:4px}
  /* the actions stay on screen while the rewards column scrolls */
  #results.screen .res-acts{position:sticky;bottom:-12px;z-index:2;margin:0 -2px -12px;padding:10px 2px 12px;background:linear-gradient(180deg,rgba(12,20,31,0),rgba(12,20,31,.94) 14px)}
}

/* --- toasts: glass slips with an amber edge --- */
.toast{border:1px solid var(--m-line);border-left:4px solid var(--m-amber);border-radius:14px;background:rgba(14,22,34,.94);color:var(--m-text);font-family:var(--m-ui);
  box-shadow:0 10px 26px rgba(2,6,12,.45);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);animation:m-toast .38s cubic-bezier(.2,.9,.25,1.05)}
.toast b{font:750 14px/1.25 var(--m-ui);color:#fff}
.toast span{font:500 12.5px/1.35 var(--m-ui);color:var(--m-muted)}
.toast.goal{border-left-color:var(--m-orange)}.toast.place{border-left-color:var(--m-amber-hi)}
.toast.rubble{background:linear-gradient(180deg,rgba(70,44,10,.96),rgba(40,26,8,.96));border-color:var(--m-amber-line);color:#ffe2a0}

/* toasts over a sub-screen on sideways phones: top-right under the mute button (they sat on the sheet's left edge) */
@media (orientation:landscape) and (max-height:500px) and (min-width:560px){
  body.inmenu:has(.screen:not(#title):not(.hidden)) #toasts{top:calc(64px + env(safe-area-inset-top));right:calc(14px + env(safe-area-inset-right));left:auto;align-items:flex-end;max-width:min(340px,46vw)}
}

/* --- mute on every menu: top-right glass, like the title (it sat under the site's ✦ pill at the bottom) --- */
body.inmenu #mutebtn{top:calc(8px + env(safe-area-inset-top));right:calc(16px + env(safe-area-inset-right));bottom:auto;width:48px;height:48px;background:rgba(11,19,30,.76);color:#ffd66b;
  border:1px solid rgba(255,255,255,.14);box-shadow:0 8px 22px rgba(2,6,12,.35);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}
body.inmenu #mutebtn .ico{width:56%;height:56%}

/* --- sideways phones (Jesse's main way to play): compact header bar, denser grids, two-column Pause --- */
@media (orientation:landscape) and (max-height:520px){
  .screen:not(#title) .panel,#howit .howpanel{--px:14px;padding:0 var(--px) 12px;border-radius:18px;scroll-padding-top:62px}
  .screen:not(#title) .panel>h2{min-height:52px;margin-bottom:10px;padding:6px 118px;font-size:21px;gap:8px}
  .screen:not(#title) .panel>h2>[data-ic],.screen:not(#title) .panel>h2>.ico{width:30px;height:30px;border-radius:9px}
  .screen:not(#title) .panel>h2>.ico{padding:6px}.screen:not(#title) .panel>h2>[data-ic] .ico{width:17px;height:17px}
  .screen:not(#title) .panel>[data-back],.screen:not(#title) .panel>.row>[data-back],#controls #ctlback{top:4px;margin:4px 0 -48px -4px;padding:8px 12px}
  #vehicles.screen .panel>.coinpill{top:6px;margin:6px -4px -46px 0;min-height:40px;font-size:15px}
  .screen:not(#title) .btn.play,.screen:not(#title) .btn.next,#howit .btn.play{min-height:48px;padding:10px 24px;font-size:20px}
  .screen:not(#title) .lvtabs{margin-bottom:8px;padding-bottom:4px}
  .screen:not(#title) .lvtab{min-width:104px;padding:4px 10px;font-size:13px}
  .screen:not(#title) .lvlegend{margin-bottom:6px;font-size:11.5px}
  .screen:not(#title) .lvgrid{grid-template-columns:repeat(auto-fill,minmax(118px,1fr));gap:8px}
  .screen:not(#title) .lvtile{min-height:104px;padding:8px 6px}
  .screen:not(#title) .lvtile b{font-size:26px}
  .screen:not(#title) .lvhelp{display:none}
  .screen:not(#title) .cards{grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:10px}
  .screen:not(#title) #vehlist{grid-template-columns:repeat(auto-fill,minmax(172px,1fr))}
  .screen:not(#title) .card h3{font-size:18px;margin:8px 12px 3px}
  .screen:not(#title) .garhead{grid-template-columns:auto minmax(0,1fr);padding:6px 12px 6px 6px;gap:4px 14px}
  .screen:not(#title) .garhead canvas{width:210px;height:112px}
  .screen:not(#title) .garname{font-size:22px}
  .screen:not(#title) .garhead>div{gap:8px}
  .screen:not(#title) #upglist{gap:8px}
  .screen:not(#title) .upg{grid-template-columns:40px minmax(0,1fr) auto;gap:10px;padding:8px 10px}
  .screen:not(#title) .upg .ic{width:40px;height:40px;font-size:21px}
  .screen:not(#title) .upg .ds{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:11.5px}
  .screen:not(#title) .upg .btn{min-width:92px}
  #garage.screen #garageplay{top:4px;margin:4px -4px -48px 0;min-height:44px;padding:6px 18px;font-size:18px}
  #settings .panel{height:100%}
  .screen:not(#title) .settabs button{flex-direction:row;gap:5px;padding:0 4px;font-size:12px}
  .screen:not(#title) .setrow{margin-bottom:6px;padding:4px 6px 4px 12px;font-size:13.5px}
  .screen:not(#title) .daily{padding:10px 12px}
  .screen:not(#title) .slot{min-height:64px;padding:8px 10px}
  #howit .howpanel{--px:16px;padding:12px var(--px) 0}
  #howit .how-foot{margin-top:6px;padding-top:8px;padding-bottom:10px;border-radius:0 0 18px 18px}
  #howit .howpanel h2{font-size:22px}
  /* Pause: what you are driving on the left, the buttons on the right */
  #pause.screen .panel{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0 16px;max-width:680px;padding:14px 16px;align-items:center}
  #pause.screen .pz-info{text-align:left}
  #pause.screen .pauselv{text-align:left}
  #pause.screen .pz-info h2{margin-right:52px;font-size:28px;text-align:left}
  #pause.screen .pz-acts{margin-top:44px}
  #pause.screen #resumebtn{min-height:52px}
  /* Results: denser score column */
  #results.screen .panel{padding:12px 16px}
  #results.screen .panel h2{font-size:26px}
  #results.screen .medal{margin-top:22px}
  #results.screen .medal .disc{width:52px;height:52px}
  #results.screen .rstar{font-size:36px}
  #results.screen .stats{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:6px 0 4px}
  #results.screen .stats div{padding:6px 7px}
  #results.screen .stats span{font-size:9px;letter-spacing:.08em;margin-bottom:3px}
  #results.screen .stats b{font-size:16px}
}
@media (orientation:landscape) and (max-height:520px) and (max-width:780px){
  .screen:not(#title) .settabs button{flex-direction:column;gap:2px;padding:4px 2px;font-size:11.5px}
  .screen:not(#title) .settabs i svg{width:16px;height:16px}
  #results.screen .stats{grid-template-columns:1fr 1fr}
  #results.screen .resextra{grid-template-columns:minmax(0,1fr)}
}
/* Pause over a run: keep clear of the HUD's sound + pause buttons in the top-right corner */
@media (orientation:landscape) and (max-height:520px){#pause.screen{padding-right:calc(118px + env(safe-area-inset-right))}}
@media (orientation:landscape) and (max-height:520px) and (max-width:720px){
  .screen:not(#title) .panel>h2{padding:6px 100px;font-size:19px}
  .screen:not(#title) .panel>h2>[data-ic],.screen:not(#title) .panel>h2>.ico{display:none}
  .screen:not(#title) .vtabs .vhint{display:none}
  .screen:not(#title) .garhead canvas{width:170px;height:91px}
}
/* --- upright phones: Back is a round icon, the wallet drops under the bar, single columns --- */
@media (max-width:600px) and (orientation:portrait){
  .screen:not(#title) .panel,#howit .howpanel{--px:14px;padding:0 var(--px) 14px;border-radius:18px}
  #howit .howpanel{padding-top:16px}
  .screen:not(#title) .panel>h2{min-height:56px;margin-bottom:10px;padding:8px 60px;font-size:22px}
  .screen:not(#title) .panel>[data-back],.screen:not(#title) .panel>.row>[data-back],#controls #ctlback{width:44px;padding:0;margin:6px 0 -50px -6px;top:6px;font-size:0;gap:0}
  .screen:not(#title) .panel>[data-back] .ico,.screen:not(#title) .panel>.row>[data-back] .ico,#controls #ctlback .ico{width:20px;height:20px}
  #vehicles.screen .panel>.coinpill{order:0;position:static;align-self:center;margin:0 0 10px}
  .screen:not(#title) .cards,.screen:not(#title) #vehlist{grid-template-columns:1fr 1fr;gap:8px}
  #places .cards{grid-template-columns:1fr}
  .screen:not(#title) #vehlist .card p,.screen:not(#title) .rate{display:none}
  .screen:not(#title) #vehlist .card h3{font-size:15px;margin:8px 10px 2px}
  .screen:not(#title) .vtabs .vhint{display:none}
  .screen:not(#title) .vtab{padding:0 10px;font-size:12.5px}
  .screen:not(#title) .lvgrid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .screen:not(#title) .garhead{grid-template-columns:1fr;justify-items:center;text-align:center;padding:8px 12px 12px}
  .screen:not(#title) .garhead canvas{width:min(300px,100%);height:auto;aspect-ratio:300/160}
  .screen:not(#title) .garhead>div{align-items:center}
  .screen:not(#title) #upglist{grid-template-columns:1fr}
  .screen:not(#title) .settabs{grid-template-columns:repeat(3,minmax(0,1fr))}
  .screen:not(#title) .setrow{flex-wrap:wrap;row-gap:4px}
  .screen:not(#title) .setrow:has(input[type=range])>span:first-child{flex:1 1 100%}
  .screen:not(#title) .setrow input[type=range]{flex:1 1 auto;max-width:none;min-width:0}
  .screen:not(#title) .setrow .setval{flex:none}
  /* Garage: Play floats in the thumb zone instead of crowding the title */
  #garage.screen #garageplay{order:9;align-self:stretch;position:sticky;top:auto;bottom:10px;margin:12px 0 0;min-height:52px}
  #garage.screen .panel{scroll-padding-bottom:76px}
  .screen:not(#title) #vehlist .card>.btn{margin:8px 8px 0;padding:8px 6px;gap:4px;font-size:13px}
  .screen:not(#title) .slot .acts{justify-content:flex-start}
  #results.screen .stats{grid-template-columns:1fr 1fr}
}

/* --- motion: rises + fades only; all off under reduced motion, the in-game Reduced motion setting, ?motion=off --- */
@keyframes m-fade{from{opacity:0}to{opacity:1}}
@keyframes m-sheet-in{from{opacity:0;transform:translateY(16px) scale(.985)}to{opacity:1;transform:none}}
@keyframes m-toast{from{opacity:0;transform:translateX(24px)}to{opacity:1;transform:none}}
@keyframes m-upflash{0%{background:rgba(255,178,46,.34);border-color:var(--m-amber)}100%{background:var(--m-well)}}
@keyframes m-glow{from{text-shadow:0 0 8px rgba(255,170,40,.35)}to{text-shadow:0 0 20px rgba(255,170,40,.8)}}
@keyframes m-rise{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
@keyframes m-shine{0%,62%{left:-45%}100%{left:125%}}
@media (prefers-reduced-motion:reduce){
  .screen:not(#title),.screen:not(#title) *,.screen:not(#title) *::before,.screen:not(#title) *::after,#howit *,#howit *::after,.toast{animation:none!important;transition:none!important}
  .screen:not(#title) .btn:active,.screen:not(#title) .card:active,.screen:not(#title) .lvtile:active{transform:none!important}
}
body:has(#title.menu-still) .screen:not(#title),body:has(#title.menu-still) .screen:not(#title) *,body:has(#title.menu-still) .screen:not(#title) *::before,body:has(#title.menu-still) .screen:not(#title) *::after,body:has(#title.menu-still) #howit *,body:has(#title.menu-still) .toast{animation:none!important;transition:none!important}
/* Low graphics (Settings → Quality: Low): no glass blur, a more solid sheet */
body:has(#title.menu-lite) .screen:not(#title) .panel,body:has(#title.menu-lite) #howit .howpanel,body:has(#title.menu-lite) .screen:not(#title) .coinpill,body:has(#title.menu-lite) .toast,body:has(#title.menu-lite).inmenu #mutebtn{-webkit-backdrop-filter:none;backdrop-filter:none}
body:has(#title.menu-lite) .screen:not(#title) .panel,body:has(#title.menu-lite) #howit .howpanel{background:linear-gradient(180deg,#19253a,#0d1520)}
/* ===== v3.27 menus: end ===== */

/* ===== v3.29 tiers: rarity badges (word + shape + color: Common green circle (v3.30.3: was gray), Rare blue diamond, Epic purple hexagon, Ultra
   gold star), upgrade-ceiling strips, tier pips in the Garage, tier filter chips and the "Coming soon" teaser. Look only. ===== */
:root{--t-common:#3fdc7a;--t-rare:#4f9dff;--t-epic:#b779ff;--t-ult:#ffbf3a;--t-common-hi:#b6ffd0;--t-rare-hi:#a9d0ff;--t-epic-hi:#e2c6ff;--t-ult-hi:#ffe08a}
.tierb{display:inline-flex;align-items:center;gap:5px;flex:none;padding:4px 9px 4px 6px;border-radius:999px;border:1.5px solid var(--tc);background:rgba(8,12,20,.82);color:var(--tch);
  font:850 10.5px/1 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;letter-spacing:.13em;text-transform:uppercase;white-space:nowrap;text-shadow:none;box-shadow:0 2px 8px rgba(0,0,0,.35)}
.tier-ic{width:12px;height:12px;flex:none;fill:currentColor}
.tierb .tier-ic{fill:var(--tc)}
.t-common{--tc:var(--t-common);--tch:var(--t-common-hi)}.t-rare{--tc:var(--t-rare);--tch:var(--t-rare-hi)}.t-epic{--tc:var(--t-epic);--tch:var(--t-epic-hi)}.t-ultimate{--tc:var(--t-ult);--tch:var(--t-ult-hi)}
.tierb.t-rare{background:linear-gradient(180deg,rgba(30,70,140,.9),rgba(10,24,52,.9))}
.tierb.t-epic{background:linear-gradient(180deg,rgba(84,38,140,.92),rgba(30,12,56,.92))}
.tierb.t-ultimate{position:relative;overflow:hidden;border-color:#ffe08a;background:linear-gradient(180deg,#ffe48f 0%,#ffbf3a 50%,#e8890c 100%);color:#3a1d00;box-shadow:0 0 0 1px rgba(120,60,0,.35),0 2px 10px rgba(255,170,40,.5)}
.tierb.t-ultimate .tier-ic{fill:#5a2b00}
.tierb.t-ultimate::after{content:"";position:absolute;inset:0;background:linear-gradient(105deg,transparent 30%,rgba(255,255,255,.75) 46%,transparent 62%);transform:translateX(-120%);animation:tier-shine 3.4s ease-in-out infinite}
@keyframes tier-shine{0%,55%{transform:translateX(-120%)}85%,100%{transform:translateX(120%)}}
.tierb.sm{padding:3px 7px 3px 5px;font-size:9.5px;gap:4px}.tierb.sm .tier-ic{width:10px;height:10px}
.card .tierb.on-art{position:absolute;top:8px;right:8px;z-index:2}
/* upgrade ceiling on the Vehicles card: 5 base levels, the tier's extra levels in its color, empty slots it can't reach */
.tierceil{display:flex;align-items:center;gap:8px;margin:5px 14px 2px;font:750 10px/1 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;letter-spacing:.1em;text-transform:uppercase;color:var(--m-muted,#b4bdc8)}
.tierceil span{flex:none;min-width:52px}
.tierceil div{display:grid;grid-template-columns:repeat(8,1fr);gap:3px;flex:1}
.tierceil i{height:6px;border-radius:3px;background:rgba(255,255,255,.34)}
.tierceil i.x{background:var(--tc);box-shadow:0 0 6px var(--tc)}
.tierceil i.no{background:none;box-shadow:inset 0 0 0 1px rgba(255,255,255,.16)}
.tierceil b{flex:none;min-width:12px;color:var(--tch);font-size:11px;letter-spacing:0;text-align:right}
/* Garage: tier pips after the 5 base pips, the badge under the car name */
.screen:not(#title) .pips.tierpips{display:flex;gap:3px;max-width:none}
.screen:not(#title) .tierpips .pip{flex:1 1 0;max-width:33px;min-width:9px}
.screen:not(#title) .tierpips .pip:not(.tx)+.pip.tx{margin-left:6px}
.screen:not(#title) .pip.tx{background:none;box-shadow:inset 0 0 0 1.5px var(--tc)}
.screen:not(#title) .pip.tx.on{background:var(--tc);box-shadow:0 0 7px var(--tc)}
.screen:not(#title) .upg .nm small.tiernext{display:inline-block;margin:4px 0 0;padding:2px 6px;border-radius:999px;border:1px solid var(--tc);color:var(--tch);letter-spacing:.1em}
.screen:not(#title) .gartier{flex:1 1 100%;display:flex;flex-wrap:wrap;align-items:center;gap:8px;min-width:0}
.screen:not(#title) .gartier small{font:600 12px/1.3 var(--m-ui);color:var(--m-muted)}
/* Results + title ride card */
.screen:not(#title) .restier{display:block;margin:-2px 0 8px;line-height:1}
#title .ride-tier{position:absolute;z-index:3;left:calc(var(--u, 1px) * 12);top:calc(var(--u, 1px) * 40)}
/* Vehicles: tier filter + sort chips (wrap, never scroll sideways) */
.screen:not(#title) .vtiers{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:0 0 10px}
.screen:not(#title) .vtier{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0 13px;border-radius:999px;border:1px solid var(--m-well-line);background:var(--m-well);color:var(--m-text);
  font:700 13px/1 var(--m-ui);cursor:pointer;-webkit-tap-highlight-color:transparent;transition:background .15s ease,border-color .15s ease,transform .1s ease}
.screen:not(#title) .vtier small{font:700 11px/1 var(--m-ui);color:var(--m-muted)}
.screen:not(#title) .vtier .tier-ic{width:13px;height:13px;fill:var(--tc)}
.screen:not(#title) .vtier.on{background:var(--m-amber-tint);border-color:var(--m-amber-line);color:#fff}
.screen:not(#title) .vtier[class*=" t-"].on{background:rgba(0,0,0,.3);border-color:var(--tc);box-shadow:inset 0 0 0 1px var(--tc)}
.screen:not(#title) .vtier.on small{color:var(--m-amber-hi)}
.screen:not(#title) .vtier:active{transform:scale(.96)}
.screen:not(#title) .vtier:focus-visible{outline:3px solid var(--m-amber-hi);outline-offset:2px}
.screen:not(#title) .vsort{margin-left:auto}
.screen:not(#title) .card.tierhide{display:none!important}
/* "Coming soon" teaser (HD_SOON data): dark silhouettes with a rim glow in their tier color; tap = a hype line */
.screen:not(#title) .card.vsoon{grid-column:1/-1;padding:12px 14px 12px;cursor:default;border-color:rgba(255,138,30,.45);
  background:radial-gradient(40% 120% at 0% 0%,rgba(255,128,20,.28),rgba(255,128,20,0) 70%),radial-gradient(50% 90% at 100% 100%,rgba(150,80,255,.22),rgba(150,80,255,0) 70%),linear-gradient(100deg,#2b0f2c 0%,#1c0c22 50%,#110916 100%)}
@media (hover:hover) and (pointer:fine){.screen:not(#title) .card.vsoon:hover{transform:none}}
.screen:not(#title) .card.vsoon:active{transform:none}
.vs-head{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 10px;margin:0 0 8px}
.vs-k{display:inline-flex;align-items:center;gap:6px;font:850 11px/1 var(--m-ui);letter-spacing:.16em;text-transform:uppercase;color:#ffb44a}
.vs-k::before{content:"";width:8px;height:8px;border-radius:50%;background:#ff8a1a;box-shadow:0 0 8px #ff8a1a;animation:vs-pulse 1.6s ease-in-out infinite}
@keyframes vs-pulse{50%{opacity:.35;transform:scale(.7)}}
.vs-head b{font:700 22px/1.05 var(--font);color:#fff4e2;text-shadow:0 2px 8px rgba(0,0,0,.6)}
.vs-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.vs-car{position:relative;display:flex;flex-direction:column;align-items:center;gap:5px;min-width:0;min-height:44px;margin:0;padding:8px 6px 9px;border-radius:12px;border:1px solid rgba(255,255,255,.09);
  background:radial-gradient(70% 60% at 50% 40%,rgba(255,255,255,.07),rgba(0,0,0,0) 70%),rgba(0,0,0,.28);color:#fff;font:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent;transition:border-color .15s ease,transform .12s ease,background .15s ease}
.vs-car:active{transform:scale(.97)}
.vs-car:focus-visible{outline:3px solid var(--m-amber-hi);outline-offset:2px}
.vs-car.on{border-color:var(--tc);background:radial-gradient(70% 60% at 50% 40%,rgba(255,255,255,.1),rgba(0,0,0,0) 70%),rgba(0,0,0,.4);box-shadow:inset 0 0 0 1px var(--tc)}
.vs-sil{display:grid;place-items:center;width:100%;aspect-ratio:440/210}
.vs-sil img,.vs-sil svg{display:block;width:96%;height:96%;object-fit:contain;filter:drop-shadow(0 0 1px var(--tc)) drop-shadow(0 0 6px var(--tc));animation:vs-float 3.2s ease-in-out infinite}
.vs-car:nth-child(2) .vs-sil>*{animation-delay:-.8s}.vs-car:nth-child(3) .vs-sil>*{animation-delay:-1.6s}.vs-car:nth-child(4) .vs-sil>*{animation-delay:-2.4s}
@keyframes vs-float{50%{transform:translateY(-3px)}}
.vs-nm{max-width:100%;font:650 11.5px/1.2 var(--m-ui);color:#eadcf6;text-align:center;overflow-wrap:anywhere}
.vs-hype{min-height:1.4em;margin:10px 2px 0!important;font:500 13px/1.4 var(--m-ui)!important;color:#f5dcc4!important}
.vs-hype b{color:#fff}
.vs-hype.pop{animation:vs-pop .35s cubic-bezier(.2,.8,.25,1)}
@keyframes vs-pop{from{opacity:0;transform:translateY(4px)}}
@media (max-width:560px){.vs-row{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:480px){.tierceil{flex-wrap:wrap;row-gap:5px}.tierceil span{flex-basis:100%}}
@media (orientation:landscape) and (max-height:520px){.vs-head b{font-size:18px}.vs-row{gap:6px}.vs-car{padding:6px 4px 7px}.vs-nm{font-size:10.5px}}
@media (prefers-reduced-motion:reduce){.tierb.t-ultimate::after,.vs-sil img,.vs-sil svg,.vs-k::before,.vs-hype.pop{animation:none}}
/* title event card: a small decorative strip of the teaser silhouettes, only where the card is roomy */
#title .ev-soon{display:none;align-items:center;gap:calc(var(--u, 1px) * 6);margin-top:calc(var(--u, 1px) * 3)}
#title .ev-soon em{font:850 calc(var(--u, 1px) * 9.5)/1 var(--m-ui);font-style:normal;letter-spacing:.14em;text-transform:uppercase;color:#ffb44a;white-space:nowrap}
#title .ev-soon i{display:block;flex:0 1 auto;min-width:0;width:calc(var(--u, 1px) * 34);height:calc(var(--u, 1px) * 17)}
#title .menu-event .ev-soon img,#title .menu-event .ev-soon svg{position:static;display:block;width:100%;height:100%;object-fit:contain;opacity:1;-webkit-mask-image:none;mask-image:none;filter:drop-shadow(0 0 1px var(--tc)) drop-shadow(0 0 4px var(--tc))}
@media (min-width:1000px) and (min-height:700px){#title .ev-soon{display:flex}}
/* ===== v3.29 tiers: end ===== */

/* ===== v3.29.1 town hall: the Vote entry (title event-card corner + Vehicles "Coming soon" button). Shown only while a Hill Dash poll is
   open. Town Hall's own gold-to-cyan (the shared pill's colors), so the same entry reads the same in every game. The title pill is an
   absolutely placed grid child of .menu-feature: its box is the FIRST cell, i.e. the event card (or the Daily Drive card when no event
   runs), so it never moves the menu grid. It sits on the card's picture side, clear of the copy; bottom-right where the "Play" tag
   shows (roomy screens), top-right on compact cards. ===== */
.thvote{-webkit-tap-highlight-color:transparent;cursor:pointer;display:inline-flex;align-items:center;gap:7px;min-height:44px;padding:0 16px;border:0;border-radius:999px;
  background:linear-gradient(135deg,#ffd97a,#6ee7ff);color:#0b0d1a;font:800 14px/1 var(--m-ui);box-shadow:0 4px 14px rgba(0,0,0,.45);transition:transform .12s ease,filter .15s ease}
.thvote:hover{filter:brightness(1.08)}
.thvote:active{transform:scale(.96)}
.thvote:focus-visible{outline:3px solid #fff;outline-offset:2px}
.thvote .thv-ic{font-size:1.1em;line-height:1}
.thvote .thv-dot{display:none;flex:none;width:9px;height:9px;border-radius:50%;background:#ff4d6d;box-shadow:0 0 0 2px #0b0d1a,0 0 8px #ff4d6d}
.thvote.unseen .thv-dot{display:inline-block}
#title .menu-feature{position:relative}
#title .thv-feat{position:absolute;z-index:3;grid-area:1 / 1 / 2 / 2;right:calc(var(--u) * 12);bottom:calc(var(--u) * 12);margin:0}
#title.menu-noevent .thv-feat{bottom:auto;top:calc(var(--u) * 10)}
#title .thv-feat.unseen .thv-dot{position:absolute;top:-2px;right:-2px}
/* compact title cards (short phone landscape, phone portrait): top-right, the word only */
@media (orientation:landscape) and (max-height:520px),(orientation:portrait) and (max-width:600px){
  #title .thv-feat{bottom:auto;top:50%;right:8px;transform:translateY(-50%);padding:0 14px}
  #title .thv-feat:active{transform:translateY(-50%) scale(.96)}
  #title .thv-feat .thv-ic{display:none}
}
.vs-head .vs-vote{align-self:center;margin-left:auto}
@media (orientation:landscape) and (max-height:520px){.vs-head .vs-vote{padding:0 13px;font-size:13px}}
@media (max-width:420px){.vs-head .vs-vote{margin-left:0}}

/* ===== v3.30.3 rarity name plates: every car name in the Garage and on the Vehicles cards wears its tier (Common soft green glow · Rare blue glow + glowing
   border · Epic purple glow + border + small flames along the top edge · Ultra rainbow text, border and BIGGER flames). Look only: the name text, the tier
   table (tierOf / HW_WOLF_TIER) and every save are untouched. One shared set of CSS animations (transform + opacity for the flames, background-position
   for the rainbow): no per-card canvas or JS loop. Stilled by the same reduced-motion rules as every menu (OS setting, in-game Reduced motion, ?motion=off). ===== */
:root{--np-head:27px} /* v3.3x plate fire: was 22px; the real fire needs the headroom */
.screen:not(#title) .np{position:relative;display:block;width:fit-content;max-width:calc(100% - 28px);margin:var(--np-head) auto 4px;padding:3px 11px 4px;border:2px solid transparent;border-radius:11px;box-sizing:border-box;
  letter-spacing:.01em;text-align:center;overflow-wrap:anywhere}
.screen:not(#title) #vehlist .card h3.np{margin:var(--np-head) auto 4px;font:700 19px/1.15 var(--font);max-width:calc(100% - 28px)}
.screen:not(#title) .garname .np{display:inline-block;margin:calc(var(--np-head) + 4px) 0 2px;max-width:100%;font-size:inherit;line-height:1.1;text-align:inherit}
.screen:not(#title) .garname:has(.np)::before{margin-bottom:0}
.npt{display:inline-block;max-width:100%}
/* v3.3x plate fire: the 3.30.3 CSS-mask flames are gone; Epic/Ultra fire is the "v3.3x plate fire" block below */
/* Common: soft green glowing text, no border, no flames */
.np-common .npt,.vs-car.t-common .vs-nm{color:#a4ffbd;text-shadow:0 0 7px rgba(70,255,130,.62),0 0 14px rgba(40,220,100,.3),0 1px 2px rgba(0,0,0,.92)}
/* Rare: blue glowing text + a glowing blue border */
.screen:not(#title) .np-rare{border-color:#5aa7ff;background:linear-gradient(180deg,rgba(24,58,118,.78),rgba(8,18,42,.88));box-shadow:0 0 10px rgba(79,157,255,.6),0 0 2px rgba(150,205,255,.9),inset 0 0 9px rgba(79,157,255,.3)}
.np-rare .npt,.vs-car.t-rare .vs-nm{color:#c4e2ff;text-shadow:0 0 8px rgba(79,157,255,.95),0 0 16px rgba(60,130,255,.45),0 1px 2px rgba(0,0,0,.92)}
/* Epic: purple glowing text + purple border, small purple flames licking up from the top edge */
.screen:not(#title) .np-epic{border-color:#b779ff;background:linear-gradient(180deg,rgba(76,30,128,.82),rgba(24,10,50,.9));box-shadow:0 0 12px rgba(183,121,255,.62),0 0 2px rgba(225,190,255,.9),inset 0 0 9px rgba(183,121,255,.32)}
.np-epic .npt,.vs-car.t-epic .vs-nm{color:#f0dcff;text-shadow:0 0 8px rgba(183,121,255,.98),0 0 16px rgba(150,80,255,.5),0 1px 2px rgba(0,0,0,.92)}
/* Ultra: rainbow text that slowly shifts hue, a rainbow border, bigger rainbow flames */
.screen:not(#title) .np-ultimate{border-width:2px;border-color:transparent;background:linear-gradient(180deg,rgba(18,14,34,.92),rgba(8,6,20,.94)) padding-box,linear-gradient(90deg,#ff4d4d,#ffa63d,#ffe94d,#5dff8f,#4dd8ff,#8a8dff,#d46bff,#ff4d4d) 0 0/200% 100% border-box;
  box-shadow:0 0 12px rgba(255,110,190,.34),0 0 22px rgba(80,170,255,.28);animation:np-rb2 7s linear infinite}
.np-ultimate .npt,.vs-car.t-ultimate .vs-nm{background:linear-gradient(90deg,#ff5a5a,#ffab3a,#fff04d,#4dff8a,#4fdcff,#8f95ff,#e36bff,#ff5a5a) 0 0/200% 100%;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent;text-shadow:none /* an inherited text-shadow would show THROUGH the clipped text */;
  filter:drop-shadow(0 1px 0 rgba(0,0,0,.7)) drop-shadow(0 0 3px rgba(0,0,0,.6));animation:np-rb1 7s linear infinite}
@keyframes np-rb1{to{background-position:200% 0}}
@keyframes np-rb2{to{background-position:0 0,200% 0}}
/* Ultra badge: the gold stays, with a rainbow edge */
.tierb.t-ultimate{border-color:transparent;background:linear-gradient(180deg,#ffe48f 0%,#ffbf3a 50%,#e8890c 100%) padding-box,linear-gradient(90deg,#ff4d4d,#ffa63d,#ffe94d,#5dff8f,#4dd8ff,#8a8dff,#d46bff,#ff4d4d) border-box}
@media (max-width:900px){.screen:not(#title) #vehlist .card h3.np{font-size:17px}}
@media (max-width:560px){:root{--np-head:25px}.screen:not(#title) #vehlist .card h3.np{font-size:15px;padding:2px 8px 3px;max-width:calc(100% - 16px)}}
@media (orientation:landscape) and (max-height:520px){:root{--np-head:25px}} /* v3.3x plate fire: was 20px */
@media (prefers-reduced-motion:reduce){.np,.npt,.np::before,.np::after,.npf,.npf::after{animation:none!important}} /* v3.3x plate fire: + .npf */
/* ===== /v3.30.3 rarity name plates ===== */
/* ===== v3.32.1 day gift: the glowing green skull (overlay + "+50,000" + the Happy Halloween card) ===== */
.hdskull{position:fixed;inset:0;z-index:70;display:none;overflow:hidden;outline:none;color:#eafff0;touch-action:none;-webkit-user-select:none;user-select:none;
  background:radial-gradient(ellipse 80% 70% at 50% 46%,rgba(12,50,28,.955),rgba(4,19,11,.975) 62%,rgba(1,8,4,.99));opacity:0;transition:opacity .45s ease}
.hdskull.hs-open{display:block}
.hdskull.hs-lit{opacity:1}
.hs-cv{position:absolute;inset:0;width:100%;height:100%;display:block}
.hs-amt{position:absolute;left:0;right:0;top:var(--hs-amt-top,56%);margin:0 auto;width:max-content;display:flex;align-items:center;gap:12px;pointer-events:none;opacity:0;transform:scale(.35)}
.hdskull.hs-amt-on .hs-amt{opacity:1;transform:scale(1);transition:opacity .25s ease,transform .55s cubic-bezier(.2,1.6,.4,1)}
.hs-amt .coin-ic{width:48px;height:48px;flex:none;filter:drop-shadow(0 0 10px rgba(255,210,63,.85))}
.hs-amt b{font:900 64px/1 var(--font);font-variant-numeric:tabular-nums;color:#fff4b8;letter-spacing:.01em;-webkit-text-stroke:2px #14592f;
  text-shadow:0 0 16px rgba(90,255,140,.95),0 0 40px rgba(40,220,100,.7),0 4px 0 #1b6b39,0 8px 16px rgba(0,0,0,.6)}
.hdskull.hs-amt-done .hs-amt b{animation:hgpop .45s cubic-bezier(.2,1.6,.4,1)}
.hs-card{position:absolute;left:0;right:0;bottom:max(14px,env(safe-area-inset-bottom));margin:0 auto;width:min(440px,calc(100% - 32px));box-sizing:border-box;
  text-align:center;padding:14px 20px 12px;border-radius:26px;border:3px solid #4cf07f;color:#effff2;
  background:radial-gradient(80% 60% at 50% 0%,rgba(80,255,130,.22),rgba(80,255,130,0) 70%),linear-gradient(180deg,rgba(12,52,29,.95),rgba(4,22,13,.97));
  box-shadow:0 0 0 5px rgba(76,240,127,.14),0 0 46px rgba(60,255,120,.42),0 20px 50px rgba(0,0,0,.6);visibility:hidden;opacity:0;transform:translateY(26px)}
.hdskull.hs-card-on .hs-card{visibility:visible;opacity:1;transform:none;transition:opacity .3s ease,transform .5s cubic-bezier(.2,1.5,.4,1)}
.hs-title{margin:0 0 4px;font:900 36px/1.05 var(--font);color:#f4fff6;text-shadow:0 0 14px rgba(90,255,140,.9),0 3px 0 #135a2f,0 6px 12px rgba(0,0,0,.5)}
.hs-sub{margin:2px auto 4px;max-width:32ch;font:600 15px/1.35 var(--font);color:#c8f4d5}
.hdskull .btn.play{font-size:28px;padding:12px 46px;margin:8px 0 4px;min-height:48px;background:linear-gradient(#ffd25e,#ff8a1a);color:#3a1703;
  box-shadow:0 7px 0 #b4570a,0 12px 24px rgba(0,0,0,.35),0 0 26px rgba(255,190,60,.45),inset 0 2px 0 rgba(255,255,255,.6);text-shadow:none}
.hdskull .btn.play:focus-visible{outline:3px solid #fff;outline-offset:3px}
.hs-foot{margin:4px 0 0;font:700 12px/1.2 var(--font);letter-spacing:.08em;text-transform:uppercase;color:#8fe2aa}
@media (max-width:480px){.hs-amt b{font-size:50px}.hs-amt .coin-ic{width:38px;height:38px}.hs-title{font-size:30px}}
@media (orientation:landscape) and (max-height:500px){ /* sideways phones: one compact card */
  .hs-amt b{font-size:40px}.hs-amt .coin-ic{width:30px;height:30px}
  .hs-card{padding:8px 16px 8px;border-radius:20px;width:min(520px,calc(100% - 32px))}
  .hs-title{font-size:26px}.hs-sub,.hs-foot{display:none}.hdskull .btn.play{font-size:22px;padding:8px 36px;margin:6px 0 2px;min-height:44px}}
.hdskull.hs-still .hs-amt,.hdskull.hs-still.hs-amt-on .hs-amt,.hdskull.hs-still .hs-card,.hdskull.hs-still.hs-card-on .hs-card{transform:none;transition:opacity .4s ease}
.hdskull.hs-still.hs-amt-done .hs-amt b{animation:none}
@media (prefers-reduced-motion:reduce){.hdskull .hs-amt,.hdskull .hs-card{transform:none!important;transition:opacity .4s ease!important}.hdskull.hs-amt-done .hs-amt b{animation:none}}
/* ===== /v3.32.1 day gift ===== */
/* ===== v3.3x plate fire (Jesse 2026-11-01: the 3.30.3 flames looked cheap): Epic and Ultra plates burn with real looping fire. game.js "v3.3x plate fire"
   simulates three 32-frame flipbooks once after load and hands them over as --npf-e (Epic, violet-magenta with a white-hot core), --npf-us (Ultra flame
   shape) and --npf-uc (Ultra white-hot core). Each plate gets one .npw (the fire, tapered to a crown at the corners) > .npf (the flipbook, stepped with
   steps(32)). Ultra's colour is the border's own rainbow (same gradient, size and 7 s loop) seen through the flame mask. The fire fades in once the
   flipbooks exist, plates off screen are paused (.npoff, set by one IntersectionObserver), and reduced motion leaves one still frame. ===== */
.np-epic{--npf-h:26px;--npf-w:224px}
.np-ultimate{--npf-h:38px;--npf-w:224px}
.screen:not(#title) .garname .np-epic{--npf-h:36px;--npf-w:310px;margin-top:calc(var(--np-head) + 11px)}
.screen:not(#title) .garname .np-ultimate{--npf-h:46px;--npf-w:271px;margin-top:calc(var(--np-head) + 17px)}
@media (max-width:560px){.np-epic{--npf-h:22px;--npf-w:190px}.np-ultimate{--npf-h:32px;--npf-w:189px}}
/* the hot rim: where the flames leave the plate the top edge glows white-hot (in front of the flame roots, tapered like the fire) */
.screen:not(#title) .np-epic::after,.screen:not(#title) .np-ultimate::after{content:"";position:absolute;z-index:2;left:6%;right:6%;top:-5px;height:8px;pointer-events:none;opacity:0;transition:opacity .7s ease;
  background:radial-gradient(ellipse 50% 50% at 50% 50%,rgba(255,236,255,.78),rgba(226,150,255,.36) 48%,rgba(190,110,255,0) 100%)}
.screen:not(#title) .np-ultimate::after{background:radial-gradient(ellipse 50% 50% at 50% 50%,rgba(255,255,250,.8),rgba(255,255,255,.3) 48%,rgba(255,255,255,0) 100%)}
html.npf-ok .screen:not(#title) .np-epic::after,html.npf-ok .screen:not(#title) .np-ultimate::after{opacity:1}
.np .npw{position:absolute;z-index:1;left:-2px;right:-2px;bottom:100%;height:var(--npf-h);display:block;pointer-events:none;opacity:0;transition:opacity .7s ease;
  -webkit-mask-image:linear-gradient(90deg,transparent 2px,#000 24px,#000 calc(100% - 24px),transparent calc(100% - 2px)),radial-gradient(ellipse 72% 260% at 50% 100%,#000 50%,rgba(0,0,0,.25) 100%);
  mask-image:linear-gradient(90deg,transparent 2px,#000 24px,#000 calc(100% - 24px),transparent calc(100% - 2px)),radial-gradient(ellipse 72% 260% at 50% 100%,#000 50%,rgba(0,0,0,.25) 100%);
  -webkit-mask-composite:source-in;mask-composite:intersect}
html.npf-ok .np .npw{opacity:1}
.np .npf{position:absolute;inset:0;display:block}
.np-epic .npf{background:var(--npf-e,none) 0 0/var(--npf-w,224px) calc(var(--npf-h) * 32) repeat;animation:npf-y 1.4s steps(32) var(--npf-d,0s) infinite}
.np-ultimate .npf{background:linear-gradient(90deg,#ff2e2e,#ff8a12,#ffd918,#2ef070,#18c4ff,#6066ff,#c43cff,#ff2e2e) 0 0/200% 100% repeat-x;
  -webkit-mask-image:var(--npf-us,none);mask-image:var(--npf-us,none);-webkit-mask-size:var(--npf-w,224px) calc(var(--npf-h) * 32);mask-size:var(--npf-w,224px) calc(var(--npf-h) * 32);
  -webkit-mask-repeat:repeat;mask-repeat:repeat;-webkit-mask-position:0 0;mask-position:0 0;animation:npf-m 1.4s steps(32) var(--npf-d,0s) infinite,np-rbf 7s linear infinite}
.np-ultimate .npf::after{content:"";position:absolute;inset:0;background:var(--npf-uc,none) 0 0/var(--npf-w,224px) calc(var(--npf-h) * 32) repeat;animation:npf-y 1.4s steps(32) var(--npf-d,0s) infinite}
.screen:not(#title) .np.npoff,.screen:not(#title) .np.npoff .npt,.screen:not(#title) .np.npoff .npf,.screen:not(#title) .np.npoff .npf::after{animation-play-state:paused} /* beats the plate's own animation shorthand, so border, text and fire pause together and stay in step */
@keyframes npf-y{to{background-position:0 103.2258%}}
@keyframes npf-m{to{-webkit-mask-position:0 103.2258%;mask-position:0 103.2258%}}
@keyframes np-rbf{to{background-position:200% 0}}
/* ===== /v3.3x plate fire ===== */

/* ===== paint-ultra: Ultra Rainbow paint, Jet color and Exhaust fire color sections ===== */
.psw .jchip{background:radial-gradient(circle at 50% 64%,var(--j2) 0 18%,var(--j1) 54%,rgba(0,0,0,.4) 100%);box-shadow:0 0 11px var(--j1),inset 0 -6px 10px rgba(0,0,0,.25),0 0 0 2px rgba(255,255,255,.2)}
.psw .rbchip{background:linear-gradient(115deg,#ff3b3b,#ffb02e,#f6f035,#3dff7e,#35d9ff,#7a7dff,#e05bff,#ff3b3b) 0 0/300% 100%;animation:rbflow 5s linear infinite;box-shadow:0 0 12px rgba(255,120,200,.55),inset 0 -6px 10px rgba(0,0,0,.22),inset 0 4px 6px rgba(255,255,255,.5),0 0 0 2px rgba(255,255,255,.28)}
@keyframes rbflow{to{background-position:300% 0}}
.psw .rbname .rbt,.psw.ultra .nm .rbt{background:linear-gradient(90deg,#ff5a5a,#ffab3a,#fff04d,#4dff8a,#4fdcff,#8f95ff,#e36bff,#ff5a5a) 0 0/300% 100%;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent;text-shadow:none;animation:rbflow 5s linear infinite;font-weight:800}
.screen:not(#title) .psw.ultra{border:2px solid transparent;background:linear-gradient(rgba(14,10,28,.92),rgba(8,6,20,.94)) padding-box,linear-gradient(110deg,#ff4d4d,#ffa63d,#ffe94d,#5dff8f,#4dd8ff,#8a8dff,#d46bff,#ff4d4d) 0 0/300% 100% border-box;animation:rbflow 7s linear infinite}
.screen:not(#title) .psw.ultra.sel{box-shadow:0 0 0 2px rgba(255,178,46,.55),0 0 14px rgba(200,120,255,.4)}
.screen:not(#title) .psw.locked{opacity:.8;border-style:dashed}
.screen:not(#title) .psw.locked .chip{filter:saturate(.9) brightness(.92)}
.psw .pr.lock{flex-wrap:wrap;justify-content:center;text-align:center;line-height:1.15;font-size:10.5px;color:var(--m-muted,#b9b3cf);opacity:1}
.psw .lk{display:inline-block;flex:none;width:9px;height:7px;border-radius:2px;background:currentColor;position:relative;top:3px;margin-right:2px}
.psw .lk::before{content:"";position:absolute;left:1px;top:-5px;width:4px;height:5px;border:1.5px solid currentColor;border-bottom:0;border-radius:4px 4px 0 0}
@media (prefers-reduced-motion:reduce){.psw .rbchip,.psw .rbt,.screen:not(#title) .psw.ultra{animation:none!important}}
body.redmo .psw .rbchip,body.redmo .psw .rbt,body.redmo .screen:not(#title) .psw.ultra{animation:none!important}
/* ===== /paint-ultra ===== */
/* ===== v3.33 ultra: title SURVIVAL + ULTRA slot, the Ultra screen (3 mode cards, easier -> harder = left -> right / top -> bottom), the in-run Ultra badge ===== */
#title .survrow{display:flex;flex-direction:row;gap:var(--m-gap);min-width:0;flex:0 0 auto;align-self:stretch;width:100%;box-sizing:border-box}
#title .survrow>.btn.play,#title .survrow>#playbtn,#title .survrow>#ultrabtn{flex:1 1 0;width:auto;min-width:0}
#title .survrow>#playbtn .mode-copy,#title .survrow>#ultrabtn .mode-copy{min-width:0}
#title .survrow .mode-name{white-space:nowrap}
#title .survrow>.btn.play{flex-direction:column;align-items:flex-start;justify-content:center;gap:calc(var(--u) * 6);padding:calc(var(--u) * 12) calc(var(--u) * 16)}
#title .survrow>.btn.play .mode-ic{display:none}
#title .survrow>.btn.play .mode-name{font-size:calc(var(--u) * 28)}
#title .survrow>.btn.play small{font-size:max(11px,calc(var(--u) * 12.5));line-height:1.2}
#title .survrow>#playbtn,#title .survrow>#ultrabtn{min-height:calc(var(--u) * 92)}
#title #ultrabtn{min-height:calc(var(--u) * 92);color:#fff;border:1.5px solid rgba(206,150,255,.75);
  background:radial-gradient(120% 140% at 100% 0%,rgba(255,90,210,.38),rgba(255,90,210,0) 55%),radial-gradient(120% 140% at 0% 100%,rgba(70,200,255,.32),rgba(70,200,255,0) 60%),linear-gradient(180deg,rgba(54,24,92,.94),rgba(20,10,42,.95));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.14),0 4px 0 rgba(12,4,26,.6),var(--m-shadow);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}
#title #ultrabtn::after{content:"";position:absolute;top:-20%;bottom:-20%;left:-40%;width:24%;background:linear-gradient(90deg,rgba(255,255,255,0),rgba(255,255,255,.28),rgba(255,255,255,0));transform:skewX(-20deg);pointer-events:none;animation:m-shine 5.6s 2.2s ease-in-out infinite}
#title #ultrabtn .mode-ic{width:calc(var(--u) * 48);height:calc(var(--u) * 48);background:rgba(206,150,255,.16);border:1.5px solid rgba(206,150,255,.7);color:#f1dcff;box-shadow:0 0 14px rgba(190,110,255,.35)}
#title #ultrabtn .mode-name{font-size:calc(var(--u) * 30);background:linear-gradient(90deg,#7ff3ff,#ffe86a 45%,#ff7ad8);-webkit-background-clip:text;background-clip:text;color:transparent;text-shadow:none;filter:drop-shadow(0 2px 0 rgba(10,4,24,.6))}
#title #ultrabtn small{color:#e7d7ff}
@media (orientation:landscape) and (max-height:500px){
  #title #ultrabtn,#title .survrow>#playbtn,#title .survrow>#ultrabtn{min-height:54px}
  #title .survrow>.btn.play{padding:8px 10px;gap:8px;flex-direction:row;align-items:center;justify-content:flex-start}
  #title #playbtn .mode-ic,#title #ultrabtn .mode-ic{display:none}
  #title #ultrabtn .mode-name,#title #playbtn .mode-name{font-size:19px}
  #title #ultrabtn small{display:none}
}
@media (orientation:portrait) and (max-width:600px){
  #title .survrow{flex:1 1 0;flex-direction:column;gap:8px}
  #title .survrow>#playbtn,#title .survrow>#ultrabtn{flex:1 1 0;width:auto;min-height:48px;padding:6px 10px;justify-content:center}
  #title #ultrabtn .mode-ic{display:none}
  #title #ultrabtn .mode-name{font-size:21px}
  #title .survrow small{display:none}
}
@media (orientation:portrait) and (min-width:601px){
  #title .survrow{flex:1 1 0;flex-direction:column}
  #title .survrow>#playbtn,#title .survrow>#ultrabtn{flex:1 1 0;width:auto;min-height:calc(var(--u) * 56)}
}
/* --- the Ultra screen --- */
.screen:not(#title) .ultra-panel{max-width:1040px}
.screen:not(#title) .ultra-sub{display:flex;flex-wrap:wrap;gap:4px 10px;align-items:baseline;margin:2px 0 12px;color:var(--m-muted);font-size:14px}
.screen:not(#title) .ultra-sub small{color:#d7c3ff;font-weight:700}
.ultra-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:12px}
.ultra-card{position:relative;display:flex;flex-direction:column;min-width:0;min-height:300px;padding:0;overflow:hidden;border-radius:18px;border:1.5px solid rgba(255,255,255,.16);cursor:pointer;
  background:#120a22;color:#fff;text-align:left;font:inherit;box-shadow:0 10px 26px rgba(2,6,12,.45),inset 0 1px 0 rgba(255,255,255,.1);transition:transform .16s cubic-bezier(.2,.8,.25,1),box-shadow .16s}
.ultra-card:hover{transform:translateY(-3px)}.ultra-card:active{transform:translateY(1px) scale(.99)}
.ultra-card:focus-visible{outline:3px solid #ffe86a;outline-offset:3px}
.ultra-card .uc-art{position:absolute;inset:0 0 auto 0;width:100%;height:58%;object-fit:cover;display:block}
.ultra-card::before{content:"";position:absolute;left:0;right:0;top:40%;bottom:0;background:linear-gradient(180deg,rgba(18,10,34,0) 0%,rgba(18,10,34,.94) 28%,#140b26 100%);pointer-events:none}
.ultra-card.u-endless{border-color:rgba(110,230,255,.6)}.ultra-card.u-survival{border-color:rgba(255,200,80,.6)}.ultra-card.u-climb{border-color:rgba(255,110,150,.66)}
.ultra-card.u-endless::after,.ultra-card.u-survival::after,.ultra-card.u-climb::after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;box-shadow:inset 0 0 0 1px rgba(255,255,255,.06),inset 0 -40px 60px -30px var(--uc-glow)}
.ultra-card.u-endless{--uc-glow:rgba(80,220,255,.35);--uc-acc:#7ff3ff}.ultra-card.u-survival{--uc-glow:rgba(255,190,60,.32);--uc-acc:#ffd66b}.ultra-card.u-climb{--uc-glow:rgba(255,80,130,.36);--uc-acc:#ff8fb0}
.ultra-card .uc-head{position:relative;z-index:1;display:flex;justify-content:space-between;align-items:center;padding:12px 12px 0}
.ultra-card .uc-ic{display:grid;place-items:center;width:44px;height:44px;border-radius:14px;background:rgba(10,6,22,.72);border:1.5px solid var(--uc-acc);font-size:24px;box-shadow:0 4px 12px rgba(0,0,0,.4)}
.ultra-card .uc-diff{display:flex;gap:4px;padding:6px 8px;border-radius:999px;background:rgba(10,6,22,.72)}
.ultra-card .uc-diff i{width:10px;height:14px;border-radius:3px;background:rgba(255,255,255,.18);transform:skewX(-12deg)}
.ultra-card .uc-diff i.on{background:var(--uc-acc);box-shadow:0 0 8px var(--uc-acc)}
.ultra-card .uc-copy{position:relative;z-index:1;display:flex;flex-direction:column;gap:2px;margin-top:auto;padding:0 16px}
.ultra-card .uc-k{font:800 11px/1 var(--m-ui);letter-spacing:.24em;color:var(--uc-acc)}
.ultra-card .uc-copy b{font:700 34px/1 var(--font);letter-spacing:.01em;text-transform:uppercase;text-shadow:0 3px 0 rgba(0,0,0,.45)}
.ultra-card .uc-copy small{font:600 13.5px/1.3 var(--m-ui);color:#e4dcf2;opacity:.92}
.ultra-card .uc-foot{position:relative;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px 16px 14px}
.ultra-card .uc-best{font:600 12.5px/1.25 var(--m-ui);color:#cfc6e0;min-width:0}
.ultra-card .uc-best b{color:#fff}.ultra-card .uc-best em{font-style:normal;opacity:.8}
.ultra-card .uc-go{flex:none;display:inline-flex;align-items:center;justify-content:center;min-height:44px;min-width:88px;padding:0 18px;border-radius:999px;font:800 16px/1 var(--m-ui);color:var(--m-brown);background:var(--m-amber-grad);box-shadow:var(--m-amber-bevel)}
@media (max-width:760px){.ultra-cards{grid-template-columns:minmax(0,1fr)}.ultra-card{min-height:150px;display:grid;grid-template-columns:42% minmax(0,1fr);grid-template-rows:auto 1fr auto}
  .ultra-card .uc-art{position:relative;grid-row:1/4;grid-column:1;height:100%;inset:auto}.ultra-card::before{left:30%;top:0;background:linear-gradient(90deg,rgba(18,10,34,0) 0%,rgba(18,10,34,.95) 32%,#140b26 100%)}
  .ultra-card .uc-head{grid-column:2;padding:10px 10px 0 4px}.ultra-card .uc-copy{grid-column:2;padding:4px 10px 0 4px;margin:0}.ultra-card .uc-foot{grid-column:2;padding:8px 10px 10px 4px}
  .ultra-card .uc-copy b{font-size:26px}.ultra-card .uc-copy small{font-size:12px}.ultra-card .uc-ic{width:36px;height:36px;font-size:19px}}
@media (orientation:landscape) and (max-height:520px){.ultra-cards{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.ultra-card{display:flex;min-height:212px}
  .ultra-card .uc-art{position:absolute;inset:0 0 auto 0;height:52%;grid-row:auto}.ultra-card::before{left:0;top:34%;background:linear-gradient(180deg,rgba(18,10,34,0) 0%,rgba(18,10,34,.94) 28%,#140b26 100%)}
  .ultra-card .uc-head{padding:8px 8px 0}.ultra-card .uc-copy{padding:0 10px}.ultra-card .uc-foot{padding:6px 10px 8px;flex-wrap:wrap}.ultra-card .uc-copy b{font-size:22px}.ultra-card .uc-copy small{font-size:11px}.ultra-card .uc-ic{width:32px;height:32px;font-size:17px}
  .ultra-card .uc-go{min-width:72px;min-height:44px;font-size:14px}.ultra-card .uc-best{font-size:11px}}
@media (prefers-reduced-motion:reduce){.ultra-card{transition:none}.ultra-card:hover,.ultra-card:active{transform:none}#title #ultrabtn::after{animation:none;display:none}}
/* --- in-run badge: mode + Track N/M or LEVEL n with 10 pips --- */
.ultrabadge{position:fixed;left:calc(env(safe-area-inset-left) + 14px);top:calc(env(safe-area-inset-top) + 132px);z-index:6;display:flex;align-items:center;gap:8px;padding:5px 12px 5px 6px;border-radius:999px;pointer-events:none;
  background:linear-gradient(180deg,rgba(40,18,70,.82),rgba(16,8,34,.86));border:1.5px solid rgba(206,150,255,.6);color:#fff;box-shadow:0 6px 18px rgba(0,0,0,.35);font-family:var(--m-ui,system-ui)}
.ultrabadge.hidden{display:none}
.ultrabadge .ub-ic{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:rgba(255,255,255,.12);font-size:16px}
.ultrabadge .ub-t{display:flex;flex-direction:column;line-height:1.05}
.ultrabadge b{font:900 14px/1.05 var(--font);letter-spacing:.06em;background:linear-gradient(90deg,#7ff3ff,#ffe86a 50%,#ff7ad8);-webkit-background-clip:text;background-clip:text;color:transparent}
.ultrabadge small{font-size:10.5px;opacity:.85;white-space:nowrap;max-width:150px;overflow:hidden;text-overflow:ellipsis}
.ultrabadge .ub-pips{display:flex;gap:3px;margin-left:2px}
.ultrabadge .ub-pips i{width:7px;height:12px;border-radius:2px;background:rgba(255,255,255,.18);transform:skewX(-12deg)}
.ultrabadge .ub-pips i.on{background:linear-gradient(180deg,#ffe86a,#ff7a3a)}
.ultrabadge .ub-pips i.on:nth-child(n+5){background:linear-gradient(180deg,#ff9a5a,#ff3a5a)}.ultrabadge .ub-pips i.on:nth-child(n+8){background:linear-gradient(180deg,#ff6ad8,#b03aff)}
.ultrabadge .ub-pips i.cur{box-shadow:0 0 8px #ffe86a}
.ultrabadge .ub-prog{display:block;width:64px;height:7px;border-radius:4px;background:rgba(255,255,255,.18);overflow:hidden}.ultrabadge .ub-prog span{display:block;height:100%;background:linear-gradient(90deg,#ffd66b,#ff8a1a)}
.ultrabadge.u-endless{border-color:rgba(110,230,255,.6)}.ultrabadge.u-survival{border-color:rgba(255,200,80,.6)}.ultrabadge.u-climb{border-color:rgba(255,110,150,.66)}
@media (orientation:portrait){.ultrabadge{top:auto;bottom:calc(env(safe-area-inset-bottom) + 222px);left:50%;transform:translateX(-50%)}}
@media (orientation:landscape) and (max-height:500px){.ultrabadge{top:auto;left:50%;transform:translateX(-50%);bottom:calc(env(safe-area-inset-bottom) + 8px);padding:3px 9px 3px 4px}.ultrabadge .ub-ic{width:22px;height:22px;font-size:13px}.ultrabadge b{font-size:12px}.ultrabadge small{display:none}}
.ultra-res small.useed{display:block;font-size:11px;opacity:.6;margin-top:2px}
/* ===== v3.33 ultra: end ===== */
/* ===== v3.32.10 tester reward: stormy-night backdrop + the gold card (same overlay as the day skull) ===== */
.hdskull.hs-storm{background:radial-gradient(ellipse 85% 70% at 50% 40%,rgba(14,30,50,.972),rgba(5,12,22,.985) 60%,rgba(1,4,9,.994))}
.hdskull.hs-gold .hs-card{border-color:#ffd25e;background:radial-gradient(80% 60% at 50% 0%,rgba(255,200,70,.26),rgba(255,200,70,0) 70%),linear-gradient(180deg,rgba(40,30,8,.95),rgba(18,12,3,.97));
  box-shadow:0 0 0 5px rgba(255,210,94,.16),0 0 50px rgba(255,190,60,.5),0 20px 50px rgba(0,0,0,.6)}
.hdskull.hs-gold .hs-title{background:linear-gradient(180deg,#fff7c8 0%,#ffd25e 45%,#f29b12 100%);-webkit-background-clip:text;background-clip:text;color:transparent;text-shadow:none;
  filter:drop-shadow(0 0 10px rgba(255,200,80,.75)) drop-shadow(0 3px 0 #6b3d00)}
.hdskull.hs-gold .hs-sub{color:#ffe9b0}
.hdskull.hs-gold .hs-foot{color:#e8c070}
.hdskull.hs-gold .hs-amt b{color:#fff1a8;-webkit-text-stroke:2px #6b3d00;text-shadow:0 0 18px rgba(255,200,70,.95),0 0 44px rgba(255,160,30,.6),0 4px 0 #7a4600,0 8px 16px rgba(0,0,0,.6)}
/* ===== /v3.32.10 tester reward ===== */

/* ===== economy (2026-11-01): Daily Reward chip + card, Pit Crew tile + workshop screen. Chests in Survival are canvas-drawn (game.js). ===== */
/* -- the code-drawn chest (SVG): tier looks via custom properties -- */
.ecc{display:block;width:100%;height:100%;overflow:visible}
.ecc .ecc-wood{fill:var(--ecw,#9a5326);stroke:#2a1205;stroke-width:2.4;stroke-linejoin:round}
.ecc .ecc-lidw{fill:var(--ecw2,#b0652f)}
.ecc .ecc-plank{stroke:rgba(30,10,0,.32);stroke-width:1.6;fill:none}
.ecc .ecc-band,.ecc .ecc-plate{fill:var(--ecb,#ffd65a);stroke:var(--ecbd,#7a4a06);stroke-width:1.4;stroke-linejoin:round}
.ecc .ecc-hole{fill:#2a1205}
.ecc .ecc-shine{fill:none;stroke:rgba(255,255,255,.4);stroke-width:2.2;stroke-linecap:round}
.ecc .ecc-lid{transform-box:view-box;transform-origin:7px 27px;transition:transform .35s cubic-bezier(.2,1.5,.4,1)}
.ecc .ecc-in{opacity:0;transition:opacity .2s}.ecc .ecc-mouth{fill:#2a1205}.ecc .ecc-coin{fill:#ffd23f;stroke:#b07a06;stroke-width:1.2}
.c-bronze{--ecw:#8c4c25;--ecw2:#a65d2c;--ecb:#e9a25a;--ecbd:#6e3b10}
.c-silver{--ecw:#7d4a2a;--ecw2:#93583a;--ecb:#e8eef6;--ecbd:#5c6876}
.c-gold{--ecw:#8a3e1e;--ecw2:#a24c24;--ecb:#ffd65a;--ecbd:#7a4a06}
.c-big{--ecw:#4c2a7a;--ecw2:#6a3aa8;--ecb:#ffd65a;--ecbd:#7a4a06}
.ecd-ch.open .ecc-lid,.ecd-day.opening .ecc-lid{transform:translate(0,-11px) rotate(-8deg)}
.ecd-ch.open .ecc-in,.ecd-day.opening .ecc-in{opacity:1}

/* -- title: Daily chip (beside the wallet) -- */
#title .ecdchip{position:relative;display:inline-flex;align-items:center;gap:7px;margin-left:auto;min-height:var(--hud);padding:3px 14px 3px 6px;border-radius:999px;border:1px solid rgba(255,214,107,.55);
  background:linear-gradient(180deg,rgba(74,44,8,.88),rgba(36,22,6,.9));color:#ffe7a6;font:800 max(13px,calc(var(--u) * 13.5))/1 var(--m-ui);letter-spacing:.01em;box-shadow:var(--m-shadow);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}
#title .ecdchip .ecc{width:calc(var(--hud) - 12px);height:calc(var(--hud) - 14px);flex:none;--ecw:#8a3e1e;--ecw2:#a24c24;--ecb:#ffd65a;--ecbd:#7a4a06;filter:drop-shadow(0 2px 2px rgba(0,0,0,.4))}
#title .ecdchip .ecdc-dot{position:absolute;top:3px;right:5px;width:11px;height:11px;border-radius:50%;background:#ff3b4a;border:2px solid #24160a;display:none}
#title .ecdchip.ready{border-color:#ffd66b;background:linear-gradient(180deg,#7a4a0c,#3a2208);box-shadow:0 0 0 0 rgba(255,214,107,.6),var(--m-shadow);animation:ecd-chip 1.8s ease-in-out infinite}
#title .ecdchip.ready .ecdc-dot{display:block}
#title .ecdchip.ready .ecc-lid{animation:ecc-peek 1.8s ease-in-out infinite}
#title .ecdchip.done{border-color:rgba(120,230,150,.5);color:#bff5cc;background:var(--m-glass)}
#title .ecdchip.done .ecc{opacity:.9}
@keyframes ecd-chip{0%,100%{box-shadow:0 0 0 0 rgba(255,214,107,.0),var(--m-shadow)}50%{box-shadow:0 0 0 6px rgba(255,214,107,.22),0 0 22px rgba(255,190,60,.55)}}
@keyframes ecc-peek{0%,70%,100%{transform:none}80%{transform:translate(-1px,-4px) rotate(-14deg)}90%{transform:translate(0,-1px) rotate(-4deg)}}

/* -- title: the Pit Crew tile (6th in the dock) -- */
#title .menu-row{grid-template-columns:repeat(6,minmax(0,1fr))}
#title .btn.tile.ecshop{position:relative}
#title .btn.tile.ecshop em .ecjar{width:calc(var(--u) * 25);height:calc(var(--u) * 25);color:var(--m-amber-hi)}
#title .ecshop .ecs-m{position:absolute;left:22%;right:22%;bottom:calc(var(--u) * 4);height:3px;border-radius:2px;background:rgba(255,255,255,.14);overflow:hidden}
#title .ecshop .ecs-m i{display:block;height:100%;width:0;border-radius:2px;background:linear-gradient(90deg,#ffb22e,#ffe27a)}
#title .ecshop .ecs-b{position:absolute;top:calc(var(--u) * 3);right:8%;min-width:0;padding:2px 6px;border-radius:999px;background:#ffd23f;color:#3a1703;font:800 10px/1.2 var(--m-ui);display:none}
#title .ecshop.ready .ecs-b{display:block}
#title .ecshop.full .ecs-b{background:#3ccf5a;color:#06210d;animation:ecs-bob 1.4s ease-in-out infinite}
#title .ecshop.full em{animation:ecs-bob 1.4s ease-in-out infinite}
@keyframes ecs-bob{50%{transform:translateY(-2px)}}
@media (orientation:landscape) and (max-height:520px){#title .ecshop .ecs-m{display:none}#title .ecshop .ecs-b{top:2px;right:4%}}

/* -- the Daily Reward card -- */
.ecdaily{position:fixed;inset:0;z-index:70;display:none;align-items:center;justify-content:center;padding:max(12px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));
  background:radial-gradient(ellipse at 50% 40%,rgba(40,24,70,.62),rgba(6,4,14,.88));animation:fadein .25s ease}
.ecdaily.on{display:flex}
.ecd-panel{position:relative;overflow:hidden;width:min(860px,100%);max-height:100%;padding:18px 22px 14px;border-radius:28px;border:3px solid #ffc44a;color:#fff6e4;text-align:center;
  background:radial-gradient(80% 60% at 50% 0%,rgba(255,180,50,.28),rgba(255,180,50,0) 70%),linear-gradient(180deg,#2c1b4f 0%,#1c1236 58%,#120b24 100%);
  box-shadow:0 0 0 5px rgba(255,196,74,.14),0 0 50px rgba(255,170,40,.35),0 24px 60px rgba(0,0,0,.55);animation:popin .45s cubic-bezier(.2,1.6,.4,1);font-family:var(--font)}
.ecd-glow{position:absolute;left:50%;top:-140px;width:520px;height:300px;transform:translateX(-50%);background:radial-gradient(closest-side,rgba(255,214,107,.35),rgba(255,214,107,0));pointer-events:none}
.ecd-head{position:relative;display:flex;align-items:center;justify-content:center;gap:16px;margin-bottom:12px}
.ecd-titles{flex:1;min-width:0}
.ecd-title{margin:0;font:800 40px/1.05 var(--font);letter-spacing:.01em;background:linear-gradient(180deg,#fff7c4 0%,#ffd25e 48%,#ff9a1a 100%);-webkit-background-clip:text;background-clip:text;color:transparent;
  -webkit-text-stroke:0;filter:drop-shadow(0 3px 0 #5a2a04) drop-shadow(0 6px 10px rgba(0,0,0,.45))}
.ecd-sub{margin:6px 0 0;font:600 16px/1.3 var(--font);color:#f0dcff}
.ecd-sub b{color:#ffe27a}
.ecd-wallet{position:absolute;top:-4px;right:0;display:flex;align-items:center;gap:7px;padding:5px 12px 5px 6px;border-radius:999px;background:rgba(0,0,0,.35);border:1.5px solid rgba(255,214,107,.5);font:800 17px/1 var(--font);color:#ffe7a6;font-variant-numeric:tabular-nums}
.ecd-wallet .coin-ic{width:24px;height:24px;flex:none}
.ecd-wallet.cpulse{animation:bump .3s ease}
.ecd-days{position:relative;list-style:none;margin:0 0 12px;padding:6px 2px 0;display:grid;grid-template-columns:repeat(6,minmax(0,1fr)) minmax(0,1.32fr);gap:10px;align-items:end}
.ecd-day{position:relative;display:flex;flex-direction:column;align-items:center;gap:4px;min-height:140px;padding:9px 5px 9px;border-radius:18px;border:2px solid rgba(255,255,255,.14);
  background:linear-gradient(180deg,rgba(255,255,255,.09),rgba(255,255,255,.03));box-shadow:inset 0 1px 0 rgba(255,255,255,.08)}
.ecd-n{font:800 13px/1 var(--font);letter-spacing:.06em;text-transform:uppercase;color:#d8c6f5;white-space:nowrap}
.ecd-ch{position:relative;display:block;width:84%;max-width:90px;aspect-ratio:64/56;margin:14px 0 2px;filter:drop-shadow(0 4px 3px rgba(0,0,0,.45))}
.ecd-amt{display:inline-flex;align-items:center;gap:4px;font:800 16px/1 var(--font);color:#ffe27a;font-variant-numeric:tabular-nums;white-space:nowrap}
.ecd-amt .coin-ic.sm{width:15px;height:15px;flex:none}
.ecd-ok{position:absolute;top:-8px;right:-6px;display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:linear-gradient(#5ff08a,#22b04e);color:#05290f;font:900 17px/1 var(--font);font-style:normal;border:2.5px solid #0f2b18;box-shadow:0 3px 0 rgba(0,0,0,.35)}
.ecd-lk{position:absolute;top:-8px;right:-6px;display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#2e2547;border:2px solid rgba(255,255,255,.22);color:#a89cc4;font-style:normal}.ecd-lk svg{width:12px;height:12px}
.ecd-day.done{border-color:rgba(95,240,138,.45);background:linear-gradient(180deg,rgba(95,240,138,.14),rgba(95,240,138,.04))}
.ecd-day.done .ecd-ch{filter:drop-shadow(0 4px 3px rgba(0,0,0,.45)) saturate(.75) brightness(.92)}
.ecd-day.done .ecd-amt{color:#bff5cc}
.ecd-day.lock{opacity:.62}
.ecd-day.lock .ecd-ch{filter:drop-shadow(0 4px 3px rgba(0,0,0,.45)) saturate(.45) brightness(.8)}
.ecd-day.big{min-height:162px;border-color:rgba(205,140,255,.6);background:radial-gradient(90% 70% at 50% 35%,rgba(190,110,255,.35),rgba(190,110,255,0) 75%),linear-gradient(180deg,rgba(120,60,200,.35),rgba(60,20,110,.25))}
.ecd-day.big .ecd-n{color:#f0d0ff;padding:0 6px;font-size:12px}
.ecd-day.big .ecd-lk{display:none}
.ecd-day.big .ecd-ch{width:92%;max-width:118px;margin-top:8px;filter:drop-shadow(0 4px 3px rgba(0,0,0,.45)) drop-shadow(0 0 14px rgba(255,200,90,.45))}
.ecd-day.big .ecd-amt{font-size:19px}
.ecd-day.big{box-shadow:0 0 0 2px rgba(205,140,255,.18),0 0 26px rgba(170,90,255,.35)}
.ecd-day.today{border-color:#ffd66b;background:radial-gradient(90% 70% at 50% 40%,rgba(255,200,80,.42),rgba(255,200,80,0) 80%),linear-gradient(180deg,rgba(255,190,60,.28),rgba(255,140,30,.1));
  transform:translateY(-8px) scale(1.06);box-shadow:0 0 0 3px rgba(255,214,107,.25),0 0 30px rgba(255,180,40,.55),0 12px 22px rgba(0,0,0,.4);z-index:1}
.ecd-day.today .ecd-n{color:#fff1c2}
.ecd-day.today .ecd-ch{animation:ecd-wiggle 1.6s ease-in-out infinite}
.ecd-day.today::after{content:"TODAY";position:absolute;left:50%;bottom:-11px;transform:translateX(-50%);padding:3px 9px;border-radius:999px;background:linear-gradient(#ffd25e,#ff8a1a);color:#3a1703;font:800 10.5px/1 var(--font);letter-spacing:.1em;box-shadow:0 3px 0 #a24d06}
.ecd-rays{position:absolute;left:50%;top:44%;width:200%;aspect-ratio:1;transform:translate(-50%,-50%);border-radius:50%;pointer-events:none;opacity:.55;
  background:repeating-conic-gradient(from 0deg,rgba(255,226,140,.5) 0deg 9deg,rgba(255,226,140,0) 9deg 24deg);-webkit-mask:radial-gradient(closest-side,#000 25%,transparent 72%);mask:radial-gradient(closest-side,#000 25%,transparent 72%);animation:ecd-spin 9s linear infinite}
.ecd-day.opening .ecd-rays{opacity:1;animation:ecd-spin 3s linear infinite,ecd-flare .9s ease-out both}
.ecd-day.opening .ecd-ch{animation:ecd-shake .5s ease-in-out}
.ecd-day.opening .ecd-ch::after{content:"";position:absolute;left:10%;right:10%;top:6%;height:46%;border-radius:50%;background:radial-gradient(closest-side,rgba(255,250,210,.95),rgba(255,214,107,0));animation:ecd-flash .9s ease-out .35s both}
.ecd-day.just{animation:ecd-pop .5s cubic-bezier(.2,1.6,.4,1)}
.ecd-day.just .ecd-ok{animation:ecd-pop .5s cubic-bezier(.2,1.6,.4,1) .1s both}
.ecd-plus{display:none}
.ecd-plus.go{display:block;position:absolute;left:50%;top:22%;transform:translateX(-50%);font:900 26px/1 var(--font);color:#ffe27a;white-space:nowrap;pointer-events:none;-webkit-text-stroke:5px #3a1703;paint-order:stroke fill;text-shadow:0 3px 0 #3a1703,0 0 18px rgba(255,200,60,.8);animation:ecd-rise 1.6s cubic-bezier(.2,.9,.3,1) both}
@keyframes ecd-rise{0%{opacity:0;transform:translate(-50%,16px) scale(.6)}18%{opacity:1;transform:translate(-50%,-6px) scale(1.18)}70%{opacity:1;transform:translate(-50%,-30px) scale(1)}100%{opacity:0;transform:translate(-50%,-48px) scale(.96)}}
@keyframes ecd-wiggle{0%,62%,100%{transform:none}70%{transform:rotate(-6deg) translateY(-2px)}78%{transform:rotate(5deg) translateY(-3px)}86%{transform:rotate(-3deg)}94%{transform:rotate(1deg)}}
@keyframes ecd-shake{0%,100%{transform:none}20%{transform:translateX(-4px) rotate(-5deg)}40%{transform:translateX(4px) rotate(5deg)}60%{transform:translateX(-3px) rotate(-3deg) scale(1.08)}80%{transform:translateX(2px) scale(1.12)}}
@keyframes ecd-spin{to{transform:translate(-50%,-50%) rotate(360deg)}}
@keyframes ecd-flare{0%{opacity:.55;scale:.6}40%{opacity:1;scale:1.25}100%{opacity:.7;scale:1}}
@keyframes ecd-flash{0%{opacity:0;transform:scale(.4)}35%{opacity:1;transform:scale(1.5)}100%{opacity:0;transform:scale(2.2)}}
@keyframes ecd-pop{40%{transform:scale(1.16)}}
.ecd-acts{position:relative;display:flex;justify-content:center}
.ecdaily .btn.play.ecd-go{font-size:26px;padding:11px 44px;margin:4px 0 2px;min-height:48px;background:linear-gradient(#ffd25e,#ff8a1a);color:#3a1703;box-shadow:0 7px 0 #b4570a,0 12px 24px rgba(0,0,0,.35),inset 0 2px 0 rgba(255,255,255,.6);text-shadow:none;font-family:var(--font)}
.ecdaily .btn.play.ecd-go:focus-visible{outline:3px solid #fff;outline-offset:3px}
.ecdaily .btn.play.ecd-go[disabled]{filter:saturate(.5) brightness(.85)}
.ecd-foot{position:relative;margin:10px 0 0;font:700 12.5px/1.3 var(--font);letter-spacing:.03em;color:#b9a6d8}
@media (orientation:landscape) and (max-height:500px){ /* sideways phones */
  .ecd-panel{padding:9px 16px 8px;border-radius:22px;width:min(780px,100%)}
  .ecd-head{margin-bottom:6px}.ecd-title{font-size:26px}.ecd-sub{font-size:13px;margin-top:2px}
  .ecd-wallet{top:-2px;padding:3px 9px 3px 4px;font-size:14px}.ecd-wallet .coin-ic{width:19px;height:19px}
  .ecd-days{gap:7px;margin-bottom:8px;padding-top:4px}
  .ecd-day{min-height:104px;padding:6px 3px 7px;border-radius:14px;gap:2px}.ecd-day.big{min-height:118px}
  .ecd-n{font-size:10.5px;letter-spacing:.04em}.ecd-ch{max-width:62px;margin:8px 0 1px}.ecd-day.big .ecd-ch{max-width:80px;margin-top:4px}.ecd-plus.go{font-size:19px;-webkit-text-stroke:4px #3a1703}.ecd-lk,.ecd-ok{width:20px;height:20px;top:-6px;right:-4px}
  .ecd-amt{font-size:13.5px}.ecd-day.big .ecd-amt{font-size:15px}.ecd-ok{width:22px;height:22px;font-size:13px;top:-6px;right:-4px}
  .ecd-day.today{transform:translateY(-5px) scale(1.05)}.ecd-day.today::after{font-size:9px;padding:2px 7px;bottom:-9px}
  .ecdaily .btn.play.ecd-go{font-size:19px;padding:6px 32px;min-height:44px;margin:2px 0 0}.ecd-foot{margin-top:5px;font-size:10.5px}
}
@media (max-width:620px) and (orientation:portrait){
  .ecd-days{grid-template-columns:repeat(4,minmax(0,1fr));row-gap:16px}.ecd-day.big{grid-column:span 2}
  .ecd-title{font-size:30px}.ecd-wallet{position:static;margin-top:6px}.ecd-head{flex-direction:column;gap:2px}
}
@media (prefers-reduced-motion:reduce){.ecdaily,.ecdaily *,.ecdaily *::before,.ecdaily *::after,#title .ecdchip,#title .ecdchip *,#title .ecshop,#title .ecshop *{animation:none!important;transition:none!important}}
body.redmo .ecdaily,body.redmo .ecdaily *,body.redmo .ecdaily *::before,body.redmo .ecdaily *::after,body.redmo #title .ecdchip,body.redmo #title .ecdchip *,body.redmo #title .ecshop *{animation:none!important;transition:none!important}

/* -- the Pit Crew workshop screen -- */
#ecshop.screen .panel.ecw-panel{max-width:980px;background:linear-gradient(180deg,#1c2738,#121a27);color:#eef3f8;border:3px solid #ffb22e;box-shadow:0 0 0 5px rgba(255,178,46,.12),0 24px 60px rgba(0,0,0,.5)}
#ecshop.screen .ecw-top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}
#ecshop.screen .ecw-top h2{margin:0;display:flex;align-items:center;gap:10px;color:#ffe7a6;text-shadow:0 2px 0 rgba(0,0,0,.4)}
#ecshop.screen .ecw-hic .ecjar{width:34px;height:34px;color:#ffd66b;display:block}
#ecshop.screen .ecw-stage{position:relative;border-radius:18px;overflow:hidden;border:2px solid rgba(255,255,255,.12);box-shadow:inset 0 0 40px rgba(0,0,0,.45)}
#ecshop.screen #ecwcv{display:block;width:100%;height:auto;aspect-ratio:960/380;background:#1d2a3c}
#ecshop.screen .ecw-jarinfo{position:absolute;right:3%;top:6%;display:flex;flex-direction:column;align-items:flex-end;padding:8px 14px;border-radius:14px;background:rgba(8,12,20,.72);border:1.5px solid rgba(255,214,107,.45);font-variant-numeric:tabular-nums}
#ecshop.screen .ecw-jarinfo b{font:800 30px/1 var(--font);color:#ffd23f}
#ecshop.screen .ecw-jarinfo span{font:700 13px/1.2 var(--font);color:#c9d4e2}
#ecshop.screen .ecw-meter{height:14px;margin:12px 4px 6px;border-radius:999px;background:rgba(255,255,255,.1);overflow:hidden;border:1.5px solid rgba(255,255,255,.14)}
#ecshop.screen .ecw-meter i{display:block;height:100%;width:0;border-radius:999px;background:linear-gradient(90deg,#ff8a1a,#ffd23f 70%,#fff3b0);box-shadow:0 0 12px rgba(255,200,60,.6);transition:width .6s ease}
#ecshop.screen .ecw-line{margin:4px 0 8px;font:600 17px/1.3 var(--font);color:#eef3f8}
#ecshop.screen .ecw-line b{color:#ffd66b}
#ecshop.screen .ecw-acts{gap:12px;justify-content:center}
#ecshop.screen .btn.play.ecw-go{font-size:24px;padding:11px 34px;background:linear-gradient(#ffd25e,#ff8a1a);color:#3a1703;box-shadow:0 7px 0 #b4570a,0 12px 24px rgba(0,0,0,.35),inset 0 2px 0 rgba(255,255,255,.6);text-shadow:none}
#ecshop.screen .btn.play.ecw-go[disabled]{background:linear-gradient(#5b6575,#3d4553);color:#d5dce6;box-shadow:0 5px 0 #262b33;cursor:default}
#ecshop.screen .ecw-help{margin:30px 0 0;width:100%;text-align:center;font:600 13.5px/1.4 var(--font);color:#9fb0c4}
#ecshop.screen .ecw-line{text-align:center}
@media (orientation:landscape) and (max-height:500px){
  #ecshop.screen .panel.ecw-panel{padding:8px 14px;display:grid;grid-template-columns:minmax(0,1.45fr) minmax(0,1fr);grid-template-areas:'top top' 'stage meter' 'stage line' 'stage acts';grid-template-rows:auto auto auto 1fr;column-gap:14px;align-items:start}
  #ecshop.screen .ecw-top{grid-area:top}#ecshop.screen .ecw-stage{grid-area:stage}#ecshop.screen .ecw-meter{grid-area:meter}#ecshop.screen .ecw-line{grid-area:line}#ecshop.screen .ecw-acts{grid-area:acts;flex-direction:row-reverse;flex-wrap:nowrap;align-items:stretch;justify-content:flex-end;gap:8px;margin:2px 0 0}#ecshop.screen .ecw-acts [data-back]{flex:none;min-height:44px;padding:4px 12px;font-size:15px}#ecshop.screen .ecw-acts .ecw-go{flex:1;min-width:0;font-size:17px;padding:6px 10px}#ecshop.screen .ecw-acts .btn{margin:0}#ecshop.screen .ecw-top{margin-bottom:4px}#ecshop.screen .ecw-top h2{font-size:20px}#ecshop.screen .ecw-hic .ecjar{width:24px;height:24px}
  #ecshop.screen .ecw-stage{width:min(100%,calc((100vh - 96px) * 960 / 380));margin:0;border-radius:12px;align-self:center}#ecshop.screen .ecw-jarinfo{padding:4px 9px}#ecshop.screen .ecw-jarinfo b{font-size:20px}#ecshop.screen .ecw-jarinfo span{font-size:10.5px}
  #ecshop.screen .ecw-meter{height:10px;margin:4px 0 5px;width:100%}#ecshop.screen .ecw-line{font-size:13.5px;margin:0 0 6px;text-align:left}#ecshop.screen .btn.play.ecw-go{font-size:18px;padding:6px 22px;min-height:44px}#ecshop.screen .ecw-help{display:none}
}

/* ===== flip rescue: the question card (game.js "flip rescue"). Above the pedals (6) and ALT LANE / ROCKET (7), below menus (10) and toasts (30).
   Forced answer: no backdrop, no close button, tap outside does nothing (exclusion list, ANY-APP §UI). Answers are >= 50 px tall on every layout (spec: 44 px+). ===== */
.flipq{--fq-acc:#ffd43b;--fq-acc2:#ff9f1c;--fq-ink:#2b2140;--fq-bg1:rgba(48,32,92,.95);--fq-bg2:rgba(22,14,48,.96);--fq-glow:rgba(255,190,40,.28);
  position:fixed;z-index:8;display:none;left:calc(50% - 46px);top:calc(50% + 34px);translate:0 -50%;width:min(452px,calc(50% + 14px));box-sizing:border-box;
  padding:16px 16px 14px;border-radius:24px;color:#fff;font-family:var(--font);text-align:center;
  background:radial-gradient(120% 70% at 50% -10%,rgba(255,255,255,.13),rgba(255,255,255,0) 60%),linear-gradient(165deg,var(--fq-bg1),var(--fq-bg2));
  border:2px solid rgba(255,214,90,.92);box-shadow:0 8px 0 rgba(10,4,26,.45),0 22px 46px rgba(8,3,24,.55),0 0 0 6px var(--fq-glow),inset 0 1px 0 rgba(255,255,255,.28);
  touch-action:manipulation;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;overflow:visible}
.flipq.on{display:block;animation:fqIn .34s cubic-bezier(.2,1.5,.45,1) both}
.flipq.out{animation:fqOut .28s ease-in both;pointer-events:none}
.flipq::before{content:"";position:absolute;left:22px;right:22px;top:-9px;height:12px;border-radius:7px;border:2px solid var(--fq-ink);
  background:repeating-linear-gradient(-45deg,#ffd43b 0 10px,#2b2140 10px 20px);box-shadow:0 3px 0 rgba(0,0,0,.25)}
.fq-top{display:flex;align-items:center;gap:12px;text-align:left;margin:2px 0 8px}
.fq-ring{position:relative;flex:0 0 66px;width:66px;height:66px}
.fq-ring svg{width:100%;height:100%;transform:rotate(-90deg);overflow:visible}
.fq-track{fill:rgba(8,4,24,.55);stroke:rgba(255,255,255,.14);stroke-width:7}
.fq-arc{fill:none;stroke:var(--fq-acc);stroke-width:7;stroke-linecap:round;stroke-dasharray:100 100;transition:stroke .25s;filter:drop-shadow(0 0 4px var(--fq-glow))}
.fq-sec{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:27px;font-weight:900;line-height:1;text-shadow:0 2px 0 rgba(0,0,0,.35)}
.fq-pen{position:absolute;left:50%;top:-4px;translate:-50% 0;padding:2px 8px;border-radius:999px;background:#ff4a3a;color:#fff;font-style:normal;font-size:13px;font-weight:900;
  box-shadow:0 3px 0 #a3241a;opacity:0;pointer-events:none;white-space:nowrap}
.flipq.pen .fq-pen{animation:fqPen .9s ease-out both}
.flipq.pen .fq-arc{stroke:#ff5a4a}
.fq-head{min-width:0;flex:1}
.fq-title{margin:0;display:flex;align-items:center;gap:8px;font-size:16px;font-weight:900;letter-spacing:.09em;text-transform:uppercase;color:var(--fq-acc);text-shadow:0 2px 0 rgba(0,0,0,.4)}
.fq-ic{display:inline-flex;width:34px;height:24px;flex:0 0 auto;padding:2px 4px;border-radius:8px;background:rgba(255,255,255,.12)}.fq-ic svg{width:100%;height:100%;overflow:visible}
.flipq:not(.still) .fq-ic svg{animation:fqBob 1.1s ease-in-out infinite}
.fq-sub{margin:3px 0 0;font-size:14px;font-weight:700;line-height:1.25;color:#efeaff;min-height:1.25em}
.fq-q{display:flex;align-items:center;justify-content:center;gap:12px;margin:4px 0 12px;font-size:44px;font-weight:900;line-height:1.05;letter-spacing:.01em;
  text-shadow:0 3px 0 rgba(0,0,0,.35);font-variant-numeric:tabular-nums;white-space:nowrap}
.fq-eq{color:rgba(255,255,255,.62)}
.fq-ans{display:inline-flex;align-items:center;justify-content:center;min-width:1.3em;height:1.18em;padding:0 .14em;border-radius:14px;border:3px dashed var(--fq-acc);color:var(--fq-acc);font-size:.9em}
.flipq.ok .fq-ans{border-style:solid;background:#2fc35a;border-color:#a8ffbf;color:#fff;animation:fqPop .4s cubic-bezier(.2,1.6,.4,1)}
.fq-opts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.fq-opts.n3{grid-template-columns:repeat(3,minmax(0,1fr));padding:0 6%}
.fq-o{position:relative;min-height:66px;border:0;border-radius:18px;padding:6px 4px 10px;font:inherit;font-size:32px;font-weight:900;line-height:1;color:var(--fq-ink);cursor:pointer;
  background:linear-gradient(#ffffff,#e4defc);box-shadow:0 6px 0 #8f82d4,0 10px 18px rgba(0,0,0,.28),inset 0 2px 0 #fff;transition:transform .08s,box-shadow .08s,background .15s;touch-action:manipulation;font-variant-numeric:tabular-nums}
.fq-o b{font-weight:900;position:relative;top:2px}
.fq-o:active:not(:disabled){transform:translateY(4px);box-shadow:0 2px 0 #8f82d4,0 4px 8px rgba(0,0,0,.25),inset 0 2px 0 #fff}
.fq-o:disabled{cursor:default;opacity:.5}
.fq-o.right{opacity:1;color:#fff;background:linear-gradient(#7cf29a,#25b851);box-shadow:0 6px 0 #17803a,0 0 0 4px rgba(124,242,154,.45),0 10px 22px rgba(30,180,80,.45);animation:fqPop .4s cubic-bezier(.2,1.6,.4,1)}
.fq-o.wrong{opacity:1;color:#fff;background:linear-gradient(#ff8b7c,#e23b2b);box-shadow:0 6px 0 #9e2318,0 10px 18px rgba(0,0,0,.28)}
.fq-o.focus{outline:4px solid var(--fq-acc);outline-offset:3px;box-shadow:0 6px 0 #8f82d4,0 0 22px var(--fq-glow)}
.fq-k{position:absolute;left:7px;top:6px;width:19px;height:19px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-style:normal;font-size:12px;font-weight:900;color:#fff;background:rgba(43,33,64,.55)}
.flipq.touch .fq-k{display:none}
.fq-hint{margin:12px 0 0;min-height:0;font-size:14px;font-weight:700;line-height:1.35;color:#fff3c9}
.fq-hint:empty{display:none}
.fq-hint b{display:inline-block;margin-right:6px;padding:1px 8px;border-radius:999px;background:var(--fq-acc);color:var(--fq-ink);font-size:12px;letter-spacing:.06em;text-transform:uppercase;vertical-align:1px}
.fq-tip{font-size:12px;font-weight:700;color:rgba(255,255,255,.62)}
.flipq.ok{border-color:#8dffad;box-shadow:0 8px 0 rgba(10,4,26,.45),0 22px 46px rgba(8,3,24,.55),0 0 0 6px rgba(80,230,120,.3),inset 0 1px 0 rgba(255,255,255,.28)}
.flipq.ok .fq-arc{stroke:#5cf08a}
.flipq.due .fq-arc{stroke:#ff9f1c}
.flipq.due:not(.still) .fq-ring{animation:fqThrob .8s ease-in-out infinite}
.flipq.shake:not(.still) .fq-opts,.flipq.shake:not(.still) .fq-q{animation:fqShake .42s cubic-bezier(.36,.07,.19,.97) both}
/* rarity = who comes to help: the card wears the tier colour (Common green, Rare blue, Epic purple, Ultra gold) */
.flipq.t0{--fq-acc:#86ec95;--fq-glow:rgba(123,224,138,.3);border-color:rgba(134,236,149,.92)}
.flipq.t1{--fq-acc:#6cb8ff;--fq-glow:rgba(79,157,255,.32);border-color:rgba(108,184,255,.92)}
.flipq.t2{--fq-acc:#c597ff;--fq-glow:rgba(183,121,255,.32);border-color:rgba(197,151,255,.92)}
.flipq.t3{--fq-acc:#ffd43b;--fq-glow:rgba(255,190,40,.32);border-color:rgba(255,214,90,.95)}
.fq-tier{margin-left:auto;padding:2px 9px;border-radius:999px;background:var(--fq-acc);color:var(--fq-ink);font-style:normal;font-size:11px;letter-spacing:.08em;text-shadow:none;box-shadow:0 2px 0 rgba(0,0,0,.3)}
.flipq.t3 .fq-tier{background:linear-gradient(90deg,#ff6b6b,#ffd43b,#6bffb0,#6cb8ff,#c597ff);color:#2b2140}
/* Hallows Hill: the same helpers with a ghost-green glow; the card goes graveyard-dark */
.flipq.ghost{--fq-bg1:rgba(18,40,34,.95);--fq-bg2:rgba(20,10,36,.96);box-shadow:0 8px 0 rgba(10,4,26,.45),0 22px 46px rgba(8,3,24,.55),0 0 0 6px var(--fq-glow),0 0 34px rgba(90,255,160,.35),inset 0 1px 0 rgba(255,255,255,.28)}
@keyframes fqIn{from{opacity:0;transform:scale(.82) translateY(14px)}to{opacity:1;transform:none}}
@keyframes fqOut{to{opacity:0;transform:scale(.9) translateY(-18px)}}
@keyframes fqPen{0%{opacity:0;transform:translateY(8px) scale(.6)}20%{opacity:1;transform:translateY(-6px) scale(1.15)}70%{opacity:1;transform:translateY(-14px) scale(1)}100%{opacity:0;transform:translateY(-22px)}}
@keyframes fqPop{0%{transform:scale(.9)}55%{transform:scale(1.1)}100%{transform:scale(1)}}
@keyframes fqShake{10%,90%{transform:translateX(-2px)}20%,80%{transform:translateX(4px)}30%,50%,70%{transform:translateX(-7px)}40%,60%{transform:translateX(7px)}}
@keyframes fqThrob{50%{transform:scale(1.08)}}
@keyframes fqBob{50%{transform:translateY(-3px) rotate(-3deg)}}
.flipq.still,.flipq.still *{animation:none!important;transition:none!important}
.flipq.still.pen .fq-pen{opacity:1}
body.flipq-on #pedals{opacity:.42;transition:opacity .2s}
body.flipq-on #hauntchoices,body.flipq-on #altlanebtn,body.flipq-on #rocketbtn{visibility:hidden}
@media (prefers-reduced-motion:reduce){.flipq,.flipq *{animation:none!important;transition:none!important}.flipq.pen .fq-pen{opacity:1}}
/* sideways phones: compact, bottom right between the minimap and the Gas pedal; the camera slides the car into the space on the left */
@media (orientation:landscape) and (max-height:500px) and (min-width:560px){
  .flipq{left:auto;right:max(118px,calc(env(safe-area-inset-right) + 104px));top:auto;bottom:8px;translate:none;width:min(348px,calc(100vw - 460px));min-width:292px;padding:9px 10px 8px;border-radius:18px;border-width:2px}
  .flipq::before{left:16px;right:16px;top:-7px;height:9px}
  .fq-top{gap:8px;margin:0 0 2px}.fq-ring{flex-basis:44px;width:44px;height:44px}.fq-sec{font-size:19px}.fq-track,.fq-arc{stroke-width:8}
  .fq-title{font-size:12px;gap:5px}.fq-ic{width:28px;height:17px}.fq-sub{font-size:11.5px;margin-top:1px}
  .fq-q{font-size:28px;margin:0 0 7px;gap:8px}.fq-ans{border-width:2px;border-radius:10px}
  .fq-opts{gap:7px}.fq-opts.n3{padding:0 4%}.fq-o{min-height:50px;font-size:24px;border-radius:14px;padding:4px 3px 8px}
  .fq-hint{font-size:11.5px;margin-top:7px;line-height:1.3}.fq-hint b{font-size:10px;padding:0 6px}}
/* upright phones: full width at the top; the distance card and the mini map step aside while it is up, the car stays visible below */
@media (orientation:portrait) and (max-width:600px){
  .flipq{left:12px;right:12px;width:auto;top:max(102px,calc(env(safe-area-inset-top) + 94px));translate:none;padding:14px 12px 12px}
  .fq-q{font-size:40px}.fq-o{min-height:62px;font-size:28px}
  body.flipq-on .hud-mid,body.flipq-on #trackname{opacity:0;transition:opacity .2s;pointer-events:none}}
/* ===== v3.33 HUD 10x: one in-race design system (Jesse 2026-11-02: "the whole entire HUD display in game need to be upgraded").
   Dark glass, hairline edges, condensed tabular numbers, one amber accent, drawn icons, glow instead of bounce.
   Visual only: no box changes size or place (border widths, paddings, font sizes and line boxes are kept; hairlines are shadows). ===== */
:root{--hd-glass:linear-gradient(180deg,rgba(28,37,54,.68),rgba(9,13,22,.78));--hd-solid:rgba(12,17,27,.90);--hd-line:rgba(255,255,255,.15);--hd-hi:inset 0 1px 0 rgba(255,255,255,.10);
  --hd-drop:0 6px 18px rgba(0,0,0,.30);--hd-text:#f4f6fa;--hd-muted:#b3bdca;--hd-amber:#ffb22e;--hd-amber-hi:#ffd66b;--hd-green:#4fe08a;--hd-red:#ff5d4f;--hd-cyan:#62e3f2;
  --hd-num:"Avenir Next Condensed","Bahnschrift","Roboto Condensed","Arial Narrow",var(--font);--hd-ui:system-ui,-apple-system,"SF Pro Text","Segoe UI",Roboto,"Helvetica Neue",sans-serif}
/* a soft shade behind the top row so the glass reads over bright skies (absolutely placed: no layout) */
body.playing #hud::before{content:'';position:absolute;left:0;right:0;top:0;height:150px;background:linear-gradient(180deg,rgba(5,9,16,.30),rgba(5,9,16,0));pointer-events:none;z-index:-1}
#fueldial{filter:drop-shadow(0 6px 14px rgba(0,0,0,.38))}
/* distance card */
#hud .hud-mid{background:var(--hd-glass);border-radius:14px;box-shadow:0 0 0 1px var(--hd-line),var(--hd-hi),var(--hd-drop);text-shadow:none;-webkit-backdrop-filter:blur(10px) saturate(1.2);backdrop-filter:blur(10px) saturate(1.2)}
#hud #dist{font-family:var(--hd-num);font-weight:700;-webkit-text-stroke:0;letter-spacing:.01em;font-variant-numeric:tabular-nums;color:#fff;text-shadow:0 2px 10px rgba(0,0,0,.35)}
#hud #bestline{font-family:var(--hd-num);font-weight:600;color:var(--hd-muted);letter-spacing:.03em;line-height:1.21}
#hud .beta-mini{background:rgba(255,178,46,.12);color:var(--hd-amber-hi);box-shadow:inset 0 0 0 1px rgba(255,178,46,.55)}
#hud .prog{background:rgba(255,255,255,.07);border-color:rgba(255,255,255,.16);box-shadow:inset 0 1px 3px rgba(0,0,0,.45)}
#hud #progfill{background:linear-gradient(90deg,#ff8f1a,#ffd66b);box-shadow:0 0 10px rgba(255,178,46,.45)}
#hud #proglabel{color:#fff;font-family:var(--hd-num);font-weight:700;letter-spacing:.05em;text-shadow:0 1px 2px rgba(0,0,0,.9),0 0 4px rgba(0,0,0,.5)}
#hud .raceplace{background:rgba(255,178,46,.14);color:var(--hd-amber-hi);box-shadow:inset 0 0 0 1px rgba(255,178,46,.6);text-shadow:none}
/* track / lap chip */
#hud .trackname{background:var(--hd-glass);border-radius:12px;box-shadow:0 0 0 1px var(--hd-line),var(--hd-hi),var(--hd-drop);text-shadow:none}
#hud .trackname b{color:var(--hd-amber);opacity:1}
#hud .trackname span{color:#fff}
@keyframes svflash{0%{background:linear-gradient(180deg,rgba(255,170,50,.62),rgba(120,56,8,.72));box-shadow:0 0 0 1px rgba(255,214,107,.95),0 0 22px rgba(255,178,46,.6)}100%{background:var(--hd-glass);box-shadow:0 0 0 1px var(--hd-line),var(--hd-drop)}}
@keyframes svflashrm{0%,70%{background:linear-gradient(180deg,rgba(255,170,50,.62),rgba(120,56,8,.72))}}
/* coins (border kept at its width, painted as glass; the hairline is a shadow) */
#hud .coinpill{background:var(--hd-glass);border-color:transparent;color:#fff;box-shadow:0 0 0 1px var(--hd-line),var(--hd-hi),var(--hd-drop);font-variant-numeric:tabular-nums;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}
#hud .coinpill .coin-ic{border-color:#c98a00;box-shadow:inset 0 -2px 0 rgba(150,90,0,.35),0 0 10px rgba(255,200,60,.35)}
#hud .coinpill.bump,#hud .coinpill.cpulse{animation:hdcoin .32s ease-out}
@keyframes hdcoin{0%{box-shadow:0 0 0 1.5px rgba(255,214,107,.95),0 0 18px rgba(255,200,60,.65),0 6px 18px rgba(0,0,0,.3)}100%{box-shadow:0 0 0 1px rgba(255,255,255,.15),inset 0 1px 0 rgba(255,255,255,.1),0 6px 18px rgba(0,0,0,.3)}}
/* pause + sound: glass discs, white drawn icons */
#hud .iconbtn,body.playing #mutebtn{background:var(--hd-glass);color:var(--hd-text);box-shadow:0 0 0 1px var(--hd-line),var(--hd-hi),var(--hd-drop);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}
#hud .iconbtn:active,body.playing #mutebtn:active{background:linear-gradient(180deg,rgba(255,178,46,.32),rgba(120,70,8,.5));color:#fff}
/* gas column: next can + low gas */
#hud .nextfuel{background:var(--hd-glass);color:var(--hd-text);box-shadow:0 0 0 1px var(--hd-line),var(--hd-drop)}
#hud #lowfuel{background:linear-gradient(180deg,rgba(168,30,22,.92),rgba(104,14,10,.92));color:#fff;box-shadow:0 0 0 1px rgba(255,140,120,.7),0 0 16px rgba(255,60,40,.38);animation:hdlow 1.1s ease-in-out infinite}
@keyframes hdlow{0%,100%{box-shadow:0 0 0 1px rgba(255,140,120,.7),0 0 10px rgba(255,60,40,.25)}50%{box-shadow:0 0 0 1.5px rgba(255,190,175,.95),0 0 22px rgba(255,60,40,.6)}}
/* rocket meter */
#hud #rocketmeter{border-color:rgba(98,227,242,.5);background:rgba(8,16,26,.9);box-shadow:0 0 0 1px rgba(0,0,0,.25),var(--hd-drop);font-family:var(--hd-num);font-weight:700;letter-spacing:.08em}
#hud #rocketfill{background:linear-gradient(90deg,#1f7fb8,#62e3f2);box-shadow:0 0 10px rgba(98,227,242,.45)}
/* parking brake + cruise badges */
#parkicon{background:var(--hd-solid);border-color:rgba(255,93,79,.92);color:#fff;box-shadow:0 0 14px rgba(255,93,79,.35),var(--hd-drop)}
#parkicon b{font-family:var(--hd-num);font-weight:800}#parkicon span{color:#ffb8ae;font-family:var(--hd-ui);font-weight:800}
#cruiseicon{background:linear-gradient(180deg,rgba(26,78,46,.94),rgba(10,40,22,.94));color:#d4ffe2;box-shadow:0 0 0 1px rgba(79,224,138,.75),0 0 14px rgba(79,224,138,.3),var(--hd-drop);font-family:var(--hd-num);font-weight:800;letter-spacing:.14em}
/* Hallows Hill treat bag: same glass, its own violet edge */
#hauntbag{background:var(--hd-solid);border-color:rgba(190,150,235,.6);color:#ffe8b4;box-shadow:var(--hd-drop)}
/* a panel the car drives under goes see-through (JS adds .hd-under; a path call's own fade still wins) */
#hud .hud-mid,#trackname,#hud .hud-fueltext,#fueldial,#ultrabadge,#hauntbag,#hud .coinpill{transition:opacity .2s}
body:not(.hw-call) .hd-under{opacity:.25}
/* toasts in a run: the same slips as the callouts */
body.playing .toast{background:rgba(11,16,26,.9);border-color:var(--hd-line);border-left-color:var(--hd-amber);box-shadow:var(--hd-drop)}
/* sideways phones: the bar is 8 px inside; the label is sized to fit it instead of being cut */
@media (orientation:landscape) and (max-height:500px) and (min-width:560px){#hud #proglabel{font-size:9.5px;line-height:8px;letter-spacing:.06em}}
@media (prefers-reduced-motion:reduce){#hud .hud-mid,#trackname,#hud .hud-fueltext,#fueldial,#ultrabadge,#hauntbag,#hud .coinpill{transition:none}#hud #lowfuel,#hud .coinpill.bump,#hud .coinpill.cpulse{animation:none}#hud .trackname.svflash{animation:svflashrm 1.8s linear}}
/* ===== /v3.33 HUD 10x ===== */
/* ===== flight 11-01: WINGS button (tap toggle, takes the ROCKET spot: a flyer has no rocket kit) + wing stamina pips ===== */
#wingbtn{position:fixed;right:max(20px,env(safe-area-inset-right));bottom:calc(240px + env(safe-area-inset-bottom));z-index:7;min-width:120px;min-height:44px;padding:5px 12px 6px;border:0;border-radius:12px;
  color:#fff3c4;font:800 13px/1.15 system-ui,sans-serif;letter-spacing:.08em;touch-action:none;cursor:pointer;-webkit-tap-highlight-color:transparent;
  background:linear-gradient(180deg,rgba(52,44,70,.95),rgba(14,12,22,.96));
  box-shadow:inset 0 0 0 1.5px rgba(255,214,60,.62),inset 0 1px 0 rgba(255,255,255,.28),0 0 0 2px #22272e,0 4px 0 #101317,0 7px 12px rgba(0,0,0,.4)}
#wingbtn b{font-weight:900;padding-left:22px;background:no-repeat left center/19px 12px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 38 24'%3E%3Cpath fill='%23ffd21a' d='M19 6c2-3 4-3 5 0 3-4 9-6 14-4-4 2-5 6-4 10-3-2-6-2-8 1-1-2-3-3-5-2l-2 4-2-4c-2-1-4 0-5 2-2-3-5-3-8-1 1-4 0-8-4-10 5-2 11 0 14 4 1-3 3-3 5 0z'/%3E%3C/svg%3E")}
#wingbtn small{display:block;font-size:9px;letter-spacing:.05em;margin-top:2px;opacity:.85;font-weight:700}
#wingbtn.down{transform:translateY(3px);background:linear-gradient(180deg,rgba(255,214,60,.95),rgba(176,120,10,.96));color:#1a1206;
  box-shadow:inset 0 0 0 1.5px #fff6cf,0 0 16px rgba(255,200,40,.7),0 0 0 2px #22272e,0 1px 0 #101317}
#wingbtn.down b{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 38 24'%3E%3Cpath fill='%231a1206' d='M19 6c2-3 4-3 5 0 3-4 9-6 14-4-4 2-5 6-4 10-3-2-6-2-8 1-1-2-3-3-5-2l-2 4-2-4c-2-1-4 0-5 2-2-3-5-3-8-1 1-4 0-8-4-10 5-2 11 0 14 4 1-3 3-3 5 0z'/%3E%3C/svg%3E")}
#wingbtn:focus-visible{outline:3px solid white;outline-offset:3px}
body.pedswap #wingbtn{right:auto;left:max(20px,env(safe-area-inset-left))}
body.inmenu #wingbtn,body.inmenu #wingmeter{display:none}
#wingmeter{display:flex;align-items:center;gap:4px;width:max-content;max-width:150px;height:22px;padding:0 7px;border:2px solid rgba(255,214,60,.75);border-radius:8px;background:#17131f;z-index:5;pointer-events:none;margin-top:2px}
#wingmeter.hidden{display:none}
#wingpips{display:flex;align-items:center;gap:4px}
#wingmeter .wl{color:#ffe7a0;font:800 10px system-ui;letter-spacing:.06em;margin-right:2px;text-shadow:0 1px 2px #000}
#wingmeter i{display:block;width:9px;height:12px;border-radius:2px 2px 5px 5px;background:#3a3248;box-shadow:inset 0 0 0 1px rgba(0,0,0,.5)}
#wingmeter i.on{background:linear-gradient(180deg,#fff2a0,#ffc81a);box-shadow:0 0 5px rgba(255,200,40,.75)}
#wingmeter.flash{border-color:#fff3b0;box-shadow:0 0 10px rgba(255,210,40,.8)}
@media(max-height:500px){#wingbtn{bottom:calc(164px + env(safe-area-inset-bottom));min-height:44px;padding:5px 10px}}
@media (orientation:landscape) and (max-height:500px) and (min-width:560px){#wingmeter{height:20px;padding:0 6px}#wingmeter i{width:8px;height:11px}}
@media (prefers-reduced-motion:reduce){#wingbtn.down{transform:none}}
/* 11-02: the 3.33.1 Flip Rescue hides the race buttons while its card is up (WINGS too); 3.33.2 HUD 10x glass for the pips */
body.flipq-on #wingbtn{visibility:hidden}
#hud #wingmeter{background:rgba(8,16,26,.9);box-shadow:0 0 0 1px rgba(0,0,0,.25),var(--hd-drop,0 2px 6px rgba(0,0,0,.4))}
/* ===== /flight 11-01 ===== */

/* v3.34 Mechanics Garage: readable progression, tactile equipment card, small-screen flow. */
#ecshop.screen .panel.ecw-panel{background:radial-gradient(ellipse at 60% 0,rgba(78,136,164,.18),transparent 65%),linear-gradient(145deg,#162333,#0b121e);border:1px solid #e9bb71;box-shadow:0 0 0 4px #f0ba5114,0 24px 70px #0009;max-height:calc(100dvh - 32px);overflow-y:auto;overscroll-behavior:contain}
#ecshop.screen .ecw-top h2{font-size:clamp(20px,3vw,30px);letter-spacing:-.035em;color:#ffebc9}
#ecshop.screen .ecw-stage{border:1px solid #bddbed40;border-radius:12px}
#ecshop .ecw-upgrade{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 20px;align-items:center;margin:14px 0;padding:14px 18px;border:1px solid #a8c6df45;border-radius:12px;background:linear-gradient(120deg,#24364b,#142033);text-align:left}
#ecshop #ecwlevel{font:700 17px/1.35 var(--font);color:#f2dfba}
#ecshop .ecw-steps{display:flex;gap:5px;margin:8px 0}
#ecshop .ecw-steps i{width:32px;height:5px;border-radius:3px;background:#526176}
#ecshop .ecw-steps .owned{background:linear-gradient(90deg,#f4af50,#ffdc91);box-shadow:0 0 8px #ffc55b40}
#ecshop #ecwnext{font:500 13px/1.5 var(--font);color:#c7d8e7;margin:0}
#ecshop #ecwup{min-height:48px;max-width:100%;white-space:normal;background:linear-gradient(#b5eddf,#67baa8);color:#0c292b;border:1px solid #d1fff3;box-shadow:0 3px 0 #315f5a;font-size:16px}
#ecshop #ecwup:disabled{background:#344456;color:#c5d0de;border-color:#526174;box-shadow:none;opacity:1}
#ecshop #ecwstatus{grid-column:1/-1;margin:0;font:600 13px/1.4 var(--font);color:#bff7dc}
#ecshop #ecwstatus:empty{display:none}
#ecshop.screen .ecw-help{margin:16px 0 0;color:#b2c3d5}
#ecshop.screen .ecw-acts{flex-direction:row-reverse;justify-content:space-between}
#ecshop.screen .ecw-acts .btn{min-height:48px}
#ecshop button:focus-visible{outline:3px solid #c3fff0;outline-offset:4px}
#title .btn.tile.ecshop{font-size:clamp(10px,1.2vw,15px);line-height:1.2;white-space:normal}
#results .panel{background:radial-gradient(ellipse at 50% 0,#6c513e55,transparent 65%),linear-gradient(155deg,#17283c,#101725);border-color:#efcf8e}
#results .panel h2{color:#ffe2a0;text-shadow:0 2px 12px #ffb85b30}
@media(max-width:600px){
 #ecshop.screen .panel.ecw-panel{padding:14px 12px;width:calc(100% - 20px);max-height:calc(100dvh - 24px)}
 #ecshop.screen .ecw-top{flex-wrap:wrap;gap:8px}#ecshop.screen .ecw-top h2{font-size:22px;flex:1 1 100%;gap:8px}
 #ecshop.screen .ecw-hic .ecjar{width:24px;height:24px}
 #ecshop .ecw-upgrade{grid-template-columns:1fr;padding:12px;gap:10px}
 #ecshop #ecwup{width:100%;margin:0}#ecshop.screen .ecw-line{font-size:14px;line-height:1.5}
 #ecshop.screen .ecw-jarinfo{padding:4px 7px;top:auto;bottom:6%;right:2%}
 #ecshop.screen .ecw-jarinfo b{font-size:18px}#ecshop.screen .ecw-jarinfo span{font-size:10px}
 #ecshop.screen .btn.play.ecw-go{font-size:18px;padding:10px 18px}#ecshop.screen .ecw-acts{gap:8px}
}
@media(orientation:landscape) and (max-height:500px){
 #ecshop.screen .panel.ecw-panel{grid-template-areas:'top top' 'stage meter' 'stage line' 'stage upgrade' 'acts acts';grid-template-rows:auto auto auto auto auto}
 #ecshop .ecw-upgrade{grid-area:upgrade;padding:8px;margin:4px 0;grid-template-columns:1fr;gap:4px}
 #ecshop #ecwlevel{font-size:14px}#ecshop #ecwnext{font-size:12px}#ecshop #ecwup{font-size:14px;min-height:44px}
 #ecshop.screen .ecw-acts{grid-area:acts;justify-content:space-between;margin-top:8px}
 #ecshop.screen .ecw-stage{align-self:start}
}
@media(prefers-reduced-motion:reduce){#ecshop *{animation:none!important;transition:none!important}}
body.redmo #ecshop *{animation:none!important;transition:none!important}
/* v3.40.0 art-340: Utopia Beta chip retired (painted Gemini art in; MOTHER/BETA-REGISTER.md row moved to Retired) */

/* ===== businesses 3.37 (2026-11-03): Garage · Rental Lot · Taxi tabs, job board, cars on duty, picker ===== */
#ecshop .ecw-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:0 0 10px}
#ecshop .ecw-tab{position:relative;display:flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:6px 10px;border-radius:12px;border:1px solid #a8c6df40;background:linear-gradient(180deg,#22344a,#162435);color:#c9d6e4;font:800 15px/1.1 var(--font);cursor:pointer;transition:transform .15s ease,background .2s ease,border-color .2s ease}
#ecshop .ecw-tab:hover{border-color:#ffd66b80}
#ecshop .ecw-tab:active{transform:translateY(1px) scale(.98)}
#ecshop .ecw-tab .ecw-ti{display:flex;width:22px;height:22px;color:#8fa3b8}
#ecshop .ecw-tab .ecw-ti svg{width:100%;height:100%}
#ecshop .ecw-tab.on{background:linear-gradient(180deg,#ffd25e,#ff9a2a);color:#3a1703;border-color:#ffe7a6;box-shadow:0 4px 0 #b4570a,0 8px 18px rgba(0,0,0,.3)}
#ecshop .ecw-tab.on .ecw-ti{color:#5a2a05}
#ecshop .ecw-tab .ecw-tb{position:absolute;top:-7px;right:-4px;padding:2px 6px;border-radius:999px;background:#ffd23f;color:#3a1703;font:800 10.5px/1.2 var(--font);box-shadow:0 2px 4px rgba(0,0,0,.35)}
#ecshop .ecw-tab .ecw-tb:empty{display:none}
#ecshop .ecw-tab:not(.own) .ecw-tb{background:#2b3a4e;color:#c9d6e4}
#ecshop .ecw-tab.full .ecw-tb{background:#3ccf5a;color:#06210d;animation:ecs-bob 1.4s ease-in-out infinite}
#ecshop .ecw-cars{margin:10px 0 0;text-align:left}
#ecshop .ecw-cars:empty{display:none}
#ecshop .ecw-pitch,#ecshop .ecw-pickh{margin:0;font:600 14px/1.5 var(--font);color:#d6e2ee}
#ecshop .ecw-pitch b{color:#ffd66b}
#ecshop .ecw-slots{list-style:none;margin:6px 0 0;padding:0;display:grid;gap:6px}
#ecshop .ecw-slots li{display:flex;align-items:center;gap:10px;min-height:48px;padding:6px 10px;border-radius:12px;background:linear-gradient(120deg,#1f3045,#152233);border:1px solid #a8c6df30;animation:ecw-in .28s ease both}
#ecshop .ecw-slots li img{width:64px;height:36px;object-fit:contain;flex:none;filter:drop-shadow(0 2px 2px rgba(0,0,0,.5))}
#ecshop .ecw-who{flex:1;min-width:0;font:600 14px/1.3 var(--font);color:#dfe8f2;overflow:hidden;text-overflow:ellipsis}
#ecshop .ecw-who b{color:#fff}
#ecshop .ecw-who b.real{color:#ffd66b}
#ecshop .ecw-who small{display:block;font:600 12px/1.3 var(--font);color:#9fb3c8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#ecshop .ecw-pl{display:inline-block;margin-left:4px;padding:1px 6px;border-radius:999px;background:#ffd23f;color:#3a1703;font:800 9.5px/1.4 var(--font);font-style:normal;text-transform:uppercase;letter-spacing:.04em}
#ecshop .ecw-bay{flex:none;padding:3px 8px;border-radius:8px;background:#0b1220;color:#ffcf6b;font:800 11px/1.2 var(--font)}
#ecshop .ecw-tier{display:inline-flex;align-items:center;gap:3px;flex:none;padding:2px 7px;border-radius:999px;border:1.5px solid var(--tc);color:var(--tc);background:rgba(0,0,0,.25);font:800 11px/1.2 var(--font)}
#ecshop .ecw-tier .tier-ic{width:11px;height:11px;fill:currentColor}
#ecshop .ecw-pay{flex:none;font:800 13px/1.2 var(--font);color:#ffd66b;font-variant-numeric:tabular-nums}
#ecshop .ecw-slots.jobs .ecw-pay{color:#bff7dc;min-width:9.5em;text-align:right}
#ecshop .btn.ecw-rc{flex:none;min-height:44px;margin:0;padding:4px 14px;font-size:14px;background:linear-gradient(#e8eef6,#b9c6d6);color:#132233;box-shadow:0 3px 0 #6d7c8e}
#ecshop .ecw-empty{justify-content:center;background:repeating-linear-gradient(135deg,#182638 0 10px,#1c2c40 10px 20px)!important;border-style:dashed!important}
#ecshop .btn.ecw-add{min-height:44px;margin:0;width:100%;font-size:15px;background:linear-gradient(#b5eddf,#67baa8);color:#0c292b;border:1px solid #d1fff3;box-shadow:0 3px 0 #315f5a}
#ecshop .ecw-slots.pick{grid-template-columns:repeat(auto-fill,minmax(230px,1fr));max-height:260px;overflow-y:auto;overscroll-behavior:contain;padding:2px}
#ecshop .ecw-slots.pick li{padding:0;background:none;border:0}
#ecshop .ecw-car{display:flex;align-items:center;gap:8px;width:100%;min-height:52px;padding:6px 10px;border-radius:12px;border:1px solid #a8c6df40;background:linear-gradient(120deg,#24364b,#182839);color:#eef3f8;font:700 14px/1.2 var(--font);text-align:left;cursor:pointer;transition:transform .12s ease,border-color .15s ease}
#ecshop .ecw-car:hover{border-color:#ffd66b}
#ecshop .ecw-car:active{transform:scale(.98)}
#ecshop .ecw-car .ecw-cn{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}
#ecshop .ecw-car .nm{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#ecshop .ecw-car .ecw-cm{display:flex;align-items:center;gap:8px}
#ecshop .ecw-car b{color:#ffd66b;font-variant-numeric:tabular-nums}
#ecshop .ecw-none{justify-content:center;color:#c9d4e2;font:600 13px/1.4 var(--font)}
#ecshop .btn.ecw-cancel{margin:8px 0 0;min-height:44px;font-size:14px}
@keyframes ecw-in{from{opacity:0;transform:translateY(4px)}}
@media (prefers-reduced-motion:reduce){#ecshop .ecw-slots li,#ecshop .ecw-tab,#ecshop .ecw-tab .ecw-tb{animation:none!important;transition:none!important}}
body.redmo #ecshop .ecw-slots li,body.redmo #ecshop .ecw-tab .ecw-tb{animation:none!important}
@media(max-width:600px){
 #ecshop .ecw-tab{min-height:44px;font-size:13px;gap:5px;padding:4px 6px}#ecshop .ecw-tab .ecw-ti{width:18px;height:18px}
 #ecshop .ecw-slots li{flex-wrap:wrap;gap:6px 8px}#ecshop .ecw-slots.jobs .ecw-pay{min-width:0;margin-left:auto}
 #ecshop .ecw-slots.pick{grid-template-columns:1fr}
}
@media(orientation:landscape) and (max-height:500px){
 #ecshop.screen .panel.ecw-panel{grid-template-areas:'top tabs' 'stage meter' 'stage line' 'stage acts' 'stage upgrade' 'cars cars';grid-template-rows:auto auto auto auto 1fr auto}
 #ecshop.screen .ecw-top h2{font-size:18px;white-space:nowrap}#ecshop.screen .ecw-acts{margin:2px 0 6px}
 #ecshop .ecw-tabs{grid-area:tabs;margin:0 0 4px;gap:5px}#ecshop .ecw-tab{min-height:44px;font-size:12px;padding:2px 4px;gap:4px}#ecshop .ecw-tab .ecw-ti{width:16px;height:16px}
 #ecshop .ecw-cars{grid-area:cars;margin:4px 0 0}#ecshop .ecw-slots.pick{grid-template-columns:repeat(auto-fill,minmax(200px,1fr));max-height:none}
 #ecshop .ecw-pitch{font-size:12.5px}
}
/* rocket-upg 11-03: Rocket jets section (Garage, rocket cars only): a level path + the jet colours */
.rocketshop{margin:10px 0 6px;padding:10px;border-radius:18px;background:rgba(43,33,64,.06)}
.screen:not(#title) .rocketshop{margin:0 0 10px;padding:12px;border-radius:16px;border:1px solid var(--m-well-line);background:linear-gradient(180deg,rgba(255,138,26,.07),rgba(255,255,255,.03) 46%),var(--m-well)}
.rocketshop.hidden{display:none}
.rkhead{justify-content:space-between;flex-wrap:wrap}
.screen:not(#title) .rkhead h3 .rk-ic{display:inline-grid;place-items:center;width:22px;height:22px;color:var(--m-amber-hi)}
.rk-ic svg{width:20px;height:20px;display:block}
.rklv{font:750 11px/1 var(--m-ui,system-ui);letter-spacing:.12em;text-transform:uppercase;color:var(--m-muted,#666)}
.rklv b{color:#fff;font-size:13px;letter-spacing:.04em}
.rkhint{margin:0 0 8px;font:500 12.5px/1.35 var(--m-ui,system-ui);color:var(--m-muted,#555)}
.rkhint b{color:var(--m-amber-hi,#c77a00);font-weight:750}
.rkpath{position:relative;display:flex;justify-content:space-between;align-items:flex-start;margin:4px 2px 12px;padding:0 2px}
.rktrack{position:absolute;left:16px;right:16px;top:15px;height:4px;border-radius:2px;background:rgba(255,255,255,.1);overflow:hidden}
.rktrack i{display:block;height:100%;border-radius:2px;background:linear-gradient(90deg,#ff8a1a,#ffd66b);box-shadow:0 0 8px rgba(255,170,40,.6);transition:width .5s cubic-bezier(.2,.8,.2,1)}
.rkn{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;gap:4px;width:34px;flex:0 0 auto}
.rkn .rkd{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:#141a24;border:2px solid rgba(255,255,255,.16);box-sizing:border-box}
.rkn:not(.rw) .rkd{width:16px;height:16px;margin:7px 0;border-width:2px}
.rkn .rkd .chip{width:22px!important;height:22px!important;border-radius:50%;display:block;filter:saturate(.6) brightness(.8);opacity:.85}
.rkn .jchip{background:radial-gradient(circle at 50% 64%,var(--j2) 0 18%,var(--j1) 54%,rgba(0,0,0,.4) 100%)}
.rkn.on .jchip{box-shadow:0 0 9px var(--j1)}
.rkn .rbchip{background:linear-gradient(115deg,#ff3b3b,#ffb02e,#f6f035,#3dff7e,#35d9ff,#7a7dff,#e05bff,#ff3b3b) 0 0/300% 100%;animation:rbflow 5s linear infinite}
.rkn b{font:800 10.5px/1 var(--m-ui,system-ui);color:var(--m-muted,#888)}
.rkn.on .rkd{border-color:var(--m-amber,#ffb22e);background:#2a1a08;box-shadow:0 0 10px rgba(255,170,40,.45)}
.rkn.on:not(.rw) .rkd{background:var(--m-amber,#ffb22e)}
.rkn.on .rkd .chip{filter:none;opacity:1}
.rkn.on b{color:#fff}
.rkn.tx .rkd{border-color:var(--tc)}.rkn.tx.on .rkd{box-shadow:0 0 10px var(--tc)}.rkn.tx.on:not(.rw) .rkd{background:var(--tc)}
.rkn.no{opacity:.42}
.rkn.no .rkd{border-style:dashed}
.rkn.cur b{color:var(--m-amber-hi,#ffd66b)}
.rkn.cur .rkd{outline:2px solid rgba(255,214,107,.5);outline-offset:2px}
.rkn.pop .rkd{animation:rkpop .9s cubic-bezier(.2,.8,.2,1)}
@keyframes rkpop{0%{transform:scale(1)}30%{transform:scale(1.45);box-shadow:0 0 22px #ffd66b}100%{transform:scale(1)}}
.rkswatches .psw.path .nm{color:#ffe2a0}
.rkswatches .psw.locked .chip{filter:saturate(.35) brightness(.7)}
.rkswatches .psw .pr.lock,.rkswatches .psw .pr .lk{color:var(--m-muted,#888)}
.rkswatches .psw .lk{display:inline-block;width:8px;height:9px;margin-right:3px;border-radius:2px 2px 1px 1px;background:currentColor;position:relative;top:1px}
.rkswatches .psw .lk::before{content:"";position:absolute;left:1.5px;top:-4px;width:5px;height:5px;border:1.5px solid currentColor;border-bottom:0;border-radius:4px 4px 0 0;box-sizing:border-box}
.screen:not(#title) .rkbuy{margin-top:10px}
.rkbuy #rkbuytext{flex:1;font:600 12.5px/1.35 var(--m-ui,system-ui);color:var(--m-muted,#555)}
@media (max-width:600px),(max-height:500px){.rkn{width:28px}.rkn .rkd{width:26px;height:26px}.rkn .rkd .chip{width:18px!important;height:18px!important}.rkn:not(.rw) .rkd{width:14px;height:14px;margin:6px 0}.rktrack{top:13px;left:14px;right:14px}.rkhint{font-size:11.5px}}
@media (prefers-reduced-motion:reduce){.rkn.pop .rkd{animation:none}.rktrack i{transition:none}}
/* /rocket-upg */
/* ===== player rentals 3.39 (2026-11-04): Rental Lot "Rent a player's car", List for players, RENTED cards, read-only Garage ===== */
#ecshop .prv-seg{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin:0 0 10px;padding:4px;border-radius:14px;background:#0d1826;border:1px solid #a8c6df30}
#ecshop .prv-seg button{position:relative;min-height:44px;padding:6px 10px;border-radius:10px;border:0;background:transparent;color:#c9d6e4;font:800 14px/1.15 var(--font);cursor:pointer;transition:background .2s ease,color .2s ease,transform .12s ease}
#ecshop .prv-seg button:hover{color:#fff}
#ecshop .prv-seg button:active{transform:scale(.98)}
#ecshop .prv-seg button.on{background:linear-gradient(180deg,#7ee0c8,#3fae96);color:#06231e;box-shadow:0 3px 0 #1e6b5c}
#ecshop .prv-seg em{display:inline-block;margin-right:6px;padding:1px 6px;border-radius:999px;background:#ffd23f;color:#3a1703;font:900 9.5px/1.5 var(--font);font-style:normal;letter-spacing:.05em;vertical-align:2px;animation:prv-pulse 1.8s ease-in-out infinite}
#ecshop .prv-seg button.on em{background:#06231e;color:#ffd23f}
#ecshop .prv-head,#ecshop .prv-note,#ecshop .prv-msg,#ecshop .prv-fine{margin:0 0 8px;font:600 14px/1.45 var(--font);color:#d6e2ee}
#ecshop .prv-head b,#ecshop .prv-note b{color:#ffd66b}
#ecshop .prv-note{padding:12px 14px;border-radius:12px;background:linear-gradient(120deg,#1f3045,#152233);border:1px dashed #a8c6df50}
#ecshop .prv-msg{padding:8px 12px;border-radius:10px;background:#0f2b25;border:1px solid #7ee0c860;color:#d9fff4;animation:ecw-in .28s ease both}
#ecshop .prv-fine{margin:8px 0 0;font-size:12px;color:#9fb3c8}
#ecshop .prv-list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:8px}
#ecshop .prc{--tc:#a7b0bb;display:grid;grid-template-columns:132px 1fr;grid-template-areas:'art body' 'art btn';align-items:center;gap:4px 10px;padding:8px 10px 8px 6px;border-radius:14px;background:linear-gradient(120deg,#22354b,#16263a);border:1.5px solid color-mix(in srgb,var(--tc) 45%,transparent);animation:ecw-in .3s ease both;transition:transform .15s ease,border-color .2s ease}
#ecshop .prc:hover{transform:translateY(-2px);border-color:var(--tc)}
#ecshop .prc.t1{--tc:#4f9dff}#ecshop .prc.t2{--tc:#b779ff}#ecshop .prc.t3{--tc:#ffbf3a;background:linear-gradient(120deg,#33301f,#1b2333 60%)}
#ecshop .prc.got{border-color:#7ee0c8;box-shadow:0 0 0 2px #7ee0c855,0 0 22px #7ee0c840}
#ecshop .prc-art{grid-area:art;width:132px;height:71px;filter:drop-shadow(0 3px 3px rgba(0,0,0,.55))}
#ecshop .prc-body{grid-area:body;display:flex;flex-wrap:wrap;align-items:center;gap:2px 6px;min-width:0}
#ecshop .prc-who{font:600 12.5px/1.25 var(--font);color:#9fb3c8}
#ecshop .prc-who b{color:#ffd66b}
#ecshop .prc-car{flex-basis:100%;font:800 15px/1.2 var(--font);color:#fff;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#ecshop .pr-ups,.card.prent .pr-ups{display:flex;flex-wrap:wrap;gap:3px;flex-basis:100%}
#ecshop .pr-up,.card.prent .pr-up{padding:1px 6px;border-radius:7px;background:#0b1220;color:#9fb3c8;font:700 10.5px/1.5 var(--font);font-style:normal;white-space:nowrap}
#ecshop .pr-up b,.card.prent .pr-up b{color:#e8f2fb}
#ecshop .btn.prc-rent,#ecshop .btn.prc-go{grid-area:btn;justify-self:start;min-height:44px;margin:2px 0 0;padding:4px 16px;font-size:14px;background:linear-gradient(#ffe08a,#f4a72c);color:#3a1703;box-shadow:0 3px 0 #a35c0c}
#ecshop .btn.prc-rent.conf{background:linear-gradient(#9cf3a6,#3ccf5a);color:#06210d;box-shadow:0 3px 0 #1f7a33;animation:prv-pulse 1s ease-in-out infinite}
#ecshop .btn.prc-rent:disabled{background:linear-gradient(#3a4a5e,#2a3848);color:#9fb3c8;box-shadow:0 3px 0 #18222e}
#ecshop .btn.prc-go{background:linear-gradient(#b5eddf,#67baa8);color:#0c292b;box-shadow:0 3px 0 #315f5a}
#ecshop .prv-own{margin:12px 0 0;padding:10px 12px 12px;border-radius:14px;background:#0f1b2b;border:1px solid #7ee0c840}
#ecshop .prv-own h4{margin:0 0 6px;font:900 15px/1.2 var(--font);color:#bff7dc}
#ecshop .prv-own h4 small{margin-left:6px;font:700 12px/1.2 var(--font);color:#9fb3c8}
#ecshop .pr-listed{flex:none;padding:2px 8px;border-radius:999px;background:#7ee0c8;color:#06231e;font:900 10.5px/1.4 var(--font);font-style:normal;text-transform:uppercase;letter-spacing:.04em}
#ecshop .pr-lock{color:#8fa3b8;font:700 13px/1.3 var(--font)}
#ecshop .prv-log{list-style:none;margin:8px 0 0;padding:0;display:grid;gap:4px}
#ecshop .prv-log li{display:flex;align-items:center;gap:6px;padding:5px 10px;border-radius:10px;background:#16263a;color:#d6e2ee;font:600 13px/1.3 var(--font);animation:ecw-in .3s ease both}
#ecshop .prv-log b{color:#ffd66b}
#ecshop .prv-log span{margin-left:auto;color:#bff7dc;font-weight:800;font-variant-numeric:tabular-nums}
#ecshop.prv-on .ecw-upgrade,#ecshop.prv-on .ecw-meter,#ecshop.prv-on #ecwline,#ecshop.prv-on .ecw-jarinfo,#ecshop.prv-on .ecw-go{display:none!important}
/* Pick a Vehicle: rented cars come first, with their chip */
.card.veh.prent{border-color:#7ee0c8;background:linear-gradient(165deg,#173a37,#14243a 55%);box-shadow:0 0 0 2px #7ee0c840}
.card.veh.prent .prent-art{display:block;width:100%;height:auto;aspect-ratio:420/230}
#vehlist .card.veh.prent .pr-chip{margin:6px 10px 2px;padding:3px 9px;border-radius:999px;display:inline-block;background:#7ee0c8;color:#06231e;font:800 11.5px/1.35 var(--font)}
.card.veh.prent .pr-chip b{letter-spacing:.06em}
#vehlist .card.veh.prent .pr-ups{margin:2px 10px 6px;flex:0 0 auto;align-items:flex-start;align-content:flex-start;height:auto;min-height:0}
#vehlist .card.veh.prent .pr-up{display:inline-block;flex:0 0 auto;width:auto;height:auto;min-height:0;aspect-ratio:auto}
/* the Garage for a rented car: look, don't touch */
#garage.prent-ro #paintshop,#garage.prent-ro #rocketshop{display:none!important}
#garage .pr-ro{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;margin:0 0 10px;padding:10px 12px;border-radius:12px;background:linear-gradient(120deg,#173a37,#14243a);border:1px solid #7ee0c870;color:#d9fff4;font:700 14px/1.35 var(--font)}
#garage .pr-ro b{padding:2px 9px;border-radius:999px;background:#7ee0c8;color:#06231e;font:900 12px/1.4 var(--font);letter-spacing:.06em}
#garage .pr-ro small{flex-basis:100%;color:#9fd8ca;font:600 12.5px/1.35 var(--font)}
#garage .upg.ro .btn:disabled{opacity:1;background:linear-gradient(#24364b,#182839);color:#9fd8ca;box-shadow:none;border:1px dashed #7ee0c860}
@keyframes prv-pulse{50%{transform:scale(1.06)}}
@media (prefers-reduced-motion:reduce){#ecshop .prv-seg em,#ecshop .btn.prc-rent.conf,#ecshop .prc,#ecshop .prv-log li,#ecshop .prv-msg{animation:none!important;transition:none!important}}
body.redmo #ecshop .prv-seg em,body.redmo #ecshop .btn.prc-rent.conf{animation:none!important}
@media(max-width:600px){#ecshop .prv-list{grid-template-columns:1fr}#ecshop .prv-seg button{font-size:13px;padding:4px 6px}}
@media(orientation:landscape) and (max-height:500px){#ecshop.prv-on.screen .panel.ecw-panel{grid-template-areas:'top tabs' 'cars cars' 'acts acts';grid-template-rows:auto auto auto}#ecshop.prv-on.screen .ecw-stage{display:none}#ecshop .prv-list{grid-template-columns:repeat(auto-fill,minmax(280px,1fr))}#ecshop .prc{grid-template-columns:112px 1fr}#ecshop .prc-art{width:112px;height:60px}#ecshop .prv-seg{margin:0 0 6px}#ecshop .prv-seg button{min-height:44px;font-size:12.5px}}

/* Coin mode. The pill is the SECOND LINE of the top-right cluster (coin number / sound / pause), so the first row keeps its exact
   width and never collides with the track chip, Next gas or the map (previewRect already measures .hud-right, so the map and the
   sound button move down with it). Sideways phones have the room: there it stays on the one row, left of the coin number. */
.hud-right{flex-direction:column;align-items:flex-end;gap:6px}
.hud-right .hr-main{display:flex;align-items:center;justify-content:flex-end;gap:10px}
.hud-right.hrcol .hr-main{flex-direction:column;align-items:flex-end;gap:6px}
#coinmodebtn{pointer-events:auto;flex:0 0 auto;min-width:78px;min-height:44px;padding:0 10px;border:1px solid var(--hd-line,rgba(255,255,255,.3));border-radius:999px;background:var(--hd-glass,rgba(11,16,26,.9));color:#fff;font:700 13px/1.1 var(--font);cursor:pointer;touch-action:manipulation;white-space:nowrap;box-shadow:var(--hd-drop,0 2px 6px rgba(0,0,0,.4))}
#coinmodebtn[aria-pressed="true"]{border-color:#62e3f2;color:#b8f3ff}
#coinmodebtn:focus-visible,#pausecoinmode:focus-visible{outline:3px solid #62e3f2;outline-offset:3px}
#pausecoinmode{min-height:44px}
@media (max-width:900px){.hud-right .hr-main{gap:8px}}
@media (orientation:landscape) and (max-height:500px) and (min-width:560px){.hud-right{flex-direction:row;align-items:center;gap:8px}.hud-right .hr-main{gap:8px}#coinmodebtn{order:-1;min-width:72px;padding:0 8px;font-size:12px}}
body.coin-sim #hud .coinpill.bump,body.coin-sim #hud .coinpill.cpulse{animation:none!important}
.toast.coin-mode{font-size:13px;line-height:1.3}

/* Business simulation P1: scale follows the shared text setting; all overlays scroll. */
#ecshop { overflow-y:auto; justify-content:safe center; padding-top:max(64px,env(safe-area-inset-top)); padding-bottom:max(70px,env(safe-area-inset-bottom)); }
#ecshop .ecw-tabs { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:5px; }
#ecshop .ecw-tab { min-width:0; min-height:44px; padding:8px 4px; gap:4px; font-size:calc(12px * var(--ae-text-scale,1)); }
#ecshop .ecw-tab span { min-width:0; overflow-wrap:anywhere; }
#ecshop .ecw-tab .ecw-ti { width:21px; flex:none; }
#ecwprice { padding:12px; margin:10px 0; border:1px solid #64758b; border-radius:14px; background:#111d30; color:#eaf3ff; font-size:calc(14px * var(--ae-text-scale,1)); }
.bz-pricehead { display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:wrap; margin-bottom:10px; }
.bz-pricehead .btn { min-height:44px; }
.bz-lever { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:4px; }
.bz-lever button { min-height:44px; min-width:0; padding:8px 2px; border-radius:9px; border:1px solid #697d99; background:#18283e; color:#eaf3ff; font:inherit; font-size:calc(12px * var(--ae-text-scale,1)); cursor:pointer; overflow-wrap:anywhere; }
.bz-lever button[aria-checked=true] { border:2px solid #ffe09b; background:#374434; font-weight:800; box-shadow:inset 0 -4px #ffe09b; }
.bz-lever button:focus-visible,.bz-overlay button:focus-visible { outline:3px solid #8af1f2; outline-offset:3px; }
.bz-ends { display:flex; justify-content:space-between; gap:12px; margin:7px 0; font-size:.83em; }
.bz-ends span:last-child { text-align:right; }
.bz-pips { display:flex; gap:5px; margin:9px 0; }
.bz-pips i { width:13px; height:13px; border:1px solid #8ba0bd; border-radius:50%; }
.bz-pips .filled { background:#79ded7; border-color:#79ded7; }
.bz-pips .waiting { border:2px dashed #ffe09b; }
#ecwcars .ecw-slots.jobs li { flex-wrap:wrap; }
#ecwcars h3 { margin:12px 0 5px; font-size:1em; }
.bz-curve { display:block; width:100%; max-height:210px; overflow:visible; }
.bz-curve text { fill:#e7edf7; font:11px sans-serif; }
.bz-hours { display:grid; grid-template-columns:repeat(24,minmax(0,1fr)); gap:3px; height:70px; padding-top:12px; }
.bz-hours>div { display:flex; align-items:flex-end; position:relative; background:#17263b; }
.bz-hours i { width:100%; background:#7bc9d2; border-radius:2px 2px 0 0; }
.bz-hours .event i { background:#e7be83; }
.bz-hours .now { outline:2px solid #fff3bb; }
.bz-hours b { position:absolute; top:-17px; left:0; font-size:12px; color:#fff3bb; }
.bz-hourlabels { display:grid; grid-template-columns:repeat(4,1fr); font-size:.8em; margin-top:7px; }
.bz-overlay { position:fixed; inset:0; z-index:1100; display:flex; align-items:safe center; justify-content:safe center; overflow-y:auto; padding:70px 14px calc(78px + env(safe-area-inset-bottom,0px)); background:rgba(3,9,19,.88); font-size:calc(14px * var(--ae-text-scale,1)); color:#ecf3ff; }
.bz-overlay.hidden { display:none; }
.bz-sheet { width:min(680px,100%); max-width:100%; flex-shrink:0; max-height:calc(100vh - 148px - env(safe-area-inset-bottom,0px)); max-height:calc(100dvh - 148px - env(safe-area-inset-bottom,0px)); overflow-y:auto; overscroll-behavior:contain; padding:22px; border:1px solid #91a1b5; border-radius:20px; background:#111b2b; box-shadow:0 18px 60px #0008; }
.bz-sheet h2 { margin:0 0 10px; font-size:1.4em; }
.bz-actions { display:flex; justify-content:flex-end; margin-top:18px; }
.bz-overlay .btn { min-width:44px; min-height:44px; font-size:inherit; }
.bz-reportrows { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.bz-reportrows article { border:1px solid #62728a; border-radius:12px; padding:12px; }
.bz-reportrows h3 { display:flex; align-items:center; gap:6px; margin:0 0 8px; font-size:1em; }
.bz-reportrows svg { width:22px; height:22px; flex:none; }
.bz-profit { color:#a0edb8; font-weight:800; }
.bz-chip { display:inline-block; padding:3px 7px; border:1px solid #8c9db5; border-radius:7px; }
.bz-tip { display:flex; align-items:center; gap:10px; padding:13px; border:1px solid #c8b374; border-radius:12px; background:#29291f; }
.bz-tip span { flex:1; }
.bz-total { display:flex; justify-content:space-between; gap:8px; font-size:1.15em; }
.bz-tablewrap { overflow-x:auto; }
.bz-sheet table { width:100%; border-collapse:collapse; font-size:.88em; }
.bz-sheet th,.bz-sheet td { padding:10px 5px; text-align:right; border-bottom:1px solid #3c506b; }
.bz-sheet th:first-child { text-align:left; }
.bz-bars { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:6px; margin-top:22px; height:155px; align-items:end; }
.bz-bars>div { display:flex; flex-direction:column; align-items:center; justify-content:flex-end; height:100%; gap:5px; font-size:.75em; text-align:center; min-width:0; }
.bz-bars i { display:block; width:70%; background:#8cdebc; border-radius:4px 4px 0 0; }
.bz-bars span { min-height:30px; }
#ecshopbtn.bz-newreport::after { content:'📊'; display:inline-block; margin-left:6px; }
@media(max-width:480px) { .bz-sheet { padding:14px; } .bz-reportrows { grid-template-columns:1fr; } #ecshop .ecw-panel { padding-left:12px; padding-right:12px; } #ecshop .ecw-tab { flex-direction:column; } #ecwprice { padding:8px; } .bz-bars { gap:3px; } .bz-sheet th,.bz-sheet td { padding:8px 3px; } }
@media(max-height:450px) { .bz-overlay { padding-top:60px; padding-bottom:calc(60px + env(safe-area-inset-bottom,0px)); align-items:flex-start; } .bz-sheet { max-height:calc(100vh - 120px - env(safe-area-inset-bottom,0px)); max-height:calc(100dvh - 120px - env(safe-area-inset-bottom,0px)); } #ecshop .ecw-stage { max-height:150px; } }
@media(prefers-reduced-motion:reduce) { #ecwprice *, .bz-overlay *, .bz-hours * { animation:none!important; transition:none!important; } }

/* P1b gross receipts and daily bills */
.bz-loss{color:#ff9b96;font-weight:700}.bz-books td{font-variant-numeric:tabular-nums}.bz-sheet h3{margin-top:1rem}
.bz-books tr.bz-count th,.bz-books tr.bz-count td{color:#b9c8dc;font-style:italic;font-weight:600}

/* N1: scoped racing styles; the existing Businesses panel owns scrolling. */
/* five tabs: one even row on wide screens, a swipeable strip on phones */
#ecshop .ecw-tabs{grid-template-columns:repeat(5,minmax(0,1fr))}
@media(max-width:640px),(orientation:landscape) and (max-height:500px){#ecshop .ecw-tabs{grid-auto-flow:column;grid-template-columns:none;grid-auto-columns:minmax(98px,1fr);overflow-x:auto;overflow-y:hidden;padding-top:9px;margin-top:-9px;scrollbar-width:none;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch}#ecshop .ecw-tabs::-webkit-scrollbar{display:none}#ecshop .ecw-tab{scroll-snap-align:start;min-width:0}}
@media(max-width:560px){#ecshop.n1-race #ecwcv{aspect-ratio:4/3}}
/* hero: next grid */
.n1-hero{border:1px solid #7ccacb70;background:radial-gradient(120% 140% at 0 0,#2a5a62 0,#142c40 55%,#101b30 100%);border-radius:18px;padding:18px;color:#edfaff;box-shadow:0 10px 24px #0006,inset 0 1px 0 #ffffff26}
.n1-hero h3{font-size:1.6rem;margin:.2em 0}.n1-hero small{letter-spacing:.1em;color:#9fd8de;font-weight:800}.n1-hero meter{display:block;width:100%;height:20px;margin-top:8px}
.n1-hero b{color:#ffe58a}
/* sections = cards */
.n1-section{padding:14px;margin:12px 0;border:1px solid #ffffff1c;border-radius:16px;background:linear-gradient(180deg,#ffffff0d,#ffffff05)}
.n1-section h3{margin:.2em 0 .5em;font-size:1.12rem}.n1-section p,.n1-hero p{line-height:1.5}
.n1-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(230px,100%),1fr));gap:9px}
.n1-options .btn{text-align:left;white-space:normal;display:flex;flex-direction:column;gap:6px;height:auto;min-height:48px;padding:12px;line-height:1.35;transition:transform .15s ease,box-shadow .2s ease,border-color .2s ease}
.n1-options .btn:not(:disabled):hover{transform:translateY(-2px);box-shadow:0 8px 16px #0005}
.n1-options small{font-weight:400}
.n1-selected{outline:2px solid #9ee592;background:linear-gradient(180deg,#2f6a52,#244b40)!important;box-shadow:0 0 0 3px #9ee59233,0 8px 18px #0006}
.n1-actions{display:flex;flex-wrap:wrap;gap:8px}.n1-actions .btn{min-height:44px;white-space:normal}
/* driver helmets, league medals, sponsor shields */
.n1-who{display:flex;align-items:center;gap:10px}.n1-who b{font-size:1.02rem}
.n1-helmet,.n1-lg{position:relative;isolation:isolate;display:inline-grid;place-items:center;flex:none;width:38px;height:38px;border-radius:50%;border:2px solid #0d1a29;font-style:normal;font-size:21px;line-height:1;box-shadow:0 3px 0 #0006,inset 0 -5px 8px #0005}
.n1-helmet{background:radial-gradient(circle at 34% 28%,#fff 0,var(--c) 36%,#10202f 108%)}
.n1-helmet::before{content:'';position:absolute;z-index:-1;left:11%;right:11%;top:32%;height:34%;border-radius:999px;background:#08101c99}
.n1-lg{background:radial-gradient(circle at 34% 28%,#fff 0,#8fbf9a 38%,#244b40 110%)}.n1-lg1{background:radial-gradient(circle at 34% 28%,#fff 0,#6ea8ff 38%,#1d3b7a 110%)}.n1-lg2{background:radial-gradient(circle at 34% 28%,#fff 0,#ffd45c 38%,#9a5a0a 110%)}
.n1-badge{display:inline-grid;place-items:center;vertical-align:middle;width:31px;height:34px;margin-right:4px;border:2px solid #0d1a29;border-radius:7px 7px 16px 16px/7px 7px 20px 20px;background:linear-gradient(180deg,#fff -25%,var(--c) 38%);color:#0d1a29;font:900 12px/1 var(--font);font-style:normal;box-shadow:inset 0 5px 0 #ffffff59,0 2px 0 #0006}
.n1-dot{display:inline-block;width:14px;height:14px;border-radius:50%;border:2px solid #0d1a29;box-shadow:inset 0 2px 0 #ffffff59}
/* standings */
.n1-standings{list-style:none;padding:0;margin:8px 0 0;counter-reset:n1pos}
.n1-standings li{counter-increment:n1pos;display:grid;grid-template-columns:26px 16px 1fr auto;align-items:center;gap:8px;padding:8px 10px;border-radius:10px}
.n1-standings li:nth-child(odd){background:#ffffff08}
.n1-standings li::before{content:counter(n1pos);font:900 .95rem var(--font);color:#8fa0b4;text-align:center}
.n1-standings li:first-child::before{color:#ffd45c}
.n1-standings li span{width:auto}
.n1-you{background:#a6eb8e26!important;color:#c5f5ad;box-shadow:inset 0 0 0 1px #a6eb8e55}
.n1-section .bz-loss{color:#ffb6a5}
.n1-section button:focus-visible,.n1-actions button:focus-visible,.n1-hero button:focus-visible{outline:3px solid #ffe58a;outline-offset:3px}
@media(max-width:480px){.n1-hero{padding:12px}.n1-hero h3{font-size:1.35rem}.n1-section{padding:11px}.n1-standings li{grid-template-columns:22px 14px 1fr auto;padding:7px 6px}.n1-options{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.n1-section *,.n1-options .btn{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
#ecshop.n1-replay .ecw-jarinfo{display:none}
.n1-lock{margin:.2em 0 .6em;color:#ffe08a;font-weight:700}

/* ===== BIZ SIM P2 (3.44.0): the Business Hub · payback labels · "Or you could…" · Paid back! ===== */
/* Hub mode = the Businesses home: one card per business. Panel mode = the existing business panel, exactly as before, plus a top-left back control. */
#ecshop .p2-hub{display:none}
#ecshop.p2-hubmode .p2-hub{display:block}
#ecshop.p2-hubmode.screen .panel.ecw-panel{display:block!important;overflow-y:auto}
#ecshop.p2-hubmode .ecw-tabs,#ecshop.p2-hubmode .ecw-stage,#ecshop.p2-hubmode .ecw-meter,#ecshop.p2-hubmode .ecw-line,#ecshop.p2-hubmode #ecwprice,#ecshop.p2-hubmode .ecw-cars,#ecshop.p2-hubmode .ecw-upgrade,#ecshop.p2-hubmode .ecw-help,#ecshop.p2-hubmode .ecw-go{display:none!important}
#ecshop.p2-panelmode .ecw-tabs{display:none!important}
#ecshop.p2-hubmode.screen .ecw-acts{justify-content:center}
#ecshop.p2-panelmode.screen .ecw-top{justify-content:flex-start}
#ecshop.p2-panelmode.screen .ecw-top .coinpill{margin-left:auto}
.p2-back{display:inline-flex;align-items:center;gap:6px;min-height:44px;min-width:44px;padding:6px 14px;border-radius:12px;font:800 15px/1 var(--font);white-space:nowrap}
.p2-back b{font-size:20px;line-height:1}
@media(max-width:600px),(orientation:landscape) and (max-height:500px){.p2-back{padding:6px 12px}.p2-back span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}#ecshop.p2-panelmode.screen .ecw-top h2{flex:1 1 0;min-width:0}}
/* the grid: 2 columns on a phone, 3 on a small tablet, 4 on an iPad */
.p2-hub{padding:2px 0 0;text-align:left}
.p2-sum{margin:0 0 12px;font:700 15px/1.45 var(--font);color:#c9d6e4}
.p2-sum .p2-up{color:#a0edb8}.p2-sum .p2-down{color:#ffb09e}
.p2-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
@media(min-width:640px){.p2-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}}
@media(min-width:960px){.p2-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
.p2-card{position:relative;display:flex;flex-direction:column;align-items:stretch;gap:0;padding:0;margin:0;overflow:hidden;text-align:left;cursor:pointer;color:#eef3f8;border:1px solid #a8c6df55;border-radius:18px;background:linear-gradient(180deg,#22344a,#142033);box-shadow:0 8px 20px #0006,inset 0 1px 0 #ffffff1f;font:inherit;transition:transform .16s ease,border-color .2s ease,box-shadow .2s ease}
.p2-card:hover{transform:translateY(-3px);border-color:#ffd66b99;box-shadow:0 14px 26px #0007,inset 0 1px 0 #ffffff29}
.p2-card:active{transform:translateY(1px) scale(.985)}
.p2-card:focus-visible{outline:3px solid #c3fff0;outline-offset:3px}
.p2-card.paid{border-color:#5fe08a;box-shadow:0 8px 20px #0006,0 0 0 2px #5fe08a40,inset 0 1px 0 #ffffff1f}
.p2-card.locked{border-style:dashed;border-color:#8a9db366;background:linear-gradient(180deg,#1b2736,#101926)}
.p2-scene{position:relative;display:block;width:100%;aspect-ratio:12/5;background:#12202f}
.p2-scene canvas{position:absolute;inset:0;width:100%;height:100%;display:block}
.p2-scene::after{content:'';position:absolute;inset:auto 0 0 0;height:55%;background:linear-gradient(180deg,transparent,#142033e6)}
.p2-card.locked .p2-scene canvas{filter:grayscale(.75) brightness(.55)}
.p2-badge{position:absolute;z-index:2;left:10px;bottom:-16px;display:grid;place-items:center;width:42px;height:42px;border-radius:50%;color:#3a1703;background:linear-gradient(180deg,#ffd25e,#ff9a2a);border:2px solid #ffe7a6;box-shadow:0 3px 0 #b4570a,0 6px 12px #0006}
.p2-badge svg{width:24px;height:24px}
.p2-card.locked .p2-badge{background:linear-gradient(180deg,#5b6b7f,#3a4758);border-color:#9fb0c4;color:#d9e3ee;box-shadow:0 3px 0 #202a37,0 6px 12px #0006}
.p2-chip{position:absolute;z-index:2;top:8px;right:8px;padding:3px 9px;border-radius:999px;font:800 12px/1.3 var(--font);color:#3a1703;background:#ffd23f;box-shadow:0 2px 4px #0006}
.p2-card.locked .p2-chip{background:#2b3a4e;color:#dbe6f2;border:1px solid #8a9db3}
.p2-body{display:flex;flex-direction:column;gap:6px;padding:22px 12px 12px}
.p2-name{display:block;font:900 clamp(14px,1.9vw,17px)/1.15 var(--font);color:#ffebc9;letter-spacing:-.02em}
.p2-dyn{display:flex;flex-direction:column;gap:7px}
.p2-yd{display:block;font:800 13.5px/1.3 var(--font)}
.p2-yd.pos{color:#a0edb8}.p2-yd.neg{color:#ffb09e}.p2-yd.none{color:#9fb0c4;font-weight:700}
.p2-mid{display:flex;align-items:center;gap:9px}
.p2-ring{flex:none;width:54px;height:54px;display:block}
.p2-ring text{font:900 15px var(--font);fill:#eef3f8}
.p2-roi{display:block;min-width:0;font:700 12.5px/1.3 var(--font);color:#c9d6e4}
.p2-roi b{display:block;font-size:14px;color:#eef3f8}
.p2-nw{white-space:nowrap}
.p2-roi small{display:block;font-weight:600;font-size:11.5px;color:#9fb0c4}
.p2-card.paid .p2-roi b{color:#a0edb8}
.p2-jar{position:relative;display:block;height:10px;border-radius:999px;background:#0b1522;border:1px solid #a8c6df33;overflow:hidden}
.p2-jar i{position:absolute;left:0;top:0;bottom:0;border-radius:999px;background:linear-gradient(90deg,#ffb22e,#ffd66b)}
.p2-jar.full i{background:linear-gradient(90deg,#3ccf5a,#8ff0a4)}
.p2-jt{display:block;font:700 12px/1.3 var(--font);color:#b2c3d5}
.p2-jt.full{color:#a0edb8}
.p2-lockline{display:block;font:800 13.5px/1.3 var(--font);color:#ffe08a}
.p2-payline{display:block;font:700 12.5px/1.35 var(--font);color:#c9d6e4}
.p2-need{display:block;font:600 11.5px/1.35 var(--font);color:#9fb0c4}
.p2-hubfoot{margin:14px 0 4px}
.p2-hub .bz-tip{margin-top:12px}
/* the panel: ROI line + the payback label that opens "Or you could…" */
.p2-pan{display:flex;flex-direction:column;gap:8px;margin:8px 0 2px}
.p2-pan:empty{display:none}
.p2-panroi{display:flex;align-items:center;gap:10px;margin:0;font:600 13.5px/1.4 var(--font);color:#c9d6e4}
.p2-panroi .p2-ring{width:46px;height:46px}
.p2-panroi b{color:#eef3f8}
.p2-panroi.paid b{color:#a0edb8}
.p2-paybtn{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;width:100%;min-height:44px;padding:8px 12px;text-align:left;cursor:pointer;color:#eef3f8;border:1px solid #7ee6e066;border-radius:12px;background:linear-gradient(180deg,#1d4a52,#143040);font:700 14px/1.35 var(--font);transition:transform .15s ease,border-color .2s ease}
.p2-paybtn b{font-weight:800;color:#d7fffb}
.p2-paybtn small{margin-left:auto;font:700 12.5px var(--font);color:#ffe08a}
.p2-paybtn:hover{border-color:#ffd66b;transform:translateY(-1px)}
.p2-paybtn:focus-visible{outline:3px solid #c3fff0;outline-offset:3px}
/* "Or you could…" */
.p2-q{margin:0 0 10px;color:#c9d6e4}
.p2-alts{list-style:none;margin:0 0 12px;padding:0;display:flex;flex-direction:column;gap:9px}
.p2-alt{display:grid;grid-template-columns:44px minmax(0,1fr) auto;align-items:center;gap:4px 12px;padding:10px 12px;border:1px solid #ffffff22;border-radius:14px;background:linear-gradient(180deg,#ffffff0d,#ffffff05)}
.p2-alt.this{border-color:#ffd66b88;background:linear-gradient(180deg,#ffd66b1f,#ffd66b0a)}
.p2-alt.best{border-color:#5fe08a99}
.p2-alt .p2-ai{grid-row:1/4;display:grid;place-items:center;width:44px;height:44px;border-radius:50%;background:#2b3a4e;color:#ffd66b;font-size:22px}
.p2-alt .p2-ai svg{width:24px;height:24px}
.p2-alt .p2-ai img{width:40px;height:auto;display:block}
.p2-alt b{font:900 15px/1.25 var(--font);color:#ffebc9}
.p2-alt .p2-ac{font:800 13px var(--font);color:#ffe08a;text-align:right}
.p2-alt .p2-ap{grid-column:2/4;font:700 13.5px/1.35 var(--font);color:#d7fffb}
.p2-alt .p2-tag{grid-column:2/4;font:800 12px/1.3 var(--font);color:#a0edb8}
.p2-alt .p2-lbl{font:800 11.5px/1.3 var(--font);letter-spacing:.06em;text-transform:uppercase;color:#9fb0c4}
.p2-alt .btn{grid-column:2/4;justify-self:start;min-height:40px;padding:4px 12px;font-size:13px}
.p2-left{margin:0 0 10px;color:#c9d6e4}
@media(max-width:480px){.p2-alt{grid-template-columns:38px minmax(0,1fr)}.p2-alt .p2-ai{width:38px;height:38px}.p2-alt .p2-ac{grid-column:2;text-align:left}}
/* Paid back! */
.bz-sheet.p2-party{position:relative;overflow:hidden;text-align:center;background:radial-gradient(ellipse at 50% 0,#2f6a52aa,transparent 70%),#111b2b;border-color:#5fe08a}
.bz-sheet.p2-party h2{font-size:1.7em;color:#d7ffe3}
.bz-sheet.p2-party .p2-big{display:block;margin:6px auto 10px;width:112px;height:112px}
.bz-sheet.p2-party .p2-big .p2-ring{width:112px;height:112px}
.bz-sheet.p2-party .p2-big text{font-size:15px}
.bz-sheet.p2-party p{margin:.4em 0}
.p2-confetti{position:absolute;inset:0;pointer-events:none;overflow:hidden}
.p2-confetti i{position:absolute;top:-14px;left:var(--x);width:8px;height:14px;border-radius:2px;background:var(--c);opacity:0;transform:rotate(var(--r));animation:p2fall var(--t,2.4s) ease-in var(--d,0s) 1 both}
@keyframes p2fall{0%{opacity:1;transform:translateY(0) rotate(var(--r))}100%{opacity:1;transform:translateY(520px) rotate(calc(var(--r) + 540deg))}}
.p2-grow .p2-rf{animation:p2fill 1s cubic-bezier(.2,.8,.2,1) .15s both}
.p2-grow .p2-ck{animation:p2pop .5s cubic-bezier(.2,1.6,.4,1) .95s both;transform-origin:32px 32px}
@keyframes p2fill{from{stroke-dashoffset:var(--c)}}
@keyframes p2pop{0%{transform:scale(0);opacity:0}100%{transform:scale(1);opacity:1}}
.p2-fresh .p2-rf{animation:p2fill .9s cubic-bezier(.2,.8,.2,1) both}
body.coin-sim .p2-confetti,.bz-sheet.p2-quiet .p2-confetti,.bz-sheet.p2-calm .p2-confetti{display:none}
body.coin-sim .p2-grow .p2-rf,body.coin-sim .p2-grow .p2-ck,body.coin-sim .p2-fresh .p2-rf,.bz-sheet.p2-quiet .p2-rf,.bz-sheet.p2-quiet .p2-ck{animation:none!important}
.bz-sheet.p2-calm .p2-rf,.bz-sheet.p2-calm .p2-ck{animation:none!important}
@media(prefers-reduced-motion:reduce){.p2-card,.p2-paybtn{transition:none!important}.p2-card:hover{transform:none}.p2-fresh .p2-rf,.p2-grow .p2-rf,.p2-grow .p2-ck{animation:none!important}.p2-confetti{display:none}}
body.redmo .p2-fresh .p2-rf,body.redmo .p2-grow .p2-rf,body.redmo .p2-grow .p2-ck{animation:none!important}body.redmo .p2-confetti,body.redmo .p2-card,body.redmo .p2-paybtn{transition:none!important}body.redmo .p2-confetti{display:none}
/* phone landscape: cards stay readable, the panel scrolls */
@media(orientation:landscape) and (max-height:500px){.p2-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.p2-scene{aspect-ratio:3/1}.p2-body{padding:20px 9px 9px}.p2-ring{width:44px;height:44px}.p2-sum{margin-bottom:8px;font-size:13.5px}.p2-hub .bz-tip{display:none}}
@media(max-width:480px){.p2-body{padding:20px 9px 10px}.p2-ring{width:48px;height:48px}.p2-roi{font-size:11.5px}.p2-roi b{font-size:13px}}

/* phones: one tight header row (back · title · wallet); long numbers lose the word "spent" so the ring text stays short */
@media(max-width:600px){#ecshop.p2-hubmode.screen .ecw-top,#ecshop.p2-panelmode.screen .ecw-top{flex-wrap:nowrap;gap:8px}
 #ecshop.p2-hubmode.screen .ecw-top h2,#ecshop.p2-panelmode.screen .ecw-top h2{flex:1 1 0;min-width:0;font-size:16px;gap:6px;white-space:nowrap}
 #ecshop.p2-hubmode.screen .ecw-top h2 #ecwtitle,#ecshop.p2-panelmode.screen .ecw-top h2 #ecwtitle{overflow:hidden;text-overflow:ellipsis}
 #ecshop.p2-hubmode .ecw-hic,#ecshop.p2-panelmode .ecw-hic{display:none}
 #ecshop.p2-hubmode.screen .ecw-top .coinpill.big,#ecshop.p2-panelmode.screen .ecw-top .coinpill.big{flex:none;margin:0;padding:2px 10px 2px 4px;gap:5px;font-size:15px}
 #ecshop.p2-hubmode.screen .ecw-top .coinpill.big .bankcoins,#ecshop.p2-panelmode.screen .ecw-top .coinpill.big .bankcoins{font-size:15px}
 #ecshop.p2-hubmode.screen .ecw-top .coinpill.big .coin-ic,#ecshop.p2-panelmode.screen .ecw-top .coinpill.big .coin-ic{width:19px;height:19px}
 .p2-back{padding:6px 8px;min-width:44px}
 .p2-x{display:none}.p2-yd{font-size:12.5px}.p2-card .p2-name{font-size:14.5px}}

/* 3.44.1 wallet line: total coins, quiet second line under the run coin pill (never a pill, never louder than it) */
.hud-right .coincol{position:relative;display:flex;flex-direction:column;align-items:flex-end;margin-right:62px}
.hud-right .coincol .coinpill{margin-right:0}
.walletline{position:absolute;right:0;top:100%;margin-top:2px;white-space:nowrap;pointer-events:none;font:700 12px/1 var(--font);letter-spacing:.2px;font-variant-numeric:tabular-nums;color:rgba(255,255,255,.7);text-shadow:0 1px 3px rgba(0,0,0,.7),0 0 1px rgba(0,0,0,.6)}
.hud-right .hr-main{margin-bottom:8px}
.hud-right.hrcol .coincol{margin-right:0;margin-bottom:14px}
.hud-right.hrcol .hr-main{margin-bottom:0}
@media (max-width:900px){.hud-right .coincol{margin-right:58px}.hud-right.hrcol .coincol{margin-right:0}}
@media (orientation:landscape) and (max-height:500px) and (min-width:560px){.hud-right .coincol{margin-right:52px}.hud-right.hrcol .coincol{margin-right:0}.walletline{font-size:11px}}
.walletline.wl-tick{animation:wltick .35s ease-out}
@keyframes wltick{0%{opacity:.7;transform:translateY(1px)}40%{color:rgba(255,255,255,.95)}100%{opacity:1;transform:none}}
body.coin-sim .walletline.wl-tick{animation:none}
@media (prefers-reduced-motion:reduce){.walletline.wl-tick{animation:none}}
.pausewallet{margin:2px 0 6px;text-align:center;font-size:.85em;opacity:.75;font-variant-numeric:tabular-nums}

/* ===== driver-studio: DRIVER STUDIO (#drvstudio) — same glass sheet language as the Garage / Paint Shop ===== */
#drvstudio.screen .panel.ds-panel{max-width:1060px;height:100%;overflow:hidden;padding-bottom:12px}
#drvstudio.screen .panel>.coinpill{order:-1;align-self:flex-end;position:sticky;top:12px;z-index:4;margin:12px -6px -52px 0;animation:m-fade .3s .05s ease both}
.ds-hico{padding:7px}
.ds-main{flex:1 1 auto!important;min-height:0;display:grid;grid-template-columns:minmax(270px,40%) minmax(0,1fr);gap:14px}
.ds-stage{display:flex;flex-direction:column;gap:8px;min-height:0}
.ds-bust{position:relative;flex:1 1 auto;min-height:170px;border-radius:16px;overflow:hidden;border:1px solid var(--m-well-line);background:#141c2b;box-shadow:inset 0 0 0 1px rgba(255,255,255,.04),inset 0 -30px 60px rgba(0,0,0,.35)}
#dsbust{position:absolute;inset:0;width:100%;height:100%;display:block}
.ds-car{position:absolute;right:8px;top:8px;width:43%;max-width:230px;aspect-ratio:1.9;border-radius:12px;background:linear-gradient(180deg,rgba(255,255,255,.08),rgba(0,0,0,.35));border:1px solid rgba(255,255,255,.14);box-shadow:0 6px 16px rgba(0,0,0,.35);overflow:hidden}
#dscar{width:100%;height:100%;display:block}
.ds-car span{position:absolute;left:6px;top:4px;z-index:1;font:700 9.5px/1 var(--m-ui);letter-spacing:.06em;text-transform:uppercase;color:rgba(255,226,160,.85);text-shadow:0 1px 2px rgba(0,0,0,.8);pointer-events:none}
.ds-say{position:absolute;left:8px;top:8px;width:44px;height:44px;border-radius:50%;border:1px solid rgba(255,255,255,.2);background:rgba(10,16,26,.55);color:#fff;font-size:19px;cursor:pointer;display:grid;place-items:center;-webkit-tap-highlight-color:transparent}
.ds-say:active{transform:scale(.92)}
.ds-faces{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;padding:4px;border-radius:14px;background:rgba(0,0,0,.28);border:1px solid var(--m-line)}
.ds-face{min-height:44px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;border:1px solid transparent;border-radius:10px;background:transparent;color:var(--m-muted);font:650 10.5px/1 var(--m-ui);cursor:pointer;padding:2px 0;-webkit-tap-highlight-color:transparent;transition:transform .12s}
.ds-face span{font-size:18px;line-height:1.1}.ds-face:active{transform:scale(.92)}
.ds-face.on{background:var(--m-amber-grad);color:var(--m-brown);box-shadow:var(--m-amber-bevel)}
.ds-tools{display:flex;gap:6px}.ds-short{display:none!important}.ds-tools .btn{flex:1 1 0;min-width:0;padding:8px 6px!important;font-size:13.5px!important}
.ds-looks{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.ds-look{display:flex;flex-direction:column;gap:6px;padding:8px;border-radius:14px;border:1px solid var(--m-well-line);background:var(--m-well)}
.ds-look.on{border-color:var(--m-amber);box-shadow:0 0 0 2px rgba(255,178,46,.4)}
.ds-lookwear{display:flex;flex-direction:column;align-items:center;gap:4px;min-height:44px;border:0;background:transparent;color:var(--m-text);font:700 14px/1.1 var(--m-ui);cursor:pointer;padding:4px;border-radius:10px}
.ds-lookwear small{font:600 11.5px/1 var(--m-ui);color:var(--m-muted)}.ds-look.on .ds-lookwear small{color:var(--m-ok)}
.ds-lookwear:disabled{color:var(--m-muted);cursor:default}
.ds-lookwear canvas,.ds-empty{width:88px;height:88px;flex:none;border-radius:14px;background:radial-gradient(circle at 50% 40%,#33476a,#172133)}
.ds-empty{display:grid;place-items:center;background:none;border:2px dashed rgba(255,255,255,.2);font-size:30px;color:var(--m-muted)}
.ds-looksave{width:100%}
.ds-lookwear:not(:disabled):active{transform:scale(.95)}
.ds-edit{display:grid;grid-template-columns:92px minmax(0,1fr);gap:10px;min-height:0}
.ds-rail{display:flex;flex-direction:column;gap:4px;padding:4px;border-radius:14px;background:rgba(0,0,0,.28);border:1px solid var(--m-line);overflow-y:auto;min-height:0;scrollbar-width:none}
.ds-tab{flex:none;min-height:54px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;border:1px solid transparent;border-radius:10px;background:transparent;color:var(--m-muted);font:650 11px/1.1 var(--m-ui);cursor:pointer;padding:4px 2px;text-align:center;-webkit-tap-highlight-color:transparent;transition:transform .12s}
.ds-tab svg{width:22px;height:22px}.ds-tab:active{transform:scale(.94)}
.ds-tab.on{background:var(--m-amber-grad);color:var(--m-brown);box-shadow:var(--m-amber-bevel)}
@media (hover:hover) and (pointer:fine){.ds-tab:not(.on):hover,.ds-face:not(.on):hover{background:rgba(255,255,255,.07);color:var(--m-text)}}
.ds-opts{overflow-y:auto;min-height:0;padding:2px 4px 10px 2px;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.22) transparent}
.ds-row{margin:0 0 12px}
.ds-h{margin:4px 0 7px;font:700 13px/1.2 var(--m-ui);color:var(--m-amber-hi);letter-spacing:.02em}.ds-h em{font-style:normal;color:var(--m-text);font-weight:600}
.ds-note{margin:0 0 10px!important;font:500 12.5px/1.4 var(--m-ui);color:var(--m-muted)}
.ds-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(88px,1fr));gap:8px}
.ds-themes{grid-template-columns:repeat(auto-fill,minmax(108px,1fr));margin-bottom:12px}
.screen:not(#title) .psw.ds-sw{min-height:0;padding:6px 4px 7px;gap:2px;justify-content:flex-start}
.ds-sw .ds-pic{width:68px;height:68px;border-radius:12px;background:radial-gradient(circle at 50% 40%,#33476a,#172133)}
.ds-theme .ds-pic{width:84px;height:84px}
.ds-sw .nm{min-height:2.3em;display:flex;align-items:center}
.ds-sw .pr{text-align:center;justify-content:center;flex-wrap:wrap}
.screen:not(#title) .psw.ds-sw.locked{border-style:dashed;opacity:.92}
.ds-dots{grid-template-columns:repeat(auto-fill,minmax(46px,1fr));gap:6px}
.ds-dot{position:relative;min-height:50px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;border-radius:12px;border:1px solid var(--m-well-line);background:rgba(0,0,0,.22);cursor:pointer;padding:4px 2px;color:var(--m-muted);-webkit-tap-highlight-color:transparent;transition:transform .12s}
.ds-dot i{display:block;width:30px;height:30px;border-radius:50%;box-shadow:inset 0 -5px 8px rgba(0,0,0,.25),inset 0 3px 5px rgba(255,255,255,.45),0 0 0 2px rgba(255,255,255,.22)}
.ds-dot small{font:700 9.5px/1 var(--m-ui)}.ds-dot .lk{position:absolute;top:4px;right:5px;width:8px;height:6px;border-radius:2px;background:currentColor}
.ds-dot .lk::before{content:"";position:absolute;left:1px;top:-4px;width:3px;height:4px;border:1.4px solid currentColor;border-bottom:0;border-radius:3px 3px 0 0}
.ds-dot.sel{border-color:var(--m-amber);box-shadow:0 0 0 2px rgba(255,178,46,.5)}.ds-dot:active,.ds-sw:active{transform:scale(.94)}
.ds-dot.locked{border-style:dashed}
.ds-seg{display:inline-flex;gap:4px;padding:4px;border-radius:12px;background:rgba(0,0,0,.28);border:1px solid var(--m-line)}
.ds-segb{min-width:84px;min-height:44px;border:1px solid transparent;border-radius:9px;background:transparent;color:var(--m-muted);font:700 14px/1 var(--m-ui);cursor:pointer}
.ds-segb.on{background:var(--m-amber-grad);color:var(--m-brown)}
.ds-num{display:inline-flex;align-items:center;gap:10px}.ds-num b{min-width:44px;text-align:center;font:700 26px/1 var(--font);color:#fff}.ds-num .btn{min-width:48px}
.ds-buy{flex:none!important;display:flex;align-items:center;gap:8px;margin-top:10px;min-height:48px;padding:6px 8px 6px 12px;border-radius:14px;border:1px solid var(--m-well-line);background:var(--m-well);position:relative}
.ds-buy.locked{border-color:var(--m-amber-line);background:var(--m-amber-tint)}
.ds-buytext{flex:1;min-width:0;font:600 12.5px/1.35 var(--m-ui);color:var(--m-muted)}.ds-buytext b{color:var(--m-text)}
.ds-meter{position:absolute;left:12px;right:12px;bottom:4px;height:4px;border-radius:3px;background:rgba(255,255,255,.12);overflow:hidden}.ds-meter i{display:block;height:100%;background:linear-gradient(90deg,#ffd66b,#ff9416);border-radius:3px;transition:width .4s}
.ds-sheetwrap{position:absolute;inset:0;z-index:30;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(4,8,15,.62);animation:m-fade .18s ease both}
.ds-sheet{width:min(420px,100%);max-height:100%;overflow:auto;padding:16px 18px;border-radius:18px;border:1px solid var(--m-line);background:var(--m-sheet);box-shadow:0 20px 50px rgba(0,0,0,.5);animation:m-sheet-in .26s cubic-bezier(.2,.8,.25,1) both}
.ds-sheet h2{margin:0 0 10px;font:700 22px/1.15 var(--font);color:#fff;text-align:center}
.ds-buylist{list-style:none;margin:0 0 10px;padding:0;display:flex;flex-direction:column;gap:6px}.ds-buylist li{display:flex;justify-content:space-between;align-items:center;padding:8px 10px;border-radius:10px;background:var(--m-well);font:600 14px/1.2 var(--m-ui)}
.ds-buylist b{display:inline-flex;align-items:center;gap:5px}.ds-after{text-align:center;font:500 13px/1.4 var(--m-ui);color:var(--m-muted)}.ds-after b{color:var(--m-text)}
.ds-sheetacts{display:flex;gap:8px;justify-content:center;margin-top:12px}.ds-sheetacts .btn{flex:1}
/* entries */
.ds-entry{display:flex;align-items:center;gap:12px;width:100%;margin:10px 0 4px;padding:10px 14px 10px 10px;border-radius:16px;border:1px solid var(--m-amber-line,rgba(255,178,46,.6));background:linear-gradient(110deg,rgba(255,190,70,.16),rgba(255,138,26,.05) 60%),var(--m-well,rgba(255,255,255,.05));color:var(--m-text,#fff);cursor:pointer;text-align:left;font-family:var(--m-ui,system-ui);transition:transform .14s}
.ds-entry:active{transform:scale(.985)}
.ds-entrypic{width:64px;height:64px;flex:none;border-radius:14px;background:radial-gradient(circle at 50% 40%,#33476a,#172133);box-shadow:inset 0 0 0 1px rgba(255,255,255,.1)}
.ds-entrytx{flex:1;display:flex;flex-direction:column;gap:3px}.ds-entrytx b{font:700 19px/1.1 var(--font);color:#fff}.ds-entrytx small{font:500 12.5px/1.35 var(--m-ui,system-ui);color:var(--m-muted,#b4bdc8)}
.ds-entrygo{pointer-events:none}
.ds-chip{position:absolute;z-index:3;width:62px;display:flex;flex-direction:column;align-items:center;gap:1px;padding:4px 3px 5px;border-radius:16px;border:1.5px solid rgba(255,214,107,.75);background:linear-gradient(180deg,rgba(40,56,84,.94),rgba(14,22,36,.96));color:#ffe2a0;font:800 10.5px/1 var(--m-ui,system-ui);letter-spacing:.04em;text-transform:uppercase;cursor:pointer;box-shadow:0 6px 16px rgba(0,0,0,.4),inset 0 1px 0 rgba(255,255,255,.12);-webkit-tap-highlight-color:transparent;transition:transform .14s}
.ds-chip canvas{width:48px;height:48px;display:block}.ds-chip:active{transform:scale(.93)}
@media (hover:hover) and (pointer:fine){.ds-chip:hover{transform:translateY(-2px)}.ds-entry:hover{filter:brightness(1.08)}}
/* sideways phones: a short sheet. Smaller header, compact stage, icon rail; the "saved" line hides (it shows only when something is locked) */
@media (orientation:landscape) and (max-height:520px){
  .ds-main{grid-template-columns:minmax(200px,34%) minmax(0,1fr);gap:10px}
  .ds-stage{gap:5px}.ds-bust{min-height:100px}.ds-car{width:38%}.ds-car span{display:none}
  .ds-looks{gap:6px}.ds-lookwear canvas,.ds-empty{width:58px;height:58px}.ds-looksave{font-size:12px!important;padding:6px 2px!important}
  .ds-say{width:34px;height:34px;font-size:15px;left:5px;top:5px}
  .ds-faces{padding:2px;gap:2px}.ds-face{min-height:32px}.ds-face b{display:none}.ds-face span{font-size:16px}
  #drvstudio .ds-tools .btn{min-height:34px!important;font-size:12px!important;padding:4px!important}#drvstudio .ds-tools .btn>span{display:none!important}#drvstudio .ds-tools #dsreset>.ds-short{display:inline-flex!important}
  .ds-intro{display:none}#dsbuyundo{display:none!important}.ds-buytext{font-size:11.5px}
  .ds-edit{grid-template-columns:62px minmax(0,1fr);gap:8px}
  .ds-tab{min-height:44px}.ds-tab span{display:none}
  .ds-buy{margin-top:6px;min-height:40px;padding:3px 6px 3px 10px}.ds-buy:not(.locked){display:none}
  .ds-sw .ds-pic{width:52px;height:52px}.ds-theme .ds-pic{width:56px;height:56px}.ds-sw .nm{min-height:0;font-size:10.5px}.screen:not(#title) .psw.ds-sw{padding:4px 3px 5px}
  .ds-grid{grid-template-columns:repeat(auto-fill,minmax(78px,1fr));gap:6px}.ds-themes{grid-template-columns:repeat(auto-fill,minmax(92px,1fr))}
  .ds-chip{width:52px}.ds-chip canvas{width:38px;height:38px}
}
/* portrait phones: stage on top, then the rail + options */
@media (orientation:portrait) and (max-width:600px){
  #drvstudio.screen .panel.ds-panel{--px:12px}
  .ds-main{grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);gap:8px}
  .ds-stage{gap:6px}.ds-bust{flex:none;height:min(26vh,230px);min-height:170px}.ds-car{width:42%}
  .ds-face{min-height:38px}.ds-face b{font-size:9.5px}.ds-face span{font-size:16px}
  #drvstudio .ds-tools .btn{min-height:40px!important}#drvstudio .ds-tools #dsreset>.ds-long{display:none!important}#drvstudio .ds-tools #dsreset>.ds-short{display:inline-flex!important}
  #dsbuyundo{display:none!important}.ds-buy{min-height:44px;margin-top:8px}.ds-buytext{font-size:11.5px;line-height:1.3}.ds-intro{display:none}
  .ds-looks{gap:6px}.ds-look{padding:5px}.ds-lookwear canvas,.ds-empty{width:62px;height:62px}.ds-looksave{font-size:12px!important;padding:6px 2px!important}
  #drvstudio.screen .panel>h2{padding:8px 108px;font-size:21px}#drvstudio.screen .panel>h2>.ico{display:none}
  #drvstudio.screen .panel>.coinpill{font-size:16px;min-height:40px;padding:2px 10px 2px 4px;margin-top:14px}
  .ds-edit{grid-template-columns:62px minmax(0,1fr);gap:8px}.ds-tab{min-height:48px}.ds-tab span{font-size:9.5px}
  .ds-grid{grid-template-columns:repeat(auto-fill,minmax(80px,1fr));gap:6px}.ds-themes{grid-template-columns:repeat(auto-fill,minmax(92px,1fr))}
  .ds-sw .ds-pic{width:58px;height:58px}.ds-theme .ds-pic{width:70px;height:70px}
  .ds-chip{width:52px}.ds-chip canvas{width:38px;height:38px}
}
@media (prefers-reduced-motion:reduce){.ds-face,.ds-tab,.ds-dot,.ds-sw,.ds-chip,.ds-entry{transition:none}}
/* rent-24h: Player Rentals = 24 hours + mileage. Results line: shape (down arrow) + words, the loss in red; never colour alone. */
#results.screen .resextra li.mi,.resextra li.mi{grid-column:1/-1;flex-wrap:nowrap;justify-content:flex-start;align-items:center;gap:8px;background:rgba(255,93,79,.13);border-color:rgba(255,107,94,.6);color:#ffe1dc}
.resextra li.mi .mi-ar{flex:0 0 auto;display:inline-grid;place-items:center;width:22px;height:22px;border-radius:50%;background:#ff5d4f;color:#1b0705;font:900 15px/1 var(--font)}
.resextra li.mi .mi-w{flex:1 1 auto;display:flex;flex-wrap:wrap;align-items:baseline;gap:0 6px;min-width:0}
.resextra li.mi b{color:#ff8a80;font-weight:900;font-variant-numeric:tabular-nums}
.resextra li.mi small{flex-basis:100%;color:#ffbdb4;font:600 11.5px/1.3 var(--font)}
.toast.mile{border-color:#ff5d4f;border-left-color:#ff5d4f}
#ecshop .prc-mile{margin-left:6px;padding:1px 7px;border-radius:999px;background:#2a1d1b;border:1px solid #ff8a8070;color:#ffc9c2;font:700 11.5px/1.4 var(--font);white-space:nowrap}
#ecshop .ecw-cars .bz-tip{margin-top:10px}
#garage .pr-ro small.pr-mile{color:#ffc9c2}
/* the sticky ← back button sits over the end of the help line (seen on live 3.45.0 too); in Rent a player's car the line keeps clear of it */
#ecshop.screen.prv-on .ecw-help{box-sizing:border-box;padding-right:calc(var(--prv-back,0px) + 10px)}

/* Tow & Rescue: shares the Business Hub's existing navigation and ROI. */
.n2-dispatch{background:linear-gradient(135deg,#102b38,#142130);border:1px solid #6b8b99;border-radius:16px;padding:16px;margin:12px 0;box-shadow:0 8px 24px #0003}
.n2-dispatch h3{color:#ffe0a1;margin:0 0 8px}.n2-dispatch p,.n2-rules p{line-height:1.5}
.n2-picker{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:16px 0}
.n2-picker button{min-height:64px;display:flex;flex-direction:column;gap:5px;justify-content:center;white-space:normal;border:2px solid #526c81;background:#142838;color:#edf5f5;padding:8px}
.n2-picker button.on{border-color:#f5ca6b;background:#28505b;box-shadow:inset 0 -3px #f5ca6b}.n2-picker button span{font-size:.78em;color:#bcebd6}.n2-picker button:focus-visible{outline:3px solid #fff;outline-offset:3px}
.n2-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.n2-stats span{display:flex;flex-direction:column;font-size:.85em;color:#c2d9e4}.n2-stats b{font-size:1.55em;color:#edf4f9}
.n2-missed,.n2-stats .n2-missed,.n2-stats .n2-missed b{color:#ffb0a3}.n2-receipt{background:#091c28;border-left:3px solid #d5b46f;padding:12px 16px;line-height:1.8!important;font-variant-numeric:tabular-nums}.n2-receipt strong,.n2-rest{color:#9be1b7}
.n2-rules{border:1px solid #5c778b;border-radius:12px;margin:14px 0;padding:4px 14px;background:#0f2331}.n2-rules summary{cursor:pointer;min-height:44px;display:list-item;padding-top:12px;box-sizing:border-box;color:#ffe0a1}
@media(max-width:520px){.n2-picker,.n2-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.n2-dispatch{padding:12px}.n2-picker button{min-height:62px}}
@media(prefers-reduced-motion:reduce){.n2-dispatch *{animation:none!important;transition:none!important}}
/* gate 3.46.0: capacity tags on every choice, a "best" star, the calls-vs-trucks bar, a taller yard on narrow screens */
.n2-picker button{position:relative}.n2-picker button em{font-style:normal;font-size:.72em;font-weight:700;line-height:1.2}
.n2-picker .n2-ok{color:#9be1b7}.n2-picker .n2-miss{color:#ffb0a3}.n2-picker .n2-idle{color:#c3cfd8}
.n2-best{position:absolute;top:-9px;right:8px;font-style:normal;font-size:.68em;font-weight:800;background:#f5ca6b;color:#2a1a00;border-radius:999px;padding:1px 8px}
.n2-cap{display:grid;gap:6px;margin:4px 0 14px}.n2-cap>div{display:grid;grid-template-columns:4.6em 1fr;align-items:center;gap:8px}.n2-cap span{font-size:.8em;color:#c2d9e4;font-weight:700}
.n2-cap p{display:flex;height:22px;margin:0;border-radius:6px;overflow:hidden;background:#0a1923}.n2-cap i{display:block;height:100%;font-style:normal;font-size:.7em;font-weight:800;line-height:22px;text-align:center;color:#06141c;overflow:hidden;white-space:nowrap;transition:width .35s ease}
.n2-cap .n2-ans{background:#5fd39a}.n2-cap .n2-mis{background:#ff7d6e}.n2-cap .n2-bsy{background:#4fb7c1}.n2-cap .n2-idl{background:repeating-linear-gradient(135deg,#5b6873 0 6px,#45515b 6px 12px);color:#e7eef2}
@media(max-width:560px){#ecshop.n2-tow #ecwcv{aspect-ratio:16/10}}
/* gate 3.46.0 (fix for every business): the site-wide sticky corner Back (.panel>.row>[data-back]: sticky, margin-bottom -54px) let the level line and the
   help line slide under "← All businesses" in every business panel (844x390, 390x844, iPad help line). In the Businesses screen it is an ordinary button
   in the Collect row; Esc, tap outside and the top-left ← still go back. Player Rentals' own help-line padding (rent-24h) is no longer needed. */
#ecshop.screen .ecw-panel>.row.ecw-acts>[data-back]{position:relative;top:auto;margin:0;align-self:stretch}
#ecshop.screen.prv-on .ecw-help{padding-right:0}

/* pit-crew: the Garage's Pit Crew row (time now -> next, who comes, the narrated tip) */
.upg.pc-row .pc-line{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;margin:5px 0 2px}
.upg.pc-row .pc-t{display:inline-flex;align-items:center;padding:3px 9px;border-radius:999px;background:rgba(255,178,46,.16);border:1px solid rgba(255,178,46,.45);color:#ffd27a;font:800 13px/1.15 var(--m-ui,system-ui);white-space:nowrap}
.upg.pc-row .pc-who{display:inline-flex;align-items:center;gap:6px;font:650 12.5px/1.25 var(--m-ui,system-ui);color:#e9ecf6}
.upg.pc-row .pc-who em{font-style:normal;color:#9fe39b;font-weight:750}
.upg.pc-row .pc-ic{display:inline-grid;place-items:center;width:30px;height:21px;border-radius:6px;background:rgba(255,255,255,.1)}
.upg.pc-row .pc-ic svg{width:26px;height:18px}
.upg.pc-row .bz-tip.pc-tip,.upg.pc-row .bz-tip{margin-top:7px;padding:6px 8px;gap:8px;border-radius:10px;font:600 12px/1.3 var(--m-ui,system-ui);color:#f3ead0}
.screen:not(#title) .upg.pc-row .bz-tip .btn,.upg.pc-row .bz-tip .btn{min-width:44px;width:44px;min-height:44px;height:44px;padding:0;flex:0 0 44px;display:grid;place-items:center;font-size:18px}
.upg.pc-row .btn small.pc-bt{display:inline-flex;margin-top:1px;color:#ffe2a0;font-weight:800;letter-spacing:.01em}
#upglist .upg.pc-row{grid-column:1/-1}
.screen:not(#title) .upg.pc-row .ds{-webkit-line-clamp:3}
@media (max-width:560px){.upg.pc-row .pc-t{font-size:12px;padding:2px 7px}.upg.pc-row .pc-who{font-size:11.5px}.upg.pc-row .bz-tip{font-size:11.5px}}
@media (orientation:landscape) and (max-height:500px){.upg.pc-row .bz-tip{padding:4px 7px}.upg.pc-row .pc-line{margin-top:3px}}
.screen:not(#title) .upg.pc-row .bz-tip span{min-width:0}
@media (max-width:560px){.screen:not(#title) .upg.pc-row .ds{display:none}}
.screen:not(#title) .upg.pc-row>.bz-tip,.upg.pc-row>.bz-tip{grid-column:1/-1;flex-basis:100%;margin-top:2px}
.upg.pc-row{flex-wrap:wrap}
@media (max-width:560px){.upg.pc-row .pc-t{white-space:normal;max-width:100%}.upg.pc-row .pc-line{min-width:0}}

/* odometer: per-car lifetime distance (Garage row, Cars cards, finish screen line, Player Rentals listing) */
.odo{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 7px;margin:5px 0 0;font:650 12px/1.25 var(--m-ui,system-ui);color:#b9c3d8}
.odo .odo-l{opacity:.85}.odo .odo-v{color:#eef2ff;font-weight:800;font-variant-numeric:tabular-nums}
.odoplate{display:inline-block;font-style:normal;font-size:10.5px;font-weight:800;letter-spacing:.02em;line-height:1.2;padding:1px 7px;border-radius:5px;border:1px solid;white-space:nowrap}
.odoplate.op1{color:#ffd9b8;background:rgba(200,139,90,.22);border-color:#c88b5a}
.odoplate.op2{color:#eef2f7;background:rgba(201,210,220,.2);border-color:#c9d2dc}
.odoplate.op3{color:#fff1b8;background:rgba(255,212,90,.22);border-color:#ffd45a}
.odoplate.op4{color:#d8fbff;background:rgba(159,231,242,.2);border-color:#9fe7f2}
#upglist .odorow{grid-column:1/-1;display:flex;flex-wrap:wrap;align-items:center;gap:4px 14px;margin:6px 0 2px;padding:7px 11px;border-radius:10px;background:rgba(255,255,255,.05)}
#upglist .odorow .odo{margin:0;font-size:13px}.odorow .odo-s{font:600 11.5px/1.3 var(--m-ui,system-ui);color:#9aa6bf}.odorow .odo-s b{color:#dbe3f5}
.card.veh .odo{margin:4px 0 2px;font-size:11.5px}
.resodo{display:block;margin:-2px 0 8px;font:750 13px/1.3 var(--m-ui,system-ui);color:#cfe3ff;font-variant-numeric:tabular-nums}.resodo.hidden{display:none}
.prc-meta .prc-odo{display:inline-block;margin-left:8px;font:700 11.5px/1.2 var(--m-ui,system-ui);color:#c9d3ea;font-variant-numeric:tabular-nums}
@media (max-width:560px){#upglist .odorow{padding:5px 9px}.odorow .odo-s{font-size:11px}}

/* car-career: Pro Tune locks (track data) + Car Pedigree (race history value) */
.screen:not(#title) .upg.cc-lock{grid-template-rows:auto auto}
.screen:not(#title) .upg.cc-lock .btn.cc-btn,.upg.cc-lock .btn.cc-btn{grid-column:1/-1;width:100%;min-width:0;display:flex;flex-direction:column;align-items:stretch;gap:5px;padding:9px 12px;text-align:left;white-space:normal;
  background:rgba(120,170,255,.08);border:1px dashed rgba(150,190,255,.55);color:#dfe9ff;cursor:default}
.screen:not(#title) .upg.cc-lock .btn.cc-btn:not(:disabled){cursor:pointer}
.screen:not(#title) .upg.cc-lock .btn.cc-btn:disabled{opacity:1;background:rgba(120,170,255,.08);border-color:rgba(150,190,255,.55);color:#dfe9ff}
.cc-btn .cc-lt{display:flex;align-items:center;gap:7px;font:750 13px/1.3 var(--m-ui,system-ui);letter-spacing:0;text-transform:none}
.cc-btn .cc-lt b{color:#fff;font-weight:850}
.cc-btn .cc-lk{flex:0 0 14px;width:14px;height:16px;position:relative}
.cc-btn .cc-lk::before{content:'';position:absolute;left:2.5px;top:0;width:9px;height:9px;border:2.2px solid #a9c6ff;border-bottom:0;border-radius:6px 6px 0 0;box-sizing:border-box}
.cc-btn .cc-lk::after{content:'';position:absolute;left:0;bottom:0;width:14px;height:9px;border-radius:2.5px;background:#a9c6ff}
.cc-btn .cc-bar{position:relative;display:block;height:10px;border-radius:999px;background:rgba(0,0,0,.38);border:1px solid rgba(169,198,255,.35);overflow:hidden}
.cc-btn .cc-bar i{position:absolute;left:0;top:0;bottom:0;border-radius:999px;background:repeating-linear-gradient(-45deg,#7fb2ff 0 7px,#5f95f0 7px 14px);min-width:3px}
.cc-btn .cc-bar em{position:absolute;right:1px;top:1px;bottom:1px;width:10px;border-radius:2px;background:conic-gradient(#fff 0 25%,#222 0 50%,#fff 0 75%,#222 0) 0 0/5px 4px}
.cc-btn small.cc-sub{display:flex;align-items:center;gap:4px;font:650 11.5px/1.25 var(--m-ui,system-ui);color:#b9c8e6;letter-spacing:0;text-transform:none}
.screen:not(#title) .upg .nm small.cc-chip,.upg .nm small.cc-chip{display:inline-block;margin:4px 0 0 6px;padding:2px 7px;border-radius:999px;border:1px solid rgba(150,190,255,.55);color:#cfe0ff;background:rgba(120,170,255,.1);letter-spacing:.06em;font:800 10px/1.2 var(--m-ui,system-ui);text-transform:uppercase}
.screen:not(#title) .upg .nm small.cc-chip.on,.upg .nm small.cc-chip.on{border-color:rgba(126,224,150,.6);color:#a6f0b8;background:rgba(80,200,120,.12)}
#upglist .cc-tiprow{grid-column:1/-1}
#upglist .cc-tiprow .bz-tip,#upglist .ccrow .bz-tip{padding:6px 8px;gap:8px;border-radius:10px;font:600 12px/1.3 var(--m-ui,system-ui);color:#f3ead0}
.screen:not(#title) #upglist .cc-tiprow .bz-tip .btn,.screen:not(#title) #upglist .ccrow .bz-tip .btn{min-width:44px;width:44px;min-height:44px;height:44px;padding:0;flex:0 0 44px;display:grid;place-items:center;font-size:18px}
#upglist .ccrow{grid-column:1/-1;display:flex;flex-direction:column;gap:6px;margin:4px 0 2px;padding:8px 11px;border-radius:10px;background:rgba(255,255,255,.05)}
.ccrow .cc-hist{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;font:650 13px/1.3 var(--m-ui,system-ui);color:#d9e1f2}
.ccrow .cc-val b,.ccline b,.garped b{color:#fff;font-weight:850;font-variant-numeric:tabular-nums}
.ccrow .cc-val em,.ccline em,.garped em{font-style:normal;color:#ffd86e;font-weight:800}
.ccrow .cc-cnt{font:600 11.5px/1.35 var(--m-ui,system-ui);color:#9aa6bf}.ccrow .cc-cnt b{color:#dbe3f5}
.ccbadge{display:inline-flex;align-items:center;gap:4px;padding:2px 8px 2px 4px;border-radius:999px;border:1px solid;font:800 11px/1.2 var(--m-ui,system-ui);letter-spacing:.03em;white-space:nowrap;vertical-align:middle}
.ccbadge svg{width:27px;height:15px;fill:currentColor;flex:0 0 auto}
.ccbadge.cb0{border-style:dashed;border-color:rgba(255,255,255,.25);color:#9aa6bf;padding:2px 8px;font-weight:700}
.ccbadge.cb1{color:#ffc9a0;background:rgba(200,120,60,.2);border-color:#c8814a}
.ccbadge.cb2{color:#eef3fa;background:rgba(200,212,226,.18);border-color:#c9d2dc}
.ccbadge.cb3{color:#ffe68a;background:rgba(255,200,40,.2);border-color:#ffcf3f;box-shadow:0 0 8px rgba(255,200,40,.25)}
.ccbadge.sm{padding:1px 7px 1px 4px;font-size:10.5px}.ccbadge.sm svg{width:23px;height:13px}
.card.veh .ccline{display:flex;flex-wrap:wrap;align-items:center;gap:3px 7px;margin:2px 0 4px;font:650 11.5px/1.3 var(--m-ui,system-ui);color:#c3cce0}
.screen:not(#title) .garped,.garped{flex:1 1 100%;display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;min-width:0;margin-top:4px;font:650 12.5px/1.3 var(--m-ui,system-ui);color:#c9d3ea}
.garped:empty{display:none}
.resped{display:block;margin:-4px 0 8px;font:750 13px/1.3 var(--m-ui,system-ui);color:#ffe3a0}.resped.hidden{display:none}.resped b{color:#fff}
.prc-meta .prc-ped{display:inline-flex;align-items:center;gap:4px;margin-left:8px;font:750 11.5px/1.2 var(--m-ui,system-ui);color:#ffd86e}
.ecw-who small .cc-own{color:#ffd86e;font-weight:800}
#ecshop .ecw-slots.plist .ecw-who small{white-space:normal;text-overflow:clip;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden} /* the owner's lot line wraps to 2 lines (phones) so the race-history bonus shows */
@media(max-width:600px){#ecshop .ecw-slots.plist li .ecw-who{flex:1 1 calc(100% - 80px)}#ecshop .ecw-slots.plist li .pr-listed{margin-left:72px}} /* phones: the car's words get the row; Listed + Unlist go under them */
@media (max-width:560px){.cc-btn .cc-lt{font-size:12.5px}#upglist .ccrow{padding:6px 9px}.ccrow .cc-hist{font-size:12.5px}}
@media (prefers-reduced-motion:reduce){.ccbadge.cb3{box-shadow:none}}

/* gate 3.49.0: Dirt World HUD race name on one line (the card grows; phones keep their own full-width row). */
@media (min-width:601px){#hud .trackname.one{flex-shrink:0;max-width:none}#hud .trackname.one span{display:block;white-space:nowrap;-webkit-line-clamp:unset}}

/* Dirt race teaching stays inside its picker. */
.tech-tip{grid-column:1/-1;margin:2px 0;font-size:.85rem}.tech-tip .bz-tip{margin:0;padding:6px 10px}
