@charset "utf-8";
/* ==========================================================================
   記事ページ カスタム（開発指示書 ③〜⑨・⑩⑪⑫⑮）
   本文ラッパー：.single_content_texts（指示書の .article-body）
   SP：max-width 735px（既存 blog.css の min-width:736px に合わせる）
   !important は記事本文のインライン style を上書きする箇所だけに使う（各所にコメント）
   ========================================================================== */
:root {
  --ab-color-body: #333;
  --ab-gold: #aa873d;
  --ab-gold-dark: #6b562e;
  --ab-line: #a5955f;
  --ab-border: #d8d2c8;
  --ab-beige: #faf7f0;

  --ab-fs-body: 16px;
  --ab-fs-h2: 26px;
  --ab-fs-h3: 21px;
  --ab-fs-h4: 18px;
  --ab-fs-table: 14px;
  --ab-fs-note: 12px;

  --ab-lh-body: 1.9;
  --ab-lh-li: 1.8;
  --ab-lh-table: 1.6;
  --ab-p-gap: 1.1em;

  --ab-h2-mt: 64px;
  --ab-h2-mb: 24px;
  --ab-h3-mt: 40px;
  --ab-h3-mb: 16px;
  --ab-h4-mt: 32px;
  --ab-h4-mb: 12px;
  --ab-h3-after-h2: 16px;
  --ab-h4-after-h3: 12px;

  --ab-table-gap: 32px;
  --ab-note-gap: 10px;
  --ab-media-gap: 32px;
  --ab-caption-gap: 8px;
}
@media (max-width: 735px) {
  :root {
    --ab-fs-body: 15px;
    --ab-fs-h2: 20px;
    --ab-fs-h3: 18px;
    --ab-fs-h4: 16px;
    --ab-fs-table: 13px;
    --ab-fs-note: 11px;

    --ab-h2-mt: 48px;
    --ab-h2-mb: 20px;
    --ab-h3-mt: 32px;
    --ab-h4-mt: 24px;

    --ab-media-gap: 24px;
  }
}


/* ② 更新日
   -------------------------------------------------------------------------- */
.single_contents .bm-date time { font: inherit; color: inherit; }


/* ③ 文字サイズ ／ ④ 行間
   -------------------------------------------------------------------------- */
.single_content_texts {
  font-size: var(--ab-fs-body);
  color: var(--ab-color-body);
}
.single_content_texts p {
  font-size: var(--ab-fs-body);
  line-height: var(--ab-lh-body);
}
.single_content_texts li {
  font-size: var(--ab-fs-body);
  line-height: var(--ab-lh-li);
}
.single_content_texts > p { margin-bottom: var(--ab-p-gap); }
.single_content_texts h2 { font-size: var(--ab-fs-h2); }
.single_content_texts h3 { font-size: var(--ab-fs-h3); }
.single_content_texts h4 { font-size: var(--ab-fs-h4); }

/* blog.css の「.single_content_texts table th」に合わせて同じ詳細度で上書き */
.single_content_texts table th,
.single_content_texts table td {
  font-size: var(--ab-fs-table);
  line-height: var(--ab-lh-table);
}
.single_content_texts table th p,
.single_content_texts table td p { font-size: inherit; line-height: inherit; }

/* 「この記事でわかること」ボックスは p にインラインの line-height(1.7/1.8) があるため上書き */
.single_content_texts [data-bm-component="article-takeaways"] p { line-height: var(--ab-lh-body) !important; }

/* 注釈・出典：PRIMARY SOURCE と「※」で始まる段落（.is-note は JS が付与）
   ラベルや注釈にインラインの font-size(.8em) があるため上書き */
.single_content_texts [data-bm-component="primary-source"] p,
.single_content_texts p.is-note,
.single_content_texts [data-bm-component$="-table"] + p {
  font-size: var(--ab-fs-note) !important;
  line-height: 1.7;
}

/* 本文冒頭の JSON-LD だけを包んだ段落は余白を持たない */
.single_content_texts > p:has(> script:only-child) { margin: 0; }


/* ⑤ 見出しの上下余白
   -------------------------------------------------------------------------- */
.single_content_texts h2 { margin-top: var(--ab-h2-mt); margin-bottom: var(--ab-h2-mb); }
.single_content_texts h3 { margin-top: var(--ab-h3-mt); margin-bottom: var(--ab-h3-mb); }
.single_content_texts h4 { margin-top: var(--ab-h4-mt); margin-bottom: var(--ab-h4-mb); }
.single_content_texts h2 + h3 { margin-top: var(--ab-h3-after-h2); }
.single_content_texts h2 + h4,
.single_content_texts h3 + h4 { margin-top: var(--ab-h4-after-h3); }
.single_content_texts > :first-child,
.single_content_texts > p:first-child:has(> script:only-child) + * { margin-top: 0; }


