/* ============================================================
   発達相談さがし — スタイル「ひだまりの相談室」
   生成りの紙の地に、日だまりの黄色と若葉の緑。
   スマホ優先（375〜390px 基準）。色・文字・角丸・影は :root の変数で一括管理。
   ============================================================ */

:root {
  /* 面と文字 */
  --bg:          #FFFBF4;   /* 地（生成り） */
  --surface:     #FFFFFF;   /* カード */
  --sunken:      #F7EFE3;   /* くぼみ・補足の地 */
  --line:        #EBE1D2;
  --line-strong: #D8C9B3;
  --ink:         #2E2A25;   /* 本文 */
  --ink-2:       #584F45;   /* 説明文 */
  --ink-3:       #71675B;   /* 補足・住所 */

  /* 若葉（行動）と日だまり */
  --brand:       #2E7457;   /* 電話・主ボタン */
  --brand-ink:   #FFFFFF;
  --brand-soft:  #E4F2EA;
  --brand-deep:  #1F5A42;   /* リンク */
  --sun:         #F4B73F;
  --sun-soft:    #FDF1D6;
  --focus:       #3B7BD6;

  /* 注意 */
  --warn-bg:     #FFF3E5;   /* 小児は要相談 */
  --warn-line:   #EFAE72;
  --warn-ink:    #8A3B00;
  --check-bg:    #F1EEE8;   /* 要確認 */
  --check-line:  #B9AE9E;
  --check-ink:   #5A5248;

  /* 施設の種類 6色（--c-x は文字・ドット、--c-x-bg は淡い地） */
  --c-soudan: #1E4C86;  --c-soudan-bg: #E2ECF8;
  --c-senmon: #56408C;  --c-senmon-bg: #ECE6F6;
  --c-iryou:  #16625B;  --c-iryou-bg:  #DCF0EC;
  --c-ryouiku:#734C00;  --c-ryouiku-bg:#FBEBC6;
  --c-houmon: #932E43;  --c-houmon-bg: #FBE2E5;
  --c-oya:    #3A6620;  --c-oya-bg:    #E4F1D9;

  /* 専門職 5色（濃い塗り＋白文字。言語訓練は枠線だけ） */
  --c-pt: #C4532B;
  --c-ot: #9A6A00;
  --c-st: #1F7F72;
  --c-lt: #2A6E83;
  --c-cp: #6B4FA0;
  --c-brand: var(--brand-deep);
  --pro-ink: #FFFFFF;

  /* 形 */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --radius: var(--r-lg);
  --sh-1: 0 1px 2px rgba(74, 52, 24, .06), 0 2px 10px rgba(74, 52, 24, .05);
  --sh-2: 0 8px 28px rgba(74, 52, 24, .12);
  --shadow: var(--sh-1);

  /* 文字 */
  --f-display: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", sans-serif;
  --f-body: "BIZ UDPGothic", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  --font: var(--f-body);
}

:root[data-theme="dark"] {
  --bg: #1B1916; --surface: #25221E; --sunken: #2F2B26; --line: #3B362F; --line-strong: #524B42;
  --ink: #F3EDE4; --ink-2: #D2C9BC; --ink-3: #AFA597;
  --brand: #74C39E; --brand-ink: #0F2419; --brand-soft: #1E3429; --brand-deep: #9DDABB;
  --sun: #F2C25B; --sun-soft: #3A3121; --focus: #8AB4F8;
  --warn-bg: #3A2616; --warn-line: #A8622A; --warn-ink: #FFCB9E;
  --check-bg: #2F2B26; --check-line: #6E665B; --check-ink: #D2C9BC;
  --c-soudan: #A9C6EE; --c-soudan-bg: #1F2E44;
  --c-senmon: #CDBDF0; --c-senmon-bg: #2D2640;
  --c-iryou:  #93D6CB; --c-iryou-bg:  #173532;
  --c-ryouiku:#EBC870; --c-ryouiku-bg:#3A2F14;
  --c-houmon: #F2A9B8; --c-houmon-bg: #40222A;
  --c-oya:    #AFD78F; --c-oya-bg:    #24361A;
  --c-pt: #F0A07F; --c-ot: #E4BE62; --c-st: #6FC8B9; --c-lt: #86BCD0; --c-cp: #BBA5E6;
  --pro-ink: #1B1916;
  --sh-1: 0 1px 2px rgba(0, 0, 0, .3);
  --sh-2: 0 8px 28px rgba(0, 0, 0, .4);
}

