/* =====================================================================
   헌집새집 — 디자인 시스템 (모든 화면 공통)
   토큰 → 기본 → 화면 틀(상단 바·하단 탭) → 부품 → 콘텐츠 페이지 → 검색·시트·모달
   ===================================================================== */
:root {
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  /* 회색 10단계 */
  --g50: #f9fafb; --g100: #f2f4f6; --g200: #e5e8eb; --g300: #d1d6db; --g400: #b0b8c1;
  --g500: #8b95a1; --g600: #6b7684; --g700: #4e5968; --g800: #333d4b; --g900: #191f28;
  /* 강조색(로고 인디고) */
  --brand: #4f46e5; --brand-press: #4338ca; --brand-weak: #eef0ff; --brand-text: #4338ca; --on-brand: #fff;
  /* 역할 */
  --bg: #fff; --bg-sub: var(--g100); --surface: #fff; --surface-2: var(--g50); --elev: #fff;
  --line: var(--g200); --line-weak: var(--g100);
  --text: var(--g900); --text-2: var(--g700); --text-3: var(--g600); --text-4: var(--g500); --text-5: var(--g400);
  --press: rgba(2, 32, 71, .05);
  /* 상태 배지 (글자 + 바탕) */
  --ok: #0b7a45; --ok-bg: #e4f6ec; --prog: #1b64da; --prog-bg: #e8f1fe; --rev: #b45309; --rev-bg: #fdf1dd;
  --bad: #d22030; --bad-bg: #fdecee; --done: #4e5968; --done-bg: #eef0f3;
  --sh-sm: 0 1px 2px rgba(0, 0, 0, .05), 0 1px 3px rgba(0, 0, 0, .05);
  --sh-md: 0 2px 8px rgba(0, 0, 0, .06), 0 8px 24px rgba(0, 0, 0, .08);
  --sh-lg: 0 12px 40px rgba(0, 0, 0, .18);
  --r-s: 8px; --r-m: 12px; --r-l: 16px; --r-xl: 20px;
  --appbar-h: 64px; --tabbar-h: 0px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #7c76ff; --brand-press: #6c64f7; --brand-weak: rgba(124, 118, 255, .16); --brand-text: #aaa5ff;
    --bg: #111215; --bg-sub: #191a1f; --surface: #1b1c21; --surface-2: #202127; --elev: #24252b;
    --line: #2e3037; --line-weak: #24262c;
    --text: #f2f3f5; --text-2: #c9ccd2; --text-3: #9ba0a9; --text-4: #7d838d; --text-5: #5c626b;
    --press: rgba(255, 255, 255, .06);
    --ok: #4cd391; --ok-bg: rgba(76, 211, 145, .14); --prog: #74a9ff; --prog-bg: rgba(116, 169, 255, .15);
    --rev: #ffb547; --rev-bg: rgba(255, 181, 71, .14); --bad: #ff6b78; --bad-bg: rgba(255, 107, 120, .14);
    --done: #a3a9b3; --done-bg: rgba(163, 169, 179, .14);
    --sh-sm: 0 1px 2px rgba(0, 0, 0, .4); --sh-md: 0 4px 18px rgba(0, 0, 0, .45); --sh-lg: 0 12px 40px rgba(0, 0, 0, .6);
  }
}
:root[data-theme="dark"] {
  --brand: #7c76ff; --brand-press: #6c64f7; --brand-weak: rgba(124, 118, 255, .16); --brand-text: #aaa5ff;
  --bg: #111215; --bg-sub: #191a1f; --surface: #1b1c21; --surface-2: #202127; --elev: #24252b;
  --line: #2e3037; --line-weak: #24262c;
  --text: #f2f3f5; --text-2: #c9ccd2; --text-3: #9ba0a9; --text-4: #7d838d; --text-5: #5c626b;
  --press: rgba(255, 255, 255, .06);
  --ok: #4cd391; --ok-bg: rgba(76, 211, 145, .14); --prog: #74a9ff; --prog-bg: rgba(116, 169, 255, .15);
  --rev: #ffb547; --rev-bg: rgba(255, 181, 71, .14); --bad: #ff6b78; --bad-bg: rgba(255, 107, 120, .14);
  --done: #a3a9b3; --done-bg: rgba(163, 169, 179, .14);
  --sh-sm: 0 1px 2px rgba(0, 0, 0, .4); --sh-md: 0 4px 18px rgba(0, 0, 0, .45); --sh-lg: 0 12px 40px rgba(0, 0, 0, .6);
}
@media (max-width: 767px) { :root { --appbar-h: 56px; --tabbar-h: calc(58px + var(--safe-b)); } }

