/* ===========================================================
   부동산급매.com v6 — 레드·화이트 에디토리얼 (2026-09-05)
   골격: [블랙 티커바] [헤더] [날개2 | 17시도 지도 | 날개2] [검색바]
         [추천 급매] [뉴스 | 커뮤니티 | 시세차트] [시세·지표] [접수조회] [검색사이트] [푸터]
   가로 슬라이드(4 상담 패널)는 v4 로직 유지. 세로 풀페이지 스냅은 폐지 → 일반 스크롤.
   =========================================================== */

/* ---------- 폰트 ----------
   Pretendard Variable = index.html의 동적 서브셋 CSS(jsdelivr)가 선언. 여기선 Paperlogy 800 하나만(로고/제목).
   swap: 폰트 도착 전 시스템 글꼴로 먼저 그림 → 텍스트 표시 지연 0 */
@font-face {
  font-family: "Paperlogy"; font-weight: 800; font-display: swap;
  src: url("https://fastly.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-8ExtraBold.woff2") format("woff2");
}

/* ---------- 토큰 ---------- */
:root {
  --red-700: #B3121A;
  --red-600: #D71920;      /* 시그널 레드 (단일 강조색) */
  --red-500: #E8343B;
  --red-100: #FDE8E9;
  --red-50:  #FFF5F5;

  --ink-900: #111418;
  --ink-700: #2B3037;
  --ink-500: #5B6470;
  --ink-400: #7B848F;
  --ink-300: #A7AEB8;
  --ink-200: #D9DDE3;
  --ink-100: #EBEDF0;
  --ink-50:  #F6F7F9;
  --white:   #FFFFFF;

  --up:   #D71920;   /* 상승 = 빨강 (국내 관습) */
  --down: #1F5FD0;   /* 하락 = 파랑 */
  --flat: #7B848F;

  --font-display: "Paperlogy", "Pretendard Variable", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
  --font-body:    "Pretendard Variable", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
  --font-mono:    "JetBrains Mono", "D2Coding", "SF Mono", Menlo, Consolas, monospace;
  --font-serif:   "Nanum Myeongjo", "Noto Serif KR", serif;

  --hair: 1px solid var(--ink-200);
  --hair-soft: 1px solid var(--ink-100);

  --r-sm: 6px; --r-md: 10px; --r-lg: 14px; --r-pill: 999px;

  --sh-1: 0 1px 2px rgba(17,20,24,.05);
  --sh-2: 0 6px 18px rgba(17,20,24,.08);
  --sh-3: 0 18px 44px rgba(17,20,24,.14);

  --dur-fast: 160ms; --dur-base: 260ms; --dur-slow: 420ms;
  --ease-out: cubic-bezier(.16,1,.3,1);

  --wrap: 1440px;
  --wing-w: 236px;

  --z-sticky: 100; --z-mega: 300; --z-overlay: 400; --z-toast: 600;
}

/* v4 서브패널/날개 테마 변수 — 전부 레드 계열로 단일화 */
[data-theme="buy"], [data-theme="leaseout"], [data-theme="leasein"], [data-theme="sell"] {
  --theme: var(--red-600); --theme-soft: var(--red-50);
}

/* ---------- 리셋 ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { height: 100%; scroll-behavior: smooth; }
body {
  height: 100%;
  font-family: var(--font-body); font-size: 15px; line-height: 1.5;
  color: var(--ink-900); background: var(--white);
  overflow: hidden; -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01";
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.v4-serif { font-family: var(--font-serif); }
.rs-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
::selection { background: var(--red-600); color: #fff; }
:focus-visible { outline: 2px solid var(--red-600); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ===========================================================
   가로 슬라이드 스테이지 (v4 로직 유지)
   =========================================================== */
.v4-stage { position: fixed; inset: 0; overflow: hidden; background: var(--white); }
.v4-track {
  display: flex; width: 500vw; height: 100%;
  transform: translateX(calc(var(--i, 2) * -100vw));
  transition: transform 640ms var(--ease-out);
}
.v4-track[data-index="0"] { --i: 0; } .v4-track[data-index="1"] { --i: 1; }
.v4-track[data-index="2"] { --i: 2; } .v4-track[data-index="3"] { --i: 3; }
.v4-track[data-index="4"] { --i: 4; }
.v4-panel { width: 100vw; height: 100%; flex: 0 0 100vw; position: relative; overflow: hidden; }
.v4-main { overflow-y: auto; overflow-x: hidden; scroll-behavior: smooth; }
.v4-sub { overflow-y: auto; background: var(--ink-50); }
@media (prefers-reduced-motion: reduce) { .v4-track { transition: none; } }

/* ===========================================================
   블랙 티커바
   =========================================================== */
