/* ===== 동네짐 site.css ==========================================================
   토큰·대비 정본은 docs/mockup/home.html 의 :root 주석(2026-10-14)이고 그대로 옮겼다.
   팔레트: 초크(분필 가루) 흰 바탕 · 고무 바닥 그래파이트 글자 · 원판 초록(10kg) 강조.
   대비는 WCAG 2.1 상대휘도로 계산했다. 순서: paper / surface / sunken 위.
   종류는 색만으로 가르지 않는다 — 글리프 ■ 공공 · ● 민간 · ▲ 야외 · ◆ 인증센터 를 늘 같이 쓴다.
   강조색은 한 화면에 한 번(주 버튼). 공공 글리프·지도 점이 같은 초록인 것은 의도다(주인공이 공공 시설).
   새 색을 만들면 대비를 재서 여기 주석에 수치를 남긴다. */
:root {
  --paper: #f5f6f4;       /* 바탕(초크) */
  --surface: #ffffff;
  --sunken: #e9ece8;
  --ink: #17212b;         /* 15.0 / 16.3 / 13.7 — 본문 */
  --muted: #56616b;       /* 5.8 / 6.3 / 5.3 — 보조 설명 */
  --line: #d3d9d5;        /* 비텍스트 경계선(surface 1.43) */
  --accent: #0b6b4e;      /* 6.0 / 6.5 / 5.5 · accent-soft 위 5.4 · 흰 글자 6.5 — 한 화면에 한 번 */
  --accent-soft: #dcefe6; /* 비텍스트 면 */
  --on-accent: #ffffff;
  --k-public: #0b6b4e;    /* ■ 공공 — 강조색과 같은 초록. 지도 점·글리프에만 */
  --k-private: #4a5560;   /* ● 민간 7.0 / 7.6 / 6.4 */
  --k-outdoor: #8a5300;   /* ▲ 야외 5.8 / 6.3 / 5.3 */
  --crit: #b3261e;        /* 6.0 / 6.5 / 5.5 — 오류·폐업 전용. 강조색으로 쓰지 않는다 */
  --r: 10px;
  --font: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #111714;
    --surface: #19201c;
    --sunken: #222a25;
    --ink: #e7ede9;       /* 15.3 / 14.0 / 12.4 */
    --muted: #9db0a5;     /* 7.9 / 7.3 / 6.4 */
    --line: #2e3933;      /* surface 1.38 */
    --accent: #5dd1a0;    /* 9.6 / 8.8 / 7.8 · accent-soft 위 7.2 · on-accent 글자 9.5 */
    --accent-soft: #163327;
    --on-accent: #0c1a13;
    --k-public: #5dd1a0;
    --k-private: #b3bcc4; /* 9.4 / 8.6 / 7.6 */
    --k-outdoor: #e3b35c; /* 9.4 / 8.6 / 7.6 */
    --crit: #ff8f86;      /* 8.2 / 7.5 / 6.7 */
  }
}
/* famousbros 공용 부품(fb.css) 값 — 기존 토큰을 가리킨다(G:\workspace\DESIGN.md '토큰'). 다크는 가리키는 토큰이 바뀌어 따라간다.
   실측(2026-10-16, WCAG 2.x): 라이트 ink 16.3 · muted 6.3 (surface #fff) / paper 위 muted 5.8 · accent #0b6b4e 위 흰 글자 6.5
                              다크   ink 14.0 · muted 7.3 (surface #19201c) / paper 위 muted 7.9 · accent #5dd1a0 위 #0c1a13 9.5 */
