/* Enable only after the atlas decoded and an actual mouse moved. */
html.pyatno-hand-active,
html.pyatno-hand-active * { cursor: none !important; }
.pyatno-hand-cursor {
  --hand-size: 64px;
  position: fixed;
  left: 0;
  top: 0;
  width: var(--hand-size);
  height: var(--hand-size);
  pointer-events: none !important;
  z-index: 2147483647;
  contain: layout style;
  user-select: none;
  -webkit-user-select: none;
}
.pyatno-hand-sprite {
  width: 100%;
  height: 100%;
  background: url('/assets/hand-cursor-poses.png') 0 0 / 400% 200% no-repeat;
  transform-origin: 50% 55%;
  transform: none;
}
.pyatno-hand-cursor[hidden] { display: none !important; }
/* Short stepped changes suggest depth; atlas frames never crossfade or morph. */
.pyatno-hand-cursor:is([data-state="idle"],[data-state="punch"]) .pyatno-hand-sprite {
  transition: transform 70ms steps(2, end);
}
/* The user's fist is seen from behind and recedes into the skin. */
.pyatno-hand-cursor[data-state="punch"] .pyatno-hand-sprite {
  background-image: url('/assets/hand-cursor-skin-fist.png');
  background-size: 100% 100%;
  transform-origin: 50% 22%;
}
.pyatno-hand-cursor[data-state="punch"][data-pose="2"] .pyatno-hand-sprite {
  transform: translateY(12px) scale(1.06);
}
.pyatno-hand-cursor[data-state="punch"][data-pose="3"] .pyatno-hand-sprite {
  transform: scale(.82);
}
.pyatno-hand-cursor[data-state="idle"][data-pose="4"] .pyatno-hand-sprite {
  transform: translateY(-5px) scale(.88);
}
.pyatno-hand-cursor[data-state="idle"][data-pose="5"] .pyatno-hand-sprite { transform: scale(1); }
.pyatno-hand-cursor[data-state="idle"][data-pose="6"] .pyatno-hand-sprite {
  transform: translateY(-13px) scale(.82);
}
.pyatno-hand-cursor[data-state="idle"][data-pose="7"] .pyatno-hand-sprite {
  transform: translateY(-10px) rotate(-7deg) scale(.88);
}
.pyatno-hand-cursor[data-state="idle"][data-pose="2"] .pyatno-hand-sprite {
  transform: translateY(-7px) scale(.9);
}
.pyatno-hand-cursor[data-state="idle"][data-pose="3"] .pyatno-hand-sprite {
  transform: scale(1.02);
}
@media (prefers-reduced-motion: reduce) {
  .pyatno-hand-cursor .pyatno-hand-sprite { transition: none !important; transform: none !important; }
}
/* Mirror only the three left-palm frames; the original fist frames are right-handed.
   Independent scale preserves pose transforms and reduced-motion correction. */
.pyatno-hand-cursor:is([data-pose="4"], [data-pose="5"], [data-pose="6"]) .pyatno-hand-sprite {
  scale: -1 1;
}
/* The separate first-person right fist must never inherit atlas mirroring. */
.pyatno-hand-cursor[data-state="punch"] .pyatno-hand-sprite { scale: none; }
/* Show the right thumb on the near side during the idle wind-up. */
.pyatno-hand-cursor[data-windup-ready="true"][data-state="idle"][data-pose="7"] .pyatno-hand-sprite {
  background-image: url('/assets/hand-cursor-windup-right.png');
  background-size: 100% 100%;
  scale: none;
}
