/* デザインシステム「橋」準拠。自費リハビリを比べる。要点 → 料金の見方 → 絞り込み → 施設カード → 掲載の基準。 */
:root {
  --surface: #f6f7f4; --surface-raised: #ffffff; --surface-sunken: #eceee9;
  --ink: #17202a; --ink-muted: #4a5560; --line: #cbd0c6; --line-strong: #6b7480;
  --brand: #213f7a; --brand-soft: #dce4f3; --on-brand: #ffffff;
  --shu: #c0391f; --sign: #ffc93c; --on-sign: #17202a; --focus: #17202a;
  --caution: #9a1b1b; --caution-soft: #fbecea;
  --pillar-money: #1d5bb0; --pillar-video: #00704f; --pillar-story: #6b4597; --pillar-compare: #a44a0a; --on-pillar: #ffffff;
  --st-yes: #00704f; --st-part: #8a5a00; --st-no: #9a1b1b; --st-none: #4a5560;
  --font-ud: "BIZ UDPGothic", "BIZ UDPゴシック", "Yu Gothic", "Hiragino Sans", sans-serif;
  --font-voice: "BIZ UDPMincho", "BIZ UDP明朝", "Yu Mincho", "Hiragino Mincho ProN", serif;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 72px;
  --radius-sm: 4px; --radius-md: 10px; --radius-pill: 999px;
  --tap-min: 48px; --tap-gap: 12px; --measure: 36em; --page-max: 1080px;
  color-scheme: light;
  font-size: 18px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --surface: #14171c; --surface-raised: #1c2027; --surface-sunken: #101318;
    --ink: #ece7dd; --ink-muted: #a9a497; --line: #2f3540; --line-strong: #7d8796;
    --brand: #9db7ee; --brand-soft: #26324a; --on-brand: #0f1a2e;
    --shu: #f08a6e; --sign: #ffc93c; --on-sign: #14171c; --focus: #ffd25e;
    --caution: #ff9c8f; --caution-soft: #3a1e1c;
    --pillar-money: #86b4f0; --pillar-video: #5bc9a0; --pillar-story: #c3a6ea; --pillar-compare: #f2a066; --on-pillar: #10141a;
    --st-yes: #5bc9a0; --st-part: #f2c066; --st-no: #ff9c8f; --st-none: #a9a497;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --surface: #14171c; --surface-raised: #1c2027; --surface-sunken: #101318;
  --ink: #ece7dd; --ink-muted: #a9a497; --line: #2f3540; --line-strong: #7d8796;
  --brand: #9db7ee; --brand-soft: #26324a; --on-brand: #0f1a2e;
  --shu: #f08a6e; --sign: #ffc93c; --on-sign: #14171c; --focus: #ffd25e;
  --caution: #ff9c8f; --caution-soft: #3a1e1c;
  --pillar-money: #86b4f0; --pillar-video: #5bc9a0; --pillar-story: #c3a6ea; --pillar-compare: #f2a066; --on-pillar: #10141a;
  --st-yes: #5bc9a0; --st-part: #f2c066; --st-no: #ff9c8f; --st-none: #a9a497;
  color-scheme: dark;
}
:root[data-contrast="hc"] {
  --surface: #ffffff; --surface-raised: #ffffff; --surface-sunken: #ffffff;
  --ink: #000000; --ink-muted: #2b2b2b; --line: #000000; --line-strong: #000000;
  --brand: #0b2a66; --brand-soft: #dfe7f5; --on-brand: #ffffff;
  --shu: #9e2410; --sign: #ffd400; --on-sign: #000000; --focus: #000000;
  --caution: #8b0000; --caution-soft: #ffffff;
  --pillar-money: #0b3f86; --pillar-video: #00503a; --pillar-story: #4b2a78; --pillar-compare: #7a3300; --on-pillar: #ffffff;
  --st-yes: #00503a; --st-part: #5c3c00; --st-no: #8b0000; --st-none: #2b2b2b;
  color-scheme: light;
}
:root[data-text="l"] { font-size: 21px; }
:root[data-text="xl"] { font-size: 24px; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body { margin: 0; background: var(--surface); color: var(--ink); font-family: var(--font-ud); font-size: 1rem; line-height: 1.95; }
h1, h2, h3, p, ul, ol, dl, blockquote { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
a { color: var(--brand); text-underline-offset: 4px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.wrap { max-width: var(--page-max); margin: 0 auto; padding-inline: var(--space-4); }
[hidden] { display: none !important; }

.skip { position: absolute; left: var(--space-3); top: -80px; z-index: 10; background: var(--sign); color: var(--on-sign); font-weight: 700; padding: var(--space-2) var(--space-4); border-radius: var(--radius-sm); }
.skip:focus { top: var(--space-3); }
.proto { background: var(--surface-sunken); color: var(--ink-muted); font-size: .84rem; padding-block: var(--space-1); }

/* ---------- 部品（デザインシステム「橋」） ---------- */
.hs-btn { font: inherit; font-size: .84rem; font-weight: 700; letter-spacing: .04em; min-height: var(--tap-min); min-width: var(--tap-min); padding: 0 var(--space-4); border-radius: var(--radius-md); border: 2px solid var(--brand); background: var(--surface-raised); color: var(--brand); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.hs-btn[aria-pressed="true"] { background: var(--brand); color: var(--on-brand); }
.hs-mark { display: inline-grid; place-items: center; width: 2.2em; height: 2.2em; border-radius: var(--radius-pill); background: var(--pc); color: var(--on-pillar); font-weight: 700; font-size: .84rem; line-height: 1; flex: none; }
.p-money { --pc: var(--pillar-money); } .p-video { --pc: var(--pillar-video); } .p-story { --pc: var(--pillar-story); } .p-compare { --pc: var(--pillar-compare); }

/* ---------- ヘッダー ---------- */
.head { border-bottom: 1px solid var(--line); }
.head-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--space-4); padding-block: var(--space-4); }
.logo { display: flex; align-items: center; gap: var(--space-3); color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.3rem; line-height: 1.25; }
.logo small { display: block; font-weight: 400; font-size: .72rem; color: var(--ink-muted); }
.logo svg { width: 3.2rem; height: 1.7rem; flex: none; }
.logo .arch { fill: none; stroke: var(--shu); stroke-width: 5; }
.logo .deck { fill: var(--shu); }
.tools { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-5); align-items: center; }
.ctl { display: inline-flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; font-size: .84rem; font-weight: 700; }
.ctl > span { color: var(--ink-muted); margin-right: var(--space-1); }
.gnav ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0 var(--space-5); }
.gnav a { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--tap-min); color: var(--ink); text-decoration: none; font-weight: 700; font-size: .92rem; }
.gnav a:hover { text-decoration: underline; }
.gnav a[aria-current="true"] { text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: var(--pc); }

