@charset "UTF-8";
/* =========================================================
   五十嵐医院 トップページ見本
   スマホファースト：基本はスマホ用、768px／1024px以上で上書き
   配色は現行サイトに準拠（ワインレッド・こげ茶・ベージュ）
   ========================================================= */

/* ---------- 色・サイズの変数 ---------- */
:root {
  --wine: #800040;        /* メインカラー（ロゴ・ボタン・要所のみ） */
  --wine-dark: #63002f;
  --wine-light: #f8ecf1;  /* 重要なお知らせの背景 */
  --brown: #684828;       /* サブカラー（小見出し・表の見出し） */
  --brown-dark: #4f361d;
  --beige: #e8d8c8;       /* 見出しの帯・線 */
  --beige-light: #f7f1ea; /* セクションの交互背景 */
  --text: #333333;        /* 本文 */
  --text-sub: #595048;    /* 補足文（白・薄ベージュの上でコントラスト比7:1前後） */
  --line: #e2d6c9;
  --bg: #ffffff;
  --radius: 8px;
  --header-h: 68px;
  --fixed-cta-h: 72px; /* スマホ追従ボタンの高さ（余白用） */
  --container: 1120px;
}

/* ---------- リセット・基本 ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px); /* 固定ヘッダーに見出しが隠れないように */
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding-bottom: calc(var(--fixed-cta-h) + env(safe-area-inset-bottom)); /* 追従ボタンでフッターが隠れないように */
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  font-size: 17px;   /* 年齢層が高いので本文は17px */
  line-height: 1.9;
  color: var(--text);
  background: var(--bg);
  letter-spacing: 0.03em;
  overflow-wrap: anywhere;
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--wine); }
/* 画像は元のサイズより大きく引き伸ばさない（各所で元サイズ以下の上限を設定） */
img { max-width: 100%; height: auto; display: block; }
small { font-size: 0.88em; }

.icon {
  width: 1.2em;
  height: 1.2em;
  fill: currentColor;
  flex-shrink: 0;
  vertical-align: -0.2em;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 8px;
  top: -100px;
  z-index: 200;
  padding: 8px 16px;
  background: var(--wine);
  color: #fff;
}
.skip-link:focus { top: 8px; }

:focus-visible {
  outline: 3px solid #d4a017;
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
}

.pc-sep { display: none; }

/* =========================================================
   1. ヘッダー
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-top: 4px solid var(--wine);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.2s;
}
.site-header.is-scrolled { box-shadow: 0 2px 10px rgba(104, 72, 40, 0.15); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 64px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
}

.logo {
  display: flex;
  flex-direction: column;
  margin-right: auto;
  text-decoration: none;
  line-height: 1.3;
}
.logo-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--wine);
  letter-spacing: 0.08em;
}
.logo-sub {
  font-size: 13px;
  color: var(--brown);
  letter-spacing: 0.1em;
}

/* スマホでは丸い電話アイコンのみ */
.header-tel {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--wine);
  color: #fff;
  text-decoration: none;
}
.header-tel .icon { width: 22px; height: 22px; }
.header-tel-num { display: none; }

.menu-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 56px;
  height: 52px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brown);
  font: inherit;
  cursor: pointer;
}
.menu-toggle-bar,
.menu-toggle-bar::before,
.menu-toggle-bar::after {
  display: block;
  width: 26px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.25s, background 0.25s;
}
.menu-toggle-bar { position: relative; margin: 0; }
.menu-toggle-bar::before,
.menu-toggle-bar::after { content: ""; position: absolute; left: 0; }
.menu-toggle-bar::before { top: -8px; }
.menu-toggle-bar::after { top: 8px; }

