:root {
  --bg: #0a0a0a;
  --card: #1c1c1e;
  --chip: #2c2c2e;
  --text: #f5f5f7;
  --muted: #8e8e93;
  --orange: #ff9f0a;
  --miss: #ff453a;
  --hit: #30d158;
  --line: #3a3a3c;
  --radius: 16px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  min-height: 100%;
}
body {
  -webkit-font-smoothing: antialiased;
}

.shell {
  max-width: 420px;
  margin: 0 auto;
  padding: 20px 20px calc(28px + var(--safe-bottom));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  color: var(--muted);
  font-size: 15px;
  letter-spacing: -0.01em;
}
.title { font-weight: 500; }
.date { font-weight: 400; }

.hero { margin-top: 8px; }
.projected {
  font-size: 64px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}
.projected-label {
  margin-top: 6px;
  color: var(--muted);
  font-size: 16px;
}
.status {
  margin-top: 14px;
  color: var(--muted);
  font-size: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.status strong { color: var(--text); font-weight: 600; }
.status .dot { opacity: 0.5; }
#tilt { color: var(--text); font-weight: 500; }

.chart-wrap {
  position: relative;
  height: 96px;
  margin: 8px 0 4px;
}
#spark {
  width: 100%;
  height: 100%;
  display: block;
}
.now-tag {
  position: absolute;
  top: 4px;
  color: var(--muted);
  font-size: 12px;
  transform: translateX(-50%);
  pointer-events: none;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px 16px 16px;
}
.card-top {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 10px;
}
.card-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.card-value {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.miss {
  font-size: 14px;
  font-weight: 600;
  color: var(--miss);
}
.miss.hit { color: var(--hit); }
.miss.empty { color: var(--muted); font-weight: 500; }

.chip {
  background: var(--chip);
  border-radius: 999px;
  padding: 12px 16px;
  color: var(--muted);
  font-size: 14px;
  text-align: left;
}

.alert-btn {
  margin-top: auto;
  width: 100%;
  border: none;
  border-radius: 14px;
  background: var(--card);
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
  padding: 16px;
  cursor: pointer;
}
.alert-btn:active { opacity: 0.85; }

.footnote {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  min-height: 1.2em;
}

.err .projected { font-size: 28px; color: var(--muted); }
