/* ママえらすぎ 子テーマ追加CSS（本番適用用・2026-11-16 改訂：Cocoon実マークアップ対応）
 *
 * 使い方:
 *   子テーマに css/me-theme.css として置き、functions.php 追記分で enqueue する。
 *   Cocoon設定「スタイル」→「追加CSS」には何も載せない（二重に載せない）。
 *   旧追加CSS欄の `.page .date-tags{display:none;}` は、このファイルの「固定ページの日付」に取り込み済み。追加CSS欄は空に戻してよい。
 *   フォントの @font-face は css/me-font.css（別ファイル）。
 *
 * 色: 背景 #FAF5EC、文字 #4A3B32、強調 #5F7552、ボタン/リンク #BE4B37 系。
 * 本文: システムゴシック 17px（PC 18px。16px未満にしない）。タップ領域 44px 以上。リンクは下線。
 * 見出し: body.me-font-zen のとき Zen Maru Gothic 700。それ以外はシステムゴシック太字。
 * 構成: 1) トークン 2) 本文タイポ（.entry-content） 3) 記事ブロック（比較表・CTA など .me-*）
 *       4) Cocoon実マークアップへの対応（ヘッダー・フッター・ページ枠・モバイルボタン）
 *       5) トップページ部品（コンセプト文・入口カード・新着・運営者）
 * 仮バッジ・プレースホルダー・モック注記・アイコンは CSS でも出さない。
 * 旧版: implementation/backup/me-theme.css.bak-20261116（モック用クラス .site-header 等を含んでいた。Cocoonには存在しないため削除）
 *
 * 2026-11-16 追記履歴（旧ヘッダー注記のまとめ）:
 *   - 比較表: 先頭列120px、右端余白、767px以下で「合わない家庭」130px・出典100px、日付は .me-compare__date で nowrap
 *   - 注意点: .me-service-notes（サービス名太字＋改行、項目間12〜16px）、締切・解約条件 .me-note-strong（#5F7552・太字。赤は使わない）
 *   - .me-compare__pr は16px、--me-disabled-text は #4A3B32
 */

:root {
  --me-bg: #FAF5EC;
  --me-surface: #FFFDF9;
  --me-apricot: #F6E3D3;
  --me-sage: #E3EADB;
  --me-coral: #BE4B37;
  --me-coral-hover: #A63F2E;
  --me-coral-press: #8C3426;
  --me-coral-soft: #F6DDD4;
  --me-text: #4A3B32;
  --me-text-sub: #6B5B52;
  --me-link: #A33E2C;
  --me-link-visited: #7E3A4A;
  --me-emphasis: #5F7552;
  --me-border: #E4D6C5;
  --me-border-strong: #8A756A;
  --me-night: #2E2622;
  --me-success: #3B7552;
  --me-success-bg: #E6F0E8;
  --me-warning: #8A5300;
  --me-warning-bg: #FBEFD9;
  --me-error: #B42318;
  --me-error-bg: #FBE4E1;
  --me-disabled-bg: #EEE7DD;
  --me-disabled-text: #4A3B32; /* 2026-11-16 CDレビュー: 旧#8E8178は無効背景#EEE7DD上で3.08:1のため本文色に合わせる。無効の文字は --me-text と同じ */
  --me-font-body: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", YuGothic, Meiryo, "Noto Sans JP", "Noto Sans CJK JP", sans-serif;
  --me-font-heading: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", YuGothic, Meiryo, sans-serif; /* 既定はシステムゴシック太字。Zen は body.me-font-zen で上書き */
  --me-radius: 10px;
}

/* =====================================================================
 * 2) 本文タイポ（Cocoon の .entry-content）
 *    Cocoon既定の .article h2（グレー箱・padding 25px）は body .entry-content h2 で打ち消す。
 * ===================================================================== */
body.public-page {
  background-color: var(--me-bg);
  color: var(--me-text);
  font-family: var(--me-font-body);
  font-size: 17px;
  line-height: 1.85;
}

/* 見出し書体の切り替え（functions.php が body クラスを付与） */
body.me-font-zen {
  --me-font-heading: "Zen Maru Gothic", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", YuGothic, Meiryo, sans-serif;
}
body.me-font-gothic {
  --me-font-heading: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", YuGothic, Meiryo, sans-serif;
}

body .entry-content {
  color: var(--me-text);
  font-size: 17px;
  line-height: 1.85;
}

body .entry-content p {
  margin-bottom: 1.6em;
}

body .entry-content h2,
body .entry-content h3,
body .entry-content h4 {
  font-family: var(--me-font-heading);
  font-weight: 700;
  color: var(--me-text);
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  line-height: 1.4;
}

body .entry-content h2 {
  font-size: 22px;
  margin: 2.4em 0 0.6em;
}

body .entry-content h3 {
  font-size: 19px;
  margin: 1.6em 0 0.5em;
}

