/* ========================================================================
   GaliVue V5.1.110 — MOBILE WORKSPACE SHELL CONTRACT
   Corrective presentation-only patch.

   V5.1.109 made #dashboardPanel itself the mobile scroll container. That was
   wrong for the existing app shell: .gv39-mobile-nav is intentionally anchored
   absolutely to #dashboardPanel, so scrolling the panel moved the bottom dock
   through the page content.

   The established mobile/tablet architecture is restored here:
   - #dashboardPanel = fixed app viewport / non-scrolling shell
   - .gv39-dashboard-main = the only compact-screen content scroller
   - .workspace-head = sticky inside that scroller
   - .gv39-mobile-nav = anchored to the shell bottom and never enters content

   No auth, route, API, D1, R2, Stripe, Resend, project state, Client Selection,
   Final Delivery, Admin or HERO business logic is changed.
   ======================================================================== */

@media (max-width:1100px) {
  #dashboardPanel.gv39-dashboard-panel {
    overflow: hidden !important;
    overscroll-behavior: none !important;
  }

  #dashboardPanel .gv39-dashboard-layout {
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  #dashboardPanel .gv39-dashboard-main {
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: contain !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-padding-top: 72px !important;
  }

  #dashboardPanel .workspace-head {
    position: sticky !important;
    top: 0 !important;
    z-index: 220 !important;
    transform: none !important;
    will-change: auto !important;
    background: rgba(251,250,246,.97) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
  }

  /* Preserve the existing app-dock geometry. This is deliberately absolute,
     not part of .gv39-dashboard-main, so it cannot scroll into the feed. */
  #dashboardPanel .gv39-mobile-nav {
    position: absolute !important;
    left: 50% !important;
    right: auto !important;
    bottom: max(8px, env(safe-area-inset-bottom)) !important;
    z-index: 220 !important;
    transform: translateX(-50%) !important;
  }
}

@media (orientation:landscape) and (max-height:600px) and (max-width:1100px) {
  #dashboardPanel .workspace-head {
    position: sticky !important;
    top: 0 !important;
    z-index: 220 !important;
  }
}