:root {
  --fb-bg: var(--paper);
  --fb-surface: var(--surface);
  --fb-ink: var(--ink);
  --fb-muted: var(--muted);
  --fb-line: var(--line);
  --fb-accent: var(--accent);
  --fb-on-accent: var(--on-accent);
  --fb-display: inherit;   /* 웹폰트 없음 */
  --fb-max: 1040px;        /* .wrap 과 같은 폭 */
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }   /* 떠 있는 내비가 앵커(#locate 등)를 덮지 않게 */
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.6 var(--font); word-break: keep-all; overflow-wrap: anywhere; }
img, svg { max-width: 100%; }
a { color: inherit; }
p a, .src a, .prose a, td a { text-decoration: underline; text-underline-offset: 3px; }
/* 문장 속 링크 — 줄 높이는 그대로 두고 누르는 영역만 44px 로(위아래 패딩은 인라인이라 줄 간격을 밀지 않는다) */
p a, .prose li a, dd a, .srcs a { padding: 14px 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
.num { font-variant-numeric: tabular-nums; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 16px; z-index: 20; padding: 12px; background: var(--surface); }
.page { padding-bottom: 8px; }

/* 머리 — 로고(=홈) + 내비 5칸. 틀은 fb.css 의 .fb-nav(떠 있는 유리 막대) */
.logo { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 800; font-size: 19px; letter-spacing: -0.02em; text-decoration: none; }
.logo svg { width: 28px; height: 28px; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 600; white-space: nowrap; }
.nav a:hover { color: var(--ink); background: var(--sunken); }
/* 현재 위치는 강조색이 아니라 먹색 글자 + --sunken 알약(ink on sunken 13.7 / 다크 12.4) — 강조색은 화면의 주 버튼 하나(DESIGN.md 예외) */
.nav a[aria-current="page"] { color: var(--ink); background: var(--sunken); }

/* 배우기 2차 띠 — 순수 글자 링크, 좁으면 줄을 바꾼다(가로 스크롤 없음) */
.band { background: var(--surface); border-bottom: 1px solid var(--line); }
.band__in { display: flex; flex-wrap: wrap; gap: 0 4px; }
.band a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; color: var(--muted); font-size: 15px; font-weight: 600; text-decoration: none; }
.band a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.band a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }

/* 제목은 자기 본문에 붙는다: 위 40 > 아래 8 */
h1 { font-size: clamp(26px, 5vw, 38px); line-height: 1.25; letter-spacing: -0.03em; font-weight: 800; margin: 32px 0 8px; }
h2 { font-size: 20px; letter-spacing: -0.02em; font-weight: 800; margin: 40px 0 8px; }
h3 { font-size: 17px; margin: 24px 0 4px; }
.lede { color: var(--muted); margin: 0 0 24px; max-width: 40em; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border-radius: 999px; font: inherit; font-weight: 700; text-decoration: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* 종류 글리프 */
.g { display: inline-block; width: 1em; text-align: center; font-style: normal; }
.g--public { color: var(--k-public); } .g--private { color: var(--k-private); } .g--outdoor { color: var(--k-outdoor); } .g--cert { color: var(--ink); }

/* 목록 줄 — 처음부터 만든 줄이라 앵커를 grid 로 깐다(UIUX Fitts) */
.rows { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.rows li + li { border-top: 1px solid var(--line); }
.rows a { display: grid; grid-template-columns: 1.25em 1fr auto; gap: 4px 12px; align-items: baseline; min-height: 56px; padding: 12px 16px; text-decoration: none; }
.rows a:hover .rows__name { text-decoration: underline; text-underline-offset: 3px; }
.rows__name { font-weight: 700; }
.rows__meta { grid-column: 2 / 4; color: var(--muted); font-size: 14px; }
.rows__fee { font-weight: 800; white-space: nowrap; }
.rows__fee--none { font-weight: 500; color: var(--muted); font-size: 14px; }
.rows--plain a { grid-template-columns: 1fr auto; }
.rows--plain .rows__meta { grid-column: 1 / 3; }

.more-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.basis, .note, .fine { color: var(--muted); font-size: 14px; margin: 8px 0 0; }
.empty { padding: 16px; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r); color: var(--muted); }

/* 칩 — 필터 칸 하나(보기 여럿). 켜진 것은 강조색이 아니라 글자색 테두리로 */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; padding: 0; list-style: none; }
.chips a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); text-decoration: none; font-weight: 600; font-size: 15px; }
.chips a[aria-pressed="true"], .chips a[aria-current="true"] { border: 2px solid var(--ink); padding: 0 13px; }
.chips a[aria-pressed="false"] { color: var(--muted); }
.chips__label { width: 100%; margin: 0; font-size: 14px; color: var(--muted); }

/* 꼬리 — 틀은 fb.css 의 .fb-foot */

/* ===== 홈 — 히어로 틀은 fb.css 의 .fb-hero */
.finder { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.finder small { color: var(--muted); font-size: 14px; }
.kinds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 24px 0 0; padding: 0; list-style: none; }
.kinds a { display: flex; flex-direction: column; gap: 4px; min-height: 88px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); text-decoration: none; }
.kinds a:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.kinds .g { font-size: 22px; line-height: 1; }
.kinds span { color: var(--muted); font-size: 14px; line-height: 1.4; }
.split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 0; } }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; gap: 8px; }
.steps a { display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start; min-height: 56px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; }
.steps a::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--sunken); font-weight: 800; }
.steps strong { display: block; }
.steps span span { color: var(--muted); font-size: 14px; }
.steps a:hover strong { text-decoration: underline; text-underline-offset: 3px; }

