:root {
  --accent: #0A7F8C;
  --accent-dark: #065E68;
  --highlight: #FFC93C;
  --ink: #1C2321;
  --muted: #5E6762;
  --body: #4A534F;
  --bg: #FFFDF7;
  --card: #FFFFFF;
  --line: #E2E5DE;
  --tint: #DDF4F6;
  --font-head: 'Zen Kaku Gothic New', sans-serif;
  --font-body: 'Noto Sans JP', system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
button, input, select { font-family: inherit; }
.wrap { max-width: 1200px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
h1, h2, h3, p { margin: 0; }
h2.section-title { font-family: var(--font-head); font-weight: 900; font-size: 30px; }

/* Header */
.site-header { background: var(--card); border-bottom: 1px solid var(--line); }
.site-header .wrap { padding-top: 14px; padding-bottom: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--accent); display: flex; align-items: center; justify-content: center; }
.brand-name { font-family: var(--font-head); font-weight: 900; font-size: 22px; letter-spacing: .02em; }
.brand-shisa { width: 46px; height: 48px; object-fit: contain; margin-left: -2px; }
.main-nav { display: flex; flex-wrap: wrap; gap: 4px 24px; flex: 1 1 auto; font-size: 15px; font-weight: 500; }
.main-nav a { text-decoration: none; padding: 10px 0; color: var(--ink); }
.header-actions { display: flex; gap: 8px; }
.btn-pill { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid #C9CEC4; text-decoration: none; color: var(--ink); font-size: 14px; font-weight: 500; }
.btn-pill:hover { color: var(--ink); }
.btn-pill.primary { padding: 0 18px; background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.btn-pill.primary:hover { color: #fff; background: var(--accent-dark); }
.header-search { flex: 1 1 240px; max-width: 420px; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid #C9CEC4; border-radius: 999px; background: #fff; }
.header-search input { flex: 1; border: 0; outline: none; font-size: 14px; background: transparent; min-height: 40px; }

/* Hero */
.hero { background: var(--tint); border-bottom: 6px solid var(--highlight); }
.hero .wrap { padding-top: 64px; padding-bottom: 72px; display: flex; flex-wrap: wrap; gap: 40px; align-items: center; }
.hero-board-wrap { flex: 999 1 560px; min-width: 0; position: relative; padding: 0 40px 60px 0; }
.chalkboard { position: relative; background: #2A4438 url('../assets/chalkboard.jpg') center / cover; border: 14px solid #B8743A; border-radius: 18px; box-shadow: inset 0 0 0 3px #8E5526, inset 0 6px 24px rgba(0,0,0,.35), 0 10px 24px rgba(120,70,20,.22); padding: 44px 48px 72px; display: flex; flex-direction: column; gap: 20px; }
.chalk { font-family: 'Yomogi', cursive; color: #FBF8EE; text-shadow: 0 0 1px rgba(255,255,255,.9), 0 0 6px rgba(255,255,255,.25), 1px 1px 0 rgba(255,255,255,.15); }
.chalk-title { margin: 0; font-family: var(--font-head); font-weight: 700; font-size: 52px; line-height: 1.4; letter-spacing: .05em; color: #FBF8EE; background-image: url('../assets/chalk-texture.png'); background-size: 400px 200px; background-repeat: repeat; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 0 1px rgba(255,255,255,.35)) drop-shadow(0 0 5px rgba(255,255,255,.12)); }
.chalk-badge { align-self: flex-start; padding: 4px 14px; border: 2px dashed rgba(251,248,238,.75); border-radius: 999px; font-size: 17px; color: #FFE7A0; }
.chalk-lead { font-size: 20px; line-height: 1.85; max-width: 420px; }
.chalk-tags { display: flex; flex-wrap: wrap; gap: 10px; max-width: 400px; }
.chalk-tags span { padding: 4px 12px; border: 2px solid rgba(251,248,238,.7); border-radius: 8px; font-size: 16px; }
.chalk-tags .pref { border-color: rgba(255,231,160,.8); color: #FFE7A0; }
.chalk-tags .city { border-color: rgba(160,230,236,.8); color: #BDF0F4; }
.chalk-tray { position: absolute; left: 32px; bottom: -14px; width: 180px; height: 10px; background: #8E5526; border-radius: 3px 3px 0 0; display: flex; gap: 10px; align-items: flex-end; padding: 0 12px; }
.chalk-tray span { width: 34px; height: 7px; background: #FBF8EE; border-radius: 2px; margin-bottom: 8px; }
.chalk-tray span + span { width: 24px; background: #FFD66B; }
.hero-shisa { position: absolute; right: -8px; bottom: 0; width: 250px; height: 236px; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0,0,0,.25)); }

.search-card { flex: 1 1 400px; min-width: 0; background: #fff; border-radius: 24px; padding: 28px; display: flex; flex-direction: column; gap: 18px; box-shadow: 0 10px 30px rgba(10,127,140,.16); }
.search-card .card-title { font-family: var(--font-head); font-weight: 700; font-size: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field > .label { font-size: 13px; font-weight: 700; color: var(--body); }
.field select, .field input { min-height: 48px; border: 1px solid #C9CEC4; border-radius: 10px; padding: 0 14px; font-size: 15px; background: #fff; }
.field select { border-color: #BFD9DC; padding: 0 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 0 14px; border-radius: 999px; font-size: 14px; font-weight: 500; cursor: pointer; background: #fff; color: var(--ink); border: 1px solid #C9CEC4; }
.chip[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-search { min-height: 52px; border: 0; border-radius: 12px; background: var(--highlight); color: var(--ink); font-size: 16px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; }

/* Categories */
.section { padding-top: 48px; padding-bottom: 48px; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 24px; }
.section-head .sub { font-size: 14px; color: var(--muted); margin-top: 6px; }
.section-head a { font-size: 14px; font-weight: 700; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.cat-card { display: flex; align-items: center; gap: 16px; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: 16px; text-decoration: none; color: var(--ink); }
.cat-card:hover { color: var(--ink); border-color: var(--accent); }
.cat-icon { width: 52px; height: 52px; flex: none; border-radius: 14px; background: var(--tint); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.cat-name { display: block; font-weight: 700; font-size: 16px; }
.cat-sub { display: block; font-size: 13px; color: var(--muted); margin-top: 4px; }

/* Subsidy cards */
.scope-tabs { display: flex; gap: 4px; background: #E9ECE5; border-radius: 999px; padding: 4px; }
.scope-tab { min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; font-size: 14px; font-weight: 700; cursor: pointer; background: transparent; color: var(--body); }
.scope-tab[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.sub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.sub-card { display: flex; flex-direction: column; gap: 14px; padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: 16px; text-decoration: none; color: var(--ink); }
.sub-card:hover { color: var(--ink); border-color: var(--accent); }
.sub-card[hidden], .more-wrap[hidden] { display: none; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: #F0F1EC; color: #3F4743; }
.tag.scope { background: var(--tint); color: var(--accent); }
.tag.urgent { background: #FCE8D8; color: #9A4310; }
.sub-title { font-weight: 700; font-size: 18px; line-height: 1.5; }
.sub-desc { font-size: 14px; color: var(--body); line-height: 1.7; }
.sub-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding-top: 14px; border-top: 1px dashed #D6DAD2; }
.meta-label { display: block; font-size: 12px; color: var(--muted); }
.meta-val { display: block; font-weight: 700; font-size: 18px; margin-top: 2px; }
.meta-val.accent { color: var(--accent); }
.more-wrap { display: flex; justify-content: center; margin-top: 28px; }
.btn-outline { display: inline-flex; align-items: center; min-height: 48px; padding: 0 28px; border-radius: 999px; border: 1.5px solid var(--ink); text-decoration: none; color: var(--ink); font-weight: 700; font-size: 15px; }
.btn-outline:hover { color: var(--ink); }

/* Diagnosis */
.diag { background: #FFF3CC; border-radius: 28px; padding: 48px; display: flex; flex-wrap: wrap; gap: 32px; align-items: center; }
.diag-copy { flex: 999 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.diag-badge { align-self: flex-start; padding: 4px 12px; border-radius: 999px; background: #fff; font-size: 14px; font-weight: 700; color: #A3530A; }
.diag h2 { font-family: var(--font-head); font-weight: 900; font-size: 34px; line-height: 1.35; }
.diag p.lead { font-size: 15px; line-height: 1.8; color: #4A4436; }
.diag-steps { flex: 1 1 360px; display: flex; flex-direction: column; gap: 10px; }
.diag-step { display: flex; align-items: center; gap: 14px; padding: 14px 18px; background: #fff; border-radius: 14px; font-size: 15px; }
.num { width: 32px; height: 32px; flex: none; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; border-radius: 12px; background: var(--accent); color: #fff; text-decoration: none; font-weight: 700; font-size: 16px; }
.btn-primary:hover { color: #fff; background: var(--accent-dark); }
.diag .btn-primary { margin-top: 6px; border-radius: 14px; }

/* Articles + notify */
.two-col { display: flex; flex-wrap: wrap; gap: 32px; padding-top: 24px; padding-bottom: 72px; }
.articles { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.article-list { background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.article { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 18px 22px; border-bottom: 1px solid #ECEEE8; text-decoration: none; color: var(--ink); }
.article:last-child { border-bottom: 0; }
.article:hover { color: var(--accent); }
.article time { font-size: 13px; color: var(--muted); width: 92px; }
.article .tag { border-radius: 6px; font-weight: 700; padding: 3px 10px; }
.article .title { flex: 1 1 280px; font-size: 15px; font-weight: 500; line-height: 1.6; }
.notify { flex: 1 1 320px; align-self: flex-start; background: #FFF6EC; border: 1px solid #F3DCC4; border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.notify h2 { font-family: var(--font-head); font-weight: 900; font-size: 22px; }
.notify p { font-size: 14px; line-height: 1.8; color: var(--body); }
.notify label { font-size: 13px; font-weight: 700; color: var(--body); }
.notify input { min-height: 48px; border: 1px solid #DCC7B0; border-radius: 10px; padding: 0 14px; font-size: 15px; background: #fff; }
.notify button { min-height: 48px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 700; font-size: 15px; cursor: pointer; }
.notify a { font-size: 14px; font-weight: 700; text-align: center; }

/* Footer */
.site-footer { background: #fff; border-top: 1px solid var(--line); }
.site-footer .wrap { padding-top: 40px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 20px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 14px; }
.footer-links a { text-decoration: none; }
.footer-note { font-size: 12px; line-height: 1.8; color: var(--muted); max-width: 800px; }

/* Detail page */
.breadcrumb { padding-top: 20px; display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); }
.breadcrumb a { text-decoration: none; }
.detail { padding-top: 24px; padding-bottom: 72px; display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.detail-main { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.detail-head { display: flex; flex-direction: column; gap: 14px; }
.detail-head h1 { font-family: var(--font-head); font-weight: 900; font-size: 38px; line-height: 1.35; }
.detail-head .byline { font-size: 13px; color: var(--muted); }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px; }
.fact-label { display: block; font-size: 12px; color: var(--muted); }
.fact-val { display: block; margin-top: 4px; font-weight: 700; font-size: 24px; }
.fact-val.accent { color: var(--accent); }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid #D6DAD2; }
.tab { min-height: 48px; padding: 0 18px; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px; background: transparent; font-size: 15px; font-weight: 700; cursor: pointer; color: var(--muted); }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.panel { display: flex; flex-direction: column; gap: 16px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
.panel[hidden] { display: none; }
.panel h2 { font-family: var(--font-head); font-size: 22px; font-weight: 700; }
.panel h3 { font-size: 17px; font-weight: 700; margin-top: 8px; }
.panel p { font-size: 15px; line-height: 1.9; }
.panel ul { margin: 0; padding-left: 20px; font-size: 15px; line-height: 2; }
.steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.steps li { display: flex; gap: 16px; align-items: flex-start; padding: 16px; background: var(--bg); border-radius: 12px; }
.step-title { display: block; font-weight: 700; font-size: 16px; }
.step-desc { display: block; margin-top: 4px; font-size: 14px; color: var(--body); line-height: 1.7; }
.panel .hint { font-size: 14px; color: var(--muted); line-height: 1.6; }
.doc-list { display: flex; flex-direction: column; gap: 8px; }
.doc-item { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 16px; background: var(--bg); border-radius: 10px; font-size: 15px; cursor: pointer; }
.doc-item input { width: 20px; height: 20px; accent-color: var(--accent); }
.doc-progress { font-size: 14px; font-weight: 700; }
.panel details { padding: 14px 0; border-bottom: 1px solid #ECEEE8; }
.panel details:last-child { border-bottom: 0; }
.panel summary { font-weight: 700; font-size: 15px; cursor: pointer; }
.panel details p { margin-top: 10px; font-size: 14px; line-height: 1.8; color: var(--body); }
.disclaimer { font-size: 12px; line-height: 1.8; color: var(--muted); }
.side { flex: 1 1 320px; display: flex; flex-direction: column; gap: 16px; }
.side-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.countdown-label { font-size: 13px; color: var(--muted); }
.countdown { font-family: var(--font-head); font-weight: 900; font-size: 36px; color: #9A4310; }
.side-card .btn-primary { min-height: 52px; }
.btn-save, .btn-notify { min-height: 48px; border-radius: 12px; font-weight: 700; font-size: 15px; cursor: pointer; background: #fff; border: 1px solid #C9CEC4; color: var(--ink); }
.btn-save[aria-pressed="true"] { background: #FFF6DA; border-color: #E8C55A; color: #6B5100; }
.side-card h2 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.side-link { padding: 12px 0; border-bottom: 1px solid #ECEEE8; font-size: 14px; font-weight: 500; text-decoration: none; color: var(--ink); }
.side-link:last-child { border-bottom: 0; }

/* Guide page (出産・子育て) */
.guide { padding-top: 24px; padding-bottom: 72px; display: flex; flex-direction: column; gap: 32px; }
.guide-lead { font-size: 16px; line-height: 1.9; color: var(--body); max-width: 760px; }
.guide .panel { scroll-margin-top: 16px; }
.table-scroll { overflow-x: auto; }
.info-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.info-table th, .info-table td { padding: 12px 14px; border-bottom: 1px solid #ECEEE8; text-align: left; vertical-align: top; line-height: 1.7; }
.info-table thead th { background: var(--bg); font-size: 13px; color: var(--muted); font-weight: 700; }
.info-table tbody th { font-weight: 700; white-space: nowrap; }
.callout { background: #FFF3CC; border-radius: 12px; padding: 14px 18px; font-size: 14px; line-height: 1.8; color: #4A4436; }

@media (max-width: 720px) {
  .chalkboard { padding: 28px 24px 60px; }
  .chalk-title { font-size: 36px; }
  .hero-board-wrap { padding-right: 0; }
  .hero-shisa { width: 160px; height: 150px; right: 0; }
  .diag { padding: 28px; }
  .facts { grid-template-columns: 1fr; }
  .detail-head h1 { font-size: 28px; }
  .scope-tabs { flex-wrap: wrap; }
}

/* 仕組みの解説ページ(ヘッダーのメニューからポップアップで開く) */
.howto { max-width: 560px; margin: 0 auto; padding: 28px 20px 40px; display: flex; flex-direction: column; gap: 20px; }
.howto-kicker { font-size: 13px; font-weight: 700; color: var(--accent); }
.howto h1 { font-family: var(--font-head); font-weight: 900; font-size: 26px; line-height: 1.4; }
.howto h2 { font-family: var(--font-head); font-weight: 700; font-size: 18px; line-height: 1.5; margin-top: 8px; }
.howto p, .howto li { font-size: 15px; line-height: 1.95; color: var(--body); }
.howto ul { margin: 0; padding-left: 1.2em; }
.howto-sources { font-size: 12px; line-height: 1.8; color: var(--muted); border-top: 1px dashed #D6DAD2; padding-top: 14px; }
.howto-sources ul { padding-left: 1.2em; }
.howto-sources li { font-size: 12px; line-height: 1.8; color: var(--muted); }
.howto-close { display: flex; justify-content: center; margin-top: 8px; }
.howto-close button { min-height: 48px; padding: 0 40px; border-radius: 999px; border: 1.5px solid var(--ink); background: #fff; color: var(--ink); font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; }
.howto-close button:hover { background: var(--ink); color: #fff; }

/* 補助金の検索結果(search.html) */
.search-layout { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
#search-results { flex: 999 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.search-layout .search-card { flex: 1 1 320px; border: 1px solid var(--line); box-shadow: none; }
.result-group h2 { display: flex; align-items: baseline; gap: 10px; }
.result-count { font-family: var(--font-body); font-size: 14px; font-weight: 700; color: var(--muted); }
.result-list { list-style: none; margin: 0; padding: 0; }
.result-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 12px 0; border-top: 1px dashed #D6DAD2; }
.result-list li:first-child { border-top: 0; }
.result-list a { font-weight: 700; font-size: 16px; line-height: 1.6; }
.result-status { font-size: 12px; font-weight: 700; color: #9A4310; background: #FCE8D8; border-radius: 999px; padding: 2px 10px; }