/* ---------- 基本 ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 15.5px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
}
a { color: var(--brand-deep); text-underline-offset: .18em; }
a:hover { color: var(--ink); }
h1, h2, h3 { line-height: 1.45; margin: 0 0 .5em; }
h1, h2 { font-family: var(--f-display); font-weight: 700; }
h2 { font-size: 1.3rem; }
p { margin: 0 0 .75em; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

svg.i {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- ヘッダー ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}
.site-header .wrap { display: flex; flex-direction: column; position: relative; }

/* 配色の切り替えボタン（js/theme.js が差し込む）。基本は明るい配色 */
:root { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
.theme-toggle {
  position: absolute; top: 10px; right: 16px; /* .wrap の左右余白と同じ */
  display: inline-flex; align-items: center; gap: 5px;
  min-height: 36px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink-2);
  font: inherit; font-size: .78rem; font-weight: 700; cursor: pointer;
}
.theme-toggle:hover { border-color: var(--brand); color: var(--brand-deep); }
.theme-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle svg path:only-child { fill: currentColor; stroke: none; }
.brand {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 56px; align-self: flex-start;
  text-decoration: none; color: var(--ink);
}
.brand-mark { width: 32px; height: 32px; flex: none; display: block; }
.brand-mark svg { width: 100%; height: 100%; display: block; }
.brand-name { font-family: var(--f-display); font-size: 1.25rem; font-weight: 700; letter-spacing: .02em; }
.tagline { color: var(--ink-3); margin: -6px 0 6px; font-size: .82rem; line-height: 1.6; }
.site-nav { display: flex; margin: 0 -10px; }
.site-nav a {
  flex: 1 1 0;
  display: flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 2px;
  text-decoration: none; white-space: nowrap;
  color: var(--ink-2); font-size: .84rem; font-weight: 700;
  border-bottom: 3px solid transparent;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--brand-deep); border-bottom-color: var(--brand); }

@media (min-width: 900px) {
  .site-header .wrap { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 20px; min-height: 72px; }
  /* 切り替えボタンをメニューと同じ行に置く（折り返さず、キャッチコピーを縮める） */
  .site-header .wrap { flex-wrap: nowrap; }
  .tagline { min-width: 0; }
  .site-nav { flex: none; }
  .theme-toggle { position: static; order: 99; flex: none; }
  .brand-mark { width: 38px; height: 38px; }
  .brand-name { font-size: 1.45rem; }
  .tagline { margin: 0; flex: 1 1 260px; font-size: .84rem; }
  .site-nav { margin: 0; gap: 2px; }
  .site-nav a {
    flex: none; min-height: 44px; padding: 0 14px; border-radius: 999px; border-bottom: 0; font-size: .92rem;
  }
  .site-nav a[aria-current="page"] { background: var(--brand-soft); }
}

/* ---------- トップの導入 ---------- */
.hero {
  background: var(--sun-soft);
  margin: -4px 0 0;
  padding: 22px 0 20px;
}
.hero-count {
  display: inline-flex; align-items: center; height: 26px; padding: 0 11px;
  border-radius: 999px; background: var(--surface);
  font-size: .78rem; font-weight: 700; color: var(--brand-deep);
  margin-bottom: 10px;
}
.hero h1 { font-size: 1.6rem; line-height: 1.4; margin: 0 0 8px; }
.hero p { color: var(--ink-2); margin: 0; font-size: .95rem; }
@media (min-width: 900px) {
  .hero { padding: 44px 0 36px; }
  .hero h1 { font-size: 2.2rem; }
  .hero p { font-size: 1.02rem; max-width: 720px; }
}

