/* =========================================================
   デザイン案 第8弾：第7弾01「治す・整える・守る」型のブラッシュアップ
   v7.css・v7-themes.css（01の構成）の後に読み込む
   ?c=1〜8 で配色を切り替え（緑系は院長のご意見で除外）
   ========================================================= */
html[data-color="2"] { --main: #2c3e55; --accent: #9a8058; --bg2: #f3f4f6; --line: #d9dde3; --news-bg: #2c3e55; }
html[data-color="3"] { --main: #4a4a4a; --accent: #9a7a4e; --bg2: #f7f3ec; --line: #e2dccf; --news-bg: #4a4a4a; }
/* 追加の配色（2026-10-15） */
html[data-color="4"] { --main: #24334d; --accent: #a8874e; --bg2: #f5f3ee; --line: #e0dbd0; --news-bg: #24334d; }  /* ネイビー×ゴールド */
html[data-color="5"] { --main: #3f5f7f; --accent: #7a9cb8; --bg2: #f1f5f8; --line: #d8e2ea; --news-bg: #3f5f7f; }  /* くすみブルー */
html[data-color="6"] { --main: #5a4038; --accent: #b0735a; --bg2: #f8f3ee; --line: #e8dcd2; --news-bg: #5a4038; }  /* テラコッタ×アイボリー */
html[data-color="7"] { --main: #5b2e3a; --accent: #a68a62; --bg2: #f8f4f2; --line: #e6dbd8; --news-bg: #5b2e3a; }  /* ボルドー×ベージュ */
html[data-color="8"] { --main: #6b645c; --accent: #a5947e; --bg2: #f6f4f1; --line: #e3dfd8; --news-bg: #6b645c; }  /* グレージュ（いちばん明るく軽い） */

/* ---------- ファーストビュー（3本柱） ---------- */
html[data-theme="1"] .fv-pillars { background: linear-gradient(var(--bg2) 0 72%, #fff 72%); }
.pl-lead { display: inline-block; border-bottom: 1px solid var(--accent); padding-bottom: 4px; }
.pl-list li { display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.pl-list li:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0,0,0,.07); }
.pl-list p:last-of-type { flex: 1; }
.pl-more { margin: 0 18px 18px; font: 13px var(--f-head); color: var(--accent); letter-spacing: .08em; align-self: flex-start; border-bottom: 1px solid currentColor; }
.pl-more::after { content: " ›"; }
/* スマホは縦長にならないよう、写真を左・文字を右に */
@media (max-width: 599px) {
  .pl-list { gap: 12px; }
  .pl-list li { display: grid; grid-template-columns: 38% 1fr; grid-template-rows: auto auto 1fr auto; }
  .pl-photo { grid-row: 1 / 5; aspect-ratio: auto; height: 100%; min-height: 150px; }
  .pl-no { margin: 10px 12px 0; font-size: 13px; }
  .pl-list h2 { margin: 0 12px; font-size: 19px; }
  .pl-list p:last-of-type { margin: 6px 12px 6px; font-size: 13px; }
  .pl-more { margin: 0 12px 10px; font-size: 12px; }
}

/* ---------- 診療メニュー：見出しを常に出す ---------- */
html[data-theme="1"] .quick { margin-top: 0; padding: 32px 0 12px; background: #fff; }
html[data-theme="1"] .quick-ttl { display: block; }

/* ---------- お悩みから探す ---------- */
.worry8 { padding: 40px 0 16px; background: #fff; }
.w8-ttl, .gl-ttl { font: 500 18px var(--f-head); color: var(--main); letter-spacing: .15em; margin: 0 0 16px; }
.w8-ttl { text-align: center; }
.w8-ttl::before, .w8-ttl::after { content: ""; display: inline-block; width: 30px; height: 1px; background: var(--line); vertical-align: middle; margin: 0 12px; }
.w8-list { display: grid; grid-template-columns: 1fr; gap: 8px; }
.w8-list a { display: block; position: relative; border: 1px solid var(--line); padding: 12px 34px 12px 16px; font: 15px var(--f-head); color: var(--text); background: #fff; }
.w8-list a::before { content: "✓"; color: var(--accent); margin-right: 8px; }
.w8-list a::after { content: "›"; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--accent); font-size: 18px; }
.w8-list a:hover { border-color: var(--accent); background: var(--bg2); }

/* ---------- 診療時間・アクセスの早見 ---------- */
.glance { padding: 28px 0 48px; background: #fff; }
.glance-in { display: grid; gap: 20px; }
.gl-hours, .gl-access { border: 1px solid var(--line); background: var(--bg2); padding: 22px 20px; }
.gl-hours table { width: 100%; border-collapse: collapse; font-size: 13px; background: #fff; }
.gl-hours th, .gl-hours td { border: 1px solid var(--line); padding: 8px 2px; text-align: center; font-weight: 400; }
.gl-hours tr:first-child td { background: var(--main); color: #fff; }
.gl-hours th { white-space: nowrap; padding: 8px 6px; }
.gl-hours td { color: var(--accent); }
.gl-note { font-size: 12px; color: var(--muted); margin: 8px 0 0; }
.gl-addr { font: 15px/1.8 var(--f-head); margin: 0 0 10px; }
.gl-access li { font-size: 14px; margin-bottom: 4px; }
.gl-access b { display: inline-block; min-width: 3.6em; text-align: center; font-size: 11px; color: #fff; background: var(--main); padding: 0 6px; margin-right: 8px; }
.gl-btns { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.gl-btns a { border: 1px solid var(--main); color: var(--main); padding: 6px 18px; font-size: 13px; background: #fff; }
.gl-btns a::after { content: " ›"; }


@media (min-width: 600px) {
  .w8-list { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1100px) {
  html[data-theme="1"] .fv-pillars { padding: 64px 0 56px; }
  html[data-theme="1"] .quick { margin-top: 0; padding: 48px 0 16px; }
  .worry8 { padding: 56px 0 16px; }
  .w8-list { grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .w8-list a { font-size: 15px; padding: 16px 30px 16px 16px; }
  .glance { padding: 40px 0 72px; }
  .glance-in { grid-template-columns: 1.3fr 1fr; gap: 24px; }
  .gl-hours, .gl-access { padding: 28px 30px; }
  .gl-hours table { font-size: 14px; }
}

/* 調整：スマホの背景・AI表示・ボタン文字 */
@media (max-width: 599px) {
  html[data-theme="1"] .fv-pillars { background: var(--bg2); }
  .pl-photo.ai::after { font-size: 9px; padding: 0 4px; left: 4px; right: 4px; bottom: 4px; text-align: center; }
  .quick-list a { font-size: 12px; letter-spacing: 0; }
}

/* =========================================================
   レイアウト違い（?l=1〜4）。どれも「治す・整える・守る」を最初に見せる同じ系統
   L1 カード型（標準）／L2 左右分割型／L3 文字主体型／L4 丸写真型
   ========================================================= */
.pl-band, .pl-text, .pl-btns { display: none; }
.pl-text { font: 15px/1.9 var(--f-head); margin: 0 0 18px; }
.pl-btns { gap: 10px; flex-wrap: wrap; }
.pl-btn { display: inline-block; border: 1px solid var(--main); background: var(--main); color: #fff; padding: 10px 22px; font: 500 15px var(--f-en); letter-spacing: .08em; }
.pl-btn::before { content: "☎ "; }
.pl-btn.line { background: var(--line-c); border-color: var(--line-c); font: 700 13px var(--f-body); }
.pl-btn.line::before { content: ""; }

/* ---------- L2 左右分割型 ---------- */
html[data-layout="2"] .pl-text { display: block; }
html[data-layout="2"] .pl-btns { display: flex; justify-content: center; margin-bottom: 24px; }
@media (min-width: 1100px) {
  html[data-layout="2"] .fv-pillars { background: var(--bg2); padding: 64px 0; }
  html[data-layout="2"] .fv-pillars .in { display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: center; text-align: left; }
  html[data-layout="2"] .pl-copy { font-size: 34px; margin-bottom: 22px; }
  html[data-layout="2"] .pl-copy .sp-br { display: inline; }
  html[data-layout="2"] .pl-btns { justify-content: flex-start; margin: 0; }
  html[data-layout="2"] .pl-list { grid-template-columns: 1fr; gap: 14px; }
  html[data-layout="2"] .pl-list li { display: grid; grid-template-columns: 200px 1fr; grid-template-rows: auto auto 1fr auto; }
  html[data-layout="2"] .pl-photo { grid-row: 1 / 5; aspect-ratio: auto; height: 100%; min-height: 150px; }
  html[data-layout="2"] .pl-no { margin: 14px 20px 0; }
  html[data-layout="2"] .pl-list h2 { margin: 0 20px; font-size: 20px; }
  html[data-layout="2"] .pl-list p:last-of-type { margin: 8px 20px 6px; }
  html[data-layout="2"] .pl-more { margin: 0 20px 14px; }
}

/* ---------- L3 文字主体型 ---------- */
html[data-layout="3"] .pl-band { display: block; aspect-ratio: 16 / 7; }
html[data-layout="3"] .fv-pillars { background: #fff; padding-top: 0; }
html[data-layout="3"] .pl-head { margin-top: 28px; }
html[data-layout="3"] .pl-text { display: block; }
html[data-layout="3"] .pl-photo { display: none; }
html[data-layout="3"] .pl-list li { display: block; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: center; padding: 18px 8px 6px; }
html[data-layout="3"] .pl-list li:hover { transform: none; box-shadow: none; }
html[data-layout="3"] .pl-no { font-size: 30px; margin: 0; letter-spacing: .1em; }
html[data-layout="3"] .pl-list h2 { border: 0; font-size: 24px; letter-spacing: .3em; }
html[data-layout="3"] .pl-more { display: inline-block; }
@media (max-width: 599px) { html[data-layout="3"] .pl-list li { display: block; } }
@media (min-width: 600px) {
  html[data-layout="3"] .pl-list li { border-top: 0; border-left: 1px solid var(--line); }
  html[data-layout="3"] .pl-list li:first-child { border-left: 0; }
}
@media (min-width: 1100px) {
  html[data-layout="3"] .pl-band { aspect-ratio: 21 / 6; }
  html[data-layout="3"] .fv-pillars { padding: 0 0 64px; }
  html[data-layout="3"] .pl-head { margin-top: 48px; }
  html[data-layout="3"] .pl-list li { padding: 8px 24px; }
}

/* ---------- L4 丸写真型 ---------- */
html[data-layout="4"] .pl-list li { border: 0; background: transparent; text-align: center; display: block; }
html[data-layout="4"] .pl-list li:hover { transform: none; box-shadow: none; }
html[data-layout="4"] .pl-photo { width: 62%; max-width: 240px; aspect-ratio: 1; height: auto; min-height: 0; margin: 0 auto 6px; border-radius: 50%; box-shadow: 0 0 0 6px #fff, 0 0 0 7px var(--line); }
html[data-layout="4"] .pl-photo.ai::after { left: 50%; right: auto; transform: translateX(-50%); bottom: 10%; white-space: nowrap; }
html[data-layout="4"] .pl-list h2 { border: 0; display: inline-block; padding-bottom: 2px; border-bottom: 1px solid var(--accent); }
html[data-layout="4"] .pl-more { display: inline-block; }
@media (max-width: 599px) {
  html[data-layout="4"] .pl-list li { display: block; }
  html[data-layout="4"] .pl-photo { width: 150px; }
  html[data-layout="4"] .pl-list { gap: 24px; }
}

/* 調整：カード本文の余白（「詳しく見る」を足したため最後の要素が変わった分）と、L2のコピーの大きさ */
.pl-list li > p:not(.pl-no) { font: 14px/1.8 var(--f-head); margin: 8px 18px 12px; }
html[data-layout="3"] .pl-list li > p:not(.pl-no), html[data-layout="4"] .pl-list li > p:not(.pl-no) { margin: 8px 0 10px; }
@media (max-width: 599px) {
  html[data-layout="1"] .pl-list li > p:not(.pl-no), html[data-layout="2"] .pl-list li > p:not(.pl-no) { margin: 6px 12px 6px; font-size: 13px; }
}
@media (min-width: 1100px) {
  html[data-layout="2"] .pl-copy { font-size: clamp(26px, 2.2vw, 32px); letter-spacing: .08em; white-space: nowrap; }
  html[data-layout="2"] .pl-list li > p:not(.pl-no) { margin: 8px 20px 6px; }
}

/* =========================================================
   大枠のレイアウト追加（2026-10-15）
   L5 院長写真＋3本柱型／L6 サイドメニュー型
   ========================================================= */
.pl-hero { display: none; }

/* ---------- L5 院長写真＋3本柱型 ---------- */
html[data-layout="5"] .pl-hero { display: block; aspect-ratio: 4 / 3; }
html[data-layout="5"] .fv-pillars { background: var(--bg2); padding-top: 0; }
html[data-layout="5"] .pl-head { margin-top: 24px; }
html[data-layout="5"] .pl-text { display: block; }
html[data-layout="5"] .pl-btns { display: flex; justify-content: center; margin-bottom: 24px; }
html[data-layout="5"] .pl-photo { display: none; }
html[data-layout="5"] .pl-list { background: #fff; border: 1px solid var(--line); gap: 0; }
html[data-layout="5"] .pl-list li { display: block; border: 0; border-top: 1px solid var(--line); padding: 18px 16px 6px; text-align: center; }
html[data-layout="5"] .pl-list li:first-child { border-top: 0; }
html[data-layout="5"] .pl-list li:hover { transform: none; box-shadow: none; }
html[data-layout="5"] .pl-no { font-size: 26px; margin: 0; }
html[data-layout="5"] .pl-list h2 { border: 0; letter-spacing: .3em; margin: 0; }
html[data-layout="5"] .pl-list li > p:not(.pl-no) { margin: 6px 0 8px; }
html[data-layout="5"] .pl-more { display: inline-block; }
@media (min-width: 600px) {
  html[data-layout="5"] .pl-list li { border-top: 0; border-left: 1px solid var(--line); }
  html[data-layout="5"] .pl-list li:first-child { border-left: 0; }
}
@media (min-width: 1100px) {
  html[data-layout="5"] .fv-pillars { position: relative; padding: 0 0 64px; }
  html[data-layout="5"] .pl-hero { position: absolute; top: 0; right: 0; width: 62%; height: 600px; aspect-ratio: auto; -webkit-mask-image: linear-gradient(to right, transparent 0, #000 30%); mask-image: linear-gradient(to right, transparent 0, #000 30%); }
  html[data-layout="5"] .fv-pillars .in { position: relative; }
  html[data-layout="5"] .pl-head { height: 600px; margin: 0; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; text-align: left; max-width: 44%; }
  html[data-layout="5"] .pl-copy { font-size: clamp(28px, 2.4vw, 36px); }
  html[data-layout="5"] .pl-copy .sp-br { display: inline; }
  html[data-layout="5"] .pl-btns { justify-content: flex-start; margin: 0; }
  html[data-layout="5"] .pl-list { margin-top: -70px; position: relative; box-shadow: 0 12px 30px rgba(0,0,0,.06); }
  html[data-layout="5"] .pl-list li { padding: 28px 24px 18px; }
}

/* ---------- L6 サイドメニュー型 ---------- */
html[data-layout="6"] .pl-text { display: block; }
@media (min-width: 1100px) {
  html[data-layout="6"] body { padding-left: 270px; }
  html[data-layout="6"] .hd { position: fixed; left: 0; top: 0; bottom: 0; width: 270px; overflow-y: auto; border-bottom: 0; border-right: 1px solid var(--line); z-index: 60; }
  html[data-layout="6"] .hd-seo { display: none; }
  html[data-layout="6"] .hd-in { flex-direction: column; align-items: stretch; gap: 20px; padding: 32px 24px 20px; max-width: none; }
  html[data-layout="6"] .logo { flex-direction: column; text-align: center; margin: 0; }
  html[data-layout="6"] .logo-txt b { font-size: 21px; }
  html[data-layout="6"] .hd-info { grid-template-columns: 1fr; gap: 2px; margin: 0; font-size: 12px; border-top: 1px solid var(--line); padding-top: 14px; }
  html[data-layout="6"] .hd-info dt { justify-self: start; margin-top: 6px; }
  html[data-layout="6"] .hd-tel { align-items: center; }
  html[data-layout="6"] .hd-tel span { font-size: 27px; }
  html[data-layout="6"] .gnav { flex-direction: column; border-top: 1px solid var(--line); padding: 8px 0 24px; }
  html[data-layout="6"] .gnav a { padding: 11px 28px; border-bottom: 1px solid var(--bg2); }
  html[data-layout="6"] .gnav a + a::before { display: none; }
  html[data-layout="6"] .gnav a::after { content: "›"; position: absolute; right: 24px; color: var(--accent); }
  html[data-layout="6"] .gnav a:first-child { background: var(--main); color: #fff; }
  /* 3本柱は写真と文章を交互に大きく */
  html[data-layout="6"] .fv-pillars { background: #fff; padding: 64px 0 40px; }
  html[data-layout="6"] .pl-head { margin-bottom: 40px; }
  html[data-layout="6"] .pl-list { grid-template-columns: 1fr; gap: 0; }
  html[data-layout="6"] .pl-list li { display: grid; grid-template-columns: 1.1fr 1fr; grid-template-rows: 1fr auto auto auto 1fr; border: 0; background: var(--bg2); }
  html[data-layout="6"] .pl-list li:hover { transform: none; box-shadow: none; }
  html[data-layout="6"] .pl-list li:nth-child(even) { grid-template-columns: 1fr 1.1fr; background: #fff; }
  html[data-layout="6"] .pl-photo { grid-row: 1 / 6; grid-column: 1; aspect-ratio: auto; min-height: 300px; height: 100%; }
  html[data-layout="6"] .pl-list li:nth-child(even) .pl-photo { grid-column: 2; }
  html[data-layout="6"] .pl-list li > :not(.pl-photo) { grid-column: 2; margin-left: 48px; margin-right: 48px; }
  html[data-layout="6"] .pl-list li:nth-child(even) > :not(.pl-photo) { grid-column: 1; }
  html[data-layout="6"] .pl-no { grid-row: 2; font-size: 34px; }
  html[data-layout="6"] .pl-list h2 { grid-row: 3; font-size: 26px; }
  html[data-layout="6"] .pl-list li > p:not(.pl-no) { grid-row: 4; font-size: 15px; }
  html[data-layout="6"] .pl-more { grid-row: 5; align-self: start; }
  html[data-layout="6"] .pl-list br { display: none; }
}
@media (min-width: 1100px) {
  html[data-layout="5"] .pl-copy { font-size: clamp(26px, 2.1vw, 32px); white-space: nowrap; letter-spacing: .08em; }
  html[data-layout="6"] .pl-more { justify-self: start; }
}

/* テキストのブラッシュアップで足した要素（2026-10-15） */
.tour-list small { display: block; text-align: center; font-size: 11px; color: var(--muted); }
.doctor-msg { font: 15px/1.9 var(--f-head); border-left: 2px solid var(--accent); padding-left: 14px; margin: 0 0 18px; }
.cta-sub { font-size: 13px; opacity: .85; margin: 0 0 8px; }
/* 小さい画面ではカード本文の改行位置を固定しない（1文字だけ次の行に残るのを防ぐ） */
@media (max-width: 1099px) { .pl-list li > p:not(.pl-no) br { display: none; } }
@media (max-width: 599px) { .pl-photo.ai::after { white-space: nowrap; left: 4px; right: auto; } }
/* L4は中央ぞろえで横幅が広いので、スマホでも改行位置を固定する */
@media (max-width: 1099px) { html[data-layout="4"] .pl-list li > p:not(.pl-no) br { display: inline; } }
/* 電話番号は数字が上下にずれない、普通のゴシック体で */
.cta-tel, .hd-tel span, .pl-btn[href^="tel:"], .if-tel { font-family: var(--f-body); font-weight: 600; font-variant-numeric: lining-nums tabular-nums; letter-spacing: .04em; }
.cta-tel { font-size: 36px; }
@media (min-width: 1100px) { .cta-tel { font-size: 44px; } .hd-tel span { font-size: 26px; } }
@media (max-width: 399px) { .cta-tel { font-size: 30px; } }
/* 見出しの改行（スマホのみ） */
.br-sp { display: none; }
@media (max-width: 767px) { .br-sp { display: inline; } }
@media (max-width: 359px) { .effort h3, .equip h3 { font-size: 15px; } }

/* =========================================================
   確認用（2026-10-16）：トップのキャッチコピーをなくした場合
   ?h=a … キャッチコピーなし（「琴似で1994年から」の一行と3本柱だけ）
   ?h=b … キャッチコピーなし＋上に院内の写真の帯
   ========================================================= */
html[data-hero="a"] .pl-copy, html[data-hero="b"] .pl-copy { display: none; }
html[data-hero="a"] .pl-lead, html[data-hero="b"] .pl-lead { margin-bottom: 26px; font-size: 14px; }
html[data-hero="b"] .pl-band { display: block; aspect-ratio: 16 / 7; }
html[data-hero="b"] .fv-pillars { padding-top: 0; }
html[data-hero="b"] .pl-head { margin-top: 26px; }
@media (min-width: 1100px) {
  html[data-hero="a"] .pl-lead, html[data-hero="b"] .pl-lead { font-size: 16px; margin-bottom: 40px; }
  html[data-hero="b"] .pl-band { aspect-ratio: 21 / 6; }
  html[data-hero="b"] .fv-pillars { padding-top: 0; }
  html[data-hero="b"] .pl-head { margin-top: 40px; }
}

/* =========================================================
   採用（2026-10-16）：案B キャッチコピーなし＋院内写真
   写真が約5秒ごとにふわっと切り替わる（2026-10-21から3枚：待合→看板→説明の場面）
   キャッチコピーの h1 は検索エンジン向けに残し、画面には出さない
   ========================================================= */
html[data-hero="b"] .pl-copy { display: block; position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }
html[data-hero="b"] .fv-pillars { position: relative; }
.pl-band { position: relative; }
.pl-slide { position: absolute; inset: 0; opacity: 0; animation: plSlide 15s infinite; }
/* 3枚（2026-10-21 院長と女性の写真を外した）：待合 → 入口の看板 → タブレットで説明 */
.pl-slide:nth-child(1) { animation-delay: 0s; }
.pl-slide:nth-child(2) { animation-delay: 5s; }
.pl-slide:nth-child(3) { animation-delay: 10s; }
@keyframes plSlide {
  0% { opacity: 0; }
  7% { opacity: 1; }
  33% { opacity: 1; }
  40% { opacity: 0; }
  100% { opacity: 0; }
}
/* 最初の1枚は読み込み直後から表示しておく */
.pl-slide:nth-child(1) { opacity: 1; animation-name: plSlideFirst; }
@keyframes plSlideFirst {
  0% { opacity: 1; }
  33% { opacity: 1; }
  40% { opacity: 0; }
  93% { opacity: 0; }
  100% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .pl-slide { animation: none; } }
html[data-hero="b"] .pl-band { aspect-ratio: 16 / 9; }
@media (min-width: 600px) { html[data-hero="b"] .pl-band { aspect-ratio: 2 / 1; } }
@media (min-width: 1100px) { html[data-hero="b"] .pl-band { aspect-ratio: auto; height: min(560px, 42vw); } }
