/* Body size and bounce never scale or move the name, level or health. */
#map .illustrated-slime { width: calc(112px * var(--slime-scale, 1)); height: calc(108px * var(--slime-scale, 1)); padding: 0; scale: none; translate: -50% -85%; overflow: visible; background: transparent; border: 0; box-shadow: none; filter: none; animation: none; }
.illustrated-slime .slime-body { position: absolute; inset: 0; pointer-events: none; }
.slime-body::after { content: ''; position: absolute; width: 54%; height: 9%; left: 23%; bottom: 4%; border-radius: 50%; background: #0c171f45; filter: blur(2px); }
.slime-bounce { display: block; position: absolute; inset: 0; z-index: 1; transform-origin: 50% 92%; animation: slime-soft-bounce 1.3s ease-in-out infinite; }
.slime-art { display: block; position: absolute; inset: 0; background-image: url('/assets/monsters/slimes-v1.png'); background-size: 300% 200%; background-repeat: no-repeat; background-position: 0 0; }
.family-dark .slime-art { background-position-y: 100%; }
.phase-grown .slime-art { background-position-x: 50%; }
.phase-elder .slime-art { background-position-x: 100%; }
.phase-grown .slime-bounce { animation-duration: 1.5s; }
.phase-elder .slime-bounce { animation-duration: 1.8s; }
.illustrated-slime .slime-caption { position: absolute; bottom: 100%; left: 50%; translate: -50% 0; width: 136px; padding: 4px 6px; border-radius: 7px; background: #10251feb; border: 1px solid #afc69480; pointer-events: none; text-shadow: none; }
.family-dark .slime-caption { background: #19152aee; border-color: #ba9ee580; }
.slime-heading { display: flex; align-items: center; justify-content: space-between; gap: 5px; white-space: nowrap; font: 700 11px/1.3 system-ui, sans-serif; color: #fff5df; }
.slime-level { padding: 2px 4px; border-radius: 4px; background: #e6cb81; color: #241f14; font-size: 10px; flex-shrink: 0; }
.slime-health { display: block; height: 5px; overflow: hidden; background: #060c0b; border-radius: 4px; margin-top: 4px; }
.slime-health i { display: block; height: 100%; background: #89d878; transition: width .2s; }
.family-dark .slime-health i { background: #b997ef; }
.illustrated-slime.enraged .slime-health i { background: #ff857b; }
.slime-health-text { display: block; color: #e2e5d9; font: 10px/1.4 system-ui, sans-serif; text-align: center; margin-top: 2px; }
.slime-mouth { display: none; position: absolute; left: 44%; top: 75%; width: 12%; height: 9%; border-radius: 50%; background: #f3d5ff; box-shadow: 0 0 10px 4px #c589ff; }
.state-spit_prepare .slime-mouth { display: block; animation: slime-mouth-glow .5s ease-in-out infinite alternate; }
.state-spit_prepare .slime-bounce { animation: slime-inhale .5s ease-in-out infinite alternate; }
.state-ranged .slime-bounce { animation: slime-release .4s ease-out; }
.state-jump_prepare .slime-bounce { animation: slime-inhale .35s ease-in-out infinite alternate; }
.state-jump .slime-bounce { animation: none; transform: translateY(-24px) scale(.92,1.08); }
.state-recover .slime-bounce { animation: slime-release .5s ease-out; }
#mapEffects .slime-projectile { width: 18px; height: 15px; background: radial-gradient(circle at 35% 30%, #ffedff, #c08bff 35%, #633095 80%); box-shadow: 0 0 9px #bd80ff; }
#mapEffects .slime-impact { border-color: #c99df9; background: #ac77ef40; }
@keyframes slime-soft-bounce { 0%,100% { transform: translateY(0) scale(1.02,.98); } 45% { transform: translateY(-5px) scale(.98,1.02); } 80% { transform: translateY(0) scale(1.035,.965); } }
@keyframes slime-inhale { from { transform: scale(1.02,.98); } to { transform: scale(1.12,.91); } }
@keyframes slime-mouth-glow { to { box-shadow: -8px 0 7px #d596ff, 8px 0 7px #d596ff, 0 0 14px 5px #c589ff; } }
@keyframes slime-release { 0% { transform: scale(.92,1.07); } 55% { transform: scale(1.06,.94); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { #map .slime-bounce, #map .slime-mouth { animation: none; transform: none; } #mapEffects .slime-projectile { animation: none; } .slime-health i { transition: none; } }

.slime-intent { display: block; color: #ffd79b; font: 700 10px/1.35 system-ui,sans-serif; white-space: normal; text-align: center; }
.slime-intent:empty { display: none; }
.state-spit_prepare .slime-caption, .state-jump_prepare .slime-caption { border: 2px solid #ffbb73; }
#map .combat-selected .slime-body::before { content: ''; position: absolute; inset: 78% 4% -4%; border: 3px solid #ffe5a2; border-radius: 50%; box-shadow: 0 0 10px #ffe5a280; }
#map .combat-out-of-range .slime-body::before { border-style: dashed; border-color: #ff9d8c; }
.combat-target { position: fixed; z-index: 80; left: 16px; bottom: 16px; width: min(285px,calc(100vw - 100px)); padding: 14px; border: 1px solid #ceb16c; border-radius: 12px; background: #10251ff5; color: #f6edcd; box-shadow: 0 4px 20px #0006; }
.combat-target.combat-target-opposite { left: auto; right: 84px; }
.combat-target strong, .combat-target span { display: block; margin-right: 20px; }
.combat-target p { font-size: 12px; margin: 8px 0; }
#combatClear { position: absolute; top: 3px; right: 3px; border: 0; background: transparent; color: white; font-size: 22px; }
#combatAttack { width: 100%; min-height: 42px; }
#combatThreat { color: #ffc888; font-weight: 700; }
.combat-loot { position: fixed; z-index: 81; left: 16px; bottom: 16px; max-width: min(420px,calc(100vw - 100px)); padding: 12px; background: #10251ff5; border: 1px solid #d8c27e; border-radius: 10px; color: #ffe5a2; pointer-events: none; }
.combat-target:not([hidden]) ~ .combat-loot { bottom: 240px; }
#mapEffects .combat-number { position: absolute; z-index: 3000; transform: translate(-50%,-100%); padding: 4px 7px; background: #15231dd9; border-radius: 6px; font: 800 19px system-ui,sans-serif; color: #fff0b4; text-shadow: 0 1px 3px #000; animation: combat-number-rise 1.3s ease-out forwards; }
#mapEffects .damage-received { color: #ffada7; border: 1px solid #ff8077; }
.combat-hurt { filter: brightness(1.5) drop-shadow(0 0 6px #ff6257); }
.monster.combat-impact .slime-bounce { animation:slime-player-impact .26s ease-out both; }
@keyframes slime-player-impact { 45% { transform:translateY(-5px) scale(1.12,.86); filter:brightness(2); } }
@keyframes combat-number-rise { to { opacity: 0; translate: 0 -40px; } }
@media (prefers-reduced-motion: reduce) { #mapEffects .combat-number { animation: none; } }
#combatAttack { border: 1px solid #d6bd7d; border-radius: 7px; background: linear-gradient(#e5cc8b,#b79a5c); color: #17251d; font-weight: 800; }
#combatAttack:disabled { background: #263c31; color: #c1cdbb; border-color: #69816a; cursor: default; }
#combatAttack:focus-visible, #combatClear:focus-visible { outline: 2px solid #fff0b4; outline-offset: 3px; }
@media (max-width: 520px) { .combat-target.combat-target-opposite { right: 76px; width: min(250px,calc(100vw - 92px)); } }
