@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;
}

/* ============================================================
   AGAクリニック検索ナビ — デザインシステム

   :root にトークンを置き、面（.light-sec / .white-sec / .gray-sec）と
   見出し（.sec-eye / .sec-title）を組み合わせて各セクションを作る。

   このサイトで意図的にやっていること:
     - 本文のウェブフォントは Noto Sans JP のみ。数字と英字ロゴだけ別書体。
       フォントファイルが増えるほど表示が遅れる。
     - font-weight は読み込んでいる 400 / 500 / 700 / 900 だけを使う。
       読み込んでいない値（800など）を書くとブラウザが字形を合成し、
       本来の書体と違う見た目になる。
     - ヒーローに大きな写真を置かない。主役は検索UI。
     - 順位や優劣を表す装飾は作らない。並び順は料金など客観的な指標に限る。
   ============================================================ */

:root {
  /* 主色。医療系の青。彩度を落として沈ませ、白との対比で清潔感を出す */
  --navy:         #0b2740;
  --accent:       #1668b3;
  --accent-light: #3d8ed6;
  --accent-dim:   rgba(22,104,179,0.08);
  --accent-border:rgba(22,104,179,0.22);

  /* 背景。白を基調に、青をわずかに含ませた明るい面を重ねる */
  --bg-white:     #ffffff;
  --bg-light:     #f5f9fc;
  --bg-gray:      #e9f0f7;

  /* 文字。真っ黒を使わない。青寄りの濃紺にすると青と喧嘩しない */
  --text-dark:    #14243a;
  --text-mid:     #4d6076;
  --text-light:   #8698ab;

  /* ▼ 版面。全セクションでこの2つだけを使う。
     決まりごと：横方向の padding は「外側の要素」に、max-width は「内側の要素」に。
     どちらか一方でも逆にすると、その面だけ左端が 28px ずれる（実際にヘッダがずれていた）。 */
  --wrap:   1180px;
  --gutter: 28px;

  --border-light: #dbe6f0;
  --shadow:       0 2px 16px rgba(11,39,64,0.06);
  --shadow-hover: 0 10px 32px rgba(11,39,64,0.13);

  /* 注意喚起・補足に使う色。多用しない */
  --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;
}
.logo { text-decoration: none; display: block; line-height: 1.15; }
/* サイト名は折り返させない。
   狭い画面で nav に押されると「AGA / クリニック / 検索ナ / ビ」と
   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:
    radial-gradient(1150px 880px at 76% 16%,
      rgba(74,152,220,0.26)  0%,
      rgba(63,134,200,0.15) 30%,
      rgba(52,116,180,0.07) 52%,
      rgba(40,96,155,0.025) 72%,
      rgba(11,39,64,0)      92%),
    linear-gradient(180deg, #0e3050 0%, #0b2740 58%, #082038 100%);
  /* 波をこの中に入れたので、下の 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行の短い見出し。一番長い行が「AGAクリニック」（8文字）なので、
     その行が折れない範囲で最大まで大きくしてある。
     文字列を変えたら、割れないか必ず実機で見ること。 */
  font-size: clamp(2.15rem, 5.6vw, 4.4rem);
  line-height: 1.16; color: #fff;
}
.hero h1 .em {
  /* 見出しの効かせ色。単色より奥行きが出る */
  background: linear-gradient(92deg, #5aa6e8, #9ccdf5);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lead {
  margin-top: 18px; max-width: 520px;
  font-size: 0.92rem; color: #a9c2d8; 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(120,180,240,0.24);
  color: #cfe3f5; 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: #5aa6e8; flex: none;
  box-shadow: 0 0 0 4px rgba(90,166,232,0.22);
}

/* 右のビジュアル＝日本地図（ドットマップ）。
   描画は 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: #2e618d;
}
.jp-dot--on {
  fill: #8ecdf9;
  animation: jpPulse 3.6s ease-in-out infinite;
}
@keyframes jpPulse {
  0%, 100% { opacity: .72; }
  50%      { opacity: 1; }
}
/* 沖縄が別枠であることを示すかぎ括弧 */
.jp-bracket { fill: none; stroke: rgba(120,180,240,.22); stroke-width: 1.4; }

/* ------------------------------------------------------------ 波
   暗い面から明るい面への切り替え。 */
/* 背景色はヒーロー最下部の色に合わせる。--navy のままだと、
   ヒーローが下に向かって暗くなるぶん、継ぎ目に横線が出る。
   曲線の塗り（SVG側の fill）は、下に来る面の色と必ず一致させること。
   いまは下が .white-sec なので #fff。ここがズレると帯がグレーに見える。 */
/* 波はヒーローの内側に置く。背景を持たせないので、
   親のグラデーションがそのまま波の裏まで続き、境目が出ない。
   以前は外に出して #082038 のべた塗りにしていたが、
   ヒーロー下端は放射グラデーションのぶんだけ明るく、そこが横線に見えていた。 */
.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 {
  position: relative; z-index: 1;
  max-width: var(--wrap); margin: 56px auto 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(120,180,240,0.16);
  border-bottom: 1px solid rgba(120,180,240,0.16);
}
.stat-item {
  padding: 22px 14px; text-align: center;
  border-right: 1px solid rgba(120,180,240,0.10);
  transition: background 0.3s;
}
.stat-item:last-child { border-right: none; }
.stat-item:hover { background: rgba(120,180,240,0.045); }
/* 数字は Bebas Neue。縦に長い書体なので、同じ級数でも数字が大きく見える。
   単位（院・記事）は日本語なので Noto に戻す。 */
.stat-number {
  font-family: 'Bebas Neue', 'Noto Sans JP', sans-serif;
  font-size: 2.9rem; font-weight: 400; color: #7fbcf0;
  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: #9cc4e6;
  font-weight: 700; letter-spacing: 0;
}
.stat-label {
  font-size: 0.67rem; color: #6f8ba6;
  letter-spacing: 0.14em; margin-top: 5px;
}

/* ------------------------------------------------------------ 検索の面
   波の下、明るい面の先頭に置く。ヒーローから視線が落ちてくる位置。 */

/* ------------------------------------------------------------ 共通の面 */
.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);
}
/* 掲載0件の県はリンクにしない。空のページに送ってしまうため。 */
.pref-group span { font-size: 0.83rem; color: #b3c2d1; }

/* ------------------------------------------------------------ 条件で絞る
   絞り込みチップは、地域の結果ページ側で使う。
   トップに置くと「まだ何も絞り込んでいない状態で条件だけ並ぶ」ことになり、
   使いどころがない。 */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 9px; }
