/* 서울 상권 폐업 조기경보 — KRDS(범정부 UI/UX 디자인 시스템) 정석형 기반, 초록 주조색
   원칙: 조회 조건 → 조회 결과 순서, 표 중심, 1px 테두리와 넓은 여백으로 구획(색 띠·그라데이션·과한 그림자 없음).
   토큰 → 기본 → 레이아웃 → 컴포넌트 → 화면 → 모션 → 반응형 순서. 아이콘은 assets/icons.svg(Tabler Icons, MIT). */

/* ---------- 1. 토큰 ---------- */
:root {
  color-scheme: light;
  --font: "Pretendard GOV Variable", "Pretendard GOV", "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;

  /* 주조색: 초록 */
  --g-5: #f2f8f4; --g-20: #c6e4d1; --g-30: #95cda9; --g-50: #1f9a54; --g-60: #00843d; --g-70: #006c32;
  /* 보조색: 노랑(포인트만) */
  --y-5: #fff8e1; --y-30: #f1dc8b; --y-50: #f2b705; --y-70: #8a6a00;
  /* 상태색 */
  --red-5: #fff1f1; --red-30: #f7b8bb; --red-50: #e5484d; --red-60: #cc2f3a;
  --org-5: #fff6ec; --org-30: #f8d39b; --org-50: #f5a524;
  --river: #cfe5f6; --map-calm: #d7dbdf;
  /* 무채색 */
  --n-0: #ffffff; --n-5: #f7f8f9; --n-10: #f1f3f5; --n-20: #e6e8eb; --n-30: #d3d7dc; --n-40: #b4bac1; --n-50: #8a939c; --n-55: #666f79; --n-60: #5f6872; --n-70: #474f58; --n-80: #33393f; --n-90: #1c2025;

  /* 의미 토큰 */
  --bg: #f4f6f5; --surface: var(--n-0); --line: var(--n-20); --line-strong: var(--n-30);
  --text: var(--n-90); --text-2: var(--n-70); --text-3: var(--n-60); --text-4: var(--n-55);
  --primary: var(--g-60);
  --alert: var(--red-50); --watch: var(--org-50); --calm: var(--n-30);
  /* 글자용 상태색(흰·밝은 바탕에서 WCAG 대비 확보) */
  --alert-text: var(--red-60); --watch-text: #8f5300;
  --zone-a: var(--y-50); --zone-b: var(--red-50); --zone-c: var(--g-50); --zone-d: var(--n-40);

  /* 간격(8px 격자) · 모서리 · 그림자(떠 있는 요소만) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-12: 48px;
  --r-s: 4px; --r-m: 6px; --r-l: 8px;
  --sh-pop: 0 4px 16px rgba(20, 28, 24, .14);
  --sh-drawer: 0 0 48px rgba(20, 28, 24, .18);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --container: 1320px;
}

/* ---------- 2. 기본 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); line-height: 1.6; letter-spacing: -.005em; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p, dl, dd { margin: 0; }
ol, ul { margin: 0; padding: 0; list-style: none; }
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--primary); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--g-30); outline-offset: 2px; }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--text-3); }
.tiny { font-size: .8125rem; }
.strong { font-weight: 700; }

/* ---------- 3. 레이아웃 ---------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--s-8); }
.gnb { position: sticky; top: 0; z-index: 30; background: var(--n-0); border-bottom: 1px solid var(--line); }
.gnb .container { display: flex; align-items: center; gap: var(--s-8); height: 64px; }
.brand { display: flex; align-items: center; gap: var(--s-3); white-space: nowrap; text-decoration: none; color: var(--text); }
.brand .logo { display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r-m); background: var(--primary); color: #fff; }
.brand .logo .ic { width: 20px; height: 20px; vertical-align: 0; }
.brand h1 { font-size: 1.125rem; font-weight: 700; letter-spacing: -.02em; }
.nav { display: flex; height: 100%; }
.nav button { position: relative; border: 0; background: none; padding: 0 var(--s-4); font-size: 1rem; font-weight: 600; color: var(--text-2); height: 100%; transition: color .2s; }
.nav button:hover { color: var(--text); }
.nav button[aria-current="page"] { color: var(--primary); font-weight: 700; }
.nav button::after { content: ""; position: absolute; left: var(--s-4); right: var(--s-4); bottom: -1px; height: 3px; background: var(--primary); transform: scaleX(0); transition: transform .3s var(--ease); }
.nav button[aria-current="page"]::after { transform: scaleX(1); }

main { padding: var(--s-6) 0 var(--s-12); }
.view { display: none; }
.view.on { display: block; animation: fade .35s var(--ease) both; }
.view > * + * { margin-top: var(--s-4); }
.view > .page-head + * { margin-top: var(--s-6); }

.page-head .bc { display: flex; align-items: center; gap: var(--s-2); font-size: .8125rem; color: var(--text-3); flex-wrap: wrap; }
.page-head .bc .ic { width: 16px; height: 16px; vertical-align: 0; }
.page-head .bc .sep { color: var(--n-40); }
.page-head .bc button { border: 0; background: none; padding: 0; color: var(--text-3); font-size: inherit; }
.page-head .bc button:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.page-head h2 { font-size: 1.75rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.3; margin-top: var(--s-2); }
.page-head > p { color: var(--text-3); margin-top: var(--s-1); }
.title-row { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; margin-top: var(--s-2); }
.title-row h2 { margin-top: 0; }
.qchip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line-strong); border-radius: var(--r-s); font-size: .875rem; font-weight: 600; color: var(--text-2); background: var(--surface); }
.qchip .ic { width: 16px; height: 16px; color: var(--text-3); vertical-align: 0; }

/* ---------- 4. 컴포넌트 ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3) var(--s-4); padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--line); flex-wrap: wrap; min-height: 60px; }
.panel-h h3 { display: flex; align-items: center; gap: var(--s-2); font-size: 1.0625rem; font-weight: 700; letter-spacing: -.02em; }
.panel-h h3 .ic { width: 20px; height: 20px; color: var(--g-60); vertical-align: 0; }
.search { width: min(280px, 100%); height: 38px; padding: 0 var(--s-3); border: 1px solid var(--line-strong); border-radius: var(--r-m); background: var(--surface); }
.search:focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }
.more-sentinel { height: 1px; }
.panel-h h3 small { font-size: .875rem; font-weight: 500; color: var(--text-3); margin-left: var(--s-1); }
.panel-b { padding: var(--s-5); }
.desc { font-size: .875rem; color: var(--text-3); margin-bottom: var(--s-4); }
.desc.pad { padding: var(--s-4) var(--s-5) 0; margin: 0; }
.desc.pad + .panel-b { padding-top: var(--s-3); }
.desc.fnote, .fnote { margin: var(--s-4) 0 0; }
.notice { display: flex; align-items: flex-start; gap: var(--s-2); font-size: .9375rem; color: var(--text-2); }
.notice .ic { color: var(--text-3); margin-top: 3px; vertical-align: 0; }
.notice.row { align-items: center; padding: var(--s-4) var(--s-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); flex-wrap: wrap; }
.notice.row .ic { margin-top: 0; }
.notice.row .btn { margin-left: auto; }

/* 조회 조건 */
.filters { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-l); overflow: hidden; }
.f-row { display: grid; grid-template-columns: 148px minmax(0, 1fr); }
.f-row + .f-row { border-top: 1px solid var(--line); }
.f-l { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-3) var(--s-5); background: var(--n-5); border-right: 1px solid var(--line); font-size: .9375rem; font-weight: 700; color: var(--text); }
.f-l .ic { color: var(--text-3); vertical-align: 0; }
.f-o { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); padding: var(--s-3) var(--s-4); }
.opt { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 7px 14px; border: 1px solid var(--line-strong); border-radius: var(--r-m); background: var(--surface); font-size: .9375rem; font-weight: 500; color: var(--text-2); white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.opt:hover:not(:disabled) { border-color: var(--n-60); color: var(--text); }
.opt[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }
.opt:disabled { background: var(--n-5); color: var(--text-4); cursor: not-allowed; }
.opt .ic { vertical-align: 0; }
.opt .cnt { font-size: .8125rem; color: var(--text-4); }
.opt .cnt:empty { display: none; }
.opt[aria-pressed="true"] .cnt { color: #fff; }
.opt .tag { margin-left: 2px; }
.qyears { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-6); }
.qyear { display: inline-flex; align-items: center; gap: 6px; }
.qyear .y { font-size: .875rem; font-weight: 700; color: var(--text-3); margin-right: var(--s-1); }
.opt .new { font-size: .75rem; font-weight: 700; padding: 0 5px; border-radius: var(--r-s); background: var(--y-50); color: var(--n-90); }

/* 조회 결과 머리 */

/* 요약 수치 띠 */
.stat-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); }
.stat { padding: var(--s-5) var(--s-6); min-width: 0; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat .l { display: flex; align-items: center; gap: 6px; font-size: .9375rem; font-weight: 600; color: var(--text-2); }
.stat .l .ic { color: var(--text-3); vertical-align: 0; }
.stat.alert .l .ic { color: var(--alert-text); } .stat.watch .l .ic { color: var(--watch-text); }
.stat .v { font-size: 2rem; font-weight: 700; line-height: 1.25; margin-top: var(--s-2); letter-spacing: -.03em; }
.stat .v small { font-size: 1rem; font-weight: 600; color: var(--text-3); margin-left: 3px; }
.stat.alert .v { color: var(--alert-text); } .stat.watch .v { color: var(--watch-text); }
.stat .d { font-size: .8125rem; color: var(--text-3); margin-top: var(--s-1); }
.stat .d b { color: var(--text); }
.stat-strip.report { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.tag { display: inline-flex; align-items: center; gap: 4px; font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: var(--r-s); border: 1px solid transparent; white-space: nowrap; line-height: 1.4; }
.tag.big { font-size: 1.125rem; padding: 2px 12px; }
.tag.alert { color: var(--red-60); background: var(--red-5); border-color: var(--red-30); }
.tag.watch { color: var(--watch-text); background: var(--org-5); border-color: var(--org-30); }
.tag.calm { color: var(--text-3); background: var(--n-10); border-color: var(--n-20); }
.tag.zone-a { color: var(--y-70); background: var(--y-5); border-color: var(--y-30); }
.tag.zone-b { color: var(--red-60); background: var(--red-5); border-color: var(--red-30); }
.tag.zone-c { color: var(--g-70); background: var(--g-5); border-color: var(--g-20); }
.tag.zone-d { color: var(--text-3); background: var(--n-10); border-color: var(--n-20); }
.sq { display: inline-block; width: 10px; height: 10px; border-radius: 2px; flex: none; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: var(--r-m); padding: 9px 16px; font-size: .9375rem; font-weight: 600; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); transition: background .15s, border-color .15s; white-space: nowrap; }
.btn:hover { background: var(--n-5); border-color: var(--n-60); }
.btn .ic { vertical-align: 0; }
.btn.sm { padding: 6px 12px; font-size: .875rem; }
.btn.sm .ic { width: 16px; height: 16px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* 표 */
.table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.table th { text-align: left; font-weight: 600; font-size: .8125rem; color: var(--text-2); background: var(--n-5); padding: 10px 12px; border-top: 1px solid var(--n-80); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table .r { text-align: right; }
.table .c { text-align: center; }
.table tbody tr { transition: background .12s; }
.table tbody tr.click { cursor: pointer; }
.table tbody tr.click:hover, .table tbody tr.click:focus-visible { background: var(--g-5); outline: none; }
.table tbody tr.cur { background: var(--g-5); }
.table .name { display: block; font-weight: 600; color: var(--text); }
.table .sub { display: block; font-size: .8125rem; color: var(--text-3); }
.nm { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.tw { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.empty { color: var(--text-3); font-size: .9375rem; padding: var(--s-4) 0; }

/* 점수 막대 */
.meter { position: relative; display: block; height: 6px; border-radius: 2px; background: var(--n-10); overflow: hidden; min-width: 56px; }
.meter i { position: absolute; inset: 0 auto 0 0; background: var(--alert); width: 0; transition: width .8s var(--ease); }
.meter.watch i { background: var(--watch); } .meter.calm i { background: var(--n-40); } .meter.green i { background: var(--g-50); }
.score-cell { display: flex; align-items: center; gap: var(--s-3); }
.score-cell .num { width: 28px; text-align: right; font-weight: 700; flex: none; }
.score-cell .meter { flex: 1; }

.legend { display: flex; gap: var(--s-4); flex-wrap: wrap; font-size: .8125rem; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

.skel { background: linear-gradient(90deg, var(--n-10) 25%, var(--n-5) 45%, var(--n-10) 65%); background-size: 300% 100%; animation: shimmer 1.2s linear infinite; border-radius: var(--r-l); }

/* ---------- 5. 화면: 상권 현황 ---------- */
.grid-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-4); align-items: stretch; }
.map-card { display: flex; flex-direction: column; padding: var(--s-5); }
.map-wrap { position: relative; flex: 1; display: flex; align-items: center; }
.map-legend { align-self: flex-end; display: flex; gap: var(--s-4); margin-top: var(--s-3); padding: var(--s-3) var(--s-4); border: 1px solid var(--line); border-radius: var(--r-m); font-size: .8125rem; color: var(--text-2); }
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.rank-card { display: flex; flex-direction: column; padding: var(--s-5); }
.rank-card .rank-title { display: flex; align-items: center; gap: var(--s-2); font-size: 1.0625rem; font-weight: 700; letter-spacing: -.02em; margin-bottom: var(--s-3); }
.rank-card .rank-title .ic { width: 20px; height: 20px; color: var(--g-60); vertical-align: 0; }
.rank-card .tw { flex: 1; }
.rank-card .more { align-self: stretch; margin-top: var(--s-4); }
svg.map { width: 100%; height: auto; display: block; overflow: visible; }
.gu path { fill: var(--calm); stroke: #fff; stroke-width: 1.6; stroke-linejoin: round; cursor: pointer; transition: fill .4s var(--ease), filter .2s; }
.gu path.alert { fill: var(--alert); } .gu path.watch { fill: var(--watch); } .gu path.calm { fill: var(--map-calm); }
.gu path:hover, .gu path:focus-visible { filter: brightness(.94); outline: none; }
.river { fill: none; stroke: var(--river); stroke-width: 13; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.gu-label { font-size: 16px; font-weight: 600; fill: var(--n-80); pointer-events: none; text-anchor: middle; transition: fill .3s; }
.gu-label.on-color { fill: #fff; }
.gu-score { font-size: 21px; font-weight: 700; fill: #fff; text-anchor: middle; pointer-events: none; }
.map-tip { position: absolute; pointer-events: none; z-index: 5; background: var(--n-90); color: #fff; border-radius: var(--r-m); padding: 10px 12px; font-size: .8125rem; line-height: 1.5; box-shadow: var(--sh-pop); opacity: 0; transform: translate(-50%, calc(-100% - 10px)); transition: opacity .12s; white-space: nowrap; }
.map-tip.on { opacity: 1; }
.map-tip b { font-size: .9375rem; }
.table.rank td:nth-child(3) { width: 34%; }

.gcmp { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); }
.gc { border: 1px solid var(--line); border-radius: var(--r-l); padding: var(--s-4) var(--s-5); display: grid; gap: var(--s-4); }
.gch { display: flex; align-items: center; justify-content: space-between; }
.gch .tag { font-size: .875rem; padding: 3px 10px; }
.gch .num { font-size: .875rem; color: var(--text-3); }
.pair .pl { font-size: .8125rem; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.pair .pb { display: grid; grid-template-columns: 72px minmax(0, 1fr) 56px; align-items: center; gap: var(--s-2); }
.pair .pk { font-size: .8125rem; color: var(--text-2); }
.pair .pb + .pb { margin-top: 4px; }
.pair .pb b { text-align: right; font-size: 1rem; font-weight: 700; }
.pair .bar { position: relative; display: block; height: 14px; border-radius: 2px; background: var(--n-10); overflow: hidden; }
.pair .bar i { position: absolute; inset: 0 auto 0 0; width: 0; transition: width .9s var(--ease); }
.gc.alert .bar.pred i { background: var(--red-30); } .gc.alert .bar.act i { background: var(--red-60); }
.gc.watch .bar.pred i { background: var(--org-30); } .gc.watch .bar.act i { background: var(--org-50); }
.gc.calm .bar.pred i { background: var(--n-30); } .gc.calm .bar.act i { background: var(--n-60); }

.grid-support { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr); gap: var(--s-4); align-items: start; }
.mx { position: relative; }
.mx svg { width: 100%; height: auto; display: block; }
.mx .q-title { font-size: 16px; font-weight: 700; }
.mx .q-sub { font-size: 12.5px; fill: var(--text-3); }
.mx circle.pt { transition: cx .7s var(--ease), cy .7s var(--ease), r .2s, opacity .4s; cursor: pointer; }
.mx circle.pt:hover { r: 6.5; opacity: 1 !important; }
.mx .q-title, .mx .q-sub { paint-order: stroke; stroke: rgba(255, 255, 255, .85); stroke-width: 5px; stroke-linejoin: round; pointer-events: none; }
.mx .axis { font-size: 12.5px; fill: var(--text-3); }
.zlist { border-top: 1px solid var(--n-80); }
.zrow { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 18px; align-items: center; gap: var(--s-3); width: 100%; padding: var(--s-4) var(--s-1); border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; transition: background .12s; }
.zrow:hover { background: var(--n-5); }
.zrow b { display: block; font-size: .9375rem; }
.zrow small { display: block; font-size: .8125rem; color: var(--text-3); line-height: 1.5; }
.zrow .cnt { font-weight: 700; }
.zrow .go { color: var(--text-4); }


/* ---------- 6. 드로어(상권 목록) ---------- */
.scrim { position: fixed; inset: 0; background: rgba(15, 20, 18, .32); z-index: 40; opacity: 0; pointer-events: none; transition: opacity .25s; }
.scrim.on { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(600px, 100vw); z-index: 41; background: var(--surface); box-shadow: var(--sh-drawer); transform: translateX(104%); transition: transform .35s var(--ease); display: flex; flex-direction: column; }
.drawer.on { transform: none; }
.drawer .dh { padding: var(--s-5) var(--s-6); border-bottom: 1px solid var(--line); }
.drawer .dh .top { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s-4); }
.drawer .dk { font-size: .8125rem; color: var(--text-3); }
.drawer .dh h3 { display: flex; align-items: center; gap: var(--s-2); font-size: 1.375rem; font-weight: 700; letter-spacing: -.02em; }
.drawer .dh h3 .tag { font-size: .8125rem; }
.drawer .close { display: grid; place-items: center; border: 1px solid var(--line); background: var(--surface); width: 36px; height: 36px; border-radius: var(--r-m); }
.drawer .close:hover { background: var(--n-5); }
.drawer .close .ic { width: 20px; height: 20px; vertical-align: 0; }
.dstats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-2); margin-top: var(--s-4); }
.dstats div { background: var(--n-5); border-radius: var(--r-m); padding: var(--s-3) var(--s-4); }
.dstats dt { font-size: .75rem; color: var(--text-3); }
.dstats dd { font-size: 1.25rem; font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dstats dd small { font-size: .8125rem; font-weight: 500; color: var(--text-3); }
.drawer .db { overflow-y: auto; overscroll-behavior: contain; padding: var(--s-4) var(--s-6) var(--s-8); flex: 1; }
.table.dlist td:nth-child(3) { width: 30%; }

/* ---------- 7. 화면: 우선순위 ---------- */
.zone-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-3); }
.zone-tab { display: block; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-l); padding: var(--s-4) var(--s-5); transition: border-color .15s, background .15s; }
.zone-tab:hover { border-color: var(--n-50); }
.zone-tab[aria-pressed="true"] { border-color: var(--primary); background: var(--g-5); box-shadow: inset 0 0 0 1px var(--primary); }
.zone-tab .t { display: flex; align-items: center; gap: var(--s-2); font-weight: 700; }
.zone-tab .c { display: block; font-size: 1.75rem; font-weight: 700; margin-top: var(--s-1); letter-spacing: -.03em; }
.zone-tab .c small { font-size: .9375rem; font-weight: 600; color: var(--text-3); margin-left: 2px; }

/* ---------- 8. 화면: 분석 안내 ---------- */
.about-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
.about-grid .wide { grid-column: 1 / -1; }
.lead-s { font-size: 1rem; color: var(--text-2); margin-bottom: var(--s-4); }
.src-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s-3); margin-bottom: var(--s-5); }
.src-tabs .zone-tab .s { display: block; font-size: .8125rem; color: var(--text-3); margin-top: var(--s-1); }
.src-about { font-size: .9375rem; color: var(--text-2); padding: var(--s-3) var(--s-4); background: var(--n-5); border-radius: var(--r-m); }
.md-doc code { font-size: .8125rem; background: var(--n-10); padding: 0 4px; border-radius: 4px; }
.src-h { font-size: 1rem; font-weight: 700; margin: var(--s-5) 0 var(--s-3); }
.src-h small { font-size: .8125rem; font-weight: 500; color: var(--text-3); margin-left: var(--s-2); }
.ds, .vars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); }
.vars + .vars { margin-top: var(--s-3); }
.ds li, .var { padding: var(--s-3) var(--s-4); border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); }
.ds li b { font-size: .9375rem; }
.ds li .n { float: right; font-size: .8125rem; color: var(--text-3); font-variant-numeric: tabular-nums; }
.ds li p, .var p { font-size: .875rem; color: var(--text-2); margin-top: var(--s-1); }
.ds li p.why, .var p.why { font-size: .8125rem; color: var(--text-3); }
.var.on { border-color: var(--g-20); background: var(--g-5); }
.var-h { display: flex; justify-content: space-between; align-items: center; gap: var(--s-2); }
.var-h b { font-size: .9375rem; }
.share { position: relative; height: 18px; margin-top: var(--s-2); background: var(--surface); border-radius: 4px; overflow: hidden; }
.share i { position: absolute; inset: 0 auto 0 0; background: var(--g-20); }
.share span { position: relative; font-size: .75rem; font-weight: 600; color: var(--g-70); padding-left: 6px; line-height: 18px; }
.about-src { grid-column: 1 / -1; }
.md-doc h4 { font-size: 1rem; font-weight: 700; margin: var(--s-5) 0 var(--s-2); }
.md-doc h4:first-child { margin-top: 0; }
.md-doc p { font-size: .875rem; color: var(--text-2); }
.md-doc ul { list-style: disc; padding-left: 1.2em; display: grid; gap: var(--s-2); font-size: .9375rem; }
.facts > div { display: flex; justify-content: space-between; gap: var(--s-4); padding: var(--s-3) 0; border-bottom: 1px solid var(--line); font-size: .9375rem; }
.facts > div:first-child { padding-top: 0; }
.facts > div:last-child { border-bottom: 0; padding-bottom: 0; }
.facts dt { color: var(--text-2); }
.facts dd { font-weight: 700; text-align: right; }
.facts dd small { font-size: .8125rem; font-weight: 500; color: var(--text-3); }

