/* Clean Smart Pro — native one-finger scrolling fix, QA V2 (2026-10-20).
 * Root cause: legacy overflow-x:hidden on BOTH html/body and overflow:hidden
 * on main made nested scroll boxes; swipe sometimes never reached document.
 * Mobile/tablet CSS ONLY. Does not change any app data/roles/operations.
 * Keep the existing horizontal navigation and independently scrollable dialogs.
 */
@media (max-width: 780px), (hover: none) and (pointer: coarse) {
  html:root {
    overflow-x: clip !important;
    overflow-y: auto !important;
    min-height: 100% !important;
    height: auto !important;
    scroll-behavior: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  /* Do not override a deliberate modal/welcome overlay body overflow lock. */
  html:root body:not([style*="overflow"]) {
    overflow-x: clip !important;
    overflow-y: visible !important;
    height: auto !important;
  }
  html:root body #app.app,
  html:root body #app.app > main {
    overflow-x: clip !important;
    overflow-y: visible !important;
    height: auto !important;
    min-height: 0;
    touch-action: auto !important;
  }
  /* Keep horizontal navbar swipes, but permit vertical gestures to pass
     through it to the page; a finger drag on a card scrolls the page. */
  html:root body #app.app > aside nav {
    touch-action: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  html:root body #app.app > aside nav button,
  html:root body #app.app > aside nav a,
  html:root body #app.app .cspv2-area,
  html:root body #app.app .cspv2-revier-card {
    touch-action: manipulation !important;
  }
  html:root body #app.app .cspv2-areas,
  html:root body #app.app .cspv2-revier-grid,
  html:root body #app.app .cspv2-main {
    overflow-y: visible !important;
    touch-action: pan-y pinch-zoom !important;
  }
  /* Modal content is a legitimate inner scroll region; preserve it. */
  html:root body .modal .dialog,
  html:root body .cspv2-assign-dialog {
    overflow-y: auto !important;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y pinch-zoom !important;
  }
}
