:root {
  color-scheme: light dark;
  /* 18절: foxgori.com 운영 토큰(바탕·글자·테두리·링크)을 밝은 화면의 바탕으로 쓰고 상태와 그림에만 색을 더한다 */
  --cb-bg: #fafafa;
  --cb-surface: #ffffff;
  --cb-surface-muted: #f4f4f5;
  --cb-ink: #100b14;
  --cb-text: #212121;
  --cb-muted: #63636c;
  --cb-line: #e4e4e7;
  --cb-line-strong: #8b8b94;
  --cb-link: #1261b2;
  --cb-link-hover: #2f4468;
  --cb-focus: #1b78e2;
  --cb-btn: #100b14;
  --cb-on-btn: #ffffff;
  --cb-btn-hover: #35343a;
  --cb-brand: #2f4468;
  --cb-on-brand: #ffffff;
  --cb-current: #e6eefa;
  --cb-on-current: #2f4468;
  --cb-radius: 14px;
  --cb-radius-sm: 8px;
  --cb-backdrop: rgba(16, 11, 20, 0.55);
  --cb-fill-soft: #e4e4e7;
  /* 19절 리디자인: 글자 크기·간격 단계, 상태 연한 바탕(tint), 얕은 그림자 */
  --fs-xs: 12px; --fs-sm: 13.5px; --fs-md: 15px; --fs-lg: 17px; --fs-xl: 22px; --fs-2xl: 30px; --fs-3xl: 40px;
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px; --sp-7: 48px;
  --cb-ph2: #a86a00;
  --cb-t-open: #e5f3f0; --cb-t-up: #e9f1fb; --cb-t-await: #fcf1d8; --cb-t-contract: #eaedf4;
  --cb-shadow: 0 1px 2px rgba(16, 11, 20, 0.04), 0 4px 14px -6px rgba(16, 11, 20, 0.10);
  --cb-shadow-hover: 0 2px 4px rgba(16, 11, 20, 0.05), 0 12px 24px -10px rgba(16, 11, 20, 0.18);
  /* 상태: 글자와 바탕(모양은 배지 규칙이 따로 나눈다) */
  --cb-open-fg: #ffffff;   --cb-open-bg: #0f766e;
  --cb-up-fg: #1261b2;     --cb-up-bg: #eef5fd;
  --cb-await-fg: #7a4b00;  --cb-await-bg: #fdf1d6;
  --cb-contract-fg: #2f4468; --cb-contract-bg: #eef0f5;
  /* 그림: 범주 1~4, 비교 회색, 순서형(공고 수 청록, 분양가 주황), 빈 칸 */
  --cb-c1: #0b8f80; --cb-c2: #c2541f; --cb-c3: #5a54c4; --cb-c4: #a87d00;
  --cb-c-muted: #8b8b94;
  --cb-c-self: #2f4468;
  --cb-q0: #e9e9ec;
  --cb-q1: #5fb0a2; --cb-q2: #35968a; --cb-q3: #13766a; --cb-q4: #0a4e45;
  --cb-p1: #e98150; --cb-p2: #d96630; --cb-p3: #b04618; --cb-p4: #7c2e0c;
  --cb-pat-line: rgba(255, 255, 255, 0.55);

  --cb-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --cb-ease-in-out: ease-in-out;
  --cb-stagger: 40ms;
  --cb-rise-dur: 500ms;
  --cb-rise-dist: 12px;
  --cb-grow-dur: 700ms;
  --cb-draw-dur: 900ms;
  --cb-fade-dur: 500ms;
  --cb-open-dur: 250ms;
  --cb-close-dur: 150ms;
  --cb-panel-open-dur: 400ms;
  --cb-panel-close-dur: 350ms;
  --cb-scale: 0.96;
  --cb-hover-in-dur: 150ms;
  --cb-hover-out-dur: 250ms;
  --cb-count-dur: 800ms;
}

@media (prefers-color-scheme: dark) {
  :root {
    --cb-bg: #0e0e10;
    --cb-surface: #18181b;
    --cb-surface-muted: #222226;
    --cb-ink: #fafafa;
    --cb-text: #e4e4e7;
    --cb-muted: #a1a1aa;
    --cb-line: #2e2e33;
    --cb-line-strong: #71717a;
    --cb-link: #7ab4f5;
    --cb-link-hover: #b3d2f8;
    --cb-focus: #7ab4f5;
    --cb-btn: #fafafa;
    --cb-on-btn: #100b14;
    --cb-btn-hover: #d4d4d8;
    --cb-brand: #a9bde0;
    --cb-on-brand: #14161c;
    --cb-current: #1f2a3d;
    --cb-on-current: #c3d4f0;
    --cb-backdrop: rgba(0, 0, 0, 0.7);
    --cb-fill-soft: #333338;
    --cb-ph2: #e0a43a;
    --cb-t-open: #11302c; --cb-t-up: #14223a; --cb-t-await: #2f260f; --cb-t-contract: #1d2230;
    --cb-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    --cb-shadow-hover: 0 8px 22px -8px rgba(0, 0, 0, 0.7);
    --cb-open-fg: #06211e;   --cb-open-bg: #4fc9bb;
    --cb-up-fg: #8ec1f7;     --cb-up-bg: #14223a;
    --cb-await-fg: #f3cf86;  --cb-await-bg: #33280f;
    --cb-contract-fg: #b8c9e8; --cb-contract-bg: #20252f;
    --cb-c1: #16a191; --cb-c2: #d95926; --cb-c3: #8a80e6; --cb-c4: #b8860b;
    --cb-c-muted: #8a8a93;
    --cb-c-self: #a9bde0;
    --cb-q0: #26262b;
    --cb-q1: #2c7468; --cb-q2: #2f9584; --cb-q3: #4fbfb2; --cb-q4: #a3e3d9;
    --cb-p1: #8a4524; --cb-p2: #b85a2b; --cb-p3: #e07a45; --cb-p4: #f4ae86;
    --cb-pat-line: rgba(0, 0, 0, 0.45);
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cb-bg);
  color: var(--cb-text);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: break-word;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.cb-shell { flex: 1 0 auto; }

h1, h2, h3 { color: var(--cb-ink); letter-spacing: -0.02em; font-weight: 800; }
h1 { font-size: 36px; line-height: 1.22; margin: 0 0 10px; overflow-wrap: anywhere; }
h2 { font-size: 22px; line-height: 1.35; margin: 0 0 12px; }
h3 { font-size: 16px; line-height: 1.5; margin: 0; }
p { margin: 0 0 12px; }
.cb-main p { max-width: 72ch; }

a { color: var(--cb-link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--cb-link-hover); text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--cb-focus); outline-offset: 2px; }
.cb-main:focus { outline: none; }

.cb-nowrap { white-space: nowrap; }

.cb-sr {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.cb-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.cb-pat-c2 { fill: var(--cb-c2); }
.cb-pat-c4 { fill: var(--cb-c4); }
.cb-pat-line { fill: var(--cb-pat-line); }
.cb-pat-up-bg { fill: var(--cb-bg); }
.cb-pat-up-line { fill: var(--cb-up-fg); }

.cb-icon { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.cb-icon--ext { width: 12px; height: 12px; margin-left: 3px; vertical-align: -1px; }

/* ---------- 공통 틀 ---------- */

.cb-skip {
  position: absolute; left: 8px; top: -80px; z-index: 60;
  padding: 8px 16px;
  background: var(--cb-brand); color: var(--cb-on-brand);
  font-weight: 700; text-decoration: none;
}
.cb-skip:hover, .cb-skip:focus { color: var(--cb-on-brand); }
.cb-skip:focus { top: 8px; }

.cb-preview {
  padding: 8px 16px;
  background: var(--cb-brand); color: var(--cb-on-brand);
  font-size: 13px; font-weight: 700; letter-spacing: 0.01em; text-align: center;
}

.cb-topbar { display: none; }

.cb-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr) 300px;
  grid-template-rows: minmax(0, 1fr) auto auto;
}
.cb-shell--noaside { grid-template-columns: 232px minmax(0, 1fr); }

.cb-nav {
  grid-column: 1; grid-row: 1 / span 3;
  align-self: start;
  position: sticky; top: 0;
  height: 100vh; overflow-y: auto;
  padding: 20px 14px 28px;
  background: var(--cb-surface);
  border-right: 1px solid var(--cb-line);
  font-size: var(--fs-md);
  scrollbar-width: thin;
}
.cb-main { grid-column: 2; grid-row: 1; min-width: 0; padding: 32px 32px 72px 36px; }
.cb-shell--noaside .cb-main { padding-right: 40px; }
.cb-aside {
  grid-column: 3; grid-row: 1; min-width: 0;
  display: flex; flex-direction: column; gap: var(--sp-4);
  padding: 32px 28px 72px 0;
}

.cb-footer {
  grid-column: 2 / -1; grid-row: 3; min-width: 0;
  padding: 28px 40px 40px 36px;
  border-top: 1px solid var(--cb-line);
  background: var(--cb-surface);
  color: var(--cb-muted); font-size: 14px;
}
.cb-footer p { max-width: 80ch; margin: 0 0 8px; }
.cb-footer .cb-disclaimer { color: var(--cb-text); }
.cb-footer-links { display: flex; flex-wrap: wrap; gap: 0 20px; }
.cb-footer-links a { display: inline-flex; align-items: center; min-height: 40px; font-weight: 700; }

/* ---------- 왼쪽 메뉴 ---------- */

.cb-brand {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px;
  color: var(--cb-ink); font-size: 16px; font-weight: 800; letter-spacing: -0.01em; text-decoration: none;
}
.cb-brand:hover { color: var(--cb-ink); }
.cb-brand-fox {
  display: inline-flex; align-items: center; justify-content: center;
  height: 28px; padding: 0 7px; border-radius: 7px;
  background: var(--cb-brand); color: var(--cb-on-brand);
  font-size: 15px; font-weight: 900; letter-spacing: 0.08em; line-height: 1;
}
.cb-brand-sub { margin: 0 0 16px; padding-left: 2px; font-size: var(--fs-xs); color: var(--cb-muted); }

.cb-nav-close { display: none; }

.cb-nav-search { display: flex; margin: 0 0 14px; }
.cb-nav-search input {
  flex: 1; min-width: 0; height: 40px; padding: 0 12px;
  border: 1px solid var(--cb-line); border-right: 0; border-radius: 10px 0 0 10px;
  background: var(--cb-surface-muted); color: var(--cb-ink); font: inherit; font-size: 16px;
}
.cb-nav-search input:focus-visible { background: var(--cb-surface); }
.cb-nav-search input::placeholder { color: var(--cb-muted); font-size: 14px; }
.cb-nav-search-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border: 1px solid var(--cb-btn); border-radius: 0 10px 10px 0;
  background: var(--cb-btn); color: var(--cb-on-btn); cursor: pointer;
}
.cb-nav-search-btn:hover { background: var(--cb-btn-hover); border-color: var(--cb-btn-hover); }

.cb-nav-list, .cb-nav-regions { list-style: none; margin: 0; padding: 0; }
.cb-nav-link {
  display: flex; align-items: center; gap: 10px;
  min-height: 40px; padding: 4px 10px; border-radius: 10px;
  color: var(--cb-text); text-decoration: none; line-height: 1.4; font-weight: 600;
}
.cb-nav-ico { display: inline-flex; flex: none; color: var(--cb-muted); }
.cb-nav-label { min-width: 0; flex: 1; }
.cb-nav-link:hover { background: var(--cb-surface-muted); color: var(--cb-ink); }
.cb-nav-link:hover .cb-nav-ico { color: var(--cb-ink); }
.cb-nav-link[aria-current="page"] { background: var(--cb-current); color: var(--cb-on-current); font-weight: 800; }
.cb-nav-link[aria-current="page"] .cb-nav-ico { color: var(--cb-on-current); }
.cb-nav-link.cb-ext { font-weight: 500; }
.cb-nav-main { margin-bottom: 8px; }

/* 접이식 묶음: 제목 줄에 아이콘, 오른쪽에 화살표 */
.cb-nav-group { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--cb-line); }
.cb-nav-heading {
  display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 4px 10px; border-radius: 10px;
  font-size: var(--fs-xs); font-weight: 800; letter-spacing: 0.06em; color: var(--cb-brand);
  cursor: pointer; list-style: none;
}
.cb-nav-heading::-webkit-details-marker { display: none; }
.cb-nav-heading:hover { background: var(--cb-surface-muted); }
.cb-nav-heading .cb-nav-ico { color: var(--cb-brand); }
.cb-nav-meta { font-size: var(--fs-xs); font-weight: 800; color: var(--cb-muted); font-variant-numeric: tabular-nums; }
.cb-nav-chev { color: var(--cb-muted); transition: transform var(--cb-open-dur) var(--cb-ease); }
.cb-nav-group[open] > summary .cb-nav-chev { transform: rotate(180deg); }
.cb-nav-subheading { margin: 8px 0 2px 10px; font-size: var(--fs-xs); color: var(--cb-muted); }
.cb-nav-group > .cb-nav-list { padding-left: 4px; }

