/* One word, one blade, one impact. The runes build the strike before it lands. */
.heroAttack .battle-wrap:before{display:none}
.heroAttack .floating-damage{animation-delay:190ms;animation-duration:1.05s;font-size:clamp(34px,5vw,51px);text-shadow:2px 3px #17100b,0 0 17px #f6d29b55}
.enemyAttack .floating-damage.player-hit,.enemyAttack .heart-loss{animation-delay:250ms}
.room-5.enemyAttack .floating-damage.player-hit,.room-5.enemyAttack .heart-loss{animation-delay:460ms}
.enemyAttack .combat-foot{animation:none}
.execution-words{top:39%;left:3%;right:3%;width:auto;max-width:none;display:grid;place-items:center;padding:0;pointer-events:none}
.execution-impact .execution-words{animation:perfect-inscription 2.25s ease-out both}
.execution-impact .execution-words h2{font-size:clamp(28px,5.5vw,64px);line-height:1.25;white-space:nowrap;margin:0;letter-spacing:1px;animation:spectrum-title 2.2s ease-out both}
@keyframes perfect-inscription{0%,7%{opacity:0;transform:scale(.8)}16%{opacity:1;transform:scale(1.09)}29%,78%{opacity:1;transform:none}100%{opacity:0;transform:translateY(-12px)}}
/* Independent layers keep the low-health heartbeat alive after a counterattack. */
.injury-vignette,.injury-vignette.low-health,.injury-vignette.taking-hit{opacity:1;background:none;mix-blend-mode:normal;animation:none}
.injury-vignette:before,.injury-vignette:after{content:'';position:absolute;inset:0;opacity:0;pointer-events:none}
.injury-vignette:before{background:linear-gradient(90deg,#b81c26a8,transparent 25%,transparent 75%,#b81c26a8),radial-gradient(ellipse,transparent 45%,#7710188c)}
.injury-vignette:after{background:radial-gradient(ellipse at 50% 45%,transparent 27%,#a2122344 61%,#d62730eb 100%);box-shadow:inset 0 0 45px #ad112a88}
.injury-vignette.low-health:before{animation:wounded-heartbeat 1.9s ease-in-out infinite}
.injury-vignette.taking-hit:after{animation:wound-surge .8s ease-out both;animation-delay:var(--impact-delay,250ms)}
.stage-combat:has(.enemyAttack){animation:counter-recoil .62s cubic-bezier(.16,.7,.32,1) 250ms both}
.stage-combat:has(.room-5.enemyAttack){animation-delay:460ms}
.stage-combat:has(.heroAttack){animation:blade-weight .3s ease-out 190ms both}
@keyframes wounded-heartbeat{0%,100%{opacity:.26}20%{opacity:.57}36%{opacity:.31}50%{opacity:.48}78%{opacity:.24}}
@keyframes wound-surge{0%{opacity:0}9%{opacity:1}28%{opacity:.82}65%{opacity:.26}100%{opacity:0}}
@keyframes counter-recoil{0%,100%{transform:none}10%{transform:translate(-10px,6px)}23%{transform:translate(8px,-5px)}39%{transform:translate(-6px,3px)}58%{transform:translate(4px,-2px)}78%{transform:translate(-2px,1px)}}
@keyframes blade-weight{0%,100%{translate:0 0}20%{translate:2px -2px}50%{translate:-2px 1px}}
.potion-button[data-action="empty-pouch"]{color:#a69a80;background:none;border-color:#93815a44}
/* Treasury finds take turns in the spotlight; quantity never adds to gold. */
.relic-figure{position:relative;display:grid;place-items:center;height:100px;transform-origin:50% 80%}
.relic-figure>.tooth-icon{width:66px;height:84px;filter:drop-shadow(2px 4px #050a08) drop-shadow(0 0 8px #d4e7ce44)}
.relic-figure canvas[data-loot-art]{margin:0!important}
.treasure-item:before{inset:-3px -12px 32px;opacity:.5;transition:opacity .2s;background:radial-gradient(ellipse,hsla(var(--treasure-hue),85%,69%,.4),transparent 67%)}
.treasure-item.value-counting:before{opacity:1}
.value-counting .relic-figure{animation:relic-spotlight .34s ease-out both}
.value-settled .relic-figure{animation:relic-lock .5s cubic-bezier(.2,.75,.2,1) both}
.treasure-item.value-counting .treasure-value{color:#fff1b7;text-shadow:0 0 14px #ffda7b88}
.value-settled .treasure-value b{animation:treasure-stamp .4s ease-out both!important}
.relic-sparks{position:absolute;inset:0;pointer-events:none;overflow:visible}
.relic-sparks i{position:absolute;left:50%;top:55%;width:3px;height:4px;opacity:0;background:hsl(calc(var(--spark)*41) 80% 76%);box-shadow:0 0 4px currentColor;--spark-angle:calc(var(--spark)*45deg)}
.value-settled .relic-sparks i{animation:relic-shards .65s ease-out both}
.tooth-find .relic-sparks i{background:#eef4ca}.tooth-find strong{color:#eee7c5}.tooth-find .treasure-value{color:#eef0d5}
.tooth-quantity{font:italic 20px Georgia;color:#bdbea3}.keepsake-caption{display:block;font:italic 10px/1.4 Georgia,serif;letter-spacing:.3px;color:#bdc8b3;min-height:17px;margin-top:4px}
.treasure-item.tooth-find:before{background:radial-gradient(ellipse,#b2d4c65e,transparent 68%)}
.loot-total{position:relative;isolation:isolate}.loot-total.tally-settled{animation:spoils-total-lock .55s ease-out both}
.loot-total:after{content:'';position:absolute;inset:-12px -28px;z-index:-1;background:radial-gradient(ellipse,#f2cb643d,transparent 68%);opacity:0}
.loot-total.total-visible:after{animation:spoils-total-glow 1s ease-out both}
.loot-total.tally-settled b{color:#fff1b5;text-shadow:0 0 12px #edc76b77}
.loot-opening .chest-flare{background:radial-gradient(ellipse,#fff7d8e8,transparent 60%)}
.loot-opening .rainbow-burst{filter:saturate(1.45);animation-name:coffer-spectrum-pop}
.loot-dragon.loot-opening .rainbow-burst{filter:saturate(1.6);animation-name:coffer-spectrum-pop}
.loot-pullback .rainbow-burst,.loot-pullback .loot-rays{animation:treasury-recede .52s ease-out both}
@keyframes relic-spotlight{from{transform:translateY(2px) scale(.98);filter:brightness(1)}55%{transform:translateY(-6px) scale(1.12);filter:brightness(1.3)}to{transform:translateY(-2px) scale(1.04);filter:brightness(1.08)}}
@keyframes relic-lock{0%{transform:translateY(-2px) scale(1.04)}24%{transform:translateY(-7px) scale(1.17);filter:brightness(1.5)}55%{transform:translateY(2px) scale(.97)}100%{transform:none;filter:none}}
@keyframes treasure-stamp{0%{transform:scale(1);color:#ffe4a5}25%{transform:scale(1.35);color:#fff9dd;text-shadow:0 0 18px #e8c168}65%{transform:scale(.96)}100%{transform:none}}
@keyframes relic-shards{0%{opacity:0;transform:rotate(var(--spark-angle)) translateX(10px) scale(.4)}15%{opacity:1}100%{opacity:0;transform:rotate(var(--spark-angle)) translateX(64px) scale(.3)}}
@keyframes spoils-total-lock{0%{transform:scale(.98)}24%{transform:scale(1.13);filter:brightness(1.5)}55%{transform:scale(.99)}100%{transform:none;filter:none}}
@keyframes spoils-total-glow{0%{opacity:0;transform:scale(.65)}25%{opacity:1}100%{opacity:.4;transform:scale(1.35)}}
@keyframes coffer-spectrum-pop{0%,27%{opacity:0;transform:scale(.25) rotate(-18deg)}45%{opacity:1;transform:scale(1.45) rotate(0)}65%{opacity:.7;transform:scale(1.6) rotate(14deg)}100%{opacity:.5;transform:scale(1.65) rotate(25deg)}}
/* Cloud exposure belongs to the scene as well as the lightning core. */
.opening-lightning{image-rendering:pixelated;filter:none}
.lightning-reveal .opening-lightning{animation:none;opacity:1}
.opening-flash{background:radial-gradient(ellipse at 67% 12%,#fffde8,#c7e6ed 40%,#7898ac)}
.lightning-reveal .opening-flash{animation:storm-exposure .85s ease-out both}
.intro-impact .stage-home>.gate-world{animation:gate-thunder-jolt .42s ease-out both,gate-light-spill .85s ease-out both!important}
@keyframes storm-exposure{0%{opacity:0}9%{opacity:.2}13%{opacity:.86}29%{opacity:.35}62%{opacity:.08}100%{opacity:0}}
@keyframes gate-light-spill{0%,100%{filter:none}12%{filter:brightness(2) saturate(.65)}42%{filter:brightness(1.3) saturate(.8)}}
@media(max-width:700px){.execution-impact .execution-words h2{font-size:clamp(24px,7vw,36px);letter-spacing:0}.treasure-spread{grid-template-columns:repeat(var(--mobile-finds),minmax(0,1fr));gap:15px 7px}.relic-figure{height:76px}.relic-figure>.tooth-icon{width:50px;height:66px}.treasure-item .treasure-value{font-size:23px}.keepsake-caption{font-size:10px;letter-spacing:0}.treasure-item.tooth-find:nth-child(3n+1){grid-column:1/-1;justify-self:center;width:min(150px,100%)}.loot-revealed.spoils-screen{justify-content:center}.dossier-teeth .tooth-icon{width:26px;height:31px}}
@media(max-width:700px) and (max-height:760px){.relic-figure{height:61px}.relic-figure>.tooth-icon{width:41px;height:54px}.treasure-spread{row-gap:8px}.treasure-item strong{min-height:27px}.loot-revealed .loot-stage{--stage-small:80px}}
@media(prefers-reduced-motion:reduce){.stage-combat:has(.heroAttack),.stage-combat:has(.enemyAttack),.intro-impact .stage-home>.gate-world,.relic-figure,.relic-sparks i,.treasure-value b,.loot-total,.loot-total:after,.execution-impact .execution-words{animation:none!important}.injury-vignette.low-health:before{animation:none;opacity:.3}.injury-vignette.taking-hit:after{animation:none;opacity:.35}.lightning-reveal .opening-flash{animation:gate-soft-light .72s ease-in-out both}.opening-lightning{display:none}.execution-impact .execution-words{opacity:1}.relic-sparks{display:none}}