body .entry-content h4 {
  font-size: 17px;
  margin: 1.4em 0 0.4em;
}

body .entry-content > h2:first-child,
body .entry-content > h3:first-child {
  margin-top: 0;
}

@media (min-width: 768px) {
  body.public-page { font-size: 18px; }
  body .entry-content { font-size: 18px; line-height: 1.8; }
  body .entry-content h2 { font-size: 26px; }
  body .entry-content h3 { font-size: 21px; }
  body .entry-content h4 { font-size: 18px; }
}

/* 強調（#5F7552）。em.me-em は斜体にしない */
.me-em,
body .entry-content em.me-em {
  font-style: normal;
  font-weight: 700;
  color: var(--me-emphasis);
}

/* 改行させない固有名詞・時間（ヨシケイ「約10〜15分」など） */
.me-nobr {
  white-space: nowrap;
}

/* リンクは必ず下線 */
body .entry-content a {
  color: var(--me-link);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
body .entry-content a:visited {
  color: var(--me-link-visited);
}

/* 一般のリスト（専用ブロックの .me-service-notes / .me-related / .me-source は 40_blocks で詳細度を上げて上書き） */
body .entry-content ul,
body .entry-content ol {
  padding-left: 1.4em;
}
body .entry-content li {
  margin: 0 0 0.4em; /* Cocoon: .article ul li{margin:.2em} より後ろ・同詳細度で勝つ */
}

.entry-content a:focus-visible,
.me-cta__button:focus-visible,
.wp-block-button__link:focus-visible,
.gate-card:focus-visible,
.navi-in a:focus-visible,
.mobile-menu-buttons a:focus-visible,
.mobile-menu-buttons label:focus-visible {
  outline: 2px solid var(--me-bg);
  box-shadow: 0 0 0 4px var(--me-text);
  outline-offset: 2px;
}

.me-note,
.me-source {
  font-size: 15px;
  color: var(--me-text-sub);
}

/* 引用（Cocoon既定の青灰色の箱を、サイトの地色・罫線に） */
body .entry-content blockquote,
body .entry-content .wp-block-quote {
  background: var(--me-bg);
  border: 1px solid var(--me-border);
  border-radius: 10px;
  color: var(--me-text-sub);
  font-size: 16px;
}
body .entry-content blockquote::before,
body .entry-content blockquote::after {
  color: var(--me-border-strong);
}

/* モック用の注記・仮バッジ・プレースホルダーは本番に出さない（マークアップが残っても隠す） */
.mock-flag,
.logo-temp,
.hero__placeholder-label,
.img-temp,
.me-mock-only {
  display: none !important;
}

/* サイトアイコンは本採用承認まで使わない。マークアップが残っても隠す */
.site-logo__icon,
.site-logo__heart {
  display: none;
}

/* =====================================================================
 * 3) 記事ブロック（旧版の内容を維持。ただし Cocoon の `.article ul li{margin:.2em}` に負けていた
 *    .me-service-notes / .me-related / .me-source ol は body .entry-content を前置して詳細度を上げ、
 *    .me-cta__button--sub:visited は90_tail側で修正）
 * ===================================================================== */
/* ---------- PR（Cocoon自動挿入の見た目を補強。文言は設定画面で入れる） ---------- */
.pr-label,
.cocoon-pr-label,
.me-pr {
  display: block;
  background: var(--me-warning-bg);
  color: var(--me-text);
  border: 1px solid var(--me-border);
  border-radius: var(--me-radius);
  padding: 12px 16px;
  margin: 0 0 1.5em;
  font-size: 16px;
  line-height: 1.6;
  font-weight: 700;
}

/* ---------- 結論・導入ボックス（ボタンは置かない） ---------- */
.me-lead,
.me-conclusion {
  background: var(--me-surface);
  border: 1px solid var(--me-border);
  border-radius: var(--me-radius);
  padding: 16px 20px;
  margin: 0 0 1.5em;
}

/* 導入・結論にCTAを置かない運用。誤って入った主ボタンは公開前チェックで削除する（CSSでは扱わない） */

/* ---------- 比較表（用途別。横スクロール＋先頭列固定） ---------- */
.me-compare {
  margin: 1.5em 0 2em;
}

.me-compare__caption {
  font-size: 15px;
  color: var(--me-text-sub);
  margin: 0 0 8px;
}

.me-compare__scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--me-border);
  border-radius: var(--me-radius);
  background: var(--me-surface);
}

.me-compare table,
.me-compare .wp-block-table table {
  margin: 0;
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--me-text);
  padding-right: 16px; /* 2026-11-16 CD: 末尾列のあとにスクロール用の余白 */
  box-sizing: border-box;
}

.me-compare th,
.me-compare td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--me-border);
  border-right: 1px solid var(--me-border);
  vertical-align: top;
  background: var(--me-surface);
  min-width: 8em;
  word-break: auto-phrase; /* 2026-11-16 CD: 語の区切りで折り返す。未対応ブラウザは列指定や <wbr> に頼る */
}

