/*
 * HTML版テキストのスタイル（わくわくパソコン基礎講座・全回共通）
 * すべてのセレクタを .wdp-textbook の中に限定しています（受講画面側の見た目を壊さないため）。
 * クラス名は tb- で始めます。幅で組み方を変えるときは @media ではなく @container textbook を使います。
 *
 * 色の目安（PDF教材に合わせています）
 *   赤（見出しの印・番号）   #c00000
 *   ピンク（見出しの帯）     #f1dbdb
 *   紺（タイトル・ふち）     #1f497d
 *   うす青（ヒントの囲み）   #dce6f1
 *   うす黄（めあて・おさらい）#ffffcc
 */

/* ---------- 基本 ---------- */
.wdp-textbook {
  font-family: "BIZ UDPGothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif;
  font-size: 15px;
  line-height: 2.2;
  color: #222;
  overflow-wrap: anywhere;
}
.wdp-textbook .tb-lesson {
  padding: 4px 4px 32px;
}
.wdp-textbook .tb-lesson * {
  max-width: 100%;
}
.wdp-textbook ruby {
  ruby-position: over;
}
.wdp-textbook rt {
  font-size: 0.5em;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
}

/* ---------- 表紙 ---------- */
.wdp-textbook .tb-cover {
  padding: 4px 0 10px;
}
.wdp-textbook .tb-cover-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-top: 2px dotted #1f497d;
  border-bottom: 2px dotted #1f497d;
}
.wdp-textbook .tb-lessonno {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  width: 64px;
  height: 64px;
  padding: 4px 0 6px;
  border: 3px solid #fff;
  border-radius: 12px;
  background: #c00000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35);
  color: #fff;
  line-height: 1;
}
.wdp-textbook .tb-lessonno-num {
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: 38px;
  font-weight: 700;
  line-height: 1.1;
}
.wdp-textbook .tb-lessonno-kai {
  flex: 0 0 auto;
  white-space: nowrap;
  padding-bottom: 4px;
  font-size: 13px;
  font-weight: 700;
}
.wdp-textbook .tb-lessonno rt {
  font-size: 0.55em;
}
.wdp-textbook .tb-title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  color: #1f497d;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.9;
}
.wdp-textbook .tb-cover-teacher {
  flex: 0 0 auto;
  display: block;
  width: 62px;
  height: auto;
}
.wdp-textbook .tb-lead {
  margin: 14px 0 0;
  padding: 6px 16px;
  border: 3px dotted #1f497d;
  border-radius: 16px;
  background: #ffffcc;
}

/* ---------- 見出し・本文 ---------- */
.wdp-textbook .tb-section {
  margin-top: 26px;
}
.wdp-textbook .tb-section--cont {
  margin-top: 16px;
}
.wdp-textbook .tb-heading {
  margin: 0 0 8px;
  padding: 2px 14px;
  border-left: 14px solid #c00000;
  background: #f1dbdb;
  color: #000;
  font-size: 18px;
  font-weight: 700;
  line-height: 2.2;
}
.wdp-textbook .tb-heading--check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 6px;
  border-left: 0;
  background: #ffffcc;
}
.wdp-textbook .tb-heading-icon {
  flex: 0 0 auto;
  display: block;
  width: 34px;
  height: auto;
}
.wdp-textbook .tb-text {
  margin: 6px 0;
}
.wdp-textbook .tb-subheading {
  margin: 14px 0 2px;
  font-size: 16px;
  font-weight: 800;
  line-height: 2.2;
}
.wdp-textbook .tb-key {
  display: inline-block;
  padding: 0 0.5em;
  border: 1px solid #555;
  border-bottom-width: 3px;
  border-radius: 5px;
  background: #fff;
  font-family: inherit;
  font-size: 0.9em;
  line-height: 1.5;
}
.wdp-textbook .tb-em {
  font-weight: 800;
  color: #c00000;
}

/* 文中のアイコン（電源ボタン・ペイントのボタンなど） */
.wdp-textbook .tb-icon {
  width: 1.3em;
  height: 1.3em;
  margin: 0 0.1em;
  vertical-align: -0.28em;
}

