/* Phase 223.28.13 — iOS Safari layout guardrails.
   Scoped to Dashboard and Value only; desktop and data logic unchanged. */
@supports (-webkit-touch-callout: none) {
  html { -webkit-text-size-adjust: 100%; }
}
@media (max-width: 767px) {
  #collectionDashboardView, #collectionValueView { width:100%; min-width:0; max-width:100%; overflow-x:clip; }
  #collectionDashboardView *, #collectionValueView * { box-sizing:border-box; }
  #collectionDashboardView .dashboard-hero-grid,
  #collectionValueView .value-hero-grid { grid-template-columns:minmax(0,1fr)!important; min-width:0; gap:24px!important; }
  #collectionDashboardView .dashboard-hero,
  #collectionValueView .value-hero { padding-left:max(20px,env(safe-area-inset-left))!important; padding-right:max(20px,env(safe-area-inset-right))!important; }
  #collectionDashboardView .dashboard-hero h1,
  #collectionValueView .value-hero h1 { font-size:clamp(2.9rem,12vw,5.2rem)!important; line-height:1.02!important; overflow-wrap:normal; letter-spacing:-.065em; }
  #collectionDashboardView .dashboard-hero-grid p,
  #collectionValueView .value-hero-grid p { max-width:100%; font-size:clamp(.95rem,3.8vw,1.1rem); line-height:1.55; }
  #collectionDashboardView .dashboard-local-nav,
  #collectionValueView .value-local-nav { display:flex; flex-wrap:nowrap; overflow-x:auto!important; -webkit-overflow-scrolling:touch; overscroll-behavior-x:contain; max-width:100%; scrollbar-width:none; }
  #collectionDashboardView .dashboard-local-nav::-webkit-scrollbar,
  #collectionValueView .value-local-nav::-webkit-scrollbar { display:none; }
  #collectionDashboardView .dashboard-local-nav a,
  #collectionValueView .value-local-nav a { flex:0 0 auto; }
  #collectionDashboardView .dashboard-kpis,
  #collectionValueView .value-metrics { grid-template-columns:minmax(0,1fr)!important; }
  #collectionDashboardView .dashboard-kpis > *,
  #collectionValueView .value-metric { min-width:0; max-width:100%; }
  #collectionDashboardView .dashboard-kpis strong,
  #collectionValueView .value-metric strong { font-size:clamp(2rem,10vw,4.2rem)!important; overflow-wrap:anywhere; line-height:1.05; }
}
