/* YunaGRP Miku cursor — hybrid zero-chase build.
 * Moving: native/browser PNG cursor (instant).
 * Idle: animated WebP overlay; native cursor is fully hidden.
 * native-small keeps a 48x48 hotspot canvas but shrinks visible artwork to
 * 38x38 around the hotspot, matching the animated overlay more closely.
 */

@media (hover: hover) and (pointer: fine), (any-hover: hover) and (any-pointer: fine) {
  html.miku-cursor-native[data-miku-cursor-role="normal"]    { --miku-native-cursor: url("assets/miku-cursor/native-small/Normal.png") 0 0, auto; }
  html.miku-cursor-native[data-miku-cursor-role="link"]      { --miku-native-cursor: url("assets/miku-cursor/native-small/Link.png") 10 0, pointer; }
  html.miku-cursor-native[data-miku-cursor-role="hand"]      { --miku-native-cursor: url("assets/miku-cursor/native-small/Hand.png") 8 2, pointer; }
  html.miku-cursor-native[data-miku-cursor-role="text"]      { --miku-native-cursor: url("assets/miku-cursor/native-small/Text.png") 22 24, text; }
  html.miku-cursor-native[data-miku-cursor-role="wait"]      { --miku-native-cursor: url("assets/miku-cursor/native-small/Wait.png") 0 0, wait; }
  html.miku-cursor-native[data-miku-cursor-role="help"]      { --miku-native-cursor: url("assets/miku-cursor/native-small/Help.png") 0 0, help; }
  html.miku-cursor-native[data-miku-cursor-role="forbidden"] { --miku-native-cursor: url("assets/miku-cursor/native-small/Forbidden.png") 18 18, not-allowed; }
  html.miku-cursor-native[data-miku-cursor-role="move"]      { --miku-native-cursor: url("assets/miku-cursor/native-small/Move.png") 24 24, move; }
  html.miku-cursor-native[data-miku-cursor-role="resizeX"]   { --miku-native-cursor: url("assets/miku-cursor/native-small/ResizeX.png") 24 24, ew-resize; }
  html.miku-cursor-native[data-miku-cursor-role="resizeY"]   { --miku-native-cursor: url("assets/miku-cursor/native-small/ResizeY.png") 24 24, ns-resize; }

  /* Apply to every descendant with !important so page rules like
     button{cursor:pointer!important} cannot expose a second system cursor. */
  html.miku-cursor-native,
  html.miku-cursor-native *,
  html.miku-cursor-native *::before,
  html.miku-cursor-native *::after {
    cursor: var(--miku-native-cursor, url("assets/miku-cursor/native-small/Normal.png") 0 0, auto) !important;
  }

  html.miku-cursor-animated-idle,
  html.miku-cursor-animated-idle *,
  html.miku-cursor-animated-idle *::before,
  html.miku-cursor-animated-idle *::after {
    cursor: none !important;
  }
}

#miku-hybrid-cursor {
  position: fixed !important;
  left: 0 !important;
  top: 0 !important;
  width: 53px !important;
  height: 53px !important;
  display: block !important;
  max-width: none !important;
  max-height: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  filter: none !important;
  object-fit: contain !important;
  pointer-events: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  visibility: hidden;
  z-index: 2147483647 !important;
  transform: translate3d(-100px, -100px, 0);
  transition: none !important;
  animation: none !important;
  will-change: transform;
  contain: layout style paint;
  backface-visibility: hidden;
}
