/* The iPhone app's native chrome (html[data-native-chrome="none"], ios-app CONTRACT §4): iOS hides its status row and
   the app hands us the geometry as --native-* on <html> (px): --native-top / --native-bottom, the two "ears" beside the
   island (--native-ear-l-x/-w, --native-ear-r-x/-w), the row's CENTRE --native-row-y and its height --native-row-h.
   The phone bar is the web app's own bar, unchanged, under the island (env(safe-area-inset-top) = --native-top there).
   The ears hold passive status only (status.js #natEars): the time left (not on Home), network + battery right.
   An SE (no island) folds network + battery into the bar. A browser never sets the attribute: nothing here applies. */
#natEars { display: none; }
html[data-native-chrome="none"] body.phone #natEars:not([hidden]) { display: block; position: fixed; inset: 0 0 auto 0; height: 0; z-index: 40; pointer-events: none; }
html[data-native-chrome="none"] #natEars > span { position: absolute; top: calc(var(--native-row-y, 22px) - 8px); height: 16px; display: flex; align-items: center; }
html[data-native-chrome="none"] #natEars > .ne-l { left: var(--native-ear-l-x, 8px); width: var(--native-ear-l-w, 0px); justify-content: center; }
html[data-native-chrome="none"] #natEars > .ne-r { left: var(--native-ear-r-x, 0px); width: var(--native-ear-r-w, 0px); justify-content: center; }
html[data-native-chrome="none"] #natEars .ntime { color: var(--ink-2); font: 600 15px/16px var(--sans); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
/* the status pair: the shell's regular tabular figures, the same grey as its glyphs, one baseline */
html[data-native-chrome="none"] body.phone .nstat { display: inline-flex; align-items: center; gap: 8px; height: 16px; pointer-events: none; color: var(--ink-2);
  font: 400 13px/16px var(--sans); font-variant-numeric: tabular-nums; }
html[data-native-chrome="none"] body.phone .nstat > span { display: inline-flex; align-items: center; gap: 4px; height: 16px; }
html[data-native-chrome="none"] body.phone .nstat b { font: inherit; color: inherit; }
html[data-native-chrome="none"] body.phone .nstat svg.ic { width: 16px; height: 16px; display: block; }
html[data-native-chrome="none"] body.phone .nstat .lost { color: var(--stop); }
html[data-native-chrome="none"] body.phone .nstat .low { color: var(--hold-ink); }
html[data-native-chrome="none"] body.phone #sys > .nstat { flex: none; gap: 6px; margin: 0 10px 0 8px; color: var(--ink-3); }   /* one quiet group, clear of the dot and the buttons */

/* ── the bottom: the composer stays above --native-bottom; the desk runs to the edge under it ── */
html[data-native-chrome="none"] body.phone #conv > #cmp.cmp { padding-bottom: max(6px, var(--native-bottom, 0px), env(safe-area-inset-bottom)); }
/* the keyboard is up (it covers the home indicator, so no bottom inset): viewport.js measures it from visualViewport
   (kb-open; vv-short when the web view scrolled the page under the keyboard). Never from :focus: a tap on Send blurs
   the field first, the box would jump and the tap would miss. */
html[data-native-chrome="none"] body.phone:is(.kb-open, .vv-short) #conv > #cmp.cmp { padding-bottom: 6px; }

/* ── the native top bar (bridge v2 "ui", nativeui.js): html[data-native-ui~="bar"] only while the app draws the bar.
   The web bar (and the app sheet's header that stands in for it) is hidden by visibility only, so every box keeps
   its place and the popovers it anchors still open under the native control; the bar reserves --native-bar-h
   (reported by the app) when that is taller. The ears are drawn natively too. No attribute: nothing here applies. */
html[data-native-ui~="bar"] body.phone #sys,
html[data-native-ui~="bar"] body.phone #side > .sh-h { visibility: hidden !important; pointer-events: none !important; }
/* --native-bar-h = the native bar ROW (the app reports it per look); the bar box = the safe top + that row, exactly as the
   web bar's own box (core.css). Only once the app has reported it (data-native-bar-h, nativeui.js): until then the web height stays. */
html[data-native-ui~="bar"][data-native-bar-h] body.phone #sys { height: calc(env(safe-area-inset-top) + var(--native-bar-h)); }
html[data-native-ui~="bar"] #natEars { display: none !important; }
