:root {
  --bg: #0b1020;
  --panel: #131a30;
  --panel-2: #1a2340;
  --line: #28335c;
  --text: #e9edf8;
  --muted: #93a0c4;
  --accent: #fbbf24;
  --accent-deep: #b45309;
  --red: #f87171;
  --red-bg: #3b1219;
  --green: #34d399;
  --green-bg: #0e2a22;
  --amber-bg: #332106;
  --blue: #7aa7ff;
}
* { box-sizing: border-box; }
html { overflow-x: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans JP", system-ui, sans-serif;
  line-height: 1.7;
  overflow-wrap: break-word;
  word-break: normal;
  line-break: strict;
}
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
a { color: var(--blue); }

/* ===== 目次ドロワー（サイドバー） ===== */
.menu-toggle {
  position: fixed; top: 14px; left: 14px; z-index: 60;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--panel); color: var(--text); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 14px 9px 12px; cursor: pointer; font-family: inherit;
  font-size: 13px; font-weight: 700; box-shadow: 0 2px 10px rgba(0,0,0,.35);
}
.menu-toggle:hover { border-color: var(--accent-deep); }
.menu-toggle .hb { position: relative; width: 18px; height: 12px; display: inline-block; }
.menu-toggle .hb, .menu-toggle .hb::before, .menu-toggle .hb::after {
  background: var(--accent); height: 2px; border-radius: 2px; content: ""; position: absolute; left: 0; width: 18px;
}
.menu-toggle .hb { top: 5px; }
.menu-toggle .hb::before { top: -5px; }
.menu-toggle .hb::after { top: 5px; }
.drawer-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 70; }
.drawer-backdrop[hidden] { display: none; }
.drawer {
  position: fixed; top: 0; left: 0; bottom: 0; width: 270px; max-width: 82vw; z-index: 80;
  background: var(--panel); border-right: 1px solid var(--line);
  transform: translateX(-100%); transition: transform .25s ease; overflow-y: auto;
}
.drawer.open { transform: translateX(0); }
.drawer[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .drawer { transition: none; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; font-size: 15px; font-weight: 900; padding: 18px 18px 12px; border-bottom: 1px solid var(--line); }
.drawer-close { background: none; border: none; color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer; padding: 0 4px; }
.drawer-close:hover { color: var(--text); }
.drawer-list { list-style: none; margin: 8px 0; padding: 0; }
.drawer-list a {
  display: block; padding: 13px 20px; color: var(--text); text-decoration: none; font-size: 14.5px; font-weight: 500;
  border-left: 3px solid transparent;
}
.drawer-list a:hover { background: var(--panel-2); border-left-color: var(--accent); color: var(--accent); }

.site-header { border-bottom: 1px solid var(--line); padding: 58px 0 28px; }

/* ===== セクションのリズム統一（#3 縦長レイアウトの整理） ===== */
main.wrap > section { scroll-margin-top: 72px; margin: 0 0 26px; }
main.wrap > section > h2:first-child { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); }
#policy-budget-section > h2:first-child,
.kpi-grid { margin-top: 26px; }
#policy-budget-section > h2:first-child { padding-top: 22px; border-top: 1px solid var(--line); }
.kpi-grid { scroll-margin-top: 72px; }
.year-tabs { scroll-margin-top: 72px; }
.site-header h1 { margin: 10px 0 4px; font-size: clamp(24px, 4.5vw, 40px); font-weight: 900; letter-spacing: .01em; line-break: strict; word-break: keep-all; }
/* 単語途中・長音での改行を禁止する分割不可チャンク（必要な箇所のみ区切る） */
.nbk { white-space: nowrap; }
.tagline { color: var(--muted); margin: 0; max-width: 720px; }
.badge-row { display: flex; gap: 8px; flex-wrap: wrap; }
.badge { font-size: 12px; font-weight: 700; padding: 3px 12px; border-radius: 999px; }
.badge-source { background: var(--green-bg); color: var(--green); border: 1px solid #1d5c49; }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 28px 0 14px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.kpi .label { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.kpi .value { font-size: 30px; font-weight: 900; line-height: 1.25; margin-top: 2px; }
.kpi .value small { font-size: 15px; font-weight: 700; }
.kpi .value.fy-value { font-size: 22px; letter-spacing: .2px; } /* FY202X（令和X年度）が収まるよう調整 */
.kpi .sub { font-size: 11.5px; color: var(--muted); }

.caveat {
  background: var(--amber-bg); color: #fcd34d; border: 1px solid #6b4a09;
  border-radius: 10px; padding: 10px 14px; font-size: 13px; margin: 0 0 30px;
}

h2 { font-size: 22px; font-weight: 900; margin: 38px 0 14px; line-break: strict; word-break: keep-all; }
.h-sub { font-size: 13px; color: var(--muted); font-weight: 500; margin-left: 8px; }

.controls { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; align-items: center; }
.controls input[type="search"], .controls select {
  background: var(--panel); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 12px; font-size: 14px; font-family: inherit;
}
.controls input[type="search"] { flex: 1 1 220px; }
.toggle { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.chip-btn {
  background: var(--panel); color: var(--muted); border: 1px solid var(--line);
  border-radius: 999px; padding: 3px 14px; font-size: 13px; cursor: pointer; font-family: inherit;
}
.chip-btn.on { background: var(--accent); color: #271600; border-color: var(--accent); font-weight: 700; }

.item { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; margin-bottom: 10px; }
.item-top { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
.item-name { font-weight: 700; font-size: 15.5px; }
.item-name .rank { color: var(--accent); font-weight: 900; margin-right: 8px; }
.amount { font-size: 22px; font-weight: 900; white-space: nowrap; color: var(--accent); }
.amount.na { color: var(--muted); font-size: 14px; font-weight: 500; }
.delta {
  display: inline-block; font-size: 12px; font-weight: 900; margin-left: 8px;
  padding: 1px 10px; border-radius: 999px; vertical-align: middle; white-space: nowrap;
}
.delta.up { color: var(--red); background: var(--red-bg); border: 1px solid #7c2d3b; }
.delta.down { color: var(--green); background: var(--green-bg); border: 1px solid #1d5c49; }
.delta.big { font-size: 15px; padding: 2px 12px; }

/* ===== ニュースティッカー（外国人政策 速報・電光掲示板風） ===== */
.news-ticker {
  display: flex; align-items: stretch; height: 40px; overflow: hidden;
  background: linear-gradient(90deg, #0a0e1c, var(--bg));
  border-top: 1px solid var(--accent-deep); border-bottom: 1px solid var(--line);
}
.news-ticker[hidden] { display: none !important; }
.nt-label {
  display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; padding: 0 16px;
  background: #0a0e1c; color: var(--accent); border-right: 1px solid var(--accent-deep);
  font-size: 12.5px; font-weight: 900; letter-spacing: 1px; white-space: nowrap;
}
.nt-dot { width: 8px; height: 8px; border-radius: 50%; background: #ff4d4d; box-shadow: 0 0 7px #ff4d4d; animation: nt-blink 1.1s steps(2, jump-none) infinite; }
@keyframes nt-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: .25; } }
.nt-viewport { position: relative; flex: 1 1 auto; overflow: hidden; }
/* 両端のフェード（流れが途切れて見えないように） */
.nt-viewport::before, .nt-viewport::after { content: ""; position: absolute; top: 0; bottom: 0; width: 28px; z-index: 2; pointer-events: none; }
.nt-viewport::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.nt-viewport::after { right: 0; background: linear-gradient(270deg, var(--bg), transparent); }
.nt-track { display: inline-flex; align-items: center; height: 100%; white-space: nowrap; will-change: transform; animation: nt-marquee linear infinite; }
.nt-viewport:hover .nt-track, .nt-track:focus-within { animation-play-state: paused; }
@keyframes nt-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.nt-item { display: inline-flex; align-items: center; gap: 9px; padding: 0 24px; height: 100%; color: var(--text); text-decoration: none; border-right: 1px solid rgba(255, 255, 255, .045); }
.nt-item:hover { background: rgba(251, 191, 36, .09); }
.nt-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.nt-src { font-size: 10px; font-weight: 900; letter-spacing: .3px; color: #0a0e1c; background: var(--blue); padding: 2px 7px; border-radius: 4px; white-space: nowrap; }
.nt-title { font-size: 13px; font-weight: 600; }
.nt-time { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .nt-track { animation: none; } }
/* 右端固定の「ニュース一覧」ボタン（スクロールとは別に常時クリック可） */
.nt-all { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 3px; padding: 0 15px; height: 100%;
  background: var(--accent); color: #0a0e1c; border: none; cursor: pointer; font-family: inherit;
  font-size: 12px; font-weight: 900; white-space: nowrap; border-left: 1px solid var(--accent-deep); }
.nt-all:hover { background: #ffd24a; }
.nt-all-arrow { font-size: 16px; line-height: 1; }
@media (max-width: 560px) { .news-ticker { height: 36px; } .nt-label { padding: 0 10px; font-size: 11px; } .nt-title { font-size: 12.5px; } .nt-all { padding: 0 11px; font-size: 11px; } }

/* ===== ニュース一覧モーダル（巨大・ダーク・プロフェッショナル） ===== */
.news-modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 4vh 16px; }
.news-modal[hidden] { display: none !important; }
.news-modal-backdrop { position: absolute; inset: 0; background: rgba(4, 7, 16, .78); backdrop-filter: blur(3px); }
.news-modal-panel { position: relative; z-index: 1; display: flex; flex-direction: column; width: min(920px, 100%); max-height: 92vh;
  background: var(--bg); border: 1px solid var(--accent-deep); border-radius: 16px; overflow: hidden; box-shadow: 0 24px 80px rgba(0,0,0,.6); }
.news-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 22px 14px;
  border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #0e1424, var(--bg)); }
.news-modal-head h2 { font-size: 19px; font-weight: 900; }
.news-modal-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.news-modal-close { background: none; border: 1px solid var(--line); color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer;
  width: 36px; height: 36px; border-radius: 9px; flex: 0 0 auto; }
.news-modal-close:hover { color: var(--text); border-color: var(--accent-deep); }
.news-modal-list { overflow-y: auto; padding: 8px 14px 14px; }
.news-modal-foot { font-size: 11px; color: var(--muted); padding: 12px 22px 18px; line-height: 1.6; border-top: 1px solid var(--line); }
.news-row { display: block; text-decoration: none; color: var(--text); padding: 13px 12px; border-bottom: 1px solid rgba(255,255,255,.05); border-radius: 8px; }
.news-row:hover { background: rgba(251,191,36,.07); }
.news-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.news-row-top { display: flex; align-items: center; gap: 10px; margin-bottom: 5px; }
.news-row-num { font-size: 11px; font-weight: 900; color: var(--muted); min-width: 22px; }
.news-row-time { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; margin-left: auto; white-space: nowrap; }
.news-row-title { font-size: 14.5px; font-weight: 600; line-height: 1.5; }
.news-row-arrow { color: var(--accent); font-weight: 900; }
@media (max-width: 560px) { .news-modal-panel { max-height: 96vh; } .news-row-title { font-size: 13.5px; } }

/* ===== 広告プレースホルダー（AdSense・デザインを損なわない控えめな枠） ===== */
.ad-slot { margin: 20px 0; padding: 8px 12px 12px; background: var(--panel); border: 1px dashed var(--line); border-radius: 12px; text-align: center; }
.ad-slot-label { display: block; font-size: 10px; font-weight: 700; letter-spacing: 1.5px; color: var(--muted); opacity: .7; margin-bottom: 4px; }
.ad-slot-space { min-height: 90px; border-radius: 8px; background: rgba(255, 255, 255, .015); }
.ad-slot-top { margin-top: 24px; }
li.ad-slot-li { list-style: none; padding: 0 !important; border-top: none !important; }
li.ad-slot-li .ad-slot { margin: 12px 0; }
#list .ad-slot { margin: 14px 0; }
@media (max-width: 560px) { .ad-slot-space { min-height: 70px; } }

.year-tabs { display: flex; gap: 8px; margin: 28px 0 0; flex-wrap: wrap; }
/* hidden属性を display:flex/grid より確実に優先（作者CSSがUAの[hidden]に勝つ問題への防御） */
.year-tabs[hidden], .kpi-grid[hidden], .stat-cards[hidden] { display: none !important; }
/* 地方タブのサマリーカード帯（国の #kpi と同一デザイン） */
.local-kpi-band { margin: 20px 0 6px; }
.local-kpi-h { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.local-kpi { margin: 8px 0 0; }
/* 焦点（Spotlight）= 川口市。県メインと視覚的に区切る */
.spotlight-band { margin: 40px 0 14px; padding: 16px 18px; border: 1px solid var(--accent-deep); border-left: 4px solid var(--accent); border-radius: 12px; background: linear-gradient(180deg, rgba(251,191,36,0.07), rgba(251,191,36,0)); }
.spotlight-head { font-size: 17px; font-weight: 900; color: var(--text); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spotlight-badge { font-size: 11px; font-weight: 900; letter-spacing: .5px; padding: 3px 10px; border-radius: 999px; background: var(--accent); color: #271600; }
.spotlight-lead { font-size: 13px; color: var(--muted); line-height: 1.65; margin: 8px 0 0; }
/* 地方リストの並び替えトグル（上マージン調整） */
.budget-col .sort-seg { margin: 0 0 8px; }
/* 自治体ビュー専用の年度タブ（セクション内・上マージン控えめ） */
.gov-year-tabs { margin: 4px 0 18px; }
.year-tab {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--panel); border: 1px solid var(--line); color: var(--muted);
  border-radius: 10px; padding: 6px 18px; font-family: inherit; cursor: pointer;
}
/* FY202X（主）＋ 令和X年度（副）の2段表記。全タブ共通で統一 */
.yt-main { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.04; }
.yt-fy { font-size: 16px; font-weight: 900; letter-spacing: .2px; }
.yt-wa { font-size: 10px; font-weight: 700; opacity: .82; margin-top: 1px; white-space: nowrap; }
.year-tab.on .yt-wa { opacity: .9; }
/* 2階層ナビ 第1階層: エリア（地方ブロック）タブ */
.area-toggle { display: inline-flex; flex-wrap: wrap; gap: 0; margin: 26px 0 0; border: 1px solid var(--accent-deep); border-radius: 18px; overflow: hidden; background: var(--panel); }
.area-btn { background: transparent; color: var(--muted); border: none; padding: 10px 18px; font-size: 14.5px; font-weight: 900; cursor: pointer; font-family: inherit; }
.area-btn.on { background: var(--accent); color: #271600; }
.area-btn:disabled { opacity: 0.45; cursor: default; }
.area-soon { font-size: 9.5px; font-weight: 900; padding: 1px 6px; margin-left: 5px; border-radius: 999px; border: 1px solid var(--accent-deep); vertical-align: 1px; }
@media (max-width: 560px) { .area-btn { padding: 8px 12px; font-size: 13px; } }
/* 2階層ナビ 第2階層: エリア内の都道府県ピル（描画ロジックは従来の .gov-btn のまま） */
.gov-toggle { display: inline-flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.gov-toggle[hidden] { display: none !important; }
.gov-btn { background: var(--panel); color: var(--muted); border: 1px solid var(--accent-deep); border-radius: 999px; padding: 7px 18px; font-size: 13.5px; font-weight: 900; cursor: pointer; font-family: inherit; }
@media (max-width: 560px) { .gov-btn { padding: 7px 13px; font-size: 12.5px; } }
.gov-btn[hidden] { display: none; }
.gov-btn.on { background: var(--accent); color: #271600; border-color: var(--accent); }
#tokyo-section, #kawaguchi-section { scroll-margin-top: 72px; }

.year-tab.on { background: var(--accent); color: #271600; border-color: var(--accent); }
.year-tab.budget-tab { border-color: var(--accent-deep); }
.tab-latest { font-size: 10px; font-weight: 900; padding: 1px 7px; border-radius: 999px; background: var(--accent); color: #271600; }
.year-tab.budget-tab.on .tab-latest { background: #271600; color: var(--accent); }
.bar-track { height: 8px; background: var(--panel-2); border-radius: 4px; overflow: hidden; margin: 8px 0 8px; }
.bar { height: 100%; background: var(--accent); }
.meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 12px; }
.tag { background: var(--panel-2); color: var(--muted); border-radius: 999px; padding: 1px 10px; }
.tag.kw { color: var(--accent); border: 1px solid var(--accent-deep); background: transparent; }
.src-link { font-size: 12.5px; }
.item details { margin-top: 8px; font-size: 13px; color: var(--muted); }
.item summary { cursor: pointer; font-size: 12.5px; color: var(--blue); }

.more-btn {
  display: block; margin: 14px auto 0; background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 26px;
  font-size: 14px; cursor: pointer; font-family: inherit; font-weight: 700;
}

.share-x {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  border-radius: 999px; padding: 2px 12px; font-size: 12px; text-decoration: none; white-space: nowrap;
}
.share-x:hover { color: var(--text); border-color: var(--muted); }

#policy-budget-section { margin-top: 30px; }
.budget-hero {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  background: var(--panel); border: 1px solid var(--accent-deep); border-radius: 14px 14px 0 0;
  border-bottom: none; padding: 20px 22px;
}
.budget-hero-label { font-size: 13px; color: var(--muted); font-weight: 500; }
.budget-hero-num { font-size: 46px; font-weight: 900; color: var(--accent); line-height: 1.1; margin: 2px 0 6px; }
.budget-hero-delta { font-size: 14px; color: var(--muted); }
.budget-hero-supp { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.budget-trend { background: var(--panel); border: 1px solid var(--accent-deep); border-top: none; border-bottom: none; padding: 6px 22px 14px; }
.budget-bar-row { display: flex; align-items: center; gap: 12px; padding: 5px 0; }
.budget-bar-label { flex: 0 0 116px; font-size: 13px; font-weight: 700; }
.budget-bar-sub { display: block; font-size: 11px; color: var(--muted); font-weight: 400; }
.budget-bar-track { flex: 1; height: 16px; background: var(--panel-2); border-radius: 4px; overflow: hidden; }
.budget-bar-fill { height: 100%; background: var(--blue); }
.budget-bar-fill.hot { background: var(--accent); }
.budget-bar-val { flex: 0 0 auto; font-size: 14px; font-weight: 700; white-space: nowrap; min-width: 96px; text-align: right; }
.budget-bar-val.hot { color: var(--accent); font-weight: 900; }
.src-mini { font-size: 10.5px; margin-left: 8px; color: var(--blue); font-weight: 400; }
/* 増額の正体（省庁別100%積み上げバー） */
.breakdown { background: var(--panel); border: 1px solid var(--accent-deep); border-top: none; border-bottom: none; padding: 4px 22px 16px; }
.bd-head { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.bd-lead { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.bd-lead-pct { font-size: 38px; font-weight: 900; color: var(--accent); line-height: 1; }
.bd-lead-txt { font-size: 13.5px; color: var(--muted); }
.bd-lead-txt b { color: var(--text); font-weight: 700; }
.bd-lead-amt { color: var(--accent); font-weight: 700; }
.bd-bar { display: flex; height: 26px; border-radius: 6px; overflow: hidden; background: var(--panel-2); }
.bd-seg { display: block; height: 100%; }
.bd-seg + .bd-seg { border-left: 1px solid var(--bg); }
.bd-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; }
.bd-leg { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.bd-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.bd-note { font-size: 12px; color: var(--muted); margin-top: 10px; line-height: 1.5; }

/* 外部報道（NHK）との定義差の注記 */
.report-note { background: var(--panel); border: 1px solid var(--accent-deep); border-top: none; border-bottom: none; padding: 14px 22px; }
.rn-head { font-size: 14px; font-weight: 900; color: var(--text); margin-bottom: 12px; }
.rn-i { font-style: normal; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); color: #271600; font-size: 12px; margin-right: 6px; }
.rn-bars { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.rn-bar { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; background: var(--panel-2); border-radius: 8px; padding: 8px 14px; }
.rn-label { font-size: 12.5px; color: var(--muted); }
.rn-val { font-size: 18px; font-weight: 900; color: var(--blue); white-space: nowrap; }
.rn-val.ours { color: var(--accent); }
.rn-body { font-size: 13px; color: var(--muted); line-height: 1.7; margin: 0 0 8px; }
.rn-src { font-size: 11.5px; color: var(--muted); margin: 0; }
.rn-src a { color: var(--blue); }

/* 東京都「本当の予算の正体」対比バー */
.tokyo-contrast { border-radius: 0; }
.cbar-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.cbar-label { flex: 0 0 168px; font-size: 12.5px; font-weight: 700; }
.cbar-track { flex: 1 1 auto; min-width: 16px; height: 22px; background: var(--panel-2); border-radius: 5px; overflow: hidden; }
.cbar-fill { height: 100%; }
.cbar-val { flex: 0 0 auto; min-width: 78px; text-align: right; font-size: 15px; font-weight: 900; white-space: nowrap; }
.cbar-exact { font-size: 11px; color: var(--muted); text-align: right; margin-top: 2px; }
@media (max-width: 640px) { .cbar-label { flex-basis: 96px; } }

/* FY2026 施策一覧の検索・フィルター */
.shisaku-controls { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 10px 0 6px; }
.shisaku-controls input[type="search"] { flex: 1 1 220px; background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font-size: 13px; font-family: inherit; }
.shisaku-controls select { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 13px; font-family: inherit; }
.shisaku-count { font-size: 12px; color: var(--accent); font-weight: 700; margin-bottom: 6px; }

.budget-caveat { border-radius: 0 !important; margin: 0 !important; border-left: 1px solid var(--accent-deep); border-right: 1px solid var(--accent-deep); }
.budget-caveat i { font-style: normal; font-weight: 900; color: #271600; background: var(--accent); border-radius: 50%; width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; margin-right: 6px; }
.budget-cols { display: block; background: var(--panel); border: 1px solid var(--accent-deep); border-top: none; }
.budget-col { padding: 16px 22px; min-width: 0; }
.budget-col + .budget-col { border-top: 1px solid var(--line); }
.budget-items { max-height: 560px; overflow-y: auto; padding-right: 6px; }
.budget-col:first-child { border-right: 1px solid var(--line); }
.budget-col-h { font-size: 13px; font-weight: 700; margin-bottom: 12px; color: var(--text); }
.budget-col-foot { font-size: 11px; color: var(--muted); margin-top: 10px; line-height: 1.5; }
.min-item { margin-bottom: 9px; }
.min-row { display: flex; align-items: center; gap: 8px; }
.min-name { flex: 0 0 88px; min-width: 0; font-size: 12.5px; }
.min-track { flex: 1 1 auto; min-width: 16px; height: 10px; background: var(--panel-2); border-radius: 3px; overflow: hidden; }
.min-fill { display: block; height: 100%; background: var(--accent); }
.min-val { flex: 0 0 auto; font-size: 12px; font-weight: 700; min-width: 64px; text-align: right; white-space: nowrap; }
.min-item .exact-sub { text-align: right; }
.budget-items { margin: 0; padding-left: 0; list-style: none; }
.budget-items li { font-size: 12px; color: var(--text); padding: 9px 0; border-top: 0.5px solid var(--line); line-height: 1.55; }
.budget-items li:first-child { border-top: none; }
.ti-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ti-head .share-x { margin-left: auto; }
.ti-amt { color: var(--accent); font-weight: 900; }
.ti-amt.zero { color: var(--muted); }
.zero-note { font-size: 11px; color: var(--muted); background: var(--panel-2); border-radius: 999px; padding: 1px 10px; }
.ti-title { font-weight: 700; color: var(--text); font-size: 13px; margin-top: 4px; line-break: strict; }
.ti-desc { color: var(--muted); margin-top: 3px; overflow-wrap: anywhere; }

/* 厳密な一次ソース実額の併記（丸めずに全桁表示） */
.exact-sub {
  display: block; font-size: 11px; font-weight: 400; color: var(--muted);
  line-height: 1.45; margin-top: 2px; overflow-wrap: anywhere; white-space: normal;
  font-variant-numeric: tabular-nums;
}
.amount .exact-sub { text-align: right; }
.budget-bar-val .exact-sub { font-size: 10.5px; }
.budget-basis {
  font-size: 12px; color: var(--muted); background: var(--panel);
  border: 1px solid var(--accent-deep); border-top: none; border-radius: 0 0 14px 14px;
  padding: 10px 22px; margin: 0 0 8px;
}

.pair { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; margin-bottom: 12px; }
.pair-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.pair-head h3 { font-size: 16px; font-weight: 700; margin: 0; }
.pair-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 10px; }
.side { background: var(--panel-2); border-radius: 10px; padding: 12px 14px; }
.side .bar-track { background: var(--bg); }
.side-target { font-size: 11.5px; color: var(--muted); }
.side-name { font-weight: 700; font-size: 14.5px; margin: 2px 0; }
.side-amount { font-size: 24px; font-weight: 900; color: var(--accent); }
.side-fy { font-size: 11px; color: var(--muted); font-weight: 500; margin-left: 8px; }
.pp { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 2px; }
.pp-tag { color: var(--green); border: 1px solid #1d5c49; background: transparent; }
.pair-note {
  font-size: 12.5px; color: #fcd34d; background: var(--amber-bg); border: 1px solid #6b4a09;
  border-radius: 8px; padding: 8px 12px; margin: 12px 0 0;
}

.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; }
.stat-card .as-of { display: block; font-size: 11.5px; color: var(--accent); font-weight: 500; margin-top: 2px; }
.stat-card .sub a { color: var(--blue); }
.spark { display: block; margin-top: 8px; max-width: 100%; }

.claim-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; margin-bottom: 10px; }
.claim-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.claim-head .verdict { margin-bottom: 0; }
.verdict { display: inline-block; font-size: 13px; font-weight: 900; padding: 2px 14px; border-radius: 999px; margin-bottom: 8px; }
.verdict.false { background: var(--red-bg); color: var(--red); border: 1px solid #7c2d3b; }
.verdict.true { background: var(--green-bg); color: var(--green); border: 1px solid #1d5c49; }
.verdict.conditional { background: var(--amber-bg); color: var(--accent); border: 1px solid #6b4a09; }
.verdict.misleading { background: var(--amber-bg); color: var(--accent); border: 1px solid #6b4a09; }
.claim-tag { display: inline-block; font-size: 10.5px; font-weight: 900; color: var(--muted); background: var(--panel-2); border-radius: 4px; padding: 1px 7px; margin-right: 7px; vertical-align: 2px; }
.fact-tag { display: inline-block; font-size: 10.5px; font-weight: 900; color: #271600; background: var(--accent); border-radius: 4px; padding: 1px 7px; margin-right: 7px; vertical-align: 1px; }
.share-rebut { background: var(--accent); color: #271600 !important; border-color: var(--accent); font-weight: 900; }
.share-rebut:hover { box-shadow: 0 0 12px rgba(251,191,36,.5); border-color: var(--accent); }
.claim-text { font-size: 16px; font-weight: 700; margin: 0 0 6px; }
.fact { color: var(--muted); font-size: 14px; margin: 0 0 8px; }
.claim-sources { font-size: 12.5px; display: flex; gap: 12px; flex-wrap: wrap; }

.gloss {
  border-bottom: 1px dashed var(--accent); cursor: help; color: inherit;
  text-underline-offset: 2px; white-space: nowrap;
}
.gloss:hover, .gloss:focus { outline: none; color: var(--accent); }
.gloss-q {
  display: inline-flex; align-items: center; justify-content: center;
  width: 13px; height: 13px; margin-left: 2px; vertical-align: super;
  font-size: 9px; font-weight: 900; line-height: 1;
  color: #271600; background: var(--accent); border-radius: 50%;
}
#gloss-pop {
  position: fixed; z-index: 999; max-width: 300px;
  background: var(--panel-2); border: 1px solid var(--accent-deep);
  border-radius: 10px; padding: 11px 13px; font-size: 13px; color: var(--text);
  line-height: 1.65; box-shadow: 0 6px 22px rgba(0, 0, 0, 0.5);
}
#gloss-pop[hidden] { display: none; }
#gloss-pop .gp-term { display: block; font-weight: 900; color: var(--accent); font-size: 13.5px; margin-bottom: 4px; }
#gloss-pop .gp-read { font-weight: 400; color: var(--muted); font-size: 11.5px; margin-left: 8px; }

/* ===== スクロールリビール（JS有効時のみ／モーション低減を尊重） ===== */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ===== カードのホバー浮き上がり＋発光 ===== */
.item, .kpi, .pair, .claim-card, .stat-card {
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.item:hover, .kpi:hover, .pair:hover, .claim-card:hover, .stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-deep);
  box-shadow: 0 10px 28px rgba(0,0,0,.38), 0 0 0 1px rgba(251,191,36,.25);
}
@media (prefers-reduced-motion: reduce) {
  .item, .kpi, .pair, .claim-card, .stat-card { transition: none; }
  .item:hover, .kpi:hover, .pair:hover, .claim-card:hover, .stat-card:hover { transform: none; }
}

/* ===== 騰落率インジケータ ===== */
.delta-arr { font-size: 9px; margin-right: 3px; vertical-align: 1px; }
.delta.surge {
  color: #271600; background: var(--accent); border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 0 14px rgba(251,191,36,.55);
  animation: surgePulse 2.2s ease-in-out infinite;
}
@keyframes surgePulse {
  0%, 100% { box-shadow: 0 0 0 1px var(--accent), 0 0 8px rgba(251,191,36,.4); }
  50% { box-shadow: 0 0 0 1px var(--accent), 0 0 18px rgba(251,191,36,.85); }
}
@media (prefers-reduced-motion: reduce) { .delta.surge { animation: none; } }

/* ===== ソート（セグメント） ===== */
.sort-seg { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; }
.sort-lbl { font-size: 12px; color: var(--muted); margin-right: 2px; }
.sort-btn {
  background: var(--panel); color: var(--muted); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 14px; font-size: 12.5px; cursor: pointer; font-family: inherit;
  transition: background .15s, color .15s, border-color .15s;
}
.sort-btn:hover { color: var(--text); border-color: var(--muted); }
.sort-btn.on { background: var(--accent); color: #271600; border-color: var(--accent); font-weight: 700; }
.sort-seg.mini { display: inline-flex; margin: 0 0 0 8px; vertical-align: middle; }
.sort-seg.mini .sort-btn { padding: 2px 10px; font-size: 11px; }

/* ===== アクション導線（e-Govパブコメ） ===== */
.cta { margin: 40px 0 8px; }
.cta-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--accent-deep); border-radius: 16px; padding: 22px 24px;
}
.cta-text { flex: 1 1 320px; }
.cta-text h2 { font-size: 19px; font-weight: 900; margin: 0 0 6px; }
.cta-text p { font-size: 13.5px; color: var(--muted); margin: 0; max-width: 640px; }
.cta-btn {
  flex: 0 0 auto; display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
  background: var(--accent); color: #271600; text-decoration: none; font-weight: 900; font-size: 16px;
  border-radius: 12px; padding: 14px 26px; transition: transform .2s ease, box-shadow .2s ease;
  box-shadow: 0 0 0 1px var(--accent), 0 0 18px rgba(251,191,36,.35);
}
.cta-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 26px rgba(251,191,36,.55); }
.cta-btn .cta-ic { font-style: normal; font-size: 18px; }
.cta-btn .cta-sub { font-size: 11px; font-weight: 700; opacity: .8; }
@media (prefers-reduced-motion: reduce) { .cta-btn { transition: none; } .cta-btn:hover { transform: none; } }

.budget-col-h { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }

footer { border-top: 1px solid var(--line); margin-top: 48px; padding: 24px 0 60px; font-size: 13.5px; color: var(--muted); }
footer h3 { color: var(--text); font-size: 15px; margin: 0 0 8px; }
footer ul { margin: 0 0 12px; padding-left: 20px; }
.muted { color: var(--muted); }

@media (max-width: 640px) {
  .item-top { flex-direction: column; align-items: flex-start; gap: 2px; }
  .pair-grid { grid-template-columns: minmax(0, 1fr); }
  .budget-cols { grid-template-columns: minmax(0, 1fr); }
  .budget-col { padding: 14px 16px; }
  .budget-col:first-child { border-right: none; border-bottom: 1px solid var(--line); }
  .budget-hero { padding: 18px 16px; }
  .budget-trend { padding: 6px 16px 14px; }
  .budget-basis { padding: 10px 16px; }
  .budget-caveat { padding: 10px 14px; }
  .budget-hero-num { font-size: 34px; }
  .budget-bar-label { flex: 0 0 78px; }
  .budget-bar-val { min-width: 78px; }
  .min-name { flex-basis: 72px; }
  .wrap { padding: 0 14px; }
  .item-top .amount { align-self: flex-start; }
}
