/* ================================================================
   Apple UI Design System — わらび内科・糖尿病クリニック
   Apple HIG (Human Interface Guidelines) 準拠
   ================================================================ */

/* ── デザイントークン（CSS Custom Properties）──────────────────── */
:root {
  /* Typography — Apple SF Pro scale */
  --font-apple: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text',
                'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif;

  /* Apple Color System */
  --apple-label:            #1D1D1F;
  --apple-label-secondary:  #6E6E73;
  --apple-label-tertiary:   #AEAEB2;
  --apple-label-quaternary: #C7C7CC;
  --apple-bg:               #FFFFFF;
  --apple-bg-secondary:     #F5F5F7;
  --apple-bg-tertiary:      #EFEFF4;
  --apple-separator:        #E8E8ED;
  --apple-separator-opaque: #C6C6C8;
  --apple-fill:             rgba(120, 120, 128, 0.08);
  --apple-fill-secondary:   rgba(120, 120, 128, 0.12);
  --apple-fill-tertiary:    rgba(120, 120, 128, 0.16);

  /* Brand (clinic identity — preserved) */
  --clr-primary:       #3D9B8F;
  --clr-primary-light: #E8F5F2;
  --clr-primary-dark:  #2D7A70;
  --clr-mint:          #A2D9B1;

  /* Apple Border Radius */
  --radius-xs:   6px;
  --radius-sm:   8px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-xl:  20px;
  --radius-2xl: 28px;

  /* Apple Shadows */
  --shadow-xs:    0 0.5px 1px rgba(0, 0, 0, 0.04);
  --shadow-sm:    0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md:    0 2px 8px rgba(0, 0, 0, 0.06), 0 0 1px rgba(0, 0, 0, 0.04);
  --shadow-lg:    0 4px 16px rgba(0, 0, 0, 0.08), 0 0 1px rgba(0, 0, 0, 0.04);
  --shadow-xl:    0 8px 32px rgba(0, 0, 0, 0.10), 0 0 1px rgba(0, 0, 0, 0.04);
  --shadow-float: 0 12px 40px rgba(0, 0, 0, 0.12), 0 0 1px rgba(0, 0, 0, 0.04);

  /* Apple Animation Easing */
  --ease-apple:     cubic-bezier(0.25, 0.1, 0.25, 1.0);
  --ease-apple-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast:  0.2s;
  --duration-base:  0.3s;
  --duration-slow:  0.5s;
}


/* ── Apple HIG フォントサイズオーバーライド ─────────────────── */
/* Tailwind CDN のデフォルトサイズを Apple HIG スケールに置換    */
/* !important は Tailwind ランタイム生成 <style> より優先するため */

/* text-xs: 12px → 13px (Apple Footnote) */
.text-xs  { font-size: 0.8125rem !important; line-height: 1.38 !important; letter-spacing: -0.006em !important; }

/* text-sm: 14px → 16px (Apple Callout) */
.text-sm  { font-size: 1rem !important; line-height: 1.5 !important; letter-spacing: -0.016em !important; }

/* text-base: 16px → 17px (Apple Body) */
.text-base { font-size: 1.0625rem !important; line-height: 1.53 !important; letter-spacing: -0.022em !important; }

/* text-lg: 18px → 19px (Apple Headline) */
.text-lg  { font-size: 1.1875rem !important; line-height: 1.3 !important; letter-spacing: -0.012em !important; }

/* text-xl: 20px → 22px (Apple Title 3) */
.text-xl  { font-size: 1.375rem !important; line-height: 1.25 !important; letter-spacing: -0.015em !important; }

/* text-2xl: 24px → 28px (Apple Title 2) */
.text-2xl { font-size: 1.75rem !important; line-height: 1.18 !important; letter-spacing: -0.02em !important; }

/* text-3xl: 30px → 34px */
.text-3xl { font-size: 2.125rem !important; line-height: 1.12 !important; letter-spacing: -0.025em !important; }

/* text-4xl: 36px → 40px (Apple Title 1) */
.text-4xl { font-size: 2.5rem !important; line-height: 1.1 !important; letter-spacing: -0.025em !important; }

