*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;height:100%;overflow:hidden;background:#06030d;color:#e9e6ff;font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;overscroll-behavior:none;touch-action:none;user-select:none;-webkit-user-select:none}
#c{position:absolute;left:0;top:0;width:100%!important;height:100%!important;display:block}
.hidden{display:none!important}
body:not(.touch) .touch-only{display:none!important}
body.touch .desk-only{display:none!important}
button{font:inherit;color:inherit;cursor:pointer}
#preview-pill{position:fixed;top:max(6px,var(--st));left:50%;transform:translateX(-50%);z-index:35;background:rgba(255,196,0,.92);color:#1a1200;font-weight:800;font-size:11px;letter-spacing:.08em;padding:4px 10px;border-radius:999px;pointer-events:none;text-transform:uppercase}
#hud{position:fixed;inset:0;pointer-events:none;z-index:10}
#hud button,#hud input,#hud canvas{pointer-events:auto}
#hud-tl{position:absolute;top:max(10px,var(--st));left:max(12px,var(--sl));font-variant-numeric:tabular-nums;text-shadow:0 1px 6px #000}
#mode{font-size:11px;letter-spacing:.14em;color:#8ff3ea;font-weight:700}
#speed{font-size:30px;font-weight:800;line-height:1.05}
#speed .unit{font-size:12px;margin-left:4px;color:#b9a8ff;font-weight:600}
#speed-bar,#fuel-bar{width:150px;height:4px;background:rgba(255,255,255,.12);border-radius:3px;overflow:hidden;margin-top:3px}
#speed-bar i,#fuel-bar i{display:block;height:100%;width:0;background:linear-gradient(90deg,#2de1d3,#a66bff)}
#fuel{margin-top:8px;font-size:10px;letter-spacing:.12em;color:#ffd27a}
#hud-tr{position:absolute;top:max(10px,var(--st));right:max(12px,var(--sr));display:flex;flex-direction:column;align-items:flex-end;gap:8px}
.btns{display:flex;gap:6px;margin-top:18px}
.btns button{background:rgba(20,12,40,.6);border:1px solid rgba(166,107,255,.45);border-radius:8px;padding:5px 9px;font-size:12px;backdrop-filter:blur(4px)}
#minimap{width:150px;height:150px;border-radius:50%;background:rgba(8,5,20,.55);border:1px solid rgba(45,225,211,.45);box-shadow:0 0 18px rgba(45,225,211,.15)}
#prompt{position:absolute;left:50%;bottom:92px;transform:translateX(-50%);background:rgba(15,8,32,.78);border:1px solid #2de1d3;color:#dffcf8;padding:8px 14px;border-radius:10px;font-weight:700;font-size:14px;white-space:nowrap;box-shadow:0 0 20px rgba(45,225,211,.25)}
#reticle{position:absolute;left:50%;top:50%;width:18px;height:18px;margin:-9px 0 0 -9px;border:1.5px solid rgba(143,243,234,.55);border-radius:50%}
body.touch #reticle,body.on-foot #reticle{display:none}
#timebar{position:absolute;left:50%;transform:translateX(-50%);bottom:max(12px,var(--sb));display:flex;align-items:center;gap:8px;background:rgba(15,8,32,.6);border:1px solid rgba(166,107,255,.4);padding:5px 10px;border-radius:999px;backdrop-filter:blur(4px)}
#timebar .tlabel{font-size:10px;font-weight:800;letter-spacing:.12em;color:#c9b5ff}
#t-play{background:none;border:0;color:#8ff3ea;font-size:13px;padding:0 2px;width:18px}
#t-slider{width:min(calc(var(--appw, 100vw) * .32),260px);accent-color:#a66bff}
#t-read{font-size:11px;min-width:150px;color:#e9e6ff;font-variant-numeric:tabular-nums}
#keys{position:absolute;left:max(12px,var(--sl));bottom:14px;font-size:11px;color:#e9e6ff;background:rgba(15,8,32,.62);border:1px solid rgba(166,107,255,.3);padding:4px 9px;border-radius:999px;max-width:min(30vw,420px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#joy{position:absolute;left:max(22px,var(--sl));bottom:max(22px,var(--sb));width:120px;height:120px;border-radius:50%;background:rgba(20,12,40,.35);border:2px solid rgba(143,243,234,.35);pointer-events:auto;touch-action:none}
#joy-knob{position:absolute;left:50%;top:50%;width:52px;height:52px;margin:-26px 0 0 -26px;border-radius:50%;background:radial-gradient(circle at 35% 35%,#8ff3ea,#2a8f9a);opacity:.8}
#tbtns{position:absolute;right:max(22px,var(--sr));bottom:max(22px,var(--sb));display:flex;gap:12px;align-items:flex-end}
#tbtns button{pointer-events:auto;touch-action:none;width:74px;height:74px;border-radius:50%;font-weight:800;font-size:12px;letter-spacing:.06em;border:2px solid rgba(255,255,255,.35);background:rgba(166,107,255,.35)}
#tbtns #b-action{width:62px;height:62px;background:rgba(45,225,211,.3);margin-bottom:40px}
#tbtns button.on{background:rgba(166,107,255,.75)}
#toast{position:absolute;left:50%;top:22%;transform:translateX(-50%);background:rgba(15,8,32,.85);border:1px solid #a66bff;padding:8px 14px;border-radius:10px;font-size:13px}
body.touch #minimap{width:104px;height:104px}
.overlay{position:fixed;inset:0;z-index:40;display:flex;align-items:center;justify-content:center;background:rgba(4,2,10,.55);backdrop-filter:blur(3px);padding:16px}
.card{background:linear-gradient(160deg,rgba(32,16,64,.95),rgba(10,24,38,.95));border:1px solid rgba(166,107,255,.55);border-radius:16px;padding:18px 22px;max-width:520px;width:100%;max-height:100%;overflow:auto;box-shadow:0 10px 60px rgba(0,0,0,.6),0 0 40px rgba(166,107,255,.18)}
.card h2{margin:2px 0 6px;font-size:20px}
.card h3{margin:10px 0 2px;font-size:13px;color:#8ff3ea;letter-spacing:.06em;text-transform:uppercase}
.card p{margin:6px 0;font-size:14px;line-height:1.45;color:#ddd8f5}
.card .sub{color:#c9b5ff;margin-top:0}
.kicker{font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:#ffd27a;font-weight:700}
.soon{margin:12px 0;padding:10px 12px;border-radius:10px;background:rgba(45,225,211,.12);border:1px dashed rgba(45,225,211,.6);font-size:13px;line-height:1.4}
.close,#launch{margin-top:10px;background:linear-gradient(90deg,#7b3fe4,#2bb7ad);border:0;border-radius:10px;padding:10px 18px;font-weight:800;color:#fff;font-size:15px}
#launch[disabled]{opacity:.6;cursor:wait}
.start-card{text-align:center;background:linear-gradient(160deg,rgba(32,16,64,.85),rgba(10,24,38,.85))}
.start-card h1{margin:6px 0;font-size:30px;line-height:1.05}
.start-card h1 span{background:linear-gradient(90deg,#c9a6ff,#7ff5ea);-webkit-background-clip:text;background-clip:text;color:transparent}
#start{background:radial-gradient(ellipse at center,rgba(6,3,13,.2),rgba(6,3,13,.75))}
#load-bar{height:3px;background:rgba(255,255,255,.1);border-radius:2px;margin:10px auto 0;width:70%;overflow:hidden}
#load-bar i{display:block;height:100%;width:0;background:#8ff3ea;transition:width .2s}
.small{font-size:12px!important;color:#b9b0dd!important}
.tiny{font-size:11px!important;color:#9a90c0!important}
.qlist{list-style:none;padding:0;margin:8px 0}
.qlist li{padding:8px 10px;border-radius:8px;margin-bottom:6px;background:rgba(255,255,255,.05);display:flex;flex-direction:column;font-size:13px}
.qlist li span{color:#bdb4e0;font-size:12px;margin-top:2px}
.qlist li.open b{color:#ffd27a}
.qlist li.locked{opacity:.6}
.credits-card ul{padding-left:18px;margin:6px 0}
.credits-card li{font-size:12.5px;line-height:1.4;margin-bottom:6px;color:#ddd8f5}
#rotate{z-index:60;background:#06030d;text-align:center}
.rot-inner h2{margin:18px 0 6px}
.rot-inner p{color:#b9b0dd;margin:0}
.phone-icon{width:56px;height:96px;border:3px solid #8ff3ea;border-radius:12px;margin:0 auto;position:relative;animation:rot 2.2s ease-in-out infinite}
.phone-icon div{position:absolute;bottom:6px;left:50%;width:12px;height:3px;margin-left:-6px;background:#8ff3ea;border-radius:2px}
@keyframes rot{0%,20%{transform:rotate(0)}55%,80%{transform:rotate(-90deg)}100%{transform:rotate(0)}}
@media (max-height:430px){.card{padding:12px 16px}.card p{font-size:12.5px;margin:4px 0}.card h2{font-size:17px}.start-card h1{font-size:22px}.soon{margin:8px 0;font-size:12px}}

#brand{font-size:10px;letter-spacing:.32em;font-weight:800;background:linear-gradient(90deg,#c9a6ff,#7ff5ea);-webkit-background-clip:text;background-clip:text;color:transparent;margin-bottom:2px}
.byline{font-size:12px;letter-spacing:.18em;text-transform:uppercase;color:#ffd27a;margin:-2px 0 6px}

#rotate-ok{margin-top:18px;padding:10px 22px;border-radius:999px;border:1px solid #8ff3ea;background:rgba(143,243,234,.12);color:#e8fffc;font:inherit;font-weight:700;letter-spacing:.06em;cursor:pointer}
.rot-inner .small{font-size:12.5px;margin-top:10px;color:#9a90c0}

/* BH-05: soft dark backing so the top-left HUD stays readable against glare */
#hud-tl{background:radial-gradient(ellipse at 20% 30%,rgba(4,2,12,.55),rgba(4,2,12,0) 70%);padding:6px 18px 10px 8px;margin:0;border-radius:12px;top:max(4px,var(--st));left:max(4px,var(--sl))}

/* BH-09: touch targets at least 44x44 */
body.touch .btns button{min-width:44px;min-height:44px;padding:6px 10px}

/* BH-12: every touch target gets a 44x44 hit area */
body.touch #t-play{min-width:44px;min-height:44px;width:44px;padding:0;margin:-8px -4px -8px -8px;font-size:15px}
body.touch #t-slider{height:44px;margin:-10px 0;padding:0;touch-action:none;cursor:pointer}
body.touch #t-slider::-webkit-slider-thumb{width:26px;height:26px}
body.touch #t-slider::-moz-range-thumb{width:26px;height:26px}
#launch,.card button.close,.card .close{min-height:44px;min-width:44px}
body.touch #launch{min-width:180px;min-height:48px}
body.touch .card button.close{min-width:96px}
/* BH-11: keep the key hint clear of the time bar */
#keys{max-width:calc(var(--appw, 100vw) * .5 - 230px)}
/* BH-13: time label never wraps; desktop key hint sits above the time bar (left), so it can never overlap it at any width */
#timebar .tlabel{white-space:nowrap}
#t-read{white-space:nowrap}
#keys{bottom:calc(max(12px,var(--sb)) + 48px);max-width:calc(var(--appw, 100vw) - 24px)}

#rotate{display:none!important}

/* BH-18: safe areas follow the rotation. #app is turned 90deg clockwise when forced, so the game's
   left edge is the phone's top, its right edge the phone's bottom (home indicator), its top the
   phone's right and its bottom the phone's left. */
body{--st:min(env(safe-area-inset-top,0px),60px);--sr:min(env(safe-area-inset-right,0px),60px);--sb:min(env(safe-area-inset-bottom,0px),60px);--sl:min(env(safe-area-inset-left,0px),60px)}
body.forced{--st:min(env(safe-area-inset-right,0px),60px);--sr:min(env(safe-area-inset-bottom,0px),60px);--sb:min(env(safe-area-inset-left,0px),60px);--sl:min(env(safe-area-inset-top,0px),60px)}
.overlay{padding:max(16px,var(--st)) max(16px,var(--sr)) max(16px,var(--sb)) max(16px,var(--sl))}
.card .close{position:sticky;bottom:0;box-shadow:0 -6px 14px rgba(10,14,30,.85)}
/* BH-17: the readout has a fixed width, so the slider never moves under the finger */
#t-read{display:inline-block;width:230px;min-width:230px;max-width:230px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-variant-numeric:tabular-nums;text-align:left}
/* joystick: always on top of the canvas and the HUD, with a high-contrast base ring */
#joy{z-index:30;background:rgba(10,6,24,.5);border:3px solid rgba(143,243,234,.9);box-shadow:0 0 0 2px rgba(0,0,0,.6),0 0 16px rgba(143,243,234,.45),inset 0 0 18px rgba(143,243,234,.18)}
#joy-knob{opacity:.95;box-shadow:0 0 0 2px rgba(0,0,0,.45)}
#tbtns{z-index:30}

/* tridents: ammo counter and the touch FIRE button */
#tri{display:flex;align-items:center;gap:5px;margin-top:6px;font-size:16px;font-weight:800;color:#ffd27a;line-height:1}
#tri svg{width:18px;height:18px;filter:drop-shadow(0 0 4px rgba(255,200,90,.8))}
#tri .unit{font-size:10px;letter-spacing:.12em;color:#c9b5ff;font-weight:700}
#tri.empty{color:#ff8a8a}
#tbtns{position:absolute}
#tbtns #b-fire{width:62px;height:62px;margin-bottom:6px;background:rgba(255,190,70,.32);border-color:rgba(255,215,130,.6);color:#fff3d6}
#tbtns #b-fire.on{background:rgba(255,190,70,.75)}

/* ---------- the one landscape layout ----------
   #app is the whole game. JS places it on the visible part of the page and, on an upright touch
   screen, turns it 90 degrees clockwise. Every rule below is the same in both cases. */
#app{position:fixed;left:0;top:0;width:100vw;height:100vh;overflow:hidden;transform-origin:0 0}
html,body{position:fixed;inset:0;width:100%;height:100%}
.rot-tip{display:none}
body.touch .rot-tip{display:block;color:#ffd27a!important}
/* touch: time bar along the TOP edge, under the preview pill, away from the joystick and the buttons */
body.touch #timebar{top:calc(max(6px,var(--st)) + 26px);bottom:auto;left:50%;transform:translateX(-50%);gap:4px;padding:2px 10px}
body.touch #timebar .tlabel{display:none}
body.touch #t-slider{width:calc(var(--appw, 844px) * .10)}
body.touch #t-read{width:122px;min-width:122px;max-width:122px;font-size:9px;line-height:1.15;white-space:pre-line;text-overflow:clip}
body.touch #prompt{bottom:auto;top:calc(max(6px,var(--st)) + 80px)}
body.touch #toast{top:34%}
/* touch: joystick low in the bottom-left corner, a bit smaller, so it never sits on the ship (framed centre) */
body.touch #joy{left:max(16px,var(--sl));bottom:max(14px,var(--sb));width:112px;height:112px}
body.touch #tbtns{right:max(16px,var(--sr));bottom:max(14px,var(--sb))}
/* mode label: full text, never runs under the time bar */
#mode{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(var(--appw, 844px) * .5 - 165px)}
/* compact cards on short (phone) games */
body.touch .card{padding:12px 16px;overscroll-behavior:contain;touch-action:none}
body.touch .card p{font-size:12.5px;margin:4px 0}
body.touch .card h2{font-size:17px}
body.touch .start-card h1{font-size:22px}
body.touch .soon{margin:8px 0;font-size:12px}
body.touch #mode{letter-spacing:.06em;max-width:170px}
body.touch #hud-tl{padding-right:6px}
/* narrow touch games (< 640 px wide, e.g. a tall browser toolbar): compact pill and HUD, time bar behind a clock button */
#t-clock{display:none}
body.touch.narrow #t-clock{display:block;position:absolute;left:50%;transform:translateX(-50%);bottom:max(14px,var(--sb));width:44px;height:44px;border-radius:50%;border:1px solid rgba(166,107,255,.55);background:rgba(15,8,32,.6);color:#c9b5ff;font-size:20px;line-height:1;padding:0;pointer-events:auto;touch-action:none}
body.touch.narrow.time-open #t-clock{background:rgba(166,107,255,.55);color:#fff}
body.touch.narrow #timebar{display:none}
body.touch.narrow.time-open #timebar{display:flex;top:auto;bottom:calc(max(14px,var(--sb)) + 96px);z-index:31}
body.touch.narrow #preview-pill{font-size:9px;padding:3px 8px;letter-spacing:.04em}
body.touch.narrow #speed-bar,body.touch.narrow #fuel-bar{width:120px}
body.touch.narrow #mode{max-width:150px}

/* BH-22 (Grok iOS app): nothing may overflow sideways, and cards fit inside the game */
html,body{overflow:hidden!important;max-width:100%;overscroll-behavior:none;touch-action:none}
#app{contain:layout paint;max-width:none}
.overlay{box-sizing:border-box;max-width:100%;max-height:100%;overflow:hidden}
.card{box-sizing:border-box;max-width:min(520px,100%);max-height:100%;overflow-x:hidden;overflow-y:auto;overflow-wrap:anywhere;word-break:normal}
.card *{max-width:100%;box-sizing:border-box}
.card ul{padding-left:18px}

/* Loading screen: the zodiac wheel turns around a still, glowing trident (-90deg per 8 s, so one turn every 32 s) */
#loader{position:absolute;inset:0;z-index:60;pointer-events:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;background:#05040c;transition:opacity .6s ease}
#loader.done{opacity:0;pointer-events:none}
#loader.gone{display:none}
.ld-logo{position:relative;width:min(calc(var(--apph,100vh)*.78),calc(var(--appw,100vw)*.6),720px);aspect-ratio:1/1}
.ld-logo img{display:block;user-select:none;-webkit-user-drag:none;pointer-events:none}
.ld-bg{width:100%;height:100%;border-radius:6px}
.ld-l{position:absolute;left:15.556%;top:14.583%;width:68.611%;height:68.611%}
.ld-ring{animation:ldspin 10.667s linear infinite;will-change:transform}
.ld-glow{animation:ldpulse 4s ease-in-out infinite;mix-blend-mode:screen}
@keyframes ldspin{from{transform:rotate(0deg)}to{transform:rotate(-360deg)}}
@keyframes ldpulse{0%,100%{opacity:.15}50%{opacity:1}}
#ld-bar{width:min(260px,40%);height:3px;border-radius:3px;background:rgba(255,255,255,.12);overflow:hidden}
#ld-bar i{display:block;height:100%;width:0;background:linear-gradient(90deg,#d8b45a,#5be38a);transition:width .25s}
.ld-t{font-size:12px;letter-spacing:.14em;text-transform:uppercase;color:#d8c48a}
@media (prefers-reduced-motion:reduce){.ld-ring{animation-duration:32s}.ld-glow{animation:none;opacity:.6}}

/* health and power bars (both modes): gold and green with glow; READY glow when power is full */
#vit{margin-top:6px;display:flex;flex-direction:column;gap:4px}
#vit .vrow{display:flex;align-items:center;gap:6px;font-size:9px;letter-spacing:.12em;font-weight:800;line-height:1}
#vit .vl{width:44px;color:#c9b5ff}
#vit .vbar{width:110px;height:6px;border-radius:4px;background:rgba(255,255,255,.12);overflow:hidden;box-shadow:inset 0 0 0 1px rgba(255,255,255,.08)}
#vit .vbar i{display:block;height:100%;width:0;transition:width .2s}
#hp-bar i{width:100%;background:linear-gradient(90deg,#2fbf6a,#5be38a,#b6ff7a);box-shadow:0 0 8px rgba(91,227,138,.85)}
#pw-bar i{background:linear-gradient(90deg,#b8862f,#d8b45a,#ffe08a);box-shadow:0 0 8px rgba(255,210,122,.8)}
#vit b{min-width:34px;font-size:10px;color:#e9e6ff;font-variant-numeric:tabular-nums}
#vit .hp b{color:#8ff5b0}#vit .pw b{color:#ffd27a}
#vit.low #hp-bar i{background:linear-gradient(90deg,#c0392b,#ff6b5b);box-shadow:0 0 8px rgba(255,90,80,.9)}
#vit.low .hp b{color:#ff8a8a}
#vit.hurt .hp{animation:vhurt .45s ease-out}
@keyframes vhurt{0%{filter:brightness(2.2) drop-shadow(0 0 6px #ff5b5b)}100%{filter:none}}
#vit.ready #pw-bar{box-shadow:0 0 10px 2px rgba(255,214,110,.9);animation:vready 1.1s ease-in-out infinite}
#vit.ready .pw b{text-shadow:0 0 8px #ffd27a}
@keyframes vready{0%,100%{box-shadow:0 0 6px 1px rgba(255,214,110,.6)}50%{box-shadow:0 0 14px 4px rgba(255,230,140,1)}}
body.touch.narrow #vit .vbar{width:84px}body.touch.narrow #vit .vl{width:40px}body.touch.narrow #vit{gap:3px;margin-top:4px}

/* pickup popup */
#pickpop{position:absolute;left:50%;top:30%;transform:translate(-50%,0) scale(.8);opacity:0;pointer-events:none;font-weight:900;font-size:22px;letter-spacing:.08em;color:#ffd27a;text-shadow:0 0 10px rgba(255,200,90,.9),0 2px 0 rgba(10,8,30,.9);white-space:nowrap;z-index:25}
#pickpop.show{animation:pkpop 1.3s ease-out forwards}
#pickpop.hp{color:#ffc4d8;text-shadow:0 0 12px rgba(255,140,180,.95),0 2px 0 rgba(10,8,30,.9)}
#pickpop.pw{color:#f1f3ff;text-shadow:0 0 12px rgba(230,215,160,.95),0 2px 0 rgba(10,8,30,.9)}
#pickpop.full{color:#34c871;font-size:26px;text-shadow:0 0 16px rgba(52,200,113,1),0 0 30px rgba(52,200,113,.7),0 2px 0 rgba(10,8,30,.9)}
#pickpop.loot{color:#e6c7ff;text-shadow:0 0 14px rgba(166,107,255,.95),0 2px 0 rgba(10,8,30,.9)}
@keyframes pkpop{0%{opacity:0;transform:translate(-50%,10px) scale(.7)}15%{opacity:1;transform:translate(-50%,0) scale(1.08)}30%{transform:translate(-50%,0) scale(1)}75%{opacity:1}100%{opacity:0;transform:translate(-50%,-26px) scale(1)}}
body.touch.narrow #pickpop{font-size:17px}body.touch.narrow #pickpop.full{font-size:20px}
#b-action.open-ready{background:rgba(216,180,90,.55);border-color:#ffe08a;box-shadow:0 0 14px rgba(255,214,110,.9);animation:vready 1.1s ease-in-out infinite}

/* PlayStation-style action diamond (v14): Triangle top, Square left, Circle right, Cross bottom */
#tbtns{display:grid;grid-template-columns:repeat(3,56px);grid-template-rows:repeat(3,56px);gap:4px;align-items:center;justify-items:center}
#tbtns button.ps,#tbtns #b-action.ps,#tbtns #b-fire.ps{width:56px;height:56px;margin:0;padding:0;border-radius:50%;display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1;background:rgba(14,12,34,.55);border:2px solid rgba(255,255,255,.32);color:#fff}
#tbtns .ps .g{font-size:22px;font-weight:700;line-height:1}
#tbtns .ps .l{font-size:8.5px;letter-spacing:.06em;margin-top:2px;opacity:.9}
#tbtns .ps-tri{grid-column:2;grid-row:1} #tbtns .ps-tri .g{color:#40e0b0}
#tbtns .ps-sq{grid-column:1;grid-row:2} #tbtns .ps-sq .g{color:#ff8fd0}
#tbtns .ps-ci{grid-column:3;grid-row:2} #tbtns .ps-ci .g{color:#ff5a6a}
#tbtns .ps-x{grid-column:2;grid-row:3} #tbtns .ps-x .g{color:#6fa8ff}
#tbtns button.ps.on{background:rgba(166,107,255,.7)}
#tbtns #b-action.ps.open-ready{background:rgba(216,180,90,.55);border-color:#ffe08a}

/* v15: the crosshair shows on foot and on touch too, since tridents now fly to it */
body.touch #reticle,body.on-foot #reticle{display:block}

/* v15 settings: sensitivity slider */
.sens-row{display:flex;align-items:center;gap:10px;margin:4px 0 14px;font-size:14px}
.sens-row input{flex:1;accent-color:#d7b24a}
/* BH-25: no live blur behind in-game HUD bits (it re-blurs the 3D view every frame on some GPUs) */
#keys,#timebar,.btns button{backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
#keys,#timebar{background:rgba(10,6,28,.78)}
#qset{display:flex;gap:6px}#qset button{background:rgba(20,12,40,.8);color:#e9dcff;border:1px solid rgba(166,107,255,.5);border-radius:999px;padding:5px 12px;font:inherit;font-size:13px;cursor:pointer}#qset button.on{background:#d7b24a;color:#1a1030;border-color:#d7b24a}.qnote{font-size:12px;opacity:.75;margin:-6px 0 14px}

/* v16 crosshair: four outlined ticks and a dot, readable on any background. --sp is the spread (moving, shot kick). */
#reticle .rt,#reticle .rd{display:none}
body.on-foot #reticle{width:0;height:0;margin:0;border:0;border-radius:0;--sp:0px;pointer-events:none;z-index:25;will-change:transform}
body.on-foot #reticle .rt{display:block;position:absolute;background:#fff;box-shadow:0 0 0 1.5px rgba(0,0,0,.85),0 0 6px rgba(0,0,0,.6);border-radius:1px}
body.on-foot #reticle .u,body.on-foot #reticle .d{width:2px;height:8px;left:-1px}
body.on-foot #reticle .l,body.on-foot #reticle .r{width:8px;height:2px;top:-1px}
body.on-foot #reticle .u{top:calc(-12px - var(--sp))}
body.on-foot #reticle .d{top:calc(4px + var(--sp))}
body.on-foot #reticle .l{left:calc(-12px - var(--sp))}
body.on-foot #reticle .r{left:calc(4px + var(--sp))}
body.on-foot #reticle .rd{display:block;position:absolute;width:4px;height:4px;left:-2px;top:-2px;border-radius:50%;background:#8ff3ea;box-shadow:0 0 0 1.5px rgba(0,0,0,.85)}
.seg{display:flex;gap:6px;flex-wrap:wrap}.seg button{background:rgba(20,12,40,.8);color:#e9dcff;border:1px solid rgba(166,107,255,.5);border-radius:999px;padding:5px 12px;font:inherit;font-size:13px;cursor:pointer}.seg button.on{background:#d7b24a;color:#1a1030;border-color:#d7b24a}
body.touch .desk-only{display:none}
/* v16 touch throttle: a vertical slider just right of the joystick (left thumb), shown only while flying */
#thr{position:absolute;display:none;left:calc(max(16px,var(--sl)) + 124px);bottom:max(14px,var(--sb));width:44px;height:132px;pointer-events:auto;touch-action:none;z-index:30;flex-direction:column;align-items:center}
body.touch:not(.on-foot) #thr{display:flex}
#thr .tl{font-size:9px;font-weight:800;letter-spacing:.12em;color:#c9b5ff;text-shadow:0 1px 3px #000;margin-bottom:3px}
#thr-track{position:relative;flex:1;width:30px;border-radius:15px;background:rgba(10,6,24,.55);border:2px solid rgba(143,243,234,.75);box-shadow:0 0 0 2px rgba(0,0,0,.5);overflow:visible}
#thr-fill{position:absolute;left:0;right:0;bottom:0;height:60%;border-radius:13px;background:linear-gradient(0deg,rgba(45,225,211,.25),rgba(166,107,255,.55))}
#thr-knob{position:absolute;left:50%;bottom:60%;width:38px;height:16px;margin:0 0 -8px -19px;border-radius:8px;background:radial-gradient(circle at 35% 35%,#8ff3ea,#2a8f9a);box-shadow:0 0 0 2px rgba(0,0,0,.55)}
/* v16 brake: an L2-style button in the free bottom-right corner of the PlayStation grid, only while flying */
#tbtns .ps-l2{grid-column:3;grid-row:3;display:none!important}
body.touch:not(.on-foot) #tbtns .ps-l2{display:flex!important}
#tbtns .ps-l2 .g{font-size:15px;color:#ffb36b;font-weight:800}
#tbtns .ps-l2.on{background:rgba(255,150,70,.7)!important}
/* v16 VIEW button (touch, on foot): just above the PlayStation buttons, clear of them */
#b-view{position:absolute;display:none;right:max(16px,var(--sr));bottom:calc(max(14px,var(--sb)) + 186px);width:48px;height:48px;border-radius:50%;pointer-events:auto;touch-action:none;z-index:30;background:rgba(14,12,34,.6);border:2px solid rgba(255,255,255,.35);color:#fff;flex-direction:column;align-items:center;justify-content:center;line-height:1;padding:0}
body.touch.on-foot #b-view{display:flex}
#b-view .g{font-size:16px}#b-view .l{font-size:8px;font-weight:800;letter-spacing:.05em;margin-top:2px}

/* v16 hit marker: an X flash around the crosshair (ship ring or on-foot ticks) when a trident connects */
#reticle .hm{display:none;position:absolute;left:50%;top:50%;width:0;height:0}
#reticle.hitm .hm{display:block}
#reticle .hm::before,#reticle .hm::after{content:"";position:absolute;left:-11px;top:-1.5px;width:22px;height:3px;background:#ff5a6a;box-shadow:0 0 0 1.5px rgba(0,0,0,.8),0 0 8px rgba(255,90,106,.9);border-radius:2px;transform:rotate(45deg)}
#reticle .hm::after{transform:rotate(-45deg)}
/* BH-27: graphics restore note */
#gfxnote{position:absolute;left:50%;top:42%;transform:translate(-50%,-50%);z-index:60;display:none;background:rgba(10,6,28,.85);color:#e9dcff;border:1px solid rgba(166,107,255,.6);border-radius:12px;padding:10px 18px;font-weight:700;font-size:15px;pointer-events:auto;cursor:pointer}
#gfxnote.show{display:block}