/* 지역은 알약 묶음: 이름 + 진행 중 공고 수 */
.cb-nav-regions { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 2px 10px; }
.cb-nav-regions .cb-nav-link {
  min-height: 34px; padding: 2px 10px; gap: 6px;
  border: 1px solid var(--cb-line); border-radius: 999px;
  background: var(--cb-surface); font-size: 14px; font-weight: 600;
}
.cb-nav-regions .cb-nav-label { flex: none; }
.cb-nav-count {
  display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: var(--cb-t-open); color: var(--cb-open-bg);
  font-size: var(--fs-xs); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums;
}
.cb-nav-link[aria-current="page"] .cb-nav-count { background: var(--cb-surface); color: var(--cb-on-current); }
.cb-nav-regions .cb-nav-link[aria-current="page"] { border-color: var(--cb-brand); }
.cb-nav-foot { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--cb-line); }

.cb-backdrop { position: fixed; inset: 0; z-index: 30; background: var(--cb-backdrop); }

/* ---------- 본문 공통 ---------- */

.cb-masthead { padding: 4px 0 0; }
.cb-masthead h1 { font-size: var(--fs-3xl); line-height: 1.15; letter-spacing: -0.035em; margin: 0 0 8px; }
.cb-main .cb-lead { margin: 0; max-width: 46em; font-size: var(--fs-lg); color: var(--cb-muted); line-height: 1.6; }

.cb-basis {
  margin: 12px 0 0; padding: 0;
  color: var(--cb-muted);
  font-size: var(--fs-xs); line-height: 1.6; font-variant-numeric: tabular-nums;
}
.cb-main p.cb-basis { max-width: none; }
.cb-main > .cb-basis:not(:last-child) { margin-bottom: 24px; }
.cb-intro { margin: 0 0 24px; }
.cb-titlebar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 16px; margin: 0 0 10px; }
.cb-titlebar h1 { margin: 0; min-width: 0; }
.cb-pin { display: flex; flex-direction: column; align-items: flex-end; }
.cb-main .cb-pin-note { margin: 4px 0 0; font-size: 13px; color: var(--cb-muted); }
.cb-pin-btn[aria-pressed="true"] { background: var(--cb-current); border-color: var(--cb-brand); color: var(--cb-on-current); }
.cb-pinned { margin-bottom: 40px; }

.cb-section { margin-top: 48px; }
.cb-section:first-child,
.cb-main > :is(.cb-basis, .cb-stats, h1, .cb-keybox, [data-pinned-slot], .cb-pillbar) + .cb-section { margin-top: 0; }
.cb-section > h2:not(.cb-sr), .cb-section-head {
  margin: 0 0 var(--sp-4); padding-top: 0;
  border-top: 0;
}
.cb-section > h2:not(.cb-sr) { display: flex; align-items: center; gap: 10px; }
.cb-section > h2:not(.cb-sr)::before, .cb-section-head h2::before {
  content: ""; flex: none; width: 4px; height: 1.05em; border-radius: 2px; background: var(--cb-line-strong);
}
.cb-section-head h2 { display: flex; align-items: center; gap: 10px; }
.cb-section--key > h2:not(.cb-sr)::before, .cb-section--key .cb-section-head h2::before { background: var(--cb-brand); }
#open-now > .cb-section-head h2::before { background: var(--cb-open-bg); }
.cb-section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.cb-section-head h2 { margin: 0; }
.cb-main .cb-section-meta {
  margin: 0; padding: 2px 10px; border-radius: 999px; background: var(--cb-surface-muted);
  font-size: var(--fs-xs); font-weight: 800; color: var(--cb-muted); font-variant-numeric: tabular-nums;
}
.cb-section-note { margin: -8px 0 var(--sp-4); font-size: var(--fs-sm); color: var(--cb-muted); }
.cb-note { margin: 12px 0 0; font-size: var(--fs-xs); line-height: 1.65; color: var(--cb-muted); }
.cb-more { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; }

/* 날짜와 요일 묶음(줄 끝에 요일만 남지 않게) */
.cb-nb { white-space: nowrap; }

