/* 집비 모바일 — 금융·공공 리포트 톤(브랜드 녹색 #11a85a — PC 와 같은 값).
   흰 상단 바 · 옅은 회색 바탕 · 테두리 있는 흰 카드(라운드 10px) · 라인 아이콘(Lucide, 1.75) · 하단 탭바.
   색 규칙: 비쌈/상승 = 빨강 ▲, 쌈/하락 = 파랑 ▼, 0% 로 반올림되면 회색·기호 없음.
   장기수선충당금은 많을수록 좋은 값이라 브랜드색(중립). 글꼴 SUIT Variable, 숫자 tabular-nums. */

:root {
  --bg: #f2f4f6;
  --card: #ffffff;
  --ink: #111827;
  --ink-2: #374151;
  --ink-3: #5b6472;
  --mute: #7b8494;
  --faint: #b4bac4;
  --line: #e3e6ea;
  --line-2: #eef0f3;
  --fill: #f4f5f7;
  --head: #f7f8fa;
  --brand: #11a85a;
  --brand-deep: #0a7f43;
  --brand-soft: #eef7f1;
  --brand-line: #cfe7d8;
  --up: #d93a3a;
  --up-soft: #fbeeee;
  --down: #2563d9;
  --down-soft: #edf2fc;
  --r: 10px;
  --r-s: 8px;
  --tab-h: 58px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "SUIT Variable", SUIT, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: -0.005em;
  word-break: keep-all;
  overflow-wrap: anywhere;
  padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom));
  -webkit-tap-highlight-color: transparent;
  font-feature-settings: "tnum" 1;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input { font: inherit; color: inherit; }
.num, .amt, input, .tabnum { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

/* 라인 아이콘(Lucide 계열) */
.ic {
  width: 18px; height: 18px; flex: none; display: inline-block; vertical-align: -3px;
  fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}

.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--mute); }
.good { color: var(--brand-deep); }

/* ── 상단 바 ───────────────────────────── */
.appbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 6px 0 16px;
  background: #fff; border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 7px; flex: none; }
.brand-logo { display: block; height: 25px; width: auto; }
.appbar-label {
  flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; color: var(--ink-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding-left: 10px; border-left: 1px solid var(--line);
}
.appbar-icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; color: var(--ink-2); }
.appbar-icon .ic { width: 22px; height: 22px; }

/* 상단 바 바로 아래 흰 띠(검색창·탭·빵부스러기) */
.subbar { background: #fff; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.subbar + .subbar { padding-top: 0; margin-top: -1px; border-top: 0; }
.subbar:has(+ .subbar) { border-bottom: 0; }

.searchbox {
  display: flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 4px 0 12px;
  background: #fff; border: 1px solid #d5d9df; border-radius: var(--r-s); color: var(--mute);
}
.searchbox .ic { width: 18px; height: 18px; }
.searchbox input {
  flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; outline: 0;
  font-size: 15px; color: var(--ink); -webkit-appearance: none; appearance: none;
}
.searchbox input::placeholder { color: var(--mute); }
.searchbox input::-webkit-search-cancel-button { display: none; }
.searchbox button {
  flex: none; height: 34px; padding: 0 14px; border: 0; border-radius: 6px;
  background: var(--brand); color: #fff; font-size: 13.5px; font-weight: 700; cursor: pointer;
}
.searchbox:focus-within { border-color: var(--ink-2); }

/* 가로 스크롤 탭(밑줄형) */
.pills {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  margin: 0 -16px; padding: 0 16px; scroll-padding: 0 16px;
}
.pills::-webkit-scrollbar { display: none; }
.pills a, .pills span {
  flex: none; display: inline-flex; align-items: center; gap: 5px;
  height: 32px; padding: 0 12px; border-radius: 6px;
  background: #fff; border: 1px solid var(--line); color: var(--ink-2);
  font-size: 13.5px; font-weight: 600; white-space: nowrap;
}
.pills .on { background: var(--ink); border-color: var(--ink); color: #fff; }
.pills .code { background: transparent; border: 0; padding: 0; min-width: 0; height: auto; color: inherit; font-size: 11px; font-weight: 700; opacity: .6; }

.crumbs { background: #fff; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.crumbs ol { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; white-space: nowrap; font-size: 12.5px; color: var(--mute); }
.crumbs ol::-webkit-scrollbar { display: none; }
.crumbs li + li::before { content: "/"; margin-right: 4px; color: var(--faint); }
.crumbs a { color: var(--ink-3); }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; }
.subbar + .crumbs { margin-top: -1px; padding-top: 0; }

/* ── 본문 · 카드 ───────────────────────── */
main { padding: 12px 12px 8px; display: flex; flex-direction: column; gap: 10px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 18px 16px;
  scroll-margin-top: 64px;
}
.card-h {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: -2px 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line-2);
}
.card-h h2, .card-h h1 {
  display: flex; align-items: center; gap: 8px; min-width: 0;
  font-size: 16px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.35;
}
.card-h h2 .ic, .card-h h1 .ic { color: var(--brand-deep); }
.card-h .sub {
  font-size: 12px; color: var(--ink-3); white-space: nowrap; flex: none;
  padding: 2px 7px; border: 1px solid var(--line); border-radius: 4px; background: var(--head);
  font-variant-numeric: tabular-nums;
}
.card-lede { font-size: 13px; color: var(--ink-3); margin: 0 0 14px; line-height: 1.6; }
.card h3 { font-size: 14.5px; font-weight: 700; margin: 18px 0 10px; }

.note { font-size: 12.5px; color: var(--mute); line-height: 1.6; }
.note a { color: var(--ink-3); text-decoration: underline; text-underline-offset: 2px; }
.card .note { margin-top: 12px; }
main > .note { padding: 0 4px; }

/* 출처·기준일 줄 */
.src {
  display: flex; align-items: flex-start; gap: 6px;
  margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line-2);
  font-size: 12px; color: var(--ink-3); line-height: 1.5; font-variant-numeric: tabular-nums;
}
.src .ic { width: 14px; height: 14px; margin-top: 2px; color: var(--mute); }
.src b { font-weight: 600; color: var(--ink-2); }
.src a { text-decoration: underline; text-underline-offset: 2px; }
main > .src { margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }

