/* ============================================================
   にしだ整形外科 - サイト共通スタイル
   カラーテーマ: ティール（深緑がかった青）× 生成りベージュ
   ============================================================ */

:root {
  --color-primary: #0b6b76;
  --color-primary-dark: #083f47;
  --color-primary-light: #e6f0ee;
  --color-bg: #fbf9f5;
  --color-bg-soft: #f1ebe0;
  --color-text: #21262b;
  --color-text-soft: #6b6459;
  --color-border: #e2dccf;
  --color-line-soft: #d9d0bf; /* 診療時間表・区切り線 */
  --color-danger: #b3261e;
  --color-notice: #9c2b22;
  --color-sunday: #c0605e;   /* カレンダーの日曜・祝日 */
  --color-saturday: #5b7fb5; /* カレンダーの土曜 */
  --photo-tone: saturate(0.88) contrast(1.05) brightness(1.02) sepia(0.08);

  --font-base: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  --font-serif: "Shippori Mincho", "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", serif;
  --radius: 6px;
  --radius-sm: 4px;
  --shadow: 0 4px 20px rgba(8, 63, 71, 0.10);
  --shadow-hover: 0 14px 32px rgba(8, 63, 71, 0.16);
  --header-height: 72px;
  --max-width: 1120px;

  --hero-text-shadow-white: 2px 2px 1px #fff;
  --hero-text-shadow-dark: 0 2px 16px rgba(0,0,0,0.55), 0 1px 4px rgba(0,0,0,0.5);
  --hero-size-lg: clamp(38px, 3vw, 56px);
  --hero-size-md: clamp(30px, 2.25vw, 42px);

  /* セクション区切り用の波形マスク(上端用・下端用) */
  --wave-mask-top: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 48' preserveAspectRatio='none'%3E%3Cpath fill='%23000' d='M0 24C240 48 480 0 720 24C960 48 1200 0 1440 24V48H0Z'/%3E%3C/svg%3E");
  --wave-mask-bottom: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 48' preserveAspectRatio='none'%3E%3Cpath fill='%23000' d='M0 0H1440V24C1200 0 960 48 720 24C480 0 240 48 0 24Z'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--font-base);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  padding-top: var(--header-height);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { padding-left: 1.4em; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}
.container--narrow { max-width: 820px; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: rgba(255,255,255,0.96);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--color-border);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}
.site-header.is-scrolled {
  background: rgba(255,255,255,0.98);
  box-shadow: 0 6px 24px rgba(8, 63, 71, 0.16);
  border-bottom-color: transparent;
}
.site-header.is-scrolled .site-logo { transform: scale(0.9); }
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #04345f;
  transition: transform 0.25s ease;
  transform-origin: left center;
}
.site-logo:hover { text-decoration: none; }
.site-logo__mark { height: 40px; width: auto; flex: none; }
.site-logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.site-logo__corp {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}
.site-logo__name {
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.gnav { display: flex; align-items: center; gap: 4px; }
.gnav a {
  color: var(--color-text);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}
.gnav a:hover { background: var(--color-primary-light); color: var(--color-primary-dark); }
.gnav a.is-active {
  background: none;
  color: var(--color-primary-dark);
  font-weight: 700;
  box-shadow: inset 0 -2px 0 0 var(--color-primary);
}
.gnav a.is-active:hover {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  text-decoration: none;
}

/* 診療案内ドロップダウン */
.gnav-dropdown { position: relative; display: flex; align-items: center; }
.gnav-dropdown__toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  color: var(--color-text);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  transition: background 0.2s, color 0.2s;
}
.gnav-dropdown__toggle:hover { background: var(--color-primary-light); color: var(--color-primary-dark); }
.gnav-dropdown.is-active > .gnav-dropdown__toggle {
  background: none;
  color: var(--color-primary-dark);
  font-weight: 700;
  box-shadow: inset 0 -2px 0 0 var(--color-primary);
}
.gnav-dropdown__arrow {
  width: 7px;
  height: 7px;
  margin-top: -4px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.25s ease;
}
.gnav-dropdown.is-open .gnav-dropdown__arrow { transform: rotate(225deg); margin-top: 2px; }
.gnav-dropdown__menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 210px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 1002;
}
.gnav-dropdown:hover .gnav-dropdown__menu,
.gnav-dropdown.is-open .gnav-dropdown__menu { display: flex; }
.gnav-dropdown__menu a {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  color: var(--color-text);
}
.gnav-dropdown__menu a:hover { background: var(--color-primary-light); color: var(--color-primary-dark); }
.gnav-dropdown__menu a.is-active { background: var(--color-primary); color: #fff; }

.nav-toggle {
  display: none;
  width: auto;
  height: 44px;
  min-width: 44px;
  padding: 0 6px;
  border: none;
  background: transparent;
  cursor: pointer;
  position: relative;
  align-items: center;
  gap: 8px;
}
.nav-toggle__icon, .nav-toggle__icon::before, .nav-toggle__icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  transition: opacity 0.2s ease;
}
.nav-toggle__icon {
  position: relative;
  display: inline-block;
}
.nav-toggle__icon::before { top: -7px; }
.nav-toggle__icon::after { top: 7px; }
.nav-toggle__text {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--color-text);
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .site-header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .gnav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: auto;
    bottom: auto;
    height: calc(100dvh - var(--header-height));
    width: min(86vw, 340px);
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: 14px 20px 40px;
    gap: 2px;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    border-right: 1px solid var(--color-border);
    box-shadow: 8px 0 24px rgba(0, 0, 0, 0.08);
    z-index: 1001;
  }
  .gnav.is-open { transform: translateX(0); }
  .gnav a { padding: 14px 10px; border-bottom: 1px solid var(--color-border); border-radius: 0; }
  .gnav a.is-active {
    background: var(--color-primary-light);
    box-shadow: none;
    border-left: 3px solid var(--color-primary);
    padding-left: 7px;
  }

  .gnav-dropdown { display: block; }
  .gnav-dropdown__toggle {
    width: 100%;
    justify-content: space-between;
    padding: 14px 10px;
    border-bottom: 1px solid var(--color-border);
    border-radius: 0;
  }
  .gnav-dropdown.is-active > .gnav-dropdown__toggle {
    background: none;
    color: var(--color-text);
    font-weight: 500;
  }
  .gnav-dropdown__menu {
    position: static;
    display: flex;
    min-width: 0;
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    background: var(--color-bg-soft);
    transition: max-height 0.3s ease;
  }
  .gnav-dropdown.is-open .gnav-dropdown__menu { max-height: 320px; }
  .gnav-dropdown__menu a {
    padding: 13px 22px;
    border-bottom: 1px solid var(--color-border);
    border-radius: 0;
  }
}

