/* Miumitto · animaciones compartidas (tienda y panel) */
.miu { overflow: visible; display: block; }
.miu-dice {
  position: absolute; left: 50%; top: -6px; transform: translateX(-50%); white-space: nowrap; z-index: 2;
  background: var(--blanco); border: 1px solid var(--linea); color: var(--tinta); font-weight: 600; font-size: 13px;
  padding: 4px 10px; border-radius: var(--r-pill); box-shadow: var(--sombra); animation: dice 1.6s ease forwards; pointer-events: none;
}
/* ---------- Animaciones de Miumitto ---------- */
.miu .mi-cuerpo, .miu .mi-sombra, .miu .mi-luz { transform-box: fill-box; transform-origin: 50% 100%; }
.miu .mi-cuerpo { animation: respira 3.2s ease-in-out infinite; }
.miu .mi-sombra { animation: sombra 3.2s ease-in-out infinite; }
.miu .mi-mirada { transform: translate(var(--mx, 0px), var(--my, 0px)); transition: transform .12s ease-out; }
.miu .mi-ojos { transform-box: fill-box; transform-origin: center; animation: parpadeo 4.6s infinite; }
.miu .mi-orejas { transform-box: fill-box; transform-origin: 50% 100%; }
.miu .mi-ojos-felices, .miu .mi-boca-feliz, .miu .mi-piensa, .miu .mi-corazones { opacity: 0; }
.miu .mi-piensa, .miu .mi-corazones path { transform-box: fill-box; transform-origin: 0% 100%; }

/* Piensa: ladea la cabeza, mira arriba y aparece la burbuja */
.miu.piensa .mi-cuerpo { animation: ladea 1.4s ease-in-out infinite alternate; }
.miu.piensa .mi-mirada { transform: translate(3px, -3px); }
.miu.piensa .mi-corazon { opacity: 0; }
.miu.piensa .mi-piensa { opacity: 1; animation: burbuja .35s cubic-bezier(.34,1.56,.64,1); }
.miu.piensa .mi-p1, .miu.piensa .mi-p2, .miu.piensa .mi-p3 { animation: punto 1s infinite; }
.miu.piensa .mi-p2 { animation-delay: .15s; } .miu.piensa .mi-p3 { animation-delay: .3s; }

/* Feliz: salto de gelatina, ojitos ^^, boca abierta y corazones */
.miu.feliz .mi-cuerpo { animation: salto .9s cubic-bezier(.3,.7,.4,1) 1; }
.miu.feliz .mi-sombra { animation: sombra-salto .9s ease 1; }
.miu.feliz .mi-ojos, .miu.feliz .mi-boca { opacity: 0; }
.miu.feliz .mi-ojos-felices, .miu.feliz .mi-boca-feliz { opacity: 1; }
.miu.feliz .mi-cachete { opacity: .6; }
.miu.feliz .mi-orejas { animation: orejas .5s ease-in-out 2; }
.miu.feliz .mi-corazones { opacity: 1; }
.miu.feliz .mi-corazones path { animation: flota 1.2s ease-out forwards; }
.miu.feliz .mi-h2 { animation-delay: .12s !important; } .miu.feliz .mi-h3 { animation-delay: .24s !important; }

/* Cosquillas: tiembla como slime */
.miu.cosquillas .mi-cuerpo { animation: gelatina .7s ease 1; }
.miu.cosquillas .mi-ojos { opacity: 0; }
.miu.cosquillas .mi-ojos-felices { opacity: 1; }

@keyframes respira { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.025, .975); } }
@keyframes sombra { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(1.04); } }
@keyframes parpadeo { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes orejas { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-5deg); } 60% { transform: rotate(5deg); } }
@keyframes ladea { from { transform: rotate(-5deg) scale(1.01, .99); } to { transform: rotate(5deg) scale(.99, 1.01); } }
@keyframes burbuja { from { opacity: 0; transform: scale(.4); } }
@keyframes punto { 0%, 60%, 100% { opacity: .35; } 30% { opacity: 1; } }
@keyframes salto {
  0% { transform: translateY(0) scale(1, 1); }
  18% { transform: translateY(0) scale(1.14, .84); }
  45% { transform: translateY(-24%) scale(.9, 1.12); }
  70% { transform: translateY(0) scale(1.12, .88); }
  85% { transform: translateY(0) scale(.96, 1.04); }
  100% { transform: translateY(0) scale(1, 1); }
}
@keyframes sombra-salto { 0%, 100% { transform: scaleX(1); opacity: .22; } 45% { transform: scaleX(.7); opacity: .1; } }
@keyframes gelatina {
  0% { transform: scale(1, 1); } 20% { transform: scale(1.12, .88); } 40% { transform: scale(.9, 1.1); }
  60% { transform: scale(1.06, .94); } 80% { transform: scale(.98, 1.02); } 100% { transform: scale(1, 1); }
}
@keyframes flota { 0% { opacity: 0; transform: translateY(8px) scale(.4); } 25% { opacity: 1; transform: translateY(0) scale(1); } 100% { opacity: 0; transform: translateY(-34px) scale(1.1); } }
@keyframes dice-abajo { 0% { opacity: 0; transform: translateY(-6px); } 15%, 75% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(4px); } }
@keyframes asoma { from { opacity: 0; transform: translateY(18px) scale(.9); } }
@keyframes dice { 0% { opacity: 0; transform: translate(-50%, 6px); } 15%, 75% { opacity: 1; transform: translate(-50%, -14px); } 100% { opacity: 0; transform: translate(-50%, -22px); } }
@media (prefers-reduced-motion: reduce) { .miu, .miu * { animation: none !important; transition: none !important; } }
