:root, :root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #111217; --panel: #181b1f; --inset: #0b0c0e; --border: rgba(204,204,220,.12); --border2: rgba(204,204,220,.22);
  --text: #ccccdc; --text2: rgba(204,204,220,.65); --orange: #ff9830; --red: #f2495c; --primary: #3d71d9; --shadow: rgba(0,0,0,.45);
}
:root[data-theme="light"] {
  color-scheme: light;
  --canvas: #f4f5f5; --panel: #ffffff; --inset: #f7f8f8; --border: rgba(36,41,46,.12); --border2: rgba(36,41,46,.25);
  --text: #24292e; --text2: rgba(36,41,46,.75); --orange: #c2570c; --red: #cf0e5b; --primary: #3871dc; --shadow: rgba(0,0,0,.18);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; display: grid; place-items: center; padding: 16px; background: var(--canvas); color: var(--text);
  font: 14px/1.5 Inter, "Helvetica Neue", Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
.card { width: 100%; max-width: 360px; padding: 28px 28px 24px; background: var(--panel); border: 1px solid var(--border);
  border-radius: 4px; box-shadow: 0 8px 28px var(--shadow); }
.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.brand svg { width: 28px; height: 28px; fill: none; stroke: var(--orange); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.brand h1 { margin: 0; font-size: 20px; font-weight: 500; }
label { display: block; margin: 14px 0 4px; font-size: 12px; font-weight: 500; color: var(--text2); }
input { width: 100%; height: 36px; padding: 0 10px; font: inherit; color: var(--text); background: var(--inset);
  border: 1px solid var(--border2); border-radius: 2px; }
input:focus-visible, button:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
#code { letter-spacing: .3em; font-variant-numeric: tabular-nums; }
.hint { margin-top: 4px; font-size: 12px; color: var(--text2); }
button { width: 100%; height: 38px; margin-top: 22px; font: inherit; font-weight: 500; color: #fff; background: var(--primary);
  border: 0; border-radius: 2px; cursor: pointer; }
button:disabled { opacity: .6; cursor: default; }
.msg { margin-top: 16px; padding: 9px 12px; font-size: 13px; border-left: 3px solid var(--red); background: var(--inset); }
.msg.warn { border-left-color: var(--orange); margin: 0 0 4px; }
code { display: block; margin-top: 8px; padding: 8px 10px; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--inset); border: 1px solid var(--border); border-radius: 2px; overflow-wrap: anywhere; }
