/* Desktop navigation stays with its page; native scroll chaining handles edges. */
@media (min-width: 1101px) {
  /* hidden creates an unintended scrolling ancestor and disables viewport sticky.
     clip keeps wide content bounded without creating another scroll container. */
  html:has(#app > .layout.os-layout-v10),
  body:has(#app > .layout.os-layout-v10) {
    overflow-x: clip;
  }

  #app .layout.os-layout-v10 > .sidebar {
    position: sticky;
    top: 0;
    align-self: start;
  }

  #app .layout.os-layout-v10 > .sidebar .nav {
    overscroll-behavior-y: auto;
  }

  /* Normal Settings uses the page as its outer scroller. Maximized Settings
     keeps its bounded workspace, as do dialogs and mobile navigation drawers. */
  #app .layout.os-layout-v10 .settings-center-shell:not(.is-maximized) .settings-window {
    height: auto;
    min-height: calc(100dvh - var(--shell-chrome-height) - 32px);
    overflow: clip;
  }

  #app .layout.os-layout-v10 .settings-center-shell:not(.is-maximized) .settings-body {
    overflow: visible;
    align-items: start;
  }

  #app .layout.os-layout-v10 .settings-center-shell:not(.is-maximized) .settings-module-workspace {
    overflow: visible;
  }

  #app .layout.os-layout-v10 :is(
    .drive-shell > .drive-sidebar,
    .report-window-rail,
    .settings-center-shell:not(.is-maximized) .settings-module-rail
  ) {
    position: sticky;
    top: calc(var(--shell-chrome-height) + 12px);
    align-self: start;
    min-height: 0;
    max-height: calc(100dvh - var(--shell-chrome-height) - 84px);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: auto;
    scrollbar-width: thin;
  }

  /* Production Settings has a nested menu list beneath its search field. */
  #app .layout.os-layout-v10 .settings-center-shell:not(.is-maximized) .settings-module-tabs {
    overscroll-behavior-y: auto;
  }
}
