html,
body {
  min-height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-menu-button {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  border: 1px solid currentColor;
  background: transparent;
  opacity: 0.85;
}

.mobile-menu-button:hover {
  opacity: 1;
}

@media (max-width: 760px) {
  header {
    position: relative;
    z-index: 1200 !important;
  }

  header nav {
    position: relative;
    z-index: 1210;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 0.5rem;
  }

  .mobile-menu-button {
    display: inline-flex;
  }

  .mobile-nav-links {
    display: none !important;
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    z-index: 1300;
    flex-direction: column;
    align-items: stretch !important;
    gap: 0.45rem !important;
    padding: 0.7rem;
    border-radius: 1rem;
    border: 1px solid rgba(236, 72, 153, 0.3);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.16);
    max-height: 72vh;
    overflow-y: auto;
  }

  .dark-mode .mobile-nav-links {
    background: rgba(43, 43, 43, 0.96);
    border-color: rgba(233, 217, 200, 0.24);
  }

  .mobile-nav-links.is-open {
    display: flex !important;
  }

  .mobile-nav-links a {
    width: 100%;
    text-align: left;
    padding: 0.55rem 0.7rem !important;
    border-radius: 0.75rem;
    border: 1px solid rgba(79, 111, 168, 0.22);
    background: rgba(255, 255, 255, 0.72);
  }

  .dark-mode .mobile-nav-links a {
    background: rgba(65, 65, 65, 0.72);
    border-color: rgba(243, 168, 202, 0.28);
  }

  .mobile-nav-actions {
    position: static !important;
    transform: none !important;
    margin-left: auto;
  }

  body.mobile-menu-open {
    overflow: hidden;
  }
}