/* ---------- 기본 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font: 400 15px/1.6 var(--font);
  letter-spacing: -.005em; word-break: keep-all; overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
img, svg { display: block; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.ic { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic-s { width: 18px; height: 18px; }
.ic-xs { width: 16px; height: 16px; stroke-width: 2; }
.num { font-variant-numeric: tabular-nums; }
.t-3 { color: var(--text-3); } .t-4 { color: var(--text-4); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- 상단 바 ---------- */
.appbar {
  position: sticky; top: 0; z-index: 1001; height: var(--appbar-h); display: flex; align-items: center; gap: 16px; padding: 0 24px;
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line-weak);
}
.brand-wrap { margin: 0; font-size: inherit; min-width: 0; flex: none; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 17px; letter-spacing: -.03em; white-space: nowrap; color: var(--text); }
.logo { width: 30px; height: 30px; border-radius: 9px; flex: none; background: url(/logo.svg) center / cover no-repeat; }
/* 이름 + 부제 (헌집새집 · 서울 재개발·재건축 지도) — PC는 한 줄, 휴대폰은 이름 아래 작은 줄 */
.brand-txt { display: inline-flex; align-items: baseline; gap: 7px; min-width: 0; }
.brand-sub { font-size: 13px; font-weight: 600; color: var(--text-3); letter-spacing: -.02em; }
.searchbox {
  display: flex; align-items: center; gap: 8px; height: 42px; flex: 1; max-width: 440px; min-width: 0; padding: 0 14px; border-radius: 12px;
  background: var(--bg-sub); color: var(--text-4); font-size: 15px; text-align: left; transition: background .15s;
}
.searchbox:hover { background: color-mix(in srgb, var(--bg-sub) 70%, var(--line)); }
.searchbox .ic { width: 20px; height: 20px; color: var(--text-3); }
.searchbox span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.searchbox kbd { font: 600 11px/1 var(--font); color: var(--text-4); border: 1px solid var(--line); border-radius: 5px; padding: 3px 6px; }
.appbar-acts { display: flex; align-items: center; gap: 4px; }
.appbar-acts:empty { display: none; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center; color: var(--text-2); flex: none; transition: background .15s; }
.icon-btn:hover { background: var(--press); }
.icon-btn:active { transform: scale(.96); }
.topnav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.topnav a { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 13px; border-radius: 10px; color: var(--text-3); font-size: 15px; font-weight: 600; white-space: nowrap; transition: background .15s, color .15s; }
.topnav a .ic { width: 20px; height: 20px; }
.topnav a:hover { background: var(--press); color: var(--text); }
.topnav a.on { color: var(--brand-text); background: var(--brand-weak); }
.ndot { position: absolute; top: 7px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: #f04452; box-shadow: 0 0 0 2px var(--bg); }
.ncnt { position: absolute; top: 2px; right: -2px; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px; background: var(--brand); color: #fff;
  font: 700 10px/17px var(--font); font-style: normal; text-align: center; }
.ncnt.alert { background: #f04452; }

/* ---------- 하단 탭 (모바일) ---------- */
.tabbar { display: none; }
@media (max-width: 767px) {
  .appbar { padding: 0 8px 0 16px; gap: 10px; }
  .appbar.has-back { padding-left: 4px; }
  .appbar-back { margin-right: -6px; }
  .brand { font-size: 16px; gap: 8px; }
  .brand-txt { flex-direction: column; align-items: flex-start; gap: 1px; line-height: 1.15; }
  .brand-sub { font-size: 10.5px; letter-spacing: -.03em; }
  .logo { width: 28px; height: 28px; border-radius: 8px; }
  .topnav { display: none; }
  .searchbox kbd { display: none; }
  /* 콘텐츠 페이지: 검색은 아이콘 버튼으로 */
  .appbar:not(.appbar-map) .searchbox { flex: none; width: 40px; height: 40px; padding: 0; justify-content: center; background: none; margin-left: auto; color: var(--text-2); }
  .appbar:not(.appbar-map) .searchbox .ic { width: 24px; height: 24px; color: var(--text-2); }
  .appbar:not(.appbar-map) .searchbox span { display: none; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 1003; left: 0; right: 0; bottom: 0;
    height: var(--tabbar-h); padding-bottom: var(--safe-b);
    background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-top: 1px solid var(--line-weak);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--text-5); }
  .tabbar .tb-ic { position: relative; }
  .tabbar .tb-ic .ic { width: 25px; height: 25px; stroke-width: 1.7; }
  .tabbar .tb-l { font-size: 11px; font-weight: 600; line-height: 1.2; color: var(--text-4); }
  .tabbar a.on { color: var(--text); }
  .tabbar a.on .ic { fill: currentColor; fill-opacity: .12; stroke-width: 1.9; }
  .tabbar a.on .tb-l { color: var(--text); font-weight: 700; }
  .tabbar .ndot { top: -1px; right: -3px; }
  .tabbar .ncnt { top: -4px; right: -12px; }
  body.pg { padding-bottom: var(--tabbar-h); }
}

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; padding: 0 18px; border-radius: var(--r-m);
  font-size: 15px; font-weight: 600; white-space: nowrap; transition: background .15s, transform .1s, box-shadow .15s; user-select: none;
}
.btn:active { transform: scale(.98); }
.btn .ic { width: 20px; height: 20px; }
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-press); }
.btn-secondary { background: var(--bg-sub); color: var(--text-2); }
.btn-secondary:hover { background: color-mix(in srgb, var(--bg-sub) 70%, var(--line)); }
.btn-weak { background: var(--brand-weak); color: var(--brand-text); }
.btn-outline { border: 1px solid var(--line); color: var(--text-2); background: var(--surface); }
.btn-outline:hover { background: var(--surface-2); }
.btn-sm { height: 36px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn-sm .ic { width: 18px; height: 18px; }
.btn-lg { height: 52px; font-size: 16px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-ic { width: 44px; padding: 0; }
.btn.is-on { background: #fff0f3; color: #e5294b; }
:root[data-theme="dark"] .btn.is-on { background: rgba(255, 80, 110, .15); color: #ff7a93; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.is-on { background: rgba(255, 80, 110, .15); color: #ff7a93; } }
.btn.is-on .ic { fill: currentColor; }
.textlink { color: var(--brand-text); font-weight: 600; }
.textlink:hover { text-decoration: underline; }

/* ---------- 칩·배지·태그 ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 0 20px; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; flex: none;
  border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.chip:hover { background: var(--surface-2); }
.chip.on { border-color: var(--text); background: var(--text); color: var(--bg); font-weight: 600; }
.chip .n { font-size: 12px; color: var(--text-4); font-weight: 500; }
.chip.on .n { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--g400)); flex: none; display: inline-block; }
.badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 1; }
.b-ok { color: var(--ok); background: var(--ok-bg); }
.b-prog { color: var(--prog); background: var(--prog-bg); }
.b-rev { color: var(--rev); background: var(--rev-bg); }
.b-bad { color: var(--bad); background: var(--bad-bg); }
.b-done { color: var(--done); background: var(--done-bg); }
.b-gray { color: var(--text-3); background: var(--bg-sub); }
.b-brand { color: var(--brand-text); background: var(--brand-weak); }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--text-3); white-space: nowrap; }
.tags { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.dday { display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: 6px; font: 700 12px/1 var(--font); background: var(--bg-sub); color: var(--text-3); font-variant-numeric: tabular-nums; }
.dday.hot { background: var(--bad-bg); color: var(--bad); }
.dday.warm { background: var(--rev-bg); color: var(--rev); }

/* ---------- 단계 진행바 ---------- */
.stepbar { display: grid; grid-template-columns: repeat(9, 1fr); gap: 3px; }
.stepbar i { height: 6px; border-radius: 3px; background: var(--line); }
.stepbar i.done { background: color-mix(in srgb, var(--brand) 55%, var(--surface)); }
.stepbar i.cur { background: var(--brand); }
.stepbar.sm i { height: 4px; border-radius: 2px; }
.stepbar.gray i.done, .stepbar.gray i.cur { background: var(--g400); }
.steplabels { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11px; color: var(--text-4); }

/* ---------- 카드·목록 ---------- */
.card { background: var(--surface); border-radius: var(--r-l); border: 1px solid var(--line-weak); }
.card-pad { padding: 20px; }
.rows > li + li, .rows > a + a { border-top: 1px solid var(--line-weak); }
.row { display: flex; align-items: center; gap: 12px; padding: 14px 0; min-height: 56px; }
a.row:hover .row-title { color: var(--brand-text); }
.row-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--bg-sub); color: var(--text-2); }
.row-ic .ic { width: 22px; height: 22px; }
.row-main { flex: 1; min-width: 0; }
.row-title { display: block; font-weight: 600; color: var(--text); line-height: 1.45; }
.row-sub { display: block; font-size: 13px; color: var(--text-3); margin-top: 1px; }
.row-end { color: var(--text-5); flex: none; display: flex; align-items: center; gap: 6px; }
.row-end .ic { width: 20px; height: 20px; }

/* 구역 카드 (목록 공통) */
.zlist { display: grid; gap: 0; }
.zitem { display: block; padding: 16px 0; border-bottom: 1px solid var(--line-weak); color: var(--text); position: relative; }
.zitem:last-child { border-bottom: 0; }
.zitem-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.zitem-date { font-size: 12px; color: var(--text-4); flex: none; font-variant-numeric: tabular-nums; }
.zitem-title { font-size: 16px; font-weight: 700; letter-spacing: -.02em; line-height: 1.4; }
a.zitem:hover .zitem-title, button.zitem:hover .zitem-title { color: var(--brand-text); }
.zitem-sub { font-size: 13px; color: var(--text-3); margin-top: 2px; }
.zitem-stage { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.zitem-stage .stepbar { flex: 1; max-width: 160px; }
.zitem-stage .sname { font-size: 13px; font-weight: 600; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zitem .chg { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--bad); }
.zitem .chg .ic { width: 16px; height: 16px; }

/* 숫자 카드 */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stat { background: var(--surface-2); border-radius: var(--r-m); padding: 14px 16px; }
.stat-l { font-size: 13px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.stat-v { font-size: 24px; font-weight: 700; letter-spacing: -.03em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat-v small { font-size: 14px; font-weight: 600; color: var(--text-3); margin-left: 2px; }
@media (max-width: 767px) { .stats { grid-template-columns: repeat(2, 1fr); } .stat-v { font-size: 22px; } }

/* 구성 막대 */
.sbar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; gap: 2px; background: var(--surface); }
.sbar i { display: block; height: 100%; background: var(--c); min-width: 3px; }
.slegend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 13px; color: var(--text-3); }
.slegend span { display: inline-flex; align-items: center; gap: 6px; }
.slegend b { color: var(--text-2); font-weight: 600; font-variant-numeric: tabular-nums; }

/* 세그먼트 */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 3px; border-radius: 12px; background: var(--bg-sub); }
.seg button { height: 36px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--text-3); white-space: nowrap; padding: 0 8px; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--sh-sm); }

