:root {
  --bg: #faf7f5;
  --surface: #ffffff;
  --ink: #2b2b2b;
  --muted: #6b6461;
  --line: #e7dfda;
  --accent: #8a4b5c;
  --accent-ink: #ffffff;
  --error: #a3262a;
  --radius: 10px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1a19;
    --surface: #262322;
    --ink: #ece7e4;
    --muted: #a8a09c;
    --line: #3a3533;
    --accent: #d28ea0;
    --accent-ink: #1c1a19;
    --error: #f08a8d;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}
.bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 600; letter-spacing: 0.01em; }
.bar-actions { display: flex; gap: 12px; }

main { padding: 32px 16px; display: grid; justify-items: center; }
.card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
h1 { font-size: 1.35rem; margin: 0 0 16px; }
form { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-size: 0.95rem; }
input {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
}
input:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button {
  font: inherit;
  padding: 10px 14px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
}
button:disabled { opacity: 0.6; cursor: progress; }
button.link { background: none; color: var(--accent); padding: 4px 2px; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.error { color: var(--error); margin: 0; }
.qr { display: block; margin: 8px auto 16px; background: #fff; border-radius: 8px; }
.secret { word-break: break-all; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0 0 16px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
