/* A single layout owns the header: identity + destinations, with gameplay in
   its own dialog. Explicit grid rows replace overlapping legacy flex rules. */
:root{--hud-header-height:82px}
#hud header{height:var(--hud-header-height);display:grid;grid-template-columns:minmax(145px,1fr) auto auto auto;gap:18px;align-items:center;align-content:center;padding:12px 26px}
#hud header .brand{position:static;max-width:none;font-size:11px;letter-spacing:1.6px;gap:10px;white-space:nowrap}
#hud header .brand-icon{display:block;font-size:33px}#hud header .brand small{display:block;font-size:8px}
#hud header .sector{display:none}.top-nav{display:flex;align-items:center;gap:8px;pointer-events:auto}
#hud header .top-nav button,#gameplay-open{font-size:11px;white-space:nowrap;min-height:36px;padding:8px 12px;border:1px solid #88a1b335;border-radius:7px;background:#a4bdcf06;max-width:none;width:auto;height:auto}
#hud header #pilot-open{order:0;max-width:none;width:auto;height:auto;margin:0;justify-self:end;min-height:42px;font-size:11px}
#hud header #pilot-open.signed-in{padding:5px 10px;min-width:164px}
#hud header .hud-pilot small{font-size:10px}#hud header .hud-pilot b{font-size:11px;max-width:160px}.hud-rank-emblem{width:30px;height:35px}
#gameplay-open{color:#b8cadd;background:#9bc1e10a;border-color:#9bc1e140}
#workshop,#right-hud,#flight-hud{top:calc(var(--hud-header-height) + 15px)}
.gameplay-modal{max-width:610px!important}.gameplay-modal h2{font-size:27px;margin:12px 0}.gameplay-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:23px 0}.gameplay-grid>div{padding:15px;border:1px solid #8db3cc33;border-radius:9px;background:#91b4ce06}
.gameplay-grid button#command-open,.gameplay-grid button#enemy-toggle,.gameplay-grid button#cinema,.gameplay-grid button#audio,.gameplay-grid button#help{width:100%;height:auto;max-width:none;min-height:38px;padding:9px 12px;text-align:left;font-size:13px;border:1px solid #8db3cc45;border-radius:6px;visibility:visible;color:#cee2ed;background:#8db3cc09}
.gameplay-grid #command-open::after{display:none}.gameplay-grid small{font-size:10px;line-height:1.7;color:#849fb3;display:block;margin-top:9px}.gameplay-grid button#enemy-toggle[aria-pressed="true"]{color:#ffb0a1;border-color:#ff785c88}.gameplay-grid button#enemy-toggle.cert-locked::after{top:10px;bottom:auto}
body.cinematic #gameplay-open{visibility:visible}body.cinematic .top-nav{visibility:hidden}
@media(max-width:1100px){#hud header{gap:10px;padding:12px 18px;grid-template-columns:minmax(110px,1fr) auto auto auto}#hud header .top-nav button,#gameplay-open{font-size:10px;padding:8px}.top-nav{gap:5px}#hud header .brand{font-size:9px;letter-spacing:1px}#hud header .brand-icon{font-size:27px}}
@media(max-width:820px){:root{--hud-header-height:118px}#hud header{grid-template-columns:minmax(0,1fr) auto;grid-template-rows:43px 36px;gap:10px 12px;padding:10px 16px}#hud header .brand{grid-area:1/1;font-size:10px}#hud header #pilot-open{grid-area:1/2}#hud header .top-nav{grid-area:2/1;gap:6px}#gameplay-open{grid-area:2/2;justify-self:end}.top-nav{min-width:0}#hud header .top-nav button{font-size:10px;padding:7px 9px}#hud header .hud-pilot small{white-space:nowrap}#hud header .brand small{font-size:7px}}
@media(max-width:470px){#hud header{gap:9px 6px;padding:9px 12px;grid-template-columns:minmax(0,1fr) auto}#hud header .brand-icon{font-size:23px}#hud header .brand{gap:5px;font-size:9px}#hud header .top-nav{gap:4px;grid-column:1/-1;padding-right:94px}#hud header .top-nav button{font-size:9px;padding:7px 6px}#gameplay-open{font-size:10px;z-index:1}#hud header #pilot-open.signed-in{min-width:0;padding:4px 6px;gap:5px}#hud header .hud-pilot b{max-width:120px;font-size:10px}#hud header .hud-pilot small{font-size:9px}.hud-rank-emblem{width:24px;height:29px}.gameplay-grid{grid-template-columns:1fr}}
@media(max-width:350px){#hud header .top-nav button{font-size:8px;padding:7px 4px}#hud header .brand-icon{display:none}}
#hud header .brand{min-width:0;justify-self:start}

.real-system-entry{display:grid;grid-template-columns:32px 1fr;gap:5px 10px;text-align:left;padding:15px 18px;margin:15px 0;border:1px solid #a8ced44d;border-radius:10px;background:#111d2b;color:#d9ecee;text-decoration:none}.real-system-entry>span{grid-row:span 2;font-size:29px;align-self:center}.real-system-entry b{font-size:13px}.real-system-entry small{font-size:10px;color:#91a9b6}.real-system-entry:hover{background:#1b2b3b;border-color:#b6d6dc}
