html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: #fff; }
#screen { position: fixed; inset: 0; overflow: hidden; }
#error { position: fixed; inset: 20% 8% auto; background: white; color: #242424; padding: 1.5rem; font: 16px/1.5 system-ui, sans-serif; }


/* mobile-cursor-hidden-v1 */
@media (hover: none) and (pointer: coarse) {
  #screen, #screen * {
    cursor: none !important;
  }
  body > canvas[style*="position: fixed"][style*="pointer-events: none"] {
    visibility: hidden !important;
  }
}


/* single-local-desktop-pointer-v1 */
body > canvas[style*="position: fixed"][style*="pointer-events: none"] {
  visibility: hidden !important;
}
@media (hover: hover) and (pointer: fine) {
  #screen, #screen * {
    cursor: default !important;
  }
}



/* mobile-keyboard-v1 */
#mobile-keyboard-button {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 10000;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid #bbb;
  border-radius: 22px;
  background: #fff;
  color: #222;
  font: 16px/1.2 system-ui, sans-serif;
  box-shadow: 0 2px 8px #0002;
  touch-action: manipulation;
}
#mobile-keyboard-button:disabled { opacity: .5; }
#mobile-keyboard-input {
  position: fixed;
  left: 0;
  bottom: 12px;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  opacity: 0;
  font-size: 16px;
  pointer-events: none;
}

/* desktop-selection-single-paint-v97 */
/* Firefox paints the text and selection in the remote framebuffer. Desktop
   native editing fields must remain focusable and selectable without painting
   a second OS/browser selection highlight. Color transparency alone is not
   enough for selected native inputs. Keep touch-only field rendering unchanged. */
@media (hover: hover) and (pointer: fine) {
  #mobile-native-fields > input,
  #mobile-native-fields > textarea {
    opacity: 0 !important;
  }
}