/* ---------- セクション共通 ---------- */
.guide, .concerns-teaser, .columns, .home-areas { margin: 30px 0 8px; }
.results-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin-bottom: 8px;
}
.results-head h2 { margin: 0; }
.more { font-size: .9rem; font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; }
.more svg.i { width: 16px; height: 16px; }
.guide-lead { color: var(--ink-3); font-size: .9rem; margin-bottom: 12px; line-height: 1.7; }

/* ---------- 入口カード ---------- */
.guide-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 640px) { .guide-grid { grid-template-columns: 1fr 1fr; gap: 10px; } }
@media (min-width: 1024px) { .guide-grid { grid-template-columns: repeat(3, 1fr); } }
.guide-card {
  display: grid;
  grid-template-columns: 44px 1fr 20px;
  grid-template-areas: "icon head chev" "icon sub chev";
  column-gap: 12px; align-items: center;
  width: 100%; min-height: 68px;
  text-align: left;
  padding: 10px 12px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color .12s ease, background-color .12s ease;
}
.guide-card:hover { border-color: var(--line-strong); }
.guide-card:active { transform: scale(.99); }
.guide-card.is-active { background: var(--brand-soft); border: 2px solid var(--brand); padding: 9px 11px; }
.guide-emoji { grid-area: icon; align-self: center; }
.guide-head { grid-area: head; font-weight: 700; font-size: .95rem; line-height: 1.5; align-self: end; }
.guide-sub  { grid-area: sub; color: var(--ink-3); font-size: .8rem; line-height: 1.55; margin-top: 2px; align-self: start; }
.guide-card::after {
  grid-area: chev; content: ""; width: 8px; height: 8px; justify-self: center;
  border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(-45deg);
}
.guide-card.is-active::after { border-color: var(--brand); width: 6px; height: 11px; transform: rotate(45deg); margin-top: -3px; }

.icon-tile {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 12px; flex: none;
  background: var(--sun-soft); color: var(--tone, var(--brand-deep));
}
.icon-tile svg.i { width: 24px; height: 24px; }
.icon-tile--lg { width: 52px; height: 52px; border-radius: 16px; }
.icon-tile--lg svg.i { width: 28px; height: 28px; }
.icon-tile--sm { width: 28px; height: 28px; border-radius: 8px; }
.icon-tile--sm svg.i { width: 17px; height: 17px; }

/* ---------- 困りごと ---------- */
.concern-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.concern-chip {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 4px 14px 4px 6px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  text-decoration: none; color: var(--ink);
  font-size: .88rem; line-height: 1.45;
}
.concern-chip:hover { border-color: var(--brand); color: var(--ink); }
.concern-chip .icon-tile { background: transparent; }

.concern-intro { color: var(--ink-2); margin-bottom: 14px; }
.concern-list { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 10px; }
@media (min-width: 640px) { .concern-list { grid-template-columns: 1fr 1fr; } }
.concern-link {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "emoji title" "emoji lead";
  column-gap: 12px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  text-decoration: none; color: var(--ink);
  height: 100%;
}
.concern-link:hover { border-color: var(--line-strong); color: var(--ink); }
.concern-emoji { grid-area: emoji; }
.concern-title { grid-area: title; font-weight: 700; line-height: 1.5; }
.concern-lead { grid-area: lead; color: var(--ink-3); font-size: .86rem; margin-top: 4px; line-height: 1.7; }

.concern-article {
  max-width: 820px;
  margin: 0 auto;
  line-height: 1.85;
}
.concern-article h1 { font-size: 1.55rem; margin: 10px 0 8px; display: flex; align-items: center; gap: 12px; }
.concern-article h2, .static-page h2 { font-size: 1.28rem; margin: 2em 0 .6em; }
.concern-lead-big { font-size: 1rem; color: var(--ink-2); }
.signs { list-style: none; padding: 0; margin: 0 0 .8em; display: grid; gap: 8px; }
.signs li {
  display: flex; gap: 10px; align-items: baseline;
  padding: 11px 14px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--line);
  font-size: .95rem; line-height: 1.7;
}
.signs li::before {
  content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%;
  border: 2px solid var(--c-st); transform: translateY(-1px);
}
.play {
  list-style: none; margin: 0 0 .8em; padding: 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  display: grid; gap: 10px;
}
.play li { padding-left: 1.1em; position: relative; }
.play li::before { content: ""; position: absolute; left: 0; top: .72em; width: 6px; height: 6px; border-radius: 50%; background: var(--sun); }

