/* 글꼴 — Pretendard 가변 글꼴에서 이 사이트에 쓰는 글자(KS X 1001 한글 2,350자 + 사이트에 나온 글자)만 남긴 한 파일 (10-12).
   OFL 1.1 — 「Pretendard」는 Reserved Font Name 이라 부분집합은 이름을 바꿔 싣는다 (assets/fonts/LICENSE.txt). 없는 글자(한자 · 드문 음절)는 뒤의 시스템 글꼴로 나온다.
   다시 만들 때: Pretendard 가변 woff2 + fonttools pyftsubset (specs/verify-data.md 33차) */
@font-face { font-family: "SGON Sans"; font-weight: 45 930; font-style: normal; font-display: swap; src: url("/assets/fonts/sgon-sans-var.woff2") format("woff2-variations"), url("/assets/fonts/sgon-sans-var.woff2") format("woff2"); }
/* 작은 글자는 한 단계씩 키웠다 (10-07 남덕호님 · 15px 미만 +1px)
   상권분석ON 공통 (2026-10-07 · 로고 색에서 출발 · 청약로그ON 과 다른 뼈대)
   밝은 회색 바탕 위 흰 카드 리포트 — 머리말(로고 + 알약 메뉴) → 표지 → 위에 붙는 칩 메뉴 → 카드 격자 → 출처 → 밝은 꼬리말
   모바일 우선. 433px 에서 눈으로 확인한다 (A6). */
