/*
 * 自治体人口分析ナビ プラグイン用スタイル。
 * ヘッダー/フッターはSWELLテーマ側が描画するため、このファイルは
 * プラグインが出力するコンテンツ領域 (.pn-main) の内部にのみ適用されるようスコープしている。
 * 文字サイズは12px未満を作らない方針（SEO/可読性のため）。見出し類は従来比おおよそ2/3に縮小。
 */
:root {
  --ink: #102f38;
  --ink-soft: #49646b;
  --muted: #74888e;
  --navy: #0b3642;
  --navy-deep: #072732;
  --cyan: #35aabd;
  --cyan-bright: #55c6d3;
  --cyan-pale: #dff3f4;
  --lime: #d8ef8f;
  --lime-dark: #a9c95f;
  --coral: #e87561;
  --paper: #f4f8f7;
  --line: #dbe7e5;
  --line-dark: #c9d9d6;
  --shadow: 0 18px 50px rgba(11, 54, 66, .09);
  --display: "Avenir Next", "Helvetica Neue", "Yu Gothic", sans-serif;
  --body: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", sans-serif;
  /* SWELL側で固定ヘッダー（fix_header）を有効にした場合は、子テーマ側でこの値を
     実際のヘッダー高さに合わせて上書きしてください（例: swell_child/style.css に追記）。*/
  --pn-sticky-offset: 20px;
}

