@media (hover: none), (pointer: coarse) {
  .game-stage {
    width: 100vw;
    height: 100svh;
  }

  .mobile-controls {
    display: grid;
  }

  .mobile-pause-button {
    display: grid;
  }

  .hud__stat {
    width: clamp(260px, 40vw, 340px);
  }
}

@media (orientation: portrait) and (hover: none),
  (orientation: portrait) and (pointer: coarse) {
  .game-shell {
    display: none;
  }

  .rotate-notice {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    min-height: 100svh;
    align-content: center;
    justify-items: center;
    gap: 14px;
    padding: 24px;
    background: var(--page-background);
    text-align: center;
  }
}

@media (max-height: 440px) and (orientation: landscape) {
  .mobile-controls {
    bottom: max(10px, env(safe-area-inset-bottom));
    left: max(10px, env(safe-area-inset-left));
    grid-template: repeat(2, 46px) / repeat(3, 46px);
    gap: 4px;
  }

  .direction-button {
    border-radius: 12px;
    font-size: 18px;
  }

  .mobile-pause-button {
    top: max(10px, env(safe-area-inset-top));
    right: max(10px, env(safe-area-inset-right));
    width: 46px;
    height: 46px;
    border-radius: 10px;
    font-size: 19px;
  }
}
