/* =========================================================
   ほまれメンタルクリニック — 共通スタイル
   palette（B案ロゴのブルーグリーン＋稲穂ゴールドから採取）:
     ink        #47504E  スレートグリーンチャコール
     ink-soft   #75837F
     teal-700   #47838D
     teal-600   #58939D  primary（ブルーグリーン）
     teal-100   #D9E9EA
     teal-050   #F5F9F9  base bg
     accent-400 #C3AD6D  予約CTA専用（稲穂ゴールド）
     line       #D8E4E2
   ========================================================= */

:root {
  --ink: #47504e;
  --ink-soft: #75837f;
  --teal-700: #47838d;
  --teal-600: #58939d;
  --teal-500: #74aab2;
  --teal-100: #d9e9ea;
  --teal-075: #e7f1f1;
  --teal-050: #f5f9f9;
  --accent-400: #c3ad6d;
  --accent-500: #a8914e;
  --accent-100: #f3eed8;
  --white: #ffffff;
  --line: #d8e4e2;
  --danger: #b94a4a;

  --font-display: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", sans-serif;
  --font-body: "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;

  --content-w: min(1200px, 92vw);
  --content-narrow: min(860px, 92vw);
  --radius: 20px;
  --shadow-soft: 0 8px 30px rgba(58, 76, 78, 0.08);
  --shadow-hover: 0 14px 40px rgba(58, 76, 78, 0.14);
  --header-h: 76px;
}

/* ---------- reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.9;
  color: var(--ink);
  background: var(--teal-050);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--teal-700);
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input,
select,
textarea {
  font-family: inherit;
  font-size: 1rem;
}

:focus-visible {
  outline: 3px solid var(--accent-400);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- typography ---------- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.5;
  text-wrap: balance;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal-600);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent-400);
}

.section-title {
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  margin-top: 0.35em;
  margin-bottom: 0.4em;
}

.section-lead {
  color: var(--ink-soft);
  max-width: 40em;
}

/* ---------- layout ---------- */
.section {
  padding: clamp(64px, 9vw, 120px) 0;
}

.section-inner {
  width: var(--content-w);
  margin-inline: auto;
}

.section-inner.narrow {
  width: var(--content-narrow);
}

.section.tint {
  background: var(--white);
}

/* 波形ディバイダ */
.wave {
  display: block;
  width: 100%;
  height: clamp(40px, 6vw, 90px);
}

/* =========================================================
   header
   ========================================================= */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  transition: box-shadow 0.3s ease;
}

/* スクロール時の背景は疑似要素に持たせる。
   .site-header 自体に backdrop-filter を付けると
   fixed 配置の .global-nav の基準がヘッダーになってしまい
   閉じたメニューがはみ出して見えるバグの原因になる */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.site-header.is-scrolled::before {
  opacity: 1;
}

.site-header.is-scrolled {
  box-shadow: 0 2px 20px rgba(58, 76, 78, 0.08);
}

.header-inner {
  position: relative;
  width: min(1400px, 96vw);
  height: 100%;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.12rem;
  color: var(--ink);
  line-height: 1.2;
  white-space: nowrap;
}

.brand-logo {
  width: 48px;
  height: 48px;
  flex: none;
  object-fit: contain;
}

/* フッター（濃色背景）ではロゴを白丸チップに載せる */
.footer-brand .brand-logo {
  width: 50px;
  height: 50px;
  background: #fff;
  border-radius: 50%;
  padding: 5px;
}

.brand-text small {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--teal-600);
}

.global-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.global-nav ul {
  display: flex;
  gap: clamp(16px, 2.4vw, 34px);
}

.global-nav ul a {
  position: relative;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink);
  padding: 6px 2px;
}

