/* APT RADAR v2 — graphite ink on warm paper (ChatGPT reference) · light/dark */
:root {
  --paper: #ffffff;
  --mist: #f9f9f9;
  --ink: #0d0d0d;
  --ash: #5d5d5d;
  --hollow: #8f8f8f;
  --hairline: rgba(0, 0, 0, 0.1);
  --veil: rgba(0, 0, 0, 0.05);
  --edge: #e6e6e6;
  --scrim: rgba(0, 0, 0, 0.5);
  --press: #000000;
  --on-press: #ffffff;
  /* 등급·데이터 컬러 (color = data) */
  --good: #1a7f37;
  --warn: #b58a00;
  --bad: #b3261e;
  --mark: #c8890a;
  --mark-bg: rgba(200, 137, 10, 0.12);
  --good-bg: rgba(26, 127, 55, 0.08);
  --warn-bg: rgba(181, 138, 0, 0.1);
  --bad-bg: rgba(179, 38, 30, 0.08);
  --bar: #0d0d0d;

  --font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
    'Apple SD Gothic Neo', Pretendard, 'Noto Sans KR', Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --r: 10px;
  --r-pill: 999px;
  --max-w: 1240px;
}
[data-theme='dark'] {
  --paper: #212121;
  --mist: #171717;
  --ink: #ececec;
  --ash: #b4b4b4;
  --hollow: #8f8f8f;
  --hairline: rgba(255, 255, 255, 0.12);
  --veil: rgba(255, 255, 255, 0.06);
  --edge: #3a3a3a;
  --scrim: rgba(0, 0, 0, 0.65);
  --press: #ececec;
  --on-press: #171717;
  --good: #58b378;
  --warn: #d9b23d;
  --bad: #e07a73;
  --mark: #e0a93a;
  --mark-bg: rgba(224, 169, 58, 0.14);
  --good-bg: rgba(88, 179, 120, 0.12);
  --warn-bg: rgba(217, 178, 61, 0.12);
  --bad-bg: rgba(224, 122, 115, 0.12);
  --bar: #ececec;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: -0.01em;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s, color 0.25s;
}
::selection { background: var(--ink); color: var(--paper); }
.mono { font-family: var(--mono); }
.muted { color: var(--ash); }
.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }
a { color: var(--ink); }

/* ---------- top bar ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.nav-in {
  max-width: var(--max-w); margin: 0 auto; padding: 10px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { font-weight: 600; font-size: 15px; text-decoration: none; letter-spacing: -0.01em; display: inline-flex; align-items: center; gap: 8px; }
.brand-logo { width: 22px; height: 22px; flex-shrink: 0; }
.brand-logo rect { fill: var(--ink); }
.brand-logo path { stroke: var(--paper); }
.brand span { color: var(--hollow); font-weight: 400; }
.nav-links { display: flex; gap: 2px; }
.nav-links a {
  font-size: 14px; color: var(--ash); text-decoration: none;
  padding: 6px 10px; border-radius: var(--r); transition: background 0.15s, color 0.15s;
}
.nav-links a:hover { background: var(--veil); color: var(--ink); }
.nav-bm { display: inline-flex; align-items: center; gap: 4px; }
.nav-badge:not(:empty) {
  font-family: var(--mono); font-size: 11px; font-weight: 600; line-height: 1; color: #fff;
  background: var(--mark); border-radius: var(--r-pill); padding: 2px 6px; min-width: 16px; text-align: center;
}
.theme-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: 1px solid var(--hairline); border-radius: var(--r-pill);
  color: var(--ink); font-family: var(--font); font-size: 13px; font-weight: 500;
  padding: 5px 14px; cursor: pointer; min-height: 32px; transition: border-color 0.15s;
}
.theme-btn:hover { border-color: var(--edge); }
.theme-btn svg { width: 14px; height: 14px; }

/* ---------- header ---------- */
.hero { padding: 72px 0 40px; border-bottom: 1px solid var(--hairline); }
.hero-kicker { font-size: 13px; color: var(--hollow); font-family: var(--mono); margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); }
.hero h1 { font-size: clamp(26px, 4.6vw, 38px); font-weight: 600; line-height: 1.3; letter-spacing: -0.02em; max-width: 720px; }
.hero p.sub { margin-top: 14px; font-size: 16px; color: var(--ash); max-width: 900px; line-height: 1.7; }
.hero-stats { display: flex; gap: 8px; margin-top: 26px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: baseline; gap: 7px;
  border: 1px solid var(--hairline); border-radius: var(--r); padding: 8px 14px;
  font-size: 13px; color: var(--ash); background: var(--mist);
}
.chip b { font-weight: 600; color: var(--ink); font-size: 16px; font-family: var(--mono); }
.chip.clickable { cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.chip.clickable:hover { background: var(--veil); border-color: var(--ash); }
.chip.clickable::after { content: '↗'; color: var(--hollow); font-size: 12px; margin-left: 2px; }

/* 조건 → 순위 연계 큐 */
.flow-cue {
  margin-top: 14px; font-size: 13.5px; color: var(--ash); line-height: 1.7;
  padding: 12px 16px; background: var(--mist); border: 1px solid var(--hairline);
  border-left: 3px solid var(--ink); border-radius: var(--r);
}
.flow-cue b { font-weight: 600; color: var(--ink); }
.cond-badge {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 14px;
  font-size: 13px; color: var(--ash);
}
.cond-badge .lead { color: var(--hollow); font-family: var(--mono); font-size: 12px; }
.cond-badge .v { background: var(--mist); border: 1px solid var(--hairline); border-radius: var(--r-pill); padding: 3px 12px; font-weight: 500; color: var(--ink); }
.table-note {
  font-size: 13px; color: var(--ash); line-height: 1.85; margin-bottom: 14px;
  padding: 12px 16px; background: var(--mist); border: 1px solid var(--hairline); border-radius: var(--r);
}
.table-note b { font-weight: 600; color: var(--ink); }

/* ---------- sections ---------- */
.section { padding: 56px 0 8px; }
.sec-head { margin-bottom: 24px; }
.sec-num { font-family: var(--mono); font-size: 12px; color: var(--hollow); display: block; margin-bottom: 6px; }
.sec-head h2 { font-size: 24px; font-weight: 600; line-height: 1.33; letter-spacing: -0.015em; }
.sec-head p { margin-top: 8px; color: var(--ash); font-size: 15px; max-width: 880px; line-height: 1.7; }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease-out, transform 0.5s ease-out; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- criteria (평가 기준) ---------- */
.crit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.crit-card { border: 1px solid var(--hairline); border-radius: var(--r); padding: 16px; background: var(--paper); }
.crit-card h4 { font-size: 15px; font-weight: 600; display: flex; justify-content: space-between; align-items: baseline; }
.crit-card h4 em { font-style: normal; font-family: var(--mono); font-size: 13px; color: var(--hollow); font-weight: 400; }
.crit-card p { font-size: 13.5px; color: var(--ash); margin-top: 8px; line-height: 1.65; }
.band-tables { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px; margin-top: 12px; }
.band { border: 1px solid var(--hairline); border-radius: var(--r); overflow: hidden; }
.band h5 { font-size: 13.5px; font-weight: 600; padding: 10px 14px; background: var(--mist); border-bottom: 1px solid var(--hairline); }
.band table { width: 100%; border-collapse: collapse; font-size: 13px; }
.band td { padding: 7px 14px; border-bottom: 1px solid var(--hairline); color: var(--ash); }
.band tr:last-child td { border-bottom: 0; }
.band td:first-child { font-family: var(--mono); color: var(--ink); white-space: nowrap; width: 96px; }
.crit-note { margin-top: 12px; font-size: 13px; color: var(--hollow); line-height: 1.7; }

/* ---------- controls ---------- */
.controls {
  border: 1px solid var(--hairline); border-radius: var(--r); padding: 16px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px;
  background: var(--mist);
}
.ctrl-label { font-size: 13px; font-weight: 500; color: var(--ash); margin-bottom: 8px; display: block; }
.seg { display: flex; background: var(--paper); border: 1px solid var(--hairline); border-radius: var(--r); padding: 3px; gap: 3px; }
.seg button {
  flex: 1; border: 0; background: transparent; color: var(--ash);
  font-family: var(--font); font-size: 13.5px; font-weight: 500;
  padding: 8px 6px; border-radius: 7px; cursor: pointer; transition: all 0.15s; min-height: 38px;
}
.seg button.on { background: var(--press); color: var(--on-press); }
.seg button:hover:not(.on) { background: var(--veil); color: var(--ink); }
.num-input {
  display: flex; align-items: center; background: var(--paper);
  border: 1px solid var(--hairline); border-radius: var(--r); padding: 0 12px 0 14px;
}
.num-input input {
  flex: 1; width: 100%; background: transparent; border: 0; outline: none;
  color: var(--ink); font-family: var(--mono); font-size: 15px; min-height: 42px;
}
.num-input span { font-size: 13px; color: var(--hollow); white-space: nowrap; }
.ctrl-note { grid-column: 1 / -1; font-size: 12.5px; color: var(--hollow); line-height: 1.7; }
#income-note { color: var(--ash); }
#income-note b { color: var(--ink); font-weight: 600; }

/* 동선 조건 (선택) */
.loc-cond { margin-top: 12px; border: 1px solid var(--hairline); border-radius: var(--r); background: var(--mist); padding: 14px 16px; }
.loc-cond summary { cursor: pointer; font-size: 14px; font-weight: 500; color: var(--ink); list-style: none; display: flex; align-items: center; gap: 8px; min-height: 28px; }
.loc-cond summary::-webkit-details-marker { display: none; }
.loc-cond summary::before { content: '＋'; color: var(--hollow); font-size: 16px; }
.loc-cond[open] summary::before { content: '－'; }
.loc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 14px; }
.loc-field label { display: block; font-size: 12.5px; color: var(--ash); margin-bottom: 6px; }
.loc-field .in {
  display: flex; align-items: center; gap: 6px; background: var(--paper);
  border: 1px solid var(--hairline); border-radius: var(--r); padding: 0 10px 0 12px;
}
.loc-field input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: var(--ink); font-family: var(--font); font-size: 14px; min-height: 42px; }
.loc-field .clr { background: none; border: 0; color: var(--hollow); cursor: pointer; font-size: 15px; padding: 4px; min-width: 28px; min-height: 28px; }
.loc-fb { font-size: 12px; line-height: 1.5; margin-top: 6px; min-height: 16px; }
.loc-fb.ok { color: var(--good); }
.loc-fb.ok b { color: var(--ink); font-weight: 600; }
.loc-fb.ok .pl { color: var(--ash); }
.loc-fb.err { color: var(--bad); }
.loc-fb.load { color: var(--hollow); }
.loc-note { margin-top: 12px; font-size: 12px; color: var(--hollow); line-height: 1.7; }
.loc-note b { color: var(--ash); font-weight: 600; }