/* 핵심 숫자 줄: 연한 바탕 타일 네 장. 홈은 타일마다 색 계열이 다르고 아이콘이 붙는다 */
.cb-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: var(--sp-3);
  list-style: none; margin: 0 0 var(--sp-5); padding: 0;
}
.cb-stats li { min-width: 0; }
.cb-stat {
  display: flex; flex-direction: column; justify-content: space-between; gap: 10px;
  height: 100%; padding: 14px 16px 14px;
  border: 1px solid var(--cb-line); border-radius: var(--cb-radius);
  background: var(--cb-surface); box-shadow: var(--cb-shadow);
  color: var(--cb-ink); text-decoration: none;
}
a.cb-stat:hover { border-color: var(--cb-line-strong); box-shadow: var(--cb-shadow-hover); color: var(--cb-ink); }
a.cb-stat:hover .cb-stat-label { text-decoration: underline; text-underline-offset: 3px; }
.cb-stat-label { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); font-weight: 700; line-height: 1.4; color: var(--cb-muted); }
.cb-stat-ico {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 30px; height: 30px; border-radius: 50%; background: var(--cb-surface-muted); color: var(--cb-ink);
}
.cb-stat-value { display: flex; align-items: baseline; gap: 3px; }
.cb-stat-num {
  display: inline-block;
  font-size: 36px; font-weight: 800; line-height: 1; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.cb-stats li .cb-stat-num.is-zero { color: var(--cb-muted); font-size: 28px; font-weight: 700; }
.cb-stat-num.is-missing { font-size: 20px; letter-spacing: 0; color: var(--cb-muted); }
.cb-stat-unit { font-size: var(--fs-md); font-weight: 700; color: var(--cb-muted); }
.cb-stats--home { margin-bottom: var(--sp-5); }
.cb-stats--home .cb-stat-num { font-size: 44px; }
.cb-stats--home li:nth-child(1) .cb-stat { background: var(--cb-t-open); border-color: transparent; }
.cb-stats--home li:nth-child(1) .cb-stat-ico { background: var(--cb-open-bg); color: var(--cb-open-fg); }
.cb-stats--home li:nth-child(2) .cb-stat { background: var(--cb-t-up); border-color: transparent; }
.cb-stats--home li:nth-child(2) .cb-stat-ico { background: var(--cb-up-fg); color: var(--cb-surface); }
.cb-stats--home li:nth-child(3) .cb-stat { background: var(--cb-t-await); border-color: transparent; }
.cb-stats--home li:nth-child(3) .cb-stat-ico { background: var(--cb-await-fg); color: var(--cb-surface); }
.cb-stats--home li:nth-child(4) .cb-stat { background: var(--cb-t-contract); border-color: transparent; }
.cb-stats--home li:nth-child(4) .cb-stat-ico { background: var(--cb-brand); color: var(--cb-on-brand); }
.cb-stats--home .cb-stat { box-shadow: none; }
.cb-stats--home .cb-stat-label { color: var(--cb-text); }
.cb-main .cb-stats-note { margin: -16px 0 24px; font-size: var(--fs-xs); color: var(--cb-muted); font-variant-numeric: tabular-nums; }

/* 알약 줄: 홈 바로 고르기와 전체 공고 필터가 같은 모양 */
.cb-pillbar { display: grid; gap: 6px; margin: 0 0 var(--sp-5); }
.cb-pillbar-title, .cb-filter-title { margin: 0; font-size: var(--fs-xs); font-weight: 800; letter-spacing: 0.04em; color: var(--cb-muted); }
.cb-main p.cb-pillbar-title { margin-top: 6px; }
.cb-pills { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 4px; padding: 0; }
.cb-pill {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 8px 4px 14px;
  border: 1px solid var(--cb-line); border-radius: 999px; background: var(--cb-surface);
  color: var(--cb-text); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.cb-pill:hover { border-color: var(--cb-brand); background: var(--cb-current); color: var(--cb-on-current); }
.cb-pill-n {
  display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 999px; background: var(--cb-surface-muted); color: var(--cb-text);
  font-size: var(--fs-xs); font-weight: 800; font-variant-numeric: tabular-nums;
}
.cb-pill[data-p="open"] .cb-pill-n { background: var(--cb-open-bg); color: var(--cb-open-fg); }
.cb-pill[data-p="upcoming"] .cb-pill-n { background: var(--cb-t-up); color: var(--cb-up-fg); }
.cb-pill[data-p="awaiting"] .cb-pill-n { background: var(--cb-t-await); color: var(--cb-await-fg); }
.cb-pill[data-p="contract"] .cb-pill-n { background: var(--cb-t-contract); color: var(--cb-contract-fg); }

/* 단추 */
.cb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  min-height: 40px; padding: 8px 16px;
  border: 1px solid var(--cb-line-strong); border-radius: var(--cb-radius-sm);
  background: var(--cb-surface); color: var(--cb-ink);
  font: inherit; font-size: 15px; font-weight: 700; line-height: 1.3;
  text-decoration: none; cursor: pointer;
}
.cb-btn:hover { background: var(--cb-current); border-color: var(--cb-brand); color: var(--cb-on-current); }
.cb-btn--primary { border-color: var(--cb-btn); background: var(--cb-btn); color: var(--cb-on-btn); }
.cb-btn--primary:hover { background: var(--cb-btn-hover); border-color: var(--cb-btn-hover); color: var(--cb-on-btn); }
.cb-btn--ghost { background: transparent; border-color: var(--cb-line-strong); }
.cb-btn--ghost:hover { background: var(--cb-surface-muted); border-color: var(--cb-brand); color: var(--cb-ink); }
.cb-btn--block { display: flex; width: 100%; }
.cb-btn[aria-disabled="true"] { opacity: 0.4; cursor: default; }
.cb-btn[aria-disabled="true"]:hover { background: var(--cb-surface); border-color: var(--cb-line-strong); color: var(--cb-ink); }

/* 상태 배지·유형·D-day: 색과 모양(채움·테두리·점선)과 글자를 함께 쓴다 */
.cb-status, .cb-tag {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; line-height: 1.35; white-space: nowrap;
  border: 1px solid transparent;
}
.cb-status:not(.cb-status--closed):not(.cb-status--unknown)::before { content: ""; flex: none; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: currentColor; }
.cb-status--open { background: var(--cb-open-bg); border-color: var(--cb-open-bg); color: var(--cb-open-fg); }
.cb-status--upcoming { background: var(--cb-up-bg); border-color: var(--cb-up-fg); color: var(--cb-up-fg); }
.cb-status--awaiting { background: var(--cb-await-bg); color: var(--cb-await-fg); }
.cb-status--contract { border: 1px dashed var(--cb-contract-fg); background: var(--cb-contract-bg); color: var(--cb-contract-fg); }
.cb-status--closed { border-color: var(--cb-line); color: var(--cb-muted); font-weight: 600; }
.cb-status--unknown { border: 1px dotted var(--cb-line-strong); color: var(--cb-muted); font-weight: 600; }
.cb-tag { border-color: var(--cb-line); background: var(--cb-surface-muted); color: var(--cb-muted); font-weight: 600; }
.cb-dday {
  display: inline-flex; align-items: center;
  padding: 1px 6px; border: 1px solid var(--cb-brand); border-radius: 6px;
  color: var(--cb-brand); font-size: 12.5px; font-weight: 800; line-height: 1.4;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

.cb-empty {
  padding: 10px 16px;
  border: 1px dashed var(--cb-line-strong); border-radius: var(--cb-radius);
  color: var(--cb-muted);
}
.cb-empty p { margin: 0; padding: 4px 0; }
.cb-empty-links { white-space: nowrap; }
.cb-empty-links a { display: inline-block; padding: 4px 0; font-weight: 700; }

.cb-error {
  padding: 16px 20px; margin: 0 0 16px;
  border: 2px solid var(--cb-brand); border-radius: var(--cb-radius);
  color: var(--cb-ink);
}
.cb-error p { margin: 0 0 8px; }

/* ---------- 공고 카드: 위쪽 상태색 머리(상태·D-day) → 제목·핵심 숫자 → 접수·발표·계약 진행 막대 ---------- */

.cb-rows {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); gap: 14px;
  list-style: none; margin: 0; padding: 0;
}
.cb-rows:empty { display: none; }
.cb-row {
  --tint: var(--cb-surface-muted);
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; min-width: 0;
  border: 1px solid var(--cb-line); border-radius: var(--cb-radius);
  background: var(--cb-surface); box-shadow: var(--cb-shadow);
}
.cb-row[data-s="open"] { --tint: var(--cb-t-open); }
.cb-row[data-s="upcoming"] { --tint: var(--cb-t-up); }
.cb-row[data-s="awaiting"] { --tint: var(--cb-t-await); }
.cb-row[data-s="contract"] { --tint: var(--cb-t-contract); }
.cb-row[data-s="closed"], .cb-row[data-s="unknown"] { box-shadow: none; background: var(--cb-surface-muted); border-color: var(--cb-line); --tint: transparent; }
.cb-row[data-s="closed"] .cb-row-head, .cb-row[data-s="unknown"] .cb-row-head { border-bottom: 1px solid var(--cb-line); }
.cb-row[data-s="closed"] .cb-row-title a, .cb-row[data-s="unknown"] .cb-row-title a { color: var(--cb-muted); }
.cb-row:focus-within { border-color: var(--cb-focus); }
.cb-row-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 14px; background: var(--tint);
}
.cb-row-tags { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; margin: 0; }
.cb-row-body { display: flex; flex: 1; flex-direction: column; min-width: 0; padding: 12px 14px 4px; }
.cb-row-title { margin: 0 0 2px; font-size: 17px; line-height: 1.4; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.cb-row-title a { color: var(--cb-ink); text-decoration: none; }
.cb-row-title a::after { content: ""; position: absolute; inset: 0; }
.cb-row-title a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.cb-main .cb-row-meta { margin: 0 0 10px; max-width: none; font-size: var(--fs-sm); line-height: 1.5; color: var(--cb-muted); }
.cb-main .cb-row-side { margin: 0; flex: none; max-width: none; }
.cb-dday-num {
  display: inline-block; padding: 1px 9px;
  background: var(--cb-brand); color: var(--cb-on-brand); border-radius: 8px;
  font-size: 14px; font-weight: 800; line-height: 1.5; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.cb-row[data-s="closed"] .cb-dday-num, .cb-row[data-s="unknown"] .cb-dday-num { background: transparent; color: var(--cb-muted); border: 1px solid var(--cb-line-strong); }
.cb-row-nums { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: auto 0 8px; padding-top: 4px; }
.cb-row-nums > div { display: flex; flex-direction: column; min-width: 0; }
.cb-row-nums dt { font-size: var(--fs-xs); color: var(--cb-muted); line-height: 1.4; }
.cb-row-nums dd { margin: 0; font-size: var(--fs-sm); color: var(--cb-muted); line-height: 1.4; }
.cb-row-nums b { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; color: var(--cb-ink); font-variant-numeric: tabular-nums; }
.cb-main .cb-row-next { margin: 0 0 6px; max-width: none; font-size: var(--fs-xs); font-weight: 700; color: var(--cb-brand); }
.cb-row-meta strong { color: var(--cb-ink); font-variant-numeric: tabular-nums; }
.cb-main .cb-row-kind {
  margin: 0; padding: 8px 14px 0; background: var(--tint);
  font-size: var(--fs-xs); font-weight: 800; line-height: 1.5; letter-spacing: 0.04em; color: var(--cb-brand);
}
.cb-row-kind + .cb-row-head { padding-top: 6px; }

/* 진행 막대: 지남 = 채움, 진행 중 = 강조 채움 + 굵은 글자, 예정 = 빈 테두리, 없음 = 점선 */
.cb-prog { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; list-style: none; margin: 0; padding: 4px 14px 14px; }
.cb-prog li { display: flex; flex-direction: column; gap: 1px; min-width: 0; font-size: var(--fs-xs); line-height: 1.35; font-variant-numeric: tabular-nums; }
.cb-prog-bar { display: block; height: 6px; margin-bottom: 4px; border-radius: 3px; background: var(--cb-line-strong); }
.cb-prog li[data-p="o"] .cb-prog-bar { background: var(--cb-open-bg); }
.cb-prog li[data-p="u"] .cb-prog-bar { background: transparent; box-shadow: inset 0 0 0 1.5px var(--cb-line-strong); }
.cb-prog li[data-p="-"] .cb-prog-bar { background: repeating-linear-gradient(90deg, var(--cb-line-strong) 0 3px, transparent 3px 6px); height: 2px; margin: 2px 0 6px; }
.cb-prog-name { font-weight: 700; color: var(--cb-text); }
.cb-prog li[data-p="o"] .cb-prog-name { color: var(--cb-ink); font-weight: 800; }
.cb-prog-date { color: var(--cb-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-prog li[data-p="d"] .cb-prog-bar { background: var(--cb-brand); opacity: 0.55; }

/* ---------- 광고 위치 예시 (미리보기 빌드 전용) ---------- */

.cb-ad {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  height: 90px; margin: 40px 0; padding: 8px 16px;
  border: 2px dashed var(--cb-line-strong); border-radius: var(--cb-radius);
  background: repeating-linear-gradient(-45deg, var(--cb-line) 0 2px, var(--cb-bg) 2px 9px);
  color: var(--cb-ink);
  text-align: center; line-height: 1.3;
}
.cb-ad > span { padding: 0 6px; background: var(--cb-bg); }
.cb-ad-title { font-size: 14px; font-weight: 900; letter-spacing: 0.04em; }
.cb-ad-size { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cb-ad-place { font-size: 12px; color: var(--cb-muted); }
.cb-ad-row { grid-column: 1 / -1; }
.cb-ad-row .cb-ad { margin: 16px 0; }
.cb-ad-slot { flex: none; margin-top: auto; padding-top: 8px; }
.cb-ad--side { height: 250px; margin: 0; }

/* ---------- 필터·검색 ---------- */

.cb-filters {
  display: grid; gap: 10px;
  margin: 0 0 var(--sp-4); padding: 14px 16px;
  border: 1px solid var(--cb-line); border-radius: var(--cb-radius); background: var(--cb-surface);
}
.cb-filter-group { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; align-items: start; }
.cb-main .cb-filter-title { margin: 0; }
.cb-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cb-filter {
  min-height: 36px; padding: 4px 14px;
  border: 1px solid var(--cb-line); border-radius: 999px;
  background: var(--cb-surface); color: var(--cb-text);
  font: inherit; font-size: 14px; font-weight: 600; line-height: 1.3; cursor: pointer;
}
.cb-filter:hover { border-color: var(--cb-brand); background: var(--cb-current); color: var(--cb-on-current); }
.cb-filter[aria-pressed="true"] { background: var(--cb-brand); border-color: var(--cb-brand); color: var(--cb-on-brand); font-weight: 800; }
.cb-filter[aria-pressed="true"]::before { content: "✓ "; }
.cb-main .cb-filter-actions { margin: 0; }
.cb-main .cb-result-count { margin: 0 0 12px; max-width: none; font-size: var(--fs-sm); font-weight: 700; color: var(--cb-muted); }

.cb-search-form { margin: 0 0 24px; }
.cb-search-form label { display: block; margin: 0 0 6px; font-weight: 800; color: var(--cb-ink); }
.cb-search-row { display: flex; gap: 8px; max-width: 640px; }
.cb-search-row input, .cb-company-filter input {
  flex: 1; min-width: 0; height: 44px; padding: 0 14px;
  border: 1px solid var(--cb-line-strong); border-radius: var(--cb-radius-sm);
  background: var(--cb-surface); color: var(--cb-ink); font: inherit; font-size: 16px;
}
.cb-search-row input::placeholder, .cb-company-filter input::placeholder { color: var(--cb-muted); }

/* ---------- 목록 화면 ---------- */

.cb-summary { display: flex; flex-wrap: wrap; gap: 8px 16px; list-style: none; margin: 0 0 24px; padding: 0; font-size: 14px; }
.cb-summary li { display: inline-flex; align-items: center; gap: 6px; color: var(--cb-muted); }
.cb-summary strong { color: var(--cb-ink); font-variant-numeric: tabular-nums; }

.cb-pager { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 24px; }
.cb-pager ul { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 0; padding: 0; }
.cb-pager-num, .cb-pager-edge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 10px;
  border: 1px solid var(--cb-line-strong); border-radius: var(--cb-radius-sm);
  color: var(--cb-text); text-decoration: none; font-weight: 700; font-variant-numeric: tabular-nums;
}
a.cb-pager-num:hover, a.cb-pager-edge:hover { border-color: var(--cb-brand); background: var(--cb-surface-muted); color: var(--cb-ink); }
.cb-pager-num[aria-current="page"] { background: var(--cb-brand); border-color: var(--cb-brand); color: var(--cb-on-brand); }
.cb-pager-edge.is-disabled { color: var(--cb-muted); border-color: var(--cb-line); }
.cb-pager-gap { display: inline-flex; align-items: center; padding: 0 4px; color: var(--cb-muted); }
.cb-main .cb-pager-info { margin: 0; font-size: 13px; color: var(--cb-muted); }

/* ---------- 공고 상세 ---------- */

/* 상세 머리: 흰 카드 안에 이동 경로·배지·제목·주소 */
.cb-hero {
  margin: 0 0 var(--sp-3); padding: 14px 24px 20px;
  border: 1px solid var(--cb-line); border-radius: var(--cb-radius); background: var(--cb-surface); box-shadow: var(--cb-shadow);
}
.cb-hero h1 { font-size: var(--fs-2xl); line-height: 1.25; margin: 0 0 6px; }
.cb-crumbs ol { display: flex; flex-wrap: wrap; gap: 0 6px; list-style: none; margin: 0 0 4px; padding: 0; font-size: var(--fs-xs); color: var(--cb-muted); }
.cb-crumbs li { min-width: 0; max-width: 100%; }
.cb-crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--cb-line-strong); }
.cb-crumbs a { display: inline-block; padding: 8px 0; color: var(--cb-muted); }
.cb-crumbs a:hover { color: var(--cb-ink); }
.cb-crumbs li[aria-current] { padding: 8px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.cb-main .cb-address { display: flex; align-items: flex-start; gap: 6px; margin: 0; color: var(--cb-text); font-size: var(--fs-lg); overflow-wrap: anywhere; }
.cb-hero-pin { margin-top: 4px; color: var(--cb-brand); }
.cb-main .cb-ids { margin: 4px 0 0; font-size: var(--fs-xs); color: var(--cb-muted); font-variant-numeric: tabular-nums; }

/* 상세는 절마다 흰 카드 */
.cb-main:has(> .cb-hero) .cb-section {
  margin-top: var(--sp-4); padding: 20px 22px 22px;
  border: 1px solid var(--cb-line); border-radius: var(--cb-radius); background: var(--cb-surface); box-shadow: var(--cb-shadow);
}
.cb-main:has(> .cb-hero) .cb-section > h2:not(.cb-sr) { font-size: 20px; }
.cb-main:has(> .cb-hero) > .cb-stats { margin-bottom: 0; }
.cb-main:has(> .cb-hero) > .cb-stats + .cb-section { margin-top: var(--sp-4); }
.cb-main:has(> .cb-hero) > .cb-basis { margin: 0 0 var(--sp-4); }
.cb-stats--detail li:nth-child(1) .cb-stat { background: var(--cb-t-contract); border-color: transparent; }
.cb-stats--detail li:nth-child(2) .cb-stat { background: var(--cb-t-open); border-color: transparent; }
.cb-stats--detail li:nth-child(3) .cb-stat { background: var(--cb-t-await); border-color: transparent; }
.cb-stats--detail li:nth-child(4) .cb-stat { background: var(--cb-t-up); border-color: transparent; }
.cb-stats--detail .cb-stat { box-shadow: none; }
.cb-stats--detail .cb-stat-ico { background: var(--cb-surface); }
.cb-stats--detail .cb-stat-label { color: var(--cb-text); }

/* 핵심 정보: 연한 칸 격자 */
.cb-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
.cb-facts > div { padding: 12px 14px; border-radius: 12px; background: var(--cb-surface-muted); min-width: 0; }
.cb-facts > div:first-child { grid-column: 1 / -1; }
.cb-facts dt { margin: 0 0 2px; font-size: var(--fs-xs); font-weight: 700; color: var(--cb-muted); }
.cb-facts dd { margin: 0; color: var(--cb-ink); font-size: var(--fs-lg); font-weight: 700; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; line-height: 1.45; }
.cb-facts dd.is-missing { color: var(--cb-muted); font-weight: 400; font-size: var(--fs-md); }
.cb-facts--wide { grid-template-columns: minmax(0, 1fr); margin-bottom: 16px; }
.cb-facts--wide > div { background: transparent; padding: 10px 0; border-bottom: 1px solid var(--cb-line); border-radius: 0; }
.cb-facts--wide dd { font-weight: 400; font-size: 16px; color: var(--cb-text); }
.cb-facts--wide dt { font-weight: 800; color: var(--cb-ink); font-size: var(--fs-md); }

.cb-table-box, .cb-table-wrap { background: transparent; }
.cb-table-wrap { overflow-x: auto; }
.cb-table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.cb-table th, .cb-table td { padding: 10px 14px 10px 0; border-bottom: 1px solid var(--cb-line); text-align: left; vertical-align: top; }
.cb-table th:last-child, .cb-table td:last-child { padding-right: 0; }
.cb-table thead th { border-bottom: 1px solid var(--cb-line-strong); color: var(--cb-muted); font-size: 13px; font-weight: 800; white-space: nowrap; }
.cb-table tbody th { color: var(--cb-ink); font-weight: 700; }
.cb-table tfoot th, .cb-table tfoot td { border-top: 1px solid var(--cb-line-strong); border-bottom: 0; font-weight: 800; color: var(--cb-ink); }
.cb-table .cb-num { text-align: right; white-space: nowrap; }
.cb-table .cb-date { white-space: normal; }
.cb-schedule th[scope="row"] { width: 40%; }
.cb-table thead th.cb-num { text-align: right; }
.cb-table td.is-missing { color: var(--cb-muted); }
.cb-models thead th:not(:first-child), .cb-special thead th:not(:first-child) { text-align: right; }
.cb-schedule tr.is-current th, .cb-schedule tr.is-current td { background: var(--cb-surface-muted); color: var(--cb-ink); font-weight: 800; }
.cb-schedule tr.is-current th { box-shadow: inset 3px 0 0 var(--cb-brand); padding-left: 12px; }
.cb-stage { white-space: nowrap; }
.cb-stage--open { padding: 1px 8px; background: var(--cb-open-bg); color: var(--cb-open-fg); border-radius: 999px; }
.cb-stage--done { color: var(--cb-muted); }

.cb-flags {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px;
  margin: 0;
}
.cb-flag { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--cb-line); }
.cb-flag dt { min-width: 0; }
.cb-flag dd { margin: 0; font-size: 14px; white-space: nowrap; }
.cb-flag--yes dt { color: var(--cb-ink); font-weight: 700; }
.cb-flag--yes dd { padding: 1px 8px; border-radius: 999px; background: var(--cb-await-bg); color: var(--cb-await-fg); font-weight: 800; }
.cb-flag--unknown dd { color: var(--cb-muted); }

.cb-checks { margin: 0; padding: 0 0 0 2.2em; }
.cb-checks li { max-width: 72ch; margin: 0; padding: 10px 0 10px 6px; border-bottom: 1px solid var(--cb-line); }
.cb-checks li::marker { color: var(--cb-brand); font-weight: 800; font-variant-numeric: tabular-nums; }

.cb-keybox {
  margin: 0 0 var(--sp-4); padding: 16px 20px;
  border: 1px solid transparent; border-radius: var(--cb-radius); background: var(--cb-t-contract);
}
.cb-keybox-title { margin: 0 0 6px; font-size: var(--fs-xs); font-weight: 800; letter-spacing: 0.04em; line-height: 1.4; color: var(--cb-brand); }
.cb-main .cb-key-next { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 12px; max-width: none; }
.cb-key-dday { font-size: 36px; font-weight: 800; line-height: 1.1; letter-spacing: -0.03em; color: var(--cb-brand); font-variant-numeric: tabular-nums; }
.cb-key-label { font-weight: 800; color: var(--cb-ink); }
.cb-key-date { font-size: 14px; color: var(--cb-muted); font-variant-numeric: tabular-nums; }
.cb-key-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; font-size: 15px; }
.cb-key-link a, .cb-key-contact .cb-tel { display: inline-flex; align-items: center; min-height: 40px; }
.cb-key-contact { color: var(--cb-muted); }
.cb-key-contact .cb-tel { font-size: 15px; margin-left: 4px; }
.cb-key-contact .is-missing { margin-left: 4px; }

.cb-fold { margin-top: 12px; border-top: 1px solid var(--cb-line); }
.cb-fold > summary { display: flex; align-items: center; gap: 6px; min-height: 40px; cursor: pointer; font-size: var(--fs-sm); font-weight: 700; color: var(--cb-link); list-style: none; }
.cb-fold > summary::-webkit-details-marker { display: none; }
.cb-fold > summary::before { content: "+"; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border: 1px solid currentColor; border-radius: 50%; font-size: 13px; line-height: 1; }
.cb-fold[open] > summary::before { content: "−"; }

/* ---------- aside 상자: 굵은 윗선과 작은 머리말 ---------- */

.cb-box { padding: 16px 16px 12px; border: 1px solid var(--cb-line); border-radius: var(--cb-radius); background: var(--cb-surface); box-shadow: var(--cb-shadow); }
.cb-box-title { margin: 0 0 12px; font-size: var(--fs-md); font-weight: 800; line-height: 1.4; letter-spacing: -0.01em; }
.cb-box-sub { margin: -6px 0 8px; font-size: var(--fs-sm); color: var(--cb-muted); }
.cb-box-more { margin: 8px 0 0; font-size: 14px; }
.cb-box-more a { display: inline-flex; align-items: center; min-height: 40px; font-weight: 700; }
.cb-box-links { display: flex; flex-wrap: wrap; gap: 0 16px; }
.cb-box .cb-empty { padding: 6px 12px; font-size: 14px; }

.cb-mini { list-style: none; margin: 0; padding: 0; }
.cb-mini li { display: flex; flex-direction: column; padding: 2px 0 10px; border-top: 1px solid var(--cb-line); font-size: var(--fs-md); line-height: 1.5; overflow-wrap: anywhere; }
.cb-mini li:first-child { border-top: 0; }
.cb-mini li > a, .cb-thumb-body > a { display: block; padding: 8px 0 2px; font-weight: 700; text-decoration: none; }
.cb-mini li > a:hover, .cb-thumb-body > a:hover { text-decoration: underline; }
.cb-mini-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: var(--fs-xs); color: var(--cb-muted); font-variant-numeric: tabular-nums; }
.cb-mini .cb-status { padding: 0 6px; font-size: var(--fs-xs); }
.cb-mini .cb-status--closed { padding: 0; }
/* 썸네일 목록: 왼쪽 타일에 D-day를 크게 */
.cb-mini li.cb-thumb { flex-direction: row; align-items: center; gap: 12px; padding: 10px 0; }
.cb-thumb-tile {
  display: flex; flex: none; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 12px; background: var(--cb-t-contract); color: var(--cb-brand);
  font-size: 15px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.cb-thumb-body { display: flex; flex-direction: column; min-width: 0; }
.cb-thumb-body > a { padding: 0 0 2px; line-height: 1.4; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }

.cb-week {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px;
  list-style: none; margin: 0; padding: 0;
}
.cb-week-cell {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 72px; padding: 6px 0; border-radius: 10px; background: var(--cb-surface-muted);
  color: var(--cb-text); text-decoration: none; font-size: var(--fs-xs); line-height: 1.4; font-variant-numeric: tabular-nums;
}
a.cb-week-cell:hover { background: var(--cb-current); color: var(--cb-on-current); }
.cb-week-cell.is-empty { color: var(--cb-muted); background: transparent; border: 1px dashed var(--cb-line); }
.cb-week-date { font-size: 18px; font-weight: 800; color: var(--cb-ink); }
.cb-week-cell.is-empty .cb-week-date { color: var(--cb-muted); font-weight: 600; }
.cb-week-cell.is-today, a.cb-week-cell.is-today:hover { background: var(--cb-brand); color: var(--cb-on-brand); font-weight: 700; border: 0; }
.cb-week-cell.is-today .cb-week-date { color: var(--cb-on-brand); }
.cb-week-cell:not(.is-empty):not(.is-today) .cb-week-count { color: var(--cb-open-bg); font-weight: 800; }

.cb-next-dday { margin: 0; font-size: 52px; font-weight: 800; line-height: 1; letter-spacing: -0.035em; color: var(--cb-ink); font-variant-numeric: tabular-nums; }
.cb-next-label { margin: 8px 0 0; font-weight: 800; color: var(--cb-ink); }
.cb-next-date { margin: 0; font-size: 14px; color: var(--cb-muted); }
.cb-next-status { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; font-size: 13px; color: var(--cb-muted); }
.cb-tel { display: inline-flex; align-items: center; min-height: 40px; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.cb-box p.is-missing { margin: 0; color: var(--cb-muted); }
.cb-help { margin: 0; padding-left: 1.2em; font-size: 14px; }
.cb-help li { margin-bottom: 6px; }
.cb-related-main { display: none; }

/* ---------- 과거 분양가 비교 ---------- */

.cb-compare { list-style: none; margin: 0; padding: 0; }
.cb-compare-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 8px 28px; align-items: center;
  padding: 16px 0; border-bottom: 1px solid var(--cb-line);
}
.cb-compare-row:last-child { border-bottom: 0; }
.cb-main .cb-compare-text, .cb-main .cb-compare-text p { margin: 0; }
.cb-main .cb-compare-text .cb-compare-nums { margin-top: 4px; font-size: var(--fs-sm); color: var(--cb-muted); font-variant-numeric: tabular-nums; }
.cb-compare-label { color: var(--cb-ink); }
.cb-strip { position: relative; height: 40px; }
.cb-strip::before { content: ""; position: absolute; left: 0; right: 0; top: 19px; height: 2px; border-radius: 1px; background: var(--cb-line); }
.cb-strip-range { position: absolute; top: 12px; height: 16px; min-width: 6px; border-radius: 8px; background: var(--cb-line-strong); opacity: 0.35; }
.cb-strip-median { position: absolute; top: 6px; width: 2px; height: 28px; margin-left: -1px; background: var(--cb-ink); }
.cb-strip-dot {
  position: absolute; top: 10px; width: 20px; height: 20px; margin-left: -10px;
  border-radius: 50%; background: var(--cb-c-self); box-shadow: 0 0 0 3px var(--cb-surface), 0 0 0 5px color-mix(in srgb, var(--cb-c-self) 30%, transparent);
}
.cb-main .cb-strip-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 10px 0 0; max-width: none; font-size: 13px; color: var(--cb-muted); }
.cb-strip-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.cb-strip-key { display: inline-block; flex: none; }
.cb-strip-key--dot { width: 10px; height: 10px; border-radius: 50%; background: var(--cb-c-self); }
.cb-strip-key--median { width: 2px; height: 14px; background: var(--cb-ink); }
.cb-strip-key--range { width: 20px; height: 10px; border-radius: 5px; background: var(--cb-line-strong); opacity: 0.35; }

