@import url('data:text/css,');
*{box-sizing:border-box;margin:0;padding:0}
html,body{width:100%;height:100%;overflow:hidden;background:#000;color:#e8f6ff;font-family:'Segoe UI',system-ui,-apple-system,Helvetica,Arial,sans-serif;user-select:none;-webkit-user-select:none;touch-action:none}
#app canvas{display:block;position:fixed;inset:0;width:100%!important;height:100%!important}
.hidden{display:none!important}
#flash{position:fixed;inset:0;pointer-events:none;background:#fff;opacity:0;transition:opacity .4s}
#loading{position:fixed;left:50%;bottom:26px;width:360px;height:56px;margin-left:-180px;box-sizing:border-box;padding:9px 14px;border-radius:12px;background:rgba(4,10,24,.82);border:1px solid rgba(80,230,255,.35);z-index:60;pointer-events:none;opacity:0;transition:opacity .35s;font-size:12px;letter-spacing:.12em;color:#cff;text-transform:uppercase}
#loading.on{opacity:1}#loadTxt{height:16px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.lbar{margin-top:8px;height:8px;border-radius:4px;background:rgba(255,255,255,.12);overflow:hidden}#loadBar{height:100%;width:100%;transform:scaleX(0);transform-origin:0 50%;background:linear-gradient(90deg,#2ef,#f6f);transition:transform .2s}
#logo{position:fixed;left:5vw;top:6vh;pointer-events:none;opacity:0;transform:translateX(-30px);transition:all 1s cubic-bezier(.2,.8,.2,1)}
#logo.show{opacity:1;transform:none}
#logo .l1{font-size:clamp(46px,8vw,110px);font-weight:900;font-style:italic;letter-spacing:.04em;line-height:.9;color:#fff;
  text-shadow:0 0 12px #2ef,0 0 40px #2ef,0 0 80px #0af}
#logo .l1 span{color:#ff4fd8;text-shadow:0 0 12px #f4d,0 0 40px #f2c,0 0 80px #a0f;margin-left:.15em}
#logo .l2{margin-top:10px;font-size:clamp(12px,1.4vw,18px);letter-spacing:.6em;color:#bfefff;text-shadow:0 0 10px #2ef}
.panel{position:fixed;left:5vw;top:calc(6vh + clamp(46px,8vw,110px)*1.0 + 70px);width:min(400px,90vw);height:min(440px,calc(100vh - 6vh - 200px));
  min-height:300px;display:none;flex-direction:column;background:linear-gradient(160deg,rgba(10,20,40,.78),rgba(30,6,40,.72));
  border:1px solid rgba(80,230,255,.45);border-radius:14px;box-shadow:0 0 30px rgba(40,220,255,.25),inset 0 0 40px rgba(40,220,255,.06);
  backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);z-index:10}
