/*
Theme Name: Lab23 Child
Description: Lab23の子テーマです
Author:
Author URI:
Template: lab23
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

/* ============================================================
   0. 見出し用Webフォント（Zen Maru Gothic Medium / 500）
   - Zen Maru Gothic は 500 の1ウェイトのみ読み込み（font-weight:400 は無い）
   - 通常太さが必要な箇所（新着タイトル等）はヒラギノ系に切り替える
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Zen+Maru+Gothic:wght@500&display=swap');

.p-entry-ttl,
.p-archive-ttl,
.p-entry-item__ttl,
.l23b-latest-post-card__title,
.l-content-main h2,
.l-content-main h3,
.l-content-main h4,
.l-sidebar .wp-block-heading,
.l-sidebar .wp-block-search__label {
  font-family: 'Zen Maru Gothic', 'Hiragino Kaku Gothic ProN', sans-serif;
  font-weight: 500;
}

.l-sidebar .wp-block-heading,
.l-sidebar .wp-block-search__label {
  font-size: 1.125rem !important;   /* ≒18px。本文より一段大きく節を立てる */
}

/* 本文見出しのジャンプ率（下層ページ用。テーマに勝つよう !important）
   ※トップの最終的な文字調整とは別。ここは記事本文の見出し段差 */
.l-content-main h2 {
  font-size: 1.65rem !important;
  line-height: 1.55;
  margin: 2.6rem 0 0.9rem;
}
.l-content-main h3 {
  font-size: 1.3rem !important;
  line-height: 1.55;
  margin: 2rem 0 0.7rem;
}
.l-content-main h4 {
  font-size: 1.12rem !important;
  margin: 1.6rem 0 0.6rem;
}
/* 見出し内 strong は太らせない（見出しの太さ500に揃える） */
.l-content-main h2 strong,
.l-content-main h3 strong,
.l-content-main h4 strong {
  font-weight: 500 !important;
}
/* 記事タイトル(H1)をH2より大きく保つ（テーマが@mediaで上書きするため !important） */
.p-entry-ttl {
  font-size: 2rem !important;
}

/* ============================================================
   サムネイル表示調整
   前提：画像は「白背景＋中央に小さな円形水彩」。CSSで小さく円形に見せる
   ============================================================ */
:root {
  --thumb-frame-border: none;
  --thumb-frame-bg: #FAF8F3;   /* 円の地色：生成り */
  --thumb-sidebar: 72px;
  --thumb-list: 64px;
}

/* 1. サイドバー「新着記事」 → 小さな円形 */
.l23b-latest-post-card__thumb {
  width: var(--thumb-sidebar);
  height: var(--thumb-sidebar);
  flex: 0 0 var(--thumb-sidebar);
  margin: 0;
  border-radius: 50%;
  overflow: hidden;
  background: var(--thumb-frame-bg);
  border: var(--thumb-frame-border);
}
.l23b-latest-post-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 2. 記事一覧（左カラム） → 小さな円形＋サムネ左/本文右の横並び */
.p-entry-item__thumb {
  width: var(--thumb-list);
  height: var(--thumb-list);
  flex: 0 0 var(--thumb-list);
  margin: 0;
  border-radius: 50%;
  overflow: hidden;
  background: var(--thumb-frame-bg);
  border: var(--thumb-frame-border);
}
.p-entry-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* テーマは ≥768px でカード格子。縦1列に変えてタイトルの早期改行を防ぐ */
.p-entries {
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  gap: 0 !important;
}
.p-entry-item {
  width: 100%;
  border-bottom: 1px solid #ECE7DE;   /* 箱で囲わず淡い線で1件ずつ区切る */
}
.p-entry-item:last-child {
  border-bottom: none;
}
.p-entry-item__inner {
  display: flex;
  flex-direction: row !important;     /* テーマの縦積みを横並びに上書き */
  align-items: center;
  gap: 18px;
  height: auto;
  padding: 1rem 0;
}
.p-entry-item__content {
  flex: 1;
  min-width: 0;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
.l-content-main .p-entry-item__ttl {
  font-size: 17px !important;   /* 本文h2を継いで大きすぎるため一覧用に抑える */
  line-height: 1.5;
  margin: 0 0 0.2rem;
}
.p-entry-item__info {
  display: flex;
  align-items: center;
  gap: 0.8em;
  font-size: 12px;
  color: #9A958C;
  padding-top: 0 !important;
}
.p-entry-item__date,
.p-entry-item__post-date {
  color: #9A958C;
}

/* 3. 個別記事ページ冒頭アイキャッチ → 小さな円形・タイトル左に添える
   ※Lab23はbodyにhas-post-thumbnailを付けないため :has() で分岐 */
body:not(.home) .p-entry-header__inner {
  position: relative;
}
body:not(.home) .p-entry-header__inner:has(.p-entry-eyecatch) {
  padding-left: 92px;   /* 円72px + 余白20px */
}
.p-entry-eyecatch {
  position: absolute;
  top: 0;
  left: 0;
  margin: 0;
}
.p-entry-eyecatch img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 50%;
  background: var(--thumb-frame-bg);
  border: var(--thumb-frame-border);
  display: block;
}
@media screen and (max-width: 600px) {
  body:not(.home) .p-entry-header__inner:has(.p-entry-eyecatch) {
    padding-left: 72px;
  }
  .p-entry-eyecatch img {
    width: 56px;
    height: 56px;
  }
}

