/* Digital GM Toolkit Phase 1.3 — handwritten header navigation.
   Use existing Asteria crystal assets. Scope layout to the main header and
   responsive navigation drawer; never alter Account sidebar or gameplay UI. */
@media (min-width:1680px) {
  body .topbar.asteria-header {
    display:flex!important;
    grid-template-columns:none!important;
    align-items:center!important;
    gap:clamp(7px,.6vw,14px)!important;
    padding:0 0 0 clamp(10px,1vw,20px)!important;
  }
  body .asteria-header .asteria-header-brand {
    flex:0 0 clamp(205px,15.4vw,304px)!important;
    width:clamp(205px,15.4vw,304px)!important;
    min-width:0!important;
  }
  body .asteria-header > #globalNavigation {
    position:static!important;
    left:auto!important;
    top:auto!important;
    transform:none!important;
    display:flex!important;
    flex:1 1 auto!important;
    width:auto!important;
    min-width:0!important;
    align-items:center!important;
    justify-content:center!important;
    flex-wrap:nowrap!important;
    gap:clamp(3px,.4vw,9px)!important;
    margin:0!important;
  }
  body .asteria-header #globalNavigation .crystal-button[data-asteria-button-size="long"] {
    box-sizing:border-box!important;
    flex:0 1 clamp(135px,8vw,185px)!important;
    width:clamp(135px,8vw,185px)!important;
    inline-size:clamp(135px,8vw,185px)!important;
    min-width:0!important;
    max-width:185px!important;
    padding-inline:clamp(13px,.85vw,21px)!important;
    font-size:clamp(.69rem,.66vw,.83rem)!important;
    line-height:1.12!important;
    white-space:normal!important;
    overflow-wrap:normal!important;
    text-align:center!important;
  }
  body .asteria-header #globalNavigation .compendium-split {
    display:flex!important;
    flex:0 1 auto!important;
    min-width:0!important;
    align-items:center!important;
    gap:1px!important;
  }
  body .asteria-header #globalNavigation .compendium-split > #compendiumIndexButton {
    flex:0 1 clamp(135px,8vw,185px)!important;
  }
  body .asteria-header #globalNavigation #compendiumQuickToggle {
    flex:0 0 41px!important;
    min-width:41px!important;
    min-inline-size:41px!important;
    width:41px!important;
    inline-size:41px!important;
    padding-inline:8px!important;
  }
  body .asteria-header .top-actions {
    position:static!important;
    top:auto!important;
    right:auto!important;
    transform:none!important;
    display:flex!important;
    flex:0 0 auto!important;
    align-self:stretch!important;
    margin:0!important;
    align-items:center!important;
    justify-content:flex-end!important;
    gap:clamp(4px,.45vw,10px)!important;
  }
  body .asteria-header #accountControls #loginToggle {
    width:clamp(105px,6.2vw,140px)!important;
    inline-size:clamp(105px,6.2vw,140px)!important;
    min-width:0!important;
    flex:0 0 auto!important;
    font-size:clamp(.72rem,.7vw,.88rem)!important;
    text-align:center!important;
  }
  body .asteria-header .asteria-header-profile {
    flex:0 0 var(--core-header-height)!important;
  }
}
/* Existing 1679px breakpoint moves these SAME links into the drawer, avoiding
   duplicate controls and keeping the Account button and image on the header. */
@media (max-width:1679px) {
  body #settingsPanel #mobileNavigationSlot #globalNavigation {
    display:flex!important;
    width:100%!important;
    flex-direction:column!important;
    align-items:stretch!important;
    gap:8px!important;
  }
  body #settingsPanel #globalNavigation > .crystal-button {
    display:flex!important;
    box-sizing:border-box!important;
    width:100%!important;
    inline-size:100%!important;
    max-width:100%!important;
    min-height:48px!important;
    flex:0 0 auto!important;
    justify-content:center!important;
    text-align:center!important;
    white-space:normal!important;
    line-height:1.15!important;
  }
  body #settingsPanel #globalNavigation .compendium-split {
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }
  body #settingsPanel #globalNavigation #compendiumIndexButton {
    flex:1 1 0!important;
    min-width:0!important;
    width:auto!important;
    inline-size:auto!important;
  }
}
/* No moving or duplicated navigation on narrow screens with reduced motion. */
@media (prefers-reduced-motion:reduce) {
  body .asteria-header #globalNavigation .crystal-button {
    transition:none!important;
  }
}
