.nav-toggle { display: none; }

@media (max-width: 1366px), (hover: none) and (pointer: coarse) {
  .site-header, .tips-product-nav { flex-wrap: wrap; }
  .site-header #main-nav, .tips-product-nav #main-nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    order: 3;
    width: 100%;
    gap: 0;
    padding: 12px;
    background: #17120f;
    border: 1px solid #b8903b66;
    border-radius: 9px;
    box-shadow: 0 20px 40px #0006;
    font-size: 1rem;
  }
  .site-header #main-nav a, .tips-product-nav #main-nav a { padding: 12px 16px; }
  .site-header > .nav-discord, .tips-product-nav > .nav-discord { margin-left: auto; width: 44px; }
  .site-header.navigation-ready, .tips-product-nav.navigation-ready { flex-wrap: nowrap; }
  .navigation-ready #main-nav {
    display: none;
    position: absolute;
    z-index: 80;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    max-height: calc(100dvh - var(--network-bar-height, 52px) - 120px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .navigation-ready #main-nav.is-open { display: flex; }
  .navigation-ready .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    flex: 0 0 36px;
    width: 36px;
    height: 38px;
    margin-left: 0;
    padding: 8px;
    border: 1px solid #b8903b66;
    border-radius: 5px;
    background: #221b16;
    color: #f2ba55;
    cursor: pointer;
  }
  .nav-toggle span { display: block; width: 100%; height: 1px; background: currentColor; }
  .nav-toggle:focus-visible { outline: 2px solid #f5d894; outline-offset: 4px; }
}

@media (max-width: 600px) {
  .navigation-ready .nav-toggle { flex-basis: 30px; width: 30px; height: 36px; padding: 7px; }
}

@media (max-width: 600px) {
  .tips-product-nav { gap: 10px; }
  .tips-brand { min-width: 0; gap: 8px; }
  .tips-brand > img { width: 36px; height: 36px; }
  .tips-brand small { font-size: .75rem; }
}

@media (max-width: 440px) {
  .site-header.navigation-ready { flex-wrap: wrap; }
  .site-header.navigation-ready > .button { order: 2; flex-basis: 100%; }
  .site-header.navigation-ready #main-nav { max-height: calc(100dvh - var(--network-bar-height, 52px) - 160px); }
}
