/* Shared chrome geometry: safe area lives OUTSIDE the dock exactly once.
   JS refines clearance from the rendered dock, including localized labels.
   Layers: header 50 < dock 100 < sheet 1000 < drawer 5000 < dialog 6000. */
.dash-bottom,.site-dock {display:none;}
.baveo-app:not(.dash-app) {padding-bottom:var(--mobile-dock-clearance);}
.baveo-app.public-resume {padding-bottom:0;--footer-dock-clearance:var(--mobile-dock-clearance);}
@media(max-width:900px) {
  :root {--mobile-dock-clearance:calc(var(--mobile-dock-height) + 2 * var(--mobile-dock-gap) + env(safe-area-inset-bottom,0px));}
  body.dash-app .dash-main {padding-bottom:var(--mobile-dock-clearance);}
  .dash-app .site-dock {display:none;}
  .dash-bottom,.baveo-app:not(.dash-app) .site-dock {
    display:flex;position:fixed;inset:auto var(--mobile-dock-gap) calc(var(--mobile-dock-gap) + env(safe-area-inset-bottom,0px));
    width:auto;max-width:none;height:var(--mobile-dock-height);min-height:var(--mobile-dock-height);padding:4px;margin:0;gap:3px;
    align-items:stretch;justify-content:space-around;box-sizing:border-box;border-radius:22px;
    border:1px solid var(--color-border);background:var(--glass-strong);box-shadow:var(--shadow-md);z-index:var(--layer-dock);
    backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);
  }
  .dash-bottom :is(a,button),.site-dock a {
    display:flex;flex:1 1 0;flex-direction:column;align-items:center;justify-content:center;gap:4px;
    min-width:0;min-height:44px;max-height:none;height:auto;width:auto;margin:0;padding:5px 2px;
    border:0;border-radius:17px;background:transparent;color:var(--color-text-muted);font:inherit;font-size:11px;font-weight:700;line-height:1.3;text-decoration:none;cursor:pointer;
  }
  .dash-bottom :is(a,button).is-on,.site-dock a.is-on {color:var(--color-primary);background:var(--color-primary-soft);}
  .dash-bottom i,.site-dock i {font-size:21px;width:24px;height:24px;line-height:24px;margin:0;}
  .dash-bottom span,.site-dock span {max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .dash-bottom :focus-visible,.site-dock :focus-visible {outline:2px solid var(--color-focus);outline-offset:-2px;}
  .mobile-safe-actions {position:sticky;bottom:var(--mobile-dock-clearance);z-index:20;}
   /* The PWA connectivity notice uses the same clearance via pwa-fixes.css. */
  html.has-editable-focus :is(.dash-bottom,.site-dock,.market-mobile-dock,.public-mobile-bookbar) {visibility:hidden;pointer-events:none;}
}
.nav-drawer-root {z-index:var(--layer-drawer);}
.nav-drawer-panel {padding-bottom:calc(15px + env(safe-area-inset-bottom,0px));}
.nav-drawer-panel > :is(section,nav,div,form,p) {flex-shrink:0;}
.nav-drawer-head {background:var(--color-surface-elevated);border-radius:12px;}
.nav-drawer-dim,.sheet-dim {background:var(--color-overlay);}
.dash-more {z-index:var(--layer-sheet);}
.dash-more-panel {max-height:calc(100dvh - env(safe-area-inset-top,0px) - 12px);overscroll-behavior:contain;}
.nav-drawer-close,.nav-toggle,.drawer-gender-switch button {min-height:44px;min-width:44px;}
/* The same gender controls remain available in the drawer on narrow phones. */
@media(max-width:350px) {.site-header .nav-gender-switch {display:none;}}
@media(prefers-reduced-motion:reduce) {.dash-bottom,.site-dock {transition:none;}}

/* Ordinary surfaces do not need to sample and blur the scrolling page.
   Keep borders, shadows and theme tokens; overlays retain their own effects. */
html .baveo-app :is(.glass-1,.glass-2,.glass-3,.glass-card,.dash-panel,.dash-card,
  .metric-card,.auth-card,.review-card,.how-card,.nearby-item,.plan-card,
  .plan-box,.float-card,.filter-chips,.search-shell,.provider-card,.best-card,
  .chip,.fav-btn,.sample-badge,.income-card,.crm-history-card,.crm-history-item,
  .slot-chip,.jdp-field-control,.scene-card,.footer-brand-mark,.trust-seals),
html .baveo-app .plan-box.plan-banner,
html .slot-chip span,
html .search-shell::before {
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
}
html :is(.site-header,.dash-top,.dash-sidebar,.dash-bottom,.site-dock,
  .market-mobile-dock,.public-mobile-bookbar) {
  background:var(--color-surface-elevated);
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
}


/* One mobile editing contract, loaded after page styles. */
@media (max-width:900px), (pointer:coarse) {
  html body :is(input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=button]):not([type=submit]):not([type=reset]),select,textarea,[contenteditable=true],[contenteditable=""],[contenteditable=plaintext-only]) {
    font-size:16px;line-height:1.5;
  }
}
button,input[type=submit],input[type=button],[role=button] {touch-action:manipulation;}
