/* ============================================================
   theme/ampl-clinical.css  —  医療・学術プレゼンテーマ
   AMPL Modern と共通層を土台に、医療/学術スライドのプリミティブを追加。
   出自: decks/ampl-clinical-catalog の inline <style> を抽出。
   patterns カタログ & 医療 deck から /theme/ampl-clinical.css として参照される。
   ============================================================ */
@import url('ampl-modern.css');

:root { --head-top: 64px; --head-kick: 0px; }

.card { background: var(--color-card-bg); border: var(--border); border-radius: var(--radius); padding: var(--sp-md); display: flex; flex-direction: column; gap: var(--sp-xs); }
.card h3 { font-size: var(--text-lg); }
.card p  { font-size: var(--text-base); }
.step-cards {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
  counter-reset: step-card;
}
.step-card {
  counter-increment: step-card;
  display: flex;
  align-items: flex-start;
  gap: var(--sp-md);
  padding: var(--sp-sm) var(--sp-md);
  background: var(--color-card-bg);
  border: var(--border);
  border-radius: var(--radius);

}
.step-card::before {
  content: counter(step-card, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--color-accent);
  line-height: 1;
  flex-shrink: 0;
  min-width: 2em;
}
.step-card h3 { font-size: var(--text-lg); }
.step-card p  { font-size: var(--text-sm); color: var(--color-muted); }

/* 患者・家族の引用に付く帰属表示。 */
.callout .attribution {
  font-size: var(--text-sm);
  color: var(--color-muted);
  margin-top: var(--sp-sm);
  font-style: normal;
}

