/* Stage 54: shared responsive safeguards. Scoped to layout resilience. */
html { -webkit-text-size-adjust: 100%; }
img, video, svg { max-width: 100%; }
img, video { height: auto; }
body { overflow-wrap: break-word; }
input, select, textarea, button { max-width: 100%; }
@media (max-width: 768px) {
  main, section, article, .container, .wrap { min-width: 0; }
  .grid, .grid3, .form-grid, .panel-body { min-width: 0; }
  .grid > *, .grid3 > *, .form-grid > *, .panel-body > * { min-width: 0; }
  table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  pre, code { overflow-wrap: anywhere; }
  input, select, textarea { font-size: max(16px, 1em); }
}
@media (max-width: 420px) {
  .actions, .photo-tools { min-width: 0; }
  .actions > *, .photo-tools > * { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