/* ---------- 補足・注意 ---------- */
.note {
  font-size: .88rem; line-height: 1.8; color: var(--ink-2);
  background: var(--sunken); padding: 11px 14px; border-radius: var(--r-md);
}
.pr-notice {
  font-size: .8rem; line-height: 1.7;
  color: var(--ink-2);
  background: var(--sunken);
  padding: 9px 12px;
  border-radius: 10px;
  margin: 0 0 12px;
}
.pr-notice::before {
  content: "PR"; display: inline-block; margin-right: 8px; padding: 0 6px;
  border: 1px solid var(--ink-3); border-radius: 4px;
  font-size: .72rem; font-weight: 700; line-height: 1.5; color: var(--ink-2);
}

/* ---------- ボタン ---------- */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 50px; padding: 10px 20px;
  border-radius: var(--r-md);
  background: var(--brand); color: var(--brand-ink);
  font-weight: 700; text-decoration: none; line-height: 1.5;
}
.btn-primary:hover { color: var(--brand-ink); filter: brightness(.94); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 8px 16px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--line-strong);
  background: var(--surface); color: var(--ink);
  font-weight: 700; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--brand); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--brand-deep); text-decoration: underline; text-underline-offset: .18em; }
.btn-ghost:hover { color: var(--ink); border-color: transparent; }
.others-title { font-size: 1.2rem; margin-top: 1.5em; }

/* ---------- 検索（トップ） ---------- */
.finder { margin-top: 30px; }
@media (min-width: 1024px) {
  .finder { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 28px; align-items: start; }
  .finder .search { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; margin: 0; }
}
.search {
  margin: 0 0 22px;
  padding: 18px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
}
.search > h2 { display: flex; align-items: center; gap: 8px; font-size: 1.25rem; }
.search > h2 svg.i { width: 24px; height: 24px; color: var(--brand); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.field-row--single { grid-template-columns: 1fr; }
.field-row--inline { grid-template-columns: 1fr; align-items: end; margin-bottom: 0; }
.field { display: block; min-width: 0; }
.field-label {
  display: block;
  font-size: .8rem; font-weight: 700; line-height: 1.6;
  color: var(--ink-2);
  margin-bottom: 6px;
}
select, input[type="search"] {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font-size: 15px;
}
select:disabled { opacity: .55; }

.chips { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
.chips legend { padding: 0; }
.chip-wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  position: relative;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 6px 13px;
  border-radius: 999px;
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  cursor: pointer; user-select: none;
  font-size: .88rem; font-weight: 700; line-height: 1.4;
}
.chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--dot); flex: none; }
.chip:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.chip:has(input:checked) { background: var(--dot); border-color: var(--dot); color: var(--pro-ink); }
.chip:has(input:checked) .dot { background: var(--pro-ink); }
.chip:has(input:checked) .chip-sub, .chip:has(input:checked) .chip-n { color: inherit; background: transparent; opacity: .95; }
#cats .chip:has(input:checked) { background: var(--dot-bg, var(--sunken)); border-color: var(--dot); color: var(--dot); }
#cats .chip:has(input:checked) .dot { background: var(--dot); }
.chip--lt { border-style: dashed; }
.chip--lt .dot { background: transparent; border: 2px solid var(--dot); }
.chip-sub { font-size: .74rem; color: var(--ink-3); font-weight: 400; }
.chip-n { font-size: .72rem; color: var(--ink-3); font-weight: 400; white-space: nowrap; }
/* 幅の狭いスマホでは、件数つきの選択肢が切れないよう1列に */
@media (max-width: 479px) {
  .field-row { grid-template-columns: 1fr; }
}

