:root{font-family:system-ui,sans-serif;color-scheme:light dark;--bg:#f6f4f0;--card:#fff;--ink:#191919;--muted:#514b44;--border:#81786d;background:var(--bg);color:var(--ink)}*{box-sizing:border-box}body{margin:0;padding:24px 16px;min-height:100dvh;display:grid;place-items:center}main{width:min(100%,560px);padding:28px;background:var(--card);border:1px solid var(--border);border-radius:20px}h1{font-size:clamp(26px,6vw,34px)}h2{font-size:21px}p{color:var(--muted);line-height:1.6}a{color:var(--ink);text-underline-offset:4px}.brand{font-weight:800;font-size:26px}label{display:block;margin:18px 0 8px;font-weight:600}input,button{font:inherit;min-height:48px;border-radius:10px;width:100%;padding:12px}input{border:1px solid var(--border);background:var(--card);color:var(--ink);min-width:0}button{background:#ff7b32;color:#19100a;border:0;font-weight:700;cursor:pointer;margin-top:20px}button.secondary{background:var(--card);color:var(--ink);border:1px solid var(--border)}button:disabled{cursor:wait;opacity:.65}:focus-visible{outline:3px solid #b74800;outline-offset:3px}[hidden]{display:none!important}#qr{max-width:260px;margin:16px auto}#qr svg{display:block;width:100%;background:#fff}#secret{font-family:monospace;font-size:14px}#status{overflow-wrap:anywhere}@media(prefers-color-scheme:dark){:root{--bg:#111;--card:#202020;--ink:#faf7f3;--muted:#ded6cd;--border:#a59b90}:focus-visible{outline-color:#ff9a63}}@media(min-width:900px){main{padding:40px}}

/* Explicit saved theme wins over the device preference. */
:root[data-theme="light"]{color-scheme:light;--bg:#f6f4f0;--card:#fff;--ink:#191919;--muted:#514b44;--border:#81786d}
:root[data-theme="dark"]{color-scheme:dark;--bg:#111;--card:#202020;--ink:#faf7f3;--muted:#ded6cd;--border:#a59b90}
body,main,h1,h2,label,strong,a{color:var(--ink)}
