/* ==========================================================================
   Muratsu Dental テーマ トップページ専用スタイル（2026-09 デザイン刷新版）
   front-page.php でのみ読み込む。base.css の共通トークン・フッター（.tf-footer*）・
   スティッキー予約ボタンを前提とする。
   デザイン参照：design_handoff_top_page 2/README.md（v2・完全刷新版、むらつ歯科TOP v4.dc.html）。
   ========================================================================== */

/* トップページだけ配色・フォントをデザイン仕様の値に切り替える（他ページ・base.cssには影響しない）。
   base.cssの:rootは触らず、このファイル内だけで使う変数として定義する。 */
:root {
  --tf-teal: #0D899C;
  --tf-teal-light: #3DC7C4;
  --tf-bg-1: #EAF4F4;
  --tf-bg-2: #F5FAFA;
  --tf-border-1: #D4E9E9;
  --tf-border-2: #A9D2D1;
  --tf-heading: #123C42;
  --tf-body: #3C5F64;
  --tf-accent-treatment: #FA6E59;
}
/* front-page.cssはmuratsu_is_top_page()がtrueのページにしか読み込まれないため、
   bodyクラスでの絞り込みは不要（このファイル内は常にトップページのみが対象）。 */
body {
  /* 書体は base.css の body(--font-serif)。2026-10-13 同じ指定の重なりを削除 */
  color: var(--tf-body);
  line-height: 2;
}
/* AI問診ウィジェット(.ai-deep、[ai_consultation]ショートコード)の中は除外する。
   除外しないとLP内の予約ボタン(白文字)の文字色がこの濃色で上書きされ、LPの各セクションの
   余白も0になってレイアウトが崩れていた(2026-09-25 ユーザー指摘)。ウィジェット側の見た目は
   プラグインのCSSが持っているため、トップページ用の既定値を持ち込まない。
   :where()で包むのは詳細度を修正前と同じに保つため(a.feat-cta-box等、後ろの同じ詳細度の
   指定が今までどおり勝つように)。 */
.site-content a:where(:not(.ai-deep *)) { color: var(--tf-heading); text-decoration: none; }
.site-content a:where(:not(.ai-deep *)):hover { color: var(--tf-teal); }
.site-content section:where(:not(.ai-deep *)) { padding: 0; }
.section-inner { max-width: 1200px; margin: 0 auto; padding: 0 28px; }

/* ===== 見出し共通（AI相談／検索／もっと詳しく知る／WEB予約セクションで共通） ===== */
/* 英字はHTMLでは小文字まじりで書き、ここで大文字表示にする(別案 top-font-shippori.css では小文字まじりのまま出すため。2026-10-03) */
.sec-eyebrow { font-size: 16px; font-weight: 700; color: var(--tf-teal); letter-spacing: 0.08em; margin-bottom: 8px; text-transform: uppercase; }
.sec-heading { font-size: clamp(22px,3vw,30px); font-weight: 900; color: var(--tf-heading); margin: 0 0 10px; line-height: 1.5; }
.sec-lead { font-size: 16px; margin: 0; }
.sec-head-center { max-width: 920px; margin: 0 auto 40px; text-align: center; }