.menu-toggle[aria-expanded="true"] .menu-toggle-bar { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bar::before { transform: translateY(8px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle-bar::after { transform: translateY(-8px) rotate(-45deg); }

/* スマホのメニュー（開閉式） */
.global-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid var(--line);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
}
.global-nav.is-open { display: block; }
.global-nav a {
  display: block;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
}
.global-nav a::after {
  content: "›";
  float: right;
  color: var(--brown);
}

/* =========================================================
   2. ファーストビュー（背景はSVGの抽象パターン）
   ========================================================= */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--beige-light);
}
/* 外観写真：スマホ・タブレットは上部の帯にし、下に向かってベージュへ消していく */
.hero-photo {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 340px;
  overflow: hidden;
}
/* スマホ：入口が画像の右寄りにあるため、1.5倍に拡大して右端にそろえ、看板と入口を中央寄りに見せる */
.hero-photo img {
  position: absolute;
  top: 0;
  right: 0;
  width: 150%;
  max-width: none;
  height: auto;
}
/* 白（薄ベージュ）のオーバーレイ：崩れた英字や貼り紙を目立たなくし、下は背景色へなじませる */
.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
    rgba(247, 241, 234, 0.22) 0%,
    rgba(247, 241, 234, 0.30) 40%,
    rgba(247, 241, 234, 0.92) 62%,
    #f7f1ea 72%); /* 小見出しより上で写真を消しきり、文字の後ろに写真の文字が透けないようにする */
}
/* 外観の生成画像であることを読みやすく表示 */
.hero-photo-note {
  position: absolute;
  right: 8px;
  bottom: 150px;
  z-index: 1;
  padding: 1px 8px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.38);
  color: #fff;
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: 0.04em;
}

.hero-inner {
  position: relative;
  max-width: var(--container);
  margin: 0 auto;
  padding: 236px 16px 48px; /* 上は写真の帯の分あける */
}
.hero-lead {
  display: inline-block;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--brown);
  font-size: 15px;
  color: var(--brown);
  letter-spacing: 0.08em;
}
.hero-title {
  margin: 16px 0 20px;
  font-size: 25px;
  line-height: 1.55;
  letter-spacing: 0.04em;
  font-weight: 700;
  color: var(--text);
}
.hero-title-em { color: var(--wine); }
.hero-sub {
  font-size: 17px;
  line-height: 1.9;
}
.hero-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--beige);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--brown);
}
.hero-note .icon { color: var(--wine); }

.hero-box {
  margin-top: 24px;
  padding: 20px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 2px 12px rgba(104, 72, 40, 0.1);
}
.hero-hours div {
  display: flex;
  gap: 12px;
  padding: 4px 0;
  border-bottom: 1px dotted var(--line);
}
.hero-hours div:last-child { border-bottom: 0; }
.hero-hours dt {
  flex: 0 0 5.6em;
  font-weight: 700;
  color: var(--brown);
}
.hero-hours dd { font-size: 16px; }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 10px 28px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.btn-tel {
  width: 100%;
  margin-top: 16px;
  background: var(--wine);
  color: #fff;
  font-size: 24px;
  letter-spacing: 0.06em;
  line-height: 1.2;
  box-shadow: 0 3px 0 var(--wine-dark);
}
.btn-tel span { display: flex; flex-direction: column; align-items: flex-start; }
.btn-tel small { font-size: 13px; font-weight: 500; letter-spacing: 0.04em; }
.btn-tel .icon { width: 28px; height: 28px; }
.btn-tel:hover { background: var(--wine-dark); }

.btn-outline {
  border: 2px solid var(--brown);
  color: var(--brown);
  background: #fff;
}
.btn-outline::after { content: "›"; font-size: 1.3em; line-height: 1; }
.btn-outline:hover { background: var(--brown); color: #fff; }

.btn-wrap { margin-top: 24px; text-align: center; }

/* =========================================================
   共通：セクション（白と薄ベージュを交互に）
   ========================================================= */
.section { padding: 56px 0; }
.section-tight { padding: 32px 0; }
.section-tight + .section-tight { padding-top: 0; }
.section-tint { background: var(--beige-light); }

/* 見出し：現行サイトのベージュの帯をヒントに、下にベージュ＋ワインレッドの線 */
.section-title {
  margin-bottom: 32px;
  text-align: center;
  font-size: 26px;
  line-height: 1.4;
  color: var(--text);
  letter-spacing: 0.08em;
}
.section-title::after {
  content: "";
  display: block;
  width: 120px;
  height: 4px;
  margin: 14px auto 0;
  background: linear-gradient(to right, var(--beige) 0 35%, var(--wine) 35% 65%, var(--beige) 65% 100%);
  border-radius: 2px;
}
.section-title-sm {
  font-size: 22px;
  text-align: left;
  margin-bottom: 16px;
}
.section-title-sm::after { margin-left: 0; width: 80px; }

/* =========================================================
   3. 重要なお知らせ
   ========================================================= */
.alert {
  padding: 20px;
  border: 2px solid var(--wine);
  border-radius: var(--radius);
  background: var(--wine-light);
}
.alert-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 21px;
  line-height: 1.5;
  color: var(--wine);
}
.alert-title .icon { width: 26px; height: 26px; }
.alert-strong {
  margin-top: 8px;
  font-weight: 700;
}

