/* Space 2047 HD Edition v6.3.8 — stable desktop layout without top-bar reparenting. */
@media (min-width:761px){
  .s2047-reference-topbar,
  .s2047-reference-topbar.s2047-reference-topbar-no-exit{
    position:fixed!important;top:0!important;left:0!important;right:0!important;
    height:72px!important;display:flex!important;align-items:center!important;
    justify-content:center!important;gap:14px!important;padding:0 18px!important;
    visibility:visible!important;opacity:1!important;pointer-events:auto!important;
    z-index:2147481000!important;box-sizing:border-box!important;
  }
  .s2047-reference-exit{position:absolute!important;left:18px!important;top:13px!important;width:108px!important;height:46px!important}
  .s2047-reference-terminal{position:static!important;display:block!important;max-width:calc(100vw - 300px)!important;text-align:center!important}
  .s2047-reference-logo{top:84px!important}
  .s2047-reference-location{top:147px!important}

  .s2047-reference-player{
    position:fixed!important;inset:auto auto 16px 170px!important;
    width:clamp(330px,38vw,470px)!important;height:64px!important;min-height:64px!important;
    margin:0!important;padding:6px 9px!important;box-sizing:border-box!important;
    display:grid!important;grid-template-columns:34px 46px minmax(0,1fr) 34px!important;
    gap:8px!important;background:#081e2c!important;border-radius:16px!important;
    z-index:2147481200!important;pointer-events:auto!important;transform:none!important;
  }
  .s2047-reference-switch{width:30px!important;height:46px!important;min-height:0!important;padding:0!important}
  .s2047-reference-portrait{width:44px!important;height:50px!important}
  .s2047-reference-options{
    position:fixed!important;inset:auto 22px 22px auto!important;transform:none!important;
    width:100px!important;height:44px!important;min-height:44px!important;margin:0!important;
    padding:4px 8px!important;font-size:15px!important;z-index:2147481201!important;
    pointer-events:auto!important;
  }
}

/* Restore HUD after closing menu without hiding the top strip. */
#s2047-reference-hud,.s2047-reference-topbar{visibility:visible!important;opacity:1!important}
html.s2047-options-open-v635 #s2047-reference-hud,
body.s2047-options-open-v635 #s2047-reference-hud{visibility:visible!important;opacity:1!important}

/* Keep only the dedicated reference close button. */
#s2047-menu [data-action="menu-close"],
#s2047-menu .s2047-panel-close{display:none!important}
#s2047-menu .s2047-reference-menu-close{pointer-events:auto!important}

#s2047-minimap-wrap,.s2047-minimap-wrap{background:#081e2c!important;overflow:hidden!important;isolation:isolate!important}
#s2047-minimap-wrap canvas,.s2047-minimap-wrap canvas{background:#071722!important;opacity:1!important}