:root {
  --blue: #0b50c8;        /* 로고 「상권분석」 */
  --blue-2: #0b5fd8;
  --sky: #06b2e8;         /* 로고 가운데 막대 */
  --teal: #0cc2ae;        /* 로고 「ON」 */
  --teal-text: #087f73;   /* 흰 바탕 위 작은 글자용 */
  --coral: #f2624b;       /* 닫은 가게 */
  --amber: #f2a93b;
  --bg: #f3f6fb;
  --card: #ffffff;
  --soft: #eef3fb;
  --text: #121a2b;
  --text-2: #435069;
  --text-3: #76819a;
  --line: #e2e8f2;
  --r: 16px;
  --r-s: 10px;
  --shadow: 0 1px 2px rgb(16 32 70 / .05), 0 4px 16px rgb(16 32 70 / .05);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 64px; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font: 16px/1.6 "SGON Sans", "Pretendard Variable", Pretendard, system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  word-break: keep-all; overflow-wrap: anywhere; letter-spacing: -.01em;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, p, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
.nb { white-space: nowrap; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.page { flex: 1; }

/* ── 머리말 — 로고 · 큰 메뉴 한 줄 + 그 아래 하위 메뉴 (10-08 세 번째 · 남덕호님) ──
   ① 로고와 큰 메뉴는 같은 줄 (PC) — 휴대폰은 로고 아래 한 줄
   ② 큰 메뉴는 알약이 아니라 글자 탭 — 고른 것은 파란 글자 + 밑줄
   ③ 하위 메뉴는 큰 메뉴 바로 아래 같은 칸 — 옅은 파랑 줄 + 고른 큰 메뉴를 가리키는 꼭지(▲ · common.js 가 자리를 잡는다) */
.site-header { background: var(--card); border-bottom: 1px solid var(--line); }
.hd { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 28px; padding-top: 12px; padding-bottom: 0; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-size: 24px; font-weight: 800; letter-spacing: -.04em; color: var(--blue); padding-bottom: 8px; }
.logo:hover { text-decoration: none; }
.logo b { color: var(--teal); font-weight: 800; }
.navcol { flex: 1 0 100%; min-width: 0; display: flex; flex-direction: column; }
.gnb { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.gnb::-webkit-scrollbar { display: none; }
.gnb a { flex: 0 0 auto; padding: 10px 0 11px; font-size: 16.5px; font-weight: 700; color: var(--text-2); border-bottom: 3px solid transparent; white-space: nowrap; }
.gnb a:hover { text-decoration: none; color: var(--blue); }
.gnb a[aria-current="page"] { color: var(--blue); border-bottom-color: var(--blue); }
.snb-wrap { position: relative; margin: 0 -16px 10px; }
.snb { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 6px 12px; background: #eaf1fd; }
.snb::-webkit-scrollbar { display: none; }
.snb-wrap::before { content: ""; position: absolute; top: -6px; left: var(--caret-x, 28px); width: 12px; height: 12px; background: #eaf1fd; transform: rotate(45deg); border-radius: 2px; }
.snb a { position: relative; flex: 0 0 auto; padding: 6px 12px; border-radius: 8px; font-size: 14.5px; font-weight: 600; color: #3d4a63; white-space: nowrap; }
.snb a:hover { text-decoration: none; color: var(--blue); background: rgba(255,255,255,.7); }
.snb a[aria-current="page"] { background: #fff; color: var(--blue); font-weight: 800; box-shadow: 0 1px 3px rgba(11,80,200,.15); }
.gnb:has(+ .snb-wrap) { margin-bottom: 8px; }
/* 좁은 화면 — 큰 메뉴가 여섯이 되어 한 줄에 안 들어온다(535px). 옆으로 미는 대신 세 칸 두 줄로 다 보이게 (10-12 「지원 · 대출」 추가) */
@media (max-width: 560px) {
  .gnb { flex-wrap: wrap; gap: 0; overflow: visible; margin: 0 -6px; padding: 0; }
  .gnb a { flex: 0 0 33.333%; text-align: center; padding: 9px 0 8px; font-size: 16px; }
}
@media (min-width: 900px) {
  .hd { flex-wrap: nowrap; align-items: flex-start; padding-top: 18px; }
  .logo { padding-top: 6px; }
  .navcol { flex: 0 1 auto; margin-left: auto; align-items: stretch; padding-bottom: 10px; }   /* 10-12 높이 맞춤(min-height 118px)을 뺐다 — 하위 탭이 없는 섹션에 빈 줄이 남아 보였다. 섹션을 오갈 때 본문 높이가 달라지는 쪽을 택한다 */
  .gnb { margin: 0; padding: 0; gap: 28px; justify-content: flex-end; }   /* 하위 탭 줄이 더 넓은 섹션(탭 5개)에서도 큰 메뉴가 안 밀리게 (10-10 「상단 메뉴가 움찔」) */
  .snb-wrap { margin: 0 0 12px; }
  .snb { border-radius: 10px; }
}

/* ── 표지 ─────────────────────────────────────── */
.cover {
  margin-top: 16px; padding: 20px 18px 18px; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow);   /* 10-12 머리말(흰 바탕)과 붙어 보였다 — 10 → 16 · 넓은 화면 14 → 26 */
  position: relative; overflow: hidden;
}
.cover::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--blue), var(--sky), var(--teal)); }
.crumbs ol { display: flex; flex-wrap: wrap; font-size: 15px; color: var(--text-3); margin-bottom: 10px; }
.crumbs li + li::before { content: "›"; margin: 0 6px; color: #b7c0d2; }
.crumbs a { color: var(--text-3); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chip { display: inline-flex; padding: 3px 10px; border-radius: 999px; font-size: 14px; font-weight: 700; background: #e3f7f4; color: var(--teal-text); }
.chip.warn { background: #fff3e0; color: #9a5a00; }
.cover h1 { font-size: 26px; line-height: 1.3; font-weight: 800; letter-spacing: -.035em; }
.cover-sub { margin-top: 4px; font-size: 15.5px; color: var(--text-3); }
.summary { margin-top: 14px; font-size: 17px; line-height: 1.55; font-weight: 500; color: var(--text); }
@media (min-width: 900px) {
  .cover { margin-top: 26px; padding: 30px 34px 30px; }
  .cover h1 { font-size: 34px; }
  .summary { font-size: 19px; }   /* 10-10 max-width 720px 를 뺐다 — 표지 폭을 다 쓴다 */
}

/* ── 칩 메뉴 — 이 페이지 안 (위에 붙는다) ── */
.toc { position: sticky; top: 0; z-index: 40; margin-top: 14px; background: rgb(243 246 251 / .92); backdrop-filter: blur(8px); }
.toc-in { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-top: 8px; padding-bottom: 8px; }
.toc-in::-webkit-scrollbar { display: none; }
.toc a { flex: 0 0 auto; padding: 6px 12px; border-radius: 999px; font-size: 14.5px; font-weight: 600; color: var(--text-2); background: var(--card); border: 1px solid var(--line); }
.toc a:hover { text-decoration: none; color: var(--blue); border-color: var(--blue); }

/* ── 카드 격자 ─────────────────────────────────── */
.cards { display: grid; gap: 14px; margin-top: 8px; }
@media (min-width: 900px) { .cards { grid-template-columns: 1fr 1fr; gap: 18px; } .card.wide { grid-column: 1 / -1; } }
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px 16px; min-width: 0; }
@media (min-width: 900px) { .card { padding: 24px 26px; } }
.card-h { margin-bottom: 12px; }
.eyebrow { display: block; font-size: 15px; font-weight: 700; color: var(--teal-text); letter-spacing: .02em; }
.card-h h2 { font-size: 20px; line-height: 1.35; font-weight: 800; letter-spacing: -.03em; }
.lead { color: var(--text-2); font-size: 15px; margin-bottom: 12px; }
.note { margin-top: 10px; font-size: 14.5px; color: var(--text-3); line-height: 1.6; }
.muted { color: var(--text-3); font-size: 14px; }
.alert { grid-column: 1 / -1; padding: 14px 16px; border-radius: var(--r-s); background: #fff6e6; color: #6b4300; font-size: 15px; }
.alert p + p { margin-top: 6px; }

/* 숫자 타일 */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tile { padding: 12px 14px; border-radius: var(--r-s); background: var(--soft); }
.tile dt { font-size: 14px; color: var(--text-3); }
.tile dd { margin-top: 2px; font-size: 20px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.tile dd small { display: block; font-size: 13.5px; font-weight: 500; color: var(--text-3); letter-spacing: 0; }

/* 표 — 가로선만, 숫자 오른쪽 */
.tscroll { overflow-x: auto; margin: 0 -4px; }
.t { width: 100%; border-collapse: collapse; font-size: 15.5px; font-variant-numeric: tabular-nums; }
.t th, .t td { padding: 9px 4px; text-align: left; border-bottom: 1px solid var(--line); overflow-wrap: normal; vertical-align: middle; }
.t thead th { font-size: 13.5px; font-weight: 600; color: var(--text-3); border-bottom-color: #cfd8e6; }
.t tr:last-child td { border-bottom: 0; }
.t .r { text-align: right; white-space: nowrap; }
.t .sub { display: block; font-size: 12.5px; color: var(--text-3); white-space: normal; }
.t tr.me td { font-weight: 700; }
.t tr.me td:first-child { color: var(--blue); white-space: nowrap; }
@media (max-width: 639px) { .t { font-size: 14px; } .t th, .t td { padding: 9px 3px; } .t .sub { font-size: 12px; } }
.t tr.me td:first-child::after { content: "이 동"; margin-left: 6px; padding: 1px 6px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff; background: var(--blue); vertical-align: 1px; }

/* 막대 (생존율 %) */
.meter { display: block; height: 6px; margin-top: 4px; border-radius: 3px; background: #e6ecf5; overflow: hidden; min-width: 56px; }
.meter i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--sky), var(--teal)); }
.tag { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #eef1f6; color: var(--text-2); vertical-align: 1px; }
.tag.mea { background: #e3f7f4; color: var(--teal-text); }
.tag.est { background: #fff3e0; color: #9a5a00; }

/* ── 출처 · 꼬리말 ─────────────────────────────── */
.source { margin: 18px 0 8px; padding: 0 4px; font-size: 13.5px; line-height: 1.65; color: var(--text-3); }
.source p + p { margin-top: 4px; }
.ad { grid-column: 1 / -1; min-height: 100px; }
.site-footer { margin-top: 36px; padding: 28px 0 40px; border-top: 1px solid var(--line); background: var(--card); font-size: 14.5px; color: var(--text-3); }
.site-footer .logo { font-size: 17px; }
.foot-note { margin-top: 10px; line-height: 1.65; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; }
.foot-links a { color: var(--text-2); }
.foot-copy { margin-top: 12px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 100; background: #fff; padding: 8px 12px; border: 2px solid var(--blue); border-radius: 8px; }
@media (max-width: 639px) { .t tr.me td:first-child::after { display: none; } }

/* 맨 위로 버튼 (common.js) — 오른쪽 아래 둥근 단추. 카드 오른쪽 끝(.wrap 1080px · 안쪽 16px)에서 24px 띄운다 (카드 선에 붙어 보였다 10-07) · 여백이 모자라면 화면 끝 16px */
.to-top { position: fixed; right: max(16px, calc((100vw - 1080px) / 2 - 60px)); bottom: 24px; z-index: 45; width: 52px; height: 52px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: var(--blue); color: #fff; cursor: pointer; box-shadow: 0 6px 18px rgb(11 80 200 / .28); }
.to-top[hidden] { display: none; }
.to-top:hover { background: var(--blue-2); }
.to-top svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
main:focus { outline: none; }
@media (max-width: 600px) { .to-top { right: 14px; bottom: 16px; width: 46px; height: 46px; } }

/* 글 페이지 (pages/doc.html) */
.doc h2 { font-size: 18px; font-weight: 800; letter-spacing: -.03em; margin-bottom: 8px; }
.doc p, .doc li { font-size: 15.5px; line-height: 1.75; color: var(--text-2); }
.doc-list li { position: relative; padding-left: 14px; }
.doc-list li + li { margin-top: 6px; }
.doc-list li::before { content: ""; position: absolute; left: 0; top: .75em; width: 5px; height: 5px; border-radius: 50%; background: var(--teal); }

/* 행동 단추 (계산기로 가기 등) */
.cta-row { margin-top: 12px; }
.cta { display: inline-flex; align-items: center; padding: 10px 16px; border-radius: 999px; background: var(--blue); color: #fff; font-weight: 700; font-size: 15px; }
.cta:hover { text-decoration: none; background: var(--blue-2); }
.cta.ghost { background: var(--card); color: var(--blue); border: 1.5px solid var(--blue); }
.cta.ghost:hover { background: var(--soft); }
.cta-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* 제목 위 칩 (동네 순위 · 프랜차이즈 순위 · 임대료/권리금) — 제목과 붙어 보였다 (10-09) */
.cover .rank-nav { margin: 6px 0 18px; }
/* 지금 페이지 칩 — 페이지 CSS(franchise · blog)에만 있어 임대료 · 권리금 칩이 안 칠해졌다 (10-09) */
.chips-list a[aria-current="page"] { background: var(--blue); color: #fff; }
.chips-list a[aria-current="page"]:hover { color: #fff; }
/* 「지금 줄」 딱지 — 페이지마다 다르게 (10-09 · 브랜드 표 · 합계 줄에 「이 동」이 붙었다) */
.t tr.me.me-sgg td:first-child::after { content: "이 시군구"; }
.t tr.me.me-brand td:first-child::after { content: "이 브랜드"; }
.t tr.total td { font-weight: 800; border-top: 2px solid var(--line); }
.law-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 14px 0 6px; }
.law-row > span:first-child { font-size: 14px; font-weight: 700; color: var(--text-2); margin-right: 4px; }
/* 화면 읽기용 글자 — franchise.css 에만 있어 홈 검색 칸 이름이 보였다 (10-09) */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* 오른쪽 정렬 숫자 칸 다음의 왼쪽 정렬 칸은 띄운다 — 「가맹점 49,949 | 8.1%」처럼 붙어 보였다 (10-09) */
.t th.r + th:not(.r), .t td.r + td:not(.r) { padding-left: 28px; }