/* 모달 내 동선 카드 */
.route-list { display: flex; flex-direction: column; gap: 8px; }
.route-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 13.5px; padding-bottom: 8px; border-bottom: 1px solid var(--hairline); }
.route-row:last-child { border-bottom: 0; }
.route-row .rl { color: var(--ash); min-width: 0; }
.route-row .rl b { color: var(--ink); font-weight: 600; }
.route-row .rd { font-family: var(--mono); font-weight: 600; white-space: nowrap; }
.route-avg { margin-top: 10px; font-size: 13px; color: var(--ash); }
.route-avg b { font-family: var(--mono); color: var(--ink); font-weight: 600; }

/* ---------- loan calculator ---------- */
.calc { border: 1px solid var(--hairline); border-radius: var(--r); padding: 20px; background: var(--mist); }
.calc-top { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.calc-top .num-input, .mc-controls .num-input { overflow: hidden; }
.calc-top select, .mc-controls select {
  appearance: none; -webkit-appearance: none;
  flex: 1; width: 100%; min-width: 0; background: transparent; border: 0; outline: none;
  color: var(--ink); font-family: var(--font); font-size: 14px; min-height: 42px; cursor: pointer;
  padding-right: 22px; text-overflow: ellipsis; white-space: nowrap; overflow: hidden;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238f8f8f' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 2px center;
}
.calc-top select option, .mc-controls select option { background: var(--paper); color: var(--ink); }
.calc-split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
.calc-num { display: flex; flex-direction: column; gap: 4px; }
.calc-num.loan { text-align: right; }
.calc-num > span { font-size: 13px; color: var(--ash); }
.calc-num > span em { font-style: normal; color: var(--good); font-weight: 500; }
.calc-num b { font-family: var(--mono); font-size: clamp(20px, 4.4vw, 28px); font-weight: 600; letter-spacing: -0.02em; }
.calc-num.loan b { color: var(--good); }
.calc-slider {
  -webkit-appearance: none; appearance: none; width: 100%; height: 8px; margin-top: 14px;
  border-radius: var(--r-pill); outline: none; cursor: pointer;
  background: linear-gradient(90deg, var(--ink) 0%, var(--ink) var(--fill, 30%), var(--loan-col, var(--good)) var(--fill, 30%), var(--loan-col, var(--good)) 100%);
}
/* 대출 한도 초과 시 대출금 표시·라벨 빨강 */
.calc-num.loan.over b, .calc-num.loan.over span, .calc-num.loan.over em { color: var(--bad); }
.calc-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--paper); border: 1px solid var(--hairline); box-shadow: 0 1px 4px rgba(0,0,0,0.18); cursor: grab;
}
.calc-slider::-moz-range-thumb {
  width: 24px; height: 24px; border-radius: 50%; background: var(--paper);
  border: 1px solid var(--hairline); box-shadow: 0 1px 4px rgba(0,0,0,0.18); cursor: grab;
}
.calc-hint { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; color: var(--hollow); }
.calc-result { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-top: 20px; }
.calc-res-card { background: var(--paper); border: 1px solid var(--hairline); border-radius: var(--r); padding: 14px 16px; }
.calc-res-card span { font-size: 12.5px; color: var(--ash); display: block; }
.calc-res-card b { font-family: var(--mono); font-size: 22px; font-weight: 600; display: block; margin-top: 4px; letter-spacing: -0.01em; }
.calc-res-card em { font-style: normal; font-size: 12px; color: var(--hollow); }
.calc-warn { margin-top: 14px; font-size: 13px; line-height: 1.7; color: var(--ash); }
.calc-warn.over { color: var(--bad); font-weight: 500; }
.calc-warn.ok { color: var(--good); }
@media (max-width: 560px) {
  .calc-split { gap: 10px; }
  .calc-num b { font-size: 20px; }
}

