/* =========================================================
 * 公開ページのデザイン調整（マイページでは読み込まない：parts/head.php）
 * 既存の index.css / event.css / template.css などは複数ページで共有しているため、
 * 直接は書き換えず、このファイルで上書きする。
 * ========================================================= */

/* ---------- 見出し：単語の途中で改行しない・行の長さをそろえる ---------- */
:root h1, :root h2, :root h3,
:root .marathon_text, :root .marathon_text2, :root .template_text, :root .mein_text,
:root .text_mein, :root .event_name, :root .mc-section-title {
  word-break: auto-phrase;   /* 日本語を文節で改行（対応ブラウザのみ） */
  text-wrap: balance;
  line-height: 1.45;
}

/* ---------- ページ上部の帯のページ名（div → h1 に変更）：見た目は元のまま ---------- */
:root h1.marathon_text,
:root h1.template_text,
:root h1.mein_text {
  font-weight: inherit;
}

:root h1.sec_heading {
  display: flex;
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
}

/* ---------- 本文：行間を広げて読みやすく ---------- */
:root .section_2 .marathon_text_sub,
:root .section_2 .text_sub,
:root .section_2 .event_text,
:root .template_content,
:root .template_content_sub,
:root .terms_text,
:root .news_content_text {
  line-height: 1.9;
}

/* ---------- 本文中のリンク（ボタン以外）をサイトの色に ---------- */
/* パンくずリスト・ニュース一覧・ボタンは除く（それぞれ専用の見た目がある） */
:root .section_2 a:not([class]):not(.button_common a):not(.button_event a):not(.marathon_button a):not(.mc-breadcrumb a):not(.mc-news-list a) {
  color: #2f7a1f;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

:root .section_2 a:not([class]):not(.button_common a):not(.button_event a):not(.marathon_button a):not(.mc-breadcrumb a):not(.mc-news-list a):hover {
  color: #0d3e30;
}

/* ---------- ボタンの上下の余白（スマホで見出しと詰まっていた） ----------
 * 案内ページのボタンの並び（page.css の .mc-buttons / .mc-inline-buttons）は除く */
@media screen and (max-width: 700px) {
  :root .section_2 .button_common:not(.mc-buttons > *):not(.mc-inline-buttons > *) {
    margin-top: 1.5em;
    margin-bottom: 2.5em;
  }
}

/* ---------- 告知（イベント終了など） ---------- */
:root .event_notice {
  max-width: 760px;
  margin: 32px auto 8px;
  padding: 18px 24px;
  border: 2px solid #c9a227;
  border-radius: 6px;
  background-color: rgba(255, 255, 255, 0.96);
  color: #8a1c1c;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.7;
  text-align: center;
  word-break: auto-phrase;
}

@media screen and (max-width: 700px) {
  :root .event_notice {
    margin: 20px 16px 4px;
    padding: 14px 16px;
    font-size: 15px;
  }
}

/* ---------- 表が枠からはみ出すときは横スクロール（ゴルフマラソンの行程表など） ---------- */
:root .marathon_content table {
  max-width: 100%;
}

/* ---------- ニュース一覧のページ送り：現在のページを分かりやすく ---------- */
:root .now_page_number {
  display: inline-block;
  min-width: 2em;
  padding: 2px 6px;
  border-radius: 4px;
  background-color: #48922b;
  color: #ffffff !important;
  text-align: center;
}
