body.auth-page {
  --ink: #102640;
  --purple: #583eff;
  color: var(--ink);
  color-scheme: light;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  min-height: 100svh;
  overflow-y: auto;
  background: radial-gradient(ellipse at 6% 26%, #faf0df 0, transparent 40%),
              radial-gradient(ellipse at 73% 0%, #e1dfff 0, transparent 55%),
              radial-gradient(ellipse at 99% 36%, #fde6f2 0, transparent 46%), white;
}
.auth-bar {
  width: min(1180px, calc(100% - 64px)); min-height: 80px; margin: auto;
  display: flex; align-items: center; justify-content: space-between;
}
.auth-home { font-size: 14px; color: #414a68; text-decoration: none; }
.auth-home span { margin-left: 4px; color: var(--purple); }
.auth-home:hover, .auth-panel a:hover { text-decoration: underline; }
.auth-layout {
  width: min(936px, calc(100% - 64px)); margin: 0 auto;
  min-height: calc(90svh - 80px); display: grid;
  grid-template-columns: 1fr minmax(360px, 424px); align-items: center;
  gap: clamp(32px, 6vw, 100px); padding: 48px 0 64px;
}
.auth-intro h2 { font-size: clamp(34px, 3.8vw, 54px); font-weight: 380; line-height: 1.28; letter-spacing: -.045em; }
.auth-intro em { font-style: normal; color: var(--purple); }
.auth-intro p { font-size: 16px; line-height: 1.85; color: #505e74; margin: 19px 0 32px; }
.auth-key {
  position: relative; isolation: isolate; overflow: hidden; width: min(100%, 275px);
  padding: 19px 24px; border-radius: 16px; color: white;
  background: linear-gradient(120deg, #202051 18%, #383478);
  box-shadow: 0 14px 28px -16px #39346b91;
}
.auth-key::before, .auth-key::after {
  content: ''; position: absolute; z-index: -1; width: 180px; height: 180px;
  border: 1px solid #9e90ee66; border-radius: 45%; transform: rotate(35deg);
  top: -100px; right: -95px;
}
.auth-key::after { top: -88px; right: -80px; }
.auth-key-label { display: flex; align-items: center; gap: 7px; color: #e2ddff; font-size: 12px; }
.auth-key-label svg { width: 15px; height: 15px; }
.auth-key code { display: block; margin-top: 15px; font: 19px/1.3 ui-monospace, monospace; }
.auth-key code span { color: #c8bfff; letter-spacing: .06em; }
.auth-panel {
  min-width: 0; background: white; padding: clamp(26px, 3vw, 42px); border-radius: 24px;
  border: 1px solid #e4e1f0; box-shadow: 0 18px 60px -25px #32295345;
}
/* The application owns the form, including its validation and password controls. */
.auth-panel .h-svh { display: block; height: auto; }
.auth-panel .h-svh > a[href="/"] { display: none; }
.auth-panel .container, .auth-panel .container > div { width: 100%; max-width: none; padding: 0; }
.auth-panel h2 { font-size: 27px; line-height: 1.35; text-align: left; color: var(--ink); }
.auth-panel p { color: #56637a; }
.auth-panel a { color: #5037d9; }
.auth-panel form { gap: 18px; }
.auth-page * { box-sizing: border-box; }
.auth-page { margin: 0; }
.auth-links { display:flex; gap:18px; flex-wrap:wrap; margin:12px 0 26px; }
#member-form, #member-form label { display:grid; }
#member-form label { gap:6px; font-size:15px; font-weight:550; }
#member-form input { width:100%; min-width:0; font:inherit; font-weight:400; }
#member-form button { cursor:pointer; border:0; font:inherit; }
#member-form button:disabled { opacity:.6; cursor:default; }
.code-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; }
.code-field { display:grid; gap:6px; }
#code-message { margin:0; font-size:14px; line-height:1.55; }
#code-message:empty { display:none; }
#code-message[data-error] { color:#ac2540; }
#send-code { padding:0 12px; border-radius:10px; background:#efedff; color:#4030ad; }
#auth-message { font-size:14px; line-height:1.55; }
#auth-message:empty { display:none; }
.auth-panel input {
  height: 44px; border-radius: 10px; color: var(--ink); background: #fff; border: 1px solid #cfd2e0; padding-inline-start: 13px;
}
.auth-panel input::placeholder { color: #6e798b; }
.auth-panel input:focus-visible { border-color: var(--purple); outline: 3px solid #e6e1ff; box-shadow: none; }
.auth-panel input[aria-invalid="true"] { border-color: #b92e45; }
.auth-panel [data-slot="form-message"] { color: #ac2540; }
.auth-panel button[type="submit"] {
  height: 45px; margin-top: 6px; border-radius: 24px; background: var(--purple); color: white; font-weight: 600;
}
.auth-panel button[type="submit"]:hover { background: #4832de; }
.auth-page :is(button, a):focus-visible { outline: 3px solid #8672fe; outline-offset: 3px; }
@media (max-width: 720px) {
  .auth-bar { min-height: 68px; width: calc(100% - 36px); }
  .auth-layout { width: min(424px, calc(100% - 32px)); display: block; min-height: auto; padding: clamp(24px, 6vh, 48px) 0; }
  .auth-intro { display: none; }
  .auth-panel { padding: 28px 22px; border-radius: 19px; }
  .auth-panel input { font-size: 16px; }
}
