/* ==========================================================================
   tokens.css — 内視鏡検査サテライトサイト
   Role-based CSS Custom Properties（theme swapping対応）
   SP-first / Tailwind + Standard CSS ハイブリッド
   ========================================================================== */

:root {

  /* --------------------------------------------------------------------------
     Brand Colors
     -------------------------------------------------------------------------- */

  --color-brand-primary:         #3F564A;           /* Inferred — メインCTA / ヘッダー / ダークバンド */
  --color-brand-primary-hover:   #2D3F36;           /* Inferred */
  --color-brand-primary-soft:    #EEF2EF;           /* Inferred — アイコン背景 / タグ背景 */

  --color-brand-secondary:       #70806F;           /* Inferred — サブボタン / セカンダリラベル */
  --color-brand-secondary-hover: #5A6A5E;           /* Inferred */
  --color-brand-secondary-soft:  #E4EBE4;           /* Inferred — チップ / ソフトタグ */

  --color-brand-accent:          #B29A67;           /* Observed approx. — 英字見出し / 番号装飾 / 電話CTA */
  --color-brand-accent-hover:    #9A8355;           /* Inferred */
  --color-brand-accent-soft:     #F5EFE3;           /* Inferred — アクセントチップ / ウォームハイライト */

  /* --------------------------------------------------------------------------
     Background Colors
     -------------------------------------------------------------------------- */

  --color-bg-page:        #F7F5EF;                  /* Observed — ページ全体の背景 */
  --color-bg-section:     #FFFFFF;                  /* Inferred — 標準セクション背景 */
  --color-bg-section-alt: #EEF2EF;                  /* Inferred — 交互セクション背景（薄グリーン） */
  --color-bg-strong:      #3F564A;                  /* Observed approx. — ダークバンド / フッター */
  --color-bg-cta:         #3F564A;                  /* Inferred — Final CTA専用（.p-final-cta のみ使用） */

  /* --------------------------------------------------------------------------
     Surface Colors
     -------------------------------------------------------------------------- */

  --color-surface-base:   #FFFFFF;                  /* Inferred */
  --color-surface-card:   #FFFFFF;                  /* Inferred — カード / パネル背景 */
  --color-surface-soft:   #F7F5EF;                  /* Inferred — 薄い背景サーフェス */
  --color-surface-accent: #F5EFE3;                  /* Inferred — ウォームゴールドサーフェス */

  /* --------------------------------------------------------------------------
     Text Colors
     -------------------------------------------------------------------------- */

  --color-text-primary:      #3D3A35;               /* Observed — 本文 / 見出し */
  --color-text-secondary:    #6B6660;               /* Inferred — サブ情報 / キャプション */
  --color-text-muted:        #9A9490;               /* Inferred — 日付 / メタ情報 */
  --color-text-inverse:      #F7F5EF;               /* Inferred — ダーク背景上のテキスト */
  --color-text-on-primary:   #FFFFFF;               /* Inferred — グリーンCTA上のラベル */
  --color-text-on-secondary: #FFFFFF;               /* Inferred — セカンダリボタン上のラベル */

  /* --------------------------------------------------------------------------
     Border Colors
     -------------------------------------------------------------------------- */

  --color-border-default: #D8D4CC;                  /* Inferred — 標準ボーダー */
  --color-border-strong:  #9A9490;                  /* Inferred — 強調ボーダー */
  --color-border-accent:  #B29A67;                  /* Inferred — ゴールドボーダー */

  /* --------------------------------------------------------------------------
     Semantic Colors
     -------------------------------------------------------------------------- */

  --color-success: #3A7D44;                         /* Recommended */
  --color-warning: #C8880A;                         /* Recommended */
  --color-error:   #C0392B;                         /* Recommended */

  /* --------------------------------------------------------------------------
     Chip Colors（role-based）
     -------------------------------------------------------------------------- */

  --color-chip-primary-bg:   var(--color-brand-primary);
  --color-chip-primary-text: var(--color-text-on-primary);

  --color-chip-secondary-bg:   var(--color-brand-secondary-soft);
  --color-chip-secondary-text: var(--color-text-primary);

  --color-chip-accent-bg:   var(--color-surface-accent);
  --color-chip-accent-text: var(--color-text-primary);

  /* --------------------------------------------------------------------------
     Typography
     -------------------------------------------------------------------------- */

  --font-family-heading: "Cormorant Garamond", "Cormorant", "Noto Serif JP", "游明朝", "Yu Mincho", "YuMincho", "HG明朝E", "MS PMincho", serif;
  --font-family-body: "Hiragino Kaku Gothic Pro", "ヒラギノ角ゴ Pro W3", Meiryo, メイリオ, "游ゴシック Medium", "Yu Gothic Medium", 游ゴシック体, "Yu Gothic", YuGothic, "MS PGothic", Osaka, arial, sans-serif;

  --font-size-xs:   0.75rem;                        /*  12px */
  --font-size-sm:   0.875rem;                       /*  14px */
  --font-size-base: 1rem;                           /*  16px — SP base */
  --font-size-md:   1.125rem;                       /*  18px */
  --font-size-lg:   1.25rem;                        /*  20px */
  --font-size-xl:   1.5rem;                         /*  24px */
  --font-size-2xl:  1.75rem;                        /*  28px */
  --font-size-3xl:  clamp(2rem, 5vw, 3rem);        /* 32〜48px fluid */

  --line-height-tight:   1.3;
  --line-height-normal:  1.6;
  --line-height-relaxed: 1.8;

  --letter-spacing-normal: 0;
  --letter-spacing-wide:   0.05em;
  --letter-spacing-wider:  0.1em;

  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-bold:   700;

  /* --------------------------------------------------------------------------
     Spacing Scale
     -------------------------------------------------------------------------- */

  --space-1:  0.25rem;    /*  4px */
  --space-2:  0.5rem;     /*  8px */
  --space-3:  0.75rem;    /* 12px */
  --space-4:  1rem;       /* 16px */
  --space-5:  1.25rem;    /* 20px */
  --space-6:  1.5rem;     /* 24px */
  --space-8:  2rem;       /* 32px */
  --space-10: 2.5rem;     /* 40px */
  --space-12: 3rem;       /* 48px */
  --space-16: 4rem;       /* 64px */
  --space-20: 5rem;       /* 80px */

  /* --------------------------------------------------------------------------
     Layout Tokens
     -------------------------------------------------------------------------- */

  --layout-container-max:        1200px;
  --layout-container-padding:    var(--space-5);    /* 1.25rem / 20px */
  --layout-section-padding-y-sm: var(--space-10);   /* 40px — SP & TAB */
  --layout-section-padding-y-md: var(--space-12);   /* 48px */
  --layout-section-padding-y-lg: var(--space-20);   /* 80px — PC */

  /* --------------------------------------------------------------------------
     Component Spacing Tokens
     -------------------------------------------------------------------------- */

  --component-card-padding:        var(--space-3);  /* Inferred */
  --component-card-gap:            var(--space-4);  /* Inferred */

  --component-button-padding-x:    var(--space-6);  /* Inferred */
  --component-button-padding-y:    var(--space-4);  /* Inferred */
  --component-button-gap:          var(--space-2);  /* Inferred — icon + label gap */

  --component-section-heading-gap: var(--space-6);  /* Inferred */

  /* --------------------------------------------------------------------------
     Radius Tokens
     -------------------------------------------------------------------------- */

  --radius-sm:     2px;
  --radius-md:     6px;
  --radius-lg:     12px;
  --radius-xl:     20px;
  --radius-pill:   9999px;
  --radius-circle: 50%;

  --component-radius-button: var(--radius-pill);    /* Observed approx. — pill形CTAボタン */
  --component-radius-card:   var(--radius-sm);      /* Inferred */
  --component-radius-chip:   var(--radius-pill);    /* Observed approx. */
  --component-radius-image:  var(--radius-sm);      /* Inferred */

  /* --------------------------------------------------------------------------
     Shadow Tokens
     -------------------------------------------------------------------------- */

  --shadow-sm: 0 1px 3px rgba(61, 58, 53, 0.08);
  --shadow-md: 0 4px 12px rgba(61, 58, 53, 0.10);
  --shadow-lg: 0 8px 24px rgba(61, 58, 53, 0.12);

  --shadow-card:       var(--shadow-sm);
  --shadow-card-hover: var(--shadow-md);
  --shadow-button:     0 2px 8px rgba(63, 86, 74, 0.25);   /* Inferred — グリーン系シャドウ */
  --shadow-floating:   var(--shadow-lg);

  /* --------------------------------------------------------------------------
     Transition Tokens
     -------------------------------------------------------------------------- */

  --transition-fast:   150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow:   400ms ease;
  --transition-color:  color var(--transition-normal), background-color var(--transition-normal), border-color var(--transition-normal);
  --transition-shadow: box-shadow var(--transition-normal);

  /* --------------------------------------------------------------------------
     Gradient Tokens
     -------------------------------------------------------------------------- */

  --gradient-text-brand: linear-gradient(90deg, #3F564A 0%, #6C7A5A 45%, #877756 100%);
  --gradient-button-primary: linear-gradient(135deg, var(--color-brand-primary) 0%, #6A7C68 100%);

  /* --------------------------------------------------------------------------
     Z-index Tokens
     -------------------------------------------------------------------------- */

  --z-base:    0;
  --z-above:   10;
  --z-overlay: 100;
  --z-modal:   200;
  --z-header:  300;
--floating-cta-height: 64px; /* Inferred — 固定フローティングCTAの高さ（.c-floating-cta） */

  /* --------------------------------------------------------------------------
     Scroll Offset
     .p-header の高さ（sticky）に合わせてアンカーリンクの着地位置を補正する
     -------------------------------------------------------------------------- */

  --scroll-padding-top: 64px; /* .p-header__inner min-height（SP/TAB） */
}

@media (min-width: 1024px) {
  :root {
    --scroll-padding-top: 78px; /* .p-header__inner min-height（PC） */
  }
}

@layer base {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  html {
    scroll-behavior: smooth;
    text-size-adjust: 100%;
  }

  body {
    margin: 0;
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
    background: var(--color-bg-page);
    color: var(--color-text-primary);
    font-family: var(--font-family-body);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
    letter-spacing: var(--letter-spacing-normal);
  }

  a {
    color: inherit;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
    transition: var(--transition-color);
  }

  a:hover {
    color: var(--color-brand-primary);
  }

  a:focus-visible,
  button:focus-visible,
  input:focus-visible,
  select:focus-visible,
  textarea:focus-visible {
    outline: 2px solid var(--color-brand-accent);
    outline-offset: 3px;
  }

  img,
  picture,
  svg,
  video {
    display: block;
    max-width: 100%;
    height: auto;
  }

  button,
  input,
  select,
  textarea {
    font: inherit;
  }

  .entry-content {
    color: var(--color-text-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-relaxed);
  }

  .entry-content a {
    color: var(--color-brand-primary);
  }

  .entry-content a:hover {
    color: var(--color-brand-primary-hover);
  }

  .entry-content > * {
    margin-block: 0;
  }

  .entry-content > * + * {
    margin-top: var(--space-8);
  }

  .entry-content h2,
  .entry-content h3,
  .entry-content h4 {
    color: var(--color-text-primary);
    font-family: var(--font-family-heading);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
  }

  .entry-content h2:not(.is-style-plain) {
    position: relative;
    margin-top: var(--space-8);
    padding-bottom: var(--space-4);
    font-size: var(--font-size-xl);
    background: var(--gradient-text-brand);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
        line-height: 1.5;
display: inline-block;
  }

  .entry-content h2:not(.is-style-plain)::after {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 48px;
    height: 1px;
    background: var(--color-brand-accent);
    content: "";
  }

  .entry-content h3:not(.is-style-plain):not(.p-flow__step-title):not(.wp-block-accordion-heading) {
    margin-top: var(--space-8);
    padding-left: var(--space-4);
    border-left: 3px solid var(--color-brand-primary);
    font-size: var(--font-size-lg);
    color: var(--color-brand-primary);
        line-height: 1.5;
  }

  .entry-content h2.is-style-plain,
  .entry-content h3.is-style-plain {
    margin-top: var(--space-6);
    padding: 0;
    border: 0;
  }

  .entry-content > h2:first-child {
    margin-top: 0;
  }

  .entry-content p {
    margin-block: 0;
  }

   .entry-content h4{
    border-bottom:1px solid var(--color-brand-accent);
  padding-bottom:var(--space-2);
color:#6c5a33;
font-size:var(--font-size-md);
  }

  /* ネストされたブロック（パターン内等）でも、直前に兄弟要素がある p にのみ余白を付ける。
     単独で置かれた p（パターンで下マージン不要なケース）には影響しない。
     詳細度を `.entry-content p`（0-1-1）と揃えるため :where() は使わず、
     後勝ちで上のリセットを上書きする。 */
  .entry-content * + p {
    margin-top: var(--space-5);
  }


  .entry-content ul,
  .entry-content ol {
    padding-left: 1.4em;
  }

  .entry-content li + li {
    margin-top: var(--space-2);
  }

  .entry-content blockquote {
    margin-inline: 0;
    padding: var(--space-5);
    border-left: 3px solid var(--color-brand-accent);
    background: var(--color-surface-accent);
    color: var(--color-text-secondary);
  }

  .entry-content table {
    width: 100%;
    border-collapse: collapse;
    overflow-wrap: anywhere;
    font-size: var(--font-size-sm);
  }

  .entry-content th,
  .entry-content td {
    padding: var(--space-3);
    border: 1px solid var(--color-border-default);
    vertical-align: top;
  }

  .entry-content th {
    background: var(--color-brand-primary-soft);
    color: var(--color-text-primary);
    font-weight: var(--font-weight-bold);
  }

  @media (min-width: 1024px) {
    body {
      padding-bottom: calc(78px + env(safe-area-inset-bottom));
    }

    .entry-content h2:not(.is-style-plain) {
      font-size: var(--font-size-fluid-lg);
      margin-top: var(--space-12);
    }

  }
}

.c-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--component-button-gap);
  min-height: 44px;
  padding: var(--component-button-padding-y) var(--component-button-padding-x);
  border: 1px solid transparent;
  border-radius: 0;
  font-size: var(--font-size-sm);
  font-weight: 600;
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-wide);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  font-family: var(--font-family-heading);
  transition: var(--transition-color), var(--transition-shadow), transform var(--transition-fast);
}
/*
.c-button::after {
  content: "→";
  font-size: var(--font-size-md);
  line-height: 1;
}
*/
.c-button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-button);
}

