:root {
  --bg: #ffffff;
  --surface: #f4f7fb;
  --surface-2: #e9eff7;
  --text: #16202e;
  --muted: #566274;
  --line: #dbe2ec;
  --brand: #14467f;
  --brand-2: #1b64bf;
  --brand-soft: #e6f0fc;
  --on-brand: #ffffff;
  --hi: #e6f0fc;
  --shadow: 0 1px 2px rgba(16, 32, 56, .06), 0 8px 24px rgba(16, 32, 56, .06);
  --s0: #1b64bf; /* --brand-2 と同じ青 */
  --s1: #e8590c;
  --s2: #2b8a3e;
  --s3: #7048e8;
  --s4: #c2255c;
  --q0: #deebf7;
  --q1: #9ecae1;
  --q2: #6baed6;
  --q3: #3182bd;
  --q4: #08519c;
  --nodata: #e3e6ea;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f141b;
    --surface: #161d27;
    --surface-2: #1d2633;
    --text: #e7ebf1;
    --muted: #9ba6b6;
    --line: #2a3442;
    --brand: #8ab8f5;
    --brand-2: #8ab8f5;
    --brand-soft: #1a2b42;
    --on-brand: #0b1220;
    --hi: #1a2b42;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    --s0: #8ab8f5;
    --s1: #ff922b;
    --s2: #69db7c;
    --s3: #b197fc;
    --s4: #f783ac;
    --q0: #1c3350;
    --q1: #24507f;
    --q2: #2f6fb0;
    --q3: #5a9be0;
    --q4: #a8cdf7;
    --nodata: #2a3442;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-2); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.page { padding-bottom: 64px; max-width: 960px; }
h1 { font-size: 1.75rem; line-height: 1.45; margin: 8px 0 16px; letter-spacing: .01em; }
h2 { font-size: 1.25rem; line-height: 1.5; margin: 40px 0 12px; }
h3 { font-size: 1.02rem; line-height: 1.5; margin: 0 0 6px; }
p { margin: 0 0 12px; }
small { font-size: .75em; }

/* ヘッダー */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; letter-spacing: .04em; }
.logo { width: 30px; height: 30px; flex: none; }
.logo-bg { fill: var(--brand); }
.logo-fg { fill: var(--on-brand); }
.site-header nav { display: flex; gap: 24px; align-items: center; font-size: .92rem; }
.site-header nav a { color: var(--text); text-decoration: none; }
.site-header nav a:hover { color: var(--brand-2); }
.site-header nav .nav-cta { background: var(--brand); color: var(--on-brand); padding: 8px 16px; border-radius: 8px; font-weight: 600; }
.site-header nav .nav-cta:hover { color: var(--on-brand); opacity: .9; }
.site-header nav a[aria-current] { color: var(--brand); font-weight: 700; }
.nav-toggle { display: none; }
@media (max-width: 1000px) {
  .site-header nav { gap: 16px; font-size: .88rem; }
}
/* 幅の狭い画面では、メニューをボタンで開く(JavaScript が無いときは普通に並べる) */
@media (max-width: 860px) {
  .js .nav-toggle { display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); cursor: pointer; }
  .nav-toggle span { display: block; height: 2px; background: var(--text); border-radius: 1px; transition: transform .2s, opacity .2s; }
  .nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .js .site-header nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; font-size: 1rem; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); padding: 4px 16px 16px; }
  .js.nav-open .site-header nav { display: flex; }
  .js .site-header nav a { padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .js .site-header nav .nav-cta { margin-top: 14px; padding: 12px 16px; text-align: center; border-bottom: 0; }
  html:not(.js) .site-header nav { flex-wrap: wrap; gap: 8px 14px; }
}
@media (prefers-reduced-motion: reduce) { .nav-toggle span { transition: none; } }