.global-nav ul a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--accent-400);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.global-nav ul a:hover::after,
.global-nav ul a[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-family: var(--font-display);
  font-weight: 700;
  border-radius: 999px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn-reserve {
  background: linear-gradient(135deg, var(--accent-400), var(--accent-500));
  color: #fff;
  padding: 10px 26px;
  font-size: 0.95rem;
  box-shadow: 0 6px 18px rgba(184, 154, 79, 0.35);
}

.btn-reserve:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(184, 154, 79, 0.45);
}

.btn-primary {
  background: var(--teal-600);
  color: #fff;
  padding: 14px 38px;
  font-size: 1rem;
  box-shadow: 0 6px 18px rgba(78, 141, 156, 0.3);
}

.btn-primary:hover {
  background: var(--teal-700);
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(78, 141, 156, 0.4);
}

.btn-ghost {
  padding: 13px 36px;
  border: 2px solid var(--teal-600);
  color: var(--teal-700);
  background: rgba(255, 255, 255, 0.7);
}

.btn-ghost:hover {
  background: var(--teal-075);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 18px 52px;
  font-size: 1.1rem;
}

/* ---------- mobile nav ---------- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 48px;
  height: 48px;
  padding: 12px;
  z-index: 120;
}

.nav-toggle span {
  display: block;
  height: 2.5px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(8.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-8.5px) rotate(-45deg);
}

/* =========================================================
   hero（トップページ）
   ========================================================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(180deg, #e6f0ef 0%, var(--teal-050) 70%);
}

#komorebi {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: var(--content-w);
  text-align: left;
  padding-top: var(--header-h);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

/* 開院時に写真へ差し替えるプレースホルダ */
.hero-visual-frame {
  aspect-ratio: 4 / 4.4;
  max-height: 520px;
  border-radius: 46% 54% 52% 48% / 44% 46% 54% 56%;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.85), var(--teal-100) 55%, var(--accent-100));
  border: 2px dashed var(--teal-500);
  box-shadow: var(--shadow-soft);
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  text-align: center;
  color: var(--teal-700);
  padding: 24px;
}

.hero-visual-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
}

.hero-visual-note {
  font-size: 0.78rem;
  color: var(--ink-soft);
}

/* ロゴ表示（外観写真が用意できるまで） */
.hero-visual-frame.is-logo {
  border: none;
  background: radial-gradient(circle at 50% 42%, #ffffff 0%, var(--teal-075) 68%, var(--teal-100) 100%);
  display: grid;
  place-items: center;
  padding: clamp(32px, 5vw, 64px);
}

.hero-visual-frame.is-logo img {
  width: min(76%, 330px);
  height: auto;
}

/* 写真入りプレースホルダ */
.hero-visual-frame.is-photo {
  position: relative;
  padding: 0;
  overflow: hidden;
  border: 5px solid #fff;
}

.hero-visual-frame.is-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dummy-badge {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.92);
  color: var(--teal-700);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 16px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: var(--shadow-soft);
}

/* 院内写真ギャラリー（ダミー） */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(16px, 2.4vw, 26px);
  margin-top: clamp(26px, 3.6vw, 44px);
}

