:root {
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --border: #e6e8eb;
  --text: #101828;
  --text-2: #475467;
  --text-3: #98a2b3;
  --brand: #1b6cf3;
  --brand-dark: #0f4fd0;
  --ink: #0f1115;
  --ok: #12b76a;
  --warn: #f79009;
  --danger: #f04438;
  --radius: 14px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body { padding-bottom: env(safe-area-inset-bottom); }

a { color: var(--brand); text-decoration: none; }
img, svg { display: block; max-width: 100%; }

.wrap { width: 100%; max-width: 720px; margin: 0 auto; padding: 0 16px; }

/* ---------- 顶部导航 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}
.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: .2px; color: var(--ink); }
.logo-mark {
  width: 26px; height: 26px; border-radius: 7px;
  background: linear-gradient(135deg, #1b6cf3, #12b76a);
  display: grid; place-items: center; color: #fff; font-size: 14px; font-family: var(--mono);
}
.nav-links { display: flex; gap: 16px; font-size: 14px; }
.nav-links a { color: var(--text-2); }
.nav-links a.active { color: var(--ink); font-weight: 600; }

/* ---------- 基础组件 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 44px; padding: 0 20px; border-radius: 10px; border: 1px solid transparent;
  background: var(--brand); color: #fff; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: .15s ease; width: 100%;
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn-primary { background: var(--brand); }
.btn-dark { background: var(--ink); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--border); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; border-radius: 8px; width: auto; }
.btn-link { background: none; border: none; color: var(--brand); font-size: 14px; padding: 0; height: auto; }

.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px;
}
.grid { display: grid; gap: 12px; }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.mono { font-family: var(--mono); }
.center { text-align: center; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tag {
  display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 12px;
  background: #eef4ff; color: var(--brand); border: 1px solid #d6e4ff;
}
.tag.ok { background: #e9fbf1; color: var(--ok); border-color: #c6f0da; }
.tag.warn { background: #fff8ec; color: var(--warn); border-color: #ffe4b8; }
.tag.gray { background: var(--bg-soft); color: var(--text-2); border-color: var(--border); }

.section { padding: 34px 0; border-top: 1px solid var(--border); }
.section-title { font-size: 22px; font-weight: 700; margin: 0 0 6px; letter-spacing: .2px; }
.section-sub { margin: 0 0 18px; color: var(--text-2); font-size: 14px; }

/* ---------- Hero ---------- */
.hero { padding: 38px 0 30px; }
.hero h1 { font-size: 30px; line-height: 1.3; margin: 14px 0 12px; letter-spacing: .3px; }
.hero p { color: var(--text-2); margin: 0 0 20px; font-size: 15px; }
.hero-actions { display: flex; gap: 10px; }
.hero-actions .btn { width: auto; flex: 1; }
.hero-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 16px; font-size: 13px; color: var(--text-3); }