/* =========================================================
   4. お知らせ
   ========================================================= */
.news-list { border-top: 1px solid var(--line); }
.news-list li {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.news-list time {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--brown);
  letter-spacing: 0.06em;
}

/* =========================================================
   5. 診療時間
   ========================================================= */
.table-scroll { overflow-x: auto; }
.hours-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  text-align: center;
  font-size: 16px;
}
.hours-table th,
.hours-table td {
  padding: 12px 4px;
  border: 1px solid var(--line);
}
.hours-table thead th {
  background: var(--brown);
  color: #fff;
  font-weight: 500;
}
.hours-table tbody th {
  background: var(--beige);
  color: var(--brown-dark);
  font-weight: 700;
  white-space: nowrap;
  font-size: 15px;
}
.hours-table td { color: var(--wine); font-weight: 700; font-size: 18px; }
.hours-table td.is-closed { color: #666; background: #f3f3f3; font-weight: 500; font-size: 15px; }

.notes { margin-top: 16px; font-size: 16px; }
.notes li { position: relative; padding-left: 1.2em; }
.notes li::before { content: "※"; position: absolute; left: 0; color: var(--text-sub); }

/* =========================================================
   6. 当院の特徴
   ========================================================= */
.feature-grid {
  display: grid;
  gap: 20px;
}
.feature-card {
  position: relative;
  padding: 28px 20px 24px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--brown);
  border-radius: var(--radius);
  background: #fff;
}
.feature-num {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 28px;
  font-weight: 700;
  color: var(--beige);
  line-height: 1;
}
.feature-icon {
  width: 60px;
  height: 60px;
  padding: 12px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--beige-light);
  color: var(--brown);
}
.feature-icon svg { width: 100%; height: 100%; }
.feature-card:first-child .feature-icon { color: var(--wine); background: var(--wine-light); }
.feature-title {
  margin-bottom: 12px;
  font-size: 20px;
  line-height: 1.5;
  color: var(--brown);
}

/* =========================================================
   7. 診療内容
   ========================================================= */
.service-grid {
  display: grid;
  gap: 20px;
}
.service-card {
  padding: 24px 20px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
}
.service-card-main { border: 2px solid var(--brown); }
.service-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 6px 12px;
  border-radius: 4px;
  background: var(--beige);
  font-size: 19px;
  color: var(--brown-dark);
}
.service-card-main .service-title .icon { color: var(--wine); }

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag-list li {
  padding: 4px 14px;
  border-radius: 999px;
  border: 1px solid var(--beige);
  background: var(--beige-light);
  font-size: 16px;
  line-height: 1.6;
}

.service-dl div { padding: 6px 0; }
.service-dl dt { font-weight: 700; color: var(--brown); }
.service-dl dd { font-size: 16px; }

.text-link {
  display: inline-block;
  margin-top: 12px;
  font-weight: 700;
}
.text-link::after { content: " ›"; }

.note-box {
  margin-top: 24px;
  padding: 16px 20px;
  border-left: 4px solid var(--brown);
  background: #fff;
  font-size: 16px;
}

/* =========================================================
   8. 料金表
   ========================================================= */
