@charset "UTF-8";

/* ==========================================================================
   さくら内科クリニック 紹介LP
   style.css — デザイン / レスポンシブ担当

   対象セクション: .hero .services .doctor .hours .access .contact
   方針:
     - モバイルファースト（@media は min-width で加算）
     - 白基調＋やわらかい桜色アクセント / 角丸 / やさしい影
     - 外部CSSフレームワーク・外部フォントは不使用（単体で完結）
     - セクション内部は要素・子孫セレクタで指定し、内側のclass名変更に強くする
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. デザイントークン
   -------------------------------------------------------------------------- */

:root {
  /* 色 */
  --color-bg: #ffffff;
  --color-bg-tint: #fff7f9;
  --color-bg-tint-strong: #ffeef3;
  --color-sakura: #f3a5bd;
  --color-sakura-deep: #d76f92;
  --color-sakura-ink: #a44a6b;
  --color-text: #333338;
  --color-text-muted: #6b6b73;
  --color-border: #f0e2e7;
  --color-white: #ffffff;

  /* 角丸 */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  /* 影（やわらかく） */
  --shadow-sm: 0 2px 8px rgba(167, 106, 128, 0.08);
  --shadow-md: 0 6px 20px rgba(167, 106, 128, 0.10);
  --shadow-lg: 0 14px 36px rgba(167, 106, 128, 0.14);

  /* 余白 */
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1.25rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --section-y: 3.5rem;

  /* レイアウト */
  --content-max: 1080px;
  --content-pad: 1.25rem;
  --header-h: 6.5rem;

  /* 書体（外部フォントは読み込まずシステムフォントで完結） */
  --font-base: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN",
    "Hiragino Sans", "Noto Sans JP", "Yu Gothic", "Meiryo", sans-serif;
}

/* --------------------------------------------------------------------------
   2. ベース / リセット
   -------------------------------------------------------------------------- */

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

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

body {
  margin: 0;
  font-family: var(--font-base);
  font-size: 16px;
  line-height: 1.8;
  color: var(--color-text);
  background-color: var(--color-bg);
  /* 桜色のごく淡い地紋 */
  background-image:
    radial-gradient(circle at 12% 8%, rgba(243, 165, 189, 0.10), transparent 45%),
    radial-gradient(circle at 88% 4%, rgba(243, 165, 189, 0.07), transparent 40%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

img,
picture,
video,
iframe {
  max-width: 100%;
  display: block;
  border: 0;
}

img {
  height: auto;
}

iframe {
  border-radius: var(--radius-md);
}

figure {
  margin: 0;
}

address {
  font-style: normal;
}

a {
  color: var(--color-sakura-ink);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

/* キーボード操作時のフォーカスを明示（アクセシビリティ） */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--color-sakura-deep);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

h1,
h2,
h3,
h4 {
  line-height: 1.4;
  color: var(--color-text);
  margin: 0 0 var(--space-md);
  font-weight: 700;
  letter-spacing: 0.02em;
}

p {
  margin: 0 0 var(--space-md);
}

p:last-child {
  margin-bottom: 0;
}

ul,
ol {
  margin: 0 0 var(--space-md);
  padding-left: 1.25em;
}

/* 固定ヘッダーの下にアンカー先が隠れないようにする */
section[id] {
  scroll-margin-top: var(--header-h);
}

/* --------------------------------------------------------------------------
   3. 共通レイアウト（セクション枠）
   -------------------------------------------------------------------------- */

.hero,
.services,
.doctor,
.hours,
.access,
.contact {
  padding: var(--section-y) var(--content-pad);
}

/* 各セクション直下の要素を、中央寄せの読みやすい幅に収める */
.hero > *,
.services > *,
.doctor > *,
.hours > *,
.access > *,
.contact > * {
  max-width: var(--content-max);
  margin-left: auto;
  margin-right: auto;
}

/* 交互に淡いピンクを敷いてセクションを区切る */
.services,
.access {
  background-color: var(--color-bg-tint);
}

/* セクション見出し（h2）に桜色の飾りを添える */
.services > h2,
.doctor > h2,
.hours > h2,
.access > h2,
.contact > h2 {
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: var(--space-lg);
  position: relative;
  padding-bottom: var(--space-sm);
}

.services > h2::after,
.doctor > h2::after,
.hours > h2::after,
.access > h2::after,
.contact > h2::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 56px;
  height: 4px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--color-sakura), var(--color-sakura-deep));
}

