/* The depth image is blurred once in a 640px canvas. Text and controls never use blur filters. */
#v-dungeon>.dg-depth-backdrop{position:fixed;inset:0;width:100%;height:100%;object-fit:cover;pointer-events:none;z-index:0;opacity:.14;display:none;filter:none;contain:strict}
body.dungeon-lobby-polished #v-dungeon>.dg-depth-backdrop{display:block}
body.dungeon-lobby-polished #v-dungeon>.dg-header,body.dungeon-lobby-polished #v-dungeon>.dg-lobby{position:relative;z-index:1}
#dgAtmosphereTransition{position:fixed;inset:0;width:100%;height:100%;object-fit:cover;z-index:210;pointer-events:none;filter:none;opacity:0;contain:strict}
@media(prefers-reduced-motion:reduce){#dgAtmosphereTransition{display:none!important}}

/* Match the clear learning battle UI to the round, warm Q-style lobby.
   Geometry, the painted battlefield, actors and all animation hooks are retained. */
body.dungeon-battle:not(.dungeon-painted) #dgBattle{background:#132d39}
body.dungeon-battle:not(.dungeon-painted) #dgBattle::after{content:'';position:absolute;inset:var(--dg-arena-top,50%) 0 0;pointer-events:none;z-index:1;background:linear-gradient(180deg,#173b4666,transparent 24%,transparent 70%,#173b4677),linear-gradient(90deg,#173b4633,transparent 18%,transparent 82%,#173b4633)}
body.dungeon-battle:not(.dungeon-painted) #dgBattle .dg-run-hud{background:#14313e;border-radius:0 0 18px 18px;box-shadow:inset 0 -2px #bda06b;text-shadow:none}
body.dungeon-battle:not(.dungeon-painted) #dgBattle .dg-run-hud .dg-button,body.dungeon-battle:not(.dungeon-painted) #dgBattle .dg-run-hud #sceneMusic{background:#284f5a;border-color:#d4b67a;border-radius:15px;box-shadow:0 3px 0 #10262d;text-shadow:none;color:#fff0cf}
body.dungeon-battle:not(.dungeon-painted) #stage,body.dungeon-battle:not(.dungeon-painted) #sheet{border-color:#ddbf82!important;border-radius:22px!important;background:#1b3b45!important;box-shadow:0 4px 0 #142b30!important}
body.dungeon-battle:not(.dungeon-painted) #board{border-radius:16px!important;background:#fff8e7!important;box-shadow:inset 0 0 0 2px #ead19a!important}
body.dungeon-battle:not(.dungeon-painted) #sheet{background:#fff8e7!important}
body.dungeon-battle:not(.dungeon-painted) #dgBattle .dg-skill,body.dungeon-battle:not(.dungeon-painted) #dgBattle .dg-energy,body.dungeon-battle:not(.dungeon-painted) #dgBattle .dg-monster,body.dungeon-battle:not(.dungeon-painted) #dgBattle .dg-battle-status{background:#214653;border-color:#cbb27b;border-radius:16px;box-shadow:0 3px 0 #112a32;color:#fff1d5;text-shadow:none}
body.dungeon-battle:not(.dungeon-painted) #dgBattle .dg-monster>b{color:#fff1d5}
body.dungeon-battle:not(.dungeon-painted) #dgBattle .dg-skill small,body.dungeon-battle:not(.dungeon-painted) #dgBattle .dg-monster small{color:#cde4d9}
body.dungeon-battle:not(.dungeon-painted) #dgBattle .dg-skill i{border-radius:11px;background:#193a45}
body.dungeon-battle:not(.dungeon-painted) #dgBattle .dg-skill:hover:not(:disabled),body.dungeon-battle:not(.dungeon-painted) #dgBattle .dg-skill:focus-visible{background:#315c65;border-color:#f8df9d}
body.dungeon-battle:not(.dungeon-painted) #dgBattle .dg-battle-status{border-radius:22px;background:#1b404bcc}
body.dungeon-battle:not(.dungeon-painted) #dgBattle #dgTactics>header{background:#193c47;border-color:#d3bd87;border-radius:19px;box-shadow:0 3px 0 #142b31;text-shadow:none}
body.dungeon-battle:not(.dungeon-painted) #dgBattle #dgTactics .dg-command-card{border-color:#d9bf83;border-radius:18px;background:#24515d;box-shadow:0 4px 0 #132b31;text-shadow:none;color:#fff1cf}
body.dungeon-battle:not(.dungeon-painted) #dgBattle #dgTactics .dg-command-card span{color:#d5e8dc}
body.dungeon-battle:not(.dungeon-painted) #dgBattle #dgTactics .dg-command-card[data-wheel='0']{background:#efd493;border-color:#fff0c0;color:#463520;box-shadow:0 4px 0 #665139}
body.dungeon-battle:not(.dungeon-painted) #dgBattle #dgTactics .dg-command-card[data-wheel='0'] :is(i,span){color:#5b4829}
body.dungeon-battle:not(.dungeon-painted) #dgBattle #dgTactics .dg-command-card:hover,body.dungeon-battle:not(.dungeon-painted) #dgBattle #dgTactics .dg-command-card:focus-visible{background:#376b73;border-color:#ffe8ac;box-shadow:0 0 0 2px #f3d28b55,0 4px 0 #132b31}
body.dungeon-battle:not(.dungeon-painted) #dgBattle #dgTactics .dg-command-card[data-wheel='0']:is(:hover,:focus-visible){background:#ffe2a0;border-color:#fff2c9;box-shadow:0 0 0 2px #f3d28b55,0 4px 0 #665139}
body.dungeon-battle:not(.dungeon-painted) #dgBattle .dg-wheel-center{background:#ebce8f;border-color:#fff0c0;color:#44351f;box-shadow:0 3px 0 #65513b}
body.dungeon-battle:not(.dungeon-painted) #dgBattle #dgTactics .dg-wheel-center small{color:#6b5434}
body.dungeon-battle:not(.dungeon-painted) #dgBattle #dgTactics .dg-command-keys{background:#193c47;color:#e3ead6;text-shadow:none}
body.dungeon-battle:not(.dungeon-painted) #dgBattle #dgTactics:not([data-phase=command]){background:#214653;border-color:#cbb27b;border-radius:18px;box-shadow:0 3px 0 #112a32;text-shadow:none}
@media(max-height:650px){body.dungeon-battle:not(.dungeon-painted) #stage,body.dungeon-battle:not(.dungeon-painted) #sheet{border-radius:16px!important}body.dungeon-battle:not(.dungeon-painted) #board{border-radius:11px!important}body.dungeon-battle:not(.dungeon-painted) #dgBattle #dgTactics .dg-command-card{border-radius:14px}}
/* The original text glyph and the shared SVG skin use one centered slot. */
:is(#dgBattle,#v-dungeon) #sceneMusic{display:grid;place-items:center;width:44px;height:44px;min-width:44px;min-height:44px;max-width:44px;max-height:44px;padding:0;gap:0;overflow:hidden;font-size:24px;line-height:1}
:is(#dgBattle,#v-dungeon) #sceneMusic::after{content:none!important;display:none!important}
:is(#dgBattle,#v-dungeon) #sceneMusic:has(>.smart-tool-icon){display:flex;align-items:center;justify-content:center;font-size:0}
:is(#dgBattle,#v-dungeon) #sceneMusic>.smart-tool-icon{display:block;grid-area:1/1;width:24px;height:24px;margin:0}
