/* トップページ（front-page.php）の CSS
   元：医院\nishinippori-scratch\HTML\トップページ_PC_1663-215023\公開用\css\style.css の base・s01〜s07。
   一番下の予約の帯（元の s08）・フッター（元の s09）・固定ボタン・SPメニューは共通の部品なので、ここには書かない。
   ページの途中の予約の帯（元の s03・s05 の CTA）は template-parts/top/cta.php の .tcta（1つにまとめた）。
   写真は var(--img-<16けた>)（WordPress のメディア）、アイコンは icons/（このフォルダ）。base は .nn-main--top の中に閉じ込めた */

.nn-main--top {
  --c-text: #514c46;
  --c-bg: #fbf7f4;
  --c-white: #ffffff;
  --c-accent: #e8a477;
  --c-accent-deep: #e88f54;
  --c-green: #65980e;
  --c-green-soft: #76983b;
  --c-gold: #d7b56d;
  --c-beige: #f0e2c4;
  --c-cream: #fffdf5;
  --c-line: #ece5dc;
  --c-table-head: #faf9f5;
  --c-gray: #939393;
  --c-ink: #333333;
  --font-sans: "Noto Sans JP", sans-serif;
  --font-serif: "Shippori Mincho B1", "Noto Serif JP", serif;
  --font-en: "Source Serif 4", "Noto Serif JP", serif;
  --gutter: clamp(16px, 4vw, 40px);
  --inner: 1120px;

  display: block;
  width: 100%;
  overflow-x: clip;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0.05em;
  text-spacing-trim: space-all;
}
/* 下の節の書き方が勝つように、base は :where で弱くする */
:where(.nn-main--top) *, :where(.nn-main--top) *::before, :where(.nn-main--top) *::after { box-sizing: border-box; }
:where(.nn-main--top) img { max-width: 100%; height: auto; display: block; }
:where(.nn-main--top) a { color: inherit; }
.nn-main--top .nn-svg { flex: none; display: block; }

/* ===== s01 ヘッダー＋FV（スライド 3 枚）＋点＋グローバルナビ ===== */
/* 1440px で高さ 1024px。Figma：細い帯 30px、FV 890px（写真は x=280〜1440）、点 20px 下に 24px、ナビ 8px 下に 52px */

.s01 { --s01-ease: 0.3s ease-out; --s01-bs: 1; position: relative; z-index: 2; }
:where(.s01) :where(ul, ol) { list-style: none; margin: 0; padding: 0; }
:where(.s01) :where(p, h1, h2) { margin: 0; }
:where(.s01) a { text-decoration: none; }
:where(.s01) button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.s01 .nn-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.s01-sp { display: none; }

/* ---------- 上の細い帯（30px） ---------- */
.s01-header { position: relative; z-index: 4; }
.s01-topbar {
  display: flex; justify-content: space-between; align-items: center;
  height: 30px; padding: 0 50px; background: var(--c-beige);
  font-size: 12px; font-weight: 500; line-height: 1;
}
.s01-topbar-info { display: flex; gap: 16px; letter-spacing: 0.05em; white-space: nowrap; }
.s01-topbar-links { display: flex; align-items: center; gap: 30px; }
.s01-topbar-link {
  display: flex; align-items: center; justify-content: center;
  min-width: 52px; height: 44px; margin-block: -7px; letter-spacing: 0.1em; white-space: nowrap;
}

/* 言語の切り替え（共通の部品 nn-lang を、Figma の Home の見た目で置く。開閉は共通の script.js） */
.s01-lang { position: relative; display: flex; align-items: center; height: 44px; margin-block: -12px; }
.s01-lang .nn-lang { position: relative; }
/* 押せる所は 44px。見た目の箱（高さ 20px）は ::before で後ろに描く */
.s01-lang .nn-lang-btn {
  --lb-h: 20px;
  position: relative; z-index: 0; display: flex; align-items: center; gap: 8px;
  width: 97px; height: 44px; padding: 0 8px 0 12px;
  background: none; border: 0; cursor: pointer;
  color: var(--c-text); font: 400 12px/1 var(--font-sans); letter-spacing: 0;
}
.s01-lang .nn-lang-btn::before {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; z-index: -1; height: var(--lb-h); transform: translateY(-50%);
  background: var(--c-white); border: 1px solid var(--c-gray); border-radius: 2px; box-sizing: border-box;
}
.s01-lang .nn-lang-list { top: calc(50% + 14px); }
.s01-lang .nn-lang-arrow { width: 14px; height: 7px; margin-left: auto; transition: transform var(--s01-ease); }
.s01-lang .nn-lang.is-open .nn-lang-arrow { transform: rotate(180deg); }
.s01-lang .nn-lang-list {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 120px; margin: 0; padding: 4px 0; list-style: none;
  background: var(--c-white); border: 1px solid var(--c-line); border-radius: 2px; box-shadow: 0 2px 8px rgba(109, 97, 61, 0.15);
  opacity: 0; visibility: hidden; transition: opacity var(--s01-ease), visibility var(--s01-ease);
}
.s01-lang .nn-lang.is-open .nn-lang-list { opacity: 1; visibility: visible; }
.s01-lang .nn-lang-list a, .s01-lang .nn-lang-list span[aria-disabled] { display: flex; align-items: center; min-height: 44px; padding: 0 14px; font-size: 13px; text-decoration: none; transition: color var(--s01-ease); }
.s01-lang--sp { display: none; }

/* ---------- FV（890px） ---------- */
.s01-fv { position: relative; height: 890px; }

/* スライド：重ねて置き、表示中のものだけフェードで出す（注意書き：0.6秒／Ease In Out） */
.s01-slides { position: absolute; inset: 0; display: grid; }
.s01-slide {
  position: relative; grid-area: 1 / 1; min-width: 0;
  opacity: 0; visibility: hidden; transition: opacity 0.6s ease-in-out, visibility 0s linear 0.6s;
}
.s01-slide.is-active { opacity: 1; visibility: visible; transition: opacity 0.6s ease-in-out, visibility 0s; z-index: 1; }

/* 写真：右の写真（1160×890）の上に、左の写真（716×890・右下が斜め）を重ねる */
.s01-photo { position: absolute; top: 0; right: 0; bottom: 0; left: calc(50% - 440px); overflow: hidden; container-type: size; }
.s01-photo-b {
  position: absolute; max-width: none;
  left: 16.55cqw; top: 0; width: 83.45cqw; height: 93.36cqw;
  object-fit: cover; object-position: 0 0;
}
.s01-photo-a {
  position: absolute; left: 0; top: 0; width: 61.73%; height: 100%;
  container-type: size; overflow: hidden;
  clip-path: polygon(0 0, 82.47% 0, 100% 100%, 0 100%);
}
.s01-photo-a img { position: absolute; max-width: none; left: -63.25cqw; top: -5.33cqh; width: 197.07cqw; height: 105.27cqh; object-fit: cover; }
/* Figma では写真が明るく補正されている（見本と比べて求めた値） */
.s01-slide--s1 .s01-photo-b { filter: contrast(0.827) brightness(1.2); }
.s01-slide--s1 .s01-photo-a img { filter: contrast(0.874) brightness(1.282); }
/* 2枚目：右に横になった患者さん、左に内視鏡を持つ手（斜めに切る） */
.s01-slide--s2 .s01-photo-b { left: 0; width: 100cqw; height: 100cqh; object-position: 70% 50%; }
.s01-slide--s2 .s01-photo-a { width: 54.7%; clip-path: polygon(0 0, 83.6% 0, 100% 100%, 0 100%); }
.s01-slide--s2 .s01-photo-a img { left: 0; top: 0; width: 100cqw; height: 100cqh; object-position: 40% 50%; }
/* 3枚目：待合室の写真 1 枚 */
.s01-slide--s3 .s01-photo-b { left: 0; width: 100cqw; height: 100cqh; object-position: 50% 50%; }

