/* ================================================================
   ESTABLE 1.2 · FASE 2 · PRESUPUESTO DE ANIMACION PARA AVATARES
   No altera el tamano, los colores o los PNG de las capas maestras.
   ================================================================ */

/* FASE 6: los avatares de tarjetas visibles conservan sus movimientos.
   La pantalla con display:none ya los suspende al ocultarse. No añadimos
   un segundo candado que pueda persistir tras navegar desde un mundo. */

/* Los PNG de ropa/disfraz son imágenes, no superficies de animación:
   el contenedor animador se mueve mediante transform y opacity. */
.capaImagenAvatar-ropa,
.capaImagenAvatar-disfraz,
[class*="animacion-ropa_"] .capaImagenAvatar-ropa,
[class*="animacion-disfraz_"] .capaImagenAvatar-disfraz {
    will-change: auto !important;
}

/* Ninguna reserva GPU para cabellos que no tienen animación activa.
   Si la capa tiene una animación, el propio CSS del catálogo lo activa. */
.animadorCabelloV2:not([class*="animacionCabelloV2-"]) {
    will-change: auto !important;
}

/* Modo economico: las tarjetas de premiso y otros adornos inactivos
   no deben provocar repintados por filtro en la misma escena. */
body[data-rendimiento="economico"] .marco_avatar_maestro,
body[data-rendimiento="economico"] [class*="efectoAvatar-"] {
    will-change: auto !important;
}

/* Compatibilidad con preferencias del dispositivo. */
@media (prefers-reduced-motion: reduce) {
    html:not([data-aventura-animaciones="activas"]) .avatarCompuesto [class*="animacionRopaV2-"],
    html:not([data-aventura-animaciones="activas"]) .avatarCompuesto [class*="animacionCabelloV2-"],
    html:not([data-aventura-animaciones="activas"]) .avatarCompuesto [class*="efectoAvatar-"] {
        animation: none !important;
        will-change: auto !important;
    }
}

/* Preferencia explícita de movimiento reducido DENTRO del juego.
   No depende de la preferencia general del navegador. */
html[data-aventura-animaciones="reducidas"] .avatarCompuesto [class*="animacionCabelloV2-"],
html[data-aventura-animaciones="reducidas"] .avatarCompuesto [class*="animacionRopaV2-"],
html[data-aventura-animaciones="reducidas"] .avatarCompuesto [class*="efectoAvatar-"],
html[data-aventura-animaciones="reducidas"] .capaAvatarAnimada,
html[data-aventura-animaciones="reducidas"] .introV6DecoHojas,
html[data-aventura-animaciones="reducidas"] .introV6DecoHojas .introV6Deco,
html[data-aventura-animaciones="reducidas"] .introV6DecoObjeto .introV6Deco {
    animation: none !important;
    will-change: auto !important;
}
html[data-aventura-animaciones="reducidas"] #fondoGlobalJuego .fgTrack,
html[data-aventura-animaciones="reducidas"] #fondoGlobalJuego .fgColinas,
html[data-aventura-animaciones="reducidas"] #fondoGlobalJuego .fgMariposas,
html[data-aventura-animaciones="reducidas"] #fondoGlobalJuego .fgHoja,
html[data-aventura-animaciones="reducidas"] #fondoGlobalJuego .fgEstrella {
    animation-play-state: paused !important;
    will-change: auto !important;
}