/* 種類・年齢・費用などはスマホでは折りたたむ */
.search-more { margin-top: 2px; }
.search-more > summary {
  list-style: none;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 8px 14px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--line-strong);
  background: var(--sunken);
  font-weight: 700; font-size: .92rem; cursor: pointer;
}
.search-more > summary::-webkit-details-marker { display: none; }
.search-more > summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.search-more[open] > summary { margin-bottom: 16px; }
.more-n {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  background: var(--brand); color: var(--brand-ink); font-size: .75rem;
}
.more-n[hidden] { display: none; }
@media (min-width: 1024px) {
  .search-more > summary { display: none; }
}

.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: .95rem; min-height: 44px; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); }

/* ---------- 結果 ---------- */
.results { margin-bottom: 40px; min-width: 0; }
.results-head h2 { font-size: 1.25rem; }
.count { color: var(--ink-2); font-size: .9rem; margin: 0; }
.count strong { font-family: var(--f-display); font-size: 1.7rem; color: var(--ink); margin-right: 2px; }

.fallback {
  display: flex; flex-direction: column; gap: 6px;
  padding: 13px 14px 13px 44px;
  margin-bottom: 14px;
  border-radius: var(--r-md);
  background: var(--sun-soft);
  border: 1px solid var(--sun);
  font-size: .9rem; line-height: 1.75;
  position: relative;
}
.fallback[hidden] { display: none; }
.fallback::before {
  content: ""; position: absolute; left: 14px; top: 15px; width: 20px; height: 20px;
  background: var(--c-ryouiku);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5M12 8h.01'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5M12 8h.01'/%3E%3C/svg%3E") center / contain no-repeat;
}
.fallback p { margin: 0; }
.fallback .lt-add { border-color: var(--c-lt); color: var(--c-lt); border-radius: 999px; }

/* ---------- 施設カード ---------- */
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
@media (min-width: 760px) { .list { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
.more-row, .list > .empty { grid-column: 1 / -1; }
.card {
  position: relative;
  display: flex; flex-direction: column; gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  padding: 16px;
  min-width: 0;
}
.card > * { margin: 0; }
.card-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 10px;
  border-radius: 999px;
  font-size: .74rem; font-weight: 700; line-height: 1;
  color: var(--cat); background: var(--cat-bg, var(--sunken));
}
.badge:not(.badge--warn):not(.badge--ask)::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--warn { color: var(--check-ink); background: var(--check-bg); border: 1px dashed var(--check-line); }
.badge--ask  { color: var(--warn-ink);  background: var(--warn-bg);  border: 1px solid var(--warn-line); }
.card-area { color: var(--ink-3); font-size: .76rem; }
.card h3 { font-size: 1.08rem; line-height: 1.45; margin: 0; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.ask-notice {
  display: flex; gap: 8px;
  font-size: .86rem; line-height: 1.7;
  margin: 0 0 8px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  color: var(--warn-ink);
}
.ask-notice svg.i { margin-top: 2px; }
.card .ask-notice { margin: 0; }
.card-note { font-size: .9rem; line-height: 1.75; color: var(--ink-2); }
.card-addr, .card-hours {
  display: flex; gap: 6px; align-items: flex-start;
  color: var(--ink-3); font-size: .8rem; line-height: 1.6;
}
.card-addr svg.i, .card-hours svg.i { width: 15px; height: 15px; margin-top: 3px; }
.card-addr a { font-weight: 700; white-space: nowrap; }
.card-info { display: flex; flex-direction: column; gap: 2px; }
.meta { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: .8rem; line-height: 1.6; color: var(--ink-3); padding-left: 21px; }
.meta span::before { content: "・"; margin-right: 2px; opacity: .6; }
.meta span:first-child::before { content: ""; margin: 0; }

/* 専門職バッジ */
.staff-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .76rem; color: var(--ink-3); }
.staff-row > span:first-child { margin-right: 2px; }
.staff-badge {
  display: inline-flex; align-items: baseline; gap: 4px;
  height: 26px; line-height: 22px; padding: 0 8px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--sb, var(--ink-3));
  background: var(--sb, var(--ink-3)); color: var(--pro-ink);
  font-size: .8rem; font-weight: 700; letter-spacing: .02em;
  white-space: nowrap;
}
.staff-badge small { font-size: .7rem; font-weight: 400; letter-spacing: 0; }
.staff-badge--lt { background: var(--surface); color: var(--sb); }
.staff-note { font-size: .8rem; color: var(--ink-3); line-height: 1.7; }

