/* Phone typing stability (Android Chrome / Edge + iOS). v1 2026-10-09
   Loaded last on the site/person log pages. Theme-neutral: no colors. */

/* Edge/Chrome Android font boosting: never inflate text when the layout changes */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

/* Root cause on the case-entry pages: .layout used 1fr (= minmax(auto,1fr)), so a long
   interpreter name in the "By interpreter / By provider" tallies (white-space:nowrap,
   overflow:visible under :has(a.person-rail)) set the column's min-content width to ~574px
   on a 412px phone. Every input (incl. Doctor or provider) became 532px wide; Maroon and
   Enterprise clipped the right edge, Classic scrolled sideways and panned on focus. */
html body .layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 860px) { html body .layout { grid-template-columns: minmax(0, 1fr); } }
html body .layout > *, html body .panel, html body .field, html body .field-row > * { min-width: 0; }
html body .tally-row { min-width: 0; }
html body .tally-row .name { min-width: 0; }
html body .tally-row .mins { flex: 0 0 auto; }

/* Form controls never wider than their cell */
.app input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]),
.app select, .app textarea { max-width: 100%; box-sizing: border-box; }

/* 16px text in fields on touch phones (stops iOS focus-zoom; harmless on Android) */
@media (max-width: 640px), (pointer: coarse) {
  .app input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]),
  .app select, .app textarea { font-size: max(16px, 1em) !important; }
}

/* Viewport-height layout: use the small viewport so the keyboard/toolbar can't reflow it */
@supports (min-height: 100svh) {
  body, .app { min-height: 100svh; }
  .gate { min-height: 100svh; }
}

/* Hide the floating "Choose your theme" pill while typing on a touch device */
html.lais-typing .lais-theme-host { display: none !important; }
