:root {
  --ink: #0f172a;
  --muted: #64748b;
  --pine: #15803d;
  --pine-soft: #f0fdf4;
  --paper: #ffffff;
  --bg: #f8fafc;
  --line: #e2e8f0;
  --sans: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; margin: 0; }

body {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 20px 16px 14px;
  background: var(--paper);
  border-right: 1px solid var(--line);
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--line);
  transition: background-color 0.15s ease;
}

.nav-btn:hover {
  background: #e2e8f0;
}

.filters { display: flex; gap: 6px; flex-wrap: wrap; }

.chip, .search input, .item {
  font: inherit;
  color: inherit;
}

.chip {
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
}

.chip[aria-pressed="true"] {
  background: var(--pine);
  color: #ffffff;
  border-color: var(--pine);
}

.search input {
  width: 100%;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  background: var(--bg);
  outline: none;
}

.search input:focus {
  background: #ffffff;
  border-color: var(--pine);
  box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.1);
}

.list, .programs { overflow: auto; min-height: 0; }

.list { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }

.item {
  text-align: left;
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.item:hover { border-color: #94a3b8; }

.item[aria-current="true"] {
  border-color: var(--pine);
  background: var(--pine-soft);
}

.item strong { display: block; font-size: 14px; font-weight: 700; }
.item span { color: var(--muted); font-size: 12px; }

.programs {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.programs h2 { margin: 0 0 6px; font-size: 14px; font-weight: 700; }
.programs p { margin: 0 0 6px; color: var(--muted); }
.programs a { color: var(--pine); font-weight: 600; text-decoration: none; }

main { position: relative; min-width: 0; }
#map { height: 100%; background: #e2e8f0; }

.hud {
  position: absolute;
  z-index: 500;
  left: 16px;
  top: 16px;
  max-width: min(360px, calc(100% - 32px));
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.hud strong { font-size: 16px; font-weight: 700; }
.hud p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.leaflet-tooltip { font-family: var(--sans); }

@media (max-width: 860px) {
  body { display: block; height: auto; }
  #map { height: 70vh; }
  .panel { border-right: 0; border-bottom: 1px solid var(--line); }
}
