:root {
  --bg: #f6f5f2; --card: #ffffff; --ink: #1d1d1b; --muted: #74736e; --line: #e4e2dc;
  --accent: #3f5bd9; --accent-ink: #ffffff; --bar: #3f5bd9; --bar-soft: #c9d1f4; --danger: #c0392b;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121212; --card: #1c1c1e; --ink: #f2f2f0; --muted: #9a9a96; --line: #2c2c2e;
    --accent: #7d93ff; --accent-ink: #0d0d0d; --bar: #7d93ff; --bar-soft: #34395a; --danger: #ff6b5b;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  -webkit-text-size-adjust: 100%; }
body.center { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 16px; }
.gate { display: grid; gap: 12px; width: min(320px, 100%); }
button, input { font: inherit; }
button { border: 0; border-radius: 12px; padding: 12px 18px; cursor: pointer; background: var(--line); color: var(--ink); }
button.primary { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
button:disabled { opacity: .5; cursor: default; }
input { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); }
#code { text-align: center; letter-spacing: .2em; text-transform: uppercase; }
.muted { color: var(--muted); }
p { margin: 0; }
