/* A touch-capable laptop still has keyboard controls. Keep this independent
   of mobile layout breakpoints and pointer:coarse rules. */
#game-hud #action-buttons .action-key{display:none}
body.keyboard-ui #game-hud #action-buttons .action-key{
 display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;
 min-width:26px;max-width:100%;padding:3px 6px;margin:3px 0 0;
 border:1px solid #5f472b;border-bottom-width:3px;border-radius:5px;
 background:#fff0cc;color:#2a1b0d;opacity:1;
 font:700 11px/1.1 ui-monospace,SFMono-Regular,Consolas,monospace;
 white-space:nowrap;text-transform:none;letter-spacing:0;
}
body.keyboard-ui #game-hud #action-buttons .touch-label{display:none}
body.keyboard-ui #game-hud #keyboard-hint{display:block;color:#fff0cc;text-shadow:0 1px 3px #000;font-size:11px}
body.keyboard-ui #game-hud #action-buttons{
 display:grid;grid-template-columns:repeat(4,minmax(82px,100px));
 grid-auto-rows:minmax(76px,auto);gap:9px;width:max-content;max-width:100%;
}
body.keyboard-ui #game-hud #action-buttons[data-count="1"]{grid-template-columns:100px}
body.keyboard-ui #game-hud #action-buttons[data-count="2"]{grid-template-columns:repeat(2,100px)}
body.keyboard-ui #game-hud #action-buttons[data-count="3"]{grid-template-columns:repeat(3,100px)}
body.keyboard-ui #game-hud #action-buttons>button{
 display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
 grid-column:auto;grid-row:auto;width:100%;height:100%;min-width:0;min-height:76px;
 border-radius:16px;padding:8px;transform:none;
}
body.keyboard-ui #game-hud #action-buttons strong{font-size:11px;line-height:1.2}
body.keyboard-ui #game-hud #action-buttons .control-icon{display:none}
@media(max-width:700px),(max-height:500px){
 body.keyboard-ui #game-hud #action-buttons{grid-template-columns:repeat(3,76px);grid-auto-rows:minmax(64px,auto);gap:6px}
 body.keyboard-ui #game-hud #action-buttons[data-count="1"]{grid-template-columns:76px}
 body.keyboard-ui #game-hud #action-buttons[data-count="2"]{grid-template-columns:repeat(2,76px)}
 body.keyboard-ui #game-hud #action-buttons[data-count="3"]{grid-template-columns:repeat(3,76px)}
 body.keyboard-ui #game-hud #action-buttons>button{min-height:64px;padding:4px}
 body.keyboard-ui #game-hud #action-buttons .action-key{font-size:10px;padding:3px 4px}
}
