/* ============================================================================
   Children's "Who Said This?" (studies/who-said-this.html, who-said-this.js).
   On top of lamp.css and the Bible Trivia game's kids-trivia.css, whose
   screens, buttons, scoreboard, teams and full-screen mode it reuses (kt-*);
   this file adds only what the matching board needs (wst-*). Spec:
   docs/superpowers/specs/2026-10-29-children-who-said-this-design.md
   ============================================================================ */

.lamp .wst-grade-n { margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--accent); }
.lamp .kt-grade[aria-pressed="true"] .wst-grade-n { color: var(--on-ink); opacity: .85; }

.lamp .wst-how { max-width: 760px; margin: 8px 0 30px; }
.lamp .wst-how ol { margin: 0; padding-left: 1.4em; font: 17px/1.6 var(--f-read); }
.lamp .wst-how li + li { margin-top: 6px; }

/* ---- Menu settings ------------------------------------------------------------- */
.lamp .wst-set { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; min-height: 48px; }
.lamp .wst-set > span:first-child { min-width: 11em; font-weight: 600; }
.lamp .wst-set select {
  min-height: 40px; padding: 0 10px; border-radius: 10px; cursor: pointer;
  background: var(--card); border: 1px solid var(--border); font: 600 16px/1 var(--f-ui); color: var(--ink);
}
.lamp .wst-seg { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.lamp .wst-seg button {
  min-height: 40px; padding: 0 14px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--border); font-weight: 600; font-size: 15px;
}
.lamp .wst-seg button:hover { border-color: var(--ink); }
.lamp .wst-seg button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.lamp .wst-note { margin: 6px 0 0; font-size: 14px; line-height: 1.5; color: var(--muted); }

/* ---- Play: the board ------------------------------------------------------------- */
.lamp .wst-card { justify-content: flex-start; gap: 12px; padding: clamp(16px, 3vw, 32px); }
.lamp .wst-turn {
  padding: 4px 12px; border-radius: 999px; background: var(--team); color: var(--kt-on-team);
  font: 600 14px/1.2 var(--f-ui);
}
.lamp .wst-prompt { margin: 0; min-height: 1.5em; font: 600 clamp(17px, 1.8vw, 22px)/1.4 var(--f-ui); color: var(--muted); }
.lamp .wst-said.is-right { color: var(--kt-yes); }
.lamp .wst-said.is-wrong { color: var(--kt-no); }

.lamp .wst-board {
  display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); gap: clamp(14px, 2.4vw, 32px);
  width: 100%; text-align: left;
}
.lamp .wst-quotes, .lamp .wst-people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }

.lamp .wst-q {
  display: flex; align-items: flex-start; gap: 14px; width: 100%; min-height: 56px; padding: 10px 14px; text-align: left;
  background: var(--paper); color: var(--ink); border: 2px solid var(--rule); border-radius: 14px;
  transition: border-color .15s ease, background-color .15s ease;
}
.lamp .wst-q:hover { border-color: var(--accent-bright); }
.lamp .wst-letter {
  flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--ink); color: var(--on-ink); font: 600 19px/1 var(--f-ui);
}
.lamp .wst-q-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.lamp .wst-q-t { font: 500 clamp(17px, 1.75vw, 24px)/1.32 var(--f-read); text-wrap: pretty; }
.lamp .wst-hint { font: 600 14px/1.3 var(--f-ui); color: var(--accent); }
.lamp .wst-hint::before { content: "Hint: "; }
.lamp .wst-tag {
  align-self: flex-start; padding: 4px 12px; border-radius: 999px; background: var(--soft);
  font: 600 clamp(15px, 1.5vw, 19px)/1.3 var(--f-ui);
}
.lamp .wst-tag small { font-weight: 500; font-size: .8em; opacity: .85; }
.lamp .wst-tag.is-right { background: var(--kt-yes); color: var(--kt-yes-bg); }
.lamp .wst-tag.is-wrong { background: var(--kt-no-bg); color: var(--kt-no); }
.lamp .wst-tried { font: 500 13px/1.3 var(--f-ui); color: var(--kt-no); text-decoration: line-through; }

.lamp .wst-q.is-sel { border-color: var(--accent-bright); box-shadow: 0 0 0 3px var(--accent-bright); background: var(--card); }
.lamp .wst-q.is-sel .wst-letter { background: var(--accent-bright); }
.lamp .wst-q.is-right { background: var(--kt-yes-bg); border-color: var(--kt-yes); }
.lamp .wst-q.is-right .wst-letter { background: var(--kt-yes); color: var(--kt-yes-bg); }
.lamp .wst-q.is-wrong { background: var(--kt-no-bg); border-color: var(--kt-no); }
.lamp .wst-q.is-wrong .wst-letter { background: var(--kt-no); color: var(--kt-no-bg); }
.lamp .wst-q.is-picked { background: var(--soft); }
.lamp .wst-q.is-info { box-shadow: 0 0 0 3px var(--kt-yes); }