.me-compare thead th {
  background: var(--me-apricot);
  font-weight: 700;
  white-space: nowrap;
}

/* 先頭列（候補名）を固定。2026-11-16 CD: 120px前後に固定し、長い候補名は折り返す */
.me-compare th:first-child,
.me-compare td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  box-sizing: border-box;
  width: 120px;
  min-width: 120px;
  max-width: 120px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  background: var(--me-surface);
  box-shadow: 2px 0 0 var(--me-border);
}

.me-compare thead th:first-child {
  background: var(--me-apricot);
  z-index: 2;
  white-space: normal;
}

/* 出典名と日付を別行にする。日付だけは途中で折り返さない */
.me-compare__date {
  display: block;
  white-space: nowrap;
}

/* 767px以下では「合わない家庭」を130pxに広げる（CD: 横スクロール前提なので、
 * 固定列の右側に末尾2列が同時に収まらなくてもよい）。出典・確認日は100pxのまま。
 * 合わない家庭は overflow-wrap: anywhere / word-break: break-word を使わず、
 * auto-phrase と原稿の <wbr> で語の途中改行を避ける。 */
@media (max-width: 767px) {
  .me-compare th:nth-last-child(2),
  .me-compare td:nth-last-child(2) {
    box-sizing: border-box;
    width: 130px;
    min-width: 130px;
    max-width: 130px;
    white-space: normal;
    overflow-wrap: normal;
    word-break: auto-phrase;
  }
  .me-compare th:last-child,
  .me-compare td:last-child {
    box-sizing: border-box;
    width: 100px;
    min-width: 100px;
    max-width: 100px;
    padding-left: 8px;
    padding-right: 8px;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: auto-phrase;
  }
  /* 出典列を100pxにした分、右余白は8pxのまま。表は横スクロールする */
  .me-compare table,
  .me-compare .wp-block-table table {
    padding-right: 8px;
  }
}

.me-compare__pr {
  display: inline-block;
  font-size: 16px; /* 2026-11-16 CDレビュー: 12px禁止。14px以上、推奨16px。PRは注記サイズにしない */
  font-weight: 700;
  line-height: 1.4;
  color: var(--me-text);
  background: var(--me-warning-bg);
  border-radius: 4px;
  padding: 2px 8px;
  margin-left: 4px;
}

/* 優劣の色分け・王冠・「1位」バッジは使わない */

/* ---------- 各サービスの注意点（比較表直下） ---------- */
body .entry-content .me-service-notes {
  margin: 0 0 1.5em;
  padding-left: 1.4em;
}

body .entry-content .me-service-notes > li {
  margin: 0 0 14px; /* CD: 項目間は12〜16px */
}

body .entry-content .me-service-notes > li:last-child {
  margin-bottom: 0;
}

.me-service-notes__name {
  display: block;
  font-weight: 700;
  color: var(--me-text);
}

.me-note-strong {
  font-weight: 700;
  color: var(--me-emphasis); /* #5F7552。赤は使わない */
}

/* ---------- 向く人／合わない人 ---------- */
.me-fit {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 0 0 2em;
}

@media (min-width: 640px) {
  .me-fit {
    grid-template-columns: 1fr 1fr;
  }
}

.me-fit__yes,
.me-fit__no {
  background: var(--me-surface);
  border: 1px solid var(--me-border);
  border-radius: var(--me-radius);
  padding: 14px 16px;
}

/* 上線のセージは装飾。生成りとの差は小さく、色だけで「向く／合わない」を伝えない。必ず .me-fit__label の見出し文字を置く */
.me-fit__yes {
  border-top: 4px solid var(--me-sage);
}

.me-fit__no {
  border-top: 4px solid var(--me-border-strong);
}

.me-fit__label {
  font-weight: 700;
  margin: 0 0 8px;
  font-size: 16px;
}

/* ---------- CTAセット（無料の工夫→安全確認→合う／合わない→ボタン） ---------- */
.me-cta-set {
  background: var(--me-surface);
  border: 1px solid var(--me-border);
  border-radius: var(--me-radius);
  padding: 20px 16px 24px;
  margin: 2em 0;
}

.me-cta-set__step {
  margin: 0 0 1em;
}

.me-cta-set__step-title {
  font-weight: 700;
  margin: 0 0 6px;
}

/* 主ボタン。1ブロックに1つ。点滅・追従はしない */
.me-cta__button,
.me-cta-set .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  min-width: 44px;
  padding: 12px 20px;
  border-radius: var(--me-radius);
  background: var(--me-coral);
  color: #ffffff !important;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none !important;
  border: 0;
  box-sizing: border-box;
}

.me-cta__button:hover,
.me-cta-set .wp-block-button__link:hover {
  background: var(--me-coral-hover);
  color: #ffffff !important;
}

.me-cta__button:active,
.me-cta-set .wp-block-button__link:active {
  background: var(--me-coral-press);
}

