/* Bound long menus on desktop and inside the mobile navigation panel. */
.navbar:has(.dropdown-menu.show) { opacity: 1; }
.navbar .dropdown-menu {
  max-width: calc(100vw - 2rem);
  max-height: min(32rem, calc(100vh - 10rem));
  max-height: min(32rem, calc(100dvh - 10rem));
  overflow-y: auto;
  overscroll-behavior: contain;
  text-align: left;
}
.navbar .dropdown-menu:has(> a[href$="/week/w01/"]) {
  left: 0;
  right: auto;
  width: min(24rem, calc(100vw - 2rem));
}
.navbar .dropdown-item { white-space: normal; line-height: 1.4; }
.navbar .dropdown-menu:has(> a[href$="/week/w01/"]) .dropdown-item { font-size: .875rem; }
.navbar a:focus-visible { outline: 2px solid var(--global-theme-color); outline-offset: -2px; }
@media (max-width: 575.98px) {
  .navbar .navbar-collapse { max-height: calc(100dvh - 4.5rem); overflow-y: auto; }
  .navbar .nav-item.dropdown { width: 100%; }
  .navbar .dropdown-menu {
    position: static;
    width: 100%;
    max-height: min(24rem, calc(100dvh - 15rem));
    margin-bottom: .5rem;
  }
}
