/* ── Number palette (KenKen / Skyscrapers / Suguru) ──────────────────────────
   The shared digit-entry dock rendered by src/ui/numgrid.js. One row of chips
   under the board; the armed chip glows in the accent. No erase chip — a cell is
   cleared by double-tapping it. `--ng-max` (set inline) is the chip count, so the
   row divides the width evenly on a phone and never wraps. */

.ng-pal {
  display: flex;
  gap: var(--space-2, 8px);
  justify-content: center;
  align-items: stretch;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  touch-action: none;              /* chips own the drag gesture */
}

.ng-chip {
  flex: 1 1 0;
  min-width: 0;
  aspect-ratio: 1;
  max-width: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono, ui-monospace, Menlo, monospace);
  font-size: clamp(16px, 5vw, 22px);
  font-weight: 700;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: transform .08s ease, background .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.ng-chip:active { transform: scale(.94); }

.ng-chip.armed {
  color: var(--on-accent);
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent);
}

/* the cell under the pointer during a chip drag */
.ng-tgt {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  z-index: 2;
}

/* the number that follows the finger while dragging a chip */
.ng-ghost {
  position: fixed;
  z-index: 60;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  font-family: var(--font-mono, ui-monospace, Menlo, monospace);
  font-size: 22px;
  font-weight: 800;
  color: var(--on-accent);
  background: var(--accent);
  border-radius: 12px;
  box-shadow: var(--ng-ghost-shadow);
}

/* the eraser chip: same square, quieter surface so it reads as a tool, not a
   number. Armed it wears the accent like any chip; drag ghosts carry the icon. */
.ng-chip.ng-erase { background: var(--surface); border-style: dashed; color: var(--dim); }
.ng-chip.ng-erase.armed { color: var(--on-accent); background: var(--accent); border-style: solid; border-color: var(--accent); }
.ng-chip.ng-erase svg, .ng-ghost-erase svg {
  width: 20px; height: 20px; display: block;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

@media (prefers-reduced-motion: reduce) {
  .ng-chip { transition: none; }
}

/* hint-revealed cells: pinned — a quiet accent tick, and no input ever again */
.revealed { position: relative; }
.revealed::after { content: ''; position: absolute; right: 2px; top: 2px; width: 6px; height: 6px;
  border-radius: 50%; background: var(--accent); opacity: 0.8; }
