/* Akari / Light Up board (archetype 06, "mark-the-grid") scoped under .akari-root.
   A square grid of white cells and black walls; bulbs sit on white cells and light
   their row and column. Uses the shared design tokens (gold accent + warm
   neutrals); light + dark via .mode-dark. */

.akari-root {
  --cell: 46px;
  --line: #cfc8b8; --ink: #2a2620; --paper: #fbf9f3;
  --wall: #2f2b24; --wall-ink: #f4efe3;
  --gold: #b68235; --gold-soft: #e7d3a3;
  --glow: #fbeec4; --glow-2: #f6dd97; --bulb: #d99a1c; --bulb-core: #ffcf52;
  --mark: #a89e88; --bad: #c8503b; --done: #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. */
.akari-root.mode-dark {
  --line: #3a4030; --ink: #ece8e2; --paper: #262a21;
  --wall: #14160f; --wall-ink: #e8e3d6;
  --gold: #d8b65c; --gold-soft: #4a4126;
  --glow: #4a4324; --glow-2: #6a5c2a; --bulb: #e6b13a; --bulb-core: #ffdb72;
  --mark: #6b6552; --bad: #d9694f; --done: #7dab68;
}

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

.akari-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;
}
.akari-cell:not(.wall):hover { box-shadow: inset 0 0 0 2px var(--gold-soft); }

/* Walls */
.akari-cell.wall { background: var(--wall); color: var(--wall-ink); cursor: default; }
.akari-cell.wall.done { color: var(--done); }
.akari-cell.wall.bad { color: #fff; background: var(--bad); }

/* Lit white cells glow warm */
.akari-cell.lit { background: radial-gradient(circle at 50% 45%, var(--glow-2), var(--glow) 78%); }

/* A placed bulb */
.akari-cell.bulb::before {
  content: ""; inline-size: 58%; block-size: 58%; border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, var(--bulb-core), var(--bulb) 70%);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.12), 0 0 12px 2px var(--glow-2);
}
/* A "no bulb here" mark */
.akari-cell.mark::before {
  content: ""; inline-size: 26%; block-size: 26%; border-radius: 50%;
  background: var(--mark);
}
.akari-cell.sel { box-shadow: inset 0 0 0 3px var(--gold); }
.akari-cell.bad { box-shadow: inset 0 0 0 3px var(--bad); }
.akari-cell.bad::before { background: radial-gradient(circle at 38% 34%, #ffd7ce, var(--bad) 70%); }

.akari-root.solved .akari-cell.bulb::before { box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.12), 0 0 16px 4px var(--glow-2); }

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