/* No browser double-tap/hold/pinch zoom, including scrollable menus. Zero
   specificity keeps each game's canvas/joystick touch-action:none authoritative. */
:where(html.mobile-gestures, html.mobile-gestures *) { touch-action: pan-x pan-y; }
html.mobile-gestures { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
/* Home-screen web apps on iPhone (mobile.js): a root as tall as the large
   viewport makes iOS lay the page out over the whole screen, not one status
   bar short of the bottom. Nothing scrolls: the root is the viewport. */
html.ios-web-app { height: 100vh; height: 100lvh; }
html.mobile-gestures, html.mobile-gestures * {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-tap-highlight-color: transparent;
}
/* Mark only game-owned pointer/touch surfaces, never a page or a menu. The JS
   guard also cancels native touchstart here: CSS alone cannot stop iOS's loupe. */
html.mobile-gestures [data-game-input] { touch-action: none; }
/* Names, room codes and chat remain editable, including copy/paste. A 16px
   minimum prevents iPhone Safari's automatic zoom when focusing a small field. */
html.mobile-gestures :is(input, textarea, [contenteditable="true"]) {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}
html.mobile-gestures :is(input, textarea, select, [contenteditable="true"]) { font-size: max(16px, 1em) !important; }
