/* 暗标王 · 官方收银台 (pay.anbiaowang.vip)
 *
 * 设计口径:
 * - 主色沿用软件界面里的深青绿 #2f6f5e —— 官网、收银台、软件是「一家」;
 * - 金色 #b8871b 只用在「价格」和皇冠上, 取自 Logo 的金色, 不喧宾夺主;
 * - 页面宽度 1000px, 与软件窗口同宽, 视觉上是同一套东西;
 * - ⚠ 静态页: 不依赖 JS 也能看全(套餐和权益表是**服务端生成**后写进 HTML 的,
 *   不是前端 JS 渲染 —— 审核的机器不一定跑 JS)。
 */

:root {
  --brand: #2f6f5e;
  --brand-d: #24594b;
  --brand-l: #eef7f4;
  --brand-b: #cfe3dd;
  --gold: #b8871b;
  --gold-l: #fdf6e6;
  --ink: #1a1d21;
  --muted: #5b6270;
  --line: #e3e6e9;
  --bg: #f6f7f9;
  --white: #fff;
  --radius: 12px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

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

.wrap { max-width: 1000px; margin: 0 auto; padding: 0 20px; }

a { color: var(--brand); }

/* ---------- 页头 ---------- */
.site-head {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.head-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.brand img { border-radius: 12px; display: block; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.3; }
.brand-txt b { font-size: 19px; letter-spacing: 1px; }
.brand-txt i {
  font-style: normal;
  font-size: 12px;
  color: var(--brand);
  background: var(--brand-l);
  border: 1px solid var(--brand-b);
  border-radius: 20px;
  padding: 1px 10px;
  align-self: flex-start;
  margin-top: 3px;
}
.nav { margin-left: auto; display: flex; gap: 16px; flex-wrap: wrap; }
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--brand); border-bottom-color: var(--brand); }

/* ---------- 主体 ---------- */
.hero { background: var(--white); border-bottom: 1px solid var(--line); }
.hero-inner { padding: 40px 0 34px; }
.hero h1 {
  margin: 0 0 10px;
  font-size: 27px;
  letter-spacing: .5px;
}
.hero .lead { margin: 0 0 20px; color: var(--muted); font-size: 15px; }
.promise {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand-l);
  border: 1px solid var(--brand-b);
  color: var(--brand-d);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 14px;
  font-weight: 600;
}

