/* Numbers stay above the art and below HUD controls; all motion is local. */
.combat-damage{--damage-lane:0;--damage-digits:4;position:absolute;z-index:12;left:50%;top:24%;display:flex;flex-direction:column;align-items:center;width:max-content;max-width:96%;padding:3px 5px;box-sizing:border-box;pointer-events:none;user-select:none;white-space:nowrap;isolation:isolate;transform:translate(-50%,-50%);animation:damage-float 1.05s cubic-bezier(.16,.7,.3,1) both}
.combat-damage .damage-value{position:relative;z-index:2;display:block;font-family:Impact,'Arial Black',system-ui,sans-serif;font-size:clamp(22px,calc(36px - (var(--damage-digits) - 5)*2px),36px);font-weight:950;font-style:italic;line-height:1.05;letter-spacing:.015em;color:#fff5df;-webkit-text-stroke:1px #4b170e;paint-order:stroke fill;text-shadow:0 3px 0 #8a2616,0 5px 0 #1d0c0b,0 7px 10px #000b}
.combat-damage.damage-critical{top:20%;padding:9px 12px;animation:damage-critical-float 1.35s cubic-bezier(.17,.7,.3,1) both}
.combat-damage.damage-critical .damage-value{font-size:clamp(25px,calc(52px - (var(--damage-digits) - 5)*3px),52px);color:#fff0a7;-webkit-text-stroke:1px #5c2305;text-shadow:0 3px 0 #d15c0b,0 6px 0 #5a2109,0 9px 12px #000b}
.damage-caption{position:relative;z-index:2;display:block!important;margin:0 0 2px!important;font:900 10px/1.2 system-ui,sans-serif!important;letter-spacing:.2em;color:#fff5bf!important;text-shadow:0 2px 0 #4a2009,0 0 7px #ffb32a}
.damage-burst{position:absolute;z-index:0;inset:-12px -15px;background:radial-gradient(ellipse,#fff7cba8,#ffc34c5c 40%,#ef641800 70%);transform:rotate(-8deg);animation:damage-burst .6s ease-out both}
.damage-burst:before,.damage-burst:after{content:'';position:absolute;inset:8% 3%;background:linear-gradient(90deg,transparent,#ffdf73 30%,#fff2bc 50%,#ffb636 70%,transparent);clip-path:polygon(0 45%,42% 42%,48% 0,55% 39%,100% 45%,59% 53%,52% 100%,45% 58%,0 55%);opacity:.8}
.damage-burst:after{transform:rotate(65deg) scale(.8);opacity:.45}
@keyframes damage-float{0%{opacity:0;transform:translate(calc(-50% + var(--damage-lane)*14px),8px) scale(.7)}12%{opacity:1;transform:translate(calc(-50% + var(--damage-lane)*14px),-8px) scale(1.12)}30%{opacity:1;transform:translate(calc(-50% + var(--damage-lane)*17px),-16px) scale(1)}72%{opacity:1}100%{opacity:0;transform:translate(calc(-50% + var(--damage-lane)*22px),-55px) scale(.94)}}
@keyframes damage-critical-float{0%{opacity:0;transform:translate(calc(-50% + var(--damage-lane)*10px),6px) rotate(-9deg) scale(.65)}10%{opacity:1;transform:translate(calc(-50% + var(--damage-lane)*10px),-8px) rotate(-5deg) scale(1.17)}24%{opacity:1;transform:translate(calc(-50% + var(--damage-lane)*12px),-14px) rotate(-4deg) scale(1)}76%{opacity:1}100%{opacity:0;transform:translate(calc(-50% + var(--damage-lane)*18px),-65px) rotate(-4deg) scale(.97)}}
@keyframes damage-burst{0%{opacity:0;transform:rotate(-8deg) scale(.6)}20%{opacity:1;transform:rotate(-8deg) scale(1.1)}100%{opacity:0;transform:rotate(-8deg) scale(1.25)}}
.combat-damage.damage-static{animation:none!important;transform:translate(-50%,-50%);opacity:1}
.damage-static .damage-burst{display:none}
@media(max-width:650px){.combat-damage .damage-value{font-size:clamp(20px,calc(31px - (var(--damage-digits) - 5)*2px),31px)}.combat-damage.damage-critical .damage-value{font-size:clamp(22px,calc(43px - (var(--damage-digits) - 5)*3px),43px)}.damage-caption{font-size:9px!important}}
@media(prefers-reduced-motion:reduce){.combat-damage,.combat-damage.damage-critical{animation:none!important;transform:translate(-50%,-50%);opacity:1}.combat-damage .damage-burst{display:none}}

.combat-damage.critical-hit-effect{border:0;border-radius:0;background:transparent;box-shadow:none}