/* 見出し直後のリード文 */
.services > p,
.contact > p {
  max-width: 42em;
  text-align: center;
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
}

/* --------------------------------------------------------------------------
   4. ヘッダー / ナビゲーション
   -------------------------------------------------------------------------- */

body > header {
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-sm) var(--content-pad);
  position: sticky;
  top: 0;
  z-index: 100;
}

body > header > * {
  max-width: var(--content-max);
  margin-left: auto;
  margin-right: auto;
}

/* ロゴ（p でも h1 でも当たるように） */
body > header > p,
body > header > h1 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  text-align: center;
  line-height: 1.4;
}

body > header > p a,
body > header > h1 a {
  color: var(--color-sakura-ink);
  text-decoration: none;
}

/* ロゴロックアップ：さくらマーク + 院名 + 罫線で挟んだ診療科目 */
body > header > p a,
body > header > h1 a {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
}

.site-logo-mark {
  width: 2.2em;
  height: 2.2em;
  flex-shrink: 0;
}

.site-logo-petals {
  fill: var(--color-sakura);
}

.site-logo-center {
  fill: var(--color-sakura-deep);
}

.site-logo-text {
  display: block;
  text-align: left;
}

.site-logo-name {
  display: block;
  letter-spacing: 0.02em;
}

/* 診療科目：前後に細い罫線を伸ばす（院名の幅いっぱいに広がる） */
.site-logo-sub {
  display: flex;
  align-items: center;
  gap: 0.5em;
  margin-top: 0.3em;
  font-size: 0.52em;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.site-logo-sub::before,
.site-logo-sub::after {
  content: "";
  flex: 1;
  height: 1px;
  background-color: var(--color-sakura);
}

body > header nav ul {
  list-style: none;
  margin: var(--space-xs) 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 var(--space-md);
}

body > header nav a {
  display: inline-block;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

body > header nav a:hover,
body > header nav a:focus-visible {
  color: var(--color-sakura-deep);
  border-bottom-color: var(--color-sakura);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   5. hero — ファーストビュー
   -------------------------------------------------------------------------- */

.hero {
  background: linear-gradient(180deg, var(--color-bg-tint-strong) 0%, var(--color-white) 100%);
  text-align: center;
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
  position: relative;
  overflow: hidden;
}

/* 背景のやわらかい光（装飾のみ） */
.hero::before {
  content: "";
  position: absolute;
  top: -140px;
  right: -100px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(243, 165, 189, 0.35), transparent 70%);
  pointer-events: none;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 1.6rem;
  line-height: 1.6;
  color: var(--color-sakura-ink);
  margin-bottom: var(--space-md);
}

.hero p {
  color: var(--color-text-muted);
  font-size: 1rem;
  max-width: 40em;
  margin-left: auto;
  margin-right: auto;
}

/* hero の訴求ポイント（ピル表示） */
.hero ul {
  list-style: none;
  padding: 0;
  margin: var(--space-md) 0 var(--space-lg);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-xs);
}

.hero ul li {
  background-color: var(--color-white);
  border: 1px solid var(--color-sakura);
  border-radius: var(--radius-pill);
  color: var(--color-sakura-ink);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.35em 1em;
  box-shadow: var(--shadow-sm);
}

.hero img {
  margin: var(--space-lg) auto 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

/* hero のリンクは CTA ボタンに */
.hero a {
  display: inline-block;
  margin: var(--space-xs) 0.35rem 0;
  padding: 0.85em 2em;
  background: linear-gradient(135deg, var(--color-sakura), var(--color-sakura-deep));
  color: var(--color-white);
  font-weight: 700;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

/* 電話リンクは白地のセカンダリボタンとして差をつける */
.hero a[href^="tel:"] {
  background: var(--color-white);
  color: var(--color-sakura-ink);
  border: 2px solid var(--color-sakura);
  box-shadow: var(--shadow-sm);
}

.hero a:hover,
.hero a:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}

.hero a[href^="tel:"]:hover,
.hero a[href^="tel:"]:focus-visible {
  background-color: var(--color-bg-tint);
}

/* --------------------------------------------------------------------------
   6. services — 診療科目
   -------------------------------------------------------------------------- */

.services ul {
  list-style: none;
  padding: 0;
  /* margin: 0 だと .services > * の margin-left/right: auto を打ち消して左寄せになる */
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

.services ul li {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: var(--space-md);
  text-align: center;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* 桜の花びらに見立てたマーカー（見出しの上に中央配置） */
.services ul li::before {
  content: "";
  display: block;
  margin: 0 auto 0.7rem;
  width: 10px;
  height: 10px;
  border-radius: 50% 0 50% 50%;
  transform: rotate(45deg);
  background: linear-gradient(135deg, var(--color-sakura), var(--color-sakura-deep));
}

.services ul li:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.services ul li h3 {
  color: var(--color-sakura-ink);
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.services ul li p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   7. doctor — 医師紹介
   -------------------------------------------------------------------------- */

.doctor {
  background-color: var(--color-bg);
}

/* 写真＋プロフィールのまとまり（スマホは縦積み） */
.doctor > div {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.doctor figure {
  flex: none;
  text-align: center;
}

.doctor figure img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto var(--space-sm);
  border: 5px solid var(--color-white);
  box-shadow: var(--shadow-md);
  background-color: var(--color-bg-tint-strong);
}

.doctor figcaption {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-sakura-ink);
}

/* 院長メッセージ */
.doctor figure + div > p:first-child {
  background-color: var(--color-bg-tint);
  border-left: 4px solid var(--color-sakura);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
}

.doctor h3 {
  font-size: 1.05rem;
  color: var(--color-sakura-ink);
  margin-bottom: var(--space-xs);
  padding-bottom: 0.35em;
  border-bottom: 2px solid var(--color-border);
}

.doctor ul {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-lg);
}

.doctor ul:last-child {
  margin-bottom: 0;
}

.doctor ul li {
  padding: 0.4em 0 0.4em 1.4em;
  position: relative;
  border-bottom: 1px dashed var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.92rem;
}

.doctor ul li:last-child {
  border-bottom: 0;
}

.doctor ul li::before {
  content: "";
  position: absolute;
  left: 0.25em;
  top: 1em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--color-sakura);
}

/* --------------------------------------------------------------------------
   8. hours — 診療時間

   テーブルはスマホでも崩さないため、table 自身をスクロールコンテナにする。
   （HTML側にラッパーがある場合でも、無い場合でも成立する形）
   thead / tbody を個別の display:table にするため、1列目の幅は
   両方に同じ値を与えて列ズレを防ぐこと。
   -------------------------------------------------------------------------- */

.hours {
  background-color: var(--color-bg);
}

.hours table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  /* 端の影で「横にスクロールできる」ことを示す */
  background:
    linear-gradient(90deg, var(--color-white) 30%, rgba(255, 255, 255, 0)) left center,
    linear-gradient(90deg, rgba(255, 255, 255, 0), var(--color-white) 70%) right center,
    radial-gradient(farthest-side at 0 50%, rgba(167, 106, 128, 0.16), transparent) left center,
    radial-gradient(farthest-side at 100% 50%, rgba(167, 106, 128, 0.16), transparent) right center;
  background-repeat: no-repeat;
  background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%;
  background-attachment: local, local, scroll, scroll;
}

.hours table > caption {
  display: block;
  text-align: left;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  padding: var(--space-sm) var(--space-md) 0;
}

/* display:block にした table の中身を、表として組み直す */
.hours table > thead,
.hours table > tbody,
.hours table > tfoot {
  display: table;
  width: 100%;
  min-width: 620px; /* 8列が潰れない下限。これ未満の画面では横スクロール */
  border-collapse: collapse;
  table-layout: fixed;
}

/* 1列目（時間帯）の幅は thead / tbody で必ず揃える */
.hours table tr > *:first-child {
  width: 8.5em;
}

.hours table th,
.hours table td {
  padding: 0.75em 0.5em;
  text-align: center;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  white-space: nowrap;
}

.hours table th:last-child,
.hours table td:last-child {
  border-right: 0;
}

.hours table tbody tr:last-child th,
.hours table tbody tr:last-child td {
  border-bottom: 0;
}

/* 曜日の見出し行 */
.hours table thead th {
  background: linear-gradient(135deg, var(--color-sakura), var(--color-sakura-deep));
  color: var(--color-white);
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* 行頭の見出しセル（時間帯） */
.hours table tbody th {
  background-color: var(--color-bg-tint);
  color: var(--color-sakura-ink);
  font-weight: 700;
  text-align: left;
  padding-left: var(--space-md);
}

.hours table tbody tr:nth-child(even) td {
  background-color: rgba(255, 247, 249, 0.6);
}

/* 診療（●）を桜色で、休診（―）は淡く */
.hours table tbody td {
  color: var(--color-sakura-deep);
  font-weight: 700;
}

/* 表の下の注記 */
.hours ul {
  list-style: none;
  padding: 0;
  margin-top: var(--space-md);
  font-size: 0.88rem;
  color: var(--color-text-muted);
}

.hours ul li {
  padding: 0.15em 0 0.15em 1.4em;
  position: relative;
}

.hours ul li::before {
  content: "※";
  position: absolute;
  left: 0;
  color: var(--color-sakura-deep);
}

/* --------------------------------------------------------------------------
   9. access — アクセス
   -------------------------------------------------------------------------- */

/* 情報と地図のまとまり（スマホは縦積み） */
.access > div {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  align-items: start;
}

.access dl {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: var(--space-md);
  margin: 0;
}

.access dt {
  font-weight: 700;
  color: var(--color-sakura-ink);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  margin-top: var(--space-md);
  padding-bottom: 0.3em;
  border-bottom: 1px solid var(--color-border);
}

.access dt:first-child {
  margin-top: 0;
}

.access dd {
  margin: var(--space-xs) 0 0;
  color: var(--color-text);
  font-size: 0.95rem;
}

.access dd p {
  margin: 0;
}

.access dd ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.access dd ul li {
  position: relative;
  padding-left: 1.1em;
}

.access dd ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-sakura);
}

