/* 2D character rigs — Amber Swarm's rig.css motion vocabulary, plus a hand wave and cloth-in-wind.
   The board crop reduces source-pixel movement substantially, so the authored
   motion is deliberately readable: an inhale, a shoulder shift, a glance and
   cloth/weapon follow-through — never a perpetual slot bounce. */
.rig2d{position:relative;overflow:visible;pointer-events:none}
.rig2d-stage{position:absolute;left:50%;top:50%;translate:calc(-50% + var(--ox,0px)) calc(-50% + var(--oy,0px));zoom:var(--k,1);transform-origin:50% 50%;rotate:var(--rj,0deg)}
.rig2d-stage img,.rig2d-group{position:absolute;display:block;max-width:none;user-select:none;-webkit-user-drag:none}
.rig2d-group{inset:0}
/* one timing model for every moving layer: per-rig speed (--ds) and phase (--ph) */
.rig2d-stage :is(img,.rig2d-group,.rig2d-prop)[class*="rig2d-"]:not(.rig2d-blink){animation-timing-function:ease-in-out;animation-iteration-count:infinite;
 animation-duration:calc(var(--dur,6s) * var(--ds,1));animation-delay:calc(var(--delay,0s) - var(--dur,6s) * var(--ds,1) * var(--ph,0))}