/* 共通部品 */
.eyebrow { color: var(--brand-2); font-weight: 700; font-size: .85rem; letter-spacing: .06em; margin: 32px 0 4px; }
.button { display: inline-block; background: var(--brand); color: var(--on-brand); padding: 12px 22px; border-radius: 8px; text-decoration: none; font-weight: 700; border: 1px solid var(--brand); font-size: 1rem; cursor: pointer; line-height: 1.4; }
.button:hover { opacity: .92; }
.button.secondary { background: var(--bg); color: var(--brand); border-color: var(--line); }
.button.light { background: #fff; color: #14467f; border-color: #fff; }
.tag { display: inline-block; margin-left: 6px; font-size: .75rem; font-weight: 600; color: var(--brand-2); background: var(--brand-soft); padding: 1px 8px; border-radius: 4px; white-space: nowrap; }
.note { color: var(--muted); font-size: .85rem; }
.crumbs { font-size: .85rem; color: var(--muted); margin-top: 24px; }
.crumbs a { color: var(--muted); }
.small-title { font-size: .95rem; margin: 0 0 8px; color: var(--muted); }

/* トップ */
.hero { background: linear-gradient(180deg, var(--brand-soft) 0%, var(--bg) 100%); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; padding-top: 56px; padding-bottom: 64px; }
.hero h1 { font-size: 2.2rem; line-height: 1.4; margin: 4px 0 18px; }
.hero .eyebrow { margin-top: 0; }
.lead { font-size: 1.05rem; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 12px; }
.hero-note { font-size: .8rem; color: var(--muted); }
.preview-card { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 20px 22px; }
.pc-head { display: flex; justify-content: space-between; font-weight: 700; font-size: .9rem; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 12px; }
.pc-date { color: var(--muted); font-weight: 400; }
.pc-metric { margin-bottom: 14px; }
.pc-label { font-size: .8rem; color: var(--muted); margin: 0 0 6px; }
.pc-row { display: grid; grid-template-columns: 56px 1fr 44px; gap: 10px; align-items: center; font-size: .85rem; margin: 4px 0; }
.pc-bar { height: 10px; background: var(--surface-2); border-radius: 5px; overflow: hidden; }
.pc-bar i { display: block; height: 100%; background: var(--brand-2); border-radius: 5px; }
.pc-val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.pc-foot { font-size: .75rem; color: var(--muted); margin: 8px 0 0; }
.band { padding: 64px 0; }
.band.muted { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-title { font-size: 1.5rem; margin: 0 0 28px; }
.features, .usecases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature, .usecase { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.feature p, .usecase p { color: var(--muted); font-size: .92rem; margin: 0; }
.feature-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-2); display: grid; place-items: center; margin-bottom: 14px; }
.feature-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.usecase h3 { padding-left: 12px; border-left: 3px solid var(--brand-2); }
.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; }
.two-col .section-title { margin-bottom: 16px; }
.source-list { margin: 0; padding-left: 20px; }
.faq { margin: 0; max-width: 800px; }
.faq dt { font-weight: 700; margin-top: 20px; }
.faq dd { margin: 6px 0 0; color: var(--muted); }
.cta-band { background: #14467f; color: #fff; padding: 56px 0; text-align: center; }
.cta-band h2 { margin: 0 0 8px; font-size: 1.4rem; }
.cta-band p { color: #d6e4f5; }

/* 検索・都道府県 */
.search { position: relative; max-width: 520px; margin-bottom: 32px; }
.search label { display: block; font-weight: 600; margin-bottom: 6px; }
.search input { width: 100%; font-size: 1rem; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); }
.search input:focus { outline: 2px solid var(--brand-2); outline-offset: 1px; }
.pref-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pref-group { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.pref-group h3 { font-size: .85rem; color: var(--muted); margin-bottom: 8px; }
.pref-links { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.pref-links a { text-decoration: none; }
.pref-links a:hover { text-decoration: underline; }

/* 市区町村・レポート */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 8px 0 20px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.kpi-label { font-size: .78rem; color: var(--muted); margin: 0 0 4px; }
.kpi-value { font-size: 1.45rem; font-weight: 700; margin: 0; font-variant-numeric: tabular-nums; line-height: 1.3; }
.kpi-value small { font-size: .8rem; font-weight: 600; margin-left: 3px; color: var(--muted); }
.kpi-year { font-size: .72rem; color: var(--muted); margin: 2px 0 0; }
.highlights .kpis { margin-bottom: 16px; }
.kpi-hl { border: 2px solid var(--brand-2); background: var(--brand-soft); }
.kpi-hl .kpi-value { font-size: 2rem; }
.kpi-pos { font-size: .85rem; font-weight: 600; color: var(--brand); margin: 4px 0 0; }
table.profile tr.hl th, table.profile tr.hl td { background: var(--hi); }
table.profile tr.hl td.num { font-weight: 700; }
.summary { border-left: 3px solid var(--brand-2); padding: 4px 0 4px 16px; margin: 8px 0 8px; }
.summary p { margin: 4px 0; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 10px; }
table.data { border-collapse: collapse; width: 100%; font-size: .92rem; }
table.data th, table.data td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; white-space: nowrap; }
table.data tbody tr:last-child th, table.data tbody tr:last-child td { border-bottom: 0; }
table.data thead th { font-size: .78rem; color: var(--muted); font-weight: 600; background: var(--surface); }
table.data tbody tr:hover { background: var(--surface); }
table.data td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data td.year { color: var(--muted); font-size: .8rem; }
table.data td.hi { background: var(--hi); font-weight: 700; }
table.data small { color: var(--muted); }
.pos { display: inline-block; position: relative; width: 120px; height: 6px; background: var(--surface-2); border-radius: 3px; vertical-align: middle; }
.pos-dot { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; background: var(--brand-2); border: 2px solid var(--bg); border-radius: 50%; box-shadow: 0 0 0 1px var(--brand-2); }
.chart { margin: 8px 0; border: 1px solid var(--line); border-radius: 10px; padding: 12px 12px 8px; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .tick { fill: var(--muted); font-size: 12px; }
.chart polyline { stroke-width: 2.5; }
.chart figcaption { color: var(--muted); font-size: .8rem; }
.s0 { stroke: var(--s0); fill: var(--s0); }
.s1 { stroke: var(--s1); fill: var(--s1); }
.s2 { stroke: var(--s2); fill: var(--s2); }
.s3 { stroke: var(--s3); fill: var(--s3); }
.s4 { stroke: var(--s4); fill: var(--s4); }
polyline.s0, polyline.s1, polyline.s2, polyline.s3, polyline.s4 { fill: none; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .85rem; }
.legend i { display: inline-block; width: 14px; height: 3px; margin-right: 6px; vertical-align: middle; }
.k0 { background: var(--s0); } .k1 { background: var(--s1); } .k2 { background: var(--s2); } .k3 { background: var(--s3); } .k4 { background: var(--s4); }
.offer { background: var(--brand-soft); border-radius: 12px; padding: 8px 24px 20px; margin-top: 40px; }
.offer h2 { margin-top: 16px; }
.offer .button { margin: 4px 8px 4px 0; }
.report-cover { border: 1px solid var(--line); border-top: 4px solid var(--brand); border-radius: 12px; padding: 4px 28px 20px; margin-top: 16px; box-shadow: var(--shadow); }
.report-cover .eyebrow { margin-top: 12px; }
.sample-flag { display: inline-block; background: var(--brand-soft); color: var(--brand-2); font-weight: 600; padding: 2px 10px; border-radius: 4px; font-size: .8rem; margin: 16px 0 0; }
.cover-meta { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 8px 32px; margin: 16px 0 0; font-size: .85rem; }
.cover-meta dt { color: var(--muted); font-size: .75rem; }
.cover-meta dd { margin: 0; }
.city-cards { display: grid; gap: 16px; }
.city-card h3 { margin-bottom: 8px; }
.city-card .kpis { margin: 0; }
.findings li { margin: 6px 0; }
.gap-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.gap-card { border: 2px solid var(--brand-2); background: var(--brand-soft); border-radius: 10px; padding: 14px 16px; }
.gap-card h3 { font-size: 1rem; margin: 0 0 14px; }
.gap-card h3 small { font-weight: 400; color: var(--muted); }
.gap-strip { position: relative; height: 6px; background: var(--surface-2); border-radius: 3px; margin: 0 6px; }
.gap-strip i { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border: 2px solid var(--bg); border-radius: 50%; }
.gap-ends { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); margin: 6px 0 10px; }
.gap-vals { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.gap-vals li { display: grid; grid-template-columns: auto 1fr auto; column-gap: 6px; align-items: baseline; }
.gap-vals li i { width: 10px; height: 10px; border-radius: 2px; align-self: center; }
.gap-vals li b { font-size: 1.15rem; font-variant-numeric: tabular-nums; font-weight: 600; }
.gap-vals li.top b { font-size: 1.5rem; font-weight: 700; }
.gap-vals li small { grid-column: 2 / 4; text-align: right; font-size: .75rem; color: var(--muted); margin-top: -2px; }
table.compare tr.gap-row th { background: var(--hi); }
.top-cards:empty { display: none; }
.top-cards { margin: 4px 0 16px; }
.top-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.top-card { border: 2px solid var(--brand-2); background: var(--brand-soft); border-radius: 10px; padding: 14px 16px; min-width: 0; }
.top-rank { font-size: .8rem; font-weight: 700; color: var(--brand); margin: 0; }
.top-card h3 { font-size: 1.05rem; margin: 2px 0 10px; }
.top-label { font-size: .78rem; color: var(--muted); margin: 0; }
.top-value { font-size: 2rem; font-weight: 700; line-height: 1.2; margin: 0 0 8px; font-variant-numeric: tabular-nums; }
.top-value + .top-label { padding-top: 8px; border-top: 1px solid var(--line); }
.top-value + .top-label + ul { border-top: 0; padding-top: 2px; }
.top-value small { font-size: .85rem; font-weight: 600; color: var(--muted); margin-left: 3px; }
.top-card ul { list-style: none; margin: 0; padding: 8px 0 0; border-top: 1px solid var(--line); display: grid; gap: 2px; font-size: .82rem; }
.top-card li { display: flex; justify-content: space-between; gap: 8px; }
.top-card li span { color: var(--muted); }
.top-card li b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.top-card li b small { font-weight: 400; color: var(--muted); margin-left: 2px; }
.top-card.plain { border: 1px solid var(--line); background: var(--surface); }
.top-card.plain .top-value { color: var(--text); }
.top-card .top-value + p { margin: 0 0 8px; }
.model-lead { margin: 8px 0; }
.try { background: var(--surface); border: 1px dashed var(--line); border-radius: 10px; padding: 14px 16px; margin: 8px 0; }
.glossary { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 8px 0 0; }
.glossary dt { font-weight: 600; }
.glossary dd { margin: 0; }
@media (max-width: 640px) { .glossary { grid-template-columns: 1fr; } .glossary dd { margin-bottom: 6px; } }
.top-card.est .top-value { font-size: 1.5rem; }
.top-grid + .table-scroll { margin-top: 16px; }
table.screen .sort-col { background: var(--hi); font-weight: 700; }
.sources ul { font-size: .9rem; }
.info-table { border-collapse: collapse; width: 100%; max-width: 720px; }
.info-table th, .info-table td { border-bottom: 1px solid var(--line); padding: 12px 8px; text-align: left; vertical-align: top; }
.info-table th { width: 9em; color: var(--muted); font-weight: 600; }

/* フォーム */
.form { max-width: 600px; display: grid; gap: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.form label { display: grid; gap: 6px; font-weight: 600; }
.form input[type=email], .form select, .form textarea { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); font-weight: 400; }
.form fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; background: var(--bg); }
.form legend { font-weight: 600; padding: 0 4px; }
.form label.check { display: flex; gap: 8px; align-items: center; font-weight: 400; }
.form .hp { position: absolute; left: -9999px; }
#form-msg { min-height: 1.5em; margin: 0; }

/* フッター */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; padding: 48px 0 32px; }
.footer-cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer-brand p { margin-top: 12px; max-width: 420px; }
.site-footer h2 { font-size: .85rem; color: var(--text); margin: 4px 0 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 6px 0; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--brand-2); }
.site-footer .brand { color: var(--text); }
.footer-legal { border-top: 1px solid var(--line); margin-top: 32px; padding-top: 16px; font-size: .75rem; }
.footer-legal p { margin: 4px 0; }

