/* Compact geometry; readable text is kept independent of panel size. */
:root{--hud-scale:1}
body[data-interface="comfortable"]{--hud-scale:1.15}
.topbar{height:60px;padding:0 20px}.wordmark{font-size:24px;gap:9px}.edition{font-size:11px;padding-left:14px;letter-spacing:.12em}.top-status{font-size:11px;letter-spacing:.05em}.icon-button{width:34px;height:34px;margin-left:8px}
.menu-content{width:410px;margin-top:100px}.menu-content h1{font-size:68px;margin:18px 0}.intro{font-size:15px;line-height:1.6}.section-heading{margin-top:24px}.class-card{min-height:142px;padding:16px}.class-name{font-size:26px}.class-style{font-size:11px;margin-top:12px}.class-art{margin-bottom:9px}.class-description{margin:12px 0 18px}.primary-button{height:48px;font-size:12px;letter-spacing:.07em}.menu-meta{font-size:11px;margin-top:16px}.character-caption h2{font-size:28px}
.expedition{top:80px;left:16px;width:calc(202px * var(--hud-scale));padding:13px 14px;background:#101b18dc}.expedition .tiny-label{font-size:11px;letter-spacing:.06em}.depth{margin-top:8px;gap:8px}.depth>#depth{font-size:34px}.depth>span:last-child{font-size:10px;letter-spacing:.08em}.depth-symbol svg{width:18px}.expedition-divider{margin:11px 0 9px}.expedition p#objective{font-size:calc(13px * var(--hud-scale));line-height:1.4}.hero-level{font-size:13px;margin-top:10px}.xp-track{margin-top:7px}#xp-number{font-size:11px;margin-top:5px}
.room-heading{top:63px;left:27%;right:27%}.room-heading .tiny-label{font-size:10px;letter-spacing:.1em}.room-heading h2{font-size:21px;margin-top:3px}
.enemy-hud,.enemy-hud.boss{top:121px;left:50%;right:auto;width:min(calc(490px * var(--hud-scale)),calc(100vw - 500px));padding:8px 12px;background:linear-gradient(90deg,#10191755,#101917d9,#10191755);border-radius:4px}.enemy-head{gap:9px;padding:0 0 6px}.enemy-head #enemy-name{font-size:calc(22px * var(--hud-scale));white-space:normal;line-height:1.1}.enemy-head #enemy-tag{font-size:10px;padding:3px 5px}.enemy-head #enemy-level,.enemy-head #enemy-percent{font-size:12px}.enemy-vitals{font-size:12px;margin:0 0 5px}.enemy-state{font-size:11px;letter-spacing:.02em;margin:6px 0 0;gap:8px;flex-wrap:wrap}.enemy-track,.boss .enemy-track{height:6px}
.game-tools{top:80px;right:16px;gap:6px}.game-tools button{width:38px;height:38px}.game-tools button>span>svg{width:19px;height:19px}.game-tools kbd{font-size:10px;height:12px;color:#b9c5b4}
.tactics{display:flex;flex-direction:column;left:16px;bottom:158px;width:calc(202px * var(--hud-scale));padding-left:12px;max-height:230px;overflow:hidden}.tactics .tiny-label{flex-shrink:0;font-size:10px;letter-spacing:.06em}.tactics h3{flex-shrink:0;font-size:22px;margin:7px 0}.tactics p{min-height:0;overflow:hidden;display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;font-size:13px;line-height:1.45}.combat-note{flex-shrink:0;font-size:13px;margin-top:8px;line-height:1.4}
.player-hud{left:16px;bottom:18px;width:calc(208px * var(--hud-scale));padding:11px 12px}.player-identity{gap:9px;margin-bottom:8px}.player-identity>div{gap:3px}.player-identity #class-label{font-size:11px;letter-spacing:.04em}.player-identity small{font-size:calc(19px * var(--hud-scale));font-variant-numeric:tabular-nums}.portrait{width:31px;height:36px}.portrait svg{width:22px}.health-cross{font-size:23px}.resource-meta{font-size:10px;letter-spacing:.02em;margin-top:6px}.health-track{height:7px}.resource-track{height:4px}
.actionbar{left:50%;right:auto;bottom:18px;transform:translateX(-50%);gap:8px;padding:7px;max-width:calc(100vw - 510px);background:#0d1717ed}.spell-buttons{gap:6px;max-width:none;padding:0 0 2px}.spell-button{width:calc(68px * var(--hud-scale));height:calc(84px * var(--hud-scale));gap:2px;justify-content:flex-end;padding:14px 3px 4px}.spell-button>svg{width:20px;height:20px}.spell-name{font-size:calc(12px * var(--hud-scale));line-height:1.15;max-width:100%;min-height:28px;max-height:28px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.spell-cost{font-size:10px;margin-top:0;line-height:1.1}.spell-button .spell-key{font-size:12px;top:3px;left:5px;color:#ffe1a0}.dodge-button{width:calc(60px * var(--hud-scale));height:calc(82px * var(--hud-scale));gap:6px;flex-shrink:0}.dodge-button>svg{width:22px;height:22px}.dodge-button kbd,.dodge-button>span{font-size:11px}.action-separator{height:45px;flex-shrink:0}.control-legend{display:none}
.room-map{right:16px;bottom:18px;width:112px;opacity:.85}.room-map>svg{width:100px;height:100px}.room-map>span{font-size:10px;letter-spacing:.02em}.targeting-hint{bottom:130px;font-size:13px;padding:7px 10px;max-width:min(540px,80vw)}.interact-prompt{bottom:130px}.interact-prompt button{font-size:12px;padding:10px 13px;letter-spacing:.04em}
dialog{max-width:min(1000px,calc(100vw - 36px));max-height:calc(100dvh - 40px)}#panel-inner{padding:23px 26px}.panel-header{margin-bottom:18px}.panel-header h2{font-size:30px;margin-top:4px}.panel-header .tiny-label{font-size:11px}.panel-note,.help-grid p,.settings-detail,.spell-detail p,.route-card p,.relic-card p,.codex-card p{font-size:14px;line-height:1.55}.panel-note{margin-bottom:17px}.settings-grid,.help-grid{gap:24px}.settings-section h3,.help-grid h3{font-size:25px;margin-bottom:13px}.setting-row{font-size:14px;margin:12px 0}.setting-row select{max-width:190px;padding:7px;font-size:13px}.secondary-button{padding:10px;min-height:40px}.settings-detail{margin-top:10px}.inventory-layout{gap:18px;grid-template-columns:205px minmax(0,1fr)}.inventory-bag{grid-template-columns:minmax(0,1fr) 210px;gap:12px}.equipment-grid{gap:7px}.equipment-slot{padding:16px 6px 7px;min-height:78px}.equipment-slot>svg{width:21px;height:21px}.equipment-slot .equipped-name{font-size:12px}.equipment-slot>span,.equipment-slot>small{font-size:11px}.stat-row{font-size:13px;padding:6px 0}.stat-block{margin-top:14px}.item-list{gap:10px}.item-card{padding:12px;min-height:0}.item-card>.item-portrait{width:42px;height:44px;margin:3px 0 8px}.item-card h3{font-size:21px}.item-card p,.item-card .item-effect,.item-stat-list,.comparison-effect{font-size:13px;line-height:1.45}.item-stat-list{margin:9px 0;gap:4px}.item-list .item-rarity{font-size:11px!important}.item-actions{gap:6px}.item-actions button{font-size:12px;padding:7px;min-height:34px}.comparison-row,.comparison-names,.inventory-bag .item-comparison>p{font-size:12px}.comparison-names b{font-size:15px}.inventory-bag .item-comparison{padding:12px}.inventory-controls{gap:10px;margin-bottom:14px}.inventory-controls label,.spell-customization label{font-size:12px}.inventory-controls select{padding:6px;font-size:13px}.spell-loadout{gap:9px;margin-bottom:18px}.spell-loadout select{padding:8px;font-size:13px}.spell-detail{padding:13px;gap:10px}.spell-detail h3{font-size:22px}.spell-customization{margin:9px 0;gap:7px}.spell-customization select{font-size:12px;padding:6px}.codex-card{padding:16px}.codex-card>.codex-icon{height:55px}.codex-card h3{font-size:25px}.codex-card h4{font-size:11px;margin:10px 0 8px}.codex-subtitle{font-size:27px}.route-card,.relic-card{padding:20px;gap:11px;min-height:180px}.route-card h3,.relic-card h3{font-size:26px}.death-content{padding:16px}.death-content h2{font-size:42px}.help-row{font-size:13px;margin:9px 0}.journal-entry{padding:10px;font-size:13px}
.reward-summary{right:66px;top:190px;width:320px;max-height:calc(100dvh - 315px);padding:15px;scrollbar-width:thin}.reward-summary>.tiny-label{font-size:11px}.reward-gold{font-size:23px;margin:8px 0 12px}.reward-gold small{font-size:11px}.reward-item{font-size:21px;gap:9px}.reward-item .item-portrait{width:38px;height:40px}.reward-item small{font-size:12px}.reward-xp{font-size:14px;margin-top:10px}.reward-progress{font-size:11px;line-height:1.4}.loot-actions{gap:7px;margin-top:12px}.loot-actions button{font-size:13px;min-height:40px;padding:8px}.loot-actions .quiet-button{flex-basis:100%;min-height:30px;padding:4px}.loot-compare{margin-top:12px;padding-top:10px}.loot-compare summary{font-size:13px;color:#dcca9d;cursor:pointer;min-height:30px;line-height:30px}.loot-compare .comparison-row,.loot-compare .comparison-names{font-size:12px}.loot-note{font-size:12px}.loot-confirm{padding:9px}.loot-confirm p{font-size:13px}.loot-result{font-size:14px}
.toast-container{top:auto;right:66px;bottom:142px;width:290px;max-height:200px;overflow:hidden;gap:6px}.toast{padding:10px 12px;line-height:1.4}.toast .toast-title{font-size:19px}.toast small{font-size:12px;line-height:1.4}.float-number{font-size:26px}.float-number.hurt{font-size:28px}
.ai-connection{font-size:12px;color:#b8c9b5;margin:8px 0;line-height:1.5}.ai-connection[data-state="ready"]{color:#95d8c0}
@media(min-width:1600px){.menu-content{width:440px;margin-top:110px}.menu-content h1{font-size:76px}.class-card{min-height:152px}}
@media(max-width:1300px){.expedition{width:190px}.tactics{display:none}.enemy-hud,.enemy-hud.boss{width:calc(100vw - 490px);left:50%}.player-hud{width:198px}.actionbar{max-width:calc(100vw - 470px)}.room-map{width:90px}.room-map>svg{width:86px;height:86px}.inventory-bag{grid-template-columns:1fr}.inventory-bag .item-comparison{position:static;grid-row:1}.inventory-bag .comparison-names{grid-template-columns:1fr 1fr}.inventory-bag .comparison-row{grid-template-columns:1fr 1fr 62px}.inventory-bag .comparison-row>span:first-child{grid-column:auto}}
@media(max-width:1100px){.edition{display:none}.player-hud{bottom:122px;width:200px}.actionbar{max-width:calc(100vw - 36px);bottom:16px}.room-map{bottom:123px}.enemy-hud,.enemy-hud.boss{width:calc(100vw - 370px);left:55%;top:113px}.room-heading{left:29%;right:15%}.reward-summary{top:215px;max-height:calc(100dvh - 330px)}.inventory-layout{grid-template-columns:180px minmax(0,1fr)}}
@media(max-width:800px){
 .topbar{height:54px;padding:0 12px}.wordmark{font-size:22px}.version,.top-status #save-status,.room-heading{display:none}.enemy-hud,.enemy-hud.boss{top:65px;left:12px;right:64px;width:auto;transform:none;padding:8px 10px}.enemy-head #enemy-name{font-size:20px}.enemy-head #enemy-tag,.enemy-head #enemy-level{font-size:10px}.enemy-head #enemy-percent{font-size:11px}.enemy-state{font-size:11px}.enemy-state #adaptive-hint{display:none}.game-tools{top:65px;right:12px}.game-tools button{width:36px;height:36px}.expedition{top:188px;left:12px;width:160px;padding:10px}.expedition .tiny-label{font-size:10px}.depth>#depth{font-size:29px}.depth>span:last-child{font-size:9px}.expedition p#objective{font-size:12px}.hero-level,#xp-number{font-size:11px}.expedition-divider{margin:8px 0}.room-map{display:none}.tactics{display:none}.player-hud{bottom:117px;left:12px;width:184px;padding:10px}.portrait{display:none}.player-identity small{font-size:18px}.player-identity #class-label{font-size:10px}.resource-meta{font-size:10px}.actionbar{bottom:12px;max-width:calc(100vw - 16px);gap:6px;padding:6px}.spell-buttons{max-width:calc(100vw - 100px);gap:5px}.spell-button{width:66px;height:80px}.spell-name{font-size:12px}.spell-cost{font-size:10px}.dodge-button{width:57px;height:80px}.targeting-hint,.interact-prompt{bottom:221px}.reward-summary{right:12px;top:183px;width:min(320px,calc(100vw - 24px));max-height:calc(100dvh - 300px);padding:13px}.toast-container{right:12px;bottom:228px;width:min(280px,calc(100vw - 24px));max-height:140px}dialog{max-width:calc(100vw - 20px);max-height:calc(100dvh - 24px)}#panel-inner{padding:18px}.panel-header h2{font-size:27px}.inventory-layout,.inventory-bag{grid-template-columns:1fr}.equipment-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.equipment-slot{min-height:78px}.item-list,.inventory-bag .item-list{grid-template-columns:repeat(2,minmax(0,1fr))}.settings-grid,.help-grid,.codex-grid{grid-template-columns:1fr}.spell-loadout{grid-template-columns:repeat(2,minmax(0,1fr))}.spell-library{grid-template-columns:1fr}.setting-row{gap:10px}.menu-content{width:min(410px,calc(100vw - 36px));margin:84px auto 90px}.menu-content h1{font-size:62px}.class-card{min-height:140px}.menu-meta{font-size:10px}.menu-bottom{left:18px;right:18px;font-size:10px}.journal-entry{grid-template-columns:1fr 1fr}
}
@media(max-width:480px){.equipment-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.item-list,.inventory-bag .item-list{grid-template-columns:1fr}.spell-loadout,.route-choices,.relic-choices{grid-template-columns:1fr}.spell-loadout label{display:grid}.spell-loadout select{max-width:none}.setting-row select{max-width:170px}.enemy-head #enemy-tag{display:none}.menu-bottom>span{max-width:55%}.panel-header h2{font-size:25px}}
@media(max-height:680px){.menu-content{margin-top:77px}.menu-content h1{font-size:48px}.class-card{min-height:115px;padding:12px}.class-name{font-size:23px}.class-art{margin-bottom:4px}.class-art svg{width:23px;height:23px}.section-heading{margin-top:15px}.class-description{margin:9px 0 12px;min-height:0}.menu-bottom{position:absolute}.tactics{display:none}.room-heading{display:none}.enemy-hud,.enemy-hud.boss{top:65px}.expedition{top:65px}.expedition .tiny-label,.expedition-divider,.expedition #objective,.expedition #xp-number{display:none}.depth{margin-top:0}.hero-level{margin-top:7px}.reward-summary{top:148px;max-height:calc(100dvh - 264px)}.toast-container{bottom:126px}}
@media(max-width:800px) and (max-height:680px){.expedition{display:none}.expedition .tiny-label,.expedition-divider,.expedition #objective,.expedition #xp-number{display:none}.depth{margin-top:0}.hero-level{margin-top:7px}.expedition .xp-track{margin-top:5px}.player-hud{width:170px}.reward-summary{top:175px;max-height:calc(100dvh - 285px)}}
@media(pointer:coarse){.touch-controls{bottom:225px;left:16px;right:16px}.touch-controls #joystick{width:80px;height:80px}.touch-controls>button{width:54px;height:54px}.player-hud{bottom:117px}.interact-prompt{bottom:320px}.reward-summary{max-height:calc(100dvh - 310px)}}

body[data-interface="comfortable"] .panel-note,body[data-interface="comfortable"] .help-grid p,body[data-interface="comfortable"] .settings-detail,body[data-interface="comfortable"] .spell-detail p,body[data-interface="comfortable"] .codex-card p{font-size:16px}
body[data-interface="comfortable"] .spell-name{max-height:32px;min-height:32px}
@media(pointer:coarse) and (max-height:500px){
 .game-tools{top:12px;right:70px;flex-direction:row;gap:5px}.game-tools button{width:34px;height:34px}
 .top-status #save-status,.top-status .status-dot,.top-status .version{display:none}
 .touch-controls{left:clamp(196px,27vw,230px);right:16px;bottom:124px}.room-map{display:none}.player-hud{bottom:124px}.player-hud .portrait{display:none}.reward-summary{top:60px;right:14px;bottom:124px;max-height:calc(100dvh - 184px)}
}
@media(max-width:800px){body[data-interface="comfortable"] .spell-name{min-height:28px;max-height:28px}}
