/* Painted cockpit atlas: two readouts and two physical key states. */
#hud{top:14px;left:3%;right:3%;gap:12px;align-items:start}
#hud .hud-module{width:230px;height:86px;padding:19px 28px 15px;text-align:center;background:url('assets/hud-panels.png') 0 18.2%/200% 355% no-repeat;filter:drop-shadow(0 5px 8px #0009)}
#hud .hud-center{width:270px}#hud .hud-right{background-position:100% 18.2%}
#hud small{font-size:9px;letter-spacing:1.5px;color:#b8d9db;margin-bottom:3px;white-space:nowrap}#hud strong{font-size:27px;line-height:1;letter-spacing:2px;color:#e2ffff;text-shadow:0 0 10px #4ce5e660}#hud .hud-right strong{color:#ffdc93;text-shadow:0 0 9px #ffb32f55}
#pauseButton{width:68px;height:66px;align-self:center;padding:0;border:0;background:url('assets/hud-panels.png') 0 88%/200% 355% no-repeat;font-size:25px;color:#d9ffff;filter:drop-shadow(0 3px 5px #0009)}
#controls{bottom:10px;left:3%;right:3%;gap:16px;align-items:end;pointer-events:none}
.battery-buttons{gap:7px;pointer-events:auto}
#controls button{border:0;width:150px;height:63px;padding:12px 15px 10px;background:url('assets/hud-panels.png') 0 88%/200% 355% no-repeat;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;filter:drop-shadow(0 4px 7px #000a);color:#d5eff0;text-shadow:0 1px 3px #000;transition:filter .15s,transform .12s;pointer-events:auto}
#controls button.selected{background-position:100% 88%;color:#ffe4a3;filter:drop-shadow(0 0 8px #ffba3b55)}
#controls .battery-name{display:block;margin:0;color:inherit;font:700 13px 'Barlow Condensed',sans-serif;letter-spacing:1px;white-space:nowrap}
#controls strong{font:600 10px 'Barlow',sans-serif;letter-spacing:1px;white-space:nowrap}
#controls #emp{width:190px;height:69px;background-position:100% 88%}
#controls button:hover:not(:disabled),#pauseButton:hover{filter:brightness(1.25) drop-shadow(0 0 9px #59e9dd66);transform:translateY(-2px)}
#controls button:active:not(:disabled),#pauseButton:active{transform:translateY(1px)}
#controls button:disabled{opacity:.5;filter:grayscale(.9);cursor:default}
body.reduced-motion #controls button{transition:none}
@media(max-width:950px){#hud{left:2%;right:2%;gap:5px}#hud .hud-module{width:185px;height:75px;padding:17px 18px 12px}#hud .hud-center{width:220px}#hud small{font-size:8px;letter-spacing:1px}#hud strong{font-size:24px}#controls{left:2%;right:2%;gap:8px}#controls button{width:119px;height:58px}#controls #emp{width:150px;height:60px}#controls .battery-name{font-size:12px}.battery-buttons{gap:3px}}
@media(max-width:650px){#hud{top:8px;gap:3px}#hud .hud-module{width:27%;height:62px;padding:14px 7px 9px}#hud .hud-center{width:33%}#hud small{font-size:6px;letter-spacing:.3px;white-space:normal;min-height:12px;margin:0}#hud strong{font-size:18px;letter-spacing:.8px}#pauseButton{width:40px;height:48px;font-size:20px}#controls{flex-wrap:wrap;justify-content:center;bottom:10px;gap:4px}.battery-buttons{width:100%;justify-content:center;gap:3px}#controls button{width:24%;height:53px;padding:9px 4px}#controls .battery-name{font-size:10px;letter-spacing:.4px}#controls strong{font-size:8px;letter-spacing:.3px}#controls #emp{width:150px;height:48px}}
@media(max-height:500px) and (min-width:651px){#hud{top:4px}#hud .hud-module{height:59px;padding-top:12px}#hud strong{font-size:20px}#pauseButton{height:48px}#controls{bottom:4px}#controls button,#controls #emp{height:48px}}

/* Keep touch targets above the canvas and inside phone safe areas. */
#controls{z-index:4;bottom:max(10px,env(safe-area-inset-bottom));user-select:none;-webkit-user-select:none}
#controls button,#pauseButton{touch-action:manipulation;min-height:48px}
@media(min-width:651px) and (max-width:950px){.battery-buttons{flex:1;min-width:0}#controls .battery-buttons button{width:auto;flex:1;min-width:0}}
