@charset "UTF-8";

/* ==========================================
   clinic-hero.css (描画バグ完全修正版)
========================================== */
  /* パンくず */
  .p-clinic-breadcrumb {
    padding: 12px 24px 0;
    font-size: var(--fs-13);
    color: #8a9e8e;
    letter-spacing: 0.03em;
  }
  .p-clinic-breadcrumb__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }
  .p-clinic-breadcrumb__list li + li::before {
    content: "›";
    margin-right: 4px;
  }
  .p-clinic-breadcrumb a {
    color: #8a9e8e;
    text-decoration: none;
    transition: color 0.2s;
  }
  .p-clinic-breadcrumb a:hover { color: var(--theme-color, #00552e); }
  .p-clinic-breadcrumb [aria-current] { color: #555; }

  /* 施設ごとのカラー上書き（body_classを利用） */
  .is-senshou-clinic   { --theme-color: #1e3a8a; } /* 青 */
  .is-muratatouseki-clinic   { --theme-color: #c53030; } /* 赤 */
  .is-natoritouseki-clinic { --theme-color: #2f855a; } /* 緑 */
  
  /* 1. ヒーロー全体の設定 */
  .p-clinic-hero {
    position: relative;
    width: 100%;
    height: 100vh; 
    overflow: hidden;
    background-color: var(--hero-frame-color); /* ベージュ #f7f3e9 想定 */
  }

  /* 2. クリップエリア（波形に切り抜かれる領域） */
  .p-clinic-hero__clip {
    position: absolute;
    top: 0; 
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 1;
    -webkit-clip-path: url(#hero-mask);
    clip-path: url(#hero-mask);
    /* 描画崩れ防止のコンテキスト隔離 */
    isolation: isolate;
    transform: translate3d(0, 0, 0);
    will-change: transform;
  }

  /* 3. サイドバー本体（クリップの内側に配置） */
  .p-clinic-hero__sidebar {
    position: absolute;
    top: 0;
    width: 70px;
    height: 100%;
    background: linear-gradient(to top,
      color-mix(in srgb, var(--theme-color), #fff 85%) 0%,
      color-mix(in srgb, var(--theme-color), #fff 30%) 20%,
      var(--theme-color) 100%
    ) !important;
    opacity: 1 !important;
    z-index: 5;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);

    /* 【重要】スライダーの拡大アニメーションから独立させ、チラつきを100%防御 */
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    will-change: transform;
  }
  
  /* サイドバー内のアイコン用スタイル */
  .p-sidebar-icon {
    position: absolute;
    top: 120px; /* PCヘッダーロゴ（横長・高さ100px）の直下に詰める */
    left: 50%;
    padding: 15px;
    /* translate3dに変更してハードウェアアクセラレーションを有効化 */
    transform: translate3d(-50%, 0, 0);
    font-size: var(--fs-24);
    background-color: #fff;
    border-radius: 50%;
    color: var(--theme-color);
    z-index: 10;
    display: block;
    backface-visibility: hidden;
  }

  /* 4. 縦書きテキスト（サイドバーの疑似要素）
     アイコンと同じ left:50% + translateX(-50%) でセンタリングし、
     幅(2列分)や文字サイズが変わってもアイコンの中心ラインと揃うようにする */
  .p-clinic-hero__sidebar::after {
    content: "";
    position: absolute;
    padding-top: 190px; /* アイコンとの間隔（70px）は変えず、アイコン移動分だけ詰める */
    left: 50%;
    transform: translate3d(-50%, 0, 0);
    writing-mode: vertical-rl;
    white-space: pre;
    display: block;
    /* viewport高さに合わせてフォントサイズを自動縮小 */
    font-size: clamp(0.62rem, calc((100vh - 230px) / 33), 0.85rem);
    font-weight: 600;
    line-height: 1.8;
    letter-spacing: 0.3em;
    color: #fff;
  }
  
  /* 5. 波形をなぞる線（施設カラーでドローインするアウトライン） */
  .p-clinic-hero__outline {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
  }

  .p-clinic-hero__outline path {
    stroke: var(--theme-color);
    stroke-width: 30;
    stroke-linecap: round;
    fill: none;
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    animation: dash-wave 8s forwards ease-in-out;
  }

  @keyframes dash-wave {
    to { stroke-dashoffset: 0; }
  }

  /* 6. クリニック別の文面設定（\A で改行） */
  .is-senshou-clinic .p-clinic-hero__sidebar::after {
    content: "仙台市泉区にある透析医療に特化したクリニック\A駐車場完備・無料送迎もございます";
  }
  
  .is-muratatouseki-clinic .p-clinic-hero__sidebar::after {
    content: "宮城県柴田郡村田町にある透析医療に特化したクリニック\A駐車場完備・無料送迎もございます";
  }
  
  .is-natoritouseki-clinic .p-clinic-hero__sidebar::after {
    content: "名取市美田園にある透析医療に特化したクリニック\A駐車場完備・無料送迎もございます";
  }
  
  /* --- 中央コンテンツ（左下配置に変更） --- */
  .p-clinic-hero__centering {
    position: absolute;
    bottom: 190px;
    left: 130px;
    right: auto;
    top: auto;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    z-index: 3;
    color: #fff;

    /* 【重要】タイトル文字や波紋が消えるのを防ぐため、ここも独立レイヤー化 */
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    will-change: transform;
  }
  
  /* 縦書きコピー */
  .p-clinic-hero__copy {
    text-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 5;
  }
  
  .p-clinic-hero__sub-title {
    display: block;
    font-family: "Zen Maru Gothic", sans-serif;
    font-weight: 500;
    font-size: var(--fs-14);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0.8;
    margin-top: 15px;
    text-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(0, 0, 0, 0.2);
  }
  
  /* 施設名の h1。デザイン上は出さないが、ページ内で唯一の h1 なので
     マークアップからは消さず、視覚的にだけ隠す。
     ※ display:none / visibility:hidden は使わないこと。
        検索エンジンに対する見出しの重みが落ちるうえ、スクリーンリーダーからも
        消えてページの主題が読み上げられなくなる。
        下の指定なら、表示されないまま h1 としては残る（テーマ内の
        .p-fmap__card-detail-text と同じ手法）。
     復帰させるときは、このブロックを消して元の見た目指定に戻す：
       font-family:"Zen Kaku Gothic New",sans-serif; font-size:clamp(14px,1.8vw,20px);
       font-weight:500; letter-spacing:0.12em; margin:0 0 8px; opacity:0.9; */
  .p-clinic-hero__name {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .p-clinic-hero__main-title {
    font-family: "Zen Maru Gothic", sans-serif;
    font-size: clamp(26px, 3.2vw, 48px);
    line-height: 1.8;
    letter-spacing: 0.05em;
    font-weight: 500;
  }
  
  /* --- 波紋アニメーション --- */
  .p-clinic-hero__centering .p-about-ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate3d(-50%, -50%, 0);
    width: 200px;
    height: 200px;
    z-index: 1;
    pointer-events: none;
  }
  
  .p-clinic-hero__centering .ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate3d(-50%, -50%, 0);
    display: block;
    width: 100px;
    height: 100px;
    border: 1px solid #fff;
    border-radius: 50%;
    opacity: 0;
    animation: ripple-hero 5s infinite cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }
  
  .p-clinic-hero__centering .ripple:nth-child(2) { animation-delay: 1.6s; }
  .p-clinic-hero__centering .ripple:nth-child(3) { animation-delay: 3.2s; }
  
  @keyframes ripple-hero {
    0% { width: 100px; height: 100px; opacity: 0; }
    10% { opacity: 0.4; }
    100% { width: 450px; height: 450px; opacity: 0; }
  }
  
  /* --- 右下診療時間パネル --- */
  .p-clinic-hero__info-panel {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 400px;
    background: #fff;
    z-index: 20;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    overflow: hidden;
    /* パネル自体のレイヤー隔離（スライダー背後への巻き込まれ防止） */
    transform: translate3d(0, 0, 0);
    will-change: transform;
  }
  
  .p-clinic-hero__info-header {
    background-color: var(--hero-frame-color);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
    border-radius: 15px 15px 0 0;
  }
  
  .p-clinic-hero__info-label {
    font-size: var(--fs-13);
    font-weight: 700;
    color: var(--theme-color);
    letter-spacing: 0.1em;
  }
  
  .p-clinic-hero__info-tel {
    font-size: var(--fs-15);
    font-weight: 700;
    color: #333;
  }
  
  .p-clinic-hero__info-body {
    padding: 20px;
    background-color: #fff;
    border-radius: 12px;
  }
  
  .p-clinic-hero__info-hours {
    font-size: var(--fs-15);
    font-weight: 600;
    line-height: 1.6;
    color: #333;
  }
  
  .p-clinic-hero__info-note {
    font-size: var(--fs-12);
    color: #777;
    margin-top: 5px;
  }
  
  .p-clinic-hero__info-btn {
    display: block;
    width: 100%;
    background-color: var(--theme-color);
    color: #fff;
    text-align: center;
    text-decoration: none;
    padding: 12px;
    margin-top: 15px;
    font-size: var(--fs-14);
    font-weight: 700;
    border-radius: 15px;
    transition: opacity 0.3s;
  }
  
  .p-clinic-hero__info-btn:hover {
    opacity: 0.8;
  }
  
  /* --- その他調整 --- */
  .p-clinic-hero__frame {
    z-index: 10;
  }
  
  /* --- パネル内のテーブルスタイル修正 --- */
  .p-hero-schedule {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
    table-layout: fixed; 
  }
  
  .p-hero-schedule th,
  .p-hero-schedule td {
    padding: 12px 2px;
    border-bottom: 1px solid #f0f0f0;
    white-space: nowrap;
    vertical-align: middle;
  }
  
  .p-hero-schedule th:first-child {
    width: 120px;
  }
  
  .p-hero-schedule thead th:first-child {
    text-align: left;
    padding-left: 10px;
    font-weight: 700;
    font-size: var(--fs-17);
    color: var(--theme-color);
  }
  
  .p-hero-schedule tbody th {
    white-space: nowrap;
    text-align: right;
    padding-right: 0;
    font-weight: 700;
    font-size: var(--fs-13);
    color: #333;
  }

  .time-block {
    display: inline;
  }
  
  .p-hero-schedule thead th:not(:first-child),
  .p-hero-schedule td {
    text-align: center;
    width: calc((100% - 120px) / 8);
  }
  
  .p-hero-schedule td .dot {
    color: var(--theme-color);
    font-size: var(--fs-16);
    line-height: 1;
    display: inline-block;
  }
  
  .p-hero-schedule td.off {
    color: #ddd;
    font-size: var(--fs-11);
    text-align: center;
  }
  
  .p-hero-schedule__note {
    font-size: var(--fs-14);
    color: #999;
    margin-top: 5px;
    line-height: 1.4;
    padding-left: 5px;
    text-align: right;
  }
  
  /* 右上の法人タグ */
  .p-header-corp-tag {
    position: absolute;
    top: 0;
    right: 15px;
    z-index: 110;
  }
  
  .p-header-corp-tag a {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--color-primary);
    padding: 10px 12px 8px;
    border-radius: 0 0 8px 8px;
    text-decoration: none;
    position: relative;
    top: 0;
    transition: all 0.2s ease;
    border-top: 4px solid var(--color-primary);
  }
  
  .p-header-corp-tag a:hover {
    transform: translateY(6px);
    box-shadow: 0 -6px 0 0 var(--theme-color); 
  }
  
  .p-header-corp-tag img {
    height: 40px;
    width: auto;
    margin-bottom: 3px;
  }
  
  .p-header-corp-tag__text {
    font-size: var(--fs-10);
    font-weight: 700;
    color: #888;
    letter-spacing: 0.05em;
    white-space: nowrap;
  }
  

/* ============================================================
   CLINIC HERO SLIDER: 構造完全適合・チラつき＆位置ズレ完全防止版
============================================================ */

.p-clinic-hero__slider {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--hero-frame-color, #F7F3E9);
  z-index: 1;
  /* スライダーの描画層を独立させてマスクバグを防ぐ */
  transform: translateZ(0);
  will-change: transform;
}

/* 
  【外側の箱】位置は動かさず、透明度（opacity）の制御に専念。
  z-indexは全員 1 で固定し、HTMLの自然な重なり順（下の行ほど上になる）を利用。
*/
.p-clinic-hero__slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  z-index: 1;

  /* 周囲への描画ノイズを伝染させない防壁 */
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: opacity;
}
/* フォールバック：1枚目は無条件で不透明度1をベースにしておく。
   通常再生時はアニメーションの計算値が常にこのベース値より優先されるため
   見た目に影響しない。一方、FireShotやPlaywrightのフルページ/画面キャプチャ
   のようにキャプチャ時にアニメーションを止める・無効化するツールでは、
   アニメーションが外れた時点でこのベース値まで巻き戻るため、1枚目の写真が
   消えず表示され続ける（=キャプチャ時にヒーロー写真が透明になる問題の対策）。 */
.p-clinic-hero__slide:first-child {
  opacity: 1;
}

/* スライド上のオーバーレイ（画像を見えやすくするグラデーション） */
.p-clinic-hero__slide::before {
  content: "";
  position: absolute;
  inset: 0;
  height: 100%;
  z-index: 2;
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.12) 0%, transparent 30%),
              linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.05) 40%, transparent 100%);
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* 
  【中の画像本体】常に画面のセンターに固定。
  個別のズームアニメーション（zoomAnim）を適用し、GPU加速で滑らかに拡大。
*/
.p-clinic-hero__img {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate3d(-50%, -50%, 0) scale(1);
  object-fit: cover;
  backface-visibility: hidden;
  will-change: transform;
  
  /* 30秒かけて、全スライド共通のなだらかなズームをループ実行 */
  animation: heroZoomAnim 30s infinite linear;
}

/* ============================================================
   各スライドのフェード ＆ ズームの完全同期設定
============================================================ */

/* 
  【重要】外側の箱（slide）の出現タイミングに合わせて、
  中の画像（img）のズームも完全に同じディレイ（遅延）で同期させます。
*/

/* --- 1枚目 (0s 〜 5s) --- */
.p-clinic-hero__slide:nth-child(1) { animation: slideFade1 30s linear -3s infinite; }
.p-clinic-hero__slide:nth-child(1) .p-clinic-hero__img { animation-delay: -3s; }

/* --- 2枚目 (5s 〜 10s) --- */
.p-clinic-hero__slide:nth-child(2) { animation: slideFade2 30s linear -3s infinite; }
.p-clinic-hero__slide:nth-child(2) .p-clinic-hero__img { animation-delay: 2s; }

/* --- 3枚目 (10s 〜 15s) --- */
.p-clinic-hero__slide:nth-child(3) { animation: slideFade3 30s linear -3s infinite; }
.p-clinic-hero__slide:nth-child(3) .p-clinic-hero__img { animation-delay: 7s; }

/* --- 4枚目 (15s 〜 20s) --- */
.p-clinic-hero__slide:nth-child(4) { animation: slideFade4 30s linear -3s infinite; }
.p-clinic-hero__slide:nth-child(4) .p-clinic-hero__img { animation-delay: 12s; }

/* --- 5枚目 (20s 〜 25s) --- */
.p-clinic-hero__slide:nth-child(5) { animation: slideFade5 30s linear -3s infinite; }
.p-clinic-hero__slide:nth-child(5) .p-clinic-hero__img { animation-delay: 17s; }

/* --- 6枚目 (25s 〜 30s) --- */
.p-clinic-hero__slide:nth-child(6) { animation: slideFade6 30s linear -3s infinite; }
.p-clinic-hero__slide:nth-child(6) .p-clinic-hero__img { animation-delay: 22s; }


/* ============================================================
   TIMELINES: 箱のフェードイン・アウト（z-indexの変動なし）
============================================================ */

/* --- 1枚目 (0s 〜 5s) --- */
@keyframes slideFade1 {
  0%   { opacity: 0; }
  2.5% { opacity: 1; }
  16.6% { opacity: 1; } /* 5秒時点で2枚目にバトンタッチ開始 */
  25.0% { opacity: 0; } /* 7.5秒で裏側へ完全退避 */
  100% { opacity: 0; }
}

/* --- 2枚目 (5s 〜 10s) --- */
@keyframes slideFade2 {
  14.1% { opacity: 0; }
  16.6% { opacity: 0; } /* 5秒：登場 */
  19.1% { opacity: 1; }
  33.3% { opacity: 1; } /* 10秒：3枚目へ */
  41.6% { opacity: 0; }
  0%, 100% { opacity: 0; }
}

/* --- 3枚目 (10s 〜 15s) --- */
@keyframes slideFade3 {
  30.8% { opacity: 0; }
  33.3% { opacity: 0; } /* 10秒：登場 */
  35.8% { opacity: 1; }
  50.0% { opacity: 1; } /* 15秒：4枚目へ */
  58.3% { opacity: 0; }
  0%, 100% { opacity: 0; }
}

/* --- 4枚目 (15s 〜 20s) --- */
@keyframes slideFade4 {
  47.5% { opacity: 0; }
  50.0% { opacity: 0; } /* 15秒：登場 */
  52.5% { opacity: 1; }
  66.6% { opacity: 1; } /* 20秒：5枚目へ */
  75.0% { opacity: 0; }
  0%, 100% { opacity: 0; }
}

/* --- 5枚目 (20s 〜 25s) --- */
@keyframes slideFade5 {
  64.1% { opacity: 0; }
  66.6% { opacity: 0; } /* 20秒：登場 */
  69.1% { opacity: 1; }
  83.3% { opacity: 1; } /* 25秒：6枚目へ */
  91.6% { opacity: 0; }
  0%, 100% { opacity: 0; }
}

/* --- 6枚目 (25s 〜 30s・つなぎ目完全シャットアウト) --- */
@keyframes slideFade6 {
  80.8% { opacity: 0; }
  83.3% { opacity: 0; } /* 25秒：登場 */
  85.8% { opacity: 1; }
  100%  { opacity: 1; } /* 30秒時点で1周目終了（不透明のまま） */
  0%    { opacity: 1; } /* 2周目の0秒時点でも100%を維持して繋ぐ */
  8.3%  { opacity: 0; } /* 1枚目の裏で2.5秒かけて静かにフェードアウト */
}



/* 
  画像単体のズームタイムライン
  1周30秒のうち、自分の出番（全体の約16.6%）を超えて、
  次の画像に切り替わる裏側まで（25%＝7.5秒間）じわじわ拡大を継続させます。
*/
@keyframes heroZoomAnim {
  0%   { transform: translate3d(-50%, -50%, 0) scale(1); }
  25%  { transform: translate3d(-50%, -50%, 0) scale(1.08); } /* 切り替わり終了まで拡大し続ける */
  100% { transform: translate3d(-50%, -50%, 0) scale(1.08); }
}

/* モーション低減設定時：フェード・ズームを止め、1枚目のみ静止表示する。
   スライド枚数ごとの個別アニメーションは全て nth-child(N) + !important で
   宣言されているため、同じ強さで上書きするには nth-child(n)（全要素にマッチ）
   を使う必要がある（プレーンな .p-clinic-hero__slide だけでは詳細度で負ける）。 */
@media (prefers-reduced-motion: reduce) {
  .p-clinic-hero__slide:nth-child(n) { animation: none !important; opacity: 0 !important; }
  .p-clinic-hero__slide:first-child { opacity: 1 !important; }
  .p-clinic-hero__slide:nth-child(n) .p-clinic-hero__img { animation: none !important; }
}


/* ============================================================
   緊急連絡ステータス（.p-hero__emergency）PC表示：
   横並びピル＋中央モーダルのデザイン自体はp-hero.css側のbaseで共通定義済み。
   clinic-detail.php は front-page.php とヘッダーの高さ・位置が異なる
   （.l-header-clinic は position:fixed; top:0）ため、ヘッダー直下に
   収まるようクリニックヒーロー限定でボタンの縦位置だけ上書きする。
============================================================ */
.p-clinic-hero .p-hero__emergency {
    top: 118px;
}

/* ============================================================
   RESPONSIVE: Clinic Hero (Mobile Integrated Version)
============================================================ */

@media (max-width: 768px) {
    /* 以前ここに body, html { overflow-x: hidden; position: relative; } があったが、
       モバイル幅では html/body の overflow-x 指定が position: sticky をサイト全体で
       破壊することが判明したため削除。横はみ出し抑制は style.css の body 側
       （overflow-x: clip）で行い、.p-clinic-hero 自体も自前の overflow: hidden で
       カルーセルを内包しているため、この宣言は不要だった。 */

    .p-clinic-hero {
        position: relative;
        width: 100%;
        height: 100vh;
        height: 100svh; 
        overflow: hidden;
        touch-action: pan-x pan-y;
    }

    .p-clinic-hero__sidebar {
        width: 60px;
        transform: translate3d(0, 0, 0);
    }
  
    .p-sidebar-icon {
        top: 75px; /* l-header-sp（トップライン5px＋ヘッダー60px＝65px）の直下に詰める */
        padding: 10px;
        font-size: var(--fs-22);
        transform: translate3d(-50%, 0, 0);
    }

    .p-clinic-hero__sidebar::after {
        content: "";
        position: absolute;
        padding-top: 130px; /* アイコンとの間隔（55px）は変えず、アイコン移動分だけ詰める */
        left: 50%;
        transform: translate3d(-50%, 0, 0);
        writing-mode: vertical-rl;
        white-space: pre;
        display: block;
        font-size: clamp(0.48rem, calc((100svh - 230px) / 33), 0.72rem);
        font-weight: 500;
        line-height: 1.8;
        letter-spacing: 0.3em;
        color: #fff;
    }

    .p-clinic-hero__outline path {
        stroke: var(--theme-color);
        stroke-width: 16;
        stroke-linecap: round;
        fill: none;
        stroke-dasharray: 1000;
        stroke-dashoffset: 1000;
        animation: dash-wave 8s forwards ease-in-out;
    }

    /* 右下コンテンツ配置（スマホ用横書き設定） */
    .p-clinic-hero__centering {
      top: auto !important;
      left: auto !important;
      bottom: 150px !important;
      right: 15px !important;
      display: block !important;
      text-align: right;
      width: auto;
      z-index: 5;
      transform: translate3d(0, 0, 0) !important;
    }
  
    .p-clinic-hero__copy {
      writing-mode: horizontal-tb !important;
    }
  
    .p-clinic-hero__main-title {
      font-size: var(--fs-20) !important;
      font-weight: 800 !important;
      line-height: 1.3 !important;
      letter-spacing: 0.05em !important;
      color: #fff;
      font-family: 'Zen Maru Gothic', sans-serif;
      text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
      display: block;
    }
  
    .p-clinic-hero__sub-title {
      writing-mode: horizontal-tb !important;
      font-size: var(--fs-9) !important;
      font-weight: 700 !important;
      letter-spacing: 0.1em;
      color: #fff;
      margin: 10px 0 0 0 !important;
      opacity: 0.9;
    }
  
    .p-clinic-hero__centering .p-about-ripple {
      position: absolute;
      top: 50%;
      right: 0;
      left: auto;
      transform: translate3d(0, -50%, 0);
      width: 120px;
      height: 120px;
      z-index: -1;
      pointer-events: none;
    }
  
    .p-clinic-hero__centering .ripple {
      width: 80px;
      height: 80px;
      border-width: 1px;
      transform: translate3d(-50%, -50%, 0);
    }

    /* POPボタンの設定 */
    .p-clinic-hero__pop {
      position: absolute;
      left: 60px; 
      bottom: 10px; 
      transform: translate3d(-50%, 0, 0);
      width: 100px;
      height: 100px;
      background-color: var(--theme-color);
      border-radius: 50%;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      color: #fff;
      text-align: center;
      text-decoration: none;
      line-height: 1.4;
      font-weight: 700;
      font-size: var(--fs-13);
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
      z-index: 20;
      animation: popBounce 3s infinite ease-in-out;
      will-change: transform;
    }
  
    .p-clinic-hero__pop span {
      display: block;
      font-size: var(--fs-10);
      margin-bottom: 2px;
    }
  
    @keyframes popBounce {
      0%, 100% { transform: translate3d(-50%, 0, 0); }
      50% { transform: translate3d(-50%, -10px, 0); }
    }

    /* スマホ版画像個別 */
    .p-clinic-hero__slider .p-clinic-hero__slide {
      width: 100% !important;
      height: 100vh !important;
      height: 100svh !important;
      top: 0 !important;
      left: 0 !important;
    }

    .p-clinic-hero__slider .p-clinic-hero__slide .p-clinic-hero__img {
      min-width: 100vw !important;
      min-height: 100vh !important;
      min-height: 100svh !important;
      width: auto !important;
      height: auto !important;
      position: absolute !important; 
      top: 50% !important;
      left: 50% !important;
    }

    /* 各画像のフォーカス指定（スマホのみ） */
    .p-clinic-hero__slider .p-clinic-hero__slide:nth-child(1) .p-clinic-hero__img { object-position: center right !important; }
    .p-clinic-hero__slider .p-clinic-hero__slide:nth-child(2) .p-clinic-hero__img { object-position: 40% center !important; }
    .p-clinic-hero__slider .p-clinic-hero__slide:nth-child(3) .p-clinic-hero__img { object-position: 60% center !important; }
    .p-clinic-hero__slider .p-clinic-hero__slide:nth-child(4) .p-clinic-hero__img { object-position: 70% center !important; }
    .p-clinic-hero__slider .p-clinic-hero__slide:nth-child(5) .p-clinic-hero__img { object-position: 70% center !important; }
    .p-clinic-hero__slider .p-clinic-hero__slide:nth-child(6) .p-clinic-hero__img { object-position: 70% center !important; }

    /* 診療時間テーブル */
    .p-hero-schedule tbody th {
      padding: 8px 2px;
      font-size: var(--fs-13);
      text-align: center;
    }
    .time-separator {
      display: none;
    }
    .time-block {
      display: block;
      line-height: 1.2;
    }
    .p-hero-schedule thead th:first-child {
      text-align: left;
      font-size: var(--fs-10);
    }
    .p-hero-schedule th:first-child {
        width: 70px;
        font-size: var(--fs-12);
    }
    .p-hero-schedule {
        font-size: var(--fs-12);
    }

    /* 緊急連絡ステータス（.p-hero__emergency）：PC/SP共通の横並びピル＋中央モーダルの
       デザインはp-hero.css側のbaseと、このファイルのPC用ブロック（下記@media外）で
       定義済み。ここではSP固有のヘッダーとの位置関係・サイズだけを上書きする。 */
    .p-clinic-hero .p-hero__emergency {
        top: 78px;
        z-index: 9000; /* .l-header-sp（z-index:9999）より下にし、スクロール時にヘッダーの裏へ正しく隠れるようにする */
    }

    .p-clinic-hero .p-hero__emergency-toggle {
        width: auto;
        padding: 8px 12px 8px 16px;
        gap: 8px;
    }
    .p-clinic-hero .p-hero__emergency-toggle:hover {
        padding-right: 12px; /* 横並びのため hover 時のせり出しは無効化 */
        padding-left: 16px;
    }

    /* 開いた状態でもトグル自体の見た目は変えない。
       中央モーダルに切り替えたことで、以前の「開いたら少し幅が広がる」演出
       （p-hero.css 側の共通ルール）はバッジがモーダルの裏で不要に伸縮するだけになるため無効化する。 */
    .p-clinic-hero .p-hero__emergency.is-open .p-hero__emergency-toggle {
        width: auto;
    }

    .p-clinic-hero .t-corp-emergency.-hero {
        width: min(320px, 86vw);
        max-height: 80vh;
    }

    /* パネル見出し：施設名が長いと「の現在の状況」まで含めて1行に収まらず読みにくいため、
       施設名の直後で必ず改行する（PCは幅に余裕があるため対象外）。 */
    .p-clinic-hero .t-corp-emergency__title {
        white-space: normal;
    }
    .p-clinic-hero .t-corp-emergency__title-name {
        display: block;
    }

    /* 更新日時：news.css側の共通モバイル値(0.6rem)だと小さすぎて読みにくいため、
       クリニックページのモーダルパネルだけ少し大きくする。
       ただし大きくしすぎるとパネル幅(284px前後)に収まらず2行に折り返すため、
       1行に収まる範囲（実測で約270px）に収める0.7remを採用し、念のため nowrap も指定する。 */
    .p-clinic-hero .t-corp-emergency__timestamp {
        font-size: var(--fs-11);
        white-space: nowrap;
    }
}

/* 閉じるボタン：薄いグレー文字だけだと存在に気づきにくいため、
   丸い背景・枠線・影を付けてタップ対象であることを分かりやすくする（PC/SP共通）。 */
.p-clinic-hero .p-hero__emergency-close {
    top: -10px;
    right: -10px;
    width: 32px;
    height: 32px;
    background: #fff;
    border: 1px solid #e0ddd2;
    border-radius: 50%;
    color: #777;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.p-clinic-hero .p-hero__emergency-close:hover {
    color: #222;
    background: #f5f3ec;
}
.p-clinic-hero .p-hero__emergency-close svg {
    width: 16px;
    height: 16px;
}