:root {
  --bg: #f7f3ec;
  --card: #fffdf9;
  --ink: #2a2622;
  --muted: #7a7066;
  --line: #e7ddcf;
  --primary: #2f5d50;
  --primary-ink: #fff;
  --accent: #c4703f;
  --soft: #eee6d9;
  --radius: 14px;
  --serif: 'Noto Serif KR', serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.7 'Noto Sans KR', system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.35; letter-spacing: -0.01em; }
h2 { font-size: 1.35rem; margin: 2.4rem 0 1rem; }
h3 { font-size: 1.08rem; margin: .3rem 0; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.dim { opacity: .25; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* header */
.site-header { background: var(--bg); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1000; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-family: var(--serif); font-weight: 700; font-size: 1.25rem; color: var(--ink); text-decoration: none; display: inline-flex; align-items: baseline; gap: 2px; }
.logo-mark { color: var(--accent); font-size: 1.8rem; line-height: 0; margin-right: 2px; }
.nav { display: flex; gap: 26px; }
.nav a { color: var(--ink); text-decoration: none; font-size: .95rem; }
.nav a:hover { color: var(--primary); }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.4rem; cursor: pointer; color: var(--ink); }

/* hero */
.hero { padding: 72px 0 56px; background: radial-gradient(1200px 400px at 80% -10%, #e8dccb 0%, transparent 60%); }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin: .3rem 0 1rem; }
.eyebrow { color: var(--accent); font-weight: 700; font-size: .9rem; letter-spacing: .04em; margin: 0; }
.lead { font-size: 1.08rem; color: #4a433c; max-width: 680px; }
.hero-search { display: flex; gap: 8px; max-width: 560px; margin-top: 24px; }
.hero-search input { flex: 1; }

/* form */
input[type=search], select { font: inherit; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); }
.btn { display: inline-block; padding: 11px 20px; border-radius: 10px; background: var(--primary); color: var(--primary-ink); border: 0; font: inherit; font-weight: 500; text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; align-items: center; }
.filters input[type=search] { flex: 1 1 220px; }
.check { display: inline-flex; gap: 6px; align-items: center; font-size: .95rem; }

/* cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.grid.two { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; color: var(--ink); text-decoration: none; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(60, 40, 20, .08); }
.card[hidden] { display: none; }
.card-top { display: flex; justify-content: space-between; align-items: center; }
.card-desc { color: #554d45; font-size: .93rem; margin: .4rem 0 .8rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { margin-top: auto; display: flex; justify-content: space-between; font-weight: 500; font-size: .93rem; padding-top: 10px; border-top: 1px dashed var(--line); }
.arrow { color: var(--accent); }
.badge { font-size: .78rem; font-weight: 700; color: var(--primary); background: #e3ece8; padding: 2px 10px; border-radius: 99px; }
.price-signs { font-weight: 700; color: var(--accent); letter-spacing: 1px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.chip { font-size: .8rem; padding: 3px 10px; border-radius: 99px; background: var(--soft); color: #5b5148; text-decoration: none; }
.chip-accent { background: #f6e3d6; color: #9a4f25; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; }
.city-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.city-strip a { background: var(--primary); color: #fff; border-radius: var(--radius); padding: 18px; text-decoration: none; display: flex; flex-direction: column; }
.city-strip b { font-family: var(--serif); font-size: 1.25rem; }
.city-strip small { opacity: .8; }

/* detail */
.page-title { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 28px 0 8px; }
.back { display: inline-block; margin: 22px 0 10px; text-decoration: none; font-size: .92rem; }
.detail h1 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); margin: .4rem 0 0; }
.region { color: var(--muted); margin: .2rem 0 .8rem; }
.notice { background: #fff4e5; border: 1px solid #f0d3a8; color: #7a4a10; padding: 10px 14px; border-radius: 10px; font-size: .9rem; margin-bottom: 12px; }
.keyinfo { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 24px 0; }
.keyinfo div { background: var(--card); padding: 14px 16px; display: flex; flex-direction: column; }
.keyinfo span { font-size: .8rem; color: var(--muted); }
.keyinfo small { color: var(--muted); }
.toc { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin: 24px 0; }
.toc ol { margin: 6px 0 0; padding-left: 20px; columns: 2; }
.toc a { text-decoration: none; }
.detail section { scroll-margin-top: 80px; }
.dl { display: grid; grid-template-columns: 120px 1fr; gap: 8px 16px; margin: 0; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table { border-collapse: collapse; width: 100%; font-size: .94rem; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { background: var(--soft); font-weight: 500; font-size: .85rem; }
tr:last-child td { border-bottom: 0; }
tr.current td { background: #f3efe6; font-weight: 500; }
.tips { padding-left: 22px; }
.tips li { margin-bottom: 6px; }
.checks { list-style: none; padding: 0; }
.checks li { padding-left: 26px; position: relative; margin-bottom: 8px; }
.checks li::before { content: '✓'; position: absolute; left: 4px; color: var(--primary); font-weight: 700; }
.callout { background: #e9f0ec; border-left: 4px solid var(--primary); padding: 12px 16px; border-radius: 0 10px 10px 0; font-size: .95rem; }
.faq { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin-bottom: 8px; }
.faq summary { cursor: pointer; font-weight: 500; }
.faq p { margin: 8px 0 0; color: #554d45; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 40px 0; }
.pager a { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; }
.pager a.right { text-align: right; }
.pager small { color: var(--muted); }
.type-block { border-top: 1px solid var(--line); padding-top: 8px; scroll-margin-top: 80px; }
.prose h2 { font-size: 1.15rem; margin-top: 2rem; }

/* map */
.map { height: 380px; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; background: #e6e0d4; margin-bottom: 10px; z-index: 0; }
.map-fallback { height: 100%; display: grid; place-items: center; color: var(--muted); }
.pin span { display: block; width: 22px; height: 22px; background: var(--accent); border: 3px solid #fff; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }

/* ads */
.ad { margin: 28px 0; min-height: 90px; }
.ad-placeholder { display: grid; place-items: center; border: 2px dashed #d6c9b5; border-radius: 10px; color: #a8998a; font-size: .82rem; background: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(0,0,0,.015) 10px, rgba(0,0,0,.015) 20px); }

/* footer */
.site-footer { margin-top: 64px; border-top: 1px solid var(--line); padding: 40px 0 24px; background: #f1ebe1; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer-grid h4 { margin: 0 0 8px; font-size: .9rem; }
.footer-grid a { display: block; color: #5b5148; text-decoration: none; font-size: .9rem; margin-bottom: 4px; }
.copy { margin-top: 24px; }
.empty { text-align: center; padding: 40px; color: var(--muted); }

@media (max-width: 760px) {
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--bg); flex-direction: column; gap: 0; border-bottom: 1px solid var(--line); }
  .nav a { padding: 14px 20px; border-top: 1px solid var(--line); }
  .nav-open .nav { display: flex; }
  .nav-toggle { display: block; }
  .toc ol { columns: 1; }
  .footer-grid { grid-template-columns: 1fr; }
  .map { height: 300px; }
  .hero { padding: 48px 0 40px; }
}
.sources { padding-left: 20px; font-size: .92rem; }
.sources li { margin-bottom: 4px; }
.table-filter { width: 100%; max-width: 320px; margin-bottom: 10px; }
.table-wrap.tall { max-height: 520px; overflow-y: auto; }
.table-wrap.tall th { position: sticky; top: 0; }
.table-wrap td { white-space: normal; }
.legend-pin, .legend-dot { display: inline-block; vertical-align: middle; border-radius: 50%; }
.legend-pin { width: 12px; height: 12px; background: var(--accent); }
.legend-dot { width: 9px; height: 9px; background: var(--primary); margin-left: 6px; }
.near { list-style: none; padding: 0; columns: 2; }
.near li { margin-bottom: 6px; break-inside: avoid; }
@media (max-width: 760px) { .near { columns: 1; } }

/* 도시 페이지: 직접 조사 / 지도 데이터 필터 */
.src-head { flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 8px; }
.src-head h2 { margin: 0; }
.seg { display: inline-flex; gap: 4px; padding: 4px; background: var(--soft); border-radius: 99px; flex-wrap: wrap; }
.seg button { font: inherit; font-size: .85rem; border: 0; background: transparent; color: #5b5148; padding: 7px 14px; border-radius: 99px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.seg button .legend-dot { margin-left: 0; }
.seg button[aria-pressed="true"] { background: #fff; color: var(--primary); font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.seg button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