.price-grid { display: grid; gap: 32px; }
.price-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 16px;
  border-radius: var(--radius);
  background: var(--brown);
  color: #fff;
  font-size: 19px;
}
.badge {
  padding: 0 10px;
  border-radius: 4px;
  background: #fff;
  color: var(--brown);
  font-size: 13px;
  line-height: 1.8;
}
.price-list div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
}
.price-list dt { font-weight: 700; }
.price-list dt small { font-weight: 400; color: var(--text-sub); }
.price-list dd {
  margin-left: auto;
  text-align: right;
  font-weight: 700;
  color: var(--brown-dark);
}
.price-list dd small {
  display: block;
  font-weight: 400;
  color: var(--text-sub);
  font-size: 15px;
}
.price-note { margin-top: 16px; font-size: 16px; }

/* =========================================================
   9. 院長紹介
   ========================================================= */
.doctor {
  display: grid;
  gap: 24px;
}
/* 似顔絵：元画像（826px幅）より小さく表示 */
.doctor-photo {
  width: 100%;
  max-width: 240px;
  margin: 0 auto;
  padding: 8px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
}
.doctor-name {
  margin-bottom: 20px;
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.12em;
  line-height: 1.5;
}
.doctor-role {
  margin-right: 12px;
  font-size: 15px;
  color: var(--brown);
  letter-spacing: 0.05em;
}
.doctor-kana {
  display: block;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-sub);
}
.doctor-heading {
  margin: 24px 0 10px;
  padding-left: 12px;
  border-left: 4px solid var(--brown);
  font-size: 18px;
  line-height: 1.5;
  color: var(--brown);
}
.doctor-body .doctor-heading { margin-top: 0; }
.doctor-body p + p { margin-top: 8px; }

.doctor-detail {
  display: grid;
  gap: 8px;
  margin-top: 32px;
  padding: 8px 20px 24px;
  border-radius: var(--radius);
  background: #fff;
}
.check-list li {
  position: relative;
  padding-left: 1.4em;
  font-size: 16px;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.75em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brown);
}

.timeline li {
  display: grid;
  grid-template-columns: 4.5em 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dotted var(--line);
  font-size: 16px;
  line-height: 1.7;
}
.timeline-year { font-weight: 700; color: var(--brown); }
.timeline small { color: var(--text-sub); }

/* =========================================================
   10. 主な検査・設備
   ========================================================= */
.equip-grid { display: grid; gap: 24px; }
.equip-card {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}
/* 写真枠の幅は400pxまで（元画像400px幅以上なので拡大にならない） */
.equip-photo,
.equip-icon {
  max-width: 400px;
  margin: 0 auto;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--beige-light);
}
.equip-photo img { width: 100%; height: 100%; object-fit: cover; }
.equip-photo-white { background: #fff; }
.equip-photo-white img { object-fit: contain; padding: 8px; }
.equip-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brown);
}
.equip-icon svg { width: 55%; height: auto; }
.equip-body { padding: 20px; }
.equip-title {
  margin-bottom: 10px;
  font-size: 20px;
  line-height: 1.5;
  color: var(--brown);
}
.equip-title small { font-size: 15px; font-weight: 500; }
.equip-note {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dotted var(--line);
  font-size: 16px;
  color: var(--text-sub);
}
.equip-other {
  display: grid;
  gap: 16px;
  margin-top: 28px;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--beige-light);
}
.equip-other-photo { max-width: 240px; }
.equip-other-photo img { border-radius: 4px; }
.equip-other-photo figcaption { margin-top: 4px; font-size: 14px; color: var(--text-sub); }
.equip-other-title {
  margin-bottom: 12px;
  font-size: 18px;
  color: var(--brown);
}
.equip-other .tag-list li { background: #fff; }

/* =========================================================
   11. 院内の様子（小さな写真ギャラリー）
   ========================================================= */
.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 12px;
}
/* 一番小さい受付写真（300px幅）を上限にそろえ、拡大しない */
.gallery figure {
  max-width: 300px;
  margin: 0 auto;
}
.gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 4px;
  border: 4px solid #fff;
  box-shadow: 0 1px 4px rgba(104, 72, 40, 0.15);
}
.gallery figcaption {
  margin-top: 6px;
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  color: var(--brown);
}

