/* Shikaku board (archetype 06, "mark-the-grid") scoped under .shk-root. A square
   grid the player carves into rectangles by dragging. Uses the shared design
   tokens (gold accent + warm neutrals); light + dark via .mode-dark. */

.shk-root {
  --cell: 48px;
  --line: #cfc8b8; --ink: #2a2620; --paper: #fbf9f3; --paper-2: #f2eee3;
  --gold: #b68235; --edge: #b68235; --fill: #f6efdd; --clue-bg: #efe6cf;
  --bad: #c8503b; --bad-bg: #f3ddd6; --preview: #e7d3a3;
  display: flex; flex-direction: column; align-items: center; gap: clamp(10px, 2.5vw, 18px);
  padding: clamp(10px, 2.5vw, 22px) 0;
  color: var(--ink);
  touch-action: none;
}
/* Board tonality is fixed by the surface panel (BOARD_SURFACES.md): the board
   follows our .mode-dark class only, never the OS colour-scheme. */
.shk-root.mode-dark {
  --line: #3a4030; --ink: #ece8e2; --paper: #232620; --paper-2: #1c1f19;
  --gold: #d8b65c; --edge: #d8b65c; --fill: #322d1d; --clue-bg: #3b3423;
  --bad: #d9694f; --bad-bg: #3a2620; --preview: #4a4126;
}

.shk-readout {
  min-block-size: 1.6em;
  font-size: clamp(14px, 3.4vw, 18px); font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--gold); letter-spacing: 0.02em; opacity: 0; transition: opacity 0.12s;
}
.shk-readout.on { opacity: 1; }

.shk-grid {
  display: grid; justify-content: center;
  gap: 1px; padding: 1px; background: var(--line); border-radius: 8px;
  user-select: none;
}

.shk-cell {
  inline-size: var(--cell); block-size: var(--cell);
  display: grid; place-items: center;
  background: var(--paper);
  font-size: calc(var(--cell) * 0.42); font-weight: 700; font-variant-numeric: tabular-nums;
  cursor: pointer; position: relative;
  transition: background 0.1s;
}
.shk-cell.rect { background: var(--fill); }
.shk-cell.clue { background: var(--clue-bg); }
.shk-cell.rect.clue { background: var(--fill); }
.shk-cell.bad { background: var(--bad-bg); color: var(--bad); }
.shk-cell.bad { --edge: var(--bad); }
.shk-cell.preview { background: var(--preview); }

.shk-root.solved .shk-cell.rect { --edge: var(--gold); }
.shk-root.solved .shk-cell { cursor: default; }

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