/* Child-operated game pages: keep scrolling and repeated taps, suppress viewport
   zoom. The body class is installed synchronously by game-touch.js. */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  touch-action: manipulation;
  inline-size: 100%;
  max-inline-size: 100%;
  overflow-x: clip;
}
html.game-viewport, html.game-viewport body {
  touch-action: pan-x pan-y;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
/* Safari also checks the hit element (including fixed/absolute dialogs). Keep
   canvas-specific touch-action:none policies in each game stylesheet. */
:where(html.game-viewport body) :where(button,a,select,input,textarea,label,dialog,dialog *,header,nav,main,section,aside,p,h1,h2,h3,span,div) {
  touch-action: pan-x pan-y;
}
html.game-viewport canvas { max-width: 100%; }
body {
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  min-inline-size: 0;
  max-inline-size: 100%;
}
/* Include dynamically opened Player/Parents/Collection/help dialogs. */
body :not(input):not(textarea):not([contenteditable]):not([contenteditable] *) {
  -webkit-user-select: none;
  user-select: none;
}
img { -webkit-user-drag: none; }
input, textarea, [contenteditable], [contenteditable] * {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}
/* Small text fields otherwise provoke Safari's automatic focus zoom. */
@media (any-pointer: coarse) {
  input:not([type=range]):not([type=checkbox]):not([type=radio]), textarea, select {
    font-size: max(16px, 1rem) !important;
  }
}