.photo-item {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.photo-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.photo-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.photo-item figcaption {
  padding: 12px 18px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.dummy-tag {
  font-size: 0.66rem;
  font-weight: 700;
  background: var(--teal-075);
  color: var(--teal-700);
  padding: 2px 10px;
  border-radius: 999px;
}

.hero-catch {
  font-size: clamp(2.2rem, 5.6vw, 4.3rem);
  font-weight: 900;
  line-height: 1.45;
  letter-spacing: 0.04em;
}

.hero-catch .accent {
  color: var(--teal-600);
  position: relative;
}

.hero-catch .accent::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.08em;
  width: 100%;
  height: 0.28em;
  background: var(--accent-100);
  z-index: -1;
  border-radius: 4px;
}

.hero-sub {
  margin-top: 1.4em;
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  color: var(--ink-soft);
  max-width: 34em;
}

.hero-actions {
  margin-top: 2.4em;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.hero-note {
  margin-top: 1.2em;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* hero 登場アニメーション */
.hero-copy > *,
.hero-visual {
  opacity: 0;
  transform: translateY(26px);
  animation: heroUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-copy > *:nth-child(1) { animation-delay: 0.15s; }
.hero-copy > *:nth-child(2) { animation-delay: 0.35s; }
.hero-copy > *:nth-child(3) { animation-delay: 0.55s; }
.hero-copy > *:nth-child(4) { animation-delay: 0.75s; }
.hero-copy > *:nth-child(5) { animation-delay: 0.9s; }
.hero-visual { animation-delay: 0.5s; }

@keyframes heroUp {
  to {
    opacity: 1;
    transform: none;
  }
}

.hero-scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  color: var(--teal-600);
  writing-mode: vertical-rl;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-scroll::after {
  content: "";
  width: 1px;
  height: 44px;
  background: var(--teal-600);
  animation: scrollLine 2s ease-in-out infinite;
  transform-origin: top;
}

@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; }
  45% { transform: scaleY(1); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* =========================================================
   下層ページ hero
   ========================================================= */
.page-hero {
  position: relative;
  padding: calc(var(--header-h) + clamp(48px, 8vw, 90px)) 0 clamp(42px, 6vw, 70px);
  background: linear-gradient(180deg, #e6f0ef 0%, var(--teal-050) 100%);
  overflow: hidden;
}

.page-hero::before,
.page-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  pointer-events: none;
}

.page-hero::before {
  width: 340px;
  height: 340px;
  background: var(--accent-100);
  top: -100px;
  right: 8%;
}

.page-hero::after {
  width: 280px;
  height: 280px;
  background: var(--teal-100);
  bottom: -120px;
  left: 4%;
}

.page-hero .section-inner {
  position: relative;
  z-index: 1;
}

.page-title {
  font-size: clamp(1.9rem, 4.4vw, 3rem);
  font-weight: 900;
}

.page-lead {
  margin-top: 0.8em;
  color: var(--ink-soft);
  max-width: 42em;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6em;
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-bottom: 1.6em;
}

.breadcrumb li + li::before {
  content: "›";
  margin-right: 0.6em;
  color: var(--line);
}

/* =========================================================
   cards / grid
   ========================================================= */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(18px, 2.6vw, 30px);
  margin-top: clamp(28px, 4vw, 48px);
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: clamp(24px, 3vw, 36px);
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.card-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50% 50% 50% 8px;
  background: var(--teal-075);
  margin-bottom: 18px;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card:hover .card-icon {
  transform: rotate(-8deg) scale(1.08);
}

.card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5em;
}

.card p {
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.card .more {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  margin-top: 1em;
  font-weight: 700;
  font-size: 0.88rem;
}

.card .more::after {
  content: "→";
  transition: transform 0.25s ease;
}

.card:hover .more::after {
  transform: translateX(4px);
}

/* 症状タグ */
.symptom-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 1em;
}

.symptom-tags li {
  font-size: 0.82rem;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--teal-075);
  color: var(--teal-700);
  font-weight: 500;
}

/* =========================================================
   診療時間テーブル
   ========================================================= */
.hours-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  background: var(--white);
}

.hours-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.hours-table th,
.hours-table td {
  padding: 14px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

.hours-table thead th {
  background: var(--teal-600);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
}

.hours-table thead th:first-child {
  border-radius: 0;
}

.hours-table tbody th {
  font-weight: 500;
  color: var(--ink-soft);
  white-space: nowrap;
}

.hours-table .ok {
  color: var(--teal-600);
  font-weight: 700;
}

.hours-table .off {
  color: #ccdad8;
}

.hours-note {
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* 概要カード内などに埋め込む小さめの診療時間表 */
.hours-table-wrap.is-flat {
  box-shadow: none;
  border: 1px solid var(--line);
}

.hours-table-sm {
  min-width: 460px;
}

.hours-table-sm th,
.hours-table-sm td {
  padding: 9px 8px;
  font-size: 0.85rem;
}

.hours-table-sm + .hours-note,
.hours-table-wrap.is-flat + .hours-note {
  margin-top: 8px;
  font-size: 0.8rem;
}

/* =========================================================
   flow（受診の流れ）
   ========================================================= */
.flow {
  display: grid;
  gap: 0;
  margin-top: clamp(28px, 4vw, 48px);
  position: relative;
}

.flow-step {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 20px;
  padding: 26px 0;
  position: relative;
}

.flow-step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 35px;
  top: 92px;
  bottom: -8px;
  width: 2px;
  background: repeating-linear-gradient(
    to bottom,
    var(--teal-100) 0 6px,
    transparent 6px 12px
  );
}

.flow-num {
  width: 72px;
  height: 72px;
  border-radius: 50% 50% 50% 10px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.5rem;
  color: var(--teal-600);
  position: relative;
  z-index: 1;
}

.flow-body h3 {
  font-size: 1.15rem;
  margin-bottom: 0.3em;
}

.flow-body p {
  color: var(--ink-soft);
  font-size: 0.93rem;
  max-width: 44em;
}

/* =========================================================
   FAQ アコーディオン
   ========================================================= */
.faq-list {
  margin-top: clamp(24px, 3vw, 40px);
  display: grid;
  gap: 14px;
}

.faq-item {
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  text-align: left;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
}

.faq-q::before {
  content: "Q";
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--teal-600);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
}

.faq-q::after {
  content: "";
  margin-left: auto;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--teal-600);
  border-bottom: 2px solid var(--teal-600);
  transform: rotate(45deg);
  transition: transform 0.3s ease;
  flex: none;
}

