/* The page itself. Components carry their own styles in their shadow roots
   (src/components/base.js); only what must be on the document is here. */

*, *::before, *::after { box-sizing: border-box; }

/* touch-action: manipulation keeps panning and pinch-zoom and turns off
   double-tap zoom, which iOS Safari otherwise does on two quick taps
   anywhere that isn't a link or a field (T75, owner 2026-11-21: "sometimes
   it will zoom in on Safari and unclear why"). The map's canvas sets its
   own touch-action, and its own double-tap zoom still works. */
html { height: 100%; -webkit-text-size-adjust: 100%; touch-action: manipulation; }

body {
  margin: 0;
  min-height: 100%;
  background: var(--g4-bg);
  color: var(--g4-text);
  font-family: var(--g4-font);
  font-size: var(--g4-text-md);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

#app { min-height: 100dvh; display: flex; flex-direction: column; }
#app > * { flex: 1; }

.plain-note { max-width: 34rem; margin: 3rem auto; padding: 0 1rem; }

/* A sheet is open over the page: the page beneath holds still
   (utils/sheet-drag.js, holdPage). */
html[data-held], html[data-held] body { overflow: hidden; overscroll-behavior: none; }

/* The field floor on the document itself (TAXONOMY 9.2.1.47): 16 px or
   more in anything that opens a keyboard, or iOS Safari zooms the page.
   Fields inside components get the same rule from components/base.js
   (fieldFloor), since this sheet can't reach a shadow root. */
input:not(:where([type="hidden"], [type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="file"], [type="button"], [type="submit"], [type="reset"], [type="image"])),
textarea, select, [contenteditable=""], [contenteditable="true"] {
  font-size: var(--g4-field-font-size, max(16px, 1rem));
}
