/* JINKO 2050 */
:root {
  --paper: #f3f5f8;
  --surface: #ffffff;
  --ink: #14213d;
  --ink-2: #4b5670;
  --ink-3: #7a8499;
  --line: #d6dce5;
  --navy: #1d2f5f;
  --down: #b3372f;
  --up: #2a62ae;
  --bar: #d97559;
  --bar-base: #1d2f5f;
  --kid: #2f9e8f;
  --mid: #8f9bb3;
  --old: #d97559;
  --radius: 6px;
  --font: "BIZ UDPGothic", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", Meiryo, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.8; font-feature-settings: "palt"; }
a { color: var(--navy); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid #4a83cf; outline-offset: 2px; border-radius: 2px; }
[hidden] { display: none !important; }
h1, h2, h3 { line-height: 1.35; margin: 0; letter-spacing: .01em; }
b, strong { font-weight: 700; }

/* ヘッダー */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px clamp(16px, 4vw, 40px); background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { white-space: nowrap; display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--ink); text-decoration: none; letter-spacing: .04em; }
.brand .mark { width: 22px; height: 22px; border-radius: 4px; background: linear-gradient(90deg, var(--bar) 0 33%, transparent 33% 39%, var(--navy) 39% 66%, transparent 66% 72%, var(--navy) 72%); clip-path: polygon(0 0, 33% 0, 33% 28%, 66% 28%, 66% 56%, 100% 56%, 100% 100%, 0 100%); }
.top nav { display: flex; gap: clamp(10px, 2.4vw, 26px); font-size: 14px; flex-wrap: wrap; justify-content: flex-end; }
.top nav a { color: var(--ink-2); text-decoration: none; padding: 4px 0; }
.top nav a:hover { color: var(--ink); text-decoration: underline; }

/* トップ */
.hero { padding: clamp(20px, 3vw, 36px) clamp(16px, 4vw, 40px) 16px; max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: 1fr minmax(280px, 420px); gap: 8px 40px; align-items: end; }
.hero h1 span { display: inline-block; }
.hero h1 { font-size: clamp(24px, 3.1vw, 36px); letter-spacing: .02em; grid-column: 1; }
.hero > p { margin: 0; color: var(--ink-2); max-width: 40em; grid-column: 1; font-size: 15px; }
.hero .search { grid-column: 2; grid-row: 1 / span 2; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } .hero .search { grid-column: 1; grid-row: auto; margin-top: 8px; } }
.search label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.searchbox { position: relative; max-width: 520px; }
.searchbox input { width: 100%; font: inherit; font-size: 17px; padding: 13px 16px; border: 2px solid var(--navy); border-radius: var(--radius); background: var(--surface); color: var(--ink); }
.searchbox ul { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(20, 33, 61, .16); }
.searchbox li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; border-radius: 4px; cursor: pointer; }
.searchbox li span { color: var(--ink-3); font-size: 14px; }
.searchbox li[aria-selected="true"], .searchbox li[data-i]:hover { background: #e9eef7; }
.searchbox li.none { cursor: default; color: var(--ink-2); font-size: 14px; }

.mapsec { max-width: 1240px; margin: 0 auto; padding: 8px clamp(16px, 4vw, 40px) 8px; scroll-margin-top: 8px; }
.mapbar { margin-bottom: 10px; overflow-x: auto; }
.seg { display: inline-flex; border: 1px solid var(--navy); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.seg button { font: inherit; font-size: 14px; padding: 9px 14px; border: 0; border-right: 1px solid var(--navy); background: transparent; color: var(--navy); cursor: pointer; white-space: nowrap; }
.seg button:last-child { border-right: 0; }
.seg button[aria-pressed="true"] { background: var(--navy); color: #fff; font-weight: 700; }
.seg.small button { font-size: 13px; padding: 7px 12px; }
.mapwrap { position: relative; height: clamp(600px, 92vh, 980px); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #dfe7ee; }
#mapgl { position: absolute; inset: 0; }
.legendbox { position: absolute; left: 12px; bottom: 12px; z-index: 2; background: rgba(255, 255, 255, .95); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; font-size: 12px; line-height: 1.5; width: 300px; max-width: calc(100% - 24px); max-height: calc(100% - 24px); overflow: auto; }
.legendbox > b { display: block; margin-bottom: 6px; font-size: 13px; }
.ramp { display: flex; height: 12px; gap: 2px; }
.ramp i { flex: 1; }
.ticks { display: flex; padding: 2px calc(100% / var(--n) / 2) 0; justify-content: space-between; color: var(--ink-2); font-size: 11px; }
.ticks span { width: 0; display: flex; justify-content: center; white-space: nowrap; }
.catlegend { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.catlegend li { display: flex; align-items: flex-start; }
.catlegend li i { flex: none; margin-top: 3px; }
.catlegend li b { display: block; }
.catlegend li span { color: var(--ink-2); }
.catlegend li span b { color: var(--ink); }
.catlegend i, .nd i { display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -1px; border-radius: 2px; }
.nd { margin: 6px 0 0; color: var(--ink-2); }
.maperr { position: absolute; inset: auto 12px 12px auto; z-index: 3; margin: 0; background: #fff; border: 1px solid var(--down); color: var(--down); padding: 8px 12px; border-radius: var(--radius); font-size: 14px; }
.mapsrc { margin-top: 6px; }
.maptip .maplibregl-popup-content { padding: 7px 10px; font-family: var(--font); font-size: 13px; line-height: 1.5; border-radius: 4px; box-shadow: 0 4px 14px rgba(20, 33, 61, .2); }
.maptip b { display: block; }
.maptip span { color: var(--ink-2); }
.maplibregl-ctrl-attrib { font-size: 11px; }

.panel { position: absolute; z-index: 4; top: 12px; right: 12px; width: 330px; max-height: calc(100% - 24px); overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px 18px; box-shadow: 0 12px 34px rgba(20, 33, 61, .18); }
.panel .close { position: absolute; top: 6px; right: 6px; width: 36px; height: 36px; border: 0; background: none; font-size: 22px; color: var(--ink-2); cursor: pointer; border-radius: 4px; }
.panel .close:hover { background: var(--paper); }
.panel .where { margin: 0; font-size: 13px; color: var(--ink-2); }
.panel h3 { font-size: 22px; margin-right: 30px; }
.panel .big { margin: 8px 0 10px; font-size: 38px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.panel .big small { display: block; font-size: 12px; font-weight: 400; color: var(--ink-2); margin-top: 4px; }
.up { color: var(--up); }
.down { color: var(--down); }
.prow { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 14px; }
.prow span { color: var(--ink-2); }
.prow b { font-variant-numeric: tabular-nums; text-align: right; }
.panel .btn { margin-top: 12px; width: 100%; text-align: center; }
.mini { display: block; width: 100%; margin-top: 12px; }
.mini .b0 { fill: var(--bar-base); }
.mini .b1 { fill: var(--bar); }
.mini text { font-size: 10px; fill: var(--ink-3); font-family: var(--font); }

/* 共通部品 */
.btn { display: inline-block; font: inherit; font-size: 15px; font-weight: 700; padding: 10px 18px; border-radius: var(--radius); background: var(--navy); color: #fff; text-decoration: none; border: 1px solid var(--navy); cursor: pointer; }
.btn:hover { background: #14213d; }
.btn.ghost { background: transparent; color: var(--navy); }
.btn.ghost:hover { background: #e9eef7; }
.tag { display: inline-block; font-size: 13px; font-weight: 700; padding: 1px 9px; border-radius: 3px; white-space: nowrap; }
.tag.cat0 { background: #c8443c; color: #fff; }
.tag.cat1 { background: #3b3f73; color: #fff; }
.tag.cat2 { background: #2f9e8f; color: #fff; }
.tag.cat3 { background: #e3dfd3; color: var(--ink); }
.src { font-size: 12px; color: var(--ink-3); margin: 6px 0 0; line-height: 1.6; }
.src a { color: inherit; }
.note { font-size: 13px; color: var(--ink-2); line-height: 1.7; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0; margin: 20px 0; border-top: 2px solid var(--ink); }
.stat { padding: 12px 16px 12px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; }
.stat .k { font-size: 13px; color: var(--ink-2); }
.stat .v { font-size: 26px; font-weight: 700; line-height: 1.3; font-variant-numeric: tabular-nums; }
.stat .s { font-size: 12px; color: var(--ink-3); line-height: 1.5; }
.stats.big .stat .v { font-size: clamp(28px, 3.4vw, 40px); }
.tip { position: absolute; z-index: 100; pointer-events: none; background: var(--ink); color: #fff; font-size: 13px; line-height: 1.4; padding: 6px 10px; border-radius: 4px; white-space: nowrap; }

/* 帯セクション（トップ） */
.band { padding: clamp(36px, 6vw, 64px) clamp(16px, 4vw, 40px); max-width: 1240px; margin: 0 auto; }
.band.alt { max-width: none; background: var(--surface); border-block: 1px solid var(--line); padding-inline: max(clamp(16px, 4vw, 40px), calc((100% - 1160px) / 2)); }
.band h2 { font-size: clamp(22px, 3vw, 30px); margin-bottom: 14px; }
.prose { max-width: 40em; }
ul.prose { padding-left: 1.3em; }
ul.prose li { margin-bottom: 8px; }
.natfig { margin: 28px 0 8px; max-width: 760px; }
figure { margin: 16px 0 8px; }
figcaption { font-size: 14px; color: var(--ink-2); margin-top: 6px; }

/* グラフ */
.chart { display: block; width: 100%; height: auto; max-width: 680px; font-family: var(--font); }
.chart .axis { stroke: var(--ink-3); stroke-width: 1; }
.chart .grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; }
.chart .bar { fill: var(--bar); }
.chart .bar.base { fill: var(--bar-base); }
.chart .bar:hover, .chart .pt:hover, .chart .dot:hover { opacity: .8; }
.chart .dot { fill: #fff; stroke: var(--ink); stroke-width: 2.5; }
.chart .tick { font-size: 12px; fill: var(--ink-2); }
.chart .val { font-size: 13px; font-weight: 700; fill: var(--ink); }
.chart .line { fill: none; stroke: var(--navy); stroke-width: 2.5; stroke-linejoin: round; }
.chart .area { fill: rgba(29, 47, 95, .08); }
.chart .pt { fill: var(--navy); stroke: #fff; stroke-width: 2; }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0 0 8px; padding: 0; font-size: 13px; color: var(--ink-2); }
.legend .sw { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.sw.base { background: var(--bar-base); } .sw.proj { background: var(--bar); }
.sw.dot { background: #fff; border: 2.5px solid var(--ink); border-radius: 50%; }
.sw.kid { background: var(--kid); } .sw.mid { background: var(--mid); } .sw.old { background: var(--old); }
.agerow { display: flex; align-items: center; gap: 12px; margin: 8px 0; max-width: 680px; }
.agerow > b { width: 3.6em; font-size: 14px; }
.agebar { flex: 1; display: flex; gap: 2px; height: 34px; }
.seg.kid, .seg.mid, .seg.old { display: flex; align-items: center; justify-content: center; border: 0; border-radius: 0; font-size: 13px; font-weight: 700; color: #fff; min-width: 0; overflow: hidden; }
.agebar .seg:first-child { border-radius: 4px 0 0 4px; } .agebar .seg:last-child { border-radius: 0 4px 4px 0; }
.seg.kid { background: var(--kid); } .seg.mid { background: var(--mid); color: var(--ink); } .seg.old { background: var(--old); }

/* ランキング */
.rankctl { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: flex-end; margin-bottom: 16px; }
.rankctl label { display: flex; flex-direction: column; font-size: 13px; color: var(--ink-2); gap: 4px; }
.rankctl select { font: inherit; font-size: 15px; padding: 8px 10px; border: 1px solid var(--ink-3); border-radius: var(--radius); background: var(--surface); color: var(--ink); max-width: 100%; }
.rank { list-style: none; margin: 0 0 16px; padding: 0; border-top: 2px solid var(--ink); }
.rank li { display: grid; grid-template-columns: 3em 1fr auto; gap: 10px; align-items: center; padding: 9px 4px; border-bottom: 1px solid var(--line); }
.rank .no { color: var(--ink-3); font-variant-numeric: tabular-nums; text-align: right; padding-right: 8px; }
.rank a { text-decoration: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; min-width: 0; }
.rank a b { font-size: 17px; }
.rank a span { font-size: 13px; color: var(--ink-2); }
.rank a:hover b { text-decoration: underline; }
.rank .val { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* 下層ページ */
.page { max-width: 860px; margin: 0 auto; padding: 20px clamp(16px, 4vw, 40px) 56px; }
.crumbs { font-size: 13px; color: var(--ink-2); margin-bottom: 18px; }
.page h1 { font-size: clamp(26px, 4vw, 38px); }
.lead { font-size: clamp(17px, 2.2vw, 20px); line-height: 1.75; margin: 14px 0 0; }
.page section { margin-top: 44px; }
.page h2 { font-size: 22px; padding-bottom: 8px; border-bottom: 2px solid var(--ink); margin-bottom: 14px; }
.page section p { margin: 10px 0; }
.page section .stats { border-top: 0; margin-top: 0; }
.cat { font-size: 17px; }
.fac { padding-left: 1.3em; }
.fac li { margin-bottom: 6px; }
.basics { margin-top: 44px; font-size: 13px; color: var(--ink-2); border-top: 1px solid var(--line); padding-top: 12px; }
details summary { cursor: pointer; font-size: 14px; color: var(--navy); margin: 10px 0; }
.tablewrap { overflow-x: auto; }
table.data { border-collapse: collapse; width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
table.data th, table.data td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
table.data thead th { border-bottom: 2px solid var(--ink); font-size: 13px; color: var(--ink-2); background: var(--paper); position: sticky; top: 0; }
table.data th:first-child, table.data td:first-child { text-align: left; }
table.data tbody th { font-weight: 400; }
table.data.wide td, table.data.wide th { text-align: left; white-space: normal; vertical-align: top; }
table.data.wide tbody th { font-weight: 700; min-width: 9em; }
.sortable-h { cursor: pointer; }
.sortable-h::after { content: " ↕"; color: var(--ink-3); }
.sortable-h[aria-sort="ascending"]::after { content: " ↑"; color: var(--ink); }
.sortable-h[aria-sort="descending"]::after { content: " ↓"; color: var(--ink); }

.foot { background: var(--ink); color: #cfd6e4; padding: 32px clamp(16px, 4vw, 40px); font-size: 13px; line-height: 1.8; }
.foot p { max-width: 1160px; margin: 0 auto 6px; }
.foot b { color: #fff; letter-spacing: .04em; }
.foot a { color: #fff; margin-right: 18px; }

@media (max-width: 720px) {
  .top nav { font-size: 13px; }
  .mapwrap { height: clamp(460px, 78vh, 700px); }
  .panel { top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 56%; border-radius: 12px 12px 0 0; border-width: 1px 0 0; }
  .legendbox { width: 210px; padding: 8px 10px; left: 8px; bottom: 8px; }
  .mapwrap:has(.panel:not([hidden])) .legendbox { display: none; }
  .rank li { grid-template-columns: 2.2em 1fr auto; }
  .rank .val { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.terms dt { font-weight: 700; margin-top: 10px; }
.terms dd { margin: 2px 0 0; font-size: 14px; color: var(--ink-2); }

.page section h3 { font-size: 17px; margin: 26px 0 0; }

.ends { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; font-size: 11px; color: var(--ink-2); }
.lhelp { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 6px; }
.lhelp summary { margin: 0; font-size: 12px; font-weight: 700; color: var(--ink); }
.lhelp p { margin: 4px 0 0; font-size: 12px; line-height: 1.65; color: var(--ink-2); }
@media (max-width: 720px) { .legendbox { width: 240px; } }
@media (min-width: 721px) { .legendbox { left: auto; right: 12px; bottom: 40px; max-height: calc(100% - 52px); } }

.rkhelp { max-width: 46em; margin: 0 0 16px; font-size: 14px; line-height: 1.75; color: var(--ink-2); }
.rank a .pf { color: var(--ink); }
.rank a .pf:empty { display: none; }

table.ranked tbody { counter-reset: rk; }
table.ranked tbody tr { counter-increment: rk; }
table.ranked tbody th::before { content: counter(rk); display: inline-block; width: 2.2em; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* 記事一覧 */
.articles { list-style: none; margin: 20px 0; padding: 0; border-top: 2px solid var(--ink); }
.articles li { border-bottom: 1px solid var(--line); }
.articles a { display: flex; gap: 20px; padding: 18px 4px; text-decoration: none; color: var(--ink); align-items: flex-start; }
.articles img { flex: none; width: 200px; aspect-ratio: 1.91 / 1; object-fit: cover; border-radius: 4px; background: var(--line); }
.articles time { font-size: 13px; color: var(--ink-3); }
.articles b { display: block; font-size: 19px; line-height: 1.5; margin: 2px 0 6px; }
.articles a:hover b { text-decoration: underline; }
.articles p { margin: 0 0 8px; font-size: 14px; color: var(--ink-2); line-height: 1.7; }
.articles .more { font-size: 13px; font-weight: 700; color: var(--navy); }
@media (max-width: 600px) { .articles a { flex-direction: column; gap: 10px; } .articles img { width: 100%; } }

/* 言語切り替え・英語版 */
.langsw { border: 1px solid var(--navy); border-radius: var(--radius); padding: 3px 10px !important; color: var(--navy) !important; font-weight: 700; white-space: nowrap; }
.langsw:hover { background: #e9eef7; text-decoration: none !important; }
h1 .ja { display: block; font-size: 15px; font-weight: 400; color: var(--ink-2); margin-top: 6px; letter-spacing: 0; }
.panel h3 small { display: block; font-size: 12px; font-weight: 400; color: var(--ink-2); }
html[lang="en"] body { font-feature-settings: normal; line-height: 1.65; }
html[lang="en"] .hero h1 { letter-spacing: 0; }
html[lang="en"] .seg button { font-size: 13px; padding: 9px 11px; }
