:root {
  --brand: #0b3d2e;
  --brand-light: #1d6f54;
  --bg: #f5f7f6;
  --text: #1a1a1a;
  --muted: #6b7280;
  --accent: #f59e0b;
  --danger: #b91c1c;
  --success: #15803d;
  --safe-top: env(safe-area-inset-top, 0);
  --safe-bottom: env(safe-area-inset-bottom, 0);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
}

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

#status-banner {
  background: var(--brand);
  color: #fff;
  padding: calc(12px + var(--safe-top)) 16px 12px;
  flex: 0 0 auto;
}

.banner-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.banner-primary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 18px;
  font-weight: 600;
}

.banner-secondary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  opacity: 0.92;
}

.muted {
  opacity: 0.75;
  font-size: 12px;
}

.pill {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#status-banner[data-state="arrived"] .pill {
  background: var(--accent);
  color: #1a1a1a;
}

#status-banner[data-state="complete"] .pill {
  background: var(--success);
}

#status-banner[data-state="expired"],
#status-banner[data-state="error"] {
  background: var(--danger);
}

#status-banner[data-state="expired"] .pill,
#status-banner[data-state="error"] .pill {
  background: rgba(255, 255, 255, 0.2);
}

main#map {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
}

footer {
  flex: 0 0 auto;
  padding: 12px 16px calc(12px + var(--safe-bottom));
  background: #fff;
  border-top: 1px solid #e5e7eb;
}

.call-button {
  display: block;
  text-align: center;
  text-decoration: none;
  background: var(--brand-light);
  color: #fff;
  padding: 14px 16px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 16px;
}

.call-button:active {
  background: var(--brand);
}

noscript {
  padding: 24px;
  text-align: center;
  color: var(--danger);
}
