@media (any-pointer: fine) and (forced-colors: none) {
  :root {
    --kg-fish-sight: url("./mega-star-sight.e4f56.png");
    --kg-cursor-arrow: url("./kraken-arrow.9e2b1.png") 1 1;
    --kg-cursor-aim: url("./kraken-aim.d40f3.png") 20 20;
  }

  :root, :root body, canvas, #GameCanvas, #Cocos2dGameContainer, #Cocos3dGameContainer {
    cursor: var(--kg-cursor-arrow), auto;
  }

  :is(a[href], button, [role="button"], input:is([type="button"], [type="submit"], [type="reset"])):not(:disabled, [aria-disabled="true"]),
  :is([style*="cursor: pointer"], [style*="cursor:pointer"]) {
    cursor: var(--kg-cursor-arrow), pointer !important;
  }

  canvas:is([style*="cursor: default"], [style*="cursor:default"], [style*="cursor: auto"], [style*="cursor:auto"]) {
    cursor: var(--kg-cursor-arrow), auto !important;
  }

  input:not([type]), input:is([type="text"], [type="password"], [type="email"], [type="number"], [type="search"], [type="tel"], [type="url"]),
  textarea, [contenteditable]:not([contenteditable="false"]) {
    cursor: text;
  }

  /* The fish clients set the canvas's aiming cursor via CSSOM at runtime. */
  canvas:is([style*="cursor: crosshair"], [style*="cursor:crosshair"]) {
    cursor: var(--kg-cursor-aim), crosshair !important;
  }

  :root canvas[data-kg-fish-cursor="aim"] {
    cursor: none !important;
  }

  :root canvas[data-kg-fish-cursor="arrow"] {
    cursor: var(--kg-cursor-arrow), pointer !important;
  }
}

/* Mega Star's 92-unit MouseMark uses a four-second clockwise turn and a one-second 10% pulse. */
@media (any-pointer: fine) and (forced-colors: none) {
  [data-kg-fish-sight]:not([hidden]) {
    position: fixed;
    z-index: 2147483647;
    display: block;
    pointer-events: none;
    transform: translate(-50%, -50%);
  }

  [data-kg-fish-sight]::before {
    content: "";
    display: block;
    width: 100%;
    height: 100%;
    background: var(--kg-fish-sight) center / contain no-repeat;
    animation: kg-fish-turn 4s linear infinite, kg-fish-pulse 1s linear infinite;
  }
}

@keyframes kg-fish-turn {
  from { rotate: 0deg; }
  to { rotate: 360deg; }
}

@keyframes kg-fish-pulse {
  0%, 100% { scale: 1; }
  50% { scale: 1.1; }
}
