:root {
  --bg: #f1f4f8; --card: #fff; --text: #16202e; --muted: #5d6b7e; --line: #d5dce6;
  --accent: #0b63ce; --accent-text: #fff; --error: #b3261e; --ok: #1a7f4b; --notice: #fff6dd;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0f1520; --card: #19212f; --text: #e8edf4; --muted: #9aa8bb; --line: #33405a;
    --accent: #5aa2ff; --accent-text: #08111f; --error: #ff8a80; --ok: #5fd39a; --notice: #3a3114; }
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; align-items: flex-start; justify-content: center;
  padding: 24px 16px; background: var(--bg); color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.card { width: 100%; max-width: 400px; background: var(--card); border-radius: 16px; padding: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .08); }
header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.logo { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  background: var(--accent); color: var(--accent-text); flex: none; }
h1 { font-size: 20px; margin: 0; }
h2 { font-size: 18px; margin: 0 0 12px; }
p { margin: 0 0 14px; }
.lead { font-size: 17px; }
.muted { color: var(--muted); font-size: 14px; }
.center { text-align: center; }
.btn { display: block; width: 100%; padding: 14px 16px; margin: 0 0 12px; border-radius: 12px;
  border: 1.5px solid var(--line); background: transparent; color: var(--text); font: inherit;
  font-weight: 600; text-align: center; text-decoration: none; cursor: pointer; }
.btn small { display: block; font-weight: 400; font-size: 13px; opacity: .8; margin-top: 2px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.plan { display: flex; justify-content: space-between; align-items: center; text-align: left; }
.link { display: block; margin: 4px auto 0; padding: 8px; background: none; border: 0; color: var(--accent);
  font: inherit; cursor: pointer; }
label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
input, textarea { width: 100%; padding: 13px 14px; margin-bottom: 12px; border-radius: 12px;
  border: 1.5px solid var(--line); background: transparent; color: var(--text); font: inherit; }
input { font-size: 18px; letter-spacing: .5px; }
textarea { font: 12px/1.4 ui-monospace, Menlo, Consolas, monospace; resize: none; word-break: break-all; }
input:focus, textarea:focus, .btn:focus-visible, .link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.error { color: var(--error); font-size: 14px; }
.notice { background: var(--notice); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; font-size: 14px; }
.notice .btn { margin: 0; }
.summary { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: 12px; }
.summary strong { font-size: 20px; }
#pix-qr { display: block; margin: 0 auto 14px; background: #fff; padding: 8px; border-radius: 12px; }
.check { width: 64px; height: 64px; margin: 4px auto 14px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ok); color: var(--card); font-size: 34px; font-weight: 700; }
.check + h2 { text-align: center; }
.spinner { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--line);
  border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; vertical-align: -1px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
[hidden] { display: none !important; }
