/* ワトソン（先生向け・授業の前 /manabi/sensei/watson/）。見た目は Gamma の見本（a-sensei.html。2026-11-27）を、
   manabi.css の :root のトークン（正本は DESIGN.md 1-2・1-4）だけで組みこんだもの。押せる物＝墨の線2px＋真下の影、
   読むだけの面＝細い線・影なし。角丸は --radius-s・--radius-m・--radius-pill の3つだけ。 */

.wt__inner { display: grid; gap: 20px; padding-block: 8px 48px; max-width: 920px; }
.wt__inner [hidden] { display: none !important; }
.wt-visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wt-note { font-size: 14px; color: var(--ink-muted); }

/* 題名まわり */
.wt-head { display: grid; gap: 12px; }
.wt-head__row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.wt-title { margin: 0; font-family: var(--font-head); font-weight: 900; font-size: clamp(26px, 3vw, 34px); line-height: 1.3; }
.wt-sub { margin: 0; font-family: var(--font-head); font-weight: 700; font-size: 16px; color: var(--ink-muted); }
.wt-tag { display: inline-flex; align-items: center; padding: 3px 12px; font-size: 14px; font-weight: 700; border-radius: var(--radius-pill);
  border: 1.5px solid var(--rule-line); background: var(--bg-quiet); color: var(--ink); }
.wt-tag--wood { background: var(--wood-light); border-color: var(--wood-edge); }
.wt-lead { margin: 0; max-width: 46rem; font-size: 16px; line-height: 1.8; }

/* イテルAI の印（授業セットの .pk-iteru と同じ形） */
.wt-iteru { display: flex; align-items: center; gap: 14px; max-width: 46rem; padding: 14px 18px; background: var(--bg-card);
  border: 1.5px solid var(--rule-line); border-left: 5px solid var(--wood-edge); border-radius: var(--radius-m); }
.wt .iteru { flex: none; transform-origin: 50% 92%; }
.wt-iteru__mascot { width: 48px; height: 54px; }
.wt-iteru__body { display: grid; gap: 4px; min-width: 0; }
.wt-iteru__text { margin: 0; font-size: 15px; line-height: 1.7; }
.wt-iteru__text b { font-family: var(--font-head); font-weight: 900; }
.wt-iteru__link { display: inline-flex; align-items: center; min-height: 44px; width: fit-content; font-size: 14px; font-weight: 700; color: var(--ink);
  text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--rule-line); }
.wt-iteru__link:hover { background: var(--wood-light); text-decoration-color: var(--ink); }
.wt[data-watson-busy] .wt-iteru .iteru, .wt-work .iteru { animation: wt-iteru-sway 2.4s ease-in-out infinite; }
@keyframes wt-iteru-sway { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(7deg); } 65% { transform: rotate(-4deg); } }
.wt [data-iteru-state="rest"] .iteru__eyes { display: none; }
.wt [data-iteru-state="rest"] .iteru__shut { display: inline; }

/* 入力（押せる主パネル） */
.wt-form { padding: 22px; background: var(--bg-card); border: var(--line-press); border-radius: var(--radius-m); box-shadow: var(--shadow-md); }
.wt-fields { display: grid; gap: 18px; min-width: 0; margin: 0; padding: 0; border: 0; }
.wt-fields[disabled] .wt-row, .wt-fields[disabled] .wt-field { opacity: .7; }
.wt-form__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px;
  padding-bottom: 12px; border-bottom: 1.5px solid var(--grid-line); }
.wt-form__title { margin: 0; font-family: var(--font-head); font-weight: 900; font-size: 20px; line-height: 1.35; }
.wt-form__sub { margin: 0; font-size: 14px; color: var(--ink-muted); }
.wt-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr); gap: 16px; }
.wt-field { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.wt-field__label { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0; font-family: var(--font-head); font-weight: 900; font-size: 16px; }
.wt-field__hint { font-family: var(--font-body); font-weight: 400; font-size: 14px; color: var(--ink-muted); }
.wt-select { width: 100%; min-width: 0; min-height: 48px; padding: 10px 14px; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--bg-paper); border: var(--line-press); border-radius: var(--radius-s); cursor: pointer; }