/* 円の輪郭は線ではなく極薄の影で（墨4%の1pxリング） */
.l23b-latest-post-card__thumb,
.p-entry-item__thumb,
.p-entry-eyecatch img {
  box-shadow: 0 0 0 1px rgba(58, 54, 50, 0.04);
}

/* ============================================================
   4. トップページのみ 1カラム（サイドバー非表示）
   - body.home 限定。下層ページは2カラムのまま
   ============================================================ */
body.home .l-sidebar {
  display: none;
}
body.home .p-entry-header {
  display: none;   /* トップでは記事ヘッダー（タイトル・下線）を隠す */
}
body.home .p-entry-footer {
  display: none;   /* 空のフッター枠の border だけ残るのを防ぐ */
}
body.home .c-breadcrumbs,
body.home .c-breadcrumbs__list {
  display: none;
}
/* ≥992px の2カラム指定（width:calc / padding-right / border-right）を打ち消す */
@media screen and (min-width: 992px) {
  body.home .l-content-wrap--2columns .l-content-main {
    width: 100%;
    padding-right: 0;
    border-right: none;
    float: none;
  }
}

/* ============================================================
   5. トップページ：本文h2セクション見出し（両脇の短い線）
   ※新着・GUIDE の見出しは §14/§15 の左見出しに置換済み。ここは残る本文h2用
   ============================================================ */
body.home .l-content-main h2 {
  font-size: 1.3rem !important;
  margin: 2.6rem 0 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9em;
}
body.home .l-content-main h2::before,
body.home .l-content-main h2::after {
  content: "";
  width: 36px;
  height: 1px;
  background: #C9C3B7;
}

/* ============================================================
   6. 全体 — コンテンツカードの角丸（トップは §11 で解除）
   ============================================================ */
.l-content-wrap__inner {
  border-radius: 30px;
}

/* ============================================================
   7. 本文リンク・一覧タイトルリンク — 全ページ「下線・セージ」に統一
   - リンクは丸で示さず「下線」で示す（読者が最も直接に認識できる形）
   - 旧・Query Loopタイトル先頭のセージ丸(::before)は撤去
   - トップ(body.home)は各所で独自指定のため対象外
   ============================================================ */
body:not(.home) .l-content-main a {
  color: #4E6A57 !important;
}

/* クエリループ一覧（No.14のハブ等）のタイトル ※下層ページ用 */
.l-content-main .wp-block-post-title {
  font-size: 17px !important;
  line-height: 1.5;
  margin: 0.4rem 0;
}
.l-content-main .wp-block-post-title a {
  color: #4E6A57 !important;
  text-decoration: underline;   /* 丸をやめ下線でリンクを示す */
  text-underline-offset: 2px;
}
.l-content-main .wp-block-post-title a:hover {
  color: #3A4F41 !important;
}

/* ============================================================
   8. フッターナビ（中央ウィジェットのカスタムHTML）
   - 隣接リンクの間に縦線を CSS で出す（｜を文字で入れない）
   ============================================================ */
.footer-nav {
  text-align: center;
}
.footer-nav__row {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
}
.footer-nav__row li {
  display: flex;
  align-items: center;
}
.footer-nav__row li + li::before {
  content: "";
  width: 1px;
  height: 0.9em;
  background: #C9C3B7;
  margin: 0 0.9em;
}
.footer-nav__row a {
  display: inline-block;
  padding: 0.35em 0;
  font-size: 13px;
  text-decoration: none;   /* ナビリンクは下線なし */
  line-height: 1.6;
}
.footer-nav__sep {
  border: none;
  border-top: 1px solid #DCE4DD;
  width: 180px;
  max-width: 70%;
  margin: 0.5em auto;
}
/* 中央1ブロックを全幅・中央寄せに（1ブロック運用で左に寄るのを防ぐ） */
.p-footer-widget__inner {
  justify-content: center;
}
.p-footer-widget__item {
  width: 100% !important;
  max-width: 100% !important;
  flex: 1 0 100%;
}

/* ============================================================
   9. 6軸ガイド入口（No.114）— 6子グループを2列カードに
   ============================================================ */