/* 見出しの後ろの白いぼかし（Ellipse 2856：x=18・y=254、570×445。写真の下） */
.s01-glow {
  position: absolute; left: 18px; top: 224px; width: 570px; height: 445px; border-radius: 50%;
  background: radial-gradient(closest-side, #fff, rgba(255, 255, 255, 0));
}

/* ロゴ・電話・予約ボタン（写真の上に重ねる） */
.s01-bar { position: absolute; inset: 0 0 auto; z-index: 3; display: flex; justify-content: space-between; align-items: flex-start; height: 80px; pointer-events: none; }
.s01-bar > * { pointer-events: auto; }
.s01-logo { display: flex; flex-direction: column; align-items: center; width: 200px; margin: 25px 0 0 36px; }
.s01-logo-img { width: 200px; height: 159px; }
.s01-logo-sub {
  display: block; width: 187px; padding: 5px 0; border-radius: 2px; background: #bdb0a6; color: var(--c-white); text-align: center;
  font-size: 12px; font-weight: 700; line-height: 1.3; letter-spacing: 0.2em; white-space: nowrap;
}
.s01-bar-right { display: flex; align-items: stretch; height: 80px; }
.s01-tel { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; width: 220px; padding-right: 14px; color: var(--c-white); }
.s01-tel-label { padding-left: 4px; font-family: var(--font-serif); font-size: 14px; font-weight: 700; line-height: 1; letter-spacing: 0.1em; }
.s01-tel-num {
  display: flex; align-items: center; gap: 0; height: 44px; margin: -10px 0;
  font-family: var(--font-en); font-size: 24px; font-weight: 700; line-height: 1; letter-spacing: 0.065em; white-space: nowrap;
}
.s01-tel-num .nn-svg { width: 24px; height: 24px; }
.s01-tel, .s01-tel-num { text-shadow: 0 0 6px rgba(0, 0, 0, 0.25); }
.s01-hbtn {
  display: flex; align-items: center; justify-content: center; gap: 2px;
  width: 130px; color: var(--c-white);
  font-family: var(--font-serif); font-size: 18px; font-weight: 700; line-height: 1; letter-spacing: 0.05em; white-space: nowrap;
  transition: background-color var(--s01-ease);
}
.s01-hbtn .nn-svg { width: 20px; height: 20px; }
.s01-hbtn--line .nn-svg { width: 22px; height: 22px; }
.s01-hbtn--web { background: var(--c-accent); }
.s01-hbtn--line { background: var(--c-green-soft); }
.s01-menu-btn { display: none; }

/* 大きな見出しと 4 つの特長（x=103・y=374） */
.s01-copy { position: absolute; z-index: 1; left: max(var(--gutter), 50% - 617px); top: 344px; width: 589px; }
.s01-catch {
  /* Figma は 46px・字間 16%。かなは詰め（palt）たうえで字間を 6% にする（.s01-kana） */
  color: var(--c-ink); font-family: var(--font-serif); font-size: 46px; font-weight: 600; line-height: 1.6; letter-spacing: 0.16em; white-space: nowrap;
  font-feature-settings: "palt";
  -webkit-text-stroke: 6px var(--c-white); paint-order: stroke fill;
  text-shadow: 0 0 30px #fff, 0 0 30px #fff, 0 0 10px #fff;
}
.s01-kana { letter-spacing: 0.06em; }
.s01-catch-sm { display: block; font-size: 0.6em; letter-spacing: 0.1em; line-height: 1.6; }
.s01-slide--s2 .s01-copy, .s01-slide--s3 .s01-copy { top: 300px; }
.s01-points { display: flex; flex-direction: column; gap: 8px; margin-top: 37px; }
.s01-points li {
  display: flex; align-items: flex-end; gap: 4px; min-height: 38px; padding: 8px 16px; border-radius: 2px;
  background: linear-gradient(90deg, #e88f54, #f3b68d); box-shadow: 0 0 10px rgba(226, 194, 163, 0.2);
  color: var(--c-white); font-family: var(--font-serif); font-size: 18px; font-weight: 700; line-height: 1.2; letter-spacing: 0.05em;
  text-shadow: 0 0 5.6px #cf6f30; white-space: nowrap;
}
.s01-slide--s2 .s01-points, .s01-slide--s3 .s01-points { align-items: flex-start; }
.s01-points-no { flex: none; font-family: var(--font-en); font-size: 16px; font-weight: 500; line-height: 1.2; }

/* 丸い札 2 つ（x=868・y=615、263px、18px 重ねる） */
.s01-badges { position: absolute; z-index: 1; left: calc(50% + 148px); top: 585px; display: flex; }
.s01-badge {
  flex: none; display: flex; align-items: center; justify-content: center;
  width: calc(263px * var(--s01-bs)); height: calc(263px * var(--s01-bs)); padding: calc(5px * var(--s01-bs)); border-radius: 50%;
}
.s01-badge + .s01-badge { margin-left: calc(-18px * var(--s01-bs)); }
.s01-badge-ring { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; border-radius: 50%; border: 1px solid; }
.s01-badge p {
  text-align: center; font-family: var(--font-serif); font-size: calc(24px * var(--s01-bs)); font-weight: 800; line-height: 1.4; letter-spacing: 0.05em; white-space: nowrap;
}
.s01-badge--white { background: radial-gradient(closest-side, rgba(255, 240, 229, 0.7), #fff); }
.s01-badge--white .s01-badge-ring { border-color: var(--c-gold); }
.s01-badge--white p { color: #cc9a31; -webkit-text-stroke: calc(4px * var(--s01-bs)) #fff; paint-order: stroke fill; text-shadow: 0 0 5px #fff; }
.s01-badge--gold { background: radial-gradient(closest-side, #dec184, var(--c-gold)); }
.s01-badge--gold .s01-badge-ring { border-color: var(--c-white); }
.s01-badge--gold p { color: var(--c-white); text-shadow: 0 0 4px #ba9036; }
.s01-b28 { font-size: calc(28px * var(--s01-bs)); }
.s01-b20 { font-size: calc(20px * var(--s01-bs)); }
.s01-ls2 { letter-spacing: 0.02em; }
.s01-lsm { letter-spacing: -0.04em; }

/* ---------- ページ送りの点（14px・押す所は 44px） ---------- */
.s01-dots { display: flex; justify-content: center; height: 24px; margin-top: 20px; }
.s01-dot { position: relative; width: 44px; height: 44px; margin: -10px 0; } /* 押せる所 44px 同士を重ねない（見た目の点の間隔は 30px） */
.s01-dot::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
  background: #d9d9d9; transition: background-color var(--s01-ease);
}
.s01-dot.is-active::before { background: var(--c-accent); } /* 注意書き 1770:148183：表示中の点だけアクセント色 */

/* ---------- グローバルナビ（52px。プルダウンはホバーで出す） ---------- */
.s01-nav { position: relative; z-index: 5; margin-top: 8px; }
.s01-nav-list { display: flex; justify-content: center; gap: 38px; }
.s01-nav-li { position: relative; }
.s01-nav-item {
  position: relative; display: flex; flex-direction: column; align-items: center;
  height: 52px; padding-top: 4px; white-space: nowrap; transition: color var(--s01-ease);
}
.s01-nav-item--home { min-width: 44px; margin-inline: -3.5px; }
.s01-nav-home { width: 24px; height: 24px; }
.s01-nav-ja { display: flex; align-items: center; height: 24px; font-family: var(--font-serif); font-size: 16px; font-weight: 700; line-height: 1; letter-spacing: 0.05em; }
.s01-nav-en { display: block; height: 12px; padding-bottom: 2px; color: var(--c-gray); font-family: var(--font-en); font-size: 10px; font-weight: 500; line-height: 10px; letter-spacing: 0.15em; transition: color var(--s01-ease); }
.s01-nav-caret { position: absolute; left: 50%; top: 40px; width: 8px; height: 5px; margin-left: -4px; color: var(--c-text); transition: color var(--s01-ease); }
.s01-drop {
  position: absolute; left: 50%; top: 100%; z-index: 20; min-width: 200px; transform: translateX(-50%);
  padding: 8px 0; border-radius: 4px; background: var(--c-white); box-shadow: 0 0 10px rgba(109, 97, 61, 0.15);
  opacity: 0; visibility: hidden; transition: opacity var(--s01-ease), visibility var(--s01-ease);
}
.s01-drop-list { display: flex; flex-direction: column; }
.s01-drop-link {
  display: flex; align-items: center; min-height: 44px; padding: 0 20px;
  font-family: var(--font-serif); font-size: 14px; font-weight: 700; white-space: nowrap;
  transition: background-color var(--s01-ease), color var(--s01-ease);
}
.s01-nav-li.has-child:focus-within .s01-drop { opacity: 1; visibility: visible; }

/* 電話は PC ではリンクにしない（SP だけ発信） */
@media (min-width: 768px) {
  .s01-tel-num { pointer-events: none; cursor: default; }
}

/* ホバー（PC） */
@media (hover: hover) {
  .s01-hbtn--web:hover { background: var(--c-accent-deep); }
  .s01-hbtn--line:hover { background: var(--c-green); }
  .s01-dot:hover::before { background: var(--c-accent); }
  .s01-nav-item:hover, .s01-nav-item:hover .s01-nav-en, .s01-nav-item:hover .s01-nav-caret { color: var(--c-accent); }
  .s01-nav-li.has-child:hover .s01-drop { opacity: 1; visibility: visible; }
  .s01-drop-link:hover { background: var(--c-accent); color: var(--c-white); }
  .s01-lang .nn-lang-list a:hover { color: var(--c-accent); }
}

/* ---------- 1440px より狭い：比率を保って縮める ---------- */
@media (max-width: 1280px) {
  .s01 { --s01-bs: 0.86; }
  .s01-nav-list { gap: clamp(20px, 2.6vw, 38px); }
  .s01-catch { font-size: clamp(34px, 3.6vw, 46px); }
  .s01-badges { left: auto; right: 84px; top: auto; bottom: 40px; }
}
@media (max-width: 1180px) {
  .s01 { --s01-bs: 0.8; }
}
@media (max-width: 1100px) {
  .s01-points { align-items: flex-start; }
  .s01-points li { font-size: 16px; }
  .s01-copy { width: auto; right: 80px; }
}

/* ---------- 1024px 以下：段を減らす（札は写真の下の段へ） ---------- */
@media (max-width: 1024px) {
  .s01 { --s01-bs: 0.76; }
  .s01-topbar { padding: 0 var(--gutter); }
  .s01-fv { height: auto; padding-bottom: 32px; }
  .s01-slides { position: relative; inset: auto; }
  .s01-glow { display: none; }
  .s01-photo { position: relative; left: auto; height: 640px; margin-left: 72px; }
  .s01-bar .s01-logo { margin-left: var(--gutter); }
  .s01-logo { width: 160px; }
  .s01-logo-img { width: 160px; height: 127px; }
  .s01-logo-sub { width: 150px; font-size: 10px; letter-spacing: 0.12em; }
  .s01-hbtn { width: 108px; font-size: 16px; }
  .s01-tel { width: 200px; }
  .s01-tel-num { font-size: 20px; }
  .s01-copy, .s01-slide--s2 .s01-copy, .s01-slide--s3 .s01-copy { top: 220px; }
  .s01-catch { font-size: 34px; }
  .s01-badges { position: relative; inset: auto; justify-content: center; margin-top: 24px; }
  .s01-nav-list { flex-wrap: wrap; gap: 0 20px; padding-inline: var(--gutter); }
  .s01-nav-ja { font-size: 14px; }
}
@media (max-width: 860px) {
  .s01-topbar-info { gap: 10px; font-size: 11px; }
  .s01-topbar-links { gap: 12px; }
  .s01-tel { width: 180px; }
  .s01-tel-label { font-size: 12px; letter-spacing: 0.05em; }
  .s01-tel-num { font-size: 18px; letter-spacing: 0.05em; }
  .s01-hbtn { width: 96px; font-size: 15px; }
  .s01-copy, .s01-slide--s2 .s01-copy, .s01-slide--s3 .s01-copy { top: 200px; }
  .s01-catch { font-size: 30px; }
  .s01-points li { font-size: 15px; white-space: normal; }
}

/* ---------- 767px 以下：スマホ（Figma 1663:216645） ---------- */
@media (max-width: 767px) {
  .s01 { --s01-bs: 0.46; }
  .s01-sp { display: inline; }

  .s01-topbar { justify-content: center; height: 18px; padding: 0 20px; }
  .s01-topbar-info { gap: 12px; font-size: 10px; letter-spacing: 0.05em; }
  .s01-topbar-links { display: none; }

  .s01-fv { display: flex; flex-direction: column; padding-bottom: 0; }
  .s01-bar { order: -1; position: relative; align-items: center; height: 71px; padding: 0 20px 0 11px; background: var(--c-bg); }
  .s01-bar .s01-logo { margin: 0; }
  .s01-logo { width: 186px; align-items: flex-start; }
  .s01-logo-img { width: 80px; height: 64px; }
  .s01-logo-sub { width: auto; padding: 0; background: none; color: var(--c-text); font-size: 10px; font-weight: 500; letter-spacing: 0.1em; text-align: left; }
  .s01-logo-sub br { display: none; }
  .s01-bar-right, .s01-nav { display: none; }

  .s01-lang--sp { display: flex; margin-left: auto; margin-block: 0; }
  .s01-lang--sp .nn-lang-btn { --lb-h: 18px; width: 80px; padding: 0 6px 0 10px; gap: 2px; font-size: 10px; }
  .s01-menu-btn {
    display: flex; flex-direction: column; align-items: center;
    width: 44px; height: 44px; margin: 0 -6px 0 14px; padding-top: 4px;
  }
  .s01-menu-lines { position: relative; display: block; width: 26px; height: 2px; margin-top: 7px; background: var(--c-accent); border-radius: 1px; }
  .s01-menu-lines::before, .s01-menu-lines::after { content: ""; position: absolute; left: 0; width: 26px; height: 2px; background: var(--c-accent); border-radius: 1px; }
  .s01-menu-lines::before { top: 8px; }
  .s01-menu-lines::after { top: 16px; }
  .s01-menu-label { margin-top: 23px; font-family: var(--font-en); font-size: 10px; line-height: 1; letter-spacing: 0.05em; }

  /* 上に左の写真（全幅・下の辺が斜め）、その下に右の写真。どちらも右にはみ出さないよう object-fit で切る */
  .s01-photo { height: 726px; margin-left: 0; }
  .s01-photo-b { left: 0; top: 61cqw; width: 100cqw; height: 193cqw; object-position: 47.2% 0; }
  .s01-photo-a { width: 100%; height: 345px; clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%); }
  .s01-photo-a img { left: 0; top: -36cqw; width: 100cqw; height: 155cqw; object-fit: cover; object-position: 57% 0; }
  .s01-slide--s2 .s01-photo-b { top: 0; width: 100cqw; height: 56%; object-position: 60% 30%; }
  .s01-slide--s2 .s01-photo-a { top: auto; bottom: 0; width: 100%; height: 52%; clip-path: polygon(0 14%, 100% 0, 100% 100%, 0 100%); }
  .s01-slide--s2 .s01-photo-a img { top: 0; width: 100cqw; height: 100cqh; object-position: 50% 50%; }
  .s01-slide--s3 .s01-photo-b { top: 0; width: 100cqw; height: 100cqh; }
  /* 見出し・特長・札はスライドの中の位置（スライドは上の帯 71px の下から始まる） */
  .s01-copy, .s01-slide--s2 .s01-copy, .s01-slide--s3 .s01-copy { left: 16px; right: 0; top: 246px; }
  .s01-catch { font-size: 28px; -webkit-text-stroke-width: 4px; }
  .s01-slide--s2 .s01-catch, .s01-slide--s3 .s01-catch { font-size: 22px; }
  .s01-points { align-items: stretch; gap: 10px; margin: 120px 0 0 -16px; width: 222px; }
  .s01-points li { padding: 9px 8px; font-size: 12px; line-height: 1.2; align-items: center; white-space: nowrap; border-radius: 0 2px 2px 0; }
  .s01-slide--s2 .s01-points, .s01-slide--s3 .s01-points { align-items: stretch; margin-top: 80px; }
  .s01-points-no { font-size: 12px; }
  .s01-badges { position: absolute; left: auto; right: 16px; top: 493px; flex-direction: column; margin: 0; padding: 0; }
  .s01-badge + .s01-badge { margin: -16px 0 0; }

  .s01-dots { margin-top: 20px; margin-bottom: 20px; }

  /* 本人の指示（ADR-0084）：SP ヘッダー（上の帯＋ロゴの段）は全体を画面の上に付いてくる形。MENU だけの固定ボタンは出さない */
  .s01 { padding-top: 18px; }
  .s01-header { position: fixed; top: 0; left: 0; right: 0; z-index: 900; background: var(--c-bg); }
  .s01-fv { padding-top: 71px; }
  .s01-bar { position: fixed; top: 18px; left: 0; right: 0; z-index: 900; }
  .nn-hd-float { display: none !important; }
  html { scroll-padding-top: 89px; }
}

/* 動きを減らす設定：フェードを止める */
@media (prefers-reduced-motion: reduce) {
  .s01-slide, .s01-slide.is-active { transition: none; }
}

/* スクロールで出る動き（注意書き 1787:219401）：下から約20px・透明から・0.7秒 Ease Out・初回の1回だけ。
   .is-rv は script.js が付ける（JS が動かないときは最初から全部見える）。背景の帯・波形には付けない。下層ページでは使わない */
.is-rv { opacity: 0; transform: translateY(20px); transition: opacity .7s ease-out var(--rv-delay, 0s), transform .7s ease-out var(--rv-delay, 0s); }
.is-rv.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .is-rv, .is-rv.is-in { opacity: 1; transform: none; transition: none; }
}

/* ===== s02 バナー・診療時間・写真の帯・ご予約・お問い合わせ ===== */
/* 1440px で高さ 2177px。バナー 0〜589（上下 120px）、波 589〜689、診療時間 689〜1503、写真 1503〜1843、カードは 128px 重ねて 1715〜2177 */

.s02 { --s02-ease: 0.3s ease-out; --s02-shadow: 0 0 10px rgba(109, 97, 61, 0.15); }
:where(.s02) :where(ul, ol) { list-style: none; margin: 0; padding: 0; }
:where(.s02) :where(p, h2) { margin: 0; }
:where(.s02) a { text-decoration: none; }

.s02-h2 {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-family: var(--font-serif); font-size: 36px; font-weight: 700; line-height: 1; letter-spacing: 0.1em; text-align: center; white-space: nowrap;
}
.s02-h2-en { color: #f3d0b8; font-family: var(--font-en); font-size: 24px; font-weight: 400; letter-spacing: 0.05em; }

/* ---------- バナー（452×100 を 2 列、x=255・730） ---------- */
.s02-banners {
  display: grid; grid-template-columns: repeat(2, minmax(0, 452px)); column-gap: 23px; row-gap: 24.5px;
  width: min(927px, 100% - var(--gutter) * 2); margin-left: max(var(--gutter), 50% - 465px); padding: 120px 0;
}
.s02-banner { display: block; transition: opacity var(--s02-ease); }
.s02-banner img { width: 100%; height: auto; aspect-ratio: 452 / 100; object-fit: cover; }

/* ---------- 診療時間（上 100px は波の形） ---------- */
.s02-hours {
  padding: 140px 0 120px;
  background:
    url("icons/wave-hours.svg") top center / 100% 100px no-repeat,
    linear-gradient(#f7ece4, #f7ece4) 0 100px / 100% calc(100% - 100px) no-repeat;
}
.s02-tabs { position: relative; width: min(1100px, 100% - var(--gutter) * 2); margin: 32px 0 0 max(var(--gutter), 50% - 550px); }
/* ラジオは見せない（押すのはラベル） */
.s02-tab-input { position: absolute; left: 0; top: 0; z-index: -1; width: 44px; height: 44px; margin: 0; opacity: 0; pointer-events: none; }
.s02-tab-group { position: relative; display: flex; padding: 8px; border-radius: 70px; background: var(--c-white); box-shadow: var(--s02-shadow); }
.s02-tab {
  flex: 1 1 0; display: flex; align-items: center; justify-content: center; height: 60px; border-radius: 30px;
  background: #f5f3ee; color: var(--c-gold); cursor: pointer;
  font-family: var(--font-serif); font-size: 20px; font-weight: 700; line-height: 1; letter-spacing: 0.1em; white-space: nowrap;
  transition: background-color var(--s02-ease), color var(--s02-ease);
}
.s02-tab[hidden] { display: none; }
#s02-tab1:checked ~ .s02-tab-group .s02-tab--1,
#s02-tab2:checked ~ .s02-tab-group .s02-tab--2,
#s02-tab3:checked ~ .s02-tab-group .s02-tab--3 { background: var(--c-gold); color: var(--c-white); }
#s02-tab1:focus-visible ~ .s02-tab-group .s02-tab--1,
#s02-tab2:focus-visible ~ .s02-tab-group .s02-tab--2,
#s02-tab3:focus-visible ~ .s02-tab-group .s02-tab--3 { outline: 2px solid var(--c-accent-deep); outline-offset: 2px; }

.s02-card {
  display: flex; flex-direction: column; align-items: center;
  margin-top: 20px; padding: 40px 60px; border-radius: 10px; background: var(--c-white); box-shadow: var(--s02-shadow);
}
.s02-panel { display: none; width: 100%; }
#s02-tab1:checked ~ .s02-card .s02-panel--1,
#s02-tab2:checked ~ .s02-card .s02-panel--2,
#s02-tab3:checked ~ .s02-card .s02-panel--3 { display: block; }

/* 表（980px：1 列目 385px・曜日 85px） */
.s02-table {
  width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0;
  border: 1px solid var(--c-line); border-radius: 5px; overflow: hidden; text-align: center;
}
.s02-table th, .s02-table td { padding: 0; border-left: 1px solid var(--c-line); border-top: 1px solid var(--c-line); }
.s02-table tr > :first-child { width: 39.29%; border-left: 0; }
.s02-table thead th { height: 30px; border-top: 0; background: var(--c-table-head); font-size: 16px; font-weight: 500; line-height: 1; letter-spacing: 0.05em; }
.s02-table tbody th { height: 67px; font-size: 18px; font-weight: 500; line-height: 1.2; letter-spacing: 0.05em; }
.s02-table tbody tr:last-child th { height: 63px; }
.s02-table td { color: var(--c-accent); font-size: 16px; line-height: 1; letter-spacing: 0; }
.s02-note { margin-top: 20px; font-size: 14px; line-height: 22px; letter-spacing: 0.05em; }

.s02-btn {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  width: 232px; height: 54px; margin-top: 30px; padding: 0 20px 0 32px; border-radius: 4px;
  background: var(--c-accent); color: var(--c-white);
  font-family: var(--font-serif); font-size: 18px; font-weight: 700; line-height: 1; letter-spacing: 0; white-space: nowrap;
  transition: background-color var(--s02-ease);
}
.s02-btn img { flex: none; width: 20px; height: 20px; }

/* ---------- 写真の帯（480×340 を横一列。右から左へ流れ続ける。注意書き 1775:84843）＋ご予約・お問い合わせ ---------- */
.s02-contact { --s02-ph: 480px; }
.s02-slider { overflow-x: auto; overflow-y: hidden; height: calc(var(--s02-ph) * 340 / 480); scrollbar-width: none; }
.s02-slider::-webkit-scrollbar { display: none; }
.s02-slider-track { display: flex; width: max-content; margin-left: -2px; animation: s02-flow 90s linear infinite; }
.s02-slider-track img { flex: none; width: var(--s02-ph); height: calc(var(--s02-ph) * 340 / 480); object-fit: cover; }
@keyframes s02-flow { to { transform: translateX(-25%); } } /* 4 列のうち 1 列ぶん（1440px）流れて先頭に戻る */
@media (prefers-reduced-motion: reduce) { .s02-slider-track { animation: none; } }

.s02-card2 {
  position: relative; display: flex; justify-content: center; align-items: center; gap: 60px;
  width: min(1100px, 100% - var(--gutter) * 2); margin: -128px 0 0 max(var(--gutter), 50% - 552px); padding: 60px 120px;
  border-radius: 10px; background: #fefdfd; box-shadow: var(--s02-shadow);
}
.s02-access { flex: 0 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
/* 地図が読み込まれるまで（つながらない時も）Figma の地図の絵を下に敷く */
.s02-map { position: relative; height: 290px; background: #e5e3df var(--img-8cc73623e5951a30) center / cover no-repeat; }
.s02-map iframe { display: block; width: 100%; height: 100%; }
.s02-map-link { position: absolute; left: 7px; bottom: -1px; display: flex; align-items: center; height: 44px; transition: opacity var(--s02-ease); }
.s02-map-link span {
  display: flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 2px; background: var(--c-white);
  box-shadow: 0 1px 4px rgba(71, 71, 71, 0.25);
  color: #1a73e8; font-size: 12px; font-weight: 500; line-height: 1; letter-spacing: -0.02em; white-space: nowrap;
}
.s02-map-link img { width: 11px; height: 11px; }
.s02-address { font-size: 14px; line-height: 18px; letter-spacing: 0.05em; }

.s02-reserve { flex: 0 1 401px; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 32px; }
.s02-reserve-body { display: flex; flex-direction: column; align-items: center; width: 100%; }
.s02-tel-label { padding-bottom: 4px; border-bottom: 1px solid var(--c-gray); font-size: 12px; font-weight: 500; line-height: 1; letter-spacing: 0.21em; white-space: nowrap; }
.s02-tel {
  display: flex; align-items: center; gap: 4px; height: 44px; margin: -2px 0 -6px;
  font-family: var(--font-en); font-size: 32px; font-weight: 500; line-height: 1; letter-spacing: 0.1em; white-space: nowrap;
}
.s02-tel .nn-svg { width: 31px; height: 31px; }
.s02-rbtn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 80px; margin-top: 16px; padding: 12px 22px; border-radius: 4px; color: var(--c-white);
  transition: background-color var(--s02-ease), box-shadow var(--s02-ease);
}
.s02-rbtn + .s02-rbtn { margin-top: 12px; }
.s02-rbtn--web { background: var(--c-accent); }
.s02-rbtn--line { background: var(--c-green-soft); }
.s02-pill {
  display: block; width: 220px; padding: 4px 0; border-radius: 50px; background: var(--c-white); text-align: center;
  font-size: 12px; font-weight: 500; line-height: 1; letter-spacing: 0.05em; white-space: nowrap;
}
.s02-rbtn--web .s02-pill { color: var(--c-accent); }
.s02-rbtn--line .s02-pill { color: var(--c-green-soft); }
.s02-rbtn-main { display: flex; align-items: center; gap: 4px; padding-left: 16px; font-family: var(--font-serif); font-size: 20px; font-weight: 700; line-height: 1; white-space: nowrap; }
.s02-icon { width: 22px; height: 22px; }
.s02-arrow { --nn-ac-bg: #fff; width: 18px; height: 18px; margin-left: 12px; }
.s02-rbtn--web .s02-arrow { color: var(--c-accent); }
.s02-rbtn--line .s02-arrow { color: var(--c-green-soft); }

@media (min-width: 768px) {
  .s02-tel { pointer-events: none; cursor: default; }
}

@media (hover: hover) {
  .s02-banner:hover, .s02-map-link:hover { opacity: 0.7; }
  .s02-tab:hover { background: var(--c-gold); color: var(--c-white); }
  .s02-btn:hover { background: var(--c-accent-deep); }
  .s02-rbtn--web:hover { background: var(--c-accent-deep); }
  .s02-rbtn--line:hover { background: var(--c-green); }
}

@media (max-width: 1180px) {
  .s02-card2 { padding: 60px clamp(32px, 6vw, 120px); gap: clamp(32px, 4vw, 60px); }
  .s02-card { padding-inline: clamp(24px, 4vw, 60px); }
}
@media (max-width: 1024px) {
  .s02-contact { --s02-ph: 360px; }
  .s02-card2 { flex-direction: column-reverse; align-items: stretch; gap: 40px; margin-top: -80px; padding: 48px 40px; }
  .s02-access, .s02-reserve { flex: none; width: min(560px, 100%); margin-inline: auto; }
  .s02-table tbody th { font-size: 16px; }
}
@media (max-width: 900px) {
  .s02-tab { font-size: 16px; letter-spacing: 0.05em; }
  .s02-table thead th { font-size: 14px; }
  .s02-table tbody th { font-size: 14px; }
}
@media (max-width: 767px) {
  .s02-h2 { font-size: 24px; gap: 4px; line-height: 1.2; }
  .s02-h2-en { font-size: 20px; }

  .s02-banners { grid-template-columns: minmax(0, 1fr); row-gap: 12px; width: auto; margin: 0 20px; padding: 40px 0 72px; }

  .s02-hours { padding: 100px 0 64px; background-size: 200% 60px, 100% calc(100% - 60px); background-position: top center, 0 60px; }
  .s02-tabs { width: auto; margin: 32px 16px 0; }
  .s02-tab-group { padding: 6px; gap: 6px; }
  .s02-tab { height: 44px; font-size: 14px; letter-spacing: 0.05em; }
  /* 3 つ以上のとき（呼吸器内科を出したとき）：同じ幅で折り返し、上段 2 つ・下段 1 つを中央に（注意書き 1775:84542） */
  .s02-tab-group:has(.s02-tab--3:not([hidden])) { flex-wrap: wrap; justify-content: center; border-radius: 40px; }
  .s02-tab-group:has(.s02-tab--3:not([hidden])) .s02-tab { flex: 0 1 calc((100% - 6px) / 2); }
  .s02-card { margin-top: 24px; padding: 32px 16px; }
  .s02-table tr > :first-child { width: 30%; }
  .s02-table thead th { height: 28px; font-size: 12px; }
  .s02-table tbody th, .s02-table tbody tr:last-child th { height: 39px; font-size: 12px; letter-spacing: 0; }
  .s02-table td { font-size: 12px; }
  .s02-note { margin-top: 24px; font-size: 12px; line-height: 1.6; }
  .s02-btn { width: 100%; margin-top: 32px; }

  .s02-contact { --s02-ph: 200px; }
  .s02-card2 { flex-direction: column-reverse; width: auto; margin: -24px 0 0; padding: 40px 20px 32px; gap: 32px; border-radius: 10px 10px 0 0; }
  .s02-access, .s02-reserve { width: 100%; }
  .s02-reserve { gap: 24px; }
  .s02-tel { margin-top: 0; }
  .s02-rbtn-main { font-size: 18px; }
  .s02-map { height: 240px; }
  .s02-address { padding-inline: 16px; font-size: 12px; line-height: 1.2; }
}

/* ===== s03 お知らせ・コンセプト・当院が選ばれる 6つの理由 ===== */

.s03 { --s03-ease: 0.3s ease-out; }
:where(.s03) :where(ul, ol) { list-style: none; margin: 0; padding: 0; }
:where(.s03) :where(p, h2, h3) { margin: 0; }
:where(.s03) a { text-decoration: none; }

/* ---------- お知らせ ---------- */
.s03-news { width: min(1100px, 100% - var(--gutter) * 2); margin-inline: auto; padding: 120px 0; }
.s03-news-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; }
.s03-h2 {
  display: flex; flex-direction: column; gap: 8px;
  font-family: var(--font-serif); font-size: 36px; font-weight: 700; line-height: 1; letter-spacing: 0.1em; white-space: nowrap;
}
.s03-h2-en { color: #f3d0b8; font-family: var(--font-en); font-size: 24px; font-weight: 400; letter-spacing: 0.05em; }

/* 絞り込み（ページ遷移せずに切り替える。押せる所は 44px） */
.s03-filter {
  position: relative; z-index: 0; display: flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 20px; border: 1px solid #f3d0b8; border-radius: 10px; background: var(--c-white);
}
.s03-tag {
  position: relative; display: flex; align-items: center; gap: 4px; height: 44px; margin: -2px 0; padding: 0 8px; cursor: pointer;
  color: var(--c-accent); font-size: 14px; font-weight: 500; line-height: 1; letter-spacing: 0.1em; white-space: nowrap;
  transition: color var(--s03-ease);
}
.s03-tag input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.s03-tag::before {
  content: ""; position: absolute; inset: 11px 0; z-index: -1; border-radius: 4px; background: transparent;
  transition: background-color var(--s03-ease);
}
.s03-tag img { width: 13px; height: 13px; }
.s03-tag-on { display: none; }
.s03-tag:has(input:checked) { color: var(--c-white); }
.s03-tag:has(input:checked)::before { background: var(--c-accent); border-radius: 5px; }
.s03-tag:has(input:checked) .s03-tag-on { display: block; }
.s03-tag:has(input:checked) .s03-tag-off { display: none; }
.s03-tag:has(input:focus-visible) { outline: 2px solid var(--c-accent); outline-offset: 2px; }

/* 一覧（1 件 53px） */
.s03-list { margin-top: 32px; }
.s03-item { position: relative; border-bottom: 1px dashed #f3d0b8; }
.s03-item[hidden] { display: none; }
/* ホバーの下線：横方向へなめらかに（約0.5秒／ease。注意書き 1783:86174） */
.s03-item::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--c-accent);
  transform: scaleX(0); transform-origin: left; transition: transform 0.5s ease;
}
.s03-item-link { display: flex; align-items: center; height: 52px; padding: 0 12px; }
.s03-item-meta { display: flex; align-items: center; gap: 12px; flex: 0 0 200px; }
.s03-date { font-family: var(--font-en); font-size: 14px; line-height: 1; letter-spacing: 0; }
.s03-cat {
  padding: 4px 8px; border-radius: 3px; background: var(--c-accent); color: var(--c-white);
  font-size: 12px; font-weight: 500; line-height: 10px; letter-spacing: 0; white-space: nowrap;
}
.s03-cat:empty { display: none; }
.s03-item-title {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: var(--font-serif); font-size: 16px; font-weight: 600; line-height: 1.25; letter-spacing: 0.05em;
  transition: transform var(--s03-ease), color var(--s03-ease);
}
.s03-item-arrow { display: grid; place-items: center; flex: 0 0 20px; height: 20px; border-radius: 50%; background: var(--c-white); }
.s03-item-arrow img { width: 16px; height: 16px; }

.s03-empty { padding: 16px 12px; border-bottom: 1px dashed #f3d0b8; font-size: 14px; }
.s03-empty[hidden] { display: none; }

/* もっと見る（220×54） */
.s03-more {
  display: flex; justify-content: flex-start; align-items: center; gap: 16px;
  width: 220px; height: 54px; margin: 56px auto 0; padding: 0 20px 0 32px; border-radius: 4px;
  background: var(--c-accent); color: var(--c-white);
  font-family: var(--font-serif); font-size: 18px; font-weight: 700; line-height: 1; white-space: nowrap;
  transition: background-color var(--s03-ease);
}
.s03-more img { width: 20px; height: 20px; margin-left: auto; }

/* ---------- コンセプト ---------- */
.s03-concept { padding-bottom: 120px; }
.s03-concept-box {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 40px;
  width: min(1220px, 100% - var(--gutter) * 2); margin-inline: auto; padding: 100px 80px;
  border-radius: 10px; background: #f7ece4;
}
.s03-concept-text { flex: 0 1 576px; min-width: 0; }
.s03-concept-title {
  display: flex; flex-direction: column;
  font-family: var(--font-serif); font-size: 36px; font-weight: 700; line-height: 1.2; letter-spacing: 0;
}
.s03-concept-en {
  margin-bottom: 8px; color: #f3d0b8;
  font-family: var(--font-en); font-size: 24px; font-weight: 400; line-height: 1; letter-spacing: 0.05em;
}
.s03-concept-text p { font-size: 16px; line-height: 1.6; letter-spacing: 0.1em; }
.s03-concept-title + p { margin-top: 32px; }
.s03-concept-text p + p { margin-top: 16px; }

/* 写真 2 枚（重ねる。471×484 を比率のまま縮める） */
.s03-concept-photos {
  position: relative; flex: 0 0 auto;
  width: min(471px, 32.71vw); aspect-ratio: 471 / 484;
  margin: -43px max(-110px, -7.64vw) -8px 0;
}
.s03-concept-photos > img, .s03-concept-photo1 { position: absolute; object-fit: cover; }
.s03-concept-photo1 { right: 0; top: 0; width: 76.43%; height: 82.64%; border-radius: 5px; overflow: hidden; }
.s03-concept-photo1 img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 1025px) {
  .s03-concept-photo1 img { object-fit: none; object-position: -150px -55px; }
}
.s03-concept-photo2 { left: 0; top: 54.13%; width: 42.46%; height: 45.87%; border-radius: 4.84px; }

/* ---------- 6つの理由 ---------- */
.s03-reason { position: relative; }
/* 楕円（幅 3354・高さ 1392）の上下の端。幅は画面に比例させ、深さを保つ */
.s03-curve { --s03-ry: 696px; height: 68px; }
.s03-curve--top { background: radial-gradient(116.46% var(--s03-ry) at 50% var(--s03-ry), var(--c-beige) calc(100% - 0.5px), transparent 100%); }
.s03-curve--bottom { background: radial-gradient(116.46% var(--s03-ry) at 50% calc(100% - var(--s03-ry)), var(--c-beige) calc(100% - 0.5px), transparent 100%); }
.s03-reason-body { padding: 40px 0 80px; background: var(--c-beige); }

.s03-reason-title { display: flex; justify-content: center; align-items: flex-end; gap: 8px; padding-left: 100px; font-weight: 700; }
.s03-reason-ja { display: flex; flex-direction: column; font-family: var(--font-serif); letter-spacing: 0.1em; white-space: nowrap; }
.s03-reason-l1 { font-size: 40px; line-height: 38px; height: 38px; }
.s03-reason-l2 { display: flex; align-items: baseline; height: 76px; font-size: 58px; line-height: 76px; }
.s03-reason-num { font-family: var(--font-en); font-size: 93px; font-weight: 600; }
.s03-reason-s { font-size: 50px; }
.s03-reason-en {
  padding-bottom: 26px; color: var(--c-gold);
  font-family: var(--font-en); font-size: 31px; font-weight: 400; line-height: 1; letter-spacing: 0.05em;
}

/* カード（3列 → 2列 → 1列） */
.s03-cards {
  display: grid; grid-template-columns: repeat(3, minmax(0, 390px)); justify-content: center; gap: 20px;
  width: min(1210px, 100% - var(--gutter) * 2); margin: 56px auto 0;
}
.s03-card { padding: 20px; border-radius: 10px; background: var(--c-white); box-shadow: 0 0 10px rgba(109, 97, 61, 0.15); }
.s03-card-photo { position: relative; aspect-ratio: 350 / 200; border-radius: 5px; overflow: hidden; }
.s03-card-photo img { width: 100%; height: 100%; object-fit: cover; }
.s03-card:nth-child(1) .s03-card-photo img { object-position: 50% 70%; }
.s03-card:nth-child(3) .s03-card-photo img { object-position: 50% 100%; }
.s03-card:nth-child(4) .s03-card-photo img { object-position: 50% 0%; }
.s03-card:nth-child(6) .s03-card-photo img { object-position: 50% 15%; }
.s03-card-no {
  position: absolute; left: 0; top: 0; display: flex; align-items: baseline;
  width: 95px; height: 28px; padding: 0 6px 6px 0; border-radius: 0 0 5px 0; background: var(--c-white);
  color: var(--c-accent); font-family: var(--font-en); font-size: 16px; font-weight: 500; line-height: 22px; letter-spacing: 0;
}
.s03-card-no b { font-size: 22px; font-weight: 500; margin-left: 1.76px; }
.s03-card-title {
  margin-top: 16px; color: var(--c-accent-deep);
  font-family: var(--font-serif); font-size: 20px; font-weight: 700; line-height: 1.4; letter-spacing: 0.05em;
}
.s03-card-text { margin-top: 8px; font-size: 14px; line-height: 22px; letter-spacing: 0.05em; font-feature-settings: "palt"; text-spacing-trim: normal; }

@media (hover: hover) {
  .s03-tag:hover { color: var(--c-white); }
  .s03-tag:hover::before { background: var(--c-accent); }
  .s03-tag:hover .s03-tag-on { display: block; }
  .s03-tag:hover .s03-tag-off { display: none; }
  .s03-item:hover::after { transform: scaleX(1); }
  .s03-item:hover .s03-item-title { color: var(--c-accent); transform: translateX(5px); }
  .s03-more:hover { background: var(--c-accent-deep); }
}
@media (max-width: 1199px) {
  .s03-concept-box { padding-inline: 60px; }
}
@media (max-width: 1024px) {
  .s03-concept-box { flex-direction: column; align-items: center; padding: 60px 40px; }
  .s03-concept-photos { order: -1; width: min(471px, 100%); margin: 0; }
  .s03-concept-text { flex: none; width: min(576px, 100%); }
  .s03-cards { grid-template-columns: repeat(2, minmax(0, 390px)); }
}
@media (max-width: 767px) {
  .s03-news { width: auto; margin-inline: 20px; padding: 80px 0; }
  .s03-news-head { flex-direction: column; align-items: stretch; gap: 24px; }
  .s03-h2 { font-size: 24px; }
  .s03-h2-en { font-size: 20px; }
  .s03-filter { justify-content: center; gap: 4px; padding: 0 8px; }
  .s03-tag { padding: 0 6px; font-size: 12px; }
  .s03-list { margin-top: 24px; }
  .s03-item-link { flex-wrap: wrap; align-items: center; height: auto; min-height: 72px; padding: 14px 4px; row-gap: 10px; }
  .s03-item-meta { flex: 0 0 100%; }
  .s03-item-title { flex: 1 1 calc(100% - 40px); font-size: 14px; }
  .s03-more { position: relative; justify-content: center; width: 100%; height: 50px; margin-top: 40px; }
  .s03-more img { position: absolute; right: 20px; }

  .s03-concept { padding-bottom: 80px; }
  .s03-concept-box { width: auto; margin-inline: 20px; padding: 40px 20px; gap: 32px; }
  .s03-concept-title { font-size: 24px; letter-spacing: 0.05em; }
  .s03-concept-en { font-size: 20px; }
  .s03-concept-text p { font-size: 14px; }
  .s03-concept-title + p { margin-top: 24px; }

  .s03-curve { --s03-ry: 300px; height: 30px; }
  .s03-reason-body { padding: 30px 0 60px; }
  .s03-reason-title { flex-direction: column; align-items: center; gap: 4px; padding-left: 0; }
  .s03-reason-ja { align-items: center; }
  .s03-reason-l1 { font-size: 28px; line-height: 34px; height: 34px; }
  .s03-reason-l2 { height: 58px; font-size: 40px; line-height: 58px; }
  .s03-reason-num { font-size: 64px; }
  .s03-reason-s { font-size: 34px; }
  .s03-reason-en { padding-bottom: 0; font-size: 22px; }
  .s03-cards { grid-template-columns: minmax(0, 390px); width: auto; margin: 32px 20px 0; }
  .s03-card-title { font-size: 18px; }
}

/* ===== ページの途中の予約の帯（template-parts/top/cta.php。6つの理由の下・病気の一覧の下） ===== */
.tcta {
  --tcta-ease: 0.3s ease-out;
  position: relative; display: flex; justify-content: center; align-items: center; gap: 40px;
  width: min(var(--inner), 100% - var(--gutter) * 2); min-height: 330px; margin-inline: auto; padding: 60px;
  border-radius: 10px; overflow: hidden; background: #877f6e;
}
.s03 .tcta { margin-top: 80px; }
.tcta :where(p, h2) { margin: 0; }
.tcta a { text-decoration: none; }
.tcta-bg { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.tcta::before { content: ""; position: absolute; inset: 0; z-index: 1; background: rgba(135, 127, 110, 0.75); }
.tcta-head, .tcta-card { position: relative; z-index: 2; }
.tcta-head { flex: 0 0 393px; color: var(--c-white); }
.tcta-title {
  display: flex; flex-direction: column; gap: 8px;
  font-family: var(--font-serif); font-size: 36px; font-weight: 700; line-height: 1; letter-spacing: 0.1em; white-space: nowrap;
}
.tcta-en { color: var(--c-beige); font-family: var(--font-en); font-size: 24px; font-weight: 400; letter-spacing: 0.05em; }
.tcta-text { margin-top: 24px; font-family: var(--font-serif); font-size: 16px; font-weight: 700; line-height: 1.4; letter-spacing: 0.1em; }
.tcta-card {
  display: flex; flex-direction: column; align-items: center;
  flex: 0 1 565px; padding: 32px; border-radius: 10px; background: rgba(255, 255, 255, 0.85);
}
.tcta-tel-label { padding-bottom: 4px; border-bottom: 1px solid var(--c-text); font-size: 14px; font-weight: 500; line-height: 1; letter-spacing: 0.1em; }
.tcta-tel {
  display: flex; align-items: center; gap: 4px; height: 44px; margin: 0 0 -7px;
  font-family: var(--font-en); font-size: 36px; font-weight: 500; line-height: 1; letter-spacing: 0.1em; white-space: nowrap;
}
.tcta-tel-icon { width: 35px; height: 35px; }
.tcta-btns { display: flex; gap: 20px; margin-top: 20px; }
.tcta-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  width: 240px; height: 66px; padding: 12px 8px; border-radius: 4px; color: var(--c-white);
  transition: filter var(--tcta-ease), box-shadow var(--tcta-ease);
}
.tcta-btn--web { background: var(--c-accent-deep); }
.tcta-btn--line { background: var(--c-green); width: 241px; }
.tcta-pill {
  display: block; width: 182px; padding: 4px 0; border-radius: 50px; background: var(--c-white); text-align: center;
  font-size: 12px; font-weight: 500; line-height: 1; letter-spacing: 0.05em; white-space: nowrap;
}
.tcta-btn--web .tcta-pill, .tcta-btn--web .tcta-arrow { color: var(--c-accent-deep); }
.tcta-btn--line .tcta-pill, .tcta-btn--line .tcta-arrow { color: var(--c-green); }
.tcta-btn-main { display: flex; align-items: center; gap: 4px; font-family: var(--font-serif); font-size: 16px; font-weight: 700; line-height: 1; white-space: nowrap; }
.tcta-icon { width: 16px; height: 16px; }
.tcta-btn--line .tcta-icon { width: 20px; height: 18px; }
.tcta-arrow { --nn-ac-bg: #fff; width: 16px; height: 16px; margin-left: 12px; }

@media (min-width: 768px) {
  .tcta-tel { pointer-events: none; cursor: default; }
}
@media (hover: hover) {
  .tcta-btn:hover { filter: brightness(0.92); }
}
@media (max-width: 1199px) {
  .tcta { flex-direction: column; align-items: center; gap: 32px; padding: 48px 40px; }
  .tcta-head, .tcta-card { flex: none; width: min(565px, 100%); }
}
@media (max-width: 767px) {
  .tcta { width: auto; min-height: 0; margin-inline: 20px; padding: 32px 11px; align-items: stretch; gap: 0; }
  .s03 .tcta { margin-top: 60px; }
  .tcta-head { width: auto; }
  .tcta-title { font-size: 24px; gap: 8px; }
  .tcta-en { font-size: 20px; }
  .tcta-text { margin-top: 22px; font-size: 14px; line-height: 1.65; }
  .tcta-card { width: auto; margin-top: 19px; padding: 32px 19px; }
  .tcta-tel { font-size: 30px; margin-top: 2px; }
  .tcta-tel-icon { width: 30px; height: 30px; }
  .tcta-btns { flex-direction: column; gap: 16px; width: 100%; margin-top: 11px; }
  .tcta-btn, .tcta-btn--line { width: 100%; height: 80px; gap: 8px; }
  .tcta-pill { width: 222px; }
  .tcta-btn-main { font-size: 18px; }
  .tcta-icon, .tcta-btn--line .tcta-icon { width: 20px; height: 20px; }
  .tcta-arrow { width: 18px; height: 18px; margin-left: 16px; }
}

/* ===== s04 内視鏡検査のご案内＋診療のご案内 ===== */

.s04 { --s04-ease: 0.3s ease-out; }

.s04-h2 { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 0; font-weight: 400; }
.s04-h2-ja { font-family: var(--font-serif); font-weight: 700; font-size: 36px; line-height: 1; letter-spacing: 0.1em; color: var(--c-text); }
.s04-h2-en { font-family: var(--font-en); font-size: 24px; line-height: 1; letter-spacing: 0.05em; color: #f3d0b8; }
.s04-h2--left { align-items: flex-start; }
.s04-h2--left .s04-h2-ja { color: var(--c-white); }

/* ---------- 内視鏡検査のご案内 ---------- */
.s04-endo { display: flex; flex-direction: column; align-items: center; gap: 32px; padding: 120px 0; }
.s04-guide {
  width: min(1100px, 100% - var(--gutter) * 2); padding: 62px 20px;
  border-radius: 10px; background: #fafafa; box-shadow: 0 0 10px rgba(109, 97, 61, 0.15);
  display: flex; flex-direction: column; align-items: center; gap: 32px;
}
.s04-guide-head { width: min(915px, 100%); display: flex; flex-direction: column; gap: 24px; text-align: center; }
.s04-guide-title { margin: 0; font-family: var(--font-serif); font-weight: 700; font-size: 32px; line-height: 1; letter-spacing: 0.1em; color: var(--c-accent); }
.s04-guide-lead { margin: 0; font-size: 16px; line-height: 1.6; letter-spacing: 0.1em; }
.s04-guide-row { width: min(925px, 100%); display: flex; align-items: center; gap: 39px; }
.s04-guide--rev .s04-guide-photo { order: 2; }
.s04-guide-photo { flex: 0 1 445px; aspect-ratio: 445 / 361; position: relative; overflow: hidden; border-radius: 10px; container-type: size; }
.s04-guide-photo img { position: absolute; max-width: none; }
.s04-guide-photo--gastro img { inset: 0; width: 100%; height: 100%; object-fit: cover; }
.s04-guide-photo--colon img { width: 159cqw; height: auto; left: -51.7cqw; top: -10.2cqh; }

/* 関連リンク */
.s04-links-wrap { flex: 0 1 440px; min-width: 0; position: relative; }
.s04-links { list-style: none; margin: 0; padding: 0; }
.s04-link {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 57px; padding: 20px 10px 16px; border-bottom: 1px dashed var(--c-accent);
  text-decoration: none; color: var(--c-text); transition: border-color var(--s04-ease);
}
.s04-link-text { font-size: 15px; line-height: 20px; letter-spacing: 0.05em; transition: color var(--s04-ease), transform var(--s04-ease); }
.s04-link-arrow {
  flex: none; display: flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 10px; background: var(--c-white); transition: background-color var(--s04-ease);
}
.s04-link-arrow img { width: 16px; height: 16px; transition: filter var(--s04-ease); }

/* もっと見る（スマホだけ） */
.s04-more-input, .s04-more { display: none; }

/* 相談の一言と予約ボタン */
.s04-cta { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.s04-cta-lead {
  display: flex; align-items: flex-end; justify-content: center; gap: 8px; margin: 0;
  font-family: var(--font-serif); font-weight: 700; font-size: 16px; line-height: 1.4; letter-spacing: 0.05em; text-align: center;
}
.s04-cta-lead img { flex: none; width: 11px; height: 19px; }
.s04-sp-br { display: none; }
.s04-cta-btns { display: flex; justify-content: center; gap: 20px; }
.s04-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  width: 241px; height: 66px; padding: 12px 22px; border-radius: 4px;
  color: var(--c-white); text-decoration: none; transition: background-color var(--s04-ease);
}
.s04-btn--web { background: var(--c-accent); }
.s04-btn--line { background: var(--c-green-soft); }
.s04-btn-pill {
  display: block; width: 182px; padding: 4px 0; border-radius: 50px; background: var(--c-white); text-align: center;
  font-size: 12px; font-weight: 500; line-height: 1; letter-spacing: 0.05em; white-space: nowrap; transition: color var(--s04-ease);
}
.s04-btn--web .s04-btn-pill, .s04-btn--web .s04-btn-arrow { color: var(--c-accent); }
.s04-btn--line .s04-btn-pill, .s04-btn--line .s04-btn-arrow { color: var(--c-green-soft); }
.s04-btn-main { display: flex; align-items: center; font-family: var(--font-serif); font-weight: 700; font-size: 16px; line-height: 1; white-space: nowrap; }
.s04-btn--web .s04-btn-main { gap: 4px; }
.s04-btn-icon { width: 16px; height: 16px; }
.s04-btn--line .s04-btn-icon { width: 20px; height: 18px; }
.s04-btn-arrow { --nn-ac-bg: #fff; width: 16px; height: 16px; margin-left: 12px; transition: color var(--s04-ease); }
.s04-btn--web .s04-btn-arrow { margin-left: 8px; }

/* ---------- 診療のご案内 ---------- */
.s04-med { position: relative; padding: 120px 0; overflow: hidden; background: #8a7465; }
.s04-med-bg { position: absolute; inset: 0; container-type: size; }
.s04-med-bg img { position: absolute; max-width: none; width: 120.6cqw; height: auto; right: 0; top: -11.5cqw; }
.s04-med-bg::after { content: ""; position: absolute; inset: 0; background: rgba(138, 116, 101, 0.7); }
.s04-med-inner { position: relative; width: min(1200px, 100% - var(--gutter) * 2); margin-inline: auto; }
.s04-med-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; margin: 0 -2px 32px -3px; }
.s04-med-lead { flex: 0 1 800px; margin: 0; font-size: 16px; line-height: 1.6; letter-spacing: 0.1em; color: var(--c-white); }
.s04-med-large, .s04-med-small { list-style: none; margin: 0; padding: 0; display: grid; }
.s04-med-large { grid-template-columns: repeat(2, 1fr); gap: 24px; margin-bottom: 24px; }
.s04-med-small { grid-template-columns: repeat(3, 1fr); gap: 24px 30px; }
.s04-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 100px; height: 100%; padding: 12px 24px;
  border-radius: 10px; background: rgba(255, 255, 255, 0.95); box-shadow: 0 0 10px rgba(102, 84, 72, 0.15);
  color: var(--c-text); text-decoration: none;
  transition: background-color var(--s04-ease), box-shadow var(--s04-ease);
}
.s04-card--l { min-height: 150px; padding: 12px 32px; gap: 20px; }
.s04-card-body { flex: 0 1 295px; min-width: 0; display: flex; align-items: center; gap: 6px; transition: transform var(--s04-ease); }
.s04-card--l .s04-card-body { flex-basis: 439px; gap: 20px; }
.s04-card-icon { flex: none; position: relative; width: 50px; height: 50px; }
.s04-card--l .s04-card-icon { width: 60px; height: 60px; }
.s04-card-icon > img { display: block; }
.s04-card-icon .s04-ip { position: absolute; left: calc(var(--x) * 1px); top: calc(var(--y) * 1px); }
.s04-card-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.s04-card--l .s04-card-text { gap: 8px; }
.s04-card-title { font-family: var(--font-serif); font-weight: 700; font-size: 16px; line-height: 1.4; letter-spacing: 0.05em; }
.s04-card--l .s04-card-title { font-size: 20px; }
.s04-card-sub { display: block; font-size: 16px; }
.s04-card-desc { font-size: 12px; line-height: 1.4; letter-spacing: 0.1em; }
.s04-card-btn { flex: none; width: 24px; height: 24px; }

@media (hover: hover) {
  .s04-link:hover { border-bottom-style: solid; }
  .s04-link:hover .s04-link-text { color: var(--c-accent); transform: translateX(4px); }
  .s04-link:hover .s04-link-arrow { background: var(--c-accent); }
  .s04-link:hover .s04-link-arrow img { filter: brightness(0) invert(1); }
  .s04-btn--web:hover { background: var(--c-accent-deep); }
  .s04-btn--web:hover .s04-btn-pill, .s04-btn--web:hover .s04-btn-arrow { color: var(--c-accent-deep); }
  .s04-btn--line:hover { background: var(--c-green); }
  .s04-btn--line:hover .s04-btn-pill, .s04-btn--line:hover .s04-btn-arrow { color: var(--c-green); }
  .s04-card:hover { background: var(--c-white); box-shadow: 0 0 20px rgba(102, 84, 72, 0.3); }
  .s04-card:hover .s04-card-body { transform: translateX(5px); }
}
@media (max-width: 1199px) {
  .s04-pc-br { display: none; }
}
@media (max-width: 1024px) {
  .s04-guide-row { flex-direction: column; gap: 32px; }
  .s04-guide--rev .s04-guide-photo { order: 0; }
  .s04-guide-photo { flex: none; width: min(445px, 100%); }
  .s04-links-wrap { flex: none; width: min(560px, 100%); }
  .s04-med-head { flex-direction: column; gap: 24px; margin-inline: 0; }
  .s04-med-lead { flex: none; }
  .s04-med-small { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .s04-med-large { gap: 16px; margin-bottom: 16px; }
}
@media (max-width: 900px) {
  .s04-med-large { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .s04-h2 { gap: 4px; }
  .s04-h2-ja { font-size: 24px; }
  .s04-h2-en { font-size: 20px; }

  .s04-endo { padding: 80px 0; }
  .s04-guide { width: calc(100% - 40px); padding: 40px 10px; gap: 32px; }
  .s04-guide-head { gap: 32px; }
  .s04-guide-title { font-size: 20px; }
  .s04-guide-lead { line-height: 1.8; text-align: left; }
  .s04-guide-row { gap: 39px; }
  .s04-guide-photo { width: 100%; aspect-ratio: 330 / 260; }
  .s04-links-wrap { width: 100%; }

  /* 関連リンクは最初の 2 件（3件目は薄く）＋「もっと見る」（注意書き 1797:219733） */
  .s04-links { position: relative; max-height: 169px; overflow: hidden; }
  .s04-links::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 64px; background: linear-gradient(rgba(250, 250, 250, 0), #fafafa); pointer-events: none; }
  .s04-links li:nth-child(n+4) { visibility: hidden; }
  /* 注意書きは「初期状態では2件まで」。Figma の絵は3件目を薄く見せるので見た目は残し、閉じている間は3件目を押せなくする */
  .s04-more-input:not(:checked) ~ .s04-links li:nth-child(3) { pointer-events: none; }
  .s04-more { display: flex; align-items: center; justify-content: center; gap: 6px; height: 56px; font-size: 14px; font-weight: 700; line-height: 1; letter-spacing: 0.05em; }
  .s04-more::after { content: "＋"; font-size: 14px; }
  .s04-more-close { display: none; }
  .s04-more-input { display: block; position: absolute; left: 0; bottom: 0; width: 100%; height: 56px; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
  .s04-more-input:checked ~ .s04-links { max-height: none; }
  .s04-more-input:checked ~ .s04-links::after { content: none; }
  .s04-more-input:checked ~ .s04-links li { visibility: visible; }
  .s04-more-input:checked ~ .s04-more .s04-more-open { display: none; }
  .s04-more-input:checked ~ .s04-more .s04-more-close { display: inline; }
  .s04-more-input:checked ~ .s04-more::after { content: "−"; }
  .s04-more-input:focus-visible ~ .s04-more { outline: 2px solid var(--c-accent); outline-offset: -2px; }

  .s04-cta { width: 100%; gap: 16px; }
  .s04-cta-lead { gap: 4px; font-size: 14px; }
  .s04-cta-lead img { width: 18px; height: 32px; }
  .s04-sp-br { display: inline; }
  .s04-cta-btns { flex-direction: column; gap: 20px; width: 100%; }
  .s04-btn { width: 100%; height: 80px; gap: 8px; }
  .s04-btn-pill { width: 220px; }
  .s04-btn-main { font-size: 18px; }
  .s04-btn-icon, .s04-btn--line .s04-btn-icon { width: 20px; height: 20px; }
  .s04-btn-arrow, .s04-btn--web .s04-btn-arrow { width: 18px; height: 18px; margin-left: 16px; }

  .s04-med { padding: 80px 0; }
  .s04-med-inner { width: calc(100% - 40px); }
  .s04-med-head { gap: 26px; margin-bottom: 32px; }
  .s04-med-large { grid-template-columns: 1fr; gap: 8px; margin-bottom: 8px; }
  .s04-med-small { grid-template-columns: repeat(2, 1fr); gap: 8px; }

  .s04-card--l { min-height: 120px; padding: 12px 20px; }
  .s04-card--l .s04-card-body { gap: 8px; }
  .s04-card--l .s04-card-icon { zoom: 0.5; }
  .s04-card--l .s04-card-title { font-size: 18px; }
  .s04-card--l .s04-card-sub { font-size: 14px; }

  .s04-med-small .s04-card { flex-direction: column; justify-content: flex-start; gap: 4px; min-height: 156px; padding: 12px 8px; text-align: center; }
  .s04-med-small .s04-card-body { flex: none; width: 100%; flex-direction: column; gap: 4px; }
  .s04-med-small .s04-card-icon { zoom: 0.6; }
  .s04-med-small .s04-card-text { width: 100%; align-items: center; }
  .s04-med-small .s04-card-title { line-height: 1.2; }
  .s04-med-small .s04-card-btn { width: 20px; height: 20px; margin-top: auto; }
}

/* ===== s05 内視鏡検査をおすすめする症状・当院で診断できる病気 ===== */

.s05 { --s05-ease: 0.3s ease-out; --s05-line: #f3d0b8; --s05-shadow: 0 0 10px rgba(109, 97, 61, 0.15); background: var(--c-bg); }
:where(.s05) :where(ul) { list-style: none; margin: 0; padding: 0; }
:where(.s05) :where(p, h2, h3) { margin: 0; }
:where(.s05) a { text-decoration: none; }
.s05-sp { display: none; }

.s05-block { padding-top: 120px; }
.s05-block--conditions { padding-bottom: 120px; }
.s05-head {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding-inline: var(--gutter);
  font-family: var(--font-serif); font-size: 36px; font-weight: 700; line-height: 1; letter-spacing: 0.1em; text-align: center;
}
.s05-head-en { color: var(--s05-line); font-family: var(--font-en); font-size: 24px; font-weight: 400; letter-spacing: 0.05em; }

/* タブ（ラジオで切り替え。ページ遷移しない） */
.s05-tabset { width: min(1100px, 100% - var(--gutter) * 2); margin: 32px auto 0; }
.s05-tabs { display: flex; padding: 8px; border-radius: 70px; background: var(--c-white); box-shadow: var(--s05-shadow); }
.s05-tab { position: relative; flex: 1 1 0; min-width: 0; }
.s05-tab input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.s05-tab span {
  display: flex; align-items: center; justify-content: center; height: 60px; padding: 0 8px; border-radius: 30px;
  background: #f5f3ee; color: var(--c-gold);
  font-family: var(--font-serif); font-size: 20px; font-weight: 700; line-height: 1; letter-spacing: 0.1em; white-space: nowrap;
  transition: background-color var(--s05-ease), color var(--s05-ease);
}
.s05-tab input:checked + span { background: var(--c-gold); color: var(--c-white); }
.s05-tab input:focus-visible + span { outline: 2px solid var(--c-accent); outline-offset: 2px; }

.s05-panel { display: none; }
.s05-tabset:has(input[value="1"]:checked) .s05-panel--1,
.s05-tabset:has(input[value="2"]:checked) .s05-panel--2,
.s05-tabset:has(input[value="3"]:checked) .s05-panel--3,
.s05-tabset:has(input[value="4"]:checked) .s05-panel--4,
.s05-tabset:has(input[value="5"]:checked) .s05-panel--5 { display: block; }

.s05-card { margin-top: 20px; padding: 40px; border-radius: 10px; background: var(--c-white); box-shadow: var(--s05-shadow); }
.s05-tabset:has(input[value="1"]:checked) .s05-card--groups.s05-panel--1,
.s05-tabset:has(input[value="2"]:checked) .s05-card--groups.s05-panel--2,
.s05-tabset:has(input[value="3"]:checked) .s05-card--groups.s05-panel--3,
.s05-tabset:has(input[value="4"]:checked) .s05-card--groups.s05-panel--4,
.s05-tabset:has(input[value="5"]:checked) .s05-card--groups.s05-panel--5 { display: flex; flex-direction: column; gap: 40px; }

/* 症状・病気のリンク（下に点線） */
.s05-links { display: grid; row-gap: 16px; }
.s05-links--symptom { grid-template-columns: repeat(4, minmax(0, 220px)); justify-content: space-between; column-gap: 16px; }
.s05-links--disease { grid-template-columns: repeat(4, minmax(0, 240px)); column-gap: 20px; }
.s05-links--narrow { column-gap: 16px; }
.s05-link {
  display: flex; align-items: center; gap: 16px; height: 60px; padding: 4px 0;
  background: linear-gradient(90deg, var(--s05-line) 50%, transparent 0) left bottom / 8px 1px repeat-x;
  font-size: 14px; line-height: 1.2; letter-spacing: 0.1em;
}
.s05-link span { flex: 1 1 auto; min-width: 0; transition: color var(--s05-ease), transform var(--s05-ease); }
.s05-link::after { content: ""; flex: none; width: 20px; height: 20px; background: url("icons/arrow-circle.svg") no-repeat center / 100% 100%; }
/* 見た目は高さ 40px。押せる所を 44px にするため上下に 2px ずつ広げ、点線は 2px 上に引く */
.s05-links--disease .s05-link { gap: 0; height: 44px; margin-block: -2px; padding: 6px 20px 6px 0; background-position: left calc(100% - 2px); }
.s05-links--disease .s05-link::after { width: 16px; height: 16px; }
.s05-group-title { margin-bottom: 16px; color: var(--c-accent); font-size: 18px; font-weight: 500; line-height: 1; letter-spacing: 0.05em; }

.s05-foot { padding-bottom: 120px; }

@media (hover: hover) {
  .s05-tab:hover span { background: var(--c-gold); color: var(--c-white); }
  .s05-link:hover span { color: var(--c-accent); transform: translateX(4px); }
}
@media (max-width: 1024px) {
  .s05-card { padding: 40px 32px; }
  .s05-links--symptom, .s05-links--disease { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 24px; }
  .s05-tab span { font-size: 18px; letter-spacing: 0.05em; }
}
@media (max-width: 860px) {
  .s05-tabs--4 .s05-tab span, .s05-tabs--5 .s05-tab span { font-size: 16px; padding: 0 4px; }
}
@media (max-width: 767px) {
  .s05-sp { display: inline; }
  .s05-block { padding-top: 80px; }
  .s05-block--conditions { padding-bottom: 80px; }
  .s05-head { gap: 4px; font-size: 24px; line-height: 1.2; }
  .s05-head-en { font-size: 20px; line-height: 1; }

  .s05-tabset { width: calc(100% - 40px); }
  .s05-tab span { font-size: 14px; letter-spacing: 0.1em; }
  /* 5 項目は上 3・下 2、4 項目は 2・2（注意書き 1775:84542） */
  .s05-tabs--4, .s05-tabs--5 { flex-wrap: wrap; justify-content: center; gap: 4px; padding: 8px 6px; border-radius: 40px; }
  .s05-tabs--5 .s05-tab { flex: 0 1 calc((100% - 8px) / 3); }
  .s05-tabs--4 .s05-tab { flex: 0 1 calc((100% - 4px) / 2); }
  .s05-tabs--4 .s05-tab span, .s05-tabs--5 .s05-tab span { padding: 0 4px; font-size: 14px; }

  .s05-card { padding: 40px 12px; }
  .s05-tabset:has(input[value="1"]:checked) .s05-card--groups.s05-panel--1,
  .s05-tabset:has(input[value="2"]:checked) .s05-card--groups.s05-panel--2,
  .s05-tabset:has(input[value="3"]:checked) .s05-card--groups.s05-panel--3,
  .s05-tabset:has(input[value="4"]:checked) .s05-card--groups.s05-panel--4,
  .s05-tabset:has(input[value="5"]:checked) .s05-card--groups.s05-panel--5 { gap: 32px; }
  .s05-links--symptom, .s05-links--disease, .s05-links--narrow { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; }
  .s05-link, .s05-links--disease .s05-link { gap: 6px; height: auto; min-height: 44px; margin-block: -2px; padding: 5px 0; background-position: left calc(100% - 2px); }
  .s05-link::after, .s05-links--disease .s05-link::after { width: 14px; height: 14px; }

  .s05-foot { padding-bottom: 80px; }
}

/* ===== s06 ご挨拶・外部掲載サイト・コラム・アクセス ===== */

.s06 { background: var(--c-bg); color: var(--c-text); }

/* 白い地の上下の波（高さ 100px） */
.s06-wave { height: 100px; background: center / 100% 100% no-repeat; }
.s06-wave--top { background-image: url("icons/wave-top.svg"); }
.s06-wave--bottom { background-image: url("icons/wave-bottom.svg"); }
.s06-white { display: flex; flex-direction: column; gap: 120px; padding: 40px 0; background: var(--c-white); }

.s06-title { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; font-weight: 700; }
.s06-title-ja { font-family: var(--font-serif); font-size: 36px; line-height: 1; letter-spacing: 0.1em; color: #514c46; }
.s06-title-en { font-family: var(--font-en); font-weight: 400; font-size: 24px; line-height: 1; letter-spacing: 0.05em; color: #f3d0b8; }
.s06-title--greet { align-items: flex-start; }

/* オレンジのボタン（220×54） */
.s06-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 16px;
  width: 220px; height: 54px; padding: 0 20px 0 32px; border-radius: 4px;
  background: var(--c-accent); color: #fff; text-decoration: none;
  font-family: var(--font-serif); font-weight: 700; font-size: 18px; line-height: 1; letter-spacing: 0;
  transition: background-color 0.3s ease-out;
}
.s06-btn-text { flex: 1; text-align: center; }
.s06-btn-icon { flex: none; width: 20px; height: 20px; }

/* ---------- ご挨拶 ---------- */
.s06-greet { width: min(var(--inner), 100% - var(--gutter) * 2); margin-inline: auto; }
.s06-title--greet + .s06-greet-body { margin-top: 32px; }
.s06-greet-body { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; }
.s06-greet-text {
  flex: 0 1 600px; min-width: 0;
  font-family: var(--font-serif); font-weight: 500; font-size: 18px; line-height: 1.8; letter-spacing: 0.1em; color: var(--c-ink);
}
.s06-greet-text p { margin: 16px 0 0; }
.s06-greet-text p.s06-greet-lead { margin-top: 0; }
.s06-greet-photo { position: relative; flex: 0 1 360px; margin: 0; }
.s06-greet-photo > img {
  width: 100%; height: auto; aspect-ratio: 360 / 420; object-fit: cover; border-radius: 10px;
  box-shadow: 0 0 10px rgba(109, 97, 61, 0.15);
}
/* 写真の右下に重なる楕円の札（219×151） */
.s06-badge {
  position: absolute; right: -6px; bottom: -43px; z-index: 0; isolation: isolate;
  width: 219px; height: 151px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; padding-top: 2px;
  font-family: var(--font-serif); font-weight: 500; color: var(--c-ink); text-align: center; transform-origin: 100% 100%;
}
.s06-badge::before, .s06-badge::after { content: ""; position: absolute; z-index: -1; }
.s06-badge::before { inset: -10px; background: url("icons/badge-ellipse.svg") center / 100% 100% no-repeat; }
.s06-badge::after { top: 3px; left: 4px; width: 212px; height: 146px; background: url("icons/badge-dash.svg") center / 100% 100% no-repeat; }
.s06-badge-org { font-size: 12px; line-height: 1.6; letter-spacing: 0.05em; }
.s06-badge-name { display: flex; align-items: flex-end; gap: 9px; }
.s06-badge-role { font-size: 16px; line-height: 1.2; letter-spacing: 0.05em; }
.s06-badge-person { font-size: 24px; line-height: 1; letter-spacing: 0.1em; }
.s06-btns { display: flex; flex-wrap: wrap; gap: 20px 40px; }

/* ---------- 外部掲載サイト（横スライド） ---------- */
/* 本人の指示（ADR-0084）：止まらずに流れ続ける帯。同じ列を 2 回並べ、半分（1 列ぶん）流れて先頭に戻る。
   動きを減らす設定では止め、横スクロールで見る */
.s06-media { --s06-media-gap: 56px; overflow: hidden; padding-bottom: 56px; /* ドットがあった分の余白（Figma の高さに合わせる） */ }
.s06-media-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; width: max-content; animation: s06-media-flow 60s linear infinite;
}
.s06-media-item { flex: none; padding-right: var(--s06-media-gap); }
@keyframes s06-media-flow { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .s06-media { overflow-x: auto; scrollbar-width: thin; }
  .s06-media-list { animation: none; }
}
.s06-media-item a { display: block; transition: opacity 0.3s ease-out; }
.s06-media-item img { width: auto; height: 180px; max-width: none; user-select: none; -webkit-user-drag: none; }

/* ---------- コラム ---------- */
.s06-column { width: min(1100px, 100% - var(--gutter) * 2); margin-inline: auto; padding: 120px 0; }
.s06-column-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; }
.s06-column-list {
  list-style: none; margin: 40px 0 0; padding: 0;
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.s06-column-list::-webkit-scrollbar { display: none; }
.s06-column-empty { margin: 40px 0 0; font-size: 14px; }
.s06-card { flex: none; width: 275px; scroll-snap-align: start; }
.s06-card-link {
  display: flex; flex-direction: column; gap: 12px; height: 270px; padding: 16px; border-radius: 10px; overflow: hidden;
  color: inherit; text-decoration: none; transition: background-color 0.3s ease-out, box-shadow 0.3s ease-out;
}
.s06-card-img { display: block; flex: none; width: 240px; max-width: 100%; height: 160px; border-radius: 10px; overflow: hidden; background: #f3eee8; }
.s06-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease-out; }
.s06-card-meta { display: flex; align-items: center; gap: 8px; height: 14px; }
.s06-card-meta time { font-family: var(--font-en); font-size: 14px; line-height: 1; letter-spacing: 0.05em; color: #514c46; }
.s06-card-tag { padding: 2px 4px; border-radius: 3px; background: var(--c-accent); color: #fff; font-size: 10px; line-height: 1; letter-spacing: 0.1em; }
.s06-card-title {
  margin-top: -4px; width: 243px; max-width: 100%;
  font-weight: 500; font-size: 16px; line-height: 1.4; letter-spacing: 0.1em; color: #514c46;
  /* 注意書き：タイトルは最大2行、収まらなければ末尾を「…」で省略 */
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: clip;
}
.s06-column-ctrl { display: flex; align-items: center; gap: 24px; height: 24px; margin-top: 40px; }
.s06-progress { position: relative; flex: 1; height: 4px; border-radius: 50px; background: #efefef; }
.s06-progress-bar { position: absolute; top: 0; left: calc((100% - 29.53%) * var(--s06-p, 0)); width: 29.53%; height: 100%; border-radius: 50px; background: var(--c-accent); }
.s06-arrows { display: flex; margin: -10px -10px -10px 0; }
.s06-arrow { position: relative; width: 44px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; }
.s06-arrow::before { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: #fff; transition: background-color 0.3s ease-out; }
.s06-arrow::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 6px; height: 6px;
  border-top: 1.05px solid var(--c-accent); border-right: 1.05px solid var(--c-accent);
  transform: translate(-70%, -50%) rotate(45deg); transition: border-color 0.3s ease-out;
}
.s06-arrow--prev::after { transform: translate(-30%, -50%) rotate(-135deg); }

/* ---------- アクセス ---------- */
.s06-access { scroll-margin-top: 20px; }
.s06-access-photos { display: flex; height: 500px; }
.s06-access-photos img { width: 50%; height: 100%; object-fit: cover; }
.s06-access-box {
  position: relative; display: flex; width: min(1320px, 100% - var(--gutter) * 2); margin: -200px auto 0;
  border-radius: 10px; box-shadow: 0 0 10px rgba(109, 97, 61, 0.15);
}
.s06-map {
  position: relative; flex: 0 0 40.91%; height: 580px; border-radius: 10px 0 0 10px; overflow: hidden;
  background: #e4e4e4 var(--img-8cc73623e5951a30) center / cover no-repeat;
}
.s06-map iframe { position: absolute; inset: 0; display: block; width: 100%; height: 100%; border: 0; }
.s06-gmap { position: absolute; left: 13px; bottom: 19px; display: flex; align-items: center; min-height: 44px; text-decoration: none; transition: opacity 0.3s ease-out; }
.s06-gmap-in {
  display: flex; align-items: center; gap: 4px; padding: 6px 9px; border-radius: 2px; background: #fff; box-shadow: 0 1px 4px rgba(71, 71, 71, 0.25);
  font-weight: 500; font-size: 12px; line-height: 1; letter-spacing: -0.02em; color: #1a73e8; white-space: nowrap;
}
.s06-gmap-in img { width: 11px; height: 11px; }
.s06-access-info {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 32px;
  padding: 40px 24px; border-radius: 0 10px 10px 0; background: #fff;
}
.s06-access-detail { width: min(695px, 100%); display: flex; flex-direction: column; align-items: center; gap: 16px; }
.s06-addr { display: flex; align-items: flex-start; gap: 4px; font-style: normal; font-size: 14px; line-height: 1.2; letter-spacing: 0.05em; color: #514c46; }
.s06-addr img { flex: none; width: 34px; height: 34px; }
.s06-addr-text { display: flex; flex-direction: column; }
.s06-routes { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 8px 16px; }
.s06-route { width: 221px; padding: 16px 25px 20px; border-radius: 4px; background: var(--c-beige); display: flex; flex-direction: column; align-items: center; text-align: center; color: #514c46; }
.s06-route > img { width: 24px; height: 24px; margin-bottom: 4px; }
.s06-route-line { font-family: var(--font-serif); font-weight: 700; font-size: 12px; line-height: 1.2; letter-spacing: 0.05em; }
.s06-route-row { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 2px; }
.s06-route-stop { font-family: var(--font-serif); font-weight: 700; font-size: 16px; line-height: 1; letter-spacing: 0.05em; }
.s06-route-walk { font-weight: 500; font-size: 12px; line-height: 1.2; letter-spacing: 0.05em; }

@media (hover: hover) {
  /* 通常ボタン（PC Basic）は Accent → Dark（注意書き 1729:171350）。外部リンク（掲載サイト・地図）は不透明度 70% */
  .s06-btn:hover { background: var(--c-accent-deep); }
  .s06-media-item a:hover, .s06-gmap:hover { opacity: 0.7; }
  .s06-card-link:hover { background: rgba(255, 255, 255, 0.7); box-shadow: 0 0 10px rgba(109, 97, 61, 0.15); }
  .s06-card-link:hover .s06-card-img img { transform: scale(1.05); }
  .s06-arrow:hover::before { background: var(--c-accent); }
  .s06-arrow:hover::after { border-color: #fff; }
}
@media (max-width: 1024px) {
  .s06-access-box { flex-direction: column; }
  .s06-map { flex: none; height: 360px; border-radius: 10px 10px 0 0; }
  .s06-access-info { border-radius: 0 0 10px 10px; }
}
@media (max-width: 767px) {
  .s06-white { padding: 0 0 20px; gap: 60px; }
  .s06-title { gap: 4px; }
  .s06-title--sp .s06-title-ja { font-size: 24px; line-height: 1.2; }
  .s06-title--sp .s06-title-en { font-size: 20px; }

  .s06-greet { width: calc(100% - 40px); }
  .s06-greet-body { flex-direction: column; align-items: center; gap: 56px; }
  .s06-greet-photo { order: -1; flex: none; width: min(300px, 100% - 30px); }
  .s06-badge { right: -26px; bottom: -25px; transform: scale(0.913); }
  .s06-greet-text { flex: none; width: 100%; }
  .s06-btns { flex-direction: column; margin-top: 32px; gap: 20px; }
  .s06-btns .s06-btn { width: 100%; }

  .s06-media { --s06-media-gap: 20px; padding-bottom: 31px; }
  .s06-media-item img { height: 140px; }

  .s06-column { width: 100%; padding: 80px 0; }
  .s06-column-head { padding: 0 20px; align-items: flex-end; }
  .s06-btn--list { width: 178px; }
  .s06-column-list { gap: 16px; padding: 0 6px; scroll-padding-inline: 6px; }
  .s06-column-empty { padding: 0 20px; }
  .s06-column-ctrl { padding: 0 20px; }
  .s06-progress-bar { width: 21.4%; left: calc((100% - 21.4%) * var(--s06-p, 0)); }

  .s06-access-photos { height: 138px; }
  .s06-access-box { width: calc(100% - 40px); margin-top: -32px; }
  .s06-map { height: 240px; }
  .s06-access-info { padding: 32px 16px 40px; }
  .s06-addr { width: 100%; }
  .s06-routes { flex-direction: column; flex-wrap: nowrap; align-items: stretch; width: 100%; }
  .s06-route { width: 100%; padding: 12px 20px 16px; }
  .s06-route-row { flex-direction: row; justify-content: center; align-items: flex-end; flex-wrap: wrap; }
  .s06-btn--access { width: 100%; }
}

/* ===== s07 紹介先・提携病院 ===== */

.s07 { background: var(--c-bg); color: var(--c-text); padding: 120px 0; }
.s07-inner { width: min(980px, 100% - var(--gutter) * 2); margin-inline: auto; display: flex; flex-direction: column; align-items: center; gap: 32px; }
.s07-title { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; font-weight: 700; }
.s07-title-ja { font-family: var(--font-serif); font-size: 36px; line-height: 1; letter-spacing: 0.1em; color: #514c46; }
.s07-title-en { font-family: var(--font-en); font-weight: 400; font-size: 24px; line-height: 1; letter-spacing: 0.05em; color: #f3d0b8; }
.s07-body { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 24px; }
.s07-lead { margin: 0; font-size: 16px; line-height: 1.6; letter-spacing: 0.1em; text-align: center; color: #514c46; }
.s07-box { width: 100%; padding: 33px 40px 40px; border-radius: 10px; background: var(--c-white); box-shadow: 0 0 10px rgba(109, 97, 61, 0.15); }
.s07-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 25px 31px; }
/* 病院名と外部リンクのアイコンで1つのリンク（押せる所 44px） */
.s07-link {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  min-height: 44px; padding: 8px 1px 15px 0; border-bottom: 1px dashed #f3d0b8;
  font-family: var(--font-serif); font-weight: 700; font-size: 20px; line-height: 1; letter-spacing: 0.05em; color: #514c46; text-decoration: none;
  transition: color 0.3s ease-out, border-color 0.3s ease-out;
}
.s07-ext {
  flex: none; width: 13px; height: 13px; background: currentColor;
  -webkit-mask: url("icons/ext.svg") center / contain no-repeat;
  mask: url("icons/ext.svg") center / contain no-repeat;
}
@media (hover: hover) {
  a.s07-link:hover { color: var(--c-accent); border-bottom-style: solid; border-bottom-color: var(--c-accent); }
}
@media (max-width: 1024px) {
  .s07-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .s07 { padding: 80px 0; }
  .s07-inner { width: calc(100% - 40px); }
  .s07-title { gap: 4px; }
  .s07-title-ja { font-size: 24px; line-height: 1.2; }
  .s07-title-en { font-size: 20px; }
  .s07-box { padding: 20px 16px; }
  .s07-list { grid-template-columns: 1fr; gap: 2px; }
  .s07-link { font-size: 16px; padding: 12px 1px 10px 0; }
}
