/*
Theme Name: Kurukuru
Theme URI: https://9696.jp/
Description: 視覚支援サービスくるくる（9696.jp）のサービスサイト用テーマ
Version: 1.0.0
Requires at least: 6.3
Requires PHP: 7.4
Text Domain: kurukuru
*/

/* ===== デザイントークン ===== */
:root {
  --c-ink: #231f20;
  --c-sub: #5c5657;
  --c-bg: #ffffff;
  --c-pale: #f7f5f0;
  --c-pill: #efefef;
  --c-control: #6b6566; /* 入力欄の枠（白背景で約5.6:1） */
  /* ブルーナカラー */
  --c-yellow: #ffc80b;
  --c-orange: #f26522;
  --c-blue: #005599;
  --c-green: #247033;
  /* 文字に使う橙はコントラスト確保のため濃いめ */
  --c-orange-text: #b8430c;

  --band: var(--c-yellow); /* 左端の縦帯（JSでセクションごとに切替） */
  --band-w: 12px;

  --font: "Yu Gothic", YuGothic, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
  --fs-base: 1.0625rem; /* 17px */
  --fs-h2: clamp(1.75rem, 1.3rem + 1.4vw, 2.25rem);
  --space-sec: clamp(4.5rem, 3rem + 5vw, 8rem);
  --wrap: 1080px;
  --radius: 14px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===== ベース ===== */
*, *::before, *::after { box-sizing: border-box; }
/* 文字サイズ切替：rem 基準ごと拡大（大=1.25倍、特大=1.5倍） */
html[data-fs="lg"] { font-size: 125%; }
html[data-fs="xl"] { font-size: 150%; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h, 116px) + 8px); }
body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--font);
  font-size: var(--fs-base);
  font-weight: 500;
  line-height: 1.9;
  letter-spacing: 0.04em;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-blue); text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible {
  outline: 4px solid var(--c-ink);
  outline-offset: 3px;
  box-shadow: 0 0 0 8px var(--c-yellow);
  border-radius: 4px;
}
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link {
  position: fixed; left: 24px; top: -100px; z-index: 100;
  background: var(--c-ink); color: #fff; padding: 0.75em 1.25em;
  border-radius: 8px; font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 16px; }

/* 左端の縦帯（初期は非表示。カスタマイザーで ON にすると body に .has-band が付いて表示） */
.band { display: none; }
.has-band .band {
  display: block;
  position: fixed; inset: 0 auto 0 0; width: var(--band-w); z-index: 40;
  background: var(--band);
  transition: background-color 0.6s var(--ease);
}
.has-band .site { padding-left: var(--band-w); }
.wrap { width: min(100% - 48px, var(--wrap)); margin-inline: auto; }