@media (max-width: 700px) {
  :root { --header-height: 58px; }
  .site-logo__mark { height: 32px; }
  .site-logo__corp { font-size: 0.52rem; }
  .site-logo__name { font-size: 1rem; }
}

/* ---------- Hero slider ---------- */
/* スライダー本体(fixed)とスクロール確保用スペーサーは常に同じ寸法にする */
.hero-slider,
.hero-spacer {
  height: 62vh;
  min-height: 380px;
  max-height: 640px;
}
.hero-slider {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  z-index: 1;
  overflow: hidden;
  background: var(--color-primary-light);
}

/* トップページ(.has-hero): ヒーローをヘッダー背面まで広げ、
   ヒーロー上ではヘッダーをすりガラス表示にする */
body.has-hero { padding-top: 0; }
.has-hero .hero-slider { top: 0; }
.has-hero .hero-slider,
.has-hero .hero-spacer {
  height: calc(62vh + var(--header-height));
  min-height: calc(380px + var(--header-height));
  max-height: calc(640px + var(--header-height));
}
.has-hero .site-header:not(.is-scrolled) {
  background: rgba(255, 255, 255, 0.55);
  border-bottom-color: rgba(255, 255, 255, 0.3);
}
@media (max-width: 900px) {
  .has-hero .site-header:not(.is-scrolled) {
    background: rgba(255, 255, 255, 0.85);
  }
}
.reveal-content {
  position: relative;
  z-index: 2;
  background: var(--color-bg);
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease;
  will-change: transform;
}
.hero-slide.is-active {
  opacity: 1;
  animation: heroKenBurns 8s ease-out forwards;
}
@keyframes heroKenBurns {
  from { transform: scale(1); }
  to { transform: scale(1.12); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-slide.is-active { animation: none; }
}
.hero-slide::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(6,38,42,0.20) 0%, rgba(6,38,42,0.08) 45%, rgba(6,38,42,0.32) 100%);
}
.hero-slide--bright::after,
.hero-slide--symptoms::after {
  background: linear-gradient(180deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0) 45%, rgba(0,0,0,0.04) 100%);
}
.hero-caption {
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  text-align: center;
  color: #fff;
  z-index: 2;
  padding: 0 20px;
}
.hero-caption .hero-line {
  margin: 0;
  opacity: 0;
}
.hero-caption.is-playing .hero-line {
  animation: heroLineIn 0.8s ease forwards;
}
.hero-caption.is-playing .hero-line:nth-of-type(2) { animation-delay: 1s; }
.hero-caption.is-playing .hero-line:nth-of-type(3) { animation-delay: 2s; }
.hero-caption.is-playing .hero-line:nth-of-type(4) { animation-delay: 3s; }

.hero-caption--symptoms,
.hero-caption--serif {
  font-family: var(--font-serif);
}
.hero-caption--symptoms .hero-line,
.hero-caption--serif .hero-line {
  font-family: inherit;
  font-weight: 600;
}
.hero-caption--serif .hero-line {
  font-size: var(--hero-size-lg);
  line-height: 1;
  margin-bottom: 0.556em;
  text-shadow: var(--hero-text-shadow-dark);
}
.hero-caption--serif .hero-line:last-child { margin-bottom: 0; }

.hero-caption--symptoms .hero-line-main {
  margin-bottom: 1.167em;
  font-size: var(--hero-size-lg);
  line-height: 0.833;
  color: var(--color-primary);
  text-shadow: var(--hero-text-shadow-white);
}
.hero-caption--symptoms .hero-line-list {
  display: inline-block;
  text-align: left;
}
.hero-caption--symptoms .hero-line-sub {
  margin-bottom: 0.556em;
  font-size: var(--hero-size-md);
  line-height: 1;
  color: #1d1a1a;
  text-shadow: var(--hero-text-shadow-white);
}
.hero-caption--symptoms .hero-line-sub:last-child { margin-bottom: 0; }
.hero-caption--symptoms.is-playing .hero-line-list .hero-line:nth-child(1) { animation-delay: 1s; }
.hero-caption--symptoms.is-playing .hero-line-list .hero-line:nth-child(2) { animation-delay: 2s; }
.hero-caption--symptoms.is-playing .hero-line-list .hero-line:nth-child(3) { animation-delay: 3s; }
.hero-caption--symptoms.is-playing .hero-line-list .hero-line:nth-child(4) { animation-delay: 4s; }

