/* Word search: the grid fills the left of the screen (game.js sizes --cell to fit), choices and words on the right. */
.ws-main { flex-direction: row; align-items: stretch; gap: clamp(16px, 2.5vw, 40px); }
.ws-play { flex: 1; min-width: 0; min-height: 0; display: grid; place-items: center; }

.ws-board {
  --cell: 56px;
  position: relative; padding: 8px; border-radius: var(--radius); background: var(--sand);
  touch-action: none; cursor: pointer;
}
.ws-marks { position: absolute; inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); overflow: visible; pointer-events: none; }
.ws-marks .found { stroke-linecap: round; fill: none; }
.ws-marks .live { stroke: var(--sea); stroke-opacity: 0.32; stroke-linecap: round; fill: none; }
.ws-marks .start { fill: var(--coral); fill-opacity: 0.45; }
.ws-marks .wrong { stroke: var(--bad); stroke-opacity: 0.28; stroke-linecap: round; fill: none; animation: fade 0.6s ease-out forwards; }
@keyframes fade { to { stroke-opacity: 0; } }

.ws-grid { position: relative; display: grid; grid-template-columns: repeat(var(--n, 10), var(--cell)); grid-auto-rows: var(--cell); }
.ws-cell {
  display: grid; place-items: center; border-radius: 50%;
  font-family: var(--sans); font-weight: 500; font-size: calc(var(--cell) * 0.5); line-height: 1; color: var(--ink);
}
.ws-cell.is-focus { box-shadow: inset 0 0 0 3px var(--coral); }

/* ---------- side panel ---------- */
.ws-panel { flex: 0 0 auto; width: clamp(340px, 30vw, 540px); display: flex; flex-direction: column; justify-content: center; gap: 16px; min-height: 0; }
.ws-panel .choice { display: flex; }
.ws-panel .choice button { flex: 1 1 auto; padding: 0 0.8em; }
.ws-themes { flex-wrap: wrap; }
@media (max-width: 1600px) { .ws-panel .ws-themes button { flex: 1 1 40%; } } /* two by two when narrow */
.ws-message { text-align: left; min-height: 2.4em; font-size: 1.25rem; }

.ws-words {
  list-style: none; margin: 0; padding: 14px 18px; border-radius: var(--radius); background: var(--sand);
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px;
}
.ws-words li { display: flex; align-items: center; gap: 0.5em; font-size: 1.15rem; font-weight: 400; letter-spacing: 0.04em; white-space: nowrap; }
.ws-words li::before { content: ""; flex: 0 0 auto; width: 0.75em; height: 0.75em; border-radius: 50%; border: 2px solid var(--rule); }
.ws-words li.is-found { color: #7b8085; text-decoration: line-through; text-decoration-thickness: 2px; }
.ws-words li.is-found::before { border-color: transparent; background: var(--chip); }
.ws-words li.is-new { animation: pop 0.3s ease-out; }
@keyframes pop { from { transform: scale(1.15); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .ws-words li.is-new, .ws-marks .wrong { animation: none; } }
