/* Who Says It? (/who-says-it): the game on the landing's dusk scene.
 *
 * Built from landing.css: its tokens (cream text over the sky, light papers
 * with dark ink, coral for the one sign-up button, the lesson's purple for
 * marked words), its pill buttons (.ld-btn, .ld-audio-btn), its eyebrow and
 * nav. The speech bubble and the four choices are papers like the landing's
 * one-word slips; the clue words are marked in the lesson's purple.
 */
.wsi {
  --wsi-paper: #fdfcff;
  --wsi-ok: #4a8a6e; --wsi-ok-bg: #e9f5ee;
  --wsi-no: #b5476b; --wsi-no-bg: #fbecf0;
  --wsi-mark: rgba(108,92,231,0.18);
  position: relative; max-width: 640px; margin: 0 auto;
  padding: 112px 20px 40px; display: flex; flex-direction: column; gap: 26px;
}
.wsi [hidden] { display: none !important; }
.wsi section { display: flex; flex-direction: column; gap: 22px; }
.wsi-head { text-align: center; }
.wsi-head .ld-eyebrow { margin-bottom: 8px; }
.wsi-h1 {
  margin: 0; font-family: var(--ld-fui); font-weight: 300; font-size: clamp(2.3rem, 7vw, 3.4rem);
  line-height: 1.1; color: var(--ld-cream); text-shadow: 0 2px 26px rgba(28,18,52,0.5);
}
.wsi-lead {
  margin: 0 auto; max-width: 32em; text-align: center; text-wrap: balance;
  font-size: clamp(1rem, 2.4vw, 1.12rem); font-weight: 300; line-height: 1.6;
  color: var(--ld-cream-soft); text-shadow: var(--ld-txt-glow);
}
.wsi-dare { margin: 0; text-align: center; text-wrap: balance; font-weight: 600; color: var(--ld-coral); text-shadow: var(--ld-txt-glow); }
.wsi-fine, .wsi-note {
  margin: 0 auto; max-width: 34em; text-align: center; text-wrap: balance;
  font-size: 14px; line-height: 1.6; color: var(--ld-cream-mute); text-shadow: var(--ld-txt-glow);
}
.wsi-note { margin-top: 18px; font-size: 13px; }
.wsi-go { display: flex; justify-content: center; }
.wsi-go .ld-btn { margin-top: 0; }
.wsi-go--row { flex-wrap: wrap; gap: 14px; }
.wsi-btn-quiet { background: rgba(42,30,72,0.42); color: var(--ld-cream); box-shadow: none; border: 1px solid var(--ld-cream-thread); }
.wsi-btn-quiet:hover { background: rgba(42,30,72,0.56); }

