@charset "utf-8";

/* ------------------------------------------------------------
   数字と英字ロゴに使う書体は、外部から取らず自前で配る。

   外部配信だと、読み込みが終わるまで代替の書体で描かれ、
   あとから入れ替わる。数字は字幅が大きく変わるので、そのちらつきが目立つ。
   同じサーバーから配れば、CSSとほぼ同時に届くので入れ替わりが見えない。
   欧文のみで 23KB と小さいため、自前で持っても負担にならない。

   本文の日本語書体は 248 個に分割して配信されており、
   実際に使う文字の範囲だけが落ちてくる仕組みなので、そちらは外部のままにする。
   ------------------------------------------------------------ */
@font-face {
  font-family: 'Bebas Neue';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/bebasneue-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Bebas Neue';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/bebasneue-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB,
                 U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ============================================================
   結婚相談所検索ナビ — デザインシステム

   :root にトークンを置き、面（.light-sec / .white-sec / .gray-sec）と
   見出し（.sec-eye / .sec-title）を組み合わせて各セクションを作る。

   このサイトで意図的にやっていること:
     - 本文のウェブフォントは Noto Sans JP のみ。数字と英字ロゴだけ別書体。
       フォントファイルが増えるほど表示が遅れる。
     - font-weight は読み込んでいる 400 / 500 / 700 / 900 だけを使う。
       読み込んでいない値（800など）を書くとブラウザが字形を合成し、
       本来の書体と違う見た目になる。
     - ヒーローに大きな写真を置かない。主役は検索UI。
     - 順位や優劣を表す装飾は作らない。並び順は料金など客観的な指標に限る。
   ============================================================ */

:root {
  /* 主色。ピンク1色（#ec79a7）。**濃淡を作らない。**
     見本は瀬戸環奈サイト（#eb6ea0 を1色だけ、背景にも文字にもそのまま使う）。
     文字はピンクではなくグレー系にして、ピンクは見出し・面・ボタンにだけ効かせる */
  --navy:         #17121a;
  --accent:       #ec79a7;
  --accent-light: #f7a9c8;
  --accent-dim:   rgba(236,121,167,0.10);
  --accent-border: rgba(236,121,167,0.30);

  /* 背景。白を基調に、薄ピンクの面を重ねる */
  --bg-white:     #ffffff;
  --bg-light:     #fdf3f7;
  --bg-gray:      #fbe9f1;

  /* 文字。グレー系。ピンクと喧嘩させない */
  --text-dark:    #333333;
  --text-mid:     #666666;
  --text-light:   #999999;

  /* ▼ 版面。全セクションでこの2つだけを使う。
     決まりごと：横方向の padding は「外側の要素」に、max-width は「内側の要素」に。
     どちらか一方でも逆にすると、その面だけ左端が 28px ずれる（実際にヘッダがずれていた）。 */
  --wrap:   1180px;
  --gutter: 28px;

  --border-light: #dddddd;
  --shadow:       0 2px 16px rgba(0,0,0,0.06);
  --shadow-hover: 0 10px 32px rgba(0,0,0,0.12);

  /* 注意喚起・補足に使う色。多用しない */
  --warn:         #b4531a;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
/* 横はみ出しの抑止は html と body の両方に掛ける。
   body だけに掛けると body の overflow-y が auto に化けて、
   「どの要素がスクロールを担うのか」が曖昧になる。 */
html, body { overflow-x: hidden; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans JP', system-ui, -apple-system,
               "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-weight: 400;
  color: var(--text-dark);
  background: var(--bg-white);
  line-height: 1.8;
  /* 数字を等幅にする。料金を縦に並べたとき桁が揃わないと比較できない */
  font-feature-settings: "palt" 1;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }

/* ------------------------------------------------------------ ヘッダ */
header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  padding: 0 var(--gutter);       /* ← 横 padding は外側に置く */
}
.header-inner {
  max-width: var(--wrap); margin: 0 auto;
  padding: 13px 0;                /* ← 内側は縦だけ */
  display: flex; justify-content: space-between; align-items: center;
  gap: 20px;
}
/* ロゴ＝虫眼鏡マーク＋2行のサイト名。
   マークは画像ではなくインラインのSVG。読み込みを1本増やさず、
   拡大しても滲まず、色を --navy で揃えられる。
   ファビコンも同じ形（生成ツールが1枚の元データから作る） */
.logo {
  text-decoration: none; line-height: 1.15;
  display: flex; align-items: center; gap: 9px;
}
.logo-text { display: block; }
.logo-mark {
  /* 高さは2行ぶん（1.08rem×1.15 ＋ 2px ＋ 0.72rem）にほぼ一致させる。
     flex: none を外すと、狭い画面で nav に押されて楕円に潰れる */
  width: 31px; height: 31px; flex: none;
  fill: none; stroke: var(--navy); stroke-width: 4;
  stroke-linecap: round; stroke-linejoin: round;
  transition: stroke 0.25s;
}
.logo:hover .logo-mark { stroke: var(--accent); }
/* サイト名は折り返させない。
   狭い画面で nav に押されると「結婚 / 相談所 / 検索ナ / ビ」と
   4行に割れる（実際に割れた）。 */
.logo-main {
  font-weight: 900; font-size: 1.08rem;
  color: var(--navy); letter-spacing: 0.02em; display: block;
  white-space: nowrap;
}
.logo-sub {
  font-family: 'Bebas Neue', sans-serif;   /* 英字は数値と同じ書体で揃える */
  font-size: 0.72rem; color: var(--text-light);
  letter-spacing: 0.22em; display: block; margin-top: 2px;
  white-space: nowrap;
}
/* ヘッダ内に限定する。素の nav セレクタにすると、
   都道府県リンク（nav.pref-nav）など他の nav にも効いてしまう。
   実際 align-items:center が漏れて、2行のグループだけ上下中央に寄っていた。 */
.header-inner nav { display: flex; gap: 24px; align-items: center; }
.header-inner nav a {
  color: var(--text-mid); text-decoration: none;
  font-size: 0.79rem; font-weight: 500;
  position: relative; transition: color 0.25s; white-space: nowrap;
}
.header-inner nav a::after {
  content: ''; position: absolute; bottom: -5px; left: 0;
  width: 0; height: 2px; background: var(--accent); transition: width 0.25s;
}
.header-inner nav a:hover { color: var(--accent); }
.header-inner nav a:hover::after { width: 100%; }

/* ------------------------------------------------------------ ヒーロー
   暗い面 → 大きな見出し＋右にビジュアル → 数値バー → 波で明るい面へ落とす。
   右のビジュアルは写真ではなくSVG。画像リクエストを増やさず、
   拡大しても滲まない。 */
.hero {
  position: relative; overflow: hidden;
  /* 光の滲みは疑似要素ではなく background に直接置く。
     以前は ::before に円を置いて「62%で透明」にしていたが、
     その停止位置が横一直線の境界として見えていた（画面右半分・下寄り）。
     停止を1点にせず段階的に薄め、かつ最後の透明点がヒーローの外に
     出るように大きく取ると、境目が出ない。
     格子模様（::after）は、うるさいので廃止した。 */
  background:
    /* 上から下へ暗くする。写真の上に白抜き文字を置くための下地 */
    linear-gradient(180deg, rgba(23,18,26,0.62) 0%, rgba(23,18,26,0.74) 55%, rgba(23,18,26,0.88) 100%),
    /* 左側にコピーを置くので、左を濃く落とす */
    linear-gradient(90deg, rgba(23,18,26,0.72) 0%, rgba(23,18,26,0.30) 46%, rgba(23,18,26,0.10) 100%),
    url("/assets/img/hero.jpg") center 38%/cover no-repeat,
    #17121a;
  /* 波をこの中に入れたので、下の padding は 0 にする。
     残しておくと「白い波の下に濃紺の帯」が居座る（居座った）。
     波の上の余白は .hero > .wave の margin-top で取る。 */
  padding: 84px var(--gutter) 0;
}
.hero-inner {
  position: relative; z-index: 1;
  max-width: var(--wrap); margin: 0 auto;
  /* 文字側を広めに取る。半々だと見出しが3行に割れて
     「探す。」だけが最終行に残る（残った）。 */
  display: grid; grid-template-columns: 1.24fr 0.76fr;
  gap: 36px; align-items: center;
}
.hero-eye {
  font-size: 0.66rem; letter-spacing: 0.34em; font-weight: 700;
  color: var(--accent-light); text-transform: uppercase;
  display: flex; align-items: center; gap: 11px;
}
.hero-eye::before {
  content: ''; display: block; width: 30px; height: 2px;
  background: var(--accent-light);
}
.hero h1 {
  margin-top: 16px;
  font-weight: 900; letter-spacing: 0.01em;
  /* 3行の短い見出し。一番長い行が「結婚相談所」（8文字）なので、
     その行が折れない範囲で最大まで大きくしてある。
     文字列を変えたら、割れないか必ず実機で見ること。 */
  font-size: clamp(2.15rem, 5.6vw, 4.4rem);
  line-height: 1.16; color: #fff;
}
.hero h1 .em {
  /* 見出しの効かせ色。単色より奥行きが出る */
  background: linear-gradient(92deg, #ffffff, #ffffff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lead {
  margin-top: 18px; max-width: 520px;
  font-size: 0.92rem; color: #ffe9f1; line-height: 2;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 22px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.35);
  color: #ffffff; font-size: 0.71rem; font-weight: 700;
  letter-spacing: 0.05em; padding: 7px 16px; border-radius: 999px;
  backdrop-filter: blur(6px);
}
.hero-badge .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #ffffff; flex: none;
  box-shadow: 0 0 0 4px rgba(255,255,255,0.35);
}

/* 右のビジュアル＝日本地図（ドットマップ）。
   描画は assets/japan-map.js。格子は見本画像から機械的に起こしてある。
   掲載相談所の多い地方ほど、明るい点の割合が増える。 */
.hero-visual { position: relative; }
/* JSが描くまで高さが0だと、その分だけ後からガタッと動く。
   先に縦横比を確保しておく（58列 × 60行）。 */
.hero-visual svg {
  width: 100%; height: auto; display: block;
  aspect-ratio: 58 / 60;
}
/* 全ての点をきちんと見える濃さで出したうえで、
   相談所のある都道府県だけを光らせる。
   （沈ませすぎると「日本地図」であること自体が読めなくなる） */
.jp-dot {
  fill: #f5a8c8;
}
.jp-dot--on {
  fill: #ffffff;
  animation: jpPulse 3.6s ease-in-out infinite;
}
@keyframes jpPulse {
  0%, 100% { opacity: .72; }
  50%      { opacity: 1; }
}
/* 沖縄が別枠であることを示すかぎ括弧 */
.jp-bracket { fill: none; stroke: rgba(240,120,165,.22); stroke-width: 1.4; }

/* ------------------------------------------------------------ 波
   暗い面から明るい面への切り替え。 */
/* 背景色はヒーロー最下部の色に合わせる。--navy のままだと、
   ヒーローが下に向かって暗くなるぶん、継ぎ目に横線が出る。
   曲線の塗り（SVG側の fill）は、下に来る面の色と必ず一致させること。
   いまは下が .white-sec なので #fff。ここがズレると帯がグレーに見える。 */
/* 波はヒーローの内側に置く。背景を持たせないので、
   親のグラデーションがそのまま波の裏まで続き、境目が出ない。
   以前は外に出して #e7699b のべた塗りにしていたが、
   ヒーロー下端は放射グラデーションのぶんだけ明るく、そこが横線に見えていた。 */
.wave { background: transparent; line-height: 0; }
/* 波はヒーローの横 padding の外まで届かせる。
   届かせないと、下辺の左右にだけ濃紺が三角に残る（残った）。
   トップのヒーローは横に padding があるので、そのぶん引き戻す。 */
.hero > .wave {
  margin: 54px calc(-1 * var(--gutter)) 0;
}
.wave svg { display: block; width: 100%; height: auto; }
/* SVGの高さは幅から割り出すので端数になる。そのぶん最下部に
   1px の筋が残ることがあるので、次の面を 1px 重ねて隠す。 */
.hero + section, .page-hero + section { margin-top: -1px; position: relative; }

/* ------------------------------------------------------------ 3段検索 */
.finder {
  background: var(--bg-white);
  border: 1px solid var(--border-light); border-radius: 14px;
  box-shadow: var(--shadow-hover); overflow: hidden;
}
/* カード内の見出しは置かない。節見出し（エリアから探す／都道府県を選ぶと…）が
   同じことを言っていて、二重になる（なった）。 */
.finder-body {
  display: grid; gap: 12px; padding: 22px;
  grid-template-columns: 1fr 1fr 1fr auto; align-items: end;
}
.fld label {
  display: block; font-size: 0.7rem; font-weight: 700;
  color: var(--text-mid); letter-spacing: 0.06em; margin-bottom: 7px;
}
.fld label .step {
  display: inline-block; width: 16px; height: 16px; line-height: 16px;
  text-align: center; border-radius: 50%; margin-right: 6px;
  background: var(--accent-dim); color: var(--accent); font-size: 0.62rem;
}
/* select は OS 依存の見た目を消して、矢印を自前で描く */
.fld select {
  width: 100%; appearance: none; -webkit-appearance: none;
  font-family: inherit; font-size: 0.88rem; color: var(--text-dark);
  background: var(--bg-white); border: 1px solid var(--border-light);
  border-radius: 9px; padding: 12px 38px 12px 14px; cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-mid) 50%),
    linear-gradient(135deg, var(--text-mid) 50%, transparent 50%);
  background-position: calc(100% - 19px) calc(50% + 1px),
                       calc(100% - 14px) calc(50% + 1px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.fld select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
/* 前段が未選択のうちは触れないようにする。3段の順序を体で分からせる */
.fld select:disabled {
  background-color: var(--bg-light); color: var(--text-light);
  cursor: not-allowed; opacity: 1;
}
.finder-go {
  font-family: inherit; font-size: 0.87rem; font-weight: 700;
  letter-spacing: 0.04em; color: #fff; background: var(--accent);
  border: none; border-radius: 9px; padding: 13px 26px;
  cursor: pointer; transition: background 0.25s, transform 0.15s;
  white-space: nowrap;
}
.finder-go:hover { background: var(--navy); }
.finder-go:active { transform: translateY(1px); }
.finder-go:disabled {
  background: var(--border-light); color: var(--text-light); cursor: not-allowed;
}
.finder-foot {
  padding: 0 22px 20px; display: flex; flex-wrap: wrap;
  gap: 8px; align-items: center;
}
.finder-foot .cap {
  font-size: 0.71rem; color: var(--text-light); margin-right: 2px;
}
.chip {
  padding: 5px 13px; border: 1px solid var(--border-light);
  border-radius: 999px; background: var(--bg-white);
  font-size: 0.74rem; color: var(--text-mid);
  text-decoration: none; transition: all 0.22s;
}
.chip:hover {
  border-color: var(--accent); color: var(--accent); background: var(--accent-dim);
}

/* ------------------------------------------------------------ 数値バー
   暗いヒーローの中に置く。境界は細い線だけで区切る。 */
.stats-bar {
  /* ピンクの面に白文字を置くので、帯だけわずかに沈めて可読性を稼ぐ */
  background: rgba(0,0,0,0.06);
  position: relative; z-index: 1;
  max-width: var(--wrap); margin: 56px auto 0;
  display: grid; grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid rgba(255,255,255,0.28);
  border-bottom: 1px solid rgba(255,255,255,0.28);
}
.stat-item {
  /* 5つを1行に並べる。左右の padding を詰めないと
     「掲載相談所」「比較できる料金」が2行に折れる */
  padding: 22px 6px; text-align: center;
  border-right: 1px solid rgba(255,255,255,0.09);
  transition: background 0.3s;
}
.stat-item:last-child { border-right: none; }
.stat-item:hover { background: rgba(240,120,165,0.045); }
/* 数字は Bebas Neue。縦に長い書体なので、同じ級数でも数字が大きく見える。
   単位（社・記事）は日本語なので Noto に戻す。 */
.stat-number {
  font-family: 'Bebas Neue', 'Noto Sans JP', sans-serif;
  font-size: 2.9rem; font-weight: 400; color: #ffffff;
  line-height: 1; letter-spacing: 0.02em;
  display: flex; align-items: baseline; justify-content: center; gap: 4px;
}
.stat-number .unit {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.8rem; color: #ffffff;
  font-weight: 700; letter-spacing: 0;
}
.stat-label {
  /* 5列にしたぶん字間を詰める。0.14em のままだと
     「掲載相談所」が枠に収まらない。**折り返させない** */
  font-size: 0.67rem; color: #ffe1ec;
  letter-spacing: 0.06em; margin-top: 5px; white-space: nowrap;
}

/* ------------------------------------------------------------ 検索の面
   波の下、明るい面の先頭に置く。ヒーローから視線が落ちてくる位置。 */

/* ------------------------------------------------------------ 共通の面 */
.white-sec { background: var(--bg-white); padding: 68px var(--gutter); }
.light-sec { background: var(--bg-light); padding: 68px var(--gutter); }
.gray-sec  { background: var(--bg-gray);  padding: 68px var(--gutter); }
.inner { max-width: var(--wrap); margin: 0 auto; }
.inner-narrow { max-width: 900px; margin: 0 auto; }

.sec-header { margin-bottom: 34px; }
.sec-eye {
  font-size: 0.66rem; letter-spacing: 0.28em; color: var(--accent);
  font-weight: 700; text-transform: uppercase; margin-bottom: 9px;
  display: flex; align-items: center; gap: 10px;
}
.sec-eye::before {
  content: ''; display: block; width: 24px; height: 2px; background: var(--accent);
}
.sec-title {
  font-weight: 900; font-size: clamp(1.32rem, 2.9vw, 1.88rem);
  line-height: 1.42; color: var(--navy);
}
.sec-title .em { color: var(--accent); }
.sec-note { margin-top: 10px; font-size: 0.83rem; color: var(--text-mid); }

/* ------------------------------------------------------------ 都道府県リンク
   検索窓（select）はクローラが辿れないので、辿れるリンクをここで担保する。
   カード型だと場所を取りすぎるうえ、検索窓と役割が重なるので、
   一覧は密なリンク集にしている。 */
.pref-nav {
  margin-top: 30px;
  display: grid; gap: 22px 28px;
  /* 1行のグループと2行のグループで見出しの高さを揃える。
     指定しないと、行の高さに対して縦中央に寄る。 */
  align-items: start;
  grid-template-columns: repeat(auto-fill, minmax(236px, 1fr));
}
.pref-group h3 {
  font-size: 0.72rem; font-weight: 700; color: var(--accent);
  letter-spacing: 0.1em;
  padding-bottom: 7px; margin-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}
.pref-group ul {
  list-style: none; display: flex; flex-wrap: wrap; gap: 6px 14px;
}
.pref-group a {
  font-size: 0.83rem; text-decoration: none; color: var(--text-dark);
  display: inline-flex; align-items: baseline; gap: 3px;
  transition: color 0.2s;
}
.pref-group a:hover { color: var(--accent); text-decoration: underline; }
.pref-group b {
  font-family: 'Bebas Neue', sans-serif; font-weight: 400;
  font-size: 0.86rem; color: var(--accent);
}
/* ページそのものが無い県はリンクにしない。 */
.pref-group span { font-size: 0.83rem; color: #d1b3be; }
/* 社が無い県も、件数は他と同じ「0」で並べる。
   ここだけ「オンライン」と別の言葉を出したが、
   **並びの中で1つだけ語が違うと、何を指しているのか読み取れない。** */

/* ------------------------------------------------------------ 条件で絞る
   絞り込みチップは、地域の結果ページ側で使う。
   トップに置くと「まだ何も絞り込んでいない状態で条件だけ並ぶ」ことになり、
   使いどころがない。 */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 9px; }
.tag-cloud .chip { font-size: 0.78rem; padding: 7px 15px; }

/* ------------------------------------------------------------ オンライン相談
   近くに通える医療機関がない人の受け皿。地域で探した直後に置く。 */
/* 3枚を必ず横一列に、版面いっぱいで並べる。
   auto-fill だと枚数によって最後の列が余り、右端が揃わなかった */
.online-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(3, 1fr);
}
.online-card {
  background: var(--bg-white); border: 1px solid var(--border-light);
  border-radius: 12px; padding: 20px; text-decoration: none;
  display: flex; flex-direction: column; gap: 11px;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}
