:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #1c1f24;
  --muted: #6b7280;
  --line: #e5e7eb;
  --brand: #1677ff; /* 支付宝蓝 */
  --brand-dark: #0958d9;
  --ok: #16a34a;
  --warn-bg: #fff7e6;
  --warn-line: #ffd591;
  --radius: 14px;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
a { color: var(--brand); text-decoration: none; }
h1 { font-size: 28px; line-height: 1.3; margin: 0 0 8px; }
h2 { font-size: 20px; margin: 28px 0 12px; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.top { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top .row { height: 60px; }
.brand { font-weight: 700; font-size: 18px; color: var(--text); }
.top nav a { margin-left: 18px; color: var(--muted); }
.top nav a:hover { color: var(--text); }
main { padding: 24px 16px 48px; min-height: 70vh; }
.foot { color: var(--muted); font-size: 13px; padding: 24px 16px 40px; text-align: center; }

.hero { text-align: center; padding: 32px 0 28px; }
.hero h1 { font-size: 34px; }
.hero p { color: var(--muted); margin: 0 0 18px; }
.steps { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.steps span { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px 14px; font-size: 14px; color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.card { background: var(--card); border-radius: var(--radius); overflow: hidden; color: var(--text); border: 1px solid var(--line); transition: transform .15s, box-shadow .15s; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.08); }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.card-body h2 { font-size: 17px; margin: 0 0 4px; }
.card-body p { margin: 0 0 14px; font-size: 14px; flex: 1; }
.cover { aspect-ratio: 16/9; display: grid; place-items: center; background: linear-gradient(135deg, hsl(var(--h,210) 85% 92%), hsl(calc(var(--h,210) + 40) 80% 84%)); }
.cover span { font-size: 64px; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover.big { border-radius: var(--radius); }
.cover.big span { font-size: 96px; }
.price { color: #e5484d; font-weight: 700; font-size: 20px; }
.price.big { font-size: 34px; }

.back { display: inline-block; margin-bottom: 16px; color: var(--muted); }
.detail { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.lead { color: var(--muted); margin: 0 0 20px; }
.buybox { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.buybox form { margin-top: 12px; }
.assure { margin: 14px 0 0; padding-left: 18px; color: var(--muted); font-size: 14px; }
.prose { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 24px 16px; margin-top: 28px; }
.prose h3 { margin: 18px 0 6px; font-size: 17px; }
.prose ul { padding-left: 20px; margin: 6px 0; }
.small-prose { margin-top: 16px; padding: 4px 18px 10px; }

label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 14px; }
input, textarea { display: block; width: 100%; margin-top: 6px; padding: 10px 12px; font: inherit; color: var(--text); border: 1px solid var(--line); border-radius: 10px; background: #fff; }
input:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--brand) 30%, transparent); border-color: var(--brand); }
label.check { display: flex; align-items: center; gap: 8px; color: var(--text); }
label.check input { width: auto; margin: 0; }
.btn { display: inline-block; border: 1px solid var(--line); background: var(--card); color: var(--text); padding: 10px 18px; border-radius: 10px; font: inherit; cursor: pointer; text-align: center; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.btn.primary:hover { background: var(--brand-dark); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.sm { padding: 4px 12px; font-size: 13px; }
.btn.wide, .buybox .btn { width: 100%; padding: 13px; font-size: 17px; }
.linkbtn { background: none; border: 0; color: var(--brand); cursor: pointer; font: inherit; padding: 0; }
.linkbtn.danger { color: #e5484d; margin-top: 16px; }

.paybox, .success, .narrow { max-width: 440px; margin: 0 auto; text-align: center; }
.narrow { text-align: left; }
.paybox { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; }
.qr { width: 240px; margin: 12px auto; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
.qr img { width: 100%; display: block; }
.qr.dim { opacity: .25; }
.mock { margin-top: 18px; background: var(--warn-bg); border: 1px dashed var(--warn-line); border-radius: 12px; padding: 14px; font-size: 14px; }
.mock .btn { margin-top: 10px; }
.warn { background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 10px; padding: 10px 14px; font-size: 14px; }

.success { padding: 12px 0 8px; }
.tick { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; background: var(--ok); color: #fff; font-size: 34px; display: grid; place-items: center; }
.deliver { max-width: 560px; margin: 16px auto 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.copyrow { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.copyrow .lbl { color: var(--muted); font-size: 14px; flex: 0 0 64px; }
.copyrow code { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 15px; background: var(--bg); padding: 4px 8px; border-radius: 6px; }
.keep { margin-top: 18px; font-size: 14px; color: var(--muted); }
.keep .copyrow { border: 0; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 8px 0 8px; }
.stats div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stats span { color: var(--muted); font-size: 13px; display: block; }
.stats b { font-size: 26px; display: block; }
.stats small { color: var(--muted); }
.table { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 500; background: #fafbfc; }
tr:last-child td { border-bottom: 0; }
.actions a, .actions form { margin-right: 12px; display: inline; }
.tag { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--bg); color: var(--muted); }
.tag.ok { background: #dcfce7; color: var(--ok); }
.tag.wait { background: #e6f0ff; color: var(--brand); }

.form { margin-top: 16px; }
.wide-form { max-width: 720px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px 4px; margin: 0 0 18px; background: var(--card); }
legend { font-weight: 600; padding: 0 6px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

@media (max-width: 720px) {
  .detail, .two { grid-template-columns: 1fr; gap: 16px; }
  .stats { grid-template-columns: 1fr; }
  h1 { font-size: 24px; }
  .hero h1 { font-size: 28px; }
}

/* 手机付款 */
.paybtn { margin: 18px 0 8px; font-size: 18px; padding: 15px; }
#checkpaid { margin-top: 4px; }
details.alt { margin-top: 16px; font-size: 14px; color: var(--muted); }
details.alt summary { cursor: pointer; }
.wxmask { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.82); color: #fff; text-align: right; padding: 16px 24px; font-size: 18px; line-height: 1.8; }
.wxmask .arrow { font-size: 48px; line-height: 1; }
@media (max-width: 720px) {
  main { padding-top: 16px; }
  .paybox { border: 0; background: none; padding: 8px 0; }
  .buybox .btn { position: sticky; bottom: 12px; }
}