@media (max-width: 700px) {
  .hero-slider,
  .hero-spacer {
    height: auto;
    min-height: 0;
    max-height: none;
    aspect-ratio: 10 / 9;
  }
  /* 10/9比の写真領域に、ヘッダー背面に隠れる分を上乗せ */
  .has-hero .hero-slider,
  .has-hero .hero-spacer {
    height: calc(90vw + var(--header-height));
    min-height: 0;
    max-height: none;
    aspect-ratio: auto;
  }
  .hero-caption {
    padding: 0 12px;
  }
  .hero-caption--serif .hero-line {
    font-size: clamp(20px, 6vw, 32px);
    line-height: 1.28;
    margin-bottom: 0.45em;
  }
  .hero-caption--symptoms .hero-line-main {
    font-size: clamp(20px, 6vw, 32px);
    line-height: 1.28;
    margin-bottom: 0.7em;
  }
  .hero-caption--symptoms .hero-line-sub {
    font-size: clamp(16px, 4.6vw, 24px);
    margin-bottom: 0.4em;
  }
  .hero-dots { bottom: 12px; }
}

@keyframes heroLineIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.hero-dots {
  position: absolute;
  bottom: 22px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 10px;
  z-index: 3;
}
.hero-dots button {
  width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid #fff; background: transparent;
  padding: 0; cursor: pointer; opacity: 0.7;
}
.hero-dots button.is-active { background: #fff; opacity: 1; }

.hero-notice {
  position: absolute;
  left: 20px;
  bottom: 22px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: min(720px, calc(100% - 40px));
  padding: 9px 12px;
  background: rgba(55, 65, 81, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 10px;
  color: #fff;
  text-decoration: none;
}
.hero-notice:hover {
  text-decoration: none;
  background: rgba(31, 41, 55, 0.9);
}
.hero-notice__label {
  flex: none;
  font-size: 0.73rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  border-radius: 999px;
  padding: 3px 8px;
}
.hero-notice[hidden] {
  display: none;
}
.hero-notice__text {
  min-width: 0;
  font-size: 0.9rem;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 700px) {
  .hero-notice {
    left: 12px;
    right: 12px;
    bottom: 24px;
    max-width: none;
    padding: 6px 8px;
  }
  .hero-notice__text {
    font-size: 0.78rem;
  }
}

/* ---------- Notice banner ---------- */
.notice-banner {
  background: linear-gradient(180deg, #f4efe4 0%, #ece3d2 100%);
  border-block: 1px solid var(--color-border);
}
.notice-banner__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 0;
}
.notice-banner__btn {
  background: var(--color-notice);
  color: #fff;
  border-radius: 999px;
  font-weight: 700;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 0.92rem;
  white-space: nowrap;
  text-decoration: none;
}
.notice-banner__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid #fff;
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
}
.notice-banner__body {
  flex: 1;
  min-width: 0;
}
.notice-banner__message {
  margin: 0 0 4px;
  font-size: clamp(0.95rem, 2.2vw, 1.15rem);
  font-weight: 700;
  color: #222;
  line-height: 1.5;
}
.notice-banner__message strong {
  color: var(--color-notice);
  font-weight: 800;
}
.notice-banner__btn:hover {
  text-decoration: none;
  filter: brightness(1.05);
}

@media (max-width: 820px) {
  .notice-banner__inner {
    flex-wrap: wrap;
    gap: 14px;
    padding: 16px 0;
  }
  .notice-banner__body { flex: 1 1 100%; order: 2; }
  .notice-banner__btn { order: 3; width: 100%; }
}

@media (max-width: 700px) {
  .notice-banner__inner {
    flex-wrap: nowrap;
    gap: 10px;
    padding: 12px 0;
  }
  .notice-banner__body {
    flex: 1;
    min-width: 0;
  }
  .notice-banner__message {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.35;
  }
  .notice-banner__btn {
    width: auto;
    min-width: 0;
    align-self: center;
    padding: 7px 12px 7px 9px;
    font-size: 0.82rem;
    line-height: 1;
    flex: none;
  }
}

/* ---------- Clinic info ---------- */
.clinic-info {
  position: relative;
  padding: 36px 0 40px;
  background: #fff;
}
/* 白背景の下端から次セクションへ張り出す波形 */
.clinic-info::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 48px;
  background: #fff;
  pointer-events: none;
  -webkit-mask: var(--wave-mask-bottom) center / 100% 100% no-repeat;
  mask: var(--wave-mask-bottom) center / 100% 100% no-repeat;
}
@media (max-width: 700px) {
  .clinic-info::after { height: 30px; }
}
.clinic-info__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
.clinic-info__heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary-dark);
}
.clinic-info__icon {
  width: 24px;
  height: 24px;
  flex: none;
  color: var(--color-primary);
}
.clinic-info__table-wrap {
  overflow-x: auto;
  border-radius: 10px;
  box-shadow: 0 1px 0 rgba(8, 63, 71, 0.04);
}
.clinic-info__table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.clinic-info__table th,
.clinic-info__table td {
  border: 1px solid var(--color-line-soft);
  padding: 10px 8px;
  text-align: center;
  vertical-align: middle;
}
.clinic-info__table thead th {
  background: var(--color-primary-dark);
  color: #fff;
  font-weight: 700;
}
.clinic-info__table thead th:first-child {
  text-align: left;
  padding-left: 14px;
  width: 34%;
}
.clinic-info__table tbody th {
  background: #f1ece0;
  text-align: left;
  padding-left: 14px;
  font-weight: 700;
  white-space: normal;
}
.clinic-info__time {
  display: inline-block;
  line-height: 1.35;
}
.clinic-info__time br {
  display: none;
}
/* 診療マーク(診療時間表・診療カレンダー・凡例で共通) */
.mark {
  display: inline-block;
  flex: none;
  vertical-align: middle;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.mark--open { background: var(--color-primary); }
/* 上半分だけ塗った○ = 午前のみ診療 */
.mark--pm {
  border: 2px solid var(--color-primary);
  background: linear-gradient(to bottom, var(--color-primary) 0 50%, transparent 50% 100%);
}
.mark--closed {
  height: 2px;
  border-radius: 2px;
  background: #b7ae9d;
}
/* カレンダーのセル・凡例では○とーの高さを揃える */
.ccal__cell .mark--closed,
.ccal-legend .mark--closed { margin: 5px 0; }
/* 診療時間表では少し大きめに */
.clinic-info__table .mark--open { width: 14px; height: 14px; }
.clinic-info__table .mark--closed { width: 13px; }
.clinic-info__notes {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.clinic-info__notes li {
  position: relative;
  padding-left: 1.1em;
  margin-bottom: 4px;
  font-size: 0.8rem;
  color: #333;
  line-height: 1.6;
}
.clinic-info__notes li::before {
  content: "※";
  position: absolute;
  left: 0;
}
.clinic-info__notes li:last-child { margin-bottom: 0; }
.clinic-info__side {
  padding-left: 32px;
  border-left: 1px solid var(--color-line-soft);
}
.clinic-info__place {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 700;
}
.clinic-info__address {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.7;
}
.clinic-info__tel {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--color-line-soft);
  color: var(--color-text);
  text-decoration: none;
}
.clinic-info__tel:hover {
  color: var(--color-primary-dark);
  text-decoration: none;
}
.clinic-info__tel-icon {
  width: 32px;
  height: 32px;
  flex: none;
  color: var(--color-primary-dark);
}
.clinic-info__tel span {
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  font-weight: 800;
  letter-spacing: 0.03em;
}
.clinic-info__calwrap {
  margin-top: 44px;
}
.ccal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}
.ccal-legend li {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  color: #333;
}
.closure-cal {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 40px;
}
.closure-cal__loading {
  margin: 0;
  font-size: 0.85rem;
  color: #777;
}
.ccal__title {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-primary-dark);
}
.ccal__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.ccal__dow {
  padding: 5px 0;
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
  color: #6d6553;
  background: #f1ece0;
  border-radius: 5px;
}
.ccal__dow--sun { color: var(--color-sunday); }
.ccal__dow--sat { color: var(--color-saturday); }
.ccal__cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-height: 56px;
  padding: 6px 2px 7px;
  border-radius: 6px;
}
/* ステータス別のセル背景 */
.ccal__cell--open { background: #fff; border: 1px solid #ece4d3; }
.ccal__cell--pm { background: #e6f2f0; border: 1px solid #d2e6e2; }
.ccal__cell--closed { background: #f0ede6; border: 1px solid #e6e1d5; }
.ccal__cell--empty { background: transparent; }
.ccal__date {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 20px;
  font-size: 0.85rem;
  line-height: 1;
  color: #444;
}
.ccal__cell--closed .ccal__date { color: #93897a; }
.ccal__date--red {
  color: var(--color-sunday) !important;
  font-weight: 700;
}
/* 今日: 日付とマークをまとめてセルごと囲む */
.ccal__cell--today {
  border: 2px solid var(--color-primary);
  padding: 5px 1px 6px;
}
.ccal__cell--today .ccal__date {
  font-weight: 700;
  color: var(--color-primary-dark);
}
.ccal__memo {
  max-width: 100%;
  padding: 0 2px;
  font-size: 0.6rem;
  line-height: 1.2;
  color: #a2582f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 900px) {
  .clinic-info__inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .clinic-info__side {
    padding-left: 0;
    border-left: none;
    padding-top: 24px;
    border-top: 1px solid var(--color-line-soft);
  }
  .closure-cal {
    grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  }
  .clinic-info__table {
    min-width: 0;
    table-layout: fixed;
    font-size: 0.8rem;
  }
  .clinic-info__table th,
  .clinic-info__table td {
    padding: 7px 3px;
  }
  .clinic-info__table thead th:first-child,
  .clinic-info__table tbody th {
    padding-left: 8px;
  }
  .clinic-info__time {
    font-size: 0.78rem;
  }
  .clinic-info__table .mark--open {
    width: 12px;
    height: 12px;
  }
}

@media (max-width: 700px) {
  .clinic-info__time br {
    display: initial;
  }
  .clinic-info__table thead th:first-child {
    width: 20%;
  }
  .clinic-info__table {
    font-size: 0.78rem;
  }
}

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-soft {
  position: relative;
  background: var(--color-bg-soft);
  overflow: hidden;
  isolation: isolate;
}
.section-soft::before,
.section-soft::after {
  content: "";
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  filter: blur(40px);
  pointer-events: none;
}
.section-soft::before {
  width: 440px;
  height: 440px;
  top: -180px;
  left: -140px;
  background: radial-gradient(circle, rgba(11, 107, 118, 0.16) 0%, rgba(11, 107, 118, 0) 70%);
}
.section-soft::after {
  width: 500px;
  height: 500px;
  bottom: -220px;
  right: -160px;
  background: radial-gradient(circle, rgba(8, 63, 71, 0.13) 0%, rgba(8, 63, 71, 0) 70%);
}
.section-soft > .container {
  position: relative;
  z-index: 1;
}
/* 上下端を波形に切り抜き、手前のセクションとゆるやかにつなぐ */
.section-soft {
  -webkit-mask-image: var(--wave-mask-top), linear-gradient(#000 0 0), var(--wave-mask-bottom);
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: top center, center, bottom center;
  -webkit-mask-size: 100% 48px, 100% calc(100% - 92px), 100% 48px;
  mask-image: var(--wave-mask-top), linear-gradient(#000 0 0), var(--wave-mask-bottom);
  mask-repeat: no-repeat;
  mask-position: top center, center, bottom center;
  mask-size: 100% 48px, 100% calc(100% - 92px), 100% 48px;
}
/* 波形で削られる分の余白を上乗せ */
.section.section-soft,
.content-block.section-soft {
  padding-top: 88px;
  padding-bottom: 88px;
}
@media (max-width: 700px) {
  .section-soft::before { width: 280px; height: 280px; top: -110px; left: -90px; }
  .section-soft::after { width: 320px; height: 320px; bottom: -140px; right: -110px; }
  .section-soft {
    -webkit-mask-size: 100% 30px, 100% calc(100% - 56px), 100% 30px;
    mask-size: 100% 30px, 100% calc(100% - 56px), 100% 30px;
  }
  .section.section-soft,
  .content-block.section-soft {
    padding-top: 60px;
    padding-bottom: 60px;
  }
}
.section-title {
  text-align: center;
  margin: 0 0 42px;
}
.section-title__en {
  display: block;
  margin: 0 0 6px;
  font-family: var(--font-base);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--color-primary);
}
.section-title h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  font-weight: 600;
  margin: 0;
  position: relative;
  display: inline-block;
  padding-bottom: 20px;
}
.section-title h2::after {
  content: "";
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 64px; height: 1px;
  background: var(--color-primary);
}
.section-title--after-grid { margin-top: 64px; }

/* Department cards */
.dept-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.dept-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: none;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}
.dept-card:hover { transform: translateY(-4px); border-color: var(--color-primary); box-shadow: var(--shadow-hover); text-decoration: none; }
.dept-card img { aspect-ratio: 4/3; object-fit: cover; filter: var(--photo-tone); transition: transform 0.5s ease; }
.dept-card:hover img { transform: scale(1.08); }
.dept-card .body { padding: 20px 22px 24px; flex: 1; display: flex; flex-direction: column; }
.dept-card h3 { margin: 0 0 10px; font-size: 1.2rem; color: var(--color-text); }
.dept-card p { margin: 0 0 16px; color: var(--color-text-soft); font-size: 0.92rem; flex: 1; }

@media (max-width: 820px) {
  .dept-grid { grid-template-columns: 1fr; }
}

/* Teaser boxes (about/gairai) */
.teaser-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.teaser-card {
  display: flex;
  gap: 18px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: none;
  align-items: center;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.teaser-card:hover { transform: translateY(-4px); border-color: var(--color-primary); box-shadow: var(--shadow-hover); text-decoration: none; }
.teaser-card__thumb { width: 96px; height: 96px; border-radius: var(--radius-sm); overflow: hidden; flex: none; }
.teaser-card img { width: 100%; height: 100%; object-fit: cover; display: block; filter: var(--photo-tone); transition: transform 0.5s ease; }
/* 被写体(人物の顔など)が上寄りの写真は、上端基準で切り抜く */
.teaser-card img.obj-upper { object-position: center top; }
.teaser-card:hover img { transform: scale(1.08); }
.teaser-card h3 { margin: 0 0 8px; font-size: 1.1rem; color: var(--color-text); }
.teaser-card p { margin: 0 0 8px; font-size: 0.88rem; color: var(--color-text-soft); }
.teaser-card .more { font-size: 0.82rem; font-weight: 700; color: var(--color-primary); display: inline-block; transition: transform 0.25s ease, color 0.25s ease; }
.teaser-card:hover .more { transform: translateX(4px); color: var(--color-primary-dark); }

/* 「詳しく見る」の丸矢印アイコン */
.teaser-card .more::after {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-left: 8px;
  vertical-align: -4px;
  border-radius: 50%;
  background-color: var(--color-primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M8 6.2l3.8 3.8L8 13.8' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 100% 100%;
  transition: background-color 0.25s ease;
}
.teaser-card:hover .more::after {
  background-color: var(--color-primary-dark);
}

@media (max-width: 700px) {
  .teaser-grid { grid-template-columns: 1fr; }
  .teaser-card { flex-direction: column; align-items: flex-start; }
  .teaser-card__thumb { width: 100%; height: 160px; }
}

/* News list */
.news-list { list-style: none; margin: 0; padding: 0; }
.news-item {
  display: flex;
  gap: 18px;
  align-items: baseline;
  padding: 18px 4px;
  border-bottom: 1px solid var(--color-border);
  flex-wrap: wrap;
}
.news-item time { flex: none; color: var(--color-text-soft); font-size: 0.85rem; width: 100px; }
.news-badge,
.badge {
  flex: none;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
}
.news-badge.closure,
.badge.closure { background: #f3e1de; color: var(--color-danger); }
.news-item a.title { color: var(--color-text); font-weight: 500; flex: 1; min-width: 200px; }
.news-item a.title:hover { color: var(--color-primary-dark); }
.news-empty { color: var(--color-text-soft); padding: 30px 4px; }
.news-more { text-align: center; margin-top: 34px; }

.news-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 34px;
}
.news-filter button {
  padding: 9px 20px;
  border-radius: 999px;
  border: 1.5px solid var(--color-primary);
  background: #fff;
  color: var(--color-primary-dark);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.news-filter button.is-active { background: var(--color-primary); color: #fff; }

.news-detail-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.news-detail-head time { color: var(--color-text-soft); font-size: 0.88rem; }
#news-detail h1 { font-size: 1.5rem; margin: 0 0 28px; }
.news-detail-body img { max-width: 100%; }

.btn {
  display: inline-block;
  padding: 12px 32px;
  border-radius: 999px;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background 0.2s;
}
.btn:hover { background: var(--color-primary-dark); color: #fff; text-decoration: none; }
.btn.outline { background: #fff; color: var(--color-primary-dark); border: 1.5px solid var(--color-primary); }
.btn.outline:hover { background: var(--color-primary-light); }

.pdf-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 12px 28px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  background: var(--color-primary);
  transition: background 0.2s;
}
.pdf-link:hover { color: #fff; text-decoration: none; background: var(--color-primary-dark); }
.pdf-link__icon { width: 1.3em; }

/* Access */
.access-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
}
.access-grid iframe { width: 100%; height: 320px; border: 0; border-radius: var(--radius); }
.access-detail dt { font-weight: 700; color: var(--color-primary-dark); margin-top: 16px; }
.access-detail dt:first-child { margin-top: 0; }
.access-detail dd { margin: 4px 0 0; }
@media (max-width: 820px) {
  .access-grid { grid-template-columns: 1fr; }
}

/* ---------- Page hero (下層ページ共通タイトル帯) ---------- */
.page-hero {
  position: relative;
  background: linear-gradient(120deg, #e9f2f0 0%, #f7f3ea 55%, #f1ebe0 100%);
  border-bottom: 1px solid var(--color-border);
  padding: 44px 0 28px;
  overflow: hidden;
}
.page-hero::after {
  content: "";
  position: absolute;
  top: -140px;
  right: -100px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(11, 107, 118, 0.10) 0%, rgba(11, 107, 118, 0) 70%);
  pointer-events: none;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero__en {
  margin: 0 0 4px;
  font-family: var(--font-base);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--color-primary);
}
.page-hero__title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-text);
}
.breadcrumb {
  margin-top: 14px;
  font-size: 0.78rem;
}
.breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
}
.breadcrumb li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text-soft);
}
.breadcrumb li + li::before {
  content: "›";
  color: var(--color-border);
}
.breadcrumb a { color: var(--color-text-soft); }
.breadcrumb a:hover { color: var(--color-primary-dark); }
@media (max-width: 700px) {
  .page-hero { padding: 30px 0 20px; }
  .breadcrumb { margin-top: 10px; }
}

/* Sub navigation (inner pages) */
.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 0 auto;
  max-width: var(--max-width);
  padding: 28px 20px 0;
}
.subnav a {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--color-primary);
  color: var(--color-primary-dark);
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
}
.subnav a.is-active { background: var(--color-primary); color: #fff; }

.content-block { padding: 50px 0; }
.content-block h2.block-title {
  font-size: 1.4rem;
  color: var(--color-text);
  border-left: 4px solid var(--color-primary);
  padding-left: 14px;
  margin: 0 0 24px;
}
.content-block h3.sub-title {
  font-size: 1.05rem;
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  margin: 30px 0 14px;
}
.prose { color: var(--color-text); font-size: 0.96rem; }
.prose p { margin: 0 0 1em; }
.prose img { border-radius: var(--radius-sm); margin: 10px 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; font-size: 0.92rem; }
.prose table th, .prose table td { border: 1px solid var(--color-border); padding: 10px 14px; text-align: left; vertical-align: top; }
.prose table th { background: var(--color-bg-soft); width: 28%; white-space: nowrap; }
.prose hr { border: none; border-top: 1px dashed var(--color-border); margin: 26px 0; }
.prose .black { color: var(--color-text); }
.prose .black.bold, .prose .aqua.bold { font-weight: 700; }
.prose .aqua { color: var(--color-primary-dark); }
.prose .green { color: #0d9488; font-weight: 700; }
.prose .red { color: var(--color-danger); }
.prose .gray { color: #94a3b8; font-size: 0.82rem; }
.prose .alignright { text-align: right; }
.prose .pagetop { text-align: center; margin-top: 20px; }
.prose .pagetop a { font-size: 0.82rem; color: var(--color-text-soft); }
.prose .imgbox { text-align: center; font-size: 0.85rem; color: var(--color-text-soft); }
.prose .img-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
}
.prose .img-row img {
  flex: 0 0 auto;
  width: min(100%, 295px);
  max-width: 295px;
  height: auto;
  margin: 0;
}
.prose .img-row--equal {
  flex-wrap: nowrap;
  gap: 12px;
}
.prose .img-row--equal img {
  flex: 1 1 0;
  min-width: 0;
  width: 0;
  max-width: none;
  aspect-ratio: 3 / 2;
  height: auto;
  object-fit: cover;
}
@media (max-width: 700px) {
  .prose .img-row--equal {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .prose .img-row--equal img {
    flex: 0 0 42%;
    width: 42%;
    min-width: 130px;
  }
}
.prose .txt12 { font-size: 0.92rem; }
.prose .txt13 { font-size: 0.95rem; }
.prose .met_clean_list { list-style: none; padding: 0; }
.prose .met_clean_list li {
  padding: 8px 0 8px 26px;
  border-bottom: 1px dashed var(--color-border);
  position: relative;
}
.prose .met_clean_list li::before {
  content: "";
  position: absolute; left: 4px; top: 16px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--color-primary);
}
.prose .list_02 { list-style: none; padding: 0; }
.prose .list_02 li {
  padding: 7px 0 7px 1em;
  border-bottom: 1px dashed var(--color-border);
  font-size: 0.92rem;
}
.prose .mLft10 { margin-left: 10px; }
.prose .mLft15 { margin-left: 15px; }
.prose .mTop05 { margin-top: 0.4em; }
.prose .mTop25 { margin-top: 1.6em; }
.prose .mBtm05 { margin-bottom: 0.4em; }
.prose .mBtm10 { margin-bottom: 0.7em; }
.prose .mBtm15 { margin-bottom: 1em; }
.prose .mBtm20 { margin-bottom: 1.3em; }
.prose .mBtm25 { margin-bottom: 1.6em; }
.prose .mBtm30 { margin-bottom: 2em; }
.prose .mBtm35 { margin-bottom: 2.5em; }
.prose .bold { font-weight: 700; }

.facility-gallery-intro { font-size: 0.78rem; }

/* Facility gallery (main + thumbnails) */
.facility-gallery {
  margin: 36px auto 30px;
  width: min(100%, 880px);
}
.facility-gallery__main {
  margin: 0;
}
.facility-gallery__stage {
  position: relative;
  width: 100%;
  height: clamp(260px, 42vw, 480px);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-bg-soft);
}
.facility-gallery__main img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  image-rendering: auto;
  filter: var(--photo-tone);
}
.facility-gallery__main figcaption {
  padding: 12px 0 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-primary-dark);
  text-align: center;
}
.facility-gallery__thumbs {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  padding-bottom: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.facility-gallery__thumb {
  flex: none;
  padding: 0;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  background: none;
  cursor: pointer;
  overflow: hidden;
  opacity: 0.65;
  transition: opacity 0.2s, border-color 0.2s;
}
.facility-gallery__thumb:hover { opacity: 0.9; }
.facility-gallery__thumb.is-active {
  border-color: var(--color-primary);
  opacity: 1;
}
.facility-gallery__thumb img {
  display: block;
  width: 108px;
  height: 81px;
  object-fit: cover;
  object-position: center;
  filter: var(--photo-tone);
}
@media (max-width: 560px) {
  .facility-gallery__stage { height: clamp(200px, 52vw, 300px); }
  .facility-gallery__thumb img { width: 84px; height: 63px; }
}
.profile-flex { display: flex; gap: 30px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 20px; }
.profile-flex--director img { width: 110px; border-radius: var(--radius); flex: none; filter: var(--photo-tone); }
.profile-flex .prose { flex: 1; min-width: 260px; }

.equip-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.equip-card { background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: none; overflow: hidden; transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease; }
.equip-card:hover { transform: translateY(-4px); border-color: var(--color-primary); box-shadow: var(--shadow-hover); }
.equip-card img { aspect-ratio: 4/3; object-fit: cover; filter: var(--photo-tone); transition: transform 0.5s ease; }
.equip-card:hover img { transform: scale(1.08); }
.equip-card .body { padding: 16px 18px; }
.equip-card h4 { margin: 0 0 8px; font-size: 1rem; color: var(--color-text); }
.equip-card p { margin: 0; font-size: 0.85rem; color: var(--color-text-soft); }
@media (max-width: 820px) { .equip-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .equip-grid { grid-template-columns: 1fr; } }

/* 診療の流れ（番号バッジ+縦ラインのタイムライン） */
.flow-steps {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 26px;
  counter-reset: flow;
}
.flow-steps::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 40px;
  bottom: 40px;
  width: 2px;
  background: rgba(11, 107, 118, 0.22);
}
.flow-step {
  position: relative;
  display: flex;
  gap: 20px;
  align-items: center;
  padding-left: 64px;
  counter-increment: flow;
}
.flow-step::before {
  content: counter(flow);
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1;
}
.flow-step img { width: 130px; height: 90px; object-fit: cover; border-radius: var(--radius-sm); flex: none; filter: var(--photo-tone); }
.flow-step .body h4 { margin: 0 0 4px; }
.flow-step .body p { margin: 0; font-size: 0.88rem; color: var(--color-text-soft); }
@media (max-width: 600px) {
  .flow-steps::before { left: 17px; top: 34px; bottom: 34px; }
  .flow-step { flex-wrap: wrap; padding-left: 52px; }
  .flow-step::before { width: 36px; height: 36px; font-size: 1rem; }
  .flow-step img { width: 100%; height: 140px; }
}

