/* Keep every touch control on screen without changing the game's logic. */
@media (max-width: 520px) {
  .touch-controls {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 5px;
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
  }
  .touch-controls .dpad-group,
  .touch-controls .action-group { display: contents; }
  .touch-controls .ctrl-btn,
  .touch-controls .ctrl-btn.special-btn {
    width: 100%;
    min-width: 0;
    height: 52px;
    padding: 0 2px;
    border-radius: 12px;
    font-size: 16px;
    pointer-events: auto;
  }
}