/* ---------- 9. 화면: 상권 리포트 ---------- */
.r-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s-4); align-items: start; }
.c-12 { grid-column: span 12; } .c-7 { grid-column: span 7; } .c-5 { grid-column: span 5; }
.why { padding: 0; overflow: hidden; }
.why-tabs { border-bottom: 1px solid var(--line); }
.why-tabs .opt .tag { margin: 0 2px 0 0; }
.opt[aria-pressed="true"] .tag { background: var(--surface); }
.why-view { padding: var(--s-5); min-height: 12rem; }
.wv-h { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.wv-h h4 { font-size: 1.0625rem; font-weight: 700; letter-spacing: -.02em; }
.wv-v { margin-left: auto; font-size: 1.25rem; }
.wv-v.risky { color: var(--alert-text); }
.wv-more { font-size: .875rem; color: var(--text-2); margin-top: var(--s-2); }
.wv-note { font-size: .9375rem; color: var(--text-2); margin-top: var(--s-4); padding: var(--s-4); background: var(--n-5); border-radius: var(--r-m); }
.why-view .chart { margin-top: var(--s-4); }
.chart path.line.dash { stroke-width: 1.75; stroke-dasharray: 5 4; }
.chart { position: relative; }
.chart h4 { font-size: .9375rem; font-weight: 700; display: flex; justify-content: space-between; align-items: baseline; margin-bottom: var(--s-2); }
.chart h4 span { font-size: .8125rem; font-weight: 500; color: var(--text-3); }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid-l { stroke: var(--n-10); }
.chart .ax { font-size: 11px; fill: var(--text-4); }
.chart path.line { fill: none; stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.chart path.area { opacity: .1; }
.chart .legend { margin-top: 6px; }
.chart .ctip { position: absolute; pointer-events: none; background: var(--n-90); color: #fff; font-size: .75rem; padding: 6px 9px; border-radius: var(--r-m); transform: translate(-50%, -100%); opacity: 0; transition: opacity .12s; white-space: nowrap; }
.ai { border: 1px solid var(--line); border-radius: var(--r-l); padding: var(--s-5); }
.ai .ai-h { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-3); padding-bottom: var(--s-3); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ai h4 { display: flex; align-items: center; gap: var(--s-2); font-size: 1rem; font-weight: 700; }
.ai h4 .ic { color: var(--g-60); vertical-align: 0; }
.status-line { font-size: .8125rem; color: var(--text-3); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.status-line .ok, .status-line .bad { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.status-line .ok { color: var(--g-70); } .status-line .bad { color: var(--red-60); }
.status-line .ic { width: 16px; height: 16px; vertical-align: 0; }
.ai .txt { font-size: 1.0625rem; line-height: 1.85; color: var(--text); min-height: 5em; word-break: keep-all; }
.ai .txt p { margin: 0 0 var(--s-3); } .ai .txt p:last-child { margin-bottom: 0; }
.ai .txt strong { font-weight: 700; color: var(--g-70); } .ai .txt em { font-style: italic; } .ai .txt u { text-underline-offset: 3px; text-decoration-thickness: 1.5px; } .ai .txt del { color: var(--text-3); }
.ai .txt ul, .ai .txt ol { margin: 0 0 var(--s-3); padding-left: 1.2em; list-style: disc; }
.md-table { overflow-x: auto; margin: var(--s-2) 0 var(--s-3); }
.md-table table { border-collapse: collapse; font-size: .9375rem; line-height: 1.5; min-width: 60%; }
.md-table th, .md-table td { border: 1px solid var(--line); padding: 7px 12px; text-align: left; }
.md-table th { background: var(--n-5); font-weight: 700; color: var(--text-2); }
.ai .cur, .pol .cur { display: inline-block; width: 2px; height: 1.1em; background: var(--primary); vertical-align: -3px; margin-left: 1px; animation: blink 1s steps(2) infinite; }
.ai-note { margin: var(--s-3) 0 0; }
.ai-note:empty { display: none; }
/* 상권 리포트: 해석 문단 아래 정책 제안 · LLM 제안 5:5 */
.pol { border: 1px solid var(--line); border-radius: var(--r-l); padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-4); }
.pol-h { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding-bottom: var(--s-3); border-bottom: 1px solid var(--line); }
.pol-h h4 { display: flex; align-items: center; gap: var(--s-2); font-size: 1rem; font-weight: 700; }
.pol-h h4 .ic { color: var(--g-60); vertical-align: 0; }
.pol-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6); align-items: start; }
.pol-types { display: grid; gap: var(--s-2); }
.pol-types li { padding: var(--s-3) var(--s-4); border: 1px solid var(--line); border-radius: var(--r-m); }
.pol-types li.on { border-color: var(--g-20); background: var(--g-5); }
.pol-types b { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); font-size: .9375rem; font-weight: 700; }
.tag.rec { color: var(--g-70); background: var(--surface); border-color: var(--g-20); }
.pol-types p { font-size: .8125rem; color: var(--text-2); margin-top: 2px; word-break: keep-all; }
.pol-rows { display: grid; gap: var(--s-3); }
.pol-rows > div { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: var(--s-3); }
.pol-rows dt { font-size: .8125rem; font-weight: 700; color: var(--text-3); padding-top: 2px; }
.pol-rows dd { font-size: .9375rem; line-height: 1.6; word-break: keep-all; }
.pol-list { list-style: decimal; padding-left: 1.2em; display: grid; gap: var(--s-2); }
.pol-list b { font-weight: 700; color: var(--text); }
.pol-body { min-height: 16rem; }
.pol-rows dd.ph { display: grid; gap: 8px; padding-top: 4px; }
.pol-rows dd.ph i { display: block; height: 12px; border-radius: 6px; background: var(--n-10); animation: skel 1.4s ease-in-out infinite; }
@keyframes skel { 50% { opacity: .45; } }
.pol-raw { font-size: .9375rem; line-height: 1.7; white-space: pre-wrap; word-break: keep-all; color: var(--text-2); }
.pulse { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--g-50); animation: pulse 1.2s ease-in-out infinite; }
.timeline { position: relative; display: grid; gap: var(--s-5); padding-left: var(--s-5); border-left: 2px solid var(--line); margin-left: 4px; }
.timeline li { position: relative; }
.timeline li > b { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.ev-dl { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 2px var(--s-3); margin-top: var(--s-2); font-size: .875rem; }
.ev-dl dt { color: var(--text-3); font-weight: 700; }
.ev-dl dd { color: var(--text-2); word-break: keep-all; }
.timeline li::before { content: ""; position: absolute; left: calc(-1 * var(--s-5) - 7px); top: 7px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--g-60); }
.timeline .when { font-size: .8125rem; font-weight: 700; color: var(--g-70); }
.timeline b { display: block; font-size: 1rem; margin: 2px 0; }
.timeline p { font-size: .875rem; color: var(--text-2); }
.timeline .desc { margin: var(--s-1) 0 0; }