/* text-5xl: 48px → 48px (Apple Large Title / Display) */
.text-5xl { font-size: 3rem !important; line-height: 1.08 !important; letter-spacing: -0.03em !important; }

/* モバイル用レスポンシブ補正 */
@media (max-width: 767px) {
  .text-2xl { font-size: 1.5rem !important; line-height: 1.2 !important; }
  .text-3xl { font-size: 1.75rem !important; line-height: 1.15 !important; }
  .text-4xl { font-size: 2rem !important; line-height: 1.12 !important; }
  .text-5xl { font-size: 2.5rem !important; line-height: 1.1 !important; }
}

/* md: プレフィックス付きも対応（Tailwind レスポンシブ） */
@media (min-width: 768px) {
  .md\:text-base { font-size: 1.0625rem !important; line-height: 1.53 !important; letter-spacing: -0.022em !important; }
  .md\:text-lg   { font-size: 1.1875rem !important; line-height: 1.3 !important; letter-spacing: -0.012em !important; }
  .md\:text-xl   { font-size: 1.375rem !important; line-height: 1.25 !important; letter-spacing: -0.015em !important; }
  .md\:text-2xl  { font-size: 1.75rem !important; line-height: 1.18 !important; letter-spacing: -0.02em !important; }
  .md\:text-3xl  { font-size: 2.125rem !important; line-height: 1.12 !important; letter-spacing: -0.025em !important; }
  .md\:text-4xl  { font-size: 2.5rem !important; line-height: 1.1 !important; letter-spacing: -0.025em !important; }
}


/* ── ベースタイポグラフィ ─────────────────────────────────────── */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-apple);
  color: var(--apple-label);
  background: var(--apple-bg);
  font-size: 17px;                        /* Apple Body default */
  line-height: 1.53;
  letter-spacing: -0.022em;               /* Apple default tracking */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'palt' 1;        /* Japanese proportional alternates */
}

/* Apple HIG Type Scale */
h1 {
  font-family: var(--font-apple);
  font-size: 2.5rem;                      /* 40px — Title 1 */
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 700;
}

h2 {
  font-family: var(--font-apple);
  font-size: 1.75rem;                     /* 28px — Title 2 */
  line-height: 1.18;
  letter-spacing: -0.02em;
  font-weight: 700;
}

h3 {
  font-family: var(--font-apple);
  font-size: 1.375rem;                    /* 22px — Title 3 */
  line-height: 1.25;
  letter-spacing: -0.015em;
  font-weight: 600;
}

h4 {
  font-family: var(--font-apple);
  font-size: 1.1875rem;                   /* 19px — Headline */
  line-height: 1.3;
  letter-spacing: -0.012em;
  font-weight: 600;
}