/* 타임라인 */
.tl { position: relative; }
.tl > li { position: relative; padding: 0 0 18px 22px; }
.tl > li::before { content: ""; position: absolute; left: 4px; top: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--g400); box-shadow: 0 0 0 3px var(--surface); z-index: 1; }
.tl > li::after { content: ""; position: absolute; left: 7px; top: 12px; bottom: -6px; width: 1px; background: var(--line); }
.tl > li:last-child::after { display: none; }
.tl > li:first-child::before { background: var(--brand); }
.tl-date { font-size: 13px; color: var(--text-4); font-variant-numeric: tabular-nums; }
.tl-text { color: var(--text-2); }
.tl-text a { color: var(--text); font-weight: 600; }

/* 빈 화면 */
.empty { text-align: center; padding: 40px 20px; }
.empty-ic { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 20px; display: grid; place-items: center; background: var(--brand-weak); color: var(--brand-text); }
.empty-ic .ic { width: 30px; height: 30px; }
.empty h3 { font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.empty p { color: var(--text-3); margin: 6px 0 20px; }

/* 안내 상자 */
.note { display: flex; gap: 10px; padding: 14px 16px; border-radius: var(--r-m); background: var(--surface-2); color: var(--text-2); font-size: 14px; line-height: 1.55; }
.note .ic { width: 20px; height: 20px; color: var(--text-4); margin-top: 1px; }
.note.warn { background: var(--rev-bg); color: var(--rev); }
.note.warn .ic { color: currentColor; }
.note.alert { background: var(--bad-bg); color: var(--bad); font-weight: 600; }
.note.alert .ic { color: currentColor; }

.skel { background: linear-gradient(90deg, var(--bg-sub) 25%, var(--line-weak) 50%, var(--bg-sub) 75%); background-size: 200% 100%; animation: skel 1.2s infinite; border-radius: 8px; }
@keyframes skel { to { background-position: -200% 0; } }

/* ---------- 콘텐츠 페이지 ---------- */
.page { max-width: 760px; margin: 0 auto; padding: 8px 20px 48px; }
.page.wide { max-width: 1080px; }
.crumb { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 13px; color: var(--text-4); padding: 12px 0 0; }
.crumb a:hover { color: var(--text-2); }
.crumb .ic { width: 14px; height: 14px; stroke-width: 2; }
.phead { padding: 20px 0 20px; }
.phead h1 { font-size: 28px; font-weight: 700; letter-spacing: -.035em; line-height: 1.3; }
.phead p { color: var(--text-3); margin-top: 6px; }
.sec { padding: 28px 0; border-top: 1px solid var(--line-weak); }
.phead + .sec, .sec.first { border-top: 0; padding-top: 4px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sec-title { font-size: 19px; font-weight: 700; letter-spacing: -.03em; line-height: 1.35; }
.sec-title .n { color: var(--brand-text); margin-left: 4px; font-variant-numeric: tabular-nums; }
.sec-sub { font-size: 14px; color: var(--text-3); margin: -8px 0 14px; }
.sec-more { font-size: 14px; font-weight: 600; color: var(--text-3); display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }
.sec-more .ic { width: 16px; height: 16px; }
.sec-more:hover { color: var(--text); }
.prose p + p { margin-top: 10px; }
.prose { color: var(--text-2); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.tile { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: var(--r-m); background: var(--surface-2); transition: background .15s; }
.tile:hover { background: var(--bg-sub); }
.tile b { font-weight: 600; }
.tile span { font-size: 13px; color: var(--text-3); }
.tcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.tcard { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: var(--r-l); border: 1px solid var(--line-weak); background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.tcard:hover { border-color: var(--line); box-shadow: var(--sh-sm); }
.tcard-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tcard-h b { font-size: 16px; font-weight: 700; letter-spacing: -.02em; display: inline-flex; align-items: center; gap: 8px; }
.tcard-h span { font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.tcard p { font-size: 13px; color: var(--text-3); line-height: 1.5; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line-weak); border-radius: var(--r-l); overflow: hidden; border: 1px solid var(--line-weak); }
.facts > div { background: var(--surface); padding: 14px 16px; }
.facts dt { font-size: 13px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.facts dt .ic { width: 16px; height: 16px; stroke-width: 2; }
.facts dd { font-weight: 600; margin-top: 3px; line-height: 1.45; }
.facts dd small { display: block; font-weight: 400; font-size: 13px; color: var(--text-3); }
.facts .wide { grid-column: 1 / -1; }
.footer { border-top: 1px solid var(--line-weak); background: var(--surface-2); }
.footer-in { max-width: 760px; margin: 0 auto; padding: 28px 20px 36px; font-size: 13px; color: var(--text-4); line-height: 1.7; }
.footer.wide .footer-in { max-width: 1080px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 12px; }
.footer-links a { color: var(--text-2); font-weight: 600; }
.footer-links a:hover { text-decoration: underline; }
.footer p + p { margin-top: 6px; }
@media (max-width: 767px) {
  .page { padding: 0 20px 32px; }
  .phead { padding: 16px 0 16px; }
  .phead h1 { font-size: 24px; }
  /* 모바일: 섹션 사이는 두꺼운 회색 띠 */
  .sec { border-top: 0; padding: 24px 0; position: relative; }
  .sec::before { content: ""; position: absolute; left: -20px; right: -20px; top: 0; height: 10px; background: var(--bg-sub); }
  .sec { padding-top: 34px; }
  .phead + .sec::before, .sec.first::before { display: none; }
  .phead + .sec, .sec.first { padding-top: 4px; }
  .grid2 { grid-template-columns: 1fr; }
  .crumb { display: none; }
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .tile { padding: 12px; }
}

/* ---------- 검색 창 ---------- */
.sov { position: fixed; inset: 0; z-index: 2000; display: flex; justify-content: center; align-items: flex-start; padding: 72px 16px 16px; background: rgba(0, 0, 0, .35); animation: fade .15s; }
.sov-box { width: 100%; max-width: 620px; max-height: calc(100vh - 120px); display: flex; flex-direction: column; background: var(--elev); border-radius: var(--r-xl); box-shadow: var(--sh-lg); overflow: hidden; }
.sov-bar { display: flex; align-items: center; gap: 4px; padding: 8px 8px 8px 14px; border-bottom: 1px solid var(--line-weak); }
.sov-bar .sov-ic { color: var(--text-3); }
.sov-bar input { flex: 1; min-width: 0; height: 44px; border: 0; outline: 0; background: none; font-size: 17px; padding: 0 6px; }
.sov-bar input::-webkit-search-cancel-button { display: none; }
.sov-close-m { display: none; }
.sov-body { overflow-y: auto; padding: 8px 0 12px; overscroll-behavior: contain; }
.sov-sec { padding: 10px 20px 4px; }
.sov-sec h4 { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--text-4); display: flex; justify-content: space-between; }
.sov-sec h4 button { font-size: 13px; color: var(--text-4); font-weight: 500; }
.sov-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 20px; text-align: left; color: var(--text); }
.sov-item:hover, .sov-item.on { background: var(--press); }
.sov-item .row-ic { width: 36px; height: 36px; border-radius: 10px; }
.sov-item .row-ic .ic { width: 20px; height: 20px; }
.sov-item mark { background: none; color: var(--brand-text); font-weight: 700; }
.sov-empty { padding: 28px 20px; text-align: center; color: var(--text-3); }
.sov-recent { display: flex; flex-wrap: wrap; gap: 6px; }
.sov-recent .chip { height: 32px; padding: 0 6px 0 12px; font-size: 14px; }
.sov-recent .chip .x { width: 20px; height: 20px; display: grid; place-items: center; color: var(--text-4); border-radius: 50%; }
.sov-recent .chip .x .ic { width: 14px; height: 14px; stroke-width: 2.2; }
@media (max-width: 767px) {
  .sov { padding: 0; background: var(--bg); animation: none; }
  .sov-box { max-width: none; max-height: none; height: 100%; border-radius: 0; box-shadow: none; background: var(--bg); }
  .sov-bar { padding: 6px 8px 6px 4px; height: 56px; }
  .sov-bar .sov-ic { display: none; }
  .sov-close-m { display: inline-grid; }
  .sov-close-d { display: none; }
  .sov-bar input { font-size: 17px; background: var(--bg-sub); border-radius: 12px; height: 42px; padding: 0 14px; }
}
@keyframes fade { from { opacity: 0; } }

/* ---------- 시트·모달·토스트 ---------- */
.scrim { position: fixed; inset: 0; z-index: 1500; background: rgba(0, 0, 0, .4); animation: fade .2s; }
.modal { position: fixed; z-index: 1501; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 32px)); max-height: min(86vh, 860px);
  display: flex; flex-direction: column; background: var(--elev); border-radius: var(--r-xl); box-shadow: var(--sh-lg); animation: pop .2s; }
.modal-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 18px 16px 10px 24px; }
.modal-h h2 { font-size: 20px; font-weight: 700; letter-spacing: -.03em; }
.modal-b { overflow-y: auto; padding: 0 24px 8px; overscroll-behavior: contain; }
.modal-f { display: flex; gap: 8px; padding: 12px 24px calc(16px + var(--safe-b)); border-top: 1px solid var(--line-weak); }
.modal-f .btn-primary { flex: 1; }
.grab { display: none; }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -48%) scale(.98); } }
@media (max-width: 767px) {
  .modal { left: 0; right: 0; top: auto; bottom: 0; transform: none; width: auto; max-height: 88vh; border-radius: 22px 22px 0 0; animation: up .25s cubic-bezier(.2, .8, .2, 1); }
  .modal .grab { display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 8px auto 0; }
  .modal-h { padding: 10px 12px 8px 20px; }
  .modal-b { padding: 0 20px 8px; }
  .modal-f { padding: 12px 20px calc(12px + var(--safe-b)); }
  @keyframes up { from { transform: translateY(100%); } }
}
.fsec { padding: 18px 0; border-bottom: 1px solid var(--line-weak); }
.fsec:last-child { border-bottom: 0; }
.fsec h3 { font-size: 16px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; }
.fsec h3 button { font-size: 13px; font-weight: 600; color: var(--text-4); }
.fsec h4 { font-size: 13px; font-weight: 600; color: var(--text-3); margin: 14px 0 8px; display: flex; align-items: center; gap: 6px; }
.fsec h4:first-of-type { margin-top: 0; }
.fchip { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; font-weight: 500; color: var(--text-2); }
.fchip .n { font-size: 12px; color: var(--text-4); }
.fchip.on { border-color: var(--brand); background: var(--brand-weak); color: var(--brand-text); font-weight: 600; }
.fchip.on .n { color: var(--brand-text); opacity: .7; }
.fchip:disabled { opacity: .45; }

