@charset "utf-8";
/* =========================================================================
   なかうずらクリニック 共通スタイル(ページ本文・コンテンツ領域)
   方針: 白基調 + 落ち着いた青のアクセント1色 / モバイルファースト

   ヘッダー/トップバー/グローバルナビ/フッター/モバイル固定フッター/CTA帯/ボタンは
   assets/chrome.css に一本化した(2026-08-30指示書§2。トップページと下層ページで
   同じ骨格を共有するため)。:root の配色トークンも chrome.css 側に移した。
   このファイルを読み込むページは必ず chrome.css を先に読み込むこと。
   ========================================================================= */

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { overflow-x: hidden; } /* 意図しない横スクロールの保険 */

/* 横に長い表はラッパー内でスクロール(375pxで本文がはみ出さない) */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 12px 0; }
.table-wrap table { margin: 0; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg-soft);
  line-height: 1.8;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* 見出しはトップページと同じZen Maru Gothic(丸ゴシック)に統一 */
h1, h2, h3, h4,
.brand__name,
.card h2, .about-item h3, .feature-card__body h3,
.qa-card__t, .page-title, .section-title h2,
.faq-chat__title,
.cta-band h2 {
  font-family: var(--font-heading);
}

img { max-width: 100%; height: auto; vertical-align: bottom; }

a { color: var(--accent); }
a:hover { color: var(--accent-dark); }

