#game {
  display: block;
  margin: 0 auto;
  border-radius: 12px;
  background: var(--surface-2);
  border: 2px solid var(--border);
  touch-action: none;
  width: 100%;
  max-width: 400px;
  height: auto;
  aspect-ratio: 1 / 1;
}

.settings-row select {
  min-width: 100px;
}

.dpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 8px;
  width: min(60vw, 220px);
  margin: 16px auto 0;
  aspect-ratio: 1 / 1;
}

.dpad-btn {
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
  touch-action: manipulation;
  transition: background 0.15s ease, transform 0.1s ease;
}

.dpad-btn:nth-child(1) { grid-column: 2; grid-row: 1; }
.dpad-btn:nth-child(2) { grid-column: 1; grid-row: 2; }
.dpad-btn:nth-child(3) { grid-column: 3; grid-row: 2; }
.dpad-btn:nth-child(4) { grid-column: 2; grid-row: 3; }

.dpad-btn:hover {
  background: color-mix(in srgb, var(--primary) 20%, var(--surface-2));
}

.dpad-btn:active {
  transform: scale(0.92);
}

@media (max-width: 480px) {
  .dpad { gap: 5px; }
  .dpad-btn { font-size: 1.15rem; }
}