/* ===== 지도 */
.mapbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; }
.mapbar .chips { margin: 0; }
.mapbar .btn { margin-left: auto; }
.mapgrid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
@media (max-width: 860px) { .mapgrid { grid-template-columns: minmax(0, 1fr); } }
.map { isolation: isolate; position: relative; aspect-ratio: 4 / 3; min-height: 320px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--sunken); }
#map .leaflet-bar a { width: 44px; height: 44px; line-height: 44px; } /* leaflet.css 가 뒤에 읽혀 id 로 이긴다 */
.map .leaflet-popup-content a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; text-decoration: underline; }
.legend { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; color: var(--muted); }
.side h2 { margin-top: 0; font-size: 17px; }
@media (max-width: 860px) { .side h2 { margin-top: 24px; } }
@media (max-width: 720px) { .map { aspect-ratio: 1 / 1; } .mapbar .btn { margin-left: 0; width: 100%; } }

/* ===== 시설 상세 */
.crumbs { display: flex; flex-wrap: wrap; gap: 0 4px; margin: 16px 0 0; padding: 0; list-style: none; font-size: 14px; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 4px; }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; text-underline-offset: 3px; }
.crumbs + h1 { margin-top: 8px; }
.kind { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 700; color: var(--muted); }
.addr { margin: 4px 0 0; color: var(--muted); }
.warn { margin: 16px 0 0; padding: 12px 16px; border-left: 3px solid var(--crit); background: var(--surface); }
.warn b { color: var(--crit); }
/* 큰 숫자는 이용료 하나 — 갈지 정할 때 손을 쓰는 숫자(UIUX Von Restorff). 원판 꼴 테두리, 이 사이트에서 대담한 것은 이것 하나 */
.decide { display: grid; grid-template-columns: auto 1fr; gap: 24px 32px; align-items: center; margin: 24px 0 0; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.plate { width: 184px; height: 184px; border-radius: 50%; display: grid; place-content: center; text-align: center; border: 14px solid var(--sunken); box-shadow: inset 0 0 0 2px var(--line), 0 0 0 2px var(--line); padding: 0 8px; }
.plate b { display: block; font-size: 34px; line-height: 1.1; font-weight: 800; letter-spacing: -0.03em; }
.plate b.plate__none { font-size: 18px; }
.plate span { font-size: 14px; color: var(--muted); }
.decide__why { margin: 0 0 16px; }
.decide__why strong { display: block; font-size: 18px; }
.fees { width: 100%; border-collapse: collapse; font-size: 15px; margin: 0 0 16px; }
.fees th, .fees td { text-align: left; padding: 0 8px; height: 44px; border-top: 1px solid var(--line); }
.fees td { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.fees th { font-weight: 500; color: var(--muted); padding-left: 0; }
.src { font-size: 13px; color: var(--muted); margin: 0; }
.src a { padding: 14px 0; } /* 줄 높이는 그대로, 누르는 영역만 44px */
main > .src { margin-top: 24px; }
.decide .btn { margin-top: 16px; }
@media (max-width: 720px) {
  .decide { grid-template-columns: 1fr; justify-items: center; padding: 16px; }
  .decide > div:not(.plate) { width: 100%; }
  .decide .btn { width: 100%; }
  .plate { width: 168px; height: 168px; }
  .plate b { font-size: 30px; }
}
.facts { display: grid; grid-template-columns: 8em 1fr; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.facts dt, .facts dd { margin: 0; padding: 12px 16px; border-top: 1px solid var(--line); }
.facts dt { color: var(--muted); }
.facts dt:first-of-type, .facts dt:first-of-type + dd { border-top: 0; }
@media (max-width: 480px) { .facts { grid-template-columns: 1fr; } .facts dd { border-top: 0; padding-top: 0; } }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tags a, .tags span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; background: var(--sunken); text-decoration: none; font-weight: 600; }
.tags span { font-weight: 500; color: var(--muted); }
.tags a:hover { text-decoration: underline; text-underline-offset: 3px; }
.health { margin: 40px 0 0; padding: 12px 16px; border-left: 3px solid var(--line); color: var(--muted); font-size: 14px; }

/* ===== 동작·기구 */
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.cards a { display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: center; min-height: 88px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; }
.cards a:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.cards span { display: block; color: var(--muted); font-size: 14px; }
.fig { display: block; width: 100%; height: auto; color: var(--ink); background: var(--sunken); border-radius: 8px; }
.fig line, .fig rect, .fig circle, .fig ellipse { stroke: currentColor; stroke-linecap: round; fill: none; }
.fig .bd line { stroke-width: 6; }
.fig .bk { stroke-width: 5; opacity: .45; }
.fig .hd { stroke-width: 4; fill: var(--surface); }
.fig .pr { stroke-width: 3; color: var(--muted); stroke: var(--muted); }
.fig .pr--fill { fill: var(--muted); }
.fig .gr { stroke: var(--line); stroke-width: 2; }
.exhead { display: grid; grid-template-columns: minmax(0, 320px) 1fr; gap: 24px; align-items: start; margin-top: 16px; }
@media (max-width: 720px) { .exhead { grid-template-columns: 1fr; } }
.meta { margin: 0; display: grid; grid-template-columns: 7em 1fr; gap: 4px 12px; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; }
.howto { padding-left: 1.4em; }
.howto li + li { margin-top: 8px; }

/* ===== 루틴 표 — 행 44px 로 맞춘다(UIUX: 기존 패딩에 더 얹지 않는다) */
.tbl { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); font-size: 15px; }
.tbl th, .tbl td { text-align: left; padding: 8px 12px; min-height: 44px; border-top: 1px solid var(--line); vertical-align: middle; }
.tbl thead th { border-top: 0; color: var(--muted); font-weight: 600; font-size: 14px; }
.tbl td a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.tbl .num { white-space: nowrap; }
.tbl small { display: block; color: var(--muted); }
@media (max-width: 560px) { .tbl, .tbl tbody { display: block; } .tbl thead { display: none; } .tbl tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 4px 0; border-top: 1px solid var(--line); }
  .tbl .num { white-space: normal; }
  .tbl td { border: 0; padding: 4px 12px; } .tbl td:first-child { grid-column: 1 / 4; } .tbl td[data-l]::before { content: attr(data-l) " "; color: var(--muted); font-size: 13px; } }

