/* Mobile-only overrides */
@media (max-width: 720px) {
  :root {
    --nav-height: 92px;
  }

  body {
    padding-top: var(--nav-height);
  }

  #siteHeader {
    position: fixed;
    inset: 0 0 auto 0;
    background: var(--surface-glass);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.12);
    z-index: 80;
    padding-top: env(safe-area-inset-top);
    transform: translateY(0);
    transition: transform 0.25s ease-in-out;
    will-change: transform;
  }

  #siteHeader.nav-hidden {
    transform: translateY(-100%);
  }

  #siteHeader .nav-container {
    grid-template-columns: auto 1fr auto;
    padding: 16px 18px;
    gap: 12px;
  }

  #siteHeader .nav-center,
  #siteHeader .nav-actions,
  #siteHeader .nav-status {
    display: none;
  }

  #siteHeader .mobile-menu-btn {
    display: inline-flex;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--color-surface, #FFFFFF);
    border: 1px solid var(--color-border, rgba(12, 27, 42, 0.14));
    position: relative;
    z-index: 90;
  }

  #siteHeader .mobile-menu-btn span {
    width: 20px;
    background: var(--color-text, #0E1324);
  }

  #siteHeader.nav-open .mobile-menu-btn span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  #siteHeader.nav-open .mobile-menu-btn span:nth-child(2) {
    opacity: 0;
  }

  #siteHeader.nav-open .mobile-menu-btn span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    background: var(--surface-overlay);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 55;
  }

  .mobile-menu {
    display: block;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    height: 100vh;
    height: 100dvh;
    width: min(360px, 86vw);
    background: var(--surface-glass);
    backdrop-filter: blur(18px);
    padding: calc(var(--nav-height) + 16px) 20px 0;
    box-shadow: 0 18px 40px rgba(14, 19, 36, 0.18);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(20px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    overflow: hidden;
    z-index: 60;
    border-radius: 24px 0 0 24px;
    display: flex;
    flex-direction: column;
  }


  .mobile-menu.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
  }

  #siteHeader.nav-open .mobile-menu-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-menu__section {
    display: grid;
    gap: 14px;
    padding-bottom: 18px;
    border-bottom: none;
  }

  .mobile-menu__section + .mobile-menu__section {
    padding-top: 18px;
    border-top: 1px solid var(--surface-divider);
  }

  .drawer-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 6px;
  }

  .mobile-menu__panel {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.25s ease;
  }

  .mobile-menu__panel.is-open {
    max-height: 600px;
  }

  .mobile-menu .mobile-menu__panel {
    max-height: none;
    overflow: visible;
    transition: none;
  }

  .mobile-menu .mobile-menu__panel.is-open {
    max-height: none;
  }

  .mobile-menu__title {
    margin: 0;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    color: var(--ink-soft);
    background: none;
    border: none;
    padding: 0;
    text-align: left;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }

  .mobile-menu__title::after {
    content: none;
  }

  .mobile-menu__title[aria-expanded="true"]::after {
    transform: none;
  }

  .mobile-menu__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    align-items: start;
  }

  .mobile-menu .nav-item a {
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
    padding: 8px 10px;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }


  .mobile-menu .nav-item a:hover {
    background: transparent;
    text-decoration: underline;
  }

  :root.theme-dark .mobile-menu .nav-item a {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
  }

  :root.theme-dark .mobile-menu .nav-item a:hover {
    background: transparent;
    text-decoration: underline;
  }

  .mobile-menu .mobile-actions {
    width: 100%;
    display: grid;
    gap: 8px;
    margin-top: 2px;
  }

  .mobile-menu .nav-auth-slot {
    position: static;
    width: 100%;
    min-height: 0;
  }

  .mobile-menu .nav-auth {
    position: static;
    width: 100%;
  }

  .mobile-menu .mobile-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .mobile-menu .mobile-actions .btn {
    min-height: 46px;
  }

  .drawer-actions {
    flex: 0 0 auto;
    margin-top: auto;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
    background: var(--surface-glass);
  }

  .drawer-actions .drawer-theme-toggle {
    margin: 14px 0 12px;
    list-style: none;
  }

  .drawer-actions .drawer-theme-toggle::marker {
    content: none;
  }

  .drawer-actions .drawer-theme-toggle a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0;
  }

  .drawer-actions .drawer-theme-toggle a::before,
  .drawer-actions .drawer-theme-toggle a::after {
    content: none;
  }

  .drawer-actions .mobile-menu__title {
    margin-bottom: 12px;
  }

  .drawer-actions .nav-auth {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 14px;
  }

  .hero-search {
    display: none;
  }

  .settings-theme-group {
    display: none;
  }
}
