:root {
  --bg: #F6F5F1;
  --bg-2: #ECEAE3;
  --card: #FFFFFF;
  --line: #DDDAD2;
  --line-2: #CFCBC1;
  --ink: #1B1F1D;
  --ink-2: #3C413D;
  --muted: #5B605C;
  --green: #1F5C4A;
  --green-dark: #123A2F;
  --green-soft: #DCE6E1;
  --amber: #E9B44C;
  --amber-ink: #6E470B;
  --amber-soft: #F6E7C4;
  --tile-empty: #E7E5DF;
  --green-tint: #B7D2C6;
  --amber-tint: #F4E1B5;
  --river: #CFE0EA;
  --river-ink: #2B4A5C;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141716;
    --bg-2: #1B1F1D;
    --card: #202522;
    --line: #333A36;
    --line-2: #46504A;
    --ink: #ECEEEA;
    --ink-2: #CDD2CD;
    --muted: #A3AAA4;
    --green: #3E9B7C;
    --green-dark: #8FD1B4;
    --green-soft: #1F3A31;
    --amber: #E9B44C;
    --amber-ink: #F1CD85;
    --amber-soft: #3A2E17;
    --tile-empty: #2A302D;
    --green-tint: #2C5446;
    --amber-tint: #4A3A1A;
    --river: #1E3440;
    --river-ink: #A9CBDD;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Noto Sans KR', system-ui, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  line-height: 1.6;
  word-break: keep-all;
}
a { color: var(--green); }
a:hover { color: var(--green-dark); }
img { max-width: 100%; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 24px; } }
.mono { font-family: 'IBM Plex Mono', ui-monospace, monospace; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; color: var(--green); margin: 0; }
.eyebrow.amber { color: var(--amber-ink); }
h1, h2, h3 { letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(32px, 6vw, 52px); line-height: 1.18; font-weight: 900; }
h2 { font-size: clamp(24px, 4vw, 32px); font-weight: 900; }
h3 { font-size: 20px; font-weight: 900; }
.lead { font-size: 17px; color: var(--ink-2); max-width: 600px; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* 상단 */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 900; font-size: 19px; }
.brand:hover { color: var(--ink); }
.nav { display: flex; flex-wrap: wrap; gap: 0 20px; font-size: 15px; font-weight: 500; }
.nav a { color: var(--ink); text-decoration: none; padding: 10px 0; display: inline-block; }
.nav a[aria-current="page"] { color: var(--green); font-weight: 700; }
.soon { font-size: 13px; font-weight: 700; color: var(--muted); border: 1px dashed var(--line-2); border-radius: 10px; padding: 10px 12px; }

/* 버튼 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 12px 20px; border-radius: 12px; font: inherit; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; border: 1px solid transparent; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); color: #fff; }
.btn-ghost { background: var(--card); color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { color: var(--ink); border-color: var(--ink); }

/* 섹션 */
section { padding: 56px 0; }
.band { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 24px; }
.sec-head p { margin: 8px 0 0; }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.grid-2 { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
a.card { text-decoration: none; color: var(--ink); }
a.card:hover { border-color: var(--green); color: var(--ink); }
.card p { margin: 0; }
.meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; font-size: 13px; color: var(--muted); }
.pill { display: inline-block; font-size: 13px; font-weight: 700; padding: 5px 10px; border-radius: 999px; }
.pill-done { background: var(--green-soft); color: var(--green-dark); }
.pill-plan { background: var(--amber-soft); color: var(--amber-ink); }
.lock { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--amber-ink); }