/* 操作 */
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.action {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px; padding: 6px 14px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  text-decoration: none; color: var(--ink);
  font-size: .86rem; font-weight: 700; white-space: nowrap;
}
.action svg.i { width: 17px; height: 17px; }
.action:hover { border-color: var(--brand); color: var(--ink); }
.action--tel {
  flex: 1 0 100%;
  min-height: 52px;
  background: var(--brand); border-color: var(--brand); color: var(--brand-ink);
  font-size: 1.05rem; letter-spacing: .02em;
  white-space: pre-line; text-align: center; line-height: 1.4; /* 番号が2つある施設は折り返す */
}
.action--tel svg.i { width: 20px; height: 20px; }
.action--tel:hover { color: var(--brand-ink); filter: brightness(.94); }
.actions .action:not(.action--tel) { flex: 1 1 0; padding: 6px 8px; }

.more-row { list-style: none; text-align: center; padding: 6px 0 4px; }
.more-btn { min-width: min(100%, 360px); min-height: 52px; border-color: var(--brand); color: var(--brand-deep); }

.empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
}

/* ---------- 都道府県グリッド・リンク集 ---------- */
.pref-grid, .link-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pref-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 6px; }
.link-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.pref-grid a, .link-grid a {
  display: flex; justify-content: space-between; align-items: center; gap: 6px;
  padding: 8px 14px; min-height: 48px; height: 100%;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  text-decoration: none; color: var(--ink); font-size: .92rem; font-weight: 700; line-height: 1.5;
}
.pref-grid a { justify-content: center; min-height: 46px; padding: 6px 8px; background: var(--surface); }
.pref-grid a:has(.n) { justify-content: space-between; }
.pref-grid a:hover, .link-grid a:hover { border-color: var(--brand); color: var(--ink); }
.pref-grid .n, .link-grid .n { font-size: .74rem; font-weight: 400; color: var(--ink-3); white-space: nowrap; }
.link-grid .icon-tile { background: transparent; margin: -6px 0 -6px -8px; }
.link-grid a:has(.icon-tile) { justify-content: flex-start; }

/* ---------- 静的ページ（地域・施設・困りごと） ---------- */
.static-page { padding-bottom: 40px; }
.crumbs { font-size: .78rem; color: var(--ink-3); margin: 14px 0 8px; line-height: 1.7; }
.crumbs a { color: var(--ink-3); }
.static-h1 { font-size: 1.55rem; line-height: 1.45; margin: 6px 0 10px; display: flex; align-items: center; gap: 12px; }
.static-lead { color: var(--ink-2); margin-bottom: 18px; font-size: .96rem; }
.static-page h2:first-of-type { margin-top: 1.4em; }
.app-link { margin: 22px 0 0; }
.static-page > .staff-row { margin: 0 0 12px; }
.fac-note { font-size: 1rem; line-height: 1.85; color: var(--ink-2); }

.fac-actions {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  padding: 14px; margin: 4px 0 18px;
  border-radius: var(--r-lg); background: var(--brand-soft);
}
.fac-actions .action { width: 100%; }
.fac-actions .action--tel { grid-column: 1 / -1; font-size: 1.12rem; min-height: 54px; }
.fac-actions .action:only-child { grid-column: 1 / -1; }

.fac-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  margin: 10px 0 8px; font-size: .92rem;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
}
.fac-table th, .fac-table td { padding: 11px 14px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); line-height: 1.7; }
.fac-table tr:first-child th, .fac-table tr:first-child td { border-top: 0; }
.fac-table th { width: 7.5em; color: var(--ink-3); font-weight: 700; font-size: .82rem; }
.fac-table td { word-break: break-all; }
.fac-table tr:last-child { background: var(--sunken); }

.near-list {
  list-style: none; padding: 0; margin: 0 0 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
}
.near-list li { border-top: 1px solid var(--line); padding: 10px 14px; display: flex; flex-direction: column; line-height: 1.55; }
.near-list li:first-child { border-top: 0; }
.near-list a { font-weight: 700; text-decoration: none; }
.near-list a:hover { text-decoration: underline; }
.near-cat { font-size: .76rem; color: var(--ink-3); }

