/* Keep the battlefield visible. Hero cards double as selection controls. */
#game .movement-controls{order:1;display:flex;flex:0 0 44px;margin:0;padding:0;gap:0;align-self:stretch}
#game .movement-controls button{width:44px;height:44px;min-width:44px;min-height:44px;padding:2px;border-radius:9px;display:grid;place-content:center;gap:0;background:#08171cdf;border:1px solid #577274}
#game .movement-controls button.sel{background:#173932e8;border-color:#81b8a0}
#game .movement-controls button>span{font-size:21px;line-height:22px}
#game .movement-controls button>small{font-size:9px;line-height:10px;letter-spacing:.04em}
#game #hud .party-health{order:2}
#game #hud .squad-hud{order:3}
#game .bottom-hud{order:4}
#game #hud .hud-actions{order:5}
#game #hud .hero-chip{min-width:44px;min-height:44px;height:44px;padding:3px 5px;display:flex;flex-direction:column;gap:1px;text-align:start;border:1px solid #425d64;border-radius:8px;background:#08171cda;line-height:1;box-shadow:none;overflow:hidden}
#game #hud .hero-chip.sel{border-color:var(--hero-color);box-shadow:inset 0 -2px var(--hero-color)}
#game #hud .hero-chip:disabled{opacity:.55}
#game #hud .hero-chip b{display:flex;justify-content:space-between;gap:4px;font-size:10px;line-height:11px}
#game #hud .hero-chip b>span{font-size:9px;opacity:.7}
#game #hud .hero-chip small{font-size:9px;line-height:10px}
#game #hud .hero-chip .bar{width:100%;height:3px;margin:1px 0 0;flex-shrink:0}
#game #hud .hero-chip .party-xp{height:2px;opacity:.7}
#game .battle-rail button:focus-visible{outline:2px solid #ffdd92;outline-offset:1px}
@media(orientation:landscape){
 #game .battle-rail{height:44px;top:max(4px,env(safe-area-inset-top));gap:4px}
 #game #hud .hud-left{height:44px;order:0}
 #game #hud .party-health{height:44px;flex:0 1 164px;min-width:96px;gap:3px}
 #game #hud .squad-hud{height:44px;scrollbar-width:none}
 #game #hud .squad-chip{height:44px!important;min-height:44px!important;border-radius:8px}
 #game .bottom-hud,#game .battle-info,#game #hud .hud-actions{height:44px}
 #game #auto-card-control button,#game .magnet-badge{height:44px;min-height:44px}
 #game #battle-tools{top:max(54px,calc(env(safe-area-inset-top) + 50px))}
}
@media(orientation:portrait){
 #game .battle-rail{position:absolute;inset:max(4px,env(safe-area-inset-top)) max(4px,env(safe-area-inset-right)) auto max(4px,env(safe-area-inset-left));display:grid;grid-template-columns:minmax(96px,1fr) 44px 92px;grid-template-rows:44px 44px;gap:4px;pointer-events:none}
 #game #hud,#game #hud .hud-top{display:contents}
 #game #hud .hud-left{grid-column:1;grid-row:1;min-width:0;padding:3px 5px;height:44px;box-sizing:border-box;pointer-events:auto}
 #game #hud .hud-left .eyebrow{font-size:10px;line-height:11px}
 #game #hud .hud-left>.muted,#game #hud .hud-stats{font-size:9px;line-height:10px}
 #game #hud .hud-left>.xp{height:2px;margin:1px 0}
 #game .movement-controls{grid-column:2;grid-row:1;pointer-events:auto}
 #game #hud .hud-actions{grid-column:3;grid-row:1;display:flex;gap:4px;pointer-events:auto}
 #game #hud .party-health{grid-column:1;grid-row:2;display:flex;gap:3px;margin:0;height:44px;pointer-events:auto;min-width:0}
 #game #hud .hero-chip{flex:1 1 0;min-width:44px}
 #game #hud .squad-hud{grid-column:2/4;grid-row:2;display:flex;min-width:0;height:44px;overflow-x:auto;gap:3px;margin:0;pointer-events:auto;scrollbar-width:none}
 #game #hud .squad-chip{min-width:62px;flex:0 0 62px;height:44px!important;min-height:44px!important;padding:3px!important;border-radius:8px}
 #game #hud .squad-chip .dragon-portrait{display:none}
 #game #hud .chip-info{width:100%;min-width:0}
 #game #hud .chip-info b,#game #hud .chip-info small{font-size:9px;line-height:11px}
 #game #hud .chip-info .bar{height:3px;margin:3px 0}
 #game .bottom-hud{position:fixed;left:auto;right:max(8px,env(safe-area-inset-right));bottom:max(8px,env(safe-area-inset-bottom));width:auto;pointer-events:auto}
 #game #battle-tools{top:max(104px,calc(env(safe-area-inset-top) + 100px))}
}
