/* ============================================================================
   WACULブログ 静的版のスタイル（自前で完結）

   本番テーマのCSS（layout.min.css / custom.css・137KB）は読み込んでいない。
   テーマは本番のHTML構造を前提に書かれており、こちらのマークアップとは
   噛み合わないため、`width:100vw` のドロップダウンや `img{width:auto}` などが
   意図せず効いてレイアウトを壊していた。基本スタイルもここで完結させている。
   ========================================================================== */

/* --- リセットと基本 --- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

/* 本番と同じフォントスタック。
   本番は AxisStd / Avenir Next を Monotype から読み込んでいるが、
   あれはドメイン紐付きのライセンスフォントなのでこちらでは使えない。
   Noto Sans JP と Lato も Webフォントとしては読み込んでいないため、
   実際の表示は端末のフォント（Windows: メイリオ / Mac: ヒラギノ）になる。
   Webフォントを読ませたい場合は下の @import を有効にする（日本語は数百KB増える）。 */
:root {
  --font-sans: "Noto Sans JP", "Lato", "ヒラギノ角ゴ ProN", "Hiragino Kaku Gothic ProN",
    "ヒラギノ角ゴ Pro", "Hiragino Kaku Gothic Pro", "メイリオ", "Meiryo",
    "ＭＳ Ｐゴシック", "MS PGothic", sans-serif;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 700; line-height: 1.45; }
