:root {
  --ink: #15171A; --sub: #5B6168; --line: #E3E5E1; --bg: #F4F5F2; --card: #FFFFFF; --blue: #1F4FD1; --orange: #A8400D;
  --good: #1D7A46; --bad: #B3261E;
  font-family: "IBM Plex Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  color: var(--ink); color-scheme: light;
}
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--bg); }
#map { position: absolute; inset: 0; }
.bar {
  position: absolute; z-index: 5; left: 0; right: 0; top: 0;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) max(12px, env(safe-area-inset-right, 0px)) 8px max(12px, env(safe-area-inset-left, 0px));
  display: flex; gap: 6px; flex-wrap: wrap; align-items: center; pointer-events: none;
}
.bar > * { pointer-events: auto; }
.chip {
  border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px;
  min-height: 36px; padding: 0 12px; font: inherit; font-size: 13px; box-shadow: 0 1px 3px rgba(0,0,0,.12);
  text-decoration: none; display: inline-flex; align-items: center;
}
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.meter {
  position: absolute; z-index: 5; left: max(12px, env(safe-area-inset-left, 0px)); bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
  background: rgba(21,23,26,.85); color: #fff; font-size: 12px; padding: 6px 10px; border-radius: 8px; max-width: 70vw;
  font-variant-numeric: tabular-nums;
}
.meter[data-state="good"] { background: var(--good); }
.meter[data-state="bad"] { background: var(--bad); }
.legend {
  position: absolute; z-index: 5; right: max(12px, env(safe-area-inset-right, 0px)); bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
  background: var(--card); border-radius: 10px; padding: 6px 8px; font-size: 11px; display: grid; gap: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.sheet {
  position: absolute; z-index: 6; left: 0; right: 0; bottom: 0; background: var(--card);
  border-radius: 16px 16px 0 0; box-shadow: 0 -2px 12px rgba(0,0,0,.15);
  padding: 14px max(16px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 16px) max(16px, env(safe-area-inset-left, 0px));
  display: grid; gap: 4px;
}
.sheet b { font-size: 16px; }
.sheet .row { display: flex; gap: 16px; font-size: 14px; font-variant-numeric: tabular-nums; }
.sheet .sub { color: var(--sub); font-size: 12px; }
.sheet button { justify-self: end; }
.pill {                                           /* 카카오 지도용 DOM 핀 */
  transform: translate(-50%, -100%); background: var(--c, var(--blue)); color: #fff; border-radius: 8px;
  font-size: 11px; font-weight: 600; padding: 2px 6px; white-space: nowrap; box-shadow: 0 1px 2px rgba(0,0,0,.25);
  font-variant-numeric: tabular-nums; cursor: pointer;
}
.pill.dot { width: 10px; height: 10px; padding: 0; border-radius: 50%; border: 1.5px solid #fff; transform: translate(-50%, -50%); }
.pill.dong { background: var(--card); color: var(--ink); border: 1px solid var(--line); font-weight: 500; text-align: center; line-height: 1.25; padding: 3px 7px; }
.pill.dong small { display: block; color: var(--sub); font-weight: 400; font-size: 10px; }
.index { max-width: 560px; margin: 0 auto; padding: 32px 16px; display: grid; gap: 14px; line-height: 1.6; }
.index a.card { display: grid; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; color: var(--ink); text-decoration: none; }
.index a.card:hover { border-color: var(--blue); }
.index .sub { color: var(--sub); font-size: 13px; }
