/* System bar insets for every padded edge (status bar, notch, home indicator, Android navigation bar). Use var(--sa-t|b|l|r) instead of
   env(safe-area-inset-*): it is the larger of the browser's env() value and the inset the Dock Android app hands the page
   (--dock-inset-*, dock-mobile lib/src/system_insets.dart). Android WebView's env() is 0 on older WebView versions and the real bar on
   newer ones; max() never adds the two, so the app draws edge to edge with no gap and no overlap. iOS / browsers: --dock-inset-* is
   unset (0px), so this is exactly env(). Callers keep env() as the var() fallback for pages that do not load this file. */
:root{
  --sa-t:max(env(safe-area-inset-top),var(--dock-inset-top,0px));
  --sa-b:max(env(safe-area-inset-bottom),var(--dock-inset-bottom,0px));
  --sa-l:max(env(safe-area-inset-left),var(--dock-inset-left,0px));
  --sa-r:max(env(safe-area-inset-right),var(--dock-inset-right,0px));
}
/* Dock Mac desktop app (html.mac-titlebar, public/native-insets.js): the traffic lights cover the top-left ~80 x 28 px of the window.
   --topin (chat-polish.css, the top band of the rail / list / chat header, 30px elsewhere) clears them; at phone width the title bar counts
   as a system bar, so every --sa-t padded header (phone-shell.css, pwa-ui.css) moves below it. The collapsed rail: resize-ui.css. */
html.mac-titlebar{--titlebar-inset:28px;--topin:calc(var(--titlebar-inset) + 10px);--sa-t:max(env(safe-area-inset-top),var(--titlebar-inset))}
/* A shell that hides the rail and draws its own top bar from the window's top-left corner carries class tl-clear on that bar (the Admin
   console .adx-top). In the Mac app the bar moves DOWN below the traffic lights' band: the band is the bar's own padding-top
   (var(--titlebar-inset)), drawn in the bar's background, and drags the window like the rest of the bar; the bar's controls stay
   clickable (no-drag). content-box keeps the bar's own height for its row of controls, so the band is added above it, not carved out of it.
   David 2026-10-26 ("the traffic lights sat on '< Dock'"), then 2026-11-03, third time: "the top bar should be lower, the close minimize
   expand button is overlaying". The earlier fix only padded LEFT (80px), so the lights still sat inside the bar. Anywhere else the class
   does nothing. Phone width: the app view pads below the band itself (pwa-ui.css, --sa-t), which left the band a dead, undraggable strip
   above the bar; there the app view drops that padding and the bar carries the band on top of its phone padding (8px, mobile-fit.css).
   Full-window overlays (Minutes .mn-ov, Drive viewer .dv, mobile-fit.css) pad by var(--sa-t) instead, so they already start below the band. */
html.mac-titlebar .tl-clear{padding-top:var(--titlebar-inset);box-sizing:content-box;-webkit-app-region:drag}
html.mac-titlebar .tl-clear *{-webkit-app-region:no-drag}
@media(max-width:800px){html.mac-titlebar body.appmode #appview:has(.tl-clear){padding-top:0}html.mac-titlebar body #appview .tl-clear{padding-top:calc(var(--titlebar-inset) + 8px)}}
/* phone-width layout in the Mac app: the list's sticky head (phone-shell.css) is the bar under the traffic lights, so it drags the window
   (#side * is no-drag in index.html); its buttons stay clickable */
@media(max-width:800px){html.mac-titlebar #side .sh2.psh-head{-webkit-app-region:drag}html.mac-titlebar #side .sh2.psh-head *{-webkit-app-region:no-drag}}
