/* ============ H5 设计体系：办理回执单 ============
   墨松绿 = 官方信任 · 暖橙 = 佣金奖励 · 票据齿孔 = 回执 motif */
:root {
  --ink: #12262e;
  --ink-2: #43555c;
  --brand: #0e7d67;
  --brand-deep: #0a5c4b;
  --brand-tint: #e3f1ec;
  --accent: #e8833a;
  --accent-tint: #fdf0e4;
  --paper: #f2f5f4;
  --card: #ffffff;
  --line: #e2e8e6;
  --danger: #c6453d;
  --danger-tint: #fbeceb;
  --ok: #1d9e74;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(18, 38, 46, .07);
  font-size: 16px;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", system-ui, sans-serif;
  background: var(--paper); color: var(--ink); line-height: 1.55;
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
}
button, input, select, textarea { font: inherit; color: inherit; }
.num { font-variant-numeric: tabular-nums; letter-spacing: .01em; }

/* ---------- 头图（回执单头部：品牌墨绿 + 齿孔底边） ---------- */
.hero { position: relative; background: linear-gradient(150deg, #0c3a30 0%, var(--brand-deep) 46%, #0e7d67 100%); color: #fff; padding: 26px 20px 34px; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(420px 200px at 88% -10%, rgba(255,255,255,.14), transparent 60%), radial-gradient(300px 160px at -8% 110%, rgba(232,131,58,.25), transparent 60%); }
.hero-img { display: block; width: 100%; }
.hero-brand { display: flex; align-items: center; gap: 8px; position: relative; }
.hero-brand .seal { width: 34px; height: 34px; border-radius: 10px; background: #fff; color: var(--brand-deep); display: grid; place-items: center; font-weight: 800; font-size: 17px; letter-spacing: -.5px; }
.hero-brand span { font-weight: 700; font-size: 17px; letter-spacing: .02em; }
.hero h1 { position: relative; margin-top: 18px; font-size: 25px; line-height: 1.3; font-weight: 800; letter-spacing: .01em; }
.hero p { position: relative; margin-top: 6px; font-size: 14px; color: rgba(255,255,255,.78); }
.hero-stamp { position: absolute; right: 16px; top: 22px; width: 80px; height: 80px; border: 2px dashed rgba(255,255,255,.5); border-radius: 50%; display: grid; place-items: center; transform: rotate(8deg); font-size: 11.5px; line-height: 1.5; text-align: center; color: rgba(255,255,255,.85); font-weight: 600; letter-spacing: .1em; }
.perf { position: relative; height: 22px; background: var(--card); }
.perf::before { content: ""; position: absolute; top: -10px; left: 0; right: 0; height: 20px;
  background-image: radial-gradient(circle at 10px 10px, transparent 0 9px, var(--card) 10px);
  background-size: 24px 20px; background-repeat: repeat-x; }

/* ---------- 主体 ---------- */
.wrap { max-width: 520px; margin: 0 auto; padding: 0 14px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.sec-title { display: flex; align-items: center; gap: 8px; margin: 22px 2px 10px; font-size: 15px; font-weight: 700; }
.sec-title::before { content: ""; width: 4px; height: 16px; border-radius: 2px; background: var(--brand); }
.sec-title small { font-weight: 400; color: var(--ink-2); font-size: 12px; }

/* 产品单选卡 */
.prod { display: flex; gap: 12px; align-items: flex-start; padding: 15px 14px; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--card); cursor: pointer; transition: border-color .15s, box-shadow .15s; position: relative; }
.prod + .prod { margin-top: 10px; }
.prod:active { transform: scale(.995); }
.prod.on { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(14,125,103,.12); }
.prod-radio { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #c4cfcb; margin-top: 2px; display: grid; place-items: center; }
.prod.on .prod-radio { border-color: var(--brand); }
.prod.on .prod-radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }
.prod-body { flex: 1; min-width: 0; }
.prod-name { font-weight: 700; font-size: 15.5px; }
.prod-sum { color: var(--ink-2); font-size: 12.5px; margin-top: 3px; }
.prod-price { text-align: right; flex: none; }
.prod-price b { font-size: 19px; font-weight: 800; color: var(--brand-deep); }
.prod-price b::first-letter { font-size: 13px; }
.prod-price del { display: block; color: #9fb0aa; font-size: 11.5px; }
.comm-tag { display: inline-flex; align-items: center; gap: 4px; margin-top: 7px; background: var(--accent-tint); color: #b4611e; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 99px; }

/* 表单 */
.form-card { padding: 6px 16px 16px; }
.fld { display: flex; align-items: center; gap: 10px; padding: 13px 2px; border-bottom: 1px solid var(--line); }
.fld:last-of-type { border-bottom: 0; }
.fld label { flex: none; width: 64px; color: var(--ink-2); font-size: 14px; }
.fld input { flex: 1; border: 0; outline: none; background: transparent; font-size: 15.5px; }
.fld input::placeholder { color: #b3c1bc; }
.agree { display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; font-size: 12.5px; color: var(--ink-2); }
.agree input { margin-top: 2.5px; accent-color: var(--brand); }
.agree a { color: var(--brand); }

/* 底部操作条 */
/* 右侧悬浮入口：贴边竖排，与品牌回执单风格统一 */
.edge-tab, .fab-me, .me-back { position: fixed; right: 0; top: 50%; transform: translateY(-50%); z-index: 40; writing-mode: vertical-rl; letter-spacing: .35em; background: linear-gradient(180deg, var(--brand), var(--brand-deep)); color: #fff; font-size: 13px; font-weight: 700; text-decoration: none; padding: 16px 7px 12px; border-radius: 12px 0 0 12px; box-shadow: -4px 6px 16px rgba(10, 92, 75, .35); }
.edge-tab::after, .fab-me::after, .me-back::after { content: ""; display: block; width: 14px; height: 2px; background: rgba(255,255,255,.55); margin: 8px auto 0; }
.edge-tab:active, .fab-me:active, .me-back:active { filter: brightness(1.08); }
.buybar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--card); border-top: 1px solid var(--line); padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); display: flex; gap: 12px; align-items: center; }
.buybar .amt { flex: 1; }
.buybar .amt small { color: var(--ink-2); font-size: 12px; display: block; }
.buybar .amt b { font-size: 21px; font-weight: 800; color: var(--brand-deep); }
.btn { border: 0; border-radius: 14px; background: linear-gradient(135deg, var(--brand), var(--brand-deep)); color: #fff; font-weight: 700; font-size: 16px; padding: 13px 26px; cursor: pointer; box-shadow: 0 8px 18px rgba(14,125,103,.28); }
.btn:disabled { opacity: .55; box-shadow: none; }
.btn-accent { background: linear-gradient(135deg, #f0975a, var(--accent)); box-shadow: 0 8px 18px rgba(232,131,58,.3); }
.btn-ghost { background: #fff; color: var(--brand-deep); border: 1.5px solid var(--brand); box-shadow: none; }
.btn-danger { background: var(--danger); box-shadow: none; }
.btn-sm { padding: 8px 14px; font-size: 13.5px; border-radius: 10px; }
.btn-block { width: 100%; }

/* 支付底部弹层 */
.sheet-mask { position: fixed; inset: 0; background: rgba(10, 22, 26, .55); z-index: 50; opacity: 0; pointer-events: none; transition: opacity .2s; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 51; background: #fff; border-radius: 20px 20px 0 0; padding: 18px 18px calc(20px + env(safe-area-inset-bottom)); transform: translateY(105%); transition: transform .25s ease; }
.show .sheet-mask { opacity: 1; pointer-events: auto; }
.show .sheet { transform: none; }
.sheet h3 { font-size: 16px; text-align: center; }
.sheet .recap { margin: 14px 0; padding: 12px 14px; background: var(--paper); border-radius: 12px; font-size: 13.5px; display: flex; justify-content: space-between; }
.payway { display: flex; align-items: center; gap: 10px; padding: 13px 2px; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.payway .dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--brand); display: grid; place-items: center; }
.payway .dot::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--brand); }

/* 回执单（支付结果 / 佣金小票） */
.receipt { position: relative; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 18px 18px; overflow: hidden; }
.receipt::before, .receipt::after { content: ""; position: absolute; width: 22px; height: 22px; border-radius: 50%; background: var(--paper); top: 64px; }
.receipt::before { left: -11px; } .receipt::after { right: -11px; }
.receipt-head { text-align: center; padding-bottom: 14px; border-bottom: 1.5px dashed var(--line); }
.receipt-head .ok-ic { width: 52px; height: 52px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-tint); color: var(--brand); font-size: 26px; font-weight: 800; }
.receipt-head b { font-size: 17px; }
.receipt-head p { color: var(--ink-2); font-size: 12.5px; margin-top: 4px; }
.receipt-rows { padding: 12px 4px 4px; font-size: 13.5px; }
.rrow { display: flex; justify-content: space-between; padding: 5px 0; color: var(--ink-2); }
.rrow b { color: var(--ink); font-weight: 600; }
.receipt-cta { display: flex; gap: 10px; margin-top: 14px; }
.receipt-cta .btn { flex: 1; padding: 12px 0; }

/* 详情 */
.detail { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 16px; font-size: 14px; color: #2c3d43; overflow-wrap: break-word; }
.detail img { max-width: 100%; border-radius: 10px; }
.detail h3 { font-size: 15px; margin: 10px 0 6px; }
.detail p { margin: 6px 0; }
.detail ul, .detail ol { padding-left: 20px; }
.notice { margin: 16px 0 8px; color: var(--ink-2); font-size: 12.5px; text-align: center; padding: 0 10px; }

/* ---------- 个人中心 ---------- */
.me-hero { background: linear-gradient(150deg, #0c3a30, var(--brand-deep) 60%, var(--brand)); color: #fff; padding: 24px 20px 30px; }
.me-hero .hello { font-size: 13px; color: rgba(255,255,255,.75); }
.me-hero .code { margin-top: 6px; font-size: 21px; font-weight: 800; letter-spacing: .06em; }
.me-hero .pill { display: inline-flex; margin-top: 10px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3); border-radius: 99px; font-size: 12px; padding: 3px 10px; }
.tabs { display: flex; background: #fff; border-radius: 14px; box-shadow: var(--shadow); margin-top: -18px; position: relative; z-index: 2; overflow: hidden; }
.tab { flex: 1; text-align: center; padding: 13px 0; font-size: 14.5px; color: var(--ink-2); cursor: pointer; border-bottom: 2.5px solid transparent; font-weight: 600; }
.tab.on { color: var(--brand-deep); border-bottom-color: var(--brand); }
.order { margin-top: 10px; }
.order-top { display: flex; justify-content: space-between; align-items: center; padding: 13px 15px 10px; }
.order-top .no { font-size: 12px; color: var(--ink-2); }
.chip { font-size: 11.5px; font-weight: 700; padding: 2.5px 10px; border-radius: 99px; }
.chip-paid { background: var(--brand-tint); color: var(--brand-deep); }
.chip-processing { background: #fff6e8; color: #a8720e; }
.chip-success { background: #e5f6ef; color: #157a53; }
.chip-refund { background: var(--danger-tint); color: var(--danger); }
.chip-created { background: #eef1f0; color: var(--ink-2); }
.order-mid { padding: 0 15px 12px; display: flex; justify-content: space-between; align-items: baseline; }
.order-mid b { font-size: 15.5px; }
.order-mid .amt { font-size: 17px; font-weight: 800; }
.order-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 15px 13px; border-top: 1px dashed var(--line); }
.order-foot:empty { display: none; }
.refund-tip { margin: 0 15px 12px; background: var(--danger-tint); color: var(--danger); border-radius: 10px; font-size: 12px; padding: 7px 10px; }

/* 佣金面板 */
.wallet { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.wallet > div { background: #fff; text-align: center; padding: 16px 4px; }
.wallet b { display: block; font-size: 19px; font-weight: 800; color: var(--brand-deep); }
.wallet span { font-size: 11.5px; color: var(--ink-2); }
.ticket { position: relative; background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 13px 15px; margin-top: 10px; overflow: hidden; }
.ticket::before { content: ""; position: absolute; left: 62px; top: 0; bottom: 0; border-left: 1.5px dashed var(--line); }
.ticket::after { content: ""; position: absolute; left: 55px; top: -6px; width: 15px; height: 15px; border-radius: 50%; background: var(--paper); box-shadow: 15px 0 0 var(--paper) inset; }
.ticket .t-l { display: inline-block; width: 55px; font-size: 11.5px; color: var(--accent); font-weight: 800; text-align: center; }
.ticket b.amt { color: var(--accent); font-size: 16px; }
.ticket .meta { font-size: 12px; color: var(--ink-2); margin-top: 3px; }

/* 推广/分享 */
.gate { text-align: center; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px 22px; }
.gate .lock { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 18px; background: var(--accent-tint); color: var(--accent); display: grid; place-items: center; font-size: 26px; }
.share-card { background: linear-gradient(135deg, #fff, #fdf6ee); border: 1.5px solid #f4d9bd; border-radius: var(--radius); padding: 18px 16px; box-shadow: var(--shadow); }
.share-card h4 { font-size: 15.5px; }
.share-card p { font-size: 12.5px; color: var(--ink-2); margin-top: 4px; }
.link-box { display: flex; gap: 8px; margin-top: 12px; }
.link-box input { flex: 1; border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 10px; font-size: 12.5px; background: #fff; min-width: 0; }
.steps { margin-top: 14px; font-size: 12.5px; color: var(--ink-2); }
.steps li { margin: 4px 0 4px 16px; }

/* 弹窗 & toast */
.modal-mask { position: fixed; inset: 0; z-index: 60; background: rgba(10,22,26,.5); display: grid; place-items: center; padding: 24px; }
.modal { background: #fff; border-radius: 18px; padding: 22px 20px; width: 100%; max-width: 360px; }
.modal h3 { font-size: 16px; margin-bottom: 12px; }
.modal textarea { width: 100%; border: 1.5px solid var(--line); border-radius: 10px; padding: 10px; font-size: 13.5px; min-height: 84px; resize: vertical; }
.modal .row { display: flex; gap: 10px; margin-top: 14px; }
.modal .row .btn { flex: 1; padding: 11px 0; font-size: 14.5px; }
#toast { position: fixed; left: 50%; bottom: 110px; transform: translateX(-50%); background: rgba(18,38,46,.92); color: #fff; font-size: 13.5px; padding: 10px 18px; border-radius: 99px; z-index: 99; opacity: 0; transition: opacity .25s; pointer-events: none; max-width: 80vw; text-align: center; }
#toast.show { opacity: 1; }
.hidden { display: none !important; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