.me-cta__button:visited,
.me-cta-set .wp-block-button__link:visited {
  color: #ffffff !important;
}

/* 副ボタン（枠つき） */
.me-cta__button--sub {
  background: var(--me-surface);
  color: var(--me-coral) !important;
  border: 2px solid var(--me-coral);
}

.me-cta__button--sub:hover {
  background: var(--me-coral-soft);
  color: var(--me-coral-hover) !important;
}

.me-cta__note {
  margin-top: 12px;
  font-size: 16px; /* 料金確認・解約・PRは注記サイズにしない */
  color: var(--me-text);
}

/* 未提携・未承認・サイト未公開のときはボタンを出さない（クラス付与またはブロックごと削除） */
.me-cta--hidden,
.me-cta--unapproved {
  display: none !important;
}

/* 無効ボタンは色だけに頼らず、近くに本文色で理由を書く */
.me-cta__button[aria-disabled="true"],
.me-cta__button:disabled {
  background: var(--me-disabled-bg);
  color: var(--me-text) !important; /* 無効テキスト色は 3.08:1 のため、本文色を使う */
  pointer-events: none;
}

/* ---------- 内部リンクカード ---------- */
body .entry-content .me-related {
  margin: 1.5em 0;
  padding: 0;
  list-style: none;
}

body .entry-content .me-related__item {
  background: var(--me-surface);
  border: 1px solid var(--me-border);
  border-radius: var(--me-radius);
  padding: 14px 16px;
  margin: 0 0 10px;
}

.me-related__reason {
  display: block;
  margin-top: 4px;
  color: var(--me-text-sub);
  font-size: 15px;
}

/* ---------- エピソード枠（公開時は空なら削除。下書き用） ---------- */
.me-episode {
  background: var(--me-apricot);
  border-radius: var(--me-radius);
  padding: 16px 20px;
  margin: 1.5em 0;
}

.me-episode__label {
  font-weight: 700;
  margin: 0 0 8px;
}

.me-episode--draft-only::before {
  content: "下書き専用。公開前に空なら削除する。";
  display: block;
  font-size: 14px;
  color: var(--me-text-sub);
  margin-bottom: 8px;
}

/* ---------- 相談・YMYL注意（導入や締めにCTAを置かない） ---------- */
.me-ymyl {
  background: var(--me-warning-bg);
  border-radius: var(--me-radius);
  padding: 16px 20px;
  margin: 1.5em 0;
  color: var(--me-text);
}

/* ---------- 出典 ---------- */
body .entry-content .me-source ol {
  padding-left: 1.4em;
  font-size: 15px;
  color: var(--me-text-sub);
}

/* ---------- フォーム ---------- */
.wpcf7 input,
.wpcf7 textarea {
  border: 2px solid var(--me-border-strong);
  border-radius: 8px;
  color: var(--me-text);
  background: var(--me-surface);
}

.wpcf7 .wpcf7-not-valid-tip {
  color: var(--me-error);
}

/* スマホ1画面に主ボタンが連ならないよう、記事内の主ボタン間隔を確保 */
.me-cta__button + .me-cta__button,
.me-cta-set + .me-cta-set {
  margin-top: 24px;
}



/* =====================================================================
 * 4) Cocoon 実マークアップへの対応
 *    構造: #container > #header-container > #header(.logo) + #navi / #content > #content-in.wrap > main#main.main
 *          > article > header.article-header(h1.entry-title, .date-tags) + div.entry-content + footer.article-footer
 *          / #footer / ul.mobile-footer-menu-buttons
 * ===================================================================== */

/* ---------- ヘッダー（モック: ロゴ左・メニュー右・薄い下線。アイコンなし、テキストロゴ） ---------- */
body.public-page .header-container,
body.public-page .header-container-in,
body.public-page .header,
body.public-page .navi {
  background: var(--me-bg);
  color: var(--me-text);
}

body.public-page .header-container {
  border-bottom: 1px solid var(--me-border);
  box-shadow: none;
}

body.public-page .header-container-in {
  display: flex;
  align-items: center;
  gap: 8px 16px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
  min-height: 56px;
  box-sizing: border-box;
}
@media (min-width: 768px) {
  body.public-page .header-container-in { padding: 0 24px; }
}

body.public-page .header {
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  width: auto;
  min-height: 0;
  background-image: none;
  aspect-ratio: auto;
}

body.public-page .header-in.wrap {
  width: auto;
  margin: 0;
  padding: 0;
  min-height: 0;
}

body.public-page .logo-header {
  margin: 0;
  padding: 0;
  text-align: left;
}

/* テキストロゴ（Zen Maru Gothic 700。リンクだが装飾なし。モックの .site-logo と同じ） */
body.public-page .logo-text .site-name-text-link,
body.public-page .site-name-text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
  margin: 0;
  padding: 0;
  color: var(--me-text);
  text-decoration: none;
}
body.public-page .site-name-text-link:visited {
  color: var(--me-text);
}
body.public-page .site-name-text {
  font-family: var(--me-font-heading);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--me-text);
  white-space: nowrap;
}

