/* 邀请中心 H5 — 移动端优先，浅色卡片式布局 */
:root {
  --brand: #0b6e4f;
  --brand-dark: #085c41;
  --brand-soft: #e7f4ee;
  --accent: #b45309;
  --accent-soft: #fdf3e3;
  --bg: #f4f6f8;
  --card: #ffffff;
  --ink: #1f2329;
  --sub: #646a73;
  --line: #e5e8ec;
  --danger: #b91c1c;
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body.invite-page {
  background: var(--bg);
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 40px;
}

/* ---------- 顶部积分总览 ---------- */
.hero {
  background: linear-gradient(150deg, var(--brand), #12805d);
  color: #fff;
  padding: 28px 20px 24px;
  text-align: center;
}
.hero__eyebrow {
  font-size: 12px;
  letter-spacing: 3px;
  opacity: .75;
  margin-bottom: 14px;
}
.hero__label { font-size: 13px; opacity: .88; }
.hero__points { font-size: 46px; font-weight: 700; line-height: 1.2; margin: 2px 0; }
.hero__pending { font-size: 12.5px; opacity: .82; }
.hero__stats {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.hero__stats > div {
  flex: 1;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 10px;
  padding: 10px 8px;
}
.hero__stats b { display: block; font-size: 20px; line-height: 1.3; }
.hero__stats span { font-size: 12px; opacity: .85; }

/* ---------- 内容区 ---------- */
.content {
  max-width: 520px;
  margin: -18px auto 0;
  padding: 0 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 16px;
  box-shadow: 0 6px 18px rgba(15, 40, 30, .04);
}
.card h2 { font-size: 16px; margin-bottom: 10px; }
.card--center { text-align: center; padding: 32px 22px; }
.card--center h1 { font-size: 20px; margin-bottom: 12px; }

.banner {
  background: var(--accent-soft);
  border: 1px solid #f0d7b0;
  color: var(--accent);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
}

.code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #f7f9fa;
  border: 1px dashed #c9d6cf;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
}
.code-row b {
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 24px;
  letter-spacing: 4px;
  color: var(--brand);
}

.muted { color: var(--sub); font-size: 13px; }
.hint { color: var(--sub); font-size: 12px; margin-top: 8px; }

.qr-box {
  margin-top: 14px;
  text-align: center;
  background: #f7f9fa;
  border-radius: 10px;
  padding: 14px;
}
.qr-box img { width: 150px; height: 150px; object-fit: contain; display: block; margin: 0 auto 8px; }
.qr-box span { font-size: 12px; color: var(--sub); }

/* ---------- 按钮 ---------- */
.btn {
  border: 0;
  border-radius: 10px;
  padding: 11px 18px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s ease, transform .1s ease;
  font-family: inherit;
}
.btn:active { transform: scale(.99); }
.btn--primary {
  width: 100%;
  background: var(--brand);
  color: #fff;
  padding: 13px 18px;
  font-size: 15.5px;
}
.btn--primary:disabled { background: #c3c9c6; cursor: not-allowed; }
.btn--ghost {
  background: #fff;
  color: var(--brand);
  border: 1px solid var(--brand);
  padding: 8px 14px;
  font-size: 13px;
  white-space: nowrap;
}
.btn--ghost:disabled { color: #9aa5a0; border-color: var(--line); }

.reason { color: var(--accent); font-size: 13px; margin-top: 10px; min-height: 0; }
.reason:empty { display: none; }

/* ---------- 兑换成功 ---------- */
.redeem-ok {
  margin-top: 14px;
  background: var(--brand-soft);
  border-radius: 10px;
  padding: 14px;
  font-size: 14px;
}
.redeem-ok b { font-size: 17px; letter-spacing: 1px; color: var(--brand); }
.redeem-ok .contact { margin-top: 8px; font-size: 13px; }
.redeem-ok .contact-qr {
  width: 140px;
  height: 140px;
  object-fit: contain;
  display: block;
  margin: 10px auto 0;
  border-radius: 8px;
  background: #fff;
}
.redeem-ok .btn { margin-top: 12px; }

/* ---------- 积分明细 ---------- */
.ledger { list-style: none; }
.ledger li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}
.ledger li:last-child { border-bottom: 0; }
.ledger .meta { color: var(--sub); font-size: 12px; margin-top: 2px; }
.ledger .delta { font-weight: 700; white-space: nowrap; }
.ledger .delta.up { color: var(--brand); }
.ledger .delta.down { color: var(--danger); }
.ledger .delta.void { color: #9aa5a0; text-decoration: line-through; }
.ledger .empty { color: var(--sub); font-size: 13px; justify-content: center; }

/* ---------- 我的兑换 ---------- */
.redemptions .item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.redemptions .item:last-child { border-bottom: 0; }
.redemptions .code { font-family: Consolas, monospace; font-size: 15px; letter-spacing: 1px; }
.redemptions .meta { color: var(--sub); font-size: 12px; margin-top: 2px; }
.tag {
  display: inline-block;
  border-radius: 6px;
  padding: 1px 8px;
  font-size: 12px;
  font-weight: 600;
  background: var(--brand-soft);
  color: var(--brand);
}
.tag--muted { background: #f0f2f5; color: var(--sub); }
.tag--warn { background: var(--accent-soft); color: var(--accent); }
.empty { color: var(--sub); font-size: 13px; text-align: center; padding: 6px 0; }

/* ---------- 规则 ---------- */
.card--rules ul { list-style: none; }
.card--rules li {
  position: relative;
  padding-left: 16px;
  font-size: 13px;
  color: var(--sub);
  margin-bottom: 7px;
}
.card--rules li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand);
}
.card--rules b { color: var(--ink); }

/* ---------- 独立说明页 ---------- */
.content--plain { margin-top: 0; padding-top: 48px; }
.steps {
  text-align: left;
  margin: 18px 0;
  padding-left: 20px;
  color: var(--sub);
  font-size: 13.5px;
}
.steps li { margin-bottom: 8px; }

/* ---------- 其他 ---------- */
.foot { text-align: center; font-size: 12px; color: var(--sub); margin-top: 24px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%) translateY(10px);
  background: rgba(20, 30, 26, .88);
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13.5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  max-width: 80vw;
  text-align: center;
  z-index: 99;
}
.toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (min-width: 640px) {
  .content { padding: 0 20px; }
  .card { padding: 22px 22px; }
}
