:root {
  --bg: #f7f7f5; --surface: #fff; --text: #1c1c1a; --muted: #5d5d58; --border: #d6d6d0;
  --accent: #1a5fb4; --accent-text: #fff; --ok-bg: #e5f4ea; --ok-text: #1d6b35; --err-bg: #fde7e7; --err-text: #8a1c1c;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; line-height: 1.5; color: var(--text); background: var(--bg);
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #161615; --surface: #222220; --text: #ededea; --muted: #a9a9a3; --border: #3d3d39; --accent: #78aeed; --accent-text: #0d1b2a;
    --ok-bg: #1d3325; --ok-text: #9fe0b4; --err-bg: #3e1d1d; --err-text: #f5b5b5; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
.login { max-width: 28rem; margin: 3rem auto; padding: 1.5rem; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
h1 { margin: 0 0 0.25rem; font-size: 1.5rem; }
.sub, .muted, .version { color: var(--muted); }
.version { font-size: 0.8rem; text-align: right; margin: 1rem 0 0; }
label { display: block; margin: 0.75rem 0 0.25rem; font-weight: 600; }
input, textarea, button { font: inherit; width: 100%; min-height: 44px; padding: 0.5rem 0.75rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); }
input.code { font-size: 1.5rem; letter-spacing: 0.3em; text-align: center; }
button { margin-top: 0.75rem; background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; cursor: pointer; }
button.link { background: none; border: none; color: var(--accent); text-decoration: underline; font-weight: normal; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.msg { padding: 0.5rem 0.75rem; border-radius: 8px; margin: 0.75rem 0; }
.msg.ok { background: var(--ok-bg); color: var(--ok-text); }
.msg.err { background: var(--err-bg); color: var(--err-text); }
.ask { margin-top: 1.5rem; }
.ask summary { cursor: pointer; color: var(--accent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.mt { margin-top: 0.5rem; }
nav.top { display: flex; justify-content: space-between; gap: 1rem; max-width: 40rem; margin: 1rem auto; padding: 0 1rem; }
main.admin, .admin { max-width: 40rem; margin: 1rem auto; padding: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; } td, th { text-align: left; padding: 0.3rem; border-bottom: 1px solid var(--border); }