/* The speech bubble: a paper with a tail at its lower left. */
.wsi-bubble {
  position: relative; display: flex; flex-direction: column; gap: 6px;
  background: var(--wsi-paper); border: 1px solid var(--ld-card-edge); border-radius: 28px;
  box-shadow: var(--ld-shadow-card); padding: 24px 24px 18px; margin-bottom: 14px; color: var(--ld-card-ink);
}
.wsi-bubble::after {
  content: ""; position: absolute; left: 44px; bottom: -13px; width: 26px; height: 26px;
  background: var(--wsi-paper); border-radius: 0 0 6px 0; transform: rotate(45deg) skew(10deg, 10deg);
}
.wsi-jp {
  margin: 0; font-family: var(--ld-fjp-text); font-weight: 700; font-size: clamp(24px, 6vw, 31px);
  line-height: 1.5; line-break: strict; /* never start a line with ！ or 。 */
}
.wsi mark { background: linear-gradient(transparent 56%, var(--wsi-mark) 56%, var(--wsi-mark) 94%, transparent 94%); color: var(--ld-card-accent); padding: 0 1px; }
.wsi-ro { margin: 0; font-size: 15px; font-style: italic; letter-spacing: 0.02em; color: var(--ld-card-ink-muted); }
.wsi-en { margin: 2px 0 0; font-size: 16px; color: var(--ld-card-ink-soft); animation: wsi-in 0.35s var(--ld-ease); }
.wsi-en::before { content: "\201c"; color: var(--ld-card-accent); margin-right: 2px; }
.wsi-en::after { content: "\201d"; color: var(--ld-card-accent); margin-left: 2px; }
.wsi-bubble__row { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

/* Round counter and one dot per round. */
.wsi-progress { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.wsi-count { font-size: 14px; font-weight: 600; letter-spacing: 0.04em; color: var(--ld-cream-90); text-shadow: var(--ld-txt-glow); }
.wsi-dots { display: flex; gap: 6px; flex-wrap: wrap; }
.wsi-dot { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--ld-cream-thread); }
.wsi-dot.now { border-color: var(--ld-cream); background: var(--ld-cream); box-shadow: 0 0 10px rgba(253,246,239,0.7); }
.wsi-dot.ok { border-color: #8fdcb4; background: #8fdcb4; }
.wsi-dot.no { border-color: #f4a3b8; background: #f4a3b8; }

.wsi-ask {
  margin: 0; text-align: center; font-family: var(--ld-fui); font-weight: 300; font-size: clamp(1.35rem, 3.6vw, 1.7rem);
  color: var(--ld-cream); text-shadow: 0 2px 22px rgba(24,15,48,0.45);
}

/* The four choices: small papers laid a little askew, like the landing's slips. */
.wsi-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wsi-choice {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0;
  font: inherit; text-align: left; cursor: pointer; padding: 14px 16px 13px; color: var(--ld-card-ink);
  background: var(--ld-card-bg); border: 1.5px solid var(--ld-card-edge); border-radius: 18px; box-shadow: var(--ld-shadow-card);
  rotate: -0.6deg; transition: rotate 0.3s var(--ld-ease), translate 0.3s var(--ld-ease), background 0.2s;
}
.wsi-choice:nth-child(even) { rotate: 0.7deg; }
.wsi-choice:hover:not(:disabled) { rotate: 0deg; translate: 0 -3px; background: #fff; }
.wsi-choice:active:not(:disabled) { translate: 0 0; scale: 0.98; }
.wsi-choice:focus-visible { outline: 2px solid var(--ld-coral); outline-offset: 3px; }
.wsi-choice__key { position: absolute; top: 9px; right: 12px; font-size: 11px; font-weight: 600; color: var(--ld-card-ink-muted); }
.wsi-choice__en { font-size: 16px; font-weight: 700; line-height: 1.3; padding-right: 12px; }
.wsi-choice__jp { font-family: var(--ld-fjp); font-size: 13.5px; font-weight: 500; color: var(--ld-card-ink-muted); }
.wsi-choice:disabled { cursor: default; opacity: 0.5; }
.wsi-choice.right, .wsi-choice.wrong { opacity: 1; rotate: 0deg; }
.wsi-choice.right { background: var(--wsi-ok-bg); border-color: var(--wsi-ok); animation: wsi-pop 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.5); }
.wsi-choice.wrong { background: var(--wsi-no-bg); border-color: var(--wsi-no); }

/* After an answer: why, on a paper like a lesson's answer side. */
.wsi-reveal {
  display: flex; flex-direction: column; gap: 12px; padding: 22px 24px; color: var(--ld-card-ink-soft);
  background: var(--ld-card-bg); border: 1px solid var(--ld-card-edge); border-radius: var(--ld-radius-lg);
  box-shadow: var(--ld-shadow-card); animation: wsi-in 0.4s var(--ld-ease);
}
.wsi-verdict { margin: 0; font-size: 18px; font-weight: 700; }
.wsi-verdict.ok { color: var(--wsi-ok); }
.wsi-verdict.no { color: var(--wsi-no); }
.wsi-typenote { margin: 0; line-height: 1.6; }
.wsi-label {
  margin: 6px 0 0; font-size: 12.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ld-card-ink-muted); padding-top: 12px; border-top: 1px solid var(--ld-card-hairline);
}
/* One shared word column, so every note starts at the same place. */
.wsi-clues { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(86px, max-content) 1fr; gap: 12px 16px; }
.wsi-clues li { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; row-gap: 4px; align-items: baseline; }
.wsi-clue__w { font-family: var(--ld-fjp-text); font-size: 19px; font-weight: 700; color: var(--ld-card-ink); }
.wsi-clue__r { display: block; font-family: var(--ld-fui); font-size: 12.5px; font-weight: 400; font-style: italic; color: var(--ld-card-ink-muted); }
.wsi-clue__n { min-width: 0; line-height: 1.55; }

/* End screen. */
.wsi-score {
  margin: 0; text-align: center; font-family: var(--ld-fui); font-weight: 300; font-size: clamp(76px, 22vw, 120px);
  line-height: 1; color: var(--ld-cream); font-variant-numeric: tabular-nums; text-shadow: 0 2px 30px rgba(28,18,52,0.5);
}
.wsi-score span { font-size: 0.42em; color: var(--ld-scene); margin-left: 6px; }
.wsi-cta { padding: 28px 0 4px; align-items: center; text-align: center; }
.wsi-cta::before { content: ""; width: 1px; height: 46px; background: linear-gradient(to bottom, transparent, var(--ld-cream-thread)); }
.wsi-cta__h {
  margin: 0; font-family: var(--ld-fui); font-weight: 300; font-size: clamp(1.5rem, 4.2vw, 2.1rem); line-height: 1.25;
  text-wrap: balance; color: var(--ld-cream); text-shadow: 0 2px 22px rgba(24,15,48,0.45);
}
.wsi-cta__p { margin: 0; max-width: 30em; text-wrap: balance; color: var(--ld-cream-soft); text-shadow: var(--ld-txt-glow); }
.wsi-cta__p a { color: var(--ld-cream); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--ld-scene-soft); }
.wsi-cta .ld-signup { margin-bottom: 0; }
.wsi-status { margin: -8px 0 0; min-height: 1.5em; text-align: center; font-size: 14px; font-weight: 600; color: #a6e6c4; text-shadow: var(--ld-txt-glow); }
.wsi-copytext {
  margin: 0; padding: 12px 14px; border-radius: 14px; font-size: 14px; user-select: all;
  background: var(--ld-card-bg); color: var(--ld-card-ink);
}
.wsi-missed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.wsi-missed li {
  display: flex; flex-direction: column; gap: 4px; padding: 14px 18px; border-radius: 16px;
  background: var(--ld-card-bg); border-left: 3px solid var(--wsi-no); box-shadow: var(--ld-shadow-btn);
}
.wsi-missed__jp { font-family: var(--ld-fjp-text); font-size: 18px; font-weight: 700; color: var(--ld-card-ink); }
.wsi-missed__ans { font-size: 14px; color: var(--ld-card-ink-soft); }

@keyframes wsi-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes wsi-pop { 0% { scale: 0.96; } 60% { scale: 1.03; } 100% { scale: 1; } }

@media (max-width: 760px) {
  .wsi { padding: 92px 16px 32px; gap: 22px; }
  .wsi-bubble { padding: 20px 18px 16px; }
  .wsi-choices { gap: 10px; }
  .wsi-choice { padding: 12px 12px 11px; }
  .wsi-choice__en { font-size: 15px; }
  .wsi-reveal { padding: 18px 18px; }
  .wsi-clues { grid-template-columns: 1fr; }
  .wsi-clues li { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .wsi *, .wsi *::before { animation: none !important; transition: none !important; }
}
