.mobile-nav {
  display: none;
}

@media (max-width: 1020px) {
  .nav .wrap {
    min-height: 68px;
  }

  .nav > .wrap > .navlinks,
  .menu-toggle {
    display: none !important;
  }

  .mobile-nav {
    display: block;
    margin-left: auto;
  }

  .mobile-nav summary {
    width: 44px;
    height: 42px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 9px;
    border: 1px solid rgba(255,255,255,.5);
    border-radius: 4px;
    cursor: pointer;
    list-style: none;
  }

  .mobile-nav summary::-webkit-details-marker {
    display: none;
  }

  .mobile-nav summary span {
    width: 22px;
    height: 2px;
    display: block;
    border-radius: 2px;
    background: #fff;
    transition: transform .2s ease, opacity .2s ease;
  }

  .mobile-nav[open] summary span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .mobile-nav[open] summary span:nth-child(2) {
    opacity: 0;
  }

  .mobile-nav[open] summary span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .mobile-links {
    position: fixed;
    z-index: 2000;
    top: 68px;
    left: 0;
    right: 0;
    width: 100vw;
    max-height: calc(100vh - 68px);
    max-height: calc(100dvh - 68px);
    overflow-y: auto;
    overscroll-behavior: contain;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 18px max(6vw, env(safe-area-inset-right)) calc(28px + env(safe-area-inset-bottom)) max(6vw, env(safe-area-inset-left));
    background: #020914;
    box-shadow: 0 12px 22px rgba(0,0,0,.3);
  }

  .mobile-links a {
    display: block;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255,255,255,.14);
    color: #fff;
    font-size: 16px;
  }

  .mobile-links a:hover,
  .mobile-links a:focus-visible {
    color: #ffb000;
  }

  .mobile-links .btn {
    margin-top: 12px;
    border-bottom: 0;
    color: #020914;
    text-align: center;
  }

  .mobile-links .btn:hover,
  .mobile-links .btn:focus-visible {
    color: #fff;
  }
}