.lamp .wst-p {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 8px 16px; text-align: left;
  background: var(--card); color: var(--ink); border: 2px solid var(--rule); border-radius: 999px;
  transition: border-color .15s ease, opacity .15s ease;
}
.lamp .wst-p:hover:not(:disabled) { border-color: var(--accent-bright); }
.lamp .wst-num {
  flex: none; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--border); font: 600 15px/1 var(--f-ui); color: var(--muted);
}
.lamp .wst-p-name { flex: 1; min-width: 0; font: 600 clamp(19px, 2.1vw, 28px)/1.15 var(--f-display); }
.lamp .wst-p-pick {
  flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--ink); color: var(--on-ink); font: 600 16px/1 var(--f-ui);
}
.lamp .wst-p.is-sel { border-color: var(--accent-bright); box-shadow: 0 0 0 3px var(--accent-bright); }
.lamp .wst-p.is-picked { background: var(--soft); }
.lamp .kt .wst-p.is-used:disabled { opacity: .45; text-decoration: line-through; cursor: default; }
.lamp .kt .wst-card.is-done .wst-p:disabled { cursor: default; }
.lamp .wst-q.is-miss, .lamp .wst-p.is-miss { animation: wst-shake .4s ease; border-color: var(--kt-no); }
@keyframes wst-shake { 0%, 100% { transform: none; } 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* The story behind the last match. */
.lamp .wst-info {
  width: 100%; padding: 14px 20px; text-align: left; border-radius: 14px; background: var(--soft);
  border-left: 6px solid var(--kt-yes); animation: kt-in .3s ease both;
}
.lamp .wst-info p { margin: 0; }
.lamp .wst-info-who { font: 600 clamp(20px, 2.2vw, 28px)/1.2 var(--f-display); }
.lamp .wst-info-who small { font: 500 .65em/1 var(--f-read); color: var(--muted); }
.lamp .wst-info-q { margin-top: 4px !important; font: italic 500 17px/1.45 var(--f-read); }
.lamp .wst-info-when { margin-top: 6px !important; font: 16px/1.5 var(--f-read); color: var(--muted); }
.lamp .wst-info-ref { white-space: nowrap; font: 600 14px/1 var(--f-ui); color: var(--accent); }
.lamp .wst-hint-btn, .lamp .wst-undo { background: var(--card); color: var(--ink); }
.lamp .wst-pts { background: var(--soft); color: var(--ink); }
.lamp .kt-team.is-turn { border-color: var(--team); box-shadow: 0 0 0 2px var(--team); }

/* ---- Game over: who said what ----------------------------------------------------- */
.lamp .wst-recap { max-width: 820px; margin: 30px auto 0; }
.lamp .wst-recap ol { margin: 0; padding-left: 1.6em; display: grid; gap: 10px; }
.lamp .wst-recap li { font: 16px/1.5 var(--f-read); }
.lamp .wst-recap-q { display: block; font-weight: 500; }
.lamp .wst-recap-who { color: var(--muted); }
.lamp .wst-copy { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }

/* ---- Review ------------------------------------------------------------------------- */
.lamp .wst-rv-who { font: 15px/1.5 var(--f-read); color: var(--muted); }
.lamp .wst-review .kt-rv-topic { list-style: none; }

/* The worksheet is drawn only to print. */
.lamp #wstSheet { display: none; }

@media (max-width: 720px) {
  .lamp .wst-board { grid-template-columns: minmax(0, 1fr); }
  .lamp .wst-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: 8px; }
  .lamp .wst-p { min-height: 52px; border-radius: 14px; }
}
@media (max-width: 560px) {
  .lamp .wst-set > span:first-child { min-width: 0; flex-basis: 100%; }
  .lamp .wst-q { gap: 10px; padding: 10px 12px; }
  .lamp .wst-letter { width: 32px; height: 32px; font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .lamp .wst-q.is-miss, .lamp .wst-p.is-miss, .lamp .wst-info { animation: none; }
}

@media print {
  .lamp .wst-review .kt-rv-topic h3 { margin-top: 12pt; }
  .lamp.wst-printing-sheet .lh, .lamp.wst-printing-sheet .lf, .lamp.wst-printing-sheet .crumbs,
  .lamp.wst-printing-sheet #kt > :not(#wstSheet) { display: none !important; }
  .lamp.wst-printing-sheet #wstSheet { display: block; }
  .lamp .wst-sheet { font: 12pt/1.45 var(--f-read); color: #000; }
  .lamp .wst-sheet h2 { margin: 0 0 4pt; font: 600 20pt/1.2 var(--f-display); }
  .lamp .wst-sheet-sub, .lamp .wst-sheet-name { margin: 0 0 8pt; }
  .lamp .wst-sheet-set { break-inside: avoid; margin: 14pt 0 0; }
  .lamp .wst-sheet h3 { margin: 0 0 4pt; font: 600 13pt/1.2 var(--f-ui); }
  .lamp .wst-sheet-names { margin: 0 0 6pt; font-weight: 600; }
  .lamp .wst-sheet ol { margin: 0; padding-left: 1.6em; list-style: upper-alpha; }
  .lamp .wst-sheet li { margin: 0 0 6pt; }
  .lamp .wst-sheet-blank { display: inline-block; width: 11em; border-bottom: 1px solid #000; margin-right: 6pt; }
  .lamp .wst-sheet-answers { break-before: page; }
  .lamp .wst-sheet-answers p { margin: 0 0 6pt; }
}
