.touch-controls { display: none; }
.is-playing.touch-device .touch-controls { display: flex; flex: none; gap: 22px; padding: 8px; align-items: center; justify-content: center; min-height: 108px; }
.touch-stick { width: 92px; height: 92px; flex: none; position: relative; border: 1px solid var(--line); border-radius: 50%; touch-action: none; user-select: none; background: color-mix(in srgb, var(--game-accent, #82ddd5) 5%, #101221); }
.touch-stick::before, .touch-stick::after { content: ''; position: absolute; background: var(--line); pointer-events: none; }
.touch-stick::before { left: 12px; right: 12px; height: 1px; top: 45px; }
.touch-stick::after { top: 12px; bottom: 12px; width: 1px; left: 45px; }
.touch-stick-knob { position: absolute; left: 28px; top: 28px; width: 34px; height: 34px; background: var(--game-accent, #82ddd5); border-radius: 50%; pointer-events: none; }
.touch-stick:focus-visible { outline: 2px solid var(--game-accent, #82ddd5); outline-offset: 4px; }
.touch-control-help { font-size: 12px; color: var(--muted); line-height: 1.6; }
.touch-control-help strong { display: block; color: var(--game-text, var(--text)); }
.is-playing.touch-device #game-shell[data-adapter='canvas'] { grid-template-rows: auto minmax(0, 1fr) auto auto; }
.is-playing.touch-device [data-adapter='canvas'] .play-area { width: min(100%, calc((100dvh - 280px) * 1.6)); }
@media (max-width: 600px) { .is-playing.touch-device [data-adapter='canvas'] .play-area { width: min(100%, calc((100dvh - 330px) * 1.6)); } }
.touch-controls[hidden] { display: none !important; }
@media (max-height: 500px) {
  .is-playing.touch-device .touch-controls { min-height: 80px; padding: 0; }
  .touch-stick { width: 78px; height: 78px; }
  .touch-stick-knob { left: 21px; top: 21px; }
  .touch-stick::before { top: 38px; }
  .touch-stick::after { left: 38px; }
}
@media (max-height: 460px) {
  .is-playing.touch-device [data-adapter='canvas'] .play-area { width: min(100%, calc((100dvh - 240px) * 1.6)); }
  .is-playing.touch-device #game-shell[data-adapter='canvas'] { gap: 6px; padding-top: 6px; padding-bottom: 6px; }
}