/* ===== FV初期表示アニメーション（ヘッダー・FVのテキスト・波・次セクションで共通） ===== */
.fv-late { opacity: 0; transform: translateY(28px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
.fv-late-bg { opacity: 0; transition: opacity 1.2s ease; }
html.fv-ready .fv-late { opacity: 1; transform: none; }
html.fv-ready .fv-late-bg { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .fv-late, .fv-late-bg { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ヘッダー（.tf-header*）は全ページ共通のため assets/css/base.css に移した（このファイルではない）。 */

/* ===== FV（ファーストビュー） ===== */
/* FVはヘッダーの高さ分だけ上にずらし、ヘッダーの下に潜り込ませる（2026-09-26 ユーザー指示）。
   ヘッダーは1.5秒後にふわっと表示されるが、それまで透明なのに場所だけ確保されていたため、FVの上が白く空いて見えていた。
   --tf-header-h は front-page.js が実際のヘッダーの高さで上書きする（ここはJSが動く前の目安の値）。 */
:root { --tf-header-h: 83px; }
.fv-section { margin-top: calc(-1 * var(--tf-header-h)); }
.fv-box { position: relative; width: 100%; height: 100vh; min-height: calc(420px + var(--tf-header-h)); overflow: hidden; }
.fv-photo { position: absolute; inset: 0; z-index: 1; clip-path: url(#fv-photo-wave); }
.fv-photo picture, .fv-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* --- FVの写真スライドショー（2026-09-26）。ふわっと表示の完了後、front-page.js が約6秒ごとに次の写真へ切り替える。
   切り替えは「次の写真を上に重ねて1.5秒でふわっと出し、出終わったら前の写真を消す」方式（途中で背景の白が透けない）。
   表示中の写真は、写真ごとに違うズームイン／アウトと上下左右の移動をゆっくり行う（.is-moving の間）。
   移動量は、その時の拡大率ではみ出す余白の範囲内に収めている（端に隙間が出ないように）。 --- */
.fv-slide { position: absolute; inset: 0; opacity: 0; z-index: 0; overflow: hidden; }
.fv-photo .fv-slide { height: auto; } /* 上の .fv-photo picture の height:100% を打ち消し、top〜bottom で大きさを決める */
.fv-slide.is-leaving { opacity: 1; z-index: 1; }
.fv-slide.is-active { opacity: 1; z-index: 2; transition: opacity 1.5s ease; }
/* 2枚目以降はヘッダーが表示された後に出るので、ヘッダーのすぐ下から写真を始める（顔などがヘッダーに隠れないように） */
.fv-slide--later { top: var(--tf-header-h); }
.fv-slide img { transform-origin: center center; }
.fv-slide.is-moving img { animation-duration: 9s; animation-timing-function: linear; animation-fill-mode: both; will-change: transform; }
.fv-slide--kb-a.is-moving img { animation-name: fv-kb-a; }
.fv-slide--kb-b.is-moving img { animation-name: fv-kb-b; }
.fv-slide--kb-c.is-moving img { animation-name: fv-kb-c; }
.fv-slide--kb-d.is-moving img { animation-name: fv-kb-d; }
@keyframes fv-kb-a { from { transform: scale(1.02); } to { transform: scale(1.12) translate(-2.5%, -2%); } }         /* ズームイン＋左上へ */
@keyframes fv-kb-b { from { transform: scale(1.12) translate(2.5%, 0); } to { transform: scale(1.02) translate(0, 0); } } /* ズームアウト＋右から中央へ */
@keyframes fv-kb-c { from { transform: scale(1.1) translate(0, 2.5%); } to { transform: scale(1.12) translate(0, -2.5%); } } /* 下から上へ移動 */
@keyframes fv-kb-d { from { transform: scale(1.12) translate(-2.5%, 2%); } to { transform: scale(1.06) translate(2%, -1.5%); } } /* ズームアウト＋斜めに移動 */
@media (prefers-reduced-motion: reduce) {
  .fv-slide.is-moving img { animation: none; }
  .fv-slide.is-active { transition: none; }
}
.fv-fade { position: absolute; inset: 0; z-index: 3; /* スライドの写真（z-index 0〜2）より手前 */ background: linear-gradient(90deg,#FFFFFF 0%,#FFFFFF 20%,rgba(255,255,255,0.55) 36%,rgba(255,255,255,0) 50%); }
.fv-text { position: relative; z-index: 2; max-width: 1200px; height: 100%; margin: 0 auto; padding: var(--tf-header-h) 28px 0; box-sizing: border-box; display: flex; align-items: center; }
.fv-text-inner { max-width: 560px; }
/* ページの見出し(h1)は「博多駅の歯医者 むらつ歯科クリニック」の小さな1行。大きなキャッチコピー(.fv-heading)は見出し扱いにしない（2026-09-30 ユーザー決定・案1） */
.fv-kicker { margin-bottom: 14px; }
.fv-site-name { font-size: 15px; font-weight: 700; line-height: 1.5; color: var(--tf-heading); letter-spacing: 0.08em; margin: 0 0 6px; }
.fv-eyebrow { font-size: 20px; font-weight: 700; color: var(--tf-teal); letter-spacing: 0.03em; }
.fv-heading { font-size: clamp(38px,5vw,64px); line-height: 1.45; font-weight: 900; color: var(--tf-heading); margin: 0 0 18px; min-height: 1.45em; }
/* キャッチコピーの文章そのもの（検索エンジン・読み上げ用）。画面には #js-fv-typewriter 側が1文字ずつ出す */
.fv-heading-text { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* 見出しの外側に白い光彩（PC・スマホ共通、2026-09-26 ユーザー指示）。写真の上でも輪郭がはっきり見えるように。 */
.fv-heading { text-shadow: 0 0 6px #FFFFFF, 0 0 14px #FFFFFF, 0 0 28px rgba(255,255,255,0.9); }
.fv-lead { font-size: clamp(20px,2vw,24px); font-weight: 700; line-height: 2; color: var(--tf-heading); margin: 0 0 24px; }
.fv-wave { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 20%; z-index: 3; display: block; }

@media (max-width: 767px) {
  .fv-box { height: auto; min-height: 0; max-height: none; display: flex; flex-direction: column; }
  /* スマホ：縦長の写真（fv-hero-sp-2.webp、640×960）を大きく見せ、下部を白いグラデーションで溶かして
     その上に文字を重ねる（2026-09-26 ユーザー指示）。グラデーションはPCと同じく1.5秒後にふわっと表示
     （それまでの見出しは文字の白いぼかしで読めるようにしている）。 */
  :root { --tf-header-h: 135px; }
  /* ヘッダーの下に隠れる分だけ写真を縦に伸ばす（隠れるのは写真上部で、顔・文字の位置は変わらない） */
  .fv-photo { position: relative; inset: auto; height: calc(128vw + var(--tf-header-h)); clip-path: none; order: 1; }
  .fv-photo img { object-position: center top; }
  /* 見出し「歯は、臓器だった。」の中心を画面の縦の中央（50svh）に置き、小見出しはその真上、本文はその下に続ける
     （2026-09-26 ユーザー指示）。ただし縦の短い画面では中央だと文字が顔（あご付近）に重なるため、
     顔より下の位置（59vw + 167px。写真の拡大率は横幅で決まるので横幅から算出）より上には行かせない。
     見出しは1行に収まる大きさに固定し（最大38px）、その高さの半分だけ上にずらして中心を合わせる。 */
  .fv-box { --fv-h1-fs: min(38px, 9.6vw); --fv-h1-center: max(50vh, calc(59vw + 167px)); }
  @supports (height: 1svh) { .fv-box { --fv-h1-center: max(50svh, calc(59vw + 167px)); } }
  .fv-heading { font-size: var(--fv-h1-fs); }
  .fv-text-inner { width: auto; position: relative; }
  .fv-kicker { position: absolute; left: 0; right: 0; bottom: 100%; margin-bottom: 14px; }
  .fv-site-name { font-size: 13px; margin-bottom: 4px; }
  .fv-text { order: 2; height: auto; padding: 0 20px 80px;
    margin-top: calc(var(--fv-h1-center) - 0.725 * var(--fv-h1-fs) - 128vw - var(--tf-header-h)); }
  /* 白いグラデーションも見出しの位置に合わせる。写真が透けて見えるよう控えめにし（2026-09-26「強すぎ」の指摘で調整）、
     白一色になるのは写真の下端（下の白い背景とつなぐため）だけ。読みやすさは文字の周りの白いぼかしで補う。 */
  .fv-fade { background: linear-gradient(180deg,rgba(255,255,255,0) calc(var(--fv-h1-center) - 150px),rgba(255,255,255,0.45) calc(var(--fv-h1-center) - 40px),rgba(255,255,255,0.7) calc(var(--fv-h1-center) + 100px),#FFFFFF 100%); }
  .fv-text-inner { text-shadow: 0 0 8px #FFFFFF, 0 0 18px rgba(255,255,255,0.9); }
}

/* ===== FEATURES（特徴・実績） ===== */
.feat-section { position: relative; background: linear-gradient(180deg,var(--tf-bg-2) 0%,var(--tf-bg-1) 100%); overflow: hidden; }
/* 背景写真2枚（v2で3枚→2枚）：右上・左下のジグザグ配置、各高さ48%。 */
.feat-photo { position: absolute; width: 70%; height: 48%; z-index: 0; overflow: hidden; }
.feat-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.feat-photo-1 { top: 0; right: 0; }
.feat-photo-2 { top: 48.5%; left: 0; }
.feat-fade { position: absolute; inset: 0; }
.feat-fade-1 { background: linear-gradient(90deg,var(--tf-bg-2) 0%,rgba(245,250,250,0.5) 18%,rgba(245,250,250,0) 34%); }
.feat-fade-2 { background: linear-gradient(270deg,#EFF7F7 0%,rgba(239,247,247,0.5) 18%,rgba(239,247,247,0) 34%); }
.feat-head { position: relative; z-index: 1; min-height: 260px; padding: 56px 0 8px; }
.feat-head-inner { max-width: 520px; }
.feat-body { position: relative; z-index: 1; padding: 16px 0 200px; }
.feat-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; margin-bottom: 40px; }
.feat-card {
  border: 1px solid var(--tf-bg-1); box-shadow: 0 4px 20px rgba(18,60,66,0.05); border-radius: 5px;
  padding: 28px 20px 24px; text-align: center; container-type: inline-size; background-color: #FFFFFFE5;
}
.feat-card-icon { width: 56px; height: 56px; object-fit: contain; display: block; margin: 0 auto 14px; }
.feat-card-label { font-size: 16px; white-space: nowrap; font-weight: 700; color: var(--tf-body); margin-bottom: 10px; }
.feat-card-value { font-size: min(40px,17cqi); white-space: nowrap; font-weight: 900; color: var(--tf-heading); line-height: 1.25; margin-bottom: 10px; }
.feat-card-value span { font-size: max(16px,min(18px,8.5cqi)); margin-left: 2px; }
.feat-count { font-weight: inherit; font-variant-numeric: tabular-nums; }
.feat-card-value--sm { font-size: min(32px,16cqi); white-space: nowrap; }
.feat-card-value--sm span { font-size: 18px; margin-right: 4px; margin-left: 0; }
.feat-card-value--md { font-size: min(26px,12cqi); white-space: nowrap; line-height: 1.45; }
.feat-card-value--chair { font-size: min(40px,19cqi); }
.feat-card-value--chair span { font-size: 18px; }
.feat-card-label--wrap { white-space: normal; }
/* 数値が入りきらない幅（4列時の760〜1000px前後・スマホ2列時）でも、文字を縮めすぎずに言葉の区切りで折り返す。
   デザインは1行固定＋文字の自動縮小だったが、それだと幅320pxで8.7pxまで縮み、枠からもはみ出していた
   （README「最小16pxを下回らないこと」に反する）。折り返し位置はspanの前だけ（spanの中は1かたまりで折り返さない）。 */
.feat-card-value, .feat-card-value--sm, .feat-card-value--md { white-space: normal; word-break: keep-all; overflow-wrap: normal; }
.feat-card-value span { display: inline-block; }
.feat-card-value { font-size: max(20px, min(40px,17cqi)); }
.feat-card-value--chair { font-size: max(20px, min(40px,19cqi)); }
.feat-card-value--sm { font-size: max(18px, min(32px,16cqi)); }
.feat-card-value--md { font-size: max(16px, min(26px,12cqi)); }
.feat-card-value--md span { font-size: inherit; margin: 0; }
.feat-desc { font-size: 16px; }
/* 併設技工所への入り口（4枚のカードの下の横長の帯） */
.feat-lab {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px;
  margin: -16px 0 40px; padding: 22px 28px; border: 1px solid var(--tf-bg-1); border-left: 4px solid var(--tf-teal);
  border-radius: 5px; background-color: #FFFFFFE5; box-shadow: 0 4px 20px rgba(18,60,66,0.05);
}
.feat-lab-text { flex: 1 1 360px; min-width: 0; }
.feat-lab-label { font-size: 18px; font-weight: 700; color: var(--tf-heading); margin-bottom: 4px; }
.feat-lab-text p { margin: 0; font-size: 15px; color: var(--tf-body); }
.feat-lab-links { display: flex; flex-wrap: wrap; gap: 10px; }
a.feat-lab-link {
  display: inline-block; padding: 12px 20px; border: 1px solid var(--tf-heading); border-radius: 5px;
  font-size: 15px; font-weight: 700; color: var(--tf-heading); white-space: nowrap; transition: background .2s, color .2s;
}
a.feat-lab-link:hover { background: var(--tf-heading); color: #FFFFFF; }
a.feat-lab-link--main { background: var(--tf-heading); color: #FFFFFF; }
a.feat-lab-link--main:hover { background: var(--tf-teal); border-color: var(--tf-teal); color: #FFFFFF; }
@media (max-width: 767px) {
  .feat-lab { margin-top: -20px; padding: 18px 18px; }
  .feat-lab-links { width: 100%; }
  a.feat-lab-link { flex: 1 1 0; text-align: center; padding: 12px 10px; }
}
.feat-toggle { display: none; background: none; border: none; cursor: pointer; color: var(--tf-teal); font-size: 20px; font-weight: 700; padding: 6px 0 0; line-height: 1; }

/* ===== BRAND STORY（「歯は臓器である」の治療方針の長文。v2で特徴・実績から独立したセクションに） ===== */
section.brand-story-section { position: relative; background: linear-gradient(180deg, #FFFFFF 0%, #F5FAFA 100%); padding: 80px 0; overflow: hidden; }
/* 理事長写真＋文章の2分割（PC）。写真の背後にずらしたティール面と淡い円を敷いて奥行きを出す。760px以下は写真が上・文章が下 */
.brand-story-layout { max-width: 1040px; margin: 0 auto; display: grid; grid-template-columns: 340px minmax(0,1fr); gap: 64px; align-items: start; }
.brand-story-photo { position: relative; margin: 0; isolation: isolate; }
.brand-story-photo::before { content: ''; position: absolute; z-index: -1; inset: 22px -22px -22px 22px; border-radius: 6px; background: linear-gradient(135deg, #CFE9E8, #EAF4F4); transform: translate3d(0, var(--bs-par-square, 0px), 0); will-change: transform; }
.brand-story-photo::after { content: ''; position: absolute; z-index: -2; width: 180px; height: 180px; border-radius: 50%; left: -56px; top: -44px; background: rgba(61,199,196,.14); transform: translate3d(0, var(--bs-par-circle, 0px), 0); will-change: transform; }
/* ↑ 写真の後ろの四角・丸はスクロールに合わせて少しずつ違う速さで動く(パララックス。値は front-page.js が入れる。2026-10-05 ユーザー指示) */
.brand-story-photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 6px; box-shadow: 0 18px 40px rgba(18,60,66,.18); }
.brand-story-photo figcaption { position: absolute; left: 16px; bottom: 16px; padding: 10px 16px; border-radius: 4px; background: rgba(255,255,255,.94); box-shadow: 0 6px 18px rgba(18,60,66,.16); color: var(--tf-heading); font-size: 18px; font-weight: 700; line-height: 1.4; }
.brand-story-photo figcaption span { display: block; font-size: 12px; font-weight: 700; color: var(--tf-teal); letter-spacing: .06em; }
.brand-story {
  max-width: 820px; margin: 0 auto 22px;
  display: flex; flex-direction: column; gap: 22px; font-size: 16px; line-height: 2; color: var(--tf-body);
  text-wrap: pretty;
}
.brand-story-wave-bottom { position: absolute; left: 0; right: 0; bottom: -2px; width: 100%; height: clamp(40px,6vw,70px); display: block; }
.brand-story p, .brand-story h2 { margin: 0; } /* h2 = 欄の見出し(2026-10-16 p から変更) */
.feat-lead-strong { font-size: clamp(18px,2.2vw,22px); font-weight: 700; color: var(--tf-heading); line-height: 1.7; }
.feat-lead-dark { color: var(--tf-heading); }
/* PCでは常時展開（続きを読むボタンも非表示）。760px以下でのみアコーディオン化する
   （README v2「アコーディオン（開閉、スマホのみ）」。開閉状態はJSのクラス、見た目の分岐はメディアクエリ）。 */
.lead-more { overflow: hidden; }
.lead-more-inner { display: flex; flex-direction: column; gap: 22px; padding-top: 22px; }
.lead-more-block { display: flex; flex-direction: column; gap: 14px; }
.feat-lead-list { margin: 0; padding: 18px 22px; list-style: none; border-radius: 4px; display: flex; flex-direction: column; gap: 6px; color: var(--tf-heading); font-weight: 700; }
.feat-lead-list li { display: flex; gap: 10px; }
.feat-lead-list li::before { content: "・"; color: var(--tf-teal); }
.feat-lead-quotes { display: flex; flex-direction: column; gap: 6px; padding-left: 18px; border-left: 3px solid var(--tf-teal-light); color: var(--tf-heading); font-weight: 700; font-size: clamp(16px,1.8vw,18px); }
.feat-lead-toggle-row { display: none; text-align: center; }
.feat-lead-toggle-box { background: none; border: none; cursor: pointer; color: var(--tf-teal); font-size: 16px; font-weight: 700; padding: 4px 0; }
.feat-cta-row { text-align: center; }
a.feat-cta-box {
  display: inline-block; background: var(--tf-heading); color: #FFFFFF; padding: 16px 36px; border-radius: 6px;
  font-size: 16px; font-weight: 700; transition: transform .2s ease, box-shadow .2s ease;
}
a.feat-cta-box:hover { color: #FFFFFF; transform: translateY(-2px); box-shadow: 0 8px 18px rgba(18,60,66,0.3); }
.feat-wave-bottom { position: absolute; left: 0; right: 0; bottom: -2px; width: 100%; height: clamp(50px,7vw,90px); z-index: 1; display: block; }

@media (min-width: 768px) {
  .feat-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
}
/* タブレットの幅(〜1000px)は2列×2段にする(2026-10-13)。4列だとカードが細く、説明文が「マイクロスコープな／どを使い」のように言葉の途中で折れていた */
@media (min-width: 768px) and (max-width: 999px) {
  .feat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 767px) {
  .brand-story-layout { grid-template-columns: 1fr; gap: 40px; }
  .brand-story-photo { width: min(78%, 300px); margin: 0 auto; }
  .feat-photo { width: 100%; left: 0; right: 0; }
  .feat-photo::after { content: ''; position: absolute; inset: 0; background: rgba(255,255,255,0.45); }
  .feat-fade { display: none; }
  .feat-body { padding-bottom: 80px; }
  .feat-card { padding: 24px 12px 20px; }
  .feat-desc { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
  .feat-desc.feat-desc-open { max-height: 120px; }
  .feat-toggle { display: inline-block; }
  .lead-more { max-height: 0; transition: max-height .5s ease; }
  .lead-more.lead-open { max-height: 2000px; }
  .feat-lead-toggle-row { display: block; }
}

/* ===== AI相談 ===== */
/* 下端の波（次の検索セクションの背景色#EAF4F4へつなぐ）。ウィジェットの内容に重ならないよう
   クリックを透過させ、波の高さ分だけ下の余白を足している。 */
section.ai-widget-section { position: relative; background: #FFFFFF; padding: 72px 0 calc(72px + clamp(40px,6vw,70px)); }
.ai-widget-wave-bottom { position: absolute; left: 0; right: 0; bottom: -2px; width: 100%; height: clamp(40px,6vw,70px); display: block; pointer-events: none; }
.ai-widget-inner { max-width: 920px; text-align: center; }
.ai-widget-inner .sec-heading, .ai-widget-inner .sec-lead { margin-left: auto; margin-right: auto; }
.ai-widget-inner .sec-lead { margin-bottom: 36px; }
/* 最初の画面(Dental World)の上の見出し(2026-10-07 ユーザー指示)。この画面の間は区画の上の余白と横の余白が
   プラグイン側(dental-world.css)で0になるので、見出しの周りの余白はここで持つ。相談を始めたら隠す */
.ai-widget-intro-head { display: none; }
.ai-widget-inner:has(.ai-deep__intro:not([hidden])) > .ai-widget-intro-head { display: block; padding: 72px 28px 40px; }
.ai-widget-intro-head .sec-lead { margin-bottom: 0; line-height: 1.9; }
.ai-widget-intro-head span { display: inline-block; } /* 狭い画面では言葉のまとまり(span)の境目で折り返す */
/* 文字が浮かび上がって見えるように：静止後も下にやわらかい影を落とし、少し手前に浮いた印象にする */
.ai-widget-intro-head .sec-heading { text-shadow: 0 1px 0 rgba(255,255,255,.9), 0 10px 26px rgba(24,59,93,.18); }
.ai-widget-intro-head .sec-lead { text-shadow: 0 1px 0 rgba(255,255,255,.9), 0 6px 16px rgba(24,59,93,.12); }
/* 画面に入ったら、言葉のまとまりごとに ぼかし＋下から の状態から順に浮かび上がる(front-page.js が is-armed / is-shown を付ける) */
.ai-widget-intro-head.is-armed span { opacity: 0; transform: translateY(22px); filter: blur(8px); transition: opacity 1.1s ease, transform 1.3s cubic-bezier(.2,.7,.2,1), filter 1.1s ease; }
.ai-widget-intro-head.is-shown span { opacity: 1; transform: none; filter: none; }
.ai-widget-intro-head .sec-heading span:nth-child(2) { transition-delay: .18s; }
.ai-widget-intro-head .sec-heading span:nth-child(4) { transition-delay: .36s; } /* 3番目は <br> */
.ai-widget-intro-head .sec-lead span:nth-child(1) { transition-delay: .7s; }
.ai-widget-intro-head .sec-lead span:nth-child(2) { transition-delay: .85s; }
.ai-widget-intro-head .sec-lead span:nth-child(4) { transition-delay: 1s; }
.ai-widget-intro-head .sec-lead span:nth-child(5) { transition-delay: 1.15s; }
@media (prefers-reduced-motion: reduce) {
  .ai-widget-intro-head.is-armed span { opacity: 1; transform: none; filter: none; transition: none; }
}
@media (max-width: 640px) {
  .ai-widget-inner:has(.ai-deep__intro:not([hidden])) > .ai-widget-intro-head { padding: 56px 20px 32px; }
}
.webapp-panel { border-radius: var(--radius-lg); padding: 0; position: relative; overflow: hidden; text-align: left; }
.webapp-panel > * { position: relative; z-index: 1; }
/* ご案内(LP)表示中だけ、LPの背景色を画面の横幅いっぱいに広げる(2026-09-25 ユーザー指示)。
   920px幅の枠(.ai-widget-inner)と、角丸で切り取る外枠(.webapp-panel)をこの間だけ外す。
   文章の幅はプラグイン側(ai-consultation-deep.css)で従来どおり920px程度に抑えている。
   質問中の画面はこれまでどおり920px幅・角丸のまま。 */
.ai-widget-inner:has(.ai-deep__lp:not([hidden])) { max-width: none; padding-left: 0; padding-right: 0; }
.webapp-panel:has(.ai-deep__lp:not([hidden])) { overflow: visible; border-radius: 0; }
/* ご案内(LP)が画面の下端にかかっている間は、右下固定の電話/LINE/WEB予約ボタン(footer.phpの
   .sticky-reserve、全ページ共通。スマホは下端のバー)を隠す。LPを読んでいる間はこのボタン群が内容と
   重なって邪魔になるため。LPを読み終えて下の区画へ進んだらまた出す(2026-10-06〜)。
   is-ai-lp-onscreen はAI相談プラグイン(ai-consultation-deep.js)が付け外しする。 */
body.is-ai-lp-onscreen .sticky-reserve {
  display: none;
}
@media (max-width: 782px) {
  .ai-widget-section:has(.ai-deep__lp:not([hidden])) { padding-left: 0; padding-right: 0; }
  .webapp-panel:has(.ai-deep__lp:not([hidden])) { padding-left: 0; padding-right: 0; }
}

/* ===== MORE INFORMATION（もっと詳しく知る） ===== */
section.more-info-section { position: relative; padding: 112px 0 72px; background: var(--tf-bg-1); }
.more-info-wave-top { position: absolute; left: 0; right: 0; top: -1px; width: 100%; height: clamp(50px,7vw,90px); display: block; }
.more-info-head { margin-bottom: 36px; }
.more-grid { display: grid; grid-template-columns: 1fr; gap: 24px; min-width: 0; }
.more-link { font-size: 16px; font-weight: 700; }

.column-card { background: #FFFFFF; padding: 24px; min-width: 0; }
.column-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; gap: 12px; }
.column-card-title { font-size: 17px; font-weight: 700; color: var(--tf-heading); }
.column-card-lead { font-size: 16px; margin: 0 0 16px; }
.column-list { display: flex; flex-direction: column; gap: 16px; }
.column-item { display: block; padding-bottom: 16px; border-bottom: 1px solid var(--tf-bg-1); }
.column-item:last-child { border-bottom: none; padding-bottom: 0; }
.column-item-cat { font-size: 14px; color: var(--tf-teal); font-weight: 700; margin-bottom: 4px; }
.column-item-title { font-size: 16px; font-weight: 700; color: var(--tf-heading); }
/* 記事のタイトルはホバーで青緑に(2026-10-13 ユーザー指示) */
.column-item-title { transition: color .2s ease; }
.column-item:hover .column-item-title, .column-item:focus-visible .column-item-title { color: var(--tf-teal); }

.yt-card { background: #FFFFFF; padding: 24px; min-width: 0; }
/* 右上の「YouTube記事をもっと見る →」（記事一覧へ）。中央の「YouTube／チャンネルを見る」と重ならないよう、
   その上の行に右寄せで置く（どの幅でも同じ）。 */
.yt-articles-link { display: block; width: fit-content; margin: 0 0 12px auto; }
.yt-card-head { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.yt-brand { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.yt-brand span { font-size: 16px; font-weight: 700; color: var(--tf-heading); }
.more-link-pill {
  flex: 0 1 50%; min-width: 220px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--tf-bg-2); border: 1px solid var(--tf-border-1); border-radius: 6px; padding: 14px 20px;
}
.more-link-pill span { font-size: 16px; color: var(--tf-body); }

.yt-thumb-ph {
  display: block; width: 100%; aspect-ratio: 16/9; border-radius: 8px; object-fit: cover;
  background: linear-gradient(135deg,var(--tf-bg-1) 0%,var(--tf-border-1) 100%);
}
.yt-thumb-ph--sm { width: 128px; height: 84px; aspect-ratio: auto; flex-shrink: 0; border-radius: 6px; }
/* チャンネルアイコン（院長の写真。assets/images/yt-channel-icon.webp、128px四方）。 */
.yt-channel-logo-ph { display: block; width: 24px; height: 24px; border-radius: 50%; object-fit: cover; background: var(--tf-teal-light); flex-shrink: 0; }
.yt-channel-logo-ph--sm { width: 32px; height: 32px; }
.yt-play-btn {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 44px; height: 44px;
  border-radius: 50%; background: var(--tf-teal); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(13,137,156,0.4);
}
.yt-play-btn--lg { width: 56px; height: 56px; }
a.yt-subscribe-btn { background: var(--tf-teal); color: #FFFFFF; font-size: 13px; font-weight: 700; padding: 8px 16px; border-radius: 999px; white-space: nowrap; flex-shrink: 0; transition: opacity .2s ease; }
/* ホバー時に共通のリンク色（ティール）が当たり、背景と同じ色になって文字が消えていたため白のままにする */
a.yt-subscribe-btn:hover { color: #FFFFFF; opacity: .85; }

.yt-desktop { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; align-items: start; }
.yt-main { min-width: 0; }
.yt-main-thumb { display: block; position: relative; border-radius: 8px; overflow: hidden; }
/* 大きいサムネイルはYouTubeの動画ページに飛ぶので、ホバーで少し暗くし、再生ボタンの下に行き先を表示する */
.yt-main-thumb-shade { position: absolute; inset: 0; background: rgba(0,0,0,0.35); opacity: 0; transition: opacity .25s ease; pointer-events: none; }
.yt-main-thumb-label {
  position: absolute; left: 0; right: 0; top: calc(50% + 40px); text-align: center; color: #FFFFFF;
  font-size: 16px; font-weight: 700; letter-spacing: 0.05em; opacity: 0; transition: opacity .25s ease; pointer-events: none;
  text-shadow: 0 1px 6px rgba(0,0,0,0.4);
}
.yt-main-thumb:hover .yt-main-thumb-shade, .yt-main-thumb:hover .yt-main-thumb-label,
.yt-main-thumb:focus-visible .yt-main-thumb-shade, .yt-main-thumb:focus-visible .yt-main-thumb-label { opacity: 1; }
.yt-main-title { font-size: 17px; font-weight: 700; color: var(--tf-heading); margin-top: 12px; line-height: 1.5; }
.yt-main-channel { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.yt-main-channel .yt-channel-name { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 14px; color: var(--tf-body); font-weight: 700; white-space: nowrap; }
.yt-main-channel { flex-wrap: wrap; }
.yt-side { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.yt-side-item { cursor: pointer; display: flex; gap: 12px; align-items: flex-start; }
.yt-side-item .yt-side-title { font-size: 14px; font-weight: 700; color: var(--tf-heading); line-height: 1.5; }
.yt-side-item.is-active { display: none; }

.yt-mobile-scroll { display: none; gap: 14px; overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; padding-bottom: 8px; min-width: 0; }
.yt-mobile-item { flex: 0 0 220px; }
.yt-mobile-thumb { display: block; text-decoration: none; position: relative; }
.yt-mobile-title { font-size: 14px; font-weight: 700; color: var(--tf-heading); margin-top: 8px; line-height: 1.4; }
.yt-mobile-channel { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.yt-mobile-channel .yt-channel-name { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 13px; color: var(--tf-body); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yt-mobile-channel { flex-wrap: nowrap; }
/* アイコンとチャンネル名を詰めて並べ、チャンネル登録ボタンだけ右端に寄せる */
.yt-main-channel, .yt-mobile-channel { justify-content: flex-start; }
.yt-main-channel .yt-channel-name, .yt-mobile-channel .yt-channel-name { margin-right: auto; }
.yt-mobile-more {
  flex: 0 0 180px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: var(--tf-bg-2); border: 1px solid var(--tf-border-1); border-radius: 8px; aspect-ratio: 16/9; text-align: center; padding: 16px;
}
.yt-mobile-more span { font-size: 14px; font-weight: 700; color: var(--tf-teal); }

@media (max-width: 767px) {
  .yt-desktop { display: none; }
  .yt-mobile-scroll { display: flex; }
  .yt-top-link { display: none; }
}

/* ===== コラボ講演（COLLAB TALKS。v2でBRAND STORYの下に配置） ===== */
section.results { position: relative; background: var(--tf-bg-2); padding: 72px 0; }
/* 狭い画面で「コラボ／講演」のように言葉の途中で改行しないよう、<wbr>の位置でだけ改行する。 */
.results-title-box { margin: 0 auto 12px; font-size: clamp(24px,3.2vw,34px); font-weight: 900; color: var(--tf-heading); text-align: center; line-height: 1.5; word-break: keep-all; }
.results-desc-box { margin: 0 auto 36px; font-size: 16px; color: var(--tf-body); text-align: center; }
.results-eyebrow { text-align: center; }
.collab-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 28px; list-style: none; padding: 0; margin: 0 auto; max-width: 1200px; }
/* カード全体が1つのリンク。特徴・実績のカードと同じ、細い枠線＋深い影の落ち着いた見た目(2026-10-13 ユーザー指示「シンプルすぎる」)。
   ホバーで浮き上がり、写真が少し拡大、再生ボタンが青緑に、「動画を見る →」の矢印が右へ動く。 */
a.collab-card {
  display: flex; flex-direction: column; height: 100%; background: #FFFFFF; border: 1px solid #C9E2E2; border-radius: 2px; overflow: hidden;
  color: inherit; box-shadow: 0 18px 40px rgba(18,60,66,.10), 0 2px 6px rgba(18,60,66,.05); transition: transform .4s ease, box-shadow .4s ease;
}
a.collab-card:hover { transform: translateY(-4px); box-shadow: 0 26px 50px rgba(18,60,66,.14), 0 3px 8px rgba(18,60,66,.06); }
.collab-thumb-box { display: block; position: relative; width: 100%; aspect-ratio: 16/9; overflow: hidden; background: var(--tf-bg-1); }
.collab-thumb-box img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
a.collab-card:hover .collab-thumb-box img { transform: scale(1.05); }
.play-icon {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 56px; height: 56px; border-radius: 50%; background: #FFFFFF;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(18,60,66,0.25);
  transition: background .3s ease, transform .3s ease;
}
/* 再生ボタンの外側の細い輪 */
.play-icon::before { content: ''; position: absolute; inset: -7px; border-radius: 50%; border: 1px solid rgba(255,255,255,.85); }
.play-icon svg { transition: fill .3s ease; }
a.collab-card:hover .play-icon { background: var(--tf-teal); transform: translate(-50%,-50%) scale(1.06); }
a.collab-card:hover .play-icon svg { fill: #FFFFFF; }
.collab-card-body { display: flex; flex-direction: column; flex: 1; padding: 20px 24px 18px; }
/* 「Talk 01」と、右へのびる細い線 */
.collab-no { display: flex; align-items: center; gap: 12px; font-family: var(--font-latin); font-style: italic; font-variant-numeric: lining-nums; font-size: 17px; font-weight: 600; letter-spacing: .06em; color: var(--tf-teal); line-height: 1.2; }
.collab-no::after { content: ''; flex: 1; height: 1px; background: rgba(13,137,156,.28); }
.collab-name-box { display: block; margin: 10px 0 4px; font-size: 21px; font-weight: 700; letter-spacing: .04em; color: var(--tf-heading); line-height: 1.5; }
.collab-quote-box { display: block; margin-left: -.5em; font-size: 15px; font-weight: 700; color: var(--tf-teal); line-height: 1.6; } /* 「の前の空きを詰めて名前と頭をそろえる */
.collab-more {
  display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin-top: auto; padding-top: 14px; border-top: 1px solid #E3F0F0;
  font-size: 14px; font-weight: 700; color: var(--tf-heading); letter-spacing: .06em;
}
.collab-quote-box { margin-bottom: 16px; }
.collab-more svg { transition: transform .3s ease; }
a.collab-card:hover .collab-more { color: var(--tf-teal); }
a.collab-card:hover .collab-more svg { transform: translateX(4px); }
@media (max-width: 767px) { .collab-grid { grid-template-columns: 1fr; } }

/* ===== RESERVATION（WEB予約） ===== */
section.resv-section { position: relative; background: linear-gradient(180deg,var(--tf-bg-1) 0%,#FFFFFF 100%); overflow: hidden; padding: 72px 0 96px; }
.resv-wave-top { position: absolute; left: 0; right: 0; top: -1px; width: 100%; height: clamp(50px,7vw,90px); z-index: 2; display: block; }
.resv-wave-bottom { position: absolute; left: 0; right: 0; bottom: -2px; width: 100%; height: 60px; z-index: 1; display: block; }
.resv-photo { position: absolute; top: 0; right: 0; width: 100%; height: 100%; z-index: 0; }
.resv-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.resv-fade { position: absolute; inset: 0; background: linear-gradient(90deg,var(--tf-bg-1) 0%,rgba(234,244,244,0.5) 20%,rgba(234,244,244,0) 40%); }
.resv-inner { position: relative; z-index: 1; }
.resv-text { max-width: 560px; margin-bottom: 36px; }
.resv-heading { font-size: clamp(24px,3.4vw,34px); font-weight: 900; color: var(--tf-heading); margin: 0 0 12px; }
.resv-text .sec-lead { margin: 0 0 26px; }
.resv-cta-row { display: flex; gap: 14px; flex-wrap: wrap; }
a.resv-cta {
  display: inline-flex; align-items: center; gap: 10px; padding: 18px 32px; border-radius: 6px;
  font-size: 17px; font-weight: 700; color: #FFFFFF; transition: transform .2s ease, box-shadow .2s ease;
}
a.resv-cta:hover { color: #FFFFFF; transform: translateY(-2px); }
.resv-cta--web { background: var(--tf-accent-treatment); }
.resv-cta--web:hover { box-shadow: 0 8px 18px rgba(250,110,89,0.35); }
.resv-cta--line { background: var(--tf-teal); }
.resv-cta--line:hover { box-shadow: 0 8px 18px rgba(13,137,156,0.35); }

.resv-feat-grid {
  display: grid; grid-template-columns: repeat(auto-fit,minmax(160px,1fr)); gap: 20px;
  border: 1px solid var(--tf-border-1); border-radius: 6px; padding: 28px 24px; background-color: #FFFFFFCB;
}
.resv-feat { text-align: center; }
.resv-feat img { width: 52px; height: 52px; margin: 0 auto 12px; display: block; }
.resv-feat-title { font-size: 16px; font-weight: 700; color: var(--tf-heading); margin-bottom: 4px; }
.resv-feat-desc { font-size: 16px; }
/* PC幅は写真がセクション全面の背景で、英字・見出し・説明文が写真の上に乗るため白文字にする(2026-10-03 ユーザー指示)。
   左端のなじませ(.resv-fade)は淡い水色だと白文字が読みにくいため、濃い青緑の半透明で上書き。
   スマホ幅は写真が文字の上に分かれて並ぶので従来の色のまま。 */
@media (min-width: 768px) {
  .resv-fade { background: linear-gradient(90deg, rgba(18,60,66,.55) 0%, rgba(18,60,66,.32) 35%, rgba(18,60,66,0) 62%); }
  .resv-text .sec-eyebrow, .resv-text .resv-heading, .resv-text .sec-lead { color: #FFFFFF; text-shadow: 0 1px 12px rgba(18,60,66,.35); }
}

@media (max-width: 767px) {
  .resv-photo { position: relative; width: auto; height: 60vw; margin: -72px -28px 28px; }
  .resv-fade { display: none; }
}

/* フッター（footer.php）は特設サイトを除く全ページ共通のため、そのスタイルは
   assets/css/base.css の .tf-footer* に定義している（このファイルではない）。 */

/* ===== 改行の整え(2026-10-09。トップを PC・タブレット・スマホの幅で調べ、最後の行に1〜2文字だけ残る・数字と単位が分かれる所を直した) =====
   text-wrap: pretty … 最後の行に1〜2文字だけ残らないようにする(Safari 26 は段落全体を見て整える)。
   word-break: auto-phrase … Chrome で日本語を文節(「探せます」「治療」など)のまとまりで折り返す(Chrome の pretty は日本語の短い最後の行を直しきれないため)。Safari は無視して今までどおり。
   u-nowrap … 「1本」「18年・25年」のように分けたくない言葉をひとまとまりにする。 */
:where(p, li, dt, dd, figcaption, h2, h3, h4),
.feat-desc, .resv-feat-desc, .resv-feat-title, .yt-side-title, .sidx-lead, .column-card-lead, .sidx-name, .tf-footer a, .feat-lead-quotes span,
.fv-eyebrow, .column-item-title, .yt-mobile-title, .yt-main-title, .yt-side-title { text-wrap: pretty; word-break: auto-phrase; overflow-wrap: anywhere; } /* anywhere … 文節が枠に入りきらないときだけ文節の途中でも折り返す(はみ出し防止) */
.u-nowrap { white-space: nowrap; }
/* 狭い画面(375px未満。360px の Android・初代 iPhone SE など)だけ: 特徴カードを1列にし、「もっと見る」「歯科コラム」を1行に保つ(2026-10-09。2列だとカードが細く1文字ずつ折り返していた) */
@media (max-width: 374px) {
  .feat-grid { grid-template-columns: minmax(0, 1fr); }
  .more-link, .column-card-title { white-space: nowrap; }
}