.fears-cards > .wp-block-group__inner-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: 1fr;
  gap: 16px;
  align-items: stretch !important;
}
.fears-cards .wp-block-group {
  position: relative;   /* 全面リンク(::after)の基準 */
  height: 100%;
  background: #FAF8F3;
  border: 1px solid #E2DCD2;
  border-radius: 12px;
  transition: transform .15s ease, border-color .15s ease;
}
.fears-cards .wp-block-group > .wp-block-group__inner-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.25rem 1.25rem 1.4rem;
}
.fears-cards .wp-block-group:hover {
  transform: translateY(-2px);
  border-color: #CFC7B9;
}
.l-content-main .fears-cards .wp-block-heading {
  font-size: 1.1rem !important;
  line-height: 1.5;
  margin: 0 0 0.5rem;
}
.fears-cards .wp-block-heading a {
  color: #4E6A57 !important;
  text-decoration: none !important;
}
.fears-cards .wp-block-heading a::after {
  content: "";
  position: absolute;
  inset: 0;   /* タイトルリンクをカード全面に広げる */
}
.fears-cards .wp-block-paragraph {
  font-size: 13.5px;
  color: #6E6860;
  line-height: 1.8;
  margin: 0;
}
.fears-cards .wp-block-group > .wp-block-group__inner-container::after {
  content: "読む →";
  margin-top: auto;   /* 縦flexの下端へ落とす */
  padding-top: 0.9rem;
  font-size: 13px;
  color: #4E6A57;
  text-align: right;
  transition: transform .15s ease;
}
.fears-cards .wp-block-group:hover > .wp-block-group__inner-container::after {
  transform: translateX(2px);
}
@media screen and (max-width: 600px) {
  .fears-cards > .wp-block-group__inner-container {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   10. 区切りブロック（wp-block-separator）— 全ページ共通
   ============================================================ */
.l-content-main .wp-block-separator {
  border: none !important;
  border-top: 1px solid #DCE4DD !important;
  height: 0 !important;
  background: none !important;
  margin: 2.6rem auto !important;
  opacity: 1 !important;
}

/* ============================================================
   11. トップ新デザイン — 土台（全幅・ヘッダー幅1180）
   - 地色は §17 の body で全ページ共通指定
   ============================================================ */
body.home .l-content-wrap__inner {
  background: transparent;   /* 白ラッパーを透過して地色を出す */
  border-radius: 0;
}
body.home .l-content-main__inner {
  max-width: none;           /* 中身をヘッダー幅いっぱいに */
}
/* ヘッダー〜本文先頭の上余白（l-content-wrap 20px / l-entry-content 30px）を詰める */
body.home .l-content-wrap,
body.home .l-entry-content {
  padding-top: 0 !important;
}
/* 本文コンテナが中身より高く、GUIDE〜フッター間に余白が出る問題を解消
   （サイドバー基準の高さ・下paddingをトップだけ0に） */
body.home .l-content-main,
body.home .l-content-main__inner,
body.home .l-entry-content {
  min-height: 0 !important;
  padding-bottom: 0 !important;
}

/* ============================================================
   12. トップ新デザイン — キャッチ（各行の下にドット罫・2行）
   ============================================================ */
body.home .top-intro {
  text-align: center;
  margin: 1rem 0 2.5rem;
}
body.home .top-intro__lead {
  font-family: 'Zen Maru Gothic', 'Hiragino Kaku Gothic ProN', sans-serif;
  font-size: 36px;   /* 28→30 一回り大きく */
  color: #3A3A3A;
  letter-spacing: 0.03em;
  margin: 0 auto;
  padding: 0;
  border: none;
}
/* 各行：文字幅ぶんだけ下にドット罫（行数ぶん罫が増える） */
body.home .top-intro__line {
  display: table;
  margin: 0 auto;
  padding-bottom: 10px;
  line-height: 1.5;
  background-image: radial-gradient(circle, #B0A690 1.8px, transparent 2.2px);
  background-size: 13px 5px;
  background-position: center bottom;
  background-repeat: repeat-x;
}
body.home .top-intro__line + .top-intro__line {
  margin-top: 12px;
}
@media screen and (max-width: 600px) {
  body.home .top-intro__lead {
    font-size: 25px;   /* 20→21 */
  }
}

/* ============================================================
   13. トップ新デザイン — 3カード（英日タイトル・カラーバー・塗り矢印）
   - カテゴリー色は --cat 変数で一元管理。3枚ともリンク＋塗り矢印で統一
   ============================================================ */
body.home .top-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 3rem;
}
body.home .top-card {
  --cat: #9DB3A3;
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  border: none;
  border-radius: 16px;
  padding: 22px 22px 20px;
  text-align: left;
  color: inherit;
  text-decoration: none;
  transition: transform .15s ease;
}
body.home .top-card:hover {
  transform: translateY(-2px);
}
body.home .top-card--ivf    { --cat: #C77F88; }   /* ローズ */
body.home .top-card--nicu   { --cat: #7E9E84; }   /* セージ */
body.home .top-card--growth { --cat: #C49A55; }   /* アンバー */

body.home .top-card__en {
  font-family: 'Zen Maru Gothic', 'Hiragino Kaku Gothic ProN', sans-serif;
  font-size: 14px;   /* 11→12 */
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--cat);
  margin-bottom: 7px;
}
body.home .top-card__title {
  font-family: 'Zen Maru Gothic', 'Hiragino Kaku Gothic ProN', sans-serif;
  font-weight: 500;
  font-size: 24px;   /* 18.5→20 */
  color: #3A3A3A;
  line-height: 1.3;
  margin: 0;
}
body.home .top-card__bar {
  display: block;
  width: 36px;
  height: 3px;
  background: var(--cat);
  border-radius: 2px;
  margin: 13px 0 14px;
}
body.home .top-card__desc {
  font-size: 16px;   /* 12.5→13.5 */
  color: #6E6860;
  line-height: 1.8;
  margin: 0;
}
body.home .top-card__link {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: auto;   /* 矢印をカード下端へ */
  padding-top: 20px;
}
body.home .top-card__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--cat);
  border: 1.5px solid var(--cat);
  color: #FFFFFF;
  font-size: 17px;
  line-height: 1;
  flex: none;
}
body.home .top-card__status {
  font-size: 16px;   /* 12.5→13.5 */
  color: #5D6F62;
}
@media screen and (max-width: 600px) {
  body.home .top-cards {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   14. トップ新デザイン — 新着記事（左見出し／右 Query Loop）
   - 「.news-head を含むグループ」を狙い撃ち（追加CSSクラス不要）
   - 背景なし＝地に沈める（重要度を3カードより下げる）。中央900px
   ============================================================ */
body.home .wp-block-group:has(.news-head) {
  background: none;
  border: none;
  max-width: 900px;
  margin: 0 auto 3rem;
  padding: 30px 32px;
}
/* 横並びは内側コンテナに掛ける（Lab23はグループ内にコンテナを挟む） */
body.home .wp-block-group:has(.news-head) > .wp-block-group__inner-container {
  display: flex;
  align-items: stretch;
  gap: 28px;
}
body.home .wp-block-group:has(.news-head) .news-head {
  flex: 0 0 190px;   /* 左見出し固定幅 */
}
body.home .wp-block-group:has(.news-head) .wp-block-query {
  flex: 1;
  min-width: 0;
}
/* 英語ラベル NEWS */
body.home .news-head__en {
  display: block;
  font-family: 'Zen Maru Gothic', 'Hiragino Kaku Gothic ProN', sans-serif;
  font-size: 13.5px;   /* 10.5→11.5 */
  font-weight: 500;
  letter-spacing: 0.2em;
  color: #6E655A;
  margin-bottom: 5px;
}
/* 見出し「新着記事」「はじめての方へ」は h2 だが左見出し扱い。
   本文h2の装飾（1.3rem・中央寄せ・両脇線）を高詳細度で打ち消す */
body.home .l-content-main .news-head__ja,
body.home .l-content-main .guide-head__ja {
  display: block !important;
  font-family: 'Zen Maru Gothic', 'Hiragino Kaku Gothic ProN', sans-serif !important;
  font-size: 20px !important;   /* 16→17 */
  font-weight: 500 !important;
  line-height: 1.5 !important;
  color: #3A3A3A !important;
  margin: 0 !important;
  justify-content: flex-start !important;
  gap: 0 !important;
}
body.home .l-content-main .news-head__ja::before,
body.home .l-content-main .news-head__ja::after,
body.home .l-content-main .guide-head__ja::before,
body.home .l-content-main .guide-head__ja::after {
  content: none !important;
}
/* 一覧へ（丸ボタン系リンク） */
body.home .news-head__more {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin-top: 20px;
  color: #6E6860;
  text-decoration: none;
  font-size: 15px;   /* 12.5→13 */
}
body.home .news-head__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #6F685C;
  color: #FFFFFF;
  font-size: 17px;
  line-height: 1;
  flex: none;
}
/* 一覧へ：ホバーで文字と丸を一段濃く（丸ボタン系の統一挙動） */
body.home .news-head__more:hover {
  color: #3A3632;
}
body.home .news-head__more:hover .news-head__arrow {
  background: #504A42;
}

/* 右：リスト（各行＝1件。投稿日→カテゴリー→タイトル） */
body.home .wp-block-query .wp-block-post-template {
  list-style: none;
  margin: 0;
  padding: 0;
}
body.home .wp-block-query .wp-block-post-template > li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 13px 2px;
  border-bottom: 1px dotted #2E2A26;
}
body.home .wp-block-query .wp-block-post-date {
  order: 1;
  font-size: 15px;   /* 12→13 */
  color: #A89F8D;
  margin: 0;
}
/* カテゴリータグ：セージ塗り＋白文字（地の上でも立つように濃色） */
body.home .wp-block-query .wp-block-post-terms {
  order: 2;
  font-size: 13px;   /* 10.5→11 */
  color: #FFFFFF;
  background: #7E9E84;
  border-radius: 4px;
  padding: 2px 8px;
  line-height: 1.6;
}
body.home .wp-block-query .wp-block-post-terms a {
  color: #FFFFFF;
  text-decoration: none;
}
/* タイトル：タグ直後に左詰め、余りは右へ */
body.home .wp-block-query .wp-block-post-title {
  order: 3;
  flex: 0 1 auto;
  margin: 0 auto 0 0 !important;
  font-size: 17px !important;   /* 13.5→14.5 */
  line-height: 1.5;
}
/* Zen Maru Gothic(500固定)だと太いので、通常太さが出るヒラギノ系に */
body.home .wp-block-query .wp-block-post-title,
body.home .wp-block-query .wp-block-post-title a {
  font-family: 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', sans-serif !important;
  font-weight: 400 !important;
}
body.home .wp-block-query .wp-block-post-title a {
  color: #3A3A3A !important;
  text-decoration: none;
}
body.home .wp-block-query .wp-block-post-title::before,
body.home .wp-block-query .wp-block-post-title::after,
body.home .wp-block-query .wp-block-post-title a::before {
  content: none !important;
}
/* 記事タイトル（テキストリンク）：ホバーで色だけ濃く（下線なし＝ナビ的扱い） */
body.home .wp-block-query .wp-block-post-title a:hover {
  color: #7E9E84 !important;
}

/* スマホ：左見出しは上、リストは下（縦積み） */
@media screen and (max-width: 767px) {
  body.home .wp-block-group:has(.news-head) > .wp-block-group__inner-container {
    flex-direction: column;
    gap: 14px;
  }
  body.home .wp-block-group:has(.news-head) {
    padding: 24px;
  }
  body.home .wp-block-group:has(.news-head) .news-head {
    flex: none;
  }
  body.home .news-head__more {
    margin-top: 14px;
  }
}

/* ============================================================
   15. トップ新デザイン — はじめての方へ（左見出し／右中身）
   - 背景なし＝地に沈める。中央900px。リード左寄せ→CTA→区切り→署名
   ============================================================ */
body.home .guide-block {
  display: flex;
  align-items: flex-start;
  gap: 28px;
  background: none;
  border: none;
  max-width: 900px;
  margin: 0 auto;
  padding: 30px 32px;
}
body.home .guide-block .guide-head {
  flex: 0 0 190px;
}
body.home .guide-head__en {
  display: block;
  font-family: 'Zen Maru Gothic', 'Hiragino Kaku Gothic ProN', sans-serif;
  font-size: 13.5px;   /* 10.5→11.5 */
  font-weight: 500;
  letter-spacing: 0.2em;
  color: #6E655A;
  margin-bottom: 5px;
}
/* guide-head__ja の見た目は §14 の共通指定（news-head__ja と同じ17px）で揃える */
body.home .guide-block .guide-body {
  flex: 1;
  min-width: 0;
}
body.home .guide-body__lead {
  font-size: 17px;   /* 13.5→14.5 */
  color: #6E6860;
  line-height: 1.9;
  margin: 0 0 20px;
}
/* CTA：通常は輪郭（主張を抑える）、ホバーでセージ塗り＋白文字 */
body.home .guide-body__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  margin: 0;
  font-family: 'Zen Maru Gothic', 'Hiragino Kaku Gothic ProN', sans-serif;
  font-size: 18px;   /* 14→15 */
  font-weight: 500;
  color: #5C7A64;
  background: none;
  border: 1px solid #A9BCAD;
  border-radius: 26px;
  padding: 11px 24px;
  text-decoration: none;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
body.home .guide-body__btn:hover {
  background: #7E9E84;
  border-color: #7E9E84;
  color: #FFFFFF;
}
body.home .guide-body__arrow {
  font-size: 16px;
  line-height: 1;
}
/* CTA下の区切り（ドット罫・左寄せ・短め） */
body.home .guide-body__sep {
  border: none;
  border-top: 1px dotted #2E2A26;
  width: 100%;
  max-width: 360px;
  margin: 26px 0 20px;
}
/* 署名：本文中リンク扱い＝下線あり＋セージ（フッター等ナビとは分ける） */
body.home .guide-body__author {
  text-align: left;
  font-size: 16px;   /* 12.5→13.5 */
  color: #8A8175;
  line-height: 1.9;
  margin: 0;
}
body.home .guide-body__author a {
  color: #4E6A57;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color .15s ease;
}
body.home .guide-body__author a:hover {
  color: #3A4F41;
}
@media screen and (max-width: 767px) {
  body.home .guide-block {
    flex-direction: column;
    gap: 14px;
    padding: 24px;
  }
  body.home .guide-block .guide-head {
    flex: none;
  }
}

/* ============================================================
   17. 全ページ共通の地色 & フッター（白）
   ============================================================ */
body {
  background-color: #F7F7F7;
}
/* フッター背景はテーマがインライン/変数で持つため !important で白に */
footer.l-footer,
.p-footer-widget,
.footer__bottom {
  background-color: #FFFFFF !important;
}
.l-footer,
.l-footer p,
.l-footer a,
.footer-nav__row a,
.copyright,
.copyright__text,
.powered__text {
  color: #6E6860 !important;
}
.footer-nav__row a:hover {
  color: #3A3632 !important;
}
.footer-nav__row li + li::before {
  background: #D8D1C4;
}
.footer-nav__sep {
  border: none;
  border-top: 1px dotted #C9C3B7;
  width: 180px;
  max-width: 70%;
  margin: 0.5em auto;
}

/* ============================================================
   18. ヒーロー背景（水彩にじみ）— 全ページ共通
   - トップと完全同一設定（高さ・位置・濃さ・抜け）で全ページに敷く
   - body::before に変更（旧 body.home::before）
   - 中身を背景より前面に出す指定も全ページの l-content-wrap へ
   ============================================================ */
body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1400px;
  background-image: url('https://600g-twins.com/wp-content/uploads/2026/07/bg.png');
  background-repeat: no-repeat;
  background-position: center -300px;
  background-size: 2400px auto;
  opacity: 0.75;
  pointer-events: none;   /* 装飾レイヤー。クリックを透過 */
  z-index: 0;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 70%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 70%);
}
/* 中身を背景より前面に（全ページ） */
.l-content-wrap {
  position: relative;
  z-index: 1;
}

