/* The designer's workshop (js/workshop.js). Colours come from book.css, so light and dark follow the book. */
.ws { border: 1px solid var(--rule); border-radius: 8px; background: var(--panel); padding: 0.9rem 1rem 1rem; font-family: var(--font-ui); font-size: 0.925rem; line-height: 1.45; display: flex; flex-direction: column; gap: 0.9rem; min-width: 0; }
.ws [hidden] { display: none !important; }
.ws button, .ws select, .ws input { font-family: inherit; }
.ws p { margin: 0; }
.ws-title { font-weight: 700; font-size: 1.1rem; }
.ws-intro { color: var(--muted); margin-top: 0.2rem !important; }

.ws-toolbox { display: flex; flex-direction: column; gap: 0.6rem; border-top: 1px solid var(--rule); padding-top: 0.8rem; }
.ws-row { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; align-items: center; }
.ws-presets { gap: 0.5rem; }
.ws-field { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; }
.ws-field-label { font-size: 0.82rem; color: var(--muted); font-weight: 500; }
.ws-step { min-width: 2.4rem; min-height: 2.2rem; font-size: 1.1rem; font-weight: 700; line-height: 1; }
.ws-n { min-width: 1.6rem; text-align: center; font-weight: 700; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.ws .pt-view { min-width: 2.4rem; min-height: 2.2rem; }
.ws-presets .am-tool { min-height: 2.2rem; }
.ws-round { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.ws-lock { font-size: 0.82rem; color: var(--muted); }

.ws-bench { display: flex; flex-wrap: wrap; gap: 0.9rem 1.5rem; align-items: flex-start; }
.ws-stage { flex: 1 1 15rem; min-width: 0; display: flex; justify-content: center; }
.ws-svg { width: 100%; height: auto; display: block; overflow: hidden; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.ws-svg .am-edge { pointer-events: none; }
.ws-svg .ws-dim { opacity: 0.32; }
.ws-svg .ws-edge-label { font-size: 12px; }
.ws-room { cursor: pointer; }
.ws-ring { fill: none; stroke-width: 3.5; pointer-events: none; }
.ws-ring.sel { stroke: var(--accent); stroke-dasharray: 5 4; }
.ws-ring.stuck { stroke: var(--warn); }
.ws-side { flex: 1 1 15rem; min-width: 0; display: flex; flex-direction: column; gap: 0.7rem; }
.ws-pick { display: flex; flex-direction: column; gap: 0.4rem; }
.ws-pick .am-key { opacity: 0.6; border-style: dashed; }
.ws-pick .am-key.on { opacity: 1; border-style: solid; box-shadow: 0 3px 0 currentColor; }
.ws-hint { font-size: 0.85rem; color: var(--muted); min-height: 2.5em; }

.ws-verdict { border-top: 1px solid var(--rule); padding-top: 0.7rem; display: flex; flex-direction: column; gap: 0.5rem; align-items: flex-start; }
.ws-needs { font-size: 1.1rem; font-weight: 600; }
.ws-score { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.ws-word { display: flex; flex-wrap: wrap; gap: 0.2rem; max-height: 6.4rem; overflow-y: auto; align-self: stretch; }
.ws-chip { min-width: 1.45rem; padding: 0 0.3rem; border-radius: 5px; border: 1.5px solid currentColor; font-weight: 700; font-size: 0.85rem; text-align: center; }
.ws-meter { align-self: stretch; height: 0.6rem; border-radius: 999px; background: var(--paper); border: 1px solid var(--rule); overflow: hidden; }
.ws-meter-bar { height: 100%; background: var(--accent); border-radius: 999px; transition: width 0.3s ease; }
.ws-line { font-size: 0.9rem; }
.ws-verdict.is-record .ws-line { font-weight: 700; color: var(--payoff); }
.ws-verdict.is-record .ws-meter-bar { background: var(--payoff); }
.ws-verdict.is-over .ws-line { font-weight: 700; color: var(--warn); border: 2px solid var(--warn); border-radius: 6px; padding: 0.5rem 0.7rem; }
.ws-verdict.is-over .ws-meter-bar { background: var(--warn); }
.ws-verdict.is-kari .ws-line { border: 2px solid var(--payoff); border-radius: 6px; padding: 0.4rem 0.6rem; }
.ws-help { gap: 0.5rem; }
.ws-hints { margin: 0; padding-left: 1.3rem; font-size: 0.9rem; }
.ws-hints:empty { display: none; }
.ws-report { align-self: flex-start; text-decoration: none; border-color: var(--warn); color: var(--warn); font-weight: 600; }
.ws-verdict.is-stuck .ws-needs { color: var(--warn); }
.ws-why { font-size: 0.9rem; }
.ws-goal, .ws-news { font-size: 0.9rem; font-weight: 600; color: var(--accent); }
.ws-watch { min-height: 2.2rem; }

.ws-table summary { cursor: pointer; font-size: 0.875rem; font-weight: 500; padding: 0.3rem 0; }
.ws-table .am-table-wrap { margin-top: 0.5rem; }
.ws-cell { min-width: 3.4rem; padding: 0.25rem 0.3rem; border-radius: 6px; border: 1.5px solid currentColor; background: var(--paper); font-weight: 700; font-size: 0.9rem; }

.ws-solver { min-width: 0; }
.ws-solver .pz-num, .ws-solver .pz-stars, .ws-solver .pz-help, .ws-solver .pz-hints { display: none; }

.ws-board, .ws-share { border-top: 1px solid var(--rule); padding-top: 0.8rem; display: flex; flex-direction: column; gap: 0.5rem; }
.ws-board-title { font-weight: 600; }
.ws-board-table td, .ws-board-table th { font-weight: 500; }
.ws-board-table tr.here th, .ws-board-table tr.here td { background: var(--accent-soft); }
.ws-board-table .ws-top { color: var(--payoff); font-weight: 700; }
.ws-muted { color: var(--muted); }
.ws-back { font-size: 0.8rem; padding: 0.2rem 0.5rem; white-space: nowrap; }
.ws-share-row { display: flex; flex-wrap: wrap; gap: 0.4rem 0.5rem; align-items: center; margin: 0; }
.ws-share-row label { flex: 1 0 100%; }
.ws-code { flex: 1 1 9rem; min-width: 0; max-width: 22rem; padding: 0.35rem 0.55rem; border: 1px solid var(--muted); border-radius: 6px; background: var(--paper); color: var(--ink); font-size: 0.95rem; font-weight: 600; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }
.ws-share-note { font-size: 0.85rem; color: var(--muted); }
.ws-share-note.bad { color: var(--warn); }
.ws-share-note:empty { display: none; }

@media (max-width: 480px) {
  .ws { padding: 0.8rem 0.7rem 0.9rem; }
  .ws-board-table th, .ws-board-table td { padding: 0.2rem 0.35rem; }
}
@media (prefers-reduced-motion: reduce) { .ws-meter-bar { transition: none; } }
