/* Nim — plateau family (design/Jeu - Nim). Rows of gold tokens on a wooden board,
   the whole thing on the warm leather surface, the same in light and dark.
   Hovering a token previews it and every token to its right being swept away. A
   side panel carries the turn and the rule. Scoped under .nim-root. */

.nim-root { display: flex; flex-direction: column; align-items: stretch; inline-size: 100%; color: var(--color-text); --tok: clamp(26px, 6vw, 42px); --nimgap: clamp(6px, 1.6vw, 12px); }

.nim-surface {
  inline-size: 100%; box-sizing: border-box;
  background: #43302b; border-block: 1px solid #2c1f1b;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  padding: var(--space-6) 0; color: #f4ece5;
}
.nim-inner { max-inline-size: 1000px; margin-inline: auto; padding-inline: var(--space-4); box-sizing: border-box; display: flex; flex-wrap: wrap; gap: var(--space-6); align-items: center; justify-content: center; }

.nim-planche {
  flex: 0 1 auto; padding: 24px 30px; border-radius: 4px; box-sizing: border-box;
  display: flex; flex-direction: column; gap: 8px;
  background: linear-gradient(152deg, #7b5638 0%, #603f2e 40%, #4c3427 78%, #5d3f2d 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 -2px 6px rgba(0, 0, 0, 0.4), 0 22px 44px rgba(0, 0, 0, 0.40);
}
.nim-board { display: flex; flex-direction: column; gap: var(--nimgap); }
.nim-row { display: flex; gap: var(--nimgap); justify-content: center; min-block-size: var(--tok); padding-block: 4px; }

.nim-token {
  inline-size: var(--tok); block-size: var(--tok); border-radius: 50%;
  background: radial-gradient(circle at 36% 30%, #f0d089, var(--color-accent-500));
  box-shadow: inset 0 2px 3px rgba(255, 255, 255, 0.4), inset 0 -3px 5px rgba(0, 0, 0, 0.32), 0 2px 4px rgba(0, 0, 0, 0.4);
  transition: transform 0.12s ease, filter 0.12s ease;
}
.nim-token.hint { outline: 3px solid var(--color-accent-400); outline-offset: 3px; }
.nim-board.playable .nim-token { cursor: pointer; }
.nim-board.playable .nim-row:hover .nim-token:hover,
.nim-board.playable .nim-row:hover .nim-token:hover ~ .nim-token {
  filter: brightness(1.14) saturate(1.2); transform: translateY(-3px) scale(1.04);
}
.nim-board.locked .nim-token { opacity: 0.94; }

@media (prefers-reduced-motion: no-preference) { .nim-token { animation: nim-pop 0.18s ease-out; } }
.nim-root.no-motion .nim-token, .nim-root.no-motion .nim-token:hover ~ .nim-token { animation: none; transition: none; }
@keyframes nim-pop { from { transform: scale(0.4); opacity: 0; } to { transform: none; opacity: 1; } }

/* Side panel: turn note + the rule. */
.nim-side { flex: 0 1 230px; display: flex; flex-direction: column; gap: var(--space-4); color: #f4ece5; }
.nim-turn { border-inline-start: 2px solid var(--color-accent-400); padding-inline-start: var(--space-3); font-size: 15px; min-block-size: 1.4em; }
.nim-turn.over { font-family: var(--font-heading); font-weight: 600; color: var(--color-accent-300); }
.nim-note { font-size: 12.5px; line-height: 1.7; color: rgba(244, 236, 229, 0.72); border-block-start: 1px solid rgba(244, 236, 229, 0.2); padding-block-start: var(--space-3); }

.nim-hint { text-align: center; font-size: 12px; color: var(--color-neutral-600); max-inline-size: 560px; margin-inline: auto; padding-block-start: var(--space-3); }
.lz-variants.nim-inline-chips { margin: 0; }
