/* === RESET & BASE === */
:root {
  --bg:          #f3efe7;
  --paper:       #ebe5d8;
  --ink:         #1c1917;
  --muted:       #6b6357;
  --hairline:    rgba(28, 25, 23, 0.15);
  --accent:      #b85c3d;
  --accent-soft: #dca87f;
  --filmed:      #b85c3d;
  --some:        #dca87f;
  --unfilmed:    #d5d0c4;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Noto Sans JP', 'Noto Sans KR', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Noto Serif JP', serif;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

a { color: inherit; }

/* === LAYOUT === */
.container        { max-width: 1180px; margin: 0 auto; padding: 0 32px; }
.container-narrow { max-width: 760px;  margin: 0 auto; padding: 0 32px; }

/* === TOPBAR === */
.topbar {
  border-bottom: 1px solid var(--hairline);
  padding: 18px 0;
  font-size: 13px;
  letter-spacing: 0.04em;
}
.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.brand {
  font-weight: 700;
  font-family: 'Noto Sans KR', sans-serif;
  text-decoration: none;
}
.topbar nav a {
  margin-left: 24px;
  text-decoration: none;
  color: var(--muted);
  transition: color .15s;
}
.topbar nav a:hover { color: var(--ink); }

/* === BREADCRUMB === */
.breadcrumb {
  padding: 24px 0;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--hairline);
}
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb .sep { margin: 0 10px; opacity: .5; }
.breadcrumb .current {
  font-family: 'Noto Sans KR', sans-serif;
  color: var(--ink);
  font-weight: 500;
}

/* === HERO (TOP PAGE) === */
.hero { padding: 96px 0 80px; }
.hero--image {
  padding: 120px 0 100px;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center top;
  color: #fff;
}
.hero--image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(243, 239, 231, 0.88);
  z-index: 0;
}
.hero--image .container {
  position: relative;
  z-index: 1;
}
.hero--image         { color: var(--ink); }
.hero--image .kicker { color: var(--accent); }
.hero--image .lead   { color: var(--muted); }

.kicker {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
  font-weight: 700;
}
.hero h1 {
  font-size: clamp(34px, 5.4vw, 68px);
  max-width: 18ch;
  margin-bottom: 28px;
}
.hero .lead {
  font-size: 14px;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-family: 'Noto Sans JP', sans-serif;
  text-transform: uppercase;
}