.faq-item.is-open .faq-q::after {
  transform: rotate(-135deg);
}

.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s ease;
}

.faq-item.is-open .faq-a {
  grid-template-rows: 1fr;
}

.faq-a-inner {
  overflow: hidden;
}

.faq-a-inner p {
  padding: 0 24px 22px 72px;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

/* =========================================================
   お知らせ
   ========================================================= */
.news-list {
  margin-top: clamp(24px, 3vw, 40px);
  display: grid;
  gap: 2px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.news-list li a,
.news-list li > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 22px;
  padding: 20px 28px;
  transition: background 0.25s ease;
}

.news-list li a:hover {
  background: var(--teal-075);
}

.news-date {
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
  color: var(--ink-soft);
  flex: none;
}

.news-tag {
  flex: none;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--teal-100);
  color: var(--teal-700);
}

.news-tag.important {
  background: var(--accent-100);
  color: var(--accent-500);
}

.news-title {
  color: var(--ink);
  font-size: 0.95rem;
}

/* =========================================================
   CTA band
   ========================================================= */
.cta-band {
  position: relative;
  background: linear-gradient(135deg, var(--teal-700), var(--teal-600));
  color: #fff;
  overflow: hidden;
}

.cta-band::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: rgba(226, 214, 168, 0.25);
  filter: blur(50px);
  top: -160px;
  right: -80px;
}

.cta-band .section-inner {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.cta-band h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  color: #fff;
}

.cta-band p {
  margin-top: 0.5em;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
}

.cta-band .btn-reserve {
  padding: 18px 52px;
  font-size: 1.1rem;
}

/* =========================================================
   医師紹介
   ========================================================= */
.doctor-card {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
  margin-top: clamp(28px, 4vw, 48px);
}

.doctor-photo {
  aspect-ratio: 4 / 5;
  border-radius: 46% 54% 52% 48% / 44% 46% 54% 56%;
  background: linear-gradient(160deg, var(--teal-100), var(--teal-075) 60%, var(--accent-100));
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.doctor-name {
  font-size: 1.6rem;
  margin-top: 0.3em;
}

.doctor-name small {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-soft);
  letter-spacing: 0.2em;
}

.doctor-message {
  margin-top: 1.2em;
  color: var(--ink-soft);
}

