:root { --bg: #ffffff; --fg: #000000; --muted: #222222; --line: #000000; --accent: #003a8c; --accent-fg: #ffffff;
        --error-bg: #ffe5e5; --error-fg: #8a0000; --note-bg: #e3f4e3; --note-fg: #0b4d0b; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #000000; --fg: #ffffff; --muted: #eeeeee; --line: #ffffff; --accent: #8fc1ff;
        --accent-fg: #000000; --error-bg: #3a0000; --error-fg: #ffd0d0; --note-bg: #0b2e0b; --note-fg: #d6ffd6; }
}
* { box-sizing: border-box; }
html { font-size: 22px; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; line-height: 1.5; }
.top { display: flex; justify-content: space-between; align-items: center; padding: 0.6rem 16px; border-bottom: 3px solid var(--line); }
.brand { font-weight: 800; font-size: 1.1rem; }
main { max-width: 34rem; margin: 0 auto; padding: 1rem 16px 3rem; }
h1 { font-size: 1.7rem; margin: 0.6rem 0; }
h2 { font-size: 1.25rem; margin: 1.6rem 0 0.4rem; }
label { display: block; font-weight: 700; margin: 1rem 0 0.3rem; }
label.check { font-weight: 400; display: flex; gap: 0.6rem; align-items: center; }
label.check input { width: 1.6rem; height: 1.6rem; }
input[type=text], input[type=password] { width: 100%; font-size: 1.2rem; padding: 0.6rem; border: 3px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--fg); }
input:focus, button:focus, a:focus { outline: 4px solid var(--accent); outline-offset: 2px; }
button, a.button { display: inline-block; font-size: 1.1rem; font-weight: 700; padding: 0.7rem 1.2rem; margin-top: 1rem; min-height: 3rem;
  border: 3px solid var(--accent); border-radius: 6px; background: var(--accent); color: var(--accent-fg); text-decoration: none; cursor: pointer; }
button.secondary, a.button.secondary { background: var(--bg); color: var(--fg); border-color: var(--line); }
button.link { background: none; border: none; color: var(--fg); text-decoration: underline; padding: 0; margin: 0; min-height: 0; font-weight: 700; }
form.inline { display: inline; }
a { color: var(--accent); font-weight: 700; }
.error { background: var(--error-bg); color: var(--error-fg); border-left: 6px solid var(--error-fg); padding: 0.6rem 0.8rem; font-weight: 700; }
.note { background: var(--note-bg); color: var(--note-fg); border-left: 6px solid var(--note-fg); padding: 0.6rem 0.8rem; font-weight: 700; }
table { width: 100%; border-collapse: collapse; font-size: 0.85rem; display: block; overflow-x: auto; }
th, td { text-align: left; padding: 0.35rem 0.5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
img.qr { width: 16rem; max-width: 100%; height: auto; background: #fff; border: 3px solid var(--line); }
code.key { font-size: 1.1rem; word-break: break-all; }
ul.codes { font-size: 1.2rem; }