.c-button--primary {
  background-color: var(--color-brand-primary);
  background-image: var(--gradient-button-primary);
  color: var(--color-text-on-primary);
}

.c-button--primary:hover {
  background-color: var(--color-brand-primary-hover);
  background-image: none;
  color: var(--color-text-on-primary);
}

.c-button--secondary {
  background: var(--color-brand-accent-soft);
  color: var(--color-brand-primary);
  border-color: var(--color-border-strong);
}

.c-button--secondary:hover {
  background: var(--color-surface-soft);
  border-color: var(--color-border-accent);
}

.c-button--accent {
  background: var(--color-brand-accent);
  color: var(--color-text-on-primary);
}

.c-button--accent:hover {
  background: var(--color-brand-accent-hover);
  color: var(--color-text-on-primary);
}

.c-button--outline {
  border-color: var(--color-border-default);
  background: transparent;
  color: var(--color-brand-primary);
}

.c-button--outline:hover {
  border-color: var(--color-brand-primary);
  background: var(--color-brand-primary-soft);
  color: var(--color-brand-primary);
}

.c-button--icon {
  width: 44px;
  min-width: 44px;
  padding-inline: 0;
}

.c-button--icon::after {
  content: none;
}

.p-reservation__buttons .c-button--accent::before {
  content: "";
  width: 19px;
  height: 21px;
  flex-shrink: 0;
  background-image: url("../../icons/c-button-icon1.svg");
  background-repeat: no-repeat;
  background-size: contain;
}