.access iframe {
  width: 100%;
  height: 260px;
  background-color: var(--color-bg-tint-strong);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.access img {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

/* --------------------------------------------------------------------------
   10. contact — お問い合わせ・ご予約
   -------------------------------------------------------------------------- */

.contact {
  background: linear-gradient(180deg, var(--color-white) 0%, var(--color-bg-tint-strong) 100%);
}

/* 電話とフォームのまとまり（スマホは縦積み） */
.contact > div {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  align-items: start;
}

.contact h3 {
  font-size: 1rem;
  color: var(--color-sakura-ink);
  text-align: center;
  margin-bottom: var(--space-md);
}

/* 電話での予約ブロック */
.contact > div > div {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-lg) var(--space-md);
  text-align: center;
}

/* 電話番号は大きく、押しやすく */
.contact a[href^="tel:"] {
  display: inline-block;
  margin: 0 auto var(--space-xs);
  padding: 0.5em 1.4em;
  background-color: var(--color-bg-tint);
  border: 2px solid var(--color-sakura);
  border-radius: var(--radius-pill);
  color: var(--color-sakura-ink);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.3;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.contact a[href^="tel:"]:hover,
.contact a[href^="tel:"]:focus-visible {
  background-color: var(--color-bg-tint-strong);
  transform: translateY(-2px);
  text-decoration: none;
}

.contact a[href^="tel:"] + p,
.contact p:last-child {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 0;
}

/* 問い合わせフォーム */
.contact form {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-lg) var(--space-md);
}

.contact form > div {
  margin-bottom: var(--space-md);
}

.contact label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
  color: var(--color-text);
}

