/* Preserve native scrolling, gestures and focus handling. */
* {
  -webkit-tap-highlight-color: transparent;
}

body {
  -webkit-user-select: none;
  user-select: none;
}

/* Keep editable controls and values intended for manual copying selectable. */
:where(input, textarea, [contenteditable]:not([contenteditable="false"]),
       [data-selectable], .profile-uid, #invitationUrl, .invite-code) {
  -webkit-user-select: text;
  user-select: text;
}

/* Allow an asset or its container to opt out of decorative image behavior. */
:where(img, svg):not(:where([draggable="true"], [data-native-image-interaction],
                            [data-native-image-interaction] *,
                            [contenteditable]:not([contenteditable="false"]) *)) {
  -webkit-user-drag: none;
  user-drag: none;
  -webkit-touch-callout: none;
}


/* These controls own the click, so their artwork can pass hit testing through. */
:where(.top-actions button, .wallet-actions button, button.game-tile,
       a.game-tile, .bottom-nav a, a.game-tab, #numberGrid button)
  :where(img, svg):not(:where([data-native-image-interaction],
                             [data-native-image-interaction] *,
                             [draggable="true"], [tabindex], [onclick],
                             [contenteditable] *, [data-selectable] *)) {
  pointer-events: none;
}

/* Keep decorative artwork itself out of the text selection. */
:where(img, svg)[draggable="false"] {
  -webkit-user-select: none;
  user-select: none;
}