/* ---------- ページ ---------- */
main { padding-block: var(--space-6) var(--space-8); }
.page { display: grid; gap: var(--space-7); }
.col { max-width: 44rem; display: grid; gap: var(--space-4); }
.crumb ol { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0 var(--space-2); font-size: .84rem; color: var(--ink-muted); }
.crumb li:not(:last-child)::after { content: "→"; margin-left: var(--space-2); }
.crumb a { color: var(--ink); display: inline-flex; align-items: center; min-height: var(--tap-min); }

.art-head { display: grid; gap: var(--space-4); max-width: 44rem; }
.kicker { display: flex; align-items: center; gap: var(--space-2); font-size: .84rem; font-weight: 700; color: var(--pc); }
.art-head h1 { font-size: clamp(1.6rem, 5vw, 2.1rem); line-height: 1.5; }
.art-head h1 small { display: block; font-size: .55em; font-weight: 700; color: var(--ink-muted); margin-top: var(--space-1); }
.lead { max-width: var(--measure); }

.stamp { display: inline-flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; padding: var(--space-2) var(--space-4) var(--space-2) var(--space-2); border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface-raised); font-size: .84rem; line-height: 1.6; justify-self: start; }
.stamp .seal { width: 4rem; height: 4rem; border-radius: var(--radius-pill); border: 3px solid var(--shu); color: var(--shu); display: grid; place-content: center; text-align: center; font-family: var(--font-voice); font-weight: 700; line-height: 1.15; font-size: .72rem; transform: rotate(-6deg); flex: none; }
.stamp .seal b { font-size: 1rem; display: block; }
.stamp dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 var(--space-3); }
.stamp dt { color: var(--ink-muted); }
.stamp dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }

.callout { border-radius: var(--radius-md); padding: var(--space-4) var(--space-5); display: grid; gap: var(--space-3); border-top: 5px solid var(--cc); background: var(--cb); max-width: 44rem; }
:root[data-contrast="hc"] .callout { border: 2px solid var(--cc); border-top-width: 5px; }
.callout .ttl { display: flex; gap: var(--space-2); align-items: center; font-weight: 700; color: var(--cc); }
.callout .ttl i { font-style: normal; display: inline-grid; place-items: center; width: 1.5em; height: 1.5em; border-radius: var(--radius-pill); background: var(--cc); color: var(--surface); font-size: .84rem; flex: none; }
.callout ul { padding-left: 1.2em; display: grid; gap: var(--space-2); }
.callout--point { --cc: var(--brand); --cb: var(--brand-soft); }
.callout--caution { --cc: var(--caution); --cb: var(--caution-soft); }

.sec { display: grid; gap: var(--space-4); scroll-margin-top: var(--space-4); }
.sec > h2 { font-size: 1.44rem; line-height: 1.5; padding-top: var(--space-4); border-top: 2px solid var(--ink); }
.sec > p, .sec > ul, .sec > ol { max-width: var(--measure); }
.sec > ul, .sec > ol { padding-left: 1.4em; display: grid; gap: var(--space-2); }
.small { font-size: .84rem; color: var(--ink-muted); }
strong { font-weight: 700; }

/* ---------- 料金と記号の見方 ---------- */
.howto { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: var(--space-4); }
.howto > div { background: var(--surface-raised); border: 1px solid var(--line-strong); border-radius: var(--radius-md); padding: var(--space-4) var(--space-5); display: grid; gap: var(--space-3); align-content: start; }
.howto h3 { font-size: 1.05rem; }
.legend { list-style: none; padding: 0; display: grid; gap: var(--space-2); font-size: .92rem; }
.legend li { display: flex; gap: var(--space-3); align-items: baseline; }

/* 状態の記号（色だけに頼らず、記号と文字で示す） */
.st { display: inline-grid; place-items: center; width: 1.7em; height: 1.7em; border-radius: var(--radius-pill); border: 2px solid currentColor; font-weight: 700; font-size: .84rem; line-height: 1; flex: none; }
.st-Y { color: var(--st-yes); } .st-P { color: var(--st-part); } .st-N { color: var(--st-no); } .st-U { color: var(--st-none); border-style: dashed; }

/* ---------- 絞り込み ---------- */
.filter { background: var(--surface-raised); border: 1px solid var(--line-strong); border-radius: var(--radius-md); padding: var(--space-4) var(--space-5); display: grid; gap: var(--space-4); }
.filter fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: var(--space-2); }
.filter legend { font-weight: 700; font-size: .92rem; padding: 0; margin-bottom: var(--space-2); }
.opts { display: flex; flex-wrap: wrap; gap: var(--tap-gap); }
.chip { font: inherit; font-size: .84rem; font-weight: 700; min-height: var(--tap-min); padding: var(--space-1) var(--space-4); border-radius: var(--radius-pill); border: 2px solid var(--pillar-compare); background: var(--surface-raised); color: var(--pillar-compare); cursor: pointer; line-height: 1.4; }
.chip[aria-pressed="true"] { background: var(--pillar-compare); color: var(--on-pillar); }
.chip[aria-pressed="true"]::before { content: "✓ "; }
.chip .n { font-weight: 400; margin-left: .3em; }
.count { font-weight: 700; font-size: 1.05rem; }
.count b { font-size: 1.4rem; color: var(--pillar-compare); font-variant-numeric: tabular-nums; }

