:root {
  --bg: #1b2047;
  --bg-deep: #141836;
  --surface: #262c5e;
  --surface-high: #333b78;
  --text: #fff4e3;
  --muted: #c9c6e4;
  --sunshine: #ffc94a;
  --coral: #ff7f6a;
  --ink: #251e3e;
  --ok: #8fd6a8;
  --danger: #ff9a8a;
  --radius: 18px;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fff8ec;
    --bg-deep: #f3e9d8;
    --surface: #ffffff;
    --surface-high: #f1e6d3;
    --text: #251e3e;
    --muted: #5a5679;
    --sunshine: #b07800;
    --coral: #c4473a;
    --ink: #fff8ec;
    --ok: #237a45;
    --danger: #b3261e;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-height: 100vh;
  background: radial-gradient(120% 80% at 50% 0%, var(--surface) 0%, var(--bg) 55%, var(--bg-deep) 100%) fixed;
  color: var(--text);
  font: 17px/1.5 ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding: 24px 16px 48px;
}

main { max-width: 480px; margin: 0 auto; }

.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.brand .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--coral); box-shadow: 10px -6px 0 -3px var(--sunshine); }

h1 { font-size: 1.6rem; line-height: 1.2; margin: 0 0 8px; }
p { margin: 0 0 14px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

.card { background: var(--surface); border-radius: var(--radius); padding: 20px; margin: 18px 0; }

label { display: block; font-weight: 600; margin: 14px 0 6px; }

input[type="text"], input[type="url"], input[type="password"] {
  width: 100%;
  padding: 14px 14px;
  border-radius: 12px;
  border: 2px solid var(--surface-high);
  background: var(--bg-deep);
  color: var(--text);
  font: inherit;
}
input:focus { outline: none; border-color: var(--sunshine); }
input.code { text-transform: uppercase; letter-spacing: .18em; font-size: 1.3rem; text-align: center; }

.row { display: flex; gap: 8px; align-items: center; }
.row input { flex: 1; min-width: 0; }

button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
button.primary { background: var(--sunshine); color: #251e3e; width: 100%; margin-top: 20px; }
button.secondary { background: var(--surface-high); color: var(--text); padding: 12px 16px; }
button:disabled { opacity: .55; cursor: default; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--sunshine); outline-offset: 3px; }

a { color: var(--sunshine); }

ol.steps { padding-left: 1.2em; margin: 8px 0 0; }
ol.steps li { margin: 4px 0; }

.status { border-radius: 14px; padding: 14px 16px; margin-top: 16px; background: var(--surface-high); }
.status.ok { border-left: 6px solid var(--ok); }
.status.error { border-left: 6px solid var(--danger); }
.status.wait { border-left: 6px solid var(--sunshine); }

.lock { display: flex; gap: 10px; align-items: flex-start; }
.lock svg { flex: none; margin-top: 3px; }

[hidden] { display: none !important; }

@media (prefers-reduced-motion: no-preference) {
  .pulse { animation: pulse 1.6s ease-in-out infinite; }
  @keyframes pulse { 50% { opacity: .55; } }
}