/* 目次ナビ（横スクロール・スティッキー） */
/* 目次ナビ — テキストリンクのみ（ピルなし） */
.toc-nav {
  position: sticky;
  top: 64px;
  z-index: 30;
  background: #fff;
  border-bottom: 1px solid #E8E8ED;
}
.toc-wrapper { position: relative; }
.toc-scroll {
  display: flex;
  gap: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0;
}
.toc-scroll::-webkit-scrollbar { display: none; }
.toc-scroll a {
  flex-shrink: 0;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 500;
  color: #6E6E73;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  background: none;
  border-radius: 0;
}
.toc-scroll a svg { display: none; }
.toc-scroll a:hover { color: #3D9B8F; }
.toc-scroll a.active {
  color: #3D9B8F;
  border-bottom-color: #3D9B8F;
  font-weight: 600;
}
@media (min-width: 768px) {
  .toc-scroll { flex-wrap: wrap; overflow-x: visible; }
  .toc-scroll a { padding: 10px 16px; font-size: 13px; }
  .toc-scroll a svg { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; opacity: 0.5; }
  .toc-scroll a:hover svg, .toc-scroll a.active svg { opacity: 1; }
}

/* 中国語フォールバック */
html[lang^="zh"] body,
html[lang^="zh"] h1,
html[lang^="zh"] h2,
html[lang^="zh"] h3,
html[lang^="zh"] h4 {
  font-family: 'Noto Sans SC', 'Noto Sans JP', sans-serif;
}

/* レスポンシブタイポグラフィ — モバイル調整 */
@media (max-width: 767px) {
  h1 { font-size: 1.75rem; line-height: 1.15; }     /* 28px on mobile */
  h2 { font-size: 1.375rem; line-height: 1.22; }     /* 22px on mobile */
  h3 { font-size: 1.125rem; line-height: 1.28; }     /* 18px on mobile */
  h4 { font-size: 1.0625rem; line-height: 1.32; }    /* 17px on mobile */
}


/* ── Apple スタイルのリンク ───────────────────────────────────── */
/* ボタン・カード・ナビ等を除くプレーンテキストリンクのみ対象 */
a:not([class*="btn-apple"]):not([class*="pill-link"]):not([class*="liquid-glass"]):not([class*="card"]):not([class*="bg-"]):not([class*="flex"]):not([class*="block"]):not([class*="nav-"]) {
  color: var(--clr-primary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-apple);
}
a:not([class*="btn-apple"]):not([class*="pill-link"]):not([class*="liquid-glass"]):not([class*="card"]):not([class*="bg-"]):not([class*="flex"]):not([class*="block"]):not([class*="nav-"]):hover {
  color: var(--clr-primary-dark);
}


/* ── Apple カードコンポーネント ──────────────────────────────── */
.card {
  background: var(--apple-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--apple-separator);
  transition: transform var(--duration-base) var(--ease-apple),
              box-shadow var(--duration-base) var(--ease-apple),
              border-color var(--duration-base) var(--ease-apple);
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(90, 175, 168, 0.3);
}


/* ── Liquid Glass（遷移リンク付きカード）──────────────────────── */
/* Apple WWDC25 Liquid Glass: グリーン系ティント・屈折感・スペキュラハイライト */
.liquid-glass {
  position: relative;
  border-radius: var(--radius-xl);
  background: linear-gradient(
    135deg,
    rgba(90, 175, 168, 0.12) 0%,
    rgba(162, 217, 177, 0.10) 40%,
    rgba(238, 248, 246, 0.55) 100%
  );
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  border: 1px solid rgba(90, 175, 168, 0.18);
  box-shadow:
    0 0 0 0.5px rgba(90, 175, 168, 0.06),
    0 2px 12px rgba(90, 175, 168, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -0.5px 0 rgba(0, 0, 0, 0.02);
  transition:
    transform var(--duration-base) var(--ease-apple),
    box-shadow var(--duration-base) var(--ease-apple),
    background var(--duration-base) var(--ease-apple),
    border-color var(--duration-base) var(--ease-apple);
  cursor: pointer;
  overflow: hidden;
}

/* スペキュラハイライト（上部の光沢感）*/
.liquid-glass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    168deg,
    rgba(255, 255, 255, 0.6) 0%,
    rgba(162, 217, 177, 0.06) 35%,
    transparent 60%
  );
  pointer-events: none;
  z-index: 1;
  transition: opacity var(--duration-base) var(--ease-apple);
}