.c-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 28px;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--component-radius-chip);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-wide);
}

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

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

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

.c-text-gradient {
  background: var(--gradient-text-brand);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.c-section-heading {
  display: grid;
  gap: var(--space-2);
  margin-bottom: var(--component-section-heading-gap);
}

.c-section-heading__en {
  color: var(--color-brand-accent);
  font-family: var(--font-family-heading);
  font-size: clamp(2.5rem, 12vw, 4.5rem);
  font-weight: var(--font-weight-normal);
  line-height: 0.95;
}

.c-section-heading__ja {
  color: var(--color-text-primary);
  font-family: var(--font-family-body);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
}

.c-card,
.c-service-card,
.c-icon-card,
.c-blog-card {
  border-radius: var(--component-radius-card);
  background: var(--color-surface-card);
  box-shadow: var(--shadow-card);
}

.c-card {
  padding: var(--component-card-padding);
}

.c-nav-tile {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--color-surface-card);
  color: var(--color-text-on-primary);
  text-decoration: none;
  box-shadow: var(--shadow-card);
}

.c-nav-tile::after {
  position: absolute;
  right: var(--space-3);
  bottom: var(--space-3);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-circle);
  background: var(--color-brand-accent);
  color: var(--color-text-on-primary);
  content: "→";
}

