:root {
  --bg: #0d0a1a;
  --bg2: #151027;
  --card: #1a1430;
  --line: #2c2450;
  --text: #f3f0ff;
  --muted: #a49cc6;
  --accent: #a855f7;
  --accent2: #ec4899;
  --ok: #34d399;
  --bad: #fb7185;
  --twitch: #9146ff;
  --kick: #53fc18;
  --r: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: radial-gradient(1200px 600px at 80% -10%, #2a1650 0%, transparent 60%),
              radial-gradient(900px 500px at -10% 110%, #3a1238 0%, transparent 55%), var(--bg);
  color: var(--text); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
main { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 24px 20px 48px; }
a { color: #d8b4fe; }
h1 { font-size: 30px; line-height: 1.2; margin: 0 0 12px; letter-spacing: -0.01em; }
h2 { font-size: 18px; margin: 0 0 12px; }
h3 { margin: 6px 0 4px; font-size: 17px; }
p { margin: 0 0 12px; }
code { background: var(--bg2); padding: 1px 6px; border-radius: 6px; font-size: 14px; }

.top { display: flex; align-items: center; justify-content: space-between; max-width: 1080px; width: 100%; margin: 0 auto; padding: 18px 20px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 20px; }
.mark { width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(135deg, var(--accent), var(--accent2)); box-shadow: 0 0 18px #a855f780; }
.toplink { color: var(--muted); text-decoration: none; font-size: 15px; }
.toplink:hover { color: var(--text); }
.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 20px; border-top: 1px solid var(--line); }

.card { background: color-mix(in srgb, var(--card) 92%, transparent); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; margin-bottom: 18px; }
.narrow { max-width: 480px; margin-left: auto; margin-right: auto; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.eyebrow { color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: 12px; margin: 0 0 4px; }
.lead { font-size: 18px; color: #d9d3f3; }
.grad { background: linear-gradient(90deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.stack { display: grid; gap: 10px; margin: 16px 0; }
.nowrap { white-space: nowrap; }
.bad-text { color: var(--bad); font-size: 14px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 10px;
  padding: 11px 18px; font: inherit; font-weight: 600; color: var(--text); text-decoration: none; cursor: pointer; background: var(--line); transition: transform .12s, filter .12s, background .12s; }
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent2)); box-shadow: 0 6px 24px #a855f740; }
.btn.ghost { background: transparent; border-color: var(--line); }
.btn.ghost:hover { border-color: var(--muted); }
.btn.twitch { background: var(--twitch); }
.btn.kick { background: var(--kick); color: #06140a; }
.btn.on { background: #134e3a; border-color: var(--ok); color: #d1fae5; }
.btn.small { padding: 7px 12px; font-size: 14px; border-radius: 8px; }
.btn.wide { width: 100%; }
form { margin: 0; }

label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 14px; }
input, textarea { display: block; width: 100%; margin-top: 6px; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg2); color: var(--text); font: inherit; }
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
input[aria-invalid="true"] { border-color: var(--bad); }
textarea { resize: vertical; }
.field-error { color: var(--bad); font-size: 14px; margin: -8px 0 12px; }
.chips { display: flex; gap: 8px; margin: -4px 0 16px; flex-wrap: wrap; }
.chips button { border: 1px solid var(--line); background: var(--bg2); color: var(--text); border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 14px; cursor: pointer; }
.chips button:hover { border-color: var(--accent); }
.methods { border: 0; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.methods legend { font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.method { margin: 0; cursor: pointer; }
.method input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.method span { display: block; border: 1px solid var(--line); border-radius: 12px; padding: 12px; color: var(--text); font-weight: 600; background: var(--bg2); }
.method small { display: block; color: var(--muted); font-weight: 400; font-size: 13px; }
.method input:checked + span { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.method input:focus-visible + span { outline: 2px solid var(--accent); }
.prefix { display: flex; align-items: stretch; margin-top: 6px; }
.prefix > span { padding: 11px 0 11px 12px; background: var(--bg2); border: 1px solid var(--line); border-right: 0; border-radius: 10px 0 0 10px; color: var(--muted); }
.prefix input { margin: 0; border-radius: 0 10px 10px 0; border-left: 0; padding-left: 2px; }

.alert { border: 1px solid #a16207; background: #422006; color: #fde68a; border-radius: 10px; padding: 10px 14px; }
.alert.ok { border-color: #065f46; background: #052e22; color: #a7f3d0; }
.alert.bad { border-color: #9f1239; background: #3b0718; color: #fecdd3; }

.hero { text-align: center; padding: 48px 0 32px; }
.hero h1 { font-size: clamp(32px, 6vw, 56px); max-width: 760px; margin: 0 auto 16px; }
.hero .lead { max-width: 620px; margin: 0 auto 28px; }
.hero .row { justify-content: center; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.step b { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent2)); }
.step p { color: var(--muted); margin: 0; }

.donate h1 { margin-bottom: 18px; }
.spinner { width: 46px; height: 46px; margin: 8px auto 16px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--accent); animation: spin 1s linear infinite; }
.big-ok { width: 64px; height: 64px; margin: 4px auto 14px; border-radius: 50%; background: var(--ok); position: relative; box-shadow: 0 0 30px #34d39960; }
.big-ok::after { content: ""; position: absolute; left: 22px; top: 14px; width: 16px; height: 28px; border: solid #052e22; border-width: 0 5px 5px 0; transform: rotate(45deg); }
@keyframes spin { to { transform: rotate(360deg); } }

.studio-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.copy { cursor: text; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; margin-bottom: 10px; }
.copy.secret:not(:focus) { color: transparent; text-shadow: 0 0 7px #d8b4fe; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.stats div { background: var(--bg2); border-radius: 10px; padding: 12px; }
.stats b { display: block; font-size: 20px; }
.stats span { color: var(--muted); font-size: 13px; }
.acct { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.acct:first-of-type { border-top: 0; padding-top: 0; }
.settings { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.span2 { grid-column: 1 / -1; }
.settings small { display: block; margin-top: 6px; }
.table { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 500; padding: 8px; border-bottom: 1px solid var(--line); }
td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }

@media (max-width: 760px) {
  main { padding: 12px 14px 40px; }
  h1 { font-size: 26px; }
  .grid, .settings, .steps { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .studio-head { align-items: flex-start; }
  .card { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } .btn { transition: none; } }
