/* Native cursors stay accurate, including over dialogs. Touch uses its normal behavior. */
@media (hover: hover) and (pointer: fine) {
  html, body { cursor: url('../assets/cursor-cabbage.svg') 4 3, auto; }
  body input, body textarea, body [contenteditable='true'], body [contenteditable=''], body [contenteditable='plaintext-only'] { cursor: text !important; }
  body a, body button, body summary, body select, body [role='button'],
  body input[type='button'], body input[type='submit'], body input[type='reset'],
  body input[type='checkbox'], body input[type='radio'], body input[type='range'], body input[type='color'] {
    cursor: url('../assets/cursor-cabbage-hover.svg') 4 3, pointer !important;
  }
  body button:disabled, body input:disabled, body select:disabled { cursor: wait !important; }
  body [aria-disabled='true'] { cursor: not-allowed !important; }
}

.eunming-cursor-trails, .eunming-cursor-trails * { pointer-events: none !important; }
.eunming-cursor-trails {
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow: hidden;
  contain: strict;
  user-select: none;
}
.eunming-cursor-leaf {
  position: absolute;
  display: block;
  width: 15px;
  height: 18px;
  background: url('../assets/cursor-cabbage-trail.svg') center / contain no-repeat;
  opacity: 0;
  transform-origin: 50% 80%;
  animation: eunming-cabbage-drift 660ms ease-out forwards;
}
@keyframes eunming-cabbage-drift {
  0% { opacity: .44; transform: translate3d(0, 0, 0) rotate(var(--angle)) scale(.95); }
  45% { opacity: .27; }
  100% { opacity: 0; transform: translate3d(var(--drift), -12px, 0) rotate(calc(var(--angle) + var(--turn))) scale(.45); }
}
@media (prefers-reduced-motion: reduce), (hover: none), (pointer: coarse) {
  .eunming-cursor-trails { display: none; }
}
