/* Friends App - Controlador único de escala y anchura móvil.
 * No afecta al escritorio. Mantiene pinch-to-zoom para accesibilidad.
 * touch-action: manipulation evita el smart/double-tap zoom sin romper scroll.
 */
@media screen and (max-width: 899px) and (pointer: coarse) {
  html {
    touch-action: manipulation;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    max-width: 100%;
    overflow-x: clip;
  }
  body {
    touch-action: manipulation;
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
  }
  /* Los scrolls internos de Momentos, Planes y Grupos también deben respetar
     el gesto. No forzamos touch-action en mapas, galerías ni carruseles. */
  :where(main, [role="main"], .app, .feed, .feed-posts, .bf-web-content,
    .bf-web-mobile-dock, [data-page-scroll]) {
    touch-action: manipulation;
  }
  /* Conservar la anchura del layout sin que una tarjeta fuerce la página.
     Los listados y tablas con su propio overflow siguen desplazándose. */
  :where(main, [role="main"], .bf-web-page, .app, .page) {
    min-width: 0;
    max-width: 100%;
  }
  :where(img, video, iframe) {
    max-width: 100%;
  }
  /* Safari amplía automáticamente todo el viewport cuando el input < 16px.
     Excluir widgets no textuales para no cambiar su tamaño ni funcionamiento. */
  :where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="hidden"]), textarea, select) {
    font-size: max(16px, 1em) !important;
  }
}
