/* JoyFlock site pointer — a small paper-plane arrow.
   Festival skins swap the palette through html[data-theme]. Ordinary controls
   keep the selected pointer instead of switching to a second hover design. */
:root{
  --joy-cursor:url('/assets/cursor/plane.svg') 2 2, auto;
  --joy-cursor-hover:var(--joy-cursor);
}
html[data-theme="halloween"]{--joy-cursor:url('/assets/cursor/halloween.svg') 2 2, auto}
html[data-theme="christmas"]{--joy-cursor:url('/assets/cursor/christmas.svg') 2 2, auto}
html[data-theme="spring"]{--joy-cursor:url('/assets/cursor/spring.svg') 2 2, auto}
html[data-theme="midautumn"]{--joy-cursor:url('/assets/cursor/midautumn.svg') 2 2, auto}
html[data-theme="independence"]{--joy-cursor:url('/assets/cursor/independence.svg') 2 2, auto}
html[data-theme="thanksgiving"]{--joy-cursor:url('/assets/cursor/thanksgiving.svg') 2 2, auto}
html[data-theme="valentine"]{--joy-cursor:url('/assets/cursor/valentine.svg') 2 2, auto}
html[data-theme="stpatricks"]{--joy-cursor:url('/assets/cursor/stpatricks.svg') 2 2, auto}
html[data-theme="easter"]{--joy-cursor:url('/assets/cursor/easter.svg') 2 2, auto}

@media(hover:hover) and (pointer:fine){
  html,body{cursor:var(--joy-cursor)}
  a,button,summary,select,label,[role="button"],[role="tab"],[role="menuitem"],[role="option"],[data-control],
  [tabindex]:not([tabindex="-1"]),.game-card,.rail-game,.shop-card,.avatar-upload-picker,
  input[type="button"],input[type="submit"],input[type="checkbox"],input[type="radio"],input[type="file"]{
    cursor:var(--joy-cursor-hover)!important;
  }
  input:not([type="button"]):not([type="submit"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  textarea,[contenteditable="true"]{cursor:text!important}
  /* The cue-ball spin selector is a <canvas role="button">. The generic
     [role="button"] rule above would otherwise paint the gold-ring paper
     plane (or an equipped shop cursor) on top of the white ball, which reads
     as a stray shape. Game aim surfaces keep their plain crosshair. */
  canvas.pool-spot{cursor:crosshair!important}
}

/* Animated shop editions retain a real arrow PNG underneath a 32px SVG layer.
   The attribute is set only after BOTH assets load, while a mouse is inside a
   supported surface. Failure, touch, leaving a frame and reduced motion restore
   the ordinary complete static PNG. Never replace the system pointer with none. */
.joy-cursor-effect{position:fixed;left:0;top:0;width:32px;height:32px;max-width:none;
  pointer-events:none!important;user-select:none;z-index:2147483646;contain:layout style paint}
@media(hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference){
  html[data-shop-cursor][data-joy-cursor-animated]{--shop-cursor:var(--joy-cursor-underlay)!important}
}
@media(prefers-reduced-motion:reduce),(hover:none),(pointer:coarse){
  .joy-cursor-effect{display:none!important}
}
