:root {
  --brand: #8d3de6;
  --brand-deep: #6f22c9;
  --brand-soft: #f4ecfd;
  --ink: #2b2135;
  --ink-2: #4a3d58;
  --muted: #7d6e8c;
  --line: #e6dcf0;
  --bg: #ffffff;
  --danger: #c8324b;
  --ok: #1e7a4d;
  --radius: 12px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1fr);
}

/* ---------- 左：品牌 ---------- */

.brandPane {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 40px clamp(28px, 4vw, 56px) 28px;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 10% 0%, #f7f0ff 0%, rgba(247, 240, 255, 0) 60%),
    linear-gradient(165deg, #fbf8ff 0%, #f2e9fd 55%, #ece0fb 100%);
  border-right: 1px solid #f0e7fa;
}

.brandTop {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mark { width: 30px; height: 30px; border-radius: 8px; }

.wordmark {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -.015em;
  color: var(--ink);
}

.brandCopy { margin-top: clamp(32px, 7vh, 76px); max-width: 420px; }

.brandCopy h1 {
  margin: 0;
  font-size: clamp(26px, 2.6vw, 38px);
  line-height: 1.22;
  font-weight: 680;
  letter-spacing: -.03em;
  color: #251a30;
}

.brandCopy p {
  margin: 16px 0 0;
  font-size: 14.5px;
  line-height: 1.65;
  color: #6a5a79;
  max-width: 340px;
}

.art {
  width: min(118%, 520px);
  margin: auto 0 -18px -24px;
  align-self: flex-start;
  -webkit-mask-image: radial-gradient(115% 105% at 40% 55%, #000 55%, transparent 100%);
  mask-image: radial-gradient(115% 105% at 40% 55%, #000 55%, transparent 100%);
  user-select: none;
  pointer-events: none;
}

.brandFoot {
  margin: 6px 0 0;
  font-size: 12px;
  color: #8a7a99;
}

/* ---------- 右：表单 ---------- */

.formPane {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.formBox { width: min(400px, 100%); }

.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 26px;
  border-radius: 10px;
  background: #f6f2fb;
}

.tab {
  flex: 1;
  height: 34px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 550;
  font-family: inherit;
  cursor: pointer;
  transition: background .16s, color .16s, box-shadow .16s;
}

.tab.on {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(76, 38, 116, .12);
}

.step[hidden] { display: none; }

h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 660;
  letter-spacing: -.02em;
  color: var(--ink);
}

.lead {
  margin: 8px 0 22px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

.lead b { color: var(--ink-2); font-weight: 600; }

.field {
  display: block;
  margin-bottom: 15px;
}

.field > span {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-bottom: 7px;
  font-size: 12.5px;
  font-weight: 550;
  color: var(--ink-2);
}

.field > span em {
  font-style: normal;
  font-weight: 400;
  font-size: 11.5px;
  color: #9c8caa;
}

.field input {
  width: 100%;
  height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-size: 14.5px;
  font-family: inherit;
  transition: border-color .14s, box-shadow .14s;
}

.field input::placeholder { color: #b3a6bf; }

.field input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(141, 61, 230, .14);
}

.field input:disabled { background: #faf8fc; color: #9d90ab; }

.field small {
  display: block;
  margin-top: 6px;
  font-size: 11.5px;
  color: #9c8caa;
}

.primary {
  width: 100%;
  height: 44px;
  margin-top: 6px;
  border: 0;
  border-radius: 9px;
  background: linear-gradient(180deg, #9450ea 0%, #7c30d4 100%);
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(90, 30, 160, .28), inset 0 1px 0 rgba(255, 255, 255, .18);
  transition: filter .14s, transform .06s;
}

.primary:hover { filter: brightness(1.04); }
.primary:active { transform: translateY(1px); }

.primary:disabled {
  background: #d9c9ec;
  color: #fff;
  box-shadow: none;
  cursor: default;
}

.row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.row:has(> :only-child) { justify-content: flex-end; }

.textBtn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--brand-deep);
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
}

.textBtn:hover { text-decoration: underline; }
.textBtn:disabled { color: #b6a8c4; cursor: default; text-decoration: none; }

/* 六格验证码 */

.codeRow {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin: 4px 0 18px;
}

.codeCell {
  width: 100%;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 22px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: center;
  font-family: inherit;
  transition: border-color .14s, box-shadow .14s;
}

.codeCell:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(141, 61, 230, .14);
}

.codeCell.filled { border-color: #cbb4e8; background: #fdfbff; }

.feedback {
  margin: 12px 0 0;
  padding: 9px 11px;
  border-radius: 8px;
  font-size: 12.5px;
  line-height: 1.55;
  background: #fdf2f4;
  color: var(--danger);
}

.feedback[data-kind="ok"] { background: #eff9f3; color: var(--ok); }

.feedback[hidden] { display: none; }

.legal {
  margin: 26px 0 0;
  padding-top: 18px;
  border-top: 1px solid #f2ecf8;
  font-size: 11.5px;
  line-height: 1.6;
  color: #a294b0;
}

/* ---------- 窄屏 ---------- */

@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }

  .brandPane {
    padding: 26px 22px 24px;
    border-right: 0;
    border-bottom: 1px solid #f0e7fa;
    background: linear-gradient(180deg, #fbf8ff 0%, #f5ecfd 70%, #ffffff 100%);
  }

  .brandCopy { margin-top: 20px; }
  .brandCopy h1 { font-size: 23px; }
  .brandCopy p { display: none; }
  .art { display: none; }
  .brandFoot { display: none; }

  .formPane { padding: 26px 20px 44px; align-items: flex-start; }
  .formBox { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
