/* mobile-fit.css: shared phone safety net, loaded by every page (with /static/js/mobile-fit.js).
 * Page styles still own the layout; these rules only stop content from pushing the page wider than the screen. */
.mf-scroll { width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

@media (max-width: 768px) {
  /* Not <canvas>: Chart.js sizes charts itself, and wide charts deliberately scroll inside their box. */
  img, video, iframe, embed, object { max-width: 100%; }
  img, video { height: auto; }
  svg:not([width]) { max-width: 100%; }
  pre { max-width: 100%; overflow-x: auto; white-space: pre-wrap; word-break: break-word; }
  input, select, textarea { max-width: 100%; }
  p, li, dd, dt, label, h1, h2, h3, h4, h5, h6, blockquote { overflow-wrap: break-word; }
  /* iOS zooms the page when a focused field's text is under 16px. */
  input[type="text"], input[type="search"], input[type="email"], input[type="password"], input[type="number"],
  input[type="tel"], input[type="url"], input[type="date"], select, textarea { font-size: max(16px, 1em); }
  /* Comfortable tap targets. */
  button, .btn, input[type="submit"], input[type="button"] { min-height: 36px; }
}
