/* Star Gate UI, v2. Generated artwork uses fixed corners and end caps;
   only its plain rails/centre extend. Character artwork always keeps its ratio. */
.dg-view,.dg-dialog-layer,#dgBattle{--dg-border:#657e79;--dg-gold:#f1d49a;--dg-text:#fff4dc;--dg-muted:#b5c6c5;--dg-panel:#122c32;--dg-line:#a98b55;accent-color:#77cbb8}
.dg-view *,.dg-dialog-layer *,#dgBattle *{min-width:0}
.dg-view button,.dg-dialog-layer button,#dgBattle button{min-height:44px;min-width:44px;white-space:normal;overflow-wrap:break-word;flex-shrink:0;transition:background .15s,border-color .15s,box-shadow .15s}
.dg-view button:focus-visible,.dg-dialog-layer button:focus-visible,#dgBattle button:focus-visible{outline:3px solid #aaf6de;outline-offset:3px}
.dg-view .dg-button,.dg-dialog-layer .dg-button,#dgBattle .dg-button{border:2px solid #a68c5d;border-radius:12px;background:linear-gradient(#29535a,#143039);color:#fff1d4;box-shadow:inset 0 1px 0 #88bdad55,0 3px 0 #08191d;padding:9px 14px;line-height:1.5;text-shadow:0 1px #071c24}
.dg-view .dg-button:hover:not(:disabled),.dg-dialog-layer .dg-button:hover:not(:disabled),#dgBattle .dg-button:hover:not(:disabled){border-color:#ffe0a0;background:linear-gradient(#376a6b,#20464c)}
.dg-view .dg-primary,.dg-dialog-layer .dg-primary{position:relative;isolation:isolate;border:0;border-radius:18px;min-height:50px;background:#d9b05d;color:#30200e;padding:12px 36px;box-shadow:0 3px 0 #08191d;font-weight:800;text-shadow:0 1px #fff1b880}
.dg-view .dg-primary::before,.dg-dialog-layer .dg-primary::before{content:'';position:absolute;inset:0;z-index:-1;pointer-events:none;border:12px solid transparent;border-image:url('../assets/dungeon/ui-v2/button-primary.webp') 25% 19% fill / 12px 32px / 0 stretch}
.dg-view button:active:not(:disabled),.dg-dialog-layer button:active:not(:disabled),#dgBattle button:active:not(:disabled){transform:translateY(2px)}
.dg-view button:disabled,.dg-dialog-layer button:disabled,#dgBattle button:disabled{opacity:.57}
.dg-view img,.dg-dialog-layer img,#dgBattle .dg-skill img{object-fit:contain}
#v-dungeon{background:radial-gradient(ellipse at 55% 0,#28545870,transparent 65%),linear-gradient(145deg,#122930,#101d27 65%,#1b2b32)}
.dg-header{border-color:#aa8c5540;background:#0e252cd9;height:auto;min-height:86px}
.dg-brand{color:#f1d49a!important}.dg-brand small{color:#a8c9c2}
.dg-header-right{gap:16px}.dg-header .dg-button{font-size:13px}
.dg-hero{background:linear-gradient(145deg,#244a4e,#122a31);border-color:#b69a68;box-shadow:0 6px 0 #08191d,inset 0 0 0 3px #0d272c}
.dg-hero-rune{border-color:#e2bf7140}.dg-hero-title>b,.dg-stat-grid span{background:#0c252d;color:#bbd0c9}
.dg-hero-title h2{margin:0}.dg-hero-title>b{white-space:nowrap}.dg-hero p,.dg-hero>small,.dg-heading p:not(.dg-kicker){color:#b5c6c5}
.dg-hero>.dg-button{font-size:12px}.dg-portrait img{width:100%;max-width:210px;object-fit:contain}
.dg-realm{border-color:#627d78;box-shadow:0 5px 0 #091c20}.dg-realm img{object-fit:cover}
.dg-realm b{font-size:clamp(13px,1.5vw,18px);white-space:normal;line-height:1.4}.dg-realm span{right:8px}
.dg-realm.selected{border-color:#efd49d;box-shadow:0 0 0 2px #112a30,0 0 0 3px #c7a56a,0 4px 18px #71c8ae33}
.dg-paper{background:linear-gradient(120deg,#25454c,#172d38);border-color:#6e8d85;color:#fff3da}
.dg-paper:hover:not(:disabled){border-color:#f1d49a;background:linear-gradient(120deg,#345c60,#203b43)}
.dg-paper-number{color:#c7ae7f;border-color:#d1af6b44}.dg-paper small,.dg-notice,.dg-paper-heading label{color:#b9ccc6}
.dg-paper-heading select{background:#17313a;border-color:#9d8b61;color:#f7e6c6;max-width:100%}
.dg-rules{border-color:#b89b5b44;flex-wrap:wrap;gap:14px 24px}.dg-resume{background:#295b574d;border-color:#75b3a2;flex-wrap:wrap}
.dg-dialog-layer{padding:16px;background:#06151bd9;backdrop-filter:blur(7px)}
.dg-dialog,.dg-dialog.dg-wide{display:flex;flex-direction:column;position:relative;isolation:isolate;padding:0;border:0;border-image:none;border-radius:19px;background:radial-gradient(ellipse at 20% 0,#31585b66,transparent 65%),linear-gradient(140deg,#17363e,#10232e);width:min(660px,100%);max-height:calc(100dvh - 32px);overflow:hidden;box-shadow:0 12px 36px #000a}
.dg-dialog::before{content:'';position:absolute;inset:0;z-index:3;pointer-events:none;border:40px solid transparent;border-image:url('../assets/dungeon/ui-v2/frame.webp') 22% / 40px / 0 stretch}
.dg-dialog.dg-wide{width:min(1080px,100%);height:min(760px,calc(100dvh - 32px))}
.dg-dialog-head{position:relative;flex:none;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:22px 28px 12px 44px;border-bottom:1px solid #d9b77033;margin:0 10px}
.dg-dialog-head h2{font:400 28px/1.35 var(--f-display);color:#f4dba6;margin:0}
.dg-dialog-head .dg-close{position:static;width:44px;height:44px;padding:0;flex:none;font-size:24px!important;line-height:1;border-radius:50%}
.dg-dialog-body{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding:20px 28px 28px;scrollbar-color:#76998c #112a32;scroll-padding:16px}
.dg-dialog-body>p{color:#c3d3cc;font-size:14px;line-height:1.8;margin:0 0 20px}
.dg-dialog-body>.dg-primary,.dg-dialog-body>.dg-button{margin:0 8px 8px 0}
.dg-dialog-body>.dg-notice{margin:14px 0 0;min-height:0;font-size:12px}.dg-dialog-body>.dg-notice:empty{display:none}
.dg-hero-sheet{grid-template-columns:210px minmax(0,1fr);gap:22px;margin:0;align-items:start}
.dg-hero-side{position:sticky;top:0;gap:12px}
.dg-hero-side canvas{display:block;width:100%;height:auto;aspect-ratio:23/22;max-width:230px;align-self:center;border:1px solid #7c9b8b;background:radial-gradient(circle at 50% 75%,#40786b,#102a34 70%);box-shadow:inset 0 0 20px #081e2c}
.dg-hero-side>b{color:#f5ddac;font-size:15px}.dg-hero-side>small{font-size:12px;color:#b5c6c5;line-height:1.6}
.dg-stat-grid{gap:7px;font-size:12px}.dg-stat-grid span{border-color:#7c9b8b55;padding:8px 10px}.dg-stat-grid b{color:#f4dba6;font-size:18px}
.dg-points{background:linear-gradient(#264b4e,#18353e);border:1px solid #a88f5a;color:#ede1bd}.dg-points small{display:block;font-size:12px;line-height:1.6;color:#bdcec6}.dg-points progress{display:block;margin:8px 0}
.dg-tabs{margin:0 0 16px;gap:10px}.dg-tabs button{flex:1 1 0;min-height:48px!important}
.dg-tabs button[aria-selected=true]{color:#2b210f;text-shadow:none;background:linear-gradient(#f8dfa5,#d5b16b);border-color:#f4dba6;box-shadow:inset 0 1px #fff5cc,0 3px #08191d}
.dg-equipment{gap:12px;margin:0}.dg-equipment .dg-slot{margin:4px 0 0;color:#e5c990;font-size:17px}
.dg-equipment article{grid-template-columns:48px minmax(0,1fr) 80px 112px;gap:12px;background:linear-gradient(110deg,#1d3c44,#122b35);border:1px solid #708f83;padding:13px}
.dg-equipment article.used{border-color:#c6ae76;box-shadow:inset 3px 0 #e6c17b}.dg-equipment img{width:48px;height:48px;aspect-ratio:1;object-fit:contain;align-self:center}
.dg-equipment h3{font-size:17px;line-height:1.45;margin:0}.dg-equipment p{font-size:12px;line-height:1.65;color:#b9ccc6}.dg-equipment button{width:100%;font-size:12px;padding:7px!important}
.dg-talents{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;align-items:start}
.dg-talent-group h3{color:#e8d09c;margin:0 0 12px;font-size:18px}
.dg-talent{grid-template-columns:40px minmax(0,1fr);gap:6px 9px;background:linear-gradient(120deg,#23454a,#122b35);border-color:#6f8c83;padding:12px;margin-bottom:12px}
.dg-talent.learned{border-color:#d1b577;box-shadow:inset 3px 0 #cfb77a}.dg-talent h4{flex-wrap:wrap;justify-content:start;gap:4px 8px;font-size:14px;line-height:1.5;color:#fff4dc}
.dg-talent i{width:40px;height:40px;aspect-ratio:1;flex:none}.dg-talent i img,.dg-talent i svg{width:36px;height:36px;object-fit:contain;flex:none}
.dg-talent p{grid-column:1/-1;font-size:12px;line-height:1.75;color:#bdd0c8}.dg-talent p b{color:#a8e9c7}.dg-talent button{min-height:44px!important;font-size:12px}.dg-pips i{width:8px;height:8px}
.dg-report-list .dg-paper{justify-content:space-between;gap:16px}.dg-report-list .dg-paper>span{flex:1}.dg-report-list .dg-paper>b{flex:none;color:#f1d49a}
.dg-rewards,.dg-growth{background:linear-gradient(130deg,#204149,#122c36);border-color:#8b936f}.dg-report-score>div{min-width:0}.dg-growth>div{grid-template-columns:minmax(0,1fr) minmax(70px,160px) 55px}
.dg-run-hud{background:#0e282fed;border-color:#a88f5a55;gap:18px}.dg-run-progress>small{white-space:nowrap}.dg-health{max-width:30%}
.dg-run-hud #sceneMusic{display:grid;place-items:center;flex:none;width:44px;height:44px;min-width:44px;min-height:44px;padding:0;border:2px solid #a68c5d;border-radius:12px;background:linear-gradient(#29535a,#143039);color:#fff1d4;box-shadow:inset 0 1px #88bdad55,0 3px #08191d;font-size:0}
.dg-run-hud #sceneMusic::after{content:'♫';font:700 23px/1 var(--f-body)}.dg-run-hud #sceneMusic[aria-pressed=false]{color:#93b0ad;border-color:#657e79}
.dg-map-label{background:#0f2932d9;border-left-color:#dfc086}.dg-map-notice{background:#102a32e8;border-color:#80978b77}
.dg-directions .dg-button{padding:0}.dg-map-actions button{max-width:100%}
#dgBattle .dg-skill,#dgBattle .dg-energy,#dgBattle .dg-monster,#dgBattle .dg-battle-status{background:linear-gradient(#2c555ced,#16353eed 70%,#112a33ed);border-color:#c7b07b;color:#fff3d9;text-shadow:0 1px #071c24;box-shadow:inset 0 1px #a6d7bb22,0 3px 8px #0007}
#dgBattle .dg-run-hud{background:linear-gradient(#0a222af5,#0b232b99)}
#dgBattle .dg-skill{min-height:44px;min-width:106px;flex:0 0 auto}#dgBattle .dg-skills{scrollbar-width:thin;scrollbar-color:#b89b5b #112a32;gap:7px}
#dgBattle .dg-skills::-webkit-scrollbar{display:block;height:3px}#dgBattle .dg-skills::-webkit-scrollbar-thumb{background:#b89b5b;border-radius:3px}
#dgBattle .dg-skill small,#dgBattle .dg-monster small{color:#c2d4ca}#dgBattle .dg-monster>b{color:#fff3d9}
body.dungeon-battle #stage{background:linear-gradient(#2c555c,#122c36)!important;border-color:#ccb57f!important;box-shadow:0 0 0 2px #0a232b,0 10px 28px #000a!important}
body.dungeon-battle #sheet{border-color:#ccb57f!important;box-shadow:0 0 0 2px #0a232b,0 10px 28px #000a!important}
@media(max-width:1050px){
 .dg-equipment article{grid-template-columns:44px minmax(0,1fr) 72px 96px;gap:9px;padding:11px}.dg-equipment img{width:44px;height:44px}
 .dg-hero-sheet{grid-template-columns:180px minmax(0,1fr);gap:18px}.dg-talents{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:750px){
 .dg-header{min-height:76px;padding:12px;gap:10px;flex-wrap:wrap}.dg-header-right{gap:10px}.dg-header .dg-back{font-size:12px;padding:8px 10px}.dg-brand span{font-size:19px}.dg-brand{gap:4px;font-size:20px}.dg-brand small{font-size:9px;letter-spacing:2px}.dg-wallet{font-size:12px}
 .dg-header-right{margin-left:auto}.dg-header-right .dg-button{font-size:12px;padding:8px 10px}
 .dg-lobby{padding:18px 14px 28px}.dg-lobby-grid{grid-template-columns:minmax(0,1fr)}.dg-heading{gap:12px}.dg-heading h1{font-size:26px}.dg-duration{white-space:normal;font-size:14px}
 .dg-realms{gap:7px}.dg-realm{height:124px}.dg-realm span{left:6px;right:5px;bottom:9px}.dg-realm b{font-size:13px;writing-mode:horizontal-tb;letter-spacing:0}.dg-realm small{font-size:11px;letter-spacing:0}.dg-paper-heading{flex-wrap:wrap}.dg-paper-heading h2{font-size:19px}.dg-paper-heading label{width:100%;justify-content:space-between;font-size:12px}.dg-paper-heading select{width:180px}.dg-paper{padding:12px;gap:10px}.dg-paper small{font-size:11px}.dg-paper-number{font-size:22px}.dg-papers{max-height:none}.dg-resume>div{flex-basis:100%}
 .dg-dialog-layer{padding:10px}.dg-dialog,.dg-dialog.dg-wide{max-height:calc(100dvh - 20px);border-radius:16px}.dg-dialog.dg-wide{height:calc(100dvh - 20px)}.dg-dialog::before{border-width:32px;border-image-width:32px}
 .dg-dialog-head{padding:18px 15px 10px 25px;gap:10px}.dg-dialog-head h2{font-size:25px}.dg-dialog-body{padding:16px 20px 24px;scrollbar-gutter:auto}
 .dg-hero-sheet{grid-template-columns:minmax(0,1fr);gap:20px}.dg-hero-side{position:static;display:grid;grid-template-columns:minmax(100px,.9fr) minmax(0,1.1fr);gap:10px;align-items:center}
 .dg-hero-side canvas{width:100%;height:auto;max-width:180px;grid-column:1;grid-row:1/3;justify-self:center}.dg-hero-side>b{grid-column:2;font-size:14px}.dg-hero-side .dg-stat-grid{grid-column:2;gap:4px;font-size:11px}.dg-stat-grid span{padding:5px 7px}.dg-stat-grid b{font-size:16px}
 .dg-hero-side .dg-points,.dg-hero-side>small{grid-column:1/-1}.dg-hero-side>small{margin:0;text-align:left}.dg-points{padding:8px 10px}.dg-points small{font-size:11px}
 .dg-tabs{position:sticky;top:-16px;padding:5px 0 10px;background:#15323b;z-index:1;margin-bottom:10px}.dg-tabs button{font-size:13px;padding:8px!important}
 .dg-equipment article{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.dg-equipment article>img{grid-column:1;grid-row:1;width:44px;height:44px;align-self:center}.dg-equipment article>div{grid-column:1/-1;grid-row:1;margin-left:54px;min-height:44px}.dg-equipment article>button{grid-column:auto;grid-row:2}.dg-equipment h3{font-size:17px}
 .dg-talents{grid-template-columns:minmax(0,1fr);gap:12px}.dg-talent{grid-template-columns:40px minmax(0,1fr)}.dg-talent p{grid-column:2}.dg-talent h4{justify-content:space-between}.dg-talent-group h3{margin-bottom:10px}
 .dg-report{padding:24px 16px}.dg-report>h1{font-size:27px}.dg-report-score{gap:15px}.dg-report-score>strong{font-size:68px}.dg-report-score b{font-size:17px}.dg-report-score span{font-size:12px}.dg-growth>div{grid-template-columns:minmax(0,1fr) 85px 40px;gap:10px}.dg-report-list .dg-paper>b{font-size:14px}
 body.dungeon-battle{--dg-hud:108px}
 .dg-run-hud,#dgBattle .dg-run-hud{height:108px;display:grid;grid-template-columns:100px minmax(0,1fr) 44px 76px;grid-template-rows:44px 44px;gap:4px 8px;padding:8px}
 .dg-health{width:100px;max-width:none;grid-column:1;grid-row:1/3}.dg-run-progress{gap:3px 8px;grid-column:2;grid-row:1/3}.dg-run-progress>b{font-size:12px}.dg-run-progress>small{font-size:12px;white-space:normal}.dg-run-progress>span{font-size:10px}
 .dg-run-hud #sceneMusic{grid-column:3;grid-row:1/3}
 .dg-run-hud .dg-button{position:static;grid-column:4;grid-row:2;padding:6px 8px;font-size:12px!important;min-height:44px}.dg-run-hud .dg-hud-hero{grid-row:1;min-height:44px!important;font-size:12px!important}
 #dgBattle .dg-run-hud .dg-button{grid-row:1/3}
 #dgWorld{height:calc(100% - 108px)}.dg-map-label{top:120px}
 #dgBattle .dg-skill{min-width:100px;font-size:12px}#dgBattle .dg-skill small{font-size:10px}
}
@media(max-width:380px){.dg-realms{grid-template-columns:repeat(3,minmax(0,1fr))}.dg-realm{height:105px}.dg-header .dg-wallet{display:none}.dg-dialog-body{padding-inline:16px}.dg-hero-side{grid-template-columns:minmax(80px,.8fr) minmax(0,1.2fr)}.dg-stat-grid span{padding:4px 6px}}
@media(max-height:600px) and (min-width:751px){.dg-dialog-layer{padding:10px}.dg-dialog,.dg-dialog.dg-wide{max-height:calc(100dvh - 20px)}.dg-dialog.dg-wide{height:calc(100dvh - 20px)}.dg-dialog-head{padding-top:14px;padding-bottom:8px}.dg-dialog-body{padding-top:14px}.dg-hero-side{position:static}.dg-hero-side canvas{max-width:145px}.dg-hero-side{gap:8px}.dg-hero-side>small{display:none}.dg-hero-sheet{grid-template-columns:180px minmax(0,1fr)}}
@media(max-height:600px) and (min-width:751px){
 #dgBattle .dg-monster{right:auto;left:50%;transform:translateX(-50%);width:min(250px,35vw);padding:4px 10px}#dgBattle .dg-monster>b{font-size:14px}
 #dgBattle .dg-battle-status{width:1px;height:1px;max-width:1px;padding:0;border:0;overflow:hidden;clip-path:inset(50%)}
}
@media(prefers-reduced-motion:reduce){.dg-view button,.dg-dialog-layer button,#dgBattle button{transition:none}}
/* Keep answer decoration inside the narrow battle board; artwork keeps its aspect ratio. */
body.dungeon-battle #qarea .mt-pickopt .mt-ring{inset:0}
body.dungeon-battle #qarea .bk-pic:hover{transform:none}
/* A compact, optional guide lives in the existing map card, leaving movement controls free. */
.dg-map-label{pointer-events:auto;max-width:330px}
.dg-map-label h2{font-size:18px}
.dg-map-label .dg-objective-title{font-size:14px!important;color:#ffdf97!important;font-weight:800;margin-top:8px!important}
.dg-guide-actions{display:flex;gap:6px;margin-top:8px;flex-wrap:wrap}
.dg-guide-actions .dg-button{min-height:44px;font-size:12px;padding:7px 10px}
.dg-guide-dialog{display:flex;align-items:center;gap:18px;line-height:1.85}
.dg-guide-dialog img,.dg-guide-dialog .dg-guide-actor{width:100px;height:120px;object-fit:contain;flex-shrink:0}
.dg-guide-topics{display:flex;flex-wrap:wrap;gap:10px;margin-top:18px}
.dg-guide-topics button{min-height:44px}
@media(max-width:600px){
 .dg-map-label{max-width:calc(100% - 142px);left:10px;padding:8px 10px}
 .dg-map-label>.dg-kicker{display:none}
 .dg-map-label h2{font-size:13px}
 .dg-map-label .dg-objective-title{font-size:12px!important}
 .dg-guide-actions{gap:4px}.dg-guide-actions .dg-button{font-size:11px;padding:6px 8px}
 .dg-guide-dialog{gap:10px;align-items:start}.dg-guide-dialog img,.dg-guide-dialog .dg-guide-actor{width:70px;height:84px}
 .dg-guide-topics{display:grid;grid-template-columns:1fr 1fr}.dg-guide-topics .dg-primary{grid-column:1/-1}
}
@media(max-height:500px) and (orientation:landscape){
 .dg-exp{min-height:0}
 .dg-map-label{top:84px;left:10px;max-width:310px;padding:6px 10px}
 .dg-map-label>.dg-kicker,.dg-map-label h2,#dgObjective>p:not(.dg-objective-title){display:none}
 .dg-map-label .dg-objective-title{margin:0!important}.dg-guide-actions{margin-top:4px}
}
/* Exploration v3: warm paper for the objective, calm controls, one clear interaction action. */
.dg-map-v3{--map-ink:#263b3b;--map-paper:#fff7df;--map-teal:#235c62;--map-brass:#d0ae6c}
.dg-map-v3 .dg-map-label{max-width:300px;left:20px;top:96px;padding:14px 16px;background:linear-gradient(135deg,#fff9e9f7,#f4e7c8f5);border:2px solid #465e59;border-left:5px solid #c49b55;border-radius:17px;box-shadow:0 4px 0 #182c3299,0 9px 20px #071a2826;text-shadow:none;color:var(--map-ink)}
.dg-map-v3 .dg-map-label>.dg-kicker{color:#527268;font-size:10px;letter-spacing:1px;margin-bottom:6px}
.dg-map-v3 .dg-map-label h2{font-size:15px;line-height:1.5;color:#2c4b49;margin:0}
.dg-map-v3 .dg-map-label .dg-objective-title{font-size:15px!important;color:#775524!important;line-height:1.5;margin-top:10px!important}
.dg-map-v3 .dg-map-label p:not(.dg-kicker){color:#52645c;font-size:12px;line-height:1.65}
.dg-map-v3 .dg-guide-actions{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;margin-top:11px}
.dg-map-v3 .dg-guide-actions .dg-button{background:#e6edde;color:#315550;border:1.5px solid #78958b;box-shadow:0 2px 0 #78958b66;text-shadow:none;padding:7px 9px;font-size:12px}
.dg-map-v3 .dg-guide-actions .dg-button:first-child{background:#235c62;border-color:#1f474b;color:#fff9e9;box-shadow:0 3px 0 #143b3d}
.dg-map-v3 .dg-directions .dg-button{border:2px solid #d7dcc5;background:linear-gradient(#315c61,#22474f);box-shadow:0 3px 0 #112c35,0 2px 8px #091b3133;border-radius:15px;color:#fff9df}
.dg-map-v3 .dg-map-actions .dg-button{background:#173c48ed;border:2px solid #b5cbbd;color:#f9f2db;box-shadow:0 3px 0 #102c33;text-shadow:none;border-radius:14px}
.dg-map-v3 .dg-map-actions #dgNavigate[aria-pressed=true]{background:#f3e6bd;color:#3d554d;border-color:#f5d997}
.dg-map-v3 .dg-map-actions .dg-primary{background:linear-gradient(#f9e2a5,#dfbe76);border:2px solid #695238;border-radius:15px;color:#382f24;box-shadow:0 4px 0 #233d3d;padding:10px 19px;min-height:48px;text-shadow:none}
.dg-map-v3 .dg-map-actions .dg-primary::before{display:none}
.dg-map-v3 .dg-map-actions .dg-primary:disabled{background:#dde0d2;color:#52665d;border-color:#95a79a;opacity:1;box-shadow:0 2px 0 #354f4f}
.dg-map-v3 .dg-map-notice{background:#153b45e8;border:1px solid #a4bdae70;border-radius:12px;color:#e9f0dd;font-size:12px;line-height:1.5;box-shadow:none}
@media(max-width:750px){
 .dg-map-v3 .dg-map-label{top:120px;left:10px;max-width:calc(100% - 148px);padding:10px 12px;border-radius:14px}
 .dg-map-v3 .dg-map-label h2{font-size:12px}.dg-map-v3 .dg-map-label .dg-objective-title{font-size:12px!important;margin-top:6px!important}
 .dg-map-v3 .dg-map-label p:not(.dg-kicker){font-size:11px;line-height:1.5}
 .dg-map-v3 .dg-guide-actions{gap:5px;margin-top:8px}.dg-map-v3 .dg-guide-actions .dg-button{font-size:11px;padding:6px}
 .dg-map-v3 .dg-map-actions .dg-primary{font-size:11px;padding:8px 12px}
 .dg-map-v3 .dg-map-notice{font-size:11px}
}
@media(max-height:500px) and (orientation:landscape){
 .dg-map-v3 .dg-map-label{top:85px;left:10px;width:290px;max-width:40%;padding:8px 10px}
 .dg-map-v3 .dg-map-label .dg-objective-title{margin-top:0!important;font-size:12px!important}
 .dg-map-v3 .dg-guide-actions{margin-top:4px}.dg-map-v3 .dg-guide-actions .dg-button{font-size:11px}
}

.dg-guide-dialog .dg-guide-actor{height:auto;aspect-ratio:1;align-self:center}
.dg-guide-dialog [hidden]{display:none}

/* Item receipts keep the same 2D scale as their source and land on saved resource counts. */
.dg-run-progress>.dg-resources{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:2px 12px;font-size:11px;color:#dfebd3;line-height:1.35}
.dg-resources>span{white-space:nowrap;border-radius:5px}.dg-resources b{color:#fff1b4;font-family:var(--f-num)}
.dg-health #dgMp{color:#b7e4ed;font-size:10px;line-height:1.3}
.dg-gained{background:#f6df9255;outline:2px solid #e9d18b;outline-offset:3px}
.dg-reward-flight{position:fixed;width:30px;height:30px;pointer-events:none;z-index:405;filter:drop-shadow(0 2px 2px #142525b0)}
.dg-reward-flight svg,.dg-reward-flight img{display:block;width:100%;height:100%;object-fit:contain}
.dg-loot-v5{top:100px;bottom:auto;left:auto;right:22px;transform:none;min-width:0;width:max-content;max-width:min(92vw,360px);background:linear-gradient(#244a4cf2,#102d34f5);box-shadow:0 3px 0 #101f24,0 8px 20px #0005;border-color:#d4bc7f;animation:dg-receipt-in .18s ease-out both}
.dg-loot-v5>b{font-size:18px;letter-spacing:0}.dg-loot-v5 strong{color:#fff1a4;white-space:nowrap}.dg-loot-v5>small{font-size:11px;color:#c5dfd2}
.dg-loot-v5.out{animation:dg-receipt-out .35s ease-in forwards}
.dg-book-intro{display:flex;align-items:center;gap:18px}.dg-book-portrait{flex:0 0 100px}.dg-book-actor{display:block;width:100%;height:auto;aspect-ratio:1}
@keyframes dg-receipt-in{from{opacity:0;translate:0 7px}to{opacity:1;translate:0 0}}
@keyframes dg-receipt-out{to{opacity:0;translate:0 -6px}}
@media(max-width:750px){.dg-run-progress>.dg-resources{font-size:10px;gap:1px 7px}.dg-health #dgMp{font-size:9px}.dg-book-portrait{flex-basis:70px}.dg-book-intro{gap:10px}}
@media(max-height:500px) and (orientation:landscape){.dg-loot-v5{bottom:104px;padding:8px 14px;gap:3px}.dg-loot-v5 .dg-loot-item{padding-block:2px}.dg-loot-v5 .dg-loot-item i{width:25px;height:25px}.dg-loot-v5 .dg-loot-item i svg,.dg-loot-v5 .dg-loot-item i img{width:24px;height:24px}}
@media(prefers-reduced-motion:reduce){.dg-loot-v5,.dg-loot-v5.out{animation:none}}

@media(max-width:750px){.dg-loot-v5{left:50%;right:auto;transform:translateX(-50%);width:min(330px,92vw);display:grid;grid-template-columns:1fr 1fr;padding:10px 12px;gap:4px}.dg-loot-v5>b,.dg-loot-v5>small{grid-column:1/-1;text-align:center}.dg-loot-v5 .dg-loot-item{font-size:12px;gap:5px;padding:3px}.dg-loot-v5 .dg-loot-item:only-of-type{grid-column:1/-1}.dg-loot-v5 .dg-loot-item i,.dg-loot-v5 .dg-loot-item i img,.dg-loot-v5 .dg-loot-item i svg{width:25px;height:25px}}
@media(max-height:500px) and (orientation:landscape){.dg-loot-v5{top:96px;bottom:auto}}

/* The map and conversation use the same independently drawn NPC, without portrait stretching. */
.dg-npc-dialog .dg-villager-portrait{width:100px;max-width:100%;height:auto;aspect-ratio:1;align-self:center;background:none;border:0;border-radius:0}
@media(max-width:750px){.dg-npc-dialog .dg-villager-portrait{width:70px}}
