:root {
  color-scheme: dark;
  --bg: #0f0f10;
  --surface: #18181b;
  --surface-2: #202024;
  --border: #2a2a2f;
  --text: #f2f2f3;
  --text-2: #b3b3ba;
  --muted: #85858d;
  --accent: #0074e4;
  --ok: #30a46c;
  --warn: #f5a524;
  --err: #e5484d;
  --discord: #5865f2;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(1000px 520px at 50% -10%, #1b2a44 0%, var(--bg) 60%) no-repeat, var(--bg);
  color: var(--text);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
main { max-width: 520px; margin: 0 auto; padding: 32px 16px 48px; }
.center { text-align: center; }
.muted { color: var(--muted); font-size: 14px; }
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.brand img { width: 52px; height: 52px; border-radius: 12px; box-shadow: 0 8px 30px rgba(0, 116, 228, .35); }
.brand b { display: block; font-size: 20px; }
.brand span { color: var(--muted); font-size: 14px; }
.brand .grow { flex: 1; }
h1 { font-size: 26px; margin: 0 0 6px; letter-spacing: -.01em; }
p { color: var(--text-2); margin: 6px 0; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px; margin-top: 14px; }
.step { display: flex; gap: 14px; }
.step .num { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; background: var(--surface-2); color: var(--text-2); }
.step.done .num { background: rgba(48, 164, 108, .18); color: var(--ok); }
.step.active .num { background: var(--accent); color: #fff; }
.step .body { flex: 1; min-width: 0; }
.step h2 { font-size: 17px; margin: 4px 0 4px; }
.step.locked { opacity: .5; }
.button {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 50px; margin-top: 14px; padding: 0 18px;
  border: 0; border-radius: 12px; background: var(--accent); color: #fff;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.button:hover { filter: brightness(1.1); }
.button:disabled { opacity: .5; cursor: not-allowed; }
.button.secondary { background: var(--surface-2); border: 1px solid var(--border); }
.button.discord { background: var(--discord); }
.link { background: none; border: 0; color: #5aa9ff; font: inherit; font-size: 14px; cursor: pointer; padding: 0; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-2); border-radius: 10px; padding: 3px; margin-bottom: 16px; }
.tabs button { border: 0; background: none; color: var(--text-2); font: inherit; font-weight: 600; padding: 9px; border-radius: 8px; cursor: pointer; }
.tabs button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.3); }
label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 12px; }
input {
  display: block; width: 100%; margin-top: 6px; padding: 12px 13px;
  border-radius: 10px; border: 1px solid var(--border); background: #101013; color: var(--text); font: inherit;
}
input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.msg { border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 12px; }
.msg.err { background: rgba(229, 72, 77, .12); color: #ff8b8e; }
.msg.ok { background: rgba(48, 164, 108, .12); color: #6fdba5; }
.msg.info { background: rgba(0, 116, 228, .12); color: #8bbcf5; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 16px 0 2px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.device { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); margin-top: 10px; }
.device .grow { flex: 1; min-width: 0; }
.device b { display: block; }
.device small { color: var(--muted); font-size: 12px; word-break: break-all; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.badge.ok { background: rgba(48, 164, 108, .15); color: #6fdba5; }
.badge.warn { background: rgba(245, 165, 36, .15); color: #f7c36b; }
.badge.err { background: rgba(229, 72, 77, .15); color: #ff8b8e; }
.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.app-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.app-row img { width: 56px; height: 56px; border-radius: 13px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 10px; }
.hint b { color: var(--text-2); }
footer { margin-top: 26px; text-align: center; }
