:root,
:root[data-theme="dark"] {
  --bg: #121212; --surface: #1b1b1b; --field: #232323; --border: #333333; --border-strong: #474747;
  --text: #ececec; --muted: #8a8a8a; --btn-bg: #ececec; --btn-fg: #121212; --danger: #e5786d; --focus: #9a9a9a;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f4f4f3; --surface: #ffffff; --field: #f0f0ef; --border: #dcdcda; --border-strong: #c3c3c0;
  --text: #1a1a1a; --muted: #767676; --btn-bg: #1a1a1a; --btn-fg: #ffffff; --danger: #b4392d; --focus: #6b6b6b;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: var(--bg); color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-size: 15px;
}
input, button { font-family: inherit; font-size: inherit; }
.box {
  width: 100%; max-width: 320px; display: flex; flex-direction: column; gap: .6rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1.25rem;
}
input {
  width: 100%; min-height: 2.6rem; padding: .5rem .7rem; border-radius: 8px;
  background: var(--field); color: var(--text); border: 1px solid var(--border);
}
input::placeholder { color: var(--muted); }
button {
  min-height: 2.6rem; border-radius: 8px; cursor: pointer; font-weight: 600;
  background: var(--btn-bg); color: var(--btn-fg); border: 1px solid var(--btn-bg);
}
button:disabled { opacity: .6; cursor: default; }
input:focus, button:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.err { margin: 0; min-height: 1.2em; font-size: .86rem; color: var(--danger); }
.err:empty { display: none; }
