.ws { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; padding: 2px 16px 12px; container-type: size; }
.ws__bowl { flex: none; align-self: center; width: min(100cqw, 100cqh - 190px); max-width: 520px; aspect-ratio: 1; padding: 8px;
  border-radius: 24px; border: 2.5px solid var(--edge); box-shadow: 0 5px 0 var(--edge); box-sizing: border-box;
  background: radial-gradient(circle at 30% 25%, #f4fbe6 0%, #e4f3cc 60%, #d3eab5 100%); }
.ws__grid { position: relative; width: 100%; height: 100%; display: grid; grid-template-columns: repeat(var(--n), 1fr);
  grid-template-rows: repeat(var(--n), 1fr); touch-action: none; user-select: none; -webkit-user-select: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent; container-type: inline-size; }
.ws__cell { position: relative; z-index: 2; display: grid; place-items: center; font-family: var(--display); font-weight: 600;
  font-size: calc(100cqw / var(--n) * .56); line-height: 1; color: #3b2618; transition: color .15s, transform .15s; }
.ws__cell.hot { color: #1d120a; transform: scale(1.12); }
.ws__cell.anchor { color: #fff; }
.ws__cell.anchor::before { content: ""; position: absolute; inset: 8%; z-index: -1; border-radius: 50%; background: var(--orange); }
.ws__lines { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; overflow: visible; }
.ws__cap { stroke-width: .8; stroke-linecap: round; opacity: .42; }
.ws__cap.pop { animation: wsPop .35s cubic-bezier(.2, 1.4, .4, 1); transform-box: fill-box; transform-origin: center; }
.ws__cap.shown { opacity: .3; stroke-dasharray: .12 .16; stroke-width: .7; }
.ws__sel { stroke: var(--orange); stroke-width: .8; stroke-linecap: round; opacity: 0; }
.ws__sel.on { opacity: .5; }
.ws__sel.miss { stroke: var(--red); animation: wsMiss .4s; }
@keyframes wsPop { 0% { transform: scale(.6); opacity: 0; } 100% { transform: scale(1); } }
@keyframes wsMiss { 25%, 75% { transform: translateX(-.08px); } 50% { transform: translateX(.08px); } }

.ws__hints { flex: 1; min-height: 0; margin: 0; padding: 0; list-style: none; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.ws__ctx { margin: 4px 2px 0; font-size: 14px; font-weight: 700; color: var(--muted); white-space: pre-line; }
.ws__hint { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 14px; background: var(--card);
  border: 2px solid var(--line); font-weight: 700; font-size: 16px; line-height: 1.25; transition: background .2s, border-color .2s; }
.ws__text { flex: 1; min-width: 0; white-space: pre-line; overflow-wrap: anywhere; }
.ws__check { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); box-sizing: border-box; position: relative; }
.ws__len { flex: none; min-width: 28px; padding: 2px 6px; border-radius: 10px; background: var(--line); color: var(--muted);
  font-family: var(--display); font-weight: 600; font-size: 14px; text-align: center; }
.ws__word { flex: none; font-family: var(--display); font-weight: 600; font-size: 17px; }
.ws__word:empty { display: none; }
.ws__hint.done { border-color: var(--c, var(--green)); background: color-mix(in srgb, var(--c, var(--green)) 14%, var(--card)); }
.ws__hint.done .ws__check { border-color: var(--c, var(--green)); background: var(--c, var(--green)); }
.ws__hint.done .ws__check::after { content: ""; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px; border: solid #fff;
  border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.ws__hint.done .ws__text { color: var(--muted); }
.ws__hint.done .ws__len { display: none; }
.ws__hint.missed { border-style: dashed; }
.ws__hint.missed .ws__word { color: var(--muted); }
.ws__hint.missed .ws__len { display: none; }
.ws:not(.calm) .ws__hint.done { animation: wsHint .35s ease-out; }
@keyframes wsHint { 50% { transform: scale(1.03); } }

.ws__give { flex: none; align-self: center; border: 0; background: none; color: var(--muted); font: inherit; font-weight: 800; font-size: 15px;
  padding: 8px 14px; border-radius: 12px; cursor: pointer; }
.ws__give.sure { color: var(--red-dark); background: var(--red-soft); }
.ws__give:disabled { visibility: hidden; }

@media (prefers-color-scheme: dark) {
  .ws__bowl { background: radial-gradient(circle at 30% 25%, #eef8dc 0%, #dcefc0 60%, #c9e3a8 100%); }
  .ws__give.sure { color: #ffb4b4; background: color-mix(in srgb, var(--red) 22%, transparent); }
}
.ws.calm .ws__cell, .ws.calm .ws__cap.pop { transition: none; animation: none; }
@media (prefers-reduced-motion: reduce) {
  .ws__cell { transition: none; }
  .ws__cap.pop, .ws__sel.miss, .ws__hint.done { animation: none; }
}