/* ---------- 手順の番号（❶❷…） ---------- */
.wdp-textbook .tb-hint .tb-icon {
  mix-blend-mode: multiply;
}
.wdp-textbook .tb-step {
  display: block;
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  line-height: 2.2;
}
.wdp-textbook .tb-note {
  margin: 0 0 4px 2.1em;
  font-size: 14px;
  line-height: 2.1;
  color: #444;
}
.wdp-textbook .tb-url-label {
  margin: 10px 0 0;
  color: #1f497d;
  font-weight: 700;
  line-height: 2.1;
}
.wdp-textbook .tb-url {
  margin: 0 0 8px;
  font-size: 21px;
  line-height: 1.6;
  color: #000;
  word-break: break-all;
}
.wdp-textbook .tb-words {
  margin: 8px 0;
}
.wdp-textbook .tb-words-row {
  display: grid;
  grid-template-columns: 1fr 32px 1fr;
  align-items: center;
  gap: 6px;
  margin: 6px 0;
}
.wdp-textbook .tb-words-from,
.wdp-textbook .tb-words-to {
  font-size: 16px;
  line-height: 2.1;
}
.wdp-textbook .tb-words-arrow {
  display: block;
  width: 0;
  height: 0;
  margin: 0 auto;
  border-top: 13px solid transparent;
  border-bottom: 13px solid transparent;
  border-left: 22px solid #e60012;
}
.wdp-textbook .tb-bullets {
  margin: 2px 0 8px;
  padding: 0;
  list-style: none;
}
.wdp-textbook .tb-bullets li {
  padding-left: 1.1em;
  text-indent: -1.1em;
}
.wdp-textbook .tb-bullets li::before {
  content: "・";
}
.wdp-textbook .tb-big {
  font-size: 1.5em;
}
.wdp-textbook .tb-q {
  margin: 14px 0 2px;
  color: #1f497d;
  font-weight: 700;
  line-height: 2.1;
}
.wdp-textbook .tb-choices {
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
}
.wdp-textbook .tb-choices li {
  padding-left: 1.6em;
  text-indent: -1.6em;
}
.wdp-textbook .tb-choice-key {
  display: inline-block;
  width: 1.4em;
  text-indent: 0;
  font-weight: 700;
}
.wdp-textbook .tb-answer {
  margin: 12px 0;
  padding: 4px 14px;
  border: 2px dashed #1f497d;
  border-radius: 12px;
  background: #fff;
}
.wdp-textbook .tb-answer summary {
  cursor: pointer;
  color: #1f497d;
  font-weight: 700;
}
.wdp-textbook .tb-answer p {
  margin: 2px 0;
}
.wdp-textbook .tb-pause-q {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0;
  text-align: left;
}
.wdp-textbook .tb-pause-pic {
  flex: 0 0 auto;
  display: block;
  width: 64px;
  height: auto;
}
.wdp-textbook .tb-pause-q .tb-pause-do {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}
.wdp-textbook .tb-table--wrap th,
.wdp-textbook .tb-table--wrap td {
  white-space: normal;
  padding: 2px 10px;
}
.wdp-textbook .tb-table--wrap {
  width: 100%;
}
.wdp-textbook .tb-todo li .tb-bullets {
  margin: 0 0 4px 2em;
  font-size: 14px;
  line-height: 2.1;
}
.wdp-textbook .tb-no {
  display: inline-block;
  width: 1.5em;
  height: 1.5em;
  margin-right: 0.35em;
  border-radius: 50%;
  background: #c00000;
  color: #fff;
  font-size: 0.85em;
  font-weight: 700;
  line-height: 1.5em;
  text-align: center;
  vertical-align: 0.05em;
}

/* ---------- 画像 ---------- */
.wdp-textbook .tb-figure {
  margin: 10px 0;
}
.wdp-textbook .tb-img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid #8a8f98;
  background: #fff;
}
.wdp-textbook .tb-figure--plain .tb-img {
  border: 0;
}
.wdp-textbook .tb-figure--small {
  max-width: 62%;
  margin-left: auto;
  margin-right: auto;
}
.wdp-textbook .tb-figure--tiny {
  max-width: 42%;
  margin-left: auto;
  margin-right: auto;
}
.wdp-textbook .tb-cap {
  display: block;
  margin: 2px 0 0;
  font-size: 13px;
  line-height: 2.1;
  color: #444;
}
.wdp-textbook .tb-pair {
  display: grid;
  gap: 10px;
  margin: 10px 0;
}
.wdp-textbook .tb-pair > .tb-figure {
  margin: 0;
}
/* テキスト欄が広いときだけ、画像を2つ横に並べる */
@container textbook (min-width: 560px) {
  .wdp-textbook .tb-pair {
    grid-template-columns: 1fr 1fr;
  }
}

/* キーボードとマウスを横に並べる */
.wdp-textbook .tb-devices {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin: 10px 0;
}
.wdp-textbook .tb-devices > .tb-figure {
  min-width: 0;
  margin: 0;
}
.wdp-textbook .tb-devices > .tb-figure:first-child {
  flex: 4 1 0;
}
.wdp-textbook .tb-devices > .tb-figure:last-child {
  flex: 1 1 0;
}
.wdp-textbook .tb-devices .tb-cap {
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: #1f497d;
}