/* ---------- Hero (top page) ---------- */
.hero {
  background: linear-gradient(180deg, var(--accent-soft), #fff);
  padding: 28px 16px 8px;
}
.hero__inner { max-width: var(--maxw); margin: 0 auto; }
.hero__lead { font-size: 1.05rem; color: var(--ink-soft); margin: 0; }
.hero h1 { margin: 0 0 6px; font-size: 1.5rem; color: var(--heading-dark); }

/* 写真ヒーロー(単一画像・控えめなオーバーレイ) */
.hero-photo {
  position: relative;
  min-height: 340px;
  display: flex; align-items: flex-end;
  background: #cfdce6 center/cover no-repeat;
  background-image: linear-gradient(180deg, rgba(20,40,60,.05) 0%, rgba(20,45,70,.55) 100%), var(--hero-img);
}
@media (min-width: 760px){ .hero-photo { min-height: 440px; } }
.hero-photo__inner {
  max-width: var(--maxw); margin: 0 auto; width: 100%;
  padding: 24px 16px 26px; color: #fff;
}
.hero-photo h1 {
  margin: 0 0 6px; font-size: 1.6rem; line-height: 1.4;
  text-shadow: 0 1px 8px rgba(0,0,0,.35);
}
@media (min-width: 760px){ .hero-photo h1 { font-size: 2.1rem; } }
.hero-photo p {
  margin: 0 0 16px; font-size: .95rem; max-width: 40em;
  text-shadow: 0 1px 6px rgba(0,0,0,.45);
}
@media (min-width: 760px){ .hero-photo p { font-size: 1.05rem; } }
.hero-photo .cta-actions { justify-content: flex-start; }
.hero-photo .btn--primary { background: #fff; color: var(--accent-dark); }
.hero-photo .btn--tel { background: rgba(255,255,255,.14); color:#fff; border-color:#fff; }

/* ---------- 写真付きカテゴリカード(診療案内) ---------- */
.feature-cards {
  max-width: var(--maxw); margin: 0 auto; padding: 8px 16px 8px;
  display: grid; gap: 16px; grid-template-columns: 1fr;
}
@media (min-width: 620px){ .feature-cards { grid-template-columns: 1fr 1fr; } }
.feature-card {
  display: flex; flex-direction: column; overflow: hidden;
  background:#fff; border:1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow); text-decoration: none; color: var(--ink);
  transition: .18s;
}
.feature-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.10); border-color:#cfe0ec; }
.feature-card__img { aspect-ratio: 16/9; overflow: hidden; background: var(--accent-soft); }
.feature-card__img img { width:100%; height:100%; object-fit: cover; display:block; }
.feature-card__body { padding: 14px 16px 16px; }
.feature-card__body h3 { margin: 0 0 6px; font-size: 1.1rem; color: var(--heading-dark); }
.feature-card__body p { margin: 0 0 10px; font-size: .86rem; color: var(--ink-soft); line-height:1.7; }
.feature-card__links { display:flex; flex-wrap:wrap; gap:6px; }
.feature-card__links a {
  font-size: .78rem; padding: 4px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-dark); text-decoration:none;
}
.feature-card__links a:hover { background: var(--accent); color:#fff; }

/* ---------- セクション見出し(英語ラベル+和文) ---------- */
.sec-head { text-align: center; max-width: var(--maxw); margin: 0 auto; padding: 40px 16px 8px; }
.sec-head__en { display: block; font-size: .72rem; letter-spacing: .22em; color: var(--label);
  font-weight: 700; text-transform: uppercase; margin-bottom: 4px; }
.sec-head__jp { margin: 0; font-size: 1.5rem; color: var(--ink); font-weight: 700; }
.sec-head__jp::after { content: ""; display: block; width: 40px; height: 3px; background: var(--heading-accent);
  margin: 12px auto 0; border-radius: 2px; }
.sec-lead { text-align: center; color: var(--ink-soft); max-width: 42em; margin: 10px auto 0;
  padding: 0 16px; font-size: .95rem; }

/* セクション背景の切り替え */
.section--tint { background: var(--bg-soft); }
.section--pad { padding: 8px 0 40px; }

/* ---------- 当院について(3つの特徴・アイコン) ---------- */
.about-grid { max-width: var(--maxw); margin: 0 auto; padding: 16px; display: grid; gap: 18px;
  grid-template-columns: 1fr; }
@media (min-width: 720px){ .about-grid { grid-template-columns: repeat(3, 1fr); } }
.about-item { background:#fff; border:1px solid var(--border); border-radius: 24px; padding: 28px 24px;
  text-align: center; box-shadow: var(--shadow); }
.about-item__icon { width: 58px; height: 58px; margin: 0 auto 14px; display:flex; align-items:center; justify-content:center;
  background: var(--accent-soft); border-radius: 16px; color: var(--accent); }
.about-item__icon svg { width: 30px; height: 30px; }
/* トップページの当院についてカードと同じ3色使い分け(青/緑/coral) */
.about-item__icon--blue  { background: var(--accent-soft); color: var(--accent); }
.about-item__icon--green { background: var(--green-tint); color: var(--green-dark); }
.about-item__icon--coral { background: var(--coral-tint); color: var(--coral-dark); }
.about-item h3 { margin: 0 0 8px; font-size: 1.08rem; color: var(--heading-dark); }
.about-item p { margin: 0; font-size: .88rem; color: var(--ink-soft); line-height: 1.8; text-align: left; }

/* ---------- クイックアクセス(診療時間/アクセス/問診) ---------- */
.quick-access { max-width: var(--maxw); margin: 18px auto 6px; position: relative; z-index: 5;
  padding: 0 16px; display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px){ .quick-access { grid-template-columns: repeat(3, 1fr); } }
.qa-card { background:#fff; border:1px solid var(--border); border-radius: 20px; padding: 18px 18px;
  box-shadow: 0 4px 16px rgba(0,0,0,.08); display:flex; gap: 14px; align-items:center; text-decoration:none; color:var(--ink); }
.qa-card:hover { border-color: var(--accent); }
.qa-card__icon { flex:none; width: 46px; height: 46px; border-radius: 12px; background: var(--accent-soft);
  color: var(--accent); display:flex; align-items:center; justify-content:center; }
.qa-card__icon svg { width: 26px; height: 26px; }
.qa-card__t { font-weight: 700; font-size: .98rem; color: var(--heading-dark); }
.qa-card__s { font-size: .78rem; color: var(--ink-soft); }

/* ---------- 本文リード画像 / 図 ---------- */
.lead-figure { margin: 0 0 22px; }
.lead-figure img { width: 100%; border-radius: 10px; box-shadow: var(--shadow); }
.doctor-portrait { float: right; width: 160px; margin: 0 0 12px 18px; border-radius: 10px; box-shadow: var(--shadow); }
@media (max-width: 480px){ .doctor-portrait { float:none; width: 55%; margin: 0 auto 16px; display:block; } }
/* 副院長の写真(ご挨拶ページ)。院長の.doctor-portraitと違い等倍の原寸画像のため、
   フロートはさせず最大幅のみ320px程度に制御する(2026-08-30指示書§5.1)。 */
.assoc-portrait { max-width: 320px; width: 100%; border-radius: 10px; box-shadow: var(--shadow); display: block; margin: 0 0 12px; }

/* ---------- Info cards (top: hours / closed / access / news) ---------- */
.quick { max-width: var(--maxw); margin: 0 auto; padding: 16px; display: grid; gap: 16px; }
@media (min-width: 760px) { .quick { grid-template-columns: 1fr 1fr; } }
.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 18px 20px; box-shadow: var(--shadow);
}
.card h2 { margin: 0 0 12px; font-size: 1.08rem; color: var(--heading-dark);
  border-left: 5px solid var(--heading-accent); padding-left: 10px; }

/* ---------- Hours table ---------- */
.hours-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.hours-table th, .hours-table td { border: 1px solid var(--border); padding: 7px 4px; text-align: center; }
.hours-table thead th { background: var(--accent); color: #fff; font-weight: 700; }
.hours-table tbody th { background: var(--bg-soft); white-space: nowrap; }
.hours-table .o { color: var(--green-dark); font-weight: 700; }
.hours-table .x { color: var(--ink-soft); opacity: .55; }
.hours-note { font-size: .82rem; color: var(--ink-soft); margin: 8px 0 0; }
.closed { font-weight: 700; color: var(--accent-warm); }

/* ---------- News list ---------- */
.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li { padding: 10px 0; border-bottom: 1px dashed var(--border); }
.news-list time { display: inline-block; color: var(--ink-soft); font-size: .84rem; margin-right: 10px; }
.news-list a { text-decoration: none; }
.news-list a:hover { text-decoration: underline; }

/* ---------- Page layout (sub pages) ---------- */
.page-head { background: linear-gradient(180deg, var(--accent-soft), #fff); border-bottom: 1px solid var(--border); }
.page-head__inner { max-width: var(--maxw); margin: 0 auto; padding: 22px 16px; }
.breadcrumb { font-size: .78rem; color: var(--ink-soft); margin: 0 0 6px; }
.breadcrumb a { color: var(--ink-soft); text-decoration: none; }
.page-title { margin: 0; font-size: 1.5rem; color: var(--heading-dark); }

/* 本文をトップページのカード(白背景・角丸・shadow)と同じ質感で囲む */
.content {
  max-width: 800px; margin: 24px auto 48px; padding: 28px 18px;
  background: #fff; border: 1px solid var(--border); border-radius: 24px; box-shadow: var(--shadow);
}
@media (min-width: 640px){ .content { padding: 40px; } }
.content h2 { font-size: 1.3rem; color: var(--heading-dark); margin: 32px 0 12px;
  border-bottom: 2px solid var(--accent-soft); padding-bottom: 6px; }
.content h3 { font-size: 1.1rem; color: var(--heading-dark); margin: 24px 0 8px;
  border-left: 4px solid var(--heading-accent); padding-left: 8px; }
.content p { margin: 0 0 16px; }
.content ul, .content ol { margin: 0 0 16px; padding-left: 1.4em; }
.content li { margin: 4px 0; }
.content img { border-radius: 6px; margin: 8px 0; }
/* 本文中の画像の既定サイズ(2026-08-30指示書§5)。crawl移植ページはclass無しの等倍画像が
   紛れ込みやすいため、本文直下の画像はこのクラスで最大幅を明示的に制御する。 */
.content-img { max-width: 480px; border-radius: 10px; }
.content table { border-collapse: collapse; width: 100%; margin: 12px 0; font-size: .92rem; }
.content th, .content td { border: 1px solid var(--border); padding: 8px 10px; }
.content th { background: var(--bg-soft); }
.content a { word-break: break-word; }

.callout {
  background: var(--accent-soft); border: 1px solid var(--border); border-radius: 16px;
  padding: 14px 16px; margin: 20px 0;
}
.map-embed { position: relative; width: 100%; aspect-ratio: 16/10; border-radius: 16px; overflow: hidden; border: 1px solid var(--border); }
.map-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* AIチャットウィジェット本体のCSSは build/template.js の chatWidget() 内 <style> に一本化した。
   (全ページ共通の左下フローティング化・トップページはこの style.css を読み込んでいないため) */

/* ---------- FAQ page ---------- */
.faq-catnav { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 8px; padding: 0; list-style: none; }
.faq-catnav a {
  display: inline-block; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 14px; font-size: .82rem; text-decoration: none; color: var(--label);
}
.faq-catnav a:hover { background: var(--accent-soft); border-color: var(--accent); }
.faq-category { margin-top: 36px; scroll-margin-top: 90px; }
.faq-list { margin-top: 8px; }
.faq-item {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  margin: 0 0 10px; box-shadow: var(--shadow);
}
.faq-item summary {
  cursor: pointer; list-style: none; padding: 14px 40px 14px 18px; font-weight: 700;
  color: var(--heading-dark); position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: "Q"; color: var(--accent); margin-right: 8px; font-weight: 700; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  color: var(--accent); font-size: 1.2rem; font-weight: 400;
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item__a { padding: 12px 18px 16px; color: var(--ink-soft); border-top: 1px dashed var(--border); }
.faq-item__a p { margin: 0; }

.section-title { max-width: var(--maxw); margin: 8px auto 0; padding: 24px 16px 4px; }
.section-title h2 { font-size: 1.25rem; color: var(--heading-dark); margin: 0;
  border-left: 6px solid var(--heading-accent); padding-left: 12px; }

/* ---------- Link grid (top: 診療案内へのリンク集) ---------- */
.linkgrid { max-width: var(--maxw); margin: 0 auto; padding: 8px 16px 24px;
  display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 620px){ .linkgrid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px){ .linkgrid { grid-template-columns: 1fr 1fr 1fr; } }
.linkgrid a {
  display: block; padding: 14px 16px; background: #fff; border: 1px solid var(--border);
  border-radius: 16px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow);
  transition: .15s;
}
.linkgrid a:hover { border-color: var(--accent); color: var(--accent-dark); transform: translateY(-1px); }
.linkgrid .grp { display:block; font-size:.72rem; color: var(--label); margin-bottom: 2px; }

/* CTA帯・フッター・モバイル固定フッターは assets/chrome.css に一本化した(2026-08-30指示書§2)。 */

/* ---------- Utilities ---------- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); border:0; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
/* ============================================================
   キャラクターイラスト配置用(2026-08-30)
   site/assets/style.css の末尾に追記してください。
   既存クラスとの衝突を避けるため接頭辞 .chr を使用しています。
   ============================================================ */

.chr {
  margin: 0;
  width: min(38vw, 220px);
}
.chr img {
  display: block;
  width: 100%;
  height: auto;
}
.chr--right {
  float: right;
  margin: 0.25rem 0 1rem 1.25rem;
}
.chr--left {
  float: left;
  margin: 0.25rem 1.25rem 1rem 0;
}

/* 次の見出しがイラストに食い込まないようにする */
.chr + h2,
.chr + h3 {
  clear: none;
}

/* 狭い画面では回り込みをやめて中央に置く */
@media (max-width: 600px) {
  .chr,
  .chr--right,
  .chr--left {
    float: none;
    width: min(60vw, 200px);
    margin: 1rem auto;
  }
}

/* 印刷時は省く */
@media print {
  .chr { display: none; }
}
