/* Woordslang — eigen onderdelen bovenop klastools.css. */
:root { --body: #2fb36b; --body-hi: #45c97f; --good: #2fb36b; --bad: #e8364f; }
input[type="text"] { font: inherit; }

/* ---------- instellingen ---------- */
.ws-setup { flex: 1; display: flex; align-items: center; justify-content: center; }
.setup-card {
  width: min(720px, 100%); display: grid; gap: 16px; padding: 26px 24px;
  background: var(--panel); border-radius: 28px; box-shadow: 0 24px 60px rgba(0,0,0,.4);
}
.setup-card h1 { margin: 0; text-align: center; font-family: var(--font-display); font-weight: 800; font-size: clamp(28px, 4.4vw, 42px); line-height: 1.1; }
.lead { margin: 0; text-align: center; color: var(--muted); font-size: 18px; font-weight: 700; line-height: 1.4; text-wrap: balance; }
.opt { display: grid; gap: 6px; }
.opt-label { font-weight: 800; font-size: 15px; color: var(--muted); }
.opt .seg { flex-wrap: wrap; }
.opt .seg button { flex: 1; }
.start-row { display: flex; gap: 8px; }
.start-row input, .ws-input input {
  flex: 1; min-width: 0; border: 3px solid rgba(255,255,255,.15); border-radius: 16px; background: #120f30; color: var(--ink);
  font-family: var(--font-display); font-weight: 800; font-size: 22px; padding: 8px 14px;
}
.start-row input::placeholder { color: #6f6aa3; font-size: 17px; }
.dice-btn { height: auto; font-size: 24px; }
.setup-card .go { justify-self: center; padding-left: 60px; padding-right: 60px; }
.center { text-align: center; }

/* ---------- spel ---------- */
.ws-play { flex: 1; display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.ws-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }

.ws-score { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pill { background: rgba(0,0,0,.25); border-radius: 16px; padding: 8px 14px; font-weight: 800; font-size: 17px; line-height: 1.2; color: var(--muted); }
.pill b { font-family: var(--font-display); font-size: 30px; color: var(--ink); margin-right: 4px; }
.team {
  display: grid; justify-items: center; min-width: 110px; padding: 6px 14px 8px; border-radius: 16px;
  background: rgba(0,0,0,.25); box-shadow: inset 0 -5px 0 var(--tc); opacity: .6; transition: opacity .2s, transform .2s;
}
.team span { font-weight: 800; font-size: 15px; color: var(--tc); }
.team b { font-family: var(--font-display); font-weight: 800; font-size: 40px; line-height: 1; }
.team.on { opacity: 1; background: var(--panel-hi); box-shadow: inset 0 -5px 0 var(--tc), 0 0 0 3px var(--tc), 0 0 26px color-mix(in srgb, var(--tc) 60%, transparent); transform: scale(1.05); }
.team small { font-size: 12px; font-weight: 800; color: var(--muted); min-height: 1.2em; }

.ws-letter { display: grid; justify-items: center; gap: 2px; text-align: center; }
.ws-letter span { font-weight: 800; font-size: 16px; color: var(--muted); }
.ws-letter small { font-weight: 800; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--pink); min-height: 1.2em; }
.ws-letter b {
  display: grid; place-items: center; width: clamp(84px, 13vh, 130px); aspect-ratio: 1; border-radius: 24px;
  background: var(--gold); color: var(--gold-ink); box-shadow: inset 0 -6px 0 rgba(0,0,0,.18), 0 10px 30px rgba(255,212,59,.35);
  font-family: var(--font-display); font-weight: 800; font-size: clamp(60px, 10vh, 100px); line-height: 1; padding-top: .08em;
}
.ws-letter b.bump { animation: popin .4s cubic-bezier(.3,1.5,.5,1); }

.ws-timer { justify-self: end; position: relative; width: clamp(80px, 12vh, 116px); aspect-ratio: 1; display: grid; place-items: center; }
.ws-timer svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ws-timer circle { fill: none; stroke-width: 10; }
.ws-timer .trk { stroke: rgba(255,255,255,.12); }
.ws-timer .arc { stroke: var(--gold); stroke-linecap: round; stroke-dasharray: 276.46; transition: stroke .2s; }
.ws-timer span { font-family: var(--font-display); font-weight: 800; font-size: clamp(30px, 5vh, 46px); line-height: 1; font-variant-numeric: tabular-nums; padding-top: .08em; }
.ws-timer.low .arc { stroke: #ff6b6b; }
.ws-timer.low span { color: #ff6b6b; animation: pulse 1s ease-in-out infinite; }
.ws-timer.paused span { font-size: clamp(22px, 3.6vh, 32px); color: var(--muted); animation: none; }

/* de slang */
.ws-stage { flex: 1; min-height: 240px; position: relative; }
.snake { position: absolute; inset: 0; overflow-x: hidden; overflow-y: auto; scrollbar-width: thin; }
.snake-in { position: relative; margin: 0 auto; }
.snake svg { position: absolute; left: 0; top: 0; overflow: visible; }
.snake .body { fill: none; stroke: var(--body); stroke-linecap: butt; stroke-linejoin: round; }
.snake .spots { fill: none; stroke: rgba(255,255,255,.28); stroke-linecap: round; }
.snake .tail { fill: var(--body); }
.snake .head-c { fill: var(--body-hi); }
.snake .eye { fill: #fff; }
.snake .pupil { fill: #14112e; }
.snake .tongue { fill: none; stroke: #ff3b4e; stroke-linecap: round; stroke-linejoin: round; }
.bead {
  position: absolute; display: flex; align-items: center; justify-content: center; border-radius: 999px; white-space: nowrap;
  font-family: var(--font-display); font-weight: 800; line-height: 1; padding-top: .1em; box-shadow: inset 0 -.12em 0 rgba(0,0,0,.18);
}
.bead i { font-style: normal; border-radius: .2em; padding: 0 .04em; box-shadow: inset 0 -.14em 0 currentColor; }
.bead.start { background: #fff; color: var(--bg); }
.bead.new { animation: popin .45s cubic-bezier(.3,1.5,.5,1); }
.snake.wiggle .head { animation: wiggle .5s ease; transform-box: fill-box; transform-origin: center; }
@keyframes wiggle { 30% { transform: rotate(-12deg); } 70% { transform: rotate(10deg); } }

/* melding tussen twee beurten */
.ws-note { position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; background: rgba(10,8,30,.6); border-radius: 20px; z-index: 2; }
.note-card {
  width: min(620px, 100%); display: grid; gap: 12px; justify-items: center; text-align: center; padding: 24px 20px;
  background: linear-gradient(180deg, #3a2f9e, #241d6b); border-radius: 26px; box-shadow: 0 0 0 5px var(--tc, var(--gold)), 0 24px 60px rgba(0,0,0,.5);
  animation: popin .4s cubic-bezier(.3,1.5,.5,1);
}
.note-why { font-family: var(--font-display); font-weight: 800; font-size: clamp(30px, 5vw, 52px); line-height: 1.05; color: #ff8787; }
.note-next { font-weight: 800; font-size: clamp(19px, 2.6vw, 26px); line-height: 1.35; text-wrap: balance; }
.note-next b { color: var(--tc, var(--gold)); }

/* invoer */
.ws-controls { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; justify-items: center; }
.ws-input { display: flex; gap: 10px; width: min(860px, 100%); }
.ws-input input { font-size: clamp(26px, 4vh, 38px); padding: 8px 18px; border-radius: 18px; }
.ws-input input:disabled { opacity: .45; }
.judge { display: flex; gap: 10px; }
.ws-good, .ws-bad {
  border: 0; border-radius: 18px; padding: 10px 22px; color: #fff; white-space: nowrap;
  font-family: var(--font-display); font-weight: 800; font-size: clamp(22px, 3.4vh, 30px); line-height: 1.1;
}
.ws-good { background: var(--good); box-shadow: inset 0 -5px 0 rgba(0,0,0,.18), 0 5px 0 #1d7a47; }
.ws-bad { background: var(--bad); box-shadow: inset 0 -5px 0 rgba(0,0,0,.18), 0 5px 0 #9c1a2e; }
.ws-good:active:not(:disabled), .ws-bad:active:not(:disabled) { transform: translateY(2px); }
.ws-good:disabled, .ws-bad:disabled { opacity: .35; cursor: default; }
.ws-feedback { min-height: 1.4em; text-align: center; font-weight: 800; font-size: 18px; color: var(--muted); text-wrap: balance; }
.ws-feedback b { color: var(--gold); }
.ws-feedback.good { color: #8ce99a; }
.ws-feedback.bad { color: #ff8787; }
.ws-extra { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.ws-extra .ghost { font-size: 16px; padding: 7px 16px; }
#btnSkip { border-color: var(--gold); color: var(--gold); }
.shake { animation: shake .35s ease; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

.ws-result-sub { font-weight: 800; font-size: clamp(20px, 3vw, 28px); color: var(--muted); }
.ws-result-sub b { color: var(--gold); }
.result-names span small { display: block; font-size: .32em; color: var(--muted); margin-top: 6px; }

@media (max-width: 700px) {
  .ws-bar { gap: 8px; }
  .ws-score { grid-column: 1 / -1; flex-wrap: nowrap; justify-content: center; }
  .ws-letter { grid-column: 2; }
  .ws-timer { grid-column: 3; justify-self: start; width: 64px; }
  .ws-timer span { font-size: 24px; }
  .ws-timer.paused span { font-size: 18px; }
  .team { flex: 1; min-width: 0; padding: 4px 10px 6px; }
  .team.on { transform: none; }
  .team b { font-size: 30px; }
  .ws-input { flex-wrap: wrap; }
  .ws-input input { flex-basis: 100%; }
  .judge { flex: 1; }
  .judge button { flex: 1; }
}
@media (max-width: 560px) {
  .setup-card { padding: 18px 14px; gap: 12px; }
  .lead { font-size: 16px; }
  .opt .seg button { padding: 10px 6px; font-size: 16px; }
  .pill b { font-size: 24px; }
  .ws-letter b { width: 76px; font-size: 54px; border-radius: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .bead.new, .ws-letter b.bump, .note-card, .shake, .snake.wiggle .head, .ws-timer.low span { animation: none !important; }
  .team { transition: none; }
}
