/* Keep desktop nav and account controls as direct flex items visually. */
.sg-header .sg-menu-panel { display: contents; }
.sg-header .sg-mobile-toggle { display: none; }

@media (max-width: 880px) {
  .stargate-ember .sg-header .sg-nav.sg-nav--mobile-ready {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    min-height: 66px;
    gap: 0 12px;
    padding-block: 8px;
  }
  .sg-nav--mobile-ready > .sg-brand { justify-self: start; }
  .stargate-ember .sg-nav--mobile-ready > .sg-brand .sg-logo-v2 { width: clamp(114px, 36vw, 148px); }
  .sg-header .sg-nav--mobile-ready .sg-mobile-toggle {
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid #f3bd8545;
    border-radius: 10px;
    color: #f8d5a2;
    background: linear-gradient(155deg, #42232a, #201417);
    cursor: pointer;
  }
  .sg-mobile-toggle svg { fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; }
  .sg-mobile-toggle .sg-mobile-close-icon,
  .sg-mobile-toggle[aria-expanded="true"] .sg-mobile-menu-icon { display: none; }
  .sg-mobile-toggle[aria-expanded="true"] .sg-mobile-close-icon { display: inline; }
  .sg-mobile-toggle:focus-visible,
  .sg-menu-panel :is(a, button, select):focus-visible { outline: 2px solid #f9cc8e; outline-offset: 3px; }
  .sg-header .sg-nav--mobile-ready .sg-menu-panel {
    display: grid;
    grid-column: 1 / -1;
    min-width: 0;
    margin-block: 8px 4px;
    padding: 8px 12px 12px;
    border-radius: 12px;
    background: linear-gradient(145deg, #29181e, #1a1115);
    box-shadow: inset 0 1px #ffcb9e22;
  }
  .sg-header .sg-nav--mobile-ready .sg-mobile-toggle[aria-expanded="false"] + .sg-menu-panel { display: none; }
  .stargate-ember .sg-nav--mobile-ready .sg-menu-panel > nav {
    display: grid;
    order: 0;
    grid-template-columns: minmax(0, 1fr);
    width: auto;
    gap: 2px;
  }
  .stargate-ember .sg-nav--mobile-ready .sg-menu-panel > nav > a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 10px;
    border: 0;
    border-radius: 7px;
    overflow-wrap: anywhere;
  }
  .stargate-ember .sg-nav--mobile-ready .sg-menu-panel > nav > a[aria-current="page"],
  .stargate-ember .sg-nav--mobile-ready .sg-menu-panel > nav > a:hover { background: #61313a62; }
  .stargate-ember .sg-nav--mobile-ready .sg-menu-panel > .new-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: space-between;
    margin: 8px 0 0;
    padding-top: 12px;
    border-top: 1px solid #f9c8a027;
  }
  .sg-nav--mobile-ready .sg-menu-panel .new-language select { min-height: 44px; }
}