/* ---------- 施設カード ---------- */
.facs { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 30rem), 1fr)); gap: var(--space-5); }
.fac { background: var(--surface-raised); border: 1px solid var(--line-strong); border-top: 5px solid var(--pillar-compare); border-radius: var(--radius-md); padding: var(--space-4) var(--space-5) var(--space-5); display: grid; gap: var(--space-4); align-content: start; }
.fac-head { display: grid; gap: var(--space-1); }
.fac-head h3 { font-size: 1.17rem; line-height: 1.5; }
.fac-where { font-size: .92rem; color: var(--ink-muted); }
.tags { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-2); }
.tags span { font-size: .78rem; font-weight: 700; line-height: 1.5; padding: 0 var(--space-2); border-radius: var(--radius-sm); background: var(--surface-sunken); color: var(--ink); border: 1px solid var(--line); }
.tags .rg { background: var(--pillar-compare); color: var(--on-pillar); border-color: var(--pillar-compare); }

/* 料金（いちばん大きく見せる） */
.price { background: var(--surface-sunken); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); display: grid; gap: var(--space-2); }
:root[data-contrast="hc"] .price { border: 1px solid var(--line); }
.p60 { display: grid; gap: 0; }
.p60 .lbl { font-size: .78rem; font-weight: 700; color: var(--ink-muted); }
.p60 .num { font-size: 1.5rem; font-weight: 700; line-height: 1.35; font-variant-numeric: tabular-nums; }
.p60 .num.na { font-size: 1rem; color: var(--ink-muted); }
.bar { position: relative; height: 10px; border-radius: var(--radius-pill); background: var(--surface-raised); border: 1px solid var(--line); }
.bar i { position: absolute; top: -1px; bottom: -1px; border-radius: var(--radius-pill); background: var(--pillar-compare); min-width: 10px; }
.bar-scale { display: flex; justify-content: space-between; font-size: .7rem; color: var(--ink-muted); font-variant-numeric: tabular-nums; line-height: 1.4; }
.plist { padding-left: 1.2em; font-size: .88rem; line-height: 1.7; display: grid; gap: 2px; font-variant-numeric: tabular-nums; }
.pmeta { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px var(--space-3); font-size: .84rem; line-height: 1.7; }
.pmeta dt { color: var(--ink-muted); font-weight: 700; white-space: nowrap; }
.pmeta dd { margin: 0; }

/* 車椅子・全介助・吸引・言語聴覚士 */
.needs { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
.needs li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-2); align-items: start; padding: var(--space-2); border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: .84rem; line-height: 1.55; }
.needs b { display: block; font-size: .84rem; }
.needs .say { color: var(--ink-muted); }
@media (max-width: 30rem) { .needs { grid-template-columns: minmax(0, 1fr); } }

.staff { font-size: .88rem; line-height: 1.7; }
.staff b { color: var(--ink-muted); margin-right: var(--space-2); }
.note { font-size: .88rem; line-height: 1.7; border-left: 4px solid var(--line-strong); padding-left: var(--space-3); }
.flag { font-size: .84rem; line-height: 1.7; background: var(--caution-soft); color: var(--ink); border-left: 4px solid var(--caution); padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); }
.src { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-2) var(--space-4); font-size: .84rem; color: var(--ink-muted); border-top: 1px solid var(--line); padding-top: var(--space-3); }
.src a { display: inline-flex; align-items: center; min-height: var(--tap-min); font-weight: 700; }

.none-msg { background: var(--surface-raised); border: 1px dashed var(--line-strong); border-radius: var(--radius-md); padding: var(--space-4) var(--space-5); }

.rules4 { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: var(--space-3); }
.rules4 li { background: var(--surface-raised); border: 1px solid var(--line-strong); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); font-weight: 700; font-size: .92rem; }

.next { list-style: none; padding: 0; border-top: 1px solid var(--line); max-width: 44rem; }
.next li { border-bottom: 1px solid var(--line); }
.next a { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); min-height: var(--tap-min); padding: var(--space-2) 0; color: var(--ink); text-decoration: none; font-weight: 700; font-size: .92rem; line-height: 1.6; }
.next a::after { content: "→"; color: var(--pc); flex: none; }
.next a:hover { color: var(--pc); text-decoration: underline; }

.foot { border-top: 1px solid var(--line); padding-block: var(--space-6) var(--space-7); font-size: .84rem; color: var(--ink-muted); }
.foot nav { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); margin-bottom: var(--space-3); }
.foot nav a { color: var(--ink); display: inline-flex; align-items: center; min-height: var(--tap-min); }

@media print {
  .head .tools, .gnav, .filter, .skip, .proto { display: none !important; }
  .fac { break-inside: avoid; }
}
