:root {
  color-scheme: dark;
  --bg: #07060b;
  --ink: #f6f2ff;
  --muted: #b7abc9;
  --faint: #8d7fa6;
  --neon: #f0abfc;
  --cyan: #67e8f9;
  --line: rgba(240, 171, 252, 0.38);
  --card: rgba(14, 10, 22, 0.92);
  --good: #d9f99d;
  --warn: #fbbf24;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
}

body {
  background:
    radial-gradient(900px 420px at 50% -10%, rgba(168, 85, 247, 0.22), transparent 55%),
    var(--bg);
}

a { color: var(--neon); }

button, input { font: inherit; }

button {
  cursor: pointer;
}

button:focus-visible, a:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

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

.leaflet-container {
  background: #0b0812;
  font: inherit;
}

.leaflet-control-attribution {
  background: rgba(7, 6, 11, 0.72) !important;
  color: var(--faint) !important;
  font-size: 10px !important;
  max-width: 70vw;
}

.leaflet-control-attribution a { color: var(--muted) !important; }

.leaflet-bar a {
  background: #14101c !important;
  color: var(--ink) !important;
  border-bottom-color: rgba(240, 171, 252, 0.25) !important;
}

header {
  position: fixed;
  z-index: 500;
  top: calc(12px + env(safe-area-inset-top));
  left: 12px;
  right: 72px;
  pointer-events: none;
}

.brand {
  margin: 0;
  color: var(--neon);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.product {
  margin: 2px 0 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  margin-right: 0.35rem;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 0 rgba(103, 232, 249, 0.7);
  animation: pulse 2.2s ease-out infinite;
  vertical-align: 0.05em;
}

body.is-ended .dot { animation: none; background: var(--faint); box-shadow: none; }
body.is-almost .dot { background: var(--good); }
body.is-arrived .dot { background: var(--good); }

@keyframes pulse {
  70% { box-shadow: 0 0 0 8px rgba(103, 232, 249, 0); }
  100% { box-shadow: 0 0 0 0 rgba(103, 232, 249, 0); }
}

#card {
  position: fixed;
  z-index: 500;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  max-height: min(420px, 50vh);
  overflow: auto;
  padding: 18px 18px 14px;
  border-radius: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(16px);
}

body.is-almost #card { border-color: rgba(217, 249, 157, 0.7); }
body.is-arrived #card { border-color: rgba(217, 249, 157, 0.9); }

#phase {
  margin: 0;
  color: var(--neon);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body.is-almost #phase, body.is-arrived #phase { color: var(--good); }

#hero {
  margin: 6px 0 0;
  font-size: clamp(2.3rem, 12vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
}

#support, #note, #updated {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

#note { color: var(--faint); font-size: 0.82rem; }

#updated.stale { color: var(--warn); }

#locate {
  width: 100%;
  height: 48px;
  margin-top: 14px;
  border: 0;
  border-radius: 14px;
  background: var(--neon);
  color: #1a0a16;
  font-weight: 700;
}

#privacy {
  display: inline-block;
  margin-top: 12px;
  color: var(--faint);
  font-size: 0.82rem;
  text-decoration: none;
}

#recenter {
  position: fixed;
  z-index: 500;
  right: 12px;
  bottom: calc(230px + env(safe-area-inset-bottom));
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #14101c;
  color: var(--ink);
  font-weight: 700;
}

.pin-wrap { background: none !important; border: none !important; }

.pin {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 6px rgba(240, 171, 252, 0.25);
}

.pin-them {
  background: #f0abfc;
  position: relative;
  transform: rotate(var(--heading, 0deg));
}

.pin-them::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -7px;
  width: 0;
  height: 0;
  margin-left: -5px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 9px solid #67e8f9;
}

.pin-you {
  width: 16px;
  height: 16px;
  background: #67e8f9;
  box-shadow: 0 0 0 5px rgba(103, 232, 249, 0.25);
}

.noscript {
  position: fixed;
  z-index: 600;
  left: 16px;
  right: 16px;
  bottom: 16px;
  padding: 16px;
  background: #14101c;
  border-radius: 16px;
}

.sheet {
  width: min(40rem, calc(100% - 32px));
  margin: 0 auto;
  padding: calc(28px + env(safe-area-inset-top)) 0 calc(48px + env(safe-area-inset-bottom));
}

.sheet h1 {
  margin: 8px 0 0;
  font-size: clamp(2.2rem, 8vw, 3.4rem);
  letter-spacing: -0.045em;
  line-height: 0.95;
}

.sheet h2 {
  margin: 2rem 0 0.4rem;
  font-size: 1.15rem;
}

.sheet p, .sheet li { color: var(--muted); line-height: 1.5; }

.sheet .lead { color: var(--ink); font-size: 1.15rem; }

.sheet ul { padding-left: 1.1rem; }

.sheet blockquote {
  margin: 0.6rem 0;
  padding: 12px 14px;
  border-left: 3px solid var(--neon);
  background: rgba(240, 171, 252, 0.06);
  color: var(--ink);
}

@media (min-width: 800px) {
  #card {
    left: 50%;
    right: auto;
    width: min(440px, calc(100% - 48px));
    transform: translateX(-50%);
  }
}

@media (max-height: 520px) {
  #hero { font-size: 2rem; }
  #card { max-height: 46vh; padding-top: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .dot { animation: none; }
}