/* ---------- 専門職 ---------- */
.staff-links { display: grid; gap: 8px; }
.staff-link {
  display: grid; grid-template-columns: auto 1fr; grid-template-areas: "b name" "b area"; column-gap: 12px;
  align-items: center;
  padding: 12px 14px; min-height: 64px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); text-decoration: none; color: var(--ink);
}
.staff-link:hover { border-color: var(--sb); color: var(--ink); }
.staff-link .staff-badge { grid-area: b; align-self: start; margin-top: 2px; min-width: 56px; justify-content: center; }
.staff-link-name { grid-area: name; font-weight: 700; font-size: .95rem; }
.staff-link-area { grid-area: area; font-size: .82rem; color: var(--ink-3); line-height: 1.7; }

.doc h2 { font-size: 1.28rem; }
.doc h3 { font-size: 1.1rem; margin: 0 0 .2em; display: flex; align-items: center; gap: 10px; }
.pro-grid { display: grid; gap: 12px; margin: 12px 0 6px; }
@media (min-width: 640px) { .pro-grid { grid-template-columns: 1fr 1fr; } }
.pro-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px 16px 16px;
  background: var(--surface);
  box-shadow: var(--sh-1);
}
.pro-card p { margin: 0 0 .7em; font-size: .93rem; line-height: 1.8; }
.pro-card p:last-child { margin: auto 0 0; }
.pro-card .btn-primary { width: 100%; background: var(--surface); color: var(--pro); border: 1.5px solid var(--pro); min-height: 48px; }
.pro-card .btn-primary:hover { filter: none; background: var(--sunken); }
.pro-tag {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; height: 44px; padding: 0 6px; border-radius: 12px;
  background: var(--pro); color: var(--pro-ink);
  font-family: var(--f-display); font-size: .95rem; font-weight: 700;
}
.pro-area { font-weight: 700; color: var(--pro); font-size: .88rem; }
.pro-how { color: var(--ink-2); font-size: .85rem !important; padding: 10px 12px; border-radius: 10px; background: var(--sunken); }
.role-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  font-size: .88rem; margin: 10px 0 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
}
.role-table th, .role-table td { padding: 10px 11px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); border-left: 1px solid var(--line); line-height: 1.7; }
.role-table tr > :first-child { border-left: 0; }
.role-table thead th { border-top: 0; background: var(--sunken); font-size: .78rem; color: var(--ink-3); }
.role-table td[rowspan] { color: var(--ink-3); font-size: .82rem; }
.role-table .staff-badge { margin: 1px 2px 1px 0; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.routes { list-style: none; padding: 0; margin: 0 0 16px; counter-reset: route; display: grid; gap: 12px; }
.routes li { counter-increment: route; position: relative; padding-left: 44px; line-height: 1.8; }
.routes li::before {
  content: counter(route);
  position: absolute; left: 0; top: 0;
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--sun); color: #2E2A25;
  font-family: var(--f-display); font-weight: 700;
}

/* ---------- 広告カード ---------- */
.ad-list { display: grid; gap: 12px; }
.ad-card {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px;
  background: var(--surface);
}
.ad-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.pr {
  flex: none;
  font-size: .7rem; font-weight: 700; letter-spacing: .05em; line-height: 1.5;
  padding: 1px 6px; border-radius: 4px;
  background: transparent; color: var(--ink-2);
  border: 1px solid var(--ink-3);
}
.ad-name { font-weight: 700; font-size: .98rem; line-height: 1.5; }
.ad-why { font-size: .9rem; margin: 0 0 6px; color: var(--ink-2); }
.ad-caveat { font-size: .82rem; color: var(--ink-3); margin: 0 0 6px; }
.ad-link { margin: 4px 0 0; font-size: .92rem; }
.ad-link a { font-weight: 700; display: inline-flex; min-height: 44px; align-items: center; }
.ad-banner { margin-top: 12px; text-align: center; }
.ad-banner img { max-width: 100%; height: auto; border-radius: 12px; }
.ad-banner img[width="1"], .ad-link img[width="1"] { border-radius: 0; }

