:root {
  --bg: #0b0d12;
  --surface: #141821;
  --surface-2: #1b2030;
  --border: #2a3142;
  --text: #e8ebf2;
  --muted: #9aa3b5;
  --accent: #7c9cff;
  --accent-ink: #0b0d12;
  --ok-bg: #12261d;
  --ok-border: #2f7a55;
  --ok-text: #b9f0d2;
  --err: #ff8a8a;
  --radius: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  background-image: radial-gradient(1200px 500px at 50% -200px, #1a2240 0%, transparent 70%);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  min-height: 100dvh;
}
.wrap {
  max-width: 460px;
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) 16px max(32px, env(safe-area-inset-bottom));
}
.brand { display: flex; gap: 14px; align-items: center; margin: 16px 0 20px; }
.brand img { flex: none; border-radius: 10px; }
h1 { font-size: 1.4rem; margin: 0; letter-spacing: -0.01em; }
.sub { margin: 2px 0 0; color: var(--muted); font-size: .95rem; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.steps { margin: 0 0 18px; padding-left: 1.2em; color: var(--muted); font-size: .92rem; }
.steps li { margin: 4px 0; }
.steps strong { color: var(--text); }
label { display: block; font-weight: 600; font-size: .92rem; margin: 14px 0 6px; }
input {
  width: 100%;
  font: inherit;
  font-size: 1.05rem;           /* >=16px avoids iOS zoom */
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder { color: #5d6579; }
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124,156,255,.25); }
input[aria-invalid="true"] { border-color: var(--err); }
.mono, #device_id { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .12em; text-transform: uppercase; }
.hint { margin: 6px 0 0; color: var(--muted); font-size: .82rem; }
.error { color: var(--err); font-size: .9rem; margin: 14px 0 0; }
button {
  width: 100%;
  margin-top: 20px;
  font: inherit;
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--accent-ink);
  background: var(--accent);
  border: 0;
  border-radius: 10px;
  padding: 13px 16px;
  cursor: pointer;
  min-height: 48px;
}
button:hover { filter: brightness(1.08); }
button:disabled { opacity: .6; cursor: progress; }
.banner {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--ok-bg);
  border: 1px solid var(--ok-border);
  color: var(--ok-text);
  font-size: .95rem;
}
.banner.warn { background: #2a1b14; border-color: #8a4b2a; color: #ffd2b8; }
.note {
  margin-top: 22px;
  padding: 14px 16px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: .9rem;
}
.note p { margin: 0; }
