:root { --bg:#f6f7f9; --card:#fff; --text:#16181d; --muted:#5d6470; --line:#dfe3e8; --accent:#2457d6; --accent-text:#fff; --err:#c0322b; --ok:#1d7a46; }
@media (prefers-color-scheme: dark) { :root { --bg:#0f1115; --card:#181b21; --text:#e8eaee; --muted:#9aa2ae; --line:#2a2f38; --accent:#5b86f0; --accent-text:#0b0d11; --err:#ef6b63; --ok:#4cc382; } }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin:0; min-height:100dvh; display:flex; align-items:center; justify-content:center; background:var(--bg); color:var(--text);
  font:16px/1.5 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
main { width:100%; max-width:400px; background:var(--card); border:1px solid var(--line); border-radius:14px; padding:24px; }
h1 { font-size:1.35rem; margin:0 0 4px; } h2 { font-size:1.05rem; margin:24px 0 8px; }
p { margin:0 0 12px; color:var(--muted); }
button, input { font:inherit; width:100%; min-height:48px; border-radius:10px; }
button { border:0; background:var(--accent); color:var(--accent-text); font-weight:600; cursor:pointer; }
button.secondary { background:transparent; color:var(--accent); border:1px solid var(--line); }
button:disabled { opacity:.6; cursor:default; }
input { border:1px solid var(--line); background:var(--bg); color:var(--text); padding:0 12px; margin-bottom:10px; }
input.code { letter-spacing:.3em; text-align:center; font-size:1.3rem; }
.or { display:flex; align-items:center; gap:10px; color:var(--muted); margin:20px 0; font-size:.85rem; }
.or::before, .or::after { content:""; flex:1; border-top:1px solid var(--line); }
#msg { min-height:1.5em; margin-top:12px; font-size:.95rem; } #msg.err { color:var(--err); } #msg.ok { color:var(--ok); }
.qr { display:block; margin:8px auto; background:#fff; padding:8px; border-radius:8px; width:200px; height:200px; }
code { word-break:break-all; font-size:.85rem; }
[hidden] { display:none !important; }
.keyrow { display:flex; align-items:center; gap:10px; margin:0 0 12px; }
.keyrow code { flex:1; padding:10px 12px; border:1px solid var(--line); border-radius:10px; background:var(--bg); font-size:.95rem; user-select:all; }
button.small { width:auto; min-height:44px; padding:0 16px; flex:none; }
a.button { display:flex; align-items:center; justify-content:center; min-height:48px; border-radius:10px; background:var(--accent); color:var(--accent-text); font-weight:600; text-decoration:none; margin:0 0 12px; }
form button + button { margin-top:10px; }
.hint { font-size:.85rem; }
.qr.big { width:280px; height:280px; }
pre { white-space:pre-wrap; word-break:break-all; font-size:.75rem; background:var(--bg); border:1px solid var(--line); border-radius:10px; padding:10px; margin:10px 0 0; }
main > div > button { margin-bottom:8px; }
