/* Neon Snake — game-specific styles */
.ns-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: 100%;
  padding: 16px;
  touch-action: none; /* a swipe steers the snake, it must never scroll the page */
  user-select: none;
  -webkit-user-select: none;
}
/* the board container carries the size (the canvas just fills it), exactly like the original single canvas did */
.ns-board { width: min(100%, 520px, max(280px, calc(100svh - 400px))); }
.ns-canvas {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: block;
  background: #0f1326;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  touch-action: none;
  outline: none;
}
.is-fs .ns-board,
.is-pseudo-fs .ns-board { width: min(94vw, calc(100dvh - 170px), 680px); }

/* on-screen arrows: touch screens only (a keyboard user does not need them) */
.ns-pad { display: none; }
@media (pointer: coarse) {
  .ns-pad {
    display: grid;
    grid-template-columns: repeat(3, 64px);
    grid-template-rows: repeat(2, 56px);
    gap: 8px;
    justify-content: center;
  }
  .ns-up { grid-column: 2; grid-row: 1; }
  .ns-left { grid-column: 1; grid-row: 2; }
  .ns-down { grid-column: 2; grid-row: 2; }
  .ns-right { grid-column: 3; grid-row: 2; }
  /* the arrows take some height: a slightly smaller board on touch screens */
  .ns-board { width: min(100%, 520px, max(240px, calc(100svh - 560px))); }
}
.ns-arrow {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: #1e2440;
  color: #c6ff3d;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}
.ns-arrow:active { background: #c6ff3d; color: #0b0d17; }
.ns-hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}