/* ===== 글·법적 3장 */
.prose { max-width: 44em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 4px; }
.links { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 8px 0 0; }
.links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-weight: 600; text-decoration: none; }
.links a:hover { text-decoration: underline; }
.srcs { font-size: 14px; color: var(--muted); padding-left: 1.2em; }
.srcs a { display: inline-block; padding: 12px 0; }

/* 페이징 — 목록 아래 가운데 */
.pager { display: flex; justify-content: center; gap: 8px; margin: 16px 0 0; }
.pager a, .pager span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; }

/* 더보기 격자 — 제목 있는 두 묶음 */
.mgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.mgrid a { display: flex; align-items: center; min-height: 56px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; font-weight: 600; }
.mgrid a:hover { text-decoration: underline; }

/* 쿠팡 칸(기본 꺼짐) — 대가성 문구는 제목 바로 아래 */
.cpn { margin: 32px 0 0; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.cpn__h { margin: 0; font-weight: 800; }
.cpn__d { margin: 4px 0 8px; font-size: 13px; color: var(--muted); }
.cpn__l { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cpn__i { display: grid; grid-template-columns: 88px 1fr; gap: 12px; }
.cpn__a { display: inline-flex; min-height: 44px; align-items: center; font-weight: 700; }
.cpn__n { margin: 0; font-size: 14px; color: var(--muted); }
.cpn__b { width: 100%; border: 0; }

/* 모바일: 상단 내비 숨김 + 하단 탭바 5칸 */
.tabbar { display: none; }
@media (max-width: 720px) {
  .nav { display: none; }
  /* 탭바 생김새는 fb 탭바(바닥에서 띄운 유리 알약), 칸은 이 사이트 것(DESIGN.md 예외). z 1100 = Leaflet 단추(1000)보다 위 */
  body { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 1100;
            padding: 4px 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--fb-glass-line);
            box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 55%, transparent), var(--fb-shadow); }
  @supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .tabbar { background: var(--fb-glass); -webkit-backdrop-filter: blur(18px) saturate(170%); backdrop-filter: blur(18px) saturate(170%); }
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--muted); text-decoration: none; }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar a[aria-current="page"] { color: var(--ink); background: var(--sunken); }
  .btn--block-sm { width: 100%; }
  .kinds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
