/* Independent sidebar scrolling on the two-column layout. */
@media (min-width: 768px) {
  .auth_top_row > :first-child {
    position: sticky;
    top: 70px;
    align-self: flex-start;
    max-height: calc(100vh - 80px);
    max-height: calc(100dvh - 80px);
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scrollbar-gutter: stable;
  }
}

/* Overlay the sidebar below the author selector button. */
.auth_top_row .author-selector-menu {
  position: absolute !important;
  float: none;
  top: 100% !important;
  left: 0 !important;
  bottom: auto !important;
  z-index: 1000;
  transform: none !important;
  width: 100%;
  min-width: 0;
  max-height: none;
  overflow: visible;
}
.auth_top_row .author-selector-menu .dropdown-item {
  white-space: normal;
}

/* Let the complete open menu extend beyond the sidebar scroll area. */
.auth_top_row > :first-child:has(.author-selector-menu.show) {
  overflow: visible;
  z-index: 1020;
}

/* Keep the index menu visible outside its short scrolling sidebar. */
.nikkei-m3-index-sidebar:has(.dropdown-menu.show) {
  overflow: visible;
  z-index: 1020;
}
.nikkei-m3-index-sidebar #dropdownMenuButton-nk + .dropdown-menu {
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  bottom: auto !important;
  transform: none !important;
  max-height: none;
  overflow: visible;
}
