.mooni-action{position:relative;isolation:isolate;display:flex;align-items:center;justify-content:space-between;gap:22px;width:100%;min-height:64px;padding:12px 24px;border:1px solid #d0c8fa8c;border-radius:13px;overflow:hidden;background:linear-gradient(105deg,#8371eb,#9c8eef 62%,#dcd6fb);color:#13152b;box-shadow:inset 0 1px #ffffff73,inset 0 -3px #4c32e226,0 8px 28px #5d45e424;font:inherit;font-weight:800;cursor:pointer;transition:box-shadow .25s,translate .25s,border-color .25s;direction:rtl}
.mooni-action:hover:not(:disabled){translate:0 -2px;box-shadow:inset 0 1px #ffffff9c,0 10px 34px #6c57e740;border-color:#eeecfd}
.mooni-action:focus-visible{outline:3px solid #7b67eb;outline-offset:5px}.mooni-action:disabled{cursor:wait;opacity:1}.mooni-action:active:not(:disabled){translate:0 1px}
.ma-caption{position:relative;z-index:2;white-space:nowrap;transition:opacity .2s,transform .4s;letter-spacing:0}
.ma-stage{width:84px;height:48px;flex:0 0 84px;position:relative;margin:-5px -10px -5px -13px}.ma-stage svg{width:100%;height:100%;overflow:visible;display:block}
.ma-frame{fill:#4c32e2;stroke:#4c32e2;stroke-width:1}.ma-interior{fill:#121328}.ma-light{opacity:0;transform-origin:21px 24px}
.ma-door{transform-box:view-box;transform-origin:10px 24px;fill:#6e58e7;stroke:#ded9fb;stroke-width:1;filter:drop-shadow(2px 1px 2px #1b1f4744)}.ma-door path{stroke:#f0eefd;stroke-width:1.8;stroke-linecap:round}
.ma-person{fill:#181b36;stroke:#181b36;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;transform-origin:57px 30px}.ma-person path{fill:none}.ma-person circle{stroke:none}.ma-floor{stroke:#4c32e2;stroke-width:1;opacity:.45}
.ma-arm{transform-origin:57px 21px}.ma-leg{transform-origin:57px 30px}.ma-check{position:absolute;left:calc(50% - 16px);top:calc(50% - 16px);width:32px;height:32px;fill:none;stroke:#1a1c36;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;opacity:0;transform:scale(.7);z-index:3}.ma-check path{stroke-dasharray:1;stroke-dashoffset:1}
.mooni-action::after{content:'';position:absolute;inset:0;z-index:1;background:linear-gradient(100deg,#d1c9fa,#705be8);opacity:0;transition:opacity .3s;pointer-events:none}
.mooni-action[data-action-state=entering][data-action-motion=live]{animation:ma-press .28s ease-out}
[data-action-state=entering] .ma-door{animation:ma-door-open 1.45s cubic-bezier(.4,0,.2,1) both}
[data-action-state=entering] .ma-person{animation:ma-walk 1.45s linear both}
[data-action-state=entering] .ma-arm.a,[data-action-state=entering] .ma-leg.b{animation:ma-limb .18s .3s linear 4 alternate}
[data-action-state=entering] .ma-arm.b,[data-action-state=entering] .ma-leg.a{animation:ma-limb .18s .3s linear 4 alternate-reverse}
[data-action-state=entering] .ma-light{animation:ma-room-light 1.45s ease both}
[data-action-state=entering] .ma-frame{animation:ma-wait 1s 1.45s ease-in-out infinite alternate}
[data-action-state=success]::after{opacity:1}[data-action-state=success] .ma-caption{opacity:0;transform:translateX(-14px)}[data-action-state=success] .ma-stage{opacity:0;transition:opacity .25s}
[data-action-state=success] .ma-check{opacity:1;transform:scale(1);transition:opacity .2s,transform .4s cubic-bezier(.2,1.6,.4,1)}[data-action-state=success] .ma-check path{stroke-dashoffset:0;transition:stroke-dashoffset .32s .08s ease}
[data-action-state=error]{border-color:#e0a9bc;box-shadow:0 0 0 3px #db849f20}[data-action-state=error] .ma-stage{opacity:.7}
[data-action-motion=still] .ma-door,[data-action-motion=still] .ma-person,[data-action-motion=still] .ma-arm,[data-action-motion=still] .ma-leg,[data-action-motion=still] .ma-light,[data-action-motion=still] .ma-frame{animation:none!important}
@keyframes ma-press{0%,100%{transform:scale(1)}45%{transform:scale(.975,.955)}}
@keyframes ma-door-open{0%{transform:perspective(140px) rotateY(0)}20%,76%{transform:perspective(140px) rotateY(-78deg)}96%,100%{transform:perspective(140px) rotateY(0)}}
@keyframes ma-walk{0%,24%{transform:translate(0,0);opacity:1}32%{transform:translate(-3px,-1px) rotate(-6deg)}43%{transform:translate(-10px,0) rotate(-9deg)}54%{transform:translate(-18px,-1px) rotate(-7deg);opacity:1}65%{transform:translate(-28px,0) scale(.9);opacity:1}73%,100%{transform:translate(-36px,-1px) scale(.75);opacity:0}}
@keyframes ma-limb{from{transform:rotate(-23deg)}to{transform:rotate(23deg)}}
@keyframes ma-room-light{0%{opacity:0}22%,70%{opacity:.9}96%,100%{opacity:0}}
@keyframes ma-wait{from{stroke:#4c32e2}to{stroke:#e8e5fc}}
@media(prefers-reduced-motion:reduce){html:not([data-site-motion=live]) .mooni-action:not([data-action-motion=live]),html:not([data-site-motion=live]) .mooni-action:not([data-action-motion=live]) *{transition:none!important}}

/* A quiet mint wash, a drawn green tick, then fine fading particles. */
.mooni-action::after{background:linear-gradient(110deg,#b8eadb,#d5eee3 60%,#c4e6d8);transition:opacity .85s cubic-bezier(.25,.7,.3,1)}
.mooni-action[data-action-state=success]{border-color:#a5dbc4;box-shadow:inset 0 1px #effff5a8,0 7px 30px #58d79b20;transition:border-color .85s,box-shadow .85s}
[data-action-state=success] .ma-check{stroke:#168452;filter:drop-shadow(0 0 6px #46d99438);transition:opacity .3s .12s,transform .55s .12s cubic-bezier(.2,1.5,.4,1)}
[data-action-state=success] .ma-check path{transition:stroke-dashoffset .42s .2s ease}
[data-action-state=success] .ma-caption{transition:opacity .38s,transform .5s}
.ma-particles{position:absolute;left:50%;top:50%;width:0;height:0;pointer-events:none;z-index:4}
.ma-particles i{position:absolute;left:0;top:0;width:var(--size);height:var(--size);margin:calc(var(--size) / -2);border-radius:50%;background:#168452;opacity:0;animation:ma-particle .82s .34s linear both}
.ma-particles i:nth-child(3n){background:#26a56a}
@keyframes ma-particle{
 0%{transform:translate(0,0) scale(.45);opacity:0}
 12%{transform:translate(0,0) scale(.8);opacity:.95}
 40%{transform:translate(var(--mx),var(--my)) scale(1);opacity:.82}
 72%{opacity:.4}
 100%{transform:translate(var(--dx),var(--dy)) scale(.2);opacity:0}
}
[data-action-state=success][data-action-motion=live] .ma-check{animation:ma-tick-land .65s .14s both}
@keyframes ma-tick-land{0%{transform:scale(.72)}55%{transform:scale(1.12)}100%{transform:scale(1)}}

/* Rejection: the doorway throws the actor back; impact precedes the centered error. */
.ma-error{position:absolute;left:calc(50% - 16px);top:calc(50% - 16px);width:32px;height:32px;z-index:3;fill:none;stroke:#a3324e;stroke-width:2.3;stroke-linecap:round;opacity:0;transform:scale(.75);transition:opacity .28s,transform .4s cubic-bezier(.2,1.5,.4,1)}
.ma-error-dot{fill:#a3324e;stroke:none}
.mooni-action[data-action-state=error]{border-color:#dfa0b0;box-shadow:inset 0 1px #fff5,0 7px 25px #bd597220;transition:border-color .55s,box-shadow .55s}
.mooni-action[data-action-state=error]::after{background:linear-gradient(110deg,#dab8cf,#e3c3d3 60%,#f0d3dd);opacity:.88;transition:opacity .6s ease}
[data-action-state=error] .ma-stage{opacity:1;z-index:2}
[data-action-state=error] .ma-person{animation:ma-eject 1.18s linear both}
[data-action-state=error] .ma-door{animation:ma-reject-door .65s ease both}
[data-action-state=error] .ma-light{opacity:.35}
[data-action-state=error] .ma-floor{d:path('M6 43h72');stroke:#9d546f;opacity:.45}
[data-action-state=error] .ma-arm.a{transform:rotate(-55deg)}[data-action-state=error] .ma-arm.b{transform:rotate(45deg)}
[data-action-state=error] .ma-leg.a{transform:rotate(20deg)}[data-action-state=error] .ma-leg.b{transform:rotate(-25deg)}
[data-action-state=error][data-action-motion=live]{animation:ma-impact-shake .28s .61s ease-out both}
[data-action-state=error][data-error-landed=true] .ma-stage{opacity:0;transition:opacity .28s}
[data-action-state=error][data-error-landed=true] .ma-caption{opacity:0;transform:translateY(7px);transition:opacity .28s,transform .35s}
[data-action-state=error][data-error-landed=true] .ma-error{opacity:1;transform:scale(1)}
@keyframes ma-eject{
 0%{transform:translate(-27px,0) rotate(-8deg);opacity:1}
 10%{transform:translate(-29px,1px) rotate(-15deg)}
 22%{transform:translate(-18px,-5px) rotate(12deg)}
 34%{transform:translate(-7px,-7px) rotate(38deg)}
 44%{transform:translate(1px,-2px) rotate(64deg)}
 53%{transform:translate(5px,9px) rotate(86deg) scale(1,.96)}
 61%{transform:translate(7px,6px) rotate(77deg)}
 73%{transform:translate(9px,9px) rotate(87deg)}
 84%{transform:translate(10px,9px) rotate(84deg)}
 100%{transform:translate(10px,9px) rotate(86deg);opacity:1}
}
[data-action-state=error] .ma-arm.a{transform:none;animation:ma-brace-arm 1.18s linear both}
[data-action-state=error] .ma-arm.b{transform:none;animation:ma-trailing-arm 1.18s linear both}
[data-action-state=error] .ma-leg.a{transform:none;animation:ma-tuck-leg 1.18s linear both}
[data-action-state=error] .ma-leg.b{transform:none;animation:ma-trailing-leg 1.18s linear both}
[data-action-state=error] .ma-person>circle{transform-origin:57px 19px;animation:ma-head-lag 1.18s linear both}
[data-action-state=error] .ma-floor{transform-origin:6px 43px;transform:scaleX(2.35)}
@keyframes ma-brace-arm{
 0%,10%{d:path('M57 21l-6 6')}
 28%{d:path('M57 21l-5 -2l-3 -4')}
 44%{d:path('M57 21l2 -4l4 -1')}
 53%{d:path('M57 21l4 -3l1 5')}
 70%,100%{d:path('M57 21l3 -2l1 6')}
}
@keyframes ma-trailing-arm{
 0%{d:path('M57 21l6 5')}
 26%{d:path('M57 21l-2 5l-5 1')}
 44%{d:path('M57 21l-4 -3l-2 -4')}
 60%{d:path('M57 21l-2 -4l4 -2')}
 82%,100%{d:path('M57 21l-2 4l4 2')}
}
@keyframes ma-tuck-leg{
 0%{d:path('M57 30l-5 9')}
 24%{d:path('M57 30l-6 2l2 5')}
 44%{d:path('M57 30l-4 4l4 3')}
 53%{d:path('M57 30l2 5l-2 3')}
 72%,100%{d:path('M57 30l2 5l-3 4')}
}
@keyframes ma-trailing-leg{
 0%{d:path('M57 30l5 9')}
 30%{d:path('M57 30l-1 6l-4 3')}
 48%{d:path('M57 30l-5 3l2 5')}
 65%{d:path('M57 30l-3 5l-3 2')}
 85%,100%{d:path('M57 30l-3 5l1 4')}
}
@keyframes ma-head-lag{0%,12%{transform:rotate(-8deg)}34%{transform:rotate(-16deg)}53%{transform:rotate(12deg)}65%{transform:rotate(-7deg)}83%,100%{transform:rotate(3deg)}}
@keyframes ma-reject-door{0%,20%{transform:perspective(140px) rotateY(-78deg)}65%{transform:perspective(140px) rotateY(8deg)}100%{transform:perspective(140px) rotateY(0)}}
@keyframes ma-impact-shake{0%,100%{translate:0 0}18%{translate:-4px 1px}38%{translate:4px -1px}58%{translate:-2px 0}78%{translate:1px 0}}
[data-action-state=error][data-action-motion=still] .ma-person{animation:none!important}

/* A custom failed-entry mark, matching the doorway in the action. */
.ma-error{width:38px;height:38px;left:calc(50% - 19px);top:calc(50% - 19px);stroke-width:1.8;stroke-linejoin:round}
.ma-error-frame{stroke:#8e3651;stroke-dasharray:1;stroke-dashoffset:1;transition:stroke-dashoffset .38s .08s ease}
.ma-error-panel{fill:#ae506b12;stroke:#a5506b}
.ma-error-handle{stroke:#8e3651;stroke-width:2}
.ma-error-cross{transform-origin:24.5px 22.5px;transform:scale(.4) rotate(-15deg);opacity:0;transition:transform .4s .18s cubic-bezier(.2,1.4,.4,1),opacity .2s .18s}
.ma-error-cross path{stroke:#ac304f;stroke-width:2.6}
[data-error-landed=true] .ma-error-frame{stroke-dashoffset:0}
[data-error-landed=true] .ma-error-cross{transform:scale(1) rotate(0);opacity:1}
[data-action-motion=still] .ma-error *{transition:none!important}

/* Compact feedback: keep the action readable without a long confirmation hold. */
[data-action-state=entering] .ma-door,[data-action-state=entering] .ma-person,[data-action-state=entering] .ma-light{animation-duration:.95s}
[data-action-state=entering] .ma-arm,[data-action-state=entering] .ma-leg{animation-duration:.12s;animation-delay:.2s}
[data-action-state=entering] .ma-frame{animation-delay:.95s}
.mooni-action::after{transition-duration:.42s}
.mooni-action[data-action-state=success]{transition-duration:.42s}
[data-action-state=success] .ma-caption{transition-duration:.2s}
[data-action-state=success] .ma-check{transition:opacity .15s .03s,transform .3s .03s}
[data-action-state=success] .ma-check path{transition:stroke-dashoffset .25s .07s ease}
[data-action-state=success][data-action-motion=live] .ma-check{animation-duration:.34s;animation-delay:.03s}
.ma-particles i{animation-duration:.38s;animation-delay:.12s}
[data-action-state=error] .ma-person,[data-action-state=error] .ma-arm,[data-action-state=error] .ma-leg,[data-action-state=error] .ma-person>circle{animation-duration:.86s}
[data-action-state=error][data-action-motion=live]{animation-delay:.45s}
[data-error-landed=true] .ma-error-frame{transition-duration:.2s;transition-delay:0s}
[data-error-landed=true] .ma-error-cross{transition-duration:.22s;transition-delay:.04s}

/* Preserve the completed entry pose while the stage fades into confirmation. */
[data-action-state=success] .ma-person{opacity:0;transform:translate(-36px,-1px) scale(.75)}
[data-action-state=success] .ma-door{transform:perspective(140px) rotateY(0)}
[data-action-state=success] .ma-light{opacity:0}

/* Grounded standing silhouette; articulated gait starts only after activation. */
.ma-person{stroke-width:2;stroke-linejoin:round}
.ma-person .ma-body{fill:#242748;stroke-width:1.6}
.ma-person .ma-head{fill:#1b1e3c}
.ma-person .ma-neck{stroke-width:2}
.ma-arm.a{transform-origin:55px 20px}.ma-arm.b{transform-origin:59px 20px}
.ma-leg.a{transform-origin:56px 30px}.ma-leg.b{transform-origin:58px 30px}
[data-action-state=idle] .ma-person{transform:none;opacity:1}
[data-action-state=entering] .ma-arm.a{animation:ma-step-arm-a .24s .22s linear 2 alternate}
[data-action-state=entering] .ma-arm.b{animation:ma-step-arm-b .24s .22s linear 2 alternate}
[data-action-state=entering] .ma-leg.a{animation:ma-step-leg-a .24s .22s linear 2 alternate}
[data-action-state=entering] .ma-leg.b{animation:ma-step-leg-b .24s .22s linear 2 alternate}
@keyframes ma-step-arm-a{from{d:path('M55 20l-1.5 5l.5 4')}to{d:path('M55 20l-4 3l-3 -1')}}
@keyframes ma-step-arm-b{from{d:path('M59 20l1.5 5l-.5 4')}to{d:path('M59 20l3 4l-1 3')}}
@keyframes ma-step-leg-a{from{d:path('M56 30l-1 5v5h-2')}to{d:path('M56 30l-5 4l-2 5h-2')}}
@keyframes ma-step-leg-b{from{d:path('M58 30l1 5v5h2')}to{d:path('M58 30l4 3l-1 5h-2')}}

.mooni-action{border-radius:17px;box-shadow:inset 0 1px #ffffff85,inset 0 -3px #4c32e238,0 2px #4c32e266,0 9px 22px #04040b3d}.mooni-action::before{content:"";position:absolute;inset:4px;border:1px solid #ffffff25;border-radius:12px;pointer-events:none}