.pn-main { box-sizing: border-box; color: var(--ink); background: var(--paper); font: 15px/1.6 var(--body); padding: 0 0 10px; }
.pn-main *, .pn-main *::before, .pn-main *::after { box-sizing: inherit; }
.pn-main button, .pn-main input, .pn-main select { font: inherit; }
.pn-main a { color: inherit; }
.pn-main :focus-visible { outline: 3px solid rgba(53, 170, 189, .34); outline-offset: 3px; }
.pn-main .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.pn-main .top-hero { position: relative; left: 50%; right: 50%; width: 100vw; margin-left: -50vw; margin-right: -50vw; color: #fff; background-image: linear-gradient(118deg, rgba(7,39,50,.86), rgba(11,67,81,.72) 58%, rgba(22,133,154,.56)), url('/population/wp-content/uploads/2026/08/front-bg.png'); background-repeat: no-repeat, no-repeat; background-position: center, center; background-size: cover, cover; overflow: hidden; }
.pn-main .top-hero-grid { position: absolute; inset: 0; opacity: .16; background-image: linear-gradient(rgba(255,255,255,.24) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.24) 1px, transparent 1px); background-size: 36px 36px; mask-image: linear-gradient(90deg, transparent 4%, #000 60%); }
.pn-main .top-hero-grid::before, .pn-main .top-hero-grid::after { position: absolute; border: 1px solid rgba(255,255,255,.38); border-radius: 50%; content: ""; }
.pn-main .top-hero-grid::before { width: 440px; height: 440px; top: -125px; right: 5%; box-shadow: 0 0 0 55px rgba(255,255,255,.08), 0 0 0 110px rgba(255,255,255,.05); }
.pn-main .top-hero-grid::after { width: 10px; height: 10px; top: 95px; right: calc(5% + 214px); background: var(--lime); border: 6px solid rgba(216,239,143,.25); }
.pn-main .top-hero-inner { position: relative; z-index: 1; width: min(1040px, calc(100% - 36px)); margin: 0 auto; padding: 56px 0 52px; text-align: center; }
.pn-main .top-eyebrow { margin: 0 0 10px; color: #a9e9ef; font-size: 12px; line-height: 1.3; font-weight: 800; letter-spacing: .06em; }
.pn-main .top-hero h1 { margin: 0; font-size: clamp(23px, 3.5vw, 39px); line-height: 1.28; letter-spacing: -.045em; }
.pn-main .top-hero h1 span { color: var(--lime); }
.pn-main .top-lead { margin: 14px 0 22px; color: #d4eef1; font-size: 14px; line-height: 1.6; }
.pn-main .route-note { margin: 14px 0 0; color: #a7d5da; font-size: 12px; line-height: 1.4; }
.pn-main .hero-search-label { margin: 0 0 10px; color: #bfe9ee; font: 800 12px/1 var(--display); letter-spacing: .06em; text-align: center; }

.pn-main .search-box { position: relative; display: flex; width: min(590px, 100%); min-height: 56px; margin: 0 auto; background: #fff; border: 1px solid rgba(255,255,255,.3); border-radius: 8px; box-shadow: 0 15px 35px rgba(0,0,0,.14); }
.pn-main .search-box input { min-width: 0; flex: 1; padding: 0 18px 0 48px; color: var(--ink); background: transparent; border: 0; outline: 0; font-size: 14px; }
.pn-main .search-icon { position: absolute; top: 50%; left: 18px; color: var(--cyan); font: 700 22px/1 var(--display); transform: translateY(-50%); }
.pn-main .search-box > button { width: 96px; margin: -1px; color: #fff; background: var(--cyan); border: 0; border-radius: 0 8px 8px 0; font-size: 12px; font-weight: 800; cursor: pointer; }
.pn-main .search-box > button:hover { background: #268fa1; }
.pn-main .search-results { position: absolute; z-index: 70; top: calc(100% + 7px); right: 0; left: 0; padding: 6px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); text-align: left; }
.pn-main .search-results a { display: grid; grid-template-columns: 1fr auto; padding: 10px 11px; align-items: center; column-gap: 12px; border-radius: 5px; text-decoration: none; }
.pn-main .search-results a:hover { background: var(--cyan-pale); }
.pn-main .search-results strong { font-size: 12px; }
.pn-main .search-results span { color: var(--muted); font-size: 12px; line-height: 1.3; }
.pn-main .search-results small { grid-column: 1 / -1; color: #9aabad; font: 700 12px/1 var(--display); letter-spacing: .06em; }
.pn-main .search-results p { margin: 0; padding: 10px; color: var(--muted); font-size: 12px; line-height: 1.4; }

.pn-main .stats-bar { display: grid; grid-template-columns: repeat(3, 1fr); width: min(1180px, calc(100% - 36px)); margin: 0 auto; background: #fff; border-right: 1px solid var(--line); border-left: 1px solid var(--line); }
.pn-main .stats-bar > div { min-height: 80px; padding: 15px 20px 12px; text-align: center; border-right: 1px solid var(--line); }
.pn-main .stats-bar > div:last-child { border-right: 0; }
.pn-main .stats-bar strong { color: var(--cyan); font: 750 19px/1 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pn-main .stats-bar span { margin-left: 4px; color: var(--ink-soft); font-size: 12px; }
.pn-main .stats-bar small { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.3; }

.pn-main .content-shell { width: min(1140px, calc(100% - 36px)); margin: 0 auto; padding: 40px 0 70px; }
.pn-main .content-shell--page { padding-top: 22px; }
.pn-main .nav-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 42px; }
.pn-main .nav-cards > a { position: relative; min-height: 150px; padding: 24px 22px 20px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 30px rgba(11,54,66,.04); text-decoration: none; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; overflow: hidden; }
.pn-main .nav-cards > a::after { position: absolute; right: -35px; bottom: -50px; width: 120px; height: 120px; border: 19px solid var(--cyan-pale); border-radius: 50%; content: ""; }
.pn-main .nav-cards > a:hover { border-color: #a9d7dc; box-shadow: var(--shadow); transform: translateY(-3px); }
.pn-main .nav-icon { display: grid; width: 36px; height: 36px; margin-bottom: 14px; place-items: center; color: #fff; background: var(--navy); border-radius: 5px; font: 700 15px/1 var(--display); }
.pn-main .nav-cards strong { display: block; font-size: 15px; }
.pn-main .nav-cards p { position: relative; z-index: 1; margin: 6px 0 12px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.pn-main .nav-cards small { position: relative; z-index: 1; color: var(--cyan); font-size: 12px; font-weight: 800; }

.pn-main .content-section { margin-bottom: 42px; }
.pn-main .section-head { display: flex; margin-bottom: 15px; align-items: end; justify-content: space-between; gap: 20px; }
.pn-main .section-head h2 { margin: 0; font-size: 17px; line-height: 1.4; letter-spacing: -.02em; }
.pn-main .section-head > a, .pn-main .section-head > span { color: var(--muted); font-size: 12px; text-decoration: none; }
.pn-main .section-head > a:hover { color: var(--cyan); }

.pn-main .info-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.pn-main .info-card { padding: 15px 15px; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.pn-main .info-card h3 { margin: 0 0 6px; font-size: 13px; }
.pn-main .info-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

.pn-main .content-block { margin-bottom: 30px; }
.pn-main .content-block:last-child { margin-bottom: 0; }
.pn-main .content-block .ranking-panel { border: 0; padding: 0; }
.pn-main .lead-note { margin: 0 0 14px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.pn-main .about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.pn-main .about-grid h3 { margin: 0 0 6px; font-size: 13px; }
.pn-main .about-grid p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

.pn-main .ranking-panel { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; padding: 8px 20px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.pn-main .rank-row { display: grid; min-width: 0; grid-template-columns: 32px minmax(0, 1fr) auto 12px; min-height: 54px; padding: 9px 3px; align-items: center; gap: 10px; border-bottom: 1px solid #e9efee; text-decoration: none; }
.pn-main .ranking-panel .rank-row:nth-last-child(-n+2) { border-bottom: 0; }
.pn-main .rank-row:hover .rank-place strong { color: var(--cyan); }
.pn-main .rank-number { display: grid; width: 29px; height: 29px; place-items: center; color: var(--muted); background: #eef4f3; border-radius: 50%; font: 800 12px/1 var(--display); }
.pn-main .rank-number--1 { color: #fff; background: #cc9b31; }
.pn-main .rank-number--2 { color: #fff; background: #879ba0; }
.pn-main .rank-number--3 { color: #fff; background: #b87350; }
.pn-main .rank-place { min-width: 0; }
.pn-main .rank-place strong { display: block; overflow: hidden; font-size: 13px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; transition: color .15s ease; }
.pn-main .rank-place small { display: block; color: var(--muted); font-size: 12px; line-height: 1.3; }
.pn-main .rank-population { white-space: nowrap; text-align: right; }
.pn-main .rank-population b { color: var(--navy); font: 750 13px/1.2 var(--display); font-variant-numeric: tabular-nums; }
.pn-main .rank-population small { margin-left: 2px; color: var(--muted); font-size: 12px; line-height: 1.2; }
.pn-main .row-arrow { color: var(--cyan); font: 20px/1 var(--display); }
.pn-main .ranking-panel--large { display: block; padding: 10px 22px; }
.pn-main .ranking-panel--large .rank-row:last-child { border-bottom: 0; }

.pn-main .pref-map { position: relative; display: flex; gap: 7px; margin: 6px 0 26px; padding: 22px 6px 4px; align-items: flex-start; justify-content: center; overflow-x: auto; }
.pn-main .pref-map-bg { position: absolute; z-index: 0; inset: 0; background-image: url('/population/wp-content/uploads/2026/08/japan-map.png'); background-repeat: no-repeat; background-position: 80% 4%; background-size: contain; opacity: .16; pointer-events: none; }
.pn-main .pref-map-col { position: relative; z-index: 1; display: flex; flex: none; width: 72px; flex-direction: column; gap: 6px; transform: translateX(-140px); }
.pn-main .pref-map-item { display: flex; height: 28px; align-items: center; justify-content: center; padding: 0 4px; color: var(--ink-soft); background: #fff; border: 1px solid var(--line); border-bottom: 3px solid var(--line); border-radius: 5px; font-size: 12px; font-weight: 700; line-height: 1.2; text-align: center; text-decoration: none; transition: background .15s ease, color .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.pn-main .pref-map-item:hover, .pn-main .pref-map-item:focus-visible { color: #fff; background: var(--navy); border-color: var(--navy); transform: translateY(-2px); box-shadow: 0 5px 12px rgba(11,54,66,.28); }
.pn-main .pref-map-item--detached { border-style: dashed; border-bottom-style: solid; }
.pn-main .pref-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 9px; }
.pn-main .pref-card { position: relative; display: flex; min-height: 88px; padding: 13px 12px 10px; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; overflow: hidden; }
.pn-main .pref-card::after { position: absolute; right: -16px; bottom: -22px; width: 52px; height: 52px; background: var(--cyan-pale); border-radius: 50%; content: ""; transition: transform .2s ease; }
.pn-main .pref-card:hover { border-color: #a6d6dc; }
.pn-main .pref-card:hover::after { transform: scale(1.35); }
.pn-main .pref-code { color: #9aabad; font: 700 12px/1 var(--display); letter-spacing: .06em; }
.pn-main .pref-card strong { margin-top: 6px; font-size: 13px; line-height: 1.3; }
.pn-main .pref-card small { position: relative; z-index: 1; display: flex; margin-top: auto; justify-content: space-between; color: var(--muted); font-size: 12px; line-height: 1.3; }
.pn-main .pref-card small span { color: var(--cyan); }
.pn-main .pref-grid--page { grid-template-columns: repeat(5, 1fr); }

.pn-main .cta-block { display: flex; margin-top: 42px; padding: 28px 32px; align-items: center; justify-content: space-between; gap: 30px; color: #fff; background: linear-gradient(120deg, var(--navy-deep), #115a68); border-radius: 8px; box-shadow: var(--shadow); }
.pn-main .cta-block h2 { margin: 0 0 6px; font-size: 17px; }
.pn-main .cta-block > div > span { color: #c8e4e7; font-size: 12px; line-height: 1.5; }
.pn-main .cta-block-btn { position: relative; z-index: 1; flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; padding: 12px 18px; color: #fff; background: var(--coral); border-radius: 5px; font-size: 12px; font-weight: 800; text-decoration: none; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; animation: side-cta-pulse 2.6s ease-in-out infinite; }
.pn-main .cta-block-btn::before { position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(115deg, transparent, rgba(255,255,255,.55), transparent); content: ""; animation: side-cta-shine 3.2s ease-in-out infinite; }
.pn-main .cta-block-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,.22); animation-play-state: paused; }
.pn-main .cta-block-btn:hover::before { animation-play-state: paused; }
.pn-main .cta-block-btn-text { position: relative; z-index: 2; }
.pn-main .cta-block-btn-arrow { position: relative; z-index: 2; display: inline-block; transition: transform .25s ease; }
.pn-main .cta-block-btn:hover .cta-block-btn-arrow { transform: translateX(4px); }

.pn-main .page-title { position: relative; margin-bottom: 22px; padding: 26px 32px; color: #fff; background: var(--navy); border-radius: 8px; overflow: hidden; }
.pn-main .page-title::after { position: absolute; right: 40px; bottom: -105px; width: 210px; height: 210px; border: 30px solid rgba(255,255,255,.08); border-radius: 50%; content: ""; }
.pn-main .page-title h1 { position: relative; z-index: 1; margin: 0; font-size: 19px; letter-spacing: -.02em; }
.pn-main .page-title span { position: relative; z-index: 1; display: block; margin-top: 6px; color: #cce4e7; font-size: 12px; line-height: 1.5; }
.pn-main .page-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; align-items: start; gap: 28px; }
.pn-main .page-layout-main { min-width: 0; }
.pn-main .main-panel, .pn-main .detail-section { background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.pn-main .main-panel { padding: 0 20px 20px; min-width: 0; }
.pn-main .main-panel > .content-block:first-child > .section-head { box-sizing: border-box; min-height: 42px; align-items: center; }
.pn-main .main-panel .ranking-panel { border: 0; padding: 0; }
.pn-main .aggregate-summary { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; margin-bottom: 18px; padding: 16px 18px; align-items: center; gap: 12px 20px; background: var(--cyan-pale); border: 1px solid #b9dde0; border-radius: 7px; }
.pn-main .aggregate-summary strong { display: block; font-size: 14px; }
.pn-main .aggregate-summary p { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.pn-main .aggregate-summary > span { color: var(--navy); font: 750 16px/1 var(--display); white-space: nowrap; }
.pn-main .aggregate-summary > a { padding: 9px 11px; color: #fff; background: var(--navy); border-radius: 4px; font-size: 12px; font-weight: 800; text-decoration: none; white-space: nowrap; }

.pn-main .sidebar { position: sticky; top: var(--pn-sticky-offset, 20px); display: grid; gap: 16px; min-width: 0; }
.pn-main .side-widget { background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.pn-main .side-widget > .side-widget-title { display: flex; box-sizing: border-box; min-height: 42px; margin: 0; padding: 0 14px; align-items: center; color: #fff; background: var(--navy); border-radius: 7px 7px 0 0; font-size: 12px; }
.pn-main .side-widget > .search-box { width: auto; min-height: 42px; margin: 14px; box-shadow: none; border-color: var(--line-dark); }
.pn-main .search-box--compact input { padding-left: 34px; font-size: 12px; }
.pn-main .search-box--compact .search-icon { left: 11px; font-size: 16px; }
.pn-main .search-box--compact > button { width: 58px; font-size: 12px; }
.pn-main .side-cta { position: relative; padding: 20px 18px 18px; color: #fff; background: linear-gradient(145deg, var(--navy-deep), #126879); border-radius: 8px; overflow: hidden; }
.pn-main .side-cta::after { position: absolute; right: -35px; bottom: -50px; width: 130px; height: 130px; border: 22px solid rgba(255,255,255,.08); border-radius: 50%; content: ""; }
.pn-main .side-cta .side-cta-title { position: relative; z-index: 1; margin: 0 0 8px; font-size: 16px; line-height: 1.4; }
.pn-main .side-cta > span { position: relative; z-index: 1; display: block; color: #c5e3e6; font-size: 12px; line-height: 1.5; }
.pn-main .side-cta-btn { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 14px; padding: 12px 14px; color: #fff; background: var(--coral); border-radius: 4px; font-size: 12px; font-weight: 800; text-decoration: none; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; animation: side-cta-pulse 2.6s ease-in-out infinite; }
.pn-main .side-cta-btn::before { position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(115deg, transparent, rgba(255,255,255,.55), transparent); content: ""; animation: side-cta-shine 3.2s ease-in-out infinite; }
.pn-main .side-cta-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,.22); animation-play-state: paused; }
.pn-main .side-cta-btn:hover::before { animation-play-state: paused; }
.pn-main .side-cta-btn-text { position: relative; z-index: 2; }
.pn-main .side-cta-btn-arrow { position: relative; z-index: 2; display: inline-block; transition: transform .25s ease; }
.pn-main .side-cta-btn:hover .side-cta-btn-arrow { transform: translateX(4px); }
@keyframes side-cta-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(232, 117, 97, .55); } 50% { box-shadow: 0 0 0 7px rgba(232, 117, 97, 0); } }
@keyframes side-cta-shine { 0% { left: -60%; } 35%, 100% { left: 130%; } }
@media (prefers-reduced-motion: reduce) { .pn-main .side-cta-btn, .pn-main .side-cta-btn::before, .pn-main .cta-block-btn, .pn-main .cta-block-btn::before { animation: none; } }
.pn-main .side-banner { display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; line-height: 0; }
.pn-main .side-banner img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }
.pn-main .mini-ranking { padding: 4px 12px 8px; }
.pn-main .mini-ranking .rank-row { grid-template-columns: 26px minmax(0, 1fr) auto; min-height: 46px; gap: 7px; }
.pn-main .mini-ranking .rank-number { width: 25px; height: 25px; font-size: 12px; }
.pn-main .mini-ranking .rank-place strong { font-size: 12px; }
.pn-main .mini-ranking .rank-place small, .pn-main .mini-ranking .row-arrow { display: none; }
.pn-main .mini-ranking .rank-population b { font-size: 12px; }

.pn-main .detail-main { min-width: 0; }
.pn-main .detail-hero { position: relative; min-height: 210px; margin-bottom: 18px; padding: 32px 32px 24px; color: #fff; background: linear-gradient(125deg, var(--navy-deep), #0f5362 70%, #16899b); border-radius: 8px; box-shadow: var(--shadow); overflow: hidden; }
.pn-main .detail-maplines { position: absolute; inset: 0; opacity: .18; background-image: linear-gradient(30deg, transparent 42%, rgba(255,255,255,.45) 43% 44%, transparent 45%), linear-gradient(150deg, transparent 58%, rgba(255,255,255,.35) 59% 60%, transparent 61%); background-size: 180px 120px; }
.pn-main .detail-maplines::after { position: absolute; top: 36px; right: 50px; width: 110px; height: 110px; border: 24px solid rgba(255,255,255,.13); border-radius: 50%; box-shadow: 0 0 0 24px rgba(255,255,255,.07); content: ""; }
.pn-main .detail-hero h1 { position: relative; max-width: 650px; margin: 0; font-size: clamp(17px, 2.3vw, 25px); line-height: 1.3; letter-spacing: -.03em; }
.pn-main .detail-hero > p { position: relative; margin: 8px 0 0; color: #cbe6e9; font-size: 12px; line-height: 1.5; }
.pn-main .age-ribbon { position: relative; display: flex; width: min(500px, 100%); height: 9px; overflow: hidden; border-radius: 99px; background: #e5efed; }
.pn-main .age-ribbon i:nth-child(1) { background: var(--lime); }
.pn-main .age-ribbon i:nth-child(2) { background: var(--cyan-bright); }
.pn-main .age-ribbon i:nth-child(3) { background: var(--coral); }
.pn-main .age-ribbon i:nth-child(4) { background: #d7e2e0; }
.pn-main .age-legend { position: relative; display: flex; width: min(500px, 100%); margin-top: 7px; justify-content: space-between; color: #c8e3e6; font-size: 12px; }
.pn-main .age-legend--inline { flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 12px; line-height: 1.4; }

.pn-main .detail-section { margin-bottom: 16px; padding: 22px 22px; }
.pn-main .detail-section h3 { margin: 20px 0 8px; color: var(--ink-soft); font-size: 13px; line-height: 1.4; letter-spacing: -.005em; }
.pn-main .detail-section h3:first-child { margin-top: 0; }
.pn-main .population-lead .big-number { display: flex; align-items: baseline; gap: 8px; }
.pn-main .big-number strong { color: var(--navy); font: 750 clamp(28px, 4.7vw, 44px)/1 var(--display); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.pn-main .big-number span { color: var(--muted); font-size: 13px; }
.pn-main .population-lead > p, .pn-main .trend-sentence { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.pn-main .population-gender { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 8px 0 0; }
.pn-main .gender-item { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; line-height: 1.4; font-weight: 700; }
.pn-main .gender-item.is-male { color: var(--cyan); }
.pn-main .gender-item.is-female { color: var(--coral); }
.pn-main .icon-person { flex: none; }
.pn-main .detail-tags--inline { position: relative; display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; margin-bottom: 4px; }
.pn-main .detail-tags--inline span { padding: 6px 12px; color: var(--ink-soft); background: #eef4f3; border: 1px solid var(--line); border-radius: 99px; font-size: 14px; line-height: 1.2; font-weight: 700; }
.pn-main .detail-tags--inline span:first-child { color: #fff; background: var(--navy); border-color: var(--navy); }
.pn-main .detail-tags--inline .is-down { color: var(--coral); }

.pn-main .bar-chart { display: flex; height: 190px; margin-top: 12px; padding: 23px 10px 0; align-items: end; justify-content: space-around; gap: 8px; border-bottom: 1px solid var(--line-dark); background-image: linear-gradient(to bottom, #edf3f2 1px, transparent 1px); background-size: 100% 40px; }
.pn-main .bar-column { display: flex; width: 100%; height: 100%; flex-direction: column; justify-content: end; align-items: center; }
.pn-main .bar-column i { display: block; width: min(30px, 70%); min-height: 8px; background: linear-gradient(to top, var(--navy), var(--cyan)); border-radius: 3px 3px 0 0; }
.pn-main .bar-chart--future .bar-column i { background: linear-gradient(to top, #7fa328, var(--lime)); }
.pn-main .bar-column b { margin-top: 7px; color: var(--muted); font: 700 12px/1 var(--display); }
.pn-main .bar-value { margin-bottom: 5px; color: var(--ink-soft); font: 700 12px/1 var(--display); white-space: nowrap; }
.pn-main .section-note { margin: 15px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

.pn-main .milestone-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.pn-main .milestone-row { padding: 12px 13px; background: #f7faf9; border: 1px solid #e3ecea; border-radius: 6px; }
.pn-main .milestone-row h3 { margin: 0 0 6px; color: var(--muted); font-size: 12px; font-weight: 700; }
.pn-main .milestone-row p { margin: 0; color: var(--navy); font: 750 15px/1 var(--display); font-variant-numeric: tabular-nums; }

.pn-main .map-embed { position: relative; width: 100%; height: 320px; overflow: hidden; background: #e9f1ef; border: 1px solid var(--line); border-radius: 6px; }
.pn-main .map-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pn-main .map-link { display: inline-block; margin-top: 11px; color: var(--cyan); font-size: 12px; font-weight: 800; text-decoration: none; }
.pn-main .map-link:hover { text-decoration: underline; }
.pn-main .aggregate-note { margin: 0 0 16px; color: var(--muted); font-size: 12px; line-height: 1.5; }

.pn-main .metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.pn-main .metric-grid--3 { grid-template-columns: repeat(3, 1fr); }
.pn-main .metric-card { min-width: 0; padding: 14px 13px; background: #f7faf9; border: 1px solid #e3ecea; border-radius: 6px; }
.pn-main .metric-card p { margin: 0; color: #102f38; font-size: 14px; font-weight: 700; }
.pn-main .metric-card strong { display: inline-block; margin-top: 6px; font: 750 clamp(17px, 2vw, 22px)/1 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pn-main .metric-card span { margin-left: 3px; color: var(--muted); font-size: 12px; }
.pn-main .metric-card small { display: block; color: var(--muted); font-size: 12px; }
.pn-main .sex-balance { display: grid; grid-template-columns: auto 1fr 42px 1fr auto; margin-top: 13px; padding: 12px 15px; align-items: center; gap: 8px; background: #f8faf9; border-radius: 6px; color: var(--muted); font-size: 12px; }
.pn-main .sex-balance > div { height: 7px; background: #e5efed; border-radius: 99px; overflow: hidden; }
.pn-main .sex-balance > div i { display: block; height: 100%; background: var(--cyan); }
.pn-main .sex-balance > div:nth-of-type(2) i { margin-left: auto; background: var(--coral); }
.pn-main .sex-balance b { text-align: center; color: var(--ink-soft); font: 700 12px/1 var(--display); }

.pn-main .data-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 25px; }
.pn-main .data-row { display: flex; min-height: 44px; padding: 9px 2px; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 1px solid #e9efee; }
.pn-main .data-row span { color: #102f38; font-size: 14px; line-height: 1.4; }
.pn-main .data-row span small { display: block; color: #102f38; font-size: 14px; }
.pn-main .data-row strong { color: var(--navy); font: 700 13px/1 var(--display); }

.pn-main .peer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.pn-main .peer-grid a { display: grid; grid-template-columns: 1fr auto; padding: 12px 13px; gap: 2px 10px; background: #f7faf9; border: 1px solid #e3ecea; border-radius: 6px; text-decoration: none; }
.pn-main .peer-grid a:hover { background: var(--cyan-pale); border-color: #afd8dc; }
.pn-main .peer-grid strong { font-size: 14px; }
.pn-main .peer-grid span { color: var(--cyan); font: 700 12px/1.5 var(--display); }
.pn-main .peer-grid small { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }

@media (max-width: 980px) {
  .pn-main .pref-grid { grid-template-columns: repeat(4, 1fr); }
  .pn-main .page-layout { grid-template-columns: 1fr; }
  .pn-main .sidebar { position: static; grid-template-columns: 1fr 1fr; }
  .pn-main .side-widget:last-child { grid-column: 1 / -1; }
  .pn-main .mini-ranking { display: grid; grid-template-columns: 1fr 1fr; column-gap: 22px; }
  .pn-main .info-grid { grid-template-columns: 1fr 1fr; }
  .pn-main .about-grid { grid-template-columns: 1fr; gap: 16px; }
}

@media (max-width: 720px) {
  .pn-main .top-hero-inner { width: min(100% - 24px, 1040px); padding: 44px 0 40px; }
  .pn-main .top-hero h1 { font-size: 23px; }
  .pn-main .top-lead br { display: none; }
  .pn-main .route-note { display: none; }
  .pn-main .search-box { min-height: 50px; }
  .pn-main .search-box input { padding-left: 41px; font-size: 12px; }
  .pn-main .search-icon { left: 14px; }
  .pn-main .search-box > button { width: 68px; }
  .pn-main .stats-bar { width: 100%; grid-template-columns: repeat(3, 1fr); border: 0; }
  .pn-main .stats-bar > div { min-height: 74px; border-bottom: 1px solid var(--line); }
  .pn-main .stats-bar strong { font-size: 17px; }
  .pn-main .content-shell { width: min(100% - 20px, 1140px); padding: 26px 0 48px; }
  .pn-main .pref-map { justify-content: flex-start; margin: 6px -20px 22px; padding: 18px 20px 4px; }
  .pn-main .pref-map-col { width: 64px; transform: none; }
  .pn-main .pref-map-item { height: 26px; font-size: 12px; }
  .pn-main .nav-cards { grid-template-columns: 1fr; margin-bottom: 32px; }
  .pn-main .nav-cards > a { min-height: 0; }
  .pn-main .section-head { align-items: start; }
  .pn-main .section-head > span { display: none; }
  .pn-main .ranking-panel { display: block; padding: 7px 14px; }
  .pn-main .ranking-panel .rank-row:nth-last-child(2) { border-bottom: 1px solid #e9efee; }
  .pn-main .pref-grid, .pn-main .pref-grid--page { grid-template-columns: 1fr 1fr; }
  .pn-main .cta-block { display: block; padding: 24px 20px; }
  .pn-main .cta-block-btn { margin-top: 16px; }
  .pn-main .page-title { padding: 22px 20px; }
  .pn-main .page-title h1 { font-size: 16px; }
  .pn-main .main-panel { padding: 12px; }
  .pn-main .aggregate-summary { grid-template-columns: 1fr auto; }
  .pn-main .aggregate-summary > a { grid-column: 1 / -1; text-align: center; }
  .pn-main .sidebar { grid-template-columns: 1fr; }
  .pn-main .side-widget:last-child { grid-column: auto; }
  .pn-main .mini-ranking { display: block; }
  .pn-main .detail-hero { padding: 26px 18px 20px; }
  .pn-main .detail-maplines::after { right: -25px; }
  .pn-main .detail-hero h1 { font-size: 19px; }
  .pn-main .detail-section { padding: 18px 15px; }
  .pn-main .metric-grid, .pn-main .metric-grid--3 { grid-template-columns: 1fr 1fr; }
  .pn-main .bar-chart { height: 165px; padding-right: 2px; padding-left: 2px; gap: 3px; }
  .pn-main .bar-value { display: none; }
  .pn-main .bar-column i { width: 55%; }
  .pn-main .data-grid, .pn-main .peer-grid { grid-template-columns: 1fr; }
  .pn-main .milestone-grid { grid-template-columns: 1fr; }
  .pn-main .info-grid { grid-template-columns: 1fr; }
  .pn-main .map-embed { height: 260px; }
}

@media (prefers-reduced-motion: reduce) {
  .pn-main *, .pn-main *::before, .pn-main *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