/* === DISTRICT HERO === */
.district-hero { padding: 80px 0 60px; }
.district-hero .kicker {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
  font-weight: 700;
}
.district-hero h1 {
  font-size: clamp(48px, 7vw, 96px);
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.district-hero .lead {
  font-size: 16px;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 32px;
  font-family: 'Noto Sans JP', sans-serif;
}
.district-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.district-tags .tag {
  display: inline-block;
  padding: 6px 14px;
  background: var(--paper);
  border: 1px solid var(--hairline);
  font-size: 12px;
  font-family: 'Noto Sans JP', sans-serif;
  letter-spacing: 0.04em;
}

/* === STATS BAR === */
.stats-bar {
  background: var(--paper);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: 28px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
}
@media (max-width: 880px) { .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
.stats-grid div { display: flex; flex-direction: column; gap: 4px; }
.stats-grid dt {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.stats-grid dd { font-size: 15px; font-weight: 700; font-family: 'Noto Sans KR', sans-serif; }

/* === SECTION === */
.section { padding: 84px 0; border-top: 1px solid var(--hairline); }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 44px;
  flex-wrap: wrap;
  gap: 16px;
}
.section-head h2 { font-size: clamp(24px, 3.2vw, 32px); }
.section-head .meta { color: var(--muted); font-size: 13px; letter-spacing: 0.05em; }

/* === ESSAY === */
.essay h2 {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 700;
}
.essay p { font-size: 18px; line-height: 1.95; margin-bottom: 20px; }
.essay p:last-child { margin-bottom: 0; }

/* === MAP === */
.map-wrap {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 32px;
}
@media (max-width: 880px) { .map-wrap { grid-template-columns: 1fr; } }

#seoul-map {
  height: 560px;
  background: var(--paper);
  border: 1px solid var(--hairline);
}
@media (max-width: 880px) { #seoul-map { height: 420px; } }

#district-map {
  height: 480px;
  background: var(--paper);
  border: 1px solid var(--hairline);
}
@media (max-width: 880px) { #district-map { height: 360px; } }

.leaflet-container { background: var(--paper); font-family: inherit; cursor: default; }
.leaflet-interactive { cursor: pointer; }
.leaflet-tooltip {
  background: var(--ink);
  color: var(--bg);
  border: none;
  border-radius: 0;
  box-shadow: none;
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 12px;
  padding: 4px 10px;
  letter-spacing: 0.04em;
  font-weight: 500;
}
.leaflet-tooltip-top:before,
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before { display: none; }

.map-note { margin-top: 14px; font-size: 12px; color: var(--muted); letter-spacing: 0.04em; }

/* Info panel */
.info-panel {
  padding: 28px;
  background: var(--paper);
  border: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  min-height: 460px;
}
.info-panel .placeholder { color: var(--muted); font-size: 14px; line-height: 1.8; }
.info-panel h3 { font-size: 32px; margin-bottom: 6px; font-family: 'Noto Sans KR', sans-serif; font-weight: 700; }
.info-panel .info-jp { color: var(--muted); font-size: 13px; letter-spacing: 0.05em; margin-bottom: 20px; }
.info-panel .info-desc { font-size: 14px; line-height: 1.8; margin-bottom: 24px; }
.info-panel .info-stats {
  padding-top: 20px;
  border-top: 1px solid var(--hairline);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  font-size: 13px;
}
.info-panel .info-stats div { display: flex; flex-direction: column; }
.info-panel .info-stats dt { color: var(--muted); margin-bottom: 4px; }
.info-panel .info-stats dd { font-weight: 700; font-size: 15px; }
.info-panel .info-cta { margin-top: auto; padding-top: 28px; }
.info-panel .btn {
  display: inline-block;
  padding: 12px 24px;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.06em;
  font-weight: 700;
  transition: background .15s;
}
.info-panel .btn:hover { background: var(--accent); }
.info-panel .btn.disabled { background: var(--unfilmed); color: var(--muted); pointer-events: none; }

/* Legend */
.legend { display: flex; gap: 24px; margin-top: 20px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.legend i { display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: -2px; border: 1px solid var(--ink); }
.legend i.filmed { background: var(--filmed); }
.legend i.some   { background: var(--some); }
.legend i.none   { background: var(--unfilmed); }

/* Random button */
.random-btn {
  background: transparent;
  border: 1px solid var(--ink);
  padding: 10px 18px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: 0.04em;
  font-weight: 500;
  transition: all .15s;
}
.random-btn:hover { background: var(--ink); color: var(--bg); }

/* === VIDEO / FEATURED CARD === */
.featured-card {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 880px) { .featured-card { grid-template-columns: 1fr; } }

.video-frame {
  position: relative;
  padding-bottom: 56.25%;
  background: var(--ink);
  overflow: hidden;
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.featured-meta h3 { font-size: clamp(22px, 2.6vw, 30px); margin-bottom: 8px; font-family: 'Noto Sans KR', sans-serif; font-weight: 700; }
.featured-meta .sub { color: var(--muted); margin-bottom: 24px; font-size: 13px; letter-spacing: 0.05em; }
.featured-meta p { line-height: 1.85; }
.featured-meta .video-stats {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--hairline);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  font-size: 12px;
}
.featured-meta .video-stats dt { color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 4px; }
.featured-meta .video-stats dd { font-weight: 700; font-size: 13px; font-family: 'Noto Sans KR', sans-serif; }
.featured-meta .tags { margin-top: 24px; }

.tag {
  display: inline-block;
  padding: 4px 10px;
  background: var(--paper);
  border: 1px solid var(--hairline);
  font-size: 12px;
  margin-right: 6px;
  margin-bottom: 6px;
  font-family: 'Noto Sans KR', sans-serif;
  text-decoration: none;
}

.placeholder-note {
  margin-top: 18px;
  padding: 12px 16px;
  background: rgba(184, 92, 61, 0.08);
  border-left: 3px solid var(--accent);
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}

/* === THEME GRID === */
.theme-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 720px) { .theme-grid { grid-template-columns: 1fr 1fr; } }

.theme-card {
  background: var(--paper);
  border: 1px solid var(--hairline);
  padding: 28px;
  text-decoration: none;
  display: block;
  transition: all .2s;
}
.theme-card:hover { background: var(--ink); color: var(--bg); }
.theme-card h3 { font-size: 22px; font-family: 'Noto Sans KR', sans-serif; font-weight: 700; margin-bottom: 4px; }
.theme-card .tag-jp { font-size: 13px; color: var(--muted); display: block; }
.theme-card:hover .tag-jp { color: var(--accent-soft); }
.theme-card .count { margin-top: 18px; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }

/* === WALKING TIPS === */
.walking-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px 48px; }
@media (max-width: 720px) { .walking-grid { grid-template-columns: 1fr; gap: 28px; } }
.walking-grid h4 {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 700;
}
.walking-grid p { font-size: 15px; line-height: 1.85; }

/* === RELATED DISTRICTS === */
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 720px) { .related-grid { grid-template-columns: 1fr; } }

.related-card {
  background: var(--paper);
  border: 1px solid var(--hairline);
  padding: 28px;
  text-decoration: none;
  display: block;
  transition: all .2s;
}
.related-card:hover { background: var(--ink); color: var(--bg); }
.related-card .rel-label { display: block; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.related-card:hover .rel-label { color: var(--accent-soft); }
.related-card h3 { font-size: 22px; font-family: 'Noto Sans KR', sans-serif; font-weight: 700; margin-bottom: 4px; }
.related-card .tag-jp { font-size: 13px; color: var(--muted); display: block; }
.related-card:hover .tag-jp { color: var(--accent-soft); }

/* === ABOUT === */
.about-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 60px; }
@media (max-width: 720px) { .about-grid { grid-template-columns: 1fr; gap: 24px; } }
.about-grid h2 { font-size: clamp(24px, 3.2vw, 32px); }
.about-grid p { margin-bottom: 18px; }
.about-grid .yt-link { display: inline-block; margin-top: 12px; border-bottom: 1px solid currentColor; text-decoration: none; font-weight: 500; }

/* === MISC === */
.back-link { margin-top: 48px; display: inline-block; border-bottom: 1px solid currentColor; text-decoration: none; font-size: 14px; font-weight: 500; }

/* === FOOTER === */
footer { border-top: 1px solid var(--hairline); padding: 40px 0; font-size: 13px; color: var(--muted); }
footer .footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; }

/* === 404 === */
.not-found-wrap { padding: 120px 0; text-align: center; }
.not-found-wrap h1 { font-size: clamp(60px, 10vw, 120px); color: var(--unfilmed); }
.not-found-wrap p { margin-top: 20px; color: var(--muted); }
.not-found-wrap a { margin-top: 32px; display: inline-block; border-bottom: 1px solid currentColor; text-decoration: none; font-weight: 500; }
