@charset "UTF-8";
/* 見た目は「経済まるみえ」(jp-econ-dashboard)に合わせる: グラデーションのヘッダー、薄い青のサイドバー、白い角丸カード、濃紺のフッター */

:root {
  --text: #2c3e50;
  --text-2: #555;
  --text-3: #888;
  --border: #e3e8ee;
  --grid: #e8ecf0;
  --surface: #fff;
  --series-1: #3b85c3;
  --accent: #3498db;
  --up: #c0392b;
  --down: #1e8449;
  --link: #3b85c3;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 100%; }
body {
  margin: 0; max-width: 100%;
  font-family: 'Noto Sans', 'Noto Sans JP', sans-serif;
  color: var(--text); background: #fff; line-height: 1.7;
  overflow-wrap: break-word;
}
a { color: var(--link); text-decoration: none; transition: all .3s ease; }
a:hover { text-decoration: underline; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }
button { font-family: inherit; }

.wrapper { display: flex; flex-direction: column; min-height: 100vh; }

/* ヘッダー */
.header { background: linear-gradient(95.09deg, #8CECCC 0%, #5397CB 97.88%); }
.header-title { display: flex; align-items: center; justify-content: space-between; padding: 22px 100px; }
.site-title-link { display: flex; flex-direction: column; color: #fff; text-decoration: none; }
.site-title-link:hover { text-decoration: none; }
.site-title { font-size: 2.5rem; font-weight: bold; line-height: 1.3; }
.site-subtitle { font-size: .95rem; opacity: .95; }
.hamburger-icon { display: none; font-size: 28px; cursor: pointer; color: #fff; background: none; border: none; padding: 0; min-width: 44px; min-height: 44px; line-height: 1; }

/* 左メニュー + 本文 */
.container { display: flex; flex: 1; }
.sidebar { width: 200px; flex: none; background-color: #eaf5ff; padding: 20px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sidebar-top { display: block; padding: 8px 10px; margin-bottom: 14px; border-radius: 6px; background: #fff; border-left: 3px solid #5397cb; font-size: .9rem; font-weight: 700; color: #3b85c3; }
.sidebar-top.is-active { background: #5397cb; color: #fff; }
.sidebar-heading { font-size: 13px; font-weight: bold; color: #3b85c3; margin: 0 0 8px; }
.sidebar-list li { margin-bottom: 2px; }
.sidebar-list a { display: block; padding: 5px 10px; border-radius: 6px; font-size: .9rem; color: var(--text); }
.sidebar-list a:hover { background: #d6eaf9; text-decoration: none; }
.sidebar-list a.is-active { background: #5397cb; color: #fff; font-weight: 700; }
.sidebar-close-button { display: none; font-size: 24px; cursor: pointer; background: none; border: none; color: inherit; padding: 0; min-width: 44px; min-height: 44px; margin: -10px -10px .5em auto; }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 999; }
.sidebar-overlay.open { display: block; }
html.sidebar-open, html.sidebar-open body { overflow: hidden; }

.main { flex: 1; min-width: 0; }
.breadcrumb { padding: 8px 30px; background: #f5f7fa; border-bottom: 1px solid #e8ecf0; }
.breadcrumb-list { display: flex; flex-wrap: wrap; align-items: center; }
.breadcrumb-item { display: flex; align-items: center; font-size: .82rem; color: #666; }
.breadcrumb-item + .breadcrumb-item::before { content: "›"; margin: 0 6px; color: #bbb; }
.breadcrumb-item a { color: #5397cb; font-size: .82rem; }
.breadcrumb-current span { color: #333; font-weight: 500; }
.content { padding: 30px; background-color: #fafafa; min-height: calc(100vh - 200px); }

/* 見出し・カード */
.indicator-title { color: #2c3e50; font-size: 1.8em; font-weight: 600; margin-bottom: 20px; border-bottom: 3px solid #3498db; padding-bottom: 10px; line-height: 1.4; }
.lead { color: var(--text-2); margin-bottom: 24px; line-height: 1.8; }
.panel, .data-source, .card, .kpi { background: #fff; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.1); }
.panel { padding: 30px; margin-bottom: 30px; }
.panel h2, .data-source h2 { font-size: 1.25rem; font-weight: 600; color: #2c3e50; margin-bottom: 14px; padding-left: 10px; border-left: 4px solid #5397cb; line-height: 1.4; }
.chart-sub { font-size: .9rem; color: var(--text-2); margin: 16px 0 2px; font-weight: 600; }

.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 24px; }
.kpi { padding: 16px 20px; border-top: 4px solid #5397cb; }
.kpi-label { font-size: .85rem; color: var(--text-2); }
.kpi-value { font-size: 2rem; font-weight: 700; line-height: 1.3; color: #2c3e50; }
.kpi-value .unit { font-size: .95rem; font-weight: 400; margin-left: 2px; color: var(--text-2); }
.kpi-sub { font-size: .78rem; color: var(--text-3); }
.up { color: var(--up); } .down { color: var(--down); }

.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 30px; }
.card { padding: 18px 24px; border-top: 4px solid #5397cb; }
.card-title { font-size: 1rem; font-weight: 600; color: #3b85c3; margin-bottom: 8px; }
.rank { padding-left: 1.4em; list-style: decimal; }
.rank li { list-style: decimal; margin-bottom: 4px; }

/* グラフ */
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.panel-head h2 { margin-bottom: 0; }
.range { display: flex; padding: 6px 8px; background: #f0f4ff; border-radius: 8px; gap: 6px; }
.range button { border: none; background: #fff; color: var(--text-2); padding: 5px 14px; font-size: .85rem; font-weight: 600; border-radius: 6px; cursor: pointer; transition: background-color .2s; }
.range button:hover { background: #dbe9fa; }
.range button[aria-pressed="true"] { background: #4a90e2; color: #fff; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 10px 0; font-size: .82rem; color: var(--text-2); }
.legend li { display: flex; align-items: center; gap: 6px; }
.key { display: inline-block; width: 20px; height: 0; }
.key-line { border-top: 2px solid var(--series-1); }
.key-band { height: 10px; background: color-mix(in srgb, var(--series-1) 14%, transparent); border: 1px solid color-mix(in srgb, var(--series-1) 35%, transparent); }
.key-dash { border-top: 2px dashed var(--series-1); }
.chart-box { position: relative; width: 100%; }
.chart-box.price { height: 380px; } .chart-box.count { height: 140px; } .chart-box.age { height: 250px; }
.note { font-size: .8rem; color: var(--text-3); margin-top: 8px; }

/* 表 */
.table-wrap { overflow-x: auto; margin: 12px 0; }
table { border-collapse: collapse; width: 100%; font-size: .92rem; background: #fff; }
th, td { padding: 9px 12px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
th { background: #eaf5ff; color: #2c3e50; font-weight: 600; font-size: .85rem; }
tbody tr:hover { background: #f7fbff; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
details { margin-top: 14px; } summary { cursor: pointer; color: var(--link); font-weight: 500; }

/* データの出典 */
.data-source { padding: 24px 30px; margin-top: 10px; border-left: 4px solid #5397cb; font-size: .85rem; color: var(--text-2); }
.data-source h2 { font-size: 1.05rem; border-left: none; padding-left: 0; }
.data-source p + p { margin-top: 8px; }

/* フッター */
.footer { background: #1e3248; color: rgba(255,255,255,.8); margin-top: auto; }
.footer a { color: rgba(255,255,255,.68); font-size: .85rem; }
.footer a:hover { color: #fff; text-decoration: none; }
.footer-inner { max-width: 960px; margin: 0 auto; padding: 52px 32px 36px; display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand { display: flex; flex-direction: column; gap: 10px; }
.footer-brand-name { font-size: 1.05rem; font-weight: 700; color: #fff; letter-spacing: .3px; }
.footer-brand-desc { font-size: .83rem; color: rgba(255,255,255,.5); line-height: 1.6; }
.footer-nav-heading { font-size: .72rem; font-weight: 700; letter-spacing: .1em; color: rgba(255,255,255,.38); margin-bottom: 14px; }
.footer-nav-list { display: flex; flex-direction: column; gap: 10px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 16px 32px; max-width: 960px; margin: 0 auto; }
.footer-copyright { font-size: .8rem; color: rgba(255,255,255,.3); }

/* タブレット・スマホ */
@media screen and (max-width: 768px) {
  html { scroll-padding-top: 64px; }  /* 上部に固定した目次の分、飛び先が隠れないように */
  .header-title { padding: 14px 16px; }
  .site-title { font-size: 1.6rem; } .site-subtitle { font-size: .75rem; }
  .hamburger-icon { display: block; }
  .sidebar { position: fixed; top: 0; left: 0; bottom: 0; width: 260px; z-index: 1000; transform: translateX(-100%); transition: transform .25s ease; box-shadow: 2px 0 8px rgba(0,0,0,.2); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close-button { display: block; }
  .breadcrumb { padding: 8px 16px; }
  .content { padding: 16px; }
  .indicator-title { font-size: 1.3em; }
  .panel { padding: 18px 14px; }
  .kpis, .cards { grid-template-columns: 1fr; gap: 12px; }
  .kpi-value { font-size: 1.6rem; }
  .chart-box.price { height: 280px; }
  .footer-inner { grid-template-columns: 1fr; padding: 36px 20px 24px; }
}

/* 価格動向のポイント・固定ページ */
.insights { list-style: disc; padding-left: 1.4em; color: var(--text-2); }
.insights li { margin-bottom: 6px; line-height: 1.8; }
.static-page h2 { margin-top: 28px; }
.static-page h2:first-of-type { margin-top: 0; }
.static-page p, .static-page ul { margin-bottom: 12px; line-height: 1.9; color: var(--text-2); }
.static-page ul { list-style: disc; padding-left: 1.4em; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; }
.footer-bottom-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-bottom a { font-size: .8rem; color: rgba(255,255,255,.55); }

/* 地区ページ */
:root { --ward: #8a94a0; }
.key-ward { border-top: 2px solid var(--ward); }
.key-hollow { width: 10px; height: 10px; border: 2px solid var(--series-1); border-radius: 50%; background: #fff; }
.low-mark { color: var(--text-3); margin-left: 2px; }
tr.is-current { background: #eaf5ff; font-weight: 600; }

/* 築年数別の推移(線6本)。色は dataviz のカテゴリ色を、固定の順(築年数の新しい順)で使う */
:root { --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #008300; }
.legend-toggle { margin: 12px 0 6px; }
.legend-toggle button { display: flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: #fff; color: var(--text); border-radius: 999px; padding: 3px 12px 3px 10px; font-size: .82rem; cursor: pointer; font-family: inherit; }
.legend-toggle button:hover { background: #f5f7fa; }
.legend-toggle button[aria-pressed="false"] { color: var(--text-3); background: #f5f7fa; }
.legend-toggle button[aria-pressed="false"] .key { opacity: .35; }
.legend-toggle .key { border-top-width: 3px; }
.cell-count { color: var(--text-3); font-size: .78rem; margin-left: 4px; }

/* ランキング */
.lead-sm { color: var(--text-2); line-height: 1.9; margin-bottom: 14px; }
.jump { margin: -6px 0 18px; font-size: .9rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 坪単価 ↔ ㎡単価の切り替え。<html data-unit="tsubo|sqm"> で、片方だけを見せる(既定は坪単価) */
html[data-unit="tsubo"] .u-s, html[data-unit="sqm"] .u-t { display: none; }
.unit-switch { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; font-size: .88rem; color: var(--text-2); }
.unit-switch-buttons { display: flex; padding: 4px 6px; background: #f0f4ff; border-radius: 8px; gap: 4px; }
.unit-switch button { border: none; background: #fff; color: var(--text-2); padding: 5px 14px; font-size: .85rem; font-weight: 600; border-radius: 6px; cursor: pointer; font-family: inherit; }
.unit-switch button:hover { background: #dbe9fa; }
.unit-switch button[aria-pressed="true"] { background: #4a90e2; color: #fff; }
.unit-note { color: var(--text-3); font-size: .78rem; }

/* 地図で探す。色は、1つの色相の濃淡(低い→高い)。濃い色の上の文字は白にする */
.sidebar-map { margin-bottom: 8px; }
.map-wrap { max-width: 760px; margin: 8px auto; }
.price-svg-map { width: 100%; height: auto; display: block; }
.price-svg-map .map-ward { cursor: pointer; outline: none; }
.price-svg-map path { stroke: #fff; stroke-width: 2; stroke-linejoin: round; transition: filter .15s; }
.price-svg-map path.b0, .swatch.b0 { fill: #e6e6e6; background: #e6e6e6; }
.price-svg-map .nodata path { cursor: default; }
.price-svg-map path.b1, .swatch.b1 { fill: #e8f3fc; background: #e8f3fc; }
.price-svg-map path.b2, .swatch.b2 { fill: #c2dcf2; background: #c2dcf2; }
.price-svg-map path.b3, .swatch.b3 { fill: #93c0e6; background: #93c0e6; }
.price-svg-map path.b4, .swatch.b4 { fill: #5d9fd6; background: #5d9fd6; }
.price-svg-map path.b5, .swatch.b5 { fill: #2b6cb0; background: #2b6cb0; }
.price-svg-map .map-ward:hover path, .price-svg-map .map-ward:focus path { filter: brightness(.9); stroke: #1e3248; stroke-width: 3; }
.price-svg-map .map-ward:focus-visible path { stroke: #1e3248; stroke-width: 4; }
.map-label { font-size: 26px; font-weight: 700; text-anchor: middle; dominant-baseline: central; fill: #1e3248; pointer-events: none; }
.map-label.l5 { fill: #fff; }
.map-legend { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 14px; margin: 10px 0 4px; font-size: .85rem; color: var(--text-2); }
.map-legend ul { display: flex; flex-wrap: wrap; gap: 4px 14px; justify-content: center; }
.map-legend li { display: flex; align-items: center; gap: 6px; }
.swatch { display: inline-block; width: 16px; height: 16px; border-radius: 3px; border: 1px solid rgba(30,50,72,.18); flex: none; }
.ward-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.ward-chips a { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text); font-size: .9rem; }
.ward-chips a:hover { background: #f0f7fd; text-decoration: none; border-color: #93c0e6; }
.chip-name { font-weight: 600; }
.chip-price { margin-left: auto; color: var(--text-2); font-variant-numeric: tabular-nums; }
.steps { padding-left: 1.4em; }
.steps li { list-style: decimal; margin-bottom: 8px; line-height: 1.8; color: var(--text-2); }
.map-callout { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 16px 22px; margin-bottom: 24px; border-radius: 12px; color: #fff; background: linear-gradient(95.09deg, #5397CB 0%, #3b85c3 100%); box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.map-callout:hover { text-decoration: none; filter: brightness(1.05); }
.map-callout-title { font-size: 1.25rem; font-weight: 700; }
.map-callout-text { flex: 1; min-width: 220px; font-size: .92rem; opacity: .95; }
.map-callout-go { font-weight: 700; white-space: nowrap; }
@media screen and (max-width: 768px) { .map-label { font-size: 30px; } }

/* 拡大・縮小できる地図(Leaflet)。JS が動くと、簡易の地図(SVG)を隠して、こちらを見せる */
.price-map { display: none; height: 620px; width: 100%; border-radius: 10px; border: 1px solid var(--border); background: #eef3f7; z-index: 0; }
html.js-map .price-map { display: block; }
html.js-map #map-fallback { display: none; }
.map-tip { font-size: .82rem; line-height: 1.5; border-radius: 8px; padding: 6px 10px; color: var(--text); }
.map-tip .tip-sub { color: var(--text-3); font-size: .75rem; }
.pm-pop { font-size: .9rem; line-height: 1.7; min-width: 190px; }
.pm-pop strong { font-size: 1rem; color: #1e3248; }
.pm-pop .pm-sub { color: var(--text-3); font-size: .8rem; }
.pm-pop .pm-link { display: inline-block; margin-top: 6px; padding: 5px 12px; border-radius: 6px; background: #4a90e2; color: #fff; font-weight: 600; font-size: .88rem; }
.pm-pop .pm-link:hover { background: #357ab8; text-decoration: none; }
.map-hint { background: rgba(255,255,255,.92); padding: 6px 10px; border-radius: 8px; font-size: .78rem; color: var(--text-2); box-shadow: 0 1px 4px rgba(0,0,0,.2); max-width: 260px; }
.map-home { background: #fff; border: 2px solid rgba(0,0,0,.25); border-radius: 6px; padding: 5px 10px; font-size: .82rem; font-weight: 600; color: var(--text); cursor: pointer; font-family: inherit; }
.map-home:hover { background: #f0f7fd; }
.leaflet-container { font-family: inherit; }
.ward-name, .dist-name { pointer-events: none; }
.ward-name span { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; font-size: .85rem; font-weight: 700; color: #1e3248; text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff; }
.dist-name span { position: absolute; left: 12px; top: -9px; white-space: nowrap; font-size: .78rem; font-weight: 700; color: #1e3248; text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff; }
@media screen and (max-width: 768px) { .price-map { height: 460px; } .map-hint { max-width: 190px; font-size: .72rem; } }

/* ヘッダーの検索ボックスと、エリアを選ぶメニュー */
.header-tools { display: flex; align-items: center; gap: 10px; margin-left: auto; margin-right: 20px; }
.site-search { position: relative; }
.site-search input { width: 290px; padding: 9px 14px; border: none; border-radius: 999px; font-size: .92rem; font-family: inherit; background: rgba(255,255,255,.95); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.site-search input:focus { outline: 3px solid rgba(255,255,255,.7); }
.search-list { position: absolute; top: calc(100% + 6px); left: 0; right: 0; min-width: 320px; background: #fff; border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.25); padding: 6px; z-index: 1200; max-height: 60vh; overflow-y: auto; }
.search-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 6px; cursor: pointer; color: var(--text); }
.search-item:hover, .search-item[aria-selected="true"] { background: #eaf5ff; }
.si-main { display: flex; flex-direction: column; line-height: 1.4; }
.si-name { font-weight: 700; }
.si-kind { font-size: .75rem; color: var(--text-3); }
.si-price { font-size: .82rem; color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.search-none { padding: 10px; color: var(--text-3); font-size: .88rem; }
.area-menu-wrap { position: relative; }
.area-menu-button { border: 1px solid rgba(255,255,255,.85); background: rgba(255,255,255,.15); color: #fff; padding: 8px 16px; border-radius: 999px; font-size: .9rem; font-weight: 600; cursor: pointer; font-family: inherit; white-space: nowrap; }
.area-menu-button:hover { background: rgba(255,255,255,.28); }
.area-menu { position: absolute; top: calc(100% + 8px); right: 0; width: 280px; background: #fff; color: var(--text); border-radius: 12px; box-shadow: 0 6px 20px rgba(0,0,0,.25); padding: 16px; z-index: 1200; display: flex; flex-direction: column; gap: 10px; }
.area-menu[hidden] { display: none; }
.area-menu label { display: flex; flex-direction: column; gap: 3px; font-size: .8rem; font-weight: 600; color: var(--text-2); }
.area-menu select { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: .92rem; font-family: inherit; background: #fff; color: var(--text); }
.area-go { border: none; background: #4a90e2; color: #fff; padding: 9px 14px; border-radius: 8px; font-weight: 700; cursor: pointer; font-family: inherit; font-size: .92rem; }
.area-go:hover { background: #357ab8; }
.area-menu-note { font-size: .72rem; color: var(--text-3); margin: 0; }

/* サイドバーのエリアのグループ(開閉できる。市が増えても、長くなりすぎない) */
.sidebar-group { margin-bottom: 10px; }
.sidebar-group > summary { cursor: pointer; list-style: none; }
.sidebar-group > summary::-webkit-details-marker { display: none; }
.sidebar-group > summary::before { content: "▸ "; }
.sidebar-group[open] > summary::before { content: "▾ "; }

/* 区ページの「地区から探す」、近くの区・地区 */
.area-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.area-chips a { display: flex; flex-direction: column; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text); font-size: .9rem; }
.area-chips a:hover { background: #f0f7fd; border-color: #93c0e6; text-decoration: none; }
.area-chips .chip-price { margin-left: 0; font-size: .8rem; }
.nearby-list { display: flex; flex-direction: column; gap: 6px; }
.nearby-list a { display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 4px 16px; padding: 9px 14px; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text); font-size: .92rem; }
.nearby-list a:hover { background: #f0f7fd; border-color: #93c0e6; text-decoration: none; }
.nb-name { font-weight: 700; } .nb-dist, .nb-count { color: var(--text-3); font-size: .82rem; } .nb-price { font-variant-numeric: tabular-nums; } .nb-yoy { font-size: .82rem; }

@media screen and (max-width: 768px) {
  .header-title { flex-wrap: wrap; }
  .header-tools { order: 3; width: 100%; margin: 10px 0 0; }
  .site-search { flex: 1; }
  .site-search input { width: 100%; }
  .search-list { min-width: 0; }
  .area-menu { right: 0; width: min(300px, 86vw); }
  .nearby-list a { grid-template-columns: 1fr auto; }
  .nearby-list .nb-dist, .nearby-list .nb-count { display: none; }
}

/* トップの入口(検索・地図・ランキング)と、全体の数字 */
.hero { background: linear-gradient(135deg, #eaf5ff 0%, #f4fbf8 100%); border: 1px solid #d6e8f6; border-radius: 16px; padding: 34px 32px 30px; margin-bottom: 26px; }
.hero-title { font-size: 1.9rem; line-height: 1.45; font-weight: 700; color: #1e3248; margin-bottom: 10px; }
.hero-lead { color: var(--text-2); margin-bottom: 20px; line-height: 1.8; }
.hero-search { position: relative; max-width: 640px; margin-bottom: 18px; }
.hero-search input { width: 100%; padding: 15px 22px; border: 2px solid #5397cb; border-radius: 999px; font-size: 1.05rem; font-family: inherit; background: #fff; color: var(--text); box-shadow: 0 2px 8px rgba(83,151,203,.18); }
.hero-search input:focus { outline: 3px solid rgba(83,151,203,.35); }
.hero-search .search-list { min-width: 0; }
.entry-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; max-width: 640px; }
.entry-card { display: flex; flex-direction: column; gap: 4px; padding: 14px 18px; border-radius: 12px; background: #fff; border: 1px solid #c5def2; color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.06); transition: transform .12s, box-shadow .12s; }
.entry-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(83,151,203,.28); border-color: #5397cb; }
.ec-title { font-weight: 700; font-size: 1.05rem; color: #2b6cb0; }
.ec-text { font-size: .85rem; color: var(--text-2); line-height: 1.6; }
.ec-go { font-size: .82rem; font-weight: 700; color: #4a90e2; margin-top: 2px; }
.entry-cards-small { max-width: 520px; margin-top: 4px; }
.kpi-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 10px; }
.kpi-strip .kpi-value { font-size: 1.7rem; }
.section-title { font-size: 1.4rem; color: #2c3e50; font-weight: 600; margin: 26px 0 10px; padding-bottom: 8px; border-bottom: 3px solid #3498db; }
.ranking-top { scroll-margin-top: 16px; }

/* ホーム: 切り口の入口・対象エリア */
.lens-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 22px; }
.lens-card { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: 12px; background: #fff; border: 1px solid #c5def2; color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.06); transition: transform .12s, box-shadow .12s; }
.lens-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(83,151,203,.28); border-color: #5397cb; }
.lens-icon { font-size: 1.5rem; line-height: 1; }
.lens-title { font-weight: 700; color: #1e3248; }
.lens-text { font-size: .85rem; color: var(--text-2); line-height: 1.6; }
.lens-panel { scroll-margin-top: 16px; }
.coverage { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; }
.coverage li { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border); background: #fff; font-size: .9rem; }
.coverage li span { font-size: .75rem; padding: 2px 8px; border-radius: 999px; }
.coverage-on span { background: #e3f4ea; color: #1d6b3c; }
.coverage-soon { color: var(--text-2); background: #f6f6f6 !important; }
.coverage-soon span { background: #e8e8e8; color: #666; }
.ward-links { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 0; margin: 0; font-size: .92rem; }

/* データの鮮度(どの期間のデータか・いつ更新したか) */
.freshness { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: -8px 0 18px; padding: 8px 14px; background: #f3f8fc; border-left: 4px solid #5397cb; border-radius: 6px; font-size: .82rem; color: var(--text-2); }
.freshness strong { color: #2b6cb0; margin-right: 4px; }
.kpi-strip + .freshness { margin-top: 4px; }

/* ページ内の目次(ジャンプメニュー) */
.toc { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 20px; padding: 10px 14px; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.toc-title { font-size: .8rem; font-weight: 700; color: var(--text-3); margin-right: 4px; }
.toc a { padding: 4px 12px; border-radius: 999px; background: #eaf5ff; color: #2b6cb0; font-size: .85rem; font-weight: 600; white-space: nowrap; }
.toc a:hover { background: #d6eaf9; text-decoration: none; }
.toc a[aria-current="location"] { background: #3a85bf; color: #fff; }
.panel, .data-source { scroll-margin-top: 16px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* お知らせ(地区別のページを作っていない区など) */
.notice { margin: 0 0 22px; padding: 12px 16px; background: #fff8e6; border-left: 4px solid #e0a400; border-radius: 6px; font-size: .9rem; color: var(--text-2); line-height: 1.8; }
.notice strong { display: block; color: #8a6200; margin-bottom: 2px; }

@media screen and (max-width: 768px) {
  .hero { padding: 22px 16px 20px; }
  .hero-title { font-size: 1.4rem; }
  .lens-cards { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .lens-card { padding: 12px 12px; }
  .kpi-strip { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .kpi-strip .kpi-value { font-size: 1.35rem; }
  /* スマホでは、横にスクロールする帯にして、画面の上に固定する(長いページでも、目次がいつも見える) */
  .toc { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; position: sticky; top: 0; z-index: 50; margin: 0 -16px 20px; padding: 10px 16px; border-radius: 0; border-left: 0; border-right: 0; }
  .toc-title { display: none; }
}

/* エリア・駅の一覧ページ(都道府県 → 市区町村 → 駅) */
.area-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.area-jump a { padding: 6px 14px; border: 1px solid #c5def2; border-radius: 999px; background: #fff; font-size: .9rem; }
.area-count { margin-left: 10px; font-size: .8rem; font-weight: 400; color: var(--text-2); }
.station-group { border: 1px solid var(--border); border-radius: 8px; background: #fff; margin-bottom: 8px; }
.station-group > summary { display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; font-weight: 600; }
.station-group[open] > summary { border-bottom: 1px solid var(--border); }
.station-group .sg-count { font-size: .8rem; font-weight: 400; color: var(--text-2); }
.station-group > .ward-chips { padding: 12px; }

/* ホームの検索の例・一覧ページ間のリンク */
.hero-suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; max-width: 640px; margin: -6px 0 4px; font-size: .85rem; color: var(--text-2); }
.hero-suggest a { padding: 3px 12px; border: 1px solid #c5def2; border-radius: 999px; background: #fff; color: var(--text); }
.ward-chips li.with-sub { display: flex; gap: 6px; }
.ward-chips li.with-sub > a:first-child { flex: 1; min-width: 0; }
.ward-chips .chip-sub { justify-content: center; padding: 8px 10px; font-size: .8rem; color: var(--text-2); }
.station-group .sg-link { padding: 10px 14px 0; margin: 0; }

/* 予算から探す */
.budget-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 20px; }
.budget-form label { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; font-weight: 600; }
.budget-form input[type=number], .budget-form select { padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; font: inherit; min-width: 140px; background: #fff; }
.budget-row { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 20px; }
.budget-label { font-size: .9rem; font-weight: 600; flex: 1 1 100%; }
.budget-seg { display: flex; flex: 1 1 100%; max-width: 480px; border: 1px solid #93c0e6; border-radius: 10px; overflow: hidden; background: #fff; }
.budget-seg label { flex: 1 1 0; margin: 0; flex-direction: row; font-weight: 600; }
.budget-seg input { position: absolute; opacity: 0; pointer-events: none; }
.budget-seg span { display: block; width: 100%; padding: 10px 8px; text-align: center; white-space: nowrap; cursor: pointer; color: #2e6f9f; }
.budget-seg label + label span { border-left: 1px solid #c5def2; }
.budget-seg input:checked + span { background: #3a85bf; color: #fff; }
.budget-seg input:focus-visible + span { outline: 3px solid rgba(83,151,203,.45); outline-offset: -3px; }
.budget-filters select:disabled { background: #f3f3f3; color: #999; }
.budget-go, .budget-more { padding: 10px 26px; border: 0; border-radius: 999px; background: #3a85bf; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.budget-go:hover, .budget-more:hover { background: #2e6f9f; }
.budget-more { margin-top: 12px; background: #fff; color: #2e6f9f; border: 1px solid #93c0e6; }
.budget-summary { margin: 16px 0 8px; font-weight: 600; }
.budget-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.budget-list a { display: flex; align-items: baseline; gap: 8px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text); }
.budget-list a:hover { background: #f0f7fd; text-decoration: none; border-color: #93c0e6; }
.bl-name { font-weight: 600; }
.bl-sub { font-size: .78rem; color: var(--text-2); }
.bl-price { margin-left: auto; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 720px) { .budget-form > label, .budget-form input[type=number], .budget-form select { width: 100%; } }

/* ホーム: エリアを選ぶ */
.region-pref { margin-bottom: 14px; }
.region-pref-name { font-size: .95rem; color: var(--text-2); margin-bottom: 6px; }
.region-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.region-card { display: flex; flex-direction: column; gap: 4px; padding: 14px 18px; border-radius: 12px; border: 1px solid #c5def2; background: #fff; color: var(--text); position: relative; }
.region-card.is-open { box-shadow: 0 1px 4px rgba(0,0,0,.06); transition: transform .12s, box-shadow .12s; }
.region-card.is-open:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(83,151,203,.28); border-color: #5397cb; }
.region-card.is-soon { background: #f6f6f6; color: var(--text-2); border-style: dashed; }
.rc-name { padding-right: 4.2em; font-weight: 700; font-size: 1.05rem; color: #1e3248; }
.is-soon .rc-name { color: var(--text-2); }
.rc-badge { position: absolute; top: 12px; right: 14px; font-size: .72rem; padding: 2px 8px; border-radius: 999px; background: #e3f4ea; color: #1d6b3c; }
.is-soon .rc-badge { background: #e8e8e8; color: #666; }
.rc-stat { font-size: .85rem; color: var(--text-2); }
.rc-go { font-size: .85rem; color: #2e6f9f; margin-top: 2px; }
.area-region { margin-bottom: 14px; scroll-margin-top: 16px; }
.area-region-h { font-size: 1.02rem; margin: 6px 0 8px; }

/* サイドバー: 都道府県 → エリア → 区 */
.sidebar-label { font-size: .75rem; color: var(--text-2); margin: 4px 0 8px; }
.sidebar-pref > summary { margin-bottom: 6px; }
.sidebar-region { margin: 0 0 6px 10px; }
.sidebar-subheading { font-size: .85rem; font-weight: 700; color: #2c3e50; margin: 0 0 4px; cursor: pointer; list-style: none; }
.sidebar-subheading::-webkit-details-marker { display: none; }
.sidebar-region > summary::before { content: "▸ "; color: #3b85c3; }
.sidebar-region[open] > summary::before { content: "▾ "; }
.sidebar-region .sidebar-list { margin-left: 4px; }
.sidebar-soon { margin: 0 0 6px 10px; font-size: .85rem; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.sidebar-soon span { font-size: .7rem; padding: 1px 7px; border-radius: 999px; background: #e0e0e0; color: #666; }

/* 駅の一覧の絞り込み */
.station-filter { margin-bottom: 14px; }
.station-filter input { width: 100%; max-width: 480px; padding: 11px 18px; border: 2px solid #93c0e6; border-radius: 999px; font: inherit; background: #fff; }
.station-filter input:focus { outline: 3px solid rgba(83,151,203,.35); border-color: #5397cb; }
.station-filter .note { margin: 6px 4px 0; min-height: 1.2em; }
.station-group[hidden], .ward-chips li[hidden] { display: none; }

/* 最新ではない四半期の値(最新の四半期に取引がない区) */
.stale-q { display: block; font-size: .72rem; color: var(--text-2); }
.stale-mark { margin-left: 2px; color: var(--text-2); }

.sidebar-sub { display: block; font-size: .72rem; font-weight: 400; opacity: .85; }