.c-nav-tile__image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.c-nav-tile__label {
  position: absolute;
  inset: auto var(--space-3) var(--space-3) var(--space-3);
  padding-right: var(--space-8);
  font-weight: var(--font-weight-bold);
  text-shadow: 0 1px 6px color-mix(in srgb, var(--color-text-primary) 45%, transparent);
}

.c-news-item {
  display: grid;
  gap: var(--space-2);
  padding-block: var(--space-4);
  border-bottom: 1px solid var(--color-border-default);
}

.c-news-item__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

.c-news-item__title {
  color: var(--color-text-primary);
  font-weight: var(--font-weight-bold);
  text-decoration: none;
}

.c-schedule-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--color-text-primary);
  font-size: var(--font-size-xs);
  text-align: center;
}

.c-schedule-table th,
.c-schedule-table td {
  padding: var(--space-2);
  border: 1px solid var(--color-border-default);
}

.c-schedule-table th {
  background: var(--color-brand-primary-soft);
  color: var(--color-brand-primary);
  font-weight: var(--font-weight-bold);
}

.c-schedule-table .is-open {
  color: var(--color-brand-accent);
  font-weight: var(--font-weight-bold);
}

.c-feature-card {
  position: relative;
  display: grid;
  align-content: end;
  min-height: 320px;
  overflow: hidden;
  padding: var(--component-card-padding);
  border-radius: var(--radius-md);
  background: var(--color-bg-strong);
  color: var(--color-text-inverse);
  box-shadow: var(--shadow-card);
}

.c-feature-card::before {
  position: absolute;
  top: var(--space-4);
  left: var(--space-4);
  z-index: var(--z-above);
  color: var(--color-brand-accent);
  font-family: var(--font-family-heading);
  font-size: var(--font-size-3xl);
  line-height: 1;
  content: attr(data-number);
}

.c-feature-card__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.c-feature-card__body {
  position: relative;
  z-index: var(--z-above);
  display: grid;
  gap: var(--space-3);
}

.c-feature-card__body::before {
  position: absolute;
  inset: -80px -24px -24px;
  z-index: -1;
  background: linear-gradient(
    to top,
    color-mix(in srgb, var(--color-bg-strong) 88%, transparent),
    color-mix(in srgb, var(--color-bg-strong) 0%, transparent)
  );
  content: "";
}

.c-service-card {
  display: grid;
  gap: var(--space-4);
  overflow: hidden;
}

.c-service-card__image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.c-service-card__body {
  display: grid;
  gap: var(--space-3);
  padding: var(--component-card-padding);
}

.c-service-card__title {
  color: var(--color-text-primary);
  font-family: var(--font-family-heading);
  font-size: var(--font-size-xl);
  line-height: var(--line-height-tight);
}

.c-icon-card {
  display: grid;
  justify-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-2);
  text-align: center;
}

.c-icon-card__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-circle);
  background: var(--color-brand-primary-soft);
  color: var(--color-brand-primary);
}

