:root {
  --bg: #faf7f2;
  --ink: #171512;
  --ink-soft: #5c5449;
  --accent: #ff4e32;
  --accent-deep: #c22b12;
  --line: #e4dcce;
  --card: #f1ece2;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Archivo", system-ui, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6vh clamp(1.2rem, 5vw, 2rem);
}
.sheet { max-width: 720px; width: 100%; text-align: center; }

h1 {
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(3.4rem, 13vw, 7.4rem);
  line-height: 0.86;
  letter-spacing: -0.02em;
  margin: 0 0 2.4rem;
  text-wrap: balance;
}

button.go {
  font-family: "Archivo", sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(1.15rem, 3vw, 1.4rem);
  letter-spacing: 0.01em;
  color: var(--bg);
  background: var(--accent);
  border: none;
  border-radius: 8px;
  padding: 1rem 2.8rem;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.1s ease;
}
button.go:hover { background: var(--accent-deep); }
button.go:active { transform: translateY(2px); }
button.go:disabled { opacity: 0.5; cursor: default; }

.fine {
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-top: 1rem;
}

#ask.hide { display: none; }
#results { display: none; }
#results.show { display: block; }

.counter-num {
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  font-size: clamp(3.6rem, 14vw, 7.5rem);
  line-height: 1.15;
  color: var(--accent);
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}
.counter-caption {
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 2.2rem;
}

.map-card {
  background: var(--card);
  border-radius: 20px;
  padding: 1.3rem 1.3rem 1.5rem;
  text-align: left;
}
.map-card-head {
  display: flex;
  justify-content: flex-end;
  align-items: baseline;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}
.map-card-head .live { color: var(--accent); }
.map-wrap {
  position: relative;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
}
/* The circular mask lives on this inner wrapper (not .map-wrap itself) so
   pin labels, positioned as a sibling below, can float above the globe
   without ever being clipped by it — see the "on top of everything" note
   in app.js. */
.globe-clip {
  position: absolute;
  inset: 0;
  background: var(--bg);
  border-radius: 50%;
  overflow: hidden;
}
.globe-clip canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
#globeCanvas { cursor: grab; touch-action: none; }
#globeCanvas.grabbing { cursor: grabbing; }
.pin-label {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -100%);
  margin-top: -8px;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  background: rgba(23, 21, 18, 0.9);
  color: var(--bg);
  font-weight: 600;
  font-size: 0.72rem;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  z-index: 2;
}
.map-caption {
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 0.8rem 0 0;
  text-align: center;
}

.zoom-controls {
  position: absolute;
  right: 2%;
  bottom: 2%;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  z-index: 3;
}
.zoom-controls button {
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  border: none;
  background: var(--ink);
  color: var(--bg);
  font-family: "Archivo", sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
  transition: opacity 0.1s ease, transform 0.1s ease;
}
.zoom-controls button:hover:not(:disabled) { opacity: 1; }
.zoom-controls button:active:not(:disabled) { transform: scale(0.92); }
.zoom-controls button:disabled { opacity: 0.3; cursor: default; }

footer {
  text-align: center;
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--ink-soft);
  padding: 0.6rem 1rem 1.8rem;
}

.share-btn {
  display: block;
  margin: 1.4rem auto 0;
  font-family: "Archivo", sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--ink);
  background: var(--bg);
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 0.6rem 1.6rem;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.1s ease;
}
.share-btn:hover { background: var(--card); }
.share-btn:active { transform: translateY(1px); }

.cooldown {
  text-align: center;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin: 1.2rem 0 0;
}
.cooldown span {
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  button.go { transition: none; }
}
