/* DEMO総合クリニック（見本）
   考え：病院の床に引かれた「誘導の線」。4つの科に1本ずつ色の線があり、受付で1つに集まる。
   サイトの骨組みも同じ線でつなぐ（ヘッダーの線＝現在地、左の線＝ページの柱、診療科の案内板、週の担当の路線図、院内の図）。
   演出は控えめ：動くのは最初の画面の線（WebGL・ゆっくり）だけ。ほかはスクロールに合わせて線が引かれるだけで、どれも「動きを減らす」で止まる。
   字体：端末の字体だけ（外から読み込まない）。見出しはヒラギノ角ゴの細い太さ（案内の表示の字）、本文は UD ゴシック。 */

:root {
  --floor: #F3F5F4;
  --paper: #FFFFFF;
  --ink: #20262B;
  --ink-2: #4F585E;
  --rule: #D3DBD9;
  --rule-2: #E4E9E8;
  --deep: #2A3238;
  --deep-ink: #EEF1F2;
  --deep-ink-2: #BFC8CC;

  /* 科の色：線（-l）・文字（-t：白や床の上で 4.5 以上）・面（-w） */
  --l-naika: #2E6FB6; --t-naika: #1F5A99; --w-naika: #E7EFF8;
  --l-shoni: #E38A2C; --t-shoni: #9A4F00; --w-shoni: #FCEFDF;
  --l-hifu:  #3A9772; --t-hifu:  #1D6A4B; --w-hifu:  #E4F2EB;
  --l-jibi:  #8762B5; --t-jibi:  #62428D; --w-jibi:  #EFE9F7;

  --l: var(--deep); --t: var(--deep); --w: var(--rule-2);

  --f-sign: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "BIZ UDPGothic", "Yu Gothic", "YuGothic", "Meiryo", system-ui, sans-serif;
  --f-body: "BIZ UDPGothic", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "YuGothic", "Meiryo", system-ui, sans-serif;
  --f-num: "Avenir Next", "Segoe UI", "Helvetica Neue", "Hiragino Sans", Arial, sans-serif;

  --gut: max(16px, env(safe-area-inset-left));
  --rail: 0px;
  --max: 1240px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
@media (min-width: 1080px) { :root { --rail: 88px; --gut: 32px; } }

.d-naika { --l: var(--l-naika); --t: var(--t-naika); --w: var(--w-naika); }
.d-shoni { --l: var(--l-shoni); --t: var(--t-shoni); --w: var(--w-shoni); }
.d-hifu  { --l: var(--l-hifu);  --t: var(--t-hifu);  --w: var(--w-hifu); }
.d-jibi  { --l: var(--l-jibi);  --t: var(--t-jibi);  --w: var(--w-jibi); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 140px; }
body {
  margin: 0;
  background: var(--floor);
  color: var(--ink);
  font-family: var(--font-body, var(--f-body));
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: .03em;
  font-kerning: normal;
  overflow-wrap: anywhere;
  line-break: strict;
  text-spacing-trim: space-first;
  hanging-punctuation: allow-end;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, table { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: 1px; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
h1, h2, h3 { font-family: var(--f-sign); font-feature-settings: "palt"; text-wrap: balance; word-break: auto-phrase; }
p, li, dd { text-wrap: pretty; }
.num { font-family: var(--f-num); font-variant-numeric: tabular-nums lining-nums; letter-spacing: .02em; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.ft :focus-visible { outline-color: #FFFFFF; }

.vh { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -100px; z-index: 200; background: var(--paper); padding: 10px 16px; min-height: 44px; display: inline-flex; align-items: center; border: 2px solid var(--ink); }
.skip:focus { top: 12px; }

/* ---------- 見本の帯 ---------- */
.demo-band { margin: 0; padding: 6px var(--gut); background: #DDE4E2; color: var(--ink); font-size: 12.5px; line-height: 1.6; text-align: center; letter-spacing: .04em; }

/* ---------- ヘッダー（2段：上＝名前と今日の診療と電話、下＝科の札） ---------- */
.hd { position: sticky; top: 0; z-index: 50; background: rgb(255 255 255 / .96); view-transition-name: hd; }
@supports (backdrop-filter: blur(8px)) { .hd { background: rgb(255 255 255 / .86); backdrop-filter: saturate(1.2) blur(10px); } }
.hd__top { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); display: flex; align-items: center; gap: 16px; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; min-height: 44px; margin-right: auto; }
.logo svg { width: 40px; height: 40px; flex: none; }
.logo__txt { display: grid; line-height: 1.25; }
.logo__name { font-family: var(--f-sign); font-weight: 600; font-size: 17px; letter-spacing: .08em; font-feature-settings: "palt"; white-space: nowrap; }
.logo__sub { font-size: 11.5px; color: var(--ink-2); letter-spacing: .06em; white-space: nowrap; }

.now { display: none; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); }
.now b { font-weight: 600; color: var(--ink); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; line-height: 1.7; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); white-space: nowrap; }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--rule); }
.chip[data-state="open"] { border-color: #9CC7B4; background: #EEF7F2; }
.chip[data-state="open"]::before { background: #1D6A4B; }
.chip[data-state="soon"]::before { background: #9A4F00; }
.chip[data-state="closed"] { color: var(--ink-2); }

.tel { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 18px; border-radius: 999px; background: var(--deep); color: #FFFFFF; text-decoration: none; font-size: 15px; white-space: nowrap; }
.tel svg { width: 18px; height: 18px; }
.tel .num { font-size: 16px; letter-spacing: .04em; }
.hd .tel { display: none; }
.hd__menu { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; min-height: 44px; padding: 0 12px; border: 1px solid var(--rule); border-radius: 999px; background: var(--paper); cursor: pointer; font-size: 14px; }
.hd__menu svg { width: 18px; height: 18px; }
.hd__call { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--deep); color: #FFFFFF; }
.hd__call svg { width: 20px; height: 20px; }

.hd__signs { display: none; max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); align-items: stretch; gap: 4px; min-height: 48px; }
.sign { position: relative; display: inline-flex; align-items: center; gap: 10px; padding: 0 14px; min-height: 48px; text-decoration: none; font-family: var(--f-sign); font-size: 14.5px; letter-spacing: .06em; color: var(--ink); border-radius: 6px; }
.sign::before { content: ""; width: 18px; height: 3px; border-radius: 2px; background: var(--l); }
.sign:hover { background: var(--w); }
.sign[aria-current="page"] { background: var(--w); color: var(--t); font-weight: 600; }
.sign--plain::before { display: none; }
.hd__sep { width: 1px; margin: 12px 8px; background: var(--rule); }

/* 4本の線と、現在地の点（スクロールに合わせて右へ進む） */
.lines { position: relative; height: 18px; display: grid; align-content: center; gap: 3px; overflow: hidden; }
.lines i { display: block; height: 2px; background: var(--c); opacity: .9; transition: opacity .3s; }
.lines .l1 { --c: var(--l-naika); } .lines .l2 { --c: var(--l-shoni); } .lines .l3 { --c: var(--l-hifu); } .lines .l4 { --c: var(--l-jibi); }
.d-naika .lines i:not(.l1), .d-shoni .lines i:not(.l2), .d-hifu .lines i:not(.l3), .d-jibi .lines i:not(.l4) { opacity: .28; }
.d-naika .lines .l1, .d-shoni .lines .l2, .d-hifu .lines .l3, .d-jibi .lines .l4 { height: 3px; }
.here { position: absolute; top: 3px; left: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 3px #FFFFFF; translate: 4px 0; }

@media (min-width: 1080px) {
  .now { display: inline-flex; }
  .hd .tel { display: inline-flex; }
  .hd__menu, .hd__call { display: none; }
  .hd__signs { display: flex; }
}

/* メニュー（スマホ）：popover の属性だけで開く（JavaScript なし） */
.menu { margin: 0; inset: 0 0 auto auto; width: min(100vw, 420px); height: 100dvh; max-height: none; padding: 20px var(--gut) 32px; border: 0; background: var(--paper); color: var(--ink); overflow-y: auto; }
.menu::backdrop { background: rgb(32 38 43 / .4); }
.menu__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.menu__head p { font-family: var(--f-sign); font-weight: 600; letter-spacing: .08em; }
.menu__close { min-width: 44px; min-height: 44px; border: 1px solid var(--rule); border-radius: 999px; background: var(--paper); padding: 0 14px; cursor: pointer; }
.menu ul { display: grid; gap: 2px; }
.menu a { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 8px; text-decoration: none; font-family: var(--f-sign); font-size: 17px; letter-spacing: .06em; border-bottom: 1px solid var(--rule-2); }
.menu a::before { content: ""; width: 22px; height: 3px; border-radius: 2px; background: var(--l, var(--ink-2)); }
.menu .tel { margin-top: 20px; width: 100%; justify-content: center; min-height: 52px; border-bottom: 0; }
.menu .tel::before { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .menu { transition: translate .32s var(--ease), display .32s allow-discrete, overlay .32s allow-discrete; translate: 0 0; }
  @starting-style { .menu:popover-open { translate: 100% 0; } }
}

/* ---------- 全体の柱：PC では左に4本の線が通る ---------- */
.page { position: relative; }
@media (min-width: 1080px) {
  .page::before {
    content: ""; position: absolute; top: 0; bottom: 0; left: max(calc((100vw - var(--max)) / 2 + 30px), 30px); width: 22px; pointer-events: none;
    background:
      linear-gradient(var(--l-naika), var(--l-naika)) 0 0 / 2px 100% no-repeat,
      linear-gradient(var(--l-shoni), var(--l-shoni)) 6px 0 / 2px 100% no-repeat,
      linear-gradient(var(--l-hifu), var(--l-hifu)) 12px 0 / 2px 100% no-repeat,
      linear-gradient(var(--l-jibi), var(--l-jibi)) 18px 0 / 2px 100% no-repeat;
    opacity: .5;
  }
}
.wrap { max-width: var(--max); margin: 0 auto; padding-left: calc(var(--gut) + var(--rail)); padding-right: var(--gut); }
.measure { max-width: 38em; }

/* 区切りの見出し：柱から枝が出て見出しに届く */
.sec { padding: 72px 0; }
.sec + .sec { padding-top: 24px; }
.sec--paper { background: var(--paper); }
.sec--paper + .sec { padding-top: 72px; }
.sec__h { position: relative; display: grid; gap: 6px; margin-bottom: 36px; }
.sec__h h2 { font-size: clamp(24px, 3.2vw, 34px); font-weight: 300; letter-spacing: .1em; line-height: 1.4; }
.sec__h p { color: var(--ink-2); font-size: 15px; }
.sec__h::before { content: ""; width: 56px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--l-naika) 0 25%, var(--l-shoni) 25% 50%, var(--l-hifu) 50% 75%, var(--l-jibi) 75%); margin-bottom: 10px; }
@media (min-width: 1080px) {
  .sec__h::before { position: absolute; left: calc(-1 * var(--rail) + 30px); top: 22px; width: calc(var(--rail) - 42px); height: 2px; margin: 0; background: var(--ink); }
  .sec__h::after { content: ""; position: absolute; left: calc(-1 * var(--rail) + 24px); top: 17px; width: 12px; height: 12px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink); }
}

/* ---------- 最初の画面 ---------- */
.hero { position: relative; overflow: clip; background: var(--floor); }
.hero__in { position: relative; z-index: 1; max-width: var(--max); margin: 0 auto; padding: 40px var(--gut) 0 calc(var(--gut) + var(--rail)); display: grid; gap: 28px; }
.hero h1 { font-size: clamp(34px, 8.6vw, 74px); font-weight: 300; line-height: 1.34; letter-spacing: .06em; }
.hero h1 span { display: block; }
.hero__lead { max-width: 30em; color: var(--ink-2); font-size: 16px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; font-size: 14.5px; max-width: 30em; }
.facts dt { color: var(--ink-2); }
.facts dd { color: var(--ink); }
.hero__acts { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 999px; text-decoration: none; font-size: 15px; letter-spacing: .06em; border: 1px solid var(--ink); background: var(--paper); color: var(--ink); cursor: pointer; }
.btn svg { width: 16px; height: 16px; }
.btn--deep { background: var(--deep); border-color: var(--deep); color: #FFFFFF; }
.btn:hover { background: var(--ink); color: #FFFFFF; }
.btn--deep:hover { background: #171C20; }

.floorview { position: relative; height: 220px; margin: 8px calc(-1 * var(--gut)) 0; }
.floorview canvas, .floorview svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.floorview canvas { opacity: 0; transition: opacity 1.2s ease; }
.floorview.is-gl canvas { opacity: 1; }
.floorview.is-gl svg { opacity: 0; transition: opacity 1.2s ease; }
.motion { position: absolute; right: var(--gut); bottom: 12px; z-index: 2; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--rule); background: rgb(255 255 255 / .92); font-size: 13px; cursor: pointer; }
.motion svg { width: 14px; height: 14px; }
.motion[hidden] { display: none; }

.today { position: relative; z-index: 2; background: var(--paper); border-radius: 4px; padding: 22px 22px 20px; box-shadow: 0 1px 0 var(--rule), 0 24px 48px -32px rgb(32 38 43 / .45); margin: 0 0 40px; }
.today::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; border-radius: 4px 0 0 4px; background: linear-gradient(var(--l-naika) 0 25%, var(--l-shoni) 25% 50%, var(--l-hifu) 50% 75%, var(--l-jibi) 75%); }
.today h2 { font-size: 15px; font-weight: 600; letter-spacing: .12em; color: var(--ink-2); }
.today__date { font-family: var(--f-sign); font-size: 22px; letter-spacing: .06em; margin: 2px 0 12px; }
.today table { width: 100%; border-collapse: collapse; font-size: 15px; }
.today th { text-align: left; font-weight: 400; color: var(--ink-2); width: 3.5em; padding: 8px 0; }
.today td { padding: 8px 0; border-top: 1px solid var(--rule-2); }
.today tr:first-child td { border-top: 0; }
.today td:last-child { text-align: right; }
.today__note { font-size: 13px; color: var(--ink-2); margin: 8px 0 16px; }
.today .tel { width: 100%; justify-content: center; min-height: 52px; }
.today__more { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; font-size: 14px; }
.today__more a { display: inline-flex; align-items: center; min-height: 44px; }

@media (min-width: 760px) {
  .floorview { height: 280px; }
  .today { max-width: 440px; }
}
@media (min-width: 1080px) {
  .hero__in { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); padding-top: 64px; column-gap: 64px; row-gap: 0; align-items: start; }
  .hero__text { display: grid; gap: 28px; padding-bottom: 8px; }
  .today { grid-column: 2; grid-row: 1; margin: 8px 0 0 auto; width: 100%; max-width: 400px; }
  .floorview { grid-column: 1 / -1; grid-row: 2; height: 260px; margin: 8px 0 0; margin-left: calc(-1 * (var(--gut) + var(--rail)) - max(0px, (100vw - var(--max)) / 2)); margin-right: calc(-1 * var(--gut) - max(0px, (100vw - var(--max)) / 2)); }
  .motion { right: 24px; bottom: 20px; }
}
@media (max-width: 479px) {
  .logo__sub { display: none; }
  .logo__name { font-size: 16px; letter-spacing: .06em; }
  .hd__top { gap: 10px; }
}

/* ---------- 診療科の案内板 ---------- */
.board { display: grid; gap: 0; border-top: 1px solid var(--rule); }
.board__row { position: relative; display: grid; grid-template-columns: 56px 1fr 20px; align-items: center; column-gap: 16px; row-gap: 2px; padding: 22px 4px; min-height: 96px; text-decoration: none; border-bottom: 1px solid var(--rule); }
.board__row::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 3px; background: var(--l); transform-origin: 0 50%; }
.node { grid-row: span 2; width: 56px; height: 56px; border-radius: 50%; background: var(--l); color: #FFFFFF; display: grid; place-items: center; }
.node svg { width: 28px; height: 28px; }
.board__name { font-family: var(--f-sign); font-size: 22px; letter-spacing: .1em; color: var(--ink); font-feature-settings: "palt"; }
.board__for { grid-column: 2; color: var(--ink-2); font-size: 14.5px; line-height: 1.7; }
.board__days { display: none; font-size: 14px; color: var(--t); }
.board__go { grid-row: 1 / span 2; grid-column: 3; width: 20px; height: 20px; color: var(--ink-2); transition: translate .3s var(--ease); }
.board__row:hover { background: var(--w); }
.board__row:hover .board__go { translate: 4px 0; color: var(--t); }
@media (min-width: 760px) {
  .board__row { grid-template-columns: 64px minmax(9em, 1.1fr) 2fr 1.2fr 20px; column-gap: 24px; padding: 26px 8px; }
  .node { grid-row: auto; width: 64px; height: 64px; }
  .board__name { font-size: 26px; }
  .board__for { grid-column: auto; }
  .board__days { display: block; }
  .board__go { grid-row: auto; grid-column: auto; }
}

/* ---------- 週の担当の路線図（表がそのまま図になる） ---------- */
.route { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.route caption { text-align: left; caption-side: bottom; padding-top: 14px; font-size: 13.5px; color: var(--ink-2); }
.route thead th { font-weight: 400; font-size: 14px; color: var(--ink-2); padding: 0 0 10px; text-align: center; }
.route thead th:first-child { text-align: left; width: 6.4em; }
.route tbody th { text-align: left; font-family: var(--f-sign); font-weight: 600; font-size: 14px; letter-spacing: .04em; color: var(--t); padding: 14px 8px 14px 0; line-height: 1.4; }
.route td { position: relative; text-align: center; padding: 14px 0; }
.route tbody tr td::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 3px; translate: 0 -50%; background: var(--l); opacity: .9; }
.route tbody tr td:last-child::before { right: 50%; }
.stops { position: relative; display: inline-flex; gap: 4px; }
.stop { width: 16px; height: 16px; border-radius: 50%; border: 3px solid var(--l); background: var(--l); }
.stop.off { background: var(--paper); border-color: var(--rule); }
.route tr.is-today-row th { text-decoration: underline; }
.route .is-today { background: linear-gradient(var(--w), var(--w)) center / 100% 100% no-repeat; }
.route thead .is-today { color: var(--ink); font-weight: 600; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 16px; font-size: 13.5px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend .stop { width: 14px; height: 14px; }
.legend .half { display: inline-flex; gap: 3px; }
@media (min-width: 760px) {
  .route thead th:first-child { width: 9em; }
  .route tbody th { font-size: 16px; }
  .stop { width: 20px; height: 20px; }
  .stops { gap: 8px; }
}

/* ---------- 診療時間の表 ---------- */
.hours { width: 100%; border-collapse: collapse; background: var(--paper); font-size: 15px; }
.hours th, .hours td { border-bottom: 1px solid var(--rule); padding: 12px 4px; text-align: center; }
.hours thead th { font-weight: 400; color: var(--ink-2); font-size: 14px; }
.hours tbody th { text-align: left; padding-left: 12px; font-weight: 400; white-space: nowrap; }
.hours tbody th .num { display: block; font-size: 14px; color: var(--ink-2); }
.hours td { font-size: 18px; }
.hours .is-today { background: var(--w, var(--rule-2)); }
.hours thead .is-today { color: var(--ink); font-weight: 600; }
.hours-note { margin-top: 12px; font-size: 14px; color: var(--ink-2); display: grid; gap: 2px; }

/* ---------- 院内の図 ---------- */
.plan { display: grid; gap: 32px; }
.plan figure { background: var(--paper); border: 1px solid var(--rule); padding: 12px; }
.plan figcaption { font-size: 13px; color: var(--ink-2); padding: 8px 4px 0; }
.plan svg { width: 100%; height: auto; }
.plan .room { fill: #FFFFFF; stroke: #8C9A9F; stroke-width: 1.5; }
.plan .room--wait { fill: #F3F5F4; }
.plan .room--fever { fill: #FFF6EC; }
.plan .wall { fill: none; stroke: var(--ink); stroke-width: 3; }
.plan text { font-family: var(--f-body); font-size: 13px; fill: var(--ink); letter-spacing: .04em; }
.plan text.sm { font-size: 11px; fill: var(--ink-2); }
.plan .path { fill: none; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.plan .p1 { stroke: var(--l-naika); } .plan .p2 { stroke: var(--l-shoni); } .plan .p3 { stroke: var(--l-hifu); } .plan .p4 { stroke: var(--l-jibi); }
.plan .pf { fill: none; stroke: #9A4F00; stroke-width: 2.5; stroke-dasharray: 6 6; }
.plan .door { fill: var(--ink); }
.plan .dot { fill: var(--ink); }
.plan-facts { display: grid; gap: 14px; align-content: start; }
.plan-facts li { position: relative; padding-left: 26px; }
.plan-facts li::before { content: ""; position: absolute; left: 0; top: .72em; width: 14px; height: 2px; background: var(--ink); }
@media (min-width: 900px) { .plan { grid-template-columns: 3fr 2fr; align-items: start; } }

/* ---------- 受診の流れ（順番がある中身なので番号をつける） ---------- */
.flow { display: grid; gap: 0; counter-reset: s; }
.flow li { position: relative; counter-increment: s; padding: 0 0 26px 56px; }
.flow li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--ink); display: grid; place-items: center; font-family: var(--f-num); font-size: 16px; background: var(--floor); }
.flow li::after { content: ""; position: absolute; left: 19px; top: 40px; bottom: 2px; width: 2px; background: var(--rule); }
.flow li:last-child::after { display: none; }
.flow h3 { font-size: 17px; font-weight: 600; letter-spacing: .06em; line-height: 1.5; padding-top: 6px; }
.flow p { color: var(--ink-2); font-size: 15px; margin-top: 4px; }
@media (min-width: 900px) {
  .flow { grid-template-columns: repeat(5, 1fr); gap: 24px; }
  .flow li { padding: 56px 0 0; }
  .flow li::after { left: 44px; right: -20px; top: 18px; bottom: auto; width: auto; height: 2px; }
}

/* ---------- お知らせ（休診は 日付・休診・理由・一言 の形だけ） ---------- */
.notes { border-top: 1px solid var(--rule); }
.notes li { display: grid; gap: 4px 20px; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.notes time { font-family: var(--f-num); font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: 14.5px; }
.notes .kind { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.notes .kind::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--ink); }
.notes .why { color: var(--ink-2); font-size: 14px; }
@media (min-width: 760px) { .notes li { grid-template-columns: 13em 6em 1fr; align-items: baseline; } .notes .msg { grid-column: 3; } }

/* ---------- 院長より（お客様が打った200字までの枠） ---------- */
.greet { display: grid; gap: 24px; }
.greet blockquote { margin: 0; font-size: 17px; line-height: 2.1; letter-spacing: .05em; }
.greet blockquote p + p { margin-top: 1em; }
.who { display: grid; gap: 2px; font-size: 14.5px; }
.who b { font-family: var(--f-sign); font-weight: 600; font-size: 18px; letter-spacing: .1em; }
.who small { color: var(--ink-2); font-size: 13px; }
@media (min-width: 900px) { .greet { grid-template-columns: 1fr 2fr; } }

/* ---------- 地図（自分で描いた図。外の地図は読み込まない） ---------- */
.access { display: grid; gap: 28px; }
.map { background: #EEF1F0; border: 1px solid var(--rule); }
.map svg { width: 100%; height: auto; }
.map .road { stroke: #FFFFFF; stroke-width: 18; fill: none; stroke-linecap: square; }
.map .road-s { stroke: #FFFFFF; stroke-width: 9; fill: none; }
.map .rail { stroke: #4F585E; stroke-width: 4; fill: none; }
.map .rail-t { stroke: #FFFFFF; stroke-width: 2.5; stroke-dasharray: 10 10; fill: none; }
.map .blk { fill: #DFE5E3; }
.map .station { fill: var(--ink); }
.map .walk { stroke: var(--deep); stroke-width: 3; fill: none; stroke-dasharray: 2 7; stroke-linecap: round; }
.map .pin { fill: var(--deep); }
.map .park { fill: #FFFFFF; stroke: var(--ink-2); }
.map text { font-family: var(--f-body); font-size: 13px; fill: var(--ink); }
.map text.w { fill: #FFFFFF; font-size: 12px; }
.map figcaption { font-size: 13px; color: var(--ink-2); padding: 10px 12px; background: var(--paper); border-top: 1px solid var(--rule); }
.addr { display: grid; gap: 16px; align-content: start; }
.addr dl { display: grid; grid-template-columns: 6em 1fr; gap: 10px 16px; font-size: 15px; }
.addr dt { color: var(--ink-2); }
@media (min-width: 900px) { .access { grid-template-columns: 3fr 2fr; } }

/* ---------- 中のページの頭 ---------- */
.ph { position: relative; padding: 56px 0 40px; background: var(--paper); border-bottom: 1px solid var(--rule); overflow: clip; }
.ph__line { position: absolute; left: 0; right: 0; bottom: -1px; height: 4px; background: var(--l); view-transition-name: dline; }
.crumb { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; color: var(--ink-2); margin-bottom: 18px; }
.crumb a { display: inline-flex; align-items: center; min-height: 44px; }
.crumb li + li::before { content: "／"; margin-right: 10px; color: var(--rule); }
.ph h1 { font-size: clamp(30px, 6vw, 56px); font-weight: 300; letter-spacing: .1em; line-height: 1.3; display: flex; align-items: center; gap: 20px; }
.ph h1 .node { width: 64px; height: 64px; flex: none; }
.ph__lead { margin-top: 16px; color: var(--ink-2); max-width: 36em; }
@media (min-width: 760px) { .ph h1 .node { width: 84px; height: 84px; } .ph h1 .node svg { width: 40px; height: 40px; } }

/* 科のページの中身 */
.cols { display: grid; gap: 40px; }
@media (min-width: 900px) { .cols { grid-template-columns: 1fr 1fr; gap: 56px; } }
.list { display: grid; border-top: 1px solid var(--rule); }
.list li { display: grid; grid-template-columns: 14px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.list li::before { content: ""; width: 10px; height: 10px; margin-top: .62em; border-radius: 50%; border: 2px solid var(--l); }
.list b { font-weight: 600; }
.list span { display: block; color: var(--ink-2); font-size: 14.5px; }
.h3 { font-family: var(--f-sign); font-size: 19px; font-weight: 600; letter-spacing: .08em; margin-bottom: 16px; }
.callout { border-left: 4px solid var(--l); background: var(--w); padding: 16px 20px; font-size: 15px; }
.callout + .callout { margin-top: 12px; }
.docs { display: grid; gap: 12px; }
.doc { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; padding: 18px 20px; background: var(--paper); border: 1px solid var(--rule); }
.doc b { font-family: var(--f-sign); font-weight: 600; letter-spacing: .08em; }
.doc > span:last-child { grid-column: 2; color: var(--ink-2); font-size: 14px; }
.doc .badge { grid-row: span 2; width: 44px; height: 44px; border-radius: 50%; background: var(--l); color: #FFFFFF; display: grid; place-items: center; }
.doc .badge svg { width: 22px; height: 22px; }
.others { display: grid; gap: 10px; }
.others a { position: relative; display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 0 18px; background: var(--paper); border: 1px solid var(--rule); text-decoration: none; font-family: var(--f-sign); font-size: 17px; letter-spacing: .08em; }
.others a::before { content: ""; width: 28px; height: 3px; border-radius: 2px; background: var(--l); }
.others a:hover { border-color: var(--l); }
@media (min-width: 760px) { .others { grid-template-columns: repeat(3, 1fr); } }

/* ---------- 自費の診療（限定解除の6つを、折りたたまずに同じページに） ---------- */
.jihi { display: grid; gap: 40px; }
.item { background: var(--paper); border: 1px solid var(--rule); }
.item__h { display: grid; gap: 6px; padding: 24px 24px 20px; border-bottom: 3px solid var(--l); }
.item__h h2 { font-size: clamp(21px, 2.6vw, 27px); font-weight: 400; letter-spacing: .08em; }
.item__h p { color: var(--ink-2); font-size: 14.5px; }
.spec { display: grid; }
.spec > div { display: grid; gap: 4px; padding: 16px 24px; border-bottom: 1px solid var(--rule-2); }
.spec > div:last-child { border-bottom: 0; }
.spec dt { font-family: var(--f-sign); font-size: 14px; font-weight: 600; letter-spacing: .08em; color: var(--ink-2); }
.spec dd { font-size: 15.5px; }
.spec dd ul { display: grid; gap: 4px; }
.spec dd li { padding-left: 1em; text-indent: -1em; }
.spec dd li::before { content: "・"; }
.price { font-family: var(--f-num); font-variant-numeric: tabular-nums; font-size: 22px; letter-spacing: .02em; }
.price small { font-family: var(--f-body); font-size: 14px; margin-left: 4px; }
@media (min-width: 760px) { .spec > div { grid-template-columns: 13em 1fr; gap: 24px; align-items: baseline; } }
.fees { width: 100%; border-collapse: collapse; background: var(--paper); font-size: 15px; }
.fees th, .fees td { border-bottom: 1px solid var(--rule); padding: 14px 16px; text-align: left; }
.fees thead th { font-weight: 400; color: var(--ink-2); font-size: 14px; }
.fees td.num { text-align: right; white-space: nowrap; }

/* ---------- 院のご案内 ---------- */
.docs-grid { display: grid; gap: 16px; }
@media (min-width: 760px) { .docs-grid { grid-template-columns: repeat(2, 1fr); } }
.basic { width: 100%; border-collapse: collapse; background: var(--paper); font-size: 15px; }
.basic th, .basic td { border-bottom: 1px solid var(--rule); padding: 14px 16px; text-align: left; vertical-align: top; }
.basic th { width: 34%; font-weight: 400; color: var(--ink-2); }
.equip { display: grid; gap: 0; border-top: 1px solid var(--rule); }
.equip li { padding: 12px 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: 1fr auto; gap: 12px; }
.equip span { color: var(--ink-2); font-size: 14px; }

/* ---------- よくある質問（決まった質問だけ） ---------- */
.faq { display: grid; border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { list-style: none; display: grid; grid-template-columns: 1fr 24px; gap: 16px; align-items: center; min-height: 64px; padding: 14px 0; cursor: pointer; font-family: var(--f-sign); font-size: 17px; letter-spacing: .05em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 20px; height: 20px; transition: rotate .3s var(--ease); }
.faq details[open] summary svg { rotate: 45deg; }
.faq .a { padding: 0 0 22px; color: var(--ink); max-width: 40em; }
.faq .a p + p { margin-top: .6em; }
@media (prefers-reduced-motion: no-preference) {
  .faq details::details-content { block-size: 0; overflow: clip; transition: block-size .35s var(--ease), content-visibility .35s allow-discrete; }
  .faq details[open]::details-content { block-size: auto; }
  :root { interpolate-size: allow-keywords; }
}

/* ---------- お問合せ（選択式） ---------- */
.form { display: grid; gap: 28px; max-width: 40em; }
.field { display: grid; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > label, .field legend { font-family: var(--f-sign); font-weight: 600; font-size: 15px; letter-spacing: .06em; padding: 0; }
.req { margin-left: 8px; font-family: var(--f-body); font-weight: 400; font-size: 12.5px; color: #9F1D1D; }
.field input[type="text"], .field input[type="tel"], .field input[type="email"], .field select {
  width: 100%; min-height: 52px; padding: 10px 14px; border: 1px solid #7F8D93; border-radius: 4px; background: var(--paper); font-size: 16px;
}
.field select { appearance: none; background-image: none; padding-right: 40px; }
.selwrap { position: relative; }
.selwrap svg { position: absolute; right: 14px; top: 50%; translate: 0 -50%; width: 16px; height: 16px; pointer-events: none; }
.opts { display: grid; gap: 8px; }
@media (min-width: 600px) { .opts--row { grid-template-columns: repeat(3, 1fr); } }
.opt { position: relative; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 16px; border: 1px solid #7F8D93; border-radius: 4px; background: var(--paper); cursor: pointer; }
.opt input { width: 20px; height: 20px; margin: 0; accent-color: var(--deep); }
.opt:has(input:checked) { border-color: var(--deep); box-shadow: inset 0 0 0 1px var(--deep); background: #EEF1F2; }
.opt:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; }
.hint { font-size: 13.5px; color: var(--ink-2); }
.err { font-size: 13.5px; color: #9F1D1D; }
.err:empty { display: none; }
.form__send { display: grid; gap: 12px; }
.form__send .btn { min-height: 56px; font-size: 16px; }
.result { padding: 18px 20px; border: 2px solid var(--deep); background: #EEF1F2; }
.result:empty { display: none; }
.notice { padding: 16px 20px; background: var(--paper); border: 1px solid var(--rule); font-size: 14.5px; }

/* ---------- フッター（案内板） ---------- */
.ft { position: relative; background: var(--deep); color: var(--deep-ink); padding: 0 0 120px; margin-top: 72px; }
.ft__lines { display: grid; gap: 4px; padding: 0; }
.ft__lines i { display: block; height: 3px; }
.ft__lines .l1 { background: var(--l-naika); } .ft__lines .l2 { background: var(--l-shoni); } .ft__lines .l3 { background: var(--l-hifu); } .ft__lines .l4 { background: var(--l-jibi); }
.ft__in { max-width: var(--max); margin: 0 auto; padding: 56px var(--gut) 0 calc(var(--gut) + var(--rail)); display: grid; gap: 40px; }
.ft__name { font-family: var(--f-sign); font-size: clamp(24px, 3vw, 32px); font-weight: 300; letter-spacing: .12em; }
.ft__sub { color: var(--deep-ink-2); font-size: 14px; }
.ft .tel { background: #FFFFFF; color: var(--deep); min-height: 56px; font-size: 16px; }
.ft .tel .num { font-size: 20px; }
.ft h2 { font-size: 13.5px; font-weight: 600; letter-spacing: .14em; color: var(--deep-ink-2); margin-bottom: 12px; }
.ft__hours { width: 100%; border-collapse: collapse; font-size: 14px; }
.ft__hours th, .ft__hours td { padding: 6px 0; border-bottom: 1px solid rgb(255 255 255 / .16); text-align: left; font-weight: 400; }
.ft__hours td { text-align: right; }
.ft__nav { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.ft__nav a { display: flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; font-size: 14.5px; }
.ft__nav a::before { content: ""; width: 14px; height: 3px; border-radius: 2px; background: var(--l, var(--deep-ink-2)); }
.ft__nav a:hover { text-decoration: underline; }
.ft__legal { display: grid; gap: 4px; font-size: 13px; color: var(--deep-ink-2); }
.ft__legal dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; }
.ft__bottom { grid-column: 1 / -1; display: grid; gap: 6px; padding-top: 24px; border-top: 1px solid rgb(255 255 255 / .16); font-size: 12.5px; color: var(--deep-ink-2); }
@media (min-width: 900px) {
  .ft { padding-bottom: 40px; }
  .ft__in { grid-template-columns: 1.3fr 1fr 1fr; column-gap: 56px; }
}

/* ---------- スマホの下の帯 ---------- */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px max(10px, env(safe-area-inset-left)) calc(8px + env(safe-area-inset-bottom)); background: rgb(255 255 255 / .96); border-top: 1px solid var(--rule); }
.dock a { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border-radius: 999px; text-decoration: none; font-size: 15px; border: 1px solid var(--ink); background: var(--paper); }
.dock a:first-child { background: var(--deep); border-color: var(--deep); color: #FFFFFF; }
.dock svg { width: 18px; height: 18px; }
@media (min-width: 1080px) { .dock { display: none; } }
body { padding-bottom: 0; }

/* ======================================================================
   動き（すべて「動きを減らす」にしていないときだけ）
   ====================================================================== */
@media (prefers-reduced-motion: no-preference) {
  /* ページの移り：ヘッダーと科の線は残し、中身だけを静かに入れ替える（View Transitions） */
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: vt-out .22s ease both; }
  ::view-transition-new(root) { animation: vt-in .32s var(--ease) both; }
  ::view-transition-group(dline) { animation-duration: .45s; animation-timing-function: var(--ease); }
  @keyframes vt-out { to { opacity: 0; } }
  @keyframes vt-in { from { opacity: 0; translate: 0 8px; } }

  @supports (animation-timeline: scroll()) {
    /* 現在地の点：ページを読み進めると、ヘッダーの線の上を右へ進む */
    .here { animation: here linear both; animation-timeline: scroll(root block); }
    @keyframes here { from { translate: 4px 0; } to { translate: calc(100vw - 20px) 0; } }
  }
  @supports (animation-timeline: view()) {
    /* 案内板の線：その行が見えてきたときに、左から1回だけ引かれる */
    .board__row::before { animation: draw linear both; animation-timeline: view(); animation-range: entry 0% cover 35%; }
    @keyframes draw { from { scale: 0 1; } to { scale: 1 1; } }
    /* 院内の図：入口から各部屋への線が、図が見えてくるのに合わせて引かれる */
    .plan .path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: route linear both; animation-timeline: view(); animation-range: entry 20% cover 55%; }
    @keyframes route { to { stroke-dashoffset: 0; } }
    /* 路線図：各行の線が左から伸びる */
    .route tbody tr td::before { transform-origin: 0 50%; animation: draw linear both; animation-timeline: view(); animation-range: entry 10% cover 40%; }
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  .hd, .dock, .demo-band, .floorview, .motion { display: none !important; }
  body { background: #FFFFFF; }
}

/* 追加の細部 */
.h3--gap { margin-top: 40px; }
.map text.sm { font-size: 11.5px; fill: var(--ink-2); }
.flow--v { grid-template-columns: 1fr !important; gap: 0 !important; margin-top: 8px; }
.flow--v li { padding: 0 0 22px 56px !important; }
.flow--v li::after { left: 19px !important; right: auto !important; top: 40px !important; bottom: 2px !important; width: 2px !important; height: auto !important; }
.hd__call, .hd__menu { flex: none; }
.crumb a { min-width: 44px; justify-content: center; }
@media (max-width: 1079px) { .hd__call { display: none; } }
.plan__scroll { overflow-x: auto; overscroll-behavior-x: contain; }
.plan__scroll:focus-visible { outline-offset: 2px; }
.plan__hint { display: none; font-size: 12.5px; color: var(--ink-2); padding: 6px 4px 0; }
@media (max-width: 759px) { .plan__scroll svg { width: 620px; max-width: none; } .plan__hint { display: block; } }
.who { align-content: start; }
@media (min-width: 760px) { .notes li { grid-template-columns: 16em 6em 1fr; } }
.ft { margin-top: 0; }
main > .sec:last-child { padding-bottom: 96px; }

.crumb li { display: inline-flex; align-items: center; min-height: 44px; }
.num { white-space: nowrap; }
.plan { grid-template-columns: minmax(0, 1fr); }
.plan > * { min-width: 0; }
@media (min-width: 900px) { .plan { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }

/* 電話のボタン（見本のため、tel: のリンクにしない。押すと「見本のため、電話はかかりません。」が出る） */
button.tel, .hd__call { border: 0; cursor: pointer; font: inherit; }
.dock button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border-radius: 999px; font-size: 15px; border: 1px solid var(--deep); background: var(--deep); color: #FFFFFF; cursor: pointer; }
.dock a { background: var(--paper) !important; border-color: var(--ink) !important; color: var(--ink) !important; }
.pop { margin: auto; inset: 0; width: min(92vw, 380px); height: fit-content; padding: 24px 22px 20px; border: 0; border-radius: 6px; background: var(--paper); color: var(--ink); box-shadow: 0 24px 60px -20px rgb(32 38 43 / .5); }
.pop::backdrop { background: rgb(32 38 43 / .45); }
.pop-t { font-family: var(--f-sign); font-weight: 600; font-size: 18px; letter-spacing: .06em; line-height: 1.6; }
.pop-s { margin-top: 6px; color: var(--ink-2); font-size: 14.5px; }
.pop-close { margin-top: 18px; width: 100%; min-height: 48px; border: 1px solid var(--ink); border-radius: 999px; background: var(--paper); cursor: pointer; font-size: 15px; }
.pop-t { word-break: auto-phrase; text-wrap: balance; }
