/* All pieces share one source frame. Every effect pixel scales from the former .105 reference size. */
.pixel-transformation{--transform-scale:.157;--scale:var(--transform-scale);--effect-unit:calc(9.523809524px * var(--transform-scale));position:absolute;left:0;bottom:0;display:block;width:calc(454px * var(--scale));height:calc(474px * var(--scale));isolation:isolate;pointer-events:none;transform-origin:50% 95%;z-index:2}
.pixel-transformation>.sailor-sprite{--scale:var(--transform-scale);position:relative;z-index:2;opacity:1;filter:none;clip-path:none;animation:sailor-idle 3.2s steps(1,end) infinite}
.pixel-transformation::before,.pixel-transformation>.uniform-piece{position:absolute;inset:0;display:block;opacity:0;background-image:url('assets/sailor-moon-rpg-tiara.png');background-size:calc(1254px * var(--scale)) calc(1254px * var(--scale));background-position:calc(-127px * var(--scale)) calc(-115px * var(--scale));background-repeat:no-repeat;image-rendering:pixelated;image-rendering:crisp-edges;pointer-events:none}
/* Solid light has no facial or clothing detail. It stays underneath until dressing is complete. */
.pixel-transformation::before{content:"";z-index:0;filter:brightness(0) invert(1)}
.pixel-transformation>.uniform-piece{z-index:1}
.uniform-piece.piece-arm-left{clip-path:polygon(20% 55%,39% 55%,39% 78%,20% 78%)}
.uniform-piece.piece-arm-right{clip-path:polygon(61% 55%,80% 55%,80% 78%,61% 78%)}
.uniform-piece.piece-boots{clip-path:inset(83% 30% 0 30%)}
.uniform-piece.piece-body{clip-path:polygon(36% 55%,64% 55%,64% 67%,68% 67%,68% 83%,32% 83%,32% 67%,36% 67%)}
.uniform-piece.piece-head{clip-path:polygon(0 0,100% 0,100% 100%,80% 100%,80% 55%,20% 55%,20% 100%,0 100%)}
.transform-ribbon,.transform-spark{position:absolute;display:block;width:calc(2 * var(--effect-unit));height:calc(2 * var(--effect-unit));z-index:3;opacity:0;background:currentColor;pointer-events:none}
.transform-ribbon.ribbon-a{left:calc(4 * var(--effect-unit));top:66%;color:#fff2fc;box-shadow:calc(2 * var(--effect-unit)) calc(-2 * var(--effect-unit)) currentColor,calc(4 * var(--effect-unit)) calc(-2 * var(--effect-unit)) currentColor,calc(6 * var(--effect-unit)) calc(-4 * var(--effect-unit)) currentColor,calc(8 * var(--effect-unit)) calc(-4 * var(--effect-unit)) currentColor,calc(10 * var(--effect-unit)) calc(-6 * var(--effect-unit)) currentColor,calc(12 * var(--effect-unit)) calc(-6 * var(--effect-unit)) currentColor,calc(14 * var(--effect-unit)) calc(-6 * var(--effect-unit)) currentColor,calc(16 * var(--effect-unit)) calc(-6 * var(--effect-unit)) currentColor,calc(18 * var(--effect-unit)) calc(-6 * var(--effect-unit)) currentColor,calc(20 * var(--effect-unit)) calc(-6 * var(--effect-unit)) currentColor,calc(22 * var(--effect-unit)) calc(-6 * var(--effect-unit)) currentColor,calc(24 * var(--effect-unit)) calc(-6 * var(--effect-unit)) currentColor,calc(26 * var(--effect-unit)) calc(-4 * var(--effect-unit)) currentColor,calc(28 * var(--effect-unit)) calc(-4 * var(--effect-unit)) currentColor,calc(30 * var(--effect-unit)) calc(-2 * var(--effect-unit)) currentColor,calc(32 * var(--effect-unit)) calc(-2 * var(--effect-unit)) currentColor,calc(34 * var(--effect-unit)) 0 currentColor;filter:drop-shadow(0 0 calc(2 * var(--effect-unit)) #ff8cd8)}
.transform-ribbon.ribbon-b{left:calc(12 * var(--effect-unit));top:92%;color:#fff5cd;box-shadow:calc(2 * var(--effect-unit)) calc(-2 * var(--effect-unit)) currentColor,calc(4 * var(--effect-unit)) calc(-2 * var(--effect-unit)) currentColor,calc(6 * var(--effect-unit)) calc(-4 * var(--effect-unit)) currentColor,calc(8 * var(--effect-unit)) calc(-4 * var(--effect-unit)) currentColor,calc(10 * var(--effect-unit)) calc(-4 * var(--effect-unit)) currentColor,calc(12 * var(--effect-unit)) calc(-4 * var(--effect-unit)) currentColor,calc(14 * var(--effect-unit)) calc(-4 * var(--effect-unit)) currentColor,calc(16 * var(--effect-unit)) calc(-4 * var(--effect-unit)) currentColor,calc(18 * var(--effect-unit)) calc(-2 * var(--effect-unit)) currentColor,calc(20 * var(--effect-unit)) calc(-2 * var(--effect-unit)) currentColor,calc(22 * var(--effect-unit)) 0 currentColor;filter:drop-shadow(0 0 calc(2 * var(--effect-unit)) #d6b5ff)}
.transform-spark.spark-a{left:26%;top:68%;color:#fff3fc;box-shadow:0 calc(-2 * var(--effect-unit)) currentColor,0 calc(2 * var(--effect-unit)) currentColor,calc(-2 * var(--effect-unit)) 0 currentColor,calc(2 * var(--effect-unit)) 0 currentColor,calc(22 * var(--effect-unit)) 0 currentColor,calc(22 * var(--effect-unit)) calc(-2 * var(--effect-unit)) currentColor,calc(22 * var(--effect-unit)) calc(2 * var(--effect-unit)) currentColor,calc(20 * var(--effect-unit)) 0 currentColor,calc(24 * var(--effect-unit)) 0 currentColor;filter:drop-shadow(0 0 calc(2 * var(--effect-unit)) #ff9cd9)}
.transform-spark.spark-b{left:39%;top:91%;color:#fff7da;box-shadow:0 calc(-2 * var(--effect-unit)) currentColor,0 calc(2 * var(--effect-unit)) currentColor,calc(-2 * var(--effect-unit)) 0 currentColor,calc(2 * var(--effect-unit)) 0 currentColor,calc(9 * var(--effect-unit)) 0 currentColor,calc(9 * var(--effect-unit)) calc(-2 * var(--effect-unit)) currentColor,calc(9 * var(--effect-unit)) calc(2 * var(--effect-unit)) currentColor,calc(7 * var(--effect-unit)) 0 currentColor,calc(11 * var(--effect-unit)) 0 currentColor;filter:drop-shadow(0 0 calc(2 * var(--effect-unit)) #cdb5ff)}
.transform-spark.spark-c{left:49%;top:35%;color:#fff7da;box-shadow:0 calc(-2 * var(--effect-unit)) currentColor,0 calc(2 * var(--effect-unit)) currentColor,calc(-2 * var(--effect-unit)) 0 currentColor,calc(2 * var(--effect-unit)) 0 currentColor;filter:drop-shadow(0 0 calc(2 * var(--effect-unit)) #ffdca1)}
.pet-sailor.is-transforming .pixel-transformation{animation:dress-turn var(--transform-duration,1.8s) steps(1,end) 1 both}
.pet-sailor.is-transforming .pixel-transformation>.sailor-sprite{background-position:calc(-127px * var(--scale)) calc(-115px * var(--scale));animation:dress-complete var(--transform-duration,1.8s) steps(1,end) 1 both}
.pet-sailor.is-transforming .pixel-transformation::before{animation:dress-silhouette var(--transform-duration,1.8s) steps(1,end) 1 both}
.pet-sailor.is-transforming .piece-arm-left,.pet-sailor.is-transforming .piece-arm-right{animation:dress-arms var(--transform-duration,1.8s) steps(1,end) 1 both}
.pet-sailor.is-transforming .piece-boots{animation:dress-boots var(--transform-duration,1.8s) steps(1,end) 1 both}
.pet-sailor.is-transforming .piece-body{animation:dress-body var(--transform-duration,1.8s) steps(1,end) 1 both}
.pet-sailor.is-transforming .piece-head{animation:dress-head var(--transform-duration,1.8s) steps(1,end) 1 both}
.pet-sailor.is-transforming .ribbon-a{animation:dress-arm-and-body-light var(--transform-duration,1.8s) steps(1,end) 1 both}
.pet-sailor.is-transforming .ribbon-b{animation:dress-boot-light var(--transform-duration,1.8s) steps(1,end) 1 both}
.pet-sailor.is-transforming .spark-a{animation:dress-arm-spark var(--transform-duration,1.8s) steps(1,end) 1 both}
.pet-sailor.is-transforming .spark-b{animation:dress-boot-spark var(--transform-duration,1.8s) steps(1,end) 1 both}
.pet-sailor.is-transforming .spark-c{animation:dress-tiara-spark var(--transform-duration,1.8s) steps(1,end) 1 both}
@keyframes dress-turn{0%,8%{transform:translateY(0) scaleX(1)}14%{transform:translateY(calc(-1 * var(--effect-unit))) scaleX(.85)}22%{transform:translateY(calc(-2 * var(--effect-unit))) scaleX(-.85)}32%{transform:translateY(calc(-3 * var(--effect-unit))) scaleX(-1)}42%{transform:translateY(calc(-2 * var(--effect-unit))) scaleX(-.85)}52%,64%{transform:translateY(calc(-1 * var(--effect-unit))) scaleX(1)}72%,100%{transform:translateY(0) scaleX(1)}}
@keyframes dress-silhouette{0%,8%{opacity:1;filter:brightness(0) invert(1) drop-shadow(0 0 calc(2 * var(--effect-unit)) #fff5fd) drop-shadow(0 0 calc(4 * var(--effect-unit)) #e7b9f3)}12%,93%{opacity:1;filter:brightness(0) invert(1)}94%,100%{opacity:0;filter:brightness(0) invert(1)}}
@keyframes dress-complete{0%,93%{opacity:0}94%,100%{opacity:1}}
@keyframes dress-arms{0%,11%{opacity:0;filter:brightness(0) invert(1)}12%,19%{opacity:1;filter:brightness(0) invert(1)}20%{opacity:1;filter:brightness(1.7) saturate(.5)}26%,93%{opacity:1;filter:none}94%,100%{opacity:0;filter:none}}
@keyframes dress-boots{0%,29%{opacity:0;filter:brightness(0) invert(1)}30%,36%{opacity:1;filter:brightness(0) invert(1)}38%{opacity:1;filter:brightness(1.7) saturate(.5)}44%,93%{opacity:1;filter:none}94%,100%{opacity:0;filter:none}}
@keyframes dress-body{0%,47%{opacity:0;filter:brightness(0) invert(1)}48%,56%{opacity:1;filter:brightness(0) invert(1)}58%{opacity:1;filter:brightness(1.6) saturate(.6)}64%,93%{opacity:1;filter:none}94%,100%{opacity:0;filter:none}}
@keyframes dress-head{0%,73%{opacity:0;filter:brightness(0) invert(1)}74%,77%{opacity:1;filter:brightness(0) invert(1)}78%{opacity:1;filter:brightness(1.6) saturate(.6)}84%,93%{opacity:1;filter:none}94%,100%{opacity:0;filter:none}}
@keyframes dress-arm-and-body-light{0%,9%{opacity:0;transform:translateY(0) scaleX(1)}10%,18%{opacity:1;transform:translateY(0) scaleX(1)}22%{opacity:1;transform:translateY(calc(-2 * var(--effect-unit))) scaleX(.85)}27%,45%{opacity:0;transform:translateY(calc(-2 * var(--effect-unit))) scaleX(.85)}46%{opacity:1;transform:translateY(calc(5 * var(--effect-unit))) scaleX(.7)}54%{opacity:1;transform:translateY(calc(1 * var(--effect-unit))) scaleX(.85)}61%{opacity:1;transform:translateY(calc(-2 * var(--effect-unit))) scaleX(.7)}66%,100%{opacity:0;transform:translateY(calc(-2 * var(--effect-unit))) scaleX(.7)}}
@keyframes dress-boot-light{0%,27%{opacity:0;transform:translateY(0) scaleX(.8)}28%,34%{opacity:1;transform:translateY(0) scaleX(1)}38%{opacity:1;transform:translateY(calc(-2 * var(--effect-unit))) scaleX(1.1)}43%{opacity:.8;transform:translateY(calc(-2 * var(--effect-unit))) scaleX(.9)}47%,100%{opacity:0;transform:translateY(calc(-2 * var(--effect-unit))) scaleX(.9)}}
@keyframes dress-arm-spark{0%,21%{opacity:0}22%,25%{opacity:1}28%,100%{opacity:0}}
@keyframes dress-boot-spark{0%,39%{opacity:0}40%,43%{opacity:1}46%,100%{opacity:0}}
@keyframes dress-tiara-spark{0%,85%{opacity:0;transform:scale(1)}86%,89%{opacity:1;transform:scale(1)}90%,92%{opacity:.8;transform:scale(1.5)}94%,100%{opacity:0;transform:scale(1.5)}}
.motion-paused .pixel-transformation,.motion-paused .pixel-transformation *,.motion-paused .pixel-transformation::before,.scene-paused .pixel-transformation,.scene-paused .pixel-transformation *,.scene-paused .pixel-transformation::before{animation-play-state:paused!important}
@media(prefers-reduced-motion:reduce){body:not(.motion-opt-in) .pet-sailor .pixel-transformation{animation:none!important;transform:none}body:not(.motion-opt-in) .pet-sailor .pixel-transformation>.sailor-sprite{animation:none!important;opacity:1!important}body:not(.motion-opt-in) .pixel-transformation::before,body:not(.motion-opt-in) .uniform-piece,body:not(.motion-opt-in) .transform-ribbon,body:not(.motion-opt-in) .transform-spark{opacity:0!important;animation:none!important}}
