/* Windows keeps the original desktop HUD. Cards retain the source atlas ratio;
   a narrow window scrolls the ready row instead of squashing its artwork. */
html.desktop-app{--card-ratio:5748 / 7848;--desktop-board:250px}
.desktop-app .mobile-tabs{display:none!important}
.desktop-app .player-board{height:var(--desktop-board);display:grid;grid-template-columns:190px minmax(0,1fr) 285px;gap:20px;padding:18px 24px 14px;overflow:hidden}
.desktop-app .player-board>.character,.desktop-app .player-board>.board-section{display:block;min-width:0}
.desktop-app .board-section-head{height:14px;margin-bottom:4px;white-space:nowrap;letter-spacing:.5px}
.desktop-app .hand{display:flex;gap:9px;width:100%;padding:10px 0 5px;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:#718c88 #12272e}
.desktop-app .hand>.spell-card,.desktop-app .hand>.empty-slot{width:125px;min-width:125px;max-width:125px;height:auto;aspect-ratio:var(--card-ratio);flex:0 0 125px}
.desktop-app .spell-card{border:0;box-shadow:inset 0 0 0 1px #57707166}
.desktop-app .spell-card:not(:disabled):hover,.desktop-app .spell-card.selected{outline:1px solid var(--gold);outline-offset:-1px}
.desktop-app .spell-card:not(:disabled):hover{transform:translateY(-7px)}
.desktop-app .card-summary{display:block}
.desktop-app .card-name{font-size:14px}
.desktop-app .reflux{grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}
.desktop-app .reflux-slot{height:auto;aspect-ratio:var(--card-ratio);min-height:0;border:0;box-shadow:inset 0 0 0 1px #41606c55}
.desktop-app .reflux-arrow{font-size:9px;letter-spacing:0;white-space:nowrap;margin-top:11px}
.desktop-app .reflux-note{display:block;font-size:10px;line-height:1.65;color:#86a3a6}
.desktop-app .character-title{font-size:19px}
.desktop-app .resource-row{gap:19px;margin:15px 0 13px;flex-wrap:nowrap}
.desktop-app .resource b{font-size:28px}
.desktop-app .weapon-icon{width:37px;height:auto;aspect-ratio:821.2 / 1121}
.desktop-app .weapon-strip{cursor:pointer}
.desktop-app .initiative{display:block;left:24px;top:96px;width:205px;max-height:calc(100vh - 414px);overflow:auto;scrollbar-width:thin;scrollbar-color:#718c88 #12272e}
.desktop-app .world-panel{display:block;right:24px;top:96px;width:215px;max-height:calc(100vh - 366px);overflow:auto;scrollbar-width:thin;scrollbar-color:#718c88 #12272e}
.desktop-app .world-panel .tile-panel{display:block;margin-top:14px;padding:12px}
.desktop-app .world-panel .event-panel{margin-top:12px;padding-top:14px}
.desktop-app .world-panel .event-panel p{line-height:1.7;margin:7px 0 9px}
.desktop-app .topbar{height:74px;padding:0 24px}
.desktop-app .phase-steps{display:flex}
.desktop-app body #battlefield{top:74px;bottom:calc(var(--desktop-board) + 18px)}
.desktop-app .action-bar{bottom:calc(var(--desktop-board) + 18px);max-width:calc(100vw - 470px)}
.desktop-app .action-bar button{padding:10px 13px;font-size:11px}
.desktop-app .action-bar small{margin-left:7px}
.desktop-app .turn-prompt{bottom:calc(var(--desktop-board) + 84px);width:calc(100vw - 475px)}
.desktop-app .camera-tools{bottom:calc(var(--desktop-board) + 32px);left:24px}
.desktop-app .choice-grid:not(.weapons),.desktop-app .codex-grid{display:grid;grid-template-columns:repeat(auto-fill,125px);gap:14px;justify-content:start}
.desktop-app .choice-grid .spell-card,.desktop-app .codex-grid .spell-card{width:125px;height:auto;aspect-ratio:var(--card-ratio)}
.desktop-app .choice-grid .empty-slot{width:125px;height:auto;aspect-ratio:var(--card-ratio)}
.desktop-app .weapon-choice .weapon-art{width:115px;height:auto;aspect-ratio:821.2 / 1121;align-self:start}
.desktop-app .card-detail-grid>div:first-child{height:auto!important;aspect-ratio:var(--card-ratio);align-self:start}
.desktop-app .preview-art{width:130px;height:auto!important;aspect-ratio:var(--card-ratio);margin:auto}
.desktop-app body.title-mode #battlefield{top:0;bottom:0;left:24%}
.desktop-app body.vfx-preview-mode #battlefield{inset:0 310px 0 0}
@media(max-width:1280px){
 .desktop-app .player-board{grid-template-columns:165px minmax(0,1fr) 245px;gap:14px;padding:18px 18px 14px}
 .desktop-app .resource-row{gap:13px}.desktop-app .resource b{font-size:26px}
 .desktop-app .initiative{left:18px;width:178px}.desktop-app .world-panel{right:18px;width:190px}
 .desktop-app .action-bar{max-width:calc(100vw - 395px)}.desktop-app .action-bar button{padding:10px 9px}.desktop-app .action-bar small{display:none}
 .desktop-app .camera-tools{left:18px}.desktop-app .camera-tools span{display:none}
 .desktop-app .turn-prompt{width:calc(100vw - 420px)}
 .desktop-app .board-section-head>span:last-child>span{display:none}
}
@media(max-height:760px){
 .desktop-app .topbar{height:64px}.desktop-app body #battlefield{top:64px}
 .desktop-app .initiative,.desktop-app .world-panel{top:82px}
 .desktop-app .initiative .unit-row{padding:8px 10px}
 .desktop-app .world-panel{max-height:calc(100vh - 347px)}
 .desktop-app .world-panel .eyebrow{margin-bottom:9px}
 .desktop-app .team-line{margin-bottom:10px}.desktop-app .team-bonus{margin-bottom:8px}
 .desktop-app .world-panel .event-panel{margin-top:9px;padding-top:10px}
 .desktop-app .world-panel .tile-panel{padding:9px;margin-top:9px}
}
