/* One drawing space anchored at the old sprite's feet, with room for a real swing. */
.storybook-preview .character-sprite { overflow: visible; }
.storybook-preview .storybook-character { position: absolute; width: 120px; height: 120px; left: -26px; top: -26px; }
.storybook-preview .character-renderer:has([data-storybook-gear]) > .character-weapon { display: none; }
.storybook-preview #self:has([data-storybook-ready]).player-attacking .character-renderer,
.storybook-preview #self:has([data-storybook-ready]).player-attack-ready .character-renderer { animation: none; }
.storybook-preview #self:has([data-storybook-ready])::before,
.storybook-preview .pawn:has([data-storybook-ready])::after { display: none; }
.item-illustration { display: inline-block; width: 42px; height: 42px; object-fit: contain; vertical-align: middle; filter: drop-shadow(0 2px 2px #0004); }
.comfort-grid .item-illustration, .storage-item-icon .item-illustration { width: 54px; height: 54px; }
.comfort-item-detail h3 .item-illustration, .storage-selection h3 .item-illustration { width: 70px; height: 70px; }
.comfort-equipment-slots .item-illustration { width: 38px; height: 38px; }
#map .illustrated-slime[data-creature-ready] { opacity: 1; transform: none; transition: filter .2s; }
[data-creature-ready] .slime-bounce { animation: none !important; transform: none !important; }
[data-creature-ready] .slime-art { background-image: none; }
[data-creature-ready] .slime-mouth, [data-creature-ready] .slime-body::after { display: none; }
.creature-canvas { display: block; position: absolute; bottom: 0; left: 0; width: 100%; height: auto; pointer-events: none; }
#map [data-creature-family="lich"], #map [data-creature-family="ghost"] { filter: none; }
[data-creature-family="lich"] .slime-caption, [data-creature-family="ghost"] .slime-caption { bottom: 135%; }
.combat-ground-warning, .combat-landing, .painted-acid-impact, .painted-acid-projectile { position: absolute; pointer-events: none; translate: -50% -50%; }
.combat-ground-warning { box-sizing: border-box; border: 3px dashed #efd893; border-radius: 50%; background: #b9751925; box-shadow: 0 0 0 2px #35260977, inset 0 0 22px #dc942331; }
.combat-ground-warning::after { content: ''; position: absolute; inset: 7px; border: 1px solid #ecd490a0; border-radius: inherit; }
.combat-ground-warning[data-phase="JUMP"] { border-style: solid; background: #bc701b39; }
.combat-landing { border: 3px solid #c9ae71aa; box-shadow: 0 0 16px #b3a07266, inset 0 0 10px #b3a07266; border-radius: 50%; scale: var(--ring-scale, 1); }
.painted-acid-projectile { width: 54px; height: 54px; z-index: 4; }
.painted-acid-projectile::after { content: ''; position: absolute; bottom: -4px; left: 19px; width: 19px; height: 7px; border-radius: 50%; background: #15251935; filter: blur(2px); }
.painted-acid-projectile canvas { width: 100%; height: 100%; object-fit: contain; rotate: var(--acid-angle, 0rad); transform-origin: center; position: relative; top: -12px; }
.painted-acid-impact { width: 112px; height: 88px; scale: var(--splash-scale, 1); }
.painted-acid-impact canvas { width: 100%; height: 100%; }
.comfort-reduced-motion .combat-ground-warning { box-shadow: none; }
@media (prefers-reduced-motion: reduce) { .combat-ground-warning { box-shadow: none; } }

[data-creature-family="undead"] .creature-canvas { width: 135%; left: -17.5%; bottom: -5%; }
[data-creature-family="undead"] .slime-caption { bottom: 128%; }
.slime-name { min-width: 0; white-space: normal; overflow-wrap: anywhere; }

/* Player weapon projectiles are presentation-only. Server combat resolves the hit. */
.weapon-projectile{position:absolute;z-index:2450;translate:-50% -50%;pointer-events:none;width:42px;height:8px;transform:rotate(var(--projectile-angle,0deg));transform-origin:50% 50%;filter:drop-shadow(0 1px 2px #08161199)}
.weapon-projectile::before{content:'';position:absolute;left:2px;right:7px;top:3px;height:2px;border-radius:2px;background:#b98d4f}
.weapon-projectile::after{content:'';position:absolute;right:0;top:1px;width:0;height:0;border-left:8px solid #d4d8cc;border-top:3px solid transparent;border-bottom:3px solid transparent}
.weapon-projectile-arrow{width:48px}
.weapon-projectile-arrow::before{background:linear-gradient(90deg,#6a4b2f,#c39b5b)}
.weapon-projectile-bolt{width:38px;height:10px}
.weapon-projectile-bolt::before{height:3px;top:3px;background:#5a4531}
.weapon-projectile-bolt::after{border-left-color:#879096;border-top-width:4px;border-bottom-width:4px;top:1px}
.player-attacking.attack-dagger .character-renderer{filter:drop-shadow(0 0 3px #d8d9e2)}
.player-attacking.attack-axe .character-renderer,.player-attacking.attack-mace .character-renderer{filter:drop-shadow(0 2px 3px #35281d88)}
.player-attacking.attack-spear .character-renderer{filter:drop-shadow(0 0 4px #ddd4b755)}
.player-attacking.attack-greatsword .character-renderer{filter:drop-shadow(0 0 5px #d5ca9166)}
@media(prefers-reduced-motion:reduce){.weapon-projectile{filter:none}}

/* Immediate authoritative hit confirmation while the slower world refresh catches up. */
#map [data-monster].combat-hit-confirmed .slime-bounce{filter:brightness(1.18) drop-shadow(0 0 7px #f1d08a99);transform:scale(.97,1.03)}
@media(prefers-reduced-motion:reduce){#map [data-monster].combat-hit-confirmed .slime-bounce{transform:none;filter:brightness(1.08)}}