/* ホバー: 浮き上がり + グリーンティント強調 */
.liquid-glass:hover {
  transform: translateY(-3px);
  background: linear-gradient(
    135deg,
    rgba(90, 175, 168, 0.18) 0%,
    rgba(162, 217, 177, 0.14) 40%,
    rgba(238, 248, 246, 0.65) 100%
  );
  border-color: rgba(90, 175, 168, 0.30);
  box-shadow:
    0 0 0 0.5px rgba(90, 175, 168, 0.10),
    0 8px 32px rgba(90, 175, 168, 0.14),
    0 2px 8px rgba(90, 175, 168, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    inset 0 -0.5px 0 rgba(0, 0, 0, 0.02);
}
.liquid-glass:hover::before {
  opacity: 0.9;
}

/* フォーカス（アクセシビリティ）*/
.liquid-glass:focus-visible {
  outline: 2px solid var(--clr-primary);
  outline-offset: 2px;
}

/* Featured variant（糖尿病内科：濃いグリーン＋ソリッド寄り）*/
.liquid-glass-featured {
  background: linear-gradient(
    145deg,
    rgba(74, 154, 148, 0.22) 0%,
    rgba(90, 175, 168, 0.16) 35%,
    rgba(238, 248, 246, 0.90) 100%
  );
  border-color: rgba(90, 175, 168, 0.32);
  box-shadow:
    0 0 0 0.5px rgba(90, 175, 168, 0.12),
    0 4px 20px rgba(90, 175, 168, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    inset 0 -0.5px 0 rgba(0, 0, 0, 0.02);
}
.liquid-glass-featured::before {
  background: linear-gradient(
    168deg,
    rgba(255, 255, 255, 0.7) 0%,
    rgba(90, 175, 168, 0.06) 30%,
    transparent 55%
  );
}
.liquid-glass-featured:hover {
  background: linear-gradient(
    145deg,
    rgba(74, 154, 148, 0.30) 0%,
    rgba(90, 175, 168, 0.22) 35%,
    rgba(238, 248, 246, 0.95) 100%
  );
  border-color: rgba(90, 175, 168, 0.45);
  box-shadow:
    0 0 0 0.5px rgba(90, 175, 168, 0.16),
    0 12px 40px rgba(90, 175, 168, 0.20),
    0 2px 8px rgba(90, 175, 168, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    inset 0 -0.5px 0 rgba(0, 0, 0, 0.02);
}

@media (prefers-reduced-motion: reduce) {
  .liquid-glass { transition: none; }
  .liquid-glass::before { transition: none; }
}


/* セクション間隔バリエーション（画一的 py-20 md:py-28 を回避） */
.section-lg  { padding-top: 5rem; padding-bottom: 5rem; }
.section-md  { padding-top: 3.5rem; padding-bottom: 3.5rem; }
.section-sm  { padding-top: 2.5rem; padding-bottom: 2.5rem; }
@media (min-width: 768px) {
  .section-lg  { padding-top: 7rem; padding-bottom: 7rem; }
  .section-md  { padding-top: 5rem; padding-bottom: 5rem; }
  .section-sm  { padding-top: 3.5rem; padding-bottom: 3.5rem; }
}

/* ナビリンク共通（重複クラス排除） */
.nav-link-mobile {
  display: block;
  padding: 0.75rem 0;
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--apple-label);
  border-bottom: 1px solid var(--apple-separator);
  transition: color var(--duration-fast) var(--ease-apple);
}
.nav-link-mobile:hover { color: var(--clr-primary); }

/* モバイルメニュー自動スタガー（inline style 不要） */
#mobile-menu .nav-link-mobile:nth-child(1)  { transition-delay: 0.05s; }
#mobile-menu .nav-link-mobile:nth-child(2)  { transition-delay: 0.08s; }
#mobile-menu .nav-link-mobile:nth-child(3)  { transition-delay: 0.11s; }
#mobile-menu .nav-link-mobile:nth-child(4)  { transition-delay: 0.14s; }
#mobile-menu .nav-link-mobile:nth-child(5)  { transition-delay: 0.17s; }
#mobile-menu .nav-link-mobile:nth-child(6)  { transition-delay: 0.20s; }
#mobile-menu .nav-link-mobile:nth-child(7)  { transition-delay: 0.23s; }
#mobile-menu .nav-link-mobile:nth-child(8)  { transition-delay: 0.26s; }
#mobile-menu .nav-link-mobile:nth-child(9)  { transition-delay: 0.29s; }
#mobile-menu .nav-link-mobile:nth-child(10) { transition-delay: 0.32s; }
#mobile-menu .nav-link-mobile:nth-child(11) { transition-delay: 0.35s; }
#mobile-menu .nav-link-mobile:nth-child(12) { transition-delay: 0.38s; }
#mobile-menu .nav-link-mobile:nth-child(13) { transition-delay: 0.41s; }
#mobile-menu .nav-link-mobile:nth-child(14) { transition-delay: 0.44s; }

/* アニメーションバリエーション */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease-apple-out),
              transform 0.6s var(--ease-apple-out);
}
.fade-in.visible { opacity: 1; transform: none; }

