/* ============================================================================
   Yard Registry — shared mobile safety baseline.
   Loaded AFTER each page's own styles. Every rule is gated behind a small-screen
   media query, so desktop rendering is byte-for-byte unchanged. This file only
   provides UNIVERSAL element guards (media, tables, code, long words). Page-level
   layout reflow (nav, grids, fixed-width panels) is handled per page.
   ============================================================================ */

@media (max-width: 640px) {
  /* Media never forces horizontal scroll */
  img, svg, video, canvas, iframe, object, embed {
    max-width: 100%;
    height: auto;
  }

  /* Wide tables scroll inside their own box instead of stretching the page */
  table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Code / preformatted blocks wrap instead of pushing the layout wide */
  pre, code, kbd, samp {
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  /* Long unbroken strings (URLs, hashes, emails) wrap */
  a, p, h1, h2, h3, td, th, li, span, div.break {
    overflow-wrap: anywhere;
  }

  /* Embedded Leaflet/map containers stay inside the viewport */
  .leaflet-container { max-width: 100%; }
}