/* ヘッダーメニュー（Cocoonは1024px以上で表示。モックはロゴ右にテキストリンク。下線＋44px） */
body.public-page .navi {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}
body.public-page .navi-in.wrap {
  width: auto;
  margin: 0;
  padding: 0;
}
body.public-page .navi-in > ul {
  justify-content: flex-end;
  gap: 0 16px;
}
body.public-page .navi-in > ul li {
  width: auto;
  height: auto;
}
body.public-page .navi-in a {
  width: auto;
  height: auto;
  min-height: 44px;
  min-width: 44px;
  align-items: center;
  padding: 0 2px;
  font-size: 15px;
  color: var(--me-text);
  background: none;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-color: var(--me-border-strong);
}
body.public-page .navi-in a:hover,
body.public-page .navi-in .current-menu-item > a {
  background: none;
  text-decoration-color: var(--me-coral);
}
body.public-page .navi .caption-wrap,
body.public-page .navi .item-label {
  width: auto;
  overflow: visible;
  white-space: normal;
  text-overflow: clip;
}
body.public-page .navi-in > ul .caption-wrap {
  justify-content: flex-start;
}

/* ---------- ページ枠（Cocoonの白い .main / サイドバーを外し、地色 #FAF5EC に統一） ---------- */
body.public-page .content {
  margin-top: 24px;
}

body.public-page .content-in {
  width: auto;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
}

body.public-page .main {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-sizing: border-box;
}

/* モックの記事・固定ページは1カラム。サイドバーは出さない
 * （根本対応は Cocoon設定 → 全体 → サイドバー表示タイプ「サイドバーなし」。CSSは保険） */
body.public-page .sidebar {
  display: none;
}

@media (min-width: 768px) {
  body.public-page .content-in {
    padding: 0 24px;
  }
}

/* 記事・固定ページ（フロント以外）: 見出し部は地色の上、本文だけ #FFFDF9 のパネル（モックの .article-wrap 784px / 本文718px） */
body.single .content-in,
body.page:not(.front-top-page) .content-in {
  max-width: 784px;
  padding-left: 16px;
  padding-right: 16px;
}

body.single .article-header,
body.page:not(.front-top-page) .article-header {
  margin: 0 0 1.2em;
}

body.single .entry-content,
body.page:not(.front-top-page) .entry-content {
  background: var(--me-surface);
  border: 1px solid var(--me-border);
  border-radius: 10px;
  padding: 20px 16px 28px;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  body.single .entry-content,
  body.page:not(.front-top-page) .entry-content {
    padding: 32px 16px 48px;
  }
}

/* 記事・ページのタイトル（Cocoonの .entry-title 既定の余白を外す） */
body.public-page .entry-title {
  font-family: var(--me-font-heading);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.4;
  color: var(--me-text);
  background: none;
  border: 0;
  padding: 0;
  margin: 0 0 10px;
}
@media (min-width: 768px) {
  body.public-page .entry-title { font-size: 28px; }
}

/* 日付・更新日（記事はモック同様の小さい補足。固定ページは出さない） */
body.public-page .date-tags {
  font-family: var(--me-font-body);
  text-align: left;
  line-height: 1.6;
  font-size: 14px;
  color: var(--me-text-sub);
  margin: 0 0 1em;
}
/* Cocoon既定は .post-date / .post-update が 0.7em（約10px）になるため、16px未満にならないよう14pxに固定 */
body.public-page .date-tags .post-date,
body.public-page .date-tags .post-update {
  font-size: 14px;
}
/* 旧「追加CSS」欄の `.page .date-tags{display:none;}` をここに取り込み。追加CSS欄は空に戻してよい */
.page .date-tags {
  display: none;
}

/* 投稿者行・記事下メタ（固定ページでは不要） */
body.page .article-footer .footer-meta {
  display: none;
}

/* フロントページのタイトル「ホーム」は見た目だけ隠す（display:none にしない）。
 * 画面上の主見出しはコンセプト文（.me-concept）。支援技術には h1 を残す。
 * 固定ページのタイトルを「ママえらすぎ」に変えておくと、読み上げが「ママえらすぎ」から始まる。 */