.fade-in-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-apple-out),
              transform 0.7s var(--ease-apple-out);
}
.fade-in-up.visible { opacity: 1; transform: none; }

.fade-in-scale {
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.5s var(--ease-apple-out),
              transform 0.5s var(--ease-apple-out);
}
.fade-in-scale.visible { opacity: 1; transform: none; }

.fade-in-left {
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.6s var(--ease-apple-out),
              transform 0.6s var(--ease-apple-out);
}
.fade-in-left.visible { opacity: 1; transform: none; }

/* スタガード（data-delay） */
[data-delay="1"] { transition-delay: 0.08s; }
[data-delay="2"] { transition-delay: 0.16s; }
[data-delay="3"] { transition-delay: 0.24s; }
[data-delay="4"] { transition-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
  .fade-in, .fade-in-up, .fade-in-scale, .fade-in-left {
    opacity: 1; transform: none; transition: none;
  }
}


/* ── フローティング予約ボタン ──────────────────────────────── */
#float-reserve {
  opacity: 0;
  transform: translate(60px, -50%);
  transition: opacity 0.4s var(--ease-apple),
              transform 0.4s var(--ease-apple);
  pointer-events: none;
}
#float-reserve.show {
  opacity: 1;
  transform: translate(0, -50%);
  pointer-events: auto;
}
@media (max-width: 767px) {
  #float-reserve { display: none !important; }
}


/* ── モバイルメニュー ──────────────────────────────────────── */
#mobile-menu {
  position: fixed;
  inset: 0;
  top: 64px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  z-index: 39;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity var(--duration-base) var(--ease-apple),
              transform var(--duration-base) var(--ease-apple);
  pointer-events: none;
  overflow-y: auto;
}
#mobile-menu.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
#mobile-menu a {
  opacity: 0;
  transform: translateY(6px);
}
#mobile-menu.is-open a {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.25s var(--ease-apple),
              transform 0.25s var(--ease-apple);
}
@media (prefers-reduced-motion: reduce) {
  #mobile-menu,
  #mobile-menu a {
    transition: none;
    opacity: 1;
    transform: none;
  }
}


/* ── ドロップダウンメニュー ──────────────────────────────────── */
.nav-dropdown {
  position: relative;
}
.nav-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.nav-dropdown-trigger .chevron {
  transition: transform var(--duration-fast) var(--ease-apple);
}
.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  min-width: 200px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-float);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-fast) var(--ease-apple),
              transform var(--duration-fast) var(--ease-apple),
              visibility var(--duration-fast);
  z-index: 50;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.nav-dropdown:hover .chevron {
  transform: rotate(180deg);
}
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
}
.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;                  /* 15px — Apple Subheadline */
  font-weight: 500;
  color: var(--apple-label-secondary);
  transition: background var(--duration-fast) var(--ease-apple),
              color var(--duration-fast) var(--ease-apple);
  white-space: nowrap;
}
.nav-dropdown-menu a:hover {
  background: var(--clr-primary-light);
  color: var(--clr-primary);
}
.nav-dropdown-menu .dropdown-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}