.doctor-bio {
  margin-top: 1.6em;
  display: grid;
  gap: 8px;
  font-size: 0.88rem;
}

.doctor-bio dt {
  font-weight: 700;
  color: var(--teal-700);
  font-family: var(--font-display);
}

.doctor-bio dd {
  color: var(--ink-soft);
  margin-bottom: 0.6em;
}

/* =========================================================
   アクセス
   ========================================================= */
.access-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 3.4vw, 44px);
  margin-top: clamp(28px, 4vw, 48px);
  align-items: start;
}

.map-embed {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  background: var(--teal-075);
}

.map-embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ストリートビュー（横長） */
.streetview {
  margin-top: clamp(28px, 4vw, 48px);
}

.streetview-title {
  font-size: 1.15rem;
  margin-bottom: 0.3em;
}

.streetview-note {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 14px;
}

.map-embed.sv {
  aspect-ratio: 16 / 7;
}

@media (max-width: 640px) {
  .map-embed.sv {
    aspect-ratio: 4 / 3;
  }
}

.map-placeholder {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  background:
    linear-gradient(rgba(78, 141, 156, 0.06), rgba(78, 141, 156, 0.06)),
    repeating-linear-gradient(0deg, transparent 0 46px, rgba(78, 141, 156, 0.12) 46px 48px),
    repeating-linear-gradient(90deg, transparent 0 46px, rgba(78, 141, 156, 0.12) 46px 48px),
    var(--white);
  box-shadow: var(--shadow-soft);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}

.map-pin {
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--teal-700);
}

.map-pin svg {
  margin-inline: auto;
  animation: pinBounce 2.4s ease-in-out infinite;
}

@keyframes pinBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.info-table {
  width: 100%;
  border-collapse: collapse;
}

.info-table th,
.info-table td {
  padding: 16px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 0.95rem;
}

.info-table th {
  width: 8em;
  font-family: var(--font-display);
  color: var(--teal-700);
  white-space: nowrap;
}

/* =========================================================
   予約システム
   ========================================================= */
.reserve-shell {
  background: var(--white);
  border-radius: calc(var(--radius) + 6px);
  box-shadow: var(--shadow-soft);
  padding: clamp(24px, 4vw, 52px);
  margin-top: clamp(24px, 3vw, 40px);
}

/* タブ（新規予約 / 予約確認） */
.reserve-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 28px;
}

.reserve-tab {
  flex: 1;
  padding: 14px 10px;
  border-radius: 14px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink-soft);
  background: var(--teal-050);
  border: 2px solid transparent;
  transition: all 0.25s ease;
}

.reserve-tab[aria-selected="true"] {
  background: var(--teal-075);
  border-color: var(--teal-600);
  color: var(--teal-700);
}

/* プログレス */
.progress {
  display: flex;
  justify-content: space-between;
  margin-bottom: clamp(28px, 4vw, 44px);
  position: relative;
  counter-reset: step;
}

.progress::before {
  content: "";
  position: absolute;
  top: 19px;
  left: 10%;
  right: 10%;
  height: 3px;
  background: var(--teal-100);
  border-radius: 3px;
}

.progress-fill {
  position: absolute;
  top: 19px;
  left: 10%;
  height: 3px;
  background: var(--teal-600);
  border-radius: 3px;
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  max-width: 80%;
}

.progress li {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 8px;
  width: 20%;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-soft);
  counter-increment: step;
}

.progress li::before {
  content: counter(step);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--teal-100);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--ink-soft);
  transition: all 0.35s ease;
}

.progress li.is-active::before {
  border-color: var(--teal-600);
  background: var(--teal-600);
  color: #fff;
  transform: scale(1.12);
  box-shadow: 0 4px 14px rgba(78, 141, 156, 0.35);
}

.progress li.is-done::before {
  content: "✓";
  border-color: var(--teal-600);
  background: var(--teal-075);
  color: var(--teal-700);
}

.progress li.is-active {
  color: var(--teal-700);
}

