/* B"H
 * Step 5: Scroll sovereignty becomes layered architecture.
 * The Awtsmoos creates every drawer, modal, dropdown, menu, dock, and legacy
 * stage within the viewport. Vertical breath remains; horizontal exile leaves.
 */
@import "/style/foundation/index.css";

:where(.awtsmoospage, .all, .geelooy-home-shell, .geelooy-social-shell, .heichel-mobile-navigation, .geelooy-main-stage, .heichel-nav-panel, .grid-realms, .viewport, .dynamic-grid, .scroll-view-wrapper, #realPost, #virtual-scroll-container) {
  max-height: none !important;
  max-width: 100%;
  overflow-y: visible !important;
}

:where(.modal-gate-hidden, .modal-hidden, .hidden-void, .hidden-details, .hidden-comments, [aria-hidden="true"].modal-gate-hidden) { pointer-events: none !important; }
:where(.modal-root-open, .context-menu-layer, .typography-details:not(.hidden-details), .sidebar:not(.hidden-comments)) { pointer-events: auto !important; }

:where(.geelooy-mobile-drawer, .heichel-library-sidebar, .typography-details, .sidebar, .awtsmoos-context-menu, .card-menu-panel, .dropdown, .dropdown-menu, [role="menu"], [data-dropdown]) {
  max-block-size: calc(100dvh - var(--awts-safe-top) - var(--awts-safe-bottom) - 16px);
  max-inline-size: calc(100dvw - var(--awts-safe-left) - var(--awts-safe-right) - 16px);
  overflow-x: clip;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  z-index: var(--z-dropdown, 140);
}

:where(dialog, [role="dialog"], .modal, .modal-content, .modal-root-open) {
  border-radius: var(--radius-glass, 1.6rem);
  box-shadow: var(--shadow-modal, 0 30px 90px rgba(15,23,42,.32));
  max-block-size: calc(100dvh - var(--awts-safe-top) - var(--awts-safe-bottom) - 24px);
  max-inline-size: min(100% - 24px, var(--awts-modal-max, 760px));
  overflow: auto;
  z-index: var(--z-modal, 220);
}

:where(.geelooy-bottom-nav, .awtsmoos-floating-controls, .heichel-mobile-topbar, .home-command-dock) {
  max-inline-size: calc(100dvw - var(--awts-safe-left) - var(--awts-safe-right));
  padding-bottom: max(.75rem, var(--awts-safe-bottom));
  z-index: var(--z-dock, 80);
}

:where(.geelooy-bottom-nav, .awtsmoos-floating-controls, .heichel-mobile-topbar, .card-menu-trigger, .topbar-icon, button, a) { touch-action: manipulation; }
:where(.geelooy-home-shell, .heichel-mobile-navigation, .post-reader-localized-context.awtsmoos-reader-vision) { padding-bottom: var(--floating-clearance); }
:where(.sidebarMitzvah, .home-sidebar-panel, .card-menu-panel, .awtsmoos-context-menu, .profile-dropdown, .alias-dropdown) { max-width: calc(100dvw - var(--awts-safe-left) - var(--awts-safe-right) - 16px); overflow-wrap: anywhere; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
