:root {
  color-scheme: light;
  --ink: #14223a;
  --muted: #55657b;
  --accent: #2949d7;
  --border: #dce4f0;
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  padding: clamp(14px, 3vw, 36px);
  display: grid;
  place-items: center;
  color: var(--ink);
  background: radial-gradient(ellipse at 18% 0%, #233d70, transparent 60%),
              radial-gradient(ellipse at 95% 100%, #213252, transparent 52%), #101a2e;
}

h1, h2, p { margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid #4261e0; outline-offset: 3px; }
[hidden] { display: none !important; }

.signin-shell {
  width: min(100%, 820px);
  padding: clamp(22px, 4vw, 42px);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 22px 70px #050d2080;
}
.signin-shell.signin-compact { width: min(100%, 520px); }
.signin-header { margin-bottom: 26px; }
.signin-header a { display: inline-block; }
.signin-header img { display: block; width: 144px; height: auto; }
.signin-header h1 { margin-top: 15px; font-size: clamp(25px, 3vw, 30px); line-height: 1.25; letter-spacing: -.025em; }
.signin-channels { display: grid; grid-template-columns: minmax(0, 1fr) minmax(326px, .94fr); gap: 30px; }
.signin-channels h2 { font-size: 16px; line-height: 1.4; font-weight: 660; }
.signin-phone { min-width: 0; }
.signin-phone h2 { margin-bottom: 12px; }

.signin-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 15px;
  border-radius: 9px;
  background: #edf2f9;
}
.signin-methods a {
  padding: 7px 5px;
  border-radius: 6px;
  color: var(--muted);
  text-align: center;
  text-decoration: none;
  font-size: 14px;
}
.signin-methods a:hover { color: var(--accent); }
.signin-methods a[aria-current="page"] {
  color: var(--accent);
  font-weight: 640;
  background: #fff;
  box-shadow: 0 1px 4px #1b34551b;
}

.signin-field { display: block; margin-bottom: 5px; color: #34435a; font-size: 13px; font-weight: 640; }
.signin-input-row {
  min-height: 46px;
  display: flex;
  align-items: center;
  margin-bottom: 13px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #f8fafd;
}
.signin-input-row:focus-within { border-color: #7188eb; box-shadow: 0 0 0 2px #e6ebff; }
.signin-input-row input {
  flex: 1;
  width: 100%;
  min-width: 0;
  align-self: stretch;
  padding: 9px 12px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
}
.signin-input-row input::placeholder { color: #66758b; }
.signin-input-row input:disabled { opacity: 1; }
.signin-prefix { padding-inline: 12px 9px; border-inline-end: 1px solid var(--border); color: var(--muted); font-size: 14px; }
.signin-readonly > span:nth-child(2) { flex: 1; margin-inline: 10px 4px; font-variant-numeric: tabular-nums; }
.signin-inline-action {
  flex: none;
  margin-inline-end: 4px;
  padding: 7px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--accent);
  font-size: 13px;
  font-weight: 640;
  text-decoration: none;
}
.signin-inline-action:hover:not(:disabled) { background: #e9efff; }
.signin-inline-action:disabled { color: var(--muted); font-variant-numeric: tabular-nums; }
.signin-note { margin: -4px 0 10px; color: var(--muted); font-size: 13px; }
.signin-submit {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 0;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-weight: 670;
}
.signin-submit:hover:not(:disabled) { background: #2139af; }
.signin-submit:disabled { background: #e9edf4; color: #627086; }

.signin-wechat {
  min-width: 0;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 16px;
  padding: 20px 12px;
  border: 1px solid #e2eaf7;
  border-radius: 13px;
  background: #f3f7ff;
  text-align: center;
}
.signin-scan-symbol {
  width: 68px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid #d7e2fb;
  border-radius: 18px;
  background: #e9f0ff;
  color: #4261cd;
}
.signin-scan-symbol span {
  width: 29px;
  height: 24px;
  position: relative;
  border: 2px solid currentColor;
  border-radius: 9px;
  background: radial-gradient(circle at 34% 48%, currentColor 1.4px, transparent 2px),
              radial-gradient(circle at 66% 48%, currentColor 1.4px, transparent 2px);
}
.signin-scan-symbol span::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 5px;
  width: 6px;
  height: 6px;
  transform: skewY(-38deg);
  border-bottom: 2px solid currentColor;
  border-left: 2px solid currentColor;
  background: #e9f0ff;
}
.signin-unavailable { color: var(--muted); font-size: 13px; }
.signin-scan-button, .signin-external {
  padding: 8px 12px;
  border: 1px solid #cddaf4;
  border-radius: 8px;
  background: #fff;
  color: var(--accent);
  font-size: 14px;
  font-weight: 640;
}
.signin-scan-button:hover { background: #e9efff; }
.signin-external { padding: 0 5px; border: 0; background: transparent; font-weight: 500; }
.signin-external:hover { text-decoration: underline; }
.signin-qr-frame { display: block; max-width: 100%; border: 0; }
.signin-scan-message { margin-bottom: 6px; color: var(--muted); font-size: 13px; }

.signin-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-top: 23px;
  padding-top: 15px;
  border-top: 1px solid #edf0f6;
  font-size: 14px;
}
.signin-footer a { padding: 3px 0; text-decoration: none; }
.signin-footer a:hover { text-decoration: underline; }
.signin-alert, .signin-shell > [role="status"] {
  margin-bottom: 12px;
  padding: 9px 11px;
  border: 1px solid #edd2d7;
  border-radius: 8px;
  background: #fff1f2;
  color: #8b2838;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.signin-shell > [role="status"] { border-color: #d7e2fb; background: #f2f6ff; color: #304a80; }

@media (max-width: 740px) {
  .signin-shell { width: min(100%, 440px); }
  .signin-header { margin-bottom: 20px; }
  .signin-channels { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .signin-wechat { padding-block: 16px; gap: 10px; }
  .signin-scan-symbol { width: 48px; border-radius: 13px; }
  .signin-footer { margin-top: 17px; }
}

@media (max-width: 360px) {
  .signin-shell { padding: 18px; }
  .signin-input-row input { padding-inline: 8px; }
  .signin-prefix { padding-inline: 8px 7px; }
  .signin-inline-action { padding-inline: 6px; }
}
