*{box-sizing:border-box;margin:0;padding:0}
html,body{width:100%;height:100%;overflow:hidden;background:#1b1d2e;touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent;font-family:"Trebuchet MS","Segoe UI",system-ui,-apple-system,Roboto,Arial,sans-serif;color:#fff}
canvas#c{position:fixed;left:0;top:0;display:block}
button{font-family:inherit;cursor:pointer;border:0;color:inherit;touch-action:manipulation}
.hide{display:none!important}
#topbtns{position:fixed;top:max(10px,env(safe-area-inset-top));right:10px;display:flex;gap:8px;z-index:30}
.ib{width:46px;height:46px;border-radius:14px;background:#262a44;border:3px solid #0f1120;box-shadow:0 4px 0 #0f1120;display:flex;align-items:center;justify-content:center}
.ib svg{width:26px;height:26px;fill:#fff;stroke:#fff}
.ib:active{transform:translateY(2px);box-shadow:0 2px 0 #0f1120}
.muted #mWave{display:none}
#mX{display:none}.muted #mX{display:inline}
#bMusic .mOff{display:none}#bMusic.off .mOff{display:inline}#bMusic.off{opacity:.6}
.ov{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;z-index:20;padding:12px;background:rgba(15,17,32,.35)}
.panel{background:#2a2e4d;border:4px solid #0f1120;border-radius:22px;box-shadow:0 8px 0 #0f1120,0 20px 40px rgba(0,0,0,.4);padding:14px 16px 12px;width:min(440px,100%);max-height:100%;overflow:auto;text-align:center}
.panel.small{width:min(300px,100%)}
h1{font-size:28px;line-height:1;font-weight:900;color:#ffd23f;text-shadow:0 3px 0 #b3440f,0 5px 0 #0f1120;letter-spacing:.5px}
h1 span{display:block;font-size:20px;color:#5ce1ff;text-shadow:0 3px 0 #135a8a,0 5px 0 #0f1120;margin-top:4px}
h2{font-size:30px;font-weight:900;color:#ffd23f;text-shadow:0 3px 0 #b3440f,0 5px 0 #0f1120;margin:4px 0 10px}
.coinsline{margin:8px 0 6px;font-size:16px;font-weight:700;color:#ffe9a8;display:flex;align-items:center;justify-content:center;gap:6px}
.coinsline b{font-size:20px;color:#ffd23f}
.coin{display:inline-block;width:18px;height:18px;border-radius:50%;background:radial-gradient(circle at 35% 35%,#fff3a0 0 20%,#ffcc22 22%);border:3px solid #8a5a00}
.row{display:flex;align-items:center;gap:8px;background:#20233c;border-radius:16px;padding:6px;margin:6px 0}
.arr{width:40px;min-width:40px;height:56px;border-radius:12px;background:#3b4170;font-size:34px;line-height:1;font-weight:900;border-bottom:4px solid #0f1120}
.arr:active{transform:translateY(2px)}
.tinfo,.cinfo{flex:1;min-width:0}
.lbl{font-size:12px;letter-spacing:1.5px;text-transform:uppercase;color:#9aa3d6;font-weight:700}
.lbl.center{margin-top:4px}
#tName,#cName{font-size:20px;font-weight:900;color:#fff}
#tSub{font-size:13px;color:#c6cbef;min-height:16px}
#carPrev{width:84px;height:84px}
#cStats{font-size:11px;color:#c6cbef;text-align:left;margin-top:2px}
.st{display:flex;align-items:center;gap:6px;margin:2px 0}
.st span{width:74px}
.st i{flex:1;height:7px;background:#14162a;border-radius:4px;overflow:hidden;position:relative}
.st i b{position:absolute;left:0;top:0;bottom:0;background:#5ce1ff;border-radius:4px}
#sw{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;margin:6px 0}
.swc{width:32px;height:32px;border-radius:50%;border:3px solid #0f1120;position:relative;font-size:10px;font-weight:900;color:#fff;text-shadow:0 1px 2px #000}
.swc.sel{outline:3px solid #ffd23f;outline-offset:2px}
.swc.lock{opacity:.55}
.swc.lock::after{content:attr(data-p);position:absolute;inset:0;display:flex;align-items:center;justify-content:center}
#msg{min-height:18px;font-size:14px;color:#ffb36b;font-weight:700;margin:2px 0}
.big{display:block;width:100%;font-size:26px;font-weight:900;padding:12px;border-radius:16px;background:#ff5a2a;border:3px solid #0f1120;box-shadow:0 6px 0 #0f1120;color:#fff;text-shadow:0 2px 0 #9b2a07;margin:6px 0 10px;letter-spacing:1px}
.big:active{transform:translateY(3px);box-shadow:0 3px 0 #0f1120}
.big.off{background:#5a5f86;text-shadow:none}
.big.buy{background:#2fb45a;text-shadow:0 2px 0 #145f2c}
.mid{flex:1;font-size:18px;font-weight:900;padding:10px;border-radius:14px;background:#3b4170;border:3px solid #0f1120;box-shadow:0 4px 0 #0f1120;width:100%}
.mid:active{transform:translateY(2px);box-shadow:0 2px 0 #0f1120}
.row2{display:flex;gap:8px}
.tog{display:flex;align-items:center;justify-content:center;gap:8px;font-size:15px;font-weight:700;color:#dfe3ff}
.tog input{width:20px;height:20px;accent-color:#ff5a2a}
.hint{font-size:12px;color:#9aa3d6;margin-top:6px}
#rTable{background:#20233c;border-radius:14px;padding:6px 10px;margin-bottom:8px}
.rr{display:flex;justify-content:space-between;font-size:17px;font-weight:700;padding:4px 0;border-bottom:1px solid #2f3459}
.rr:last-child{border-bottom:0}
.rr.me{color:#ffd23f}
#rInfo{font-size:16px;color:#dfe3ff;line-height:1.5}
#rInfo b{color:#fff}
#rMsg{min-height:20px;font-size:16px;font-weight:900;color:#5ce1ff;margin:4px 0}
#touch{position:fixed;left:0;right:0;bottom:0;display:flex;justify-content:space-between;align-items:flex-end;padding:0 12px max(14px,env(safe-area-inset-bottom));z-index:10;pointer-events:none}
#touch .tl,#touch .tr{display:flex;gap:10px;pointer-events:auto}
#touch button{width:78px;height:78px;border-radius:22px;background:rgba(38,42,68,.72);border:3px solid rgba(15,17,32,.9);font-size:30px;font-weight:900;box-shadow:0 5px 0 rgba(15,17,32,.8)}
#touch #tGas,#touch #tBrake{font-size:16px}
#touch #tGas{background:rgba(47,180,90,.8);height:96px}
#touch #tBrake{background:rgba(220,60,50,.75)}
#touch button.on{transform:translateY(3px);box-shadow:0 2px 0 rgba(15,17,32,.8);filter:brightness(1.3)}
@media (max-height:640px){.panel{padding:10px 12px 8px}h1{font-size:22px}h1 span{font-size:16px}.big{font-size:22px;padding:9px}#carPrev{width:64px;height:64px}.arr{height:46px}.hint{display:none}}
@media (max-width:420px){#sw{gap:4px}.swc{width:28px;height:28px;font-size:9px}.panel{padding:12px 10px 10px}}