.sec-h { margin-top: var(--s-6); padding-bottom: var(--s-2); border-bottom: 2px solid var(--n-80); }
.sec-h h3 { font-size: 1.25rem; font-weight: 700; letter-spacing: -.02em; }
.sec-h p { font-size: .875rem; color: var(--text-3); margin-top: 2px; }
.score-cell.prob .num { width: 48px; }
.result { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); gap: var(--s-5); align-items: stretch; }
.result .verdict { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4) var(--s-5); border-radius: var(--r-l); border: 1px solid var(--line); background: var(--n-5); }
.result .verdict .ic { width: 32px; height: 32px; vertical-align: 0; }
.result .verdict b { display: block; font-size: 1.375rem; font-weight: 700; letter-spacing: -.02em; }
.result .verdict.ok { background: var(--g-5); border-color: var(--g-20); color: var(--g-70); }
.result .verdict.no { background: var(--red-5); border-color: var(--red-30); color: var(--red-60); }
.rcmp { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-l); }
.rcmp > div { padding: var(--s-3) var(--s-4); }
.rcmp > div + div { border-left: 1px solid var(--line); }
.rcmp dt { font-size: .8125rem; color: var(--text-3); font-weight: 600; }
.rcmp dd.big { font-size: 1.25rem; font-weight: 700; letter-spacing: -.02em; }
.rcmp dd.risky { color: var(--red-60); }
.rcmp dd.ok { color: var(--g-70); }
.rcmp dd small { font-size: .8125rem; font-weight: 600; color: var(--text-3); }
.after-q td.risky { color: var(--red-60); font-weight: 700; }

