/* Flight and walking information floats at the screen edges. The centre stays
   transparent and pointer-through; larger controls open only on request. */
body.flying #right-hud{display:none!important}
#flight-hud{position:fixed;left:20px;right:20px;bottom:34px;top:auto;transform:none;width:auto;max-width:none;min-width:0;height:100px;border:0;border-radius:0;padding:0;background:none;box-shadow:none;backdrop-filter:none;pointer-events:none;text-shadow:0 1px 4px #000,0 0 12px #0009}
#flight-hud .flight-heading{position:fixed;top:calc(var(--hud-header-height) + 20px);left:20px;right:20px;display:flex;justify-content:center;border:0;padding:0;background:none;border-radius:0;pointer-events:none}
#flight-title{font-size:9px;max-width:300px}.console-mark{display:none}
#flight-hud .flight-state{display:block;background:none;border:0;font-size:13px;font-weight:600;letter-spacing:3px;color:#c8ffe9;padding:0}
#flight-hud .flight-links{position:fixed;bottom:35px;right:20px;width:auto;display:flex;gap:10px;justify-content:flex-end;pointer-events:auto}
#flight-hud .flight-links button{padding:7px 9px;border:1px solid #b6e8e528;border-radius:5px;background:#0b1b274d;text-shadow:0 1px 3px #000}
#flight-hud .flight-links #ship-scan,#flight-hud .flight-links #ship-repair,#flight-reference{display:none}
#flight-hud .flight-instruments{display:contents;min-height:0;padding:0}
#flight-hud .flight-instruments>div{border:0;padding:0;background:none}
#flight-hud .velocity-instrument{position:absolute;left:0;bottom:0;width:170px}
#flight-hud .systems-instrument{position:absolute;right:0;bottom:48px;width:175px;text-align:right}
#flight-hud .instrument-label{color:#c0dce5}#flight-hud .instrument-note{color:#c0dce5}
#flight-hud .thrust-instrument,#flight-hud .tactical-instrument,#flight-hud .system-buttons,#flight-hud .speed-track,#flight-hud .hull-reading .live-dot{display:none}
#flight-hud #speed{font-size:32px;letter-spacing:0}.speed-reading{margin:4px 0}#flight-hud .hull-reading{margin:0;justify-content:flex-end}#flight-hud #ship-hull{font-size:12px}#flight-hud #flight-assist-status{margin:4px 0;color:#c0e3d0}#flight-hud .systems-instrument>.instrument-label{display:none}
#flight-hud.hud-expanded .flight-instruments{position:absolute;right:0;bottom:50px;display:grid;grid-template-columns:1fr 1fr;width:380px;max-width:calc(100vw - 40px);max-height:calc(100vh - var(--hud-header-height) - 125px);overflow:auto;padding:15px;gap:18px;background:#0c1d2bdd;border:1px solid #c4efe340;border-radius:10px;pointer-events:auto;backdrop-filter:blur(8px)}
#flight-hud.hud-expanded .flight-instruments>div{position:static;display:block;width:auto;text-align:left;grid-column:auto;margin:0;padding:0!important}
#flight-hud.hud-expanded .systems-instrument .hull-reading{justify-content:flex-start}#flight-hud.hud-expanded .system-buttons{display:flex}#flight-hud.hud-expanded #flight-reference,#flight-hud.hud-expanded #ship-scan,#flight-hud.hud-expanded #ship-repair{display:block}
#surface-hud{position:fixed;bottom:24px;left:20px;right:20px;transform:none;width:auto;padding:0;border:0;border-radius:0;background:none;box-shadow:none;backdrop-filter:none;pointer-events:none;text-shadow:0 1px 4px #000,0 0 12px #0009}
#surface-hud .surface-heading{justify-content:flex-start;gap:10px;align-items:flex-end}#surface-hud .surface-heading>div{margin-right:auto}#surface-hud .surface-heading strong{font:18px/1.2 ui-sans-serif,system-ui;margin:4px 0}#surface-hud .surface-heading button{pointer-events:auto;background:#0b1b274d;border:1px solid #b6e8e528;border-radius:5px;padding:8px}#surface-hud>p,#surface-hud #base-status{display:none}
#surface-hud .surface-actions{position:absolute;right:0;bottom:40px;max-width:350px;justify-content:flex-end;pointer-events:auto}#surface-hud .surface-actions button{display:none;background:#0b1b274d;text-shadow:0 1px 3px #000}#surface-hud #surface-interact,#surface-hud #surface-board:not([hidden]){display:block}#surface-hud [hidden]{display:none!important}
#surface-hud.hud-expanded .surface-actions{padding:12px;max-width:270px;background:#0c1d2bce;border:1px solid #c4efe340;border-radius:8px;backdrop-filter:blur(8px)}#surface-hud.hud-expanded .surface-actions button{display:block}#surface-hud.hud-expanded>p{display:block;position:absolute;bottom:60px;left:0;max-width:220px;line-height:1.6}
body.flying #toast,body.walking #toast{bottom:auto;top:calc(var(--hud-header-height) + 65px);max-width:min(440px,calc(100vw - 40px));background:#0c1d2b99;pointer-events:none}
@media(max-width:700px){#flight-hud{left:12px;right:12px}#flight-hud .flight-heading{left:12px;right:12px;top:calc(var(--hud-header-height) + 12px)}#flight-hud .flight-heading>div:first-child{flex-wrap:wrap;justify-content:center}#flight-hud .flight-links{bottom:30px;right:12px;max-width:60%;gap:4px}#flight-hud .flight-links button{font-size:9px;padding:6px}#flight-hud #flight-exit{font-size:0!important}#flight-hud #flight-exit:after{content:'Exit';font-size:10px}#flight-hud .systems-instrument{bottom:74px;width:145px}#surface-hud{left:12px;right:12px}#surface-hud .surface-heading strong{font-size:15px}#surface-biome{max-width:180px}#surface-hud .surface-actions{bottom:64px}#surface-hud .surface-heading{align-items:center;flex-wrap:wrap}}
#shared-map-hud{position:fixed;top:calc(var(--hud-header-height) + 12px);left:20px;z-index:24;color:#c7e8dd;font:10px/1.5 system-ui;text-shadow:0 1px 4px #000;max-width:300px}#shared-map-hud[hidden]{display:none}#shared-map-hud summary{cursor:pointer;list-style:none;border-bottom:1px solid #a6efd84d;padding:5px 0}#shared-map-status[data-online=false]{color:#ecc897}#shared-map-hud>div{background:#0b1a2ced;border:1px solid #b9e7db33;border-radius:8px;padding:16px;box-shadow:0 8px 30px #0005}#shared-map-hud b{font-size:9px;letter-spacing:1px}#shared-map-hud p,#shared-map-hud small{color:#a7bfcb}#shared-map-hud ul{padding:0;list-style:none}#shared-map-hud li{padding:4px 0;border-bottom:1px solid #ffffff10}#shared-reconnect{display:block;font-size:10px;border:1px solid #a6efd855;margin-top:10px;padding:5px 10px;border-radius:4px}.peer-nameplate{position:fixed;pointer-events:none;z-index:4;transform:translate(-50%,-100%);font:10px/1.4 system-ui;color:#c6ffe6;text-shadow:0 1px 4px #000,0 0 8px #000;background:#081b2433;padding:3px 6px;border-radius:3px;white-space:nowrap}.peer-nameplate small{display:block;font-size:8px;color:#b6ced7;text-align:center}@media(max-width:700px){#shared-map-hud{left:12px;top:calc(var(--hud-header-height) + 45px);font-size:9px;max-width:250px}}

body:not(.flying):not(.walking) #shared-map-hud{top:auto;bottom:108px;left:auto;right:20px}body:not(.flying):not(.walking) #shared-map-hud>div{position:absolute;bottom:30px;right:0;width:280px}
#flight-hud{z-index:5}#flight-hud .flight-links{bottom:48px}body.flying .statusbar{background:none;pointer-events:none}body.flying .statusbar button{pointer-events:auto}

body.flying #hud header,body.walking #hud header{background:linear-gradient(#07101acd,#07101a18);backdrop-filter:none;border-bottom-color:#b5d9dc18;box-shadow:none}
@media(max-width:700px){#flight-hud.hud-expanded .flight-instruments{bottom:125px;max-height:calc(100vh - var(--hud-header-height) - 205px)}#flight-hud.hud-expanded .flight-links{max-width:75%;gap:5px}}

#performance-readout{position:fixed;right:20px;top:calc(var(--hud-header-height) + 65px);z-index:35;white-space:pre;font:10px/1.6 monospace;color:#c7f5df;background:#07121cbd;padding:9px 12px;border:1px solid #a2dfc833;border-radius:6px;pointer-events:none}
#flight-hud .flight-links #ship-lights{display:none}#flight-hud.hud-expanded .flight-links #ship-lights{display:block}#ship-lights[aria-pressed=true]{color:#c0f8e1;border-color:#a5e3c7}#flight-hud.hud-expanded .flight-links{flex-wrap:wrap;max-width:min(760px,75vw)}
