/* Cosapín animado sobre la imagen original (cosapin.mjs): capas cuerpo + ala, párpados y disfraces encima. */
.czp{position:relative;display:inline-block;vertical-align:bottom;line-height:0}
.czp-xs{width:44px;height:64px}.czp-s{width:58px;height:84px}.czp-m{width:76px;height:110px}.czp-l{width:124px;height:180px}
.czp-inner{position:absolute;inset:0;transform-origin:50% 100%;animation:czp-breathe 3.6s ease-in-out infinite}
.czp-inner>img,.czp-over{position:absolute;inset:0;width:100%;height:100%;user-select:none;pointer-events:none}
.czp-over{overflow:visible}
.czp-arm{transform-origin:38.43% 46.91%;animation:czp-wave-idle 7s ease-in-out infinite}
.czp-over g{transform-box:fill-box}
.czp-lid{opacity:0;animation:czp-blink 4.8s infinite}.czp-happy,.czp-mouth{opacity:0}
.czp-lid-r{animation-delay:.05s}
.czp-acc,.czp-think,.czp-bang{display:none}
.czp-scarf-a{fill:#d7263d}.czp-scarf-b{fill:#1b9e5a}
@keyframes czp-breathe{0%,100%{transform:translateY(0) rotate(0) scale(1,1)}25%{transform:translateY(-1.5px) rotate(-1.2deg) scale(1.006,.995)}50%{transform:translateY(-3px) rotate(0) scale(1.012,.99)}75%{transform:translateY(-1.5px) rotate(1.2deg) scale(1.006,.995)}}
@keyframes czp-wave-idle{0%,70%,100%{transform:rotate(0)}76%{transform:rotate(-13deg)}82%{transform:rotate(5deg)}88%{transform:rotate(-11deg)}94%{transform:rotate(3deg)}}

/* Ánimos */
.m-saluda .czp-arm{animation:czp-wave .38s ease-in-out 5}
@keyframes czp-wave{0%,100%{transform:rotate(0)}50%{transform:rotate(-16deg)}}
.m-guino .czp-lid-l{animation:none;opacity:1}
.m-guino .czp-inner{animation:czp-tilt .6s ease-out forwards}
@keyframes czp-tilt{to{transform:rotate(-4deg)}}
.m-sorpresa .czp-inner{animation:czp-startle .55s ease-out}
.m-sorpresa .czp-bang{display:inline;animation:czp-pop .4s cubic-bezier(.2,1.6,.4,1)}
.m-sorpresa .czp-lid{animation:none;opacity:0}
@keyframes czp-startle{0%{transform:translateY(0)}35%{transform:translateY(-9px) scale(1.05)}100%{transform:translateY(0)}}
.m-pensando .czp-inner{animation:czp-ponder 1.8s ease-in-out infinite}
.m-pensando .czp-think{display:inline}
.m-pensando .czp-think circle{animation:czp-dots 1.2s ease-in-out infinite}
.m-pensando .czp-think circle:nth-child(2){animation-delay:.2s}.m-pensando .czp-think circle:nth-child(3){animation-delay:.4s}
.m-pensando .czp-lid{animation:none;opacity:0}.m-pensando .czp-mouth{opacity:1}
@keyframes czp-ponder{0%,100%{transform:rotate(-3deg)}50%{transform:rotate(-5deg) translateY(-1px)}}
@keyframes czp-dots{0%,100%{opacity:.2}50%{opacity:1}}
.m-celebra .czp-inner{animation:czp-jump .55s ease-in-out 3}
.m-celebra .czp-arm{animation:czp-wave-big .28s ease-in-out 6}
.m-celebra .czp-lid{animation:none;opacity:0}.m-celebra .czp-happy{opacity:1}
@keyframes czp-jump{0%,100%{transform:translateY(0) scale(1)}40%{transform:translateY(-14px) scale(.98,1.03)}80%{transform:translateY(0) scale(1.04,.96)}}
@keyframes czp-wave-big{0%,100%{transform:rotate(-4deg)}50%{transform:rotate(-26deg)}}
@keyframes czp-pop{from{transform:scale(.3);opacity:0}to{transform:scale(1);opacity:1}}
/* Temporadas: disfraces sobre la imagen original */
.s-halloween .czp-witch,.s-halloween .czp-pumpkin{display:inline}
.s-navidad .czp-santa,.s-navidad .czp-gift,.s-navidad .czp-scarf{display:inline}
.s-anio-nuevo .czp-party{display:inline}
.s-verano .czp-shades{display:inline}.s-verano .czp-lid{display:none}
.s-sanvalentin .czp-heart,.s-madre .czp-heart,.s-madre .czp-flowers,.s-primavera .czp-flowers{display:inline}
.s-invierno .czp-earmuffs,.s-invierno .czp-scarf{display:inline}
.s-invierno .czp-scarf-a{fill:#1b7fe3}.s-invierno .czp-scarf-b{fill:#fff}
.s-patrias .czp-scarf,.s-patrias .czp-flag{display:inline}
.s-patrias .czp-scarf-a{fill:#d91023}.s-patrias .czp-scarf-b{fill:#fff}
.s-patrias .czp-flag-cloth{transform-origin:0 50%;animation:czp-flag 1.4s ease-in-out infinite}
@keyframes czp-flag{0%,100%{transform:skewY(0)}50%{transform:skewY(-7deg)}}
.s-anio-nuevo .czp-party,.s-halloween .czp-witch,.s-navidad .czp-santa{transform-origin:50% 100%;animation:czp-hat 3.6s ease-in-out infinite}
@keyframes czp-hat{0%,100%{transform:rotate(0)}50%{transform:rotate(2deg)}}
/* Partículas de temporada */
.cz-wrap{position:relative;display:inline-block}
.cz-fx{position:absolute;inset:-18px -14px 0;pointer-events:none;overflow:visible}
.cz-fx i{position:absolute;top:0;display:block;width:7px;height:7px;border-radius:50%;opacity:0;animation:cz-fall 4.5s linear infinite}
.cz-fx i.p0{left:5%;animation-delay:0s}.cz-fx i.p1{left:18%;animation-delay:1.1s}.cz-fx i.p2{left:32%;animation-delay:2.3s}.cz-fx i.p3{left:46%;animation-delay:.6s}
.cz-fx i.p4{left:60%;animation-delay:3.1s}.cz-fx i.p5{left:72%;animation-delay:1.7s}.cz-fx i.p6{left:84%;animation-delay:2.8s}.cz-fx i.p7{left:94%;animation-delay:.3s}
@keyframes cz-fall{0%{transform:translateY(-6px) rotate(0);opacity:0}15%{opacity:.95}100%{transform:translateY(110px) rotate(240deg);opacity:0}}
@keyframes cz-rise{0%{transform:translateY(90px) scale(.6);opacity:0}20%{opacity:.9}100%{transform:translateY(-10px) scale(1);opacity:0}}
@keyframes cz-bat{0%{transform:translate(0,30px) scale(.7);opacity:0}20%{opacity:1}100%{transform:translate(40px,-30px) scale(1);opacity:0}}
.fx-snow i,.fx-snow-soft i{background:#fff;box-shadow:0 0 0 1px #bcd3ea}.fx-snow-soft i{animation-duration:6.5s;width:5px;height:5px}
.fx-confetti i{border-radius:1px;width:6px;height:9px}.fx-confetti i:nth-child(3n){background:#f2167d}.fx-confetti i:nth-child(3n+1){background:#d9e41b}.fx-confetti i:nth-child(3n+2){background:#6547eb}
.fx-confetti-pe i{border-radius:1px;width:6px;height:9px}.fx-confetti-pe i:nth-child(odd){background:#d91023}.fx-confetti-pe i:nth-child(even){background:#fff;box-shadow:0 0 0 1px #e8b9be}
.fx-hearts i{width:9px;height:9px;border-radius:0;background:#f2167d;animation-name:cz-rise;clip-path:polygon(50% 100%,0 40%,0 15%,25% 0,50% 18%,75% 0,100% 15%,100% 40%)}
.fx-leaves i{width:9px;height:6px;border-radius:0 9px;background:#d1862a}.fx-leaves i:nth-child(odd){background:#ef656f}
.fx-petals i{width:8px;height:6px;border-radius:6px 0;background:#f7a8c8}.fx-petals i:nth-child(odd){background:#fff1a8}
.fx-bats i{width:12px;height:6px;border-radius:0;background:#3b1f5c;clip-path:polygon(0 50%,25% 0,40% 40%,50% 20%,60% 40%,75% 0,100% 50%,60% 70%,50% 100%,40% 70%);animation-name:cz-bat;animation-duration:5s}
.fx-sun i{display:none}.fx-sun i.p0{display:block;left:70%;top:-6px;width:22px;height:22px;background:radial-gradient(#ffe066,#f7b500);box-shadow:0 0 18px #ffd43b;opacity:1;animation:cz-sunspin 6s linear infinite}
@keyframes cz-sunspin{to{transform:rotate(360deg)}}
.pet-paused .czp *,.pet-paused .czp-inner,.pet-paused .cz-fx i{animation:none!important}
@media (prefers-reduced-motion:reduce){.czp *,.czp-inner,.cz-fx i{animation:none!important}}

@keyframes czp-blink{0%,93%,100%{opacity:0}95%,97%{opacity:1}}
/* Habla: el pico se abre y se cierra mientras aparece el globo. */
.talking .czp-mouth{animation:czp-talk .32s steps(1) infinite}
@keyframes czp-talk{0%{opacity:1}50%{opacity:0}}
.s-verano .czp-happy{display:none}
/* Vida propia (cosapin-life.mjs): rutinas al azar, dormir y seguir al cursor. */
.r-salto .czp-inner{animation:czp-jump .55s ease-in-out 2}
.r-giro .czp-inner{animation:czp-spin 1.1s ease-in-out}
.r-baile .czp-inner{animation:czp-dance .42s ease-in-out 4}.r-baile .czp-arm{animation:czp-wave .21s ease-in-out 8}
.r-estira .czp-inner{animation:czp-stretch 1.5s ease-in-out}
.r-asomo .czp-inner{animation:czp-peek 1.6s cubic-bezier(.3,1.3,.5,1)}
@keyframes czp-spin{0%,100%{transform:scaleX(1)}25%{transform:scaleX(-1) translateY(-6px)}50%{transform:scaleX(1) translateY(-10px)}75%{transform:scaleX(-1) translateY(-6px)}}
@keyframes czp-dance{0%,100%{transform:rotate(0) translateX(0)}25%{transform:rotate(-8deg) translateX(-4px)}75%{transform:rotate(8deg) translateX(4px)}}
@keyframes czp-stretch{0%,100%{transform:scale(1,1)}40%{transform:scale(.95,1.09) translateY(-4px)}70%{transform:scale(1.04,.96)}}
@keyframes czp-peek{0%,100%{transform:translateY(0)}30%,60%{transform:translateY(55%)}}
.durmiendo .czp-lid{animation:none;opacity:1}.durmiendo .czp-arm{animation:none}
.durmiendo .czp-inner{animation:czp-snooze 4.5s ease-in-out infinite}
.durmiendo::after{content:'Z z z';position:absolute;right:-6px;top:-4px;font:700 15px Poppins,Arial,sans-serif;color:#5b3fd6;letter-spacing:2px;animation:czp-zzz 3s ease-in-out infinite}
@keyframes czp-snooze{0%,100%{transform:rotate(-5deg) translateY(1px)}50%{transform:rotate(-7deg) translateY(3px) scale(1.01,.99)}}
@keyframes czp-zzz{0%{transform:translate(0,8px);opacity:0}30%{opacity:1}100%{transform:translate(10px,-18px);opacity:0}}
.pet .cz-wrap{transform-origin:50% 100%;transform:rotate(var(--lean,0deg)) translateY(var(--look,0px));transition:transform .45s cubic-bezier(.3,1.4,.5,1)}
@media (prefers-reduced-motion:reduce){.durmiendo::after{animation:none}.pet .cz-wrap{transform:none}}