.online-card:hover {
  border-color: var(--accent-border); box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.online-card .badge {
  align-self: flex-start;
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.06em;
  color: var(--accent); background: var(--accent-dim);
  padding: 3px 9px; border-radius: 4px;
}
.online-card .name {
  font-size: 0.97rem; font-weight: 700; color: var(--navy); line-height: 1.5;
}
.online-card .price {
  display: flex; align-items: baseline; gap: 4px;
  font-family: 'Bebas Neue', 'Noto Sans JP', sans-serif;
  font-size: 1.86rem; color: var(--accent); line-height: 1;
}
.online-card .price .yen  { font-size: 1.1rem; }
.online-card .price .per  {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.7rem; color: var(--text-light); font-weight: 500;
}
.online-card .spec {
  list-style: none; display: grid; gap: 5px;
  font-size: 0.76rem; color: var(--text-mid); margin-top: auto;
}
.online-card .spec li { display: flex; justify-content: space-between; gap: 10px; }
.online-card .spec b { font-weight: 700; color: var(--text-dark); }

/* ------------------------------------------------------------ 一覧へ誘導する釦 */
.more-wrap { margin-top: 26px; text-align: center; }
.btn-more {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: 999px;
  background: var(--accent); color: #fff;
  font-size: 0.85rem; font-weight: 700; text-decoration: none;
  transition: background 0.25s, transform 0.15s;
}
.btn-more:hover { background: var(--navy); }
.btn-more:active { transform: translateY(1px); }
.btn-more::after { content: '→'; font-size: 0.9rem; }

/* ------------------------------------------------------------ 上部へ戻る */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 180;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--border-light); background: rgba(255,255,255,0.94);
  backdrop-filter: blur(8px); box-shadow: var(--shadow-hover);
  cursor: pointer; display: grid; place-items: center;
  /* 最初は隠しておき、少しスクロールしてから出す。
     visibility も切らないと、隠れていてもクリックを拾ってしまう。 */
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .25s, visibility .25s, transform .25s, background .25s;
}
.to-top.is-shown { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--accent); }
.to-top svg { width: 17px; height: 17px; stroke: var(--navy); fill: none;
              stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.to-top:hover svg { stroke: #fff; }
@media (max-width: 640px) {
  .to-top { right: 14px; bottom: 14px; width: 42px; height: 42px; }
}

/* ------------------------------------------------------------ 比較表への導線 */
.compare-card {
  background: var(--bg-white); border: 1px solid var(--border-light);
  border-radius: 14px; overflow: hidden; box-shadow: var(--shadow);
}
.compare-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.compare-table th, .compare-table td {
  padding: 13px 16px; text-align: left;
  border-bottom: 1px solid var(--border-light);
}
.compare-table thead th {
  background: var(--bg-light); font-size: 0.72rem; font-weight: 700;
  color: var(--text-mid); letter-spacing: 0.04em; white-space: nowrap;
}
.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td { border-bottom: none; }
.compare-table tbody tr:hover { background: var(--bg-light); }
.compare-table .clinic { font-weight: 700; color: var(--navy); }
.compare-table .price {
  font-weight: 900; color: var(--accent);
  font-feature-settings: "tnum" 1; white-space: nowrap;
}
.compare-table .price small {
  font-size: 0.7rem; color: var(--text-light); font-weight: 500; margin-left: 2px;
}
/* 金額に付く条件（クーポン適用・12ヶ月定期 など）。
   **条件は金額のすぐ下に置く。**欄外にまとめると数字だけが独り歩きする */
.compare-table td > small {
  display: block; margin-top: 3px; font-size: 0.68rem;
  color: var(--text-light); line-height: 1.5; white-space: normal;
}
/* 表は横に溢れる。body を横スクロールさせず、表の中だけで流す */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ------------------------------------------------------------ 選び方の分かれ道
   2段構えで「どこで受けるか」を絞っていく。
   左右に事実を並べるだけにして、断定はしない。 */
.fork { display: grid; gap: 18px; }
.fork-step {
  background: var(--bg-white); border: 1px solid var(--border-light);
  border-radius: 14px; padding: 24px 24px 22px;
}
.fork-no {
  display: inline-block; font-family: 'Bebas Neue', sans-serif;
  font-size: 0.86rem; letter-spacing: 0.14em; color: var(--accent);
  background: var(--accent-dim); padding: 2px 11px; border-radius: 4px;
}
.fork-step h3 {
  margin-top: 11px; font-size: 1.1rem; font-weight: 700;
  color: var(--navy); line-height: 1.5;
}
.fork-cols {
  margin-top: 16px; display: grid; gap: 12px;
  grid-template-columns: 1fr 1fr; align-items: stretch;
}
.fork-col {
  border: 1px solid var(--border-light); border-radius: 10px;
  padding: 16px 18px; background: var(--bg-light);
}
/* 話の落としどころになる側。色で少しだけ持ち上げる */
.fork-col.is-lead {
  background: var(--accent-dim); border-color: var(--accent-border);
}
.fork-label {
  display: block; font-size: 0.83rem; font-weight: 700;
  color: var(--navy); padding-bottom: 9px; margin-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}
.fork-col.is-lead .fork-label { border-bottom-color: var(--accent-border); }
.fork-col ul { list-style: none; display: grid; gap: 7px; }
.fork-col li {
  font-size: 0.79rem; color: var(--text-mid); line-height: 1.7;
  padding-left: 15px; position: relative;
}
.fork-col li::before {
  content: ''; position: absolute; left: 0; top: 0.62em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
  opacity: 0.45;
}
.fork-col.is-lead li::before { opacity: 1; }
.fork-note {
  margin-top: 14px; font-size: 0.81rem; color: var(--text-mid);
  line-height: 1.9; padding-left: 13px; border-left: 3px solid var(--accent-border);
}

/* 結論のカード。STEPと同じ形のまま、色だけ変えて「ここが答え」と分ける。
   **新しい色は足さない。** STEPが accent（明るい青）なので、
   結論は navy（濃紺）を面で使い、明暗そのもので差をつける。 */
.fork-step.is-conclusion {
  background: var(--navy); border-color: var(--navy);
  /* 間隔は .fork の gap に任せる。ここだけ広げると幅が揃わず、かえって目につく */
}
.fork-step.is-conclusion .fork-no {
  /* Bebas Neue に日本語は無い。字間だけ残ると間延びするので戻す */
  font-family: inherit; font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.06em; color: var(--navy); background: #fff;
}
.fork-step.is-conclusion h3 { color: #fff; }
.fork-step.is-conclusion .fork-col {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.18);
}
.fork-step.is-conclusion .fork-label {
  color: #fff; border-bottom-color: rgba(255, 255, 255, 0.2);
}
.fork-step.is-conclusion .fork-col li { color: rgba(255, 255, 255, 0.86); }
.fork-step.is-conclusion .fork-col li::before {
  background: #fff; opacity: 0.6;
}

/* ------------------------------------------------------------ コラム
   画像も日付も出さない。そのぶん見出しを主役にして、
   上端の色帯と余白で1枚ずつを立たせる。 */
.post-grid {
  /* **見出しの下線とカードの上の線を重ねない。**
     .block > h2 の下線のすぐ下にカードが来ると、
     カード上端の色帯と下線がくっついて1本の太い線に見えた */
  margin-top: 18px;
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
  /* 2枠ぶんのカードが入らずに次の行へ送られると、そこに穴が空く。
     dense にすると、後ろの1枠のカードが穴を埋めてくれる */
  grid-auto-flow: dense;
}
.post-card {
  position: relative; overflow: hidden;
  background: var(--bg-white); border: 1px solid var(--border-light);
  border-radius: 14px; padding: 26px 22px 20px; text-decoration: none;
  display: flex; flex-direction: column; gap: 12px; min-height: 186px;
  transition: border-color .25s, box-shadow .25s, transform .25s;
}
/* 上端の色帯。ふだんは薄く、載せると伸びて濃くなる */
.post-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  /* バッジと同じ色。カードの色だけで、どのカテゴリかが分かるようにする */
  background: var(--cat-fg, var(--accent));
  transform: scaleX(0.18); transform-origin: left;
  opacity: .5; transition: transform .3s, opacity .3s;
}
.post-card:hover {
  border-color: var(--accent-border); box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}
.post-card:hover::before { transform: scaleX(1); opacity: 1; }
.post-card .cat {
  /* 色はここで指定しない。上の .cat が変数から取る。
     ここで color/background を書くと詳細度で勝ってしまい、
     カテゴリごとの色がまた全部同じになる（一度なった） */
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.1em;
  align-self: flex-start;
  padding: 4px 10px; border-radius: 999px;
}
/* カテゴリの色。**ここ1か所で決める。**
   バッジの文字色・地色と、コラムのカードの上端の色帯に同じ値を使う。
   クラスは data/column_slug.json の slug から作る（cat-clinic など）ので、
   カテゴリを足したらここにも1行足す。無ければ既定の青のままになる。

   **色は変数で持つ。** 🔴 以前は .cat.cat-◯◯ に色を直接書いていたが、
   それだとバッジにしか効かず、カードの上端に同じ色を使えなかった。
   変数をカード側に置けば、中のバッジにも上端の帯にも同じ値が届く。 */
.cat-clinic     { --cat-fg: #12588f; --cat-bg: #e3f0fb; }
.cat-medicine   { --cat-fg: #1c6b53; --cat-bg: #e0f2ec; }
.cat-lifestyle  { --cat-fg: #9a5a12; --cat-bg: #fbeedd; }
.cat-transplant { --cat-fg: #7a4a00; --cat-bg: #fdf1dc; }
.cat-myth       { --cat-fg: #6b4a9c; --cat-bg: #eee8f8; }
.cat-young      { --cat-fg: #0f6f86; --cat-bg: #ddf1f6; }
.cat-alopecia   { --cat-fg: #a33a52; --cat-bg: #fbe6ea; }
.cat-covid      { --cat-fg: #4d6076; --cat-bg: #e9eef3; }
.cat-food       { --cat-fg: #5c7a1e; --cat-bg: #eef5dd; }
.cat-scalp      { --cat-fg: #a4551f; --cat-bg: #fbe9dd; }
.cat-gray-hair  { --cat-fg: #5a6472; --cat-bg: #eceff3; }
.cat-season     { --cat-fg: #1f6f5c; --cat-bg: #e2f2ed; }
.cat-tonic      { --cat-fg: #2a6aa8; --cat-bg: #e5eefa; }
.cat-hairstyle  { --cat-fg: #8a3b63; --cat-bg: #fbeaf1; }
.cat-item       { --cat-fg: #7a5c1a; --cat-bg: #f7efd9; }
.cat-genetics   { --cat-fg: #4a5aa0; --cat-bg: #e8ebf8; }
.cat-whorl      { --cat-fg: #97561d; --cat-bg: #fbecdc; }
.cat-online     { --cat-fg: #0d6a72; --cat-bg: #ddf0f1; }
.cat-ranking    { --cat-fg: #8a5a00; --cat-bg: #faeed6; }
.cat-diet       { --cat-fg: #3f7a3f; --cat-bg: #e6f3e6; }
.cat-women      { --cat-fg: #a1447a; --cat-bg: #fbe8f2; }
.cat-other      { --cat-fg: #5a6472; --cat-bg: #eceff3; }

/* 変数が無いときは既定の青。**カテゴリを足し忘れても崩れないように。** */
.cat { color: var(--cat-fg, var(--accent)); background: var(--cat-bg, var(--accent-dim)); }

/* いま見ているカテゴリ。入口の並びの中で自分の位置が分かるようにする */
.chain-nav a.is-here {
  background: var(--navy); border-color: var(--navy); color: #fff;
}
.chain-nav a.is-here b { color: #fff; }
.post-card .ttl {
  font-size: 0.96rem; font-weight: 700; color: var(--navy); line-height: 1.68;
}
.post-card .go {
  margin-top: auto; font-size: 0.74rem; font-weight: 700; color: var(--accent);
  display: inline-flex; align-items: center; gap: 6px;
}
.post-card .go::after {
  content: '→'; transition: transform .25s;
}
.post-card:hover .go::after { transform: translateX(4px); }

/* ------------------------------------------------------------ ハンバーガー
   狭い画面だけに出す。開閉は site.js。 */
.nav-toggle {
  display: none; width: 40px; height: 40px; flex: none;
  background: none; border: 1px solid var(--border-light); border-radius: 9px;
  cursor: pointer; padding: 0;
  align-items: center; justify-content: center;
}
.nav-toggle span {
  display: block; width: 17px; height: 2px; border-radius: 2px;
  background: var(--navy); position: relative;
  transition: transform .25s, opacity .2s;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: ''; position: absolute; left: 0; width: 17px; height: 2px;
  border-radius: 2px; background: var(--navy);
  transition: transform .25s;
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after  { top:  6px; }
/* 開いたら×にする */
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle span::after  { transform: translateY(-6px) rotate(-45deg); }

/* ------------------------------------------------------------ 注記・広告表記
   目立つ位置に常時出しておく。 */
.pr-note {
  background: var(--bg-gray); border-top: 1px solid var(--border-light);
  padding: 11px var(--gutter); font-size: 0.71rem; color: var(--text-mid);
  text-align: center; line-height: 1.7;
}
.disclaimer {
  margin-top: 18px; padding: 15px 18px;
  background: var(--bg-light); border-left: 3px solid var(--accent-border);
  border-radius: 0 8px 8px 0;
  font-size: 0.76rem; color: var(--text-mid); line-height: 1.85;
}

/* ------------------------------------------------------------ フッタ */
footer { background: var(--navy); color: #eacfd9; padding: 52px var(--gutter) 26px; }
.foot-grid {
  max-width: var(--wrap); margin: 0 auto;
  display: grid; gap: 30px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.foot-col h4 {
  font-size: 0.73rem; font-weight: 700; color: #fff;
  letter-spacing: 0.1em; margin-bottom: 13px;
}
.foot-col ul { list-style: none; display: grid; gap: 8px; }
.foot-col a {
  color: #d9b3c2; text-decoration: none; font-size: 0.79rem;
  transition: color 0.22s;
}
.foot-col a:hover { color: #fff; }
.foot-brand .logo-main { color: #fff; }
.foot-brand .logo-sub  { color: #ffe1ec; }
.foot-brand p {
  margin-top: 12px; font-size: 0.76rem; color: #cfa9b9; line-height: 1.85;
}
.foot-bottom {
  max-width: var(--wrap); margin: 30px auto 0; padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.05);
  font-size: 0.71rem; color: #ffe1ec;
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}

/* ------------------------------------------------------------ 画面幅 */
@media (max-width: 980px) {
  /* 2カラムだと文字も絵も痩せる。縦に積んで、絵は見出しの下に回す */
  .hero-inner { grid-template-columns: 1fr; gap: 26px; }
  .hero-visual { max-width: 420px; margin: 0 auto; }
  /* 5つは1行に入らない。3＋2で折る。
     **奇数個なので、行の右端に来る枠と最終行の扱いを個別に指定する。**
     nth-child(2n) のような一律の指定だと、区切り線が縦に揃わない */
  .stats-bar {
  /* ピンクの面に白文字を置くので、帯だけわずかに沈めて可読性を稼ぐ */
  background: rgba(0,0,0,0.06); grid-template-columns: repeat(3, 1fr); }
  .stat-item:nth-child(3n) { border-right: none; }
  .stat-item:nth-child(-n+3) { border-bottom: 1px solid rgba(255,255,255,0.09); }
  /* 最終行は2つ。中央に寄せると、上の行の区切り線とずれて見える。
     左詰めのまま、最後の枠の右線だけ消す */
  .stat-item:last-child { border-right: none; }
}
@media (max-width: 900px) {
  .finder-body { grid-template-columns: 1fr 1fr; }
  .finder-go { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  /* 左右の余白はここ1か所で切り替える。
     各セクションに個別の px を書くと、必ずどこか揃わなくなる。 */
  :root { --gutter: 18px; }

  /* ロゴは左、ハンバーガーは右。nav はその下に畳んでおく */
  .header-inner {
    gap: 12px; padding: 11px 0;     /* 横は header 側の --gutter で取る */
  }
  .logo-main { font-size: 0.95rem; }
  .logo-sub  { font-size: 0.54rem; }
  /* 名前が小さくなるぶんマークも詰める。合わせないとマークだけ浮く */
  .logo-mark { width: 27px; height: 27px; }
  .logo { gap: 8px; }
  .nav-toggle { display: inline-flex; }

  .header-inner nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-hover);
    padding: 2px var(--gutter) 8px;
    /* 閉じている状態。visibility も切らないと、畳んでいてもタップを拾う */
    opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: opacity .2s, visibility .2s, transform .2s;
  }
  .nav-open .header-inner nav { opacity: 1; visibility: visible; transform: none; }
  .header-inner nav a {
    font-size: 0.88rem; padding: 14px 2px;
    border-bottom: 1px solid var(--border-light);
  }
  .header-inner nav a:last-child { border-bottom: none; }
  .header-inner nav a::after { display: none; }

  /* 左右に並べる比較は、狭い画面では縦に積む */
  .fork-cols { grid-template-columns: 1fr; }
  .fork-step { padding: 20px 18px 18px; }

  /* 3枚固定にしたぶん、狭い画面では自分で畳む必要がある */
  .online-grid { grid-template-columns: 1fr; }

  .hero { padding: 44px var(--gutter) 34px; }
  /* 絵が大きいと検索UIまでのスクロールが長くなる。
     スマホでは主役は検索なので、絵は控えめに詰める。 */
  .hero-visual { max-width: 248px; }
  /* 見出しが「…地域から探 / す。」と半端に折れるので下限を下げる */
  .hero h1 { font-size: clamp(1.62rem, 7vw, 2.72rem); }

  .finder-body { grid-template-columns: 1fr; gap: 14px; }
  .white-sec, .light-sec, .gray-sec { padding: 48px var(--gutter); }
  .stat-number { font-size: 2.3rem; }
  .stat-label { font-size: 0.63rem; letter-spacing: 0.08em; }
  .foot-bottom { flex-direction: column; }
}

/* 動きを減らす設定を尊重する */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   下層ページ（地域ページ／相談所ページ）
   ============================================================ */

/* ------------------------------------------------------------ 下層のヒーロー
   トップと同じ濃紺の面。パンくずと見出しをここに入れて、
   下に .wave を続ける。トップとの一貫性と、面のメリハリのため。 */
.page-hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1000px 640px at 78% 6%,
      rgba(236,121,167,0.22)  0%,
      rgba(236,121,167,0.10) 34%,
      rgba(236,121,167,0)    78%),
    linear-gradient(180deg, #241a22 0%, #17121a 62%, #120e15 100%);
}

/* ------------------------------------------------------------ パンくず */
/* **左端は h1 とそろえる。** 🔴
   .page-head は「外側に padding、内側に max-width」の順で組んである。
   パンくずだけ同じ箱に padding を入れると、その 1 つぶん（--gutter）
   右にずれる（ずれていた）。同じ順番にすること */
.crumb { padding: 0 var(--gutter); }
.crumb ol {
  max-width: var(--wrap); margin: 0 auto; padding: 13px 0 0;
  list-style: none; display: flex; flex-wrap: wrap; align-items: center;
  gap: 6px; font-size: 0.74rem; color: #ffe1ec;
}
.crumb a { color: #ffffff; text-decoration: none; }
.crumb a:hover { color: #fff; text-decoration: underline; }
.crumb li + li::before { content: "\203a"; margin-right: 6px; color: #ffc9dd; }

/* ------------------------------------------------------------ ページ見出し */
.page-head { padding: 26px var(--gutter) 40px; }
.page-head .inner { max-width: var(--wrap); margin: 0 auto; }
.page-head h1 {
  font-size: clamp(1.46rem, 3.5vw, 2.18rem); font-weight: 900;
  color: #fff; line-height: 1.45;
}
.page-lead {
  /* 改行位置は生成側で <br> を入れて決めている。
     ここが狭いと、その手前でブラウザがもう一度折り返してしまい、
     「カウンセ／リング」のような切れ方になる。1行ぶんの余裕を持たせる。 */
  margin-top: 14px; max-width: 1000px;
  font-size: 0.88rem; color: #ffe9f1; line-height: 2;
}
/* 画面が狭いときは <br> を無効にする。
   決め打ちの改行を残すと、折り返しと重なって1行だけ極端に短くなる */
@media (max-width: 720px) {
  .page-lead br { display: none; }
}
/* 見出し直下の要約。件数と最安値を数字で先に出す */
.page-meta { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; }
.meta-chip {
  border: 1px solid rgba(255,255,255,0.35); border-radius: 10px;
  padding: 9px 15px; background: rgba(255,255,255,0.06);
  backdrop-filter: blur(6px);
  display: flex; align-items: baseline; gap: 7px;
}
.meta-chip .k { font-size: 0.7rem; color: #ffe9f1; }
.meta-chip .v {
  font-family: 'Bebas Neue', 'Noto Sans JP', sans-serif;
  font-size: 1.24rem; color: #ffffff; line-height: 1;
}
/* 時刻は「時」を大きく、「分」を小さく。10:00 の 00 まで大きいと、
   数字が団子になって時が読み取りにくい。 */
.meta-chip .v small { font-size: 0.62em; letter-spacing: 0; }
.meta-chip .u { font-size: 0.7rem; color: #ffffff; font-weight: 700; }

/* ------------------------------------------------------------ 節の見出し（下層用） */
.block { margin-top: 44px; }
.block > h2 {
  font-size: clamp(1.12rem, 2.4vw, 1.42rem); font-weight: 900;
  color: var(--navy); line-height: 1.5;
  padding-bottom: 11px; border-bottom: 2px solid var(--border-light);
  position: relative;
}
.block > h2::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 62px; height: 2px; background: var(--accent);
}
.block > .note { margin-top: 12px; font-size: 0.82rem; color: var(--text-mid); line-height: 1.9; }

/* ------------------------------------------------------------ 読みもののページ
   運営者情報・本サイトについて・プライバシーポリシー・お問い合わせで使う。

   **本文は見出しの下線と同じ幅まで流す。**　🔴
   以前は max-width: 900px で1行を短く止めていたが、
   見出しの下線が1180pxまで伸びているので、本文だけ8割で折り返して
   右側が空いて見えた。幅をそろえる方を採る。 */
.prose { margin-top: 18px; }
.prose p {
  margin-top: 14px; font-size: 0.87rem; color: var(--text-dark); line-height: 2;
}
.prose h3 {
  margin-top: 30px; font-size: 1rem; font-weight: 700;
  color: var(--navy); line-height: 1.6;
  padding-left: 12px; border-left: 3px solid var(--accent);
}
.prose h3 + p { margin-top: 10px; }
.prose ul, .prose ol { margin-top: 12px; padding-left: 1.35em; }
.prose li {
  margin-top: 7px; font-size: 0.87rem; color: var(--text-dark); line-height: 1.95;
}
.prose li::marker { color: var(--accent); }
.prose strong { font-weight: 700; color: var(--navy); }
.prose a { color: var(--accent); }
/* **釦は色を上書きさせない。**　🔴
   .prose a が青文字を掛けるので、青地の釦の文字が地の色と同化して
   何も書いていない箱に見えた（見えた） */
.prose a.cmp-go { color: #fff; }
/* 補足・注意書き。本文より一段落として見せる */
.prose .aside {
  margin-top: 18px; padding: 15px 18px;
  background: var(--bg-light); border: 1px solid var(--border-light);
  border-radius: 10px;
  font-size: 0.82rem; color: var(--text-mid); line-height: 1.95;
}
.prose .aside p { margin-top: 8px; font-size: inherit; color: inherit; }
.prose .aside p:first-child { margin-top: 0; }
.prose .updated {
  margin-top: 26px; font-size: 0.76rem; color: var(--text-light);
}
/* 運営者情報・連絡先の表。相談所ページの .facts と同じ見た目に寄せる */
.prose .facts-wrap { margin-top: 18px; max-width: 900px; }

/* ------------------------------------------------------------ 料金の比較表
   **横スクロールさせない。**　🔴
   9列ある表をスマホで横に流すと、指で送っているあいだに
   どの行を見ていたか分からなくなる。
   狭い画面では同じ <table> のまま、1行＝1枚のカードに組み替える。
   見出しは各セルの data-l に持たせてあるので、DOMは1つで済む
   （表とカードを別々に書くと、片方だけ古くなる）。 */
.cmp-wrap { margin-top: 18px; }
.cmp { width: 100%; border-collapse: collapse; font-size: 0.83rem; }
.cmp th {
  padding: 11px 10px; text-align: left; white-space: nowrap;
  font-size: 0.72rem; font-weight: 700; color: var(--text-mid);
  background: var(--bg-light); border-bottom: 2px solid var(--border-light);
}
.cmp td {
  padding: 13px 10px; border-bottom: 1px solid var(--border-light);
  vertical-align: middle; color: var(--text-dark);
}
.cmp tbody tr:hover { background: var(--bg-light); }
/* 1位だけ枠で持ち上げる。色は付けない（順位は金額で決まっているので、
   色で「おすすめ」に見せない） */
.cmp tr.is-top td { background: #f3f9ff; }
.cmp-rank {
  display: inline-grid; place-items: center; width: 26px; height: 26px;
  border-radius: 50%; background: var(--navy); color: #fff;
  font-family: 'Bebas Neue', sans-serif; font-size: 0.9rem;
}
.cmp tr.is-top .cmp-rank { background: var(--accent); }
.cmp-name {
  display: block; font-weight: 700; color: var(--navy); text-decoration: none;
  line-height: 1.5;
}
.cmp-name:hover { color: var(--accent); text-decoration: underline; }
.cmp-plan {
  display: block; margin-top: 3px; font-size: 0.7rem; color: var(--text-light);
  line-height: 1.5;
}
.cmp-yen {
  font-family: 'Bebas Neue', 'Noto Sans JP', sans-serif;
  font-size: 1.3rem; color: var(--navy); letter-spacing: 0.01em;
}
.cmp tr.is-top .cmp-yen { color: var(--accent); }
.cmp-per { font-size: 0.7rem; color: var(--text-mid); margin-left: 2px; }
.cmp-how { display: block; font-size: 0.68rem; color: var(--text-light); }
.cmp-go {
  display: inline-block; white-space: nowrap;
  padding: 9px 14px; border-radius: 8px;
  background: var(--accent); color: #fff; font-size: 0.76rem; font-weight: 700;
  text-decoration: none;
}
.cmp-go:hover { background: var(--navy); }
.cmp-rest td { font-size: 0.78rem; }
/* ------------------------------------------------------------ コラムの目次
   見出しが3つ以上ある記事だけに出す（tools/md.py）。
   2つしかない記事に付けても、行き先が2つの箱が増えるだけ */
.toc {
  background: var(--bg-light); border: 1px solid var(--border-light);
  border-radius: 12px; padding: 18px 22px; max-width: 900px;
}
.toc-t {
  font-size: 0.78rem; font-weight: 700; color: var(--navy);
  letter-spacing: 0.06em;
}
.toc ol { margin-top: 10px; padding-left: 1.3em; }
.toc li { margin-top: 6px; font-size: 0.83rem; line-height: 1.8; }
.toc li::marker { color: var(--accent); }
.toc a { color: var(--text-dark); text-decoration: none; }
.toc a:hover { color: var(--accent); text-decoration: underline; }

/* 本文の画像。**原寸で出さない。**記事によって元の大きさがばらばらで、
   そのまま出すと横に飛び出す */
.prose img {
  display: block; max-width: 100%; height: auto;
  margin: 18px 0; border-radius: 10px;
}

/* ------------------------------------------------------------ 記事の横の欄
   内部リンクを増やすための場所。
   **狭い画面では横に置かない。**300pxの欄を無理に残すと、
   本文が読めない幅になる。下へ回す */
.post-wrap {
  display: grid; gap: 30px;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: start;
}
.post-main { min-width: 0; }
/* 横の欄はスクロールに付いてくる。長い記事でも導線が消えない */
.post-side { position: sticky; top: 84px; display: grid; gap: 14px; }
.side-box {
  background: var(--bg-white); border: 1px solid var(--border-light);
  border-radius: 12px; padding: 16px 18px;
}
.side-box.side-pr { border-color: var(--accent-border); background: #fbfdff; }
.side-t {
  font-size: 0.78rem; font-weight: 700; color: var(--navy);
  padding-bottom: 9px; border-bottom: 1px solid var(--border-light);
}
.side-t a { color: var(--navy); text-decoration: none; }
.side-t a:hover { color: var(--accent); text-decoration: underline; }
.side-name {
  display: block; margin-top: 11px; font-size: 0.95rem; font-weight: 700;
  color: var(--navy); text-decoration: none; line-height: 1.5;
}
.side-name:hover { color: var(--accent); }
.side-note {
  margin-top: 9px; font-size: 0.78rem; color: var(--text-mid); line-height: 1.9;
}
.side-note strong { color: var(--navy); }
.side-box .cmp-go {
  display: block; margin-top: 12px; text-align: center; padding: 11px;
}
.side-fine {
  margin-top: 9px; font-size: 0.7rem; color: var(--text-light); line-height: 1.8;
}
.side-fine a { color: var(--accent); }
.side-rank, .side-list { margin-top: 11px; }
.side-rank { padding-left: 1.25em; }
.side-list { list-style: none; }
.side-rank li, .side-list li {
  margin-top: 9px; font-size: 0.8rem; line-height: 1.7;
}
.side-rank li::marker { color: var(--accent); font-weight: 700; }
.side-list li { padding-left: 14px; position: relative; }
.side-list li::before {
  content: ''; position: absolute; left: 0; top: 0.62em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
}
.side-rank a, .side-list a { color: var(--text-dark); text-decoration: none; }
.side-rank a:hover, .side-list a:hover {
  color: var(--accent); text-decoration: underline;
}
.side-cats { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 7px; }
.side-cats .cat {
  font-size: 0.7rem; font-weight: 700; padding: 4px 11px; border-radius: 999px;
  text-decoration: none;
}
@media (max-width: 900px) {
  .post-wrap { grid-template-columns: 1fr; gap: 26px; }
  .post-side { position: static; }
}

/* ------------------------------------------------------------ 目的別のカード
   「何を優先するか」でおすすめが変わることを、面で見せる。
   中身（どこを推すか）は build_hikaku がデータから選ぶ */
.pick-grid {
  margin-top: 18px; display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
}
.pick {
  background: var(--bg-white); border: 1px solid var(--border-light);
  border-radius: 14px; padding: 20px; display: flex; flex-direction: column;
}
.pick-head { display: flex; align-items: center; gap: 9px; }
.pick-ico { font-size: 1.24rem; line-height: 1; }
.pick-for {
  font-size: 0.76rem; font-weight: 700; color: var(--accent); line-height: 1.5;
}
.pick-name {
  margin-top: 10px; font-size: 1.04rem; font-weight: 700;
  color: var(--navy); text-decoration: none; line-height: 1.5;
}
.pick-name:hover { color: var(--accent); text-decoration: underline; }
.pick-why {
  margin-top: 9px; font-size: 0.79rem; color: var(--text-mid); line-height: 1.9;
  flex: 1 1 auto;
}
.pick-num {
  margin: 14px 0 12px;
  font-family: 'Bebas Neue', 'Noto Sans JP', sans-serif;
  font-size: 1.18rem; color: var(--navy); letter-spacing: 0.01em;
}
.pick .cmp-go { display: block; text-align: center; padding: 11px; }

/* 広告であることの表示。**明るい面の上に置く**ので、
   .ad-badge（暗い面用・薄い青文字）とは色を変える */
.pr-badge {
  display: inline-block;
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.14em;
  color: var(--accent); background: var(--accent-dim);
  padding: 3px 10px; border-radius: 4px;
}

@media (max-width: 860px) {
  .cmp, .cmp tbody, .cmp tr, .cmp td { display: block; width: 100%; }
  .cmp thead { display: none; }
  .cmp tr {
    margin-bottom: 12px; padding: 14px 16px;
    background: var(--bg-white); border: 1px solid var(--border-light);
    border-radius: 12px;
  }
  .cmp tr.is-top { border-color: var(--accent-border); box-shadow: var(--shadow); }
  .cmp tr.is-top td { background: transparent; }
  .cmp td {
    padding: 7px 0; border-bottom: 1px dashed var(--border-light);
    display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  }
  .cmp td:last-child { border-bottom: none; padding-top: 12px; }
  /* 見出しは data-l から出す。空のものは行ごと詰める */
  .cmp td::before {
    content: attr(data-l);
    flex: 0 0 auto; font-size: 0.72rem; font-weight: 700; color: var(--text-mid);
  }
  .cmp td > * { text-align: right; }
  /* 順位と社名は横並びにせず、カードの頭として大きく見せる */
  .cmp td[data-l="順位"] { border-bottom: none; padding-bottom: 0; }
  .cmp td[data-l="順位"]::before { display: none; }
  .cmp td[data-l="相談所"] { display: block; border-bottom: none; }
  .cmp td[data-l="相談所"]::before { display: none; }
  .cmp td[data-l="相談所"] > * { text-align: left; }
  .cmp td[data-l="相談所"] .cmp-name { font-size: 1.02rem; margin-top: 4px; }
  .cmp td[data-l=""]::before { display: none; }
  .cmp td[data-l=""] { justify-content: stretch; }
  .cmp-go { display: block; text-align: center; padding: 12px; font-size: 0.84rem; }
  .cmp-how { display: inline; margin-left: 6px; }
  /* **1枚のカードを縦に伸ばさない。**　🔴
     22社ぶんを1項目1行で積むと、1枚437pxになって延々スクロールになる。
     金額まわり以外は2つずつ横に並べて、カードの丈を詰める */
  .cmp td[data-l="相談"], .cmp td[data-l="返金保証"],
  .cmp td[data-l="掲載社数"] {
    display: inline-flex; width: 50%; border-bottom: none;
    padding: 4px 0; font-size: 0.78rem; gap: 8px;
  }
  /* 左側に来るほうに余白を入れる。入れないと、左の値と右の見出しが
     くっついて「オンライン返金保証」と1語に見える（見えた） */
  .cmp td[data-l="相談"], .cmp td[data-l="掲載社数"] { padding-right: 14px; }
  /* 料金ページの比較表も同じ扱い。1枚のカードを縦に伸ばさない */
  .cmp td[data-l="入会金"], .cmp td[data-l="月会費"],
  .cmp td[data-l="成婚料"], .cmp td[data-l="対応エリア"] {
    display: inline-flex; width: 50%; border-bottom: none;
    padding: 4px 0; font-size: 0.78rem; gap: 8px;
  }
  .cmp td[data-l="入会金"], .cmp td[data-l="成婚料"] { padding-right: 14px; }
  .cmp td[data-l="診察料"], .cmp td[data-l="送料"] { padding: 6px 0; }
}

/* ------------------------------------------------------------ 相談所の一覧 */
.clinic-list { margin-top: 18px; display: grid; gap: 14px; }
.clinic-item {
  background: var(--bg-white); border: 1px solid var(--border-light);
  border-radius: 14px; padding: 20px 22px;
  display: grid; gap: 14px;
  grid-template-columns: 1fr 232px; align-items: start;
  transition: background-color .2s, border-color .2s, box-shadow .2s;
}
/* カード全体に反応を付ける。ボタンだけが反応する状態だと、
   カードのどこを触ればよいのか分からない。
   色は薄く、影も浅くする。強くすると順位が高いカードのように見えてしまう。 */
.clinic-item:hover {
  background: var(--bg-light);
  border-color: var(--accent-border);
  box-shadow: var(--shadow);
}
/* 全国から受けられる側。枠の色で少しだけ持ち上げる */
.clinic-item.is-online { border-color: var(--accent-border); background: #fbfdff; }
.clinic-item.is-online:hover { background: #f3f9ff; }
/* 触ってもよい場所だと分かるように、カードの上ではカーソルを変える。
   ただしカード全体をリンクにはしない。中にボタンが2つあり、
   どこを押したかで行き先が変わるので、包むと押し分けられなくなる */
.clinic-item:hover .name a { color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .clinic-item { transition: none; } }
/* バッジは社名の上の行。同じ行に並べると、名前の長い社ほど
   バッジが押し出されて折り返し、どこまでが名前なのか読めなくなる */
.clinic-item .head { display: block; }
.clinic-item .head .badges { display: flex; margin-bottom: 5px; }
.clinic-item .name {
  display: block;
  font-size: 1.02rem; font-weight: 700; color: var(--navy); line-height: 1.45;
}
.clinic-item .name a { color: inherit; text-decoration: none; }
.clinic-item .name a:hover { color: var(--accent); text-decoration: underline; }
.badge-online {
  font-size: 0.64rem; font-weight: 700; letter-spacing: 0.06em;
  color: var(--accent); background: var(--accent-dim);
  padding: 3px 9px; border-radius: 999px; white-space: nowrap;
}

/* 業態と扱っている治療のバッジ。多くて3つ。
   色は種類の区別だけが目的で、良し悪しの序列は付けない */
.badges { display: inline-flex; flex-wrap: wrap; gap: 5px; vertical-align: 2px; }
.bdg {
  font-size: 0.64rem; font-weight: 700; letter-spacing: 0.06em; font-style: normal;
  padding: 3px 9px; border-radius: 999px; white-space: nowrap;
  border: 1px solid transparent;
}
.bdg-kind { color: var(--navy); background: rgba(74,16,35,0.07); }
.bdg-online { color: var(--accent); background: var(--accent-dim); }
.bdg-transplant { color: #7a4a00; background: #fdf1dc; }
.bdg-female { color: #8a3b63; background: #fbeaf1; }
/* 幅が足りないときは折り返す。バッジが社名と同じ行にあったころは
   3つ目を隠していたが、いまは自分の行を持っているので隠す必要がない */
.clinic-item .access {
  margin-top: 8px; font-size: 0.79rem; color: var(--text-mid); line-height: 1.8;
}
.clinic-item .access b { color: var(--text-dark); font-weight: 700; }
.clinic-item .tags { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.clinic-item .tags span {
  font-size: 0.7rem; color: var(--text-mid);
  border: 1px solid var(--border-light); border-radius: 999px; padding: 2px 9px;
}
/* 右側の料金と導線 */
.clinic-item .buy {
  border-left: 1px solid var(--border-light); padding-left: 20px;
  display: grid; gap: 10px;
}
.clinic-item .price-k { font-size: 0.7rem; color: var(--text-light); }
.clinic-item .price-v {
  display: flex; align-items: baseline; gap: 3px;
  font-family: 'Bebas Neue', 'Noto Sans JP', sans-serif;
  font-size: 1.72rem; color: var(--accent); line-height: 1;
}
.clinic-item .price-v .yen { font-size: 1rem; }
.clinic-item .price-v .per {
  font-family: 'Noto Sans JP', sans-serif; font-size: 0.68rem;
  color: var(--text-light); font-weight: 500;
}
/* 金額に付く条件（クーポン適用・12ヶ月定期 など）。
   **条件は金額のすぐ下。**書かずに金額だけ出すと数字が独り歩きする */
.clinic-item .price-c {
  margin-top: 4px; font-size: 0.64rem; color: var(--text-light);
  line-height: 1.5;
}
.btn-go {
  display: block; text-align: center; text-decoration: none;
  background: var(--accent); color: #fff; border-radius: 9px;
  padding: 11px 10px; font-size: 0.82rem; font-weight: 700;
  transition: background .25s;
}
.btn-go:hover { background: var(--navy); }
.btn-sub {
  display: block; text-align: center; text-decoration: none;
  border: 1px solid var(--border-light); border-radius: 9px;
  padding: 9px 10px; font-size: 0.76rem; color: var(--text-mid);
  transition: border-color .25s, color .25s;
}
.btn-sub:hover { border-color: var(--accent); color: var(--accent); }

/* ------------------------------------------------------------ 項目表 */
.facts-wrap { border: 1px solid var(--border-light); border-radius: 12px; overflow: hidden; }
.facts { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.facts th, .facts td {
  padding: 12px 16px; text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--border-light);
}
.facts th {
  width: 168px; white-space: nowrap; font-weight: 700;
  color: var(--text-mid); background: var(--bg-light); font-size: 0.78rem;
}
.facts tr:last-child th, .facts tr:last-child td { border-bottom: none; }
.facts td b { color: var(--accent); font-weight: 700; }
.block > .facts-wrap { margin-top: 18px; }
/* 表の中にリンクの帯を入れるときは、上の余白を殺す */
.facts .linkrow { margin-top: 0; }
.facts .linkrow a { font-size: 0.78rem; padding: 5px 12px; }

/* ------------------------------------------------------------ リンクの帯 */
.linkrow { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.linkrow a, .linkrow span {
  font-size: 0.79rem; text-decoration: none;
  border: 1px solid var(--border-light); border-radius: 999px;
  padding: 6px 14px; background: var(--bg-white); color: var(--text-dark);
  display: inline-flex; align-items: baseline; gap: 4px;
  transition: border-color .22s, color .22s;
}
.linkrow a:hover { border-color: var(--accent); color: var(--accent); }
.linkrow b { font-family: 'Bebas Neue', sans-serif; font-weight: 400; color: var(--accent); }
/* 掲載が無くリンクにできないものは、素のタグで出す */
.linkrow span { color: var(--text-light); }
/* リンクの中に置く小さな補足（別の市区町村の社に、その市区町村名を添える）。
   上の .linkrow span がタグの見た目を付けてしまうので、ここで打ち消す。 */
.linkrow a .sub {
  border: 0; padding: 0; background: none;
  font-size: 0.72rem; color: var(--text-light);
  margin-left: -3px;   /* 全角括弧の左の余白のぶんを詰める */
}
.linkrow a:hover .sub { color: inherit; }

/* ------------------------------------------------------- キャンペーン情報 */
/* やっていない社でも節ごと消さないので、「特になし」の見た目も決めておく */
.camp { margin-top: 16px; display: grid; gap: 8px; list-style: none; }
.camp li {
  position: relative; padding: 13px 16px 13px 40px;
  border: 1px solid var(--border-light); border-radius: 10px;
  background: var(--bg-white); font-size: 0.88rem; line-height: 1.7;
}
.camp li::before {
  content: ""; position: absolute; left: 16px; top: 50%;
  width: 8px; height: 8px; margin-top: -4px; border-radius: 50%;
  background: var(--accent);
}
/* 割引率のバッジ。**本文に「通常◯円→◯円」を書いたうえで付ける。**
   割合だけを大きく出すと、何と比べたのか分からない表示になる */
.camp-off {
  display: inline-block; margin-right: 8px; padding: 2px 9px;
  border-radius: 999px; background: var(--accent); color: #fff;
  font-size: 0.78rem; font-weight: 700; letter-spacing: .02em;
  vertical-align: 1px; white-space: nowrap;
}

/* 料金表の但し書き。金額だけでは意味を取り違える行に添える
   （「月額11,400円」が実は6ヶ月コースの60回払いの額、など）。
   **金額より小さく、しかし読める大きさで。**見落とすと誤解のもとになる */
.fee-cap {
  display: block; margin-top: 4px; font-size: 0.78rem;
  color: var(--text-mid); line-height: 1.7; font-weight: 400;
}

/* 料金表の折りたたみ。行数が多い社で、はじめは8件だけ見せる。
   **JSが動かなくても全部読めるように**、既定は開いた状態にしておき、
   site.js が読み込まれたときだけ閉じる（.js-fold が付く） */
.js-fold tr.fold { display: none; }
tr.fold-more td { padding: 0; border: 0; background: none; }
.fold-btn {
  width: 100%; padding: 13px 10px; border: 0; border-radius: 0 0 10px 10px;
  background: var(--bg-soft, #f4f6f9); color: var(--accent);
  font: inherit; font-size: 0.86rem; font-weight: 700; cursor: pointer;
}
.fold-btn:hover { background: var(--border-light); }
/* 開いているときは「閉じる」だと分かるように、印を上向きにして色を落とす */
.fold-btn::after { content: " ▼"; font-size: 0.72em; }
.js-open .fold-btn { color: var(--text-mid); }
.js-open .fold-btn::after { content: " ▲"; }
.fold-more { display: none; }
.js-fold tr.fold-more { display: table-row; }

.camp-none {
  margin-top: 16px; padding: 15px 18px;
  border: 1px dashed var(--border-light); border-radius: 10px;
  color: var(--text-light); font-size: 0.88rem;
}

/* ------------------------------------------------------------ よくある質問 */
.faq { margin-top: 18px; display: grid; gap: 10px; }
.faq details {
  border: 1px solid var(--border-light); border-radius: 12px;
  background: var(--bg-white); overflow: hidden;
}
.faq summary {
  cursor: pointer; list-style: none; padding: 15px 46px 15px 18px;
  font-size: 0.88rem; font-weight: 700; color: var(--navy);
  position: relative; line-height: 1.6;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 20px; top: 50%;
  width: 9px; height: 9px; margin-top: -6px;
  border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(45deg); transition: transform .25s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq .a { padding: 0 18px 16px; font-size: 0.83rem; color: var(--text-mid); line-height: 1.95; }

/* ------------------------------------------------------------ 下部の広告帯
   全ページ共通で最下部に置く。 */
.ad-band { background: var(--bg-gray); padding: 40px var(--gutter); margin-top: 52px; }
.ad-band .inner { max-width: 940px; margin: 0 auto; }
.ad-card {
  background: linear-gradient(135deg, #f08cb4, #ec79a7 62%, #e7699b);
  border-radius: 16px; padding: 30px 32px; color: #fff;
  display: grid; gap: 20px; grid-template-columns: 1fr auto; align-items: center;
}
/* PR表記。掲出はするが主張はさせない。塗りは入れず枠線だけにする */
.ad-badge {
  display: inline-block;
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.14em;
  color: #ffe9f1; background: none;
  border: 1px solid rgba(255,255,255,0.45);
  padding: 3px 10px; border-radius: 4px;
}
.ad-card h2 { margin-top: 9px; font-size: 1.28rem; font-weight: 900; line-height: 1.5; }
.ad-card p { margin-top: 10px; font-size: 0.82rem; color: #ffe9f1; line-height: 1.9; }
.ad-card .price {
  display: flex; align-items: baseline; gap: 4px; margin-top: 14px;
  font-family: 'Bebas Neue', 'Noto Sans JP', sans-serif;
  font-size: 2.3rem; color: #ffffff; line-height: 1;
}
.ad-card .price .yen { font-size: 1.2rem; }
.ad-card .price .per {
  font-family: 'Noto Sans JP', sans-serif; font-size: 0.72rem;
  color: #ffffff; font-weight: 500;
}
.ad-card .btn-go { padding: 15px 34px; font-size: 0.9rem; white-space: nowrap; }
.ad-card .btn-go:hover { background: #fff; color: var(--navy); }
.ad-note { margin-top: 14px; font-size: 0.71rem; color: var(--text-mid); line-height: 1.8; }

@media (max-width: 860px) {
  .clinic-item { grid-template-columns: 1fr; }
  .clinic-item .buy {
    border-left: none; border-top: 1px solid var(--border-light);
    padding-left: 0; padding-top: 14px;
  }
  .ad-card { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .page-head { padding: 24px var(--gutter) 0; }
  .facts th { width: 108px; font-size: 0.73rem; padding: 10px 12px; }
  .facts td { padding: 10px 12px; }
  .ad-band { padding: 30px var(--gutter); }
  .ad-card { padding: 24px 20px; }
}

/* ------------------------------------------------- 相談所名で探す */
/* 版面は「エリアから探す」と同じ .finder-body / .fld を使う。
   こちらは検索ボタンが無いので、3列に割る（あちらは 1fr 1fr 1fr auto）。 */
.finder-body--name { grid-template-columns: 1.4fr 1fr 1.2fr; }
/* .fld の中の入力欄。select と同じ見た目に揃える */
.fld input[type="search"] {
  width: 100%; font-family: inherit; font-size: 0.88rem; color: var(--text-dark);
  background: var(--bg-white); border: 1px solid var(--border-light);
  border-radius: 9px; padding: 12px 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none; appearance: none;
}
.fld input[type="search"]:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.finder-hint { font-size: 0.75rem; color: var(--text-light); margin: 0; }

.q-results {
  /* .finder の中に入るので、左右の余白はカードに合わせる */
  margin: 0 22px 20px; list-style: none;
  display: grid; gap: 8px;
  /* 全件出すので、ここだけ縦にスクロールさせる。
     130件でも画面を埋めない */
  max-height: 460px; overflow-y: auto;
  /* **scrollbar-gutter: stable を付けない。**
     付けると結果が1件でもスクロールバー1本ぶんの余白が右に残り、
     すぐ上のプルダウンより結果カードが狭くなる（狭くなっていた）。
     スクロールバーは細くしておく。出たときのズレを16pxから6pxに減らす */
  scrollbar-width: thin;
}
.q-results::-webkit-scrollbar { width: 6px; }
.q-results::-webkit-scrollbar-thumb {
  background: var(--border-light); border-radius: 999px;
}
.q-results li a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 14px;
  padding: 12px 16px; text-decoration: none;
  border: 1px solid var(--border-light); border-radius: 10px;
  background: var(--bg-white);
  transition: background-color .2s, border-color .2s;
}
.q-results li a:hover { background: var(--bg-light); border-color: var(--accent-border); }
.q-name  { font-size: 0.9rem; font-weight: 700; color: var(--navy); }
.q-where { font-size: 0.76rem; color: var(--text-light); white-space: nowrap; }

/* 検索窓はJSなのでクローラが辿れない。チェーンへのリンクを別に置く。

   **各行を右端まで埋める。**チェーン名の長さがばらばらなので、
   ただ並べると行ごとに右端の余りがちがい、外側の枠とも揃わない。
   flex-grow で行の余りを分け合わせて、どの行も右端で切り揃える。 */
.chain-nav { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 7px; }
.chain-nav a {
  flex: 1 1 auto;
  display: inline-flex; align-items: baseline; justify-content: center; gap: 5px;
  /* コラムのカテゴリは「すべて」を入れて13個。**1行に収める。**
     左右を15px→11pxに詰めて、13個ぶんの幅を作っている。
     カテゴリを増やすときは、ここが2行に折れていないか見ること */
  padding: 8px 11px; text-decoration: none;
  border: 1px solid var(--border-light); border-radius: 999px;
  background: var(--bg-white); color: var(--text-dark); font-size: 0.78rem;
  white-space: nowrap;
  transition: border-color .2s, color .2s;
}
/* **最後の行だけは伸ばさない。**2つしか残っていない行を右端まで
   引き伸ばすと、そこだけ極端に大きいチップが並ぶ。
   余りを丸ごと引き受ける見えない要素を末尾に1つ置いて防ぐ
   （JSが入れる。伸び率を桁違いに大きくしてあるので、
   最後の行の余白はほぼこれが吸う） */
.chain-fill { flex: 9999 1 auto; }
.chain-nav a:hover { border-color: var(--accent); color: var(--accent); }
.chain-nav b { font-family: 'Bebas Neue', sans-serif; font-weight: 400; color: var(--accent); }

@media (max-width: 900px) {
  .finder-body--name { grid-template-columns: 1fr 1fr; }
  .finder-body--name .fld:first-child { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .finder-body--name { grid-template-columns: 1fr; }
  .q-results li a { flex-direction: column; gap: 4px; }
  .q-where { white-space: normal; }
}

/* ------------------------------------------------------------ お問い合わせフォーム
   受け口は /contact/send.php。**宛先はPHPの中だけ。**
   本文にメールアドレスを出すと収集され、迷惑メールが届くようになる。 */
.cform { margin-top: 20px; }
.cform-row { margin-bottom: 18px; }
.cform-row label {
  display: block; font-size: 0.83rem; font-weight: 700;
  color: var(--text-dark); margin-bottom: 7px;
}
.req-mark { color: #c0392b; font-weight: 700; }
.cform input, .cform select, .cform textarea {
  width: 100%; box-sizing: border-box;
  font-family: inherit; font-size: 0.92rem; color: var(--text-dark);
  background: var(--bg-white);
  border: 1px solid var(--border-light); border-radius: 8px;
  padding: 12px 14px; transition: border-color 0.2s, box-shadow 0.2s;
}
.cform textarea { line-height: 1.8; resize: vertical; min-height: 160px; }
.cform input:focus, .cform select:focus, .cform textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.cform ::placeholder { color: var(--text-light); }

/* わなの欄。**display:none にしない。** 🔴
   none だと見えないことを機械に気づかれる。画面の外へ出す */
.cform-trap {
  position: absolute; left: -9999px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
}

.cform-send { margin-top: 24px; }
.cform button[type="submit"] {
  border: none; cursor: pointer; font-family: inherit;
  font-size: 0.95rem; padding: 15px 34px;
}
.cform-note {
  font-size: 0.76rem; color: var(--text-mid);
  line-height: 1.8; margin-top: 12px;
}
@media (max-width: 640px) {
  .cform button[type="submit"] { width: 100%; }
}

/* ------------------------------------------------------------ 2枠ぶんのカード
   力を入れた記事だけ横に2つぶん使う。一覧の単調さを崩し、
   どれを読んでほしいかを形で伝える。**選ぶのは人**（data/column_featured.json）。 */
.post-card.is-wide { grid-column: span 2; }
.post-card.is-wide .ttl { font-size: 1.12rem; line-height: 1.6; }
.post-card.is-wide .lead {
  /* 幅が2倍あるぶん、抜粋を1つ足せる。
     幅だけ広げて中身が同じだと、間延びして見える */
  font-size: 0.81rem; color: var(--text-mid); line-height: 1.85;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3;
  overflow: hidden;
}
.post-card.is-wide::before { height: 4px; }

/* 1列にしかならない幅では span 2 を外す。 🔴
   **外さないと、grid が列を1つ増やして横スクロールが出る。**
   258px×2＋間隔16px＝532px が2列になる下限 */
@media (max-width: 567px) {
  .post-card.is-wide { grid-column: auto; }
  .post-card.is-wide .ttl { font-size: 0.96rem; line-height: 1.68; }
}

/* ------------------------------------------------------------ 相談所のロゴ
   元の画像は加工しない。**色も余白も公式のまま。** 🔴
   縦横の比は会社ごとにバラバラなので、枠に contain で収めて位置だけ揃える。
   画像を切ったり塗り替えたりすると、商標の使い方として問題になりうる。

   背景色を指定している会社（data/logo_override.json の bg）は、
   枠の色を画像の背景と同じにする。合わせないと白い枠の中に濃い四角が浮いて、
   文字が枠線ぎりぎりに詰まって見える。 */
.lg {
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-white); border: 1px solid var(--border-light);
  border-radius: 8px; padding: 6px 10px; flex: none; overflow: hidden;
}
.lg img {
  max-width: 100%; max-height: 100%; width: auto; height: auto;
  object-fit: contain; display: block;
}
/* 一覧のカード（社名の左） */
.lg-card { width: 128px; height: 50px; }
/* 比較表の中（社名の上） */
.lg-row { width: 104px; height: 34px; }

/* カードは「ロゴ ＋ 本文 ＋ 料金」の3列。**ロゴの列は固定幅。**
   ロゴが取れていない会社は枠ごと出していないので列が1つ減る。
   **has-logo が付いた行だけ3列にする。** 🔴
   一律に3列にすると、ロゴの無い社だけ料金の枠が1列目に落ちて崩れる */
.clinic-item.has-logo { grid-template-columns: 128px 1fr 232px; }

@media (max-width: 860px) {
  /* 狭い画面ではロゴを小さくし、本文の幅を優先する。
     ロゴと本文は横に並べたまま、料金の枠だけ下の行へ回す */
  .lg-card { width: 96px; height: 38px; }
  .clinic-item.has-logo { grid-template-columns: 96px 1fr; }
  /* **行いっぱいに広げる。** 🔴 指定しないと料金の枠が
     2行目の1列目（96px）に入り、ボタンごと潰れる（潰れた） */
  .clinic-item.has-logo .buy { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  /* ここまで狭いと3つを横に並べきれない。1列に積む */
  .clinic-item.has-logo { grid-template-columns: 1fr; }
  .lg-card { width: 112px; height: 42px; }
}

/* 折り返さない前提の並び（コラムのカテゴリ13個）。
   余りを吸わせる .chain-fill を置かず、チップを版面いっぱいに伸ばす。
   **2行に折れると最後の行だけ極端に伸びる。**
   カテゴリを増やすときは1行に収まっているか見ること */
.chain-nav--fill a { flex: 1 1 auto; }

/* ロゴはカードの上下中央。
   .clinic-item は align-items:start なので、指定しないと上に張り付く。
   バッジ・社名・アクセス・タグと縦に長い本文の横で、
   ロゴだけ上端に寄っていると視線が揃わない */
.clinic-item .lg { align-self: center; }

/* 比較表の相談所欄。ロゴと社名を横に、プラン名はその下に回す。
   **列は増やさない。**増やすと表全体が横に伸びて、狭い画面での折り返しが増える。
   相談所欄は408px（本表）あるので、いちばん長い社名を置いても収まる */
.cmp-clinic { display: flex; align-items: center; gap: 11px; }
.cmp-clinic .lg { margin-bottom: 0; }
.cmp-clinic .cmp-name { min-width: 0; }
.cmp-plan { margin-top: 5px; }

/* ------------------------------------------------------------ 相談所ページ
   AGA には無かった部品だけをここに足す。既存のクラスには触らない。 */

/* 特徴タグ。連盟が公表している項目を、意味のまとまりごとに横に並べる。
   **群の並び順は build_konkatsu.py 側で固定している。**
   データの入っている順に出すと、相談所ごとに同じ項目が別の位置に来る */
.ftags { display: grid; gap: 12px; }
.ftag-row {
  display: grid; grid-template-columns: 104px 1fr; gap: 14px; align-items: start;
  padding: 12px 0; border-bottom: 1px solid var(--border-light);
}
.ftag-row:last-child { border-bottom: none; }
.ftag-k {
  font-size: 0.74rem; font-weight: 700; color: var(--text-mid);
  letter-spacing: 0.04em; padding-top: 3px;
}
.ftag-row .tags { display: flex; flex-wrap: wrap; gap: 7px; }
.ftag-row .tags span {
  font-size: 0.76rem; color: var(--accent); background: var(--accent-dim);
  border: 1px solid var(--accent-border); border-radius: 999px; padding: 3px 11px;
}

/* 表の中の補足。金額の内訳や「詳しくは公式サイトで」を、値の後ろに小さく添える。
   改行させないと、金額と内訳が1行に並んで読みにくい */
.facts td .sub {
  display: block; margin-top: 1px; line-height: 1.4;
  font-size: 0.74rem; color: var(--text-light); font-weight: 400;
}
.facts td b { font-size: 1.02rem; line-height: 1.3; }

@media (max-width: 680px) {
  .ftag-row { grid-template-columns: 1fr; gap: 7px; }
  .ftag-k { padding-top: 0; }
}

/* ------------------------------------------------------------ 写真ヒーロー
   トップの背景を写真にしたので、右のドット地図は外す。
   写真の上に地図を重ねると、被写体と点が混ざって両方読めない。 */
.hero .hero-visual { display: none; }
.hero .hero-inner { grid-template-columns: 1fr; }
.hero .hero-copy  { max-width: 720px; }
/* 写真の上なので、文字に薄い影を敷いて輪郭を保つ */
.hero h1, .hero .hero-lead, .hero .hero-eye { text-shadow: 0 2px 18px rgba(0,0,0,0.42); }

/* 回線の細い環境に2000px級を落とさせない */
@media (max-width: 820px) {
  .hero { background-image:
    linear-gradient(180deg, rgba(23,18,26,0.66) 0%, rgba(23,18,26,0.80) 55%, rgba(23,18,26,0.90) 100%),
    linear-gradient(90deg, rgba(23,18,26,0.62) 0%, rgba(23,18,26,0.34) 60%, rgba(23,18,26,0.20) 100%),
    url("/assets/img/hero-sm.jpg"); }
}

/* ------------------------------------------------------------ 表の詰め
   セルの中身が上寄りになっていた。金額と内訳で高さが変わる行があるので、
   上下は中央で揃える */
.facts th, .facts td { vertical-align: middle; }

.facts td.plan-note {
  font-size: 0.78rem; color: var(--text-mid); line-height: 1.85; font-weight: 400;
}

@media (max-width: 680px) {
}

/* 0円の項目は「無料」と出して目立たせる。相談所が売りにしている所なので、
   金額として 0円 と並べると他の金額に埋もれる */


/* 「この相談所の特徴」は見出しの直後にタグが来る。
   他のブロックは <p class="note"> が間に入って余白を作っているが、
   ここは注記を外したので、見出しと1行目がくっつく（くっついた） */
.block > .ftags { margin-top: 22px; }

/* 料金プランのカード内。
   プラン名の帯と費用名の列が同じピンクだと、どちらが見出しか読み取れない。
   **費用名の列は薄いグレーに落として、ピンクは見出しだけにする。** */

/* 0円の項目。「無料（0円）」を1行で出す。
   「無料」だけ大きくして「0円」を下の行に置くと、その行だけ背が高くなり
   表の行間がそろわない（そろわなかった）。文字の大きさは他の値に合わせる */
.facts td .free { color: var(--accent); font-weight: 700; }

/* ------------------------------------------------------------ 料金プラン
   プラン名はテーブルの外に出して h3 にする。
   **テーブルの中に「プラン名の列」や「色の帯」を置かない。**
   色つきの帯のすぐ下に、同じく色のついた見出し列（th）が続くと、
   色面が2つ重なって濁る（濁った）。プラン名を見出しに上げれば、
   表は他の節（基本情報・営業時間）とまったく同じ見た目で済む。

   h2 は「下線＋左端62pxのアクセント」。h3 はその小型版として
   左の縦バーで受ける。字の大きさで h2 > h3 の関係も保つ。 */
.plan-blocks { margin-top: 20px; }
.plan-block + .plan-block { margin-top: 30px; }
.plan-block > h3 {
  font-size: 1rem; font-weight: 700; color: var(--navy); line-height: 1.6;
  padding-left: 13px; border-left: 3px solid var(--accent);
}
.plan-block > .facts-wrap { margin-top: 12px; }
.facts td.plan-note {
  font-size: 0.78rem; color: var(--text-mid); line-height: 1.85; font-weight: 400;
}
/* 0円の項目。「無料（0円）」を1行で出す。文字の大きさは他の値に合わせる */
.facts td .free { color: var(--accent); font-weight: 700; }

@media (max-width: 680px) {
  .plan-block > h3 { font-size: 0.92rem; padding-left: 10px; }
  .plan-block + .plan-block { margin-top: 24px; }
}

/* 相場の比較は h3 の下に注記が1行入る。料金プランには注記が無いので、
   そこだけ表との間隔を詰める（プランの h3 直後は facts-wrap が来る） */
.plan-block > .note { margin-top: 9px; }
.plan-block > .note + .facts-wrap { margin-top: 10px; }

/* 一覧の並び替え。初期表示は「おすすめ順」で、押すと同じページの中で並び替わる。
   ボタンは横に流し、入りきらない幅では折り返す（狭い画面で横スクロールを作らない） */
.list-sort {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: 14px 0 0;
}
.list-sort .k {
  font-size: 0.78rem; color: var(--text-light); font-weight: 700;
  letter-spacing: 0.04em; margin-right: 2px;
}
.list-sort button {
  font: inherit; font-size: 0.82rem; line-height: 1;
  padding: 8px 14px; border-radius: 999px; cursor: pointer;
  background: #fff; color: var(--text-mid);
  border: 1px solid var(--border-light);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.list-sort button:hover { border-color: var(--accent); color: var(--accent); }
/* 選ばれている1つだけ塗る。**枠線ではなく塗りで示す。**
   枠線だけだと hover と見分けがつかない */
.list-sort button.on {
  background: var(--accent); border-color: var(--accent);
  color: #fff; font-weight: 700;
}

@media (max-width: 680px) {
  .list-sort { gap: 6px; }
  .list-sort .k { width: 100%; margin-bottom: 2px; }
  .list-sort button { padding: 7px 12px; font-size: 0.78rem; }
}

/* ------------------------------------------------------------ 口コミ
   連盟のページに載っている評価。**点数だけを大きく出さない。**
   評価の中央値は5.0で、ほとんどの相談所が満点に近い。
   数字を強調すると差があるように見えてしまうので、件数と本文を添える */
.review-summary {
  display: flex; align-items: baseline; gap: 16px;
  margin: 14px 0 10px;
}
.review-avg { display: flex; align-items: baseline; gap: 6px; }
.review-avg .k { font-size: 0.78rem; color: var(--text-light); font-weight: 700; }
.review-avg .v {
  font-family: 'Bebas Neue', sans-serif; font-size: 2rem; line-height: 1;
  color: var(--accent);
}
.review-avg .u { font-size: 0.8rem; color: var(--text-light); }
.review-count { font-size: 0.85rem; color: var(--text-mid); }

.review-list { margin-top: 14px; display: grid; gap: 12px; }
.review-item {
  border: 1px solid var(--border-light); border-radius: 8px;
  padding: 14px 16px; background: #fff;
}
.review-head {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  margin-bottom: 6px;
}
.review-score {
  font-weight: 700; color: var(--accent); font-size: 0.95rem;
}
.review-name { font-size: 0.85rem; color: var(--text-dark); font-weight: 700; }
.review-when { font-size: 0.76rem; color: var(--text-light); }
.review-item p {
  margin: 0; font-size: 0.88rem; line-height: 1.85; color: var(--text-mid);
}

@media (max-width: 680px) {
  .review-avg .v { font-size: 1.7rem; }
  .review-item { padding: 12px 13px; }
}

/* ------------------------------------------------------------ 一覧の表
   .facts は「項目名｜値」の表で、見出し列は 168px（スマホ 108px）固定・改行なし。
   相談所を並べる表（オンライン完結型の一覧）に同じ見た目を使うと、
   相談所名と一言が1行に伸びて表が画面からはみ出し、**右の列が見えなくなる**。
   375px で表の幅が 643px になり、6ヶ月総額の列が隠れていた（隠れていた）。
   相談所を並べる表には .facts--list を付けて、見出し列の固定を外す。 */
.facts--list th { width: auto; white-space: normal; font-size: 0.85rem; }
.facts--list th a { font-weight: 700; }
.facts--list th .sub {
  display: block; margin-top: 3px; line-height: 1.5;
  font-size: 0.74rem; color: var(--text-light); font-weight: 400;
}
.facts--list td { white-space: normal; }
/* 折り返さないのは金額そのものだけ。内訳まで1行にすると表が画面からはみ出す
   （375px で表が 404px になり、6ヶ月総額の列が切れていた） */
.facts--list td b { white-space: nowrap; }
@media (max-width: 640px) {
  .facts--list th { width: auto; font-size: 0.8rem; }
  .facts--list td { padding-left: 10px; padding-right: 12px; }
}

/* ------------------------------------------------------------ 長い文字列の折り返し
   URL（https://www.archkekkon.com/ など）は途中で改行できないので、
   表のセルがその長さまで広がる。**320px で基本情報の表が画面からはみ出し、
   右端が切れていた**（見出し列108px＋URL228px＝349px > 282px）。
   途中でも折り返してよい、と指定しておく。 */
.facts th, .facts td, .plan-note { overflow-wrap: anywhere; }
a { overflow-wrap: anywhere; }

