:root {
  color-scheme: light;
  --paper: #fff;
  --ink: #20242b;
  --muted: #586270;
  --line: #e1e5eb;
  --input-line: #878f9b;
  --accent: #104fbf;
  --button: #145ce6;
  --button-hover: #104bb5;
  --error: #a32937;
  font-family: "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
}
:root.dark {
  color-scheme: dark;
  --paper: #191b1e;
  --ink: #f2f3f6;
  --muted: #b3bbc5;
  --line: #373b43;
  --input-line: #767e89;
  --accent: #9cbeff;
  --error: #ffafb5;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--paper); font-size: 15px; line-height: 1.5; }
a { color: var(--accent); text-underline-offset: 4px; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
::selection { background: #c5d8ff; color: #102644; }
.masthead {
  min-height: 72px;
  padding: 12px 4%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}
.brand, .home-link { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.brand { gap: 8px; color: var(--ink); font-size: 19px; font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand img { flex: none; }
.brand span { font-family: "Songti SC","STSong","Noto Serif CJK SC","SimSun",serif; }
.home-link { gap: 8px; color: var(--muted); font-size: 14px; }
.back-icon {
  width: 16px;
  height: 16px;
  background: currentColor;
  mask: url("/assets/icons/arrow-up.svg") center / contain no-repeat;
  transform: rotate(-90deg);
}
.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  min-height: calc(100vh - 72px);
  min-height: calc(100svh - 72px);
}
.entry { display: grid; place-items: center; padding: 56px 32px; }
.entry-inner { width: 100%; max-width: 380px; }
h1 { margin: 0; font-size: 34px; line-height: 1.25; font-weight: 650; }
.mode-switch { margin: 12px 0 0; color: var(--muted); }
.mode-switch a { font-weight: 600; }
#return-note { margin: 16px 0 0; color: var(--muted); font-size: 14px; }
form { margin-top: 36px; }
.field + .field { margin-top: 20px; }
label { display: block; margin-bottom: 7px; font-weight: 600; }
input, button { width: 100%; min-height: 48px; border-radius: 6px; font: inherit; }
input {
  border: 1px solid var(--input-line);
  background: var(--paper);
  color: var(--ink);
  caret-color: var(--accent);
  padding: 10px 12px;
  font-size: 16px;
}
input:focus-visible { border-color: var(--accent); outline-offset: 1px; }
small { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; }
#account-error { margin: 14px 0 0; color: var(--error); overflow-wrap: anywhere; }
#account-error:empty { margin: 0; }
button {
  margin-top: 26px;
  padding: 10px 16px;
  border: 0;
  color: #fff;
  background: var(--button);
  font-weight: 650;
  cursor: pointer;
  transition: background-color 140ms ease-out;
}
button:hover:enabled { background: var(--button-hover); }
button:disabled { background: #536c99; cursor: wait; }
.artwork { position: relative; overflow: hidden; background: #041020; }
.artwork img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 84%; }
@media (max-width: 720px) {
  .masthead { min-height: 62px; padding: 8px 22px; }
  .brand { font-size: 17px; }
  .brand svg { width: 28px; height: 28px; }
  .auth-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(128px, 1fr); min-height: calc(100svh - 62px); }
  .entry { padding: 48px 24px; }
  h1 { font-size: 30px; }
  form { margin-top: 28px; }
  .artwork img { object-position: 50% 76%; }
}
@media (prefers-reduced-motion: reduce) { button { transition: none; } }
