:root {
  --bg: #1b1b1f;
  --fg: #f2f2f5;
  --muted: #a0a0aa;
  --accent: #4c8dff;
  --seen: #e0574e;
  --gone: hsl(280, 100%, 50%);
  --proposed: #f2b53b;
  --panel: rgba(27, 27, 31, 0.88);
  --radius: 14px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--fg);
  -webkit-tap-highlight-color: transparent;
}

/* Full-screen map. */
#map { position: absolute; inset: 0; }

.panel {
  position: absolute;
  z-index: 5;
  background: var(--panel);
  color: var(--fg);
  backdrop-filter: blur(8px);
  border-radius: var(--radius);
  padding: 10px 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  font-size: 14px;
}

/* Time-back slider bar: bottom, full width, discreet. */
#selection {
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 30em;
}
#timelabel { white-space: nowrap; min-width: 3.5em; font-variant-numeric: tabular-nums; }
#timeslider { flex: 1; accent-color: var(--accent); }
#reportcount { white-space: nowrap; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.chk { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; white-space: nowrap; }

/* Bottom sheet: discreet, dismissable, never full-screen-blocking. */
.sheet {
  position: absolute;
  z-index: 10;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  max-height: 55vh;
  overflow-y: auto;
  background: var(--panel);
  backdrop-filter: blur(10px);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  transition: transform 0.18s ease, opacity 0.18s ease;
}
.sheet.hidden { transform: translateY(120%); opacity: 0; pointer-events: none; }
.sheet-close {
  position: absolute; top: 8px; right: 12px;
  background: none; border: none; color: var(--muted);
  font-size: 26px; line-height: 1; cursor: pointer;
}
.sheet h2 { margin: 0 6px 10px 0; font-size: 16px; }
.sheet p { margin: 4px 0; color: var(--muted); font-size: 13px; }
/* Street View link in a point's title. */
.gsv { text-decoration: none; font-size: 1.2em; vertical-align: middle; }

.btn {
  display: block;
  width: 100%;
  margin: 8px 0 0;
  padding: 12px 14px;
  border: none;
  border-radius: 10px;
  background: #2c2c33;
  color: var(--fg);
  font-size: 15px;
  text-align: left;
  cursor: pointer;
}
.btn:active { background: #37373f; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.danger { background: var(--gone); color: #fff; }
.btn.seen { background: var(--seen); color: #08240f; }

.sheet input[type="text"], .sheet textarea {
  width: 100%; margin-top: 8px; padding: 10px;
  border-radius: 10px; border: 1px solid #3a3a42;
  background: #17171b; color: var(--fg); font-size: 15px;
}

/* Map markers (DOM markers). */
.marker {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.5);
  cursor: pointer;
}
.marker.exists   { background: var(--seen); }
/* Reported gone: hollow, ghostly ring rather than a solid dot. */
.marker.gone     { background: transparent; border-color: var(--gone); opacity: 0.55; box-shadow: none; }
.marker.proposed { background: var(--proposed); border-style: dashed; }
/* Nearby existing reports offered as choices when proposing a new report. */
.marker.candidate { background: transparent; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(76, 141, 255, 0.35); }

.toast {
  position: absolute; z-index: 20;
  left: 50%; top: calc(16px + env(safe-area-inset-top));
  transform: translateX(-50%);
  background: #000c; color: #fff;
  padding: 10px 16px; border-radius: 20px; font-size: 14px;
  transition: opacity 0.2s;
}
.toast.hidden { opacity: 0; pointer-events: none; }