/* ---------- 功能卡片 ---------- */
.features { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
.feature { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.feature h3 { margin: 8px 0 4px; font-size: 15px; }
.feature p { margin: 0; font-size: 13px; color: var(--text-2); }
.feature .ico { font-size: 18px; }

/* ---------- 截图预览 ---------- */
.shots { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; -webkit-overflow-scrolling: touch; scroll-snap-type: x mandatory; }
.shot { flex: 0 0 82%; scroll-snap-align: center; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--ink); }
.shot img { width: 100%; }
.shot-cap { padding: 8px 10px; font-size: 12px; color: var(--text-2); background: #fff; }

/* ---------- 价格 ---------- */
.plans { display: grid; gap: 14px; }
.plan { position: relative; border: 1px solid var(--border); border-radius: 16px; padding: 18px; background: #fff; }
.plan.recommend { border-color: var(--brand); box-shadow: 0 8px 24px rgba(27, 108, 243, .12); }
.plan h3 { margin: 0 0 2px; font-size: 17px; }
.plan .desc { color: var(--text-2); font-size: 13px; min-height: 20px; }
.plan .price { margin: 12px 0 10px; font-weight: 700; font-size: 28px; letter-spacing: .5px; }
.plan .price .cur { font-size: 16px; font-weight: 600; margin-right: 2px; }
.plan .price del { font-size: 14px; color: var(--text-3); font-weight: 400; margin-left: 8px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 16px; }
.plan ul li { position: relative; padding-left: 20px; font-size: 13.5px; color: var(--text-2); margin-bottom: 6px; }
.plan ul li::before {
  content: "✓"; position: absolute; left: 0; top: 0; color: var(--ok); font-size: 13px; font-weight: 700;
}
.plan .badge {
  position: absolute; top: -10px; right: 14px; background: var(--brand); color: #fff;
  font-size: 12px; padding: 2px 10px; border-radius: 20px; font-weight: 600;
}

/* ---------- 表单 ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; font-weight: 600; }
.input, .select {
  width: 100%; height: 46px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--border); background: #fff; font-size: 15px; color: var(--text);
  outline: none; appearance: none;
}
.input:focus, .select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(27, 108, 243, .12); }
.textarea { height: auto; padding: 12px; }
.hint { font-size: 12px; color: var(--text-3); margin-top: 6px; }
.err { font-size: 12px; color: var(--danger); margin-top: 6px; display: none; }
.err.show { display: block; }

.agree { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--text-2); margin: 4px 0 16px; }
.agree input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--brand); }

/* ---------- 收银台 ---------- */
.pay-box { text-align: center; }
.qr-frame {
  width: 232px; height: 232px; margin: 6px auto 10px; padding: 10px;
  border: 1px solid var(--border); border-radius: 14px; background: #fff;
  box-shadow: 0 6px 20px rgba(16, 24, 40, .06);
}
.qr-frame img { width: 100%; height: 100%; }
.qr-loading { display: grid; place-items: center; height: 100%; color: var(--text-3); font-size: 13px; }
.countdown { font-family: var(--mono); font-size: 13px; color: var(--text-2); }
.countdown b { color: var(--danger); font-size: 15px; }
.qr-mask {
  position: absolute; inset: 0; display: none; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .92); border-radius: 14px; font-size: 14px; color: var(--text-2); text-align: center; padding: 16px;
}
.qr-wrap { position: relative; width: 232px; margin: 6px auto 10px; }
.qr-mask.show { display: flex; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; font-size: 14px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; text-align: right; word-break: break-all; }

.license {
  font-family: var(--mono); font-size: 17px; letter-spacing: 1.5px; color: #7cf3a0;
  background: var(--ink); padding: 16px 12px; border-radius: 12px; text-align: center; word-break: break-all;
}

.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.steps li { position: relative; padding: 0 0 12px 28px; font-size: 13.5px; color: var(--text-2); counter-increment: s; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--bg-soft); border: 1px solid var(--border); color: var(--text-2);
  font-size: 12px; display: grid; place-items: center; font-family: var(--mono);
}

.notice {
  background: #fff8ec; border: 1px solid #ffe4b8; color: #7a4a06;
  padding: 12px; border-radius: 12px; font-size: 13px; line-height: 1.7;
}

/* ---------- 底部 ---------- */
.footer { margin-top: 20px; padding: 24px 0 40px; border-top: 1px solid var(--border); color: var(--text-3); font-size: 12.5px; }
.footer a { color: var(--text-2); }

/* ---------- Toast ---------- */
#toast {
  position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%);
  background: rgba(15, 17, 21, .92); color: #fff; font-size: 14px;
  padding: 10px 18px; border-radius: 10px; z-index: 999; opacity: 0; pointer-events: none;
  transition: opacity .2s ease; max-width: 80vw; text-align: center;
}
#toast.show { opacity: 1; }

.loading-mask { position: fixed; inset: 0; background: rgba(255,255,255,.7); display: none; place-items: center; z-index: 900; font-size: 14px; color: var(--text-2); }
.loading-mask.show { display: grid; }

@media (min-width: 640px) {
  .features { grid-template-columns: repeat(3, 1fr); }
  .shots { grid-template-columns: repeat(3, 1fr); overflow: visible; }
  .shot { flex: 1 1 0; }
  .hero h1 { font-size: 36px; }
  .plans { grid-template-columns: repeat(2, 1fr); }
}