/* 첫 화면 */
.hero { display: flex; flex-wrap: wrap; gap: 40px; align-items: stretch; padding: 64px 0 56px; }
.hero-text { flex: 999 1 480px; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 20px; }
.hero-card { flex: 1 1 340px; min-width: 0; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stat b { display: block; font-size: 40px; line-height: 1; font-weight: 900; color: var(--green); }
.stat.amber b { color: var(--amber-ink); }
.stat span { font-size: 13px; color: var(--muted); }

/* 실제 경계 지도 */
svg.seoul { display: block; width: 100%; height: auto; }
svg.seoul .dongs path { stroke: var(--card); stroke-width: 0.6; stroke-linejoin: round; cursor: pointer; transition: opacity .15s; }
svg.seoul.mini .dongs path { stroke-width: 0.3; cursor: default; }
svg.seoul .d-none { fill: var(--tile-empty); }
svg.seoul .d-gu-done { fill: var(--green-tint); }
svg.seoul .d-gu-plan { fill: var(--amber-tint); }
svg.seoul .d-done { fill: var(--green); }
svg.seoul .d-plan { fill: var(--amber); }
svg.seoul .dongs path:hover { opacity: .8; }
svg.seoul .dongs path.sel { stroke: var(--ink); stroke-width: 1.4; }
svg.seoul .gu-lines path { fill: none; stroke: var(--ink-2); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; pointer-events: none; opacity: .7; }
svg.seoul.mini .gu-lines path { stroke-width: 1.2; opacity: .45; }
svg.seoul .labels text { font-size: 15px; font-weight: 700; fill: var(--ink-2); text-anchor: middle; dominant-baseline: middle; paint-order: stroke; stroke: var(--card); stroke-width: 3px; pointer-events: none; }
svg.seoul .labels text.lbl-done { fill: var(--green-dark); font-size: 17px; }
.gu-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* 지도 */
.tilemap { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-rows: repeat(3, var(--tile-h, 72px)) 26px repeat(2, var(--tile-h, 72px)); gap: 6px; }
.tilemap.mini { --tile-h: 22px; gap: 4px; grid-template-rows: repeat(3, 22px) 8px repeat(2, 22px); }
.tilemap .river { grid-column: 1 / -1; grid-row: 4; background: var(--river); color: var(--river-ink); border-radius: 6px; font-size: 12px; font-weight: 700; display: flex; align-items: center; padding-left: 12px; }
.tilemap.mini .river { font-size: 0; border-radius: 3px; }
.tile { border: 0; border-radius: 10px; font: inherit; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; padding: 4px; cursor: pointer; background: var(--tile-empty); color: var(--ink-2); min-height: 44px; }
.tilemap.mini .tile { min-height: 0; border-radius: 4px; cursor: default; }
.tile b { font-size: 15px; }
.tile small { font-size: 11px; font-weight: 500; }
.tile.done { background: var(--green); color: #fff; }
.tile.plan { background: var(--amber); color: #3D2706; }
.tile[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--ink); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--ink-2); margin-top: 16px; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 16px; height: 16px; border-radius: 4px; display: inline-block; }
.map-layout { display: flex; flex-wrap: wrap; gap: 24px; align-items: stretch; }
.map-box { flex: 999 1 560px; min-width: 0; }
.map-scroll { overflow-x: auto; }
.map-scroll .tilemap { min-width: 480px; }
.map-side { flex: 1 1 300px; min-width: 0; background: var(--ink); color: var(--bg); border-radius: 20px; padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.map-side a.item { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--bg); background: rgba(255,255,255,0.08); border-radius: 14px; padding: 16px; }
.map-side a.item:hover { background: rgba(255,255,255,0.14); }
.map-side .gu { font-family: 'IBM Plex Mono', monospace; font-weight: 600; color: var(--amber); font-size: 14px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .map-side { background: #0C0E0D; color: #ECEEEA; border: 1px solid var(--line); } :root:not([data-theme="light"]) .map-side a.item { color: #ECEEEA; } }

/* 기록 */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip { font: inherit; font-size: 14px; font-weight: 700; min-height: 44px; padding: 10px 16px; border-radius: 999px; cursor: pointer; background: var(--card); color: var(--ink); border: 1px solid var(--line-2); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.facts { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.fact { background: var(--bg); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 2px; }
.fact span { font-size: 12px; color: var(--muted); }
.fact b { font-size: 15px; }
.stops { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.stops li { position: relative; padding: 8px 0 8px 28px; font-size: 15px; }
.stops li::before { content: ''; position: absolute; left: 7px; top: 15px; width: 10px; height: 10px; border-radius: 50%; background: var(--green); }
.stops li::after { content: ''; position: absolute; left: 11px; top: 27px; bottom: -13px; width: 2px; background: var(--line-2); }
.stops li:last-child::after { display: none; }
.empty { border: 1px dashed var(--line-2); border-radius: 14px; padding: 20px; color: var(--muted); font-size: 14px; }
.row-link { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); background: var(--card); }
.row-link:hover { border-color: var(--green); color: var(--ink); }
.list { display: flex; flex-direction: column; gap: 10px; }
.crumbs { font-size: 14px; padding-top: 28px; }

/* 바닥 */
.site-footer { background: #1B1F1D; color: #C8CBC6; margin-top: 24px; }
.site-footer .wrap { padding-top: 36px; padding-bottom: 36px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; font-size: 14px; }
.site-footer a { color: #fff; }
.site-footer .links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.notice { font-size: 13px; color: var(--muted); margin-top: 12px; }