/* ── FAQ アコーディオン ───────────────────────────────────── */
.faq-item summary {
  list-style: none;
  cursor: pointer;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item .faq-icon-svg {
  transition: transform var(--duration-base) var(--ease-apple);
}
.faq-item[open] .faq-icon-svg { transform: rotate(45deg); }
.faq-item[open] summary h3 { color: var(--clr-primary); }


/* ── スクロールバー（Apple風） ──────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--apple-label-quaternary);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--apple-label-tertiary);
}


/* ── ヘッダーオフセット ───────────────────────────────────── */
.header-offset { padding-top: 4rem; }


/* ================================================================
   Apple 統一ボタンシステム
   全ページ共通 — default / hover / focus-visible の3状態を統一
   ================================================================ */

/* ── 共通ベース ──────────────────────────────────────────── */
.btn-apple {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  border-radius: 980px;
  transition: background var(--duration-fast) var(--ease-apple),
              color var(--duration-fast) var(--ease-apple),
              box-shadow var(--duration-fast) var(--ease-apple),
              transform var(--duration-fast) var(--ease-apple);
  cursor: pointer;
  border: none;
  line-height: 1.2;
  text-decoration: none;
}
.btn-apple:focus-visible {
  outline: 2px solid var(--clr-primary);
  outline-offset: 2px;
}

/* ── 1. Primary（塗りつぶし）: WEB予約 等 ─────────────────── */
/*   default : 白文字 + プライマリ背景                         */
/*   hover   : 白文字 + ダーク背景 + 浮き上がり               */
/*   focus   : プライマリアウトライン                          */
.btn-apple-primary {
  background: var(--clr-primary);
  color: #fff !important;
}
.btn-apple-primary:hover,
.btn-apple-primary:focus,
.btn-apple-primary:focus-visible,
.btn-apple-primary:active {
  background: var(--clr-primary-dark);
  color: #fff !important;
  box-shadow: 0 4px 16px rgba(90, 175, 168, 0.3);
  transform: translateY(-1px);
}

/* ── 2. Secondary（ティント）: 院長紹介を見る 等 ──────────── */
/*   default : プライマリ文字 + 薄いプライマリ背景             */
/*   hover   : 白文字 + プライマリ背景                         */
/*   focus   : プライマリアウトライン                          */
.btn-apple-secondary {
  background: var(--clr-primary-light);
  color: var(--clr-primary) !important;
}
.btn-apple-secondary:hover,
.btn-apple-secondary:focus,
.btn-apple-secondary:focus-visible,
.btn-apple-secondary:active {
  background: var(--clr-primary);
  color: #fff !important;
  box-shadow: 0 4px 16px rgba(90, 175, 168, 0.25);
  transform: translateY(-1px);
}

/* ── 3. Outline（枠線）: キャンセル・戻る 等 ──────────────── */
/*   default : プライマリ文字 + プライマリ枠線 + 透明背景       */
/*   hover   : 白文字 + プライマリ背景                         */
.btn-apple-outline {
  background: transparent;
  color: var(--clr-primary) !important;
  border: 1.5px solid var(--clr-primary);
}
.btn-apple-outline:hover,
.btn-apple-outline:focus,
.btn-apple-outline:focus-visible,
.btn-apple-outline:active {
  background: var(--clr-primary);
  color: #fff !important;
  border-color: var(--clr-primary);
}

/* ── 4. Ghost（テキスト）: 続きを見る、リンクCTA 等 ────────── */
/*   default : プライマリ文字 + 透明背景                       */
/*   hover   : プライマリ文字 + 薄い背景                       */
.btn-apple-ghost {
  background: transparent;
  color: var(--clr-primary) !important;
  padding: 0.5rem 1rem;
}
.btn-apple-ghost:hover,
.btn-apple-ghost:focus,
.btn-apple-ghost:focus-visible,
.btn-apple-ghost:active {
  background: var(--clr-primary-light);
  color: var(--clr-primary-dark) !important;
}

/* ── 5. LINE 専用 ─────────────────────────────────────────── */
/*   default : 白文字 + LINE緑背景                             */
/*   hover   : 白文字 + ダークLINE緑 + 浮き上がり             */
.btn-apple-line {
  background: #06C755;
  color: #fff !important;
}
.btn-apple-line:hover,
.btn-apple-line:focus,
.btn-apple-line:focus-visible,
.btn-apple-line:active {
  background: #05a648;
  color: #fff !important;
  box-shadow: 0 4px 16px rgba(6, 199, 85, 0.3);
  transform: translateY(-1px);
}
.btn-apple-line:focus-visible {
  outline-color: #06C755;
}

/* ── 6. Phone（電話）────────────────────────────────────── */
/*   default : サブテキスト色 + 透明背景                       */
/*   hover   : プライマリ文字 + 薄い背景                       */
.btn-apple-phone {
  background: transparent;
  color: var(--apple-label-secondary) !important;
}
.btn-apple-phone:hover,
.btn-apple-phone:focus,
.btn-apple-phone:focus-visible,
.btn-apple-phone:active {
  background: var(--apple-fill);
  color: var(--clr-primary) !important;
}

/* ── 7. Pill バッジ（詳しく見る 等）──────────────────────── */
/*   default : プライマリ文字 + 薄いプライマリ背景 + ピル形状  */
/*   hover (group-hover) : 白文字 + プライマリ背景             */
.pill-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 700;
  border-radius: 980px;
  background: var(--clr-primary-light);
  color: var(--clr-primary) !important;
  transition: background var(--duration-fast) var(--ease-apple),
              color var(--duration-fast) var(--ease-apple);
}
.group:hover .pill-link,
.pill-link:hover,
.pill-link:focus,
.pill-link:active {
  background: var(--clr-primary);
  color: #fff !important;
}