/* ⑥ 目次の折りたたみ（Easy Table of Contents。クラスは JS が付与）
   -------------------------------------------------------------------------- */
#ez-toc-container.bm-toc nav {
  position: relative;
  overflow: hidden;
  transition: max-height .3s ease;
}
#ez-toc-container.bm-toc.is-collapsed nav ul ul { display: none; }
#ez-toc-container.bm-toc.is-collapsed nav > ul > li:nth-child(n+7) { display: none; }
#ez-toc-container.bm-toc.is-collapsed nav::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 48px;
  background: linear-gradient(to bottom, transparent, var(--bm-toc-bg, #fff));
  pointer-events: none;
}
#ez-toc-container .bm-toc__toggle {
  display: block;
  margin: 12px auto 0;
  padding: 8px 24px;
  border: 1px solid var(--ab-line);
  border-radius: 0;
  background: #fff;
  color: #101010;
  font-family: yu-mincho-pr6, 游明朝, "Yu Mincho", YuMincho, "Hiragino Mincho ProN", HGS明朝E, serif;
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: .06em;
  cursor: pointer;
}
#ez-toc-container .bm-toc__toggle:hover { background: var(--ab-line); color: #fff; }
#ez-toc-container .bm-toc__toggle:focus-visible { outline: 2px solid var(--ab-gold); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  #ez-toc-container.bm-toc nav { transition: none; }
}


/* ⑦ 表の上下余白
   -------------------------------------------------------------------------- */
.single_content_texts table { margin-top: var(--ab-table-gap); margin-bottom: var(--ab-table-gap); }
.single_content_texts .table-scroll > table { margin-top: 0; margin-bottom: 0; }
.single_content_texts .table-scroll-frame { margin: var(--ab-table-gap) 0; }
/* 既存の表ラッパー（インライン margin:28px 0）。JS 無効時はそのまま、JS 有効時は外枠に余白を移す */
.single_content_texts [data-bm-component$="-table"] {
  margin-top: var(--ab-table-gap) !important;
  margin-bottom: var(--ab-table-gap) !important;
}
.single_content_texts .table-scroll-frame [data-bm-component$="-table"] {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}
/* 表直後の「※」注釈：表との距離 10px、注釈の下 32px（インライン margin:-20px 0 28px を上書き。
   表の下余白 32px と相殺させて 10px にする） */
.single_content_texts [data-bm-component$="-table"] + p,
.single_content_texts .table-scroll-frame + p.is-table-note {
  margin-top: calc(var(--ab-note-gap) - var(--ab-table-gap)) !important;
  margin-bottom: var(--ab-table-gap) !important;
}


/* ⑧ 画像・動画の上下余白（ブロック配置の画像のみ）
   -------------------------------------------------------------------------- */
.single_content_texts > p:has(> img:only-child),
.single_content_texts > p:has(> a:only-child > img:only-child),
.single_content_texts > p:has(> iframe:only-child),
.single_content_texts figure,
.single_content_texts .wp-caption,
.single_content_texts .wp-block-embed {
  margin-top: var(--ab-media-gap);
  margin-bottom: var(--ab-media-gap);
}
/* CTAバナー・動画ボックスはインライン margin:30px があるため上書き（見た目は変えない） */
.single_content_texts [data-bm-component="image-cta"],
.single_content_texts [data-bm-component="youtube-cta"] {
  margin-top: var(--ab-media-gap) !important;
  margin-bottom: var(--ab-media-gap) !important;
}
.single_content_texts > p:has(> img:only-child) img,
.single_content_texts > p:has(> a:only-child > img:only-child) a,
.single_content_texts > p:has(> a:only-child > img:only-child) img,
.single_content_texts figure img,
.single_content_texts .wp-caption img,
.single_content_texts [data-bm-component="image-cta"] a,
.single_content_texts [data-bm-component="image-cta"] img { margin-bottom: 0; }
.single_content_texts figcaption,
.single_content_texts .wp-caption-text {
  margin-top: var(--ab-caption-gap);
  margin-bottom: 0;
}


/* ⑨ 表の横スクロール（SP のみ。PC はラッパーだけ追加してスタイルなし）
   -------------------------------------------------------------------------- */