.panel.wide{width:min(900px,92vw);height:min(640px,86vh);top:50%;left:50%;transform:translate(-50%,-50%)}
#pause,#settings,#howto{top:50%;left:50%;transform:translate(-50%,-50%);width:min(480px,92vw);height:min(560px,86vh)}
.panel.show{display:flex;animation:hbIn .28s ease-out}
@keyframes hbIn{from{translate:0 12px}to{translate:0 0}}
.ptitle{flex:0 0 52px;display:flex;align-items:center;padding:0 22px;font-weight:800;letter-spacing:.3em;font-size:18px;color:#7ff3ff;border-bottom:1px solid rgba(80,230,255,.25)}
.pbody{flex:1 1 auto;overflow-y:auto;scrollbar-gutter:stable;padding:14px 22px}
.pfoot{flex:0 0 64px;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 22px;border-top:1px solid rgba(80,230,255,.25);font-size:12px;color:#8ab}
button{font:inherit;color:#e8f6ff;background:rgba(40,80,120,.35);border:1px solid rgba(120,230,255,.5);border-radius:8px;padding:10px 18px;cursor:pointer;
  letter-spacing:.12em;font-weight:700;transition:background .15s,box-shadow .15s,border-color .15s;outline:none}
button:hover,button:focus-visible,button.focus{background:rgba(40,200,255,.3);box-shadow:0 0 16px rgba(40,220,255,.6);border-color:#7ff}
button.big{display:block;width:100%;height:56px;margin:0 0 12px;font-size:18px;text-align:left;padding-left:22px}
button.go{background:linear-gradient(90deg,#0bd,#c3c);border-color:#fff}
.sect{font-size:12px;letter-spacing:.25em;color:#7ff3ff;margin:6px 0 8px;font-weight:700}
.hint{color:#8ab;letter-spacing:.05em;font-weight:400}
.cards{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;height:176px;overflow-y:auto;align-content:start;scrollbar-gutter:stable}
.garage{display:grid;grid-template-columns:300px 1fr;gap:10px;height:176px}
#garageBox{position:relative;width:300px;height:170px;border-radius:12px;overflow:hidden;border:1px solid rgba(80,230,255,.35);background:radial-gradient(ellipse at 50% 85%,rgba(40,220,255,.18),rgba(0,0,0,.55) 70%);cursor:grab;touch-action:none}
#garageBox:active{cursor:grabbing}#garageCv{width:300px;height:170px;display:block}
#garageNm{position:absolute;left:10px;top:7px;font-weight:800;font-size:13px;letter-spacing:.06em;text-shadow:0 0 8px #000;pointer-events:none}
#garageBars{position:absolute;right:8px;top:8px;width:96px;font-size:9px;letter-spacing:.08em;pointer-events:none}#garageBars div{display:flex;align-items:center;gap:5px;height:11px}#garageBars i{display:block;height:4px;border-radius:3px;background:linear-gradient(90deg,#2ef,#f6d)}
.bcards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:83px;gap:8px;height:174px;overflow-y:auto;scrollbar-gutter:stable;overscroll-behavior:contain;padding-right:2px}
.bcard{height:83px;display:grid;grid-template-columns:76px 1fr;column-gap:8px;padding:6px 8px;border-radius:10px;border:2px solid rgba(255,255,255,.15);padding:8px 10px;cursor:pointer;background:rgba(0,0,0,.35);overflow:hidden}
.bcard.sel{border-color:#fff;box-shadow:0 0 16px #2ef}.bcard .nm{font-weight:800;font-size:14px}.bcard .th{grid-row:1/3;width:76px;height:68px;object-fit:contain;align-self:center}.bcard .bl{display:none;font-size:11px;color:#cde;margin-top:3px;line-height:1.25;height:28px;overflow:hidden}
.bcard .bars{margin-top:3px;font-size:10px;letter-spacing:.08em}.bcard .bars div{display:flex;align-items:center;gap:6px;height:12px}.bcard .bars i{display:block;height:5px;border-radius:3px;background:linear-gradient(90deg,#2ef,#f6d)}
.card{position:relative;height:112px;border-radius:10px;border:2px solid rgba(255,255,255,.15);background:rgba(0,0,0,.35);cursor:pointer;overflow:hidden;transition:border-color .15s,box-shadow .15s}
.card.sel{border-color:#fff;box-shadow:0 0 18px var(--c)}
.card .sw{position:absolute;left:0;top:0;bottom:0;width:6px;background:var(--c)}
.card .helm{position:absolute;right:10px;top:12px;width:40px;height:40px;border-radius:50% 50% 45% 45%;background:radial-gradient(circle at 35% 30%,#fff,var(--h) 45%,#223 100%);box-shadow:0 0 12px var(--c)}
.card .helm::after{content:'';position:absolute;left:8px;right:4px;top:16px;height:12px;border-radius:6px;background:linear-gradient(90deg,#012,var(--c));}
.card .nm{position:absolute;left:16px;top:12px;font-weight:800;font-size:14px;width:calc(100% - 70px)}
.card .tm{position:absolute;left:16px;top:52px;font-size:11px;color:#9bc}
.card .st{position:absolute;left:16px;bottom:10px;font-size:11px;letter-spacing:.15em;color:var(--c);font-weight:700}
.card .bio{position:absolute;inset:0;padding:10px 12px 10px 16px;font-size:11.5px;line-height:1.35;background:rgba(5,10,25,.96);opacity:0;pointer-events:none;transition:opacity .2s}
.card.flip .bio{opacity:1}
.tcards{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;height:206px;overflow-y:auto;align-content:start;scrollbar-gutter:stable}
.tcard.locked{opacity:.38;filter:grayscale(.7)}.tcard.locked .nm:after{content:' 🔒'}
.tcard{height:92px;border-radius:10px;border:2px solid rgba(255,255,255,.15);padding:10px 12px;cursor:pointer;background:linear-gradient(120deg,var(--a) -60%,rgba(0,0,0,.5) 50%,var(--b) 200%)}
.tcard.sel{border-color:#fff;box-shadow:0 0 18px var(--a)}
.tcard .nm{font-weight:800;font-size:15px}.tcard .bl{font-size:11.5px;color:#cde;margin-top:6px;line-height:1.3}
.row3{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-top:6px}
.seg{display:flex;gap:6px}.seg button{flex:1;padding:8px 0}
.seg button.sel,.opt button.sel{background:rgba(40,220,255,.45);border-color:#fff}
.info{min-height:40px;height:40px;margin-top:12px;font-size:13px;color:#bfefff;display:flex;align-items:center;overflow:hidden}
.note{font-size:12px;color:#8ab}
.bindhead,.bindrow{display:grid;grid-template-columns:1.4fr 1fr 1fr 1.2fr;gap:8px;align-items:center}
.bindhead{font-size:11px;letter-spacing:.2em;color:#7ff3ff;margin-bottom:6px}
.bindrow{height:40px;margin-bottom:4px}.bindrow .an{font-size:14px}
.bindrow button{height:34px;padding:0 6px;font-size:13px;letter-spacing:.04em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bindrow button.listen{animation:pulse 0.8s infinite;border-color:#ff4fd8;color:#ff9fe8}
@keyframes pulse{50%{box-shadow:0 0 18px #f4d}}
.setrow{display:grid;grid-template-columns:1fr 210px;align-items:center;height:48px;border-bottom:1px solid rgba(255,255,255,.06)}
.setrow .sl{font-size:14px}.setrow .sd{font-size:11px;color:#8ab}
.opt{display:flex;gap:6px}.opt button{flex:1;padding:7px 0;font-size:12px}
.tog{width:100%;height:34px}.tog.on{background:rgba(40,220,255,.45);border-color:#fff}
input[type=range]{width:100%;accent-color:#2ef}
.text p{margin-bottom:14px;line-height:1.5;font-size:14.5px}.c1{color:#5f8}.c2{color:#2ef}.c3{color:#f6d}
#resTable{width:100%;border-collapse:collapse;font-size:15px;font-variant-numeric:tabular-nums}
#resTable td,#resTable th{padding:7px 10px;text-align:left;height:38px}
#resTable th{font-size:11px;letter-spacing:.2em;color:#7ff3ff}
#resTable tr.me{background:rgba(40,220,255,.18)}
#resTable .dot{display:inline-block;width:12px;height:12px;border-radius:50%;margin-right:8px;vertical-align:middle}
#resStats{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-top:14px}
#resStats div{background:rgba(0,0,0,.3);border-radius:8px;padding:10px;font-size:11px;letter-spacing:.15em;color:#8ab}
#resStats b{display:block;font-size:20px;color:#fff;letter-spacing:0;margin-top:4px}
/* HUD */
#hud{position:fixed;inset:0;pointer-events:none;font-variant-numeric:tabular-nums;z-index:5}
#hud .lbl{font-size:10px;letter-spacing:.3em;color:#8de}
#hPos{position:absolute;left:28px;top:18px;font-size:76px;font-weight:900;font-style:italic;color:#fff;text-shadow:0 0 20px #2ef;width:220px}
#hPos sup{font-size:28px;margin-left:2px}#hPos small{font-size:22px;color:#9cd;margin-left:8px}
#hLap{position:absolute;right:28px;top:20px;text-align:right;width:190px}
#hLap div:not(.lbl){font-size:26px;font-weight:800;margin-bottom:4px}
#minimap{position:absolute;left:24px;bottom:24px;width:170px;height:170px;opacity:.9}
#hSpeed{position:absolute;left:50%;bottom:22px;transform:translateX(-50%);width:300px;text-align:center}
#hSpd{font-size:64px;font-weight:900;font-style:italic;line-height:1;text-shadow:0 0 18px #2ef}
#hUnit{font-size:12px;letter-spacing:.4em;color:#8de;margin-bottom:8px}
#eBar{height:12px;border-radius:6px;background:rgba(255,255,255,.1);border:1px solid rgba(120,230,255,.5);overflow:hidden;margin-bottom:4px}
#eBar{position:relative}#eBar:after{content:"";position:absolute;left:50%;top:0;bottom:0;width:2px;background:rgba(255,255,255,.5)}#leanDot{position:absolute;top:1px;width:10px;height:10px;margin-left:-5px;border-radius:50%;left:50%;background:#2ef;box-shadow:0 0 10px #2ef}
#hItem{position:absolute;right:28px;bottom:26px;width:140px;height:140px;border-radius:16px;border:2px solid rgba(120,230,255,.5);background:rgba(0,10,30,.5);text-align:center}
#hItemIcon{font-size:40px;font-weight:900;height:96px;line-height:96px}#hItemName{font-size:12px;letter-spacing:.2em;font-weight:800}
#toast{position:absolute;left:0;right:0;top:20%;text-align:center;font-size:30px;font-weight:900;font-style:italic;letter-spacing:.1em;height:44px;opacity:0;transition:opacity .25s;text-shadow:0 0 16px currentColor}
#toast.on{opacity:1}
#count{position:absolute;left:0;right:0;top:32%;text-align:center;font-size:160px;font-weight:900;font-style:italic;color:#fff;text-shadow:0 0 40px #2ef;height:180px}
#board{position:absolute;left:28px;top:120px;width:220px;font-size:13px}
#board div{height:22px;display:flex;align-items:center;gap:8px;opacity:.9}#board div.me{color:#2ef;font-weight:800}
#board i{width:9px;height:9px;border-radius:50%;display:inline-block}
#touch{position:fixed;inset:0;z-index:6;pointer-events:none}
#touch .tz,#touch .tb{position:absolute;pointer-events:auto;display:flex;align-items:center;justify-content:center;border:2px solid rgba(120,230,255,.4);background:rgba(0,20,40,.25);color:#cff;font-weight:800;border-radius:16px}
#tLeft{left:2vw;bottom:4vh;width:15vw;height:30vh;font-size:40px}#tRight{left:18vw;bottom:4vh;width:15vw;height:30vh;font-size:40px}
#tGas{right:3vw;bottom:5vh;width:110px;height:110px;border-radius:50%!important}

#tBrake{right:3vw;bottom:calc(5vh + 125px);width:80px;height:60px}
#tPause{right:3vw;top:3vh;width:50px;height:50px}
#touch .on{background:rgba(40,220,255,.4)}
@media (max-width:760px){.cards{grid-template-columns:repeat(2,1fr)}.tcards{grid-template-columns:1fr}.row3{grid-template-columns:1fr}
 #hPos{font-size:48px}#hSpd{font-size:44px}#minimap{display:none}#hItem{width:90px;height:90px;bottom:auto;top:110px}#hItemIcon{font-size:40px;height:60px;line-height:60px}#board{display:none}
 #hLap div:not(.lbl){font-size:18px}#resStats{grid-template-columns:repeat(2,1fr)}}
@media (max-height:520px){#count{font-size:80px;height:100px;top:22%}#hSpd{font-size:38px}#hUnit{margin-bottom:4px}#hSpeed{width:220px;bottom:10px}
 #hPos{font-size:42px;top:8px;left:16px}#hPos sup{font-size:18px}#hPos small{font-size:14px}#board{display:none}#minimap{width:100px;height:100px;left:12px;bottom:12px}
 #hItem{width:80px;height:80px;right:12px;bottom:12px;top:auto}#hItemIcon{font-size:36px;height:56px;line-height:56px}#hItemName{font-size:9px}
 #hLap{top:8px;right:16px}#hLap div:not(.lbl){font-size:16px;margin-bottom:0}#logo .l1{font-size:40px}.panel:not(.wide){top:110px;height:calc(100vh - 120px)}}
body.touch #minimap{display:none} body.touch #hItem{top:64px;bottom:auto;right:auto;left:14px;width:80px;height:80px}
body.touch #hItemIcon{font-size:36px;height:56px;line-height:56px} body.touch #hItemName{font-size:9px}
body.touch #tPause{right:auto;left:50%;transform:translateX(-50%);top:8px}
@media (max-height:520px){button.big{height:42px;font-size:15px;margin-bottom:8px}}
#zapBar{height:6px;margin:6px 16px 0;border-radius:3px;background:rgba(255,255,255,.1);overflow:hidden}
#zapFill{height:100%;background:linear-gradient(90deg,#f6d,#ff9);transform-origin:left;box-shadow:0 0 10px #f6d}
#hDraft,#hAir{position:absolute;left:50%;transform:translateX(-50%);width:200px;text-align:center;font-weight:900;font-style:italic;letter-spacing:.3em;font-size:14px;opacity:0;transition:opacity .2s}
#hDraft{bottom:162px;color:#9ff}#hAir{bottom:184px;color:#ff9fe8}
#steerBar{position:absolute;left:50%;bottom:6px;transform:translateX(-50%);width:160px;height:6px;border-radius:3px;background:rgba(255,255,255,.12)}
#steerDot{position:absolute;left:74px;top:-3px;width:12px;height:12px;border-radius:50%;background:#2ef;box-shadow:0 0 8px #2ef}
#tpHint{position:absolute;left:50%;top:12px;transform:translateX(-50%);width:440px;text-align:center;font-size:12px;color:#bfefff;background:rgba(0,10,30,.55);border-radius:12px;padding:6px 0;opacity:0;transition:opacity .3s}
@media (max-height:520px){#hDraft{bottom:90px}#hAir{bottom:108px}}

.beta{display:inline-block;margin-left:10px;padding:2px 10px;border-radius:10px;border:1px solid #ff9fe8;color:#ff9fe8;letter-spacing:.2em;font-size:.8em;text-shadow:0 0 8px #f4d}
#minimap{bottom:70px}
html.hb-playing canvas{cursor:none}
html.hb-playing #aeParentNav,html.hb-playing #aeAetherPill,html.hb-playing #aeBayPill,html.hb-playing body>[id^="ae"]{opacity:0!important;visibility:hidden!important;pointer-events:none!important}

.sect .mini,.mini{float:right;font:inherit;font-size:11px;letter-spacing:.08em;padding:3px 10px;border-radius:8px;border:1px solid rgba(80,230,255,.5);background:rgba(0,0,0,.4);color:#cff;cursor:pointer}
.mini.wide{float:none;width:100%;margin-top:8px;padding:7px}
.chgrid{display:grid;grid-template-columns:420px 1fr;gap:14px;height:440px}
#charBox{position:relative;width:420px;height:300px;border-radius:12px;overflow:hidden;border:1px solid rgba(80,230,255,.35);background:radial-gradient(ellipse at 50% 85%,rgba(40,220,255,.18),rgba(0,0,0,.55) 70%);cursor:grab;touch-action:none}
#charCv{width:420px;height:300px;display:block}#charNm{position:absolute;left:12px;top:9px;font-weight:800;font-size:16px;pointer-events:none}#charSub{position:absolute;left:12px;top:32px;font-size:11px;color:#cde;pointer-events:none}
#charList{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;height:336px;align-content:start}
.ccard{height:76px;border-radius:10px;border:2px solid rgba(255,255,255,.15);padding:6px 8px;cursor:pointer;background:rgba(0,0,0,.35);display:grid;grid-template-columns:44px 1fr;column-gap:8px;overflow:hidden}
.ccard.sel{border-color:#fff;box-shadow:0 0 16px #2ef}.ccard .cimg{grid-row:1/3;width:44px;height:44px;border-radius:50%;display:grid;place-items:center;font-size:22px;background:radial-gradient(circle,var(--c,#2ef) 0,rgba(0,0,0,.4) 70%);align-self:center}
.ccard .nm{font-weight:800;font-size:13px;align-self:end}.ccard .tm{font-size:10px;color:#cde}
/* ---------- upgrade garage (every box has a fixed size: nothing resizes or jumps when you buy, select or switch tabs) ---------- */
button.big{height:50px;margin:0 0 8px}
.sect .mini.r{float:right;margin-top:-6px}
.ptitle .bal{margin-left:auto;width:190px;text-align:right;letter-spacing:.08em;font-size:20px;color:#ffd84a;text-shadow:0 0 12px rgba(255,216,74,.6);font-variant-numeric:tabular-nums;white-space:nowrap}
.ptitle .bal small{font-size:11px;letter-spacing:.2em;color:#e8d9a0}
.upgbody{padding:12px 18px;overflow-x:hidden}
.ugrid{display:grid;grid-template-columns:380px minmax(0,1fr);gap:14px;height:352px}.uleft,.uright{min-width:0}
#upgBox{position:relative;width:380px;height:250px;border-radius:12px;overflow:hidden;border:1px solid rgba(80,230,255,.35);background:radial-gradient(ellipse at 50% 85%,rgba(40,220,255,.2),rgba(0,0,0,.55) 70%);cursor:grab;touch-action:none}
#upgCv{width:380px;height:250px;display:block}#upgNm{position:absolute;left:12px;top:9px;font-weight:800;font-size:16px;pointer-events:none}
#upgTag{position:absolute;left:12px;bottom:8px;font-size:10px;color:#9bc;letter-spacing:.08em;pointer-events:none}
.ubikes{display:grid;grid-auto-flow:column;grid-auto-columns:calc((100% - 18px)/4);gap:6px;margin-top:10px;height:92px;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;overscroll-behavior:contain;align-items:start}
.ubike{height:84px;min-width:0;padding:6px 4px;font-size:11px;letter-spacing:.04em;display:flex;flex-direction:column;justify-content:center;gap:6px;line-height:1.15}
.ubike i{font-style:normal;color:#ffd84a;font-size:11px;font-variant-numeric:tabular-nums}.ubike.sel{border-color:#fff;box-shadow:0 0 14px rgba(40,220,255,.7);background:rgba(40,160,220,.35)}
.utabs{display:grid;grid-template-columns:1fr 1fr;gap:6px;height:38px}.utabs button{padding:0;height:38px;font-size:13px}.utabs button.sel{background:linear-gradient(90deg,#0bd,#c3c);border-color:#fff}
.ulist{height:306px;margin-top:8px;display:flex;flex-direction:column;gap:5px;overflow:hidden}
.urow{flex:0 0 46px;height:46px;display:grid;grid-template-columns:30px 1fr 96px 76px;align-items:center;gap:6px;padding:0 10px;text-align:left;letter-spacing:.04em}
.urow .ui{font-size:20px}.urow .un{font-size:13px;line-height:1.1;white-space:nowrap;overflow:hidden}.urow .un small{display:block;font-size:10px;color:#9bc;font-weight:400;letter-spacing:.02em}
.urow .up{display:flex;gap:4px}.urow .up i{width:14px;height:10px;border-radius:3px;background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.2)}
.urow .up i.on{background:#2ef;box-shadow:0 0 6px #2ef;border-color:#bff}.urow .up i.nx{background:rgba(120,240,255,.35);animation:hbPip 1s ease-in-out infinite alternate}
@keyframes hbPip{to{background:rgba(120,240,255,.75)}}
.urow .uc{text-align:right;color:#ffd84a;font-variant-numeric:tabular-nums;font-size:13px}.urow .uc.poor{color:#ff8a6a}.urow.max .uc{color:#7fffb0}
.urow.sel,.uchip.sel{border-color:#fff;box-shadow:0 0 14px rgba(40,220,255,.75);background:rgba(40,160,220,.3)}
.ucat{height:74px;flex:0 0 74px}.ucl{font-size:11px;letter-spacing:.2em;color:#7ff3ff;height:16px}
.uchips{display:flex;gap:5px;height:56px;overflow-x:auto;overflow-y:hidden;scrollbar-width:none}.uchips::-webkit-scrollbar{display:none}
.uchip{position:relative;flex:0 0 59px;width:59px;height:56px;padding:4px 2px 0;display:flex;flex-direction:column;align-items:center;gap:2px;font-size:9px;letter-spacing:0;overflow:hidden}
.uchip b{width:18px;height:18px;border-radius:50%;border:2px solid rgba(255,255,255,.5);flex:0 0 18px}.uchip span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%;text-align:center;font-weight:600}
.uchip em{font-style:normal;font-size:9px;line-height:11px;height:11px;color:#ffd84a;white-space:nowrap}.uchip.eq em{color:#7fffb0}.uchip:not(.own){opacity:.85}.uchip.eq{border-color:#7fffb0}
.udet{height:120px;margin-top:12px;display:grid;grid-template-columns:1fr 230px 200px;gap:12px;padding:10px 12px;border-radius:12px;border:1px solid rgba(80,230,255,.3);background:rgba(0,0,0,.3)}
.udt{font-weight:800;font-size:15px;height:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.udd{font-size:12px;color:#cde;line-height:1.35;margin-top:6px;height:66px;overflow:hidden}
.ubl{font-size:10px;letter-spacing:.2em;color:#7ff3ff;height:14px}.ubt{position:relative;height:14px;margin:6px 0;border-radius:7px;background:rgba(255,255,255,.1);overflow:hidden}
.ubt .now{position:absolute;left:0;top:0;bottom:0;background:linear-gradient(90deg,#0bd,#2ef);box-shadow:0 0 8px #2ef;transition:width .35s}
.ubt .nxt{position:absolute;top:0;bottom:0;background:repeating-linear-gradient(45deg,rgba(120,240,255,.55) 0 5px,rgba(120,240,255,.2) 5px 10px);animation:hbPip .8s ease-in-out infinite alternate}
.ubv{font-size:11px;color:#cde;height:30px;line-height:1.3}.ubv b{color:#7fffb0}
.uda{display:flex;flex-direction:column;gap:6px}.ubuy{height:52px;width:200px;padding:0 6px;font-size:14px;letter-spacing:.06em;background:linear-gradient(90deg,#0bd,#c3c);border-color:#fff;white-space:nowrap}
.ubuy.conf{background:linear-gradient(90deg,#fa0,#f4c);animation:hbConf .5s ease-in-out infinite alternate}.ubuy.poor{background:rgba(80,30,30,.5);border-color:#f86;color:#fbb}.ubuy.done{background:rgba(30,90,60,.55);border-color:#7fffb0}
@keyframes hbConf{to{box-shadow:0 0 22px #fc6}}
.ubuy.nope{animation:hbNope .35s}@keyframes hbNope{20%{transform:translateX(-6px)}40%{transform:translateX(6px)}60%{transform:translateX(-4px)}80%{transform:translateX(3px)}}
.udn{font-size:10.5px;color:#9bc;line-height:1.3;height:40px;overflow:hidden}
.uhint{font-size:11px;color:#8ab;text-align:center;flex:1}.uhint b{color:#cde}
#resBolts{height:92px;margin-top:10px;padding:8px 12px;border-radius:10px;border:1px solid rgba(255,216,74,.35);background:rgba(40,30,0,.25);overflow:hidden}
#resBolts:empty{visibility:hidden}
.rbt{height:28px;font-size:22px;color:#ffd84a;font-weight:800;font-variant-numeric:tabular-nums}.rbt small{font-size:11px;letter-spacing:.2em;color:#e8d9a0;margin-left:8px}
.rbl{height:22px;margin-top:2px;font-size:11.5px;color:#cde;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.rbl span{margin-right:12px}.rbl b{color:#ffd84a}
.rbb{height:28px;display:flex;align-items:center;gap:10px;font-size:12px;color:#cde}.rbb b{color:#ffd84a}.rbb .mini{margin-left:auto}
/* purchase effect */
#gfx{position:fixed;inset:0;pointer-events:none;z-index:80}#gfx canvas{position:absolute;inset:0;width:100%;height:100%}
.gfx-card{position:absolute;transform:translate(-50%,-100%) scale(.6);opacity:0;min-width:220px;padding:12px 22px 14px;border-radius:14px;text-align:center;color:#fff;
  background:linear-gradient(160deg,rgba(30,24,4,.92),rgba(40,8,50,.9));border:2px solid var(--p);box-shadow:0 0 30px var(--p);transition:transform .35s cubic-bezier(.2,1.6,.4,1),opacity .3s;overflow:hidden}
.gfx-card.in{opacity:1;transform:translate(-50%,-100%) scale(1)}.gfx-card.big{min-width:280px}
.gfx-tag{display:block;font-size:11px;letter-spacing:.25em;color:var(--p)}.gfx-t{display:block;font-size:22px;margin-top:4px;text-shadow:0 0 14px var(--p)}.gfx-card.big .gfx-t{font-size:26px}
.gfx-s{display:block;font-size:12px;color:#dde;margin-top:2px}.gfx-c{display:block;margin-top:6px;font-size:15px;color:#ffd84a;font-variant-numeric:tabular-nums}.gfx-c em{font-style:normal;color:#ff9a7a;margin-left:6px}
.gfx-shine{position:absolute;inset:0}.gfx-shine:after{content:"";position:absolute;top:-50%;left:-60%;width:40%;height:200%;transform:rotate(20deg);background:linear-gradient(90deg,transparent,rgba(255,255,255,.7),transparent);animation:gfxSweep .9s .1s ease-out forwards}
@keyframes gfxSweep{to{left:130%}}
@media (prefers-reduced-motion:reduce){.gfx-card{transition:opacity .3s}.gfx-shine{display:none}.ubuy.conf,.urow .up i.nx,.ubt .nxt{animation:none}}
@media (max-width:900px){
  .ugrid{grid-template-columns:minmax(0,1fr);height:auto}
  #upgBox{width:100%;height:200px}#upgCv{width:100%;height:200px;object-fit:contain}
  .ubikes{height:64px}.ubike{height:56px;font-size:10px}
  .ulist{height:306px}.urow{grid-template-columns:26px 1fr 84px 62px;padding:0 6px}.urow .up i{width:12px}
  .uchips{overflow-x:auto;scrollbar-width:none}.uchip{flex:0 0 52px;width:52px}
  .udet{grid-template-columns:minmax(0,1fr);grid-template-rows:84px 62px 60px;gap:8px;height:250px}.udl,.udm,.uda{overflow:hidden;min-width:0}.udd{height:48px}.uda{flex-direction:row;align-items:center}.ubuy{width:170px;flex:0 0 170px}.udn{height:40px}
  .ptitle .bal{width:130px;font-size:16px}.ptitle{letter-spacing:.15em;font-size:15px}.uhint{display:none}
}

/* ---------- save slots (main menu + SAVES screen); every row is a fixed size so nothing jumps ---------- */
button.big.cont{height:62px;line-height:1.1;padding-top:6px}
.csub{display:block;margin-top:4px;font-size:11px;letter-spacing:.06em;font-weight:600;color:#eaffff;opacity:.9;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mrow{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.mrow button{height:44px;padding:0 4px;font-size:12px;letter-spacing:.06em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.slotbody{display:flex;flex-direction:column;overflow:hidden}
.snew{flex:0 0 56px;height:56px;width:100%;text-align:left;font-size:17px;padding:0 20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:linear-gradient(90deg,rgba(20,140,90,.45),rgba(40,80,120,.35));border-color:#7fffb0}
.snew small{font-size:11px;letter-spacing:.05em;font-weight:600;color:#bfe;margin-left:12px}
.slist{flex:1 1 auto;min-height:0;overflow-y:auto;scrollbar-gutter:stable;margin-top:12px;padding:2px 4px 2px 2px;display:flex;flex-direction:column;gap:8px}
.srow{flex:0 0 84px;height:84px;display:grid;grid-template-columns:minmax(0,1fr) 112px 150px;gap:8px;border-radius:10px}
.srow .smain{position:relative;height:84px;text-align:left;padding:8px 14px 8px 32px;display:flex;flex-direction:column;justify-content:center;gap:3px;overflow:hidden;letter-spacing:.04em;min-width:0}
.srow.sel .smain{border-color:#ffd84a;box-shadow:0 0 0 1px #ffd84a inset,0 0 14px rgba(255,216,74,.35)}
.srow.act .smain{background:rgba(40,120,90,.35)}
.sdot{position:absolute;left:12px;top:15px;width:11px;height:11px;border-radius:50%;box-shadow:0 0 8px currentColor}
.snm{font-size:16px;letter-spacing:.06em;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 110px);height:20px}
.sbadge{position:absolute;right:12px;top:9px;font-style:normal;font-size:10px;letter-spacing:.1em;padding:2px 8px;border-radius:6px;background:#7fffb0;color:#032}
.sst{font-size:12px;font-weight:600;color:#bfefff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;height:16px}
.slp{font-size:11px;font-weight:500;color:#8ab;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;height:15px}
.srow .sren,.srow .sdel{height:84px;padding:0 6px;font-size:12px;letter-spacing:.06em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sdel{color:#ffc2c2;border-color:rgba(255,120,120,.45)}
.sdel.d1{background:rgba(160,60,20,.5);border-color:#ffb04a;color:#fff}
.sdel.d2{background:rgba(200,20,40,.65);border-color:#fff;color:#fff;animation:sPulse .6s ease-in-out infinite alternate}
.sdel.dice{color:#e8f6ff;border-color:rgba(120,230,255,.5)}
@keyframes sPulse{to{box-shadow:0 0 18px rgba(255,60,80,.9)}}
.sren-on{background:rgba(40,80,120,.35);border:1px solid #ffd84a;border-radius:8px;cursor:default}
#slotName{height:34px;width:100%;box-sizing:border-box;font:inherit;font-size:16px;font-weight:700;letter-spacing:.05em;color:#fff;background:rgba(0,0,0,.45);border:1px solid #7ff;border-radius:6px;padding:0 10px;outline:none}
#slotName:focus{box-shadow:0 0 12px rgba(40,220,255,.6)}
#slotInfo{flex:0 0 40px}
@media (max-width:760px){
 .snew small{display:none}
 .srow{flex-basis:112px;height:112px;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:72px 32px}
 .srow .smain{grid-column:1 / 3;height:72px;padding:6px 12px 6px 30px}
 .srow .sren,.srow .sdel{height:32px;font-size:11px}
 .srow .smain{gap:2px}
 #slots .uhint{display:none}
}
@media (prefers-reduced-motion:reduce){.sdel.d2{animation:none}}
.sdel.rp{color:#ffe7a0;border-color:#ffb04a}
.snew.rep{background:rgba(160,60,20,.45);border-color:#ffb04a}
.ptitle .psave{margin-left:auto;width:200px;height:32px;padding:0 10px;font-size:12px;letter-spacing:.06em;text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:rgba(0,0,0,.25)}
@media (max-width:760px){.ptitle .psave{width:130px}}

/* future bikes: locked cards keep their exact size */
.bcard.lock .th{filter:grayscale(.7) brightness(.7)}.bcard.lock .nm{color:#cde}
.bcard .lkt{margin-top:6px;font-size:11px;line-height:1.3;color:#ffd84a;height:30px;overflow:hidden}
.ubike.lock{background:rgba(20,30,50,.5);color:#bcd}.ubike.lock i{color:#ffb070}
.ubike span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
@media (max-width:760px){.garage{grid-template-columns:minmax(0,1fr);height:354px;justify-items:center}.garage .bcards{width:100%}}
@media (max-width:520px){.bcards{grid-template-columns:minmax(0,1fr)}}

/* Polish 2026-11-03: readable panels, native touch scrolling and deliberate focus. */
[hidden]{display:none!important}
html,body{touch-action:manipulation}
#app canvas,#touch,#garageBox,#charBox,#upgBox{touch-action:none}
.panel{min-height:0;max-height:calc(100dvh - 100px);background:linear-gradient(145deg,rgba(8,22,42,.96),rgba(27,10,36,.95))}
.pbody{min-height:0;overscroll-behavior:contain;touch-action:pan-x pan-y;-webkit-overflow-scrolling:touch}
.cards,.tcards,.bcards,.slist{touch-action:pan-y;overscroll-behavior:contain}
.ulist{touch-action:pan-x pan-y;overscroll-behavior:contain}
.ubikes,.uchips{touch-action:pan-x}
#hbBack{position:fixed;z-index:30;left:max(12px,env(safe-area-inset-left));top:max(8px,env(safe-area-inset-top));min-height:44px;display:inline-flex;align-items:center;padding:0 14px;border-radius:10px;border:1px solid #537c96;background:#071728;color:#d5f5ff;text-decoration:none;font-weight:700;font-size:14px}
body:has(#aeParentNav) #hbBack{left:calc(max(12px,env(safe-area-inset-left)) + 52px)} /* sit beside the shared top-left corner mark */
button,.mini,.sect .mini,.tog,.bindrow button,.ptitle .psave{min-height:44px;min-width:44px}
button:active{transform:translateY(1px);filter:brightness(1.2)}
button:disabled{opacity:.55;cursor:default;transform:none}
button:focus-visible,a:focus-visible,[role=button]:focus-visible,input:focus-visible{outline:3px solid #ffdc82;outline-offset:3px}
.ptitle:focus{outline:none}
.card.sel::after,.bcard.sel::after,.tcard.sel::after,.ccard.sel::after{content:'✓';position:absolute;right:5px;top:3px;background:#d5faff;color:#032434;border-radius:50%;width:19px;height:19px;text-align:center;font-weight:900;font-size:13px;pointer-events:none}
.bcard,.tcard,.ccard{position:relative}
.bcard .nm,.tcard .nm,.ccard .nm{padding-right:17px}
.sect{min-height:44px;display:flex;align-items:center;gap:8px;flex-wrap:wrap;letter-spacing:.16em}
.sect .mini,.sect .mini.r{float:none;margin:0 0 0 auto;display:inline-flex;align-items:center}
.pfoot{flex-shrink:0;gap:10px;padding:8px 18px;min-height:64px}
.info{height:auto;min-height:44px;overflow:visible;line-height:1.45;padding:8px 0;display:block}
#slotInfo{flex:0 0 auto;max-height:100px;overflow:auto}
.bindrow{height:auto;min-height:48px}.bindrow button{height:44px}
.setrow{height:auto;min-height:62px;gap:12px;padding:8px 0}
.setrow .sd{line-height:1.4;color:#a9c1d3}
.setrow>div{min-width:0}
input[type=range]{min-height:44px;touch-action:pan-x}
.range-value{display:block;min-height:16px;text-align:right;color:#d4f8ff;font-size:12px;font-variant-numeric:tabular-nums}
.race-intro{font-size:14px;color:#bce5f5;line-height:1.5;margin:0 0 12px}
#loadError{padding:12px;margin-bottom:14px;border:1px solid #f2bd73;background:#322412;border-radius:10px;color:#ffe3bb;font-size:13px;line-height:1.45}
#loadError p{margin:6px 0 10px}
#loading{height:auto;min-height:78px;width:min(440px,calc(100vw - 24px));left:50%;bottom:max(12px,env(safe-area-inset-bottom));margin-left:0;transform:translateX(-50%);font-size:12px;letter-spacing:.05em;background:#071728}
#loading p{margin-top:8px;font-size:12px;text-transform:none;letter-spacing:0;color:#b5ccdc}
[data-unavailable=true]::after{content:'3D preview unavailable · try loading again';position:absolute;inset:40% 12px auto;padding:14px;background:#071728ed;border:1px solid #55758c;border-radius:8px;color:#cbe4f3;text-align:center;font-size:13px;pointer-events:none}
#resTable{font-size:14px}#resTable th,#resTable td{padding:8px 6px}
#logo{top:max(64px,8vh)}
#logo .l2{letter-spacing:.25em}
#menu{top:calc(max(64px,8vh) + clamp(46px,8vw,110px) + 64px);height:min(470px,calc(100dvh - max(64px,8vh) - clamp(46px,8vw,110px) - 84px))}
@media(max-width:760px){
 .panel.wide,#pause,#settings,#howto,#lab{top:58px!important;left:3vw!important;transform:none!important;width:94vw!important;height:calc(100dvh - 126px)!important;max-height:calc(100dvh - 126px)}
 .pbody{padding:12px 14px}.ptitle{padding:8px 14px;letter-spacing:.1em;min-height:56px;flex-basis:auto;flex-wrap:wrap;gap:8px}
 .chgrid{grid-template-columns:minmax(0,1fr);height:auto}
 #charBox{width:100%;height:240px}#charCv{width:100%;height:240px;object-fit:contain}
 #charList{height:auto;grid-template-columns:repeat(2,minmax(0,1fr));margin-bottom:12px}
 #garageBox,#garageCv{max-width:100%;width:100%;object-fit:contain}
 .setrow{grid-template-columns:minmax(0,1fr);gap:4px}.setrow .opt{min-width:0}
 .setrow .opt button{min-width:44px;letter-spacing:0}
 .bindhead,.bindrow{grid-template-columns:minmax(90px,1.2fr) repeat(3,minmax(44px,1fr));gap:5px}
 .bindrow .an{font-size:12px}.bindhead{font-size:9px;letter-spacing:0}.bindrow button{font-size:12px}
 .srow{flex-basis:132px;height:132px;grid-template-rows:80px 44px}.srow .smain{height:80px}.srow .sren,.srow .sdel{height:44px}
 .snew{font-size:15px;padding:0 12px}.snm{max-width:calc(100% - 90px)}
 .ptitle .psave{width:auto;max-width:160px;text-align:center;font-size:11px}
 .ptitle .bal{width:auto;font-size:16px}.ptitle .bal small{font-size:10px}
 .udet{height:auto;grid-template-rows:auto auto auto}.udd,.udn{height:auto;overflow:visible}.uda{flex-wrap:wrap;gap:8px}.udl,.udm,.uda{overflow:visible}
 .upgbody{overflow-x:hidden}.urow{grid-template-columns:24px minmax(0,1fr) 68px 58px}.urow .up i{width:10px}.un{font-size:12px}
 #resTable th:nth-child(3),#resTable td:nth-child(3){display:none}#resTable{font-size:12px}
 #resStats{gap:6px}#resStats b{font-size:18px}
 #tLeft,#tRight{bottom:76px;height:100px;width:64px;font-size:28px}#tLeft{left:12px}#tRight{left:84px}
 #tGas{bottom:76px;right:12px;width:82px;height:82px}#tBrake{bottom:174px;right:12px;width:82px;height:52px}
 body.touch #hSpeed{width:140px;bottom:192px}body.touch #hSpd{font-size:38px}body.touch #steerBar{bottom:180px}
 body.touch #hAir,body.touch #hDraft{bottom:270px;font-size:11px}body.touch #hAir{bottom:288px}
 #toast{font-size:20px;height:auto;padding:0 12px}
}
@media(max-width:520px){
 #logo{left:5vw;top:66px}#logo .l1{font-size:clamp(34px,9vw,46px)}#logo .l2{font-size:10px;letter-spacing:.14em;line-height:1.8}.beta{margin-left:4px;padding:2px 6px}
 #menu{top:160px;left:4vw;width:92vw;height:calc(100dvh - 234px);max-height:calc(100dvh - 234px)}
 .pfoot{padding:8px 12px}.pfoot button{padding:8px 12px;font-size:12px;letter-spacing:.06em}
 .sect .hint{display:none}.cards{height:234px}.row3{gap:8px}
 .garage{height:354px}.ccard{grid-template-columns:34px 1fr;padding:5px;gap:5px}.ccard .cimg{width:34px;height:34px;font-size:20px}
}
@media(max-height:520px){
 #logo{display:none}
 .panel,.panel.wide,#menu,#pause,#settings,#howto,#lab{top:56px!important;left:3vw!important;transform:none!important;width:94vw!important;height:calc(100dvh - 124px)!important;max-height:calc(100dvh - 124px);min-height:0}
 .ptitle{min-height:44px;flex-basis:44px}.pfoot{min-height:60px;flex-basis:60px}
 #menu .pbody{padding-top:8px}#menu .pfoot{display:none}
 #hSpeed{bottom:74px}body.touch #hSpeed{bottom:74px}body.touch #steerBar{bottom:64px}
 #tLeft,#tRight{bottom:72px;height:76px}#tGas{bottom:72px;width:76px;height:76px}#tBrake{bottom:158px;height:44px}
}
@media(prefers-reduced-motion:reduce){
 *,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
 button:active{transform:none}
}
/* The Physics Lab adds its own styles at runtime, so these responsive rules use explicit precedence. */
#lab .lrow{min-height:52px;height:auto!important;padding:5px 0}
#lab .lrow .sd{white-space:normal!important;line-height:1.4}
#labInfo{height:auto!important;max-height:70px;overflow:auto!important;font-size:12px;line-height:1.35}
@media(max-width:760px){
 #lab .pbody{grid-template-columns:minmax(0,1fr)!important;overflow-y:auto!important;padding:12px 14px!important}
 #lab .lrow{grid-template-columns:minmax(0,1fr) 64px!important}.lrow input{grid-column:1/-1}
 #labList{overflow:visible!important}#labRO{height:auto!important;white-space:pre-wrap}
 #lab .lpre{flex-wrap:wrap}#lab .lpre button{flex:1 1 44%!important}
 #lab .pfoot{flex-wrap:wrap;flex-basis:auto}#labInfo{order:2;flex-basis:100%!important}
}
#upgCancel{min-width:100px;color:#d6e6f0;border-color:#7594ac;background:#152537}
.uda:has(#upgCancel){flex-wrap:wrap;gap:8px}
.uda:has(#upgCancel) .udn{flex-basis:100%}

/* Round 4: generous controls, readable choices, and tablet portrait garage. */
.utabs{height:44px}.utabs button{height:44px}
.seg{flex-wrap:wrap}.seg button{min-width:44px;flex:1 0 44px}
.mrow button{height:auto;min-height:44px;white-space:normal;overflow:visible;text-overflow:clip;line-height:1.3;padding:8px 4px}
.urow{min-height:58px;height:auto;flex-basis:auto;padding:8px;grid-template-columns:24px minmax(0,1fr) 68px 58px}
.urow .un{white-space:normal;overflow:visible;overflow-wrap:anywhere}
.urow .up{gap:3px}.urow .up i{width:10px;flex-shrink:0}
.ulist{overflow-y:auto}
.tcard.locked{opacity:1;filter:none;background:#111c2c;border-style:dashed}.tcard.locked .bl{color:#cbdbe8}
button.go,.ubuy,.utabs button.sel{background:linear-gradient(90deg,#075264,#58205c);color:#fff}
.ubuy.conf{background:linear-gradient(90deg,#674000,#692446)}
#touch .tz,#touch .tb{background:rgba(0,20,40,.88);padding:0;letter-spacing:0}
#btnQuickRace .csub{font-size:11px;letter-spacing:.02em}
@media(max-width:900px){
 .ugrid{grid-template-columns:minmax(0,1fr);height:auto}.uright{min-width:0}
 /* Keep the existing bike selector accessible when the preview column stacks. */
 .uleft{display:block}#upgBox,#upgCv{max-width:100%;width:100%;height:200px;object-fit:contain}
 .udet{height:auto;grid-template-columns:minmax(0,1fr);grid-template-rows:auto;gap:10px}
 .udl,.udm,.uda,.udd,.udn{height:auto;overflow:visible;min-width:0}
 .uda{flex-direction:row;flex-wrap:wrap;align-items:center}.udn{flex-basis:100%}
 .ulist{height:306px}.utabs{margin-top:12px}
}
@media(max-width:520px){
 .cards{grid-template-columns:repeat(2,minmax(0,1fr))}.card .nm{font-size:13px}
 .tcards{grid-template-columns:minmax(0,1fr)}.tcard{height:auto;min-height:92px}
 button.big{height:auto;min-height:56px;padding:10px 14px;white-space:normal}
 .ptitle{font-size:16px}.ubuy{max-width:100%}
}