/* 「必須」バッジ */
.contact label span {
  display: inline-block;
  margin-left: 0.5em;
  padding: 0.1em 0.6em;
  background-color: var(--color-sakura-deep);
  color: var(--color-white);
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  vertical-align: 0.1em;
}

.contact input,
.contact textarea,
.contact select {
  width: 100%;
  padding: 0.7em 0.9em;
  font-family: inherit;
  font-size: 1rem;
  color: var(--color-text);
  background-color: var(--color-bg-tint);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.contact input:focus,
.contact textarea:focus,
.contact select:focus {
  background-color: var(--color-white);
  border-color: var(--color-sakura);
}

.contact textarea {
  min-height: 8em;
  resize: vertical;
}

/* チェックボックス行は横並び（幅100%を打ち消す） */
.contact input[type="checkbox"],
.contact input[type="radio"] {
  width: auto;
  min-width: 0;
  flex: none;
  accent-color: var(--color-sakura-deep);
  transform: scale(1.2);
  margin-right: 0.5em;
}

.contact form > div:has(input[type="checkbox"]) {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25em;
}

.contact input[type="checkbox"] + label,
.contact input[type="radio"] + label {
  display: inline-block;
  margin-bottom: 0;
  font-weight: 400;
  font-size: 0.9rem;
}

.contact form p {
  margin: 0;
  text-align: center;
}

.contact button,
.contact input[type="submit"] {
  width: 100%;
  max-width: 22em;
  padding: 0.9em 1em;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-white);
  background: linear-gradient(135deg, var(--color-sakura), var(--color-sakura-deep));
  border: 0;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact button:hover,
.contact input[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* --------------------------------------------------------------------------
   11. フッター
   -------------------------------------------------------------------------- */

body > footer {
  background-color: var(--color-sakura-ink);
  color: var(--color-white);
  text-align: center;
  padding: var(--space-lg) var(--content-pad);
  font-size: 0.85rem;
  line-height: 1.9;
}

body > footer > * {
  max-width: var(--content-max);
  margin-left: auto;
  margin-right: auto;
}

body > footer p:first-child {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-xs);
}

body > footer a {
  color: var(--color-white);
  text-decoration: underline;
}

body > footer small {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.75rem;
}

/* --------------------------------------------------------------------------
   12. レスポンシブ — タブレット（640px〜）
   -------------------------------------------------------------------------- */

@media (min-width: 640px) {
  :root {
    --section-y: 4.5rem;
    --content-pad: 2rem;
  }

  body {
    font-size: 17px;
  }

  .hero h1 {
    font-size: 2.1rem;
  }

  .hero p {
    font-size: 1.05rem;
  }

  .hero ul li {
    font-size: 0.9rem;
  }

  .services > h2,
  .doctor > h2,
  .hours > h2,
  .access > h2,
  .contact > h2 {
    font-size: 1.75rem;
  }

  /* 診療科目は2列に */
  .services ul {
    grid-template-columns: repeat(2, 1fr);
  }

  /* 医師紹介は写真とプロフィールを左右に */
  .doctor > div {
    flex-direction: row;
    align-items: flex-start;
    gap: var(--space-xl);
  }

  .doctor figure {
    width: 200px;
    position: sticky;
    top: calc(var(--header-h) + 1rem);
  }

  .doctor figure img {
    width: 200px;
    height: 200px;
  }

  .doctor figure + div {
    flex: 1;
    min-width: 0;
  }

  .hours table th,
  .hours table td {
    font-size: 0.95rem;
    padding: 0.9em 0.75em;
  }

  .access iframe {
    height: 340px;
  }

  .contact > div > div,
  .contact form {
    padding: var(--space-lg);
  }

  .contact a[href^="tel:"] {
    font-size: 1.9rem;
  }
}

/* --------------------------------------------------------------------------
   13. レスポンシブ — PC（960px〜）
   -------------------------------------------------------------------------- */

@media (min-width: 960px) {
  :root {
    --section-y: 5.5rem;
    --header-h: 4.5rem;
  }

  /* ヘッダーはロゴとナビを左右に振り分ける */
  body > header {
    padding: var(--space-sm) var(--content-pad);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
  }

  body > header > * {
    margin-left: 0;
    margin-right: 0;
  }

  body > header > p,
  body > header > h1 {
    font-size: 1.6rem;
    text-align: left;
    white-space: nowrap;
  }

  body > header nav ul {
    margin-top: 0;
    gap: 0 var(--space-lg);
  }

  body > header nav a {
    font-size: 0.95rem;
  }

  .hero {
    padding-top: 5rem;
    padding-bottom: 5rem;
  }

  .hero h1 {
    font-size: 2.6rem;
  }

  .hero p {
    font-size: 1.15rem;
  }

  /* 診療科目は3列に */
  .services ul {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
  }

  .services ul li {
    padding: var(--space-lg);
  }

  .doctor figure {
    width: 240px;
  }

  .doctor figure img {
    width: 240px;
    height: 240px;
  }

  /* PC幅では表が収まりきるのでスクロール用の影は消す */
  .hours table {
    background-image: none;
  }

  .hours table > thead,
  .hours table > tbody,
  .hours table > tfoot {
    min-width: 100%;
  }

  .hours table th,
  .hours table td {
    padding: 1em 0.75em;
    font-size: 1rem;
  }

  /* アクセスは情報と地図を左右に */
  .access > div {
    grid-template-columns: 1fr 1.1fr;
    gap: var(--space-xl);
  }

  .access iframe {
    height: 100%;
    min-height: 380px;
  }

  /* 問い合わせは電話とフォームを左右に */
  .contact > div {
    grid-template-columns: 1fr 1.3fr;
    gap: var(--space-xl);
  }

  .contact a[href^="tel:"] {
    font-size: 2.1rem;
  }
}

/* --------------------------------------------------------------------------
   14. 配慮 / 印刷
   -------------------------------------------------------------------------- */

/* アニメーションを控える設定を尊重する */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

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

  .doctor figure {
    position: static;
  }
}

@media print {
  body {
    background: var(--color-white);
    color: #000;
    font-size: 11pt;
  }

  body > header {
    position: static;
    backdrop-filter: none;
  }

  body > header nav,
  .hero::before {
    display: none;
  }

  .hero,
  .services,
  .doctor,
  .hours,
  .access,
  .contact {
    padding: 1rem 0;
    background: none;
    page-break-inside: avoid;
  }

  .doctor figure {
    position: static;
  }

  .hours table {
    display: table;
    background-image: none;
    box-shadow: none;
    border-collapse: collapse;
  }

  .hours table > thead {
    display: table-header-group;
    min-width: 0;
  }

  .hours table > tbody {
    display: table-row-group;
    min-width: 0;
  }

  .hours table thead th {
    background: none;
    color: #000;
    border: 1px solid #999;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  body > footer {
    background: none;
    color: #000;
  }

  body > footer a,
  body > footer small {
    color: #000;
  }
}
