/* Q-cartoon paper over the actual encounter location. Loaded after legacy battle skins. */
body.home-world-theme.dungeon-battle{--dg-hud:74px;--dg-paper-top:98px;--dg-paper-height:calc(100dvh - 182px);background:#d4e9d1}
body.home-world-theme.dungeon-battle #v-game{background:transparent!important}
body.home-world-theme.dungeon-battle #dgBattle{background:#d4e9d1}
body.home-world-theme.dungeon-battle #dgBattle::after{content:none}
body.home-world-theme.dungeon-battle #dgFight{inset:0!important;width:100%!important;height:100%!important;border:0!important;filter:none}
body.home-world-theme.dungeon-battle #stage,body.home-world-theme.dungeon-battle #sheet{inset:var(--dg-paper-top) auto auto 16px!important;width:calc(66.6667% - 24px)!important;height:var(--dg-paper-height)!important;max-height:none!important;padding:0!important;border:0!important;border-radius:24px!important;background:none!important;box-shadow:none!important;transition:none!important;z-index:18}
body.home-world-theme.dungeon-battle #board{height:100%!important;border:4px solid var(--ink)!important;border-radius:24px!important;background:#fffaf0fa!important;box-shadow:0 6px 0 #8e754bcc!important;overflow:auto!important;scroll-padding:12px}
body.home-world-theme.dungeon-battle #sheet{border:4px solid var(--ink)!important;background:#fffaf0!important;box-shadow:0 6px 0 #8e754bcc!important;overflow:auto!important;z-index:19}
body.home-world-theme.dungeon-battle #stage .qhead{padding:12px 14px 6px;gap:9px}
body.home-world-theme.dungeon-battle #qarea{padding:8px 14px 18px!important;display:flex;flex-direction:column}
body.home-world-theme.dungeon-battle #qarea>.hw-launch{order:20;margin:12px 0 0;justify-content:flex-start}
body.home-world-theme.dungeon-battle #qarea>.qt-task{padding:6px 9px;margin:0 0 9px;border-radius:13px;font-size:12px;line-height:1.35}
body.home-world-theme.dungeon-battle #qarea>.qt-task p{margin:2px 0;font-size:12px;line-height:1.4}
body.home-world-theme.dungeon-battle #qarea>:is(.bk-tip,.answer-drag-tip){order:19;margin:7px 0;font-size:12px}
body.home-world-theme.dungeon-battle:is(.dungeon-command,.dungeon-counter) #stage,body.home-world-theme.dungeon-battle:is(.dungeon-command,.dungeon-counter) #sheet{display:none!important}
body.home-world-theme.dungeon-battle #dgBattle .dg-run-hud{position:absolute;inset:8px 12px auto;width:auto;height:var(--dg-hud);display:flex!important;flex-wrap:nowrap;gap:14px;align-items:center;padding:7px 12px;border:3px solid var(--ink);border-radius:22px;background:#fffaf0f5;box-shadow:0 4px 0 #ad926bb3;color:var(--ink);text-shadow:none;z-index:24}
body.home-world-theme.dungeon-battle #dgBattle .dg-run-hud :is(b,small,span){color:var(--ink);text-shadow:none}
body.home-world-theme.dungeon-battle #dgBattle .dg-health{display:none!important}
body.home-world-theme.dungeon-battle #dgBattle .dg-run-progress{display:flex;flex:1;order:1;flex-direction:column;gap:2px;min-width:0;justify-content:center}
body.home-world-theme.dungeon-battle #dgBattle .dg-run-progress>b{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.home-world-theme.dungeon-battle #dgBattle .dg-run-progress>span{display:block;font-size:11px}
body.home-world-theme.dungeon-battle #dgBattle .dg-run-progress>small{position:static;grid-area:auto;font-size:9px;line-height:11px}
body.home-world-theme.dungeon-battle #dgBattle .dg-save-status{display:inline-flex!important;color:#52834a!important;font-size:9px}
body.home-world-theme.dungeon-battle #dgBattle .dg-run-hud>.dg-button{position:static!important;inset:auto!important;order:4;min-height:44px;flex:none;margin:0;align-self:center;border:3px solid var(--ink);border-radius:15px;background:#ffe598;box-shadow:0 3px 0 #b28b4e;color:var(--ink);text-shadow:none;transform:none}
:is(#dgBattle,#v-dungeon) .dg-countdown{order:2;display:grid;place-items:center;flex:none;min-width:132px;height:58px;padding:1px 18px;border:3px solid #7b502c;border-radius:17px;background:#ffe88e;box-shadow:0 3px 0 #ad8148;color:#4b2d15;font-variant-numeric:tabular-nums;line-height:1}
:is(#dgBattle,#v-dungeon) .dg-countdown>small{font:800 10px/1.2 var(--f-body);color:#775126!important}
:is(#dgBattle,#v-dungeon) .dg-countdown>strong{font:900 32px/1 var(--f-num);color:#553213!important;letter-spacing:1px;text-shadow:0 2px #fff2bc}
:is(#dgBattle,#v-dungeon) .dg-countdown[data-urgent=true]{background:#ffcf72;border-color:#b75028;box-shadow:0 0 0 3px #ffe4a8,0 0 22px #ffbd5e90}
:is(#dgBattle,#v-dungeon) .dg-countdown[data-urgent=true]>strong{color:#a33520!important}
body.home-world-theme.dungeon-battle #dgBattle .dg-monster{position:absolute;top:100px;right:16px;left:auto;max-width:calc(33.3333% - 27px);width:auto;padding:8px 11px;border:3px solid var(--ink);border-radius:18px;background:#fff5d9ef;box-shadow:0 4px 0 #a68c67aa;color:#624b30;text-shadow:none;z-index:7}
body.home-world-theme.dungeon-battle #dgBattle .dg-monster>b{font-size:12px;color:#624b30}
body.home-world-theme.dungeon-battle #dgBattle .dg-monster :is(small,.dg-intent){color:#624b30!important;text-shadow:none}
body.home-world-theme.dungeon-battle #dgBattle .dg-monster .dg-intent-detail{display:none}
body.home-world-theme.dungeon-battle #dgBattle .dg-monster .dg-attack-estimate{font-size:10px}
body.home-world-theme.dungeon-battle #dgBattle .dg-monster .dg-intent{display:block;font-size:11px;line-height:1.5;margin:3px 0 0}
body.home-world-theme.dungeon-battle:is(.dungeon-command,.dungeon-counter) #dgBattle .dg-monster{max-width:37%;top:100px}
body.home-world-theme.dungeon-battle .dg-headplate{position:absolute;z-index:12;pointer-events:none;padding:5px 8px 6px;border:2px solid var(--ink);border-radius:15px;background:#fff9e8f2;box-shadow:0 3px 0 #6b573b55;line-height:1.1;transform-origin:center bottom}
body.home-world-theme.dungeon-battle .dg-head-name{display:block;max-width:100%;font:800 11px/1.3 var(--f-body);color:#553d24;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.home-world-theme.dungeon-battle .dg-headplate .dg-vital-widget,body.home-world-theme.dungeon-battle .dg-headplate .dg-vital-widget :is(b,span,small){color:#634424!important;text-shadow:none}
body.home-world-theme.dungeon-battle .dg-headplate .dg-vital-track{height:10px;border:1.5px solid #5b6543;background:#d1d2b5}
body.home-world-theme.dungeon-battle .dg-headplate .dg-vital-number{font-size:13px;line-height:14px}
body.home-world-theme.dungeon-battle .dg-headplate [data-pulse=hurt]{animation:battleHealthHit .38s ease-out}
body.home-world-theme.dungeon-battle .dg-headplate [data-pulse=heal]{animation:battleHealthHeal .65s ease-out;filter:drop-shadow(0 0 6px #8cda87)}
.dg-vital-pop{position:absolute;left:50%;top:-20px;font:900 25px/1 var(--f-num);color:#a62d2b!important;white-space:nowrap;text-shadow:0 2px #fff8df;z-index:2}
.dg-vital-pop[data-kind=heal]{color:#2b873d!important}.dg-vital-pop[hidden]{display:none}
body.home-world-theme.dungeon-battle #dgSkillBar{position:absolute;inset:auto 12px 9px;height:63px;padding:6px 8px;border:3px solid var(--ink);border-radius:21px;background:#fff9e7f5;box-shadow:0 4px 0 #a98b61;z-index:22;overflow:hidden}
body.home-world-theme.dungeon-battle #dgSkillBar .dg-skills{display:flex;align-items:stretch;justify-content:center;gap:8px;height:100%;overflow:auto;scrollbar-width:thin}
body.home-world-theme.dungeon-battle #dgBattle :is(.dg-skill,.dg-energy){min-height:44px;border:2px solid var(--ink);border-radius:14px;background:#cff0df;color:var(--ink);box-shadow:0 2px 0 #9aa980;text-shadow:none;flex:none}
body.home-world-theme.dungeon-battle #dgBattle .dg-skill{min-width:80px;padding:5px 10px}
body.home-world-theme.dungeon-battle #dgBattle .dg-skill small{color:#5c7153}
body.home-world-theme.dungeon-battle #dgBattle .dg-skill i{border-radius:10px;background:#ffe186}
body.home-world-theme.dungeon-battle #dgBattle .dg-energy{padding:4px 8px;background:#fff0ad;color:#634722}
body.home-world-theme.dungeon-battle #dgBattle .dg-energy :is(b,span){color:#634722!important}
body.home-world-theme.dungeon-battle #dgBattle .dg-turn-phase{color:#604c30;min-width:70px;align-self:center;font-size:10px}
body.home-world-theme.dungeon-battle #dgBattle .dg-turn-phase b{color:#3d592f}
body.home-world-theme.dungeon-battle #dgBattle .dg-battle-status{inset:auto 18px 84px auto;transform:none;max-width:30%;padding:5px 9px;border:2px solid #9a875b;border-radius:15px;background:#fff9dce8;color:#5c543a;font-size:10px;line-height:1.4;text-shadow:none;pointer-events:none}
body.home-world-theme.dungeon-battle:is(.dungeon-command,.dungeon-counter) #dgBattle .dg-battle-status{display:none}
body.home-world-theme.dungeon-battle #dgBattle #dgTactics{position:absolute;inset:auto auto 91px 50%;width:min(65%,690px);min-height:0;margin:0;transform:translateX(-50%);display:block;padding:0;border:0;background:none;color:var(--ink);text-shadow:none;pointer-events:none;z-index:21}
body.home-world-theme.dungeon-battle #dgBattle #dgTactics>header,body.home-world-theme.dungeon-battle #dgBattle #dgTactics :is(.dg-wheel-center,.dg-command-keys){display:none}
body.home-world-theme.dungeon-battle #dgBattle #dgTactics .dg-command-wheel{position:relative;display:grid;grid-template-columns:repeat(5,minmax(44px,1fr));gap:8px;width:100%;height:auto;margin:0;padding:9px;border:3px solid var(--ink);border-radius:22px;background:#fff6dce8;box-shadow:0 5px 0 #9a805e;animation:battleCommandsIn .25s ease-out both}
body.home-world-theme.dungeon-battle #dgBattle #dgTactics .dg-command-wheel::before{content:none}
body.home-world-theme.dungeon-battle #dgBattle #dgTactics .dg-command-card{position:relative;inset:auto;transform:none;width:100%;min-width:44px;min-height:64px;padding:7px 3px;display:grid;gap:4px;place-content:center;border:2px solid var(--ink);border-radius:15px;background:#bce8de;box-shadow:0 3px 0 #86a69b;color:var(--ink);text-shadow:none;pointer-events:auto}
body.home-world-theme.dungeon-battle #dgBattle #dgTactics .dg-command-card[data-wheel='0']{background:#ffdb72;box-shadow:0 3px 0 #b28e45}
body.home-world-theme.dungeon-battle #dgBattle #dgTactics .dg-command-card:is(:hover,:focus-visible){background:#ffe8a6;border-color:#af5e30;outline:2px solid #f7a964;outline-offset:2px;translate:0 -2px}
body.home-world-theme.dungeon-battle #dgBattle #dgTactics .dg-command-card b{font:800 12px/1.3 var(--f-body);white-space:normal}
body.home-world-theme.dungeon-battle #dgBattle #dgTactics .dg-command-card i{display:block;color:#69563c;font-size:17px}
body.home-world-theme.dungeon-battle #dgBattle #dgTactics .dg-command-card span{display:none}
body.home-world-theme.dungeon-battle #dgBattle #dgTactics:not([data-phase=command]){width:min(70%,620px);padding:8px 12px;border:3px solid var(--ink);border-radius:20px;background:#fff9e9f2;pointer-events:auto;text-align:center;max-height:170px;overflow:auto}
body.home-world-theme.dungeon-battle #dgBattle #dgTactics .dg-turn-wait{color:#5c543a;font-size:12px}
body.home-world-theme.dungeon-battle #dgBattle #dgTactics .dg-battle-log{display:none}
#dgLessonSummary{position:absolute;left:16px;top:102px;width:205px;padding:12px;border:3px solid var(--ink);border-radius:19px;background:#fff9e9ed;box-shadow:0 4px 0 #9a805e;z-index:14;color:var(--ink);animation:battleCommandsIn .3s .15s ease-out both}
#dgLessonSummary[hidden]{display:none}#dgLessonSummary small{font:800 10px var(--f-body);color:#8a6337}#dgLessonSummary b{display:block;margin:5px 0;font:800 14px var(--f-body)}#dgLessonSummary p{margin:0;font:600 11px/1.5 var(--f-body);color:#706044}
.dg-paper-flight{position:fixed;z-index:80;border:4px solid var(--ink);border-radius:24px;background:#fff9eb;pointer-events:none;transform-origin:left top;padding:16px;display:grid;grid-template-rows:32px minmax(0,1fr);font:800 18px var(--f-body);color:var(--ink);overflow:hidden}
.dg-paper-flight img{width:100%;height:100%;object-fit:contain;min-height:0}
#dgTimeSpotlight{position:fixed;z-index:110;left:50%;top:24%;width:min(88vw,480px);transform:translateX(-50%);display:grid;gap:8px;text-align:center;padding:23px;border:4px solid var(--ink);border-radius:30px;background:#ffe396;box-shadow:0 7px 0 #b5733c,0 0 0 10px #fff6d68c,0 0 80px #ffb33a80;pointer-events:none;color:#762e1c;animation:battleTimeEntrance .65s cubic-bezier(.2,.7,.2,1) both}
#dgTimeSpotlight small{font:800 13px var(--f-body);letter-spacing:3px}#dgTimeSpotlight strong{font:400 clamp(28px,5vw,45px) var(--f-display)}#dgTimeSpotlight span{font:700 13px var(--f-body)}
:is(#dgBattle,#v-dungeon) #sceneMusic{order:3;display:grid;place-items:center;flex:none;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;border:3px solid var(--ink);border-radius:15px;background:#fff0be;color:var(--ink);box-shadow:0 3px 0 #ad9063}
: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;width:24px;height:24px;margin:0}
@keyframes battleCommandsIn{from{opacity:0;translate:0 8px}to{opacity:1;translate:0 0}}
@keyframes battleHealthHit{25%{translate:-3px 0;filter:drop-shadow(0 0 5px #f2886a)}60%{translate:3px 0}to{translate:0 0}}
@keyframes battleHealthHeal{35%{transform:scale(1.08)}to{transform:scale(1)}}
@keyframes battleTimeEntrance{from{opacity:0;scale:.7;rotate:-3deg}60%{opacity:1;scale:1.05;rotate:1deg}to{opacity:1;scale:1;rotate:0deg}}
@media(max-width:899px) and (min-height:561px){
 body.home-world-theme.dungeon-battle{--dg-hud:80px;--dg-paper-top:106px;--dg-paper-height:calc(66.6667dvh - 100px)}
 body.home-world-theme.dungeon-battle #stage,body.home-world-theme.dungeon-battle #sheet{left:10px!important;width:calc(100% - 20px)!important;border-radius:22px!important}
 body.home-world-theme.dungeon-battle #board{border-radius:22px!important}
 body.home-world-theme.dungeon-battle #stage .qhead{padding:9px 11px 4px;gap:7px}
 body.home-world-theme.dungeon-battle #qtitle{font-size:18px;line-height:1.25}
 body.home-world-theme.dungeon-battle #qno{width:31px;height:31px;font-size:19px}
 body.home-world-theme.dungeon-battle .course-image-open{font-size:12px;padding:4px 7px}
 body.home-world-theme.dungeon-battle #dgBattle .dg-run-hud{left:7px;right:7px;padding:6px;gap:7px}
 body.home-world-theme.dungeon-battle #dgBattle .dg-run-progress>b{font-size:11px;line-height:14px}
 body.home-world-theme.dungeon-battle #dgBattle .dg-run-progress>span{font-size:9px;line-height:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 body.home-world-theme.dungeon-battle #dgBattle .dg-run-hud>.dg-button{font-size:12px;padding:4px 9px}
 :is(#dgBattle,#v-dungeon) .dg-countdown{min-width:94px;padding:2px 8px;height:60px}
 :is(#dgBattle,#v-dungeon) .dg-countdown>strong{font-size:28px}
 body.home-world-theme.dungeon-battle #dgBattle .dg-monster{inset:auto 12px 81px;max-width:none;padding:3px 8px;border-radius:12px;border-width:2px;text-align:center}
 body.home-world-theme.dungeon-battle #dgBattle .dg-monster>:is(b,.dg-attack-estimate){display:none}
 body.home-world-theme.dungeon-battle #dgBattle .dg-monster .dg-intent{font-size:9px;margin:0}
 body.home-world-theme.dungeon-battle:is(.dungeon-command,.dungeon-counter) #dgBattle .dg-monster{inset:106px 10px auto auto;width:calc(100% - 161px);max-width:420px;padding:5px 7px}
 body.home-world-theme.dungeon-battle:is(.dungeon-command,.dungeon-counter) #dgBattle .dg-monster>b{display:block;font-size:11px}
 body.home-world-theme.dungeon-battle #dgBattle .dg-headplate{padding:4px 6px;border-radius:12px}
 body.home-world-theme.dungeon-battle #dgBattle .dg-head-name{font-size:10px}
 body.home-world-theme.dungeon-battle #dgBattle .dg-headplate .dg-vital-number{font-size:12px}
 body.home-world-theme.dungeon-battle #dgSkillBar{left:7px;right:7px;height:62px;padding:5px}
 body.home-world-theme.dungeon-battle #dgSkillBar .dg-skills{gap:4px;justify-content:flex-start}
 body.home-world-theme.dungeon-battle #dgBattle .dg-skill{min-width:50px;padding:4px 7px;font-size:11px}
 body.home-world-theme.dungeon-battle #dgBattle .dg-skill :is(small,i){display:none}
 body.home-world-theme.dungeon-battle #dgBattle .dg-energy{width:54px;padding:4px;font-size:10px}
 body.home-world-theme.dungeon-battle #dgBattle .dg-energy b{gap:2px}body.home-world-theme.dungeon-battle #dgBattle .dg-energy i{width:6px;height:6px}
 body.home-world-theme.dungeon-battle #dgBattle .dg-turn-phase{min-width:46px;font-size:8px}body.home-world-theme.dungeon-battle #dgBattle .dg-turn-phase b{font-size:11px}
 body.home-world-theme.dungeon-battle #dgBattle .dg-battle-status{display:none}
 body.home-world-theme.dungeon-battle #dgBattle #dgTactics{left:9px;right:9px;bottom:91px;width:auto;transform:none}
 body.home-world-theme.dungeon-battle #dgBattle #dgTactics .dg-command-wheel{gap:5px;padding:7px;border-radius:19px}
 body.home-world-theme.dungeon-battle #dgBattle #dgTactics .dg-command-card{min-height:61px;border-radius:13px;padding:5px 2px}
 body.home-world-theme.dungeon-battle #dgBattle #dgTactics .dg-command-card b{font-size:11px}
 body.home-world-theme.dungeon-battle #dgBattle #dgTactics:not([data-phase=command]){left:10px;right:10px;width:auto;max-height:130px}
 #dgLessonSummary{left:10px;top:106px;width:132px;padding:8px;border-radius:15px}#dgLessonSummary b{font-size:11px}#dgLessonSummary p{font-size:10px}
}
@media(max-height:560px){
 body.home-world-theme.dungeon-battle{--dg-hud:60px;--dg-paper-top:82px;--dg-paper-height:calc(100dvh - 150px)}
 body.home-world-theme.dungeon-battle #stage,body.home-world-theme.dungeon-battle #sheet{left:10px!important;border-radius:18px!important}
 body.home-world-theme.dungeon-battle #board{border-radius:18px!important}
 body.home-world-theme.dungeon-battle #stage .qhead{padding:6px 10px 3px;gap:7px;margin-bottom:4px!important}
 body.home-world-theme.dungeon-battle #qtitle{font-size:15px;line-height:1.25}body.home-world-theme.dungeon-battle #qtitle .src{display:none}
 body.home-world-theme.dungeon-battle #qno{width:28px;height:28px;font-size:18px}
 body.home-world-theme.dungeon-battle .course-image-open{font-size:11px;padding:4px 6px}
 body.home-world-theme.dungeon-battle #qarea{padding:4px 10px 12px!important}
 body.home-world-theme.dungeon-battle #qarea>.qt-task{margin-bottom:7px;padding:4px 7px;border-width:1px}body.home-world-theme.dungeon-battle #qarea>.qt-task p{font-size:11px;line-height:1.25}
 body.home-world-theme.dungeon-battle #qarea :is(.bk-wrap,.mt-wrap,.bk-learn){align-items:start!important;gap:9px}body.home-world-theme.dungeon-battle #qarea .bk-card{padding:8px;gap:5px}body.home-world-theme.dungeon-battle #qarea .bk-line{font-size:19px;line-height:1.3}
 body.home-world-theme.dungeon-battle #qarea :is(.bk-pic,.mt-pic){align-self:start!important}
 body.home-world-theme.dungeon-battle #dgBattle .dg-run-hud{top:6px;left:7px;right:7px;padding:4px 8px;gap:8px;border-radius:17px}
 body.home-world-theme.dungeon-battle #dgBattle .dg-run-progress>b{font-size:11px;line-height:12px}body.home-world-theme.dungeon-battle #dgBattle .dg-run-progress>span{font-size:9px;line-height:11px}
 :is(#dgBattle,#v-dungeon) .dg-countdown{height:48px;min-width:110px;padding:1px 10px} :is(#dgBattle,#v-dungeon) .dg-countdown>strong{font-size:27px}
 body.home-world-theme.dungeon-battle #dgBattle .dg-monster{top:82px;right:10px;padding:4px 7px;font-size:10px}
 body.home-world-theme.dungeon-battle #dgBattle .dg-monster .dg-attack-estimate{display:none}body.home-world-theme.dungeon-battle #dgBattle .dg-monster .dg-intent{font-size:9px}
 body.home-world-theme.dungeon-battle #dgBattle .dg-headplate{padding:3px 5px;border-radius:11px}
 body.home-world-theme.dungeon-battle #dgBattle .dg-head-name{font-size:9px}
 body.home-world-theme.dungeon-battle #dgBattle .dg-headplate .dg-vital-number{font-size:11px}
 body.home-world-theme.dungeon-battle #dgSkillBar{height:54px;bottom:7px;padding:3px 5px}
 body.home-world-theme.dungeon-battle #dgBattle .dg-skill{min-width:54px;padding:3px 7px;font-size:10px}body.home-world-theme.dungeon-battle #dgBattle .dg-skill :is(small,i){display:none}
 body.home-world-theme.dungeon-battle #dgBattle .dg-energy{padding:3px 6px;font-size:10px}body.home-world-theme.dungeon-battle #dgBattle .dg-turn-phase{font-size:8px;min-width:47px}
 body.home-world-theme.dungeon-battle #dgBattle .dg-battle-status{display:none}
 body.home-world-theme.dungeon-battle #dgBattle #dgTactics{bottom:73px;width:65%}
 body.home-world-theme.dungeon-battle #dgBattle #dgTactics .dg-command-wheel{gap:4px;padding:5px;border-radius:15px}
 body.home-world-theme.dungeon-battle #dgBattle #dgTactics .dg-command-card{min-height:45px;padding:3px 2px;border-radius:10px}
 body.home-world-theme.dungeon-battle #dgBattle #dgTactics .dg-command-card b{font-size:10px}body.home-world-theme.dungeon-battle #dgBattle #dgTactics .dg-command-card i{display:none!important}
 body.home-world-theme.dungeon-battle #dgBattle #dgTactics:not([data-phase=command]){bottom:73px;max-height:100px}
 #dgLessonSummary{top:82px;width:145px;padding:7px}#dgLessonSummary b{font-size:11px}#dgLessonSummary p{font-size:10px}
 #dgTimeSpotlight{top:20%;padding:14px;width:min(75vw,450px)}
}
@media(prefers-reduced-motion:reduce){#dgAtmosphereTransition{display:none!important}.dg-paper-flight{display:none!important}#dgTimeSpotlight,.dg-headplate *,.home-world-theme.dungeon-battle #dgTactics *{animation:none!important;transition:none!important}}
/* The same prominent clock is retained during exploration. */
body.home-world-theme #v-dungeon .dg-expedition .dg-run-hud{display:grid!important;grid-template-columns:150px minmax(0,1fr) 132px 54px 108px 44px;grid-template-rows:1fr;align-items:center;gap:10px;height:76px;padding:6px 12px;background:#fff9eaf5;color:var(--ink);border-bottom:3px solid var(--ink)}
body.home-world-theme #v-dungeon .dg-expedition .dg-run-hud .dg-health{grid-column:1;grid-row:1}
body.home-world-theme #v-dungeon .dg-expedition .dg-run-progress{grid-column:2;grid-row:1;display:flex;flex-direction:column;max-width:none;gap:2px;align-self:center}
body.home-world-theme #v-dungeon .dg-expedition .dg-countdown{grid-column:3;grid-row:1}
body.home-world-theme #v-dungeon .dg-expedition .dg-run-hud>.dg-button{position:static;grid-column:5;grid-row:1;min-height:44px;max-width:none;padding:5px 8px;font-size:11px!important;justify-self:stretch}
body.home-world-theme #v-dungeon .dg-expedition .dg-run-hud>.dg-hud-hero{grid-column:4;grid-row:1;min-width:44px;max-width:none;justify-self:stretch}
body.home-world-theme #v-dungeon .dg-expedition .dg-run-hud #sceneMusic{grid-column:6;grid-row:1;align-self:center}
body.home-world-theme #v-dungeon .dg-expedition .dg-run-hud :is(b,small,span){color:#5e472c;text-shadow:none}
body.home-world-theme #v-dungeon .dg-expedition .dg-run-progress>small{position:static;display:block;font-size:9px}
@media(max-width:899px) and (min-height:561px){
 body.home-world-theme #v-dungeon .dg-expedition .dg-run-hud{grid-template-columns:91px minmax(0,1fr) 94px 44px;grid-template-rows:39px 44px;height:102px;gap:3px 7px;padding:6px 8px}
 body.home-world-theme #v-dungeon .dg-expedition .dg-run-hud .dg-health{grid-column:1;grid-row:1/3}
 body.home-world-theme #v-dungeon .dg-expedition .dg-run-progress{grid-column:2;grid-row:1}
 body.home-world-theme #v-dungeon .dg-expedition .dg-countdown{grid-column:3;grid-row:1/3;min-width:94px}
 body.home-world-theme #v-dungeon .dg-expedition .dg-run-hud>.dg-button{grid-column:2;grid-row:2;padding:4px 5px;min-width:44px}
 body.home-world-theme #v-dungeon .dg-expedition .dg-run-hud>.dg-hud-hero{grid-column:4;grid-row:2;max-width:44px}
 body.home-world-theme #v-dungeon .dg-expedition .dg-run-hud #sceneMusic{grid-column:4;grid-row:1;align-self:center}
 body.home-world-theme #v-dungeon .dg-expedition .dg-run-progress>small{display:none}
 body.home-world-theme #v-dungeon .dg-expedition .dg-run-progress>b{font-size:10px;line-height:13px}
 body.home-world-theme #v-dungeon .dg-expedition .dg-run-progress>span{font-size:8px;white-space:nowrap}
}
@media(max-height:560px){
 body.home-world-theme #v-dungeon .dg-expedition .dg-run-hud{grid-template-columns:90px minmax(0,1fr) 106px 44px 96px 44px;gap:7px;height:58px;padding:4px 8px}
 body.home-world-theme #v-dungeon .dg-expedition .dg-countdown{min-width:106px;height:48px}
 body.home-world-theme #v-dungeon .dg-expedition .dg-health #dgMp,body.home-world-theme #v-dungeon .dg-expedition .dg-run-progress>.dg-resources{display:none}
}
body.home-world-theme.dungeon-battle:is(.dungeon-command,.dungeon-counter) #dgBattle .dg-monster{display:none}
body.home-world-theme.dungeon-battle .dg-head-skill{display:block;font:700 9px/1.4 var(--f-body);color:#876334;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:3px}
body.home-world-theme.dungeon-battle:not(.dungeon-command):not(.dungeon-counter) .dg-head-skill{display:none}

/* Battle 63: content sets the paper height; only genuinely long lessons scroll. */
body.home-world-theme.dungeon-battle{--dg-paper-width:min(64vw,960px)}
body.home-world-theme.dungeon-battle #stage,
body.home-world-theme.dungeon-battle #sheet{width:var(--dg-paper-width)!important;height:auto!important;max-height:var(--dg-paper-height)!important;min-height:0!important}
body.home-world-theme.dungeon-battle #stage>.play{height:auto!important;max-height:var(--dg-paper-height);min-height:0!important}
body.home-world-theme.dungeon-battle #stage #board{height:auto!important;max-height:var(--dg-paper-height)!important;min-height:0!important;display:flex;flex-direction:column}
body.home-world-theme.dungeon-battle #qarea{flex:0 1 auto;min-height:0!important;overflow:auto!important}
body.home-world-theme.dungeon-battle #stage.with-sheet>.play{visibility:hidden;pointer-events:none}
body.home-world-theme.dungeon-battle #stage>.learning-divider{display:none!important}
body.home-world-theme.dungeon-battle #sheet{padding:12px!important;gap:10px;overflow:hidden!important}
body.home-world-theme.dungeon-battle #sheet.retry{width:min(var(--dg-paper-width),640px)!important}
body.home-world-theme.dungeon-battle #sheet .sheet-content{flex:0 1 auto;min-height:0;overflow:auto}
body.home-world-theme.dungeon-battle #sheet .pbtns{margin-top:0;gap:8px}
body.home-world-theme.dungeon-battle #sheet .pbtns .primary{flex:0 1 auto}
body.home-world-theme.dungeon-battle #sheet .demo{min-height:160px;padding:12px}
body.home-world-theme.dungeon-battle #sheet .demo:empty{display:none}
body.home-world-theme.dungeon-battle #sheet .ptext{font-size:clamp(18px,1.5vw,22px);line-height:1.55}
body.home-world-theme.dungeon-battle #sheet .answer-reading{margin:0}
@media(max-width:899px) and (min-height:561px){
 body.home-world-theme.dungeon-battle{--dg-paper-width:calc(100vw - 20px);--dg-paper-height:calc(100dvh - 360px)}
 body.home-world-theme.dungeon-battle #sheet.retry{width:var(--dg-paper-width)!important}
 body.home-world-theme.dungeon-battle #sheet{padding:10px!important}
 body.home-world-theme.dungeon-battle #sheet .pbtns .primary{flex-basis:100%}
}
@media(max-height:560px){
 body.home-world-theme.dungeon-battle{--dg-paper-width:62vw}
 body.home-world-theme.dungeon-battle #sheet{padding:8px!important;gap:6px}
 body.home-world-theme.dungeon-battle #sheet .demo{min-height:100px}
 body.home-world-theme.dungeon-battle #sheet .ptext{font-size:17px}
}

body.home-world-theme.dungeon-battle #board>.qhead{flex:none}
body.home-world-theme.dungeon-battle #qarea .smart-question-grid:has(.mt-cmp){grid-template-columns:minmax(120px,.32fr) minmax(0,1fr);gap:12px;height:auto}
body.home-world-theme.dungeon-battle #qarea .mt-cmp{flex-wrap:nowrap;gap:8px}
body.home-world-theme.dungeon-battle #qarea .mt-cmp>.mt-cn{min-width:0;flex:1;padding:6px}
body.home-world-theme.dungeon-battle #qarea .mt-card:has(.mt-cmp){padding:10px}
@media(max-width:899px) and (min-height:561px){
 body.home-world-theme.dungeon-battle #qarea .smart-question-grid:has(.mt-cmp){grid-template-columns:minmax(0,1fr)}
}

@media(min-width:740px) and (min-height:561px){
 body.home-world-theme.dungeon-battle #sheet .dp-cmp{grid-template-columns:minmax(0,1.8fr) minmax(150px,1fr);align-items:center;gap:10px 16px}
 body.home-world-theme.dungeon-battle #sheet .dp-cmp>.dp-crow{grid-column:1;grid-row:1/span 2}
 body.home-world-theme.dungeon-battle #sheet .dp-cmp>.mt-big{grid-column:2;grid-row:1;align-self:end;font-size:26px;line-height:1.3}
 body.home-world-theme.dungeon-battle #sheet .dp-cmp>.dp-tip{grid-column:2;grid-row:2;align-self:start}
 body.home-world-theme.dungeon-battle #sheet .tl-demo-cue{padding:6px 10px;font-size:13px}
}