.c-icon-card__title {
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
}

.c-icon-card__text {
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  line-height: var(--line-height-normal);
}

.c-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: max-content;
  min-height: 40px;
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-pill);
  background: var(--color-surface-card);
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  text-decoration: none;
  transition: var(--transition-color);
}

.c-tab.is-active {
  border-color: var(--color-brand-primary);
  background: var(--color-brand-primary);
  color: var(--color-text-on-primary);
}

.c-blog-card {
  display: grid;
  overflow: hidden;
}

.c-blog-card__image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.c-blog-card__body {
  display: grid;
  gap: var(--space-2);
  padding: var(--component-card-padding);
}

.c-blog-card__meta {
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
}

.c-blog-card__title {
  color: var(--color-text-primary);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-normal);
}

.c-accordion {
  border-top: 1px solid var(--color-border-default);
}

.c-accordion__item {
  border-bottom: 1px solid var(--color-border-default);
}

.c-accordion__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-4) 0;
  border: 0;
  background: transparent;
  color: var(--color-text-primary);
  font-weight: var(--font-weight-bold);
  text-align: left;
}

.c-accordion__trigger::after {
  color: var(--color-brand-primary);
  content: "+";
}

.c-accordion__item.is-open .c-accordion__trigger::after {
  content: "−";
}

.c-accordion__panel {
  display: none;
  padding-bottom: var(--space-4);
  color: var(--color-text-secondary);
}

.c-accordion__item.is-open .c-accordion__panel {
  display: block;
}

.c-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  letter-spacing: var(--letter-spacing-wide);
}

.c-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
}

.c-pagination a,
.c-pagination span {
  display: grid;
  place-items: center;
  min-width: 40px;
  height: 40px;
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-circle);
  color: var(--color-text-muted);
  text-decoration: none;
}

.c-pagination .is-active,
.c-pagination a:hover {
  border-color: var(--color-brand-primary);
  background: var(--color-brand-primary);
  color: var(--color-text-on-primary);
}

@media (min-width: 1024px) {
  .c-section-heading__en {
    font-size: clamp(4.5rem, 8vw, 7rem);
  }

  .c-section-heading__ja {
    font-size: var(--font-size-lg);
  }

  .c-service-card__image {
    aspect-ratio: 3 / 2;
  }

  .c-icon-card {
    padding: var(--space-5);
  }
}

@media (prefers-reduced-motion: reduce) {
  .c-button,
  .c-tab {
    transition: none;
  }

  .c-button:hover {
    transform: none;
  }
}

/* ==========================================================================
   疾患から探す メガメニュー（PC: ホバー/フォーカスで展開／SP: 3階層アコーディオン）
   ========================================================================== */

.p-header__megamenu-trigger {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
}

@media (min-width: 1024px) {
  /* ui.css の `.p-header__nav-list > li { position: relative; }` を打ち消し、
     absolute配置の基準を .p-header（position: sticky）まで持ち上げて全幅表示にする */
  .p-header__nav-list > .p-header__nav-item--megamenu {
    position: static;
  }

  /* ui.css の `.p-header__nav-list > li > a`（詳細度 0,1,2）や style.css の
     `.p-header__nav-list button`（詳細度 0,1,1、旧button時代のpadding指定）に
     上書きされないよう、親クラスとの組み合わせで詳細度を 0,2,0 に上げている。
     padding値は style.css 側で button に効いていた値を踏襲し、見た目を維持する。 */
  .p-header__nav-item--megamenu > .p-header__megamenu-trigger {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-8) var(--space-2);
    border-radius: var(--radius-sm);
    color: var(--color-text-primary);
    font-weight: var(--font-weight-bold);
    transition:
      var(--transition-color),
      background-color var(--transition-fast);
  }



  .p-header__nav-item--megamenu:hover .p-header__megamenu-trigger,
  .p-header__nav-item--megamenu:focus-within .p-header__megamenu-trigger {
    background-color: var(--color-bg-section-alt);
    color: var(--color-brand-primary);
  }

  .p-header__nav-item--megamenu:hover .p-header__megamenu-trigger::after,
  .p-header__nav-item--megamenu:focus-within .p-header__megamenu-trigger::after {
    transform: rotate(180deg);
  }

 .p-header__megamenu-trigger:hover{
    opacity: 1;
  }

  .p-header__megamenu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    z-index: var(--z-dropdown, 200);
    padding-block: var(--space-6);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(calc(-1 * var(--space-1)));
    transition:
      opacity var(--transition-fast),
      visibility var(--transition-fast),
      transform var(--transition-fast);
  }

  /* width:100% は .p-header__inner の max-width に追従してしまうため、
     ビューポート幅いっぱいの背景帯を疑似要素で敷いて視覚的に全幅化する */
  .p-header__megamenu::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 100vw;
    transform: translateX(-50%);
    background: var(--color-bg-section-alt);
    box-shadow: var(--shadow-sm);
    z-index: -1;
  }

  .p-header__nav-item--megamenu:hover .p-header__megamenu,
  .p-header__nav-item--megamenu:focus-within .p-header__megamenu {
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .p-header__megamenu-grid {
    width: min(100% - (var(--layout-container-padding) * 2), var(--layout-container-max));
    margin-inline: auto;
    display: flex;
    gap: var(--space-8);
  }

  .p-header__megamenu-col {
    min-width: var(--nav-submenu-min-width, 12rem);
    width: calc(100% / 4);
  }

  .p-header__megamenu-heading {
    display: block;
    margin-bottom: var(--space-2);
    color: var(--color-text-primary);
    font-weight: var(--font-weight-bold);
    text-decoration: none;
    white-space: nowrap;
  }

  .p-header__megamenu-heading:hover {
    color: var(--color-brand-primary);
  }

  .p-header__megamenu-list {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .p-header__megamenu-list a {
    display: block;
    padding: var(--space-1) 0;
    color: var(--color-text-primary);
    text-decoration: none;
    white-space: nowrap;
    transition: var(--transition-color);
  }

  .p-header__megamenu-list a:hover {
    color: var(--color-brand-primary);
  }
}

/* SP: ドロワー内の3階層アコーディオン（menu-accordion.js が自動でトグルを付与） */
.p-menuDialog__nav-list .sub-menu .sub-menu {
  padding:var(--space-4);
background: var(--color-bg-section-alt);
margin-top: var(--space-2);
}

.p-menuDialog__nav-list > li > a{
  font-family: var(--font-family-heading);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
}
.p-menuDialog__nav-list > li{
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-border-default);
}
.p-menuDialog__nav-list .sub-menu{
padding: var(--space-2) 0;
}
.p-menuDialog__nav-list .sub-menu > li{
  padding: var(--space-1) 0;
  font-size: var(--font-size-base);
}
.p-menuDialog__submenuToggle{
  background-color: transparent;
  color: var(--color-text-primary);
}