/* ============================================================
   19. スマホ（≤600px）文字サイズ調整
   - lead=24px を軸に、各要素をPCから縮小（小さい文字は下限12〜13px）
   ============================================================ */
@media screen and (max-width: 600px) {
  /* キャッチ */
  body.home .top-intro__lead { font-size: 24px; }

  /* 3カード */
  body.home .top-card__en    { font-size: 12px; }
  body.home .top-card__title { font-size: 19px; }
  body.home .top-card__desc  { font-size: 14px; }
  body.home .top-card__status{ font-size: 14px; }

  /* 新着・GUIDE 見出し */
  body.home .l-content-main .news-head__ja,
  body.home .l-content-main .guide-head__ja { font-size: 18px !important; }
  body.home .news-head__en,
  body.home .guide-head__en { font-size: 12px; }

  /* 新着リスト */
  body.home .news-head__more { font-size: 13px; }
  body.home .wp-block-query .wp-block-post-date  { font-size: 13px; }
  body.home .wp-block-query .wp-block-post-terms { font-size: 11px; }
  body.home .wp-block-query .wp-block-post-title { font-size: 15px !important; }

  /* GUIDE */
  body.home .guide-body__lead   { font-size: 15px; }
  body.home .guide-body__btn    { font-size: 15px; }
  body.home .guide-body__author { font-size: 14px; }
}