/* ── サイズバリエーション ─────────────────────────────────── */
.btn-apple-sm {
  padding: 0.5rem 1rem;
  font-size: 0.9375rem;
}
.btn-apple-lg {
  padding: 1rem 2rem;
  font-size: 1.1875rem;
}

/* ── reduced motion ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .btn-apple,
  .btn-apple-primary,
  .btn-apple-secondary,
  .btn-apple-outline,
  .btn-apple-ghost,
  .btn-apple-line,
  .btn-apple-phone,
  .pill-link {
    transition: none;
    transform: none !important;
  }
}


/* ── Apple セクション間隔 ──────────────────────────────────── */
.section-apple {
  padding-top: 5rem;
  padding-bottom: 5rem;
}
@media (max-width: 767px) {
  .section-apple {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
}


/* ── Apple グラスモーフィズム（ヘッダー等）─────────────────── */
.glass-apple {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.08);
}


/* ── ニュースモーダル ──────────────────────────────────────── */
.news-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s var(--ease-apple), visibility 0.25s;
}
.news-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}
.news-modal-content {
  position: relative;
  background: #fff;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-float);
  max-width: 640px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 2rem;
  transform: translateY(16px);
  transition: transform 0.25s var(--ease-apple-out);
}
.news-modal-overlay.active .news-modal-content {
  transform: none;
}
.news-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--apple-fill);
  color: var(--apple-label-secondary);
  border: none;
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-apple);
}
.news-modal-close:hover {
  background: var(--apple-fill-secondary);
}


/* ── 診療時間テーブル ──────────────────────────────────────── */
.hours-table th,
.hours-table td {
  padding: 10px 8px;
  text-align: center;
  border-bottom: 0.5px solid var(--apple-separator);
}
.hours-table thead th {
  background: var(--clr-primary-light);
  color: var(--clr-primary-dark);
  font-weight: 600;
  font-size: 0.9375rem;
}
.hours-circle {
  color: var(--clr-primary-dark);
  font-weight: 600;
  font-size: 0.8125rem;
}
@media (min-width: 768px) {
  .hours-circle { font-size: 1.1rem; }
}
.hours-dash { color: var(--apple-label-quaternary); }


/* ── GBP スクロールコンテナ ──────────────────────────────── */
.gbp-scroll {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.5rem;
}
.gbp-scroll::-webkit-scrollbar { height: 4px; }
.gbp-scroll::-webkit-scrollbar-track { background: var(--apple-bg-secondary); border-radius: 2px; }
.gbp-scroll::-webkit-scrollbar-thumb { background: var(--clr-primary); border-radius: 2px; }
@media (min-width: 768px) {
  .gbp-scroll { display: grid; grid-template-columns: repeat(2, 1fr); overflow: unset; }
}


/* ── ステップ接続線 ──────────────────────────────────────── */
.step-grid { position: relative; }
.step-grid::before {
  content: '';
  position: absolute;
  top: 28px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 80px);
  height: 2px;
  background: var(--clr-primary);
  opacity: 0.2;
}
@media (max-width: 767px) {
  .step-grid::before { display: none; }
}


/* ── Apple セレクション（文字選択色）──────────────────────── */
::selection {
  background: rgba(90, 175, 168, 0.2);
  color: var(--apple-label);
}
