/* Local impacts and one soft screen wash; no camera shake or repeated strobe. */
#echo-dungeons .dg-weapon svg{width:29px;height:29px;color:var(--attack-color,#ffe1a0)}
.dg-volley,.dg-hit-burst,.dg-scene-glow{position:absolute;pointer-events:none;color:var(--attack-color);font-style:normal}
.dg-volley{width:45px;height:45px;margin:-22px;filter:drop-shadow(0 0 7px var(--attack-color));animation:dg-fx-flight .42s ease-in forwards}
.dg-volley svg{width:100%;height:100%;transform:rotate(var(--angle,0deg))}
.dg-volley-homing{animation:dg-fx-homing .42s ease-in forwards}.dg-volley-triple{width:38px;height:38px}
.dg-volley-ballista{width:82px;height:45px;animation-duration:.52s}.dg-volley-fire{width:35px;height:35px}.dg-volley-ice{width:42px;height:32px}
.dg-volley-wind{width:55px;height:65px}.dg-volley-wind svg{animation:dg-fx-whirl .2s linear infinite}
.dg-volley-lightning{width:75px;height:190px;transform:translateX(-50%);margin:0;animation:dg-fx-bolt .36s ease-out forwards}.dg-volley-lightning svg{transform:none}
.dg-volley-slash,.dg-volley-thrust,.dg-volley-hammer{width:110px;height:110px;margin:-55px;animation:dg-fx-slash .48s ease-out forwards}
.dg-volley-thrust{animation-name:dg-fx-thrust}.dg-volley-hammer{animation-name:dg-fx-hammer}.dg-volley-power{width:110px;height:110px}
.dg-hit-burst{width:72px;height:72px;margin:-36px;animation:dg-fx-impact .6s ease-out forwards}
.dg-hit-burst>span{position:absolute;inset:8px;border:3px solid currentColor;border-radius:50%;box-shadow:0 0 16px currentColor,inset 0 0 12px currentColor}
.dg-hit-ice>span{border-radius:8px;transform:rotate(45deg)}.dg-hit-slash>span,.dg-hit-thrust>span{border-radius:0;border-width:0 0 3px;transform:rotate(-30deg)}.dg-hit-hammer>span{border-width:5px;border-style:dashed}.dg-hit-lightning>span{clip-path:polygon(50% 0,62% 33%,100% 30%,75% 55%,93% 100%,50% 73%,5% 100%,24% 55%,0 30%,38% 33%);background:currentColor}
.dg-hit-burst b{position:absolute;left:8px;top:-18px;font-size:21px;color:#fff3cf;text-shadow:0 2px 3px #100e19;font-variant-numeric:tabular-nums}
.dg-scene-glow{inset:0;background:radial-gradient(ellipse at 30% 45%,var(--attack-color),transparent 75%);animation:dg-fx-glow .45s ease-out forwards;opacity:0}
.dg-actors article[data-attack=hammer].dg-attacking img{animation:dg-fx-windup .4s ease-out}.dg-actors article[data-attack=thrust].dg-attacking img{animation:dg-fx-jab .3s ease-out}.dg-actors article[data-attack=lightning].dg-attacking img,.dg-actors article[data-attack=fire].dg-attacking img,.dg-actors article[data-attack=ice].dg-attacking img,.dg-actors article[data-attack=wind].dg-attacking img{filter:drop-shadow(0 0 12px var(--attack-color));animation:dg-fx-cast .4s ease-out}
.dg-fx-still{animation:none;opacity:.85}.dg-fx-still>span{box-shadow:none}
@keyframes dg-fx-flight{0%{opacity:0;transform:translate(0,0) scale(.65)}15%{opacity:1}90%{opacity:1}100%{opacity:0;transform:translate(var(--dx),var(--dy)) scale(1)}}
@keyframes dg-fx-homing{0%{opacity:1;transform:translate(0,0)}50%{transform:translate(var(--mx),var(--my))}90%{opacity:1}100%{opacity:0;transform:translate(var(--dx),var(--dy))}}
@keyframes dg-fx-whirl{50%{transform:scaleX(.7) rotate(8deg)}}
@keyframes dg-fx-bolt{0%{opacity:0;clip-path:inset(0 0 100%)}25%{opacity:1;clip-path:inset(0)}100%{opacity:0;clip-path:inset(0)}}
@keyframes dg-fx-slash{0%{opacity:0;transform:rotate(-65deg) scale(.6)}35%{opacity:1;transform:rotate(15deg) scale(1.2)}100%{opacity:0;transform:rotate(45deg) scale(1.3)}}
@keyframes dg-fx-thrust{0%{opacity:0;transform:translateX(65px) rotate(180deg)}35%{opacity:1;transform:translateX(-15px) rotate(180deg)}100%{opacity:0;transform:translateX(-35px) rotate(180deg)}}
@keyframes dg-fx-hammer{0%{opacity:0;transform:translateY(-65px) rotate(-65deg)}35%{opacity:1;transform:translateY(5px) rotate(20deg)}100%{opacity:0;transform:translateY(15px) rotate(20deg)}}
@keyframes dg-fx-impact{0%{opacity:1;transform:scale(.65)}60%{opacity:.9}100%{opacity:0;transform:scale(1.4) translateY(-12px)}}
@keyframes dg-fx-glow{20%{opacity:.12}100%{opacity:0}}
@keyframes dg-fx-windup{40%{transform:translateY(-5px) rotate(7deg)}70%{transform:translateY(3px) rotate(-5deg)}}
@keyframes dg-fx-jab{40%{transform:translateX(-18px)}}
@keyframes dg-fx-cast{50%{transform:translateY(-4px)}}
@media(prefers-reduced-motion:reduce){.dg-volley,.dg-scene-glow{display:none}.dg-hit-burst{animation:none}.dg-actors article.dg-attacking img{animation:none!important}}

#echo-dungeons.dg-effects-off .dg-attacking img,#echo-dungeons.dg-effects-off .dg-attacking .dg-weapon,#echo-dungeons.dg-effects-off .dg-attack{animation:none!important}
/* Enemy attack motion stays on the monster; the camera remains still. */
.dg-monster-body{transform-origin:32px 48px}.dg-monster-attacking .dg-monster-body{animation:dg-monster-punch .55s ease-out}
.dg-monster-attacking[data-monster-attack=bite] .dg-mimic-lid,.dg-monster-attacking[data-monster-attack=snap] .dg-mimic-lid,.dg-monster-attacking[data-monster-attack=chomp] .dg-mimic-lid{animation:dg-mimic-bite .55s ease-out}
.dg-monster-attacking[data-monster-attack=snap] .dg-mimic-lid{animation-duration:.35s}.dg-monster-attacking[data-monster-attack=chomp] .dg-monster-body{animation:dg-monster-hop .55s ease-out}
.dg-monster-attacking[data-monster-attack=flap] .dg-monster-body{animation:dg-monster-flap .55s ease-out}.dg-monster-attacking[data-monster-attack=dive] .dg-monster-body{animation:dg-monster-dive .55s ease-out}
.dg-monster-attacking[data-monster-attack=twitch] .dg-monster-body,.dg-monster-attacking[data-monster-attack=claw] .dg-monster-body{animation:dg-monster-twitch .55s ease-out}
.dg-monster-attacking[data-monster-attack=spin] .dg-monster-body{animation:dg-monster-spin .55s ease-out}.dg-monster-attacking[data-monster-attack=hop] .dg-monster-body,.dg-monster-attacking[data-monster-attack=kick] .dg-monster-body{animation:dg-monster-hop .55s ease-out}
.dg-monster-attacking[data-monster-attack=flare] .dg-monster-body{animation:dg-monster-flare .55s ease-out}
.dg-monster-mark{position:absolute;width:80px;height:80px;margin:-40px;color:#e8a38c;pointer-events:none;animation:dg-monster-mark .6s ease-out forwards}.dg-monster-mark svg{width:100%;height:100%}
.dg-monster-mark-bite,.dg-monster-mark-snap,.dg-monster-mark-chomp,.dg-monster-mark-twitch,.dg-monster-mark-flap,.dg-monster-mark-hop{display:none}
@keyframes dg-mimic-bite{25%{transform:rotate(-27deg) translateY(-5px)}52%{transform:rotate(9deg) translateY(5px)}75%{transform:rotate(-5deg)}}
@keyframes dg-monster-punch{30%{transform:translateX(-7px) rotate(-7deg)}55%{transform:translateX(10px) scale(1.06)}}
@keyframes dg-monster-flap{25%{transform:scaleX(.72) translateY(-5px)}55%{transform:scaleX(1.13) translateY(3px)}}
@keyframes dg-monster-dive{30%{transform:translateY(-8px) scale(.9)}65%{transform:translateY(9px) scale(1.13)}}
@keyframes dg-monster-twitch{20%{transform:rotate(-8deg)}40%{transform:rotate(8deg)}60%{transform:rotate(-4deg)}}
@keyframes dg-monster-spin{60%{transform:rotate(330deg)}}
@keyframes dg-monster-hop{25%{transform:translateY(-12px) rotate(-8deg)}55%{transform:translateY(5px) rotate(10deg)}}
@keyframes dg-monster-flare{45%{transform:scale(1.12);filter:drop-shadow(0 0 6px #ff9d46)}}
@keyframes dg-monster-mark{20%{opacity:1;transform:scale(1.2)}100%{opacity:0;transform:scale(1.5) translateX(40px)}}
#echo-dungeons.dg-effects-off .dg-monster-body,#echo-dungeons.dg-effects-off .dg-mimic-lid{animation:none!important}
@media(prefers-reduced-motion:reduce){.dg-monster-body,.dg-mimic-lid{animation:none!important}.dg-monster-mark{display:none}}

#echo-dungeons .dg-enemy.dg-boss{width:min(260px,36%)}#echo-dungeons .dg-enemy.dg-boss>svg{width:100%;height:210px}#echo-dungeons.dg-phone-open .dg-enemy.dg-boss{width:190px}#echo-dungeons.dg-phone-open .dg-enemy.dg-boss>svg{height:155px}

.dg-dungeon-select{margin:18px 0}.dg-dungeon-select>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.dg-dungeon-select button{display:flex;flex-direction:column;align-items:flex-start;gap:6px;text-align:left;padding:14px;min-width:0}.dg-dungeon-select button[aria-pressed=true]{border-color:#c6ec8a;background:#c6ec8a12}.dg-dungeon-select strong{font-size:17px}.dg-dungeon-select span{color:#d7bd85;font-size:12px}.dg-dungeon-select small{font-size:11px;color:#c4bac7;line-height:1.5}.dg-dungeon-select b{font-size:11px}#echo-dungeons.dg-phone-open .dg-dungeon-select button{padding:10px}.dg-dungeon-picker>div{max-width:750px}@media(max-width:550px){.dg-dungeon-select>div{grid-template-columns:1fr}}

#echo-dungeons .dg-map-tabs{flex-wrap:nowrap;overflow-x:auto;max-width:100%;min-width:0;scrollbar-width:thin}#echo-dungeons .dg-map-tabs>button{flex:0 0 auto}

/* A temporary visual copy leaves the slot; the saved captured image is untouched. */
.dg-melee-avatar{position:absolute;z-index:5;aspect-ratio:1;pointer-events:none;font-style:normal;animation:dg-melee-leap .6s ease-in-out both;transform:translate(-50%,-50%)}
.dg-melee-avatar>img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 5px 5px #0008)}
.dg-melee-avatar>span{position:absolute;right:-20%;top:25%;width:60%;height:60%;color:var(--attack-color);animation:dg-melee-swing .6s both}
.dg-melee-avatar svg{width:100%;height:100%}
.dg-melee-thrust{animation-name:dg-melee-dash;filter:drop-shadow(12px 0 6px #ffe3aa55)}
.dg-melee-hammer{animation-name:dg-melee-slam}
.dg-actors .dg-melee-away>div>img,.dg-actors .dg-melee-away .dg-weapon{visibility:hidden}
@keyframes dg-melee-leap{0%,100%{transform:translate(-50%,-50%)}43%{transform:translate(calc(-50% + var(--dx)),calc(-50% + var(--dy) - 20px)) rotate(-12deg)}55%{transform:translate(calc(-50% + var(--dx)),calc(-50% + var(--dy))) rotate(10deg)}}
@keyframes dg-melee-dash{0%,100%{transform:translate(-50%,-50%)}38%,52%{transform:translate(calc(-50% + var(--dx)),calc(-50% + var(--dy))) rotate(-8deg)}}
@keyframes dg-melee-slam{0%,100%{transform:translate(-50%,-50%)}30%{transform:translate(calc(-50% + var(--dx)),calc(-50% + var(--dy) - var(--lift))) rotate(-15deg)}44%,55%{transform:translate(calc(-50% + var(--dx)),calc(-50% + var(--dy))) rotate(15deg)}}
@keyframes dg-melee-swing{0%,30%{transform:rotate(-75deg)}50%{transform:rotate(35deg)}100%{transform:rotate(0)}}
@media(prefers-reduced-motion:reduce){.dg-melee-avatar{display:none}}.dg-cleric-cast{position:absolute;z-index:10;pointer-events:none;color:var(--attack-color);font-style:normal;transform:translate(-50%,-50%);animation:dg-cleric-rise .9s ease-out both;text-align:center}
.dg-cleric-cast>b{display:block;white-space:nowrap;font-size:14px;text-shadow:0 2px 4px #171321;background:#171321dd;border-radius:7px;padding:5px 9px}
.dg-cleric-cast>span{display:block;font-size:45px;text-shadow:0 0 15px currentColor}
.dg-cleric-ring{position:absolute;width:65px;height:65px;margin:-32px;border:3px solid var(--attack-color);border-radius:50%;box-shadow:0 0 16px var(--attack-color),inset 0 0 12px var(--attack-color);animation:dg-cleric-ring .9s ease-out both;pointer-events:none}
.dg-boss-warning{position:absolute;top:22%;left:50%;transform:translateX(-50%);padding:10px 18px;background:#4a2336ed;border:2px solid #ffca83;color:#ffe2b5;border-radius:10px;font-size:clamp(13px,2vw,22px);white-space:nowrap}
.dg-boss-special{position:absolute;width:75px;height:75px;margin:-37px;color:#f2bd74;animation:dg-boss-flight .65s ease-in both;filter:drop-shadow(0 0 6px #dfaa7b);pointer-events:none;font-style:normal}
.dg-boss-special svg{width:100%;height:100%}.dg-special-spores{color:#9bc881}.dg-special-dust{color:#bb9eb7}.dg-special-runes{color:#c296f1}.dg-special-coils{color:#96ceb0}.dg-special-fire{color:#ee9f61}
@keyframes dg-boss-flight{from{opacity:0;transform:rotate(var(--spin)) scale(.5)}25%{opacity:1}to{opacity:0;transform:translate(var(--dx),var(--dy)) rotate(calc(var(--spin) + 180deg)) scale(1.3)}}
@keyframes dg-cleric-rise{from{opacity:0;transform:translate(-50%,-35%) scale(.8)}30%{opacity:1}to{opacity:0;transform:translate(-50%,-90%)}}
@keyframes dg-cleric-ring{from{opacity:0;transform:scale(.6)}25%{opacity:1}to{opacity:0;transform:scale(1.5)}}
@media(prefers-reduced-motion:reduce){.dg-cleric-cast,.dg-cleric-ring,.dg-boss-special{animation:none!important;opacity:.8}.dg-boss-special{left:35%!important;top:40%!important}}
#echo-dungeons.dg-effects-off .dg-cleric-cast,#echo-dungeons.dg-effects-off .dg-cleric-ring,#echo-dungeons.dg-effects-off .dg-boss-special{animation:none!important;opacity:.8}
.dg-ailment-burn{animation:dg-ailment-glow .9s ease-in-out infinite alternate;color:#ffd28e}.dg-ailment-poison{animation:dg-ailment-bubble 1.2s ease-in-out infinite;color:#baffaa}.dg-ailment-bleed{animation:dg-ailment-bubble 1.4s ease-in-out infinite;color:#ffb2b2}.dg-ailment-slow{color:#a7e7ff}.dg-ailment-constrict{animation:dg-ailment-bind 1.4s ease-in-out infinite;color:#b5e1a4}.dg-ailment-curse{animation:dg-ailment-glow 1.2s ease-in-out infinite alternate;color:#ddc0ff}.dg-ailment-stun{animation:dg-ailment-bind .65s ease-in-out infinite;color:#ffe78e}
@keyframes dg-ailment-glow{to{filter:drop-shadow(0 0 4px currentColor)}}
@keyframes dg-ailment-bubble{50%{transform:translateY(-2px)}}
@keyframes dg-ailment-bind{25%{transform:rotate(-6deg)}75%{transform:rotate(6deg)}}
#echo-dungeons.dg-animation-paused .dg-ailment{animation-play-state:paused!important}
#echo-dungeons.dg-effects-off .dg-ailment{animation:none!important}
@media(prefers-reduced-motion:reduce){.dg-ailment{animation:none!important}}
.dg-volley-holy{width:75px;height:190px;transform:translateX(-50%);margin:0;animation:dg-fx-bolt .36s ease-out forwards;color:#fff0a0}.dg-volley-holy svg{transform:none}
.dg-special-jaws{width:170px;height:170px;margin:-85px;animation-duration:.7s}.dg-special-dust{width:120px;height:90px}.dg-special-spores{width:45px;height:45px}.dg-special-coils{width:105px;height:105px}

.dg-ingredient-gain{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin:12px auto;max-width:650px}.dg-ingredient-gain strong,.dg-ingredient-gain small{flex-basis:100%;color:#c3ffff}.dg-ingredient-gain span{padding:8px 12px;border:1px solid #89ded5;background:#163b43;border-radius:8px;font-size:clamp(16px,2.8vh,26px);color:#fff2bb}

#echo-dungeons .dg-gains-ingredients{animation-duration:3.4s;overflow:auto}#echo-dungeons .dg-gains-ingredients h2{margin:10px 0;font-size:clamp(28px,6vh,60px)}@media(max-height:360px){#echo-dungeons .dg-gains-ingredients{padding:8px}#echo-dungeons .dg-gains-ingredients p{margin:6px 0}.dg-ingredient-gain{margin:8px auto;gap:4px}.dg-ingredient-gain span{padding:4px 9px}}

.dg-treasure-gain{display:grid;gap:5px;max-height:150px;overflow:auto;font-size:14px}.dg-treasure-gain>div{display:flex;gap:8px;align-items:center;justify-content:center}.dg-treasure-gain svg{width:34px;height:34px;flex:none}.dg-treasure-gain small{display:block!important;font-size:11px!important}.dg-gains>div{max-height:calc(100% - 12px);overflow:auto}.treasure-icon{image-rendering:pixelated}

/* One persistent reward dialog, with a scrollable body and one fixed action. */
#echo-dungeons .dg-gains.dg-rewards{animation:none;padding:12px;overflow:hidden;background:radial-gradient(ellipse at center,#302a40,#11101b)}
#echo-dungeons .dg-gains.dg-rewards>.dg-reward-panel{width:min(940px,100%);height:100%;max-height:100%;display:flex;flex-direction:column;overflow:hidden;text-align:left}
#echo-dungeons .dg-gains.dg-rewards header{display:block;position:static;height:auto;min-height:0;text-align:center;flex:none;padding:0 8px 10px}
#echo-dungeons .dg-gains.dg-rewards header p{font-size:12px;margin:0 0 5px;letter-spacing:2px}
#echo-dungeons .dg-gains.dg-rewards h2{display:block;font-size:clamp(22px,4.5vh,38px);margin:0;line-height:1.1;color:#f7d98e}
#echo-dungeons .dg-reward-body{min-height:0;overflow:auto;overscroll-behavior:contain;padding:6px 12px;flex:1;scrollbar-gutter:stable}
#echo-dungeons .dg-reward-totals{display:flex;justify-content:center;flex-wrap:wrap;gap:12px 42px;text-align:center;margin-bottom:12px}
#echo-dungeons .dg-reward-totals>div{display:grid;gap:2px}
#echo-dungeons .dg-reward-totals strong{font-size:clamp(26px,6vh,48px);color:#d4f49f}
#echo-dungeons .dg-reward-totals span{font-size:13px;letter-spacing:2px}
#echo-dungeons .dg-reward-body small{display:block;color:#c7c1d4;font-size:12px}
#echo-dungeons .dg-reward-body h3{font-size:14px;color:#f7d98e;margin:0 0 6px}
#echo-dungeons .dg-gains.dg-rewards .dg-treasure-gain{max-height:none;overflow:visible;text-align:left;padding:12px;border:1px solid #8c774a;margin-bottom:10px}
#echo-dungeons .dg-gains.dg-rewards .dg-treasure-gain>div{justify-content:flex-start}
#echo-dungeons .dg-gains.dg-rewards .dg-ingredient-gain{max-width:none;justify-content:flex-start;padding:12px;border:1px solid #638a89;margin:0 0 10px}
#echo-dungeons .dg-gains.dg-rewards .dg-ingredient-gain h3{flex-basis:100%}
#echo-dungeons .dg-gains.dg-rewards .dg-ingredient-gain span{font-size:15px;padding:4px 8px}
#echo-dungeons .dg-reward-potions,#echo-dungeons .dg-reward-cap{padding:10px;border:1px solid #638a89;margin:0 0 10px}
#echo-dungeons .dg-reward-weapons{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,330px),1fr));gap:10px}
#echo-dungeons .dg-reward-weapon{border:2px solid #787186;padding:12px;background:#211d30}
#echo-dungeons .dg-reward-upgraded{border-color:#c5a64f;background:#302a33}
#echo-dungeons .dg-reward-echo{display:flex;align-items:center;gap:12px;margin-bottom:8px}
#echo-dungeons .dg-reward-echo img{width:64px;height:64px;object-fit:contain;image-rendering:pixelated;flex:none}
#echo-dungeons .dg-reward-echo>div,#echo-dungeons .dg-reward-weapon-info>div{display:grid;gap:4px;min-width:0;overflow-wrap:anywhere}
#echo-dungeons .dg-reward-echo span{font-size:13px;color:#e5c47d}
#echo-dungeons .dg-reward-weapon-info{display:flex;gap:10px;align-items:center}
#echo-dungeons .dg-reward-weapon-info>svg{width:52px;height:52px;flex:none}
#echo-dungeons .dg-reward-upgrade-label{color:#e4efaa;font-size:19px}
#echo-dungeons .dg-reward-weapon-info span{font-size:13px}
#echo-dungeons .dg-gains.dg-rewards footer{flex:none;padding:10px 8px 0;display:flex;justify-content:center;background:#171321}
#echo-dungeons #dgRewardContinue{min-height:44px;min-width:190px}
#echo-dungeons:has(.dg-rewards)>.dg-music-toggle,#echo-dungeons:has(.dg-rewards)>.dg-music-controls{display:none}
@media(max-height:360px){#echo-dungeons .dg-gains.dg-rewards{padding:6px 10px}#echo-dungeons .dg-gains.dg-rewards header{padding-bottom:5px}#echo-dungeons .dg-gains.dg-rewards header p{font-size:10px;margin-bottom:2px}#echo-dungeons .dg-gains.dg-rewards h2{font-size:22px}#echo-dungeons .dg-gains.dg-rewards footer{padding-top:5px}#echo-dungeons .dg-reward-echo img{width:48px;height:48px}}