body.front-top-page .article-header .entry-title,
body.home.page .article-header .entry-title {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
body.front-top-page .article-header,
body.home.page .article-header {
  margin: 0;
}

/* ---------- フッター（モックの下線・余白。メニューは外観→メニューで設定） ---------- */
body.public-page .footer {
  background: var(--me-bg);
  color: var(--me-text);
  font-family: var(--me-font-body);
  border-top: 1px solid var(--me-border);
  margin-top: 48px;
  padding: 32px 0 40px;
}
body.public-page .footer-in.wrap {
  width: auto;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
}
@media (min-width: 768px) {
  body.public-page .footer-in.wrap { padding: 0 24px; }
}
body.public-page .footer-bottom {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
  padding: 0;
}
body.public-page .footer-bottom-logo,
body.public-page .footer-bottom-content {
  position: static;
  float: none;
  width: auto;
  margin: 0;
  padding: 0;
}
body.public-page .footer-bottom-content {
  text-align: left;
}
body.public-page .footer .site-name-text {
  font-size: 16px;
}
body.public-page .navi-footer-in a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
  color: var(--me-text);
  font-size: 15px;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  background: none;
}
body.public-page .source-org.copyright,
body.public-page .copyright {
  color: var(--me-text-sub);
  font-size: 14px;
  line-height: 1.7;
  margin: 0;
  text-align: left;
}

/* ---------- モバイル下部のCocoonフッターメニュー ----------
 * 判断: モックには無い。残すと「サイドバー」「トップ」など使い道のない5ボタンが常時出て、キャプションも9pxで読めない。
 *       消すのは CSS ではなく Cocoon設定 → モバイル → 「モバイルメニュー」で行う（下記）。
 *       設定を変えるまでの間は、不要な2ボタンを隠し、残る3つ（メニュー・ホーム・検索）をブランド色の44px以上にして見苦しさと誤タップを避ける。
 *   - いま（メニューが「ホーム」だけ）: 「ボタンを表示しない（ミドルメニューのみ）」
 *   - カテゴリのメニューを作ったら: 「ヘッダーモバイルボタン」（モックと同じヘッダー内の検索・メニュー）。メニュー設定の位置は「ヘッダーモバイルボタン」
 */
@media (max-width: 1023px) {
  body.public-page .mobile-menu-buttons {
    background: var(--me-bg);
    color: var(--me-text);
    border-top: 1px solid var(--me-border);
    box-shadow: none;
  }
  body.public-page .mobile-menu-buttons .top-menu-button,
  body.public-page .mobile-menu-buttons .sidebar-menu-button {
    display: none;
  }
  body.public-page .mobile-menu-buttons .menu-button {
    min-width: 44px;
    min-height: 56px;
  }
  body.public-page .mobile-menu-buttons .menu-button > a,
  body.public-page .mobile-menu-buttons .menu-button-in {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    color: var(--me-text);
    min-height: 56px;
    padding: 6px 0;
    box-sizing: border-box;
  }
  /* メニュー（ドロワー）内のリンクも44px・下線 */
  body.public-page .mobile-menu-buttons .menu-content {
    background: var(--me-bg);
    color: var(--me-text);
  }
  body.public-page .mobile-menu-buttons .menu-content a {
    display: flex;
    align-items: center;
    min-height: 44px;
    color: var(--me-text);
    font-size: 16px;
    text-decoration: underline;
    text-underline-offset: 0.15em;
  }
  body.public-page .mobile-menu-buttons .menu-caption {
    font-size: 14px;
    opacity: 1;
    max-height: none;
    -webkit-line-clamp: unset;
  }
  body.public-page .mobile-menu-buttons .menu-icon {
    font-size: 20px;
  }
  /* 固定バーで末尾が隠れないように */
  body.mblt-footer-mobile-buttons {
    padding-bottom: 64px;
  }
}

/* ---------- Cocoon の目次（記事） ---------- */
body.public-page .toc {
  background: var(--me-surface);
  border: 1px solid var(--me-border);
  border-radius: 10px;
  color: var(--me-text);
  font-size: 16px;
  line-height: 1.7;
  width: auto;
  max-width: none;
  padding: 14px 16px;
  margin: 0 0 1.5em;
}
body.public-page .toc-title {
  font-family: var(--me-font-body);
  font-weight: 700;
  font-size: 16px;
  text-align: left;
  color: var(--me-text);
}
body.public-page .toc a {
  color: var(--me-link);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* ---------- パンくず（Cocoon: .breadcrumb。モックは小さな補足文字＋下線リンク） ---------- */
body.public-page .breadcrumb {
  background: none;
  color: var(--me-text-sub);
  font-size: 14px;
  line-height: 1.6;
  padding: 0;
  margin: 16px 0 0;
}
body.public-page .breadcrumb a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
  color: var(--me-text);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-color: var(--me-border-strong);
}

/* ページ上部へ戻るボタン（PC。タップ44px） */
body.public-page .go-to-top-button {
  width: 44px;
  height: 44px;
}

/* ===== 記事テンプレート（2026-11-16 CD差し戻し対応 / ver e） ===== */

/* 見出しの折り返しを整える（<wbr>は入れない方針） */
body .entry-title,
body .article h2,
body .article h3,
body .entry-content h2,
body .entry-content h3 {
  text-wrap: balance;
  word-break: auto-phrase;
}

/* 記事上のシェア・記事下のフォローは出さない（設定でも非表示。念のためCSSでも隠す） */
body .sns-share.ss-top,
body .sns-follow {
  display: none !important;
}