/* 診療案内: 項目数が多いため2列表示にする（PC: ドロップダウン／SP: アコーディオン） */
.p-header__nav-item--medical .sub-menu {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 var(--space-4);
}

@media (min-width: 1024px) {
  .p-header__nav-item--medical > .sub-menu {
    width: max-content;
    max-width: 34rem;
  }

  .p-header__nav-item--medical > .sub-menu a {
    white-space: normal;
  }
}

.c-heading-block div p{
margin-top:var(--space-4);
text-align:left;
}
@media (min-width: 1024px) {
.c-heading-block div p{
text-align:center;
}
}

.c-cost-card h3 span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}
.c-cost-card h3 span::before {
  content: "";
  display: inline-block;
  width: 30px;
  height: 30px;
  background-image: url("../../icons/p-costs__card-icon1.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}
.c-cost-card:nth-of-type(2) h3 span::before {
  background-image: url("../../icons/p-costs__card-icon2.svg");
}

.p-reservation__tel strong {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.p-reservation__tel strong::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 24px;
  background-image: url("../../icons/icon-phone.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.table-small{
  font-size: var(--font-size-sm);
}

/* ==========================================================================
   Term Post Grid  (.c-term-grid / .c-term-card)
   shortcodes.php の [term_post_grid] で出力。サムネイルなし・
   list-txt カスタムフィールドのみのカード。PC 4カラム / SP 1カラム。
   ========================================================================== */

.c-term-card {
  display: grid;
  gap: var(--space-2);
  padding: var(--component-card-padding);
  border: 1px solid var(--color-border-default);
  border-radius: var(--component-radius-card);
  background: var(--color-surface-card);
  box-shadow: var(--shadow-card);
  color: var(--color-text-primary);
  text-decoration: none;
  transition: var(--transition-shadow), transform var(--transition-fast);
}

.c-term-card:hover {
  box-shadow: var(--shadow-card-hover);
  text-decoration: none;
  transform: translateY(-2px);
}

.c-term-card__title {
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  transition: var(--transition-color);
}

.c-term-card:hover .c-term-card__title {
  color: var(--color-brand-primary);
}

.c-term-card__text {
  color: var(--color-text-secondary);
  font-size: var(--font-size-xs);
  line-height: var(--line-height-normal);
}

@media (prefers-reduced-motion: reduce) {
  .c-term-card:hover {
    transform: none;
  }
}


.l-page__header {
  position: relative;
}

.l-page__header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: var(--z-base);
  background-color: rgba(0, 0, 0, 0.4);
}

.l-page__header .l-content {
  position: relative;
  z-index: var(--z-above);
}

.p-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--color-bg-strong);
  color: var(--color-text-inverse);
}

.p-header__inner,
.p-section__inner {
  width: min(100% - (var(--layout-container-padding) * 2), var(--layout-container-max));
  margin-inline: auto;
}

.p-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

.p-header__logo {
  color: var(--color-text-inverse);
  font-weight: var(--font-weight-bold);
  text-decoration: none;
}

.p-header__nav {
  display: none;
}

.p-hero {
  position: relative;
  display: grid;
  min-height: calc(100svh - 64px);
  overflow: hidden;
  background: var(--color-bg-strong);
  color: var(--color-text-on-primary);
}

.p-hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}


