/* =====================================================================
   结账页样式 · reading/pay/pay.css
   ---------------------------------------------------------------------
   设计意图：这是家长掏钱的地方，第一要务是「看起来可靠」。
   所以走纸感 + 深绿主色，不用渐变、不用大圆角、不用霓虹。
   ===================================================================== */
:root{
  --ink:#14212e;
  --ink-2:#3d4a58;
  --muted:#77828f;
  --paper:#faf8f4;
  --card:#ffffff;
  --line:#e7e2d8;
  --line-2:#f0ece3;
  --green:#0f6b52;
  --green-d:#0b5240;
  --green-l:#eaf4f0;
  --gold:#b8892b;
  --red:#b3261e;
  --shadow:0 1px 2px rgba(20,33,46,.04), 0 12px 32px -12px rgba(20,33,46,.14);
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;max-width:100%;overflow-x:hidden}
body{
  background:var(--paper);color:var(--ink);
  font:16px/1.65 -apple-system,BlinkMacSystemFont,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",system-ui,sans-serif;
  -webkit-font-smoothing:antialiased;
  padding-bottom:40px;
}
a{color:var(--green);text-decoration:none}
a:hover{text-decoration:underline}

/* ---------- 顶栏 ---------- */
.hd{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  max-width:640px;margin:0 auto;padding:18px 18px 10px;
}
.brand{display:flex;align-items:center;gap:9px;font-weight:700;font-size:15px;letter-spacing:.2px}
.brand i{
  width:26px;height:26px;border-radius:7px;display:grid;place-items:center;
  background:var(--green);color:#fff;font-style:normal;font-size:13px;font-weight:800;flex:0 0 auto;
}
.brand small{display:block;font-weight:500;font-size:11px;color:var(--muted);letter-spacing:.6px}
.lang{
  border:1px solid var(--line);background:#fff;color:var(--ink-2);
  font-size:12.5px;padding:5px 11px;border-radius:20px;cursor:pointer;font-family:inherit;
}
.lang:hover{border-color:#cfc9bc}

/* ---------- 主卡 ---------- */
.wrap{max-width:640px;margin:0 auto;padding:0 18px}
.card{
  background:var(--card);border:1px solid var(--line);border-radius:16px;
  box-shadow:var(--shadow);overflow:hidden;
}

/* 商品区 */
.prod{padding:22px 22px 18px;border-bottom:1px solid var(--line-2)}
.prod .kicker{
  font-size:11.5px;letter-spacing:1.6px;color:var(--gold);
  font-weight:700;text-transform:uppercase;margin-bottom:8px;
}
.prod h1{font-size:20px;line-height:1.4;margin:0 0 6px;letter-spacing:-.2px}
.prod p{margin:0;color:var(--ink-2);font-size:14px}
.prow{display:flex;align-items:flex-end;justify-content:space-between;gap:14px;margin-top:16px}
.price{display:flex;align-items:baseline;gap:2px;line-height:1}
.price .cur{font-size:19px;font-weight:600;color:var(--ink)}
.price b{font-size:38px;font-weight:800;letter-spacing:-1.5px}
.price .alt{font-size:12.5px;color:var(--muted);margin-left:8px;font-weight:400}
.term{font-size:12.5px;color:var(--muted);text-align:right;white-space:nowrap}

/* 渠道切换 */
.tabs{display:flex;gap:0;border-bottom:1px solid var(--line-2);background:#fcfbf9}
.tabs button{
  flex:1;appearance:none;border:0;background:transparent;cursor:pointer;
  font-family:inherit;font-size:14.5px;font-weight:600;color:var(--muted);
  padding:14px 8px;border-bottom:2px solid transparent;transition:color .15s,border-color .15s;
  display:flex;align-items:center;justify-content:center;gap:7px;
}
.tabs button:hover{color:var(--ink-2)}
.tabs button.on{color:var(--green);border-bottom-color:var(--green);background:#fff}
.tabs button .dot{width:7px;height:7px;border-radius:50%;background:currentColor;opacity:.5}
.tabs button.on .dot{opacity:1}

/* 二维码舞台 */
.stage{padding:26px 22px 24px;min-height:330px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}

.qrbox{
  width:220px;height:220px;background:#fff;border:1px solid var(--line);border-radius:14px;
  padding:12px;display:grid;place-items:center;position:relative;
}
.qrbox svg,.qrbox img{width:100%;height:100%;display:block}
.qrbox.dim{opacity:.25;filter:blur(1.5px)}
.qrbox .mask{
  position:absolute;inset:0;display:none;place-items:center;border-radius:14px;
  background:rgba(255,255,255,.86);font-size:14px;font-weight:600;color:var(--ink-2);padding:16px;
}
.qrbox.dim .mask{display:grid}

.amount{
  margin-top:16px;font-size:14px;color:var(--ink-2);
}
.amount b{font-size:19px;color:var(--ink);letter-spacing:-.3px}
.hint{margin-top:10px;font-size:14.5px;font-weight:600;color:var(--ink)}
.hint .ch{color:var(--green)}
.subhint{margin-top:4px;font-size:13px;color:var(--muted)}
.countdown{margin-top:14px;font-size:12.5px;color:var(--muted);font-variant-numeric:tabular-nums}
.countdown b{color:var(--ink-2)}

.spin{
  width:26px;height:26px;border:2.5px solid var(--line);border-top-color:var(--green);
  border-radius:50%;animation:sp .8s linear infinite;margin-bottom:14px;
}
@keyframes sp{to{transform:rotate(360deg)}}

.btn{
  appearance:none;border:0;font-family:inherit;font-size:15px;font-weight:600;
  padding:12px 22px;border-radius:11px;cursor:pointer;transition:transform .08s,background .15s;
}
.btn:active{transform:translateY(1px)}
.btn-primary{background:var(--green);color:#fff}
.btn-primary:hover{background:var(--green-d)}
.btn-ghost{background:#fff;color:var(--ink-2);border:1px solid var(--line)}
.btn-ghost:hover{border-color:#cfc9bc}
.btn[disabled]{opacity:.5;cursor:default;transform:none}

/* 成功态 */
.ok-ic{
  width:62px;height:62px;border-radius:50%;background:var(--green-l);color:var(--green);
  display:grid;place-items:center;font-size:30px;margin-bottom:14px;
}
.ok-t{font-size:20px;font-weight:700;margin:0 0 4px}
.ok-s{font-size:14px;color:var(--ink-2);margin:0 0 18px}

.codebox{
  width:100%;border:1.5px dashed #cfe0d8;background:#f6fbf8;border-radius:12px;
  padding:16px 14px;margin-bottom:14px;
}
.codebox .lb{font-size:11.5px;letter-spacing:1.4px;color:var(--muted);text-transform:uppercase;margin-bottom:7px}
.codebox code{
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:19px;font-weight:700;letter-spacing:.5px;color:var(--ink);word-break:break-all;
}
.codebox .cps{margin-top:11px;display:flex;gap:8px;justify-content:center;flex-wrap:wrap}
.codebox .cps .btn{font-size:13px;padding:8px 15px;border-radius:9px}

.tip{
  font-size:13px;color:var(--ink-2);background:#fdfaf1;border:1px solid #f0e6cc;
  border-radius:10px;padding:12px 14px;text-align:left;line-height:1.7;width:100%;margin-bottom:16px;
}
.tip b{color:#8a6415}

/* 错误态 */
.err-ic{width:56px;height:56px;border-radius:50%;background:#fdeceb;color:var(--red);display:grid;place-items:center;font-size:26px;margin-bottom:12px}

/* 保障条 */
.assure{
  list-style:none;margin:16px 0 0;padding:0;display:grid;gap:9px;
}
.assure li{
  display:flex;gap:9px;align-items:flex-start;font-size:13.5px;color:var(--ink-2);
  background:#fff;border:1px solid var(--line);border-radius:11px;padding:11px 14px;
}
.assure li span.i{color:var(--green);font-weight:800;flex:0 0 auto}

/* 页脚 */
.ft{max-width:640px;margin:22px auto 0;padding:0 18px;text-align:center;color:var(--muted);font-size:12.5px;line-height:2}
.ft a{color:var(--muted);text-decoration:underline;text-decoration-color:#d8d2c6}
.ft a:hover{color:var(--ink-2)}

/* 微信内提示 */
.inwx .only-wx{display:block}
.only-wx{display:none}

@media(max-width:480px){
  .hd{padding:14px 16px 8px}
  .wrap{padding:0 14px}
  .prod{padding:18px 18px 16px}
  .prod h1{font-size:18px}
  .price b{font-size:33px}
  .stage{padding:22px 16px;min-height:300px}
  .qrbox{width:196px;height:196px;padding:10px}
  .codebox code{font-size:16.5px}
  .prow{flex-direction:column;align-items:flex-start;gap:6px}
  .term{text-align:left}
}

@media print{.hd,.tabs,.assure,.ft{display:none}}