.rig2d-cast-hover{animation-name:cast-hover}
.rig2d-cast-breath{animation-name:cast-breath}
.rig2d-cast-head{animation-name:cast-head}
.rig2d-cast-limb-left{animation-name:cast-limb-left}
.rig2d-cast-limb-right{animation-name:cast-limb-right}
.rig2d-cast-glide-left{animation-name:cast-glide-left}
.rig2d-cast-glide-right{animation-name:cast-glide-right}
.rig2d-cast-wave{animation-name:cast-wave}
.rig2d-cast-finger-flex{animation-name:cast-finger-flex}
.rig2d-cast-foot{animation-name:cast-foot}
.rig2d-cast-wind{animation-name:cast-wind}
.rig2d-cast-wind-soft{animation-name:cast-wind-soft}
.rig2d-cast-tail{animation-name:cast-tail}
.rig2d-cast-scarf-gust{animation-name:cast-scarf-gust}
.rig2d-cast-sprout-leaves{animation-name:cast-sprout-leaves}
.rig2d-cast-potion-charge{animation-name:cast-potion-charge}
.rig2d-cast-eye-pulse{animation-name:cast-eye-pulse}
.rig2d-cast-orb-chroma{animation-name:cast-orb-chroma}
.rig2d-cast-incense-smoke{animation-name:cast-incense-smoke}
.rig2d-cast-earring-sway{animation-name:cast-earring-sway}
.rig2d-cast-vial-surge{animation-name:cast-vial-surge}
.rig2d-cast-fire-flicker{animation-name:cast-fire-flicker}
.rig2d-cast-blade-fire{animation-name:cast-blade-fire}
.rig2d-cast-panpipe-sway{animation-name:cast-panpipe-sway}
.rig2d-blink-inverse{animation-name:rig2d-blink-inverse}
.rig2d-potion-charge{position:absolute;display:block;overflow:hidden;border-radius:48% 48% 45% 45%;pointer-events:none;mix-blend-mode:screen;background:radial-gradient(circle at 18% 30%,#eaff9d 0 2%,transparent 3%),radial-gradient(circle at 72% 20%,#9dff9b 0 2%,transparent 3%),radial-gradient(circle at 74% 72%,#dfffa7 0 2.3%,transparent 3.4%),radial-gradient(ellipse at 52% 54%,#b5ff5c44 0 18%,transparent 49%);filter:drop-shadow(0 0 3px #8dff46);opacity:.78}
.rig2d-potion-charge::before,.rig2d-potion-charge::after{content:"";position:absolute;display:block;width:36%;height:70%;top:14%;clip-path:polygon(48% 0,79% 25%,57% 25%,94% 52%,48% 100%,59% 62%,20% 61%,42% 39%,4% 31%);background:linear-gradient(90deg,#7cff5c,#f4ff9c,#59ff7c);filter:drop-shadow(0 0 3px #d7ff8a);opacity:.72}
.rig2d-potion-charge::before{left:17%;animation:potion-arc 1.85s steps(2,end) infinite}
.rig2d-potion-charge::after{right:14%;height:52%;top:29%;rotate:180deg;animation:potion-arc 2.35s steps(2,end) infinite reverse}
.rig2d-eye-pulse{position:absolute;display:block;pointer-events:none;overflow:visible;border-radius:50%;background:radial-gradient(circle,#fff7a0 0 8%,#ffbd24 9% 18%,#b85c0d55 19% 35%,transparent 36%);filter:drop-shadow(0 0 4px #ffbc26);mix-blend-mode:screen}
.rig2d-eye-pulse::before,.rig2d-eye-pulse::after{content:"";position:absolute;inset:13%;border:2px solid #ffe56a;border-radius:50%;box-shadow:0 0 5px #ffc122,inset 0 0 4px #fff0a1;animation:eye-pulse-ring 1.9s cubic-bezier(.1,.72,.24,1) infinite}
.rig2d-eye-pulse::after{animation-delay:-.95s;border-color:#ffb327;box-shadow:0 0 6px #ff8a17}
.rig2d-orb-chroma{position:absolute;display:block;pointer-events:none;overflow:hidden;border-radius:50%;mix-blend-mode:screen;opacity:.68;background:radial-gradient(circle at 34% 26%,#ffffff 0 4%,#91f5ff 7%,#28bdff 23%,#1671f0 51%,#142b8911 70%,transparent 74%);box-shadow:inset 0 0 11px #8fffff99,inset -5px -6px 10px #06226844,0 0 8px #3dcaff99}
.rig2d-orb-chroma::before{content:"";position:absolute;inset:8%;border-radius:50%;mix-blend-mode:screen;background:radial-gradient(ellipse at 31% 22%,#fff 0 5%,#d8ffffcc 7%,transparent 22%),radial-gradient(circle at 54% 59%,#35d8ff99 0 24%,transparent 61%);opacity:.84}
.rig2d-orb-chroma::after{content:"";position:absolute;inset:6%;border:1px solid #b6ffff99;border-radius:50%;mix-blend-mode:color;box-shadow:inset 0 0 7px #b6ffff88,0 0 5px #75dcff88;opacity:.72}
/* Lotus Oracle: its original violet orb gets a slow enchanted colour cycle;
   the outline stays untouched, while only the inner glow shifts. */
.rig2d-oracle-orb-chroma{position:absolute;display:block;overflow:hidden;pointer-events:none;border-radius:50%;mix-blend-mode:screen;opacity:.72;background:radial-gradient(circle at 31% 24%,#fff7ff 0 4%,#f4b7ff 8%,#b840ea 24%,#6720bd 49%,#2f126511 72%,transparent 75%);box-shadow:inset 0 0 10px #ffc8ff99,inset -4px -6px 11px #26004b55,0 0 8px #e76bff99}
.rig2d-oracle-orb-chroma::before{content:"";position:absolute;inset:9%;border-radius:50%;background:radial-gradient(ellipse at 27% 20%,#fff 0 5%,#ffe8ffcc 8%,transparent 23%),radial-gradient(circle at 57% 62%,#e73cff99 0 25%,transparent 62%);mix-blend-mode:screen}
.rig2d-oracle-orb-chroma::after{content:"";position:absolute;inset:7%;border:1px solid #ffc0ff99;border-radius:50%;box-shadow:inset 0 0 8px #ed7dff99,0 0 5px #f8b3ff99;mix-blend-mode:color}
/* Flame is layered inside the hand-painted silhouette, with independent tongues
   and embers; it breathes rather than scaling the entire character. */
.rig2d-fire-live-head,.rig2d-fire-live-torch{position:absolute;display:block;pointer-events:none;overflow:hidden;mix-blend-mode:screen;opacity:.58;filter:drop-shadow(0 0 4px #ff5a00aa)}
.rig2d-fire-live-head{border-radius:43% 48% 30% 29%/74% 78% 28% 30%;background:radial-gradient(ellipse 15% 44% at 13% 73%,#fff8b3 0 9%,#ffd12b 18%,#ff7a00 48%,transparent 74%),radial-gradient(ellipse 19% 63% at 32% 59%,#fff8bf 0 8%,#ffd536 18%,#ff7410 48%,transparent 73%),radial-gradient(ellipse 17% 70% at 53% 50%,#fff5a2 0 7%,#ffc325 19%,#ff5c05 50%,transparent 75%),radial-gradient(ellipse 21% 62% at 74% 57%,#fff2a3 0 7%,#ffc228 17%,#ff5e08 48%,transparent 73%),radial-gradient(ellipse 14% 42% at 91% 72%,#fff5a7 0 8%,#ffbf22 19%,#ff6105 51%,transparent 74%)}
.rig2d-fire-live-torch{border-radius:48% 48% 38% 38%/78% 78% 22% 22%;background:radial-gradient(ellipse 27% 76% at 49% 62%,#fffbd1 0 7%,#ffe045 15%,#ff8a0b 39%,#fa3d00aa 58%,transparent 76%),radial-gradient(ellipse 18% 47% at 26% 82%,#ffd833 0 17%,#ff5300 52%,transparent 75%),radial-gradient(ellipse 18% 45% at 76% 81%,#ffd833 0 17%,#ff5300 52%,transparent 75%)}
.rig2d-fire-live-head::before,.rig2d-fire-live-torch::before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 13% 76%,#fff 0 1.2%,transparent 2.4%),radial-gradient(circle at 34% 40%,#ffe15c 0 1.1%,transparent 2.2%),radial-gradient(circle at 57% 63%,#fff1a6 0 1.2%,transparent 2.5%),radial-gradient(circle at 79% 31%,#ffd041 0 1.1%,transparent 2.2%);animation:fire-embers 1.65s linear infinite}
.rig2d-fire-live-head::after,.rig2d-fire-live-torch::after{content:"";position:absolute;inset:5%;border-radius:inherit;background:linear-gradient(92deg,transparent 4%,#fff6a422 31%,transparent 48%,#fff6a433 69%,transparent 88%);filter:blur(2px);animation:fire-glow 1.4s ease-in-out infinite}
/* Jackal Guard: ember trails sit only above the two crescent blades, mirrored
   to follow the artwork without covering the guard's face or hands. */
.rig2d-blade-fire{position:absolute;display:block;pointer-events:none;overflow:visible;mix-blend-mode:screen;opacity:.72;filter:drop-shadow(0 0 4px #ff4a00aa)}
.rig2d-blade-fire::before,.rig2d-blade-fire::after{content:"";position:absolute;inset:0;background:radial-gradient(ellipse 14% 34% at 17% 31%,#fff6ae 0 9%,#ffd12e 20%,#ff7008 48%,transparent 73%),radial-gradient(ellipse 17% 40% at 8% 62%,#fff4a8 0 8%,#ffbd22 21%,#ff5604 52%,transparent 75%),radial-gradient(ellipse 15% 35% at 29% 87%,#fff1a0 0 8%,#ffc22a 20%,#ff5804 52%,transparent 75%);animation:blade-embers 1.45s steps(3,end) infinite}
.rig2d-blade-fire::after{opacity:.67;scale:.82 1.1;translate:18% -9%;animation-delay:-.72s}
.rig2d-blade-fire.blade-fire-right{scale:-1 1}
/* Split duplicate pixels make the Oracle's hanging jewellery and the Pharaoh's
   panpipes genuinely move while preserving every original painted detail. */
.rig2d-oracle-base-full{-webkit-mask-image:linear-gradient(#000 0 0),linear-gradient(#000 0 0),linear-gradient(#000 0 0);-webkit-mask-size:100% 100%,44px 74px,44px 74px;-webkit-mask-position:0 0,181px 180px,310px 185px;-webkit-mask-repeat:no-repeat;-webkit-mask-composite:source-over,xor,xor;mask-image:linear-gradient(#000 0 0),linear-gradient(#000 0 0),linear-gradient(#000 0 0);mask-size:100% 100%,44px 74px,44px 74px;mask-position:0 0,181px 180px,310px 185px;mask-repeat:no-repeat;mask-composite:add,exclude,exclude}
.rig2d-oracle-base-tile{-webkit-mask-image:linear-gradient(#000 0 0),linear-gradient(#000 0 0),linear-gradient(#000 0 0);-webkit-mask-size:100% 100%,56px 102px,56px 102px;-webkit-mask-position:0 0,190px 206px,386px 208px;-webkit-mask-repeat:no-repeat;-webkit-mask-composite:source-over,xor,xor;mask-image:linear-gradient(#000 0 0),linear-gradient(#000 0 0),linear-gradient(#000 0 0);mask-size:100% 100%,56px 102px,56px 102px;mask-position:0 0,190px 206px,386px 208px;mask-repeat:no-repeat;mask-composite:add,exclude,exclude}
.rig2d-oracle-earring-copy{position:absolute;display:block;pointer-events:none;max-width:none;filter:drop-shadow(0 1px 1px #37103988)}
.rig2d-oracle-earring-copy-left-full{clip-path:polygon(35.35% 23.44%,43.95% 23.44%,43.95% 33.08%,35.35% 33.08%)}
.rig2d-oracle-earring-copy-right-full{clip-path:polygon(60.55% 24.09%,69.15% 24.09%,69.15% 33.73%,60.55% 33.73%)}
.rig2d-oracle-earring-copy-left-tile{clip-path:polygon(31.2% 32.19%,40.4% 32.19%,40.4% 48.13%,31.2% 48.13%)}
.rig2d-oracle-earring-copy-right-tile{clip-path:polygon(63.38% 32.5%,72.58% 32.5%,72.58% 48.44%,63.38% 48.44%)}
.rig2d-pharaoh-base-full{-webkit-mask-image:linear-gradient(#000 0 0),linear-gradient(#000 0 0);-webkit-mask-size:100% 100%,136px 172px;-webkit-mask-position:0 0,48px 122px;-webkit-mask-repeat:no-repeat;-webkit-mask-composite:source-over,xor;mask-image:linear-gradient(#000 0 0),linear-gradient(#000 0 0);mask-size:100% 100%,136px 172px;mask-position:0 0,48px 122px;mask-repeat:no-repeat;mask-composite:add,exclude}
.rig2d-pharaoh-base-tile{-webkit-mask-image:linear-gradient(#000 0 0),linear-gradient(#000 0 0);-webkit-mask-size:100% 100%,146px 204px;-webkit-mask-position:0 0,48px 116px;-webkit-mask-repeat:no-repeat;-webkit-mask-composite:source-over,xor;mask-image:linear-gradient(#000 0 0),linear-gradient(#000 0 0);mask-size:100% 100%,146px 204px;mask-position:0 0,48px 116px;mask-repeat:no-repeat;mask-composite:add,exclude}
.rig2d-pharaoh-panpipes-copy{position:absolute;display:block;pointer-events:none;max-width:none;filter:drop-shadow(0 1px 1px #3b1d0077)}
.rig2d-pharaoh-panpipes-copy-full{clip-path:polygon(9.38% 15.89%,35.94% 15.89%,35.94% 38.28%,9.38% 38.28%)}
.rig2d-pharaoh-panpipes-copy-tile{clip-path:polygon(7.5% 18.13%,30.31% 18.13%,30.31% 50%,7.5% 50%)}
/* JSON layer classes are intentionally bare (the rig runtime appends them as
   authored), so mirror the split-art selectors without the runtime prefix. */
.oracle-base-full{-webkit-mask-image:linear-gradient(#000 0 0),linear-gradient(#000 0 0),linear-gradient(#000 0 0);-webkit-mask-size:100% 100%,44px 74px,44px 74px;-webkit-mask-position:0 0,181px 180px,310px 185px;-webkit-mask-repeat:no-repeat;-webkit-mask-composite:source-over,xor,xor;mask-image:linear-gradient(#000 0 0),linear-gradient(#000 0 0),linear-gradient(#000 0 0);mask-size:100% 100%,44px 74px,44px 74px;mask-position:0 0,181px 180px,310px 185px;mask-repeat:no-repeat;mask-composite:add,exclude,exclude}
.oracle-base-tile{-webkit-mask-image:linear-gradient(#000 0 0),linear-gradient(#000 0 0),linear-gradient(#000 0 0);-webkit-mask-size:100% 100%,56px 102px,56px 102px;-webkit-mask-position:0 0,190px 206px,386px 208px;-webkit-mask-repeat:no-repeat;-webkit-mask-composite:source-over,xor,xor;mask-image:linear-gradient(#000 0 0),linear-gradient(#000 0 0),linear-gradient(#000 0 0);mask-size:100% 100%,56px 102px,56px 102px;mask-position:0 0,190px 206px,386px 208px;mask-repeat:no-repeat;mask-composite:add,exclude,exclude}
.oracle-earring-copy{position:absolute;display:block;pointer-events:none;max-width:none;filter:drop-shadow(0 1px 1px #37103988)}
.oracle-earring-copy-left-full{clip-path:polygon(35.35% 23.44%,43.95% 23.44%,43.95% 33.08%,35.35% 33.08%)}
.oracle-earring-copy-right-full{clip-path:polygon(60.55% 24.09%,69.15% 24.09%,69.15% 33.73%,60.55% 33.73%)}
.oracle-earring-copy-left-tile{clip-path:polygon(31.2% 32.19%,40.4% 32.19%,40.4% 48.13%,31.2% 48.13%)}
.oracle-earring-copy-right-tile{clip-path:polygon(63.38% 32.5%,72.58% 32.5%,72.58% 48.44%,63.38% 48.44%)}
.pharaoh-base-full{-webkit-mask-image:linear-gradient(#000 0 0),linear-gradient(#000 0 0);-webkit-mask-size:100% 100%,136px 172px;-webkit-mask-position:0 0,48px 122px;-webkit-mask-repeat:no-repeat;-webkit-mask-composite:source-over,xor;mask-image:linear-gradient(#000 0 0),linear-gradient(#000 0 0);mask-size:100% 100%,136px 172px;mask-position:0 0,48px 122px;mask-repeat:no-repeat;mask-composite:add,exclude}
.pharaoh-base-tile{-webkit-mask-image:linear-gradient(#000 0 0),linear-gradient(#000 0 0);-webkit-mask-size:100% 100%,146px 204px;-webkit-mask-position:0 0,48px 116px;-webkit-mask-repeat:no-repeat;-webkit-mask-composite:source-over,xor;mask-image:linear-gradient(#000 0 0),linear-gradient(#000 0 0);mask-size:100% 100%,146px 204px;mask-position:0 0,48px 116px;mask-repeat:no-repeat;mask-composite:add,exclude}
.pharaoh-panpipes-copy{position:absolute;display:block;pointer-events:none;max-width:none;filter:drop-shadow(0 1px 1px #3b1d0077)}
.pharaoh-panpipes-copy-full{clip-path:polygon(9.38% 15.89%,35.94% 15.89%,35.94% 38.28%,9.38% 38.28%)}
.pharaoh-panpipes-copy-tile{clip-path:polygon(7.5% 18.13%,30.31% 18.13%,30.31% 50%,7.5% 50%)}
/* Potion Djinn: two contained electrical reactions, each clipped to the
   liquid rather than spilling across the hands or the bottle's gold trim. */
.rig2d-djinn-vial-pink,.rig2d-djinn-vial-cyan{position:absolute;display:block;overflow:hidden;pointer-events:none;mix-blend-mode:screen;opacity:.76;filter:drop-shadow(0 0 4px var(--vial-glow));background:radial-gradient(ellipse at 50% 50%,var(--vial-haze) 0 28%,transparent 67%)}
.rig2d-djinn-vial-pink{--vial-core:#fff4ff;--vial-bolt:#ff79f4;--vial-glow:#ff2bdf;--vial-haze:#ff51e688;border-radius:50%}
.rig2d-djinn-vial-cyan{--vial-core:#ecffff;--vial-bolt:#54eaff;--vial-glow:#22cfff;--vial-haze:#22d7ff77;border-radius:41% 41% 47% 47%/18% 18% 49% 49%}
.rig2d-djinn-vial-pink::before,.rig2d-djinn-vial-pink::after,.rig2d-djinn-vial-cyan::before,.rig2d-djinn-vial-cyan::after{content:"";position:absolute;left:13%;top:15%;width:73%;height:68%;background:linear-gradient(90deg,transparent 0 23%,var(--vial-bolt) 26% 39%,var(--vial-core) 43% 53%,var(--vial-bolt) 57% 70%,transparent 74%);clip-path:polygon(45% 0,67% 0,54% 24%,89% 24%,58% 51%,76% 51%,38% 100%,47% 66%,12% 66%,40% 38%,24% 38%);filter:drop-shadow(0 0 3px var(--vial-core));transform-origin:50% 50%;animation:vial-electric-arc 1.72s steps(3,end) infinite}
.rig2d-djinn-vial-pink::after,.rig2d-djinn-vial-cyan::after{left:23%;top:22%;width:57%;height:54%;rotate:143deg;scale:.78;animation-delay:-.82s}
.rig2d-incense-smoke{position:absolute;display:block;overflow:visible;pointer-events:none;mix-blend-mode:screen;opacity:.76;filter:drop-shadow(0 0 3px #fff1d088)}
.rig2d-incense-smoke::before,.rig2d-incense-smoke::after{content:"";position:absolute;inset:0;border-radius:48%;background:radial-gradient(ellipse at 54% 79%,#fff8e2bb 0 10%,#f6ead2a0 17%,#d9c6b099 31%,#a9958580 46%,transparent 69%);filter:blur(2px);transform-origin:50% 100%}
.rig2d-incense-smoke::before{animation:incense-wisp 4.8s ease-in-out infinite -1.2s}
.rig2d-incense-smoke::after{animation:incense-wisp 5.6s ease-in-out infinite -3.5s;opacity:.72;scale:.78 1.06}
/* Sun Disc Priest is a statue-like keeper.  The silhouette, cloth and hands
   hold perfectly still; only his living eyes, two hanging ornaments and the
   incense are allowed to animate. */
.rig2d[data-rig="tire"] .rig2d-stage{animation:none!important;rotate:0deg!important}
.rig2d[data-rig="tire"] :is(.rig2d-cast-hover,.rig2d-cast-breath){animation:none!important}
/* The smoke starts at the burner and continuously splits into warm, translucent
   wisps. It has no looped body movement, just rising air and fading ash. */
.rig2d-incense-smoke{opacity:.96;filter:drop-shadow(0 0 5px #fff0c0aa);background:radial-gradient(ellipse at 48% 93%,#fff8dfcc 0 5%,#ead6bd88 13%,transparent 34%)}
.rig2d-incense-smoke::before,.rig2d-incense-smoke::after{background:radial-gradient(ellipse at 50% 82%,#fffbea 0 8%,#f7ead4d9 17%,#cdb69ca6 34%,#826f6366 51%,transparent 72%);filter:blur(1.6px)}
.rig2d-incense-smoke::before{animation-duration:4.1s}.rig2d-incense-smoke::after{animation-duration:5.1s;opacity:.82}
/* The original illustration is split with CSS masks: the base keeps two
   transparent earring cut-outs and clipped duplicate pixels become the two
   hanging ornaments.  This preserves the artist's exact gold/red detailing. */
.rig2d-sun-priest-base-full{-webkit-mask-image:linear-gradient(#000 0 0),linear-gradient(#000 0 0),linear-gradient(#000 0 0);-webkit-mask-size:100% 100%,42px 91px,42px 91px;-webkit-mask-position:0 0,126px 118px,344px 118px;-webkit-mask-repeat:no-repeat;-webkit-mask-composite:source-over,xor,xor;mask-image:linear-gradient(#000 0 0),linear-gradient(#000 0 0),linear-gradient(#000 0 0);mask-size:100% 100%,42px 91px,42px 91px;mask-position:0 0,126px 118px,344px 118px;mask-repeat:no-repeat;mask-composite:add,exclude,exclude}
.rig2d-sun-priest-base-tile{-webkit-mask-image:linear-gradient(#000 0 0),linear-gradient(#000 0 0),linear-gradient(#000 0 0);-webkit-mask-size:100% 100%,47px 111px,47px 111px;-webkit-mask-position:0 0,161px 144px,401px 151px;-webkit-mask-repeat:no-repeat;-webkit-mask-composite:source-over,xor,xor;mask-image:linear-gradient(#000 0 0),linear-gradient(#000 0 0),linear-gradient(#000 0 0);mask-size:100% 100%,47px 111px,47px 111px;mask-position:0 0,161px 144px,401px 151px;mask-repeat:no-repeat;mask-composite:add,exclude,exclude}
.rig2d-sun-earring-copy{position:absolute;display:block;pointer-events:none;max-width:none;filter:drop-shadow(0 1px 1px #54210066)}
.rig2d-sun-earring-copy-left-full{clip-path:polygon(24.6% 15.4%,32.8% 15.4%,32.8% 27.3%,24.6% 27.3%)}
.rig2d-sun-earring-copy-right-full{clip-path:polygon(67.2% 15.4%,75.4% 15.4%,75.4% 27.3%,67.2% 27.3%)}
.rig2d-sun-earring-copy-left-tile{clip-path:polygon(29% 22.5%,37.5% 22.5%,37.5% 40.1%,29% 40.1%)}
.rig2d-sun-earring-copy-right-tile{clip-path:polygon(72.1% 23.6%,80.6% 23.6%,80.6% 41.2%,72.1% 41.2%)}
/* Layer JSON deliberately carries plain class names; these rules split the
   original pixels so only each ornament swings, never the full character. */
.sun-priest-base-full{-webkit-mask-image:linear-gradient(#000 0 0),linear-gradient(#000 0 0),linear-gradient(#000 0 0);-webkit-mask-size:100% 100%,42px 91px,42px 91px;-webkit-mask-position:0 0,126px 118px,344px 118px;-webkit-mask-repeat:no-repeat;-webkit-mask-composite:source-over,xor,xor;mask-image:linear-gradient(#000 0 0),linear-gradient(#000 0 0),linear-gradient(#000 0 0);mask-size:100% 100%,42px 91px,42px 91px;mask-position:0 0,126px 118px,344px 118px;mask-repeat:no-repeat;mask-composite:add,exclude,exclude}
.sun-priest-base-tile{-webkit-mask-image:linear-gradient(#000 0 0),linear-gradient(#000 0 0),linear-gradient(#000 0 0);-webkit-mask-size:100% 100%,47px 111px,47px 111px;-webkit-mask-position:0 0,161px 144px,401px 151px;-webkit-mask-repeat:no-repeat;-webkit-mask-composite:source-over,xor,xor;mask-image:linear-gradient(#000 0 0),linear-gradient(#000 0 0),linear-gradient(#000 0 0);mask-size:100% 100%,47px 111px,47px 111px;mask-position:0 0,161px 144px,401px 151px;mask-repeat:no-repeat;mask-composite:add,exclude,exclude}
.sun-earring-copy{position:absolute;display:block;pointer-events:none;max-width:none;filter:drop-shadow(0 1px 1px #54210066)}
.sun-earring-copy-left-full{clip-path:polygon(24.6% 15.4%,32.8% 15.4%,32.8% 27.3%,24.6% 27.3%)}
.sun-earring-copy-right-full{clip-path:polygon(67.2% 15.4%,75.4% 15.4%,75.4% 27.3%,67.2% 27.3%)}
.sun-earring-copy-left-tile{clip-path:polygon(29% 22.5%,37.5% 22.5%,37.5% 40.1%,29% 40.1%)}
.sun-earring-copy-right-tile{clip-path:polygon(72.1% 23.6%,80.6% 23.6%,80.6% 41.2%,72.1% 41.2%)}
.rig2d-oracle-eyes,.rig2d-sun-eyes{position:absolute;display:block;pointer-events:none;opacity:1}
.rig2d-oracle-eyes::before,.rig2d-oracle-eyes::after{content:"";position:absolute;top:23%;width:33%;height:42%;border-radius:52% 48% 55% 45%/45% 50% 50% 55%;box-shadow:inset 0 0 0 1px #4b1b4a,0 1px 1px #32112e88}
.rig2d-oracle-eyes::before{left:9%;background:radial-gradient(circle at 51% 50%,#1f1428 0 17%,#e5a3f0 18% 32%,#8f3ca8 34% 52%,#442047 54% 68%,transparent 70%)}
.rig2d-oracle-eyes::after{right:9%;background:radial-gradient(circle at 49% 50%,#1f1428 0 17%,#e5a3f0 18% 32%,#8f3ca8 34% 52%,#442047 54% 68%,transparent 70%)}
/* Sun Disc Priest: small almond eyes are placed within the painted sockets.
   The procedural layer disappears on a blink, revealing the original closed
   lids instead of drawing a large cartoon ring over the face. */
.rig2d-sun-eyes::before,.rig2d-sun-eyes::after{content:"";position:absolute;top:30%;width:25%;height:23%;border-radius:58% 42% 58% 42%/46% 54% 46% 54%;background:radial-gradient(ellipse at 51% 54%,#21150f 0 20%,#81421f 22% 34%,#ecd1a8 36% 54%,#8e6b4a 57% 65%,transparent 71%);box-shadow:inset 0 -1px 1px #2a170d,inset 0 1px 1px #fff0c866,0 1px 1px #2a170d88}
.rig2d-sun-eyes::before{left:10%}.rig2d-sun-eyes::after{right:10%}
.rig2d-stage .rig2d-blink{opacity:0;animation:rig2d-blink calc(var(--dur,4.6s) * var(--ds,1)) steps(1,end) infinite calc(0s - var(--dur,4.6s) * var(--ph,0))}
/* Board portraits get one restrained whole-body cadence in addition to their
   authored limb/cloth/eye layers. Full-body win rigs use the same language at
   a slightly larger scale, so the close-up reads as the same living mummy. */
.rig2d-board .rig2d-stage{animation:tomb-board-presence var(--life-dur,6s) ease-in-out infinite calc(-1 * var(--life-dur,6s) * var(--ph,0))}
.rig2d-merged .rig2d-stage{animation:tomb-hero-presence calc(var(--life-dur,6s) * 1.16) ease-in-out infinite calc(-1 * var(--life-dur,6s) * var(--ph,0))}
@keyframes tomb-board-presence{0%,100%{transform:translate(0,0) scale(1)}22%{transform:translate(.8px,calc(var(--life-lift,-1px) * .18)) scale(1.012)}48%{transform:translate(-.6px,var(--life-lift,-1px)) scale(var(--life-scale,1.011))}72%{transform:translate(.45px,calc(var(--life-lift,-1px) * .38)) scale(1.007)}}
@keyframes tomb-hero-presence{0%,100%{transform:translate(0,0) scale(1)}20%{transform:translate(1.2px,calc(var(--life-lift,-1px) * .18)) scale(1.018)}44%{transform:translate(-.9px,calc(var(--life-lift,-1px) * 1.5)) scale(calc(var(--life-scale,1.011) + .010))}72%{transform:translate(.65px,calc(var(--life-lift,-1px) * .42)) scale(1.012)}}
/* A landing is a physical arrival, not a perpetual bounce. The idle rhythm
   continues immediately after this one measured settle. */
.tile.landed:not(.rolling) .rig2d-board .rig2d-stage{animation:tomb-character-land 480ms cubic-bezier(.12,.62,.24,1) both}
@keyframes tomb-character-land{0%{transform:translateY(-7px) scale(.94);filter:brightness(1.35)}62%{transform:translateY(2px) scale(1.04);filter:brightness(1.12)}100%{transform:translateY(0) scale(1);filter:brightness(1)}}
/* Amber's keyframes, unchanged */
@keyframes cast-hover{0%,100%{translate:0 0}32%{translate:.6px -3px}54%{translate:-.5px -7px}77%{translate:.35px -2px}}
@keyframes cast-head{0%,100%{translate:0 0;rotate:-.7deg}28%{translate:.8px -1px;rotate:.45deg}48%{translate:-.6px -5px;rotate:1.2deg}72%{translate:.35px -2px;rotate:-.25deg}}
@keyframes cast-breath{0%,100%{scale:1 1}38%{scale:1.026 1.040}61%{scale:1.014 1.020}}
@keyframes cast-limb-left{0%,100%{rotate:-2.5deg}30%{rotate:.8deg}48%{rotate:4.6deg}72%{rotate:.5deg}}
@keyframes cast-limb-right{0%,100%{rotate:2.5deg}32%{rotate:-.8deg}52%{rotate:-4.6deg}74%{rotate:-.5deg}}
@keyframes cast-glide-left{0%,100%{rotate:3.8deg;scale:.96 1}48%{rotate:-6.4deg;scale:1.015 1}}
@keyframes cast-glide-right{0%,100%{rotate:-3.8deg;scale:.96 1}48%{rotate:6.4deg;scale:1.015 1}}
/* New, same hand: a relaxed wrist gesture with follow-through, a toe tap, and cloth that catches a gust then settles. */
@keyframes cast-wave{0%,100%{rotate:0deg}18%{rotate:-3.8deg}38%{rotate:3deg}52%{rotate:-1.2deg}64%{rotate:.7deg}}
/* The Pharaoh's hand is a dedicated art layer. This is a tiny wrist-led
   finger curl/release, not a mechanical waving loop: the hand settles long
   enough between gestures to read as a living character. */
@keyframes cast-finger-flex{0%,100%{translate:0 0;rotate:0deg;scale:1}17%{translate:.5px -.5px;rotate:-.65deg;scale:.992 1.012}31%{translate:-.35px -1.2px;rotate:1.15deg;scale:1.008 .986}46%{translate:.35px -.55px;rotate:-.5deg;scale:.996 1.008}65%{translate:0 0;rotate:.28deg;scale:1}79%{translate:.25px -.3px;rotate:-.22deg;scale:1.003 .997}}
@keyframes cast-foot{0%,66%,100%{rotate:0deg}76%{rotate:-5.5deg}86%{rotate:.6deg}93%{rotate:-2.8deg}}
@keyframes cast-wind{0%,100%{rotate:0deg;skew:0deg 0deg}22%{rotate:4.8deg;skew:-2.8deg 0deg}41%{rotate:-2.2deg;skew:1.8deg 0deg}58%{rotate:6.2deg;skew:-3.4deg 0deg}79%{rotate:.9deg;skew:.8deg 0deg}}
/* The red scarf is its own loose fabric layer: one gust, follow-through, then a calm settle. */
@keyframes cast-scarf-gust{0%,100%{translate:0 0;rotate:0deg;skew:0deg 0deg}13%{translate:1px -1px;rotate:3.5deg;skew:-2deg 0deg}31%{translate:3px -4px;rotate:10.5deg;skew:-6deg 0deg}48%{translate:-1px -2px;rotate:-5deg;skew:3.5deg 0deg}65%{translate:2px -3px;rotate:7.2deg;skew:-4deg 0deg}82%{translate:.5px -1px;rotate:1.5deg;skew:-1deg 0deg}}
@keyframes cast-sprout-leaves{0%,100%{translate:0 0;rotate:0deg;scale:1}18%{translate:-.5px 0;rotate:-4.5deg;scale:1.01 .995}43%{translate:1px -1px;rotate:7.5deg;scale:.99 1.015}62%{translate:-.5px 0;rotate:-3deg;scale:1.005 .997}82%{translate:.3px -.5px;rotate:2.2deg}}
@keyframes cast-potion-charge{0%,100%{opacity:.47;scale:.96}20%{opacity:.9;scale:1.025}36%{opacity:.62;scale:.99}58%{opacity:1;scale:1.04}76%{opacity:.56;scale:.985}}
@keyframes potion-arc{0%,32%,100%{opacity:.18;scale:.75}33%,67%{opacity:.9;scale:1.08}68%,86%{opacity:.42;scale:.92}}
/* The Clockwork Mummy's gear-eye sends concentric scanner pulses, never a laser line. */
@keyframes cast-eye-pulse{0%,100%{opacity:.48;scale:.94}32%{opacity:1;scale:1.08}61%{opacity:.64;scale:.98}}
@keyframes eye-pulse-ring{0%{opacity:.9;scale:.22}22%{opacity:.72}100%{opacity:0;scale:3.4}}
/* Scarab Keeper's held orb changes colour slowly enough to feel enchanted,
   not like a UI indicator: blue → emerald → violet → gold → blue. */
@keyframes cast-orb-chroma{0%,100%{filter:hue-rotate(0deg) saturate(1.28) brightness(1.04);opacity:.70;scale:.97}19%{filter:hue-rotate(106deg) saturate(1.45) brightness(1.13);opacity:.92;scale:1.025}47%{filter:hue-rotate(210deg) saturate(1.42) brightness(1.09);opacity:.88;scale:1.012}72%{filter:hue-rotate(278deg) saturate(1.48) brightness(1.18);opacity:.96;scale:1.035}86%{filter:hue-rotate(330deg) saturate(1.34) brightness(1.08);opacity:.79;scale:.99}}
@keyframes cast-incense-smoke{0%,100%{opacity:.57;scale:.96 1}36%{opacity:.9;scale:1.04 1.06}68%{opacity:.7;scale:.99 1.02}}
@keyframes incense-wisp{0%{opacity:0;translate:-2px 20%;scale:.56 .42;rotate:-4deg}16%{opacity:.76}48%{opacity:.58;translate:11px -34%;scale:.91 1.04;rotate:7deg}76%{opacity:.25;translate:-9px -78%;scale:1.13 1.28;rotate:-8deg}100%{opacity:0;translate:5px -112%;scale:1.28 1.48;rotate:8deg}}
/* The Sun Disc Priest's two hanging ornaments are not clockwork: each has a
   separate duration and phase in the rig, so they settle at different times. */
@keyframes cast-earring-sway{0%,100%{translate:0 0;rotate:0deg}18%{translate:-.5px .5px;rotate:-4.6deg}42%{translate:.8px 1px;rotate:5.4deg}63%{translate:-.35px .45px;rotate:-2.8deg}81%{translate:.45px .7px;rotate:2deg}}
@keyframes cast-vial-surge{0%,100%{opacity:.48;scale:.975}19%{opacity:.92;scale:1.025}42%{opacity:.63;scale:.99}68%{opacity:1;scale:1.035}84%{opacity:.58;scale:.985}}
@keyframes vial-electric-arc{0%,18%,100%{opacity:.08;translate:-7% 9%;scale:.62 .78}19%{opacity:.96;translate:4% -6%;scale:1.04 1.1}43%{opacity:.42;translate:-2% 4%;scale:.86 .94}58%{opacity:1;translate:7% -9%;scale:1.15 .92}76%{opacity:.18;translate:-5% 7%;scale:.68 1.06}}
@keyframes cast-fire-flicker{0%,100%{opacity:.47;scale:.97 1;filter:drop-shadow(0 0 3px #ff5a00aa)}22%{opacity:.77;scale:1.025 .94;filter:drop-shadow(0 0 7px #ffbf2aaa)}48%{opacity:.58;scale:.985 1.05}71%{opacity:.82;scale:1.035 .98;filter:drop-shadow(0 0 8px #ff7100cc)}}
@keyframes fire-embers{0%{opacity:.12;translate:-3% 19%;scale:.72}28%{opacity:.92}72%{opacity:.48;translate:6% -30%;scale:1.12}100%{opacity:0;translate:-5% -62%;scale:1.38}}
@keyframes fire-glow{0%,100%{opacity:.28;scale:.96}46%{opacity:.94;scale:1.06}73%{opacity:.48;scale:1.01}}
@keyframes cast-blade-fire{0%,100%{opacity:.48;scale:.97 1;filter:drop-shadow(0 0 3px #ff4a00aa)}31%{opacity:.92;scale:1.05 .94;filter:drop-shadow(0 0 8px #ff9e19cc)}59%{opacity:.56;scale:.99 1.06}81%{opacity:.82;scale:1.035 .98}}
@keyframes blade-embers{0%,21%,100%{opacity:.16;translate:-6% 13%;scale:.74 .82}22%{opacity:.94;translate:3% -5%;scale:1.08 1.08}58%{opacity:.53;translate:-2% 5%;scale:.9 .98}79%{opacity:.9;translate:6% -12%;scale:1.15 .93}}
@keyframes cast-panpipe-sway{0%,100%{translate:0 0;rotate:0deg}18%{translate:-.7px .5px;rotate:-3.1deg}43%{translate:.9px -.35px;rotate:3.8deg}66%{translate:-.5px .45px;rotate:-2.2deg}82%{translate:.4px .25px;rotate:1.25deg}}
@keyframes cast-wind-soft{0%,100%{rotate:0deg}30%{rotate:5.5deg}55%{rotate:-2.8deg}80%{rotate:3.2deg}}
@keyframes cast-tail{0%,100%{rotate:-2deg}50%{rotate:3.6deg}}
/* A quick double blink reads more clearly in a small board cell, while the
   individual phase assigned in rig2d.mjs keeps a row from blinking in unison. */
@keyframes rig2d-blink{0%,84%{opacity:0}84.6%,87.2%{opacity:1}87.8%,90.2%{opacity:0}90.8%,94.2%{opacity:1}94.8%,100%{opacity:0}}
@keyframes rig2d-blink-inverse{0%,84%{opacity:1}84.6%,87.2%{opacity:0}87.8%,90.2%{opacity:1}90.8%,94.2%{opacity:0}94.8%,100%{opacity:1}}
@media (prefers-reduced-motion:reduce){
 .rig2d-stage :is(img,.rig2d-group,.rig2d-prop)[class*="rig2d-cast-"]{animation:none!important}
 .rig2d-stage .rig2d-blink{animation-duration:calc(var(--dur,4.6s) * 1.6)}
 .rig2d-board .rig2d-stage,.rig2d-merged .rig2d-stage{animation:none!important}
}
