/* Keep the mobile menu usable on short screens, browser chrome changes, and safe-area devices. */
@media (max-width: 1023px) {
  div.lg\:hidden.fixed.inset-0.z-\[60\][aria-hidden] {
    overscroll-behavior: contain;
  }

  div.lg\:hidden.fixed.inset-0.z-\[60\][aria-hidden] > nav {
    box-sizing: border-box;
    height: 100dvh;
    min-height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
    padding-top: max(7rem, calc(env(safe-area-inset-top) + 5rem));
    padding-bottom: max(2.5rem, calc(env(safe-area-inset-bottom) + 1.5rem));
  }

  html:has(div.lg\:hidden.fixed.inset-0.z-\[60\][aria-hidden="false"]) {
    overflow: hidden;
  }
}