.p-hero__content {
  position: relative;
  z-index: var(--z-above);
  align-self: end;
  display: grid;
  gap: var(--space-5);
  width: min(100% - (var(--layout-container-padding) * 2), var(--layout-container-max));
  margin-inline: auto;
  padding-block: var(--layout-section-padding-y-sm);
}

.p-hero__deco {
  position: absolute;
top: 32px;
    right: 0;
    z-index: var(--z-base);
    pointer-events: none;
    width: 120px;
}

.p-hero__title {
  position: relative;
  max-width: 12em;
  padding-bottom: var(--space-5);
  font-family: var(--font-family-heading);
  font-size: clamp(2.25rem, 12vw, 4rem);
  line-height: var(--line-height-tight);
}

.p-hero__title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 160px;
  height: 1px;
  background-color: var(--color-brand-accent);
}

.p-hero__lead {
  max-width: 34em;
  color: var(--color-text-inverse);
  line-height: var(--line-height-relaxed);
}

.p-nav-tiles,
.p-greeting,
.p-feature-carousel,
.p-gallery,
.p-symptom-grid,
.p-blog-carousel {
  padding-block: var(--layout-section-padding-y-sm);
  background: var(--color-bg-page);
}

.p-info-cluster,
.p-profile,
.p-pickup-services,
.p-search-panel {
  padding-block: var(--layout-section-padding-y-sm);
  background: var(--color-bg-section);
}

.p-nav-tiles__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.p-info-cluster__grid {
  display: grid;
  gap: var(--space-5);
}

.p-info-cluster__item {
  padding: var(--component-card-padding);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  background: var(--color-surface-card);
}

.p-greeting__body {
  display: grid;
  gap: var(--space-6);
}

.p-greeting__text {
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}

.p-profile__grid {
  display: grid;
  gap: var(--space-6);
}

.p-profile__image {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  object-fit: cover;
}

.p-feature-carousel__track,
.p-gallery__track,
.p-blog-carousel__track {
  display: grid;
  grid-auto-columns: minmax(260px, 82%);
  grid-auto-flow: column;
  gap: var(--space-4);
  overflow-x: auto;
  padding-bottom: var(--space-3);
  scroll-snap-type: x mandatory;
}

.p-feature-carousel__track > *,
.p-gallery__track > *,
.p-blog-carousel__track > * {
  scroll-snap-align: start;
}

.p-dark-band {
  position: relative;
  overflow: hidden;
  padding-block: var(--layout-section-padding-y-sm);
  background-color: var(--color-bg-strong);
  background-image:
    radial-gradient(circle at right bottom, color-mix(in srgb, var(--color-text-inverse) 13%, transparent), transparent 36%),
    linear-gradient(135deg, transparent 0 68%, color-mix(in srgb, var(--color-text-inverse) 8%, transparent) 68% 69%, transparent 69%);
  background-position: right bottom;
  background-size: cover;
  color: var(--color-text-inverse);
}

.p-dark-band__inner {
  position: relative;
  z-index: var(--z-above);
  display: grid;
  gap: var(--space-6);
  width: min(100% - (var(--layout-container-padding) * 2), var(--layout-container-max));
  margin-inline: auto;
}

.p-dark-band .c-section-heading__ja,
.p-dark-band__text {
  color: var(--color-text-inverse);
}

.p-gallery__image {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.p-pickup-services__list {
  display: grid;
  gap: var(--space-6);
}

.p-symptom-grid__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}

.p-search-panel__box {
  display: grid;
  gap: var(--space-5);
  padding: var(--component-card-padding);
  border-radius: var(--radius-md);
  background: var(--color-surface-card);
  box-shadow: var(--shadow-card);
}

.p-search-panel__tabs {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  padding-bottom: var(--space-2);
}

.p-reservation h2 {
  position: relative;
  width: fit-content;
  margin-inline: auto;
  padding-bottom: var(--space-5);
}

.p-reservation h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 150px;
  border-bottom: 1px solid var(--color-border-accent);
  transform: translateX(-50%);
}

.p-final-cta {
  padding-block: var(--layout-section-padding-y-sm);
  background: var(--color-bg-cta);
  color: var(--color-text-inverse);
  text-align: center;
}

.p-final-cta__inner {
  display: grid;
  gap: var(--space-5);
  width: min(100% - (var(--layout-container-padding) * 2), 840px);
  margin-inline: auto;
}

.p-footer {
  background: var(--color-bg-strong);
  color: var(--color-text-inverse);
}

.p-footer__grid {
  display: grid;
  gap: var(--space-6);
  width: min(100% - (var(--layout-container-padding) * 2), var(--layout-container-max));
  margin-inline: auto;
}

.p-footer a {
  color: var(--color-text-inverse);
}

.p-footer__heading {
  color: var(--color-brand-accent);
  font-family: var(--font-family-heading);
  font-size: var(--font-size-xl);
}

.p-footer-cta {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: var(--z-header);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--color-surface-card);
  box-shadow: var(--shadow-floating);
}