.single_content_texts .table-scroll-hint { display: none; }
@media (max-width: 735px) {
  .single_content_texts .table-scroll-body { position: relative; }
  .single_content_texts .table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .single_content_texts .table-scroll > table { min-width: var(--ab-table-min, 600px); }
  .single_content_texts .table-scroll th:first-child,
  .single_content_texts .table-scroll td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    box-shadow: 1px 0 0 var(--ab-border);
  }
  /* 先頭列が td の行は透けないよう行の背景（白）を敷く。th はインラインの背景色のまま */
  .single_content_texts .table-scroll td:first-child { background: #fff; }

  .single_content_texts .table-scroll-body::before,
  .single_content_texts .table-scroll-body::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 20px;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transition: opacity .2s;
  }
  .single_content_texts .table-scroll-body::before { left: 0; background: linear-gradient(to right, rgba(0, 0, 0, .14), rgba(0, 0, 0, 0)); }
  .single_content_texts .table-scroll-body::after { right: 0; background: linear-gradient(to left, rgba(0, 0, 0, .14), rgba(0, 0, 0, 0)); }
  .single_content_texts .table-scroll-frame.is-scrollable-left .table-scroll-body::before,
  .single_content_texts .table-scroll-frame.is-scrollable-right .table-scroll-body::after { opacity: 1; }

  .single_content_texts .table-scroll-hint:not([hidden]) {
    display: block;
    margin: 0 0 6px;
    font-size: 11px;
    line-height: 1.6;
    color: #888;
    text-align: center;
  }
}


/* ⑩⑪ 著者ボックス
   本文内（⑪）では blog.css の p / a / img / ul の汎用指定を受けるため、ここで打ち消す
   -------------------------------------------------------------------------- */
/* blog.css の「.blog aside」（サイドバー用：幅30%・縦並び・右寄せ）を打ち消す */
.blog .author-box {
  flex-direction: row;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}
.author-box p,
.author-box ul,
.author-box img,
.author-box a { margin: 0; }
.author-box a { display: inline; font-weight: inherit; }
.author-box img { display: block; border-radius: 50%; object-fit: cover; }