/* ステップパネル */
.step-panel {
  animation: panelIn 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.step-title {
  font-size: 1.3rem;
  margin-bottom: 0.4em;
}

.step-desc {
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin-bottom: 1.6em;
}

/* 初診/再診 選択 */
.visit-choice {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.visit-btn {
  padding: 30px 24px;
  border-radius: var(--radius);
  border: 2px solid var(--line);
  background: var(--white);
  text-align: left;
  transition: all 0.25s ease;
  display: grid;
  gap: 6px;
}

.visit-btn:hover {
  border-color: var(--teal-500);
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
}

.visit-btn strong {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--teal-700);
}

.visit-btn span {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* カレンダー */
.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.cal-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  font-variant-numeric: tabular-nums;
}

.cal-nav {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--teal-075);
  color: var(--teal-700);
  font-size: 1.1rem;
  font-weight: 700;
  transition: all 0.25s ease;
}

.cal-nav:hover:not(:disabled) {
  background: var(--teal-100);
  transform: scale(1.08);
}

.cal-nav:disabled {
  opacity: 0.3;
  cursor: default;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.cal-dow {
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-soft);
  padding: 8px 0;
}

.cal-dow.sat { color: #5a7fb8; }
.cal-dow.sun { color: var(--danger); }

.cal-day {
  aspect-ratio: 1;
  max-height: 74px;
  border-radius: 14px;
  display: grid;
  place-content: center;
  gap: 2px;
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
  background: var(--teal-050);
  color: var(--ink);
  transition: all 0.2s ease;
  position: relative;
}

.cal-day .mark {
  font-size: 0.68rem;
  line-height: 1;
  color: var(--teal-600);
  font-weight: 700;
}

.cal-day.is-closed {
  background: transparent;
  color: #c9d6d4;
  cursor: default;
}

.cal-day.is-closed .mark { color: #c9d6d4; }

.cal-day.is-full {
  background: #f1eeea;
  color: #b0a99e;
  cursor: default;
}

.cal-day.is-full .mark { color: #b0a99e; }

.cal-day.is-open:hover {
  background: var(--teal-100);
  transform: scale(1.06);
  box-shadow: var(--shadow-soft);
  z-index: 1;
}

.cal-day.is-selected {
  background: var(--teal-600);
  color: #fff;
  transform: scale(1.06);
  box-shadow: 0 6px 16px rgba(78, 141, 156, 0.4);
}

.cal-day.is-selected .mark { color: rgba(255, 255, 255, 0.9); }

.cal-day.is-today::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-400);
}

.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.cal-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-chip {
  width: 14px;
  height: 14px;
  border-radius: 5px;
  display: inline-block;
}

/* 時間枠 */
.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
}

.slot-group-title {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--teal-700);
  margin: 22px 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.slot-group-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.slot-btn {
  padding: 13px 8px;
  border-radius: 12px;
  border: 2px solid var(--line);
  background: var(--white);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  transition: all 0.2s ease;
}

.slot-btn:hover:not(:disabled) {
  border-color: var(--teal-500);
  background: var(--teal-075);
  transform: translateY(-2px);
}

.slot-btn.is-selected {
  border-color: var(--teal-600);
  background: var(--teal-600);
  color: #fff;
  box-shadow: 0 4px 14px rgba(78, 141, 156, 0.35);
}

.slot-btn:disabled {
  background: #f1efec;
  color: #c0b9ae;
  border-color: transparent;
  cursor: default;
  text-decoration: line-through;
}

/* フォーム */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 24px;
}

.form-field {
  display: grid;
  gap: 7px;
}

.form-field.wide {
  grid-column: 1 / -1;
}

.form-field label {
  font-weight: 700;
  font-size: 0.9rem;
  font-family: var(--font-display);
  display: flex;
  align-items: center;
  gap: 8px;
}

.req {
  font-size: 0.68rem;
  background: var(--danger);
  color: #fff;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
}