p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg, video { max-width: 100%; height: auto; vertical-align: middle; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
table { border-collapse: collapse; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* 本文の中だけは通常のリスト表示に戻す（記事はマークダウン由来） */
.single__contents ul, .single__contents ol { margin: 0 0 1.6em; padding-left: 1.6em; }
.single__contents ul { list-style: disc; }
.single__contents ol { list-style: decimal; }
.single__contents li { margin-bottom: 0.4em; }
.single__contents li::marker { color: var(--brand); }
.single__contents dl { margin: 0 0 1.6em; }
.single__contents dt { font-weight: 700; margin-top: 1em; }
.single__contents dd { margin-left: 1.2em; }
.single__contents blockquote {
  margin: 24px 0; padding: 14px 18px; border-left: 3px solid var(--line);
  background: var(--bg-soft); color: var(--ink-mute);
}
.single__contents pre {
  margin: 24px 0; padding: 16px; background: #1f2937; color: #e5e7eb;
  border-radius: 6px; overflow-x: auto; font-size: 13px; line-height: 1.7;
}
.single__contents code {
  background: var(--bg-soft); padding: 0.15em 0.4em; border-radius: 3px; font-size: 0.92em;
}
.single__contents pre code { background: none; padding: 0; color: inherit; }

:root {
  --brand: #1cb57b;
  /* 文字・リンクの緑はブランド色そのまま。ボタンのホバーだけ変化が分かるよう濃くする */
  --brand-dark: #1cb57b;
  --brand-hover: #169862;
  --ink: #333;
  --ink-mute: #6b7280;
  --line: #e5e7eb;
  --bg-soft: #f7f9f8;

  /* レイアウトの幅。ここを変えるとヘッダー・フッター・本文・サイドバーが揃って動く。
     本文幅 = --container - 左右padding(40) - --gap - --sidebar */
  --container: 1180px;
  --sidebar: 290px;
  --gap: 48px;
}

/* --- 日本語の折り返し ---
   「アクセス解析を自動化しません / か？」のように、行末に1〜2文字だけ
   取り残される折り返しを防ぐ。
   - text-wrap: balance … 行の長さを揃える（見出し向け。長文には効かせない）
   - line-break: strict … 句読点や小書き文字の禁則を厳密に扱う
   - word-break: auto-phrase … 文節単位で折る（対応ブラウザのみ。未対応でも無害） */
.sidebar-cta__heading,
.modal-cta__heading,
.cv-box p:first-child,
.fixed-banner__text,
.card__title,
.single__title h1,
.mainvisual__title,
.related__heading,
.home-section__heading,
.sidebar-heading {
  text-wrap: balance;
  line-break: strict;
  word-break: auto-phrase;
}

/* 本文の見出しも同じ扱い。段落は対象にしない（長文でbalanceは効かないため） */
.single__contents h2,
.single__contents h3,
.single__contents h4 {
  text-wrap: balance;
  line-break: strict;
  word-break: auto-phrase;
}

/* --- 上部固定エリア（帯 + ヘッダー） ---
   下スクロールで隠し、上スクロールで出す。JSが .is-hidden を付け外しする。
   高さは中身（帯の有無・2行/1行）で変わるので、JSが --header-h に実測値を入れる。 */
.site-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transform: translateY(0);
  transition: transform 0.28s ease;
  will-change: transform;
}
.site-top.is-hidden { transform: translateY(-100%); }

/* 固定したぶん本文を押し下げる。JSが実測値を入れるまでは概算値を使う */
body { padding-top: var(--header-h, 118px); }

@media (prefers-reduced-motion: reduce) {
  .site-top { transition: none; }
}

/* --- 実験サイトであることを示す帯（本番と混同しないように） --- */
.staging-badge {
  background: #1f2937;
  color: #fff;
  font-size: 12px;
  line-height: 1.5;
  padding: 6px 12px;
  text-align: center;
}
.staging-badge a { color: #7dd3ac; text-decoration: underline; }

/* --- 本文内CTA（WordPressでは記事ごとに<style>で重複していたもの） --- */
.cv-box {
  border: 2px solid var(--brand);
  padding: 30px 25px;
  max-width: 650px;
  margin: 0 auto 25px auto;
  color: var(--ink);
  text-align: center;
  border-radius: 8px;
  box-sizing: border-box;
}
.cv-box p:first-child {
  color: var(--brand);
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 15px;
}
.cv-box p { font-size: 16px; line-height: 1.6; margin: 0 0 25px 0; }
.cv-box strong { font-weight: 700; }
.cv-button-wrap { text-align: center; margin: 0; }
.cv-button {
  display: inline-block;
  background-color: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  padding: 14px 48px;
  border-radius: 50px;
  text-decoration: none;
  transition: background-color 0.3s ease;
  cursor: pointer;
}
.cv-button:hover { background-color: var(--brand-hover); color: #fff; }

/* CTAボタンの文字は常に白。
   本文内のCTAは .single__contents の中にあるため、`.single__contents a { color: ... }`
   （詳細度 0,1,1）に負けて文字が緑になってしまう。どの場所に置かれても白を保つよう
   同等以上の詳細度で指定しておく。 */
.single__contents a.cv-button,
.single__contents .cv-button-wrap a,
.single__contents-banner_bottom a.cv-button,
.sidebar-cta a.cv-button,
.modal-cta a.cv-button,
a.cv-button,
a.fixed-banner__button,
a.header__cta {
  color: #fff;
}
.single__contents a.cv-button:hover,
.single__contents .cv-button-wrap a:hover,
a.cv-button:hover,
a.fixed-banner__button:hover,
a.header__cta:hover {
  color: #fff;
}

@media (max-width: 767px) {
  .cv-box { padding: 20px 16px; }
  .cv-button { font-size: 15px; padding: 13px 24px; width: 100%; box-sizing: border-box; }
}

/* --- 本文中の注記ボックス（旧 .aside-group） --- */
.single__contents aside.note {
  background: var(--bg-soft);
  border-left: 4px solid var(--brand);
  padding: 16px 18px;
  margin: 24px 0;
  font-size: 15px;
  line-height: 1.8;
  border-radius: 0 6px 6px 0;
}
.single__contents aside.note a { color: var(--brand-dark); }

/* --- 目次（旧 ez-toc プラグインの代替） --- */
.toc {
  border: 1px solid var(--line);
  background: var(--bg-soft);
  border-radius: 8px;
  padding: 18px 22px;
  margin: 0 0 32px;
}
.toc__title {
  font-weight: 700;
  font-size: 17px;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.toc__toggle {
  font-size: 12px;
  font-weight: 400;
  color: var(--brand-dark);
  background: none;
  border: 1px solid var(--brand);
  border-radius: 999px;
  padding: 2px 10px;
  cursor: pointer;
}
.toc__list { margin: 0; padding-left: 1.3em; font-size: 15px; line-height: 1.9; }
.toc__list ol { padding-left: 1.2em; font-size: 14px; }
.toc__list a { color: var(--ink); text-decoration: none; }
.toc__list a:hover { color: var(--brand-dark); text-decoration: underline; }

/* --- 本文のタイポグラフィ（画像・テーブルのはみ出し対策込み） --- */
.single__contents { font-size: 16px; line-height: 1.9; color: var(--ink); }
.single__contents img { max-width: 100%; height: auto; }
.single__contents h2 { margin: 48px 0 16px; font-size: 24px; line-height: 1.5; }
.single__contents h3 { margin: 36px 0 12px; font-size: 20px; line-height: 1.5; }
.single__contents h4 { margin: 28px 0 10px; font-size: 17px; }
.single__contents p { margin: 0 0 1.6em; }
/* 本文中のリンクは下線を出す。リセットで消しているので明示的に戻す */
.single__contents a { color: var(--brand-dark); text-decoration: underline; text-underline-offset: 0.15em; }
.single__contents a:hover { text-decoration: none; }
/* ボタンと目次は下線を出さない（目次は本文の中に置いているため巻き込まれる） */
.single__contents a.cv-button,
.single__contents .cv-button-wrap a,
.single__contents .toc a { text-decoration: none; }
.single__contents .toc a:hover { text-decoration: underline; }
.single__contents .table-overflow { overflow-x: auto; margin: 24px 0; }
.single__contents table { border-collapse: collapse; width: 100%; font-size: 15px; }
.single__contents table th,
.single__contents table td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.single__contents table th { background: var(--bg-soft); font-weight: 700; }
.single__contents span.strong { font-weight: 700; background: linear-gradient(transparent 60%, #d8f3e6 60%); }

/* アンカー用の空div。固定ヘッダーに隠れないようオフセットを持たせる */
/* 固定ヘッダーに隠れないようオフセットを取る。高さはJSが入れる実測値に追従する */
.single__contents div[id],
.single__contents h2[id],
.single__contents h3[id],
.single__contents h4[id] { scroll-margin-top: calc(var(--header-h, 118px) + 16px); }

/* --- 記事カード / 一覧 --- */
.contentlist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
  margin: 0 0 40px;
}
.card { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.card__link { display: block; text-decoration: none; color: inherit; height: 100%; }
.card__link:hover { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08); }
.card__thumb { aspect-ratio: 40 / 21; background: var(--bg-soft); overflow: hidden; }
.card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card__thumb--placeholder { width: 100%; height: 100%; background: linear-gradient(135deg, #e8f5ef, #d3ecdf); }
.card__body { padding: 14px 16px 18px; }
.card__title { font-size: 15px; line-height: 1.6; margin: 0 0 10px; font-weight: 700; }
.card__meta { font-size: 12px; color: var(--ink-mute); margin: 0; display: flex; gap: 10px; align-items: center; }
.card__cat { background: var(--bg-soft); color: var(--brand-dark); padding: 2px 8px; border-radius: 999px; }

/* --- パンくず --- */
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; font-size: 12px; }
.breadcrumb li + li::before { content: '›'; margin-right: 6px; color: var(--ink-mute); }
.breadcrumb a { color: inherit; }

/* --- メインビジュアル --- */
.mainvisual { background: var(--bg-soft) center/cover no-repeat; padding: 28px 0; position: relative; }
/* カテゴリ一覧も背景に写真が入る。単色のときは膜を出さない */
.mainvisual_archive { min-height: 190px; display: flex; align-items: center; }
.mainvisual_archive[style*="background-image"]::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(20, 30, 26, 0.5);
}
.mainvisual_archive[style*="background-image"] .mainvisual__inner { color: #fff; }
.mainvisual_archive[style*="background-image"] .mainvisual__count { color: rgba(255, 255, 255, 0.85); }
.mainvisual_archive[style*="background-image"] .breadcrumb a,
.mainvisual_archive[style*="background-image"] .breadcrumb span { color: #fff; }
.mainvisual_archive[style*="background-image"] .breadcrumb li + li::before { color: rgba(255, 255, 255, 0.7); }
.mainvisual_archive .mainvisual__inner { position: relative; }
/* 記事ページは背景にアイキャッチが入る。文字が読めるよう暗い膜を重ねる */
/* トップページ。写真背景が無いぶん余白を詰め、見出しはブランド色にする */
.mainvisual_home { padding: 22px 0 24px; }
/* 見出しとリード文は左寄せ。中央寄せの既定を打ち消す。
   H1だけ左にするとリード文と軸がずれるので、まとまりごと左に揃えている。 */
.mainvisual_home .mainvisual__title,
.mainvisual_home .mainvisual__lead { text-align: left; }
.mainvisual_home .mainvisual__title { color: var(--brand); font-size: 26px; margin: 0 0 6px; }
.mainvisual_home .mainvisual__lead { margin: 0; }

.mainvisual_single { min-height: 200px; display: flex; align-items: flex-end; }
.mainvisual_single::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.55) 100%);
}
.mainvisual_single .mainvisual__inner { position: relative; color: #fff; }
.mainvisual_single .breadcrumb a,
.mainvisual_single .breadcrumb span { color: #fff; }
.mainvisual_single .breadcrumb li + li::before { color: rgba(255, 255, 255, 0.7); }
/* テーマCSSに `* { margin: 0 }` があるため、ショートハンドではなく
   margin-left/right を個別に指定して中央寄せを確実にする。
   text-align も明示しないと、テーマ側の中央寄せがパンくずまで効いてしまう。 */
.mainvisual__inner {
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
  padding: 0 20px;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
}
.mainvisual__title, .mainvisual__lead, .mainvisual__count, .mainvisual__stat { text-align: center; }
.mainvisual_single .mainvisual__title { text-align: left; }
.mainvisual__title { font-size: 28px; margin: 10px 0 4px; }
.mainvisual__lead { font-size: 14px; color: var(--ink-mute); margin: 0; }
.mainvisual__count, .mainvisual__stat { font-size: 13px; color: var(--ink-mute); margin: 6px 0 0; }

/* --- 本文とサイドバーの2カラム --- */
.wrap-body__content { max-width: var(--container); margin: 0 auto; padding: 40px 20px; display: grid; grid-template-columns: minmax(0, 1fr) var(--sidebar); gap: var(--gap); align-items: start; }
@media (max-width: 1023px) {
  .wrap-body__content { grid-template-columns: 1fr; gap: 32px; }
  /* 1カラムではサイドバーが本文の下に来るので、追従も高さ制限も不要 */
  .wrap-body__nav-sidebar {
    position: static;
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
  }
}

.single__title { border-bottom: 1px solid var(--line); padding-bottom: 20px; margin-bottom: 28px; }
.single__title h1 { font-size: 30px; line-height: 1.45; margin: 8px 0 12px; }
.single__category a { font-size: 13px; color: var(--brand-dark); text-decoration: none; }
.single__date { font-size: 13px; color: var(--ink-mute); display: flex; gap: 14px; flex-wrap: wrap; margin: 0; }
@media (max-width: 767px) { .single__title h1 { font-size: 22px; } }

/* --- サイドバー --- */
/* スクロールに追従させる。
   グリッドの子に position:sticky を付けると、貼り付く範囲は「グリッドの行の高さ」＝
   本文の全長になるので、記事を最後まで読む間ずっと付いてくる。
   ただしサイドバーは1,800px前後あり画面に収まらないことが多いので、
   はみ出すぶんはサイドバー内でスクロールできるようにしている（収まる画面では出ない）。 */
.wrap-body__nav-sidebar {
  font-size: 14px;
  position: sticky;
  top: calc(var(--header-h, 118px) + 20px);
  align-self: start;
  max-height: calc(100vh - var(--header-h, 118px) - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
  /* 内部スクロールバーを目立たせない */
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  padding-right: 4px;
}
.wrap-body__nav-sidebar::-webkit-scrollbar { width: 6px; }
.wrap-body__nav-sidebar::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.wrap-body__nav-sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar-cta { border: 2px solid var(--brand); border-radius: 8px; padding: 18px; text-align: center; margin-bottom: 28px; }
.sidebar-cta__heading { color: var(--brand); font-weight: 700; margin: 0 0 8px; font-size: 15px; }
.sidebar-cta__body { font-size: 13px; line-height: 1.7; margin: 0 0 14px; }
.sidebar-cta .cv-button { font-size: 14px; padding: 11px 18px; width: 100%; box-sizing: border-box; }
.sidebar-heading { font-weight: 700; font-size: 15px; border-left: 4px solid var(--brand); padding-left: 10px; margin: 0 0 12px; }
/* --- サイドバーの画像バナー --- */
.sidebar-banners { display: flex; flex-direction: column; gap: 14px; margin-bottom: 28px; }
.sidebar-banners__item { display: block; border-radius: 6px; overflow: hidden; line-height: 0; }
/* テーマCSSに `img, img.auto { width: auto }` があるので幅を明示する */
.sidebar-banners__item img { width: 100%; height: auto; display: block; }
/* 画像の原寸(364px前後)より小さく収める。サイドバー幅は :root の --sidebar で調整する */
.sidebar-banners { max-width: var(--sidebar); }
.sidebar-banners__item:hover { opacity: 0.85; }

.sidebar-recommend, .sidebar-categories { margin-bottom: 32px; }
.sidebar-recommend ul, .sidebar-categories ul { list-style: none; margin: 0; padding: 0; }

/* テーマCSSに `img, img.auto { width: auto }` があるため、幅は grid の列で決めて
   img 側にも明示的に width を指定する。flex-basis だけだと画像の実寸に引きずられる。 */
.sidebar-recommend__item a {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}
.sidebar-recommend__thumb {
  width: 96px;
  height: 54px;
  border-radius: 4px;
  object-fit: cover;
  display: block;
}
.sidebar-recommend__thumb--empty { background: linear-gradient(135deg, #e8f5ef, #d3ecdf); }
.sidebar-recommend__title {
  font-size: 13px;
  line-height: 1.6;
  min-width: 0;
  overflow-wrap: anywhere;
}
.sidebar-recommend__item a:hover .sidebar-recommend__title { color: var(--brand-dark); }
.sidebar-categories a { display: flex; justify-content: space-between; padding: 8px 0; text-decoration: none; color: inherit; border-bottom: 1px solid var(--line); }
.sidebar-categories a[aria-current='true'] { color: var(--brand-dark); font-weight: 700; }
.sidebar-categories ul ul a { padding-left: 14px; font-size: 13px; color: var(--ink-mute); }
.sidebar-categories .count { color: var(--ink-mute); font-size: 12px; }

/* --- 関連記事 --- */
.related { margin-top: 56px; border-top: 1px solid var(--line); padding-top: 32px; }
.related__heading { font-size: 20px; margin: 0 0 20px; }
.related__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }

/* --- ページ送り --- */
.pager { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pager a, .pager__current { display: inline-flex; min-width: 38px; height: 38px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; color: inherit; }
.pager__current { background: var(--brand); color: #fff; border-color: var(--brand); }

/* --- トップページのセクション --- */
.home-section { margin-bottom: 56px; }
.home-section__heading { font-size: 22px; margin: 0 0 18px; display: flex; align-items: baseline; gap: 12px; }
.home-section__heading a { color: inherit; text-decoration: none; }
.home-section__count { font-size: 13px; color: var(--ink-mute); font-weight: 400; }
.home-section__more { text-align: right; margin: 0; font-size: 14px; }
.home-section__more a { color: var(--brand-dark); }

/* --- ヘッダー（2行構成） ---
   1行目: ロゴ + CTA / 2行目: カテゴリナビ。
   8系統のカテゴリを1行に詰めるとロゴが潰れてCTAも入り切らないため行を分けた。 */
.header { border-bottom: 1px solid var(--line); background: #fff; }
.header__bar {
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
/* flexで縮められるとロゴが小さくなるので縮小を止める */
.header__logo { flex: 0 0 auto; }
.header__logo img { display: block; width: 204px; height: auto; max-width: none; }
.header__nav { border-top: 1px solid var(--line); }
/* ドロップダウンはテーマCSSと同じクラス名を使うと衝突する
   （テーマ側は width:100vw の横一列バーとして組まれている）。
   独自クラス名にして、こちらのCSSだけが効くようにしている。 */
.navbar {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  gap: 26px;
  list-style: none;
  font-size: 14px;
}
.navbar__item { position: relative; }
.navbar__link { text-decoration: none; color: var(--ink); display: inline-flex; align-items: center; gap: 5px; padding: 13px 0; white-space: nowrap; font-weight: 500; }
.navbar__link:hover { color: var(--brand-dark); }
.navbar__link .chev { color: var(--brand); flex: 0 0 auto; }
.navbar__sub {
  position: absolute; top: 100%; left: 0; min-width: 230px; background: #fff;
  border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 12px 0; opacity: 0; visibility: hidden; transition: opacity 0.15s; z-index: 40;
  text-align: left;
}
.navbar__item--has-sub:hover .navbar__sub,
.navbar__item--has-sub:focus-within .navbar__sub { opacity: 1; visibility: visible; }
.navbar__sub-title { margin: 0 0 6px; padding: 0 16px 8px; font-weight: 700; font-size: 13px; border-bottom: 1px solid var(--line); }
.navbar__sub-title a { text-decoration: none; color: var(--ink); }
.navbar__sub-list { list-style: none; margin: 0; padding: 0; display: block; }
.navbar__sub-list li { display: block; }
.navbar__sub-list a { display: block; padding: 8px 16px; text-decoration: none; color: var(--ink); font-size: 13px; white-space: nowrap; }
.navbar__sub-list a:hover { background: var(--bg-soft); color: var(--brand-dark); }
.header__cta {
  background: var(--brand); color: #fff; text-decoration: none; font-size: 13px; font-weight: 700;
  padding: 11px 18px; border-radius: 999px; white-space: nowrap;
}
.header__cta:hover { background: var(--brand-hover); color: #fff; }
.header__burger { display: none; background: none; border: 0; width: 40px; height: 40px; cursor: pointer; }
.header__burger span { display: block; height: 2px; background: var(--ink); margin: 6px 8px; }

.sp-menu { display: none; }
@media (max-width: 1023px) {
  .header__nav, .header__cta { display: none; }
  .header__bar { padding: 12px 16px; }
  .header__logo img { width: 170px; }
  /* スマホは1行ヘッダーなので固定分も小さい（実値はJSが入れる） */
  .header__burger { display: block; margin-left: auto; }
  .sp-menu { display: block; border-top: 1px solid var(--line); padding: 12px 20px 20px; }
  .sp-menu[hidden] { display: none; }
  .sp-menu ul { list-style: none; margin: 0; padding: 0; }
  .sp-menu a { display: block; padding: 10px 0; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); }
  .sp-menu ul ul a { padding-left: 16px; font-size: 14px; color: var(--ink-mute); }
}

/* --- フッター --- */
.footer { background: var(--bg-soft); margin-top: 64px; }
.footer__links { max-width: var(--container); margin: 0 auto; padding: 40px 20px; display: grid; grid-template-columns: 280px 1fr; gap: 40px; }
@media (max-width: 1023px) { .footer__links { grid-template-columns: 1fr; gap: 24px; } }
.footer_explanation { font-size: 12px; color: var(--ink-mute); line-height: 1.8; margin: 12px 0 0; }
.footer__links__category { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 20px; }
.footer__links__category__title { font-weight: 700; font-size: 14px; margin: 0 0 8px; }
.footer__links__category a { text-decoration: none; color: var(--ink); }
.footer__links__category a:hover { color: var(--brand-dark); }
.footer__links__category ul { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.footer__links__category li { margin-bottom: 5px; color: var(--ink-mute); }
.footer__aside { border-top: 1px solid var(--line); }
.footer__aside__links { max-width: var(--container); margin: 0 auto; padding: 16px 20px 0; display: flex; gap: 20px; list-style: none; font-size: 13px; }
.footer__aside__links a { color: var(--ink); text-decoration: none; }
.footer__copyright { max-width: var(--container); margin: 0 auto; padding: 8px 20px 24px; font-size: 12px; color: var(--ink-mute); }

/* ============================================================================
   画面下部の固定バナーとモーダル
   文言と遷移先は src/data/ctas.mjs、出す場所と条件は src/data/placements.mjs
   ========================================================================== */

/* --- 下部固定バナー --- */
.fixed-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  background: var(--ink, #333);
  color: #fff;
  box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.18);
  transform: translateY(100%);
  transition: transform 0.25s ease;
}
.fixed-banner.is-shown { transform: translateY(0); }
.fixed-banner[hidden] { display: none; }

.fixed-banner__inner {
  max-width: 700px;
  margin: 0 auto;
  padding: 12px 56px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
/* リード文はボタンの上。何のボタンかを読んでから押せるように */
.fixed-banner__text {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
}
.fixed-banner__button {
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 11px 22px;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s;
}
.fixed-banner__button:hover { background: var(--brand-hover); color: #fff; }
.fixed-banner__close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #fff;
  font-size: 12px;
  padding: 4px 11px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.fixed-banner__close:hover { background: rgba(255, 255, 255, 0.12); }

@media (max-width: 767px) {
  .fixed-banner__inner { padding: 10px 14px 12px; gap: 6px; }
  .fixed-banner__text { font-size: 13px; }
  .fixed-banner__button { font-size: 13px; padding: 11px 18px; width: 100%; box-sizing: border-box; text-align: center; }
  .fixed-banner__close { top: 6px; right: 8px; font-size: 11px; padding: 3px 9px; }
}

/* --- モーダル --- */
.modal-cta {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.modal-cta.is-shown { opacity: 1; }
.modal-cta[hidden] { display: none; }

.modal-cta__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 26, 22, 0.55);
  cursor: pointer;
}
.modal-cta__panel {
  position: relative;
  background: #fff;
  border-radius: 10px;
  border-top: 4px solid var(--brand);
  padding: 32px 28px 30px;
  max-width: 560px;
  width: 100%;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  transform: translateY(8px);
  transition: transform 0.25s ease;
}
.modal-cta.is-shown .modal-cta__panel { transform: translateY(0); }

.modal-cta__close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: 0;
  font-size: 26px;
  line-height: 1;
  color: var(--ink-mute);
  cursor: pointer;
  padding: 4px 8px;
}
.modal-cta__close:hover { color: var(--ink); }

.modal-cta__heading {
  color: var(--brand);
  font-weight: 700;
  font-size: 19px;
  line-height: 1.5;
  margin: 0 0 12px;
}
.modal-cta__body { font-size: 15px; line-height: 1.75; margin: 0 0 22px; }

/* モーダル表示中は背面をスクロールさせない */
body.modal-open { overflow: hidden; }

@media (max-width: 767px) {
  .modal-cta__panel { padding: 28px 18px 24px; }
  .modal-cta__heading { font-size: 17px; }
  .modal-cta__body { font-size: 14px; }
}

/* 下部固定バナーの分だけ本文の下に余白を足す（最後の要素が隠れないように） */
body { padding-bottom: 0; }
body:has(.fixed-banner.is-shown) { padding-bottom: 120px; }

/* --- SNSシェアボタン --- */
.share {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 36px 0 8px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.share__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
}
.share__list { display: flex; gap: 10px; list-style: none; margin: 0; padding: 0; }
.share__btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  transition: opacity 0.2s;
}
.share__btn:hover { opacity: 0.78; color: #fff; }
.share__btn--x { background: #000; }
.share__btn--fb { background: #1877f2; }
.share__btn--hatena { background: #00a4de; }
.share__btn--line { background: #06c755; }

@media (max-width: 767px) {
  .share { gap: 10px; }
  .share__btn { width: 34px; height: 34px; }
}