section { padding: 34px 0 0; }
section > h2 {
  font-size: 19px;
  margin: 0 0 6px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
section > h2 small { font-size: 13px; color: var(--muted); font-weight: 400; }
.section-note { color: var(--muted); font-size: 13.5px; margin: 0 0 18px; }

/* ---------- 经营主体 / 联系方式 ---------- */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.subject { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.subject div { display: flex; flex-direction: column; }
.subject span { font-size: 12.5px; color: var(--muted); }
.subject b { font-weight: 600; }
.todo {
  color: #a4562a;
  background: #fdf1e7;
  border: 1px solid #f0d5bf;
  border-radius: 6px;
  padding: 1px 8px;
  font-weight: 400;
  font-size: 13px;
}

/* ---------- 套餐 ---------- */
.plans {
  display: grid;
  gap: 14px;
  /* 168px 下限 ⇒ 1000px 宽正好排下 5 个套餐(960 可用宽)
     —— 排成 4+1 两行的话, 最后一档孤零零落单, 不好看 */
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  align-items: stretch;
}
.plan {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 18px 18px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.plan.is-featured { border-color: var(--brand); box-shadow: 0 6px 22px rgba(47, 111, 94, .10); }
.plan-flag {
  position: absolute;
  top: -11px;
  left: 18px;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  border-radius: 20px;
  padding: 2px 12px;
}
.plan-name { margin: 0; font-size: 17px; letter-spacing: .5px; }
.plan-price { margin: 8px 0 2px; color: var(--gold); line-height: 1.2; }
.plan-price .cur { font-size: 17px; }
.plan-price .amt { font-size: 34px; font-weight: 700; }
.plan-price .unit { font-size: 14px; color: var(--muted); margin-left: 3px; }
.plan-desc { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.plan-points { list-style: none; margin: 12px 0 16px; padding: 0; font-size: 14px; }
.plan-points li { padding-left: 20px; position: relative; margin: 3px 0; }
.plan-points li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
}
.btn {
  display: block;
  text-align: center;
  text-decoration: none;
  background: var(--brand);
  color: #fff;
  border: 1px solid var(--brand);
  border-radius: 9px;
  padding: 10px 18px;
  font-size: 15px;
  margin-top: auto;
}
.btn:hover { background: var(--brand-d); border-color: var(--brand-d); }
.btn.ghost { background: transparent; color: var(--brand); }
.btn.ghost:hover { background: var(--brand-l); }

/* 二维码占位: 支付上线后把 <img> 换进去即可 */

/* ---------- 权益对照表 ---------- */
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; background: var(--white); }
caption {
  caption-side: top;
  text-align: left;
  color: var(--muted);
  font-size: 13px;
  padding-bottom: 8px;
}
th, td {
  border: 1px solid var(--line);
  padding: 9px 12px;
  font-size: 14px;
  text-align: left;
}
thead th { background: var(--brand-l); color: var(--brand-d); font-weight: 600; }
tbody th { font-weight: 400; background: #fbfbfc; width: 46%; }
.yes { color: var(--brand); font-weight: 700; }
.no { color: #b9bfc6; }
.todo-cell {
  color: #a4562a;
  background: #fdf1e7;
  border-radius: 5px;
  padding: 0 7px;
  font-size: 12.5px;
}

/* ---------- 购买流程 ---------- */
.steps { counter-reset: s; display: grid; gap: 12px; }
.steps li {
  counter-increment: s;
  list-style: none;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px 14px 52px;
  position: relative;
}
.steps li::before {
  content: counter(s);
  position: absolute;
  left: 16px;
  top: 13px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  line-height: 24px;
  text-align: center;
  font-weight: 700;
}
.steps ol { margin: 0; padding: 0; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; }
details {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 16px;
}
summary { cursor: pointer; font-weight: 600; }
details p { margin: 8px 0 2px; color: #333a45; font-size: 14px; }

/* ---------- 联系 ---------- */
.contact-box {
  background: var(--brand-l);
  border: 1px solid var(--brand-b);
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  align-items: center;
}
.contact-box .cb-main { flex: 1 1 320px; }
.contact-box h3 { margin: 0 0 4px; font-size: 16px; color: var(--brand-d); }
.contact-box p { margin: 0; font-size: 14px; }
.mail {
  font-size: 20px;
  font-weight: 700;
  color: var(--brand-d);
  text-decoration: none;
  word-break: break-all;
}

/* ---------- 页脚 ---------- */
footer {
  margin-top: 46px;
  background: var(--white);
  border-top: 1px solid var(--line);
  padding: 24px 0 34px;
  color: var(--muted);
  font-size: 13px;
}
footer .f-links { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
footer .beian { margin-top: 6px; }
footer .beian-pending { color: #9aa1ad; }
footer .copyright { margin-top: 8px; }

@media (max-width: 640px) {
  .hero h1 { font-size: 22px; }
  .nav { margin-left: 0; gap: 12px; }
  .plan-price .amt { font-size: 28px; }

  /* 窄屏排 2 列时, 5 个套餐会变成 2+2+1, 最后一个孤零零落单。
     ⇒ 让「奇数个时的最后一个」跨两列占满, 不留半张空位。
       只对最后一个生效, 所以 4 个/6 个套餐时这条规则不会误伤。 */
  .plans > .plan:last-child:nth-child(odd) { grid-column: 1 / -1; }
}


/* ===========================================================================
   支付视图（2026-11-10 第一百一十二批）
   ---------------------------------------------------------------------------
   ⚠ 这一块只在 URL 带 ?order= 时显示（从软件内点「购买积分」过来）。
     没有 order 参数时整块 hidden，页面就是普通价格公示页。
   =========================================================================== */

.pv-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 14.5px;
}
.pv-row:last-child { border-bottom: 0; }
.pv-row > span { color: var(--muted); flex: 0 0 auto; }
.pv-row > b { color: var(--ink); text-align: right; word-break: break-all; }
.pv-row > b.mono {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px;
  font-weight: 500;
}

/* ---- 支付区 ---- */
/* ⚠ 2026-11-11: 走支付宝「电脑网站支付」后, 这个框里装的不再是一张
   232x232 的二维码图片, 而是**整个支付宝收银台页面**(iframe)。
   尺寸必须够大 —— 太小会把它压成一条缝, 用户看不到二维码。
   但也不能太高: 那是嵌入式页面, 撑满会把我们自己的订单信息挤出屏幕。 */
.qr-wrap { text-align: center; margin: 26px 0 6px; }
.qr-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 232px;
  height: 232px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  padding: 10px;
  overflow: hidden;
}
/* 有 iframe 时, 容器跟着放大 */
.qr-box:has(iframe) {
  width: 420px;
  height: 560px;
  padding: 0;
  align-items: stretch;
}
.qr-box img, .qr-box canvas, .qr-box svg {
  display: block;
  width: 100%;
  height: 100%;
}
/* iframe 本身要铺满容器 */
.qr-box iframe.pay-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 12px;
  background: var(--white);
}
/* iframe 加载不出来时的兜底链接 —— 不能让人卡在一个空白框里 */
.qr-alt {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.qr-alt a { color: var(--brand); text-decoration: underline; }
/* ⚠ 没拿到 code_url 时的样子：明确说"开通中"，**不画空码**。
   画一个空框再写"请扫码"就是欺骗 —— 用户扫了什么都不会发生。 */
.qr-pending {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.7;
  padding: 0 14px;
}
.qr-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

/* ---- 状态行 ---- */
.pv-state {
  margin: 18px 0 0;
  padding: 12px 16px;
  border-radius: 9px;
  background: var(--brand-l, #eef4f7);
  color: var(--brand, #24596b);
  font-size: 14.5px;
  font-weight: 600;
  text-align: center;
}
.pv-state.pv-ok {
  background: #e8f6ee;
  color: #1c7a45;
}
.pv-state.pv-warn {
  background: #fdf3e6;
  color: #96690e;
}

@media (max-width: 640px) {
  .qr-box { width: 200px; height: 200px; }
  /* ⚠ 窄屏上 iframe 不能还是 420 宽 —— 会横向溢出 */
  .qr-box:has(iframe) { width: min(94vw, 420px); height: 520px; }
  .pv-row { font-size: 14px; }
}