/* ===== 文字サイズ切替バー（ヘッダーの上。スクロールすると隠れる） ===== */
.fs-bar { display: none; background: var(--c-pale); border-bottom: 1px solid #e6e6e6; }
.js .fs-bar { display: block; } /* JS無効時はボタンが動かないので出さない */
.js-timeout:not(.js-ready) .fs-bar { display: none; } /* main.js が読めなかった場合も隠す */
.fs-switch {
  display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px;
  padding: 6px clamp(16px, 3vw, 40px);
}
.fs-switch__label { margin-right: 4px; font-size: 15px; font-weight: 700; }
.fs-switch__btn {
  min-width: 52px; min-height: 40px; padding: 0 0.8em;
  border: 2px solid var(--c-ink); border-radius: 999px; background: #fff; color: var(--c-ink);
  font: inherit; font-weight: 800; line-height: 1; cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
/* 切替ボタン自体は px 指定：文字サイズを変えてもバーの大きさ・位置が変わらないように */
.fs-switch__btn[data-fs="md"] { font-size: 15px; }
.fs-switch__btn[data-fs="lg"] { font-size: 18px; }
.fs-switch__btn[data-fs="xl"] { font-size: 21px; }
.fs-switch__btn:hover { background: var(--c-pill); }
.fs-switch__btn[aria-pressed="true"] { background: var(--c-blue); border-color: var(--c-blue); color: #fff; }

/* ===== ヘッダー ===== */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid #d9d9d9;
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 14px clamp(16px, 3vw, 40px);
}
.site-branding { margin: 0; line-height: 1; }
.site-branding a { display: inline-block; }
.site-branding img { width: clamp(220px, 28vw, 330px); }
.site-tagline {
  margin: 8px 0 0; font-size: 1rem; color: var(--c-ink); line-height: 1.5; letter-spacing: 0.06em; word-break: auto-phrase;
}

.gnav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; flex-wrap: wrap; }
.gnav a {
  display: block; padding: 0.5em 0.9em; border-radius: 999px;
  color: var(--c-ink); text-decoration: none; font-size: 0.9375rem; font-weight: 700;
  transition: background-color 0.2s;
}
.gnav a:hover { background: var(--c-pill); }
.gnav a[aria-current="true"] { background: var(--c-ink); color: #fff; }

.menu-toggle {
  display: none; width: 52px; height: 52px; border: 0; background: none; cursor: pointer;
  position: relative; color: var(--c-ink);
}
.menu-toggle__bar, .menu-toggle__bar::before, .menu-toggle__bar::after {
  position: absolute; left: 13px; width: 26px; height: 2px; background: currentColor;
  content: ""; transition: transform 0.3s var(--ease), opacity 0.2s;
}
.menu-toggle__bar { top: 25px; }
.menu-toggle__bar::before { left: 0; top: -8px; }
.menu-toggle__bar::after { left: 0; top: 8px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar::before { transform: translateY(8px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar::after { transform: translateY(-8px) rotate(-45deg); }

/* ===== FV ===== */
.fv {
  position: relative; overflow: hidden;
  padding-block: clamp(2.5rem, 5vw, 4.5rem) clamp(3rem, 6vw, 5rem);
  background: var(--c-bg); /* 水玉模様は削除（無地） */
}
.fv__figure { position: relative; z-index: 1; margin: 0 auto; width: min(62.4vw, 352px); } /* 元 min(78vw, 440px) の80% */
.fv__figure img { animation: fv-in 1.2s var(--ease) both; }
@keyframes fv-in {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

/* ===== 事業所紹介（FV直下） ===== */
.intro {
  padding-block: clamp(3.5rem, 7vw, 6rem);
  background: var(--c-pale);
  border-top: 6px solid var(--c-yellow);
  text-align: center;
}
.intro__inner { max-width: 46rem; }
.intro__lead {
  margin: 0 0 clamp(1.5rem, 3vw, 2.25rem);
  font-size: clamp(1.5rem, 1.05rem + 2.2vw, 2.375rem);
  font-weight: 800; line-height: 1.5; letter-spacing: 0.04em;
  word-break: auto-phrase; /* 対応ブラウザでは文節で改行 */
}
.intro__topic { margin: clamp(1.75rem, 3.5vw, 2.5rem) 0 0; } /* 囲みのお知らせの下に置くので上に余白（囲みの影の分も含む） */
.intro__topic a { /* 講座の告知：黄色の帯ボタン（文字は墨色でコントラスト確保） */
  display: inline-flex; align-items: center; gap: 0.9em;
  padding: 0.75em 1.5em; border-radius: 999px;
  background: var(--c-yellow); color: var(--c-ink); text-decoration: none;
  font-size: clamp(1.5rem, 1.41rem + 0.45vw, 1.6875rem); font-weight: 800; line-height: 1.6; /* 元 clamp(1rem, 0.94rem + 0.3vw, 1.125rem) の1.5倍 */
  box-shadow: 0 4px 0 var(--c-ink);
  max-width: 100%; box-sizing: border-box;
  word-break: auto-phrase; overflow-wrap: anywhere; /* 文字を大きくしたのでスマホでは語の途中でも折り返してはみ出さない */
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.intro__topic a:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--c-ink); }
.intro__topic a:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--c-ink); }
.intro__topic-arrow {
  flex: none; width: 8px; height: 8px; border-top: 2px solid; border-right: 2px solid; transform: rotate(45deg);
}
.intro__text {
  margin: 0 0 0.6em;
  font-size: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
  font-weight: 700; line-height: 1.85;
  word-break: auto-phrase;
}
.intro__mark { /* 黄色マーカー（文字は墨色のままでコントラスト確保） */
  background: linear-gradient(transparent 55%, var(--c-yellow) 55%);
  color: inherit; padding-inline: 0.1em;
}
.intro__note {
  display: inline-block; margin: clamp(1.5rem, 3vw, 2rem) 0 0;
  padding: 1.1em 1.6em; border: 2px solid var(--c-blue); border-radius: 16px;
  background: #fff; color: var(--c-ink);
  font-size: clamp(1.0625rem, 0.98rem + 0.4vw, 1.25rem); font-weight: 700; line-height: 1.8;
  box-shadow: 0 5px 0 var(--c-blue);
  word-break: auto-phrase;
}
/* 固定ページ「トップの紹介文」の本文も、上の紹介文と同じ見た目にする
   H2＝見出し／段落スタイル「告知帯」＝講座の帯ボタン／「囲み」＝枠のお知らせ／ハイライト＝黄色マーカー */
.intro .section-content > * + * { margin-top: 0; }
.intro .section-content > h2 {
  margin: 0 0 clamp(1.5rem, 3vw, 2.25rem); padding: 0; border: 0;
  font-size: clamp(1.5rem, 1.05rem + 2.2vw, 2.375rem);
  font-weight: 800; line-height: 1.5; letter-spacing: 0.04em;
  word-break: auto-phrase;
}
.intro .section-content > h2 + * { margin-top: 0; }
.intro .section-content > p {
  margin: 0 0 0.6em;
  font-size: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
  font-weight: 700; line-height: 1.85;
  word-break: auto-phrase;
}
.intro .section-content > p.is-style-kurukuru-topic { margin: clamp(1.75rem, 3.5vw, 2.5rem) 0 0; }
.intro .section-content > p.is-style-kurukuru-topic a {
  display: inline-flex; align-items: center; gap: 0.9em;
  padding: 0.75em 1.5em; border-radius: 999px;
  background: var(--c-yellow); color: var(--c-ink); text-decoration: none;
  font-size: clamp(1.5rem, 1.41rem + 0.45vw, 1.6875rem); font-weight: 800; line-height: 1.6;
  box-shadow: 0 4px 0 var(--c-ink);
  max-width: 100%; box-sizing: border-box;
  word-break: auto-phrase; overflow-wrap: anywhere;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.intro .section-content > p.is-style-kurukuru-topic a::after { /* 矢印（紹介文の .intro__topic-arrow と同じ形） */
  content: ""; flex: none; width: 8px; height: 8px; border-top: 2px solid; border-right: 2px solid; transform: rotate(45deg);
}
.intro .section-content > p.is-style-kurukuru-topic a:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--c-ink); }
.intro .section-content > p.is-style-kurukuru-topic a:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--c-ink); }
.intro .section-content > p.is-style-kurukuru-note {
  display: inline-block; margin: clamp(1.5rem, 3vw, 2rem) 0 0;
  padding: 1.1em 1.6em; border: 2px solid var(--c-blue); border-radius: 16px;
  background: #fff; color: var(--c-ink);
  font-size: clamp(1.0625rem, 0.98rem + 0.4vw, 1.25rem); font-weight: 700; line-height: 1.8;
  box-shadow: 0 5px 0 var(--c-blue);
}
.intro .section-content mark { /* 編集画面の「ハイライト」。色を選んでも黄色の下線マーカーは残す */
  background-color: transparent; background-image: linear-gradient(transparent 55%, var(--c-yellow) 55%);
  color: inherit; padding-inline: 0.1em;
}
.intro .section-edit { text-align: center; }