/* 記事下のシェア：トーンに合わせる。原色は使わない */
body .sns-share.ss-bottom .sns-share-message {
  color: var(--me-text, #4A3B32);
}
body .sns-share.ss-bottom .sns-share-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
body .sns-share.ss-bottom .sns-share-buttons > a,
body .sns-share.ss-bottom .sns-share-buttons > a.share-button {
  position: relative;
  width: auto;
  margin: 0;
  height: 36px;               /* 見た目は今の約8割 */
  min-height: 0;
  padding: 0 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #FFFDF8 !important;
  color: #4A3B32 !important;
  border: 1px solid #4A3B32;
  border-radius: 999px;
  box-shadow: none;
  font-size: 14px;
  line-height: 1;
  text-decoration: none;
  opacity: 1;
}
/* タップ領域は44px確保（見た目の外側へ上下4pxずつ広げる。行間8pxなので重ならない） */
body .sns-share.ss-bottom .sns-share-buttons > a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -4px;
  bottom: -4px;
}
body .sns-share.ss-bottom .sns-share-buttons > a *,
body .sns-share.ss-bottom .sns-share-buttons > a .social-icon,
body .sns-share.ss-bottom .sns-share-buttons > a .button-caption {
  color: #4A3B32 !important;
  font-size: 14px;
  position: static;
}
body .sns-share.ss-bottom .sns-share-buttons > a:hover,
body .sns-share.ss-bottom .sns-share-buttons > a:focus-visible {
  background: #F3EBDD !important;
}
body .sns-share.ss-bottom .sns-share-buttons > a:focus-visible {
  outline: 2px solid #5F7552;
  outline-offset: 2px;
}
body .sns-share.ss-bottom .share-count {
  display: none;
}

/* 目次も見出しと同じ折り返し（2026-11-16 CD） */
body .toc-content li,
body .toc-content a,
body .toc-title {
  text-wrap: balance;
  word-break: auto-phrase;
}

/* 関連記事が0件のときは見出しごと出さない（:has 対応ブラウザ。Cocoonの空表示文言を隠す） */
body .related-entries:not(:has(a)) {
  display: none !important;
}

/* コメント欄は止める（設定で非表示。念のため） */
body .comment-area,
body #comment-area {
  display: none !important;
}

/* =====================================================================
 * 5) トップページ部品（固定ページ本文のカスタムHTML。クラスは docs/top-page-setup.md のとおり）
 * ===================================================================== */

/* コンセプト文（ファーストビュー）。[me_concept] が <p class="me-concept hero__text"> を出す。差し替えは文言だけ。
 * 見た目は大きなキャッチ（モック: 24px / PC 36px、行間1.5、強調 em は #5F7552）。
 * 文書上の h1 は固定ページのタイトル（見た目は隠し、読み上げには残す）。この文は見出しタグにしない（差し替え口を p のままにするため）。 */
body .entry-content .me-concept,
body .entry-content .hero__text {
  font-family: var(--me-font-heading);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.5;
  color: var(--me-text);
  max-width: 18em;
  margin: 0;
  padding: 24px 0 16px;
  overflow-wrap: normal;
  word-break: normal;
}
body .entry-content .me-concept em,
body .entry-content .hero__text em {
  font-style: normal;
  font-weight: 700;
  color: var(--me-emphasis);
}
@media (min-width: 768px) {
  body .entry-content .me-concept,
  body .entry-content .hero__text {
    font-size: 36px;
    max-width: 16em;
    padding: 48px 0 24px;
  }
}

/* 人物なしの図形（PCのみ。モバイルは文と重なるので出さない） */
@media (min-width: 1024px) {
  body.front-top-page .entry-content {
    position: relative;
  }
  body.front-top-page .entry-content .me-concept::before,
  body.front-top-page .entry-content .me-concept::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
  }
  body.front-top-page .entry-content .me-concept::before {
    width: 140px;
    height: 140px;
    background: var(--me-apricot);
    top: 32px;
    right: 16px;
  }
  body.front-top-page .entry-content .me-concept::after {
    width: 80px;
    height: 80px;
    background: var(--me-sage);
    top: 112px;
    right: 106px;
  }
}

/* セクション見出し（今日の入口・新着・運営者）。Cocoon既定のグレー箱は出さない */
body .entry-content .section-title,
body.front-top-page .entry-content h2 {
  font-family: var(--me-font-heading);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.4;
  color: var(--me-text);
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin: 2em 0 0.8em;
}
@media (min-width: 768px) {
  body .entry-content .section-title,
  body.front-top-page .entry-content h2 {
    font-size: 26px;
  }
}

body .entry-content .entries {
  margin: 0;
  padding: 0;
}
body .entry-content .entries > .section-title:first-child {
  margin-top: 1em;
}