/* ============================================================
   20. 記事詳細 — カテゴリーラベル
   - 位置・余白・角丸等はテーマ既定のまま。色だけ上書き
   - カテゴリー色塗り＋白文字（トップ新着ラベルと同系）
   - href で判定（ヘッダー内に category クラスが無いため）
   ============================================================ */
.p-entry-cat .post-categories li a {
  color: #FFFFFF !important;
  background: #7E9E84 !important;   /* 既定＝セージ */
}
/* IVF / Growth は実カテゴリー slug 確認後に分岐 */

/* ============================================================
   21. 本文h2の節見出し（先頭に角丸の太バー）— 記事詳細＋固定ページ共通
   - 対象を投稿(--post)限定から、下層ページの本文h2全般へ拡張
   - バー＝「ここから」の区切り。太さ6px＋角丸で数字「1」との誤読を回避
   - flexで文字左隣に配置（折り返してもバーは先頭に留まる）
   - 色は本文ラッパーの category-* で分岐。固定ページは category-* が無く
     既定（淡セージ）で表示される（現状すべてNICU系文脈のため実害なし）
   - トップ(body.home)のh2は §5/§14 で別装飾のため除外
   - §0 の h2 サイズ/フォント指定はそのまま活かす
   ============================================================ */
body:not(.home) .l-content-main h2 {
  display: flex;
  align-items: center;
  gap: 0.55em;
}
body:not(.home) .l-content-main h2::before {
  content: "";
  flex: none;
  width: 6px;          /* 太めにして棒＝装飾と分かる */
  height: 0.95em;      /* 文字よりわずかに低く */
  border-radius: 3px;  /* 角丸で「1」「｜」との誤読を防ぐ */
  background: #A8C0AE;  /* 既定＝淡セージ */
}