.rs-tickerbar {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: 18px;
  height: 36px; padding: 0 clamp(16px, 2.4vw, 36px);
  background: var(--ink-900); color: #fff;
  font-family: var(--font-mono); font-size: 12.5px; font-variant-numeric: tabular-nums;
}
.rs-tickerbar__tag {
  flex: none; display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-body); font-weight: 800; font-size: 11px; letter-spacing: .14em; color: #fff;
}
.rs-tickerbar__tag::before { content: ""; width: 7px; height: 7px; border-radius: 1.5px; background: var(--red-600); }
.rs-tickerbar__live {
  flex: none; font-family: var(--font-body); font-size: 10.5px; letter-spacing: .12em; color: var(--ink-300);
}
.v4-ticker { flex: 1; min-width: 0; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); }
.v4-ticker__track { display: inline-flex; gap: 38px; white-space: nowrap; will-change: transform; }
.v4-ticker__track.is-running { animation: rs-marquee 70s linear infinite; }
@keyframes rs-marquee { to { transform: translateX(-33.333%); } }
.v4-ticker:hover .v4-ticker__track { animation-play-state: paused; }
.v4-ticker__item { display: inline-flex; align-items: center; gap: 8px; }
.v4-ticker__icon { display: none; }
.v4-ticker__label { color: var(--ink-300); font-family: var(--font-body); font-weight: 600; font-size: 12px; }
.v4-ticker__value { font-weight: 700; color: #fff; }
.v4-ticker__delta { font-weight: 700; display: inline-flex; align-items: center; gap: 3px; }
.v4-ticker__delta[data-trend="up"]   { color: #FF6B70; }
.v4-ticker__delta[data-trend="down"] { color: #6FA8FF; }
.v4-ticker__delta[data-trend="flat"] { color: var(--ink-300); }
.v4-ticker__value[data-trend="up"]   { color: #FF6B70; }
.v4-ticker__value[data-trend="down"] { color: #6FA8FF; }
@media (prefers-reduced-motion: reduce) { .v4-ticker__track.is-running { animation: none; } }

/* ===========================================================
   헤더 (스티키) + 메가패널
   =========================================================== */
.v4-hero {
  position: sticky; top: 0; z-index: var(--z-sticky);
  background: rgba(255,255,255,.94); backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: var(--hair);
}
.v4-hero__row {
  display: flex; align-items: center; gap: 28px;
  max-width: var(--wrap); margin: 0 auto;
  height: 72px; padding: 0 clamp(16px, 2.4vw, 36px);
}
.v4-hero__brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.v4-hero__mark {
  flex: none; width: 40px; height: 40px; border-radius: 8px; background: var(--red-600);
  display: grid; place-items: center; color: #fff; box-shadow: var(--sh-1);
}
.v4-hero__logo {
  font-family: var(--font-display); font-weight: 800; font-size: 27px; letter-spacing: -.02em; line-height: 1;
  white-space: nowrap; color: var(--ink-900);
}
.v4-hero__tld { color: var(--red-600); font-size: .68em; margin-left: 1px; }
.v4-hero__eyebrow { display: none; }
.v4-meganav { display: flex; gap: 4px; margin-left: auto; }
.v4-meganav__top {
  position: relative; padding: 10px 16px; border-radius: var(--r-sm);
  font-weight: 700; font-size: 15.5px; color: var(--ink-700);
  transition: color var(--dur-fast), background var(--dur-fast);
}
.v4-meganav__top:hover, .v4-meganav__top[aria-expanded="true"] { color: var(--red-600); background: var(--red-50); }
.v4-meganav__top::after {
  content: ""; position: absolute; left: 16px; right: 16px; bottom: 5px; height: 2px; border-radius: 1px;
  background: var(--red-600); transform: scaleX(0); transform-origin: left; transition: transform var(--dur-base) var(--ease-out);
}
.v4-meganav__top:hover::after { transform: scaleX(1); }
.v4-hero__cta { flex: none; }

/* 버튼 */
.v4-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: var(--r-sm);
  font-weight: 800; font-size: 14.5px; letter-spacing: -.01em; line-height: 1;
  background: var(--red-600); color: #fff;
  transition: background var(--dur-fast), transform var(--dur-fast), box-shadow var(--dur-fast);
}
.v4-btn:hover { background: var(--red-700); box-shadow: var(--sh-2); }
.v4-btn:active { transform: translateY(1px); }
.v4-btn:disabled { opacity: .55; cursor: progress; }
.v4-btn--lime, .v4-btn--theme { background: var(--red-600); color: #fff; }
.v4-btn--ghost { background: transparent; color: var(--ink-900); border: 1.5px solid var(--ink-900); }
.v4-btn--ghost:hover { background: var(--ink-900); color: #fff; box-shadow: none; }

/* 메가패널 */
.v4-megapanel {
  position: absolute; left: 0; right: 0; top: 100%; z-index: var(--z-mega);
  background: #fff; border-bottom: 2px solid var(--red-600); box-shadow: var(--sh-3);
  opacity: 0; transform: translateY(-6px); transition: opacity var(--dur-base), transform var(--dur-base) var(--ease-out);
}
.v4-megapanel.is-open { opacity: 1; transform: none; }
.v4-megapanel__inner {
  max-width: var(--wrap); margin: 0 auto; padding: 26px clamp(16px, 2.4vw, 36px) 30px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px;
}
.v4-megapanel__col { display: flex; flex-direction: column; gap: 2px; }
.v4-megapanel__col h3 {
  font-size: 12px; font-weight: 800; letter-spacing: .12em; color: var(--red-600);
  padding-bottom: 8px; margin-bottom: 6px; border-bottom: var(--hair);
}
.v4-megapanel__col button {
  text-align: left; padding: 8px 10px; border-radius: var(--r-sm); font-weight: 600; font-size: 14.5px; color: var(--ink-700);
}
.v4-megapanel__col button:hover { background: var(--red-50); color: var(--red-600); }

/* ===========================================================
   홈 랩퍼/섹션 공통
   =========================================================== */
.rs-home { max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(16px, 2.4vw, 36px) 40px; }
.rs-section { padding: 44px 0 8px; scroll-margin-top: 84px; }
.rs-section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.rs-section__eyebrow { font-family: var(--font-mono); font-size: 11.5px; font-weight: 700; letter-spacing: .16em; color: var(--red-600); margin-bottom: 6px; }
.rs-section__title { font-family: var(--font-display); font-weight: 800; font-size: clamp(22px, 2.2vw, 30px); letter-spacing: -.02em; line-height: 1.15; }
.rs-section__lede { margin-top: 6px; color: var(--ink-500); font-size: 14.5px; }
.rs-section__more { flex: none; font-weight: 700; font-size: 13.5px; color: var(--ink-500); display: inline-flex; align-items: center; gap: 4px; padding: 6px 2px; }
.rs-section__more:hover { color: var(--red-600); }
.rs-divider { height: 1px; background: var(--ink-100); margin: 36px 0 0; }

/* 레드 탑보더 카드 (공통) */
.rs-card { background: #fff; border: var(--hair); border-top: 3px solid var(--red-600); border-radius: 4px 4px var(--r-md) var(--r-md); box-shadow: var(--sh-1); }

/* ===========================================================
   PORTAL — 날개2 | 지도 | 날개2
   =========================================================== */
.v4-vpage--portal { padding-top: 26px; }
.v4-body {
  display: grid; grid-template-columns: var(--wing-w) minmax(0, 1fr) var(--wing-w);
  gap: 22px; align-items: stretch;
}
.v4-wing { display: flex; flex-direction: column; gap: 18px; min-height: 0; }
.v4-wingbox {
  position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  padding: 28px 20px 26px; text-align: center;
  background: #fff; border: var(--hair); border-top: 3px solid var(--red-600); border-radius: 4px 4px var(--r-md) var(--r-md);
  box-shadow: var(--sh-1); transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base), border-color var(--dur-base);
}
.v4-wingbox:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: var(--red-100); }
.v4-wingbox__index { position: absolute; top: 12px; left: 14px; font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--ink-300); }
.v4-wingbox__label { font-family: var(--font-display); font-weight: 800; font-size: 21px; letter-spacing: -.02em; line-height: 1.25; color: var(--ink-900); }
.v4-wingbox__ic { display: grid; place-items: center; width: 64px; height: 64px; color: var(--red-600); }
.v4-wingbox__ic svg { width: 56px; height: 56px; }
.v4-wingbox__sub { font-size: 13.5px; color: var(--ink-500); }
.v4-wingbox__arrow {
  position: absolute; right: 12px; bottom: 12px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; color: var(--red-600); background: var(--red-50);
  transition: background var(--dur-fast), color var(--dur-fast);
}
.v4-wingbox:hover .v4-wingbox__arrow { background: var(--red-600); color: #fff; }

/* 지도 존 */
.v4-zone { position: relative; min-height: 560px; display: flex; flex-direction: column; }
.v4-mainbox--map { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; }
.v4-map { position: relative; width: 100%; height: 100%; min-height: 560px; display: flex; align-items: center; justify-content: center; }
.v4-map svg { width: auto; height: 100%; max-height: 640px; max-width: 100%; overflow: visible; }
.rs-map__region {
  fill: #fff; stroke: var(--red-600); stroke-width: 1.05; stroke-linejoin: round; cursor: pointer;
  transition: fill var(--dur-base) var(--ease-out), stroke-width var(--dur-fast);
}
.rs-map__region[data-band="1"] { fill: #FFF6F6; }
.rs-map__region[data-band="2"] { fill: #FDE3E4; }
.rs-map__region[data-band="3"] { fill: #F9C4C6; }
.rs-map__region[data-band="4"] { fill: #F19A9E; }
.rs-map__region[data-band="5"] { fill: #E86A70; }
.rs-map__region:hover, .rs-map__region:focus-visible { fill: var(--red-600); stroke-width: 1.6; outline: none; }
.rs-map__leaders line { stroke: var(--ink-400); stroke-width: .9; }
.rs-map__leaders circle { fill: var(--ink-400); }
.rs-map__label { pointer-events: none; }
.rs-map__name { font-family: var(--font-body); font-weight: 800; font-size: 12.5px; fill: var(--ink-900); text-anchor: middle; paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round; }
.rs-map__badge rect { fill: var(--red-600); }
.rs-map__badge[data-empty] rect { fill: var(--ink-300); }
.rs-map__count { font-family: var(--font-mono); font-weight: 700; font-size: 10.5px; fill: #fff; text-anchor: middle; }
.rs-map__legend {
  position: absolute; left: 6px; bottom: 6px; display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; color: var(--ink-500); background: rgba(255,255,255,.85); padding: 6px 10px; border-radius: var(--r-sm); border: var(--hair-soft);
}
.rs-map__legend-bar { width: 84px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #FFF6F6, #F19A9E, #D71920); border: 1px solid var(--ink-200); }
.rs-map__tip {
  position: absolute; pointer-events: none; z-index: 3; transform: translate(-50%, calc(-100% - 12px));
  background: var(--ink-900); color: #fff; padding: 7px 11px; border-radius: var(--r-sm); font-size: 12.5px; white-space: nowrap; box-shadow: var(--sh-2);
  opacity: 0; transition: opacity var(--dur-fast);
}
.rs-map__tip.is-on { opacity: 1; }
.rs-map__tip b { font-family: var(--font-mono); color: #FF8A8E; margin-left: 4px; }
.rs-map__loading { color: var(--ink-400); font-size: 13.5px; }

/* 계약서 스트립 (지도 아래 우측) */
.v4-contract--strip {
  position: absolute; right: 6px; bottom: 6px; display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: var(--r-sm); background: #fff; border: var(--hair); box-shadow: var(--sh-1);
  font-size: 12.5px; color: var(--ink-500);
}
.v4-contract__click { font-weight: 800; color: var(--red-600); text-decoration: underline; text-underline-offset: 3px; }

/* 구 v4 시도 레일 — 폐지 (지도가 대신) */
.v4-rail { display: none; }

/* ===========================================================
   검색바 (레드 프레임) — v4 #v4-search 로직 그대로
   =========================================================== */
.v4-search {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 24px 0 0; padding: 12px; border: 2px solid var(--red-600); border-radius: var(--r-md); background: #fff; box-shadow: var(--sh-1);
}
.v4-search__seg { display: inline-flex; border: 1.5px solid var(--ink-900); border-radius: var(--r-sm); overflow: hidden; flex: none; }
.v4-search__seg button { padding: 10px 18px; font-weight: 800; font-size: 14.5px; color: var(--ink-700); background: #fff; }
.v4-search__seg button + button { border-left: 1.5px solid var(--ink-900); }
.v4-search__seg button.is-on { background: var(--red-600); color: #fff; }
.v4-search__slot { flex: 1 1 160px; display: flex; min-width: 0; }
.v4-search__slot select, .v4-search__input, .v4-search__phone {
  width: 100%; height: 44px; padding: 0 14px; border: var(--hair); border-radius: var(--r-sm); background: #fff; font-size: 14.5px;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.v4-search__slot select { appearance: none; -webkit-appearance: none; padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 6l4.5 4.5L12.5 6' fill='none' stroke='%23111418' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 14px; }
.v4-search__input { flex: 3 1 320px; }
.v4-search__phone { flex: 1 1 160px; }
.v4-search__slot select:focus, .v4-search__input:focus, .v4-search__phone:focus { outline: none; border-color: var(--red-600); box-shadow: 0 0 0 3px var(--red-100); }
.v4-search__go { flex: none; height: 44px; padding: 0 26px; }
.v4-form-privacy { flex: 1 1 100%; margin: 0; font-size: 11.5px; color: var(--ink-400); text-align: left; padding: 0 2px; }

/* ===========================================================
   DEALS — 추천 급매 카드 4열 + 스탯
   =========================================================== */
.v4-market__stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.v4-stat { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: var(--hair); border-radius: var(--r-md); background: var(--ink-50); }
.v4-stat__num { font-size: 26px; font-weight: 800; letter-spacing: -.02em; color: var(--ink-900); }
.v4-stat__label { font-size: 13px; color: var(--ink-500); font-weight: 600; }
.v4-market__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.v4-listing {
  display: flex; flex-direction: column; background: #fff; border: var(--hair); border-radius: var(--r-md); overflow: hidden; cursor: pointer;
  box-shadow: var(--sh-1); transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base);
}
.v4-listing:hover, .v4-listing:focus-visible { transform: translateY(-3px); box-shadow: var(--sh-2); }
.v4-listing picture { display: block; }
.v4-listing img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; background: var(--ink-100); }
.v4-listing__body { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; position: relative; }
.v4-listing__type {
  position: absolute; top: -32px; left: 12px; padding: 4px 9px; border-radius: 4px;
  font-size: 11.5px; font-weight: 800; letter-spacing: .02em; color: #fff; background: var(--ink-900);
}
.v4-listing__type[data-tier="sale"] { background: var(--red-600); }
.v4-listing__type[data-tier="jeonse"] { background: var(--ink-700); }
.v4-listing__title { font-weight: 800; font-size: 16px; letter-spacing: -.01em; order: -2; }
.v4-listing__addr { font-size: 13px; color: var(--ink-500); order: -1; }
.v4-listing__specs { font-size: 12.5px; color: var(--ink-400); }
.v4-listing__price { font-family: var(--font-mono); font-weight: 800; font-size: 19px; letter-spacing: -.02em; color: var(--ink-900); margin-top: 6px; }

/* ===========================================================
   INFO — 뉴스 | 커뮤니티 | 시세차트 3열
   =========================================================== */
.rs-info { display: grid; grid-template-columns: 1fr 1fr 1.1fr; gap: 20px; }
.rs-panel { background: #fff; border: var(--hair); border-radius: var(--r-md); padding: 20px 22px 18px; box-shadow: var(--sh-1); display: flex; flex-direction: column; min-height: 300px; }
.rs-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; margin-bottom: 10px; border-bottom: 2px solid var(--ink-900); }
.rs-panel__title { font-family: var(--font-display); font-weight: 800; font-size: 18px; letter-spacing: -.02em; }
.rs-panel__more { font-size: 12.5px; font-weight: 700; color: var(--ink-500); }
.rs-panel__more:hover { color: var(--red-600); }
.rs-list { list-style: none; display: flex; flex-direction: column; }
.rs-list li { display: flex; align-items: baseline; gap: 10px; padding: 9px 0; border-bottom: var(--hair-soft); font-size: 14px; }
.rs-list li:last-child { border-bottom: 0; }
.rs-list li::before { content: ""; flex: none; width: 5px; height: 5px; border-radius: 50%; background: var(--red-600); transform: translateY(-2px); }
.rs-list__text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--ink-700); }
.rs-list__text:hover { color: var(--red-600); }
.rs-list__meta { flex: none; font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-400); }
.rs-list__new { flex: none; font-size: 9.5px; font-weight: 900; color: #fff; background: var(--red-600); border-radius: 3px; padding: 1px 4px; letter-spacing: .04em; }
.rs-empty {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
  color: var(--ink-400); font-size: 13.5px; padding: 26px 10px; border: 1.5px dashed var(--ink-200); border-radius: var(--r-md); background: var(--ink-50);
}
.rs-empty b { color: var(--ink-700); font-size: 14.5px; }
.rs-chart { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.rs-chart__legend { display: flex; gap: 16px; font-size: 12px; color: var(--ink-500); font-weight: 600; }
.rs-chart__legend span::before { content: ""; display: inline-block; width: 18px; height: 3px; border-radius: 2px; background: var(--red-600); margin-right: 6px; vertical-align: middle; }
.rs-chart__legend span[data-k="gold"]::before { background: var(--ink-900); }
.rs-chart__canvas { flex: 1; min-height: 190px; position: relative; }
.rs-chart__canvas canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.rs-chart__now { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rs-chart__now div { padding: 10px 12px; border: var(--hair); border-radius: var(--r-sm); background: var(--ink-50); }
.rs-chart__now small { display: block; font-size: 11.5px; color: var(--ink-500); font-weight: 600; }
.rs-chart__now b { font-family: var(--font-mono); font-size: 17px; letter-spacing: -.01em; }
.rs-chart__foot { font-family: var(--font-mono); font-size: 11px; color: var(--ink-400); text-align: right; }

/* ===========================================================
   INDEX — 시세·지표 차트 4열 (v4 canvas 로직 유지)
   =========================================================== */
.v4-charts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.v4-chart { background: #fff; border: var(--hair); border-radius: var(--r-md); padding: 16px 16px 12px; box-shadow: var(--sh-1); }
.v4-chart__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.v4-chart__head figcaption { font-weight: 800; font-size: 14px; }
.v4-chart__delta { font-size: 13px; font-weight: 700; }
.v4-chart__delta[data-trend="up"] { color: var(--up); } .v4-chart__delta[data-trend="down"] { color: var(--down); } .v4-chart__delta[data-trend="flat"] { color: var(--flat); }
.v4-chart__canvas { position: relative; height: 140px; }
.v4-chart__canvas canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.v4-chart__foot { margin-top: 8px; font-size: 11px; color: var(--ink-400); }
.rs-note { margin-top: 12px; font-size: 12px; color: var(--ink-400); }

/* ===========================================================
   MEMBER — 접수 조회 + 빠른 실행
   =========================================================== */
.v4-member { display: grid; grid-template-columns: 380px 1fr; gap: 20px; align-items: start; }
.v4-trackcard { display: flex; flex-direction: column; gap: 10px; padding: 24px; background: #fff; border: var(--hair); border-top: 3px solid var(--red-600); border-radius: 4px 4px var(--r-md) var(--r-md); box-shadow: var(--sh-1); }
.v4-trackcard__ic { color: var(--red-600); }
.v4-trackcard__title { font-family: var(--font-display); font-weight: 800; font-size: 19px; }
.v4-trackcard__hint { font-size: 13px; color: var(--ink-500); margin-bottom: 4px; }
.v4-trackcard input { height: 44px; padding: 0 14px; border: var(--hair); border-radius: var(--r-sm); font-size: 14.5px; }
.v4-trackcard input:focus { outline: none; border-color: var(--red-600); box-shadow: 0 0 0 3px var(--red-100); }
.v4-trackzone { min-height: 200px; }
.v4-quick { padding: 22px 24px; background: var(--ink-50); border: var(--hair); border-radius: var(--r-md); }
.v4-quick__head { font-weight: 800; font-size: 15px; margin-bottom: 14px; }
.v4-utils { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.v4-util {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: #fff; border: var(--hair); border-radius: var(--r-sm);
  font-weight: 700; font-size: 14px; text-align: left; transition: border-color var(--dur-fast), color var(--dur-fast), transform var(--dur-fast);
}
.v4-util:hover { border-color: var(--red-600); color: var(--red-600); transform: translateY(-1px); }
.v4-util__ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: var(--r-sm); background: var(--red-50); color: var(--red-600); flex: none; }
.v4-quick__legend { margin-top: 14px; font-size: 12.5px; color: var(--ink-500); display: flex; gap: 6px; align-items: flex-start; line-height: 1.6; }
.v4-quick__legend b { font-weight: 800; color: var(--ink-700); }
.v4-quick__legend b[data-st="done"] { color: var(--red-600); }
.v4-trackresults { display: flex; flex-direction: column; gap: 10px; }
.v4-trackresults__head { display: flex; align-items: center; justify-content: space-between; font-size: 14px; }
.v4-trackresults__head b { color: var(--red-600); }
.v4-trackresults__back { font-size: 13px; font-weight: 700; color: var(--ink-500); text-decoration: underline; text-underline-offset: 3px; }
.v4-trackrow { padding: 14px 16px; background: #fff; border: var(--hair); border-left: 4px solid var(--ink-300); border-radius: var(--r-sm); }
.v4-trackrow[data-status="contacted"] { border-left-color: var(--red-500); }
.v4-trackrow[data-status="done"] { border-left-color: var(--ink-900); }
.v4-trackrow__top { display: flex; align-items: center; gap: 10px; font-size: 13px; margin-bottom: 6px; }
.v4-trackrow__no { font-weight: 700; }
.v4-trackrow__kind { color: var(--ink-500); }
.v4-trackrow__status { margin-left: auto; font-weight: 800; color: var(--red-600); }
.v4-trackrow__summary { font-size: 14px; font-weight: 600; }
.v4-trackrow__meta { font-size: 12px; color: var(--ink-400); margin-top: 4px; }
.v4-trackresults__empty { padding: 26px; text-align: center; color: var(--ink-500); background: var(--ink-50); border-radius: var(--r-md); border: var(--hair); }

/* ===========================================================
   HUB — 검색 사이트
   =========================================================== */
.v4-hub__grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.v4-hub__card {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 12px 14px;
  background: #fff; border: var(--hair); border-radius: var(--r-md); transition: border-color var(--dur-fast), transform var(--dur-fast), box-shadow var(--dur-fast);
}
.v4-hub__card:hover { border-color: var(--hub-color, var(--red-600)); transform: translateY(-2px); box-shadow: var(--sh-2); }
.v4-hub__logo {
  display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 16px;
  background: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 0 0 1px rgba(15,23,42,.06);
}
.v4-hub__logo img { display: block; width: 64px; height: 64px; border-radius: 16px; object-fit: cover; }
.v4-hub__card:hover .v4-hub__logo { box-shadow: 0 0 0 2px var(--hub-color, var(--red-600)); }
.v4-hub__badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 88px; height: 34px; padding: 0 12px; border-radius: var(--r-sm);
  background: var(--hub-bg); color: var(--hub-fg); font-weight: 900; font-size: 13px; letter-spacing: .02em; white-space: nowrap;
}
.v4-hub__name { font-weight: 800; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.v4-hub__cat { font-size: 11.5px; color: var(--ink-400); }

/* ===========================================================
   FOOTER — 파트너 + 사업자/고지
   =========================================================== */
.rs-partners { margin-top: 44px; padding: 22px 0; border-top: var(--hair); border-bottom: var(--hair); display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.rs-partners__label { flex: none; font-weight: 800; font-size: 13px; letter-spacing: .06em; color: var(--ink-900); padding-right: 22px; border-right: var(--hair); }
.rs-partners__list { display: flex; flex-wrap: wrap; gap: 14px 30px; align-items: center; }
.rs-partners__item { font-weight: 800; font-size: 15px; color: var(--ink-300); letter-spacing: -.01em; }
.rs-partners__hint { flex: 1 1 100%; font-size: 12px; color: var(--ink-400); }
.v4-pagefoot { padding: 26px 0 8px; display: grid; grid-template-columns: 1fr auto; gap: 14px 40px; align-items: start; }
.v4-pagefoot__brand { font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: -.02em; grid-column: 1 / -1; }
.v4-pagefoot__brand span { color: var(--red-600); font-size: .7em; }
.v4-pagefoot__info { font-size: 12.5px; line-height: 1.75; color: var(--ink-500); }
.v4-pagefoot__info b { color: var(--ink-700); font-weight: 700; }
.v4-pagefoot__privacy { display: inline-block; margin-top: 4px; }
.v4-pagefoot__link { color: var(--ink-700); text-decoration: underline; text-underline-offset: 3px; font-weight: 700; }
.v4-pagefoot__link:hover { color: var(--red-600); }
.v4-pagefoot__credit { font-family: var(--font-mono); font-size: 11px; color: var(--ink-400); text-align: right; align-self: end; }

/* ===========================================================
   서브 패널 (4 상담) — 레드·화이트로 리톤 (v4 구조 유지)
   =========================================================== */
.v4-sub__inner { max-width: 1080px; margin: 0 auto; padding: 40px clamp(16px, 2.4vw, 36px) 80px; }
.v4-return {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px 9px 10px; border-radius: var(--r-sm);
  font-weight: 800; font-size: 14px; color: var(--ink-700); background: #fff; border: var(--hair); box-shadow: var(--sh-1);
}
.v4-return:hover { color: var(--red-600); border-color: var(--red-600); }
.v4-sub__hero { padding: 40px 0 28px; border-bottom: 2px solid var(--ink-900); margin-bottom: 28px; }
.v4-sub__eyebrow { font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: .18em; color: var(--red-600); margin-bottom: 10px; }
.v4-sub__title { font-family: var(--font-display); font-weight: 800; font-size: clamp(30px, 3.4vw, 44px); letter-spacing: -.03em; line-height: 1.1; }
.v4-sub__lede { margin-top: 14px; font-size: 17px; color: var(--ink-500); line-height: 1.6; }
.v4-sub__cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.v4-sub__card { padding: 22px 22px 24px; background: #fff; border: var(--hair); border-top: 3px solid var(--red-600); border-radius: 4px 4px var(--r-md) var(--r-md); box-shadow: var(--sh-1); }
.v4-sub__card-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-sm); background: var(--red-50); color: var(--red-600); margin-bottom: 14px; }
.v4-sub__card h3 { font-size: 17px; font-weight: 800; margin-bottom: 8px; letter-spacing: -.01em; }
.v4-sub__card p { font-size: 14px; color: var(--ink-500); line-height: 1.65; }
.v4-steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 26px 0; counter-reset: s; }
.v4-steps li { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: #fff; border: var(--hair); border-radius: var(--r-sm); font-weight: 700; font-size: 14.5px; }
.v4-steps li b { font-family: var(--font-mono); font-size: 12px; color: var(--red-600); }
.v4-steps li:not(:last-child)::after { content: ""; position: absolute; right: -8px; top: 50%; width: 6px; height: 6px; border-top: 1.5px solid var(--ink-300); border-right: 1.5px solid var(--ink-300); transform: translateY(-50%) rotate(45deg); }
.v4-sub__form { display: flex; flex-direction: column; gap: 12px; padding: 26px; background: #fff; border: 2px solid var(--red-600); border-radius: var(--r-md); box-shadow: var(--sh-1); }
.v4-sub__form-title { font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.v4-sub__form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.v4-sub__form-row--three { grid-template-columns: 1.2fr 1fr 1fr; }
.v4-sub__form input, .v4-sub__form select, .v4-sub__form textarea {
  width: 100%; padding: 12px 14px; border: var(--hair); border-radius: var(--r-sm); background: #fff; font-size: 14.5px; resize: vertical;
}
.v4-sub__form input:focus, .v4-sub__form select:focus, .v4-sub__form textarea:focus { outline: none; border-color: var(--red-600); box-shadow: 0 0 0 3px var(--red-100); }
.v4-sub__form .v4-btn { align-self: flex-start; padding: 13px 28px; }
.v4-sub__form--modal { border: 0; padding: 0; box-shadow: none; }
.v4-sub__notice { font-size: 12px; color: var(--ink-400); line-height: 1.6; }

/* ===========================================================
   오버레이 (매물 목록 / 상세 / 계약 모달) — v4 로직 유지
   =========================================================== */
.v4-overlay {
  position: fixed; inset: 0; z-index: var(--z-overlay); display: flex; align-items: center; justify-content: center; padding: 28px;
  background: rgba(17,20,24,.55); backdrop-filter: blur(4px); opacity: 0; transition: opacity var(--dur-base);
}
.v4-overlay.is-open { opacity: 1; }
.v4-overlay__panel {
  width: min(1180px, 100%); max-height: 100%; display: flex; flex-direction: column;
  background: #fff; border-radius: var(--r-lg); box-shadow: var(--sh-3); overflow: hidden;
  transform: translateY(14px) scale(.985); transition: transform var(--dur-base) var(--ease-out);
}
.v4-overlay.is-open .v4-overlay__panel { transform: none; }
.v4-overlay__panel--narrow { width: min(560px, 100%); }
.v4-overlay__head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 22px; border-bottom: 2px solid var(--ink-900); }
.v4-overlay__head h2 { font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.v4-overlay__close { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-700); }
.v4-overlay__close:hover { background: var(--red-50); color: var(--red-600); }
.v4-overlay__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 20px 22px 26px; overflow-y: auto; }
.v4-overlay__empty { grid-column: 1 / -1; padding: 40px 20px; text-align: center; color: var(--ink-500); }
.v4-more { grid-column: 1 / -1; justify-self: center; padding: 12px 26px; border: 1.5px solid var(--ink-900); border-radius: var(--r-sm); font-weight: 800; }
.v4-more:hover { background: var(--ink-900); color: #fff; }
.v4-more span { font-family: var(--font-mono); color: var(--red-600); margin-left: 4px; }
.v4-more:hover span { color: #FF8A8E; }
.v4-detail { padding: 20px 22px 26px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.v4-detail__img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--r-md); background: var(--ink-100); }
.v4-detail__head { display: flex; align-items: center; gap: 12px; }
.v4-detail__head .v4-listing__type { position: static; }
.v4-detail__price { font-family: var(--font-mono); font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.v4-detail__spec { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.v4-detail__spec div { padding: 10px 12px; background: var(--ink-50); border-radius: var(--r-sm); border: var(--hair-soft); }
.v4-detail__spec dt { font-size: 11.5px; color: var(--ink-500); font-weight: 700; margin-bottom: 2px; }
.v4-detail__spec dd { font-size: 14px; font-weight: 600; }
.v4-detail__tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.v4-detail__tags li { padding: 4px 10px; border-radius: var(--r-pill); background: var(--red-50); color: var(--red-700); font-size: 12px; font-weight: 700; }
.v4-detail__cta { align-self: stretch; padding: 14px; }
.v4-detail__note { font-size: 12px; color: var(--ink-400); }
.v4-askform { display: flex; flex-direction: column; gap: 10px; padding: 16px; background: var(--ink-50); border: var(--hair); border-radius: var(--r-md); }
.v4-askform__row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.v4-askform input, .v4-askform textarea { width: 100%; padding: 11px 13px; border: var(--hair); border-radius: var(--r-sm); background: #fff; font-size: 14px; }
.v4-askform__privacy { font-size: 11.5px; color: var(--ink-400); }
.v4-askform__done { padding: 18px; text-align: center; background: var(--red-50); border-radius: var(--r-md); font-weight: 600; line-height: 1.7; }
.v4-askform__done b { font-family: var(--font-mono); color: var(--red-600); }
.v4-contract-modal__body { padding: 22px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
.v4-contract-modal__lede { font-size: 17px; line-height: 1.6; font-weight: 600; }
.v4-contract-modal__list { padding-left: 18px; color: var(--ink-700); font-size: 14px; line-height: 1.8; }
.v4-contract-modal__disclaimer { font-size: 11.5px; line-height: 1.6; color: var(--ink-500); padding: 10px 12px; border-radius: var(--r-sm); background: var(--ink-50); }

/* 토스트 */
.v4-toast {
  position: fixed; left: 50%; bottom: 28px; z-index: var(--z-toast); transform: translateX(-50%);
  max-width: min(680px, calc(100vw - 32px)); padding: 13px 18px; border-radius: var(--r-md);
  background: var(--ink-900); color: #fff; font-size: 14px; font-weight: 600; box-shadow: var(--sh-3); line-height: 1.5;
}

/* 구 v4 잔재 — 폐지 컴포넌트 */
.v4-vnext, .v4-vdots, .v4-bottom, .v4-map__legend { display: none !important; }

/* ===========================================================
   반응형
   =========================================================== */
@media (max-width: 1280px) {
  :root { --wing-w: 200px; }
  .v4-wingbox__label { font-size: 18px; }
  .v4-market__grid, .v4-charts, .v4-overlay__grid { grid-template-columns: repeat(3, 1fr); }
  .v4-hub__grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 1024px) {
  /* 모바일 = 일반 문서 흐름. 서브패널은 JS show/hide (is-mobile-hidden) */
  body { overflow: auto; }
  .v4-stage { position: static; overflow: visible; }
  .v4-track { display: block; width: auto; height: auto; transform: none !important; }
  .v4-panel { width: 100%; height: auto; overflow: visible; }
  .v4-panel.is-mobile-hidden { display: none; }
  .v4-main { overflow: visible; }
  .rs-section { scroll-margin-top: 70px; }

  .v4-hero__row { height: auto; flex-wrap: wrap; padding: 12px 16px; gap: 10px 14px; }
  .v4-hero__logo { font-size: 23px; }
  .v4-meganav { order: 3; width: 100%; margin: 0; overflow-x: auto; gap: 0; scrollbar-width: none; }
  .v4-meganav::-webkit-scrollbar { display: none; }
  .v4-meganav__top { padding: 8px 12px; font-size: 14px; white-space: nowrap; }
  .v4-hero__cta { margin-left: auto; padding: 9px 14px; font-size: 13.5px; }
  .v4-megapanel__inner { grid-template-columns: repeat(2, 1fr); gap: 18px; padding: 18px 16px 22px; }

  .v4-body { grid-template-columns: 1fr; gap: 14px; }
  .v4-wing { flex-direction: row; }
  .v4-wing--left { order: 2; } .v4-zone { order: 1; } .v4-wing--right { order: 3; }
  .v4-wingbox { padding: 16px 12px 18px; gap: 8px; }
  .v4-wingbox__ic { width: 44px; height: 44px; } .v4-wingbox__ic svg { width: 40px; height: 40px; }
  .v4-wingbox__label { font-size: 16px; }
  .v4-wingbox__sub { font-size: 12px; }
  .v4-zone, .v4-map { min-height: 0; }
  .v4-map { flex-direction: column; align-items: stretch; }
  .v4-map svg { width: 100%; height: auto; max-height: none; }
  .v4-mainbox--map { flex-direction: column; }
  .v4-contract--strip { position: static; margin: 10px auto 0; }
  .rs-map__legend { position: static; align-self: flex-start; margin-top: 8px; }
  .v4-wingbox__arrow { top: 10px; right: 10px; bottom: auto; width: 22px; height: 22px; }
  .v4-wingbox__index { top: 12px; left: 12px; }

  .v4-search__input { flex: 1 1 100%; }
  .v4-market__stats { grid-template-columns: repeat(2, 1fr); }
  .v4-market__grid, .v4-overlay__grid { grid-template-columns: repeat(2, 1fr); }
  .rs-info { grid-template-columns: 1fr; }
  .v4-charts { grid-template-columns: repeat(2, 1fr); }
  .v4-member { grid-template-columns: 1fr; }
  .v4-utils { grid-template-columns: repeat(2, 1fr); }
  .v4-hub__grid { grid-template-columns: repeat(3, 1fr); }
  .v4-pagefoot { grid-template-columns: 1fr; }
  .v4-pagefoot__credit { text-align: left; }
  .v4-sub__cards { grid-template-columns: 1fr; }
  .v4-steps { grid-template-columns: repeat(2, 1fr); }
  .v4-steps li:not(:last-child)::after { display: none; }
  .v4-sub__form-row, .v4-sub__form-row--three { grid-template-columns: 1fr; }
  .v4-overlay { padding: 12px; }
}

@media (max-width: 640px) {
  .rs-tickerbar { gap: 10px; padding: 0 12px; font-size: 12px; }
  .rs-tickerbar__live { display: none; }
  .v4-wing { flex-direction: column; }
  .v4-wing--left, .v4-wing--right { display: grid; grid-template-columns: 1fr 1fr; }
  .v4-zone, .v4-map { min-height: 380px; }
  .v4-market__grid, .v4-overlay__grid, .v4-charts, .v4-utils { grid-template-columns: 1fr; }
  .v4-market__stats { grid-template-columns: 1fr 1fr; }
  .v4-hub__grid { grid-template-columns: repeat(2, 1fr); }
  .v4-search__seg { width: 100%; } .v4-search__seg button { flex: 1; }
  .v4-search__go { width: 100%; }
  .rs-partners__label { border: 0; padding: 0; }
  .v4-detail__spec { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