.opt {
  font-size: 0.68rem;
  background: var(--teal-100);
  color: var(--teal-700);
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
}

.form-field input,
.form-field select,
.form-field textarea {
  padding: 13px 16px;
  border-radius: 12px;
  border: 2px solid var(--line);
  background: var(--teal-050);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--teal-500);
  background: var(--white);
}

.form-field textarea {
  min-height: 110px;
  resize: vertical;
}

.form-field .error-msg {
  font-size: 0.8rem;
  color: var(--danger);
  display: none;
}

.form-field.has-error input,
.form-field.has-error select {
  border-color: var(--danger);
}

.form-field.has-error .error-msg {
  display: block;
}

.consent-box {
  grid-column: 1 / -1;
  background: var(--teal-050);
  border-radius: 14px;
  padding: 18px 20px;
  font-size: 0.88rem;
}

.consent-box label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
  font-weight: 500;
}

.consent-box input {
  width: 20px;
  height: 20px;
  margin-top: 4px;
  accent-color: var(--teal-600);
  flex: none;
}

/* 確認テーブル */
.confirm-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.6em;
}

.confirm-table th,
.confirm-table td {
  padding: 15px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 0.95rem;
  vertical-align: top;
}

.confirm-table th {
  width: 10em;
  font-family: var(--font-display);
  color: var(--teal-700);
  white-space: nowrap;
}

/* 完了 */
.done-panel {
  text-align: center;
  padding: clamp(20px, 4vw, 40px) 0;
}

.done-check {
  width: 96px;
  height: 96px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: var(--teal-075);
  display: grid;
  place-items: center;
}

.done-check svg path {
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: checkDraw 0.7s 0.3s ease forwards;
}

@keyframes checkDraw {
  to { stroke-dashoffset: 0; }
}

.reserve-code {
  display: inline-block;
  margin: 18px 0;
  padding: 14px 34px;
  border-radius: 14px;
  background: var(--teal-050);
  border: 2px dashed var(--teal-500);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  color: var(--teal-700);
  font-variant-numeric: tabular-nums;
}

/* 予約一覧 */
.my-reserve-list {
  display: grid;
  gap: 14px;
}

.my-reserve-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 22px;
  padding: 20px 24px;
  border-radius: 16px;
  border: 2px solid var(--line);
  background: var(--teal-050);
}

.my-reserve-item.is-cancelled {
  opacity: 0.55;
}

.my-reserve-date {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--teal-700);
  font-variant-numeric: tabular-nums;
}

.my-reserve-meta {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 999px;
}

.badge.active {
  background: var(--teal-100);
  color: var(--teal-700);
}

.badge.cancelled {
  background: #f3e3e3;
  color: var(--danger);
}

.btn-cancel {
  margin-left: auto;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--danger);
  padding: 9px 20px;
  border-radius: 999px;
  border: 2px solid #eccfcf;
  transition: all 0.2s ease;
}

.btn-cancel:hover {
  background: #fbf0f0;
  border-color: var(--danger);
}

.empty-state {
  text-align: center;
  color: var(--ink-soft);
  padding: 48px 0;
}

/* ステップ操作 */
.step-actions {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: clamp(28px, 4vw, 40px);
  flex-wrap: wrap;
}

.btn-back {
  padding: 13px 32px;
  border-radius: 999px;
  border: 2px solid var(--line);
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-weight: 700;
  transition: all 0.2s ease;
}

.btn-back:hover {
  border-color: var(--ink-soft);
}

.selected-summary {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 12px 20px;
  border-radius: 12px;
  background: var(--accent-100);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent-500);
  margin-bottom: 1.4em;
}

/* =========================================================
   footer
   ========================================================= */
.site-footer {
  background: var(--ink);
  color: #dbe6e4;
  padding: clamp(48px, 7vw, 90px) 0 0;
  position: relative;
}