.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 24px); z-index: 2100; transform: translateX(-50%); max-width: calc(100vw - 32px);
  padding: 12px 18px; border-radius: 14px; background: rgba(25, 31, 40, .94); color: #fff; font-size: 14px; font-weight: 500; box-shadow: var(--sh-md);
  display: flex; align-items: center; gap: 8px; animation: toast .25s; white-space: nowrap; }
.toast .ic { width: 18px; height: 18px; color: #7de2a8; stroke-width: 2.2; }
@keyframes toast { from { opacity: 0; transform: translate(-50%, 8px); } }

/* 제보 양식 */
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 14px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.form-row textarea, .form-row select, .form-row input[type="text"] {
  width: 100%; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); padding: 12px 14px; font-size: 15px; outline: 0; resize: vertical;
}
.form-row textarea:focus, .form-row select:focus, .form-row input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-weak); }
.form-hint { font-size: 13px; color: var(--text-4); margin-top: 6px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- 콘텐츠 페이지 세부 ---------- */
.ic.inl { display: inline-block; vertical-align: -2px; margin-left: 2px; }
.searchbox.big { max-width: none; width: 100%; height: 52px; border-radius: 14px; font-size: 16px; }
.sortsel { display: inline-flex; align-items: center; gap: 4px; color: var(--text-3); position: relative; }
.sortsel select { appearance: none; -webkit-appearance: none; border: 0; background: none; font-size: 14px; font-weight: 600; color: var(--text-2); padding: 6px 2px; cursor: pointer; }
.zlist.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
.zlist.grid .zitem:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
@media (max-width: 767px) { .zlist.grid { grid-template-columns: 1fr; } .zlist.grid .zitem:nth-last-child(2):nth-child(odd) { border-bottom: 1px solid var(--line-weak); } }
.zgroup + .zgroup { margin-top: 20px; }
.zgroup-h { display: flex; align-items: baseline; gap: 8px; font-size: 16px; font-weight: 700; padding: 12px 0 4px; border-bottom: 1px solid var(--line); }
.zgroup-h a:hover { color: var(--brand-text); }
.zgroup-h span { font-size: 13px; font-weight: 500; color: var(--text-4); }

/* 구역 상세 */
.zhero { padding: 12px 0 28px; }
.zhero .tags { margin-bottom: 8px; }
.zhero-title { font-size: 28px; font-weight: 700; letter-spacing: -.035em; line-height: 1.3; }
.zhero-addr { display: flex; align-items: center; gap: 4px; margin-top: 6px; color: var(--text-3); font-size: 15px; }
.zhero-addr .ic { color: var(--text-4); }
.zhero-status { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 20px 0 12px; font-size: 17px; }
.zhero-status b { font-weight: 700; letter-spacing: -.02em; }
.zhero-acts { display: flex; gap: 8px; margin-top: 24px; }
.zhero-acts .btn-primary { flex: 1; max-width: 280px; }
@media (max-width: 767px) { .zhero-title { font-size: 24px; } .zhero-acts .btn-primary { max-width: none; } .zhero { padding-bottom: 24px; } }
.zinfo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.zinfo.noshape { grid-template-columns: 1fr; }
@media (max-width: 767px) { .zinfo { grid-template-columns: 1fr; } }
.shape-card { margin: 0; border-radius: var(--r-l); overflow: hidden; background: var(--surface-2); border: 1px solid var(--line-weak); color: var(--text); }
.shape-card figcaption { font-size: 12px; color: var(--text-4); padding: 0 14px 10px; }
.shape { width: 100%; height: auto; }
.vsteps { counter-reset: s; }
.vsteps li { position: relative; display: flex; gap: 14px; padding-bottom: 14px; }
.vsteps li::after { content: ""; position: absolute; left: 13px; top: 30px; bottom: 2px; width: 2px; border-radius: 1px; background: var(--line); }
.vsteps li:last-child::after { display: none; }
.vsteps li.done::after { background: color-mix(in srgb, var(--brand) 45%, var(--surface)); }
.vsteps i { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; font: 700 13px/1 var(--font); font-style: normal;
  background: var(--bg-sub); color: var(--text-4); }
.vsteps i .ic { width: 16px; height: 16px; stroke-width: 2.4; }
.vsteps li.done i { background: color-mix(in srgb, var(--brand) 16%, var(--surface)); color: var(--brand-text); }
.vsteps li.cur i { background: var(--brand); color: #fff; box-shadow: 0 0 0 4px var(--brand-weak); }
.vsteps b { display: flex; align-items: center; gap: 8px; font-weight: 600; line-height: 28px; color: var(--text-3); }
.vsteps li.done b { color: var(--text-2); font-weight: 500; }
.vsteps li.cur b { color: var(--text); font-weight: 700; }
.vsteps p { font-size: 14px; color: var(--text-3); margin-top: 2px; line-height: 1.55; }
.report-box { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; padding: 16px 18px; border-radius: var(--r-l); background: var(--surface-2); }
.report-box b { font-weight: 700; }
.report-box p { font-size: 14px; color: var(--text-3); margin-top: 2px; }
@media (max-width: 767px) { .report-box { flex-direction: column; align-items: stretch; } }

/* 소식 피드 */
.feed-day { padding-top: 8px; }
.feed-date { font-size: 14px; font-weight: 700; color: var(--text-2); padding: 14px 0 4px; position: sticky; top: var(--appbar-h); background: var(--bg); z-index: 1; }
.feed-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-weak); }
.feed-day li:last-child { border-bottom: 0; }
.feed-ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; padding: 0; }
.feed-ic .ic { width: 19px; height: 19px; }
.feed-main { min-width: 0; flex: 1; }
.feed-title { font-weight: 600; line-height: 1.45; }
.feed-title a:hover { color: var(--brand-text); }
.feed-sub { font-size: 13px; color: var(--text-3); margin-top: 2px; }
.feed-sub a { color: var(--text-2); font-weight: 500; }
.feed-sub a.t-4 { color: var(--text-4); font-weight: 400; }
.feed.compact .feed-item { padding: 10px 0; }
.feed.compact .feed-ic { width: 30px; height: 30px; border-radius: 9px; }
.feed.compact .feed-ic .ic { width: 16px; height: 16px; }
.weekly { background: var(--surface-2); border: 0; }
.weekly-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
.weekly-t { font-size: 20px; font-weight: 700; letter-spacing: -.03em; margin: 12px 0 0; }
.weekly-n { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 16px 0 8px; }
.weekly-n div { background: var(--surface); border-radius: var(--r-m); padding: 10px 12px; }
.weekly-n b { display: block; font-size: 20px; font-weight: 700; }
.weekly-n span { font-size: 12px; color: var(--text-3); }
.weekly .feed-item { border-color: var(--line); }
details.more summary { cursor: pointer; list-style: none; padding: 12px 0 2px; font-size: 14px; font-weight: 600; color: var(--brand-text); }
details.more summary::-webkit-details-marker { display: none; }
/* 자주 묻는 질문 (사업 유형·빌라 재개발·가이드) */
.faq { border-top: 1px solid var(--line-weak); }
.faq-q { border-bottom: 1px solid var(--line-weak); }
.faq-q summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 2px; font-size: 16px; font-weight: 600; color: var(--text); }
.faq-q summary::-webkit-details-marker { display: none; }
.faq-q summary .ic { flex: none; color: var(--text-4); transition: transform .2s; }
.faq-q[open] summary .ic { transform: rotate(180deg); }
.faq-q p { margin: -4px 2px 16px; color: var(--text-2); font-size: 15px; line-height: 1.7; }
.phead p + p { margin-top: 8px; }

