/* あおつき内科・糖尿病クリニック(デモ) スタイル
   方針: スマホ(375px)を先に組み, 760px・1024pxで広げる.
   形の規則: ボタンは丸(999px), それ以外の面と入力類は16px.
   色の規則: 深い青緑1色(--teal)と淡い黄(--moon)だけ. 見出し以外の装飾色は足さない. */

:root {
  --bg: #fbfcfb;
  --bg-soft: #edf4f3;
  --bg-moon: #fbf1c7;
  --ink: #1b2a29;
  --muted: #475b59;
  --teal: #0f5f5c;
  --teal-ink: #fbfcfb;
  --line: #78908d;
  --line-soft: #c9d9d7;
  --icon-on-teal: #f3dd86;
  --moon: #f3dd86;
  --shadow: rgba(15, 95, 92, 0.14);
  --band-bg: #1b2a29;
  --band-ink: #f6efcf;
  --r: 16px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1918;
    --bg-soft: #132423;
    --bg-moon: #2a2712;
    --ink: #e3ecea;
    --muted: #a3b8b5;
    --teal: #7fcdc6;
    --teal-ink: #0b1615;
    --line: #587672;
    --line-soft: #2a403e;
    --icon-on-teal: #0b1615;
    --moon: #e6d27c;
    --shadow: rgba(0, 0, 0, 0.35);
    --band-bg: #2a2712;
    --band-ink: #f2e7b3;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1918;
  --bg-soft: #132423;
  --bg-moon: #2a2712;
  --ink: #e3ecea;
  --muted: #a3b8b5;
  --teal: #7fcdc6;
  --teal-ink: #0b1615;
  --line: #587672;
  --line-soft: #2a403e;
  --icon-on-teal: #0b1615;
  --moon: #e6d27c;
  --shadow: rgba(0, 0, 0, 0.35);
  --band-bg: #2a2712;
  --band-ink: #f2e7b3;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans JP", system-ui, -apple-system, "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}
h1, h2, h3 { font-family: "Zen Maru Gothic", "Noto Sans JP", sans-serif; line-height: 1.4; margin: 0; }
p { margin: 0 0 1em; }
a { color: var(--teal); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.small { font-size: 1rem; color: var(--muted); margin: 0.5em 0 0; }

:focus-visible { outline: 4px solid #000; outline-offset: 2px; box-shadow: 0 0 0 2px #ffd43d; }

/* 本文へ移動: フォーカスしたときだけ出す */
.skip { position: absolute; left: 8px; top: -80px; z-index: 200; padding: 10px 16px; background: var(--bg); color: var(--teal); font-weight: 700; }
.skip:focus { top: 8px; }
main:focus-visible { outline: none; box-shadow: none; }

/* デモ帯: 常時表示 */
.demo-band {
  position: sticky; top: 0; z-index: 100;
  background: var(--band-bg); color: var(--band-ink);
  padding: 8px 16px;
  font-size: 1rem; line-height: 1.5; font-weight: 500; text-align: center;
}

/* ヘッダー */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 1120px; margin: 0 auto; padding: 14px 16px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--teal);
  font-family: "Zen Maru Gothic", sans-serif; font-weight: 700; font-size: 1.0625rem; line-height: 1.3; }
.brand-mark { flex: none; color: var(--teal); }
.site-header .header-cta { display: none; }

/* ボタン */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 12px 24px; border-radius: 999px;
  font-weight: 700; font-size: 1rem; line-height: 1.3; text-decoration: none; text-align: center;
  border: 2px solid var(--teal);
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.btn:active { transform: translateY(1px) scale(0.98); }
.btn-solid { background: var(--teal); color: var(--teal-ink); }
.btn-solid:hover { background: color-mix(in srgb, var(--teal) 86%, var(--ink)); }
.btn-line { background: transparent; color: var(--teal); }
.btn-line:hover { background: var(--bg-soft); }
.btn-sm { min-height: 44px; padding: 8px 20px; }

/* 共通の枠 */
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 720px; }
.sec { padding: 56px 0; }
.sec-soft { background: var(--bg-soft); }
.sec-moon { background: var(--bg-moon); }
.sec h2 { font-size: 1.625rem; margin-bottom: 28px; color: var(--teal); }
.sec h3 { font-size: 1.1875rem; }