/* カタログの汎用部品。構造を保ち、共通トークンで描画する。 */
.flow { display: flex; align-items: center; gap: 0; }
.flow-step { flex: 1; text-align: center; padding: var(--sp-md); background: var(--color-card-bg); border: var(--border); border-radius: var(--radius); }
.flow-step h3 { font-size: var(--text-lg); margin-bottom: var(--sp-xs); }
.flow-step p  { font-size: var(--text-sm); color: var(--color-muted); }
.flow-arrow { flex-shrink: 0; width: 40px; text-align: center; font-size: var(--text-xl); color: var(--color-accent); }
.stat { display: flex; flex-direction: column; align-items: center; gap: var(--sp-xs); }
.stat .number { font-size: var(--text-3xl); font-weight: var(--weight-bold); color: var(--color-accent); font-family: var(--font-mono); line-height: 1; }
.stat .label { font-size: var(--text-sm); color: var(--color-muted); }
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-left: var(--sp-md);
  border-left: 2px solid var(--color-accent);
}
.timeline-item {
  position: relative;
  padding: var(--sp-xs) 0 var(--sp-md) var(--sp-md);
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--sp-md) - 5px);
  top: .6em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
}
.timeline-item h3 { font-size: var(--text-lg); margin-bottom: var(--sp-xs); }
.timeline-item p  { font-size: var(--text-sm); color: var(--color-muted); }
.pyramid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  justify-content: center;
}
.pyramid-level {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--sp-sm) var(--sp-md);
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  color: var(--color-fg);
}
.pyramid-level:nth-child(1) { width: 40%; border-radius: var(--radius) var(--radius) 0 0; border-bottom: 2px solid var(--color-accent); }
.pyramid-level:nth-child(2) { width: 65%; }
.pyramid-level:nth-child(3) { width: 90%; border-radius: 0 0 var(--radius) var(--radius); }
.pyramid-level h3 { font-size: var(--text-base); }
.pyramid-level p  { font-size: var(--text-sm); color: var(--color-muted); }
.before-after {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  align-items: stretch;
}
.before-after .before,
.before-after .after {
  padding: var(--sp-md);
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}
.before-after .before { background: var(--color-panel); border-radius: var(--radius) 0 0 var(--radius); }
.before-after .after  { background: var(--color-card-bg); border-radius: 0 var(--radius) var(--radius) 0; }
.before-after .arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-2xl);
  color: var(--color-accent);
  padding: 0 var(--sp-sm);
}
.flow-vertical {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.flow-v-step {
  width: 80%;
  max-width: 500px;
  padding: var(--sp-md);
  background: var(--color-card-bg);
  border: var(--border);
  border-radius: var(--radius);
  text-align: center;
}
.flow-v-step h3 { font-size: var(--text-lg); margin-bottom: var(--sp-xs); }
.flow-v-step p  { font-size: var(--text-sm); color: var(--color-muted); }
.flow-v-arrow {
  font-size: var(--text-xl);
  color: var(--color-accent);
  padding: var(--sp-xs) 0;
}
.gantt {
  display: flex;
  flex-direction: column;
  gap: var(--sp-xs);
}
.gantt-header {
  display: grid;
  gap: 1px;
  font-size: var(--text-sm);
  color: var(--color-muted);
  text-align: center;
  font-family: var(--font-mono);
  padding-left: 120px;
}
.gantt-row {
  display: flex;
  align-items: center;
  gap: 0;
  height: 32px;
}
.gantt-label {
  width: 120px;
  flex-shrink: 0;
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--color-fg);
  padding-right: var(--sp-sm);
  text-align: right;
}
.gantt-bar-area {
  flex: 1;
  position: relative;
  height: 100%;
  background: var(--color-panel2);
  border-radius: var(--radius);
}
.gantt-bar {
  position: absolute;
  height: 24px;
  top: 4px;
  background: var(--color-muted);
  border-radius: var(--radius);
  opacity: .8;
}
.bullets-horizontal {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--sp-md);
}
.bullet-item {
  display: flex;
  flex-direction: column;
  gap: var(--sp-xs);
  padding: var(--sp-md);
  border: 1px solid var(--color-border); border-radius: var(--radius);
}
.bullet-item h3 { font-size: var(--text-lg); }
.bullet-item p  { font-size: var(--text-sm); color: var(--color-muted); line-height: 1.6; }
.checklist {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
  list-style: none;
}
.checklist li {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-sm);
  font-size: var(--text-lg);
  color: var(--color-fg);
  line-height: 1.6;
}
.checklist li::before {
  content: '☐';
  flex-shrink: 0;
  font-size: var(--text-xl);
  color: var(--color-accent);
  line-height: 1.3;
}
.checklist li.checked::before {
  content: '☑';
}
.checklist li.checked {
  color: var(--color-muted);
}
/* Modern の横タイムライン装飾は縦型では使わない。 */
.timeline { margin-top: 0; padding-top: 0; }
.timeline::before { content: none; }

    .slide h1 { font-family: var(--font-display); }
    .template-label {
      position: absolute;
      top: 12px;
      left: 16px;
      font-size: var(--text-meta);
      font-family: var(--font-mono);
      color: var(--color-accent);
      letter-spacing: .1em;
      text-transform: uppercase;
      opacity: .7;
      z-index: 30;
    }
    .slide-title .template-label,
    .slide-end .template-label { color: var(--color-muted); }

    /* === COI開示 === */
    .coi-box {
      border: 2px solid #e6e6e6;
      border-radius: var(--radius);
      padding: 48px 56px;
      text-align: center;
      max-width: 720px;
      margin: 0 auto;
    }
    .coi-box h3 {
      font-size: var(--text-md);
      font-weight: 700;
      color: #131313;
      margin-bottom: 32px;
    }
    .coi-box p { font-size: var(--text-lead); color: #131313; line-height: 1.9; }
    .coi-box .coi-name {
      font-size: var(--text-lead);
      font-weight: 700;
      color: #131313;
      margin-top: 28px;
      padding-top: 28px;
      border-top: 1px solid #e6e6e6;
    }

    /* === 倫理審査 === */
    .ethics-box {
      background: rgba(0,0,0,.025);
      border: 1px solid rgba(0,0,0,.05);
      border-radius: var(--radius);
      padding: 40px 48px;
      max-width: 720px;
      margin: 0 auto;
    }
    .ethics-box .ethics-row {
      display: flex;
      gap: 20px;
      padding: 14px 0;
      border-bottom: 1px solid rgba(0,0,0,.04);
      font-size: var(--text-lead);
    }
    .ethics-box .ethics-row:last-child { border-bottom: none; }
    .ethics-label {
      font-weight: 700;
      color: #131313;
      min-width: 180px;
      flex-shrink: 0;
    }
    .ethics-value { color: #131313; }

    /* === CONSORT図 === */
    .consort {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0;
      font-size: var(--text-base);
    }
    .consort-phase {
      font-size: var(--text-base);
      font-weight: 700;
      letter-spacing: 2px;
      text-transform: uppercase;
      color: #606060;
      align-self: flex-start;
      margin-bottom: 2px;
      margin-top: 10px;
    }
    .consort-box {
      background: #fff;
      border: 1.5px solid #131313;
      border-radius: var(--radius-sm);
      padding: 8px 18px;
      text-align: center;
      min-width: 200px;
      font-weight: 600;
      color: #131313;
    }
    .consort-box.excluded {
      border-color: #e6e6e6;
      background: rgba(0,0,0,.04);
      color: #606060;
      font-weight: 400;
      min-width: 160px;
    }
    .consort-row {
      display: flex;
      align-items: center;
      gap: 24px;
    }
    .consort-arrow {
      font-size: var(--text-base);
      color: #606060;
      margin: 2px 0;
    }
    .consort-side-arrow {
      font-size: var(--text-base);
      color: #606060;
    }
    .consort-split {
      display: flex;
      gap: 28px;
      align-items: flex-start;
    }

    /* === PRISMA図 === */
    .prisma {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0;
      font-size: var(--text-base);
    }
    .prisma-box {
      background: #fff;
      border: 1.5px solid #131313;
      border-radius: var(--radius-sm);
      padding: 7px 16px;
      text-align: center;
      min-width: 240px;
      color: #131313;
    }
    .prisma-box .num { font-weight: 700; font-size: var(--text-base); color: #131313; }
    .prisma-box.excluded {
      border-color: #e6e6e6;
      background: rgba(0,0,0,.03);
      color: #606060;
      min-width: 140px;
    }
    .prisma-row {
      display: flex;
      align-items: center;
      gap: 20px;
    }
    .prisma-arrow {
      font-size: var(--text-base);
      color: #606060;
      margin: 2px 0;
    }

    /* === Forest Plot === */
    .forest-plot {
      width: 100%;
      font-size: var(--text-sm);   /* 図の中の文字＝読ませる下限 14pt。行数が多い図なので本文サイズにしない */
    }
    .forest-row {
      display: grid;
      grid-template-columns: 200px 1fr 230px;   /* 群名と「HR (95% CI)」が折り返さない幅 */
      align-items: center;
      gap: 12px;
      padding: 5px 0;
      border-bottom: 1px solid rgba(0,0,0,.05);
    }
    .forest-row.header {
      font-weight: 700;
      color: #131313;
      border-bottom: 2px solid #e6e6e6;
      font-size: var(--text-sm);
      text-transform: uppercase;
      letter-spacing: .5px;
    }
    .forest-row.overall {
      font-weight: 700;
      border-top: 2px solid #e6e6e6;
      border-bottom: none;
    }
    .forest-label { color: #131313; }
    .forest-bar-area {
      position: relative;
      height: 24px;
      display: flex;
      align-items: center;
    }
    .forest-line {
      position: absolute;
      left: 50%;
      top: 0;
      bottom: 0;
      width: 1px;
      background: #131313;
    }
    .forest-ci {
      position: absolute;
      height: 2px;
      background: #131313;
    }
    .forest-point {
      position: absolute;
      width: 10px;
      height: 10px;
      border-radius: 50%;
      background: #131313;
      transform: translate(-50%, -50%);
      top: 50%;
    }
    .forest-point.diamond {
      width: 14px;
      height: 14px;
      /* 統合推定値の菱形を保つ。共通角丸では円になってしまう。 */
      border-radius: 0;
      transform: translate(-50%, -50%) rotate(45deg);
    }
    .forest-hr { font-weight: 600; color: #131313; text-align: right; }

    /* === PICO表 === */
    .pico-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 20px;
      max-width: 720px;
      margin: 0 auto;
    }
    .pico-cell {
      background: #fff;
      border: 1px solid #e6e6e6;
      border-radius: var(--radius);
      padding: 24px 28px;
    }
    .pico-cell .pico-letter {
      display: inline-block;
      width: 38px;
      height: 38px;
      border-radius: 50%;
      background: #131313;
      color: #fff;
      font-weight: 700;
      font-size: var(--text-md);
      text-align: center;
      line-height: 38px;
      margin-bottom: 10px;
    }
    .pico-cell h4 {
      font-size: var(--text-base);
      font-weight: 700;
      color: #606060;
      letter-spacing: 1px;
      text-transform: uppercase;
      margin-bottom: 10px;
    }
    .pico-cell p { font-size: var(--text-md); color: #131313; line-height: 1.7; }

    /* === バイアスリスク（Traffic Light） === */
    .rob-table {
      width: 100%;
      border-collapse: separate;
      border-spacing: 0;
      font-size: var(--text-base);
      border-radius: var(--radius);
      overflow: hidden;
      border: 1px solid #e6e6e6;
    }
    .rob-table th {
      background: #e6e6e6;
      color: #131313;
      padding: 10px 14px;
      text-align: left;
      font-weight: 700;
      font-size: var(--text-base);
      letter-spacing: .5px;
    }
    .rob-table td {
      padding: 10px 14px;
      border-bottom: 1px solid #e6e6e6;
      color: #131313;
    }
    .rob-table tr:last-child td { border-bottom: none; }
    .rob-light {
      display: inline-block;
      width: 26px;
      height: 26px;
      border-radius: 50%;
      text-align: center;
      line-height: 26px;
      font-size: var(--text-base);
      font-weight: 700;
      color: #fff;
    }
    .rob-low { background: #606060; }
    .rob-some { background: #8a8a8a; }
    .rob-high { background: #131313; }

    /* === GRADE === */
    .grade-table {
      width: 100%;
      border-collapse: separate;
      border-spacing: 0;
      font-size: var(--text-base);
      border-radius: var(--radius);
      overflow: hidden;
      border: 1px solid #e6e6e6;
    }
    .grade-table th {
      background: #e6e6e6;
      color: #131313;
      padding: 10px 14px;
      text-align: center;
      font-weight: 700;
      font-size: var(--text-base);
    }
    .grade-table th:first-child { text-align: left; }
    .grade-table td {
      padding: 10px 14px;
      border-bottom: 1px solid #e6e6e6;
      color: #131313;
      text-align: center;
    }
    .grade-table td:first-child { text-align: left; font-weight: 600; }
    .grade-table tr:last-child td { border-bottom: none; }
    .grade-badge {
      display: inline-block;
      padding: 2px 12px;
      border-radius: var(--radius);
      font-weight: 700;
      font-size: var(--text-base);
      color: #fff;
    }
    .grade-high { background: #606060; }
    .grade-mod { background: #8a8a8a; }
    .grade-low { background: #131313; }
    .grade-vlow { background: #6b6b6b; }

    /* === 論文書誌カード === */
    .bib-card {
      background: #fff;
      border: 1px solid #e6e6e6;
      border-radius: var(--radius);
      padding: 40px 48px;
      max-width: 740px;
      margin: 0 auto;
    }
    .bib-card .bib-journal {
      font-size: var(--text-base);
      font-weight: 700;
      color: #131313;
      letter-spacing: 1.5px;
      text-transform: uppercase;
      margin-bottom: 16px;
    }
    .bib-card .bib-title {
      font-size: var(--text-lead);
      font-weight: 700;
      color: #131313;
      line-height: 1.5;
      margin-bottom: 16px;
    }
    .bib-card .bib-authors {
      font-size: var(--text-md);
      color: #606060;
      margin-bottom: 20px;
    }
    .bib-card .bib-meta {
      display: flex;
      gap: 28px;
      font-size: var(--text-base);
      color: #131313;
      padding-top: 20px;
      border-top: 1px solid #e6e6e6;
    }
    .bib-meta-item { display: flex; gap: 6px; align-items: center; }
    .bib-meta-label { font-weight: 700; color: #606060; }

    /* === 検査値テーブル === */
    .lab-table {
      width: 100%;
      border-collapse: separate;
      border-spacing: 0;
      font-size: var(--text-base);
      border-radius: var(--radius);
      overflow: hidden;
      border: 1px solid #e6e6e6;
    }
    .lab-table th {
      background: #e6e6e6;
      color: #131313;
      padding: 8px 14px;
      text-align: left;
      font-weight: 700;
      font-size: var(--text-base);
    }
    .lab-table td {
      padding: 8px 14px;
      border-bottom: 1px solid #e6e6e6;
      color: #131313;
    }
    .lab-table tr:last-child td { border-bottom: none; }
    .lab-high { color: #131313; font-weight: 700; }
    .lab-low { color: #4a4a4a; font-weight: 700; }
    .lab-ref { color: #606060; font-size: var(--text-base); }

    /* === 鑑別診断テーブル === */
    .ddx-table {
      width: 100%;
      border-collapse: separate;
      border-spacing: 0;
      font-size: var(--text-base);
      border-radius: var(--radius);
      overflow: hidden;
      border: 1px solid #e6e6e6;
    }
    .ddx-table th {
      background: #e6e6e6;
      color: #131313;
      padding: 10px 16px;
      text-align: left;
      font-weight: 700;
      font-size: var(--text-base);
    }
    .ddx-table td {
      padding: 10px 16px;
      border-bottom: 1px solid #e6e6e6;
      color: #131313;
      vertical-align: top;
    }
    .ddx-table tr:last-child td { border-bottom: none; }
    .ddx-for { color: #606060; font-weight: 600; }
    .ddx-against { color: #131313; font-weight: 600; }

    /* === バイタルサイン === */
    .vitals-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 16px;
      max-width: 600px;
      margin: 0 auto;
    }
    .vital-card {
      background: #fff;
      border: 1px solid #e6e6e6;
      border-radius: var(--radius);
      padding: 16px 20px;
      text-align: center;
    }
    .vital-card .vital-label {
      font-size: var(--text-base);
      font-weight: 700;
      color: #606060;
      letter-spacing: 1px;
      text-transform: uppercase;
      margin-bottom: 6px;
    }
    .vital-card .vital-value {
      font-size: var(--text-3xl);
      font-weight: 700;
      font-family: var(--font-mono);
    }
    .vital-card .vital-unit {
      font-size: var(--text-base);
      color: #606060;
    }
    .vital-normal { color: #131313; }
    .vital-abnormal { color: #131313; }

    /* === 臨床経過図 === */
    .clinical-course {
      width: 100%;
      position: relative;
    }
    .cc-timeline {
      display: flex;
      border-bottom: 2px solid #131313;
      padding-bottom: 4px;
      margin-bottom: 0;
    }
    .cc-day {
      flex: 1;
      text-align: center;
      font-size: var(--text-base);
      font-weight: 700;
      color: #131313;
    }
    .cc-section {
      padding: 8px 0;
      border-bottom: 1px solid #e6e6e6;
    }
    .cc-section-label {
      font-size: var(--text-base);
      font-weight: 700;
      color: #606060;
      letter-spacing: 1px;
      text-transform: uppercase;
      margin-bottom: 4px;
    }
    .cc-drug-row {
      display: flex;
      align-items: center;
      gap: 4px;
      margin-bottom: 3px;
    }
    .cc-drug-name {
      font-size: var(--text-base);
      color: #131313;
      min-width: 90px;
      text-align: right;
      padding-right: 8px;
    }
    .cc-drug-bar-area {
      display: flex;
      flex: 1;
    }
    .cc-drug-bar {
      height: 16px;
      border-radius: var(--radius-sm);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: var(--text-sm);
      color: #fff;
      font-weight: 600;
    }
    .cc-event {
      display: flex;
      font-size: var(--text-base);
    }
    .cc-event-marker {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: #131313;
      margin-top: 4px;
      margin-right: 4px;
      flex-shrink: 0;
    }

    /* === Discussion Points === */
    .discussion-points {
      display: flex;
      flex-direction: column;
      gap: 12px;
      max-width: 580px;
    }
    .discussion-point {
      background: #fff;
      border: 1px solid #e6e6e6;
      border: 1px solid var(--color-border);
      border-radius: 0 var(--radius) var(--radius) 0;
      padding: 14px 20px;
    }
    .discussion-point .dp-num {
      font-size: var(--text-base);
      font-weight: 700;
      color: #131313;
      letter-spacing: 1px;
      margin-bottom: 4px;
    }
    .discussion-point p {
      font-size: var(--text-base);
      font-weight: 600;
      color: #131313;
      line-height: 1.5;
    }

    /* === Strengths & Limitations === */
    .sl-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 20px;
    }
    .sl-col { padding: 0; }
    .sl-col h3 {
      font-size: var(--text-base);
      font-weight: 700;
      letter-spacing: 1px;
      text-transform: uppercase;
      margin-bottom: 12px;
      padding-bottom: 8px;
    }
    .sl-col.strengths h3 { color: #606060; border-bottom: 2px solid #606060; }
    .sl-col.limitations h3 { color: #131313; border-bottom: 2px solid #131313; }
    .sl-col li {
      font-size: var(--text-md);
      color: #131313;
      line-height: 1.6;
      margin-bottom: 8px;
      padding-left: 16px;
      position: relative;
    }
    .sl-col.strengths li::before { content: "+"; position: absolute; left: 0; color: #606060; font-weight: 700; }
    .sl-col.limitations li::before { content: "−"; position: absolute; left: 0; color: #131313; font-weight: 700; }

    /* === 患者背景テーブル (Table 1) === */
    .table1 {
      width: 100%;
      border-collapse: separate;
      border-spacing: 0;
      font-size: var(--text-base);
      border-radius: var(--radius);
      overflow: hidden;
      border: 1px solid #e6e6e6;
    }
    .table1 th {
      background: #e6e6e6;
      color: #131313;
      padding: 10px 16px;
      text-align: center;
      font-weight: 700;
      font-size: var(--text-base);
    }
    .table1 th:first-child { text-align: left; }
    .table1 td {
      padding: 8px 16px;
      border-bottom: 1px solid #e6e6e6;
      color: #131313;
      text-align: center;
    }
    .table1 td:first-child { text-align: left; font-weight: 600; color: #131313; }
    .table1 tr:last-child td { border-bottom: none; }
    .table1 .p-sig { color: #131313; font-weight: 700; }

    /* === Highlight Box === */
    .highlight-box {
      background: rgba(0,0,0,.03);
      border: 1px solid var(--color-border);
      border-radius: 0 var(--radius) var(--radius) 0;
      padding: 16px 24px;
    }

/* ============================================================
   孤児プリミティブ補完（元deckに定義が無かった4型）
   ============================================================ */

/* === 意思決定ツリー（分岐ボックス） decision-tree === */
.decision-tree { display:flex; flex-direction:column; align-items:center; gap:0; font-size: var(--text-base); }
.dt-node {
  background:#fff; border:1.5px solid #131313; border-radius:var(--radius-sm);
  padding:12px 24px; text-align:center; font-weight:600; color:#131313; min-width:200px;
}
.dt-node.dt-root { background:#131313; color:#ffffff; border-color:#131313; }
.dt-node.dt-danger { border-color:#131313; background:rgba(0,0,0,.06); color:#2e2e2e; }
.dt-node.dt-safe   { border-color:#606060; background:rgba(0,0,0,.06); color:#424242; }
.dt-node .sub { font-size: var(--text-base); font-weight:400; color:#606060; }
.dt-node.dt-danger .sub { color:#131313; }
.dt-arrow { font-size: var(--text-md); color:#606060; margin:8px 0; }
.dt-branch { display:flex; gap:32px; align-items:flex-start; justify-content:center; }

/* === 統計テーブル（群間比較・有意差強調） stat-table === */
.stat-table {
  width:100%; border-collapse:separate; border-spacing:0;
  font-size: var(--text-base); border-radius:var(--radius); overflow:hidden; border:1px solid #e6e6e6;
}
.stat-table th {
  background:#e6e6e6; color:#131313; padding:10px 16px;
  text-align:center; font-weight:700; font-size: var(--text-base);
}
.stat-table th:first-child { text-align:left; }
.stat-table td {
  padding:9px 16px; border-bottom:1px solid #e6e6e6; color:#131313; text-align:center;
}
.stat-table td:first-child { text-align:left; font-weight:600; }
.stat-table tr:last-child td { border-bottom:none; }
.stat-table tr.highlight td { background:rgba(0,0,0,.035); }
.stat-table .p-sig { color:#131313; font-weight:700; }

/* === 構造化抄録ブロック struct-abstract === */
.struct-abstract { display:flex; flex-direction:column; gap:16px; }
.struct-abstract .sa-block {
  padding-left:16px; border: 1px solid var(--color-border); border-radius: var(--radius);
}
.struct-abstract .sa-block h3 { font-size: var(--text-base); letter-spacing:.08em; margin-bottom:4px; }
.struct-abstract .sa-block p  { font-size: var(--text-md); color:#131313; line-height:1.7; }

/* === ラベル＋値の情報行リスト info-rows === */
.info-rows {
  width:100%; border:1px solid #e6e6e6; border-radius:var(--radius); overflow:hidden;
}
.info-rows .info-row {
  display:flex; align-items:baseline; gap:20px;
  padding:12px 20px; border-bottom:1px solid #e6e6e6; font-size: var(--text-md);
}
.info-rows .info-row:last-child { border-bottom:none; }
.info-rows .info-label {
  font-weight:700; color:#606060; min-width:200px; flex-shrink:0;
}
.info-rows .info-value { color:#131313; }

/* === AMPL Modern 無彩色化（2026-06-15）======================
   Clinical の地色を Modern（白×黒×グレー）に統一。
   医療シグナル色（赤#131313/緑#606060/琥珀#8a8a8a 等）は
   データ符号として意味を持つため温存する。 */
:root{
  --color-bg:#ffffff; --color-fg:#131313; --color-muted:#606060;
  --color-accent:#131313; --color-border:rgba(0,0,0,.12);
}
.card, .flow-step { background:rgba(0,0,0,.04); border-color:rgba(0,0,0,.12); }

.slide-title{ border-bottom:none; }
.slide-section{ background:#ffffff; }
.slide-section h2{ color:#131313; }

/* ============================================================
   岡本レビュー反映（2026-09-14）
   /review/ の24枚を見た指摘に対応する。
   ① 左に色付きの縦線を付けるカードを全廃する（本人「一番嫌い。よくある
      初心者のHTMLデザイン」2026-07-11）。土台の anthropic.css にも
      .slide-landing / .bullet-item に border-left があり、医療デッキの
      Take Home やセクション区切りに出ていた。ここで打ち消す。
      既定の囲み＝細いグレーの全周1px枠＋角丸12px・背景は塗らない。
   ② 本文の文字を会場基準へ（本人「大きな会場で見るには厳しい」）。
   ③ 見出しと本文の間隔を空ける（本人「確定診断と下の箇条書きの間が狭い」）。
   ============================================================ */

/* ① 左縦バーの全廃 ─────────────────────────────────────────── */
.highlight-box,
.discussion-point,
.struct-abstract .sa-block,
.callout {
  border: 1px solid #e2e8eb;
  border-left: 1px solid #e2e8eb;
  border-radius: var(--radius);
  background: transparent;
  padding: 20px 26px;
}
.slide-landing,
.bullet-item,
.ranking-item:first-child { border-left: none; }

/* ② 文字の下限（読ませる文字は会場で読める大きさまで）───────────── */

.slide .body > p,
.slide .body > ul.list > li,
.slide .body > ol.list > li,
.slide .cols-2 ul.list > li,
.slide .cols-3 ul.list > li { font-size: 1.45rem; line-height: 1.95; }
.slide .body table th,
.slide .body table td { font-size: 1.4rem; line-height: 1.7; padding: 14px 18px; }

/* ③ 見出しと中身の間隔（列の小見出し h3 が本文に食い込んでいた）───── */
.slide .cols-2 > div > h3,
.slide .cols-3 > div > h3 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e8eb;
}
.slide .cols-2 > div > h3 + ul,
.slide .cols-3 > div > h3 + ul { margin-top: 0; }

/* ④ 縦フローの段が中央揃えから左揃えに変わって見えるのを止める ────── */
.flow-vertical { align-items: center; }
.flow-v-step { text-align: center; }
.flow-v-step h3 { font-size: 1.35rem; }
.flow-v-step p { font-size: 1.15rem; }

/* 分岐の段だけ横に広がって、上下の段と幅が揃わなかったのを直す */
.flow-v-branch { display: flex; gap: 14px; width: 100%; max-width: 720px; }
.flow-v-branch > .flow-v-step { flex: 1; }
.flow-vertical > .flow-v-step { width: 100%; max-width: 560px; }

/* ── 版面を使い切る（2026-09-14 岡本レビュー第2回）───────────────
   「PICOが4つしかないなら、それ自体をもう少し大きくしてよい。
     空白に何かを入れる余地はない」
   要素数が少ないスライドで下半分が空くのをやめる。中身を大きくして
   枠を埋める。既定で版面の85%前後を使う想定。 */
.slide .body > ul.list > li,
.slide .body > ol.list > li { font-size: 1.75rem; line-height: 2.1; margin-bottom: 10px; }
.slide .body > p { font-size: 1.6rem; }

.pico-grid { gap: 20px; }
.pico-cell { padding: 28px 30px; }
.pico-cell .pico-letter { font-size: var(--text-lead); }
.pico-cell h3 { font-size: 1.5rem; }
.pico-cell p { font-size: 1.35rem; line-height: 1.8; }

.flow-v-step h3 { font-size: 1.5rem; }
.flow-v-step p { font-size: 1.25rem; }
.flow-v-step { padding: 18px 22px; }
.flow-v-arrow { font-size: 1.8rem; }

.vital-card .vital-value { font-size: 2.6rem; }
.vital-card .vital-label, .vital-card .vital-unit { font-size: 1.2rem; }
.checklist li { font-size: 1.45rem; line-height: 1.9; }

/* 版面の使い切り・第2調整（実測に基づく）─────────────────────────
   PICO は4セルしかないので枠いっぱいまで伸ばす。表は行数が少ないと
   どうしても余るので、行の高さで埋める。縦フローは102%出ていたので戻す。 */
.pico-grid { align-content: stretch; }
.pico-cell { display: flex; flex-direction: column; justify-content: center; }
.pico-cell p { font-size: 1.45rem; line-height: 1.8; }
.pico-cell .pico-letter { font-size: var(--text-md); }

.slide .body table th,
.slide .body table td { padding: 20px 20px; }

.flow-vertical { gap: 6px; }
.flow-v-step { padding: 11px 18px; }
.flow-v-step h3 { font-size: 1.3rem; }
.flow-v-step p { font-size: 1.08rem; }
.flow-v-arrow { font-size: 1.5rem; line-height: 1; }

/* ── 横幅の使い切り（2026-09-14 岡本レビュー第2回）─────────────────
   部品が 560〜740px に縛られていて、1296px の版面の半分しか使えて
   いなかった。これが「空白が多い」の正体。
   箱・グリッドは広げる。ただし文章の行は長すぎると読めないので
   文字基準v3の行長26〜30emで止める。 */
/* 親が align-items:center なので、width:100% を付けないと内容幅に縮む */
.pico-grid      { width: 100%; max-width: 1100px; }
.coi-box,
.ethics-box     { width: 100%; max-width: 1000px; }
.vitals-grid    { width: 100%; max-width: 1080px; }
.discussion-points { width: 100%; max-width: 1020px; }
.bib-card       { width: 100%; max-width: 1000px; }
.flow-v-branch  { width: 100%; max-width: 860px; }
.flow-vertical > .flow-v-step { width: 100%; max-width: 680px; }

/* 文章の行は伸ばしすぎない（26〜30em） */
.slide .body > p { max-width: 26em; }
.slide .body > ul.list,
.slide .body > ol.list { width: 100%; max-width: 900px; }

/* ゲートの指摘つぶし（2026-09-14）: 部品の中に残っていた小さい文字 */
.slide .body .cols-2 p,
.slide .body .cols-3 p,
.slide .body .card p,
.slide .body .bullet-item p,
.slide .body .callout p { font-size: 1.5rem; line-height: 1.85; }
.slide .body .muted { font-size: 1.15rem; }
.slide .body .cols-2 ul.list > li,
.slide .body .cols-3 ul.list > li,
.slide .body .card ul.list > li { font-size: 1.5rem; line-height: 1.95; }
.pico-cell p, .vital-label, .vital-unit, .consort-box, .step-card h3, .step-card p,
.bullet-item h3, .flow-v-step h3, .flow-v-step p { font-size: 1.25rem; }
.flow-v-step h3 { font-size: 1.35rem; }
.step-card h3 { font-size: 1.45rem; }

/* ── 色を無彩色へ（2026-09-14 岡本レビュー第3回）─────────────────
   「診断アルゴリズムやカードの微妙なブラウンは洗練されていない。
     主張しすぎない色に」
   土台の anthropic.css がアイボリー×テラコッタなので、ベージュの
   カード(#e3dacc)とテラコッタのアクセント(#d97757)が出ていた。
   確定している基準（無彩色 NAH ＋ ティールを点で）へ寄せる。 */
:root {
  --color-bg:       #ffffff;
  --color-card-bg:  #f5f6f7;   /* ごく薄いクールグレー。塗りつぶさない */
  --color-accent:   #0B7DA3;   /* 差し色は青1色だけ。点で使う */
  --color-border:   rgba(0,0,0,.12);
}
body { background: #eceef0; }   /* スライドの外側も無彩色に */

.flow-v-step,
.card,
.pico-cell,
.vital-card,
.bib-card,
.discussion-point,
.step-card {
  background: #f5f6f7;
  border: 1px solid #e2e8eb;
}
.flow-v-step[style*="border-color"] { border-color: #131313 !important; }
.consort-box, .prisma-box { background: #f5f6f7; }

/* 強みと限界（第3回「もう少し大きくしても良い」）。版面の59%しか
   使っていなかったので、文字と行間で埋める。 */
.sl-col h3 { font-size: 1.75rem; margin-bottom: 20px; padding-bottom: 12px; }
.sl-col li { font-size: 1.85rem; line-height: 1.95; margin-bottom: 16px; padding-left: 22px; }
.sl-grid { gap: 40px; }

/* 強み/限界は独自の +/− マーカーを持つ。同じ ::before に .list の
   ティール6px角も乗って二重に見えていたので、背景の点だけ消す。 */
.sl-col ul.list { list-style: none; padding-left: 0; }
.sl-col ul.list > li { list-style: none; }
.sl-col ul.list > li::before {
  background: none;
  width: auto;
  height: auto;
  position: static;
  margin-right: .4em;
}

/* ── 表の揃え（2026-09-14 第4回）──────────────────────────────
   「値・変数・群A・群B・効果量・p値の配置がバラバラ。中央揃えに」
   見出しと数値を中央で揃える。行の先頭ラベルも中央にして列を通す。 */
.slide .body table th,
.slide .body table td { text-align: center; vertical-align: middle; }

/* ── カルテ式の臨床所見（第4回「装飾的すぎる。カルテのような簡潔な記述に」）── */
/* カルテ表はデータ表ではないので中央揃えの対象外。左に揃える。 */
.slide .body table.chart-note { width: 100%; border-collapse: collapse; }
.slide .body table.chart-note th,
.slide .body table.chart-note td {
  text-align: left;
  vertical-align: top;
  padding: 9px 0;
  border-bottom: 1px solid #e2e8eb;
  border-top: none;
  font-size: 1.35rem;
  line-height: 1.7;
}
.slide .body table.chart-note th {
  width: 7em;
  font-weight: 700;
  color: #5f5f60;
  white-space: nowrap;
  padding-right: 20px;
  border-bottom-color: #e2e8eb;
}
.chart-note tr:last-child th,
.chart-note tr:last-child td { border-bottom: none; }

/* ── 横軸の経過図 ───────────────────────────────────────────── */
.course-axis { width: 100%; padding: 18px 3.5em 6px; }
.course-axis .ca-row { position: relative; height: 46px; }
.course-axis .ca-tick {
  position: absolute; transform: translateX(-50%); max-width: 8em; text-align: center;
  font-size: 1.2rem; font-weight: 700; white-space: nowrap;
}
.course-axis .ca-tick::after {
  content: ""; display: block; width: 1px; height: 14px;
  background: #131313; margin: 6px auto 0;
}
.course-axis .ca-line { height: 2px; background: #131313; margin: 0 0 14px; }
.course-axis .ca-bars { height: auto; min-height: 86px; }
.course-axis .ca-bar {
  position: absolute; height: 34px; background: #f5f6f7;
  border: 1px solid #cfd6da; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem; font-weight: 700;
}
.course-axis .ca-bar-sub { top: 44px; background: #ffffff; }
.course-axis .ca-scale {
  display: flex; justify-content: space-between;
  font-size: 1.1rem; color: #5f5f60; border-top: 1px solid #e2e8eb; padding-top: 10px;
}

/* ── 2026-09-19 追加：部品にあるのにCSSが無く、素のまま出ていたもの ──
   生成スクリプトに「テーマにCSSが無い部品」を弾く検査を入れて見つけた。
   参考文献はブラウザ既定の黒丸箇条書きのまま出ていた（master-lecture 18枚目ほか）。 */

/* 参考文献（ぶら下げインデント・本文より小さく） */
.references {
  list-style: none; padding: 0; margin: 0;
  counter-reset: ref;
}
.references li {
  counter-increment: ref;
  position: relative; padding-left: 2.4em; margin-bottom: 10px;
  font-size: 1.17rem; line-height: 1.75; color: #3d4448;
}
.references li::before {
  content: counter(ref) "."; position: absolute; left: 0; top: 0;
  font-family: var(--font-mono); font-weight: 700; color: #5f5f60;
}
.references em { font-style: italic; }

/* CONSORT の分岐列（.consort-split の中の1本） */
.consort .consort-col {
  display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1;
}

/* 経過の横軸：出来事の行（目盛りを絶対配置で置くための器） */
.course-axis .ca-events { position: relative; height: 2.2em; }

/* 画像に印を付ける枠 */
.img-anno {
  display: flex; align-items: center; justify-content: center;
  border: 1px solid #e2e8eb; border-radius: var(--radius-sm); padding: 12px; color: #9a9a9c;
}
.img-anno .anno-circle { stroke: #0B7DA3; }

/* 臨床経過：グラフ枠・出来事行・詰め物・淡いバー */
.clinical-course .cc-chart { position: relative; height: 150px; }
.clinical-course .cc-events { display: flex; gap: 8px; flex-wrap: wrap; }
.clinical-course .cc-spacer { flex: 0 0 7.5em; }
.clinical-course .muted-bar { background: #e2e8eb; color: #3d4448; }

/* クイズ：設問文と正解の選択肢 */
.quiz-q {
  font-size: 1.4rem; font-weight: 700; line-height: 1.6; margin-bottom: 16px;
}
.card.correct { border-color: #0B7DA3; box-shadow: inset 0 0 0 1px #0B7DA3; }

/* グラフの器（Chart.js を入れる箱。高さが無いと canvas が潰れる） */
.chart-wrap { position: relative; height: 320px; }

/* フォレストプロットの見出し行（軸の説明と HR 列） */
.forest-plot .forest-axis {
  text-align: center; font-size: 1.1rem; color: #5f5f60; letter-spacing: .02em;
}
.forest-plot .forest-hr-head {
  text-align: right; font-family: var(--font-mono);
  font-size: 1.1rem; font-weight: 700; color: #5f5f60;
}

/* PRISMA：箱と箱のあいだの余白と、最終段の箱 */
.prisma .prisma-gap { flex: 0 0 28px; }
.prisma .prisma-box.final { border-color: #0B7DA3; font-weight: 700; }

/* 密度版でも見出しは共通基準線に固定する。 */
.slide-content .body > h2 { flex-shrink: 0; }

/* AMPL House 配色: 強調は青、注意は琥珀。面は無彩色。 */
:root { --clin-warn: #B45309; }

/* ── Clinical の表紙と箇条書き（2026-09-21 移行時に旧版の組みを維持） ──
   Modern を土台にしたことで表紙が中央寄せ・箇条書きが横棒に変わったため、
   学会口演で使ってきた「左下に積む表紙」と「AMPL Blue の点」の箇条書きに戻す。 */
.slide-title {
  align-items: flex-start;
  justify-content: flex-end;
  text-align: left;
  gap: var(--sp-md);
  padding-bottom: calc(var(--sp-xl) + 8px);
}
.slide-title .label {
  font-family: var(--font-mono);
  font-size: var(--text-meta);
  letter-spacing: .15em;
  color: var(--color-blue);
  text-transform: uppercase;
}
.slide-title h1 { max-width: 860px; font-size: var(--text-4xl); line-height: 1.12; }   /* v3: 表紙は h1 3.4rem ＞ sub 1.4rem */
.slide-title .sub { max-width: 760px; line-height: 1.6; font-size: var(--text-base); }
.list li::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-blue);
  margin-top: .55em;
}

/* ── 行の多い表は行間だけ詰める（2026-09-25）──────────────────────
   上の「表は大きく・余白たっぷり」（2026-09-14 レビュー）は行数の少ない本番見本を基準にしている。
   6行以上の表（Table 1・検査値・サブグループ・RoB など）にそのまま当てると版面から溢れるので、
   文字の大きさ（読ませる下限 20px 以上）は保ったまま、行の上下の余白と行送りだけを詰める。 */
.slide .body table:has(tr:nth-child(6)) th,
.slide .body table:has(tr:nth-child(6)) td { padding: 7px 14px; line-height: 1.35; }
.slide .body table:has(tr:nth-child(9)) th,
.slide .body table:has(tr:nth-child(9)) td,
.slide .body .lab-table th,
.slide .body .lab-table td { padding: 4px 12px; font-size: 1.25rem; line-height: 1.35; }   /* 検査値の表は左右に並ぶので、行数に関係なく同じ詰め方にそろえる */