/* =========================================================
   12. アクセス
   ========================================================= */
.access { display: grid; gap: 24px; }
.access-map {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--beige-light);
}
.access-map iframe { width: 100%; height: 100%; border: 0; display: block; }
.access-name {
  margin-bottom: 12px;
  font-size: 22px;
  font-weight: 700;
  color: var(--wine);
}
.access-dl div {
  display: flex;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.access-dl dt { flex: 0 0 3em; font-weight: 700; color: var(--brown); }
.access-dl a { font-size: 22px; font-weight: 700; text-decoration: none; letter-spacing: 0.05em; }

/* 目印の写真：高さ160pxにそろえる（元画像は高さ240pxなので縮小表示） */
.landmark { margin-top: 20px; }
.landmark-title {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
  font-weight: 700;
  color: var(--brown);
}
.landmark-title .icon { color: var(--wine); }
.landmark-photos {
  display: flex;
  gap: 12px;
}
.landmark-photos img {
  width: auto;
  height: 160px;
  border-radius: 4px;
}
.landmark-photos figcaption {
  margin-top: 4px;
  font-size: 14px;
  color: var(--text-sub);
}

.hours-table-mini { margin-top: 20px; font-size: 15px; }
.hours-table-mini th,
.hours-table-mini td { padding: 8px 2px; }
.hours-table-mini td { font-size: 16px; }
.hours-table-mini td.is-closed { font-size: 14px; }
.access-hours-note { margin-top: 10px; font-size: 16px; }

/* =========================================================
   13. フッター
   ========================================================= */
.site-footer {
  padding: 40px 0 16px;
  background: var(--brown);
  color: #fff;
}
.site-footer a { color: #fff; }
.footer-inner { display: grid; gap: 28px; }
.footer-name {
  margin-bottom: 8px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.footer-name span {
  margin-left: 10px;
  font-size: 14px;
  font-weight: 400;
}
.footer-info p { font-size: 16px; }
.footer-nav ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 16px;
}
.footer-nav a {
  display: block;
  padding: 6px 0;
  text-decoration: none;
  font-size: 16px;
}
.footer-nav a::before { content: "› "; opacity: 0.7; }
.copyright {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  text-align: center;
  font-size: 14px;
}

/* =========================================================
   診療時間をすぐ確認できる固定表示（参考デザインと同じ方式）
   スマホ：画面下の追従ボタン＋下から開くパネル
   PC   ：画面右端の追従タブ＋右から開くパネル
   ========================================================= */

/* ---------- 追従ボタン（スマホ） ---------- */
.sp-cta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: #fff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
}
.sp-cta a,
.sp-cta button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 48px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.05em;
  text-decoration: none;
  cursor: pointer;
}
.sp-cta .icon { width: 20px; height: 20px; }
.sp-cta__tel { background: var(--wine); color: #fff; border: 1.5px solid var(--wine); }
.sp-cta__hours { background: #fff; color: var(--brown); border: 1.5px solid var(--brown); }

/* ---------- 追従タブ（PC） ---------- */
.hours-tab {
  position: fixed;
  top: 50%;
  right: 0;
  z-index: 115; /* ファーストビューの写真・固定ヘッダーより前面 */
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 56px;
  padding: 20px 0 14px;
  border: 0;
  border-radius: 10px 0 0 10px;
  background: var(--wine);
  color: #fff;
  font-family: inherit;
  cursor: pointer;
  box-shadow: -2px 2px 10px rgba(0, 0, 0, 0.22); /* 写真の上に重なっても見えるよう控えめな影 */
  transform: translateY(-50%);
  transition: right 0.3s ease, background 0.2s;
}
.hours-tab:hover { background: var(--wine-dark); }
.hours-tab__label {
  writing-mode: vertical-rl;
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.25em;
  margin-bottom: -0.25em; /* 最後の文字の後ろの字間を相殺して上下中央にそろえる */
}
/* 開閉が分かる矢印（開くと反転） */
.hours-tab__arrow { font-size: 22px; font-weight: 700; line-height: 1; transition: transform 0.3s; }
body.is-panel-open .hours-tab { right: min(440px, 92vw); }
body.is-panel-open .hours-tab__arrow { transform: rotate(180deg); }

/* ---------- 診療時間パネル（スマホは下から出す） ---------- */
.panel-overlay {
  position: fixed;
  inset: 0;
  z-index: 105; /* 固定ヘッダー（100）より手前 */
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.hours-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 110;
  width: 100%;
  max-height: 88vh;
  padding: 22px 16px calc(24px + env(safe-area-inset-bottom));
  overflow-y: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  visibility: hidden;
  transform: translateY(100%);
  transition: transform 0.3s ease, visibility 0.3s;
}
body.is-panel-open .panel-overlay { opacity: 1; visibility: visible; }
body.is-panel-open .hours-panel { visibility: visible; transform: none; }
body.is-panel-open { overflow: hidden; }

.hours-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.hours-panel__title {
  color: var(--brown);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.hours-panel__close {
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--brown);
  border-radius: 50%;
  background: #fff;
  color: var(--brown);
  font-family: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.hours-panel__close:hover { background: var(--beige-light); }

/* パネル内の表（参考デザインの hours--compact に相当） */
.hours-table-panel th,
.hours-table-panel td { padding: 10px 2px; font-size: 15px; }
.hours-table-panel thead th { font-size: 14px; letter-spacing: 0; }
.hours-table-panel thead th:first-child { width: 27%; }
.hours-table-panel tbody th { line-height: 1.4; }
.hours-table-panel tbody th span { display: block; font-size: 12px; font-weight: 500; letter-spacing: 0; }
.hours-table-panel td.is-closed { font-size: 14px; }
.hours-panel__notes { margin-top: 12px; font-size: 15px; line-height: 1.7; }
.hours-panel .hours-panel__tel { margin-top: 16px; width: 100%; }

/* =========================================================
   見出しの改行調整：文節ごとにまとめ、1〜2文字だけ次の行に落ちないようにする
   ========================================================= */
.nowrap { display: inline-block; }
/* 見出し・ラベル・略歴：行の長さをそろえ、文節で改行する */
h1, h2, h3,
.btn,
.hero-note,
figcaption, dt, th,
.tag-list li,
.timeline p {
  text-wrap: balance;
  word-break: auto-phrase; /* 対応ブラウザ（Chrome等）では文節で改行。非対応では通常の改行 */
}
/* 本文：文節改行は使わず（行末がガタガタになるため）、最後の行に1〜2文字だけ残らないようにする */
p, li, dd {
  text-wrap: pretty;
}

/* =========================================================
   768px以上（タブレット）
   ========================================================= */
@media (min-width: 768px) {
  :root { --header-h: 84px; }

  body { padding-bottom: 0; }
  .sp-cta { display: none; }

  /* PCは右端の追従タブ＋右から開くパネル */
  .hours-tab { display: flex; }
  .hours-panel {
    top: 0;
    left: auto;
    right: 0;
    bottom: auto;
    width: min(440px, 92vw);
    height: 100%;
    max-height: none;
    padding: 28px 28px 36px;
    border-left: 1px solid var(--line);
    border-radius: 0;
    transform: translateX(100%);
  }
  .hours-panel__title { font-size: 24px; }
  .sp-only { display: none; }
  .pc-sep { display: inline; }

  .container { padding: 0 32px; }
  .header-inner { height: 80px; padding: 0 32px; gap: 16px; }

  .logo { flex-direction: row; align-items: baseline; gap: 12px; }
  .logo-name { font-size: 26px; }
  .logo-sub { font-size: 14px; }

  /* 電話番号を表示 */
  .header-tel {
    width: auto;
    height: auto;
    gap: 8px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: var(--wine);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.05em;
  }
  .header-tel .icon { width: 26px; height: 26px; }
  .header-tel-num { display: inline; }

  .hero-photo { height: 420px; }
  .hero-photo img {
    position: static;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 100% 18%; /* 看板と入口（画像の右側）を残す */
  }
  .hero-photo-note { bottom: 176px; right: 12px; }
  .hero-inner { padding: 300px 32px 64px; }
  .hero-title { font-size: 38px; }
  .hero-sub { font-size: 18px; max-width: 36em; }
  .hero-box {
    display: flex;
    align-items: center;
    gap: 28px;
    max-width: 760px;
    padding: 24px 28px;
  }
  .hero-hours { flex: 1; }
  .btn-tel { width: auto; margin-top: 0; flex-shrink: 0; }

  .section { padding: 80px 0; }
  .section-tight { padding: 40px 0; }
  .section-title { font-size: 30px; margin-bottom: 44px; }
  .section-title-sm { font-size: 24px; margin-bottom: 20px; }

  .alert { padding: 24px 32px; }
  .alert-title { font-size: 23px; }

  .news-list li {
    display: flex;
    gap: 24px;
    align-items: baseline;
  }
  .news-list time { flex: 0 0 7em; }

  .hours-table th, .hours-table td { padding: 16px 8px; }
  .hours-table { font-size: 17px; }

  .feature-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .feature-card { padding: 32px 28px 28px; }

  .service-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .service-card-main { grid-column: 1 / -1; }

  .price-grid { grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }

  .doctor { grid-template-columns: 240px 1fr; gap: 40px; align-items: start; }
  .doctor-detail { grid-template-columns: 1fr 1.6fr; gap: 40px; padding: 16px 32px 32px; }

  .equip-grid { grid-template-columns: 1fr 1fr; }
  .equip-other { grid-template-columns: 240px 1fr; gap: 28px; align-items: center; }

  .gallery { gap: 24px; }

  .access-map { aspect-ratio: 16 / 9; }

  .footer-inner { grid-template-columns: 1fr auto; align-items: start; }
  .footer-nav ul { grid-template-columns: repeat(3, auto); gap: 4px 32px; }
}

/* =========================================================
   1024px以上（PC）
   ========================================================= */
@media (min-width: 1024px) {
  :root { --header-h: 136px; }

  /* ナビを常に表示（ヘッダー2段目・現行サイトのベージュ帯をイメージ） */
  .menu-toggle { display: none; }
  .global-nav {
    display: block;
    position: static;
    border-top: 0;
    background: var(--beige-light);
    box-shadow: none;
    max-height: none;
    overflow: visible;
  }
  .header-inner { height: 76px; }
  .global-nav ul {
    display: flex;
    justify-content: center;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 32px;
  }
  .global-nav li { flex: 1; }
  .global-nav a {
    padding: 12px 8px;
    border-bottom: 3px solid transparent;
    text-align: center;
    color: var(--brown-dark);
    transition: color 0.2s, border-color 0.2s;
  }
  .global-nav a::after { display: none; }
  .global-nav a:hover { color: var(--wine); border-bottom-color: var(--wine); }

  .service-grid { grid-template-columns: repeat(3, 1fr); }

  .equip-grid { grid-template-columns: repeat(3, 1fr); }

  .gallery { grid-template-columns: repeat(4, 1fr); }

  .access { grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: start; }
  .access-map { aspect-ratio: 4 / 3; }
}

/* =========================================================
   1200px以上：特徴カードを4列に（見出しが2行に収まる幅を確保）
   ========================================================= */
@media (min-width: 1200px) {
  .feature-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; }
  .feature-card { padding: 32px 20px 28px; }
  .feature-title { font-size: 18px; letter-spacing: 0.01em; }
}

/* =========================================================
   1200px以上：ファーストビューの写真を画面の左端から右端まで（幅100%）広げ、
   文字は左側に重ねる。1199px以下は上部の帯（768px以上の指定）のまま
   ========================================================= */
@media (min-width: 1200px) {
  .hero-photo {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: auto;
  }
  .hero-photo img { object-position: 50% 15%; } /* 横は幅いっぱいなので切れない。縦は看板が上寄りに見える位置 */
  /* 左から薄ベージュのグラデーション：文字の下は濃く、看板・入口の上は薄く */
  .hero-photo::after {
    background:
      linear-gradient(to right, #f7f1ea 0%, rgba(247, 241, 234, 0.92) 30%, rgba(247, 241, 234, 0.55) 46%, rgba(247, 241, 234, 0.12) 56%, rgba(247, 241, 234, 0.12) 100%),
      linear-gradient(to top, rgba(247, 241, 234, 0.55) 0%, rgba(247, 241, 234, 0) 30%);
  }
  .hero-photo-note { right: 16px; bottom: 14px; }
  .hero-inner { padding: 80px 32px 88px; }
  .hero-title { font-size: 44px; } /* 1行目の右端が看板にかからない大きさ */
  .hero-sub { font-size: 19px; max-width: 28em; }
  /* 診療時間ボックス：入口の写真にかからないよう縦並びにして幅を狭める */
  .hero-box {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    max-width: 540px;
  }
  .hero-box .btn-tel { width: 100%; }
}

/* セカンドオピニオンを踏まえた表示と操作の調整 */
.hero-photo-note { font-size: 14px; background: rgba(0, 0, 0, 0.6); }
.hero-location { margin-top: 16px; font-size: 14px; }
a[href^="tel:"], .btn-tel span, .sp-cta a { white-space: nowrap; }
.btn-tel { gap: 8px; padding-left: 14px; padding-right: 14px; letter-spacing: 0; }
.btn-tel .icon { flex-shrink: 0; }
.hours-panel .hours-table-panel th,
.hours-panel .hours-table-panel td { padding: 7px 10px; font-size: 16px; line-height: 1.5; }
.hours-panel .hours-table-panel th:first-child { width: 25%; }
.hours-panel small { font-size: 14px; }
.hours-panel__title { letter-spacing: 0; }
.fever-link { padding: 12px 16px; background: var(--beige-light); text-align: center; font-size: 16px; }
.alert .btn-tel { margin-top: 16px; }
.transport { margin: 20px 0 12px; }
.transport div + div { margin-top: 12px; }
.transport dt { font-weight: 700; }
.map-link { display: inline-block; margin-top: 12px; }
/* 地図の下の外部リンクも表示領域に含める */
.access-map { aspect-ratio: auto; overflow: visible; background: transparent; }
.access-map iframe { aspect-ratio: 4 / 3; height: auto; border-radius: var(--radius); }
.btn:disabled { cursor: default; opacity: 0.75; }
body.is-panel-open .hours-tab { visibility: hidden; }
/* 開いたフレームから閉じるボタンにフォーカスできるようにする */
body.is-panel-open .hours-panel { transition: transform 0.3s ease; }

@media (max-width: 767px) {
  .hero-inner { padding-top: 128px; padding-bottom: 16px; }
  .hero-title { margin: 12px 0; font-size: clamp(21px, 6.3vw, 25px); }
  .hero-sub { font-size: 16px; line-height: 1.7; }
  .hero-note { margin-top: 12px; font-size: 14px; line-height: 1.5; padding: 6px 10px; }
  .hero-location { margin-top: 10px; letter-spacing: 0; }
  .hero-box { margin-top: 16px; padding: 12px; }
  .hero-box .btn-tel { margin-top: 10px; }
  .hero-hours { line-height: 1.6; }
  .hero-hours div { padding: 2px 0; }
  .hero-hours dt { font-size: 14px; flex-basis: 5.6em; }
  .hero-photo-note { top: 84px; bottom: auto; }
  .btn-tel { font-size: 25px; }
  .access-dl div { gap: 8px; }
  .access-dl dt { flex-basis: 2em; }
  .access-dl a { font-size: 20px; letter-spacing: 0; }
}
@media (min-width: 768px) and (max-width: 1199px) {
  main > .section, main > .fever-link, .site-footer { padding-right: 64px; }
}
@media (min-width: 1024px) {
  .global-nav ul { flex-wrap: wrap; row-gap: 4px; column-gap: 8px; }
  .global-nav li { flex: 0 1 auto; }
  .global-nav a { font-size: 14px; }
}

/* 地図イラストを元の地図枠と同じ寸法で表示 */
.access-map > img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