/* ファーストビュー */
.hero {
  position: relative; overflow: hidden;
  max-width: 1120px; margin: 0 auto; padding: 24px 16px 32px;
  display: grid; gap: 24px;
}
.hero::before {
  content: ""; position: absolute; z-index: -1;
  width: 200px; height: 200px; border-radius: 50%;
  background: var(--bg-moon); right: -96px; top: -104px;
}
.hero h1 { font-size: clamp(1.75rem, 7vw, 2.75rem); color: var(--teal); font-weight: 700; letter-spacing: 0.01em; }
.hero h1 .nb { display: inline-block; } /* 語の途中(「甲状/腺」)で折り返さない */
.lead { font-size: 1.125rem; margin: 16px 0 24px; max-width: 34em; text-wrap: balance; }
.cta { display: grid; gap: 12px; }
.hero-art { display: none; }
.art-disk { fill: var(--bg-moon); }
.art-moon { color: var(--teal); }

/* 今日の診療時間 */
.today-bar { background: var(--teal); color: var(--teal-ink); }
.today-bar p { max-width: 1120px; margin: 0 auto; padding: 14px 16px; font-weight: 700; font-size: 1.0625rem; line-height: 1.5; }

/* こんな方へ */
.rows { border-top: 2px solid var(--teal); }
.row { padding: 20px 0; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.row p { margin: 0; max-width: 40em; }
.row h3 { color: var(--ink); }

/* 診療案内 */
.care-grid { display: grid; gap: 16px; }
.care { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); padding: 24px 20px; }
.care p { margin: 8px 0 0; }
.care-main { background: var(--teal); color: var(--teal-ink); border-color: var(--teal); }
.care-main .icon { color: var(--icon-on-teal); }
.icon { display: block; margin-bottom: 12px; color: var(--teal); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* 初診の流れ */
.flow { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.flow li { position: relative; padding: 0 0 28px 60px; counter-increment: s; }
.flow li::before {
  content: counter(s); position: absolute; left: 0; top: 0;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--moon); color: #1b2a29;
  display: grid; place-items: center; font-weight: 700; font-family: "Zen Maru Gothic", sans-serif;
}
.flow li::after { content: ""; position: absolute; left: 19px; top: 46px; bottom: 6px; width: 2px; background: var(--line); }
.flow li:last-child { padding-bottom: 0; }
.flow li:last-child::after { display: none; }
.flow h3 { margin-bottom: 4px; padding-top: 6px; }
.flow p { margin: 0; }

/* 院長紹介 */
.doctor { display: grid; gap: 20px; }
.avatar {
  width: 88px; height: 88px; border-radius: 50%;
  background: var(--teal); color: var(--teal-ink);
  display: grid; place-items: center;
  font-family: "Zen Maru Gothic", sans-serif; font-weight: 700; font-size: 2.25rem;
}
.doc-name { font-family: "Zen Maru Gothic", sans-serif; font-weight: 700; font-size: 1.25rem; margin: 0 0 8px; }
.quals { margin: 0; padding-left: 1.2em; }
blockquote { margin: 20px 0 0; padding: 4px 0 4px 16px; border-left: 4px solid var(--teal); max-width: 34em; }

/* 食事相談 */
.diet-fact { font-weight: 700; margin-bottom: 0; }

/* よくある質問 */
.faq details { border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); margin-bottom: 12px; }
.faq summary {
  list-style: none; cursor: pointer; position: relative;
  min-height: 56px; padding: 14px 52px 14px 18px;
  font-weight: 700; line-height: 1.6;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 20px; top: 50%;
  width: 10px; height: 10px; margin-top: -8px;
  border-right: 2px solid var(--teal); border-bottom: 2px solid var(--teal);
  transform: rotate(45deg); transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { margin: 0; padding: 0 18px 18px; }

/* アクセス・診療時間 */
.access { display: grid; gap: 32px; }
.hours { width: 100%; border-collapse: collapse; background: var(--bg); border-radius: var(--r); overflow: hidden; }
.hours th, .hours td { padding: 10px 2px; text-align: center; border: 1px solid var(--line); font-weight: 500; line-height: 1.5; }
.hours thead th { background: var(--teal); color: var(--teal-ink); border-color: var(--teal); }
.hours tbody th { text-align: left; padding: 10px 8px; white-space: nowrap; font-weight: 700; }
.hours td.off { color: var(--muted); }
.hours .is-today { background: var(--bg-moon); font-weight: 700; }
.hours thead .is-today { background: var(--moon); color: #1b2a29; }
.addr { margin: 20px 0 0; }
.addr div { display: grid; grid-template-columns: 5em 1fr; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.addr dt { font-weight: 700; color: var(--teal); }
.addr dd { margin: 0; }
.map { margin: 0; }
.map svg { width: 100%; height: auto; display: block; }
.m-bg { fill: var(--bg); stroke: var(--line); stroke-width: 1.5; }
.m-road { stroke: var(--line-soft); stroke-width: 14; fill: none; }
.m-route { stroke: var(--teal); stroke-width: 4; fill: none; stroke-dasharray: 2 9; stroke-linecap: round; }
.m-station { fill: var(--teal); }
.m-clinic { fill: var(--bg-moon); stroke: var(--teal); stroke-width: 2; }
.m-moon { color: var(--teal); }
.m-park { fill: var(--teal); }
.m-text { font: 700 16px "Noto Sans JP", sans-serif; fill: var(--ink); }
.m-text-on { fill: var(--teal-ink); }

/* 末尾CTA */
.final-cta { background: var(--bg-moon); text-align: left; }
.final-cta h2 { margin-bottom: 20px; }
.demo-note {
  margin: 24px 0 0; padding: 14px 18px; border-radius: var(--r);
  border: 2px dashed var(--teal); background: var(--bg); font-weight: 700;
}
.demo-note:target { background: var(--teal); color: var(--teal-ink); border-style: solid; }

/* フッター */
.site-footer { background: var(--bg-soft); padding: 40px 0 48px; border-top: 1px solid var(--line); }
.foot-brand { display: flex; align-items: center; gap: 10px; font-family: "Zen Maru Gothic", sans-serif; font-weight: 700; font-size: 1.125rem; color: var(--teal); }
.site-footer p { margin-bottom: 12px; }
.site-footer .small { margin: 0; }
.site-footer svg { color: var(--teal); }

/* 760px以上 */
@media (min-width: 760px) {
  html { scroll-padding-top: 72px; }
  .site-header .header-cta { display: inline-flex; }
  .site-header { padding: 16px 32px; }
  .brand { font-size: 1.1875rem; }
  .wrap { padding: 0 32px; }
  .sec { padding: 88px 0; }
  .sec h2 { font-size: 2rem; margin-bottom: 36px; }
  .hero { padding: 48px 32px 56px; grid-template-columns: 1.25fr 0.75fr; align-items: center; gap: 40px; }
  .hero::before { display: none; }
  .hero-art { display: block; justify-self: end; }
  .hero-art svg { width: min(100%, 300px); height: auto; }
  .lead { font-size: 1.25rem; }
  .cta { grid-template-columns: repeat(2, auto); justify-content: start; gap: 16px; }
  .today-bar p { padding: 14px 32px; }
  .row { grid-template-columns: 0.9fr 1.4fr; gap: 40px; align-items: baseline; padding: 24px 0; }
  .care-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: auto; gap: 20px; }
  .care-main { grid-row: span 2; padding: 36px 32px; }
  .care-main h3 { font-size: 1.5rem; }
  .care { padding: 28px 28px; }
  .doctor { grid-template-columns: 120px 1fr; gap: 40px; align-items: start; }
  .avatar { width: 120px; height: 120px; font-size: 3rem; }
  .access { grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
  .hours th, .hours td { padding: 12px 4px; }
  .hours tbody th { padding: 12px 14px; }
}

@media (min-width: 1024px) {
  .hero { padding: 64px 32px 72px; }
  .hero h1 { font-size: 3rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
