/* One scrolling owner in both iPad orientations. The outer shell must not
   acquire its own momentum when a Home shelf reaches an edge. */
@media (hover: none) and (pointer: coarse) {
  html body main.app-shell {
    position: fixed !important;
    inset: 0 !important;
    overflow: hidden !important;
    overscroll-behavior: none !important;
  }

  html body main.app-shell > section.map-stage.home-focus {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: none !important;
    scroll-behavior: auto !important;
    padding-bottom: 0 !important;
  }

  /* The dashboard supplies the nav clearance once, not on both ancestors. */
  html body main.app-shell > section.map-stage.home-focus #homeDashboard.home-dashboard:not(.is-empty-home) {
    margin-bottom: 0 !important;
    padding-bottom: calc(var(--bottom-nav-height, 84px) + env(safe-area-inset-bottom, 0px) + 24px) !important;
  }

  /* Keep the actual scroll surface untransformed while its tiles repaint.
     A fresh auth/media render must not promote the entire tall Home rail. */
  html body main.app-shell > section.map-stage.home-focus .hero-copy {
    transform: none !important;
    will-change: auto !important;
  }

  /* Touch Home is a normal painted scroll surface. Legacy entrance rules
     retained opacity animations, hidden backfaces and promoted layers after
     entry; removing only the hero transform left the other layers behind.
     Do not hide real content while waiting for a reveal timer or scroll. */
  html body main.app-shell > section.map-stage.home-focus .hero-copy,
  html body main.app-shell > section.map-stage.home-focus #homeMemoryPulse,
  html body main.app-shell > section.map-stage.home-focus #homeSyncConfidence,
  html body main.app-shell > section.map-stage.home-focus #homeDashboard.home-dashboard > .home-section,
  html body main.app-shell > section.map-stage.home-focus #homeDashboard.home-dashboard .home-mappi-bottom-note,
  html body main.app-shell > section.map-stage.home-focus #homeDashboard.home-dashboard :is(.today-memory-card, .memory-echo-feature-card, .memory-echo-body, .memory-echo-thumb, .life-chapter-card, .recent-memory-feature) {
    animation: none !important;
    transform: none !important;
    backface-visibility: visible !important;
    -webkit-backface-visibility: visible !important;
    will-change: auto !important;
  }

  /* These surfaces already own their gradient/glass paint. Blurring the
     entire scrolling shelf behind that paint adds a second backing surface. */
  html body main.app-shell > section.map-stage.home-focus #homeMemoryPulse,
  html body main.app-shell > section.map-stage.home-focus #homeDashboard.home-dashboard > .home-section {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}
