/* The Gacha machine of zenux's GIF (Work-ID 20261105-gacha-machine-gif-3c5e, card "Gatcha"; Tools/gacha_gif_sheet.py, ui/gacha/machine/): a transparent sheet of 10 frames, played by gacha.js through
   data-frame on .gx-sprite (the hand puts the coin, turns the knob, the pile churns); then the drawn ball, in the colour of its rarity, comes out of the chute and rolls to the floor along the GIF's ball path.
   The old picture (.gx-machine), its pile (.gx-globe) and the slot glow stay in the DOM but are not painted. Presentation only: nothing here decides a result.
   Geometry: the wrap is the machine's 340 px of the GIF (width = 0.7735 of its height); the sheet's frame is 271x352 (12 px under the feet for the landing ball), centred on the wrap.
   Positions below are the GIF's pixels: top = y / 340, width = px / 340 / 0.7735.
   Hover geometry (AGENTS.md): nothing here belongs to a control; every size is authored and none changes with pointer or selection state. */
#modal#modal[data-view="gacha"][data-view][data-view][data-view][data-view] .gx-machine-wrap>:is(.gx-machine,.gx-globe,.gx-slot){visibility:hidden!important}
#modal#modal[data-view="gacha"][data-view][data-view][data-view][data-view] .gx-machine-wrap>.gx-sprite{position:absolute;z-index:1;left:50%;top:0;height:103.53%;aspect-ratio:271/352;transform:translateX(-50%);background:url("machine/sheet.webp") 0 0/1000% 100% no-repeat;pointer-events:none;transition:opacity .25s}
#modal#modal[data-view="gacha"][data-view][data-view][data-view][data-view] .gx-machine-wrap>.gx-sprite[data-frame="1"]{background-position:11.1111% 0}
#modal#modal[data-view="gacha"][data-view][data-view][data-view][data-view] .gx-machine-wrap>.gx-sprite[data-frame="2"]{background-position:22.2222% 0}
#modal#modal[data-view="gacha"][data-view][data-view][data-view][data-view] .gx-machine-wrap>.gx-sprite[data-frame="3"]{background-position:33.3333% 0}
#modal#modal[data-view="gacha"][data-view][data-view][data-view][data-view] .gx-machine-wrap>.gx-sprite[data-frame="4"]{background-position:44.4444% 0}
#modal#modal[data-view="gacha"][data-view][data-view][data-view][data-view] .gx-machine-wrap>.gx-sprite[data-frame="5"]{background-position:55.5556% 0}
#modal#modal[data-view="gacha"][data-view][data-view][data-view][data-view] .gx-machine-wrap>.gx-sprite[data-frame="6"]{background-position:66.6667% 0}
#modal#modal[data-view="gacha"][data-view][data-view][data-view][data-view] .gx-machine-wrap>.gx-sprite[data-frame="7"]{background-position:77.7778% 0}
#modal#modal[data-view="gacha"][data-view][data-view][data-view][data-view] .gx-machine-wrap>.gx-sprite[data-frame="8"]{background-position:88.8889% 0}
#modal#modal[data-view="gacha"][data-view][data-view][data-view][data-view] .gx-machine-wrap>.gx-sprite[data-frame="9"]{background-position:100% 0}
#modal#modal[data-view="gacha"][data-view][data-view][data-view][data-view] .gacha-stage[data-phase="reveal"][data-step="open"] .gx-machine-wrap>.gx-sprite{opacity:.2}
#modal#modal[data-view="gacha"][data-view][data-view][data-view][data-view] .gacha-stage .gx-machine-wrap{animation:none!important}   /* the GIF's machine does not rumble: its frames are the motion */
/* the chute: the drawn ball shows small inside the lit chute (the GIF's frames 9-10), then it is out on the floor in front of the machine (11-13) with its sparks */
#modal#modal[data-view="gacha"][data-view][data-view][data-view][data-view] .gx-machine-wrap>.gx-chute-ball{position:absolute;z-index:2;left:50%;top:82.35%;width:12.17%;height:auto;aspect-ratio:1;margin:-6.1% 0 0 -7.1%;opacity:0;pointer-events:none;image-rendering:auto}
#modal#modal[data-view="gacha"][data-view][data-view][data-view][data-view] .gx-machine-wrap>.gx-gsparks{position:absolute;z-index:2;left:50%;top:81.18%;width:60.84%;height:auto;aspect-ratio:160/56;margin-left:-30.6%;opacity:0;pointer-events:none;background:var(--gacha-color,#ffd35c);-webkit-mask:url("machine/sparks.png") center/100% 100% no-repeat;mask:url("machine/sparks.png") center/100% 100% no-repeat}
#modal#modal[data-view="gacha"][data-view][data-view][data-view][data-view] .gacha-stage[data-phase][data-step] .gx-machine-wrap>.gacha-ball{left:50%!important;top:92.35%!important;width:19.77%!important;height:auto!important;aspect-ratio:1;margin:-9.88% 0 0 -9.88%!important;image-rendering:auto!important;z-index:3}
#modal#modal[data-view="gacha"][data-view][data-view][data-view][data-view] .gacha-stage[data-phase="reveal"][data-step="drop"] .gx-machine-wrap>.gx-chute-ball{animation:gx-gchute var(--gx-drop-ms,2600ms) ease-in-out both!important}
#modal#modal[data-view="gacha"][data-view][data-view][data-view][data-view] .gacha-stage[data-phase="reveal"][data-step="drop"] .gx-machine-wrap>.gx-gsparks{animation:gx-gsparks var(--gx-drop-ms,2600ms) ease-out both!important}
#modal#modal[data-view="gacha"][data-view][data-view][data-view][data-view] .gacha-stage[data-phase="reveal"][data-step="drop"] .gx-machine-wrap>.gacha-ball{animation:gx-gout var(--gx-drop-ms,2600ms) ease-out both!important}
/* the GIF's pace over the drop step: the ball shows in the chute for its two frames (to 42%), then it is out and settles in front of the feet (the other three frames) */
@keyframes gx-gchute{0%{opacity:0;transform:scale(.55)}8%{opacity:1;transform:scale(1)}41%{opacity:1;transform:translateY(9%) scale(1.04)}42%,100%{opacity:0;transform:translateY(9%) scale(1.04)}}
@keyframes gx-gout{0%,42%{opacity:0;transform:translateY(-11.5%) scale(.84)}43%{opacity:1;transform:translateY(-11.5%) scale(.9)}60%{opacity:1;transform:translateY(-11.5%) scale(1.07)}78%,100%{opacity:1;transform:translateY(0) scale(1)}}
@keyframes gx-gsparks{0%,42%{opacity:0;transform:scale(.7)}47%{opacity:1;transform:scale(1)}85%,100%{opacity:0;transform:scale(1.15)}}
@media (prefers-reduced-motion:reduce){
 #modal#modal[data-view="gacha"][data-view][data-view][data-view][data-view] .gacha-stage .gx-machine-wrap>:is(.gx-chute-ball,.gx-gsparks,.gacha-ball){animation:none!important}
 #modal#modal[data-view="gacha"][data-view][data-view][data-view][data-view] .gx-machine-wrap>.gx-sprite{transition:none}
}