/* 選ぶチップ（影なし・選んだら墨の地に生成りの字と ✓） */
.wt-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.wt-chip { position: relative; display: inline-flex; }
.wt-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.wt-chip span { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 16px; background: var(--bg-card); color: var(--ink);
  border: 1.5px solid var(--rule-line); border-radius: var(--radius-pill); font-size: 15px; font-weight: 700; line-height: 1.35; cursor: pointer; }
.wt-chip:hover span { background: var(--wood-light); border-color: var(--wood-edge); }
.wt-chip input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--bg-paper); }
.wt-chip input:checked + span::before { content: "✓"; font-weight: 900; }
.wt-chip input:disabled:not(:checked) + span { color: var(--ink-muted); background: var(--bg-quiet); cursor: not-allowed; }
.wt-chip input:disabled:checked + span { cursor: default; }
.wt-chip input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 3px; }

.wt-privacy { margin: 0; padding: 10px 14px; background: var(--bg-quiet); border-radius: var(--radius-s); font-size: 14px; line-height: 1.65; }
.wt-form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding-top: 6px; }
.wt-work { display: inline-flex; align-items: center; }
.wt-work__mascot { width: 34px; height: 39px; }
.wt-status { margin: 0; min-height: 1.6em; font-size: 15px; font-weight: 700; }
.wt-status[data-kind="error"] { color: var(--fig-red); }

/* 押せるボタン */
.wt-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 20px;
  background: var(--bg-card); color: var(--ink); border: var(--line-press); border-radius: var(--radius-s); box-shadow: var(--shadow-sm);
  font-family: var(--font-head); font-weight: 700; font-size: 15px; line-height: 1.3; text-decoration: none; cursor: pointer;
  transition: transform 90ms ease, box-shadow 90ms ease, background-color 120ms ease; }
.wt-btn:hover:not(:disabled) { background: var(--wood-light); }
.wt-btn:active:not(:disabled) { transform: translateY(2px); box-shadow: var(--shadow-active); }
.wt-btn--primary { background: var(--wood); }
.wt-btn--primary:hover:not(:disabled) { background: var(--wood-dark); }
.wt-btn--ok { background: var(--state-ok-bg); border-color: var(--state-ok-border); box-shadow: 0 3px 0 var(--state-ok-border); }
.wt-btn--ok:hover:not(:disabled) { background: var(--state-ok-bg); }
.wt-btn:disabled { background: var(--bg-quiet); border-color: var(--rule-line); color: var(--ink-muted); box-shadow: none; cursor: not-allowed; transform: none; }

/* 結果 */
.wt-out { display: grid; gap: 24px; margin-top: 8px; }
.wt-banner, .wt-off { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 16px 18px;
  background: var(--wood-light); border: var(--line-press); border-radius: var(--radius-m); }
.wt-off { grid-template-columns: auto minmax(0, 1fr); background: var(--bg-quiet); border: var(--line-read); }
.wt-banner[data-verified="true"] { background: var(--state-ok-bg); border-color: var(--state-ok-border); }
.wt-banner__mascot { width: 46px; height: 52px; }
.wt-banner__body { display: grid; gap: 4px; min-width: 0; }
.wt-banner__title, .wt-off__title { margin: 0; font-family: var(--font-head); font-weight: 900; font-size: 18px; line-height: 1.4; }
.wt-banner__meta { margin: 0; font-size: 14px; line-height: 1.6; }
.wt-pill { display: inline-flex; align-items: center; padding: 6px 14px; border-radius: var(--radius-pill); font-size: 14px; font-weight: 700; white-space: nowrap;
  background: var(--bg-card); border: 1.5px solid var(--ink); }
.wt-banner[data-verified="true"] .wt-pill { border-color: var(--state-ok-border); }