/* ===== セクション共通 ===== */
.section { padding-block: var(--space-sec); border-top: 1px solid var(--line, #e6e6e6); }
.section--blue { --accent: var(--c-blue); --line: rgba(0, 85, 153, 0.2); --accent-pale: rgba(0, 85, 153, 0.12); }
.section--orange { --accent: var(--c-orange); --accent-text: var(--c-orange-text); --line: rgba(242, 101, 34, 0.2); --accent-pale: rgba(242, 101, 34, 0.15); }
.section--green { --accent: var(--c-green); --line: rgba(36, 112, 51, 0.2); --accent-pale: rgba(36, 112, 51, 0.13); }
.section--yellow { --accent: var(--c-yellow); --accent-text: var(--c-ink); --line: rgba(255, 200, 11, 0.5); --accent-pale: rgba(255, 200, 11, 0.35); }

.section__grid {
  display: grid; grid-template-columns: minmax(300px, 1fr) 2fr; gap: clamp(2rem, 5vw, 5rem);
}
.section__head { position: relative; }
/* 見出しの上のアイコン：セクション色を薄くした丸に、見出し下線と同じ色のアイコン */
.section__icon {
  display: grid; place-items: center; width: 76px; height: 76px; margin-bottom: 1.25rem;
  border-radius: 50%; background: var(--accent-pale, #f2f2f2);
}
/* 黄色は薄い黄色の丸に埋もれるので、丸を白地＋黄色の縁取りにする */
.section--yellow .section__icon { background: #fff; box-shadow: inset 0 0 0 3px var(--accent); }
.section__icon-mark {
  display: block; width: 52px; height: 52px; background: var(--accent, var(--c-ink));
  -webkit-mask: no-repeat center / contain; mask: no-repeat center / contain;
}
/* 講師派遣だけ：黄色の丸に、指し棒を持つてんじくんを白抜き */
#haken .section__icon { background: var(--accent); box-shadow: none; }
#haken .section__icon-mark { background: #fff; }
.section__en {
  display: block; margin-bottom: 0.5rem;
  font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent-text, var(--accent));
}
.section__title {
  margin: 0; font-size: var(--fs-h2); line-height: 1.35; letter-spacing: 0.06em; font-weight: 800;
  word-break: keep-all; overflow-wrap: anywhere; /* 「無料ダウンロー|ド」のような語中改行を防ぐ */
}
.section__title::after {
  content: ""; display: block; width: 48px; height: 6px; margin-top: 1rem;
  border-radius: 3px; background: var(--accent);
}
.section__sub { margin: 1.25rem 0 0; color: var(--c-sub); font-size: 0.9375rem; font-weight: 700; line-height: 1.7; }
.section__lead { margin: 1.5rem 0 0; color: var(--c-sub); font-size: 0.9375rem; }
.section__body { border-left: 1px solid var(--line); padding-left: clamp(1.5rem, 4vw, 3.5rem); min-width: 0; }

/* 準備中表示 */
.coming {
  margin: 0; padding: 2.5rem 2rem; border-radius: var(--radius);
  background: var(--c-pale); text-align: center; font-weight: 700;
}
.coming::before {
  content: ""; display: block; width: 14px; height: 14px; margin: 0 auto 1rem; border-radius: 50%;
  background: var(--accent);
  box-shadow: -26px 0 0 var(--c-yellow), 26px 0 0 var(--c-blue);
}

/* 固定ページから読み込んだ本文（同行援護・くるくる講座・講師派遣・会社情報） */
.section-content { max-width: none; }
.section-content > :first-child { margin-top: 0; }
.section-content h2, .section-content h3 { /* セクション見出しがh2なので、本文の見出しはh3推奨（h2でも同じ見た目） */
  margin: 2.25em 0 0; padding-left: 0.75em; border-left: 6px solid var(--accent);
  font-size: 1.375rem; font-weight: 800; line-height: 1.5;
}
.section-content h4 { margin: 1.75em 0 0; font-size: 1.125rem; font-weight: 800; }
.section-content > h2 + *, .section-content > h3 + *, .section-content > h4 + * { margin-top: 0.75em; }
.section-content ul, .section-content ol { padding-left: 1.5em; }
.section-content li + li { margin-top: 0.4em; }
.section-content li::marker { color: var(--accent-text, var(--accent)); font-weight: 800; }
.section-content img { border-radius: var(--radius); }
.section-content table { width: 100%; border-collapse: collapse; }
.section-content th, .section-content td { padding: 0.8em 1em; border: 1px solid var(--c-control); text-align: left; vertical-align: top; }
.section-content th { background: var(--c-pale); font-weight: 800; }
.section-content .wp-block-table { overflow-x: auto; margin: 0; }
.kurukuru-company td:first-child { width: 7em; background: var(--c-pale); font-weight: 800; white-space: nowrap; }
/* くるくる講座のカリキュラム表：区分（縦につないだ欄）は太字・中央寄せ、時間数は中央 */
.kurukuru-curriculum [rowspan] { width: 7em; background: var(--c-pale); font-weight: 800; text-align: center; vertical-align: middle; }
.section-content .kurukuru-curriculum .has-text-align-center { width: 5em; text-align: center; white-space: nowrap; }
.section-content .wp-block-table figcaption { margin-top: 0.6em; text-align: right; font-weight: 800; font-size: 1rem; }
.section-content .wp-block-button__link {
  background: var(--c-ink); color: #fff; border-radius: 999px; padding: 0.9em 2em; font-weight: 800; text-decoration: none;
}
.section-edit { margin: 1.5rem 0 0; font-size: 0.875rem; }

/* ===== ボタン ===== */
.btn-outline {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 2.5rem;
  min-width: 240px; margin-top: 2rem; padding: 1.1em 1.5em;
  border: 2px solid var(--accent-text, var(--accent, var(--c-ink))); background: #fff; color: var(--c-ink);
  font-weight: 700; text-decoration: none;
  transition: background-color 0.25s, border-color 0.25s;
}
.btn-outline::after {
  content: ""; width: 8px; height: 8px; border-top: 2px solid; border-right: 2px solid;
  transform: rotate(45deg); transition: transform 0.25s var(--ease);
}
.btn-outline:hover { background: var(--c-pale); }
.btn-outline:hover::after { transform: translateX(4px) rotate(45deg); }

/* ===== お知らせ ===== */
.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li { border-bottom: 1px solid var(--line); }
.news-list li:first-child { border-top: 1px solid var(--line); }
.news-item {
  display: grid; grid-template-columns: auto auto 1fr; align-items: baseline; gap: 0.5rem 1.25rem;
  padding: 1.4rem 0.5rem; color: var(--c-ink); text-decoration: none;
  transition: background-color 0.2s;
}
a.news-item:hover { background: var(--c-pale); }
a.news-item:hover .news-item__title { text-decoration: underline; }
.news-item__date { font-size: 0.875rem; color: var(--c-sub); font-variant-numeric: tabular-nums; }
.pill {
  display: inline-block; justify-self: start; padding: 0.1em 0.9em; border-radius: 999px;
  background: var(--c-pill); font-size: 0.8125rem; font-weight: 700; color: var(--c-sub); white-space: nowrap;
}
.news-item__title { font-weight: 700; }

/* ===== カード（DL・アプリ） ===== */
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; }
.card {
  position: relative; display: flex; align-items: center; gap: 1.5rem;
  padding: 1.5rem 1.75rem; border: 2px solid var(--accent-text, var(--accent)); border-radius: var(--radius);
  background: #fff; color: var(--c-ink); text-decoration: none;
  box-shadow: 0 6px 0 var(--line);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: 0 9px 0 var(--line); }
.card:active { transform: translateY(3px); box-shadow: 0 3px 0 var(--line); }
.card__icon {
  flex: none; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%;
  background: var(--accent); color: #fff;
}
.section--yellow .card__icon { color: var(--c-ink); }
.card__icon svg { width: 30px; height: 30px; }
.card__text { flex: 1; min-width: 0; }
.card__title { display: block; font-size: 1.125rem; font-weight: 800; line-height: 1.6; }
.card__desc { display: block; margin-top: 0.25rem; font-size: 0.9375rem; line-height: 1.7; }
.card__meta { display: block; margin-top: 0.25rem; font-size: 0.875rem; color: var(--c-sub); }
.card__arrow {
  flex: none; width: 10px; height: 10px; border-top: 2px solid; border-right: 2px solid; transform: rotate(45deg);
}
.card--disabled { background: var(--c-pale); box-shadow: none; }

/* アプリ：説明文とQRコード */
.app-intro { margin-bottom: 1.75rem; }
.app-intro p { margin: 0 0 0.4em; }
.app-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem 2rem; }
.app-row .cards { flex: 1 1 18rem; }
.app-qr { flex: none; margin: 0; text-align: center; }
.app-qr img { display: block; width: 140px; height: 140px; padding: 8px; border: 2px solid var(--line); border-radius: var(--radius); background: #fff; image-rendering: pixelated; }
.app-qr figcaption { margin-top: 0.5rem; font-size: 0.8125rem; color: var(--c-sub); }

/* ===== お問い合わせ（Contact Form 7 整形） ===== */
.contact-note { margin: 0 0 2rem; }
.wpcf7 p { margin: 0 0 1.5rem; }
.wpcf7 label { display: block; font-weight: 700; }
.wpcf7 .required {
  display: inline-block; margin-left: 0.5em; padding: 0 0.6em; border-radius: 4px;
  background: var(--c-orange-text); color: #fff; font-size: 0.75rem; vertical-align: 0.15em;
}
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 input[type="tel"], .wpcf7 textarea, .wpcf7 select {
  width: 100%; margin-top: 0.5rem; padding: 0.9em 1em;
  border: 2px solid var(--c-control); border-radius: 10px; background: #fff;
  font: inherit; color: inherit;
}
.wpcf7 input:focus, .wpcf7 textarea:focus { border-color: var(--c-ink); }
.wpcf7 textarea { min-height: 12em; }
.wpcf7 input[type="submit"] {
  min-width: 240px; padding: 1em 2em; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--c-ink); color: #fff; font: inherit; font-weight: 800; letter-spacing: 0.1em;
  box-shadow: 0 5px 0 var(--c-orange);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.wpcf7 input[type="submit"]:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--c-orange); }