/* 手順の流れ（画像と画像のあいだに矢印） */
.wdp-textbook .tb-flow {
  display: flex;
  flex-direction: column;
  margin: 10px 0;
}
.wdp-textbook .tb-flow > .tb-figure {
  margin: 0;
}
.wdp-textbook .tb-flow > .tb-figure + .tb-figure::before {
  content: "";
  display: block;
  width: 0;
  height: 0;
  margin: 6px auto 8px;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-top: 19px solid #e60012;
}

/* ---------- ヒントの囲み・先生のひとこと ---------- */
.wdp-textbook .tb-hint {
  margin: 14px 0;
  padding: 6px 16px;
  border: 2px solid #1f497d;
  border-radius: 14px;
  background: #dce6f1;
  color: #222;
}
.wdp-textbook .tb-hint p {
  margin: 4px 0;
}
.wdp-textbook .tb-hint .tb-figure {
  margin: 8px 0;
}
.wdp-textbook .tb-hint .tb-figure--small {
  margin-left: auto;
  margin-right: auto;
}
.wdp-textbook .tb-hint .tb-figure--plain .tb-img {
  mix-blend-mode: multiply;
}
.wdp-textbook .tb-say {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin: 14px 0;
}
.wdp-textbook .tb-say-text {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0 8px 14px 0;
  padding: 4px 14px;
  border: 2px solid #1f497d;
  border-radius: 12px;
  background: #ffffcc;
}
.wdp-textbook .tb-say-text::after {
  content: "";
  position: absolute;
  right: -11px;
  bottom: 14px;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 11px solid #1f497d;
}
.wdp-textbook .tb-say-teacher {
  flex: 0 0 auto;
  display: block;
  width: 62px;
  height: auto;
}

/* ---------- 今日のおさらい ---------- */
.wdp-textbook .tb-todo {
  margin: 6px 0;
  padding: 0;
  list-style: none;
  counter-reset: tbtodo;
}
.wdp-textbook .tb-todo > li {
  counter-increment: tbtodo;
  margin: 2px 0;
}
.wdp-textbook .tb-todo > li::before {
  content: counter(tbtodo);
  display: inline-block;
  width: 1.5em;
  height: 1.5em;
  margin-right: 0.5em;
  border-radius: 50%;
  background: #c00000;
  color: #fff;
  font-size: 0.85em;
  font-weight: 700;
  line-height: 1.5em;
  text-align: center;
  vertical-align: 0.05em;
}

/* ---------- マウスの動かし方（4つのカード） ---------- */
.wdp-textbook .tb-mouse {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 10px 0;
}
@container textbook (min-width: 560px) {
  .wdp-textbook .tb-mouse {
    grid-template-columns: repeat(4, 1fr);
  }
}
.wdp-textbook .tb-mouse-card {
  margin: 0;
  padding: 4px 6px 8px;
  border-radius: 6px;
  background: #ffffcc;
  text-align: center;
}
.wdp-textbook .tb-mouse-name {
  display: block;
  color: #1f497d;
  font-size: 16px;
  font-weight: 800;
  line-height: 2.1;
}
.wdp-textbook .tb-mouse-img {
  display: block;
  width: auto;
  height: 150px;
  max-width: 100%;
  margin: 0 auto;
  object-fit: contain;
}
.wdp-textbook .tb-mouse-how {
  display: block;
  font-size: 14px;
  line-height: 2.1;
}

/* ---------- 「パソコンにもどってそうさしよう」の時間（映像の中で考える・入力する時間） ---------- */
.wdp-textbook .tb-pause {
  padding: 8px 16px;
  border: 3px dashed #c00000;
  border-radius: 16px;
  background: #fff;
  text-align: center;
}
.wdp-textbook .tb-pause-title {
  margin: 0;
  color: #c00000;
  font-size: 17px;
  font-weight: 800;
}
.wdp-textbook .tb-pause-do {
  margin: 4px 0;
  padding: 2px 10px;
  border-radius: 10px;
  background: #ffffcc;
  font-weight: 700;
}
.wdp-textbook .tb-pause-back {
  margin: 4px 0 0;
  font-size: 14px;
}

/* ---------- 表 ---------- */
.wdp-textbook .tb-table {
  border-collapse: collapse;
  margin: 6px auto;
  background: #fff;
  color: #222;
  font-size: 14px;
  line-height: 2;
}
.wdp-textbook .tb-table th,
.wdp-textbook .tb-table td {
  padding: 0 12px;
  border: 1px solid #1f497d;
  text-align: center;
  white-space: nowrap;
}
.wdp-textbook .tb-table th {
  background: #dce6f1;
  font-weight: 700;
}
