/* One bounded vertical owner per page; document height never depends on the
   length of a neighbouring horizontal preview. */
:root { --app-viewport-height: 100dvh; }
html, body { height: 100%; overflow: hidden; }
.app-shell, .app-main { height: var(--app-viewport-height); min-height: 0; }
.app-main { position: relative; padding-bottom: 0; overflow: hidden; overflow: clip; }
[data-scroll-viewport] {
  height: var(--app-viewport-height);
  min-height: 0 !important;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  overflow-anchor: none;
}
.view[data-scroll-viewport] { padding-bottom: 0; }
.view[data-scroll-root][data-scroll-viewport] { padding-bottom: var(--nav-height); }
.app-shell.has-detail-route .view[data-scroll-viewport] { padding-bottom: 0; }
.app-shell.has-detail-route .view[data-scroll-root][data-scroll-viewport] { padding-bottom: var(--nav-height); }
#schedule-view[data-scroll-viewport] > * { flex-shrink: 0; }
.has-overview-pages {
  position: relative;
  height: var(--app-viewport-height);
  min-height: 0 !important;
  overflow: hidden;
  overflow: clip;
}
.overview-pages { position: absolute; inset: 0; overflow: hidden; overflow: clip; }
.overview-scroll { height: 100%; padding-bottom: var(--nav-height); }
.overview-spacer { height: var(--overview-chrome-height, 0px); pointer-events: none; }
.overview-chrome {
  position: absolute;
  z-index: 18;
  inset: 0 0 auto;
  pointer-events: none;
  will-change: transform;
}
.overview-chrome > header { pointer-events: auto; }
.overview-chrome .overview-sticky-control { position: relative; }
.overview-pages > .interactive-pager__track { height: 100%; align-items: stretch; }
.overview-pages .interactive-pager__page { height: 100%; min-height: 0; }
.route-transition-surface[data-scroll-viewport],
.route-transition-surface.has-overview-pages { top: 0; height: var(--app-viewport-height); }
.profile-route-surface[data-scroll-viewport] { height: var(--app-viewport-height); }
.root-view-preview[data-scroll-viewport] { padding-bottom: var(--nav-height); }
.schedule-option-view[data-scroll-viewport] {
  padding-bottom: 0;
  overflow-y: hidden;
}
#schedule-view-options > .schedule-view-apply {
  flex: 0 0 52px;
  width: calc(100% - 28px);
  margin: 12px 14px max(16px, env(safe-area-inset-bottom));
}
.grade-mode-sticky .grade-mode-switch,
.module-tabs-sticky .module-campaign-tabs {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
.grade-mode-switch > .tab-glass-surface,
.module-campaign-tabs > .tab-glass-surface { inset: -1px; border-radius: inherit; }
.grade-mode-switch.has-sliding-indicator::before,
.module-campaign-tabs.has-sliding-indicator::before { z-index: 1; }
.grade-mode-switch > button, .module-campaign-tabs > button { z-index: 2; }
.grade-mode-switch > .tab-glass-surface,
.module-campaign-tabs > .tab-glass-surface {
  background: var(--theme-tab-fill);
  box-shadow: var(--theme-tab-shadow, 0 2px 6px color-mix(in srgb, var(--text-primary) 4%, transparent)),
    inset 0 1px 0 var(--nav-glass-top-highlight), inset 0 -1px 0 var(--nav-glass-bottom-shade);
}
html[data-interface-effects-resolved="full"] .tab-glass-surface {
  -webkit-backdrop-filter: var(--theme-tab-filter);
  backdrop-filter: var(--theme-tab-filter);
}
.grade-mode-switch.has-sliding-indicator::before,
.module-campaign-tabs.has-sliding-indicator::before {
  background: var(--theme-selection-fill);
  box-sizing: border-box;
  border: 1px solid var(--theme-selection-border);
  box-shadow: var(--theme-selection-shadow),
    inset 0 1px 0 color-mix(in srgb, var(--surface) 65%, transparent);
}
.grade-mode-switch button.is-active,
.module-campaign-tabs button.is-active { color: var(--text-primary); }
#schedule-view.has-overview-pages { display: block; }
#schedule-view.has-overview-pages .schedule-pager {
  min-height: max(260px, calc(var(--app-viewport-height) - var(--overview-chrome-height) - var(--nav-height)));
}
.diagnostics-export { width: min(90vw, 430px); border: 0; border-radius: 20px; padding: 20px; background: var(--surface); color: var(--ink); }
.diagnostics-export textarea { box-sizing: border-box; width: 100%; height: 45dvh; color: var(--ink); background: var(--ice-canvas); }
.diagnostics-export button { min-height: 44px; margin: 8px 8px 0 0; }
