:root {
  --bg: #f6f3ee;
  --surface: #ffffff;
  --surface-2: #efeae2;
  --text: #1f1b16;
  --muted: #776f64;
  --line: #e4ddd2;
  --brand: #5b4bd1;
  --brand-ink: #ffffff;
  --danger: #c23b28;
  --good: #2f7d4f;
  --shadow: 0 1px 2px rgb(31 27 22 / 6%), 0 8px 24px rgb(31 27 22 / 6%);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15131a;
    --surface: #1f1c25;
    --surface-2: #2a2631;
    --text: #f1ede6;
    --muted: #a39b91;
    --line: #34303b;
    --brand: #8f82ff;
    --brand-ink: #15131a;
    --danger: #ff7a63;
    --good: #6fd29a;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 25%);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; min-height: 100vh;
  background: var(--bg); color: var(--text);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}
h1, h2, p { margin: 0; }
a { color: inherit; text-decoration: none; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.shell { width: 100%; max-width: 420px; margin: 0 auto; padding: 48px 16px; display: flex; flex-direction: column; gap: 20px; }
.logo { display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 700; font-size: 19px; }
.logo-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--brand); color: var(--brand-ink); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 16px; }
.card h2 { font-size: 15px; margin-top: 8px; }
.hint { background: var(--surface-2); border-radius: 10px; padding: 8px 12px; font-size: 14px; }

.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-2); border-radius: 12px; padding: 4px; }
.tab { height: 36px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; }
.tab.is-on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

form { display: flex; flex-direction: column; gap: 12px; }
form.row { flex-direction: row; }
form.row input { flex: 1; min-width: 0; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
input {
  height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); font: inherit; font-size: 15px;
}
input:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: transparent; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 20px;
  border: 0; border-radius: 999px; background: var(--brand); color: var(--brand-ink);
  font: inherit; font-weight: 600; cursor: pointer;
}
.btn:disabled { opacity: .6; cursor: progress; }
.btn-ghost { background: var(--surface-2); color: var(--text); height: 42px; }
.link { border: 0; background: none; color: var(--danger); font: inherit; font-size: 14px; cursor: pointer; padding: 0; }

.error { color: var(--danger); font-size: 14px; }
.ok { color: var(--good); font-size: 14px; }

.who { display: flex; align-items: center; gap: 14px; }
.who h1 { font-size: 20px; }
.avatar { display: grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font-size: 22px; font-weight: 700; }
.foot { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 14px; }

@media (max-width: 480px) {
  .shell { padding-top: 24px; }
  .card { padding: 18px; border-radius: 16px; }
}