.blog .author-box--compact {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 6px 0 0;
  padding: 10px 14px;
  border: 1px solid var(--ab-border);
  background: var(--ab-beige);
  box-sizing: border-box;
}
.author-box--compact .author-box__photo { display: block; flex: 0 0 48px; }
.author-box--compact img { width: 48px; height: 48px; }
.author-box--compact .author-box__body { flex: 1 1 auto; min-width: 0; }
.author-box--compact .author-box__head { font-size: 15px; line-height: 1.5; }
.author-box--compact .author-box__label {
  display: inline-block;
  margin-right: 8px;
  padding: 1px 8px;
  background: var(--ab-gold);
  color: #fff;
  font-size: 11px;
  line-height: 1.6;
  vertical-align: 1px;
}
.author-box--compact .author-box__name { color: #222; font-weight: bold; text-decoration: none; }
.author-box--compact .author-box__role { font-size: 12px; line-height: 1.5; color: #777; }
.author-box--compact .author-box__more {
  flex: 0 0 auto;
  color: var(--ab-gold-dark);
  font-size: 12px;
  text-decoration: underline;
  white-space: nowrap;
}
.author-box--compact a:hover { opacity: .75; }
@media (max-width: 735px) {
  .blog .author-box--compact { flex-wrap: wrap; row-gap: 6px; padding: 10px 12px; }
  .author-box--compact .author-box__more { flex-basis: 100%; text-align: right; }
}

.blog .author-box--full {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin: 40px 0 32px;
  padding: 24px;
  border: 1px solid var(--ab-border);
  border-top: 4px solid var(--ab-gold);
  background: #fff;
  box-sizing: border-box;
}
.author-box--full .author-box__photo { flex: 0 0 96px; }
.author-box--full img { width: 96px; height: 96px; }
.author-box--full .author-box__body { flex: 1 1 auto; min-width: 0; }
.single_content_texts .author-box--full p { font-size: 14px; line-height: 1.8; }
.single_content_texts .author-box--full .author-box__label {
  display: inline-block;
  padding: 1px 10px;
  background: var(--ab-gold);
  color: #fff;
  font-size: 12px;
  letter-spacing: .08em;
}
.single_content_texts .author-box--full .author-box__name {
  margin-top: 6px;
  font-family: yu-mincho-pr6, 游明朝, "Yu Mincho", YuMincho, "Hiragino Mincho ProN", HGS明朝E, serif;
  font-size: 20px;
  line-height: 1.5;
}
.author-box--full .author-box__name a { color: #222; text-decoration: none; }
.single_content_texts .author-box--full .author-box__role { color: #777; font-size: 13px; }
.single_content_texts .author-box--full .author-box__bio {
  display: -webkit-box;
  margin-top: 10px;
  overflow: hidden;
  color: #555;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}
.author-box__credentials { margin-top: 10px; padding: 0; }
.single_content_texts .author-box__credentials li,
.author-box__credentials li {
  margin: 0 0 2px 1.2em;
  font-size: 13px;
  line-height: 1.7;
  list-style: disc;
}
.author-box__sns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; padding: 0; }
.single_content_texts .author-box__sns li,
.author-box__sns li { margin: 0; list-style: none; font-size: 13px; }
.author-box__sns a {
  display: inline-block;
  padding: 2px 10px;
  border: 1px solid var(--ab-border);
  color: var(--ab-gold-dark);
  text-decoration: none;
}
.single_content_texts .author-box--full .author-box__button,
.author-box--full .author-box__button {
  display: inline-block;
  margin-top: 14px;
  padding: 9px 20px;
  border: 1px solid #111;
  background: #111;
  color: #fff;
  font-size: 13px;
  font-weight: bold;
  text-decoration: none;
}
.author-box--full .author-box__button:hover { background: #fff; color: #111; opacity: 1; }
@media (max-width: 735px) {
  .blog .author-box--full { flex-direction: column; align-items: center; gap: 14px; padding: 20px 16px; text-align: center; }
  .author-box--full .author-box__photo { flex-basis: auto; }
  .author-box--full img { width: 72px; height: 72px; }
  .author-box--full .author-box__bio,
  .author-box--full .author-box__credentials { text-align: left; }
  .author-box__sns { justify-content: center; }
}


/* ⑮ 関連記事カード ／ ⑫ 著者詳細ページの記事一覧
   -------------------------------------------------------------------------- */
.bm-related { margin: 48px 0; }
/* 本文 h2（blog.css .single_content_texts h2）と同じ見た目 */
.bm-section-title {
  margin: 0 0 24px;
  padding: 15px;
  border-left: 3px solid var(--ab-line);
  background: #f5f5f1;
  color: #101010;
  font-family: yu-mincho-pr6, 游明朝, "Yu Mincho", YuMincho, "Hiragino Mincho ProN", HGS明朝E, serif;
  font-size: var(--ab-fs-h2);
  font-weight: 400;
  line-height: 1.4;
}
.bm-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.bm-card { margin: 0; list-style: none; }
/* blog.css の「.blog a { display:inline-block }」より強くする */
.bm-cards .bm-card__link { display: block; color: #222; text-decoration: none; }
.bm-card__thumb {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid #eee;
  background: #f5f5f1;
}
.bm-card__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
  transition: transform .3s ease;
}
.bm-card__body { display: block; padding-top: 8px; }
.bm-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-bottom: 6px; }
.bm-card__cat {
  padding: 3px 6px 2px;
  border: 1px solid #444;
  color: #444;
  font-size: 11px;
  line-height: 1;
}
.bm-card__date {
  color: #b08f4d;
  font-family: cormorant-garamond, serif;
  font-size: 13px;
  line-height: 1;
}
.bm-card__title {
  display: -webkit-box;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
@media (hover: hover) {
  .bm-card__link:hover { opacity: 1; }
  .bm-card__link:hover .bm-card__thumb img { transform: scale(1.05); }
  .bm-card__link:hover .bm-card__title { text-decoration: underline; }
}
@media (max-width: 735px) {
  .bm-related { margin: 40px 0; }
  .bm-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
  .bm-card__title { font-size: 13px; }
}


/* ⑫ 著者詳細ページ
   -------------------------------------------------------------------------- */
.bm-writer__profile {
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 32px 0 48px;
  padding: 28px;
  border: 1px solid var(--ab-border);
  border-top: 4px solid var(--ab-gold);
  background: #fff;
}
.bm-writer__photo { flex: 0 0 160px; }
.bm-writer__photo img { display: block; width: 160px; height: 160px; border-radius: 50%; object-fit: cover; }
.bm-writer__summary p { margin: 0; }
.bm-writer__label {
  display: inline-block;
  padding: 1px 10px;
  background: var(--ab-gold);
  color: #fff;
  font-size: 12px;
  letter-spacing: .08em;
}
.bm-writer__summary .bm-writer__name {
  margin-top: 8px;
  font-family: yu-mincho-pr6, 游明朝, "Yu Mincho", YuMincho, "Hiragino Mincho ProN", HGS明朝E, serif;
  font-size: 26px;
  line-height: 1.4;
}
.bm-writer__role { color: #777; font-size: 14px; }
.bm-writer__section { margin: 0 0 48px; }
.bm-writer__credentials { margin: 0; padding: 0 0 0 1.2em; }
.bm-writer__credentials li { list-style: disc; font-size: var(--ab-fs-body); line-height: var(--ab-lh-li); }
@media (max-width: 735px) {
  .bm-writer__profile { flex-direction: column; gap: 16px; padding: 24px 16px; text-align: center; }
  .bm-writer__photo { flex-basis: auto; }
  .bm-writer__photo img { width: 120px; height: 120px; }
  .bm-writer__name { font-size: 22px; }
}
