/* ===== CPGSR User版 追加スタイル ===== */

/* 参考文献ポップオーバー */
.ref-cite {
  display: inline-block;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  padding: 0 2px;
  border-radius: 3px;
  transition: background 0.15s;
  font-size: 0.9em;
}
.ref-cite:hover { background: #e67e2220; }
.ref-popover {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  padding: 12px 16px;
  max-width: 420px;
  font-size: 0.9rem;
  z-index: 9999;
  line-height: 1.6;
}
.ref-popover-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}
.ref-badge {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 2px 10px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.8rem;
}
.ref-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--text-light);
}
.ref-title { color: var(--primary-dark); font-weight: 600; margin: 4px 0; }
.ref-journal { color: var(--text-light); font-size: 0.85rem; }
.ref-note {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  font-size: 0.85rem;
  color: var(--text);
  background: #fff8f0;
  padding: 8px;
  border-radius: 6px;
}

/* 用語集ツールチップ */
.gloss-tip {
  background: white;
  border: 1px solid var(--accent);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  padding: 10px 14px;
  max-width: 360px;
  font-size: 0.9rem;
  z-index: 9999;
  line-height: 1.6;
}
.gloss-tip-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.gloss-full { color: var(--text-light); font-size: 0.8rem; font-style: italic; }
.gloss-close {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--text-light);
  margin-left: auto;
}
.gloss-related {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed var(--border);
  font-size: 0.8rem;
  color: var(--text-light);
}
.gloss {
  border-bottom: 1px dotted var(--accent);
  cursor: help;
}