/* Accordion (症状から探す) */
.accordion-category { margin-bottom: 14px; border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; }
.accordion-category-head {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  background: var(--color-bg);
  border: none;
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: var(--font-serif);
  color: var(--color-text);
  text-align: left;
  transition: background 0.2s ease;
}
.accordion-category-head .arrow,
.accordion-item-head .arrow {
  flex: none;
  width: 9px;
  height: 9px;
  margin-top: -5px;
  font-size: 0;
  line-height: 0;
  overflow: hidden;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  color: var(--color-primary);
  transform: rotate(45deg);
  transition: transform 0.3s ease;
}
.accordion-category.is-open .accordion-category-head {
  background: var(--color-primary-light);
  border-bottom: 1px solid var(--color-border);
}
.accordion-category.is-open .accordion-category-head .arrow { transform: rotate(225deg); margin-top: 2px; }
.accordion-category-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  background: #fff;
}
.symptom-intro {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 20px 22px 6px;
}
.symptom-intro__img { width: 110px; flex: none; border-radius: var(--radius-sm); filter: var(--photo-tone); }
.symptom-intro .prose { flex: 1; font-size: 0.9rem; }
.symptom-intro .prose p { margin: 0 0 0.6em; }
@media (max-width: 560px) {
  .symptom-intro { flex-direction: column; }
  .symptom-intro__img { width: 100%; max-width: 200px; }
}
.accordion-item { border-top: 1px solid var(--color-border); }
.accordion-item-head {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 14px 22px;
  background: #fff;
  border: none;
  cursor: pointer;
  font-size: 0.94rem;
  font-weight: 600;
  text-align: left;
}
.accordion-item-head:hover { background: var(--color-bg-soft); }
.accordion-item.is-open .accordion-item-head .arrow { transform: rotate(225deg); margin-top: 2px; }
.accordion-item-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  background: var(--color-bg-soft);
}
.accordion-item-body .inner { padding: 4px 24px 22px; }
.accordion-item-body h5 {
  margin: 16px 0 6px;
  font-size: 0.85rem;
  color: var(--color-primary-dark);
}
.accordion-item-body h5:first-child { margin-top: 4px; }
.accordion-item-body .prose { font-size: 0.9rem; }

