/* ===== Q版绿植头像（<img> 加载 API 服务的原生 SVG）===== */

/* 摇摆动画：被 .plant-custom .custom-sway 复用，勿删 */
@keyframes plant-sway {
    from { transform: rotate(-2.5deg); }
    to { transform: rotate(2.5deg); }
}

/* ===== 头像容器：摇摆 + 健康滤镜（整图滤镜）===== */

.plant-custom {
    position: relative;
    display: block;
    overflow: visible;
}

.plant-custom .custom-sway {
    width: 100%;
    height: 100%;
    transform-origin: 50% 100%;
    animation: plant-sway var(--sway-dur, 5s) ease-in-out infinite alternate;
}

.plant-custom img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    user-select: none;
    transition: filter .8s ease, transform .8s ease; /* 完成养护后的回血过渡 */
}

.plant-custom.no-anim .custom-sway { animation: none; }
.plant-custom:not(.no-anim):hover .custom-sway { animation-duration: 1.2s; }

.plant-custom.thirsty img { filter: saturate(.8); }
.plant-custom.wilted img { filter: saturate(.5) brightness(.96); transform: rotate(6deg); }
.plant-custom.hungry img { filter: saturate(.65) brightness(1.08); }
.plant-custom.thirsty.hungry img { filter: saturate(.5) brightness(1.04); }

@media (prefers-reduced-motion: reduce) {
    .plant-custom .custom-sway { animation: none; }
}
