/* Keep full headroom on phones and make battle information one compact row. */
#dig-unit.digging{background:linear-gradient(90deg,#386454 var(--dig-progress),#203f42 var(--dig-progress));color:#b8f3d4;opacity:1}
@media(max-width:900px) and (pointer:coarse),(max-width:700px){
 #battle{--hud-height:calc(52px + env(safe-area-inset-top))}
 .battle-top{height:var(--hud-height);gap:6px;padding-left:max(8px,env(safe-area-inset-left));padding-right:max(5px,env(safe-area-inset-right))}
 .battle-score{gap:9px;flex:1;justify-content:center;min-width:0}
 .score-side{gap:1px;min-width:0;max-width:100px;flex:1}
 .score-value .score{font-size:21px;line-height:1}.score-progress progress{height:3px}.score-progress{gap:4px}
 .score-limit{font-size:8px}.score-side>small{display:none}.score-middle{display:none}
 .battle-time>span{font-size:10px;margin:0 2px}.mobile-budget{min-width:45px}.mobile-budget strong{font-size:16px}
 .battle-top .icon-button{height:44px;width:38px;min-width:38px}.battle-top .icon-button svg{width:20px;height:20px}
 img.commander-portrait{top:8px;bottom:auto;width:100%;height:calc(100% - 8px);object-fit:contain;object-position:center top}
 .reinforcement-card img{top:2px;object-fit:contain;object-position:center center}
 #menu .menu-header{min-height:64px;gap:8px}.menu-account-tools{gap:5px}.menu-account-tools button{padding:7px 9px;min-height:40px}
}
@media(max-height:500px) and (pointer:coarse){#battle{--hud-height:calc(48px + env(safe-area-inset-top))}img.commander-portrait{width:100%;height:calc(100% - 6px);top:6px;object-fit:contain;object-position:center top}}
