/* 여백·글자 크기 토큰. 어두운 화면, 큰 제목, 지도는 글자 아래에 둔다. */
:root {
  --s-1: 8px; --s-2: 12px; --s-3: 16px; --s-4: 24px; --s-5: 40px; --s-6: 64px;
  --t-xs: 12px; --t-sm: 14px; --t-md: 17px; --t-lg: 22px; --t-xl: 32px; --t-2xl: 48px; --t-3xl: 64px;
  --ink: #f4f7fb; --muted2: #a9b4c0; --card: #10161c; --line2: #24303a;
}
html, body { overflow-x: clip; max-width: 100%; }
body { font-size: var(--t-md); }

/* 홈: 제목은 지도 위, 지도가 첫 화면의 큰 부분을 차지. 카드는 지도 아래. */
@media (max-width: 899px) {
  body[data-page="home"] #dive { display: flex !important; flex-direction: column; }
  body[data-page="home"] #dive .dv-h1 { order: 0 !important; position: relative !important; top: auto !important; left: auto !important; right: auto !important; width: auto !important; }
  body[data-page="home"] #dive .dv-map { order: 1 !important; position: relative !important; inset: auto !important; }
  body[data-page="home"] #dive .maplg { order: 2 !important; }
  body[data-page="home"] #dive .pd { order: 3 !important; }
  body[data-page="home"] #dive .dv-q { order: 4 !important; position: relative !important; top: auto !important; left: auto !important; right: auto !important; width: auto !important; margin: 8px 12px !important; }
  body[data-page="home"] #dive .dv-sug { order: 5 !important; position: relative !important; top: auto !important; left: auto !important; right: auto !important; width: auto !important; margin: 0 12px 8px !important; }
  body[data-page="home"] #dive .modebar { order: 6 !important; }
  body[data-page="home"] #dive .dv-down,
  body[data-page="home"] #dive .dv-miss,
  body[data-page="home"] #dive .dv-strip { order: 7 !important; }
  body[data-page="home"] #dive .dv-sheet { order: 8 !important; position: relative !important; top: auto !important; left: auto !important; right: auto !important; width: auto !important; max-height: none !important; }
  body[data-page="home"] #dive .dv-map {
    height: 50dvh !important;
    min-height: 300px !important;
    max-height: none !important;
    border-radius: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
  }
}
body[data-page="home"] #dive .dv-h1 {
  font-size: 28px !important;
  line-height: 1.15 !important;
  letter-spacing: -.03em;
  font-weight: 800;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  text-shadow: none !important;
  padding: 8px 16px 6px !important;
  margin: 0 !important;
}
@media (min-width: 900px) {
  body[data-page="home"] #dive .dv-h1 { font-size: 48px !important; line-height: 1.08 !important; padding: 8px 4px 12px !important; }
  body[data-page="home"] #dive .dv-lc { display: flex; flex-direction: column; }
  body[data-page="home"] #dive .dv-lc > .dv-map { order: 1 !important; }
  body[data-page="home"] #dive .dv-lc > .maplg { order: 2 !important; }
  body[data-page="home"] #dive .dv-lc > .modebar { order: 3 !important; }
  body[data-page="home"] #dive .dv-lc > .pd { order: 4 !important; }
  body[data-page="home"] #dive .dv-lc > .dv-q { order: 5 !important; position: relative !important; top: auto !important; left: auto !important; right: auto !important; width: auto !important; margin: 8px 0 0 !important; }
  body[data-page="home"] #dive .dv-lc > .dv-sug { order: 6 !important; position: relative !important; top: auto !important; }
  body[data-page="home"] #dive .dv-map,
  body[data-page="home"] #dive.dv-pc .dv-lc > .dv-map {
    height: 52dvh !important;
    min-height: 420px !important;
    max-height: 560px !important;
  }
}

