@media (max-width: 1000px) {
  nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    bottom: auto;
    left: 0;
    height: calc(100svh - 78px);
    padding: 1rem max(1.25rem, env(safe-area-inset-left)) max(2rem, env(safe-area-inset-bottom));
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    overflow-y: auto;
    background: #fff;
    border-top: 1px solid var(--line);
  }

  nav.open { display: flex; }

  nav > a {
    display: flex;
    align-items: center;
    min-height: 52px;
    border-bottom: 1px solid #e7edf3;
    font-size: 1rem;
  }

  nav .button.small {
    width: max-content;
    margin-top: 1rem;
    padding-inline: 1.25rem;
    border-bottom: 0;
  }

  .menu { min-width: 52px; min-height: 44px; }
  .menu-open { overflow: hidden; }
}