/* 넓은 버튼 */
.more-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; height: 44px; margin-top: 16px;
  background: #fff; border: 1px solid #d5d9df; border-radius: var(--r-s);
  font-size: 14px; font-weight: 600; color: var(--ink-2); cursor: pointer;
}
.more-btn::after {
  content: ""; width: 6px; height: 6px; margin-left: 2px;
  border-right: 1.75px solid currentColor; border-bottom: 1.75px solid currentColor;
  transform: rotate(-45deg);
}
.more-btn.down::after { transform: rotate(45deg) translate(-2px, -2px); }
.more-list { display: grid; gap: 8px; }
.more-list .more-btn { margin-top: 0; }

/* 요약 수치 칩 */
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 8px; border-radius: 4px; background: #fff; border: 1px solid var(--line);
  font-size: 12.5px; color: var(--ink-3); font-weight: 500; font-variant-numeric: tabular-nums;
}
.tag b { font-weight: 700; color: var(--ink); }
.tag.up { background: var(--up-soft); border-color: #f2d3d3; color: var(--up); }
.tag.down { background: var(--down-soft); border-color: #d3def5; color: var(--down); }
.tag.up b, .tag.down b { color: inherit; }

/* ── 요약(히어로) 카드 ───────────────────── */
.hero-eyebrow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12.5px; color: var(--ink-3); margin-bottom: 6px; font-weight: 500; }
.hero-eyebrow .ic { width: 14px; height: 14px; color: var(--brand-deep); }
.hero-eyebrow .dot { width: 1px; height: 10px; background: var(--line); }
.hero-title { font-size: 22px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.32; }
.hero-title em { font-style: normal; color: var(--brand-deep); }
.hero-addr { display: flex; gap: 5px; align-items: flex-start; font-size: 13px; color: var(--ink-3); margin-top: 6px; }
.hero-addr .ic { width: 14px; height: 14px; margin-top: 2px; color: var(--mute); }
.hero-lede { font-size: 14px; color: var(--ink-3); margin-top: 8px; line-height: 1.6; }

.bignum { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.bignum-label { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.bignum-label .note { font-weight: 500; }
.bignum-val { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.bignum-val .num { font-size: 32px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; }
.bignum-val .unit { font-size: 17px; font-weight: 700; margin-left: 1px; }
.bignum-val .delta { margin-left: 10px; font-size: 13px; font-weight: 700; }
.bignum + .tags { margin-top: 12px; }

/* 동네 순위 게이지 */
.rankbox { margin-top: 16px; padding: 14px; background: var(--head); border: 1px solid var(--line-2); border-radius: var(--r-s); }
.rankbox-t { font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.rankbox-t b { color: var(--ink); }
.gauge { margin-top: 14px; }
.gauge-track {
  position: relative; height: 6px; border-radius: 3px;
  background: linear-gradient(90deg, #c9d8f5 0%, #e3e6ea 50%, #f3cfcf 100%);
}
.gauge-track::after { content: ""; position: absolute; left: 50%; top: -4px; bottom: -4px; width: 1px; background: var(--ink-3); }
.gauge-pin {
  position: absolute; top: 50%; width: 14px; height: 14px; margin-left: -7px; margin-top: -7px;
  border-radius: 50%; background: var(--ink); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--ink); z-index: 1;
}
.gauge-scale { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11.5px; color: var(--mute); }
.gauge-scale span:first-child { color: var(--down); }
.gauge-scale span:last-child { color: var(--up); }

/* 키-값 두 칸(격자) */
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-s); overflow: hidden; margin-top: 14px; }
.kv > div { background: #fff; padding: 11px 12px; }
.kv dt { font-size: 12px; color: var(--mute); }
.kv dd { font-size: 16px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }
.kv dd small { font-size: 12.5px; font-weight: 500; color: var(--ink-3); margin-left: 1px; }

/* ── 3열 격자 표(지역) ───────────────────── */
.g3 {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line); border-radius: var(--r-s); overflow: hidden; background: #fff;
}
.g3 > * { display: block; min-width: 0; box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); }
.g3-n {
  display: block; padding: 7px 4px; background: var(--head); border-bottom: 1px solid var(--line-2);
  font-size: 12.5px; font-weight: 600; color: var(--ink-2); text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.g3-v { display: block; padding: 9px 4px 10px; text-align: center; font-variant-numeric: tabular-nums; }
.g3-v b { display: block; font-size: 15.5px; font-weight: 700; letter-spacing: -0.01em; }
.g3-v b small { font-size: 11.5px; font-weight: 500; color: var(--ink-3); margin-left: 1px; }
.g3-v .d { display: block; font-size: 12px; font-weight: 700; margin-top: 1px; }
.g3-v .s { display: block; font-size: 11px; color: var(--mute); margin-top: 1px; }
a.g3-c:active { background: var(--head); }
.g3-c.on .g3-n { background: var(--brand); color: #fff; }

/* ── 순위 목록 행 ───────────────────────── */
.rows > li + li, .rows > a + a { border-top: 1px solid var(--line-2); }
.row {
  display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  padding: 12px 0;
}
.row .rk {
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 4px;
  background: var(--fill); font-size: 12.5px; font-weight: 700; color: var(--ink-3); font-variant-numeric: tabular-nums;
}
.row .rk.top { background: var(--ink); color: #fff; }
.row.hit .rk { background: var(--brand-soft); color: var(--brand-deep); width: 26px; height: 26px; }
.row.hit .rk .ic { width: 16px; height: 16px; }
.row .nm { display: block; font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.row .sb { display: block; font-size: 12px; color: var(--mute); margin-top: 2px; }
.row .vl { text-align: right; font-variant-numeric: tabular-nums; }
.row .vl b { display: block; font-size: 15px; font-weight: 700; }
.row .vl small { display: block; font-size: 11.5px; color: var(--mute); }
.row .vl .d { font-size: 12px; font-weight: 700; }
.row.muted .nm { color: var(--ink-3); }
.row.muted .vl b { font-size: 12.5px; font-weight: 500; color: var(--mute); }
.row .meter { grid-column: 2 / 4; margin-top: -2px; }

/* 중앙값 대비 막대(가운데 눈금 = 기준) */
.meter { position: relative; height: 4px; border-radius: 1px; background: var(--line-2); }
.meter::after { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--ink-3); }
.meter i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 1px; background: #c2c8d0; }
.meter.up i { background: var(--up); }
.meter.down i { background: var(--down); }
.meter.good i { background: var(--brand); }

/* ── 명세서(bill) ───────────────────────── */
.flags { display: grid; gap: 14px; }
.flags h3 { display: flex; align-items: center; gap: 5px; margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--ink-3); }
.flags h3 .ic { width: 15px; height: 15px; }
.flag-list { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--r-s); overflow: hidden; }
.flag {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 42px; padding: 0 12px;
  font-size: 14px; font-weight: 600; background: #fff; color: var(--ink);
}
.flag + .flag { border-top: 1px solid var(--line-2); }
.flag .num { font-weight: 700; font-size: 13.5px; }
.flag.up .num { color: var(--up); }
.flag.down .num { color: var(--down); }

.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; color: var(--mute); margin: 0 0 6px; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 1px; margin-right: 4px; vertical-align: 0; }

.grp { border-top: 1px solid var(--line); }
.grp:first-of-type { border-top: 0; }
.card-h + .grp, .legend + .grp, .card-lede + .grp { border-top: 0; }
.grp > summary {
  list-style: none; cursor: pointer;
  display: grid; grid-template-columns: minmax(0, 1fr) auto 16px; gap: 2px 10px; align-items: center;
  padding: 14px 0;
}
.grp > summary::-webkit-details-marker { display: none; }
.grp > summary::after {
  content: ""; grid-column: 3; grid-row: 1 / 3; width: 7px; height: 7px; justify-self: center;
  border-right: 1.75px solid var(--ink-3); border-bottom: 1.75px solid var(--ink-3);
  transform: rotate(45deg) translate(-2px, -2px); transition: transform .15s;
}
.grp[open] > summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.grp-name { display: flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 700; }
.grp-name::before { content: ""; width: 3px; height: 14px; border-radius: 1px; background: var(--brand); flex: none; }
.grp-blurb { grid-column: 1 / 3; font-size: 12px; color: var(--mute); line-height: 1.45; padding-left: 10px; }
.grp-sum { text-align: right; font-variant-numeric: tabular-nums; }
.grp-sum .num { font-size: 15.5px; font-weight: 700; }
.grp-sum small { display: block; font-size: 11.5px; color: var(--mute); }
.grp-body { padding-bottom: 8px; }

.ln { padding: 12px 0 11px; border-top: 1px solid var(--line-2); }
.ln-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.code {
  display: inline-block; min-width: 32px; padding: 1px 4px; border-radius: 3px;
  background: #fff; border: 1px solid var(--line); color: var(--ink-3);
  font-size: 10.5px; font-weight: 700; letter-spacing: .02em; text-align: center; font-variant-numeric: tabular-nums;
}
.ln-name { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.ln-amt { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ln-amt small { font-size: 12px; font-weight: 500; color: var(--ink-3); }
.ln-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px;
  margin-top: 5px; padding-left: 40px; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums;
}
.ln-meta .d { margin-left: auto; font-weight: 700; font-size: 12.5px; }
.ln .meter { margin: 8px 0 0 40px; }
.ln-none { margin-left: auto; color: var(--faint); }
.ln-explain { margin: 6px 0 0 40px; font-size: 12px; color: var(--mute); line-height: 1.5; }

/* 합계 줄(고지서 하단) */
.receipt { font-variant-numeric: tabular-nums; border-top: 1px solid var(--line); }
.receipt > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: 14px; border-bottom: 1px solid var(--line-2); }
.receipt > div > span:first-child { color: var(--ink-3); }
.receipt > div > span:last-child { font-weight: 600; text-align: right; }
.receipt .total {
  margin-top: 0; padding: 12px 0; border-top: 1.5px solid var(--ink); border-bottom: 0;
  font-size: 15px;
}
.receipt .total > span:first-child { color: var(--ink); font-weight: 700; }
.receipt .total > span:last-child { font-size: 19px; font-weight: 800; }
.receipt .minus { border-bottom: 0; }
.receipt .minus > span { color: var(--mute) !important; font-size: 12.5px; }

/* 12개월 추이 */
.trend {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 5px;
  height: 150px; align-items: end; padding-top: 22px;
  border-bottom: 1px solid var(--line);
  background: repeating-linear-gradient(to top, transparent 0 31px, var(--line-2) 31px 32px);
}
.trend li { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 0; min-width: 0; }
.trend .col { position: relative; width: 100%; max-width: 18px; min-height: 3px; border-radius: 2px 2px 0 0; background: #cdd3da; }
.trend .on .col { background: var(--brand); }
.trend .on .col::after {
  content: attr(data-v); position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%);
  font-size: 11px; font-weight: 700; color: var(--brand-deep); white-space: nowrap;
}
.trend li { position: relative; }
.trend .lab { position: absolute; bottom: -20px; font-size: 10.5px; color: var(--mute); font-variant-numeric: tabular-nums; white-space: nowrap; }
.trend li:last-child .col::after { left: auto; right: 0; transform: none; }
.trend .on .lab { color: var(--ink); font-weight: 700; }
.trend { margin-bottom: 24px; }

.fold > summary { list-style: none; }
.fold > summary::-webkit-details-marker { display: none; }
.fold[open] > summary.more-btn::after { transform: rotate(-135deg) translate(-2px, -2px); }
.fold-body { margin-top: 8px; }

.kvlist > li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-2); font-size: 14px; font-variant-numeric: tabular-nums; }
.kvlist > li:first-child { border-top: 0; }
.kvlist > li > span:first-child { color: var(--ink-3); }
.kvlist > li > span:last-child { text-align: right; font-weight: 600; }
.kvlist small { color: var(--mute); font-weight: 500; }

