:root {
  --primary: #5c6bc0;
  --primary-dark: #4a56a6;
  --grad: linear-gradient(135deg, #5c6bc0 0%, #8e4fb5 100%);
  --bg: #f4f5fa;
  --card: #ffffff;
  --text: #1f2430;
  --muted: #8a93a6;
  --green: #26a69a;
  --red: #ef5350;
  --radius: 14px;
  --shadow: 0 4px 18px rgba(30, 40, 80, .08);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg); color: var(--text); font-size: 15px;
  max-width: 620px; margin: 0 auto;
}
[hidden] { display: none !important; }
button { font-family: inherit; cursor: pointer; }
input {
  font-family: inherit; font-size: 15px; padding: 12px 14px;
  border: 1px solid #e0e5f0; border-radius: 10px; background: #fff;
  color: var(--text); outline: none; width: 100%;
}
input:focus { border-color: var(--primary); }

/* ---------- 头部 ---------- */
.hero {
  background: var(--grad); color: #fff; padding: 40px 24px 54px;
  text-align: center; position: relative;
}
.hero .logo {
  width: 72px; height: 72px; display: block; margin: 0 auto;
  border-radius: 18px; box-shadow: 0 14px 34px rgba(19, 32, 92, .34);
}
.hero-title { font-size: 19px; margin-top: 6px; letter-spacing: .5px; }
.hero-sub { font-size: 14px; color: rgba(255,255,255,.85); margin-top: 6px; font-weight: 600; }
.badge-tag {
  display: inline-block; margin-top: 14px; padding: 6px 16px;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.35);
  border-radius: 20px; font-size: 13px;
}

/* ---------- 进度条 ---------- */
.steps {
  display: flex; align-items: center; justify-content: center;
  background: var(--card); padding: 16px 20px; margin: -26px 16px 0;
  border-radius: var(--radius); box-shadow: var(--shadow); position: relative; z-index: 2;
}
.step { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.step .dot {
  width: 30px; height: 30px; border-radius: 50%; background: #e8ebf5;
  color: var(--muted); display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; transition: all .25s;
}
.step .txt { font-size: 12px; color: var(--muted); }
.step.active .dot { background: var(--primary); color: #fff; }
.step.active .txt { color: var(--primary); font-weight: 600; }
.step.done .dot { background: var(--green); color: #fff; }
.step.done .txt { color: var(--green); }
.step.done .dot::after { content: '✓'; }
.step.done .dot { font-size: 0; }
.line { flex: 1; height: 2px; background: #e8ebf5; margin: 0 6px; max-width: 46px; }
.line.on { background: var(--green); }

/* ---------- 卡片内容 ---------- */
.stage { padding: 20px 16px 10px; }
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px 20px; margin-bottom: 16px;
}
.card-title { font-size: 17px; font-weight: 700; }
.card-desc { color: var(--muted); font-size: 14px; margin: 8px 0 18px; line-height: 1.7; }
.row { margin-bottom: 12px; }
.row { display: flex; gap: 10px; }
.row input { flex: 1; }
.btn-sms {
  width: 118px; flex-shrink: 0; border: 1px solid var(--primary); color: var(--primary);
  background: #fff; border-radius: 10px; font-size: 13px;
}
.btn-sms:disabled { opacity: .5; cursor: not-allowed; }
.hint { color: var(--muted); font-size: 12.5px; margin: -6px 0 14px; }
.hint b { color: var(--primary); }
.btn {
  width: 100%; padding: 13px; border: none; border-radius: 10px;
  font-size: 15px; font-weight: 600; transition: all .2s;
}
.btn.primary { background: var(--grad); color: #fff; }
.btn.primary:hover { filter: brightness(1.05); }
.btn.primary.big { padding: 15px; font-size: 16px; }
.btn.ghost {
  background: #fff; color: var(--primary); border: 1px solid var(--primary);
  margin-top: 10px;
}
.btn.ghost:hover { background: rgba(92,107,192,.06); }
.err { color: var(--red); font-size: 13px; min-height: 18px; margin-top: 10px; }
.platform-tip {
  margin-top: 16px; padding: 12px 14px; background: #f7f8fc;
  border-radius: 10px; font-size: 13px; color: var(--muted); line-height: 1.7;
}
.platform-tip b { color: var(--text); }
.platform-tip code { background: #eef1f7; padding: 1px 6px; border-radius: 4px; font-size: 12px; }

.wechat-guide {
  margin-top: 14px; padding: 15px; border: 1px solid rgba(38,166,154,.28);
  border-radius: 12px; background: rgba(38,166,154,.08); text-align: left;
}
.wechat-guide-title { color: #167c72; font-size: 15px; font-weight: 700; }
.wechat-guide-desc { color: #627078; font-size: 13px; line-height: 1.75; margin-top: 6px; }
.wechat-guide .btn { margin-top: 12px; background: transparent; }

.backup-download {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 16px 18px; margin: 2px 0 8px; border: 1px dashed #cbd2e2;
  border-radius: var(--radius); background: rgba(255,255,255,.72);
}
.backup-download div { min-width: 0; }
.backup-download b { display: block; font-size: 14px; }
.backup-download span { display: block; color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.backup-download .btn { width: auto; min-width: 126px; margin: 0; padding: 10px 14px; flex-shrink: 0; }

/* ---------- 完成 ---------- */
.done-card { text-align: center; padding: 36px 20px; }
.done-emoji { font-size: 52px; }
.done-title { font-size: 20px; font-weight: 700; margin-top: 10px; }
.done-sub { color: var(--muted); margin: 10px 0 22px; font-size: 14px; line-height: 1.7; }
.done-sub b { color: var(--green); }
.done-meta { color: var(--muted); font-size: 12.5px; margin-bottom: 18px; line-height: 1.8; }

.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 12px 20px 40px; line-height: 1.7; }

@media (max-width: 420px) {
  .backup-download { align-items: stretch; flex-direction: column; }
  .backup-download .btn { width: 100%; }
}
