:root {
  --bg: #06101f;
  --panel: rgba(9, 18, 34, 0.86);
  --edge: rgba(120, 160, 220, 0.22);
  --text: #e6edf7;
  --muted: #8fa3bf;
  --accent: #4fc3ff;
}

html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font: 13px/1.35 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
#map { position: fixed; inset: 0; background: var(--bg); }
.leaflet-container { background: var(--bg); font: inherit; }
.leaflet-tile { image-rendering: pixelated; }

.panel { position: fixed; z-index: 1000; background: var(--panel); border: 1px solid var(--edge);
  border-radius: 10px; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45); backdrop-filter: blur(6px); }

.brand { position: fixed; z-index: 1000; top: 12px; right: 12px; display: flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 8px; background: var(--panel); border: 1px solid var(--edge); border-radius: 999px;
  color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: 0.02em; }
.brand img { border-radius: 6px; }
.brand:hover { border-color: var(--accent); }

.legend { top: 12px; left: 12px; width: 210px; max-height: calc(100% - 80px); overflow: auto; }
.panel__head { all: unset; box-sizing: border-box; width: 100%; display: flex; justify-content: space-between;
  align-items: center; padding: 9px 12px; cursor: pointer; font-weight: 700; font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.panel__head:focus-visible { outline: 2px solid var(--accent); border-radius: 10px; }
.legend.closed .panel__body { display: none; }
.legend.closed .chev { transform: rotate(-90deg); }
.chev { transition: transform 0.15s; }
.panel__body { padding: 0 8px 8px; }

.group { margin-top: 6px; }
.group__title { padding: 4px 4px 2px; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); }
.row { all: unset; box-sizing: border-box; width: 100%; display: flex; align-items: center; gap: 9px;
  padding: 4px 6px; border-radius: 6px; cursor: pointer; }
.row:hover { background: rgba(255, 255, 255, 0.06); }
.row:focus-visible { outline: 2px solid var(--accent); }
.row.off { opacity: 0.38; }
.row .n { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.sw { width: 14px; height: 14px; flex: none; border-radius: 3px; border: 2px solid; box-sizing: border-box; }
.sw.dot { border-radius: 50%; }
.sw.star { border: 0; width: 16px; height: 16px; text-align: center; line-height: 16px; font-size: 15px; }
.sw.you { border: 0; width: 16px; height: 16px; }

.coords { bottom: 12px; left: 50%; transform: translateX(-50%); padding: 5px 12px;
  font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.status { bottom: 52px; left: 50%; transform: translateX(-50%); padding: 7px 14px; color: var(--text);
  white-space: nowrap; max-width: calc(100% - 32px); overflow: hidden; text-overflow: ellipsis; }

.zone-label { background: rgba(6, 16, 31, 0.78); border: 0; border-radius: 5px; color: #fff; font-weight: 600;
  font-size: 11px; padding: 2px 6px; box-shadow: none; white-space: nowrap; }
.zone-label::before { display: none; }
.leaflet-tooltip.zone-label { pointer-events: none; }

.you-marker { filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.8)); }
.camp-marker { color: #ffcf33; font-size: 20px; line-height: 20px; text-align: center;
  text-shadow: 0 0 4px #000, 0 0 2px #000; }

.leaflet-control-zoom a { background: var(--panel); color: var(--text); border-color: var(--edge); }
.leaflet-control-zoom a:hover { background: #12233f; color: #fff; }
.leaflet-bar { border: 1px solid var(--edge); }
.leaflet-top.leaflet-right { top: 54px; }

@media (max-width: 600px) {
  .legend { width: auto; right: 64px; }
  .brand span { display: none; }
  .brand { padding: 6px; }
  .leaflet-top.leaflet-right { top: auto; bottom: 52px; }
}
