:root {
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #182438;
  background: #edf1f7;
  --surface: #fff;
  --input: #fff;
  --line: #cad3e1;
  --muted: #4e5c70;
  --accent: #344ba0;
  --link: #344ba0;
  --button-ink: #fff;
  --error-ink: #9b2424;
  --error-surface: #fff1ef;
}
@media (prefers-color-scheme: dark) {
  :root {
    color: #e7eef8;
    background: #151e2b;
    --surface: #202c3d;
    --input: #192434;
    --line: #52647d;
    --muted: #bcc9db;
    --accent: #a9bcff;
    --link: #b6c6ff;
    --button-ink: #172343;
    --error-ink: #ffd2ce;
    --error-surface: #592d32;
  }
}
* { box-sizing: border-box; }
body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 48px);
}
.layout {
  width: min(100%, 820px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 400px);
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
}
.brand-mark {
  width: 44px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--accent);
  color: var(--button-ink);
  font-weight: 700;
}
h1 { margin: 16px 0 8px; font-size: clamp(24px, 3.5vw, 34px); line-height: 1.3; }
h2 { margin: 0 0 24px; font-size: 24px; }
p { margin: 0; line-height: 1.6; color: var(--muted); }
.panel {
  padding: clamp(22px, 5vw, 36px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}
form { display: grid; gap: 8px; }
label { font-weight: 600; font-size: 14px; }
input:not([type=hidden]) {
  width: 100%;
  min-height: 44px;
  margin-bottom: 8px;
  padding: 10px 12px;
  color: inherit;
  background: var(--input);
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}
input[hidden] { display: none; }
.password { display: flex; align-items: start; gap: 8px; }
.password input { min-width: 0; }
button { cursor: pointer; font: inherit; min-height: 44px; }
.primary {
  width: 100%;
  border: 0;
  border-radius: 6px;
  margin-top: 8px;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--button-ink);
  font-weight: 650;
}
.subtle {
  color: var(--link);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  white-space: nowrap;
  padding: 6px 10px;
  font-size: 14px;
}
a { color: var(--link); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.error { color: var(--error-ink); background: var(--error-surface); padding: 8px 12px; border-radius: 6px; }
.error, .notice, .account-name { margin-bottom: 16px; }
#password-policy { margin: -8px 0 4px; color: var(--muted); font-size: 13px; }
.account-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 20px; }
@media (max-width: 640px) {
  .layout { grid-template-columns: 1fr; max-width: 400px; }
}