/* Footer */
.site-footer {
  background: #0a2e33;
  color: #dcece9;
  padding: 76px 0 20px;
  margin-top: 60px;
  font-size: 0.88rem;
  /* 上端を波形に切り抜く */
  -webkit-mask-image: var(--wave-mask-top), linear-gradient(#000 0 0);
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: top center, bottom center;
  -webkit-mask-size: 100% 32px, 100% calc(100% - 30px);
  mask-image: var(--wave-mask-top), linear-gradient(#000 0 0);
  mask-repeat: no-repeat;
  mask-position: top center, bottom center;
  mask-size: 100% 32px, 100% calc(100% - 30px);
}
.site-footer a { color: #a8d9d3; }
.site-footer a:hover { color: #fff; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1.15fr;
  gap: 40px;
  padding-bottom: 34px;
  margin-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.footer-clinic__name {
  margin: 0 0 12px;
  font-family: var(--font-serif);
  font-size: 1.12rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.04em;
}
.footer-clinic__address {
  margin: 0 0 16px;
  line-height: 1.8;
}
.footer-clinic__tel {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  text-decoration: none;
}
.footer-clinic__tel:hover { text-decoration: none; }
.footer-clinic__tel-icon {
  width: 20px;
  height: 20px;
  flex: none;
  color: #7fc3ba;
}
.footer-clinic__tel span {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
}
.footer-heading {
  margin: 0 0 14px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #7fc3ba;
}
.footer-hours__list {
  margin: 0 0 12px;
}
.footer-hours__list div {
  display: flex;
  gap: 12px;
  margin-bottom: 4px;
}
.footer-hours__list dt {
  flex: none;
  font-weight: 700;
  color: #fff;
}
.footer-hours__list dd { margin: 0; }
.footer-hours__note {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.7;
  color: rgba(220, 236, 233, 0.75);
}
.footer-nav__list {
  margin: 0;
  padding: 0;
  list-style: none;
  /* 最長項目「通所リハビリテーション」(約11em)が収まる幅を確保できる場合のみ2カラム */
  columns: 11em 2;
  column-gap: 20px;
}
.footer-nav__list li { margin-bottom: 8px; break-inside: avoid; }
.footer-nav__list a {
  font-size: 0.84rem;
  text-decoration: none;
}
.footer-nav__list a:hover { text-decoration: underline; }

@media (max-width: 820px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .footer-nav__list { columns: 2; }
}

.footer-legal {
  text-align: center;
  font-size: 0.82rem;
}
.footer-legal-sep { margin: 0 10px; color: rgba(255,255,255,0.3); }
.footer-bottom {
  padding-top: 10px;
  text-align: center;
  color: #7fc3ba;
  font-size: 0.78rem;
}

/* Utility */
.text-center { text-align: center; }
.is-hidden { display: none; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skeleton { color: var(--color-text-soft); text-align: center; padding: 40px 0; }
.fade-in { animation: fadeIn 0.5s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Scroll reveal ---------- */
/* :where() でこのユーティリティの詳細度を0にし、各コンポーネント自身の
   :hover などのtransform指定と決して競合しないようにする */
:where(.js-reveal) {
  opacity: 0;
  transform: translateX(-36px);
  transition: opacity 0.7s cubic-bezier(0.16, 0.8, 0.24, 1), transform 0.7s cubic-bezier(0.16, 0.8, 0.24, 1);
  transition-delay: var(--reveal-delay, 0s);
}
:where(.js-reveal.is-revealed) {
  opacity: 1;
  transform: translateX(0);
}
@media (prefers-reduced-motion: reduce) {
  :where(.js-reveal) {
    transition: none;
    opacity: 1;
    transform: none;
  }
}

/* カード内テキストは箱より少し遅れて下から浮き上がる */
:where(.js-reveal-up) {
  opacity: 0;
  transform: translateY(22px);
  transition-property: opacity, transform;
  transition-duration: 1.1s;
  transition-timing-function: cubic-bezier(0.16, 0.8, 0.24, 1);
  transition-delay: calc(var(--reveal-delay, 0s) + 0.3s);
}
:where(.js-reveal-up.is-revealed) {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  :where(.js-reveal-up) {
    transition: none;
    opacity: 1;
    transform: none;
  }
}

/* スマホで画面中央に来たカードを拡大するフォーカス演出 */
@media (max-width: 700px) {
  .dept-card.is-focused,
  .teaser-card.is-focused {
    transform: scale(1.04);
    box-shadow: var(--shadow-hover);
  }
}

@media (max-width: 700px) {
  .section { padding: 44px 0; }
  .content-block { padding: 34px 0; }
}

/* クイックナビ（画面右・追従） */
.quick-nav {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.quick-nav__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 62px;
  padding: 11px 4px 9px;
  background: var(--color-primary);
  color: #fff;
  text-decoration: none;
  border-radius: 10px;
  box-shadow: var(--shadow);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.quick-nav__btn:hover {
  background: var(--color-primary-dark);
  box-shadow: var(--shadow-hover);
  color: #fff;
}
.quick-nav__btn.is-inactive,
.quick-nav__btn.is-inactive:hover {
  cursor: default;
  background: var(--color-primary);
  box-shadow: var(--shadow);
  color: #fff;
}
.quick-nav__icon {
  flex-shrink: 0;
  display: block;
  width: 22px;
  height: 22px;
}
.quick-nav__label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
}

@media (max-width: 700px) {
  .quick-nav {
    right: 10px;
    bottom: 10px;
    gap: 7px;
  }
  .quick-nav__btn {
    width: 56px;
    padding: 10px 4px 8px;
    gap: 5px;
  }
  .quick-nav__icon { width: 20px; height: 20px; }
  .quick-nav__label { font-size: 0.63rem; }
}
