/* Off-Rhyo share receiver — Rhyo design system basics, no third-party
   fonts (privacy + offline-resilience). System font stack mirrors the
   app's body type; the brandline is intentionally a touch heavier.

   No tracking pixels, no analytics, no ads — this surface exists for
   exactly one reason: a non-Rhyo recipient sees a live map. Anything
   else is noise. */

:root {
  --bg: #f4f4f7;
  --card: #ffffff;
  --indigo-100: #eef2ff;
  --indigo-200: #c7d2fe;
  --indigo-500: #6366f1;
  --indigo-600: #4f46e5;
  --indigo-700: #4338ca;
  --sky-500: #0ea5e9;
  --slate-50: #f8fafc;
  --slate-300: #cbd5e1;
  --slate-500: #64748b;
  --slate-700: #334155;
  --slate-900: #0f172a;
  --rose-500: #f43f5e;
  --emerald-500: #22c55e;
  --shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--slate-900);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Helvetica, Arial,
    sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hero {
  background: linear-gradient(135deg, var(--indigo-600) 0%, var(--indigo-500) 50%, var(--sky-500) 100%);
  color: #ffffff;
  padding: 28px 20px 24px;
  box-shadow: var(--shadow);
}

.hero-inner {
  max-width: 720px;
  margin: 0 auto;
}

.brandline {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  opacity: 0.85;
  margin-bottom: 6px;
}

.sharer {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
}

.freshness {
  margin-top: 8px;
  font-size: 13px;
  opacity: 0.85;
}

#main {
  flex: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 16px;
}

.state-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.state-card h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.state-card p {
  margin: 0;
  color: var(--slate-500);
  font-size: 14px;
  max-width: 480px;
}

.state-card.error h2 {
  color: var(--rose-500);
}

.state-card.ended {
  background: var(--slate-900);
  color: #ffffff;
}

.state-card.ended h2 {
  color: #ffffff;
}

.state-card.ended p {
  color: rgba(255, 255, 255, 0.7);
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--indigo-200);
  border-top-color: var(--indigo-600);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.map {
  width: 100%;
  height: 60vh;
  min-height: 360px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  background: #1e1b4b;
}

.meta {
  margin-top: 12px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
}

.meta-line {
  font-size: 14px;
  font-weight: 600;
  color: var(--slate-700);
}

.meta-sub {
  font-size: 12px;
  color: var(--slate-500);
  margin-top: 4px;
}

.footer-priv {
  max-width: 720px;
  margin: 12px auto 0;
  padding: 16px 20px 28px;
  color: var(--slate-500);
  font-size: 12px;
  line-height: 1.55;
}

.footer-priv p {
  margin: 0;
  max-width: 600px;
}

.hidden {
  display: none !important;
}

/* Mobile tweaks — most receivers will open this on a phone, in iOS
   Safari or Android Chrome. */
@media (max-width: 480px) {
  .hero {
    padding: 22px 16px 20px;
  }
  .sharer {
    font-size: 19px;
  }
  .map {
    height: 64vh;
    min-height: 320px;
    border-radius: 12px;
  }
}
