/* Mots mêlés — a square letter grid; drag across a straight line to grab a word.
   Selected cells tint, found words stay highlighted; the word list strikes them
   through. On the design-system paper. */

.ws-root { padding: clamp(6px, 2vw, 16px); max-inline-size: 460px; margin: 0 auto; color: var(--color-text); display: flex; flex-direction: column; gap: var(--space-4); }

.ws-grid {
  display: grid; grid-template-columns: repeat(var(--n), 1fr); grid-template-rows: repeat(var(--n), 1fr);
  inline-size: min(100%, 380px); aspect-ratio: 1; margin-inline: auto; gap: 1px; background: var(--color-neutral-300);
  border: 1px solid var(--color-neutral-400); border-radius: var(--radius-sm); touch-action: none; user-select: none;
}
.ws-cell {
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  font-family: var(--font-body); font-weight: 600; font-size: clamp(12px, 3vw, 18px); text-transform: uppercase;
  background: var(--color-neutral-100); color: var(--color-text);
}
.ws-cell.sel { background: var(--color-accent-200); }
.ws-cell.found { background: var(--color-accent); color: var(--color-accent-900); }

.ws-words { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; }
.ws-word { font-family: var(--font-body); font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--color-text); }
.ws-word.done { color: var(--color-neutral-500); text-decoration: line-through; }

/* Dark page */
.ws-root.mode-dark .ws-grid { background: #1a1917; border-color: #403c38; }
.ws-root.mode-dark .ws-cell { background: #262421; color: #ece8e2; }
.ws-root.mode-dark .ws-cell.sel { background: var(--color-accent-800, #3a4a2a); }
.ws-root.mode-dark .ws-cell.found { background: var(--color-accent-500); color: #1a1a17; }
.ws-root.mode-dark .ws-word { color: #ece8e2; }
.ws-root.mode-dark .ws-word.done { color: #6f6a63; }