.footer-inner {
  width: var(--content-w);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(28px, 4vw, 60px);
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.15rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-brand small {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: var(--teal-100);
  font-weight: 700;
}

.footer-addr {
  margin-top: 1.2em;
  font-size: 0.88rem;
  font-style: normal;
  line-height: 2;
}

.footer-col h3 {
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 1em;
  letter-spacing: 0.1em;
}

.footer-col ul {
  display: grid;
  gap: 10px;
  font-size: 0.88rem;
}

.footer-col a {
  color: #dbe6e4;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--accent-400);
}

.footer-hours-table {
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
  margin-bottom: 12px;
}

.footer-hours-table th,
.footer-hours-table td {
  padding: 5px 8px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.footer-hours-table thead th {
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
}

.footer-hours-table tbody th {
  color: #dbe6e4;
  font-weight: 500;
  white-space: nowrap;
}

.footer-hours-table td {
  color: var(--teal-500);
}

.footer-hours-table td.off {
  color: #6d7f7d;
}

.footer-hours-note {
  font-size: 0.78rem;
  line-height: 1.9;
}

.footer-bottom {
  margin-top: clamp(36px, 5vw, 60px);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 22px 0;
  text-align: center;
  font-size: 0.78rem;
  color: #9aacaa;
}

/* =========================================================
   ページ遷移フェード（main.js が制御）
   ========================================================= */
body.page-enter {
  animation: pageIn 0.55s ease both;
}

@keyframes pageIn {
  from {
    opacity: 0;
  }
}

body.is-leaving {
  opacity: 0;
  transition: opacity 0.26s ease;
}

/* =========================================================
   scroll reveal
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.reveal-delay-1 { transition-delay: 0.12s; }
.reveal-delay-2 { transition-delay: 0.24s; }
.reveal-delay-3 { transition-delay: 0.36s; }

/* =========================================================
   responsive
   ========================================================= */
@media (max-width: 960px) {
  .global-nav {
    position: fixed;
    inset: 0;
    background: rgba(244, 248, 248, 0.98);
    backdrop-filter: blur(12px);
    flex-direction: column;
    justify-content: center;
    gap: 40px;
    transform: translateY(-100%);
    visibility: hidden;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
      visibility 0s linear 0.45s;
    z-index: 110;
  }

  .global-nav.is-open {
    transform: translateY(0);
    visibility: visible;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .global-nav ul {
    flex-direction: column;
    align-items: center;
    gap: 26px;
  }

  .global-nav ul a {
    font-size: 1.2rem;
    font-family: var(--font-display);
    font-weight: 700;
  }

  .nav-toggle {
    display: flex;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-bottom: 90px;
  }

  .hero-visual {
    width: min(340px, 80vw);
    margin-inline: auto;
  }

  .doctor-card {
    grid-template-columns: 1fr;
  }

  .doctor-photo {
    max-width: 300px;
    margin-inline: auto;
  }

  .access-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .hero-scroll {
    display: none;
  }

  .reserve-tab {
    font-size: 0.82rem;
    padding: 12px 6px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .flow-step {
    grid-template-columns: 56px 1fr;
    gap: 14px;
  }

  .flow-num {
    width: 56px;
    height: 56px;
    font-size: 1.2rem;
  }

  .flow-step:not(:last-child)::before {
    left: 27px;
    top: 76px;
  }

  .progress li {
    font-size: 0.6rem;
  }

  .progress li::before {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
  }

  .progress::before,
  .progress-fill {
    top: 15px;
  }

  .cal-day {
    border-radius: 10px;
    font-size: 0.85rem;
  }

  .cal-day .mark {
    font-size: 0.58rem;
  }

  .step-actions {
    flex-direction: column-reverse;
  }

  .step-actions .btn,
  .step-actions .btn-back {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .btn-cancel {
    margin-left: 0;
    width: 100%;
  }
}

/* =========================================================
   reduced motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .hero-copy > *,
  .hero-visual {
    opacity: 1;
    transform: none;
  }
}