.tag-cloud .chip { font-size: 0.78rem; padding: 7px 15px; }

/* ------------------------------------------------------------ オンライン診療
   近くに通える医療機関がない人の受け皿。地域で探した直後に置く。 */
.online-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(252px, 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;
}
/* 表は横に溢れる。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);
}

/* ------------------------------------------------------------ コラム
   画像も日付も出さない。そのぶん見出しを主役にして、
   上端の色帯と余白で1枚ずつを立たせる。 */
.post-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
}
.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: linear-gradient(90deg, var(--accent), #7cc0f5);
  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 {
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.1em;
  color: var(--accent); align-self: flex-start;
  background: var(--accent-dim); padding: 4px 10px; border-radius: 999px;
}
.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: #cfdcea; 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: #9fb6cd; 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: #7e98b3; }
.foot-brand p {
  margin-top: 12px; font-size: 0.76rem; color: #8fa8c0; 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.11);
  font-size: 0.71rem; color: #7e98b3;
  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; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2n) { border-right: none; }
  .stat-item:nth-child(-n+2) { border-bottom: 1px solid rgba(120,180,240,0.10); }
}
@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; }
  .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; }

  .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(74,152,220,0.24)  0%,
      rgba(63,134,200,0.13) 32%,
      rgba(52,116,180,0.06) 56%,
      rgba(11,39,64,0)      88%),
    linear-gradient(180deg, #0e3050 0%, #0b2740 62%, #082038 100%);
}

/* ------------------------------------------------------------ パンくず */
.crumb ol {
  max-width: var(--wrap); margin: 0 auto; padding: 13px var(--gutter) 0;
  list-style: none; display: flex; flex-wrap: wrap; align-items: center;
  gap: 6px; font-size: 0.74rem; color: #7e98b3;
}
.crumb a { color: #9cc4e6; text-decoration: none; }
.crumb a:hover { color: #fff; text-decoration: underline; }
.crumb li + li::before { content: "\203a"; margin-right: 6px; color: #55738f; }

/* ------------------------------------------------------------ ページ見出し */
.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: #a9c2d8; 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(120,180,240,0.24); 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: #8fb0cd; }
.meta-chip .v {
  font-family: 'Bebas Neue', 'Noto Sans JP', sans-serif;
  font-size: 1.24rem; color: #8ecdf9; 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: #9cc4e6; 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; }

/* ------------------------------------------------------------ クリニックの一覧 */
.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;
}
/* 全国から受けられる側。枠の色で少しだけ持ち上げる */
.clinic-item.is-online { border-color: var(--accent-border); background: #fbfdff; }
.clinic-item .head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.clinic-item .name {
  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;
}
.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;
}
.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-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, #0e3050, #0b2740 62%, #082038);
  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: #8fb0cd; background: none;
  border: 1px solid rgba(120,180,240,0.34);
  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: #a9c2d8; 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: #8ecdf9; 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: #9cc4e6; 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; }
}
