:root {
  --restaurant: #2a78d6;
  --cafe: #eb6834;
  --bar: #1baf7a;
  --ink: #1a1a1a;
  --ink-2: #5a5955;
  --panel-bg: rgba(255, 255, 255, 0.94);
  --line: #e4e2dd;
}

* { box-sizing: border-box; margin: 0; }

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--ink);
}

#map { position: fixed; inset: 0; background: #f4f2ee; }

.panel {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 1000;
  width: 320px;
  max-width: calc(100vw - 28px);
  background: var(--panel-bg);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.08);
  padding: 14px 16px 12px;
}

.title-row { display: flex; align-items: baseline; gap: 10px; }
.title-row h1 { font-size: 18px; font-weight: 650; letter-spacing: -0.01em; flex: 1; }
.home { color: var(--ink-2); text-decoration: none; font-size: 15px; }
.home:hover { color: var(--ink); }

#list-toggle {
  font: inherit; font-size: 12px; color: var(--ink-2);
  background: none; border: 1px solid var(--line); border-radius: 7px;
  padding: 3px 9px; cursor: pointer;
}
#list-toggle:hover, #list-toggle.on { color: var(--ink); border-color: var(--ink-2); }

.stats { font-size: 12.5px; color: var(--ink-2); margin: 6px 0 10px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font: inherit; font-size: 12.5px; color: var(--ink-2);
  background: none; border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 11px; cursor: pointer; opacity: 0.55;
}
.chip.on { color: var(--ink); opacity: 1; }
.chip:hover { border-color: var(--ink-2); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot-restaurant { background: var(--restaurant); }
.dot-cafe { background: var(--cafe); }
.dot-bar { background: var(--bar); }

.regions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.regions button {
  font: inherit; font-size: 11.5px; color: var(--ink-2);
  background: none; border: none; padding: 2px 7px; border-radius: 6px;
  cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px;
}
.regions button:hover { color: var(--ink); background: #f1efe9; }

#list-panel {
  position: fixed;
  top: 14px; right: 14px; bottom: 14px;
  z-index: 1000;
  width: 340px;
  max-width: calc(100vw - 28px);
  background: var(--panel-bg);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.08);
  overflow-y: auto;
  padding: 14px 16px;
}
#list-panel h2 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink-2); margin: 14px 0 6px; }
#list-panel h2:first-child { margin-top: 0; }
.place-row {
  display: flex; align-items: baseline; gap: 8px;
  padding: 3px 0; font-size: 13px; cursor: pointer; border-radius: 6px;
}
.place-row:hover { background: #f1efe9; }
.place-row .dot { flex: none; align-self: center; }
.place-row .nm { flex: 1; }
.place-row .ct { color: var(--ink-2); font-size: 11.5px; }
.place-row .vs { color: var(--ink-2); font-variant-numeric: tabular-nums; font-size: 12px; }

.leaflet-popup-content-wrapper { border-radius: 10px; }
.leaflet-popup-content { font-family: inherit; font-size: 13px; margin: 12px 15px; }
.popup-name { font-weight: 650; font-size: 14px; }
.popup-meta { color: var(--ink-2); margin-top: 2px; }
.popup-visits { margin-top: 7px; border-collapse: collapse; font-size: 12px; }
.popup-visits td { padding: 1px 0; color: var(--ink-2); }
.popup-visits td + td { padding-left: 16px; text-align: right; color: var(--ink);
  font-variant-numeric: tabular-nums; }
.popup-approx { color: #a08c46; margin-top: 5px; font-size: 11.5px; }

@media (max-width: 640px) {
  .panel { top: 10px; left: 10px; width: calc(100vw - 20px); padding: 11px 13px 10px; }
  .regions { display: none; }
  #list-panel { top: auto; height: 55vh; right: 10px; bottom: 10px; left: 10px; width: auto; }
}