/* カテゴリー別のバー色 */
.p-entry-content.category-nicu-category h2::before {
  background: #A8C0AE;   /* NICU（淡セージ） */
}
/* IVF / Growth は実カテゴリー slug 確認後に追加
   .p-entry-content.category-ivf-…   h2::before { background: #C77F88; }
   .p-entry-content.category-growth-… h2::before { background: #C49A55; }
*/

/* ============================================================
   22. サイドバー（下層ページ）— 控えめな設え
   - 脇役ゆえ作り込まない。見出し下にセージの短い細線
   - 項目の区切り線はテーマが li に持つ1本に任せる（§22では引かない＝二重線防止）
   - リンクは全ページ共通の「下線・セージ」に統一（丸は使わない）
   - 見出しの font（Zen Maru 500・18px）は §0 で指定済み。ここは装飾のみ
   - 対象は「最近の投稿(latest-posts)」「カテゴリー(categories)」の両ウィジェット
   ============================================================ */
/* 見出し：下にセージの短い細線を敷く */
.l-sidebar .wp-block-group > .wp-block-group__inner-container > .wp-block-heading {
  position: relative;
  padding-bottom: 0.5em;
  margin-bottom: 0.8em;
}
.l-sidebar .wp-block-group > .wp-block-group__inner-container > .wp-block-heading::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 32px;
  height: 2px;
  border-radius: 1px;
  background: #A8C0AE;
}
/* リスト：素の箇条書きマーカーだけ消す（区切り線はテーマ側の1本に任せる） */
.l-sidebar .wp-block-latest-posts__list,
.l-sidebar .wp-block-categories-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.l-sidebar .wp-block-latest-posts__list > li,
.l-sidebar .wp-block-categories-list > li {
  padding: 0.55em 0;
  /* border-bottom はテーマが既に li に持つため付けない（二重線防止） */
}
/* リンク：全ページ共通の「下線・セージ」に統一（丸なし） */
.l-sidebar .wp-block-latest-posts__list > li a,
.l-sidebar .wp-block-categories-list > li a {
  color: #4E6A57;
  text-decoration: underline;
  text-underline-offset: 2px;
  line-height: 1.6;
}
.l-sidebar .wp-block-latest-posts__list > li a:hover {
  color: #3A4F41;
}

