:root {
  --bg: #1c1b20;
  --bg-mid: #27252c;
  --text: #ececef;
  --status: #c4c2c8;
  --muted: #8d8b93;
  --accent: #62a7fe;
  --track: #3a3940;
  --danger: #e8b4b4;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background:
    radial-gradient(ellipse at 50% 38%, var(--bg-mid) 0%, var(--bg) 62%);
}

.launch {
  min-height: 100vh;
  min-height: 100dvh;
  padding-top: calc(2.5rem + env(safe-area-inset-top));
  padding-bottom: calc(5.5rem + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.launch-center {
  width: min(100%, 24.5rem);
  padding: 0 1.75rem;
  text-align: center;
  opacity: 0;
  animation: launch-in 420ms ease-out forwards;
}

.brand {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--text);
}

.status {
  margin: 1.15rem 0 0;
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--status);
  line-height: 1.5;
}

.progress-wrap {
  margin-top: 1.85rem;
}

.progress-track {
  height: 3px;
  background: var(--track);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 1%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 180ms linear;
}

.progress-percent {
  margin: 0.7rem 0 0;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.error-detail {
  margin: 0.85rem 0 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--danger);
}

.retry {
  appearance: none;
  -webkit-appearance: none;
  margin-top: 1.35rem;
  min-height: 44px;
  padding: 0 1.5rem;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #16324f;
  font-size: 0.95rem;
  font-weight: 650;
  cursor: pointer;
}

.footer-hint {
  position: fixed;
  left: 1.25rem;
  right: 1.25rem;
  bottom: calc(1.15rem + env(safe-area-inset-bottom));
  margin: 0;
  text-align: center;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.hidden {
  display: none !important;
}

.launch.is-error .progress-wrap,
.launch.is-error .footer-hint {
  display: none;
}

@keyframes launch-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .launch-center {
    animation: none;
    opacity: 1;
  }
  .progress-bar {
    transition: none;
  }
}
