/* Small named restore tabs stay at each panel's original edge of the screen. */
.hud-panel-collapsed { display: none !important; }
body .hud-panel-hide {
  position: absolute; top: 6px; right: 6px; display: grid; place-items: center;
  width: 27px; height: 27px; min-width: 27px; padding: 0; margin: 0;
  border: 1px solid #aabaca40; border-radius: 6px; background: #102539e8;
  color: #d9e8f7; font: 20px/1 sans-serif; pointer-events: auto; text-shadow: none;
  box-shadow: none; cursor: pointer; z-index: 1;
}
body .hud-panel-hide:hover { background: #234366; color: #fff; transform: none; }
body .hud-panel-tab {
  position: fixed; z-index: 24; display: inline-flex; align-items: center; gap: 9px;
  padding: 6px 10px; min-height: 32px; border: 1px solid #aabaca50;
  border-radius: 7px; background: #102539e8; color: #d9e8f7; font-size: 11px;
  box-shadow: 0 3px 12px #07132030; cursor: pointer;
}
.hud-panel-tab b { color: #d8b26a; font-size: 16px; font-weight: 500; line-height: 1; }
body .hud-panel-tab:hover { background: #234366; border-color: #8fc0f5; }
#main-nav #hud-panels-all { border-left: 1px solid #aabaca40; border-radius: 0 7px 7px 0; }
#hud-panels-all .hud-all-arrow { transition: transform .15s; transform-origin: 14px 15px; }
#hud-panels-all.all-collapsed .hud-all-arrow { transform: rotate(180deg); }
#titlebar { padding-right: 36px; }
#titlebar > .hud-panel-hide { top: 4px; right: 0; }
#objective { padding-right: 36px; min-height: 34px; }
#objective > .hud-panel-hide { top: 2px; right: 0; }
#minimap > .hud-panel-hide { top: 4px; right: 4px; }
#minimap .campus-map-open { padding-right: 33px; }
#player-hud .hud-heading { padding-right: 25px; }
#player-hud > .hud-panel-hide { top: 12px; right: 9px; }
#quick-controls > .hud-panel-hide { position: static; padding: 0; flex: 0 0 27px; }
#ex-log > .ex-log-bar { padding-right: 48px; }
#ex-log > .hud-panel-hide { top: 4px; }
#sky-guide { padding-top: 16px; }
#sky-guide > small { padding-right: 22px; }
#sky-guide > .hud-panel-hide { width: 27px; height: 27px; padding: 0; background: #102539e8; }
.hud-panel-tab[data-hud-show="titlebar"] { left: 28px; top: 24px; }
.hud-panel-tab[data-hud-show="objective"] { left: 28px; top: 103px; }
.hud-panel-tab[data-hud-show="minimap"] { left: 28px; bottom: 128px; }
.hud-panel-tab[data-hud-show="player-hud"] { left: 28px; bottom: 28px; }
.hud-panel-tab[data-hud-show="quick-controls"] { right: 28px; bottom: 29px; }
.hud-panel-tab[data-hud-show="ex-log"] { right: 28px; bottom: 84px; }
.hud-panel-tab[data-hud-show="sky-guide"] { right: 24px; top: 104px; }
body.hud-log-collapsed .ex-root.ex-log-open .ex-hint { bottom: 64px; }
body:is(.menu-open,.training-mode,.ws-teardown-mode,.sky-cinematic,.boss-cinematic) .hud-panel-tab { visibility: hidden; }
body:is(.sky-cinematic,.boss-cinematic) #hud-panels-all { visibility: hidden; }
@media (max-width: 1000px) { #main-nav button span { display: none; } }
@media (max-width: 900px) { .hud-panel-tab[data-hud-show="sky-guide"] { right: 12px; top: 95px; } }
@media (max-width: 800px) {
  .hud-panel-tab[data-hud-show="titlebar"] { left: 16px; top: 16px; }
  .hud-panel-tab[data-hud-show="objective"] { left: 16px; top: 88px; }
  .hud-panel-tab[data-hud-show="minimap"] { left: 16px; bottom: 112px; }
  .hud-panel-tab[data-hud-show="player-hud"] { left: 16px; bottom: 16px; }
  .hud-panel-tab[data-hud-show="quick-controls"] { right: 16px; bottom: 16px; }
  .hud-panel-tab[data-hud-show="ex-log"] { right: 16px; bottom: 128px; }
}
@media (max-width: 640px) {
  #main-nav button { padding: 8px; }
  .title-main h1 { max-width: max(0px, calc(100vw - 360px)); }
  #minimap .campus-map-open b { white-space: nowrap; }
  #minimap .campus-map-open span { font-size: 0; }
  #minimap .campus-map-open span::after { content: '↗'; font-size: 11px; }
}