.cb-price-flow thead th { white-space: normal; text-align: right; }
.cb-price-flow thead th:first-child { text-align: left; }
.cb-price-flow tbody th { white-space: nowrap; }

/* ---------- 주간 일정·구독 ---------- */

.cb-main .cb-weeknav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin: 24px 0 32px; max-width: none; }
.cb-weeknav-range { margin-left: 6px; font-size: 14px; font-weight: 400; color: var(--cb-muted); }
.cb-btn:hover .cb-weeknav-range { color: inherit; }
.cb-section.cb-weekday { margin-top: 40px; }
.cb-weekday h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cb-weekday + .cb-weeknav { margin-top: 32px; }
.cb-weeklist { padding: 0; }
.cb-weeklist .cb-today-mark { margin-right: 2px; }

.cb-subscribe p { font-size: 14px; line-height: 1.6; }
.cb-main > .cb-subscribe { margin-top: 48px; }
.cb-sub-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 4px; }
.cb-subscribe .cb-copy-status { margin: 8px 0 0; color: var(--cb-ink); font-weight: 700; }
.cb-subscribe .cb-copy-status:empty { margin: 0; }
.cb-subscribe .cb-copy-field { margin: 8px 0 0; }
.cb-copy-field label { display: block; margin: 0 0 4px; font-size: 13px; color: var(--cb-muted); }
.cb-copy-field input {
  width: 100%; height: 40px; padding: 0 10px;
  border: 1px solid var(--cb-line-strong); border-radius: var(--cb-radius-sm);
  background: var(--cb-surface-muted); color: var(--cb-ink); font: inherit; font-size: 14px;
}

/* ---------- 달력 ---------- */

.cb-cal-controls { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; }
.cb-main .cb-cal-current { min-width: 140px; margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: var(--cb-ink); text-align: center; font-variant-numeric: tabular-nums; }
html.js .cb-month > h2 {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.cb-month > h2 { padding-top: 12px; border-top: 2px solid var(--cb-brand); }
.cb-month + .cb-month { margin-top: 48px; }
.cb-cal-legend { margin: 0 0 12px; font-size: 13px; color: var(--cb-muted); }
.cb-cal-legend dl { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0; }
.cb-cal-legend dl > div { display: inline-flex; gap: 4px; }
.cb-cal-legend dl > div + div::before { content: "·"; margin: 0 8px; }
.cb-cal-legend dt { font-weight: 800; color: var(--cb-brand); }
.cb-cal-legend dd { margin: 0; }
html.js .cb-month { margin-top: 0; }
/* app.js가 cb-ready를 붙이기 전(첫 그리기)에도 JS 적용 뒤와 같은 배치를 낸다 */
html.js:not(.cb-ready) .cb-month:not(.is-initial) { display: none; }
html.js:not(.cb-ready) .cb-cal-controls[hidden] { display: flex !important; }
html.js:not(.cb-ready) .cb-filters[hidden] { display: grid !important; }
.cb-main .cb-cal-jump { margin: -4px 0 12px; font-size: 14px; }
.cb-cal-jump a { display: inline-flex; align-items: center; min-height: 40px; font-weight: 700; }
.cb-cal-grid { margin: 0 0 24px; overflow: hidden; border: 1px solid var(--cb-line); border-radius: var(--cb-radius); background: var(--cb-surface); }
.cb-calendar { width: 100%; table-layout: fixed; border-collapse: collapse; border-style: hidden; }
.cb-calendar th { padding: 8px; border: 1px solid var(--cb-line); border-bottom-color: var(--cb-line-strong); color: var(--cb-muted); font-size: 12px; font-weight: 800; text-align: left; }
.cb-calendar td { height: 140px; padding: 6px 8px; border: 1px solid var(--cb-line); vertical-align: top; }
.cb-calendar td.is-blank { background: var(--cb-surface-muted); }
.cb-calendar td.has-entries { cursor: pointer; }
.cb-calendar td.has-entries:hover { background: var(--cb-surface-muted); }
.cb-cal-day {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 28px; height: 28px; margin: 0 0 2px; padding: 0 4px;
  color: var(--cb-ink); font-size: 14px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums;
  text-decoration: none;
}
.cb-main p.cb-cal-day { margin: 0 0 2px; color: var(--cb-muted); font-weight: 600; }
a.cb-cal-day { border: 1px solid var(--cb-brand); border-radius: 6px; color: var(--cb-brand); }
a.cb-cal-day:hover { background: var(--cb-brand); color: var(--cb-on-brand); }
.cb-calendar td.is-today .cb-cal-day { background: var(--cb-brand); border-color: var(--cb-brand); color: var(--cb-on-brand); }
.cb-cal-entry, .cb-cal-more {
  display: block; min-height: 26px; padding: 2px 0; line-height: 1.4;
  overflow: hidden; text-overflow: ellipsis;
  font-size: 12px; color: var(--cb-text); text-decoration: none;
}
.cb-cal-entry { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow-wrap: anywhere; }
.cb-cal-more { white-space: nowrap; }
.cb-cal-entry:hover, .cb-cal-more:hover { color: var(--cb-ink); text-decoration: underline; }
.cb-cal-kind { margin-right: 4px; font-weight: 800; color: var(--cb-brand); }
.cb-cal-more { color: var(--cb-link); font-weight: 800; text-decoration: underline; }

.cb-daylist { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--cb-brand); }
.cb-daylist-day { padding: 14px 0; border-bottom: 1px solid var(--cb-line); }
.cb-daylist-day h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 16px; }
.cb-daylist-day ul { list-style: none; margin: 0; padding: 0; }
.cb-daylist-day li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; overflow-wrap: anywhere; }
.cb-daylist-day li a { display: inline-block; padding: 6px 0; }
.cb-daylist-kind { min-width: 96px; font-size: 13px; font-weight: 800; color: var(--cb-ink); }
.cb-daylist-day.is-today, .cb-daylist-day:target { margin: 0 -16px; padding-left: 16px; padding-right: 16px; background: var(--cb-surface-muted); }
.cb-today-mark { padding: 1px 8px; border-radius: 999px; background: var(--cb-brand); color: var(--cb-on-brand); font-size: 12px; font-weight: 800; letter-spacing: 0; }

