/* Str8ts board (archetype 05, grille de chiffres) scoped under .str8-root.
   An n×n grid mixing BLACK blocker cells with WHITE number cells. Straights run
   inside each unbroken white run. Uses the shared design tokens (gold accent +
   warm neutrals) with light + dark support. */

.str8-root {
  --cell: 56px;
  --line: #cfc8b8; --ink: #2a2620; --paper: #fbf9f3; --paper-2: #f2eee3;
  --black: #2a2620; --black-line: #4a453b;
  --gold: #b68235; --gold-soft: #e7d3a3; --peer: #f6f1e2; --bad: #c8503b;
  display: flex; flex-direction: column; align-items: center; gap: clamp(14px, 3vw, 24px);
  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. */
.str8-root.mode-dark { --line: #3a4030; --ink: #ece8e2; --paper: #232620; --paper-2: #1c1f19; --black: #0e100c; --black-line: #000; --gold: #d8b65c; --gold-soft: #4a4126; --peer: #2b2f24; --bad: #d9694f; }

.str8-grid {
  display: grid; justify-content: center; gap: 2px;
  background: var(--line); border: 2px solid var(--ink); border-radius: 8px; padding: 2px;
}

.str8-cell {
  inline-size: var(--cell); block-size: var(--cell);
  display: grid; place-items: center;
  background: var(--paper); color: var(--ink);
  font-size: calc(var(--cell) * 0.5); font-weight: 500; font-variant-numeric: tabular-nums;
  cursor: pointer; user-select: none; transition: background 0.1s;
}
.str8-cell.black { background: var(--black); cursor: default; box-shadow: inset 0 0 0 1px var(--black-line); }
.str8-cell.given { font-weight: 800; background: var(--paper-2); cursor: default; }
.str8-cell.peer { background: var(--peer); }
.str8-cell.same { color: var(--gold); font-weight: 800; }
.str8-cell.sel { outline: 3px solid var(--gold); outline-offset: -3px; background: var(--gold-soft); z-index: 2; }
.str8-cell.conflict { color: var(--bad); background: color-mix(in srgb, var(--bad) 16%, var(--paper)); }

.str8-pad { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-inline-size: calc(var(--cell) * 8); }
.str8-key {
  min-inline-size: 46px; block-size: 46px; padding: 0 12px;
  border: 1.5px solid var(--line); border-radius: 9px; background: var(--paper);
  color: var(--ink); font-size: 19px; font-weight: 600; cursor: pointer; font-variant-numeric: tabular-nums;
}
.str8-key:hover { border-color: var(--gold); }
.str8-key:active { background: var(--gold-soft); }

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