/* Fill the app's available viewport; input feedback belongs in the battlefield. */
html,body{height:100%;min-height:0}body{height:100dvh;display:flex;flex-direction:column;overflow:hidden}
header{flex:0 0 68px;min-height:0}main{flex:1 1 0;min-height:0;width:100%;max-width:1320px;margin:0 auto;padding:18px 28px 16px;display:flex;flex-direction:column}
.arena-shell{flex:1 1 0;min-height:0;display:flex;flex-direction:column}.scoreboard{flex:0 0 64px;height:64px}.world-wrap{flex:1 1 0;min-height:0;aspect-ratio:auto}.world-wrap>canvas{position:absolute;inset:0;width:100%;height:100%}.battle-strip{flex:0 0 42px;min-height:42px}
.controls{flex:0 0 auto;display:block;margin-top:10px}.arsenal{width:100%}.weapon{height:54px;min-height:54px}.weapon .icon{height:36px}.weapon-art{width:40px;height:36px}
.touch-controls{display:none;position:absolute;left:10px;right:10px;bottom:10px;margin:0;padding:0;background:none;justify-content:space-between;pointer-events:none;z-index:3}
body.touch-mode .touch-controls{display:flex}.touch-controls button{pointer-events:auto;touch-action:none;user-select:none;-webkit-touch-callout:none;min-width:72px;height:48px;min-height:48px;padding:6px 10px;font-size:12px;opacity:.92}
.touch-controls #fire{grid-column:auto;max-width:104px;height:48px;font-size:12px;letter-spacing:.5px}.touch-controls #fire.charging{filter:brightness(1.35);border-image-source:var(--art-selected)}
body.touch-mode #overview{left:10px;right:auto;top:49px;bottom:auto;min-height:32px;padding:4px 8px;font-size:9px}
#characterScale{width:100%}#displayDialog label{margin:13px 0}
.team{min-width:0}.team>div{min-width:0;flex:1;width:auto}.team strong{white-space:nowrap;flex-shrink:0}.team b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(max-width:800px){header{flex-basis:calc(48px + env(safe-area-inset-top));height:calc(48px + env(safe-area-inset-top));padding-top:env(safe-area-inset-top);padding-left:max(10px,env(safe-area-inset-left));padding-right:max(10px,env(safe-area-inset-right))}main{padding:8px max(8px,env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left))}.scoreboard{flex-basis:52px;height:52px}.battle-strip{flex-basis:34px;min-height:34px;padding:5px 8px}.controls{margin-top:7px}#weapons{grid-template-columns:repeat(5,minmax(0,1fr));gap:4px}.weapon{height:46px;min-height:46px;padding:2px 0}.weapon .icon{height:31px}.weapon-art{width:35px;height:31px}.map-label,.wind{top:8px}body.touch-mode #overview{top:38px;left:8px;font-size:8px;min-height:28px}.touch-controls{bottom:8px;left:8px;right:8px}}
@media(max-height:500px){header{flex-basis:calc(40px + env(safe-area-inset-top));height:calc(40px + env(safe-area-inset-top));padding-top:env(safe-area-inset-top)}main{padding:4px max(8px,env(safe-area-inset-right)) calc(4px + env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left))}.scoreboard{flex-basis:40px;height:40px}.round b{font-size:22px}.battle-strip{flex-basis:28px;min-height:28px;padding:4px 8px}.controls{margin-top:4px}#weapons{grid-template-columns:repeat(10,minmax(0,1fr));gap:4px}.weapon{height:40px;min-height:40px}.weapon .icon{height:27px}.weapon-art{width:30px;height:27px}.touch-controls button,.touch-controls #fire{height:44px;min-height:44px}.brand small{display:none}}
body.touch-mode #overview{left:50%;right:auto;top:8px;bottom:auto;transform:translateX(-50%);max-width:100px}
