/* No.04専用CSS。スコープは .diary-04。
   diary-01-final.css の部品（実験メモ・結論・場面区切り・キャプション・用語注記・引用）の
   様式を No.04 用に複製し、図解用の最小追加だけを足したもの。 */
.diary-04 {
  margin-top: 32px;
}

.diary-04 > .talk:first-child,
.diary-04 .ln p {
  margin-top: 0;
}

.diary-04 figure a {
  display: block;
  border-radius: 6px;
}

.diary-04 figure a:focus-visible {
  outline: 3px solid var(--acText);
  outline-offset: 3px;
}

.diary-04 blockquote {
  margin-top: 16px;
  padding: 12px 16px;
  border-left: 4px solid var(--accent);
  background: var(--soft);
}

.diary-04 blockquote p {
  margin: 0;
  /* No.04追加：引用内の数字まわり（「400字前後」等）が文節単位の
     折り返し（word-break: auto-phrase）で割れず390pxで7pxはみ出したため、
     引用段落に限り通常の折り返しに戻す */
  word-break: normal;
  overflow-wrap: anywhere;
}

.diary-04 blockquote.bq-en p {
  /* No.04追加：英語引用（Codex抜粋）は390pxで2pxはみ出したため、
     この引用に限り文字単位の折り返しを許可する */
  word-break: break-all;
}

@media (max-width: 599px) {
  .diary-04 h2 {
    margin-top: 44px;
  }
}

/* 実験メモ（折りたたみ） */
.diary-04 details.memo {
  margin-top: 30px;
  border: 2px dashed var(--line);
  border-radius: 12px;
  padding: 14px 18px;
  background: #fff;
}
.diary-04 details.memo summary {
  cursor: pointer;
  font-weight: 900;
}

/* 結論セクション */
.diary-04 .conclusion {
  margin-top: 34px;
  border: 3px solid #D97706;
  border-radius: 14px;
  padding: 20px 22px;
  background: #FEF6E7;
}
.diary-04 .conclusion h2 {
  margin-top: 0;
  color: #B45309;
  border-left-color: #D97706;
}
.diary-04 .conclusion-lead {
  font-size: 19px;
  line-height: 1.8;
}
.diary-04 .conclusion .note {
  font-size: 13px;
  color: var(--muted);
}

/* 場面転換の区切り */
.diary-04 .scene {
  margin-top: 36px;
  text-align: center;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .08em;
}

/* 画像・図解直下の短いキャプション */
.diary-04 .cap {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
  text-align: center;
}

/* 用語の短い補足 */
.diary-04 .term-note {
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
}

.diary-04 .edge-diagram svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}
.diary-04 .edge-diagram figcaption {
  margin-top: 8px;
  padding: 2px 4px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  text-align: center;
}


/* 判定ルール（持ち帰り成果物） */
.diary-04 .rules-card {
  margin-top: 22px;
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  background: var(--soft);
}
.diary-04 .rules-card h3 {
  margin: 0 0 10px;
  font-size: 16px;
}
.diary-04 .rules-card ul {
  margin: 0;
  padding-left: 20px;
}
.diary-04 .rules-card li {
  margin-top: 8px;
  line-height: 1.8;
}

/* 結果表（B6：.result で包んだ表の列幅。No.01 diary-01-final.css の列幅指定にならい、
   320pxで1列目が潰れないようラベル列を広く取る） */
.diary-04 .result th:first-child {
  width: 31%;
}
.diary-04 .result th {
  font-size: 12px;
}
.diary-04 .result th:nth-child(2),
.diary-04 .result th:nth-child(3),
.diary-04 .result th:nth-child(4) {
  width: 23%;
}

/* 実験メモの箇条（R5：黒丸が点線枠に重ならないよう左余白を足す） */
.diary-04 details.memo ul {
  padding-left: 1.2em;
}

/* 日本語訳カード（再制作で追加：訳を主役にし、原文は下に小さく添える） */
.diary-04 .card-ja {
  margin-top: 16px;
  padding: 14px 18px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.diary-04 .card-ja .card-title {
  margin: 0 0 10px;
  font-weight: 900;
}
.diary-04 .card-ja p {
  margin-top: 10px;
}
.diary-04 .card-ja .card-title + p {
  margin-top: 0;
}

/* 原文（証拠として保持する小字） */
.diary-04 .orig {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  word-break: normal;
  overflow-wrap: anywhere;
}

/* 場面絵（v3で追加：サムネイル候補Bを記事内でも使う） */
.diary-04 figure.scene-img {
  margin: 22px 0 0;
}
.diary-04 figure.scene-img img {
  border-radius: 6px;
}

/* 共通ポイントカード（v3で追加：card-ja と同じ枠で、背景だけ変えて訳カードと区別する） */
.diary-04 .points-card {
  background: var(--soft);
}

/* 「重大」件数の簡易バー */
.diary-04 .bars {
  margin-top: 16px;
}
.diary-04 .bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.diary-04 .bar-label {
  flex: 0 0 10em;
  font-size: 13px;
  line-height: 1.5;
}
.diary-04 .bar-track {
  flex: 1 1 auto;
  min-width: 40px;
  height: 16px;
  border-radius: 4px;
  background: var(--soft);
}
.diary-04 .bar-fill {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: var(--accent);
}
.diary-04 .bar-num {
  flex: 0 0 1.6em;
  font-weight: 900;
  text-align: right;
}