@media (max-width: 860px) {
  .hero-grid, .two-col { grid-template-columns: 1fr; gap: 32px; }
  .hero h1 { font-size: 1.7rem; }
  .features, .usecases, .pref-grid { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .top-grid { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  h1 { font-size: 1.4rem; }
  .hero-grid { padding-top: 36px; padding-bottom: 40px; }
  .hero h1 { font-size: 1.45rem; }
  .hero h1 br { display: none; }
  .band { padding: 44px 0; }
  .wrap { padding: 0 16px; }
  .pos { width: 72px; }
  .cover-meta { grid-template-columns: 1fr; }
  .report-cover { padding: 4px 18px 16px; }
  .kpi-value { font-size: 1.2rem; }
}

/* ツール */
.beta-note, .warn-note { background: var(--brand-soft); border-radius: 8px; padding: 10px 14px; font-size: .9rem; }
.tool-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin: 16px 0 24px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.field-label { font-weight: 700; font-size: .9rem; }
.field .field-label { font-weight: 700; } /* 検索欄の見出し(.search label の 600)もほかの入力欄の見出しとそろえる */
.field-row { display: flex; flex-wrap: wrap; gap: 16px 32px; }
.tool-panel select, .tool-panel input[type=search], .tool-panel input[type=number] { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); }
.tool-panel .search { margin: 0; max-width: 520px; }
.segs { display: flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; width: fit-content; background: var(--bg); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 8px 14px; cursor: pointer; font-size: .9rem; border-right: 1px solid var(--line); }
.seg:last-child span { border-right: 0; }
.seg input:checked + span { background: var(--brand); color: var(--on-brand); font-weight: 700; }
.seg input:focus-visible + span { outline: 2px solid var(--brand-2); outline-offset: -2px; }
.picker { list-style: none; margin: 4px 0 0; padding: 4px 0; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); position: absolute; top: 100%; width: 100%; z-index: 5; max-height: 300px; overflow-y: auto; box-shadow: var(--shadow); }
.picker:empty { display: none; }
.picker a, .picker button { display: block; width: 100%; text-align: left; padding: 8px 14px; background: none; border: 0; font: inherit; color: var(--text); cursor: pointer; }
.picker a { text-decoration: none; }
.picker a:hover, .picker a:focus, .picker button:hover, .picker button:focus { background: var(--surface); }
.picker-empty { padding: 8px 14px; color: var(--muted); font-size: .9rem; }
.picker button:disabled { color: var(--muted); cursor: default; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px 4px 10px; font-size: .9rem; }
.chip i, .compare th i, .city-card h3 i, .top-card h3 i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.chip button { border: 0; background: none; font-size: 1.1rem; line-height: 1; cursor: pointer; color: var(--muted); padding: 2px 6px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions .button, .button.small { padding: 8px 14px; font-size: .9rem; margin: 0; }
.button:disabled { opacity: .45; cursor: default; }
.report .report-cover { margin-top: 0; }
.compare td.num .rk { display: block; font-size: .7rem; color: var(--muted); font-weight: 400; }
.compare .group-row th { background: var(--surface); font-size: .8rem; color: var(--brand-2); padding-top: 14px; }
.bar-grid, .two-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 32px; }
.hbars { display: grid; gap: 6px; }
.hbar, .stack { display: grid; grid-template-columns: 96px 1fr 72px; gap: 10px; align-items: center; font-size: .85rem; }
.stack { grid-template-columns: 96px 1fr; }
.hbar-track, .stack-track { height: 14px; background: var(--surface-2); border-radius: 4px; overflow: hidden; display: flex; }
.hbar-track i { display: block; height: 100%; border-radius: 4px; }
.hbar-val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.hbar-unit { font-size: .75rem; color: var(--muted); margin: 0; }
.stack-track { height: 20px; }
.stack-track i { display: block; height: 100%; font-size: .7rem; font-style: normal; color: #fff; text-align: center; line-height: 20px; overflow: hidden; }
.a0, .legend i.a0 { background: #5c9ded; }
.a1, .legend i.a1 { background: #1f4f8f; }
.a2, .legend i.a2 { background: #e8590c; }
/* 帯の中の数字: 明るい帯(a0・a2)は濃い文字、濃い帯(a1)は白い文字(どちらも 4.5:1 以上。帯の色はダークモードでも変えない) */
.stack-track i.a0, .stack-track i.a2 { color: #16202e; }
.stacks { display: grid; gap: 6px; }
.cond { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 6px; }
.cond select { max-width: 100%; }
.cond input { width: 110px; }
.cond .unit { color: var(--muted); font-size: .85rem; min-width: 3em; }
.cond .c-del { border: 1px solid var(--line); background: var(--bg); border-radius: 6px; cursor: pointer; padding: 4px 10px; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.checks .check { display: flex; gap: 6px; align-items: center; font-size: .9rem; }
.tool-switch { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 12px 0 0; padding-bottom: 8px; border-bottom: 1px solid var(--line); font-size: .9rem; }
.tool-switch a { color: var(--muted); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.tool-switch a:hover { color: var(--brand); }
.tool-switch a[aria-current] { color: var(--brand); font-weight: 700; border-bottom-color: var(--brand); }
.age-row { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.cover-fields summary, #keys-box summary { cursor: pointer; font-weight: 700; font-size: .9rem; }
.cover-fields label { display: grid; gap: 4px; margin-top: 10px; font-size: .9rem; max-width: 520px; }
.cover-fields input, .cover-fields textarea { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); }
.cover-note { white-space: pre-wrap; border-left: 3px solid var(--brand); padding: 4px 0 4px 12px; margin: 12px 0 0; }
table.data .med { color: var(--muted); background: var(--surface); }
.key-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 10px; }
.key-groups fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin: 0; background: var(--bg); }
.key-groups legend { font-weight: 700; font-size: .85rem; padding: 0 4px; }
.key-groups .check { display: flex; gap: 6px; align-items: flex-start; font-size: .85rem; margin: 4px 0; }
table.data tr.base-row th, table.data tr.base-row td { background: var(--hi); font-weight: 700; }
table.data caption { caption-side: top; text-align: left; padding: 0 0 8px; }
.result-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.result-count { font-weight: 700; margin: 0; }
table.screen td:first-child { width: 32px; }
@media (max-width: 860px) {
  .bar-grid, .two-charts { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .hbar { grid-template-columns: 72px 1fr 60px; }
  .stack { grid-template-columns: 72px 1fr; }
  .cond input { width: 84px; }
}

.print-only { display: none; }
/* 印刷: ツールの操作部分やサイトの枠を消し、レポートだけを出す */
@media print {
  .print-only { display: block !important; }
  .print-conditions { font-size: .85rem; margin: 0 0 8px; }
  :root { --bg: #fff; --surface: #f4f6f9; --text: #000; }
  .site-header, .site-footer .footer-cols, .no-print, .tool-panel, .beta-note, .offer, .cta-band { display: none !important; }
  .site-footer { background: #fff; padding: 8px 0; border: 0; }
  .wrap { max-width: none; padding: 0; }
  .report section, .chart, .city-card { break-inside: avoid; }
  .report-cover { box-shadow: none; }
  a { color: inherit; text-decoration: none; }
  .table-scroll { overflow: visible; border: 0; }
  table.data th, table.data td { white-space: normal; padding: 6px 8px; }
  /* 色で値や系列を示す部品は、背景色を出さない印刷の設定でも色を残す(帯の中の白い文字が読めなくなるのを防ぐ) */
  .stack-track i, .hbar-track i, .legend i, .chip i, .compare th i, .city-card h3 i, .top-card h3 i, .pos, .pos-dot, .pc-bar i, .gap-strip, .gap-strip i, .gap-vals li i { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
#add-cond { justify-self: start; }
.cond .c-del { color: var(--text); font-size: 1rem; line-height: 1.2; }
.chart polyline.dash { stroke-dasharray: 6 5; }

/* 地図 */
.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 24px; align-items: start; margin: 8px 0 16px; }
.map-box { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.choropleth svg { display: block; width: 100%; height: auto; max-height: 72vh; }
.choropleth path { stroke: var(--bg); stroke-width: .8px; vector-effect: non-scaling-stroke; fill-rule: evenodd; }
.choropleth a:hover path, .choropleth a:focus path { stroke: var(--text); stroke-width: 2px; }
.choropleth a:focus { outline: none; }
.q0 { fill: var(--q0); background: var(--q0); }
.q1 { fill: var(--q1); background: var(--q1); }
.q2 { fill: var(--q2); background: var(--q2); }
.q3 { fill: var(--q3); background: var(--q3); }
.q4 { fill: var(--q4); background: var(--q4); }
.nodata { fill: var(--nodata); background: var(--nodata); }
path.otheryear { fill: url(#hatch); }
i.otheryear { background: repeating-linear-gradient(45deg, var(--surface-2) 0 3px, var(--muted) 3px 4px); }
.hatch-bg { fill: var(--surface-2); }
.hatch-line { stroke: var(--muted); stroke-width: 1.5; }
.map-info { margin: 8px 0 0; font-size: .9rem; min-height: 1.5em; }
.map-credit { margin: 6px 0 0; font-size: .75rem; color: var(--muted); }
.map-legend ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: .88rem; }
.map-legend li { display: flex; align-items: center; gap: 8px; }
.map-legend i, .off-list i { display: inline-block; width: 18px; height: 14px; border-radius: 3px; flex: none; border: 1px solid var(--line); }
.legend-title { font-weight: 700; font-size: .9rem; margin: 0 0 8px; }
.off-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 16px; }
.off-list li { display: flex; align-items: center; gap: 8px; }
@media (max-width: 860px) {
  .map-layout { grid-template-columns: minmax(0, 1fr); }
}
@media print {
  .map-layout { grid-template-columns: minmax(0, 1fr) 200px; }
  .choropleth svg { max-height: none; }
  .map-info { display: none; }
  .choropleth, .map-legend i, .off-list i { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* 数理モデル: 推計値との差の区分(良し悪しを示さないよう、色は付けずに枠の濃さだけ変える) */
.gap-tag { display: inline-block; margin-top: .2rem; padding: 0 .35rem; border: 1px solid var(--line); border-radius: 3px; font-size: .7rem; font-weight: 400; color: var(--muted); }
.gap-tag.lo, .gap-tag.hi { border-color: var(--text); color: var(--text); }
.toc { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin: 1rem 0 0; }
td.note { font-size: .75rem; }