.wpcf7 .wpcf7-not-valid-tip { color: #b3261e; font-weight: 700; }
.wpcf7 form .wpcf7-response-output { margin: 1.5rem 0 0; padding: 1em; border-radius: 10px; }

/* ===== 投稿（一覧・詳細・固定ページ） ===== */
.page-main { padding-block: clamp(3rem, 6vw, 5rem) var(--space-sec); }
.page-title { margin: 0 0 2.5rem; font-size: var(--fs-h2); line-height: 1.4; font-weight: 800; }
.entry-meta { display: flex; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.entry-content { max-width: 46em; }
.entry-content > * + * { margin-top: 1.5em; }
.pagination { margin-top: 3rem; }
.pagination .nav-links { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.pagination .page-numbers {
  display: grid; place-items: center; min-width: 48px; height: 48px; padding: 0 0.5em;
  border: 2px solid var(--c-control); border-radius: 999px; color: var(--c-ink); text-decoration: none;
}
.pagination .current { background: var(--c-ink); color: #fff; border-color: var(--c-ink); }

/* ===== くるくるまんが ===== */
/* トップ：最新の1話を本文幅いっぱいに大きく。押すとその話のページへ */
.manga-latest { margin: 0; max-width: 760px; }
.manga-latest__link { display: block; border-radius: var(--radius); }
.manga-latest__img,
.manga-card__img,
.manga-single .entry-content img { width: 100%; border: 2px solid var(--line); border-radius: var(--radius); background: #fff; }
.manga-latest__link:hover .manga-latest__img { border-color: var(--accent-text); }
/* 一覧：サムネイルのタイル */
.manga-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 2.5rem 2rem; }
.manga-card__link { display: block; color: var(--c-ink); text-decoration: none; }
.manga-card__img { margin-bottom: 0.75rem; transition: border-color 0.2s; }
.manga-card__date { display: block; font-size: 0.875rem; color: var(--c-sub); font-variant-numeric: tabular-nums; }
.manga-card__title { display: block; font-weight: 700; }
.manga-card__link:hover .manga-card__img { border-color: var(--accent-text); }
.manga-card__link:hover .manga-card__title { text-decoration: underline; }
.manga-back { margin-top: 3rem; }
/* 1話のページ：前の話・次の話 */
.manga-nav { max-width: 46em; margin-top: 3rem; }
.manga-nav .nav-links { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.manga-nav .nav-next { margin-left: auto; text-align: right; }
.manga-nav a { display: block; padding: 0.75em 1.25em; border: 2px solid var(--c-control); border-radius: var(--radius); color: var(--c-ink); font-weight: 700; text-decoration: none; }
.manga-nav a:hover { background: var(--c-pale); }
.manga-nav__label { display: block; font-size: 0.8125rem; font-weight: 400; color: var(--c-sub); }

/* ===== フッター ===== */
.site-footer { background: var(--c-ink); color: #fff; padding-block: 4rem 2rem; }
.site-footer__inner { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 2rem; }
.site-footer__logos { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; max-width: 100%; }
.site-footer__logo { display: inline-block; max-width: 100%; background: #fff; padding: 14px 18px; border-radius: 12px; }
.site-footer__logo img { width: 240px; max-height: 120px; object-fit: contain; } /* 縦長のロゴに差し替えても箱が伸びすぎない */
/* 美らぬちのロゴは、くるくるロゴ（幅240px・2000×527）と同じ表示高さにする。幅が足りない時だけ縮む */
.site-footer__logo--partner img { height: calc(240px * 527 / 2000); width: auto; max-width: 100%; object-fit: contain; }
.site-footer small { display: block; margin-top: 3rem; font-size: 0.8125rem; opacity: 0.8; text-align: center; }
.to-top {
  display: inline-flex; align-items: center; gap: 0.75em; color: #fff; font-weight: 700; text-decoration: none;
}
.to-top::before {
  content: ""; width: 8px; height: 8px; border-top: 2px solid; border-left: 2px solid; transform: rotate(45deg) translate(2px, 2px);
}

/* ===== スクロール表示演出 ===== */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
/* main.js が3秒以内に動かなければ演出をやめて全表示（JS読込失敗時の保険） */
.js-timeout:not(.js-ready) .reveal { opacity: 1; transform: none; }

/* ===== レスポンシブ ===== */
@media (max-width: 900px) {
  .gnav { width: 100%; }
  .site-header__inner { flex-wrap: wrap; }
  /* JS有効時のみハンバーガー化（JS無効なら通常のリンク列のまま） */
  .js .site-header__inner { flex-wrap: nowrap; }
  .js .menu-toggle { display: block; }
  .js .gnav {
    width: auto;
    position: absolute; top: 100%; left: 0; right: 0;
    max-height: calc(100dvh - var(--header-h, 88px)); overflow: auto;
    background: #fff; border-bottom: 1px solid #d9d9d9;
    padding: 1rem 24px 2rem;
  }
  .gnav[hidden] { display: none !important; }
  /* JS初期化前に一瞬メニューが開いて見えるのを防ぐ */
  .js:not(.js-ready) .gnav { display: none; }
  /* JSが動かなかった場合は通常のリンク列に戻す */
  .js-timeout:not(.js-ready) .site-header__inner { flex-wrap: wrap; }
  .js-timeout:not(.js-ready) .menu-toggle { display: none; }
  .js-timeout:not(.js-ready) .gnav { display: block; position: static; width: 100%; max-height: none; padding: 0; border: 0; }
  .gnav ul { flex-direction: column; gap: 0; }
  .gnav a { border-radius: 0; padding: 1em 0.5em; border-bottom: 1px solid #eee; font-size: 1.0625rem; }
  .section__grid { grid-template-columns: 1fr; }
  .section__body { border-left: 0; padding-left: 0; }
  /* 1カラム時は見出しブロック（アイコン・英字・タイトル・ライン・サブ）を中央ぞろえ。本文は左ぞろえのまま */
  .section__head { text-align: center; }
  .section__icon { margin-inline: auto; }
  .section__title::after { margin-inline: auto; }
}
/* iPad（タブレット幅 561〜1180px）ではロゴを従来の約2倍に */
@media (min-width: 561px) and (max-width: 900px) {
  .site-branding img { width: min(440px, calc(100vw - 120px)); }
}
@media (min-width: 901px) {
  .gnav[hidden] { display: block !important; } /* PCでは常に表示 */
  .site-header__inner > :first-child { flex-shrink: 0; } /* ナビに押されてロゴが縮まないように */
  /* 文字サイズ「大」「特大」ではナビがロゴ横に収まらないので、ロゴの下の段に回す */
  html[data-fs] .site-header__inner { flex-wrap: wrap; row-gap: 10px; }
  html[data-fs] .gnav { width: 100%; }
  html[data-fs] .gnav ul { justify-content: center; }
  /* 2段になったヘッダーを固定すると画面の半分近くを覆うため、大・特大では固定しない */
  html[data-fs] .site-header { position: relative; }
  html[data-fs] { scroll-padding-top: 8px; }
}
/* 小さめのPC幅ではナビを詰める */
@media (min-width: 901px) and (max-width: 1180px) {
  .site-header__inner { gap: 16px; }
  .site-branding img { width: clamp(240px, calc(100vw - 690px), 480px); } /* iPad横向きで大きく。ナビ（5列×2段・約585px）が横に収まる分だけ縮める */
  .gnav ul { flex-wrap: nowrap; gap: 2px; }
  .gnav a { padding: 0.5em 0.6em; font-size: 0.875rem; white-space: nowrap; }
}
/* 項目が1行に収まらない幅（〜1699px）では 5項目ずつの2段に並べる
   （くるくるまんがが公開されていない9項目のときは 5項目＋4項目） */
@media (min-width: 901px) and (max-width: 1699px) {
  .gnav ul { display: grid; grid-template-columns: repeat(5, auto); gap: 2px 4px; justify-content: end; }
  .gnav a { white-space: nowrap; }
}
/* PC幅（ロゴ330px固定）ではロゴ下の一文をロゴと同じ幅にそろえる（20文字 → 330px ÷ 20） */
@media (min-width: 1181px) {
  .site-tagline { font-size: 16.5px; letter-spacing: 0; white-space: nowrap; }
}
@media (max-width: 560px) {
  .intro__topic a,
  .intro .section-content > p.is-style-kurukuru-topic a { padding: 0.6em 1em; gap: 0.6em; border-radius: 28px; } /* 複数行になっても角が文字に食い込まない */
  .site-header__inner { gap: 8px; }
  /* カリキュラム表：科目の欄を広く取る */
  .section-content .kurukuru-curriculum th, .section-content .kurukuru-curriculum td { padding: 0.6em 0.5em; }
  .kurukuru-curriculum [rowspan] { width: 4.5em; font-size: 0.9375rem; }
  .section-content .kurukuru-curriculum .has-text-align-center { width: 3.5em; }
  .site-branding img { width: min(280px, calc(100vw - 92px)); }
  :root { --band-w: 8px; }
  /* ロゴ下の一文は1行に収める（ロゴ欄の幅 ÷ 20文字強で文字サイズを決め、最大15px） */
  .site-tagline { font-size: min(0.9375rem, calc((100vw - 92px) / 20.5)); letter-spacing: 0; }
  .news-item { grid-template-columns: auto 1fr; }
  .news-item__title { grid-column: 1 / -1; }
  .card { padding: 1.25rem; gap: 1rem; }
  .card__icon { width: 52px; height: 52px; }
  .section__icon { width: 60px; height: 60px; margin-bottom: 1rem; }
  .section__icon-mark { width: 40px; height: 40px; }
  .btn-outline { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
