/* 실거래 레이더 — 증권 앱처럼 깔끔하고 숫자가 주인공. 흰 바탕, 큰 검은 숫자, 둥근 판, 보라 한 가지.
   오르면 빨강, 내리면 파랑. 거래가는 언제나 가장 크고 굵게. */
:root {
  --key: #5b4bff;
  --ink: #111318;
  --sub: #8b919c;
  --line: #eef0f3;
  --bg: #f4f5f8;
  --box: #fff;
  --up: #f04452;
  --down: #3182f6;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; word-break: keep-all; overflow-wrap: break-word; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.6 Pretendard, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif; font-feature-settings: 'tnum'; letter-spacing: -.2px; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--key); outline-offset: 2px; border-radius: 6px; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.none { color: var(--sub); }

/* 머리 */
.hd { position: sticky; top: 0; z-index: 10; background: rgba(255, 255, 255, .86); backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--line); }
.hd-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; padding-bottom: 4px; }
.logo { display: flex; align-items: center; gap: 8px; font-size: 21px; font-weight: 800; letter-spacing: -1px; }
.logo svg { width: 26px; height: 26px; padding: 4px; border-radius: 8px; fill: #fff; background: var(--key); }
.today { margin: 0; font-size: 13px; color: var(--sub); }
.today b { color: var(--key); font-size: 15px; }
.tabs .wrap { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-top: 8px; padding-bottom: 10px; }
.tabs .wrap::-webkit-scrollbar { display: none; }
.tabs a { flex: none; padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: 14px; color: #4e5562; background: var(--bg); }
.tabs a:hover { background: #e9ebf0; }
.tabs a.on { color: #fff; background: var(--ink); }

.frame { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; padding-top: 22px; padding-bottom: 44px; align-items: start; }
.main, .side { min-width: 0; }

/* 판 */
.sheet { background: var(--box); border-radius: 20px; padding: 6px 22px 14px; margin-bottom: 18px; box-shadow: 0 1px 2px rgba(17, 19, 24, .04); }
.sh { display: flex; align-items: center; justify-content: space-between; margin: 0; padding: 18px 0 10px; font-size: 22px; font-weight: 800; letter-spacing: -1px; }
.sh.sm { font-size: 18px; padding-top: 16px; }
.sh .more { font-size: 13px; font-weight: 600; color: var(--sub); }
.sh a:hover { color: var(--key); }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.duo > * { min-width: 0; }

/* 거래 줄 */
.grid { width: 100%; border-collapse: collapse; table-layout: fixed; }
.grid thead { display: none; }
.grid td { padding: 14px 4px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.grid tr:last-child td { border-bottom: 0; }
.grid tr:hover td { background: #fafbfc; }
.c-r { width: 120px; color: var(--sub); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-n { font-weight: 700; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-a { width: 70px; text-align: right; color: #4e5562; font-size: 14px; }
.c-p { width: 150px; text-align: right; font-weight: 800; font-size: 18px; letter-spacing: -.6px; white-space: nowrap; }
.c-d { width: 58px; text-align: right; color: var(--sub); font-size: 12px; }
.nw { margin-left: 6px; font-style: normal; font-size: 11px; font-weight: 700; color: var(--key); background: #efedff; border-radius: 6px; padding: 1px 6px; vertical-align: 2px; }
.mini { list-style: none; margin: 0; padding: 0; }
.mini a { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.mini li:last-child a { border-bottom: 0; }
.mini span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.mini small { color: var(--sub); font-weight: 400; }
.mini b { flex: none; font-size: 16px; }

.pagination { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin-top: 14px; font-size: 14px; }
.pagination a, .pagination strong, .pagination .gap { min-width: 34px; padding: 6px 10px; text-align: center; border-radius: 10px; font-weight: 600; }
.pagination a:hover { background: var(--bg); }
.pagination strong { background: var(--ink); color: #fff; }

/* 옆칸 */
.sbox { background: var(--box); border-radius: 20px; padding: 18px 20px; position: sticky; top: 112px; }
.sbox h2 { margin: 0 0 8px; font-size: 17px; letter-spacing: -.6px; }
.sbox ol { margin: 0; padding: 0; list-style: none; counter-reset: n; }
.sbox li { counter-increment: n; }
.sbox a { display: flex; align-items: center; gap: 10px; padding: 9px 0; font-size: 14px; }
.sbox a::before { content: counter(n); flex: none; width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: var(--key); background: #efedff; }
.sa { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp { flex: none; font-weight: 800; }

/* 거래 글 */
.doc { padding-top: 18px; }
.crumb { margin: 0; font-size: 13px; color: var(--sub); }
.crumb a { color: var(--key); font-weight: 700; }
.doc h1 { margin: 6px 0; font-size: 26px; line-height: 1.35; letter-spacing: -1.2px; }
.meta { margin: 0 0 18px; padding-bottom: 14px; font-size: 13px; color: var(--sub); border-bottom: 1px solid var(--line); }
.body { font-size: 16px; line-height: 1.75; overflow-wrap: anywhere; color: #333842; }
.body img { max-width: 100%; height: auto; border-radius: 14px; }
.body a { color: var(--key); text-decoration: underline; }
.body h3 { margin: 28px 0 10px; font-size: 18px; letter-spacing: -.6px; color: var(--ink); }
.body .lead { margin-top: 0; }
.stats { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 8px; margin: 16px 0; }
.stat { padding: 14px 16px; border-radius: 16px; background: var(--bg); }
.stat small { display: block; font-size: 13px; color: var(--sub); }
.stat strong { display: block; font-size: 20px; font-weight: 800; color: var(--ink); }
.stat strong.price { font-size: 32px; letter-spacing: -1.5px; white-space: nowrap; }
.stat strong.price small { display: inline; font-size: 15px; letter-spacing: 0; }
.stat:has(.price) { background: #efedff; }
table.data { width: 100%; border-collapse: collapse; font-size: 15px; }
table.data th { text-align: left; font-size: 13px; color: var(--sub); font-weight: 500; padding: 8px 6px; border-bottom: 1px solid var(--line); }
table.data td { padding: 12px 6px; border-bottom: 1px solid var(--line); }
table.data td.num { font-weight: 700; }
.up { color: var(--up); font-weight: 700; }
.down { color: var(--down); font-weight: 700; }
.flat { color: var(--sub); }
.src { font-size: 13px; color: var(--sub); }

/* 키워드 링크 묶음 — 둥근 '주변 정보' 칸 (광고 표시 없음) */
.pl { margin: 22px 0; font-size: 15px; }
.pl p { margin: 6px 0; padding-left: 18px; position: relative; }
.pl p::before { content: ''; position: absolute; left: 1px; top: .5em; width: 8px; height: 8px; border: 2px solid var(--key); border-radius: 50% 50% 50% 0; transform: rotate(-45deg); }
.pl a { font-weight: 700; color: var(--key); text-decoration: underline; text-underline-offset: 3px; }
.pl-g { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; margin: 0 0 10px; }
.pl-g a { display: block; }
.pl-g img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 1; object-fit: cover; border-radius: 12px; }
.pl-q { padding: 14px 18px; background: #f7f6ff; border-radius: 16px; }
.pl-n { padding: 14px 18px; border: 1px solid var(--line); border-radius: 16px; }
.sheet > .pl:only-child { margin: 16px 0 4px; }

.nf { padding: 40px 18px; text-align: center; }
.nf a { color: var(--key); text-decoration: underline; }
.ft { padding: 20px 0 36px; font-size: 12px; color: var(--sub); }
.ft p { margin: 2px 0; }

@media (max-width: 900px) {
  .frame { grid-template-columns: 1fr; }
  .sbox { position: static; }
  .duo { grid-template-columns: 1fr; }
  .c-r, .c-d { display: none; }
  .c-a { width: 54px; font-size: 13px; }
  .c-p { width: 112px; font-size: 16px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:first-child { grid-column: 1 / -1; }
  .today { display: none; }
  .wrap { padding: 0 14px; }
  .sheet { padding: 4px 16px 12px; border-radius: 16px; }
}

/* ───── 2차: 첫 화면 무대 · 지역 카드 · 가격 막대 ───── */
.hero { position: relative; overflow: hidden; display: grid; align-items: end; min-height: 260px; margin-bottom: 16px; padding: 30px 32px 28px; border-radius: 24px; color: #fff;
  background: radial-gradient(520px 320px at 92% 0, rgba(255, 255, 255, .22), transparent 70%), radial-gradient(500px 300px at 70% 130%, rgba(255, 138, 196, .45), transparent 70%), linear-gradient(135deg, #5b4bff, #7d5cff 55%, #9b7bff); }
.hero.has-img { background: #5b4bff; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: right center; }
.hero.has-img::before { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(48, 32, 170, .92) 0, rgba(70, 52, 220, .72) 45%, rgba(91, 75, 255, 0) 80%); }
.hero-t { position: relative; z-index: 2; max-width: 640px; }
.eyebrow { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, .82); }
.live { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: #5cf2a4; box-shadow: 0 0 0 4px rgba(92, 242, 164, .25); vertical-align: 1px; }
.hero h1 { margin: 0 0 20px; font-size: 32px; line-height: 1.25; letter-spacing: -1.4px; font-weight: 800; }
.kpis { display: flex; flex-wrap: wrap; gap: 10px; }
.kpi { min-width: 150px; padding: 12px 16px; border-radius: 16px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22); backdrop-filter: blur(10px); color: #fff; }
a.kpi:hover { background: rgba(255, 255, 255, .22); }
.kpi small { display: block; font-size: 12px; color: rgba(255, 255, 255, .78); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpi strong { display: block; margin-top: 2px; font-size: 24px; font-weight: 800; letter-spacing: -.8px; white-space: nowrap; }
.kpi strong span { font-size: 13px; font-weight: 600; margin-left: 2px; opacity: .8; }

.regions { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-bottom: 18px; }
.region { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 14px 16px; border-radius: 18px; background: var(--box); box-shadow: 0 1px 2px rgba(17, 19, 24, .04); transition: transform .15s, box-shadow .15s; }
.region:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -12px rgba(91, 75, 255, .45); }
.region img, .rg-dot { grid-row: span 2; border-radius: 14px; }
.rg-dot { width: 44px; height: 44px; background: #efedff; position: relative; }
.rg-dot::after { content: ''; position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -10px 0 0 -7px; border: 3px solid var(--key); border-radius: 50% 50% 50% 0; transform: rotate(-45deg); }
.k-gyeonggi .rg-dot { background: #e6f7f0; } .k-gyeonggi .rg-dot::after { border-color: #12b886; }
.k-incheon .rg-dot { background: #e7f1ff; } .k-incheon .rg-dot::after { border-color: #3182f6; }
.k-local .rg-dot { background: #fff2e6; } .k-local .rg-dot::after { border-color: #f08c00; }
.rg-n { font-size: 17px; font-weight: 800; letter-spacing: -.5px; }
.rg-s { font-size: 12px; color: var(--sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rg-s b { color: var(--ink); }

.sh-sub { font-size: 13px; font-weight: 500; color: var(--sub); letter-spacing: 0; }
.c-p { position: relative; }
.c-p .bar { position: absolute; right: 4px; bottom: 6px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, rgba(91, 75, 255, .15), var(--key)); max-width: calc(100% - 8px); }
.lh { display: flex; align-items: center; gap: 14px; padding: 18px 0 12px; }
.lh img { border-radius: 16px; flex: none; }
.lh h1 { margin: 0; font-size: 22px; letter-spacing: -1px; }
.lh p { margin: 2px 0 0; font-size: 13px; color: var(--sub); }
.nf-img { display: block; max-width: 100%; height: auto; margin: 0 auto 12px; border-radius: 18px; }

@media (max-width: 900px) {
  .hero { min-height: 0; padding: 22px 18px 18px; border-radius: 20px; }
  .hero.has-img::before { background: linear-gradient(180deg, rgba(70, 52, 220, .35), rgba(48, 32, 170, .94) 60%); }
  .hero-img { object-position: center top; }
  .hero.has-img { padding-top: 120px; }
  .hero h1 { font-size: 24px; margin-bottom: 14px; }
  .kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .kpi { min-width: 0; padding: 10px 12px; }
  .kpi:first-child { grid-column: 1 / -1; }
  .kpi strong { font-size: 19px; }
  .regions { grid-template-columns: 1fr 1fr; gap: 8px; }
  .region { padding: 12px; column-gap: 10px; }
  .region img, .rg-dot { width: 38px; height: 38px; border-radius: 12px; }
}

/* ───── 3차: 글이 주인공 — 얇은 숫자 띠 ───── */
.hero.slim { min-height: 0; padding: 16px 20px; border-radius: 20px; margin-bottom: 14px; }
.hero.slim .eyebrow { margin-bottom: 10px; }
.hero.slim .kpi { padding: 8px 14px; border-radius: 12px; }
.hero.slim .kpi strong { font-size: 20px; }
@media (max-width: 900px) {
  .hero.slim, .hero.slim.has-img { padding: 14px; }
  .hero.slim .kpi strong { font-size: 17px; }
}

/* 거래 글의 단지 정보 */
dl.kv { display: grid; grid-template-columns: 96px 1fr; margin: 18px 0; border-radius: 16px; overflow: hidden; background: var(--bg); }
dl.kv dt, dl.kv dd { margin: 0; padding: 10px 14px; border-bottom: 1px solid #fff; }
dl.kv dt { font-size: 13px; color: var(--sub); font-weight: 600; }
dl.kv dd { font-weight: 600; }
dl.kv dt:nth-last-child(2), dl.kv dd:last-child { border-bottom: 0; }