/* MID閾値早見表 */
.mid-intro { margin-bottom: 12px; padding: 12px; background: #fff8f0; border-left: 4px solid var(--accent); }
.mid-legend { margin-bottom: 16px; font-size: 0.9rem; }
.mid-chip {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.85rem;
  margin: 2px 4px 2px 0;
  font-weight: 600;
}
.mid-desc { color: var(--text-light); font-size: 0.85rem; margin-right: 10px; }
.mid-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 0.9rem;
}
.mid-table th, .mid-table td {
  padding: 10px 12px;
  border: 1px solid var(--border);
  text-align: left;
}
.mid-table thead th {
  background: var(--primary);
  color: white;
  font-weight: 700;
}
.mid-row { cursor: pointer; transition: background 0.15s; }
.mid-row:hover { background: #fff8f0; }
.mid-outcome { min-width: 140px; }
.mid-importance { color: var(--text-light); font-size: 0.85rem; min-width: 120px; }
.mid-note-row td {
  background: #fff8f0;
  font-size: 0.85rem;
  color: var(--text);
  font-style: italic;
}
.mid-key-message {
  margin-top: 20px;
  padding: 14px 18px;
  background: #ebf4fa;
  border-left: 4px solid var(--primary);
  border-radius: 6px;
}

/* 信頼できるCPG 6質問チェックリスト */
.tw-intro {
  padding: 14px 18px;
  background: #fff8f0;
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  margin-bottom: 20px;
}
.tw-questions { display: flex; flex-direction: column; gap: 16px; }
.tw-q {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  transition: box-shadow 0.2s;
}
.tw-q:hover { box-shadow: var(--shadow); }
.tw-q-title { font-size: 1.05rem; color: var(--primary-dark); margin-bottom: 8px; }
.tw-q-detail { color: var(--text); font-size: 0.92rem; margin-bottom: 10px; }
.tw-q-examples { margin-bottom: 10px; }
.tw-q-examples summary {
  cursor: pointer;
  color: var(--primary);
  font-size: 0.88rem;
  padding: 4px 0;
}
.tw-example { margin: 6px 0; padding: 8px 12px; border-radius: 6px; font-size: 0.9rem; }
.tw-example.good { background: #eafbe7; border-left: 3px solid #27ae60; }
.tw-example.bad { background: #fbeae7; border-left: 3px solid #c0392b; }
.tw-q-answer { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border); }
.tw-q-answer label { cursor: pointer; font-size: 0.92rem; }
.tw-q-answer input { margin-right: 4px; }
.tw-result-area { margin-top: 20px; }
.tw-judge-btn, .am-judge-btn {
  background: var(--accent);
  color: white;
  border: none;
  padding: 12px 32px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.15s;
}
.tw-judge-btn:hover, .am-judge-btn:hover { background: #d35400; }
.tw-warn, .am-warn { color: #c0392b; font-size: 0.9rem; padding: 8px 0; }
.tw-verdict, .am-verdict { margin-top: 14px; border-radius: 6px; }
.tw-counts, .am-counts { font-size: 0.85rem; color: var(--text-light); margin-bottom: 8px; }
.tw-verdict-text { line-height: 1.7; }

/* AMSTAR 2チェッカー */
.am-intro {
  padding: 14px 18px;
  background: #fff8f0;
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  margin-bottom: 20px;
}
.am-items { display: flex; flex-direction: column; gap: 8px; }
.am-item {
  padding: 12px 14px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.am-item.critical { border-left: 3px solid var(--accent); background: #fff8f0; }
.am-item-head { margin-bottom: 8px; }
.am-num { font-weight: 700; color: var(--primary); margin-right: 8px; }
.am-text { font-size: 0.92rem; }
.am-choices { display: flex; gap: 14px; padding-top: 6px; border-top: 1px dashed var(--border); font-size: 0.9rem; }
.am-choices label { cursor: pointer; }

/* LinkedInフィード */
.lnk-intro { margin-bottom: 20px; padding: 14px 18px; background: #ebf4fa; border-left: 4px solid var(--primary); border-radius: 6px; }
.lnk-filters { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.lnk-filter {
  background: white;
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s;
}
.lnk-filter:hover { background: #ebf4fa; }
.lnk-filter.active { background: var(--primary); color: white; border-color: var(--primary); }
.lnk-cards { display: grid; gap: 14px; }
.lnk-card {
  padding: 14px 16px;
  background: white;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  transition: box-shadow 0.2s;
}
.lnk-card:hover { box-shadow: var(--shadow); }
.lnk-card-head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; font-size: 0.85rem; flex-wrap: wrap; }
.lnk-topic { background: var(--accent); color: white; padding: 2px 10px; border-radius: 10px; font-weight: 600; font-size: 0.8rem; }
.lnk-when { color: var(--text-light); }
.lnk-chap { color: var(--primary); font-weight: 600; }
.lnk-comment { line-height: 1.7; margin-bottom: 8px; }
.lnk-ext {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.88rem;
  color: var(--primary);
  text-decoration: none;
}
.lnk-ext:hover { text-decoration: underline; }

/* Cover page reader version */
.reader-cover {
  background: linear-gradient(135deg, #1a5276 0%, #2980b9 50%, #e67e22 150%);
  color: white;
  padding: 60px 40px;
  border-radius: 16px;
  margin-bottom: 30px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}
.reader-cover h1 {
  font-size: 2.2rem;
  margin-bottom: 12px;
  line-height: 1.4;
  color: white;
}
.reader-cover .sub {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 24px;
}
.reader-cover .pitch {
  background: rgba(255,255,255,0.12);
  padding: 16px 20px;
  border-radius: 10px;
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 24px;
}
.reader-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-top: 20px; }
.reader-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(255,255,255,0.12);
  border-radius: 10px;
  color: white;
  text-decoration: none;
  transition: all 0.2s;
  border: 1px solid rgba(255,255,255,0.2);
}
.reader-link:hover { background: rgba(255,255,255,0.2); transform: translateY(-2px); }
.reader-link .icn { font-size: 1.6rem; }
.reader-link .ttl { font-weight: 600; font-size: 0.95rem; }
.reader-link .dsc { font-size: 0.8rem; opacity: 0.85; }

/* 章共通の読み手向けボックス */
.key-message {
  padding: 14px 18px;
  background: #ebf4fa;
  border-left: 4px solid var(--primary);
  border-radius: 6px;
  margin: 16px 0 20px;
}
.key-message strong { color: var(--primary-dark); }

.reader-tips {
  padding: 14px 18px;
  background: #eafbe7;
  border-left: 4px solid #27ae60;
  border-radius: 6px;
  margin: 16px 0;
}
.reader-tips h4 { color: #1e8449; margin-bottom: 8px; }

.warning-box {
  padding: 14px 18px;
  background: #fbeae7;
  border-left: 4px solid #c0392b;
  border-radius: 6px;
  margin: 16px 0;
}
.warning-box strong { color: #922b21; }

.example-box {
  padding: 14px 18px;
  background: #fff8f0;
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  margin: 16px 0;
}

/* 参考文献ページ */
.ref-list { list-style: none; padding: 0; }
.ref-list li {
  padding: 10px 14px;
  margin-bottom: 6px;
  background: #f9fbfd;
  border-left: 3px solid var(--primary);
  border-radius: 4px;
  font-size: 0.92rem;
}
.ref-list .ref-id {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
  margin-right: 8px;
  font-size: 0.8rem;
}
.ref-list .ref-category {
  margin: 18px 0 10px;
  font-weight: 700;
  color: var(--primary-dark);
  font-size: 1rem;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 4px;
}

/* ====== ドキュメント構造マップ（CPG/SRナビゲーション学習システム） ====== */
.doc-map-wrap {
  margin: 24px 0 30px;
  padding: 20px;
  background: linear-gradient(135deg, #f4f8fb 0%, #fff8f0 100%);
  border: 2px solid var(--primary);
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(26,82,118,0.08);
}
.doc-map-wrap h3 {
  color: var(--primary-dark);
  margin-bottom: 8px;
  font-size: 1.2rem;
}
.doc-map-intro {
  font-size: 0.92rem;
  color: var(--text);
  margin-bottom: 14px;
  line-height: 1.7;
}
.doc-map-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.doc-map-tab {
  background: white;
  border: 2px solid var(--primary);
  color: var(--primary);
  padding: 8px 18px;
  border-radius: 20px;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.92rem;
  transition: all 0.2s;
}
.doc-map-tab:hover { background: #ebf4fa; }
.doc-map-tab.active {
  background: var(--primary);
  color: white;
}
.doc-map-panel { display: none; }
.doc-map-panel.active { display: block; }
.doc-section {
  display: grid;
  grid-template-columns: 80px 1fr 1fr;
  gap: 12px;
  align-items: stretch;
  padding: 12px 14px;
  margin-bottom: 8px;
  background: white;
  border: 1px solid var(--border);
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  transition: all 0.15s;
  font-size: 0.88rem;
}
.doc-section:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transform: translateX(2px);
}
.doc-sec-step {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: white;
  font-weight: 700;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.85rem;
  text-align: center;
  line-height: 1.3;
}
.doc-sec-name { line-height: 1.5; }
.doc-sec-name strong { color: var(--primary-dark); display: block; margin-bottom: 4px; font-size: 0.96rem; }
.doc-sec-name .ja-sub { color: var(--text-light); font-size: 0.85rem; }
.doc-sec-what { line-height: 1.6; color: var(--text); }
.doc-sec-what .what-label {
  display: inline-block;
  background: #eafbe7;
  color: #1e8449;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-right: 4px;
  margin-bottom: 4px;
}
.doc-sec-chaps { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.doc-sec-chap {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
}
.doc-sec-chap:hover { background: #d35400; }

@media (max-width: 760px) {
  .doc-section { grid-template-columns: 60px 1fr; }
  .doc-sec-what { grid-column: 1 / -1; padding-top: 6px; border-top: 1px dashed var(--border); }
}

/* ====== 「あなたが今学んでいる場所」ナビゲーター（各章冒頭） ====== */
.you-are-here {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
  padding: 12px 16px;
  background: #fff4e6;
  border: 1px solid #e67e22;
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  font-size: 0.88rem;
  line-height: 1.6;
}
.you-are-here .yah-pin {
  font-size: 1.1rem;
  flex-shrink: 0;
}
.you-are-here .yah-body { flex: 1; min-width: 220px; }
.you-are-here .yah-title {
  font-weight: 700;
  color: #a04000;
  display: block;
  margin-bottom: 4px;
  font-size: 0.92rem;
}
.you-are-here .yah-where {
  display: inline-block;
  background: white;
  padding: 2px 10px;
  border-radius: 12px;
  margin: 2px 4px 2px 0;
  font-weight: 600;
  color: var(--primary-dark);
  border: 1px solid #f0c090;
  font-size: 0.85rem;
}
.you-are-here .yah-check {
  display: block;
  margin-top: 6px;
  color: var(--text);
}
.you-are-here .yah-check::before {
  content: "🔎 ";
}
.you-are-here .yah-map-link {
  color: var(--primary);
  font-size: 0.82rem;
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  margin-top: 4px;
  display: block;
}

/* ====== GRADE用語分解ボックス ====== */
.term-decode {
  margin: 18px 0;
  padding: 16px 20px;
  background: #ebf4fa;
  border: 1px solid var(--primary);
  border-radius: 10px;
}
.term-decode h4 {
  color: var(--primary-dark);
  margin-bottom: 10px;
  font-size: 1.05rem;
}
.term-decode-letters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.term-letter {
  background: white;
  padding: 10px 12px;
  border-radius: 6px;
  border-left: 3px solid var(--accent);
  font-size: 0.88rem;
  line-height: 1.5;
}
.term-letter .big {
  display: block;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
}
.term-letter .en { display: block; font-size: 0.82rem; color: var(--text-light); margin: 4px 0 2px; }
.term-letter .ja { font-weight: 600; color: var(--primary-dark); }

/* ====== 「なぜこれを最初に学ぶか」導入ボックス ====== */
.why-first {
  margin: 20px 0;
  padding: 18px 22px;
  background: linear-gradient(135deg, #fff8f0 0%, #ebf4fa 100%);
  border: 2px dashed var(--accent);
  border-radius: 10px;
}
.why-first h4 {
  color: var(--accent);
  font-size: 1.1rem;
  margin-bottom: 10px;
}
.why-first ol {
  margin: 8px 0 0 18px;
  line-height: 1.8;
}
.why-first ol li { margin-bottom: 4px; }

/* ====== 章学習ロードマップ（Ch2末尾に配置） ====== */
.roadmap {
  margin: 20px 0;
  padding: 16px 18px;
  background: #f4f8fb;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.roadmap h4 { color: var(--primary-dark); margin-bottom: 10px; }
.roadmap-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.roadmap-step {
  background: white;
  padding: 12px 14px;
  border-radius: 8px;
  border-left: 4px solid var(--primary);
  font-size: 0.88rem;
  line-height: 1.55;
  cursor: pointer;
  transition: all 0.15s;
}
.roadmap-step:hover {
  background: #ebf4fa;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(26,82,118,0.1);
}
.roadmap-step .rs-ch {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-right: 6px;
}
.roadmap-step .rs-title { font-weight: 700; color: var(--primary-dark); }
.roadmap-step .rs-dsc { color: var(--text); font-size: 0.85rem; margin-top: 4px; }

/* 章間ナビ */
.chapter-nav {
  display: flex;
  justify-content: space-between;
  margin: 30px 0 10px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.chapter-nav button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.92rem;
  transition: background 0.15s;
}
.chapter-nav button:hover { background: var(--primary-dark); }
.chapter-nav button:disabled { background: var(--text-light); cursor: not-allowed; opacity: 0.5; }

/* ========================================================================
   v1.2: 初学者向け導入ブロック（Ch0表紙内）＋ Primer特別ページ（page-25）
   ======================================================================== */

/* ===== Ch0表紙の初学者向け導入ブロック ===== */
.beginner-intro-block {
  margin-top: 26px;
  padding: 22px 24px;
  background: rgba(255,255,255,0.14);
  border: 2px solid rgba(255, 204, 128, 0.75);
  border-radius: 14px;
  backdrop-filter: blur(2px);
}
.beginner-intro-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffd89a;
  margin-bottom: 8px;
}
.beginner-intro-icon { font-size: 1.5rem; }
.beginner-intro-sub {
  font-size: 0.92rem;
  color: rgba(255,255,255,0.92);
  line-height: 1.7;
  margin-bottom: 16px;
}
.beginner-intro-sub strong { color: #ffd89a; }
.beginner-intro-btns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.beginner-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 10px;
  text-decoration: none;
  text-align: left;
  transition: all 0.2s;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.22);
  color: white;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
}
.beginner-btn:hover {
  background: rgba(255,255,255,0.22);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}
.beginner-btn .btn-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  line-height: 1.45;
}
.beginner-btn .btn-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: #ffcc80;
  letter-spacing: 0.04em;
}
.beginner-btn .btn-title {
  font-size: 1.0rem;
  font-weight: 700;
}
.beginner-btn .btn-dsc {
  font-size: 0.82rem;
  opacity: 0.85;
}
.yt-btn .yt-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ff3b30;
  color: white;
  font-size: 1.2rem;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(255,59,48,0.45);
}
.primer-btn {
  background: linear-gradient(135deg, rgba(230,126,34,0.28) 0%, rgba(255,204,128,0.18) 100%);
  border-color: rgba(255,204,128,0.55);
}
.primer-btn .primer-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #e67e22;
  color: white;
  font-size: 1.3rem;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(230,126,34,0.45);
}

/* ===== Primer特別ページ（page-25）===== */
.primer-header {
  background: linear-gradient(135deg, #e67e22 0%, #d35400 100%) !important;
}
.primer-badge {
  background: white !important;
  color: #d35400 !important;
}

.primer-why {
  margin: 16px 0 24px;
  padding: 20px 24px;
  background: linear-gradient(135deg, #fff8f0 0%, #fff4e6 100%);
  border: 2px solid var(--accent);
  border-radius: 12px;
}
.primer-why h3 {
  color: #d35400;
  margin-bottom: 10px;
  font-size: 1.15rem;
}
.primer-why p {
  line-height: 1.8;
  margin-bottom: 10px;
}
.primer-why .misunderstand-list {
  margin: 10px 0;
  padding: 12px 14px 12px 30px;
  background: #fbeae7;
  border-left: 4px solid #c0392b;
  border-radius: 6px;
}
.primer-why .misunderstand-list li {
  margin-bottom: 4px;
  color: #922b21;
  font-weight: 500;
}
.primer-video-hint {
  margin-top: 10px;
  padding: 10px 14px;
  background: #ebf4fa;
  border-left: 4px solid var(--primary);
  border-radius: 6px;
  font-size: 0.92rem;
}

/* ===== Primer動画/スライド学習ボタン群（v1.14追加） ===== */
.primer-vstudy-block {
  margin: 14px 0 10px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #ebf4fa 0%, #f4f9fc 100%);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,.04);
}
.primer-vstudy-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.primer-vstudy-row:last-child { margin-bottom: 0; }
.primer-vstudy-row-sub {
  padding-top: 12px;
  border-top: 1px dashed rgba(0,0,0,0.12);
}
.primer-vstudy-text {
  flex: 1;
  min-width: 220px;
  font-size: 0.96rem;
  font-weight: 700;
  color: #1a4f6e;
  line-height: 1.5;
}
.primer-vstudy-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.primer-vbtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  transition: transform 0.15s ease, box-shadow 0.18s ease;
  min-height: 44px;
  white-space: nowrap;
}
.primer-vbtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 14px rgba(0,0,0,0.18);
}
.primer-vbtn:active { transform: translateY(0); }
.primer-vbtn-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  font-size: 0.95rem;
}
.primer-vbtn-yt {
  background: #ff3b30;
  color: white;
}
.primer-vbtn-slide {
  background: #14948a;
  color: white;
}
@media (max-width: 600px) {
  .primer-vstudy-text { min-width: 100%; }
  .primer-vbtn { font-size: 0.88rem; padding: 9px 13px; gap: 6px; }
  .primer-vbtn-mark { width: 24px; height: 24px; font-size: 0.85rem; }
}

/* ===== JAMA UG 章内図版（forest plot 等）（v1.15追加） ===== */
.jama-fig {
  margin: 22px 0;
  text-align: center;
}
.jama-fig-link {
  display: inline-block;
  max-width: 100%;
  text-decoration: none;
  color: inherit;
  border: 1px solid #c5dde8;
  border-radius: 10px;
  padding: 6px;
  background: white;
  transition: transform 0.15s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.jama-fig-link:hover {
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
  border-color: #1a5276;
  transform: translateY(-1px);
}
.jama-fig-img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}
.jama-fig-hint {
  display: block;
  text-align: center;
  font-size: 12px;
  color: #1a5276;
  padding: 8px 0 2px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.jama-fig figcaption {
  margin: 10px 4px 0;
  font-size: 0.86rem;
  line-height: 1.7;
  color: #4a5868;
  text-align: left;
  padding: 8px 12px;
  background: #f4f8fb;
  border-left: 3px solid #1a5276;
  border-radius: 4px;
}
@media (max-width: 600px) {
  .jama-fig figcaption { font-size: 0.82rem; padding: 8px 10px; }
}

/* ===== フォレストプロット再解析シミュレータ・ボタン（v1.16追加） ===== */
.forest-sim-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  margin: 16px 0 22px;
  background: linear-gradient(135deg, #f0f7ed 0%, #e8f3e1 100%);
  border: 2px solid #4a7c2a;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  box-shadow: 0 3px 10px rgba(74,124,42,0.15);
  min-height: 64px;
}
.forest-sim-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(74,124,42,0.3);
  border-color: #2d5e15;
}
.forest-sim-mark {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #4a7c2a;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 3px 10px rgba(74,124,42,0.45);
}
.forest-sim-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.forest-sim-tag {
  font-size: 0.7rem;
  font-weight: 700;
  color: #2d5e15;
  letter-spacing: 0.05em;
}
.forest-sim-title {
  font-size: 1rem;
  font-weight: 700;
  color: #2c3e50;
  line-height: 1.45;
}
.forest-sim-dsc {
  font-size: 0.82rem;
  color: #5a6878;
  line-height: 1.5;
}
.forest-sim-arrow {
  flex-shrink: 0;
  font-size: 1.3rem;
  color: #4a7c2a;
  font-weight: 700;
  margin-left: 4px;
}
@media (max-width: 480px) {
  .forest-sim-btn { padding: 12px 14px; gap: 10px; }
  .forest-sim-mark { width: 42px; height: 42px; font-size: 1.3rem; }
  .forest-sim-title { font-size: 0.93rem; }
  .forest-sim-dsc { font-size: 0.78rem; }
  .forest-sim-tag { font-size: 0.66rem; }
}

.primer-h2 {
  color: var(--primary-dark);
  font-size: 1.35rem;
  margin-top: 36px;
  margin-bottom: 14px;
  padding: 8px 14px;
  background: linear-gradient(90deg, #ebf4fa 0%, transparent 100%);
  border-left: 5px solid var(--primary);
  border-radius: 0 6px 6px 0;
}

.primer-fig {
  margin: 18px 0;
  text-align: center;
}
.primer-fig img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}
.primer-fig figcaption {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--text-light);
  font-style: italic;
}

/* EBMの5A表示 */
.primer-5a {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin: 16px 0 20px;
}
.a-step {
  background: white;
  padding: 12px 14px 12px 16px;
  border-radius: 8px;
  border-left: 4px solid var(--primary);
  font-size: 0.9rem;
  line-height: 1.5;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.a-step .a-num {
  display: inline-block;
  background: var(--primary);
  color: white;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  text-align: center;
  line-height: 26px;
  font-weight: 700;
  font-size: 0.85rem;
}
.a-step .a-en {
  font-weight: 700;
  color: var(--accent);
  font-size: 0.95rem;
}

/* EBM 3原則表示 */
.principle-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0 20px;
}
.principle {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 14px;
  align-items: center;
  background: white;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  border-left: 5px solid var(--accent);
}
.principle .p-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  font-size: 1.3rem;
  font-weight: 800;
}
.principle .p-body {
  line-height: 1.6;
  font-size: 0.95rem;
}

/* SR 6ステップ */
.sr-steps {
  margin: 14px 0 20px 24px;
  line-height: 1.9;
}
.sr-steps li { margin-bottom: 6px; }
.sr-steps .accent { color: var(--accent); }

/* 確実性比較ボックス */
.compare-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 18px 0;
}
.compare-left, .compare-right {
  padding: 14px 16px;
  border-radius: 10px;
  line-height: 1.7;
  font-size: 0.93rem;
}
.compare-left {
  background: #fbeae7;
  border: 1px solid #c0392b;
  border-left: 5px solid #c0392b;
}
.compare-right {
  background: #eafbe7;
  border: 1px solid #27ae60;
  border-left: 5px solid #27ae60;
}
.low-tag {
  display: inline-block;
  padding: 2px 10px;
  background: #c0392b;
  color: white;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.85rem;
  margin-top: 4px;
}
.high-tag {
  display: inline-block;
  padding: 2px 10px;
  background: #27ae60;
  color: white;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.85rem;
  margin-top: 4px;
}
@media (max-width: 700px) {
  .compare-box { grid-template-columns: 1fr; }
}

/* GRADE 5要因 */
.grade-5factors {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
  margin: 16px 0 20px;
}
.g5-item {
  background: white;
  padding: 12px 14px;
  border-radius: 8px;
  border-left: 4px solid var(--primary);
  font-size: 0.9rem;
  line-height: 1.55;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.g5-item .g5-num {
  display: inline-block;
  width: 24px;
  height: 24px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  text-align: center;
  line-height: 24px;
  font-weight: 700;
  font-size: 0.82rem;
  margin-right: 6px;
}
.g5-item .g5-desc {
  display: block;
  color: var(--text-light);
  font-size: 0.85rem;
  margin-top: 4px;
}

/* 4パターン表 */
.four-pattern {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 14px 0 20px;
}
.fp-row {
  display: grid;
  grid-template-columns: 80px 1.3fr 1.3fr 1.2fr;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.92rem;
  line-height: 1.55;
}
.fp-red { background: #fbeae7; border-left: 5px solid #c0392b; }
.fp-orange { background: #fff4e6; border-left: 5px solid #e67e22; }
.fp-green { background: #eafbe7; border-left: 5px solid #27ae60; }
.fp-case { font-size: 0.9rem; color: var(--text-light); }
.fp-judge { text-align: center; }
.fp-red .fp-judge { color: #922b21; }
.fp-orange .fp-judge { color: #a04000; }
.fp-green .fp-judge { color: #1e8449; }
@media (max-width: 760px) {
  .fp-row { grid-template-columns: 1fr; gap: 4px; padding: 10px 12px; }
  .fp-row > div { padding: 2px 0; }
}

/* Primer最終まとめボックス */
.primer-final {
  margin: 18px 0;
  padding: 20px 24px;
  background: linear-gradient(135deg, #ebf4fa 0%, #fff8f0 100%);
  border: 2px solid var(--primary);
  border-radius: 12px;
}
.primer-final h3 {
  color: var(--primary-dark);
  margin: 10px 0 6px;
  font-size: 1.05rem;
}
.primer-final ul {
  margin: 4px 0 10px 22px;
  line-height: 1.8;
}
.primer-punchline {
  margin-top: 18px;
  padding: 16px 20px;
  background: var(--accent);
  color: white;
  border-radius: 10px;
  font-size: 1.05rem;
  line-height: 1.7;
  text-align: center;
}
.primer-punchline .sub {
  display: block;
  margin-top: 6px;
  font-size: 0.88rem;
  opacity: 0.92;
  font-weight: 400;
}

.primer-footer-note {
  margin-top: 26px;
  padding: 12px 16px;
  background: #f9fbfd;
  border-left: 4px solid var(--primary);
  border-radius: 6px;
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text);
}

@media (max-width: 620px) {
  .primer-5a { grid-template-columns: 1fr; }
  .principle { grid-template-columns: 50px 1fr; }
  .principle .p-num { width: 38px; height: 38px; font-size: 1.1rem; }
  .primer-h2 { font-size: 1.15rem; }
}

/* TOCのPrimerボタン（初学者向け強調） */
.toc-btn.primer-toc {
  background: linear-gradient(135deg, #fff4e6 0%, #ffe8d6 100%);
  border-left: 4px solid var(--accent);
}
.toc-btn.primer-toc:hover {
  background: linear-gradient(135deg, #ffe8d6 0%, #ffd9b3 100%);
}
.toc-btn.primer-toc.active {
  background: var(--accent);
  color: white;
}
.toc-btn.primer-toc.active .toc-num {
  background: white;
  color: var(--accent);
}
.toc-btn.primer-toc .toc-num {
  background: var(--accent);
  color: white;
  font-size: 0.9rem;
}

/* ========================================================================
   v1.3: モバイルファースト強化 + Guyatt Core GRADE セクション
   ======================================================================== */

/* ページのスクロール速度調整・アンカー位置補正 */
html { scroll-behavior: smooth; }
.primer-body { scroll-padding-top: 80px; }
.primer-body h2[id],
.primer-body .primer-why[id] { scroll-margin-top: 80px; }

/* ===== スティッキーセクションチップナビ（スマホで常時表示） ===== */
.primer-sticky-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(180deg, #ffffff 0%, #fff8f0 100%);
  border: 2px solid var(--accent);
  border-radius: 12px;
  padding: 10px 12px;
  margin: -6px 0 18px;
  box-shadow: 0 4px 18px rgba(230,126,34,0.15);
}
.primer-nav-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 6px;
}
.primer-nav-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  scrollbar-width: thin;
}
.primer-nav-chips::-webkit-scrollbar {
  height: 6px;
}
.primer-nav-chips::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 3px;
}
.pn-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 12px;
  background: white;
  border: 1.5px solid var(--accent);
  border-radius: 18px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s;
}
.pn-chip:hover, .pn-chip:active {
  background: var(--accent);
  color: white;
  transform: translateY(-1px);
}
.pn-chip.pn-new {
  background: linear-gradient(135deg, #ffe8d6 0%, #fff4e6 100%);
  border-color: #d35400;
  color: #a04000;
}
.pn-chip.pn-new:hover, .pn-chip.pn-new:active {
  background: #d35400;
  color: white;
}

/* ===== セクション間ナビフッター（「次へ」ボタン） ===== */
.sec-nav-foot {
  margin: 20px 0 10px;
  text-align: center;
}
.sec-next {
  display: inline-block;
  min-height: 48px;
  padding: 12px 22px;
  background: var(--primary);
  color: white;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 24px;
  text-decoration: none;
  box-shadow: 0 3px 10px rgba(26,82,118,0.25);
  transition: all 0.2s;
  line-height: 1.4;
}
.sec-next:hover, .sec-next:active {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 5px 14px rgba(26,82,118,0.35);
}
.sec-next-new {
  background: var(--accent);
  box-shadow: 0 3px 10px rgba(230,126,34,0.3);
}
.sec-next-new:hover, .sec-next-new:active {
  background: #d35400;
  box-shadow: 0 5px 14px rgba(230,126,34,0.4);
}

/* ===== 新セクション用見出し強調 ===== */
.primer-h2-new {
  background: linear-gradient(90deg, #ffe8d6 0%, transparent 100%) !important;
  border-left-color: var(--accent) !important;
  border-left-width: 6px !important;
}

/* ===== Guyatt先生引用ボックス ===== */
.guyatt-quote {
  display: flex;
  flex-wrap: wrap; /* v1.12 fix: gq-src が同じflex行で本文を圧迫し縦書きになる現象を解消 */
  gap: 14px;
  margin: 18px 0;
  padding: 18px 20px;
  background: linear-gradient(135deg, #f4f8fb 0%, #ebf4fa 100%);
  border: 2px solid var(--primary);
  border-radius: 12px;
  position: relative;
}
.guyatt-quote .gq-mark {
  font-size: 2.5rem;
  color: var(--primary);
  line-height: 0.9;
  flex-shrink: 0;
  font-weight: 900;
}
.guyatt-quote .gq-body {
  flex: 1;
  min-width: 0; /* v1.12 fix: flex item は min-width: auto がデフォルトで縮まない → 0で解除 */
  line-height: 1.8;
  font-size: 0.95rem;
}
.guyatt-quote .gq-src {
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--text-light);
  font-style: italic;
  flex-basis: 100%; /* v1.12 fix: flex-wrap と併用して必ず次行へ送る */
  width: 100%;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

/* ===== Core GRADE 7論文カード ===== */
.cg-papers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  margin: 14px 0 20px;
}
.cg-paper {
  background: white;
  padding: 12px 14px;
  border-left: 4px solid var(--primary);
  border-radius: 6px;
  font-size: 0.88rem;
  line-height: 1.5;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.cg-paper .cg-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* ===== ターゲット選択ボックス（Null / MID） ===== */
.target-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0 20px;
}
.target-item {
  padding: 14px 16px;
  border-radius: 10px;
  border: 2px solid;
  line-height: 1.6;
}
.target-null {
  background: #ebf4fa;
  border-color: var(--primary);
}
.target-mid {
  background: #fff8f0;
  border-color: var(--accent);
}
.target-item .ti-head {
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px dashed currentColor;
}
.target-item .ti-label {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 14px;
  background: white;
  font-weight: 800;
  font-size: 0.92rem;
}
.target-null .ti-label { color: var(--primary); }
.target-mid .ti-label { color: var(--accent); }
.target-item .ti-detail {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-left: 6px;
}
.target-item .ti-body {
  font-size: 0.9rem;
}
@media (max-width: 720px) {
  .target-box { grid-template-columns: 1fr; }
}

.target-steps {
  margin: 14px 0 20px 22px;
  line-height: 1.9;
}
.target-steps li { margin-bottom: 8px; padding-left: 4px; }

/* ===== OIS計算ボックス ===== */
.ois-calc {
  margin: 16px 0;
  padding: 16px 20px;
  background: #fff8f0;
  border: 1px solid var(--accent);
  border-radius: 10px;
  line-height: 1.7;
  font-size: 0.93rem;
}
.ois-calc ul {
  margin: 10px 0 10px 22px;
}

.ois-judgment {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 14px 0 20px;
}
.oj-case {
  padding: 12px 16px;
  border-radius: 8px;
  border-left: 5px solid;
  background: white;
  line-height: 1.6;
  font-size: 0.92rem;
}
.oj-pass { border-color: #27ae60; background: #eafbe7; }
.oj-down1 { border-color: #f39c12; background: #fff8e1; }
.oj-down2 { border-color: #e67e22; background: #ffe8d6; }
.oj-down3 { border-color: #c0392b; background: #fbeae7; }

/* ===== Risk of Bias 例ボックス ===== */
.rob-example {
  margin: 14px 0 20px;
  padding: 14px 16px;
  background: #f9fbfd;
  border-left: 4px solid var(--primary);
  border-radius: 8px;
}
.rob-example .re-title {
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 4px;
  font-size: 0.94rem;
}
.rob-example .re-but {
  padding-left: 14px;
  border-left: 3px solid var(--accent);
  margin-bottom: 10px;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text);
}

/* ===== RoB 2段階評価 ===== */
.rob-2step {
  display: flex;
  gap: 12px;
  margin: 14px 0 20px;
  flex-wrap: wrap;
}
.r2-step {
  flex: 1;
  min-width: 220px;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  background: white;
  border: 2px solid var(--primary);
  border-radius: 10px;
}
.r2-step .r2-n {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.3rem;
}
.r2-step .r2-body { line-height: 1.5; }
.r2-step .r2-sub { font-size: 0.85rem; color: var(--text-light); }

/* ===== RoB 判断フロー ===== */
.rob-flow {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 14px 0 20px;
}
.rf-step {
  padding: 14px 16px;
  background: white;
  border: 1px solid var(--border);
  border-left: 5px solid var(--primary);
  border-radius: 8px;
  line-height: 1.7;
  font-size: 0.92rem;
}

/* ===== サブグループ vs 背景リスクカード ===== */
.subgroup-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 16px 0 20px;
}
.sb-card {
  padding: 16px 18px;
  border-radius: 12px;
  line-height: 1.7;
}
.sb-baseline {
  background: #eafbe7;
  border: 2px solid #27ae60;
}
.sb-modifier {
  background: #fff4e6;
  border: 2px solid var(--accent);
}
.sb-card .sb-head {
  font-weight: 800;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px dashed currentColor;
  font-size: 1.0rem;
}
.sb-baseline .sb-head { color: #1e8449; }
.sb-modifier .sb-head { color: #a04000; }
.sb-card .sb-body { font-size: 0.92rem; }
@media (max-width: 720px) {
  .subgroup-box { grid-template-columns: 1fr; }
}

/* ===== 推奨2x2グリッド ===== */
.rec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0 20px;
}
.rg-cell {
  padding: 14px 16px;
  border-radius: 10px;
  line-height: 1.6;
}
.rg-str-for { background: #eafbe7; border: 2px solid #27ae60; }
.rg-cond-for { background: #fff8e1; border: 2px solid #f39c12; }
.rg-cond-against { background: #fff4e6; border: 2px solid var(--accent); }
.rg-str-against { background: #fbeae7; border: 2px solid #c0392b; }
.rg-cell .rg-label {
  font-weight: 800;
  font-size: 1.0rem;
  margin-bottom: 6px;
}
.rg-str-for .rg-label { color: #1e8449; }
.rg-cond-for .rg-label { color: #a56300; }
.rg-cond-against .rg-label { color: #a04000; }
.rg-str-against .rg-label { color: #922b21; }
.rg-cell .rg-wording {
  font-family: 'Consolas', 'Menlo', 'Osaka-Mono', monospace;
  background: rgba(255,255,255,0.6);
  padding: 6px 10px;
  border-radius: 6px;
  margin-bottom: 8px;
  font-size: 0.88rem;
}
.rg-cell .rg-cond { font-size: 0.88rem; color: var(--text); }
@media (max-width: 720px) {
  .rec-grid { grid-template-columns: 1fr; }
}

/* ===== 推奨決定要因カード ===== */
.rec-factors {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
  margin: 14px 0 20px;
}
.rf-card {
  padding: 12px 14px;
  background: white;
  border-radius: 8px;
  border-left: 4px solid var(--primary);
  line-height: 1.55;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.rec-factors-pop .rf-card {
  border-left-color: var(--accent);
  background: #fffdf5;
}
.rf-card .rf-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  font-weight: 800;
  font-size: 0.82rem;
  margin-bottom: 6px;
}
.rec-factors-pop .rf-card .rf-num { background: var(--accent); }
.rf-card .rf-title {
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 4px;
  font-size: 0.95rem;
}
.rec-factors-pop .rf-card .rf-title { color: #a04000; }
.rf-card .rf-body {
  font-size: 0.86rem;
  color: var(--text);
}

/* ===== Q&A アコーディオン ===== */
.qa-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 14px 0 20px;
}
.qa-item {
  background: white;
  border: 1px solid var(--border);
  border-left: 5px solid var(--primary);
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.qa-item[open] {
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  border-left-color: var(--accent);
}
.qa-q {
  cursor: pointer;
  padding: 14px 16px;
  list-style: none;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-height: 48px;
  transition: background 0.15s;
}
.qa-q::-webkit-details-marker { display: none; }
.qa-q:hover, .qa-q:active { background: #f9fbfd; }
.qa-q::after {
  content: '▼';
  margin-left: auto;
  color: var(--primary);
  font-size: 0.8rem;
  transition: transform 0.2s;
  flex-shrink: 0;
}
.qa-item[open] .qa-q::after { transform: rotate(180deg); color: var(--accent); }
.qa-q .qa-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 30px;
  background: var(--primary);
  color: white;
  border-radius: 14px;
  font-weight: 800;
  font-size: 0.82rem;
  flex-shrink: 0;
  padding: 0 8px;
}
.qa-item[open] .qa-q .qa-icon { background: var(--accent); }
.qa-q .qa-title {
  flex: 1;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.5;
  font-size: 0.94rem;
}
.qa-a {
  padding: 14px 20px 18px;
  background: #f9fbfd;
  border-top: 1px dashed var(--border);
  line-height: 1.8;
  font-size: 0.92rem;
}
.qa-a p { margin-bottom: 10px; }
.qa-a ul { margin: 8px 0 10px 22px; line-height: 1.7; }
.qa-a li { margin-bottom: 4px; }

/* ========== 全体的なスマホ最適化（既存クラスも調整） ========== */
@media (max-width: 760px) {
  /* ページ余白を詰める */
  .primer-body { padding-left: 10px; padding-right: 10px; }

  /* セクションチップナビの余白調整 */
  .primer-sticky-nav { padding: 8px 10px; border-radius: 10px; }
  .primer-nav-title { font-size: 0.78rem; }
  .pn-chip { font-size: 0.78rem; padding: 5px 10px; min-height: 32px; }

  /* 見出し */
  .primer-h2 {
    font-size: 1.08rem !important;
    padding: 8px 10px !important;
    margin-top: 28px;
  }

  /* 画像 */
  .primer-fig img { border-radius: 6px; }
  .primer-fig figcaption { font-size: 0.78rem; }

  /* テキスト基本サイズアップ */
  .page-body { font-size: 16px; line-height: 1.8; }

  /* タップターゲット確保（最低44×44px） */
  .sec-next, .pn-chip, .qa-q { min-height: 44px; }
  button, .nav-btn, .toc-btn, .chapter-nav button {
    min-height: 44px;
  }

  /* Core GRADE カード */
  .cg-papers { grid-template-columns: 1fr; }

  /* Q&A タイトル折返し対応 */
  .qa-q .qa-title { font-size: 0.9rem; }
  .qa-a { font-size: 0.9rem; padding: 12px 14px 16px; }

  /* 推奨グリッド・サブグループ・ターゲットは上で1列化済み */

  /* 図の引用吹き出し */
  .guyatt-quote { padding: 14px 16px; gap: 10px; }
  .guyatt-quote .gq-mark { font-size: 2rem; }
  .guyatt-quote .gq-body { font-size: 0.9rem; line-height: 1.7; }

  /* RoB 2ステップ */
  .rob-2step { gap: 10px; }

  /* Ch0表紙ボタン */
  .beginner-btn { padding: 12px 14px; gap: 10px; }
  .beginner-btn .btn-title { font-size: 0.95rem; }
  .beginner-btn .btn-dsc { font-size: 0.78rem; }
  .beginner-intro-block { padding: 16px 14px; }
}

/* 最小画面（〜420px） */
@media (max-width: 420px) {
  .primer-h2 { font-size: 1.0rem !important; }
  .pn-chip { font-size: 0.75rem; }
  .cg-paper { font-size: 0.85rem; }
  .rec-factors { grid-template-columns: 1fr; }
  .guyatt-quote { flex-direction: column; gap: 8px; }
  .guyatt-quote .gq-mark { font-size: 1.8rem; text-align: center; }
  .r2-step { min-width: 100%; }
}

/* フローティング「目次/トップへ」ボタン（Primerページがactiveのときのみ表示） */
.primer-fab-wrap {
  position: fixed;
  right: 12px;
  bottom: 80px;
  display: none;
  flex-direction: column;
  gap: 8px;
  z-index: 90;
}
.page.active .primer-fab-wrap { display: flex; }
.primer-fab {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  border: none;
  box-shadow: 0 4px 14px rgba(230,126,34,0.4);
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.primer-fab:hover, .primer-fab:active {
  background: #d35400;
  transform: translateY(-2px);
}
.primer-fab-top { background: var(--primary); box-shadow: 0 4px 14px rgba(26,82,118,0.35); }
.primer-fab-top:hover, .primer-fab-top:active { background: var(--primary-dark); }

/* ============================================== */
/*  v1.4 JAMAユーザーズガイド (JAMA Users' Guides) */
/* ============================================== */

/* --- ページヘッダ共通：読了時間バッジ --- */
.jama-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px 0;
  padding: 14px 16px;
  background: linear-gradient(135deg, #0b3d5c 0%, #1a5276 100%);
  color: white;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(26,82,118,0.25);
}
.jama-page-head .jph-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.16);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.jama-page-head .jph-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin-right: auto;
  line-height: 1.4;
}
.jama-page-head .jph-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.1);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}

/* --- JAMA UG コールアウト（既存章への横断挿入用） --- */
.jama-note {
  position: relative;
  margin: 18px 0;
  padding: 14px 16px 14px 52px;
  background: #f4f9fc;
  border: 1px solid #c5dde8;
  border-left: 5px solid #1a5276;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(26,82,118,0.06);
}
.jama-note::before {
  content: "📘";
  position: absolute;
  left: 14px;
  top: 12px;
  font-size: 1.5rem;
  line-height: 1;
}
.jama-note .jn-label {
  display: inline-block;
  background: #1a5276;
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
  letter-spacing: 0.03em;
}
.jama-note .jn-title {
  font-weight: 700;
  color: #0b3d5c;
  margin: 0 0 6px 0;
  font-size: 1rem;
}
.jama-note p { margin: 6px 0; line-height: 1.75; }
.jama-note ul { margin: 6px 0 0 0; padding-left: 1.2em; }
.jama-note ul li { margin: 4px 0; line-height: 1.7; }
.jama-note .jn-cite {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.78rem;
  color: #5d7a8a;
  font-style: italic;
}

/* --- 臨床シナリオボックス --- */
.jama-scenario {
  margin: 16px 0;
  padding: 14px 16px;
  background: #fff8e6;
  border: 1px solid #f0d685;
  border-left: 5px solid #d4941e;
  border-radius: 10px;
}
.jama-scenario .js-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: #7a5510;
  font-size: 0.95rem;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px dashed #d4941e80;
}
.jama-scenario p { margin: 6px 0; line-height: 1.8; }

.jama-resolution {
  margin: 18px 0;
  padding: 14px 16px;
  background: #eaf7ef;
  border: 1px solid #a8d8b9;
  border-left: 5px solid #2d8a4e;
  border-radius: 10px;
}
.jama-resolution .jr-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: #1b5d35;
  font-size: 0.95rem;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px dashed #2d8a4e80;
}
.jama-resolution p { margin: 6px 0; line-height: 1.8; }

/* --- 質問チェックリストカード --- */
.jama-checklist {
  margin: 16px 0;
  padding: 0;
  border: 1px solid #c5dde8;
  border-radius: 12px;
  overflow: hidden;
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.jama-checklist .jc-head {
  background: linear-gradient(135deg, #1a5276, #2874a6);
  color: white;
  padding: 12px 16px;
  font-weight: 800;
  font-size: 0.98rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.jama-checklist .jc-head .jc-icon { font-size: 1.2rem; }
.jama-checklist .jc-sub {
  background: #eaf3f8;
  color: #1a5276;
  padding: 8px 16px;
  font-size: 0.82rem;
  border-bottom: 1px solid #c5dde8;
  font-weight: 600;
}
.jama-checklist ol {
  list-style: none;
  counter-reset: jc-counter;
  margin: 0;
  padding: 0;
}
.jama-checklist ol > li {
  counter-increment: jc-counter;
  position: relative;
  padding: 12px 16px 12px 52px;
  border-bottom: 1px solid #eaeff2;
  line-height: 1.7;
}
.jama-checklist ol > li:last-child { border-bottom: none; }
.jama-checklist ol > li::before {
  content: counter(jc-counter);
  position: absolute;
  left: 12px;
  top: 11px;
  width: 28px;
  height: 28px;
  background: #1a5276;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
}
.jama-checklist .jc-sub-item {
  display: block;
  margin-top: 4px;
  font-size: 0.88rem;
  color: #5d7a8a;
  padding-left: 0;
}

/* --- 展開式QAアコーディオン（ユーザーズガイドの適用） --- */
.jama-apply {
  margin: 16px 0;
  border: 1px solid #c5dde8;
  border-radius: 10px;
  overflow: hidden;
  background: #fafdff;
}
.jama-apply summary {
  padding: 12px 16px;
  background: #eaf3f8;
  cursor: pointer;
  font-weight: 700;
  color: #1a5276;
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  user-select: none;
}
.jama-apply summary::-webkit-details-marker { display: none; }
.jama-apply summary::before {
  content: "▸";
  display: inline-block;
  transition: transform 0.2s;
  color: #1a5276;
}
.jama-apply[open] summary::before { transform: rotate(90deg); }
.jama-apply .ja-body {
  padding: 14px 16px;
  line-height: 1.8;
}
.jama-apply .ja-body p { margin: 6px 0; }

/* --- キーコンセプト用語カード --- */
.jama-term {
  display: inline-block;
  background: #eaf3f8;
  border: 1px solid #c5dde8;
  padding: 1px 8px;
  border-radius: 4px;
  font-weight: 600;
  color: #1a5276;
  font-size: 0.92em;
  white-space: nowrap;
}
.jama-term .jt-en {
  color: #5d7a8a;
  font-style: italic;
  font-weight: 400;
  margin-left: 4px;
  font-size: 0.88em;
}

/* --- JAMA用フォレストプロット風の模式図（CSSのみ） --- */
.jama-forest {
  margin: 16px 0;
  padding: 16px;
  background: #fafdff;
  border: 1px solid #c5dde8;
  border-radius: 10px;
}
.jama-forest .jf-title {
  font-weight: 700;
  color: #0b3d5c;
  font-size: 0.95rem;
  margin-bottom: 10px;
  text-align: center;
}
.jama-forest .jf-row {
  display: grid;
  grid-template-columns: 140px 1fr 90px;
  gap: 10px;
  align-items: center;
  padding: 6px 0;
  font-size: 0.88rem;
  border-bottom: 1px dashed #dce6ea;
}
.jama-forest .jf-row:last-child { border-bottom: none; }
.jama-forest .jf-row .jf-study { font-weight: 600; color: #2c3e50; }
.jama-forest .jf-row .jf-plot {
  position: relative;
  height: 18px;
  background: linear-gradient(to right, transparent 49.5%, #5d7a8a 49.5%, #5d7a8a 50.5%, transparent 50.5%);
}
.jama-forest .jf-ci {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 2px;
  background: #1a5276;
}
.jama-forest .jf-point {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background: #1a5276;
  border-radius: 2px;
}
.jama-forest .jf-diamond {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: #d4941e;
}
.jama-forest .jf-est { font-family: ui-monospace, monospace; font-size: 0.82rem; text-align: right; color: #2c3e50; }
.jama-forest .jf-axis {
  display: grid;
  grid-template-columns: 140px 1fr 90px;
  gap: 10px;
  font-size: 0.76rem;
  color: #5d7a8a;
  padding-top: 6px;
  border-top: 1.5px solid #1a5276;
  margin-top: 4px;
}
.jama-forest .jf-axis .jf-axis-labels {
  display: flex;
  justify-content: space-between;
}

/* --- 4つの推奨パターン用グリッド（JAMA UG Ch26的） --- */
.jama-rec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.jama-rec-card {
  background: white;
  border: 1px solid #c5dde8;
  border-left: 5px solid #1a5276;
  border-radius: 10px;
  padding: 12px 14px;
}
.jama-rec-card.jrc-strong-for { border-left-color: #2d8a4e; }
.jama-rec-card.jrc-weak-for { border-left-color: #7ebf8e; }
.jama-rec-card.jrc-weak-against { border-left-color: #e89a3e; }
.jama-rec-card.jrc-strong-against { border-left-color: #c0392b; }
.jama-rec-card .jrc-tag {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  background: #eaf3f8;
  color: #1a5276;
  margin-bottom: 6px;
}
.jama-rec-card.jrc-strong-for .jrc-tag { background: #eaf7ef; color: #1b5d35; }
.jama-rec-card.jrc-weak-for .jrc-tag { background: #f1f8ed; color: #4a7a2e; }
.jama-rec-card.jrc-weak-against .jrc-tag { background: #fff2e0; color: #8a5510; }
.jama-rec-card.jrc-strong-against .jrc-tag { background: #fdeae7; color: #7a2317; }
.jama-rec-card .jrc-title { font-weight: 700; color: #2c3e50; font-size: 0.95rem; margin: 4px 0; }
.jama-rec-card p { font-size: 0.88rem; line-height: 1.65; margin: 4px 0; }

/* --- ユーザーズガイド対応表 --- */
.jama-map {
  overflow-x: auto;
  margin: 16px 0;
}
.jama-map table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.jama-map th, .jama-map td {
  padding: 8px 10px;
  border: 1px solid #c5dde8;
  text-align: left;
  vertical-align: top;
  line-height: 1.6;
}
.jama-map thead th {
  background: #1a5276;
  color: white;
  font-weight: 700;
}
.jama-map tbody tr:nth-child(even) { background: #f4f9fc; }

/* --- NMA用ネットワーク図（CSSのみ） --- */
.jama-network {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin: 16px 0;
}
.jama-network .jn-node {
  background: white;
  border: 2px solid #1a5276;
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}
.jama-network .jn-node-label {
  font-weight: 700;
  color: #1a5276;
  font-size: 0.9rem;
  margin-bottom: 4px;
}
.jama-network .jn-node-sub {
  font-size: 0.78rem;
  color: #5d7a8a;
}

/* --- 次セクションへ（JAMA章専用）--- */
.jama-next {
  margin: 24px 0 12px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #eaf3f8, #d5e7f1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 700;
  color: #0b3d5c;
  cursor: pointer;
  min-height: 48px;
  transition: all 0.2s;
}
.jama-next:hover { background: linear-gradient(135deg, #d5e7f1, #bfd8e6); transform: translateY(-1px); }

/* --- H2 見出しをよりスキャンしやすく --- */
.jama-h2 {
  position: relative;
  font-size: 1.18rem;
  color: #0b3d5c;
  margin: 28px 0 12px;
  padding: 8px 12px 8px 16px;
  background: linear-gradient(to right, #eaf3f8, transparent);
  border-left: 5px solid #1a5276;
  border-radius: 4px;
  line-height: 1.5;
}
.jama-h3 {
  font-size: 1.02rem;
  color: #1a5276;
  margin: 20px 0 8px;
  padding-left: 8px;
  border-left: 3px solid #7ab5d0;
  line-height: 1.5;
}

/* --- 出典明記行 --- */
.jama-source {
  margin-top: 24px;
  padding: 10px 12px;
  background: #f4f9fc;
  border-top: 2px solid #1a5276;
  font-size: 0.82rem;
  color: #5d7a8a;
  line-height: 1.65;
  border-radius: 0 0 8px 8px;
}
.jama-source strong { color: #1a5276; }

/* --- TOC の JAMA セクション装飾 --- */
.toc-btn.jama-toc .toc-num {
  background: #1a5276;
  color: white;
  font-size: 1rem;
}
.toc-btn.jama-toc {
  border-left: 3px solid #1a5276;
}

/* --- 比較並列ボックス --- */
.jama-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0;
}
.jama-compare .jcmp-box {
  padding: 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.7;
}
.jama-compare .jcmp-bad {
  background: #fdeae7;
  border: 1px solid #e89585;
  border-left: 4px solid #c0392b;
}
.jama-compare .jcmp-good {
  background: #eaf7ef;
  border: 1px solid #9ecaad;
  border-left: 4px solid #2d8a4e;
}
.jama-compare .jcmp-title {
  font-weight: 700;
  margin-bottom: 6px;
  display: block;
}
.jama-compare .jcmp-bad .jcmp-title { color: #7a2317; }
.jama-compare .jcmp-good .jcmp-title { color: #1b5d35; }

@media (max-width: 720px) {
  .jama-page-head { flex-direction: column; align-items: flex-start; }
  .jama-page-head .jph-title { font-size: 1.05rem; }
  .jama-compare { grid-template-columns: 1fr; }
  .jama-forest .jf-row, .jama-forest .jf-axis {
    grid-template-columns: 90px 1fr 70px;
    font-size: 0.78rem;
  }
  .jama-checklist ol > li { padding-left: 48px; }
  .jama-h2 { font-size: 1.05rem; }
}

/* --- 用語ハイライト（本文中） --- */
.jterm {
  background: linear-gradient(transparent 60%, #fdf2cf 60%);
  font-weight: 700;
  padding: 0 2px;
}
.jterm-en {
  font-size: 0.82em;
  color: #5d7a8a;
  font-style: italic;
  margin-left: 2px;
  font-weight: 500;
}

/* --- 既存章用 JAMAバッジ --- */
.jama-badge-inline {
  display: inline-block;
  background: #1a5276;
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  margin-right: 4px;
  vertical-align: middle;
}

/* ===== Core GRADE全体像 サムネイル＋モーダル（v1.5追加） ===== */
.cpg-overview-block {
  margin: 16px 0 18px;
  padding: 14px 12px;
  background: linear-gradient(135deg, #fff8eb 0%, #fffbf2 100%);
  border: 2px solid #d3a55a;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,.05);
}
.cpg-overview-title {
  font-size: 15px;
  font-weight: 700;
  color: #1a5276;
  margin-bottom: 10px;
  text-align: center;
  line-height: 1.45;
  letter-spacing: 0.02em;
}
.cpg-overview-thumb-btn {
  display: block;
  width: 100%;
  max-width: 260px; /* v1.8 小型サムネイル化 */
  background: #fff;
  border: 1px solid #e0d5b8;
  border-radius: 10px;
  padding: 6px;
  margin: 0 auto;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  font-family: inherit;
}
.cpg-overview-thumb-btn:hover {
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
  border-color: #d3a55a;
}
.cpg-overview-thumb-btn:active { transform: scale(0.985); }
.cpg-overview-thumb-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}
.cpg-overview-thumb-hint {
  display: block;
  text-align: center;
  font-size: 12px;
  color: #6a4a1a;
  padding: 10px 0 2px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* モーダル（全画面表示） */
.cpg-overview-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,0.94);
  display: none;
  flex-direction: column;
}
.cpg-overview-modal.open {
  display: flex;
  animation: cpgFadeIn .18s ease;
}
@keyframes cpgFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.cpg-overview-modal-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  flex-shrink: 0;
  gap: 8px;
}
.cpg-overview-modal-title {
  font-size: 13px;
  font-weight: 700;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cpg-overview-modal-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.cpg-overview-modal-btn {
  min-width: 44px;
  min-height: 44px;
  padding: 0 14px;
  background: rgba(255,255,255,0.18);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
  font-family: inherit;
}
.cpg-overview-modal-btn:hover { background: rgba(255,255,255,0.32); }
.cpg-overview-modal-btn:active { background: rgba(255,255,255,0.45); }
.cpg-overview-modal-body {
  flex: 1;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  align-items: safe center; /* v1.8 オーバーフロー時に左/上が切れない */
  justify-content: safe center;
  padding: 8px;
  /* v1.9 fix: pinch-zoom 単独指定だと1本指スワイプが無効になるため、
     manipulation（pan-x pan-y pinch-zoom 同等）に変更してパン操作を有効化 */
  touch-action: manipulation;
  overscroll-behavior: contain;
}
.cpg-overview-modal-img {
  display: block;
  height: auto;
  /* v1.8 デフォルトで読める大きさ：モバイルでは画像が画面より広くなりパン操作が必要 */
  width: max(100%, 900px);
  max-width: none;
  margin: 0 auto;
  cursor: zoom-in;
  transition: width .25s ease;
}
.cpg-overview-modal-img.zoomed {
  width: max(180%, 1500px);
  cursor: zoom-out;
}
@media (min-width: 768px) {
  .cpg-overview-modal-img { width: min(100%, 1200px); }
  .cpg-overview-modal-img.zoomed { width: min(160%, 1800px); }
}
@media (min-width: 1400px) {
  .cpg-overview-modal-img { width: min(100%, 1400px); }
  .cpg-overview-modal-img.zoomed { width: min(120%, 2000px); }
}
.cpg-overview-modal-hint {
  font-size: 11px;
  font-weight: normal;
  opacity: .7;
  margin-left: 4px;
}
body.cpg-overview-open { overflow: hidden; }

/* ===== スライド学習版ボタン（v1.8追加） ===== */
.slide-btn {
  background: linear-gradient(135deg, rgba(20,148,138,0.30) 0%, rgba(72,200,170,0.18) 100%);
  border-color: rgba(72,200,170,0.55);
}
.slide-btn .slide-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #14948a;
  color: white;
  font-size: 1.3rem;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(20,148,138,0.45);
}
.slide-btn .btn-label { color: #a3e9dd; }

/* ==================================================== */
/*  v1.4.1 ページ内メニューボタン & Primerフォント調整   */
/* ==================================================== */

/* --- 各ページ先頭に置く「目次を開く」バー --- */
.in-page-menu-bar {
  display: flex;
  justify-content: flex-start;
  margin: 0 0 14px 0;
  padding: 0;
}
.in-page-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1.5px solid var(--primary);
  color: var(--primary);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: 0 2px 6px rgba(26,82,118,0.08);
  min-height: 40px;
}
.in-page-menu-btn .ipm-icon {
  font-size: 1.15rem;
  line-height: 1;
}
.in-page-menu-btn:hover,
.in-page-menu-btn:focus {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 10px rgba(26,82,118,0.25);
  transform: translateY(-1px);
}
.in-page-menu-btn:active { transform: translateY(0); }

/* JAMA UG ページでは青系の強調トーンに */
#page-26 .in-page-menu-btn,
#page-27 .in-page-menu-btn,
#page-28 .in-page-menu-btn {
  border-color: #1a5276;
  color: #1a5276;
}
#page-26 .in-page-menu-btn:hover,
#page-27 .in-page-menu-btn:hover,
#page-28 .in-page-menu-btn:hover {
  background: #1a5276;
  color: white;
}

/* 表紙（page-0）ではやや控えめに上に浮かせる */
#page-0 .in-page-menu-bar { margin-bottom: 10px; }

/* --- chapter-nav の真ん中の目次ボタン --- */
.chapter-nav-menu {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: white;
  border: 1.5px solid var(--primary);
  color: var(--primary);
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.15s;
  min-height: 44px;
  margin: 0 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.chapter-nav-menu:hover,
.chapter-nav-menu:focus {
  background: var(--primary);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(26,82,118,0.25);
}
.chapter-nav-menu:active { transform: translateY(0); }

/* chapter-nav を flex にして中央ボタンを中央配置 */
.chapter-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

/* --- Primer のフォントをスマホで読みやすく --- */
@media (max-width: 760px) {
  /* 本文段落全般 */
  #page-25 .page-body p,
  #page-25 .page-body li,
  #page-25 .primer-why p,
  #page-25 .primer-why li {
    font-size: 1rem !important;
    line-height: 1.85 !important;
  }

  /* 図キャプションを読みやすく */
  #page-25 .primer-fig figcaption {
    font-size: 0.92rem !important;
    line-height: 1.6 !important;
    padding: 8px 10px;
    color: #2c3e50;
  }

  /* 見出しも少し上げる */
  #page-25 .primer-h2 {
    font-size: 1.15rem !important;
  }
  #page-25 .primer-h2-new {
    font-size: 1.15rem !important;
  }

  /* 小見出し（h3, h4）のスマホサイズ */
  #page-25 h3,
  #page-25 .primer-final h3 {
    font-size: 1.05rem !important;
    line-height: 1.6 !important;
  }
  #page-25 h4 { font-size: 1rem !important; line-height: 1.55 !important; }

  /* 箇条書き内の文字 */
  #page-25 .misunderstand-list li,
  #page-25 .principle-list li,
  #page-25 .sr-steps li,
  #page-25 .primer-5a .a-step,
  #page-25 .compare-box {
    font-size: 1rem !important;
    line-height: 1.8 !important;
  }

  /* Q&A セクションも大きめに */
  #page-25 .qa-q .qa-title { font-size: 1rem !important; }
  #page-25 .qa-a { font-size: 1rem !important; line-height: 1.85 !important; }

  /* ピクトグラム / バッジの可読性 */
  #page-25 .primer-badge { font-size: 0.88rem; }

  /* サブセクション間の区切り空間を少し広く（読み疲れ軽減） */
  #page-25 .primer-fig { margin: 14px 0 20px; }
  #page-25 .primer-fig img {
    width: 100%;
    height: auto;
    max-width: 100%;
  }

  /* ガイア先生の引用吹き出し */
  #page-25 .guyatt-quote .gq-body { font-size: 1rem !important; line-height: 1.8 !important; }
  #page-25 .guyatt-quote .gq-cite { font-size: 0.88rem !important; }

  /* ターゲットボックス・OIS判定などの説明文 */
  #page-25 .target-box p,
  #page-25 .ois-judgment p,
  #page-25 .rob-example p,
  #page-25 .subgroup-box p,
  #page-25 .rec-factors p {
    font-size: 0.98rem !important;
    line-height: 1.75 !important;
  }

  /* パンチライン */
  #page-25 .primer-punchline { font-size: 1.02rem !important; line-height: 1.8 !important; }
  #page-25 .primer-punchline .sub { font-size: 0.9rem !important; }

  /* ボタンとチップ */
  #page-25 .sec-next { font-size: 0.98rem !important; }

  /* chapter-nav のレイアウトを縦積みで大きめに */
  .chapter-nav {
    gap: 10px;
  }
  .chapter-nav button {
    font-size: 0.95rem;
    padding: 10px 14px;
  }
  .chapter-nav-menu {
    flex: 1 1 100%;
    order: 3;
    min-height: 44px;
  }
  /* 左右のボタンは 1 行に並べる */
  .chapter-nav > button:not(.chapter-nav-menu) { flex: 1 1 45%; }

  /* in-page-menu-btn もタップしやすく */
  .in-page-menu-btn {
    font-size: 0.95rem;
    padding: 10px 16px;
    min-height: 44px;
  }
}

/* さらに小さい画面 */
@media (max-width: 420px) {
  #page-25 .page-body p,
  #page-25 .page-body li { font-size: 0.98rem !important; }
  #page-25 .primer-fig figcaption { font-size: 0.88rem !important; }
  #page-25 .primer-h2 { font-size: 1.08rem !important; }
}

/* ===== 診療ガイドラインあら探しシリーズ（Ch17・v1.10追加） ===== */
.aratan-block {
  margin: 18px 0 22px;
  border: 2px solid #d4561a;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff3e0 0%, #ffeadb 100%);
  box-shadow: 0 3px 10px rgba(0,0,0,0.06);
  overflow: hidden;
}
.aratan-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background 0.15s;
  min-height: 56px;
}
.aratan-summary::-webkit-details-marker { display: none; }
.aratan-summary::marker { display: none; content: ''; }
.aratan-summary:hover { background: rgba(255,255,255,0.5); }
.aratan-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: #d4561a;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 3px 10px rgba(212,86,26,0.4);
}
.aratan-summary-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.aratan-summary-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #7a2e08;
  line-height: 1.4;
}
.aratan-summary-sub {
  font-size: 0.82rem;
  color: #8a4a20;
  opacity: 0.92;
}
.aratan-summary-toggle {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(212,86,26,0.18);
  color: #d4561a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  transition: transform 0.25s ease;
}
.aratan-block[open] .aratan-summary-toggle { transform: rotate(180deg); }
.aratan-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 6px 12px 14px;
  background: rgba(255,255,255,0.5);
}
.aratan-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #efd9c4;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s;
  min-height: 56px;
}
.aratan-item:hover {
  background: #fff8f0;
  border-color: #d4561a;
  transform: translateX(2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}
.aratan-mark {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1.05rem;
  color: #fff;
  font-weight: 700;
  margin-top: 2px;
}
.aratan-yt .aratan-mark { background: #ff3b30; }
.aratan-note .aratan-mark { background: #41c9b4; font-size: 1rem; }
.aratan-paper .aratan-mark { background: #2980b9; font-size: 1rem; }
.aratan-docswell .aratan-mark { background: #e8a93b; color: #5a3c00; font-size: 1rem; }
.aratan-x .aratan-mark { background: #1a1a1a; font-size: 1.05rem; }
.aratan-item-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.aratan-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  background: #f5e6d6;
  color: #7a4a20;
  letter-spacing: 0.04em;
  line-height: 1.5;
}
.aratan-tag-special { background: #d4561a; color: #fff; }
.aratan-tag-paper { background: #2980b9; color: #fff; }
.aratan-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: #2c3e50;
  line-height: 1.5;
}
.aratan-dsc {
  font-size: 0.8rem;
  color: #5a6878;
  line-height: 1.55;
}

/* スマホ調整 */
@media (max-width: 480px) {
  .aratan-summary { padding: 14px 12px; gap: 10px; }
  .aratan-summary-title { font-size: 0.98rem; }
  .aratan-summary-sub { font-size: 0.74rem; }
  .aratan-icon { width: 40px; height: 40px; font-size: 1.2rem; }
  .aratan-summary-toggle { width: 28px; height: 28px; font-size: 0.8rem; }
  .aratan-list { padding: 6px 8px 12px; }
  .aratan-item { padding: 10px 12px; gap: 10px; }
  .aratan-mark { width: 34px; height: 34px; font-size: 0.95rem; }
  .aratan-name { font-size: 0.88rem; }
  .aratan-dsc { font-size: 0.76rem; }
  .aratan-tag { font-size: 0.66rem; padding: 1px 6px; }
}

/* ===== 章プレリュード動画ボタン（Ch7・v1.11追加 — 各章上部の学習動画リンク用） ===== */
.ch-prelude-video {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  margin: 0 0 18px;
  background: linear-gradient(135deg, #fff0ec 0%, #ffe7e0 100%);
  border: 2px solid #ff3b30;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  box-shadow: 0 3px 10px rgba(255,59,48,0.12);
  min-height: 64px;
}
.ch-prelude-video:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(255,59,48,0.28);
  border-color: #e02a1f;
}
.cpv-mark {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #ff3b30;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 3px 10px rgba(255,59,48,0.45);
}
.cpv-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.cpv-tag {
  font-size: 0.7rem;
  font-weight: 700;
  color: #c41a0e;
  letter-spacing: 0.05em;
}
.cpv-title {
  font-size: 1rem;
  font-weight: 700;
  color: #2c3e50;
  line-height: 1.45;
}
.cpv-dsc {
  font-size: 0.82rem;
  color: #5a6878;
  line-height: 1.5;
}
.cpv-arrow {
  flex-shrink: 0;
  font-size: 1.3rem;
  color: #ff3b30;
  font-weight: 700;
  margin-left: 4px;
}
@media (max-width: 480px) {
  .ch-prelude-video { padding: 12px 14px; gap: 10px; }
  .cpv-mark { width: 42px; height: 42px; font-size: 1.2rem; }
  .cpv-title { font-size: 0.95rem; }
  .cpv-dsc { font-size: 0.78rem; }
  .cpv-tag { font-size: 0.66rem; }
}