.p-footer-cta__item {
  display: grid;
  place-items: center;
  min-height: 64px;
  padding: var(--space-2);
  border-right: 1px solid color-mix(in srgb, var(--color-text-on-primary) 28%, transparent);
  background: var(--color-brand-primary);
  color: var(--color-text-on-primary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  text-align: center;
  text-decoration: none;
}

.p-footer-cta__item:nth-child(2) {
  background: var(--color-brand-secondary);
}

.p-footer-cta__item:nth-child(3) {
  background: var(--color-brand-accent);
}

.p-footer-cta__item:last-child {
  border-right: 0;
  background: var(--color-brand-primary-hover);
}

.p-reassurance__h2-deco {
  position: relative;
  width: fit-content;
}

.p-reassurance__deco-left,
.p-reassurance__deco-right {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  width: 65px;
  height: 54px;
}

.p-reassurance__deco-left {
  right: calc(100% + var(--space-6));
}

.p-reassurance__deco-right {
  left: calc(100% + var(--space-6));
}

.p-costs {
  position: relative;
  overflow: hidden;
}

.p-costs__deco {
  position: absolute;
  z-index: var(--z-base);
  pointer-events: none;
  width: 155px;
}

.p-costs__deco--left {
  top: 40px;
  left: -20px;
}

.p-costs__deco--right {
  display: none;
  right: 0;
  bottom: 0;
}

@media (min-width: 1024px) {
  .p-reassurance__deco-left,
.p-reassurance__deco-right {
  top: 50%;
  transform: translateY(-40%);
  pointer-events: none;
    width: 114px;
  height: 96px;
}

.p-reassurance__deco-left {
  right: calc(100% + var(--space-4));
}

.p-reassurance__deco-right {
  left: calc(100% + var(--space-4));
}
  .p-header__inner {
    min-height: 78px;
  }

  .p-header__nav {
    display: flex;
    align-items: center;
    gap: var(--space-5);
  }
.p-hero__deco {
  position: absolute;
  top: 80px;
  right: 0;
  z-index: var(--z-base);
  pointer-events: none;
}
  .p-hero {
    min-height: calc(100svh - 78px);
  }

  .p-hero__content {
    padding-block: var(--layout-section-padding-y-lg);
  }

  .p-hero__title {
    font-size: clamp(4rem, 7vw, 6.5rem);
  }

  .p-nav-tiles,
  .p-greeting,
  .p-feature-carousel,
  .p-gallery,
  .p-symptom-grid,
  .p-blog-carousel,
  .p-info-cluster,
  .p-profile,
  .p-pickup-services,
  .p-search-panel,
  .p-dark-band,
  .p-final-cta {
    padding-block: var(--layout-section-padding-y-lg);
  }
    .p-footer {
    padding-top: var(--layout-section-padding-y-lg)!important;
  }

  .p-nav-tiles__grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: var(--space-4);
  }

  .p-info-cluster__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .p-greeting__body,
  .p-profile__grid {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.8fr);
    align-items: center;
  }

  .p-feature-carousel__track,
  .p-blog-carousel__track {
    grid-auto-flow: initial;
    grid-auto-columns: initial;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
  }

  .p-gallery__track {
    grid-auto-columns: minmax(320px, 1fr);
  }

  .p-pickup-services__list {
    gap: var(--space-10);
  }

  .p-pickup-services__list > *:nth-child(even) {
    direction: rtl;
  }

  .p-pickup-services__list > *:nth-child(even) > * {
    direction: ltr;
  }

  .p-symptom-grid__grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: var(--space-4);
  }

  .p-search-panel__tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: visible;
  }

  .p-footer__grid {
    grid-template-columns: 1.2fr 1fr 1fr;
  }

  .p-footer-cta__item {
    min-height: 78px;
    font-size: var(--font-size-sm);
  }

.p-costs__deco--left {
  width: 274px;
  top: 120px;
  left: -8px;
}

.p-costs__deco--right {
  width: 274px;
  display: block;
  right: -8px;
  bottom: 44px;
}
}

/**
 * utilities.css
 * Small structural utilities only. Color and typography utilities are avoided.
 */

.u-visually-hidden,
.u-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  margin: -1px !important;
  white-space: nowrap !important;
}

.u-safe-area {
  padding-right: max(
    var(--layout-container-padding),
    env(safe-area-inset-right)
  );
  padding-left: max(var(--layout-container-padding), env(safe-area-inset-left));
}

.u-skip-nav {
  position: fixed;
  top: var(--space-3);
  left: var(--space-3);
  z-index: var(--z-modal);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  background: var(--color-surface-base);
  box-shadow: var(--shadow-floating);
  color: var(--color-brand-primary);
  font-weight: var(--font-weight-bold);
  transform: translateY(calc(-100% - var(--space-6)));
  transition: transform var(--transition-fast);
}

.u-skip-nav:focus-visible {
  transform: translateY(0);
}

.show-pc {
  display: none !important;
}

.show-sp {
  display: revert !important;
}

@media (min-width: 1024px) {
  .show-sp {
    display: none !important;
  }

  .show-pc {
    display: revert !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .u-skip-nav {
    transition: none;
  }
}

/* ブロックエディタのパターン等で、p の上マージンを個別に無効化したい場合に付与する */
.u-no-space :where(p) {
  margin-top: 0 !important;
}



