/* Corpses use tight, individually measured bounds, independent of standing atlas cells. */
.corpse-art{display:none;position:absolute;left:50%;right:auto;bottom:0;width:min(calc(165% * var(--actor-scale,1)),115cqw);height:auto;aspect-ratio:var(--corpse-ratio);transform:translateX(-50%);pointer-events:none;z-index:1;filter:drop-shadow(0 5px 3px #0009);transform-origin:50% 100%}
.corpse-art>svg{display:block;width:100%;height:100%;overflow:visible}.enemy.dead .corpse-art{display:block;animation:corpse-settle .32s ease-out both}
.enemy.dead .character-art,.enemy.dead .burn-vfx,.enemy.dead .body-status,.enemy.dead .status-motes{display:none!important}
.enemy.dead .ground-shadow{width:90%;height:11px;bottom:-2px;opacity:.55}.enemy.dead .enemy-info::after{display:none!important}
.corpse-fire,.corpse-ice,.corpse-toxin,.corpse-sparks{display:none}
.enemy[data-burning="true"] .corpse-fire{display:block;opacity:.72;mix-blend-mode:screen;animation:real-fire-glow .8s ease-in-out infinite alternate}
.enemy[data-frozen="true"] .corpse-ice{display:block;opacity:.44}
.enemy[data-poisoned="true"] .corpse-toxin{display:block;opacity:.33}
.enemy[data-burning="true"] .corpse-sparks{display:block;fill:#ffd58c}.corpse-spark{animation:corpse-ember 1.8s ease-out infinite;transform-box:fill-box;transform-origin:center}
@keyframes corpse-settle{from{opacity:.7;translate:0 -4px}to{opacity:1;translate:0 0}}
@keyframes corpse-ember{from{opacity:0;translate:0 0}25%{opacity:.7}to{opacity:0;translate:5px -22px}}
/* Organic raster flames, no tiled bands and no detached fire at the feet. */
.burn-vfx::before,.burn-vfx::after{background-image:url('./assets/fire-body-v3.webp');background-size:100% 100%;inset:-4% -3%;animation:real-body-fire 1.1s ease-in-out infinite alternate;opacity:.72}
.burn-vfx::after{opacity:.22;animation-duration:1.8s;animation-delay:-.8s;transform:scaleX(-1)}
.enemy[data-burning="true"] .character-art{filter:drop-shadow(0 0 3px #ec8b3e99) drop-shadow(0 0 7px #cd5f2433)!important}
@keyframes real-body-fire{from{translate:-1% 2%;scale:1 .98;filter:brightness(.92)}to{translate:1% -2%;scale:1.03 1.03;filter:brightness(1.16)}}
@keyframes real-fire-glow{from{opacity:.52;filter:brightness(.95)}to{opacity:.79;filter:brightness(1.15)}}
.frost-vfx::before{animation:ice-light 3.6s ease-in-out infinite alternate;opacity:.4}.toxin-vfx::before{animation:toxic-film 3s ease-in-out infinite alternate;opacity:.3}
@keyframes ice-light{from{opacity:.28;filter:brightness(1)}to{opacity:.48;filter:brightness(1.12)}}
@keyframes toxic-film{from{opacity:.25;translate:0 0}to{opacity:.39;translate:0 1%}}
.status-motes{display:none;position:absolute;inset:0 15%;pointer-events:none;z-index:3}.status-motes i{position:absolute;bottom:10%;left:25%;width:3px;height:3px;border-radius:50%;opacity:0;background:#ffc989;box-shadow:0 0 5px #d86616;animation:status-rise 2s ease-out infinite}.status-motes i:nth-child(2){left:55%;bottom:40%;animation-delay:-.7s}.status-motes i:nth-child(3){left:70%;bottom:25%;animation-delay:-1.4s}.status-motes i:nth-child(4){left:40%;bottom:60%;animation-delay:-.3s}
.enemy[data-burning="true"]:not(.dead) .status-motes,.enemy[data-poisoned="true"]:not(.dead) .status-motes{display:block}.enemy[data-poisoned="true"]:not([data-burning="true"]) .status-motes i{width:4px;height:4px;background:transparent;border:1px solid #aacd6a99;box-shadow:0 0 4px #74943d55;animation-duration:3s}
@keyframes status-rise{0%{opacity:0;translate:0 0}20%{opacity:.7}100%{opacity:0;translate:4px -35px}}
.is-paused .corpse-art,.is-paused .corpse-fire,.is-paused .corpse-spark,.is-paused .status-motes i,.is-paused .body-status::before,.is-paused .burn-vfx::before,.is-paused .burn-vfx::after{animation-play-state:paused!important}
@media(prefers-reduced-motion:reduce){.corpse-art,.corpse-fire,.corpse-spark,.status-motes i,.body-status::before,.burn-vfx::before,.burn-vfx::after{animation:none!important}.status-motes{display:none!important}}

.enemy:not(.dead){z-index:2}.enemy.dead{z-index:1}

.enemy.dead .enemy-info{opacity:1;background:linear-gradient(135deg,#252b22,#151d17);border-color:#756d52}.enemy.dead .enemy-health,.enemy.dead .enemy-turn-row,.enemy.dead .enemy-trait{opacity:.48}