/* ---------- コラム ---------- */
.column-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.col-link {
  display: block;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  text-decoration: none; color: var(--ink);
}
.col-link:hover { border-color: var(--line-strong); color: var(--ink); }
.col-date { display: block; font-size: .78rem; color: var(--ink-3); }
.col-title { display: block; font-weight: 700; font-size: 1.02rem; line-height: 1.5; margin: 2px 0 4px; }
.col-summary { display: block; font-size: .88rem; color: var(--ink-2); }
.col-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.col-tag { font-size: .74rem; padding: 1px 9px; border-radius: 999px; background: var(--sunken); color: var(--ink-2); }

.col-root { margin: 14px 0 40px; }
.col-root > h1 { font-size: 1.55rem; margin: 10px 0 14px; }
.col-article {
  max-width: 760px; margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px 18px 18px;
}
.col-article h1 { font-size: 1.45rem; margin: 2px 0 8px; }
.col-body { margin-top: 16px; font-size: 1rem; line-height: 1.95; }
.col-body h2 { font-size: 1.2rem; margin: 1.8em 0 .5em; }
.col-body h3 { font-size: 1.02rem; margin: 1.4em 0 .4em; color: var(--brand-deep); }
.col-body p { margin: 0 0 1em; }
.col-body ul { padding-left: 1.3em; margin: 0 0 1em; }
.col-body blockquote {
  margin: 0 0 1em; padding: 10px 14px;
  background: var(--sunken);
  border-radius: var(--r-md);
  color: var(--ink-2);
}
.col-back { margin-top: 24px; font-size: .92rem; }

/* ---------- フッター ---------- */
.site-footer {
  margin-top: 24px;
  background: var(--sunken);
  border-top: 1px solid var(--line);
  padding: 24px 0 40px;
  color: var(--ink-2);
  font-size: .82rem; line-height: 1.85;
}
.site-footer strong { color: var(--ink); margin-right: .5em; }
.site-footer .small { font-size: .78rem; }
.site-footer .small a { display: inline-block; padding: 6px 0; }

/* ---------- 発達検査の種類ページ（/kensa） ---------- */
.kensa-table { min-width: 560px; font-size: .86rem; }
.kensa-table td:first-child { white-space: nowrap; font-weight: 700; }
.kensa-card {
  margin: 14px 0 18px; padding: 14px 14px 4px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card, 14px);
  scroll-margin-top: 12px;
}
.kensa-card h3 { margin: 0 0 6px; font-size: 1.02rem; }
.kensa-card .fac-table th { width: 8.5em; }
.kensa-card .staff-badge { text-decoration: none; margin-right: 4px; }

/* ---------- 困りごとの写真カード（トップ・困りごと一覧） ---------- */
.concern-photos {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
@media (min-width: 900px) { .concern-photos { grid-template-columns: repeat(4, 1fr); gap: 14px; } }
.concern-photo-item { display: flex; }
.concern-photo {
  display: flex; flex-direction: column; width: 100%;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; text-decoration: none; color: var(--ink);
  box-shadow: var(--sh-1, none);
  transition: border-color .15s, transform .15s;
}
.concern-photo:hover { border-color: var(--brand); transform: translateY(-2px); }
.concern-photo:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.concern-photo img {
  display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover;
  background: var(--sunken);
}
.concern-photo-noimg { display: grid; place-items: center; aspect-ratio: 3 / 2; background: var(--sunken); }
.concern-photo-body { display: flex; flex-direction: column; gap: 4px; padding: 10px 11px 12px; }
.concern-photo .concern-title { font-weight: 700; font-size: .9rem; line-height: 1.45; }
.concern-photo .concern-lead {
  font-size: .78rem; line-height: 1.6; color: var(--ink-3);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
/* 困りごとページの見出し写真 */
.concern-hero {
  display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover;
  border-radius: 14px; margin: 4px 0 14px; background: var(--sunken);
}
@media (min-width: 900px) { .concern-hero { aspect-ratio: 2 / 1; } }