/* ============================================================
   23. アーカイブ見出し（カテゴリー/タグ一覧のタイトル）
   - 「カテゴリー:」の接頭辞（h1直下のテキストノード）を消し、
     カテゴリー名の<span>だけを見出しにする
   - 手法：h1本体を font-size:0 で潰し、span で本来サイズに戻す
     （接頭辞はテキストノードなので font-size:0 で消え、spanだけ復活）
   - 下にサイドバー見出しと同じ淡セージの短い細線を敷く
   - フォント（Zen Maru 500）は §0 の .p-archive-ttl 指定を活かす
   ============================================================ */
.p-archive-ttl {
  font-size: 0;              /* 接頭辞「カテゴリー:」を消す */
  position: relative;
  padding-bottom: 0.5em;
  margin-bottom: 1.2rem;
}
.p-archive-ttl span {
  font-size: 2rem;           /* 記事詳細h1と同サイズでカテゴリー名を表示 */
  line-height: 1.4;
}
.p-archive-ttl::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 2px;
  border-radius: 1px;
  background: #A8C0AE;       /* サイドバー見出し・h2バーと統一 */
}

/* ============================================================
   24. 本文リスト（wp-block-list）のマーカー色 — 下層ページ共通
   - 純黒の「●」だけがページ内で浮くため、淡セージに統一
     （h2バー・サイドバー細線・アーカイブ見出し線と同色）
   - ::marker で点だけ着色。文字色・下線リンクには影響しない
   - トップ(body.home)は対象外
   ============================================================ */
body:not(.home) .l-content-main .wp-block-list > li::marker {
  color: #A8C0AE;
}

/* ============================================================
   25. NICU入口ページ — 記事リスト（Query Loop）を円サムネ＋横並び＋連番に
   - 【限定】このセクションは専用クラス .nicu-timeline 配下のみに適用。
     （Query Loop ブロックの「追加CSSクラス」に nicu-timeline を付与）
     これにより 6軸ページ等の他 Query Loop には一切当たらない
   - Query Loop に「アイキャッチ画像＋タイトル」を出力。円サムネ左／番号／タイトル右
   - 円サムネはトップ新着・記事一覧と同じ語彙（生成り地・極薄リング）
   - HTML順はタイトル→画像だが、flex+order で画像を左に回す
   - このリストの記事タイトルに §21 のバーが誤爆するため打ち消す
   - タイトルは h2/h3 どちらでも効くよう .wp-block-post-title で指定
   - 各記事に自動連番（CSSカウンター）。円とタイトルの間に淡セージで表示。
     ※これは「並び順の番号」であって「NICU◯日目」ではない
   ============================================================ */

/* 各記事＝1行。1件ずつ淡線で区切る */
.nicu-timeline .wp-block-post-template {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: nicu-list;   /* 連番カウンターを初期化 */
}
.nicu-timeline .wp-block-post-template > li {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 1rem 0;
  border-bottom: 1px solid #ECE7DE;
}
.nicu-timeline .wp-block-post-template > li:last-child {
  border-bottom: none;
}

