:root {
  color-scheme: light dark;
  --bg: #f5f5f7;
  --text: #1d1d1f;
  --muted: #86868b;
  --accent: #0071e3;
  --card: rgba(255, 255, 255, 0.64);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --text: #f5f5f7;
    --muted: #86868b;
    --accent: #0a84ff;
    --card: rgba(28, 28, 30, 0.72);
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Helvetica Neue", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
}

.stage {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 72px 32px 48px;
}

.hero {
  width: min(420px, 100%);
  text-align: center;
}

.mark {
  display: block;
  width: 72px;
  height: 72px;
  margin: 0 auto 22px;
  border-radius: 18px;
  object-fit: contain;
}

h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

#status {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  min-height: 1.5em;
}

.ring {
  width: 22px;
  height: 22px;
  margin: 28px auto 0;
  border-radius: 50%;
  border: 1.5px solid rgba(134, 134, 139, 0.28);
  border-top-color: var(--text);
  animation: spin 0.8s linear infinite;
}

.ring[hidden] { display: none; }

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

.pill {
  margin-top: 28px;
  appearance: none;
  border: 0;
  border-radius: 980px;
  background: var(--accent);
  color: #fff;
  font: 600 13px/1 -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  padding: 9px 18px;
  cursor: default;
}

.pill[hidden] { display: none; }

.pill.secondary {
  background: var(--card);
  color: var(--text);
}

.pill:disabled { opacity: 0.55; }

.update-panel {
  margin-top: 20px;
  padding: 16px;
  border-radius: 14px;
  background: var(--card);
}

.update-panel[hidden] { display: none; }

#update-notes {
  max-height: 120px;
  margin: 0;
  overflow: auto;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.update-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.update-actions .pill { margin-top: 16px; }

#detail {
  margin: 22px 0 0;
  text-align: left;
  max-height: 180px;
  overflow: auto;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--card);
  color: var(--muted);
  font: 11px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap;
}

#detail[hidden] { display: none; }