/* ---------- 10. 모션 ---------- */
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -200% 0; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.5); opacity: .4; } }

/* ---------- 11. 반응형 ---------- */
@media (max-width: 1180px) {
  .src-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ds, .vars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main, .grid-support { grid-template-columns: minmax(0, 1fr); }
  .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-strip.report { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .c-7, .c-5 { grid-column: span 12; }
}
@media (max-width: 760px) {
  .pol-cols { grid-template-columns: minmax(0, 1fr); }
  .container { padding: 0 var(--s-4); }
  main { padding-top: var(--s-4); }
  .gnb .container { height: auto; flex-wrap: wrap; gap: 0 var(--s-3); padding-top: var(--s-3); }
  .nav { width: 100%; overflow-x: auto; height: 48px; }
  .nav button { padding: 0 var(--s-3); font-size: .9375rem; }
  .page-head h2 { font-size: 1.5rem; }
  .f-row { grid-template-columns: minmax(0, 1fr); }
  .f-l { background: none; border-right: 0; padding: var(--s-3) var(--s-4) 0; font-size: .875rem; }
  .f-o { padding: var(--s-2) var(--s-4) var(--s-3); }
  .opt { padding: 6px 11px; font-size: .875rem; min-height: 36px; }
  .qyears { gap: var(--s-2); }
  .qyear { flex-wrap: wrap; }
  .stat { padding: var(--s-4); }
  .stat .v { font-size: 1.625rem; }
  .stat .l { font-size: .8125rem; }
  .panel-h { padding: var(--s-3) var(--s-4); }
  .panel-b { padding: var(--s-4); }
  .desc.pad { padding: var(--s-3) var(--s-4) 0; }
  .gcmp { grid-template-columns: minmax(0, 1fr); }
  .table.rank td:nth-child(3), .table.dlist td:nth-child(3) { width: 26%; }
  .zone-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-grid { grid-template-columns: minmax(0, 1fr); }
  .src-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ds, .vars { grid-template-columns: minmax(0, 1fr); }
  .dstats { grid-template-columns: minmax(0, 1fr); }
  .result { grid-template-columns: minmax(0, 1fr); }
  .rcmp { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rcmp > div:nth-child(odd) { border-left: 0; }
  .rcmp > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .wv-v { margin-left: 0; }
  .notice.row .btn { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