/* アイキャッチ → 小さな円形（左）。order で HTML順を無視して先頭へ */
.nicu-timeline .wp-block-post-template > li .wp-block-post-featured-image {
  order: 0 !important;
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  margin: 0;
  border-radius: 50%;
  overflow: hidden;
  background: var(--thumb-frame-bg);
  box-shadow: 0 0 0 1px rgba(58, 54, 50, 0.04);
}
.nicu-timeline .wp-block-post-template > li .wp-block-post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* タイトル（右）。番号＋タイトルを横並びにし、番号を先頭に（円とタイトルの間） */
.nicu-timeline .wp-block-post-template > li .wp-block-post-title {
  order: 1 !important;
  flex: 1;
  min-width: 0;
  margin: 0 !important;
  display: flex !important;     /* 番号とタイトル文を横並びに */
  align-items: baseline;
  font-size: 17px !important;
  line-height: 1.5;
}
/* §21バーを消しつつ、同じ ::before に連番を入れる（バーは出ず番号だけ出る） */
.nicu-timeline .wp-block-post-template > li .wp-block-post-title::before {
  counter-increment: nicu-list;
  content: counter(nicu-list) !important;   /* §21の四角バーを番号に置換 */
  flex: none;
  width: auto !important;        /* §21バーの幅指定を無効化 */
  height: auto !important;
  background: none !important;   /* §21バーの塗りを無効化 */
  border-radius: 0 !important;
  margin-right: 0.7em;
  color: #A8C0AE;                /* 淡セージ。順序の目印として控えめに */
  font-size: 0.95em;
  font-variant-numeric: tabular-nums;   /* 10番以降も桁揃え */
}
.nicu-timeline .wp-block-post-template > li .wp-block-post-title a {
  color: #4E6A57 !important;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ============================================================
   26. 記事詳細フッター — 前後ページャー（やわらかい角丸カード）
   - テーマ既定の四角枠を、生成り地＋大角丸のカードに（3カード/6軸と同語彙）
   - 配置は order で「前の投稿=左／次の投稿=右」に固定（時系列の自然な向き）
   - prev は左端に「←」、next は右端に「→」の淡セージ矢印を擬似要素で添える
   - ラベル(__text)は小さく淡く、タイトル(__title)はセージ
   - ホバーで地を一段濃く＋2px浮かせる（3カードと同じ挙動）
   ============================================================ */

/* 2枚を横並び。order で prev を左・next を右に固定 */
.p-paging {
  display: flex !important;
  gap: 16px;
  margin-top: 2rem;
}
.p-paging__item {
  flex: 1;
  min-width: 0;
}
.p-paging__item--prev { order: 0 !important; }   /* 前の投稿を左へ */
.p-paging__item--next { order: 1 !important; }   /* 次の投稿を右へ */

/* カード本体：枠線を消して生成り地＋大角丸 */
.p-paging__link {
  position: relative;
  display: block;
  background: #FAF8F3;
  border: none;
  border-radius: 14px;
  padding: 16px 20px;
  text-decoration: none;
  transition: transform .15s ease, background .15s ease;
}
.p-paging__link:hover {
  background: #F1EEE6;              /* 一段濃く */
  transform: translateY(-2px);     /* 少し浮かせる */
}

/* prev は左端、next は右端に矢印ぶんの余白を空ける */
.p-paging__item--prev .p-paging__link { padding-left: 44px; }
.p-paging__item--next .p-paging__link { padding-right: 44px; }

/* 矢印（淡セージ）。prev=左「←」／next=右「→」 */
.p-paging__link::after {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #A8C0AE;
  font-size: 18px;
  line-height: 1;
}
.p-paging__item--prev .p-paging__link::after {
  content: "←";
  left: 18px;
}
.p-paging__item--next .p-paging__link::after {
  content: "→";
  right: 18px;
}

/* ラベル「前の投稿／次の投稿」：小さく淡く。
   prev は左寄せ（左矢印側）、next は右寄せ（右矢印側）に揃える */
.p-paging__text {
  font-size: 12px;
  color: #9B958A;
  margin: 0 0 4px;
}
.p-paging__item--prev .p-paging__text { text-align: left; }
.p-paging__item--next .p-paging__text { text-align: right; }

/* タイトル：セージ。1行に収めて省略（…）。高さを揃える */
.p-paging__title {
  font-size: 15px;
  color: #4E6A57;
  line-height: 1.5;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.p-paging__item--prev .p-paging__title { text-align: left; }
.p-paging__item--next .p-paging__title { text-align: right; }

/* スマホ：縦積み。上=前／下=次。矢印はどちらも右端「→」に統一 */
@media screen and (max-width: 600px) {
  .p-paging {
    flex-direction: column;
  }
  .p-paging__item--prev .p-paging__text,
  .p-paging__item--prev .p-paging__title,
  .p-paging__item--next .p-paging__text,
  .p-paging__item--next .p-paging__title {
    text-align: left;
  }
  .p-paging__item--prev .p-paging__link,
  .p-paging__item--next .p-paging__link {
    padding-left: 20px;
    padding-right: 44px;
  }
  .p-paging__item--prev .p-paging__link::after {
    content: "→";
    left: auto;
    right: 18px;
  }
}

/* ============================================================
   27. Query Loop 記事リスト（nicu-timeline 以外）のタイトル
   - 不安軸ページ等の記事リスト。§21のh2バーが乗るため打ち消し、
     素直な下線リンクリストにする（サムネ・番号なし）
   - nicu-timeline（NICU入口）は §25 が担当するので :not() で除外
   ============================================================ */
.l-content-main .wp-block-query:not(.nicu-timeline) .wp-block-post-title {
  display: block;          /* §21の flex を解除 */
}
.l-content-main .wp-block-query:not(.nicu-timeline) .wp-block-post-title::before {
  content: none !important;   /* §21の淡セージバーを消す */
}