/* Scoped to gaming portal pages and standalone games. Native 32px cursors,
   with an accurate tip hotspot, a PNG fallback, and no pointer-tracking JS. */
@media (any-pointer: fine) {
  html[data-wv-game-cursors] {
    --wv-cursor: url('/cursors/waifu-pointer.svg?v=3') 9 8, url('/cursors/waifu-pointer.png?v=3') 9 8, auto;
    --wv-text-cursor: url('/cursors/waifu-text.svg?v=3') 16 16, url('/cursors/waifu-text.png?v=3') 16 16, text;
  }
  html[data-wv-game-cursors], html[data-wv-game-cursors] :where(body, body *) { cursor: var(--wv-cursor) !important; }

  /* Keep editing, resizing, dragging and game aiming recognizable. */
  html[data-wv-game-cursors] :where(textarea, input:not([type]), input[type=text], input[type=search], input[type=email], input[type=url], input[type=tel], input[type=password], input[type=number], [contenteditable=true], [contenteditable=true] *, .cursor-text) { cursor: var(--wv-text-cursor) !important; }
  html[data-wv-game-cursors] :where(:disabled, [aria-disabled=true], .cursor-not-allowed) { cursor: not-allowed !important; }
  html[data-wv-game-cursors] :where(.cursor-wait, [aria-busy=true]) { cursor: progress !important; }
  html[data-wv-game-cursors] :where(.cursor-crosshair, .bw-aiming) { cursor: crosshair !important; }
  html[data-wv-game-cursors] :where(.cursor-grab, .bw-float .bw-bar, .pnw-float .pnw-winbar, .pnw-board canvas) { cursor: grab !important; }
  html[data-wv-game-cursors] :where(.cursor-grabbing, .bw-float .bw-bar:active, .pnw-float .pnw-winbar:active, .pnw-board canvas:active) { cursor: grabbing !important; }
  html[data-wv-game-cursors] :where(.cursor-move) { cursor: move !important; }
  html[data-wv-game-cursors] :where(.cursor-ew-resize, .cursor-col-resize) { cursor: ew-resize !important; }
  html[data-wv-game-cursors] :where(.cursor-ns-resize, .cursor-row-resize) { cursor: ns-resize !important; }
  html[data-wv-game-cursors] :where(.cursor-nwse-resize) { cursor: nwse-resize !important; }
  html[data-wv-game-cursors] :where(.cursor-nesw-resize) { cursor: nesw-resize !important; }
  html[data-wv-game-cursors] :where(.cursor-none) { cursor: none !important; }

  /* Editors set transient tool cursors inline; retain those tool signals. */
  html[data-wv-game-cursors] :where([style*="cursor: text"], [style*="cursor:text"]) { cursor: var(--wv-text-cursor) !important; }
  html[data-wv-game-cursors] :where([style*="cursor: grab"], [style*="cursor:grab"]) { cursor: grab !important; }
  html[data-wv-game-cursors] :where([style*="cursor: grabbing"], [style*="cursor:grabbing"]) { cursor: grabbing !important; }
  html[data-wv-game-cursors] :where([style*="cursor: crosshair"], [style*="cursor:crosshair"]) { cursor: crosshair !important; }
  html[data-wv-game-cursors] :where([style*="cursor: move"], [style*="cursor:move"]) { cursor: move !important; }
  html[data-wv-game-cursors] :where([style*="cursor: ew-resize"], [style*="cursor:ew-resize"], [style*="cursor: col-resize"], [style*="cursor:col-resize"]) { cursor: ew-resize !important; }
  html[data-wv-game-cursors] :where([style*="cursor: ns-resize"], [style*="cursor:ns-resize"], [style*="cursor: row-resize"], [style*="cursor:row-resize"]) { cursor: ns-resize !important; }
  html[data-wv-game-cursors] :where([style*="cursor: nwse-resize"], [style*="cursor:nwse-resize"]) { cursor: nwse-resize !important; }
  html[data-wv-game-cursors] :where([style*="cursor: nesw-resize"], [style*="cursor:nesw-resize"]) { cursor: nesw-resize !important; }
  html[data-wv-game-cursors] :where([style*="cursor: none"], [style*="cursor:none"]) { cursor: none !important; }
}