/* ---------- rank tabs + list ---------- */
.rank-tabs { display: inline-flex; background: var(--mist); border: 1px solid var(--hairline); border-radius: var(--r); padding: 3px; gap: 3px; margin-bottom: 18px; }
.rank-tabs button {
  border: 0; background: transparent; color: var(--ash); font-family: var(--font);
  font-size: 14px; font-weight: 500; padding: 8px 18px; border-radius: 7px; cursor: pointer;
  transition: all 0.15s; min-height: 40px;
}
.rank-tabs button.on { background: var(--press); color: var(--on-press); }
.rank-tabs button:hover:not(.on) { color: var(--ink); background: var(--veil); }
.grade-legend {
  font-size: 12.5px; color: var(--ash); line-height: 1.9; margin-bottom: 14px;
  padding: 10px 14px; background: var(--mist); border: 1px solid var(--hairline); border-radius: var(--r);
}
.grade-legend b { font-weight: 600; color: var(--ink); }
.grade-legend .tag { margin: 0 2px; }
.rank-list { display: flex; flex-direction: column; }
.rank-card {
  display: grid; grid-template-columns: 46px minmax(0, 1fr) auto 120px;
  align-items: center; gap: 16px;
  padding: 16px 14px; cursor: pointer;
  border-bottom: 1px solid var(--hairline); border-radius: var(--r);
  transition: background 0.15s;
}
.rank-card:hover { background: var(--veil); }
.rank-no { font-family: var(--mono); font-size: 20px; color: var(--hollow); }
.rank-card.top3 .rank-no { color: var(--ink); font-weight: 600; }
.rank-name { font-size: 16.5px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.rank-meta { font-size: 13px; color: var(--ash); margin-top: 3px; display: flex; gap: 8px; flex-wrap: wrap; }
.rank-one { font-size: 13.5px; color: var(--ash); margin-top: 6px; line-height: 1.6; max-width: 560px; }
.rank-tags { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; min-width: 0; max-width: 100%; }
.rank-tags .tag { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.tag {
  font-size: 12px; font-weight: 500; color: var(--ash);
  border: 1px solid var(--hairline); border-radius: var(--r-pill); padding: 2px 10px; white-space: nowrap;
}
.tag.g-좋음 { color: var(--good); border-color: transparent; background: var(--good-bg); }
.tag.g-보통 { color: var(--warn); border-color: transparent; background: var(--warn-bg); }
.tag.g-주의 { color: var(--bad); border-color: transparent; background: var(--bad-bg); }
.tag.route-plus { color: var(--good); border-color: transparent; background: var(--good-bg); }
.tag.route-minus { color: var(--bad); border-color: transparent; background: var(--bad-bg); }
.rank-score { text-align: right; }
.rank-score b { font-family: var(--mono); font-size: 22px; font-weight: 600; display: block; }
.rank-score small { font-size: 11.5px; color: var(--hollow); }
.score-bar { height: 3px; background: var(--veil); border-radius: 2px; margin-top: 7px; overflow: hidden; }
.score-bar i { display: block; height: 100%; background: var(--bar); border-radius: 2px; transition: width 0.7s ease-out; }
.cmp-add {
  margin-top: 8px; background: transparent; border: 1px solid var(--hairline); border-radius: var(--r-pill);
  color: var(--ash); font-family: var(--font); font-size: 12px; padding: 4px 12px; cursor: pointer;
  min-height: 30px; transition: all 0.15s; white-space: nowrap;
}
.cmp-add:hover { border-color: var(--ash); color: var(--ink); }
.cmp-add.on { background: var(--ink); color: var(--paper); border-color: transparent; }
.bm-add {
  margin-top: 8px; background: transparent; border: 1px solid var(--hairline); border-radius: var(--r-pill);
  color: var(--ash); font-family: var(--font); font-size: 12px; padding: 4px 12px; cursor: pointer;
  min-height: 30px; transition: all 0.15s; white-space: nowrap;
}
.bm-add:hover { border-color: var(--mark); color: var(--mark); }
.bm-add.on { background: var(--mark); color: #fff; border-color: transparent; }
.tag.memo { color: var(--mark); border-color: transparent; background: var(--mark-bg); }
.bm-filter input { accent-color: var(--mark); }

/* 1:1 비교 하단 바 */
.cmp-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 150; background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--hairline); }
.cmp-bar-in { max-width: var(--max-w); margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cmp-slots { display: flex; gap: 8px; flex-wrap: wrap; }
.cmp-slot { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; border: 1px solid var(--hairline); border-radius: var(--r-pill); padding: 6px 12px; }
.cmp-slot.empty { color: var(--hollow); border-style: dashed; }
.cmp-slot.filled { color: var(--ink); background: var(--mist); }
.cmp-slot.filled b { font-weight: 600; }
.cmp-slot button { background: none; border: 0; color: var(--hollow); cursor: pointer; font-size: 13px; padding: 0 2px; min-width: 20px; }
.cmp-bar-actions { display: flex; gap: 8px; }
.cmp-bar-actions .btn { min-height: 40px; padding: 8px 16px; font-size: 14px; }

/* 비교 모달 표 — 팝업 내 가로 스크롤 없이 3열이 폭에 맞게 */
.cmp-modal { max-width: 860px; }
.cmp-modal .table-scroll { overflow-x: hidden; }
table.cmp.cmp-vs { table-layout: fixed; width: 100%; min-width: 0; }
.cmp-vs th, .cmp-vs td { position: static !important; left: auto !important; white-space: normal; overflow-wrap: anywhere; overflow: hidden; }
.cmp-vs th { text-align: center; font-weight: 600; color: var(--ink); background: var(--mist); }
.cmp-vs th:first-child, .cmp-vs td:first-child { width: 30%; text-align: left; max-width: none; }
.cmp-vs th:not(:first-child), .cmp-vs td:not(:first-child) { width: 35%; }
.cmp-vs td { text-align: center; font-size: 13.5px; }
.cmp-vs td.rl { text-align: left; color: var(--ash); font-weight: 500; overflow: visible; white-space: normal; word-break: keep-all; }
.cmp-vs td.rl .hint { display: block; font-size: 11px; color: var(--hollow); font-weight: 400; }
@media (max-width: 520px) {
  .cmp-vs th:first-child, .cmp-vs td:first-child { width: 34%; }
  .cmp-vs th:not(:first-child), .cmp-vs td:not(:first-child) { width: 33%; }
  .cmp-vs th, .cmp-vs td { padding: 9px 7px; font-size: 12.5px; }
}
.cmp-vs td.win { background: var(--good-bg); color: var(--good); font-weight: 600; }
.cmp-strength { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
@media (max-width: 640px) { .cmp-strength { grid-template-columns: 1fr; } }

/* ---------- compare table ---------- */
.table-scroll { overflow-x: auto; border: 1px solid var(--hairline); border-radius: var(--r); }
table.cmp { border-collapse: collapse; width: 100%; min-width: 1040px; font-size: 13px; }
.cmp th, .cmp td { padding: 9px 10px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--hairline); }
.cmp th {
  font-weight: 500; font-size: 12px; color: var(--ash); background: var(--mist);
  position: sticky; top: 0; cursor: pointer; user-select: none; text-align: right;
}
.cmp th:first-child, .cmp td:first-child {
  text-align: left; position: sticky; left: 0; background: var(--paper);
  max-width: 200px; overflow: hidden; text-overflow: ellipsis;
}
.cmp th:first-child { background: var(--mist); z-index: 2; }
.cmp td:first-child { cursor: pointer; font-weight: 500; }
.cmp td:first-child:hover { text-decoration: underline; }
.cmp tr:last-child td { border-bottom: 0; }
.cmp td.hi { color: var(--good); font-weight: 600; }
.cmp td.lo { color: var(--bad); }
.cmp td .one { display: block; max-width: 300px; white-space: normal; font-size: 12px; color: var(--ash); text-align: left; line-height: 1.5; }
.cmp td.oneliner { text-align: left; white-space: normal; min-width: 240px; }
.btn {
  border: 1px solid var(--hairline); background: var(--paper); color: var(--ink);
  font-family: var(--font); font-size: 14px; font-weight: 500;
  border-radius: var(--r); padding: 10px 20px; cursor: pointer;
  transition: background 0.15s, border-color 0.15s; min-height: 42px;
}
.btn:hover { background: var(--veil); }
.btn.primary { background: var(--press); color: var(--on-press); border-color: transparent; }
.btn.primary:hover { opacity: 0.88; }
.btn:disabled { opacity: 0.45; cursor: wait; }

/* ---------- modal ---------- */
.modal-bg { position: fixed; inset: 0; background: var(--scrim); z-index: 200; opacity: 0; pointer-events: none; transition: opacity 0.25s; }
.modal-bg.open { opacity: 1; pointer-events: auto; }
.modal {
  position: fixed; z-index: 201; inset: auto 0 0 0; margin: 0 auto;
  max-width: 820px; max-height: 92dvh; overflow-y: auto;
  background: var(--paper); border: 1px solid var(--hairline);
  border-radius: 14px 14px 0 0; padding: 22px 22px 44px;
  transform: translateY(104%); transition: transform 0.35s ease-out;
  overscroll-behavior: contain;
}
.modal.open { transform: translateY(0); }
@media (min-width: 880px) {
  .modal { inset: 4dvh 0 auto 0; border-radius: 14px; transform: none; opacity: 0; pointer-events: none; transition: opacity 0.2s; }
  .modal.open { opacity: 1; pointer-events: auto; }
}
.modal-close {
  background: var(--paper); color: var(--ash); border: 1px solid var(--hairline);
  width: 38px; height: 38px; border-radius: 50%; font-size: 16px; cursor: pointer; flex-shrink: 0;
  transition: background 0.15s;
}
.modal-close:hover { background: var(--veil); color: var(--ink); }
/* 팝업 헤더 스티키 고정 — 스크롤해도 단지명·등급 유지 */
.m-head {
  position: sticky; top: -22px; z-index: 5; margin: -22px -22px 18px; padding: 18px 22px 14px;
  background: color-mix(in srgb, var(--paper) 96%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--hairline);
}
.m-head-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.m-head-top > div { min-width: 0; }
.m-head-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.m-bm {
  background: transparent; border: 1px solid var(--hairline); border-radius: var(--r-pill);
  color: var(--ash); font-family: var(--font); font-size: 12.5px; padding: 6px 13px; cursor: pointer;
  min-height: 34px; white-space: nowrap; transition: all 0.15s;
}
.m-bm:hover { border-color: var(--mark); color: var(--mark); }
.m-bm.on { background: var(--mark); color: #fff; border-color: transparent; }
.m-rank { font-family: var(--mono); font-size: 12.5px; color: var(--hollow); }
.m-name { font-size: 22px; font-weight: 600; margin: 4px 0 3px; letter-spacing: -0.015em; }
.m-addr { font-size: 13px; color: var(--ash); }
.m-verdict { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; align-items: center; }
.m-total { display: flex; align-items: baseline; gap: 10px; margin-top: 12px; }
.m-total b { font-family: var(--mono); font-size: 36px; font-weight: 600; }
.m-total span { color: var(--hollow); font-size: 13px; }
.m-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 700px) { .m-grid { grid-template-columns: 1fr; } }
.m-card { border: 1px solid var(--hairline); border-radius: var(--r); padding: 16px; background: var(--paper); }
.m-card.tinted { background: var(--mist); }
.m-card h4 { font-size: 13px; font-weight: 600; color: var(--ash); margin-bottom: 10px; }
.m-note-card { border-color: var(--mark); background: var(--mark-bg); }
.m-note-status { font-size: 11.5px; font-weight: 400; color: var(--hollow); margin-left: 8px; }
.m-note {
  width: 100%; min-height: 84px; resize: vertical; box-sizing: border-box;
  border: 1px solid var(--hairline); border-radius: 10px; background: var(--paper); color: var(--ink);
  font-family: var(--font); font-size: 14px; line-height: 1.6; padding: 10px 12px;
}
.m-note::placeholder { color: var(--hollow); }
.m-note:focus { outline: none; border-color: var(--mark); }
/* 현장 임장 카드 */
.tag.visit { color: #fff; background: var(--good); border-color: transparent; }
.visit-card { border-color: var(--good); }
.visit-agent { font-size: 12px; font-weight: 400; color: var(--hollow); margin-left: 6px; }
.visit-listing { font-size: 13.5px; color: var(--ink); background: var(--mist); border-radius: 8px; padding: 9px 12px; margin-bottom: 12px; line-height: 1.6; }
.visit-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 700px) { .visit-cols { grid-template-columns: 1fr; gap: 10px; } }
.visit-col h5, .visit-checklist h5 { font-size: 12px; font-weight: 600; color: var(--ash); margin-bottom: 6px; }
.visit-col ul, .visit-checklist ul { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.visit-col li { font-size: 12.5px; color: var(--ash); line-height: 1.5; padding-left: 10px; position: relative; }
.visit-col li::before { content: "·"; position: absolute; left: 2px; color: var(--hollow); }
.visit-checklist { margin-top: 14px; border-top: 1px solid var(--hairline); padding-top: 12px; }
.visit-checklist h5 { color: var(--good); }
.visit-checklist li { font-size: 13px; color: var(--ink); line-height: 1.55; padding-left: 20px; position: relative; margin-bottom: 2px; }
.visit-checklist li::before { content: "✔"; position: absolute; left: 0; color: var(--good); font-size: 11px; top: 2px; }
.m-card p { font-size: 14px; line-height: 1.7; }
.m-card p + p { margin-top: 8px; }
.m-card .sub { color: var(--ash); font-size: 13.5px; }
.mc-controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.mc-controls .mc-f { display: block; font-size: 12.5px; color: var(--ash); }
.mc-controls .mc-f > .num-input, .mc-controls .mc-f > .seg { margin-top: 6px; }
.mc-controls .seg button { font-size: 13px; padding: 7px 4px; min-height: 36px; }
.mc-controls .num-input input { font-size: 14px; min-height: 38px; }
.axis-block { margin-bottom: 15px; }
.axis-block:last-child { margin-bottom: 0; }
.axis-why { font-size: 12.5px; color: var(--ash); line-height: 1.65; margin: 5px 0 0; padding-left: 2px; }
.m-total-inline { font-family: var(--mono); font-size: 12.5px; color: var(--hollow); margin-left: auto; align-self: center; }
.axis-row { display: grid; grid-template-columns: 128px 1fr 64px; align-items: center; gap: 10px; margin-bottom: 0; }
.axis-row label { font-size: 13.5px; color: var(--ash); }
.axis-row output { font-family: var(--mono); font-size: 13px; text-align: right; font-weight: 600; }
.axis-bar { height: 5px; background: var(--veil); border-radius: 3px; overflow: hidden; }
.axis-bar i { display: block; height: 100%; border-radius: 3px; background: var(--bar); width: 0; transition: width 0.7s ease-out; }
.interp { border-left: 2px solid var(--edge); padding-left: 12px; margin-top: 10px; }
.interp + .interp { margin-top: 12px; }
.interp b { font-weight: 600; font-size: 13.5px; }
.interp p { font-size: 13.5px; color: var(--ash); margin-top: 2px; }
ul.plain { list-style: none; }
ul.plain li { font-size: 13.5px; line-height: 1.65; padding-left: 15px; position: relative; margin-bottom: 6px; }
ul.plain li::before { content: '·'; position: absolute; left: 2px; color: var(--hollow); }
ul.plain.pos li::before { content: '+'; color: var(--good); }
ul.plain.neg li::before { content: '−'; color: var(--bad); }
.fin-table { width: 100%; font-size: 13.5px; border-collapse: collapse; }
.fin-table td { padding: 7px 0; border-bottom: 1px solid var(--hairline); }
.fin-table td:last-child { text-align: right; font-family: var(--mono); }
.fin-table tr.tot td { border-bottom: 0; padding-top: 11px; font-weight: 600; }
.m-warn { margin-top: 10px; font-size: 12.5px; color: var(--hollow); line-height: 1.7; }

/* ---------- recon & risk ---------- */
.recon-card { border: 1px solid var(--hairline); border-radius: var(--r); padding: 18px; margin-bottom: 10px; cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.recon-card:hover { background: var(--veil); border-color: var(--ash); }
.recon-card h4 { font-weight: 600; font-size: 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.recon-card h4 .go { font-size: 13px; color: var(--hollow); font-weight: 400; }
.recon-src { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: var(--r-pill); margin: 6px 0 8px; }
.recon-src.official { color: var(--good); background: var(--good-bg); }
.recon-src.community { color: var(--warn); background: var(--warn-bg); }
.recon-stage { font-family: var(--mono); font-size: 12px; color: var(--ash); margin: 0 0 10px; display: block; }
.recon-card p { font-size: 14px; color: var(--ash); line-height: 1.7; }
.risk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 10px; }
.risk-card { border: 1px solid var(--hairline); border-radius: var(--r); padding: 16px; background: var(--mist); }
.risk-card h4 { font-size: 13.5px; font-weight: 600; margin-bottom: 8px; }
.risk-card p { font-size: 13px; color: var(--ash); line-height: 1.7; }

/* ---------- add link ---------- */
.add-box { border: 1px solid var(--hairline); border-radius: var(--r); padding: 18px; background: var(--mist); }
.add-row { display: flex; gap: 8px; }
.add-row input {
  flex: 1; background: var(--paper); border: 1px solid var(--hairline); border-radius: var(--r);
  color: var(--ink); font-family: var(--mono); font-size: 13.5px; padding: 11px 14px;
  outline: none; min-height: 44px; min-width: 0; transition: border-color 0.15s;
}
.add-row input:focus { border-color: var(--ash); }
.pending-actions { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.pending-actions .btn { font-size: 13px; padding: 8px 14px; min-height: 38px; }
.copy-fb { font-size: 12.5px; }
.copy-fb.ok { color: var(--good); }
.copy-fb.err { color: var(--bad); }
.add-help { margin-top: 14px; font-size: 12.5px; color: var(--hollow); line-height: 1.7; padding: 14px 16px; background: var(--mist); border: 1px solid var(--hairline); border-radius: var(--r); }
.add-help > b { color: var(--ink); font-size: 13.5px; display: block; margin-bottom: 8px; }
.add-steps { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.add-steps li { font-size: 13px; color: var(--ash); line-height: 1.65; }
.add-steps li b { color: var(--ink); font-weight: 600; }
.add-msg { margin-top: 10px; font-size: 13px; min-height: 18px; font-weight: 500; }
.add-msg.err { color: var(--bad); }
.add-msg.ok { color: var(--good); }
.pending-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.pending-card {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--paper); border: 1px dashed var(--edge); border-radius: var(--r); padding: 12px 16px;
}
.pending-card .nm { font-size: 14px; font-weight: 500; }
.pending-card .st { font-size: 12px; color: var(--warn); margin-top: 2px; }
.pending-card.done { border-style: solid; border-color: var(--good); cursor: pointer; }
.pending-card.done:hover { background: var(--good-bg); }
.pending-card .st-done { color: var(--good); }
.pending-banner { font-size: 13px; color: var(--good); background: var(--good-bg); border: 1px solid transparent; border-radius: var(--r); padding: 10px 14px; margin: 10px 0; line-height: 1.6; }
.pending-banner b { font-weight: 600; }
.pending-banner .lnk { background: none; border: 0; color: var(--good); text-decoration: underline; cursor: pointer; font-size: 13px; padding: 0 2px; font-weight: 600; }
.rank-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.rank-toolbar .rank-tabs { margin-bottom: 0; }
.afford-filter { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--ash); cursor: pointer; user-select: none; }
.afford-filter input { width: 17px; height: 17px; accent-color: var(--ink); cursor: pointer; }
.tag.afford-ok { color: var(--good); border-color: transparent; background: var(--good-bg); }
.tag.afford-no { color: var(--bad); border-color: transparent; background: var(--bad-bg); }
.empty-note { padding: 28px 16px; text-align: center; color: var(--ash); font-size: 14px; line-height: 1.7; border: 1px dashed var(--edge); border-radius: var(--r); }
.empty-note b { color: var(--ink); font-weight: 600; }

/* 북마크 페이지 */
.bm-count-pill { font-family: var(--mono); font-size: 15px; font-weight: 600; color: #fff; background: var(--mark); border-radius: var(--r-pill); padding: 2px 11px; vertical-align: middle; margin-left: 4px; }
.bm-sort-label { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ash); }
.bm-select { display: inline-flex; align-items: center; background: var(--mist); border: 1px solid var(--hairline); border-radius: var(--r); padding: 0 12px; min-width: 160px; }
.bm-select select {
  appearance: none; -webkit-appearance: none; width: 100%; min-width: 0; background: transparent; border: 0; outline: none;
  color: var(--ink); font-family: var(--font); font-size: 14px; min-height: 40px; cursor: pointer; padding-right: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238f8f8f' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right center;
}
.bm-select select option { background: var(--paper); color: var(--ink); }
.bm-list { display: flex; flex-direction: column; gap: 10px; }
.bm-toolbar { justify-content: flex-end; }
.bm-add-id { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.bm-add-id input {
  flex: 1; min-width: 200px; background: var(--mist); border: 1px solid var(--hairline); border-radius: var(--r);
  color: var(--ink); font-family: var(--mono); font-size: 13px; padding: 9px 12px; min-height: 40px;
}
.bm-add-id input:focus { outline: none; border-color: var(--mark); }
.bm-add-id .btn {
  background: var(--mark); color: #fff; border: 0; border-radius: var(--r); font-family: var(--font);
  font-size: 13px; font-weight: 600; padding: 0 16px; min-height: 40px; cursor: pointer; white-space: nowrap;
}
.bm-add-id .btn:hover { filter: brightness(0.95); }
.bm-id-msg { font-size: 12.5px; color: var(--good); font-weight: 500; flex-basis: 100%; }
/* 동·읍 하위 탭 */
.bm-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.bm-tab {
  display: inline-flex; align-items: center; gap: 6px; background: var(--mist); border: 1px solid var(--hairline);
  border-radius: var(--r-pill); color: var(--ash); font-family: var(--font); font-size: 13px; font-weight: 500;
  padding: 7px 14px; cursor: pointer; white-space: nowrap; transition: all 0.15s;
}
.bm-tab:hover { border-color: var(--mark); color: var(--ink); }
.bm-tab.on { background: var(--mark); color: #fff; border-color: transparent; }
.bm-tab em { font-family: var(--mono); font-style: normal; font-size: 11px; opacity: 0.7; }
.bm-tab.on em { opacity: 0.9; }
.bm-card {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  border: 1px solid var(--hairline); border-radius: var(--r); padding: 15px 18px; background: var(--paper);
  cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.bm-card:hover { border-color: var(--mark); background: var(--mark-bg); }
.bm-card-main { min-width: 0; }
.bm-region { font-family: var(--mono); font-size: 11.5px; color: var(--hollow); margin-bottom: 2px; }
.bm-name { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.bm-note { margin-top: 7px; font-size: 13px; color: var(--ash); line-height: 1.55; display: flex; gap: 7px; align-items: baseline; }
.bm-note-tag { flex-shrink: 0; font-size: 11px; font-weight: 600; color: var(--mark); background: var(--mark-bg); border-radius: var(--r-pill); padding: 1px 8px; }
.bm-card-side { display: flex; align-items: center; gap: 6px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.bm-remove {
  background: transparent; border: 1px solid var(--hairline); border-radius: var(--r-pill);
  color: var(--ash); font-family: var(--font); font-size: 12px; padding: 5px 12px; cursor: pointer;
  min-height: 30px; white-space: nowrap; transition: all 0.15s;
}
.bm-remove:hover { border-color: var(--bad); color: var(--bad); }
.bm-pin {
  background: transparent; border: 1px solid var(--hairline); border-radius: var(--r-pill);
  color: var(--ash); font-family: var(--font); font-size: 12px; padding: 5px 12px; cursor: pointer;
  min-height: 30px; white-space: nowrap; transition: all 0.15s;
}
.bm-pin:hover { border-color: var(--mark); color: var(--mark); }
.bm-pin.on { background: var(--mark); color: #fff; border-color: transparent; font-weight: 600; }
.bm-cmp {
  background: transparent; border: 1px solid var(--hairline); border-radius: var(--r-pill);
  color: var(--ash); font-family: var(--font); font-size: 12px; padding: 5px 12px; cursor: pointer;
  min-height: 30px; white-space: nowrap; transition: all 0.15s;
}
.bm-cmp:hover { border-color: var(--ink); color: var(--ink); }
.bm-cmp.on { background: var(--ink); color: var(--paper); border-color: transparent; }
.bm-cmp-go {
  background: transparent; border: 1px solid var(--mark); border-radius: var(--r-pill);
  color: var(--mark); font-family: var(--font); font-size: 13px; font-weight: 600; padding: 8px 16px;
  cursor: pointer; min-height: 40px; white-space: nowrap; transition: all 0.15s; margin-right: auto;
}
.bm-cmp-go.ready { background: var(--mark); color: #fff; }
.bm-cmp-go:hover { filter: brightness(0.95); }
.bm-card.pinned { border-color: var(--mark); background: var(--mark-bg); box-shadow: inset 3px 0 0 var(--mark); }
.pin-badge {
  display: inline-block; font-size: 10.5px; font-weight: 700; color: #fff; background: var(--mark);
  border-radius: var(--r-pill); padding: 2px 8px; margin-right: 8px; vertical-align: middle; letter-spacing: 0.02em;
}
@media (max-width: 600px) {
  .bm-card { flex-direction: column; align-items: stretch; gap: 10px; }
  .bm-card-side { justify-content: flex-start; }
}
.pending-card button { background: none; border: 0; color: var(--hollow); cursor: pointer; font-size: 15px; min-width: 40px; min-height: 40px; }
.pending-card button:hover { color: var(--bad); }

/* ---------- footer ---------- */
.footer { padding: 48px 0 56px; border-top: 1px solid var(--hairline); margin-top: 72px; }
.footer p { font-size: 12.5px; color: var(--hollow); line-height: 1.8; max-width: 700px; }
.footer .mono { margin-top: 14px; font-size: 11.5px; }

/* ---------- responsive ---------- */
@media (max-width: 800px) {
  .nav-links { display: none; }
  .hero { padding: 48px 0 32px; }
  .section { padding: 44px 0 8px; }
  .rank-card { grid-template-columns: 34px minmax(0, 1fr) 92px; grid-template-rows: auto auto; gap: 4px 12px; padding: 14px 8px; }
  .rank-no { font-size: 16px; grid-row: span 2; }
  .rank-tags { grid-column: 2; justify-content: flex-start; margin-top: 4px; }
  .rank-score { grid-row: 1 / span 2; grid-column: 3; }
  .rank-one { display: none; }
  .rank-tabs { width: 100%; }
  .rank-tabs button { flex: 1; padding: 8px 6px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ===== 법원경매 페이지 ===== */
.ac-cond { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.ac-f { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ash); }
.ac-f input[type="text"] { background: var(--mist); border: 1px solid var(--hairline); border-radius: var(--r); color: var(--ink); font-family: var(--font); font-size: 14px; padding: 10px 12px; min-height: 44px; }
.ac-f input[type="text"]:focus { outline: none; border-color: var(--ink); }
.ac-sorts { display: flex; flex-wrap: wrap; gap: 7px; }
.ac-sort { background: var(--mist); border: 1px solid var(--hairline); border-radius: var(--r-pill); color: var(--ash); font-family: var(--font); font-size: 13px; font-weight: 500; padding: 7px 13px; cursor: pointer; white-space: nowrap; transition: all .15s; }
.ac-sort:hover { border-color: var(--ink); color: var(--ink); }
.ac-sort.on { background: var(--ink); color: var(--paper); border-color: transparent; }
.ac-dir { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--ash); cursor: pointer; user-select: none; }
.ac-dir input { width: 17px; height: 17px; accent-color: var(--ink); }
.ac-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.ac-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid var(--hairline); border-radius: var(--r); padding: 15px 18px; background: var(--paper); }
.ac-card.over { opacity: 0.62; }
.ac-top { display: flex; align-items: center; gap: 14px; min-width: 0; }
.ac-match { font-family: var(--mono); font-size: 20px; font-weight: 700; color: var(--good); min-width: 34px; text-align: center; }
.ac-addr { font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; }
.ac-meta { font-size: 12.5px; color: var(--ash); margin-top: 3px; display: flex; flex-wrap: wrap; gap: 8px; }
.ac-side { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.ac-price { text-align: right; }
.ac-price b { font-family: var(--mono); font-size: 20px; font-weight: 700; display: block; }
.ac-price span { font-size: 11px; color: var(--hollow); }
.ac-tags { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.ac-link { font-size: 12px; color: var(--ash); white-space: nowrap; }
.ac-note { margin-top: 16px; font-size: 12px; color: var(--hollow); line-height: 1.6; }
@media (max-width: 640px) {
  .ac-card { flex-direction: column; align-items: stretch; gap: 10px; }
  .ac-side { justify-content: space-between; }
  .ac-tags { flex-direction: row; flex-wrap: wrap; align-items: center; }
}
.ac-f .bm-select { width: 100%; min-width: 0; }

/* 네이버 부동산 시세 테이블(팝업) */
.nv-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 420px; }
.nv-table th { text-align: left; font-weight: 600; color: var(--ash); background: var(--mist); padding: 8px 10px; border-bottom: 1px solid var(--hairline); white-space: nowrap; }
.nv-table td { padding: 8px 10px; border-bottom: 1px solid var(--hairline); color: var(--ink); }
.nv-table tr:last-child td { border-bottom: 0; }

/* ===== 네이버 매물 검색 페이지 ===== */
.nv-search { display: flex; gap: 8px; margin-top: 22px; max-width: 640px; }
.nv-search input { flex: 1; background: var(--mist); border: 1px solid var(--hairline); border-radius: var(--r); color: var(--ink); font-family: var(--font); font-size: 15px; padding: 12px 14px; min-height: 48px; }
.nv-search input:focus { outline: none; border-color: var(--ink); }
.nv-search .btn { background: var(--ink); color: var(--paper); border: 0; border-radius: var(--r); font-family: var(--font); font-size: 15px; font-weight: 600; padding: 0 22px; min-height: 48px; cursor: pointer; white-space: nowrap; }
.nv-hint { margin-top: 8px; font-size: 13px; color: var(--hollow); min-height: 16px; }
.nv-cols { display: grid; grid-template-columns: minmax(0, 360px) 1fr; gap: 16px; }
@media (max-width: 720px) { .nv-cols { grid-template-columns: 1fr; } }
.nv-h { font-size: 15px; font-weight: 600; margin-bottom: 12px; color: var(--ash); }
.nv-h span { color: var(--hollow); font-family: var(--mono); font-size: 13px; font-weight: 400; }
.nv-complex-list { display: flex; flex-direction: column; gap: 8px; }
.nv-complex { text-align: left; display: flex; flex-direction: column; gap: 3px; background: var(--paper); border: 1px solid var(--hairline); border-radius: var(--r); padding: 12px 14px; cursor: pointer; transition: all 0.15s; font-family: var(--font); }
.nv-complex:hover { border-color: var(--ink); background: var(--veil); }
.nv-complex.on { border-color: var(--ink); background: var(--veil); box-shadow: inset 3px 0 0 var(--ink); }
.nv-complex b { font-size: 15px; font-weight: 600; color: var(--ink); }
.nv-complex span { font-size: 12.5px; color: var(--ash); }
.nv-complex em { font-size: 11.5px; color: var(--hollow); font-family: var(--mono); font-style: normal; }
.nv-article-toolbar { margin-bottom: 12px; }
.nv-article-list { display: flex; flex-direction: column; gap: 8px; }
.nv-article { display: flex; gap: 14px; border: 1px solid var(--hairline); border-radius: var(--r); padding: 13px 16px; background: var(--paper); }
.nv-art-price { flex-shrink: 0; min-width: 96px; }
.nv-art-price b { display: block; font-family: var(--mono); font-size: 17px; font-weight: 700; color: var(--ink); }
.nv-art-price span { font-size: 11.5px; color: var(--hollow); }
.nv-art-main { min-width: 0; }
.nv-art-spec { font-size: 13.5px; font-weight: 500; color: var(--ink); }
.nv-art-feat { font-size: 12.5px; color: var(--ash); margin-top: 3px; }
.nv-art-meta { font-size: 11.5px; color: var(--hollow); margin-top: 4px; }
.nv-fallback { padding: 20px 16px; text-align: center; border: 1px dashed var(--edge); border-radius: var(--r); }
.nv-fallback p { font-size: 13.5px; color: var(--ash); margin-bottom: 12px; line-height: 1.6; }
.nv-fallback .btn { display: inline-block; background: #03c75a; color: #fff; border-radius: var(--r); font-size: 14px; font-weight: 600; padding: 11px 18px; text-decoration: none; }
.nv-detail { display: flex; flex-direction: column; gap: 14px; }
.nv-detail-head { border-bottom: 1px solid var(--hairline); padding-bottom: 12px; }
.nv-detail-addr { font-size: 15px; font-weight: 600; color: var(--ink); }
.nv-detail-sub { font-size: 13px; color: var(--ash); margin-top: 4px; }
.nv-counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.nv-count { display: flex; flex-direction: column; align-items: center; gap: 3px; text-decoration: none; border: 1px solid var(--hairline); border-radius: var(--r); padding: 16px 8px; background: var(--paper); transition: all 0.15s; }
.nv-count:hover { border-color: #03c75a; background: var(--veil); }
.nv-count b { font-family: var(--mono); font-size: 26px; font-weight: 700; color: var(--ink); }
.nv-count span { font-size: 13px; color: var(--ash); font-weight: 500; }
.nv-count em { font-size: 11px; color: #03c75a; font-style: normal; }
.nv-count.zero { opacity: 0.5; }
.nv-count.zero em { color: var(--hollow); }
.nv-complex em { display:block; font-size:11.5px; color:var(--hollow); font-family:var(--mono); font-style:normal; margin-top:3px; }
.nv-more { padding:10px 4px; }
.nv-more a { font-size:13px; color:#03c75a; }
.nv-count.on { border:1px solid #03c75a; background:var(--veil); border-radius:var(--r); }
.nv-open-btn { display:block; text-align:center; background:#03c75a; color:#fff; text-decoration:none; border-radius:var(--r); font-size:15px; font-weight:600; padding:14px; margin-top:4px; }
.nv-open-btn:hover { filter:brightness(0.95); }
.lnk-btn { background:none; border:0; color:#03c75a; font-size:12.5px; cursor:pointer; text-decoration:underline; padding:0; font-family:var(--font); }
.nv-art-filters { display:flex; align-items:center; gap:12px; margin-top:8px; flex-wrap:wrap; }
.nv-art-filters .bm-select { min-width:130px; }
.nv-article.deal { border-color:var(--bad); box-shadow:inset 3px 0 0 var(--bad); }
.nv-art-badges { display:flex; gap:5px; margin-bottom:4px; flex-wrap:wrap; }
.nv-badge { font-size:10.5px; font-weight:700; padding:2px 7px; border-radius:var(--r-pill); color:#fff; }
.nv-badge.deal { background:var(--bad); }
.nv-badge.low { background:var(--mark); }
.nv-chg { font-size:10.5px; font-weight:600; padding:2px 6px; border-radius:var(--r-pill); }
.nv-chg.down { color:var(--good); background:var(--good-bg); }
.nv-chg.up { color:var(--bad); background:var(--bad-bg); }
.ac-card.deal { border-color:var(--bad); box-shadow:inset 3px 0 0 var(--bad); }
.tag.deal { background:var(--bad); color:#fff; border-color:transparent; }
/* 경매 정렬 UI 명확화 */
.ac-sortwrap { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:8px; }
.ac-sortlabel { font-size:12px; font-weight:600; color:var(--hollow); font-family:var(--mono); white-space:nowrap; }
.ac-sort.on { box-shadow:0 0 0 2px var(--ink); font-weight:700; }
.ac-sort:not(.on) { opacity:0.72; }
.ac-sort-caption { font-size:13px; color:var(--ash); margin:0 0 14px; padding:8px 12px; background:var(--mist); border:1px solid var(--hairline); border-left:3px solid var(--ink); border-radius:var(--r); }
.ac-sort-caption b { color:var(--ink); font-weight:600; }
.ac-sort-hint { color:var(--hollow); font-size:11.5px; }
.ac-filters-row { justify-content:flex-start; gap:16px; }
.ac-links { display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; margin-top:2px; }
.ac-link.nv { color:#03c75a; }

/* ===== 매물 스캐너 (listings.html) ===== */
.btn.ghost { background: transparent; }
.lst-hero-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.lst-stat { border: 1px solid var(--hairline); border-radius: var(--r-pill); padding: 6px 14px; font-size: 12.5px; color: var(--ash); display: flex; align-items: center; gap: 6px; }
.lst-stat b { font-family: var(--mono); font-size: 15px; color: var(--ink); font-weight: 700; }

.lst-wiz { border: 1px solid var(--hairline); border-radius: var(--r); padding: 20px; background: var(--paper); }
.lst-step { font-family: var(--mono); font-size: 11.5px; color: var(--hollow); letter-spacing: 0.04em; }
.lst-q { font-size: 19px; font-weight: 650; letter-spacing: -0.02em; margin: 8px 0 16px; }
.lst-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.fchip { border: 1px solid var(--edge); background: var(--paper); color: var(--ash); border-radius: var(--r-pill); padding: 7px 14px; font-size: 13px; cursor: pointer; font-family: inherit; transition: background 0.15s, border-color 0.15s, color 0.15s; }
.fchip:hover { background: var(--veil); color: var(--ink); }
.fchip.on { background: var(--press); color: var(--on-press); border-color: transparent; }
.fchip.lst-group { border-style: dashed; }
.lst-wizbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.lst-wizcount { font-family: var(--mono); font-size: 13px; color: var(--ink); margin-right: auto; }

.lst-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 12px; }
.lst-filters input[type='text'] { width: 100%; border: 1px solid var(--edge); border-radius: var(--r); background: var(--paper); color: var(--ink); padding: 9px 12px; font-size: 13.5px; font-family: inherit; }

.lst-card { display: block; }
.lst-card .ac-top { align-items: flex-start; justify-content: space-between; }
.lst-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.lst-verdict { font-family: var(--mono); font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: var(--r-pill); border: 1px solid var(--hairline); color: var(--ash); }
.lst-verdict.bad { color: var(--bad); background: var(--bad-bg); border-color: transparent; }
.lst-verdict.mark { color: var(--mark); background: var(--mark-bg); border-color: transparent; }
.lst-verdict.mute { color: var(--hollow); }
.lst-conf { font-size: 11.5px; color: var(--hollow); }
.lst-title { font-size: 16.5px; font-weight: 650; letter-spacing: -0.01em; }
.lst-card .ac-addr { font-size: 12.5px; font-weight: 400; color: var(--ash); margin-top: 4px; }
.lst-card .ac-price { font-family: var(--mono); font-size: 20px; font-weight: 700; text-align: right; }
.lst-card .ac-meta { justify-content: flex-end; text-align: right; display: block; }
.lst-card .ac-side { flex-direction: column; align-items: flex-end; gap: 2px; }
.lst-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.lst-tag { font-size: 11px; padding: 2px 8px; border-radius: var(--r-pill); border: 1px solid var(--hairline); color: var(--ash); }
.lst-tag.warn { color: var(--warn); background: var(--warn-bg); border-color: transparent; }
.lst-tag.mark { color: var(--mark); background: var(--mark-bg); border-color: transparent; }
.lst-ft { font-size: 12px; color: var(--hollow); margin-top: 6px; line-height: 1.5; }

.lst-radar { margin-top: 12px; padding: 11px 13px; border-radius: var(--r); background: var(--mist); border: 1px solid var(--hairline); font-size: 12.5px; color: var(--ash); }
.lst-radar.mute { color: var(--hollow); }
.lst-radar-top { font-family: var(--mono); color: var(--ink); display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.lst-radar-top b { font-family: var(--font); font-weight: 650; }
.lst-axis { font-family: var(--font); font-size: 11.5px; color: var(--ash); }
.lst-radar-row { margin-top: 5px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lst-radar-row .ok { color: var(--good); font-weight: 650; }
.lst-radar-row .no { color: var(--bad); font-weight: 650; }
.lst-more-wrap { display: flex; justify-content: center; margin-top: 16px; }

/* 단지 팝업 안의 매물 섹션 */
.mv-list { display: flex; flex-direction: column; gap: 8px; }
.mv-area { border: 1px solid var(--hairline); border-radius: var(--r); padding: 10px 12px; }
.mv-area-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 600; flex-wrap: wrap; }
.mv-area-sub { font-size: 11.5px; color: var(--hollow); margin-top: 3px; }
.mv-row { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--ash); padding: 5px 0; border-top: 1px dashed var(--hairline); margin-top: 6px; }
.mv-row b { font-family: var(--mono); color: var(--ink); }

@media (max-width: 720px) {
  .lst-card .ac-top { flex-direction: column; }
  .lst-card .ac-side { align-items: flex-start; }
  .lst-card .ac-meta { text-align: left; }
  .lst-card .ac-price { text-align: left; }
}
