:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --text: #15171a;
  --muted: #5d6470;
  --line: #e3e6ea;
  --accent: #0f9d58;
  --accent-text: #ffffff;
  --success: #0f9d58;
  --error: #d93025;
  --neutral: #6b7280;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1013;
    --card: #171a1f;
    --text: #eef0f3;
    --muted: #9aa2ad;
    --line: #2a2f37;
    --accent: #22c372;
    --accent-text: #06120b;
    --success: #22c372;
    --error: #ff6b5e;
    --neutral: #9aa2ad;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 24px;
  text-align: center;
}

h1 { font-size: 20px; margin: 12px 0 8px; }
p { margin: 0 0 14px; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 13px; margin-top: 14px; }

.eyebrow {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.amount {
  font-size: 38px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-bottom: 18px;
}
.amount span { font-size: 18px; color: var(--muted); font-weight: 600; }

.btn {
  display: block;
  width: 100%;
  padding: 14px 16px;
  margin-top: 6px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
  text-decoration: none;
}
.btn:hover { filter: brightness(1.05); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.badge {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
}
.badge-success { background: var(--success); }
.badge-error { background: var(--error); }
.badge-neutral { background: var(--neutral); }

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 6px;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .25; } }

.state { display: none; }
#pay[data-state="pending"] [data-show="pending"],
#pay[data-state="processing"] [data-show="processing"],
#pay[data-state="done"] [data-show="done"],
#pay[data-state="expired"] [data-show="expired"] { display: block; }

.foot { margin-top: 16px; color: var(--muted); font-size: 12px; }