.wt-block { display: grid; gap: 14px; padding: 20px; background: var(--bg-card); border: var(--line-read); border-radius: var(--radius-m); }
.wt-block__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px;
  padding-bottom: 10px; border-bottom: 1.5px solid var(--grid-line); }
.wt-block__title { margin: 0; padding-left: 12px; border-left: 4px solid var(--wood-edge); font-family: var(--font-body); font-weight: 700; font-size: 20px; line-height: 1.4; }
.wt-block__meta { margin: 0; font-size: 14px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }

/* 根拠の教材番号の札（すべての文に付ける） */
.wt-cite { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; padding: 1px 8px; background: var(--bg-quiet); border: 1px solid var(--rule-line);
  border-radius: var(--radius-s); font-family: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace; font-size: 14px; font-weight: 400;
  color: var(--ink); vertical-align: baseline; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.wt-cite__k { font-family: var(--font-body); font-weight: 700; color: var(--ink-muted); }

/* 授業セット */
.wt-set { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.wt-set__item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; padding: 14px 16px;
  background: var(--bg-paper); border: var(--line-read); border-radius: var(--radius-s); }
.wt-set__no { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--wood); border: var(--line-press);
  font-family: var(--font-head); font-weight: 900; font-size: 18px; font-variant-numeric: tabular-nums; }
.wt-set__body { display: grid; gap: 4px; min-width: 0; }
.wt-set__top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; font-size: 14px; font-weight: 700; color: var(--ink-muted); }
.wt-kind { display: inline-flex; padding: 1px 9px; background: var(--bg-card); border: 1.5px solid var(--rule-line); border-radius: var(--radius-pill); color: var(--ink); }
.wt-set__title { margin: 0; font-family: var(--font-head); font-weight: 900; font-size: 18px; line-height: 1.4; overflow-wrap: anywhere; }
.wt-set__title a { color: var(--ink); }
.wt-set__desc { margin: 0; font-size: 15px; line-height: 1.65; }

/* 声かけ・次の1手 */
.wt-cards { display: grid; gap: 12px; }
.wt-card { display: grid; gap: 8px; padding: 14px 16px; background: var(--bg-paper); border: var(--line-read); border-radius: var(--radius-s); }
.wt-card__phase { justify-self: start; padding: 2px 10px; background: var(--ink); color: var(--bg-paper); border-radius: var(--radius-pill); font-size: 14px; font-weight: 700; }
.wt-card__quote { margin: 0; padding: 10px 14px; background: var(--bg-card); border-left: 4px solid var(--wood-edge);
  border-radius: 0 var(--radius-s) var(--radius-s) 0; font-size: 16px; line-height: 1.75; overflow-wrap: anywhere; }
.wt-card__sign { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.5; }
.wt-card__label { display: inline-block; margin-right: 8px; padding: 1px 9px; background: var(--wood-light); border: 1.5px solid var(--wood-edge);
  border-radius: var(--radius-pill); font-size: 14px; }
.wt-card__move { margin: 0; font-size: 15px; line-height: 1.75; overflow-wrap: anywhere; }
.wt-card__route { margin: 0; padding-top: 8px; border-top: 1px solid var(--grid-line); font-size: 14px; }
.wt-card__route a { color: var(--ink); }

/* 配る案内（訳と、日本語に戻した訳を横に並べる） */
.wt-mt { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0; padding: 12px 14px; background: var(--bg-quiet);
  border-left: 5px solid var(--wood-edge); border-radius: 0 var(--radius-s) var(--radius-s) 0; font-size: 14px; line-height: 1.65; }
