/* ============================================================
   マッチ学園「チョークボード×採点」デザイン (案A+C / 2026-08-21)
   黒板グリーン #2E5E4E / 深緑 #234A3C / 赤ペン #D9483B
   鉛筆インク #2A2A26 / ノート紙 #F6F1E6 / 採点朱(明朝) はCの遺伝子
   ============================================================ */

/* --- 見出し書体: Zen Kaku Gothic New --- */
h1, h2, h3, h4,
.site_title,
.heading,
.keyvisual__text_area {
  font-family: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
}
.site_title__link {
  font-weight: 900;
  letter-spacing: 0.04em;
}

/* --- キービジュアル = 黒板（チョークの枠線と文字） --- */
.keyvisual {
  position: relative;
}
.keyvisual::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 2px dashed rgba(249, 246, 236, 0.35);
  border-radius: 10px;
  pointer-events: none;
}
.keyvisual__text_area {
  color: #f9f6ec;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  letter-spacing: 0.05em;
}

/* --- 記事本文 h2: 赤ペンの短いアンダーバー ＋ 薄い罫線 --- */
.main_content h2.wp-block-heading {
  color: #234a3c;
  font-weight: 900;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(35, 74, 60, 0.18);
  background: linear-gradient(#d9483b, #d9483b) left bottom / 56px 3px no-repeat;
}

/* --- 記事本文 h3: 赤ペンの縦マーカー --- */
.main_content h3.wp-block-heading {
  color: #234a3c;
  padding: 2px 0 2px 12px;
  border-left: 4px solid #d9483b;
  border-radius: 2px;
}

/* --- 引用 = 答案用紙の罫線（案Cの遺伝子） --- */
.main_content blockquote {
  background: repeating-linear-gradient(transparent 0 25px, rgba(38, 53, 94, 0.08) 25px 26px), #fffdf6;
  border: 1px solid #e6ddc8;
  border-left: 4px solid #c13b2a;
  border-radius: 8px;
  padding: 14px 16px;
}

/* --- サイドバー見出し = 黒板ミニパネル --- */
.sub_content .widget h3.wp-block-heading,
.sub_content .heading__title {
  background: #2e5e4e;
  color: #f9f6ec;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 0.98em;
  font-weight: 700;
  letter-spacing: 0.04em;
  outline: 1.5px dashed rgba(249, 246, 236, 0.45);
  outline-offset: -5px;
}

/* --- 採点スタンプ / 点数（案Cの遺伝子・記事内で使える汎用クラス） --- */
.mg-stamp {
  display: inline-block;
  border: 2px solid #c13b2a;
  color: #c13b2a;
  border-radius: 6px;
  padding: 1px 9px;
  font-weight: 800;
  font-size: 0.8em;
  letter-spacing: 0.1em;
  transform: rotate(-3deg);
  background: rgba(255, 255, 255, 0.6);
}
.mg-score {
  font-family: "Shippori Mincho", serif;
  color: #c13b2a;
  font-weight: 800;
  font-size: 1.35em;
  letter-spacing: 0.02em;
}

/* --- 冒頭の統合表記はノート紙に沈める --- */
p.taffi-notice {
  color: #a89f8d;
}

/* --- 商品カードはノート紙の上で白く浮かせる --- */
.taffi-card {
  box-shadow: 0 1px 2px rgba(42, 42, 38, 0.05), 0 10px 24px -12px rgba(42, 42, 38, 0.16);
}

/* --- サイドバー（.l-side_main 配下）: 黒板ミニパネル見出し＋整列リスト --- */
.l-side_main .widget h3.wp-block-heading {
  background: #2e5e4e;
  color: #f9f6ec;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 0.95em;
  font-weight: 700;
  letter-spacing: 0.04em;
  outline: 1.5px dashed rgba(249, 246, 236, 0.45);
  outline-offset: -5px;
  margin-bottom: 6px;
}
.l-side_main .widget ul {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  font-size: 0.88em;
}
.l-side_main .widget li {
  padding: 9px 2px;
  border-bottom: 1px dashed rgba(35, 74, 60, 0.25);
  line-height: 1.55;
}
.l-side_main .widget li:last-child { border-bottom: 0; }
.l-side_main .widget a { text-decoration: none; }
.l-side_main .wp-block-latest-posts__post-date {
  display: block;
  font-size: 0.82em;
  color: #8b8574;
  margin-top: 2px;
}
.l-side_main .wpp-excerpt { display: none; }
.l-side_main .widget { margin-bottom: 22px; }

/* キービジュアルのURL表示は非表示（タイトル＋キャッチフレーズで十分） */
.keyvisual__text_area__inner small { display: none; }

/* ============================================================
   本文タイポグラフィ（読む体験の作り込み）
   ============================================================ */

/* 段落: ゆったりした行間とリズム */
.main_content p {
  line-height: 1.95;
  margin: 1.5em 0;
  letter-spacing: 0.015em;
}
.main_content p.taffi-notice { margin: 0 0 12px; }

/* 本文リンク = 赤ペンの下線 */
.main_content p a,
.main_content li a {
  color: #b23e30;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(217, 72, 59, 0.45);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.main_content p a:hover,
.main_content li a:hover { text-decoration-color: #d9483b; }

/* 強調: 太字 ＋ 蛍光マーカー（==〜==記法） */
.main_content strong { font-weight: 800; }
.main_content mark.mg-marker,
.main_content mark {
  background: linear-gradient(transparent 52%, rgba(247, 227, 107, 0.85) 52%);
  padding: 0 2px;
  color: inherit;
}

/* 箇条書き = 赤ペンのチェックリスト */
.main_content ul.wp-block-list {
  list-style: none;
  margin: 1.6em 0;
  padding: 14px 18px;
  background: #fffdf6;
  border: 1px solid #e6ddc8;
  border-radius: 10px;
}
.main_content ul.wp-block-list > li {
  position: relative;
  padding-left: 1.7em;
  margin: 0.55em 0;
  line-height: 1.8;
}
.main_content ul.wp-block-list > li::before {
  content: "✓";
  position: absolute;
  left: 0.2em;
  color: #d9483b;
  font-weight: 800;
}
.main_content ol { margin: 1.6em 0; }
.main_content ol > li { margin: 0.5em 0; line-height: 1.8; }
.main_content ol > li::marker { color: #234a3c; font-weight: 800; }

/* 区切り線 = チョークの破線 */
.main_content hr {
  border: 0;
  border-top: 2px dashed rgba(35, 74, 60, 0.35);
  margin: 2.4em auto;
  max-width: 240px;
}

/* テーブル = 黒板ヘッダー×ノート紙 */
.main_content table { border-collapse: collapse; margin: 1.6em 0; }
.main_content th {
  background: #2e5e4e;
  color: #f9f6ec;
  border: 1px solid #24493c;
  padding: 0.6em 0.9em;
  font-weight: 700;
}
.main_content td {
  border: 1px solid #dcd3bf;
  padding: 0.6em 0.9em;
  background: #fff;
}
.main_content tr:nth-child(even) td { background: #fbf8ef; }

/* 見出し前後の呼吸 */
.main_content h2.wp-block-heading { margin: 2.6em 0 1em; }
.main_content h3.wp-block-heading { margin: 2em 0 0.8em; }

/* 動画・カードの余白 */
.main_content .wp-block-embed { margin: 2em 0; }
.main_content .taffi-card { margin: 1.8em 0 2.4em; }

/* --- フッター上ウィジェット（アーカイブ/カテゴリー）: 黒板ミニパネル --- */
.c-footer_top .widget h2 {
  font-size: 1em;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: #2e5e4e;
  color: #f9f6ec;
  padding: 9px 14px;
  border-radius: 8px;
  outline: 1.5px dashed rgba(249, 246, 236, 0.45);
  outline-offset: -5px;
  margin: 0 0 10px;
}
.c-footer_top .widget ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9em;
}
.c-footer_top .widget li {
  padding: 8px 2px;
  border-bottom: 1px dashed rgba(35, 74, 60, 0.22);
  line-height: 1.6;
}
.c-footer_top .widget li:last-child { border-bottom: 0; }
.c-footer_top .widget li .children { margin-left: 1em; border-top: 1px dashed rgba(35, 74, 60, 0.22); margin-top: 8px; }
.c-footer_top .widget a { text-decoration: none; }

/* --- 関連記事: 1件もない場合はセクションごと非表示 --- */
.related:has(.archive-is-related:not(:has(article))) { display: none; }

/* --- スマホのヒーロー最適化 --- */
@media (max-width: 767px) {
  /* ティッカー+検索の帯はヒーローと重なるため非表示（検索はメニュー内から） */
  .l-info_search { display: none; }
  /* Scrollインジケーターはサブタイトルと衝突するため非表示 */
  .keyvisual__scroll_area { display: none; }
  /* タイトルをスマホ幅に収める */
  .keyvisual__text_area__inner h1.heading-is-custom {
    font-size: 24px;
    line-height: 1.5;
    letter-spacing: 0.03em;
  }
  .keyvisual__text_area__inner { padding: 0 14px; }
}

/* スマホ: キービジュアル文字の確実な上書き（テーマ生成CSSが4rem/nowrapのため） */
@media (max-width: 767px) {
  .l-keyvisual_top .heading-is-custom,
  .l-keyvisual_common .heading-is-custom {
    font-size: 23px !important;
    line-height: 1.55 !important;
    white-space: normal !important;
    text-align: center;
  }
  .l-keyvisual_top .phrase-is-custom,
  .l-keyvisual_common .phrase-is-custom {
    font-size: 13px !important;
    white-space: normal !important;
    text-align: center;
  }
  .keyvisual__text_area,
  .keyvisual__text_area__inner {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
}

/* スマホ: ヒーロー上に浮くPCナビ（ホーム）は非表示（ハンバーガーメニューがあるため） */
@media (max-width: 767px) {
  .global_navi { display: none; }
  html, body { overflow-x: clip; }
}

/* --- 文字サイズの底上げ（テーマ既定: 本文13.5〜15pxは小さすぎるため） --- */
body {
  font-size: clamp(1.5rem, 1.6vw, 1.6rem); /* 15〜16px */
}
.main_content p,
.main_content li {
  font-size: 1.6rem; /* 記事本文は16px固定 */
}
.main_content h2.wp-block-heading {
  font-size: clamp(2.1rem, 2.5vw, 2.5rem); /* 21〜25px */
}
.main_content h3.wp-block-heading {
  font-size: clamp(1.8rem, 2.1vw, 2.1rem); /* 18〜21px */
}
@media (max-width: 767px) {
  /* SPヒーロータイトルも少し大きく（23px→26px・2行想定） */
  .l-keyvisual_top .heading-is-custom,
  .l-keyvisual_common .heading-is-custom {
    font-size: 26px !important;
  }
}