/* 작년 같은 달 */
.yoy { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r-s); background: var(--head); border: 1px solid var(--line-2); }
.yoy .arrow { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; font-size: 15px; background: #fff; border: 1px solid var(--line); color: var(--mute); }
.yoy.up .arrow { color: var(--up); background: var(--up-soft); border-color: #f2d3d3; }
.yoy.down .arrow { color: var(--down); background: var(--down-soft); border-color: #d3def5; }
.yoy p { font-size: 14px; color: var(--ink-2); line-height: 1.6; }
.yoy.up b { color: var(--up); }
.yoy.down b { color: var(--down); }
.yoy + .receipt { margin-top: 12px; }

/* 장기수선충당금 */
.rs-big { display: flex; align-items: baseline; gap: 2px; margin: 4px 0 10px; font-variant-numeric: tabular-nums; }
.rs-big .num { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; color: var(--ink); }
.rs-big .unit { font-size: 16px; font-weight: 700; }
.rs-big small { margin-left: 8px; font-size: 12.5px; color: var(--mute); }
.rs-vs { margin-top: 12px; padding: 12px 14px; border-radius: var(--r-s); background: var(--brand-soft); border: 1px solid var(--brand-line); }
.rs-vs p { font-size: 13px; color: var(--ink-2); display: flex; justify-content: space-between; gap: 10px; font-variant-numeric: tabular-nums; }
.rs-vs p b { color: var(--brand-deep); }
.rs-vs .meter { margin-top: 10px; background: #fff; }

/* 계약·수선 이력 */
.wks { margin-top: 12px; border: 1px solid var(--line); border-radius: var(--r-s); overflow: hidden; background: #fff; }
.wk { padding: 11px 12px; }
.wk + .wk { border-top: 1px solid var(--line-2); }
.wk-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wk-date { font-size: 12px; color: var(--mute); font-variant-numeric: tabular-nums; }
.wk-amt { font-size: 14.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.wk-t { margin-top: 3px; font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.45; }
.wk-s { display: flex; align-items: center; gap: 4px; margin-top: 2px; font-size: 12px; color: var(--ink-3); }
.wk-s .ic { width: 13px; height: 13px; color: var(--mute); }
.wk-badge { flex: none; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--brand-line); background: var(--brand-soft); color: var(--brand-deep); font-size: 11px; font-weight: 700; }
.fold .wks.fold-body { margin-top: 8px; }

/* 평형별 */
.areas { border: 1px solid var(--line); border-radius: var(--r-s); overflow: hidden; }
.areas > li { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 11px 12px; border-top: 1px solid var(--line-2); }
.areas > li:first-child { border-top: 0; }
.areas .py { font-size: 13px; color: var(--ink-3); }
.areas .py b { font-size: 19px; font-weight: 800; color: var(--ink); }
.areas .ar { font-size: 13px; color: var(--ink-2); line-height: 1.4; }
.areas .ar small { color: var(--mute); font-size: 11.5px; }
.areas .est { text-align: right; font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.areas .est b { font-size: 16px; font-weight: 700; color: var(--ink); }

/* 다른 달 */
.months { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-s); overflow: hidden; }
.months a {
  display: grid; place-items: center; height: 38px;
  background: #fff; font-size: 13px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums;
}
.months a.on { background: var(--ink); color: #fff; }

.notice {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 10px; align-items: center;
  padding: 12px 14px; border-radius: var(--r); background: var(--down-soft); border: 1px solid #d3def5; color: var(--ink-2); font-size: 13.5px;
}
.notice a { color: var(--down); font-weight: 700; }

/* 단지 정보 */
.facts { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: var(--r-s); overflow: hidden; background: #fff; }
.facts > div { min-width: 0; padding: 10px 12px; box-shadow: 1px 0 0 var(--line-2), 0 1px 0 var(--line-2); }
.facts .wide { grid-column: 1 / -1; }
.facts dt { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--mute); }
.facts dt .ic { width: 14px; height: 14px; color: var(--ink-3); }
.facts dd { font-size: 14.5px; font-weight: 600; margin-top: 3px; font-variant-numeric: tabular-nums; line-height: 1.45; }
.facts dd small { font-weight: 500; color: var(--mute); font-size: 12px; }

/* 링크 목록(카드 안 행) */
.linkrows > a {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 0; border-top: 1px solid var(--line-2); font-size: 14.5px; font-weight: 600;
}
.linkrows > a:first-child { border-top: 0; padding-top: 2px; }
.linkrows > a > span { flex: 1; min-width: 0; }
.linkrows > a > .lic {
  flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px;
  background: var(--brand-soft); color: var(--brand-deep);
}
.linkrows > a > .lic .ic { width: 18px; height: 18px; }
.linkrows > a::after {
  content: ""; flex: none; width: 6px; height: 6px; margin-right: 4px;
  border-right: 1.75px solid var(--faint); border-bottom: 1.75px solid var(--faint); transform: rotate(-45deg);
}
.linkrows small { display: block; font-size: 12px; font-weight: 500; color: var(--mute); margin-top: 2px; }

/* 항목 사전 */
.dict > a {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 8px; align-items: center;
  padding: 12px 0; border-top: 1px solid var(--line-2);
}
.dict > a:first-child { border-top: 0; }
.dict .t { font-size: 14.5px; font-weight: 600; }
.dict .v { font-size: 14.5px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.dict .v small { font-size: 11px; font-weight: 500; color: var(--mute); margin-left: 1px; }
.dict .v.go { width: 6px; height: 6px; border-right: 1.75px solid var(--faint); border-bottom: 1.75px solid var(--faint); transform: rotate(-45deg); margin-right: 4px; }
.dict .x { grid-column: 2 / 4; font-size: 12px; color: var(--mute); line-height: 1.5; font-variant-numeric: tabular-nums; }

/* 칩(같은 묶음 항목) */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 12px;
  border-radius: 6px; background: #fff; border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; color: var(--ink-2);
}
.chip .code { background: transparent; border: 0; padding: 0; min-width: 0; font-size: 11px; opacity: .7; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.on .code { color: #fff; }

/* 계산기 */
.calc-cards { display: grid; gap: 10px; }
.calc-card { display: block; }
.calc-card .ic-box {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; margin-bottom: 12px;
  background: var(--brand-soft); color: var(--brand-deep); border: 1px solid var(--brand-line);
}
.calc-card .ic-box .ic { width: 22px; height: 22px; }
.calc-card.b .ic-box { background: var(--head); color: var(--ink-2); border-color: var(--line); }
.calc-card h2, .calc-card h3 { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.calc-card p { font-size: 13.5px; color: var(--ink-3); margin-top: 6px; line-height: 1.6; }
.calc-card .more-btn { margin-top: 16px; background: var(--brand); border-color: var(--brand); color: #fff; }

.field { display: grid; gap: 7px; }
.field + .field, .field + .check { margin-top: 16px; }
.field label, .field .lab { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.field .in { position: relative; }
.field input[type=text] {
  width: 100%; height: 52px; padding: 0 44px 0 14px; border: 1px solid #d5d9df; border-radius: var(--r-s);
  background: #fff; font-size: 19px; font-weight: 700; letter-spacing: -0.01em; -webkit-appearance: none; appearance: none;
  text-align: right;
}
.field input[type=text]:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(17,168,90,.12); }
.field .suffix { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-weight: 600; color: var(--ink-3); font-size: 15px; }
.field .hint { font-size: 12px; color: var(--mute); }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid #d5d9df; border-radius: var(--r-s); overflow: hidden; }
.seg label { position: relative; }
.seg label + label { border-left: 1px solid #d5d9df; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.seg span {
  display: grid; place-items: center; height: 42px;
  background: #fff; font-size: 14.5px; font-weight: 600; color: var(--ink-2); cursor: pointer;
}
.seg input:checked + span { background: var(--ink); color: #fff; }
.seg input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: -2px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink-2); }
.check input { width: 18px; height: 18px; accent-color: var(--brand); margin: 0; }
form[data-kind="sale"] .only-monthly, form[data-kind="jeonse"] .only-monthly { display: none; }
form[data-kind="monthly"] .only-price { display: none; }
.calc-form { display: flex; flex-direction: column; gap: 10px; }
.result { border-top: 3px solid var(--brand); }
.result .bignum { margin-top: 0; padding-top: 0; border-top: 0; }
.result .bignum-label { display: flex; align-items: center; gap: 6px; }
.result .bignum-label .ic { width: 16px; height: 16px; color: var(--brand-deep); }
.result .bignum-val .num { color: var(--ink); }
.result .receipt { margin-top: 14px; }
.noteline { font-size: 12px; color: var(--mute); margin-top: 8px; }
.noteline:empty { display: none; }

.rates { border: 1px solid var(--line); border-radius: var(--r-s); overflow: hidden; font-size: 13px; }
.rates > div { display: grid; grid-template-columns: minmax(0, 1.6fr) 1fr 1fr; }
.rates > div + div { border-top: 1px solid var(--line-2); }
.rates span { padding: 9px 10px; }
.rates span + span { border-left: 1px solid var(--line-2); text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }
.rates .head { background: var(--head); }
.rates .head span { font-size: 12px; font-weight: 600; color: var(--ink-3); padding: 7px 10px; }
.rates-h { font-size: 13.5px !important; margin: 16px 0 8px !important; color: var(--ink-2); }
.card-h + .rates-h { margin-top: 0 !important; }

/* 페이지 머리(지역·항목 등 목록 화면의 첫 카드) */
.page-eyebrow { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--brand-deep); font-weight: 700; margin-bottom: 6px; }
.page-eyebrow .ic { width: 14px; height: 14px; }
.page-title { font-size: 21px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.34; }
.page-lede { font-size: 13.5px; color: var(--ink-3); margin-top: 8px; line-height: 1.65; }

/* 빈 상태 */
.empty { text-align: center; padding: 30px 18px; }
.empty > .ic { width: 28px; height: 28px; color: var(--faint); margin: 0 auto 10px; display: block; }
.empty b { display: block; font-size: 15px; margin-bottom: 8px; }

/* 안내문 */
.prose { font-size: 14.5px; line-height: 1.75; color: var(--ink-2); }
.prose h2 { font-size: 16px; color: var(--ink); margin: 24px 0 8px; font-weight: 700; padding-bottom: 6px; border-bottom: 1px solid var(--line-2); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 15px; color: var(--ink); margin: 18px 0 6px; }
.prose p + p { margin-top: 10px; }
.prose ul, .prose ol { margin: 8px 0; padding-left: 18px; list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 6px; }
.prose strong { color: var(--ink); }
.prose a { color: var(--brand-deep); text-decoration: underline; text-underline-offset: 2px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 10px 0; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 7px 8px; text-align: left; }
.prose th { background: var(--head); }
.prose dl { margin: 10px 0; }
.prose dt { font-weight: 700; color: var(--ink); margin-top: 12px; }
.prose dd { margin: 2px 0 0; }

/* ── 푸터 ─────────────────────────────── */
.foot { margin-top: 8px; padding: 22px 18px 28px; font-size: 12px; color: var(--mute); line-height: 1.6; border-top: 1px solid var(--line); background: #fff; }
.foot-brand { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 800; color: var(--ink-2); letter-spacing: -0.02em; }
.foot-brand span { font-size: 12px; font-weight: 500; color: var(--mute); letter-spacing: 0; }
.foot-src { display: flex; gap: 5px; align-items: flex-start; margin-top: 8px; color: var(--ink-3); }
.foot-src .ic { width: 14px; height: 14px; margin-top: 2px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 0; margin-top: 12px; }
.foot-links li + li::before { content: ""; display: inline-block; width: 1px; height: 10px; background: var(--line); margin: 0 10px; vertical-align: -1px; }
.foot-links a { color: var(--ink-2); font-weight: 600; }
.foot-view { display: flex; gap: 8px; align-items: center; margin-top: 14px; }
.foot-view .ic { width: 14px; height: 14px; }
.foot-view a { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-3); text-decoration: underline; text-underline-offset: 2px; }
.foot-view b { color: var(--ink-2); font-weight: 600; }
.foot-org { margin-top: 10px; color: var(--faint); }

/* ── 하단 탭바 ───────────────────────── */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tab-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: #fff; border-top: 1px solid var(--line);
}
.tabs a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: #8a929e; font-size: 11px; font-weight: 500; }
.tabs .ic { width: 23px; height: 23px; }
.tabs a.on { color: var(--brand-deep); font-weight: 700; }
.tabs a.on::before { content: ""; position: absolute; top: -1px; left: 50%; width: 28px; margin-left: -14px; height: 2px; background: var(--brand); }
.tabs a.on .ic { stroke-width: 2; }

@media (min-width: 560px) {
  body { max-width: 520px; margin: 0 auto; }
  .tabs { max-width: 520px; margin: 0 auto; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* 명세서는 "내가 받은 고지서" 처럼 — 줄마다 세대당(우리 집 몫)을 크게, 단지 총액은 작게(2026-09-29 사용자 피드백) */
.ln-amt { font-size: 17px; font-weight: 800; color: var(--ink); }
.grp-sum .num { font-size: 17px; font-weight: 800; }
.grp-sum small { font-size: 11.5px; font-weight: 400; color: var(--ink-3, #8b95a1); }

/* 시세 동향 · 예상 재산세 */
.trend-kpi { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.trend-kpi div { border: 1px solid var(--line, #e5e8eb); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.trend-kpi span { font-size: 12px; color: var(--ink-3, #8b95a1); }
.trend-kpi b { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.trend-kpi b.up { color: #e5383b; } .trend-kpi b.down { color: #2f6fed; }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 40px; margin: 12px 0 4px; }
.spark i { flex: 1; background: #c9d2dc; border-radius: 2px 2px 0 0; min-height: 3px; }
.spark i:last-child { background: var(--brand, #11a85a); }

/* ── 아파트 밖 집(연립·다세대·오피스텔 · 읍면동 허브 · 재산세 계산기) ── */
.emd-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; list-style: none; margin: 10px 0 0; padding: 0; }
.emd-grid a { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-s); color: var(--ink); text-decoration: none; background: var(--card); }
.emd-grid b { font-size: 14px; font-weight: 700; }
.emd-grid span { font-size: 12px; color: var(--mute); }
.pager { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.pager a, .pager span { min-width: 34px; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--r-s); text-align: center; font-size: 13px; color: var(--ink); text-decoration: none; }
.pager .on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; }
.unit-find { width: 100%; padding: 10px 12px; margin: 8px 0; border: 1px solid var(--line); border-radius: var(--r-s); font: inherit; font-size: 15px; }
.units { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.units th, .units td { padding: 7px 4px; border-bottom: 1px solid var(--line-2); text-align: left; }
.units .r { text-align: right; }
.calc-tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 12px; }
.calc-tabs button { flex: none; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); font: inherit; font-size: 13px; color: var(--ink-2); }
.calc-tabs button.on { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 700; }
.hform label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 10px 0 4px; }
.hform input, .hform select { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-s); font: inherit; font-size: 15px; background: var(--card); }
.hform .chk { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.hform .chk input { width: auto; }
.hform button[type=submit], .hform .btn { width: 100%; margin-top: 12px; padding: 12px; border: 0; border-radius: var(--r-s); background: var(--brand); color: #fff; font: inherit; font-weight: 700; font-size: 15px; }
.pick-list { list-style: none; margin: 8px 0 0; padding: 0; }
.pick-list button { width: 100%; text-align: left; padding: 10px 12px; margin-top: 6px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--card); font: inherit; font-size: 14px; }
.hresult { margin-top: 14px; }
.hresult .tbl, .offi-tax .tbl { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.hresult .tbl th, .hresult .tbl td, .offi-tax .tbl th, .offi-tax .tbl td { padding: 8px 4px; border-bottom: 1px solid var(--line-2); text-align: left; font-weight: 500; }
.hresult .tbl .r, .offi-tax .tbl .r { text-align: right; }
.hresult .tbl .tot th, .hresult .tbl .tot td, .offi-tax .tbl .tot th, .offi-tax .tbl .tot td { border-top: 2px solid var(--ink); font-weight: 700; }
.hresult .sub, .offi-tax .sub { display: block; font-size: 11.5px; color: var(--mute); }
.note-s { font-size: 12.5px; color: var(--mute); margin-top: 10px; }

/* 워드마크 — PC 와 같은 구성, 크기만 작게 */
.brand { text-decoration: none; }
.wordmark { display: inline-flex; align-items: baseline; gap: 3px; white-space: nowrap; line-height: 1; letter-spacing: -0.045em; }
.wm-old { position: relative; font-size: 12.5px; font-weight: 700; color: var(--mute); }
.wm-old::after { content: ""; position: absolute; left: -2px; right: -2px; top: 50%; height: 2px; border-radius: 2px; background: #e5484d; transform: rotate(-8deg); }
.wm-mid { font-size: 10.5px; font-weight: 600; color: var(--mute); letter-spacing: -0.02em; }
.wm-new { font-size: 18px; font-weight: 900; color: var(--brand); }