/* 일정 */
.sday { padding-top: 6px; }
.sday-h { display: flex; align-items: center; gap: 8px; font-size: 15px; padding: 14px 0 2px; position: sticky; top: var(--appbar-h); background: var(--bg); z-index: 1; }
.srow { padding: 14px 0; border-bottom: 1px solid var(--line-weak); }
.sday li:last-child, .sched-list li:last-child { border-bottom: 0; }
.srow-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.srow-date { font-size: 13px; margin-left: auto; }
.srow-title { font-weight: 600; margin-top: 6px; line-height: 1.45; }
.srow-title a:hover { color: var(--brand-text); }
.srow-sub { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--text-3); margin-top: 4px; }
.srow-sub a:not(.srow-link) { color: var(--text-2); font-weight: 500; }
.srow-sub a:not(.srow-link):hover { color: var(--brand-text); }
.srow-link { display: inline-flex; align-items: center; gap: 2px; color: var(--text-4); white-space: nowrap; margin-left: auto; flex: none; }
.srow-link:hover { color: var(--text-2); }

/* 가이드 */
.gsteps li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line-weak); }
.gsteps li:last-child { border-bottom: 0; }
.gsteps-n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--brand-weak); color: var(--brand-text); font-weight: 700; font-size: 14px; }
.gsteps-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.gsteps-h b { font-size: 16px; font-weight: 700; }
.gsteps-h span { font-size: 13px; }
.gsteps p { font-size: 14px; color: var(--text-3); margin-top: 4px; }
.gloss { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.gloss > div { padding: 14px 16px; border-radius: var(--r-m); background: var(--surface-2); }
.gloss dt { font-weight: 700; }
.gloss dd { font-size: 14px; color: var(--text-3); margin-top: 4px; }
@media (max-width: 767px) { .gloss { grid-template-columns: 1fr; } }
.lgsw { width: 30px; height: 20px; flex: none; border-radius: 4px; --c: var(--brand); }
.lgsw.solid { border: 2px solid var(--c); background: color-mix(in srgb, var(--c) 22%, transparent); }
.lgsw.dashed { border: 2px dashed var(--c); background: color-mix(in srgb, var(--c) 10%, transparent); }
.lgsw.circle { width: 22px; height: 22px; margin: 0 4px; border: 2px dotted var(--c); border-radius: 50%; background: color-mix(in srgb, var(--c) 10%, transparent); }
.lgsw.district { border: 2px dashed #8a6d3b; border-radius: 2px; }
/* 관심 */
.zlist.sv .zitem { padding: 18px 0; }
.sv-link { display: block; color: inherit; }
.sv-link:hover .zitem-title { color: var(--brand-text); }
.sv-acts { display: flex; gap: 6px; margin-top: 12px; }
.sv-acts .btn-ic { width: 36px; margin-left: auto; }
.sv-acts .btn-ic .ic { fill: currentColor; fill-opacity: 0; }
.sv-acts [data-rm] .ic { fill-opacity: 1; color: #e5294b; }
.sv-head { display: flex; justify-content: space-between; align-items: center; font-size: 14px; padding: 16px 0 0; }
.zitem.has-chg .zitem-title { color: var(--text); }

/* ---------- 스위치 (지도 설정·알림 설정 공통) ---------- */
.switch { position: relative; width: 48px; height: 28px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch i { position: absolute; inset: 0; border-radius: 14px; background: var(--g300); transition: background .2s; pointer-events: none; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: var(--sh-sm); transition: transform .2s; }
.switch input:checked + i { background: var(--brand); }
.switch input:checked + i::after { transform: translateX(20px); }

/* ---------- 근처 중개사무소 ---------- */
.rows.bk .row { min-height: 0; padding: 12px 0; }
.bk-row .row-ic { width: 36px; height: 36px; border-radius: 10px; }
.bk-row .row-ic .ic { width: 20px; height: 20px; }
.bk-row .row-title { font-size: 15px; }
.bk-d { font-weight: 700; color: var(--brand-text); }
.bk-call { flex: none; gap: 4px; padding: 0 10px; }
.bk-note { margin-top: 10px; font-size: 13px; color: var(--text-4); line-height: 1.6; }
.bk-note .textlink { font-size: 13px; }
.zd-sec .rows.bk .row { padding: 11px 0; }
.zd-sec .bk-row .row-title { font-size: 14px; }
/* ---------- 관심 화면: 이메일 알림 카드 · 이어 보기 ---------- */
.sv-alert { margin-top: 4px; scroll-margin-top: calc(var(--appbar-h) + 16px); }
.sva { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.sva .row-ic.on { background: var(--brand-weak); color: var(--brand-text); }
.sva-main b { display: block; font-size: 16px; font-weight: 700; color: var(--text); }
.sva-main p { margin-top: 2px; font-size: 14px; color: var(--text-3); line-height: 1.55; }
.sva-sec { display: flex; align-items: center; gap: 10px 12px; padding: 12px 0; border-top: 1px solid var(--line-weak); }
.sva-l { flex: none; font-size: 14px; font-weight: 600; color: var(--text-2); width: 56px; }
.sva-tg { justify-content: space-between; cursor: pointer; }
.sva-tg b { display: block; font-size: 14px; font-weight: 600; color: var(--text-2); }
.sva-tg small { display: block; font-size: 13px; color: var(--text-4); }
.sva-acts { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line-weak); }
.sva + .btn-block { margin-top: 2px; }
.chip-x { gap: 4px; padding-right: 6px; }
.chip-x button { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: var(--text-4); }
.chip-x button:hover { background: var(--bg-sub); color: var(--text); }
.chip-x .ic { width: 14px; height: 14px; }
.chip-add { position: relative; gap: 4px; color: var(--brand-text); border-style: dashed; }
.chip-add .ic { width: 15px; height: 15px; }
.chip-add select { appearance: none; -webkit-appearance: none; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 600; padding: 0; cursor: pointer; }
button.sv-key { width: 100%; margin-top: 20px; padding: 14px 16px; border-radius: var(--r-l); background: var(--surface-2); text-align: left; }
button.sv-key:hover { background: var(--bg-sub); }
/* ---------- 이어보기 창 ---------- */
.keybox { display: flex; gap: 16px; align-items: center; padding: 16px; border-radius: var(--r-l); background: var(--surface-2); }
.keyqr { width: 132px; height: 132px; flex: none; border-radius: 12px; background: #fff; padding: 6px; overflow: hidden; }
.keyqr svg { display: block; width: 100%; height: 100%; }
.keyc { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.keycode { font: 700 22px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; color: var(--text); white-space: nowrap; }
.keybtns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.keyin { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line-weak); }
.keyin label { display: block; font-size: 14px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.keyin-row { display: flex; gap: 8px; }
.keyin-row input { flex: 1; min-width: 0; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); color: var(--text); font: 600 16px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .03em; text-transform: uppercase; }
.keyin-row input:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-weak); }
.keydel { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-weak); font-size: 13px; color: var(--text-4); display: flex; flex-direction: column; gap: 2px; }
.textlink.danger { color: var(--bad); align-self: flex-start; }
/* ---------- 알림 신청 창 ---------- */
.form-row input[type="email"] { width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); color: var(--text); font-size: 16px; }
.form-row input[type="email"]:focus { outline: 0; }
.checks { display: grid; gap: 4px; margin: 2px 0 10px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 15px; color: var(--text-2); cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); flex: none; }
.gu-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.gu-acts .btn-primary { flex: 1; min-width: 200px; }
.msgpage { padding: 40px 0 24px; }
.msgpage .empty p { max-width: 420px; margin-left: auto; margin-right: auto; }
.msgpage form { display: inline; }
.plist { padding-left: 0; list-style: none; display: grid; gap: 8px; }
.plist li { font-size: 15px; color: var(--text-2); line-height: 1.65; }
.plist b { display: inline-block; min-width: 76px; margin-right: 6px; color: var(--text); }
@media (max-width: 480px) {
  .keybox { flex-direction: column; align-items: stretch; text-align: center; }
  .keyqr { align-self: center; }
  .keybtns { justify-content: center; }
  .keycode { font-size: 20px; }
}
/* ---------- 진행 단계 세로 타임라인 (지도 상세 · 구역 페이지 공통, progress.js가 그림) ---------- */
.ptl-load { min-height: 120px; margin-top: 8px; border-radius: 12px; background: linear-gradient(90deg, var(--bg-sub) 0, var(--surface-2) 50%, var(--bg-sub) 100%) 0 0 / 200% 100%; animation: ptlshine 1.2s linear infinite; }
@keyframes ptlshine { to { background-position: -200% 0; } }
.ptl-flags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.pf { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pf-ok { background: var(--ok-bg); color: var(--ok); }
.pf-warn { background: var(--rev-bg); color: var(--rev); }
.pf-bad { background: var(--bad-bg); color: var(--bad); }
.pf-brand { background: var(--brand-weak); color: var(--brand-text); }
.ptl { margin: 6px 0 0; }
.ptl > li { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; column-gap: 12px; min-height: 50px; padding: 9px 10px; margin: 0 -10px; }
.ptl > li:not(.ev):not(:first-child) { border-top: 1px solid var(--line-weak); }
.ptl-n { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; border: 1px solid var(--line); color: var(--text-3); background: var(--surface); }
.ptl-n .ic { width: 15px; height: 15px; stroke-width: 2.4; }
.ptl-b { min-width: 0; display: flex; flex-direction: column; }
.ptl-b b { font-size: 15px; font-weight: 600; color: var(--text); letter-spacing: -.02em; line-height: 1.4; }
.ptl-b small { font-size: 12px; color: var(--text-4); line-height: 1.45; margin-top: 1px; }
.ptl time { font-size: 13px; color: var(--text-4); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* 지난 단계: 옅게 */
.ptl > li.done .ptl-n { border-color: transparent; background: var(--bg-sub); color: var(--text-4); }
.ptl > li.done .ptl-b b { color: var(--text-3); font-weight: 500; }
/* 현재 단계: 강조 */
.ptl > li.cur { background: var(--brand-weak); border-radius: 12px; border-top-color: transparent; }
.ptl > li.cur + li { border-top-color: transparent; }
.ptl > li.cur .ptl-n { border: 1.5px solid var(--brand); color: var(--brand-text); background: var(--surface); }
.ptl > li.cur .ptl-b b { color: var(--brand-text); font-weight: 700; font-size: 16px; }
.ptl > li.cur time { color: var(--brand-text); font-weight: 600; }
.ptl-now { align-self: flex-start; font-style: normal; height: 20px; padding: 0 7px; margin-bottom: 3px; border-radius: 6px; background: var(--brand); color: var(--on-brand); font-size: 11px; font-weight: 700; line-height: 20px; }
/* 거치지 않는 단계 */
.ptl > li.skip .ptl-n { border-style: dashed; color: var(--text-5); background: none; }
.ptl > li.skip .ptl-b b { color: var(--text-5); font-weight: 500; }
/* 단계 사이 기록: 곁가지(업체 선정·이주 등) · 차질 · 다시 진행 · 시공자 교체 */
.ptl > li.ev { min-height: 0; padding: 3px 10px 7px; }
.ptl > li.ev .ptl-n { width: 28px; height: 20px; border: 0; background: none; }
.ptl > li.ev .ptl-n .ic { width: 15px; height: 15px; }
.ptl > li.ev .ptl-b { font-size: 13px; color: var(--text-3); line-height: 1.45; }
.ptl > li.ev time { font-size: 12px; }
.ptl > li.ev-ms .ptl-n::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--g400); }
.ptl > li.ev-bad .ptl-n, .ptl > li.ev-bad .ptl-b, .ptl > li.ev-bad time { color: var(--bad); }
.ptl > li.ev-bad .ptl-b { font-weight: 600; }
.ptl > li.ev-restart .ptl-n, .ptl > li.ev-restart .ptl-b, .ptl > li.ev-restart time { color: var(--brand-text); }
.ptl > li.ev-restart .ptl-b { font-weight: 600; }
.ptl > li.ev-change .ptl-n, .ptl > li.ev-change .ptl-b, .ptl > li.ev-change time { color: var(--rev); }
.ptl > li.ev-change .ptl-b { font-weight: 600; }
.ptl > li.end { margin-top: 6px; padding: 10px; border-radius: 12px; background: var(--bad-bg); }
.ptl > li.end .ptl-b b { color: var(--bad); }
.ptl-src { margin-top: 10px; font-size: 12px; color: var(--text-4); line-height: 1.6; }
/* 사업장이 여럿인 구역: 사업장별 접기 */
.ptl-sites { margin-top: 14px; }
.ptl-sites-h { font-size: 13px; font-weight: 700; color: var(--text-3); margin-bottom: 6px; }
.ptl-site { border: 1px solid var(--line-weak); border-radius: 12px; margin-top: 8px; background: var(--surface); }
.ptl-site > summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 12px 14px; cursor: pointer; }
.ptl-site > summary::-webkit-details-marker { display: none; }
.ptl-chev { width: 18px; height: 18px; color: var(--text-4); transition: transform .15s; }
.ptl-site[open] .ptl-chev { transform: rotate(180deg); }
.ptl-site-n { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; color: var(--text); }
.ptl-site > .ptl-flags, .ptl-site > .ptl, .ptl-site > .textlink { margin-left: 14px; margin-right: 14px; }
.ptl-site > .ptl { margin-top: 0; }
.ptl-site > .textlink { display: inline-block; margin-top: 6px; margin-bottom: 12px; font-size: 13px; }
.ptl.sm > li { min-height: 44px; }
.ptl.sm .ptl-b b { font-size: 14px; }
.ptl.sm > li.cur .ptl-b b { font-size: 15px; }
.ptl > li.ev-prev .ptl-n, .ptl > li.ev-prev .ptl-b, .ptl > li.ev-prev time { color: var(--rev); }
.ptl > li.ev-prev .ptl-b { font-weight: 600; }
.ptl-empty { display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font-size: 14px; color: var(--text-3); line-height: 1.55; }
.ptl-empty .ic { width: 18px; height: 18px; color: var(--ok); margin-top: 1px; flex: none; }
.ptl > li.ev-delay .ptl-n, .ptl > li.ev-delay .ptl-b, .ptl > li.ev-delay time { color: var(--rev); }
.ptl > li.ev-delay .ptl-b { font-weight: 600; }
.ptl > li.ev-warn .ptl-n, .ptl > li.ev-warn .ptl-b, .ptl > li.ev-warn time { color: var(--rev); }
.ptl > li.ev-warn .ptl-b { font-weight: 600; }
/* 진행 단계 맨 위 속도·흐름 요약 카드 */
.pf-gray { background: var(--bg-sub); color: var(--text-3); }
.pf.strong { box-shadow: inset 0 0 0 1.5px currentColor; }
.pv { margin: 10px 0 6px; border-radius: 14px; background: var(--surface-2); padding: 4px 14px; }
.pv-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; column-gap: 10px; padding: 10px 0; }
.pv-row + .pv-row { border-top: 1px solid var(--line-weak); }
.pv-k { font-size: 12px; font-weight: 700; color: var(--text-4); }
.pv-v { min-width: 0; display: flex; flex-direction: column; }
.pv-v b { font-size: 14px; font-weight: 700; color: var(--text); letter-spacing: -.02em; line-height: 1.45; }
.pv-v small { font-size: 12px; color: var(--text-4); line-height: 1.45; }
.pv-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.pv.sm { margin: 0 14px 4px; padding: 2px 12px; }
.pv.sm .pv-row { grid-template-columns: 52px minmax(0, 1fr) auto; padding: 8px 0; }
.pv-more { margin: 4px 0 8px; }
.pv-more > summary { list-style: none; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-3); padding: 6px 0; display: inline-flex; align-items: center; gap: 4px; }
.pv-more > summary::-webkit-details-marker { display: none; }
.pv-more > summary::after { content: "▾"; font-size: 11px; color: var(--text-4); transition: transform .15s; }
.pv-more[open] > summary::after { transform: rotate(180deg); }
.pv-tb { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 4px; }
.pv-tb th, .pv-tb td { text-align: left; padding: 7px 4px; border-bottom: 1px solid var(--line-weak); }
.pv-tb th { font-size: 12px; font-weight: 600; color: var(--text-4); }
.pv-tb td:not(:first-child), .pv-tb th:not(:first-child) { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pv-tb tr.now td { color: var(--brand-text); font-weight: 600; }
.pv-note { font-size: 12px; color: var(--text-4); margin-top: 6px; line-height: 1.55; }
.ptl-site > summary .pf { flex: none; }
/* 구역 안 실거래 (trades.js가 그림) */
.tr-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; margin: 8px 0 4px; }
.tr-stat { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); display: flex; flex-direction: column; gap: 1px; }
.tr-stat span { font-size: 12px; color: var(--text-4); line-height: 1.4; }
.tr-stat b { font-size: 18px; font-weight: 700; letter-spacing: -.02em; color: var(--text); }
.tr-stat b small { font-size: 13px; font-weight: 600; margin-left: 1px; }
.tr-stat > small { font-size: 12px; color: var(--text-4); }
.tr-year { width: 100%; border-collapse: collapse; font-size: 13px; margin: 10px 0 4px; }
.tr-year th, .tr-year td { padding: 7px 4px; border-bottom: 1px solid var(--line-weak); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tr-year th:first-child, .tr-year td:first-child { text-align: left; }
.tr-year th { font-size: 12px; font-weight: 600; color: var(--text-4); }
.tr-list { margin-top: 6px; }
.tr-row { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; align-items: center; column-gap: 10px; padding: 10px 0; }
.tr-list > .tr-row + .tr-row { border-top: 1px solid var(--line-weak); }
.tr-row time { font-size: 12px; color: var(--text-4); }
.tr-main { min-width: 0; display: flex; flex-direction: column; }
.tr-main b { font-size: 14px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-main small { font-size: 12px; color: var(--text-4); line-height: 1.45; }
.tr-amt { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.tr-amt b { font-size: 15px; font-weight: 700; color: var(--text); }
/* 흐름으로 모아 보기 */
.lcard .tcard-h b { display: inline-flex; align-items: center; gap: 6px; }
.lcard .tcard-h b .ic { color: var(--text-3); }
.lcard.lc-warn .tcard-h b .ic { color: var(--rev); }
.lcard.lc-bad .tcard-h b .ic { color: var(--bad); }
.lcard.lc-ok .tcard-h b .ic { color: var(--ok); }
.lcard .tcard-h span { font-weight: 700; color: var(--text-2); }
.lrow .row-end { color: var(--text-4); font-size: 13px; }
.lrow .row-end .pf { font-size: 12px; }
.lhub-news { margin: 4px 0 8px; padding: 14px 16px; border-radius: var(--r-l); background: var(--brand-weak); }
.lhub-news > .ic { color: var(--brand-text); width: 22px; height: 22px; flex: none; }
.lhub-news .row-title { color: var(--brand-text); }
