.mascota { position: relative; width: 96px; height: 96px; flex: 0 0 auto; margin-top: 6px; }
.mascota-cuerpo { position: relative; width: 100%; height: 100%; transform-origin: 50% 100%; animation: masc-flotar 3.2s ease-in-out infinite; }
.mascota-cuerpo img { width: 100%; height: 100%; display: block; object-fit: contain; }

.mascota .parpado { position: absolute; top: 27.75%; width: 3.5%; height: 4.75%; background: #FBE3C0; border-bottom: 1px solid #0b2234; border-radius: 40%; transform: scaleY(0); transform-origin: 50% 0; animation: masc-parpadear 4.6s infinite; pointer-events: none; }
.mascota .parpado.izq { left: 36.5%; }
.mascota .parpado.der { left: 45%; }

.mascota-globo { position: absolute; left: 70%; top: -10px; min-width: 38px; padding: 4px 9px; background: #fff; border: 2px solid #FFD600; border-radius: 14px; border-bottom-left-radius: 3px; font-size: 0.82rem; font-weight: 600; white-space: nowrap; color: #111; opacity: 0; transform: scale(0.4); transform-origin: 0 100%; pointer-events: none; z-index: 2; }

.mascota.saludando .mascota-cuerpo { animation: masc-saludar 2.2s ease-in-out 1; }
.mascota.saludando .mascota-globo { animation: masc-globo 2.6s ease-out 1; }

.mascota.pensando .mascota-cuerpo { animation: masc-pensar 1.6s ease-in-out infinite; }
.mascota.pensando .mascota-globo { opacity: 1; transform: scale(1); }

.mascota.contenta .mascota-cuerpo { animation: masc-saltito 0.7s ease-out 1; }

.mascota-globo .punto { display: inline-block; width: 6px; height: 6px; margin: 0 1.5px; border-radius: 50%; background: #B38F00; animation: masc-punto 1s infinite; }
.mascota-globo .punto:nth-child(2) { animation-delay: 0.15s; }
.mascota-globo .punto:nth-child(3) { animation-delay: 0.3s; }

.ia-burbuja .punto { display: inline-block; width: 7px; height: 7px; margin: 0 2px; border-radius: 50%; background: #B38F00; animation: masc-punto 1s infinite; }
.ia-burbuja .punto:nth-child(2) { animation-delay: 0.15s; }
.ia-burbuja .punto:nth-child(3) { animation-delay: 0.3s; }

@keyframes masc-flotar { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-3px) scale(1.015); } }
@keyframes masc-parpadear { 0%, 91%, 97%, 100% { transform: scaleY(0); } 93.5% { transform: scaleY(1); } }
@keyframes masc-saludar {
    0%, 100% { transform: rotate(0); }
    12% { transform: rotate(-9deg) translateY(-4px); }
    26% { transform: rotate(9deg) translateY(-4px); }
    40% { transform: rotate(-9deg) translateY(-4px); }
    54% { transform: rotate(9deg) translateY(-4px); }
    70% { transform: rotate(-4deg); }
    85% { transform: rotate(0); }
}
@keyframes masc-globo { 0% { opacity: 0; transform: scale(0.4); } 12%, 75% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(0.9); } }
@keyframes masc-pensar { 0%, 100% { transform: rotate(-5deg) translateY(0); } 50% { transform: rotate(5deg) translateY(-4px); } }
@keyframes masc-saltito { 0% { transform: translateY(0); } 35% { transform: translateY(-12px) scale(1.04); } 70% { transform: translateY(0) scale(0.98); } 100% { transform: translateY(0) scale(1); } }
@keyframes masc-punto { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-5px); opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
    .mascota-cuerpo, .mascota .parpado, .mascota-globo, .punto { animation: none !important; }
}
@media print { .mascota-globo { display: none; } }