/* 달력 날짜 팝업 */
.cb-dialog {
  position: fixed; inset: 0; z-index: 50;
  display: flex; flex-direction: column;
  width: min(680px, calc(100vw - 32px)); height: fit-content; max-height: min(82vh, 760px); margin: auto;
  background: var(--cb-surface); color: var(--cb-text);
  border: 1px solid var(--cb-line-strong); border-radius: var(--cb-radius);
  box-shadow: 0 8px 32px rgba(16, 11, 20, 0.25);
}
.cb-dialog-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 18px 20px 14px; border-bottom: 1px solid var(--cb-line);
}
.cb-dialog-head h2 { margin: 0; font-size: 22px; }
.cb-dialog-head p { margin: 2px 0 0; font-size: 13px; color: var(--cb-muted); }
.cb-dialog-body { overflow-y: auto; overscroll-behavior: contain; padding: 0 20px 20px; }
.cb-dialog-group { margin-top: 18px; }
.cb-dialog-group h3 {
  display: flex; justify-content: space-between; gap: 8px;
  margin: 0; padding-bottom: 6px; border-bottom: 1px solid var(--cb-line-strong);
  font-size: 13px; font-weight: 800; letter-spacing: 0.04em;
}
.cb-dialog-group h3 span { color: var(--cb-muted); font-variant-numeric: tabular-nums; }
.cb-dialog-list { list-style: none; margin: 0; padding: 0; }
.cb-dialog-list li {
  display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 12px; align-items: baseline;
  padding: 8px 0; border-bottom: 1px solid var(--cb-line);
}
.cb-dialog-list .cb-dialog-tags { display: flex; gap: 4px; grid-row: 1 / span 2; }
.cb-dialog-list a { font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.cb-dialog-list a:hover { text-decoration: underline; }
.cb-dialog-list .cb-dialog-meta { grid-column: 2; font-size: 13px; color: var(--cb-muted); }

/* ---------- 그림 공통: 회색 단계와 무늬 ---------- */

.cb-fill-1 { fill: var(--cb-c1); }
.cb-fill-2 { fill: url(#cb-pat-hatch); }
.cb-fill-3 { fill: var(--cb-c3); }
.cb-fill-4 { fill: url(#cb-pat-dots); }
.cb-fill-self { fill: var(--cb-c-self); }
.cb-fill-open { fill: var(--cb-open-bg); }
.cb-fill-upcoming { fill: url(#cb-pat-up); }
.cb-fill-muted { fill: var(--cb-c-muted); }
.cb-fill-done { fill: var(--cb-line-strong); }
.cb-fill-gap { fill: var(--cb-bg); }
.cb-ring { stroke: var(--cb-bg); stroke-width: 2; }
.cb-outline { stroke: var(--cb-up-fg); stroke-width: 1.2; }
.cb-grid-line { stroke: var(--cb-line); stroke-width: 1; shape-rendering: crispEdges; }
.cb-series-line { stroke: var(--cb-c1); stroke-width: 2; stroke-linecap: round; }
.cb-dot { fill: var(--cb-c1); stroke: var(--cb-bg); stroke-width: 2; }
.cb-dot.is-hollow { fill: var(--cb-bg); stroke: var(--cb-c1); }
.cb-today-line { stroke: var(--cb-brand); stroke-width: 2; }
.cb-axis-text { fill: var(--cb-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.cb-value-text { fill: var(--cb-text); font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.cb-today-text { fill: var(--cb-brand); font-size: 12px; font-weight: 800; }
.cb-plot-svg, .cb-tl-svg, .cb-hbar-svg, .cb-wb-svg { display: block; overflow: visible; }
.cb-wipe { display: none; }

.cb-chart { margin: 0 0 20px; min-width: 0; }
.cb-main .cb-chart-cap { margin: 0 0 10px; max-width: none; font-size: 13px; font-weight: 800; letter-spacing: 0.02em; color: var(--cb-ink); }
.cb-main .cb-chart-unit { margin: 4px 0 0; font-size: 12px; color: var(--cb-muted); }
.cb-main .cb-chart-empty { margin: 0 0 16px; padding: 12px 16px; max-width: none; border: 1px dashed var(--cb-line-strong); color: var(--cb-muted); font-size: 14px; }
.cb-chart-pair { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px 32px; margin: 0 0 var(--sp-5); }
.cb-chart-pair--even { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 28px; }
.cb-chart-pair > .cb-chart { margin: 0; padding: 0; }

.cb-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; list-style: none; margin: 0 0 10px; padding: 0; font-size: 13px; color: var(--cb-muted); }
.cb-legend li { display: inline-flex; align-items: center; gap: 6px; }
.cb-key { display: block; flex: none; width: 12px; height: 12px; }
.cb-key .cb-geo-q0, .cb-key .cb-geo-base { stroke: var(--cb-line-strong); stroke-width: 1; }
.cb-key .cb-fill-upcoming { stroke: var(--cb-up-fg); stroke-width: 1; }
.cb-key .cb-geo-none { stroke: var(--cb-line-strong); stroke-width: 1; stroke-dasharray: 2 1.5; }
.cb-key--line { width: 2px; height: 14px; background: var(--cb-brand); }
.cb-key--dot { width: 10px; height: 10px; border-radius: 50%; background: var(--cb-c1); }
.cb-key--dot.is-hollow { background: var(--cb-bg); border: 2px solid var(--cb-c1); }

.cb-plot { display: grid; grid-template-columns: max-content minmax(0, 1fr); column-gap: 8px; }
.cb-yaxis { position: relative; min-width: 36px; height: 150px; font-size: 12px; color: var(--cb-muted); text-align: right; font-variant-numeric: tabular-nums; }
.cb-yaxis span { position: absolute; right: 0; transform: translateY(-50%); line-height: 1; }
.cb-plot-area { position: relative; min-width: 0; }

/* 가로 막대 목록 */
.cb-hbars {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) max-content; column-gap: 14px;
  list-style: none; margin: 0; padding: 0;
}
.cb-hbar {
  display: grid; grid-column: 1 / -1; grid-template-columns: subgrid;
  align-items: center; row-gap: 4px; padding: 7px 0; border-top: 1px solid var(--cb-line);
  font-size: 14px; line-height: 1.4;
}
.cb-hbar:first-child { border-top: 0; }
.cb-hbar-label { min-width: 0; color: var(--cb-text); overflow-wrap: anywhere; }
.cb-hbar-sub { display: block; font-size: var(--fs-xs); color: var(--cb-muted); font-variant-numeric: tabular-nums; }
.cb-hbar-value { color: var(--cb-ink); font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cb-hbar.is-self { margin: 0 -12px; padding-left: 12px; padding-right: 12px; border-radius: 10px; background: var(--cb-current); border-top-color: transparent; }
.cb-hbar.is-self + .cb-hbar { border-top-color: transparent; }
.cb-hbar.is-self .cb-hbar-label { color: var(--cb-on-current); font-weight: 800; }
.cb-hbar.is-self .cb-hbar-value { font-size: var(--fs-lg); }
.cb-hbars--peers { padding: 4px 0; }
.cb-hbars--compact, .cb-hbars--supply { grid-template-columns: max-content minmax(0, 1fr) max-content; }
.cb-hbars--compact .cb-hbar { padding: 3px 0; border-top: 0; }
.cb-hbars--supply .cb-hbar { padding: 5px 0; }
.cb-hbars--supply .cb-hbar-label { font-weight: 700; color: var(--cb-ink); }
.cb-hbars--supply .cb-hbar-value { font-weight: 700; font-size: var(--fs-sm); }
.cb-supply { margin: 0 0 var(--sp-3); padding: 0; }
.cb-median-line { stroke: var(--cb-ink); stroke-width: 1.5; stroke-dasharray: 3 3; }
.cb-key--median { width: 0; height: 14px; border-left: 2px dashed var(--cb-ink); }
.cb-area { position: absolute; left: 0; right: 0; top: 0; background: var(--cb-c1); opacity: 0.12; pointer-events: none; }

/* 일정 타임라인(HTML 막대): 접수·발표·계약 색 계열, 지남·진행 중·예정은 채움 모양으로 구분 */
.cb-tl2 { --lab: 150px; --ph1: var(--cb-open-bg); --ph2: var(--cb-ph2); --ph3: var(--cb-brand); margin: 0 0 var(--sp-3); }
.cb-tl2-plot { position: relative; padding: 4px 0 0; }
.cb-tl2-head { height: 30px; }
.cb-tl2-rows { position: relative; list-style: none; margin: 0; padding: 0; }
.cb-tl2-axis { position: relative; height: 24px; margin-top: 2px; }
.cb-tl2-grid { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--cb-line); }
.cb-tl2-row { position: relative; display: grid; grid-template-columns: var(--lab) minmax(0, 1fr); align-items: center; height: 38px; border-top: 1px solid var(--cb-line); }
.cb-tl2-row:first-of-type { border-top: 0; }
.cb-tl2-name { padding-right: 10px; font-size: var(--fs-sm); font-weight: 600; color: var(--cb-text); line-height: 1.3; }
.cb-tl2-track { position: relative; height: 100%; min-width: 0; }
.cb-ph1 { --ph: var(--ph1); } .cb-ph2 { --ph: var(--ph2); } .cb-ph3 { --ph: var(--ph3); }
.cb-tl2-bar, .cb-tl2-dot { position: absolute; top: 50%; background: var(--ph); border: 2px solid var(--ph); }
.cb-tl2-bar { height: 16px; min-width: 14px; margin-top: -8px; border-radius: 8px; }
.cb-tl2-dot { width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; }
[data-state="done"] > .cb-tl2-track > :is(.cb-tl2-bar, .cb-tl2-dot) { opacity: 0.45; }
[data-state="upcoming"] > .cb-tl2-track > :is(.cb-tl2-bar, .cb-tl2-dot) {
  background: repeating-linear-gradient(-45deg, transparent 0 4px, color-mix(in srgb, var(--ph) 28%, transparent) 4px 6px);
}
[data-state="open"] > .cb-tl2-track > :is(.cb-tl2-bar, .cb-tl2-dot) { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ph) 25%, transparent); }
[data-state="open"] > .cb-tl2-name { color: var(--cb-ink); font-weight: 800; }
.cb-tl2-date { position: absolute; top: 50%; transform: translateY(-50%); font-size: var(--fs-xs); font-weight: 700; color: var(--cb-text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cb-tl2-now { position: absolute; top: 24px; bottom: 26px; width: 0; border-left: 2px dashed var(--cb-brand); z-index: 1; pointer-events: none; }
.cb-tl2-flag {
  position: absolute; top: 2px; transform: translateX(-50%); z-index: 2;
  padding: 2px 10px; border-radius: 999px; background: var(--cb-brand); color: var(--cb-on-brand);
  font-size: var(--fs-xs); font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.cb-tl2-flag.is-start { transform: translateX(-12px); }
.cb-tl2-flag.is-end { transform: translateX(calc(-100% + 12px)); }
.cb-tl2-tick { position: absolute; top: 4px; transform: translateX(-50%); font-size: var(--fs-xs); color: var(--cb-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cb-tl2-tick.is-start { transform: none; margin-left: -6px; }
.cb-tl2-tick.is-end { transform: translateX(-100%); margin-left: 6px; }
.cb-tl2 .cb-legend { margin: 8px 0 0; }
.cb-tl2-key { display: block; width: 18px; height: 10px; border-radius: 5px; background: var(--ph, var(--cb-line-strong)); }
.cb-tl2-key.cb-ph1 { --ph: var(--ph1); } .cb-tl2-key.cb-ph2 { --ph: var(--ph2); } .cb-tl2-key.cb-ph3 { --ph: var(--ph3); }
.cb-tl2-key--done { background: var(--cb-brand); opacity: 0.45; }
.cb-tl2-key--now { background: var(--cb-brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--cb-brand) 25%, transparent); }
.cb-tl2-key--up { background: repeating-linear-gradient(-45deg, transparent 0 3px, color-mix(in srgb, var(--cb-brand) 40%, transparent) 3px 5px); border: 1.5px solid var(--cb-brand); }
.cb-tl2-out { color: var(--cb-brand); font-weight: 700; }
.cb-schedule th[scope="row"] { width: 40%; }

/* 경계 지도 */
.cb-mapbox { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 16px 32px; align-items: start; padding: 4px 0 0; }
.cb-mapbox-side { padding-top: 4px; }
.cb-mapbox-side .cb-legend { margin-bottom: 12px; }
.cb-mapbox-side .cb-summary { margin: 12px 0 0; }
.cb-main .cb-mapbox-side .cb-note { margin: 0; }
.cb-map-list { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--cb-line); max-width: 420px; }
.cb-section--map .cb-table-wrap, .cb-geo-more { margin-top: 16px; }
.cb-geo-figure { margin: 0; min-width: 0; }
.cb-geo { display: block; width: 100%; height: auto; margin: 0 auto 8px; }
.cb-geo path { stroke: var(--cb-bg); stroke-width: 0.75px; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.cb-geo .cb-geo-line { fill: none; stroke: var(--cb-text); stroke-width: 1px; pointer-events: none; }
.cb-geo a { cursor: pointer; }
.cb-geo path[data-tip]:hover, .cb-geo a:hover path, .cb-geo a.is-hot path, .cb-geo path.is-hot { stroke: var(--cb-ink); stroke-width: 2.5px; }
.cb-geo-q0, .cb-geo-base, .cb-geo-zoom { fill: var(--cb-q0); }
.cb-geo .cb-geo-q0, .cb-geo .cb-geo-base { stroke: var(--cb-bg); }
.cb-geo .cb-geo-zoom { stroke: var(--cb-brand); stroke-width: 1px; }
.cb-geo-q1 { fill: var(--cb-q1); }
.cb-geo-q2 { fill: var(--cb-q2); }
.cb-geo-q3 { fill: var(--cb-q3); }
.cb-geo-q4 { fill: var(--cb-q4); }
.cb-geo-p1 { fill: var(--cb-p1); }
.cb-geo-p2 { fill: var(--cb-p2); }
.cb-geo-p3 { fill: var(--cb-p3); }
.cb-geo-p4 { fill: var(--cb-p4); }
.cb-geo-none { fill: var(--cb-bg); }
.cb-geo .cb-geo-none { stroke: var(--cb-line-strong); stroke-dasharray: 3 2; }
.cb-geo-hatch { fill: url(#cb-hatch); }
.cb-hatch-bg { fill: var(--cb-surface-muted); }
.cb-hatch-line { stroke: var(--cb-line-strong); stroke-width: 1.4; }
.cb-geo-hi { fill: var(--cb-c-self); }
.cb-geo-inset { fill: none; stroke: var(--cb-line-strong); stroke-width: 1px; vector-effect: non-scaling-stroke; }
.cb-geo-inset-label { fill: var(--cb-muted); text-anchor: middle; }
.cb-geo-label {
  fill: var(--cb-ink); font-weight: 700; text-anchor: middle; dominant-baseline: central; pointer-events: none;
  paint-order: stroke; stroke: var(--cb-bg); stroke-width: 3px; stroke-linejoin: round;
}
.cb-geo-s1 { fill: var(--cb-c1); }
.cb-geo-s2 { fill: var(--cb-c2); }
.cb-geo-s3 { fill: var(--cb-c3); }
.cb-geo .cb-geo-s1, .cb-geo .cb-geo-s2, .cb-geo .cb-geo-s3 { stroke: var(--cb-bg); stroke-width: 1px; vector-effect: non-scaling-stroke; }
.cb-geo-key { flex: none; display: block; overflow: visible; }
.cb-geo-small .cb-geo { max-width: 360px; }
.cb-geo-more summary { cursor: pointer; padding: 6px 0; font-weight: 800; color: var(--cb-link); }
.cb-geo-more .cb-namelist { margin-top: 8px; }
.cb-geo--zoom { max-width: 520px; }
.cb-geo-zoombox { margin: 0 0 32px; padding: 12px 0 0; border-top: 1px solid var(--cb-line); }
.cb-geo-zoomgrid { display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 1fr); gap: 16px 32px; align-items: start; }
.cb-geo-zoomgrid p { margin: 0 0 12px; }
.cb-geo-tablewrap { width: min(100%, 600px); }
.cb-table.cb-geo-table thead th { white-space: normal; }
.cb-geo-table th, .cb-geo-table td { padding-top: 6px; padding-bottom: 6px; }

/* 진행 중 공고가 없을 때 홈 지도는 작게 */
.cb-section--compact .cb-mapbox { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); }
.cb-section--compact .cb-geo--national { max-width: 300px; }

/* 주간 요일별 막대 */
.cb-weekchart { margin: 0 0 8px; padding: 12px 0 8px; border-top: 1px solid var(--cb-line); border-bottom: 1px solid var(--cb-line); }
.cb-stats + .cb-weekchart { margin-top: -20px; padding-top: 0; border-top: 0; }
.cb-weekbars { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; list-style: none; margin: 0; padding: 0; }
.cb-wb {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 6px 2px; color: var(--cb-text); text-decoration: none;
  font-size: 13px; line-height: 1.3; font-variant-numeric: tabular-nums;
}
a.cb-wb:hover { background: var(--cb-surface-muted); color: var(--cb-ink); }
.cb-wb.is-empty { color: var(--cb-muted); }
.cb-wb-svg { border-bottom: 1px solid var(--cb-line-strong); }
.cb-wb-total { font-weight: 800; color: var(--cb-ink); }
.cb-wb.is-empty .cb-wb-total { color: var(--cb-muted); font-weight: 400; }
.cb-weekbars .is-today .cb-wb-day { padding: 0 6px; border-radius: 6px; background: var(--cb-brand); color: var(--cb-on-brand); font-weight: 800; }
.cb-weekday-count { font-size: 14px; font-weight: 700; color: var(--cb-muted); }
.cb-main .cb-idle-days { margin: 32px 0 0; padding: 10px 16px; max-width: none; border: 1px dashed var(--cb-line-strong); color: var(--cb-muted); font-size: 14px; }

/* 회사 모음 */
.cb-company-filter { margin: 0 0 24px; max-width: 480px; }
.cb-company-filter label { display: block; margin: 0 0 6px; font-weight: 800; color: var(--cb-ink); }
.cb-company-filter input { width: 100%; }
.cb-main .cb-company-filter .cb-result-count { margin: 6px 0 0; }
.cb-company-card .cb-row-title { margin-top: 0; }
.cb-namelist { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 12px 0; border-top: 1px solid var(--cb-line); }
.cb-namelist li { padding: 2px 8px; border: 1px solid var(--cb-line); border-radius: 2px; font-size: 14px; color: var(--cb-text); }
.cb-facts dd a { font-weight: 700; }

/* 공고 주소 주변 지도와 시설 거리: JS가 있을 때만 보이고, 단추를 누르기 전에는 외부 요청이 없다 */
.cb-nearby { margin-top: 0; }
html.js .cb-nearby[hidden] { display: block !important; }
.cb-nearby h3, .cb-loc-area h3 { margin: 0 0 12px; font-size: var(--fs-lg); font-weight: 800; letter-spacing: -0.01em; }
.cb-loc-area { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--cb-line); }
.cb-nearby-box { display: flex; flex-direction: column; padding: 0; }
.cb-nearby-box > * { margin: 0; }
.cb-main .cb-nearby-box > p { max-width: none; }

/* 지도 틀: 높이는 서버 HTML 값으로 고정한다(누르기 전과 뒤가 같다). 카카오 로고는 왼쪽 아래라 가리지 않는다 */
.cb-map-frame {
  position: relative; height: 480px; overflow: hidden;
  border: 1px solid var(--cb-line); border-radius: var(--cb-radius-sm);
  background-color: var(--cb-surface-muted);
  background-image: linear-gradient(var(--cb-line) 1px, transparent 1px), linear-gradient(90deg, var(--cb-line) 1px, transparent 1px);
  background-size: 32px 32px;
}
.cb-map-frame.is-map { background: var(--cb-surface-muted); }
.cb-map-skel { position: absolute; inset: 0; pointer-events: none; }
.cb-map-skel .cb-geo { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; max-width: none; opacity: 1 !important; }
.cb-map-skel .cb-geo path { fill: var(--cb-surface); stroke: var(--cb-line); stroke-width: 2px; }
.cb-map-frame.is-map .cb-map-skel { display: none; }
.cb-map-fallback { display: none; position: absolute; inset: 0; pointer-events: none; }
.cb-nearby.is-lost .cb-map-fallback { display: block; }
.cb-nearby.is-lost .cb-map-skel { display: none; }
.cb-map-fallback .cb-geo { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; margin: 0; opacity: 1 !important; }
.cb-lost-list { display: none; }
.cb-lost-body { padding: 14px 4px 8px; font-size: var(--fs-sm); }
.cb-lost-body > * { margin: 0 0 10px; }
.cb-lost-title { font-size: var(--fs-md); font-weight: 800; color: var(--cb-ink); }
.cb-ml-skel { display: grid; gap: 14px; padding: 18px 4px; }
.cb-ml-skel i { display: block; height: 14px; border-radius: 7px; background: var(--cb-surface-muted); }
.cb-ml-skel i:nth-child(2n) { width: 78%; }
.cb-ml-skel i:nth-child(3n) { width: 60%; }
.cb-map-idle, .cb-map-lost {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 24px; text-align: center;
}
.cb-map-idle > *, .cb-map-lost > * { margin: 0; }
.cb-map-idle, .cb-map-lost { justify-content: flex-end; padding-bottom: 16px; pointer-events: none; }
.cb-map-lost, .cb-map-idle .cb-nearby-act { pointer-events: auto; }
.cb-map-idle > *, .cb-map-lost > * { padding: 6px 12px; border-radius: 10px; background: color-mix(in srgb, var(--cb-surface) 92%, transparent); }
.cb-main .cb-map-idle p, .cb-main .cb-map-lost p { max-width: 46ch; }
.cb-nearby-intro { font-size: var(--fs-sm); color: var(--cb-text); }
.cb-nearby-privacy { max-width: 56ch; }
.cb-map-canvas { position: absolute; inset: 0; }
.cb-nearby-status { margin-top: 12px; min-height: 0; font-size: 14px; line-height: 1.65; font-weight: 700; color: var(--cb-ink); }
.cb-nearby-status:empty { display: none; }
.cb-nearby.is-started .cb-nearby-status { min-height: calc(2 * 1.65 * 14px); }
.cb-nearby-privacy { font-size: 13px; }

/* 지도 옆 번호 목록: 지도 틀과 같은 높이로 고정하고 안에서 스크롤한다 */
.cb-map-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; align-items: start; }
.cb-lm-list {
  height: 480px; overflow-y: auto; overscroll-behavior: contain;
  padding: 0 12px 8px; border: 1px solid var(--cb-line); border-radius: var(--cb-radius-sm); background: var(--cb-surface);
}
.cb-ml-group { margin: 0; }
.cb-ml-head {
  position: sticky; top: 0; z-index: 1;
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  margin: 0; padding: 10px 0 6px; background: var(--cb-surface);
  border-bottom: 2px solid var(--cb-brand); font-size: 14px; font-weight: 800;
}
.cb-ml-count { font-size: 12px; font-weight: 700; color: var(--cb-muted); font-variant-numeric: tabular-nums; }
.cb-ml-list, .cb-ml-rest { list-style: none; margin: 0; padding: 0; }
.cb-ml-item {
  display: flex; align-items: center; gap: 8px; min-height: 40px;
  border-bottom: 1px solid var(--cb-line); font-size: 14px;
}
.cb-ml-item.is-hot { background: var(--cb-current); }
.cb-ml-plain { padding-left: 32px; }
.cb-ml-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-ml-dist { flex: none; font-weight: 700; font-variant-numeric: tabular-nums; }
.cb-main .cb-ml-empty { margin: 0; padding: 8px 0; font-size: 14px; color: var(--cb-muted); }

/* 번호 표지: 지도와 목록에서 같은 모양. 지도 그림은 어두운 화면에서도 밝은 기본 지도라 표지 색은 화면 색 토큰을 따르지 않는다.
   초등학교는 청록 원, 중학교는 주황 둥근 사각, 고등학교는 보라 마름모, 지하철역은 남색 둥근 사각, 생활 시설은 검정 원 */
.cb-mk {
  display: inline-flex; flex: none; align-items: center; justify-content: center;
  width: 24px; height: 24px; color: #ffffff; font-size: 12px; font-weight: 800; line-height: 1;
  border: 2px solid #ffffff; box-shadow: 0 0 0 1px rgba(16, 11, 20, 0.35); font-variant-numeric: tabular-nums;
}
.cb-mk i { font-style: normal; }
.cb-mk-s1 { border-radius: 50%; background: #0b8f80; }
.cb-mk-s2 { border-radius: 5px; background: #c2541f; }
.cb-mk-s3 { border-radius: 3px; background: #5a54c4; transform: rotate(45deg); }
.cb-mk-s3 i { transform: rotate(-45deg); }
.cb-mk-sw { border-radius: 8px; background: #2f4468; }
.cb-mk-fac { border-radius: 50%; background: #100b14; }
.cb-mk-wrap.is-hot { z-index: 20; }
.cb-mk-wrap.is-hot .cb-mk, .cb-ml-item.is-hot .cb-mk { outline: 3px solid #1b78e2; outline-offset: 1px; }
.cb-mk-wrap.is-hot .cb-mk:not(.cb-mk-s3), .cb-ml-item.is-hot .cb-mk:not(.cb-mk-s3) { transform: scale(1.25); }
.cb-mk-wrap.is-hot .cb-mk-s3, .cb-ml-item.is-hot .cb-mk-s3 { transform: rotate(45deg) scale(1.25); }
.cb-mk-pin { position: relative; display: flex; align-items: center; justify-content: center; }
.cb-mk-star {
  display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%;
  background: #2f4468; color: #ffffff; border: 2px solid #ffffff; box-shadow: 0 0 0 1px #2f4468; font-size: 22px; line-height: 1;
}
.cb-mk-pin.is-rough .cb-mk-star { background: #ffffff; color: #2f4468; border: 3px solid #2f4468; box-shadow: none; }
.cb-mk-pin-label {
  position: absolute; top: 100%; left: 50%; margin-top: 3px; transform: translateX(-50%);
  padding: 2px 8px; border-radius: 6px; background: #2f4468; color: #ffffff; font-size: 12px; font-weight: 800; white-space: nowrap;
}
.cb-map-meta { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 16px; min-height: 52px; margin-top: 10px; }
.cb-map-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; list-style: none; margin: 0; padding: 0; font-size: 13px; color: var(--cb-muted); }
.cb-map-legend li { display: inline-flex; align-items: center; gap: 6px; }
.cb-map-legend .cb-mk { width: 16px; height: 16px; border-width: 1px; font-size: 0; }
.cb-mk-star-key { font-size: 18px; line-height: 1; color: var(--cb-brand); }
.cb-key--ring { width: 14px; height: 14px; border: 2px dashed var(--cb-brand); border-radius: 50%; background: transparent; }
.cb-map-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0; font-size: 14px; }
.cb-map-big { display: inline-flex; align-items: center; min-height: 40px; font-weight: 700; }
.cb-map-more { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 48px; margin-top: 8px; }
.cb-map-more:not(.is-ready) { visibility: hidden; }
.cb-map-more-title { font-size: 14px; font-weight: 800; color: var(--cb-ink); }
.cb-more-btn[aria-busy="true"] { opacity: 0.6; cursor: progress; }

/* 거리 표 */
.cb-fac { margin-top: 16px; }
.cb-fac-table { table-layout: fixed; }
.cb-fac-table thead th:nth-child(1) { width: 17%; }
.cb-fac-table thead th:nth-child(3) { width: 16%; text-align: right; }
.cb-fac-table thead th:nth-child(4), .cb-fac-table thead th:nth-child(5) { width: 13%; text-align: right; }
.cb-fac-table tbody tr { height: 68px; }
.cb-fac-table tbody th, .cb-fac-table tbody td { vertical-align: middle; }
.cb-fac-table tbody th { font-size: 14px; }
.cb-fac-table td.cb-num { white-space: nowrap; font-weight: 700; color: var(--cb-ink); }
.cb-fac-table td.cb-fac-name { padding-right: 12px; }
.cb-fac-first, .cb-fac-sub { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; height: 24px; line-height: 24px; }
.cb-fac-first { font-weight: 700; color: var(--cb-ink); }
.cb-fac-sub { font-size: 12.5px; color: var(--cb-muted); }
.cb-fac-more summary { display: inline-block; cursor: pointer; font-size: 13px; font-weight: 700; color: var(--cb-link); }
.cb-fac-more[open] { overflow: visible; }
.cb-fac-list { margin: 4px 0 0; padding-left: 1.2em; font-size: 13px; white-space: normal; line-height: 1.5; }
.cb-fac-sub:has(.cb-fac-more[open]) { height: auto; overflow: visible; white-space: normal; }
.cb-fac[aria-busy="true"] .cb-fac-table td { position: relative; color: transparent; }
.cb-fac[aria-busy="true"] .cb-fac-table td::before {
  content: ""; position: absolute; left: 0; right: 12px; top: 50%; height: 14px; margin-top: -7px;
  border-radius: 7px; background: var(--cb-surface-muted);
}
.cb-fac[aria-busy="true"] .cb-fac-table td.cb-num::before { left: auto; width: 56px; right: 0; }

.cb-nearby-disclaimer { margin-top: 16px; }
.cb-nearby-more { margin-top: 8px; font-size: 14px; }
.cb-nearby-more a { display: inline-flex; align-items: center; min-height: 40px; font-weight: 700; }
.cb-nearby-extra summary { display: flex; align-items: center; min-height: 40px; cursor: pointer; font-size: 14px; font-weight: 700; color: var(--cb-link); }
.cb-nearby-extra[open] summary { border-bottom: 1px solid var(--cb-line); }
@media (max-width: 767px) {
  .cb-nearby-box { padding: 12px; }
  .cb-map-frame { height: 300px; }
  .cb-map-grid { grid-template-columns: minmax(0, 1fr); }
  .cb-lm-list { height: 320px; }
  .cb-map-meta { min-height: 96px; }
  .cb-map-more { min-height: 96px; }
  .cb-nearby.is-started .cb-nearby-status { min-height: calc(4 * 1.65 * 14px); }
  .cb-fac-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .cb-fac-table, .cb-fac-table tbody { display: block; }
  .cb-fac-table tbody tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); height: auto; padding: 8px 0; border-bottom: 1px solid var(--cb-line); }
  .cb-fac-table tbody th, .cb-fac-table tbody td { display: block; padding: 0 8px 0 0; border: 0; text-align: left; }
  .cb-fac-table tbody th { grid-column: 1 / -1; height: 26px; line-height: 26px; }
  .cb-fac-table td.cb-fac-name { grid-column: 1 / -1; height: 52px; }
  .cb-fac-table td.cb-num { min-height: 44px; font-size: 14px; text-align: left; }
  .cb-fac-table td.cb-num::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 600; color: var(--cb-muted); }
}
@media (prefers-reduced-motion: no-preference) {
  .cb-mk { transition: transform var(--cb-hover-out-dur) var(--cb-ease); }
  .cb-mk-wrap.is-hot .cb-mk, .cb-ml-item.is-hot .cb-mk { transition-duration: var(--cb-hover-in-dur); }
  .cb-map-canvas:not([hidden]) { animation: cb-fade-in var(--cb-fade-dur) ease-in-out backwards; }
}

/* ---------- 움직임: transform·opacity만, 움직임 줄이기면 모두 끈다 ---------- */

@keyframes cb-rise { from { opacity: 0; transform: translateY(var(--cb-rise-dist)); } }
@keyframes cb-fade-in { from { opacity: 0; } }
@keyframes cb-fade-out { to { opacity: 0; } }
@keyframes cb-drawer-in { from { transform: translateX(-100%); } }
@keyframes cb-drawer-out { to { transform: translateX(-100%); } }
@keyframes cb-dialog-in { from { opacity: 0; transform: scale(var(--cb-scale)); } }
@keyframes cb-dialog-out { to { opacity: 0; transform: scale(var(--cb-scale)); } }

@media (prefers-reduced-motion: no-preference) {
  html.cb-motion :is(.cb-reveal, .cb-rows > .cb-row, .cb-aside > .cb-box):not(.is-in) { opacity: 0; }
  html.cb-motion :is(.cb-reveal, .cb-rows > .cb-row, .cb-aside > .cb-box).is-in {
    animation: cb-rise var(--cb-rise-dur) var(--cb-ease) backwards;
    animation-delay: calc(var(--cb-i, 0) * var(--cb-stagger));
  }

  html.cb-motion .cb-bar, html.cb-motion .cb-col, html.cb-motion .cb-pop {
    transform-box: fill-box;
    transition: transform var(--cb-grow-dur) var(--cb-ease) calc(var(--cb-i, 0) * var(--cb-stagger));
  }
  html.cb-motion .cb-bar { transform-origin: 0 50%; }
  html.cb-motion .cb-col { transform-origin: 50% 100%; }
  html.cb-motion .cb-pop { transform-origin: 50% 50%; }
  html.cb-motion svg:not(.is-in) .cb-bar { transform: scaleX(0); }
  html.cb-motion svg:not(.is-in) .cb-col { transform: scaleY(0); }
  html.cb-motion svg:not(.is-in) .cb-pop { transform: scale(0); }
  html.cb-motion .cb-wipe {
    display: inline; fill: var(--cb-bg);
    transform-box: fill-box; transform-origin: 100% 50%;
    transition: transform var(--cb-draw-dur) var(--cb-ease-in-out);
  }
  html.cb-motion svg.is-in .cb-wipe { transform: scaleX(0); }
  html.cb-motion .cb-tl2-bar, html.cb-motion .cb-tl2-dot { transition: transform var(--cb-grow-dur) var(--cb-ease); transform-origin: 0 50%; }
  html.cb-motion .cb-tl2-dot { transform-origin: 50% 50%; }
  html.cb-motion .cb-tl2:not(.is-in) .cb-tl2-bar { transform: scaleX(0); }
  html.cb-motion .cb-tl2:not(.is-in) .cb-tl2-dot { transform: scale(0); }
  html.cb-motion .cb-strip-range { transform-origin: 0 50%; transition: transform var(--cb-grow-dur) var(--cb-ease); }
  html.cb-motion .cb-strip-dot, html.cb-motion .cb-strip-median { transition: opacity var(--cb-fade-dur) ease-out 200ms; }
  html.cb-motion .cb-strip:not(.is-in) .cb-strip-range { transform: scaleX(0); }
  html.cb-motion .cb-strip:not(.is-in) :is(.cb-strip-dot, .cb-strip-median) { opacity: 0; }
  html.cb-motion .cb-geo { transition: opacity var(--cb-fade-dur) ease-out; }
  html.cb-motion .cb-geo:not(.is-in) { opacity: 0.12; }

  .cb-row { transition: transform var(--cb-hover-out-dur) var(--cb-ease); }
  @media (hover: hover) {
    .cb-row:hover { transform: translateY(-3px); border-color: var(--cb-line-strong); box-shadow: var(--cb-shadow-hover); transition-duration: var(--cb-hover-in-dur); }
  }
}

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

@media print {
  html.cb-motion :is(.cb-reveal, .cb-rows > .cb-row, .cb-aside > .cb-box, .cb-geo) { opacity: 1 !important; animation: none !important; }
  html.cb-motion svg :is(.cb-bar, .cb-col, .cb-pop) { transform: none !important; }
  .cb-wipe { display: none !important; }
}

/* ---------- 화면 폭 ---------- */

@media (min-width: 1340px) {
  .cb-box--sticky { position: sticky; top: 16px; z-index: 1; }
  .cb-narrow-only { display: none; }
  .cb-keybox { display: none; }
  .cb-related-aside { display: block; }
}

@media (max-width: 1339px) {
  .cb-shell, .cb-shell--noaside { grid-template-columns: 216px minmax(0, 1fr); }
  .cb-main { padding: 28px 28px 40px 32px; }
  .cb-aside {
    grid-column: 2; grid-row: 2;
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: var(--sp-4);
    padding: 0 28px 72px 32px;
  }
  .cb-related-aside, .cb-wide-only { display: none; }
  .cb-related-main { display: block; }
  .cb-footer { padding-left: 32px; }
  .cb-masthead h1 { font-size: 36px; }
}

@media (max-width: 1023px) {
  .cb-topbar {
    display: flex; align-items: center; gap: 4px;
    min-height: 56px; padding: 8px 8px 8px 16px;
    border-bottom: 1px solid var(--cb-line);
    background: var(--cb-surface);
  }
  .cb-topbar .cb-brand { flex: 1; min-width: 0; font-size: 16px; }
  .cb-icon-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 4px;
    min-width: 44px; height: 44px; padding: 0 10px;
    border: 1px solid transparent; border-radius: var(--cb-radius-sm);
    background: transparent; color: var(--cb-ink);
    font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
  }
  .cb-icon-btn:hover { border-color: var(--cb-brand); }
  html:not(.js) .cb-menu-btn { display: none; }

  .cb-shell, .cb-shell--noaside { display: flex; flex-direction: column; }
  .cb-main, .cb-shell--noaside .cb-main { padding: 28px 16px 40px; }
  .cb-aside { display: flex; flex-direction: column; align-items: stretch; gap: var(--sp-4); padding: 0 16px 40px; }
  .cb-nav { order: 3; position: static; height: auto; border-right: 0; border-top: 1px solid var(--cb-line); }
  html.js .cb-nav {
    display: none; order: 0;
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 40;
    width: min(320px, 86vw); height: 100%;
    border-top: 0; border-right: 1px solid var(--cb-line-strong);
  }
  html.js .cb-nav.is-open, html.js .cb-nav.is-closing { display: block; }
  html.js .cb-nav.is-closing { pointer-events: none; }
  html.js .cb-nav-close {
    display: flex; align-items: center; gap: 4px;
    width: fit-content; min-height: 40px; margin: 0 0 8px auto; padding: 0 12px;
    border: 1px solid var(--cb-line-strong); border-radius: var(--cb-radius-sm);
    background: transparent; color: var(--cb-ink); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
  }
  body.cb-drawer-open { overflow: hidden; }
  .cb-footer { order: 4; padding: 24px 16px 32px; }

  h1 { font-size: 28px; }
  .cb-masthead h1 { font-size: 34px; }
  .cb-hero { padding: 10px 18px 18px; }
  .cb-hero h1 { font-size: 26px; }
  .cb-cal-grid, .cb-cal-legend { display: none; }
  .cb-keybox { padding: 14px 16px; }
  .cb-section { margin-top: 48px; }
}

@media (max-width: 1023px) and (prefers-reduced-motion: no-preference) {
  html.js .cb-nav.is-open { animation: cb-drawer-in var(--cb-panel-open-dur) var(--cb-ease) backwards; }
  html.js .cb-nav.is-closing { animation: cb-drawer-out var(--cb-panel-close-dur) var(--cb-ease) forwards; }
  .cb-backdrop[data-drawer-backdrop]:not([hidden]) { animation-duration: var(--cb-panel-open-dur); }
  .cb-backdrop[data-drawer-backdrop].is-closing { animation-duration: var(--cb-panel-close-dur); }
}

@media (prefers-reduced-motion: no-preference) {
  .cb-backdrop:not([hidden]), .cb-dialog:not([hidden]) { animation: cb-fade-in var(--cb-open-dur) var(--cb-ease) backwards; }
  .cb-dialog:not([hidden]) { animation-name: cb-dialog-in; }
  .cb-backdrop.is-closing { animation: cb-fade-out var(--cb-close-dur) var(--cb-ease) forwards; }
  .cb-dialog.is-closing { animation: cb-dialog-out var(--cb-close-dur) var(--cb-ease) forwards; pointer-events: none; }
}

@media (max-width: 767px) {
  .cb-ad { height: 100px; }
  .cb-ad--side { height: 250px; }
  .cb-main .cb-lead { font-size: 15px; }
  .cb-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cb-stat { padding: 12px 14px 12px; }
  .cb-stat-num { font-size: 30px; }
  .cb-stats--home .cb-stat-num { font-size: 36px; }
  .cb-pills { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 4px; padding: 2px 16px 6px; scrollbar-width: none; }
  .cb-pill { flex: none; }
  .cb-facts > div:first-child { grid-column: auto; }
  .cb-tl2 { --lab: 104px; }
  .cb-tl2-name { font-size: var(--fs-xs); }
  .cb-main:has(> .cb-hero) .cb-section { padding: 16px 16px 18px; }
  .cb-facts, .cb-flags { grid-template-columns: minmax(0, 1fr); }
  .cb-filter-group { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .cb-chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 6px; scrollbar-width: thin; }
  .cb-filter { flex: none; }
  .cb-main .cb-filter-title { margin: 0; }
  .cb-table th, .cb-table td { padding: 8px 8px 8px 0; font-size: 14px; }
  .cb-table thead th { white-space: normal; font-size: 12px; }
  .cb-models tbody th, .cb-special tbody th, .cb-models tfoot th, .cb-special tfoot th,
  .cb-price-flow tbody th { position: sticky; left: 0; z-index: 1; background: var(--cb-bg); }
  .cb-compare-row { grid-template-columns: minmax(0, 1fr); padding: 12px 0; }
  .cb-chart-pair, .cb-chart-pair--even, .cb-mapbox { grid-template-columns: minmax(0, 1fr); }
  .cb-geo-labels { display: none; }
  .cb-geo-zoomgrid { grid-template-columns: minmax(0, 1fr); }
  .cb-geo--national { max-width: 320px; }
  .cb-hbars--peers { grid-template-columns: minmax(0, 1fr) max-content; }
  .cb-hbars--peers .cb-hbar-svg { grid-column: 1 / -1; grid-row: 2; }
  .cb-hbar.is-self { margin: 0 -8px; padding-left: 8px; padding-right: 8px; }
  .cb-map-list { display: none; }
  .cb-pin { align-items: flex-start; }
  .cb-checks { padding-left: 2em; }
  .cb-daylist-day.is-today, .cb-daylist-day:target { margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
  .cb-section { margin-top: 44px; }
}

@media (max-width: 480px) {
  .cb-main .cb-weeknav { flex-wrap: nowrap; }
  .cb-weeknav .cb-btn { flex: 1 1 0; flex-direction: column; gap: 0; padding: 6px 8px; }
  .cb-weeknav-range { margin-left: 0; font-size: 13px; }
  .cb-models th, .cb-models td, .cb-special th, .cb-special td { padding: 8px 6px; font-size: 13px; }
  .cb-models th:first-child, .cb-models td:first-child, .cb-special th:first-child { padding-left: 0; }
}

/* 블로그 글 카드 */
.cb-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 14px; list-style: none; margin: 0; padding: 0; }
.cb-post {
  position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  border: 1px solid var(--cb-line); border-radius: var(--cb-radius); background: var(--cb-surface); box-shadow: var(--cb-shadow);
}
.cb-post:hover { border-color: var(--cb-line-strong); box-shadow: var(--cb-shadow-hover); }
.cb-post:focus-within { border-color: var(--cb-focus); }
.cb-post-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; background: var(--cb-t-contract); }
.cb-post-date { font-size: var(--fs-xs); font-weight: 700; color: var(--cb-muted); font-variant-numeric: tabular-nums; }
.cb-post-title { flex: 1; margin: 0; padding: 14px 14px 6px; font-size: var(--fs-lg); line-height: 1.45; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.cb-post-title a { color: var(--cb-ink); text-decoration: none; }
.cb-post-title a::after { content: ""; position: absolute; inset: 0; }
.cb-post-title a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.cb-main .cb-post-more { display: flex; align-items: center; gap: 2px; margin: 0; padding: 0 14px 14px; font-size: var(--fs-xs); font-weight: 700; color: var(--cb-link); }
.cb-blog-filters { margin-top: var(--sp-5); }
.cb-filter .cb-pill-n { margin-left: 8px; }
.cb-filter[aria-pressed="true"] .cb-pill-n { background: rgba(255, 255, 255, 0.22); color: inherit; }
html.js:not(.cb-ready) .cb-blog-filters[hidden] { display: grid !important; }

/* 지도 값 말풍선(app.js initGeoTips): 마우스를 올리거나 표의 같은 칸 링크에 초점이 가면 보인다 */
.cb-tip {
  position: fixed; z-index: 45; max-width: 260px; padding: 6px 10px; border-radius: 8px; pointer-events: none;
  background: var(--cb-ink); color: var(--cb-bg); font-size: var(--fs-sm); font-weight: 700; line-height: 1.4;
  transform: translate(-50%, calc(-100% - 10px)); white-space: nowrap;
}

/* ---------- B단계: 나머지 화면 ---------- */

/* 마감 임박: 같은 마감일을 D-day 한 번으로 묶는다 */
.cb-closing-group + .cb-closing-group { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--cb-line); }
.cb-closing-day { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: var(--fs-sm); font-weight: 700; color: var(--cb-text); }
.cb-mini--plain li { padding: 0; border-top: 0; }
.cb-mini--plain li > a { padding: 8px 0 0; }
.cb-mini--plain .cb-mini-meta { padding-bottom: 6px; border-bottom: 1px solid var(--cb-line); }
.cb-mini--plain li:last-child .cb-mini-meta { border-bottom: 0; }
.cb-box .cb-fold { margin-top: 4px; }

/* 홈 알약: 왼쪽 메뉴가 보이는 폭(1024px 이상)에서는 지역 알약을 메뉴에 맡기고 본문은 상태만 */
@media (min-width: 1024px) { .cb-pillbar-regions { display: none; } }

/* 제목 바로 아래 첫 절 */
.cb-main > h1 + .cb-section, .cb-main > .cb-titlebar + .cb-section { margin-top: var(--sp-5); }
.cb-geo-zoomgrid p { font-size: var(--fs-md); }
.cb-geo-zoomgrid .cb-note, .cb-geo-zoomgrid p.cb-note { font-size: var(--fs-xs); }

/* 달력: 종류마다 색 글자, 오늘 칸 연한 바탕 */
.cb-cal-kind { margin-right: 4px; font-weight: 800; color: var(--cb-brand); }
.cb-cal-entry[data-k="접수"] .cb-cal-kind, .cb-cal-entry[data-k="시작"] .cb-cal-kind { color: var(--cb-open-bg); }
.cb-cal-entry[data-k="발표"] .cb-cal-kind { color: var(--cb-ph2); }
.cb-calendar td.is-today { background: var(--cb-t-contract); }
.cb-calendar th { background: var(--cb-surface-muted); }
.cb-calendar th:first-child, .cb-calendar th:last-child { color: var(--cb-muted); }
.cb-cal-controls .cb-btn { border-radius: 999px; }
.cb-main .cb-cal-current { font-size: var(--fs-xl); }

/* 주소를 못 찾았을 때: 안내는 지도 아래쪽 얇은 띠, 생활 시설 줄은 안내 문구로 채워 높이를 그대로 둔다(레이아웃 이동 없음) */
.cb-nearby.is-lost .cb-map-lost { inset: auto 0 0 0; flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 4px 12px; padding: 8px 12px; background: color-mix(in srgb, var(--cb-surface) 94%, transparent); border-top: 1px solid var(--cb-line); font-size: var(--fs-sm); }
.cb-nearby.is-lost .cb-map-lost > * { padding: 0; background: transparent; }
.cb-nearby.is-lost .cb-map-lost .cb-btn { min-height: 32px; padding: 2px 12px; font-size: var(--fs-sm); }
/* 주소를 못 찾으면 번호 지도용 줄(범례·생활 시설 단추)은 접는다. 이 변화는 화면 아래쪽(자동 불러오기가 시작되는 거리)에서 일어난다 */
.cb-nearby.is-lost .cb-map-more { display: none; }
.cb-nearby.is-lost .cb-map-meta { min-height: 0; margin-top: 0; }
.cb-nearby.is-lost .cb-map-lost > p:first-child { display: none; }
.cb-nearby.is-lost .cb-map-lost .cb-btn { min-height: 0; padding: 0; border: 0; background: transparent; color: var(--cb-link); font-size: var(--fs-sm); text-decoration: underline; text-underline-offset: 3px; }
.cb-nearby.is-lost .cb-lm-list { border-color: transparent; background: transparent; padding: 0; overflow: visible; }
.cb-pillbar > *, .cb-pillbar-regions { min-width: 0; }

.cb-404-code { margin: 24px 0 0; font-size: 96px; font-weight: 900; line-height: 1; letter-spacing: -0.05em; color: var(--cb-line-strong); opacity: 0.45; }
.cb-main .cb-intro { font-size: var(--fs-lg); color: var(--cb-muted); }

/* 날짜별 목록(달력 390px·날짜 팝업): 종류는 연한 알약, 제목은 굵은 글자 */
.cb-daylist { border-top: 0; display: grid; gap: var(--sp-3); }
.cb-daylist-day { padding: 14px 16px; border: 1px solid var(--cb-line); border-radius: var(--cb-radius); background: var(--cb-surface); box-shadow: var(--cb-shadow); }
.cb-daylist-day.is-today, .cb-daylist-day:target { margin: 0; background: var(--cb-t-contract); border-color: transparent; }
.cb-daylist-day h3 { font-size: var(--fs-lg); }
.cb-daylist-kind { flex: none; min-width: 0; padding: 1px 8px; border-radius: 999px; background: var(--cb-surface-muted); font-size: var(--fs-xs); font-weight: 800; color: var(--cb-brand); }
.cb-daylist-day li a { font-weight: 700; text-decoration: none; color: var(--cb-ink); }
.cb-daylist-day li a:hover { text-decoration: underline; }
.cb-dialog { box-shadow: var(--cb-shadow-hover); }
.cb-dialog-list .cb-tag { background: var(--cb-surface-muted); }

.cb-pills > li { flex: none; }
.cb-pills .cb-filter { white-space: nowrap; }

.cb-nav-count--plain { background: var(--cb-surface-muted); color: var(--cb-muted); }
.cb-nav-link[aria-current="page"] .cb-nav-count--plain { background: var(--cb-surface); color: var(--cb-on-current); }
.cb-pill[aria-current="page"] { background: var(--cb-brand); border-color: var(--cb-brand); color: var(--cb-on-brand); font-weight: 800; }
.cb-pill[aria-current="page"] .cb-pill-n { background: rgba(255, 255, 255, 0.22); color: inherit; }
.cb-blog-filters { margin-top: var(--sp-5); }
button, input, select, textarea { font-family: inherit; }