/* 入口カード */
body .entry-content .gate-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
body .entry-content .gate-list > li {
  margin: 0;
  padding: 0;
}
@media (min-width: 768px) {
  body .entry-content .gate-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* href の無いカードはリンクに見せない（静かなカード）。href があればリンク（見出し側に下線・カード全体が44px以上のタップ領域） */
body .entry-content a.gate-card,
body .entry-content a.gate-card:visited {
  display: block;
  box-sizing: border-box;
  min-height: 44px;
  height: 100%;
  background: var(--me-surface);
  border: 1px solid var(--me-border);
  border-radius: 10px;
  padding: 16px 18px;
  color: var(--me-text);
  text-decoration: none;
}
body .entry-content a.gate-card:not([href]) {
  cursor: default;
}
body .entry-content a.gate-card:not([href]) .gate-card__label {
  text-decoration: none;
}
body .entry-content a.gate-card[href]:hover {
  border-color: var(--me-border-strong);
}
body .entry-content .gate-card__label {
  display: block;
  font-family: var(--me-font-heading);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.5;
  margin: 0 0 4px;
  color: var(--me-text);
}
body .entry-content a.gate-card[href] .gate-card__label {
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-color: var(--me-border-strong);
}
body .entry-content .gate-card__cat {
  display: block;
  font-size: 15px;
  line-height: 1.6;
  color: var(--me-text-sub);
  text-decoration: none;
}

/* 新着（「最新の投稿」ブロック）。投稿が0件のときは見出しごと出さない（件数の水増し・空セクションを避ける） */
body .entry-content ul.wp-block-latest-posts:empty {
  display: none;
}
body .entry-content h2:has(+ ul.wp-block-latest-posts:empty) {
  display: none;
}
body .entry-content ul.wp-block-latest-posts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
body .entry-content ul.wp-block-latest-posts > li {
  margin: 0;
  padding: 0 0 14px;
  background: var(--me-surface);
  border: 1px solid var(--me-border);
  border-radius: 10px;
  overflow: hidden;
}
body .entry-content ul.wp-block-latest-posts .wp-block-latest-posts__featured-image {
  margin: 0 0 12px;
}
body .entry-content ul.wp-block-latest-posts .wp-block-latest-posts__featured-image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
}
body .entry-content ul.wp-block-latest-posts .wp-block-latest-posts__post-title {
  display: inline-block;
  margin: 0 16px;
  font-family: var(--me-font-heading);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.5;
  color: var(--me-text);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-color: var(--me-border-strong);
  min-height: 44px;
}
body .entry-content ul.wp-block-latest-posts .wp-block-latest-posts__post-date {
  display: block;
  margin: 4px 16px 0;
  font-size: 14px;
  color: var(--me-text-sub);
}
@media (min-width: 768px) {
  body .entry-content ul.wp-block-latest-posts {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* カテゴリ入口（記事のあるカテゴリだけ置く） */
body .entry-content .cat-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
body .entry-content .cat-list > li {
  margin: 0;
}
body .entry-content a.cat-chip,
body .entry-content a.cat-chip:visited {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
  padding: 6px 14px;
  background: var(--me-surface);
  border: 1px solid var(--me-border);
  border-radius: 999px;
  color: var(--me-text);
  font-size: 15px;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-color: var(--me-border-strong);
}

/* 運営者ボックス（見出しは .entries 内でボックスの外。2026-11-16c CD指示） */
body .entry-content .about-box {
  background: var(--me-surface);
  border: 1px solid var(--me-border);
  border-radius: 10px;
  padding: 16px 20px;
  margin: 2em 0 0;
}
body .entry-content .entries > .about-box {
  margin-top: 0;
}
body .entry-content .about-box > .section-title,
body .entry-content .about-box > h2 {
  margin: 0 0 0.6em;
  font-size: 20px;
}
body .entry-content .about-box p {
  margin: 0 0 0.8em;
}
body .entry-content .about-box p:last-child {
  margin-bottom: 0;
}
body .entry-content .about-box a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-color: var(--me-border-strong);
}

/* CTAボタンの文字色・下線は本文リンク（body .entry-content a）に負けない。ボタンは本番ではURL承認後のみ出る */
body .entry-content a.me-cta__button,
body .entry-content .me-cta-set .wp-block-button__link {
  text-decoration: none !important;
}
.me-cta__button--sub:visited {
  color: var(--me-coral) !important;
}
.me-cta__button--sub:visited:hover {
  color: var(--me-coral-hover) !important;
}
.me-cta__button--sub:active {
  background: var(--me-coral-soft);
}

/* 比較表は横スクロール前提。Cocoonの table{max-width:100%} で列幅が潰れないようにする */
.me-compare table {
  max-width: none;
}

/* 比較表セルの日付・時間の固有表記 */
.me-compare .me-nobr {
  white-space: nowrap;
}

/* 表セルは折り返す（旧版から継承。横スクロールは .me-compare__scroll で残る） */
.me-compare th,
.me-compare td {
  max-width: 14em;
  white-space: normal;
}