.stat .v, #hero-num #nat-total, .nw .big {
  font-size: clamp(42px, 12vw, 76px) !important;
  letter-spacing: -.04em;
  line-height: 1.05;
}
.stat { padding: var(--s-4) 0; }
.stat .k { font-size: var(--t-sm); color: var(--muted2); font-weight: 600; }
body[data-page="city"] .hero { padding-top: var(--s-4); padding-bottom: var(--s-3); }
body[data-page="city"] h1, body[data-page="national"] h1 { font-size: clamp(34px, 8vw, 64px); letter-spacing: -.03em; line-height: 1.12; }
body[data-page="national"] .lede { font-size: 18px; line-height: 1.5; max-width: 40rem; }
body[data-page="national"] section { padding: var(--s-4); margin: var(--s-4) 0; }
body[data-page="national"] .nw { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
.nw, .n-wrap { overflow-wrap: anywhere; }
.nw table { max-width: 100%; }

/* 뉴스 · 기사 · 원칙 · 국민연금 */
.n-wrap { max-width: 760px; margin: 0 auto; padding: 8px 16px 32px; }
.n-wrap h1 { font-size: clamp(32px, 8vw, 56px); line-height: 1.15; letter-spacing: -.03em; margin: 8px 0 12px; }
.eyebrow, .nhero-k, .nnext-k { color: #ffb020; font-weight: 800; font-size: 13px; letter-spacing: .04em; margin: 0; }
.nhero {
  display: grid; gap: 8px; margin: 8px -16px 18px; padding: 28px 20px 24px;
  text-decoration: none; color: inherit;
  background: radial-gradient(90% 80% at 100% 0%, #1c3148 0%, transparent 60%), linear-gradient(180deg, #141c26, #0b0f13);
  border-bottom: 1px solid var(--line2);
}
.nhero .ntitle { font-size: clamp(28px, 7vw, 44px); font-weight: 800; letter-spacing: -.03em; line-height: 1.2; }
.nhero .nsum, .akey { font-size: clamp(18px, 4.5vw, 24px); line-height: 1.45; font-weight: 700; margin: 8px 0; }
.nmeta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; color: var(--muted2); }
.ntag, .namt { display: inline-flex; align-items: center; min-height: 28px; padding: 2px 8px; border-radius: 99px; background: #1a2430; color: #d6e2ee; font-size: 13px; font-weight: 700; }
.namt { background: #2a2112; color: #ffb020; }
.nmore, .map-go, .xshare, .ncard-more a, .prin-link a {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px;
  border-radius: 12px; background: #f4f7fb; color: #111; font-weight: 800; text-decoration: none; font-size: 15px;
}
.nchips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.nchip { min-height: 44px; padding: 0 12px; border-radius: 99px; border: 1px solid #2a3544; background: #10161c; color: #e8eef5; font: 700 14px var(--sans, system-ui); }
.nchip.on { background: #ffb020; color: #14110a; border-color: #ffb020; }
.ncard { margin: 10px 0; border: 1px solid var(--line2); border-radius: 16px; background: var(--card); overflow: hidden; }
.ncard-btn { display: grid; gap: 6px; width: 100%; text-align: left; padding: 14px; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.ncard .ntitle { font-size: 18px; font-weight: 800; line-height: 1.35; }
.ncard .nsum { font-size: 15px; color: #c5d0da; }
.ncard-more { padding: 0 14px 14px; }
.ncard-more p { font-size: 16px; line-height: 1.55; margin: 0 0 8px; }
.ncard-link { display: grid; gap: 6px; padding: 14px; text-decoration: none; color: inherit; }
.nhint, .nempty2, .adate { color: var(--muted2); font-size: 14px; }
.abody p { font-size: 17px; line-height: 1.7; margin: 0 0 14px; }
.asrc { padding-left: 18px; display: grid; gap: 8px; margin: 12px 0; }
.asrc a { font-size: 15px; }
.donate-box, .donate-mini-block { margin: 20px 0; padding: 16px; border: 1px dashed #8b97a5; border-radius: 16px; }
.donate-box p { margin: 0 0 8px; font-size: 16px; }
.donate-btn { width: 100%; min-height: 48px; border-radius: 999px; border: 1px solid #ffb020; background: transparent; color: #ffb020; font: 800 16px var(--sans, system-ui); }
.donate-btn span, .prep { color: #ffb020; font-size: 13px; font-weight: 800; }
.prin { padding-bottom: 24px; }
.prin h1 { font-size: clamp(32px, 8vw, 52px); letter-spacing: -.03em; line-height: 1.15; }
.prin h2 { font-size: 22px; margin: 22px 0 8px; }
.prin p, .prin li { font-size: 17px; line-height: 1.6; }
.prep-box { padding: 16px; border-radius: 16px; background: #141b24; border: 1px solid #2a3544; }
.corr { padding: 12px 0; border-top: 1px solid #24303a; }
.corr b { display: block; font-size: 16px; }
.corr p { margin: 4px 0 0; font-size: 15px; color: #c5d0da; }
.nps-page h1 { font-size: clamp(32px, 8vw, 56px); letter-spacing: -.03em; }
.nps-page .lede { font-size: 18px; color: #c5d0da; }
#nps-root .fun-num { font-size: clamp(40px, 10vw, 68px); font-weight: 800; letter-spacing: -.04em; margin: 8px 0; }
.maplg { position: relative; z-index: 2; }

/* 탭 맨 위 지도. 390×660 첫 화면의 약 절반. 범례는 지도 아래, 글자는 12px 이상. */
.topmap-h {
  margin: 8px 16px 8px !important;
  font-size: 28px !important;
  font-weight: 800 !important;
  letter-spacing: -.03em;
  line-height: 1.15 !important;
  color: #f4f7fb;
}
.tm-map {
  height: 50dvh;
  min-height: 300px;
  background: #0b0f13;
  position: relative;
  z-index: 0;
}
.topmap .maplg, #s5 .maplg {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin: 8px 16px 0; padding: 0; background: none; border: 0;
  color: #d5dde6; font: 700 12px/1.4 Pretendard, system-ui, sans-serif;
  white-space: normal; position: relative; z-index: 2;
}
.topmap .lg-dot, #s5 .lg-dot {
  width: 12px; height: 12px; border-radius: 50%; background: #0a84ff;
  border: 1.5px solid #fff; box-sizing: border-box; display: inline-block; flex: none;
}
.tm-line { margin: 6px 16px 0; font-size: 14px; font-weight: 700; line-height: 1.45; color: #f4f7fb; }
.tm-line a { color: #ffb020; font-weight: 800; }
.tm-map .leaflet-container { font: 12px/1.35 Pretendard, system-ui, sans-serif; background: #0b0f13; }
.tm-map .leaflet-tooltip.klab {
  background: rgba(8, 11, 15, .88) !important; color: #f4f8fc !important;
  font-size: 12px !important; font-weight: 700 !important; line-height: 1.35 !important;
  padding: 1px 5px !important; border: 0 !important; border-radius: 5px !important; box-shadow: none !important;
}
.tm-map .leaflet-tooltip.klab::before { display: none; }
.tm-map .leaflet-control-attribution, .tm-map .leaflet-control-attribution a {
  font-size: 12px !important; line-height: 1.35 !important; background: rgba(0, 0, 0, .55) !important; color: #c5d0da !important;
}
.tm-map .leaflet-bar a { width: 44px; height: 44px; line-height: 44px; font-size: 18px; }
@media (max-width: 899px) {
  .tm-map {
    width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); border-radius: 0;
  }
}
@media (min-width: 900px) {
  .topmap-h { font-size: 40px !important; margin-left: 0 !important; margin-right: 0 !important; }
  .topmap .maplg, .topmap .tm-line, #s5 .maplg, #s5 .tm-line { margin-left: 0; margin-right: 0; }
  .tm-map { height: 52dvh; min-height: 420px; max-height: 560px; border-radius: 16px; width: 100%; margin-left: 0; }
}
body[data-page="home"] #dive .maplg {
  flex-wrap: wrap !important; white-space: normal !important;
  font-size: 12px !important; line-height: 1.35 !important;
}
body[data-page="home"] #dive > .ticker { order: 9 !important; position: relative !important; top: auto !important; }

/* 2026-10-24: 홈 총액이 지도 카드와 이 칸에 두 번 나와 번잡했다. 지도 카드의 총액만 남기고 이 칸은 분야 고르기만 둔다. */
body[data-page="home"] #hero-num > .v, body[data-page="home"] #hero-num > .k { display: none !important; }
.hero-pick { margin: 0 0 6px; font-size: 13px; color: #9aa6b2; text-align: center; }
body:not([data-page="home"]) .hero-pick { display: none; }