.wt-mt__badge { padding: 2px 10px; background: var(--ink); color: var(--bg-paper); border-radius: var(--radius-pill); font-weight: 700; }
.wt-handout { display: grid; gap: 14px; }
.wt-handout__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.wt-handout__row--single { grid-template-columns: minmax(0, 1fr); }
.wt-pane { display: grid; align-content: start; gap: 10px; padding: 16px; background: var(--bg-paper); border: var(--line-read); border-radius: var(--radius-s); }
.wt-pane--back { background: var(--bg-quiet); }
.wt-pane__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; padding-bottom: 8px; border-bottom: 1px solid var(--grid-line); }
.wt-pane__title { margin: 0; font-size: 15px; font-weight: 700; }
.wt-pane__tag { font-size: 14px; font-weight: 700; color: var(--ink-muted); }
.wt-pane__text { margin: 0; font-size: 15px; line-height: 1.8; overflow-wrap: anywhere; }

/* 確かめる・配る */
.wt-verify { display: grid; gap: 16px; padding: 22px; background: var(--bg-card); border: var(--line-press); border-radius: var(--radius-m); box-shadow: var(--shadow-md); }
.wt-verify[data-verified="true"] { border-color: var(--state-ok-border); box-shadow: 0 4px 0 var(--state-ok-border); }
.wt-verify__head { display: flex; align-items: center; gap: 12px; }
.wt-verify__mascot { width: 40px; height: 45px; }
.wt-verify__title { margin: 0; font-family: var(--font-head); font-weight: 900; font-size: 20px; line-height: 1.35; }
.wt-checks { display: grid; gap: 6px; margin: 0; padding: 12px 16px; background: var(--bg-quiet); border-radius: var(--radius-s); list-style: none; font-size: 15px; }
.wt-checks li::before { content: "・"; font-weight: 700; }
.wt-verify__row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.wt-verify__status { margin: 0; font-size: 15px; font-weight: 700; }
.wt-share { display: grid; gap: 12px; padding: 18px 20px; background: var(--bg-card); border: var(--line-read); border-radius: var(--radius-m); }
.wt-share__note { margin: 0; font-size: 14px; color: var(--ink-muted); }
.wt-share__url { width: 100%; min-height: 44px; padding: 8px 12px; font-family: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace; font-size: 14px;
  color: var(--ink); background: var(--bg-paper); border: var(--line-read); border-radius: var(--radius-s); }
.wt-share__buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.wt-share__status { margin: 0; min-height: 1.5em; font-size: 14px; font-weight: 700; }

.wt-legend { padding: 14px 18px; background: var(--bg-card); border: var(--line-read); border-radius: var(--radius-m); }
.wt-legend summary { display: flex; align-items: center; min-height: 44px; font-size: 15px; font-weight: 700; cursor: pointer; }
.wt-legend__list { display: grid; gap: 6px; margin: 10px 0 0; padding-left: 1.2em; font-size: 14px; line-height: 1.7; }
.wt-printout { display: none; }

.wt-h2 { font-size: 22px; margin-top: 20px; }
.wt-list { display: grid; gap: 6px; padding-left: 1.2em; font-size: 15px; line-height: 1.75; }

@media (max-width: 720px) {
  .wt-form, .wt-block, .wt-verify { padding: 16px; }
  .wt-row { grid-template-columns: minmax(0, 1fr); }
  .wt-banner { grid-template-columns: auto minmax(0, 1fr); }
  .wt-pill { grid-column: 1 / -1; justify-self: start; }
  .wt-handout__row { grid-template-columns: minmax(0, 1fr); }
  .wt-share__buttons .wt-btn, .wt-verify__row .wt-btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .wt[data-watson-busy] .wt-iteru .iteru, .wt-work .iteru { animation: none; }
}
/* 印刷するのは配る案内だけ（「配る案内を 印刷」を押したとき。watson.js が html に wt-printing を付ける） */
@media print {
  html.wt-printing body * { visibility: hidden; }
  html.wt-printing .wt-printout, html.wt-printing .wt-printout * { visibility: visible; }
  html.wt-printing .wt-printout { display: block; position: absolute; left: 0; top: 0; width: 100%; white-space: pre-wrap;
    font-size: 15pt; line-height: 1.9; color: var(--ink); }
}
