/* Nurikabe board (archetype 06, "mark-the-grid") scoped under .nurikabe-root.
   A square grid whose cells are either shaded sea or un-shaded island. Numbered
   cells anchor islands. Uses the shared design tokens (gold accent + warm
   neutrals); light + dark via .mode-dark. */

.nurikabe-root {
  --cell: 48px;
  --line: #cfc8b8; --ink: #2a2620; --paper: #fbf9f3;
  --sea: #2c3340; --sea-2: #232935; --sea-ink: #eef1f6;
  --gold: #b68235; --gold-soft: #e7d3a3;
  --dot: #8fa0b4; --num-ink: #34506e;
  --bad: #c8503b; --solved: #5c8a4a;
  display: flex; flex-direction: column; align-items: center;
  gap: clamp(12px, 3vw, 22px);
  padding: clamp(10px, 2.5vw, 22px) 0;
  color: var(--ink);
}
/* Board tonality is fixed by the surface panel (BOARD_SURFACES.md): the board
   follows our .mode-dark class only, never the OS colour-scheme. */
.nurikabe-root.mode-dark {
  --line: #3a4030; --ink: #ece8e2; --paper: #262a21;
  --sea: #10141c; --sea-2: #070a10; --sea-ink: #dfe6f0;
  --gold: #d8b65c; --gold-soft: #4a4126;
  --dot: #5c6a7c; --num-ink: #8fb6dc;
  --bad: #d9694f; --solved: #7dab68;
}

.nurikabe-grid {
  display: grid; justify-content: center;
  gap: 2px; padding: 2px;
  background: var(--line); border-radius: 10px;
}

.nuri-cell {
  inline-size: var(--cell); block-size: var(--cell);
  display: grid; place-items: center;
  padding: 0; margin: 0; border: 0;
  background: var(--paper); color: var(--ink);
  font-size: calc(var(--cell) * 0.46); font-weight: 700; font-variant-numeric: tabular-nums;
  cursor: pointer; user-select: none;
  transition: background 0.12s ease, box-shadow 0.12s ease;
}
.nuri-cell:not(.num):hover { box-shadow: inset 0 0 0 2px var(--gold-soft); }

/* Numbered island anchors */
.nuri-cell.num { color: var(--num-ink); cursor: default; box-shadow: inset 0 0 0 2px var(--gold-soft); }

/* Shaded sea */
.nuri-cell.sea { background: radial-gradient(circle at 50% 38%, var(--sea), var(--sea-2) 92%); color: var(--sea-ink); }

/* "Definitely island" dot mark */
.nuri-cell.dot::before {
  content: ""; inline-size: 26%; block-size: 26%; border-radius: 50%;
  background: var(--dot);
}

.nuri-cell.sel { box-shadow: inset 0 0 0 3px var(--gold); }

/* Conflicts */
.nuri-cell.bad { box-shadow: inset 0 0 0 3px var(--bad); }
.nuri-cell.sea.bad { background: radial-gradient(circle at 50% 38%, var(--bad), #7d2b1e 94%); color: #fff; }
.nuri-cell.num.bad { color: #fff; background: var(--bad); }

.nurikabe-root.solved .nuri-cell.sea { background: radial-gradient(circle at 50% 38%, var(--sea), var(--sea-2) 92%); box-shadow: inset 0 0 0 1px var(--solved); }
.nurikabe-root.solved .nuri-cell.num { box-shadow: inset 0 0 0 2px var(--solved); }

@media (prefers-reduced-motion: reduce) { .nuri-cell { transition: none; } }
.nurikabe-root.no-motion .nuri-cell { transition: none; }
