/* 卜玄文学 - 前端 H5 样式（中国风） */
:root {
  --primary: #b03a2e;
  --primary-deep: #8e2321;
  --gold: #d9a441;
  --ink: #2b2622;
  --ink2: #6f675e;
  --ink3: #a39a8e;
  --line: #ebe4d6;
  --bg: #f6f1e7;
  --card: #ffffff;
  --radius: 12px;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Kaiti SC", serif;
  background: #e9e2d2;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
}
#app {
  max-width: 520px; margin: 0 auto; min-height: 100vh; background: var(--bg);
  display: flex; flex-direction: column; position: relative;
  box-shadow: 0 0 40px rgba(80,60,30,.12);
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea { font-family: inherit; font-size: 14px; outline: none; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

/* ===== 顶部 ===== */
.page { flex: 1; padding-bottom: 64px; }
.head {
  padding: 14px 14px 10px; display: flex; align-items: center; gap: 10px;
  background: linear-gradient(180deg, #fdfaf3, var(--bg));
  position: sticky; top: 0; z-index: 20;
}
.head-title { font-family: "Kaiti SC", "STKaiti", serif; font-size: 20px; font-weight: bold; letter-spacing: 2px; color: var(--primary-deep); }
.head-title small { display: block; font-size: 10px; color: var(--ink3); letter-spacing: 1px; font-weight: normal; }
.search {
  flex: 1; display: flex; align-items: center; gap: 8px; background: #fff;
  border: 1px solid var(--line); border-radius: 20px; padding: 8px 14px;
}
.search svg { width: 15px; height: 15px; color: var(--ink3); flex: none; }
.search input { flex: 1; min-width: 0; border: 0; background: none; color: var(--ink); }
.search input::placeholder { color: var(--ink3); }
.icon-btn { width: 34px; height: 34px; flex: none; display: flex; align-items: center; justify-content: center; color: var(--ink2); }
.icon-btn svg { width: 20px; height: 20px; }

/* ===== 轮播 ===== */
.swiper { display: block; padding: 4px 14px 6px; }
.swiper .slide { display: none; border-radius: var(--radius); overflow: hidden; }
.swiper .slide.on { display: block; animation: swiper-fade .45s ease; }
@keyframes swiper-fade { from { opacity: .35; } to { opacity: 1; } }
.slide img { width: 100%; aspect-ratio: 690/280; object-fit: cover; }

/* ===== 金刚区 ===== */
.grid-nav { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 8px 14px; }
.grid-nav a { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 12px 4px; background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); }
.grid-nav .ni { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-family: "Kaiti SC", serif; font-size: 20px; font-weight: bold; color: #fff; }
.grid-nav span { font-size: 12px; color: var(--ink2); }

/* ===== 区块标题 ===== */
.sec { display: flex; align-items: baseline; gap: 8px; padding: 14px 14px 8px; }
.sec h2 { font-size: 17px; font-weight: bold; }
.sec .tag { font-size: 12px; color: var(--ink3); }
.sec .more { margin-left: auto; font-size: 12px; color: var(--ink3); }
.sec .bar { width: 4px; height: 15px; border-radius: 2px; background: var(--primary); align-self: center; }

/* ===== 课程卡片 ===== */
.course-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 2px 14px 8px; }
.course-row::-webkit-scrollbar { display: none; }
.course-card {
  width: 100%; background: var(--card); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line);
}
.course-card img { width: 100%; aspect-ratio: 640/400; object-fit: cover; }
.course-card .cc-body { padding: 8px 10px 10px; }
.course-card .cc-title { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.course-card .cc-meta { display: flex; align-items: baseline; justify-content: space-between; margin-top: 6px; }
.price { color: var(--primary); font-weight: bold; }
.price i { font-style: normal; font-size: 11px; }
.price.free { color: #2e8b57; }
.subs { font-size: 11px; color: var(--ink3); }
.course-list { display: flex; flex-direction: column; gap: 10px; padding: 2px 14px 8px; }
.course-item { display: flex; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; }
.course-item img { width: 128px; aspect-ratio: 640/400; object-fit: cover; border-radius: 8px; flex: none; }
.course-item .cc-title { font-size: 14px; font-weight: 600; }
.course-item .cc-lect { font-size: 12px; color: var(--ink3); margin-top: 2px; }
.course-item .cc-meta { margin-top: 8px; display: flex; justify-content: space-between; align-items: baseline; }

/* ===== 分类 ===== */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 4px 14px; }
.cat-grid a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 2px; }
.cat-grid .ci { width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: "Kaiti SC", serif; font-size: 21px; font-weight: bold; color: #fff; box-shadow: 0 4px 10px rgba(80,50,20,.15); }
.cat-grid span { font-size: 12px; color: var(--ink2); }

/* ===== 商品 ===== */
.prod-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 4px 14px 8px; }
.prod-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.prod-card img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.prod-card .pc-body { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.prod-card .pc-title { font-size: 13.5px; font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prod-card .pc-tags { font-size: 11px; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prod-card .pc-meta { margin-top: auto; display: flex; align-items: center; justify-content: space-between; }
.cart-btn { width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; }
.cart-btn svg { width: 15px; height: 15px; }

/* ===== 圈子 ===== */
.q-banner { margin: 4px 14px 10px; border-radius: var(--radius); overflow: hidden; position: relative; }
.q-banner img { width: 100%; height: 88px; object-fit: cover; }
.q-banner .create-btn {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  background: rgba(120, 80, 50, .85); color: #fff; padding: 8px 22px; border-radius: 20px; font-size: 14px;
}
.post { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin: 0 14px 10px; }
.post-head { display: flex; align-items: center; gap: 10px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--gold)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 16px; font-family: "Kaiti SC", serif; flex: none; }
.post-head b { font-size: 14px; }
.badge-official { font-size: 10px; color: #fff; background: #4a7ab5; border-radius: 4px; padding: 1px 5px; margin-right: 4px; }
.post-head time { margin-left: auto; font-size: 11px; color: var(--ink3); }
.post-title { font-size: 15px; font-weight: bold; margin-top: 8px; }
.post-content { font-size: 13.5px; color: var(--ink2); margin-top: 4px; }
.post-foot { display: flex; gap: 22px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.post-foot button { font-size: 12.5px; color: var(--ink3); display: flex; align-items: center; gap: 5px; }
.post-foot button svg { width: 15px; height: 15px; }
.post-foot button.liked { color: var(--primary); }
.comments { margin-top: 8px; background: var(--bg); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.comment { font-size: 12.5px; color: var(--ink2); }
.comment b { color: var(--ink); font-weight: 600; margin-right: 6px; }
.comment-input { display: flex; gap: 8px; margin-top: 8px; }
.comment-input input { flex: 1; border: 1px solid var(--line); border-radius: 16px; padding: 6px 12px; background: #fff; }
.comment-input button { color: var(--primary); font-weight: 600; font-size: 13px; }

/* ===== 我的 ===== */
.me-top { display: flex; align-items: center; gap: 12px; padding: 16px 14px 8px; }
.me-top .avatar { width: 54px; height: 54px; font-size: 22px; }
.btn-login { background: var(--primary); color: #fff; padding: 8px 20px; border-radius: 18px; font-weight: 600; }
.me-name { font-size: 16px; font-weight: bold; }
.me-sub { font-size: 12px; color: var(--ink3); margin-top: 2px; }
.wallet {
  margin: 10px 14px; border-radius: 14px; padding: 16px;
  background: linear-gradient(135deg, #c04a3a, #a83428); color: #fff;
  display: grid; grid-template-columns: repeat(3, 1fr); text-align: center;
}
.wallet b { font-size: 20px; display: block; }
.wallet span { font-size: 11.5px; opacity: .85; }
.me-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 14px 10px; }
.me-cards .mc { background: #fdf7ec; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; position: relative; overflow: hidden; }
.me-cards .mc b { font-size: 18px; display: block; }
.me-cards .mc span { font-size: 12px; color: var(--ink2); }
.me-cards .mc .mi { position: absolute; right: -4px; bottom: -6px; width: 34px; height: 34px; border-radius: 50%; opacity: .9; }
.me-panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin: 0 14px 12px; padding: 4px 0; }
.me-panel h3 { font-size: 14.5px; padding: 10px 14px 4px; }
.me-panel .row-line { display: flex; justify-content: space-between; align-items: center; padding: 11px 14px; font-size: 13.5px; border-top: 1px solid #f4efe3; cursor: pointer; }
.me-panel .row-line:first-of-type { border-top: 0; }
.me-panel .row-line .arr { color: var(--ink3); }
.me-grid { display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px 0 10px; }
.me-grid a, .me-grid button { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--ink2); padding: 6px 0; }
.me-grid svg { width: 22px; height: 22px; color: var(--primary); }
.me-grid .n { font-size: 15px; font-weight: bold; color: var(--ink); }

/* ===== 底部导航 ===== */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 520px;
  background: #fff; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 0 calc(8px + env(safe-area-inset-bottom)); z-index: 30;
}
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--ink3); position: relative; }
.tabbar a svg { width: 22px; height: 22px; }
.tabbar a.on { color: var(--primary); font-weight: 600; }
.tabbar .cart-badge { position: absolute; top: -4px; right: calc(50% - 20px); background: var(--primary); color: #fff; font-size: 10px; min-width: 16px; height: 16px; border-radius: 8px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }

/* ===== 详情/弹层 ===== */
.sheet {
  position: fixed; inset: 0; background: rgba(30, 20, 10, .45); z-index: 50;
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet .sheet-body {
  width: 100%; max-width: 520px; max-height: 86vh; overflow-y: auto;
  background: var(--bg); border-radius: 18px 18px 0 0; padding: 16px 14px 24px;
}
.sheet-close { position: absolute; }
.detail-cover { width: 100%; border-radius: 12px; }
.detail-title { font-size: 18px; font-weight: bold; margin-top: 12px; }
.detail-price { font-size: 22px; margin-top: 4px; }
.detail-desc { font-size: 13.5px; color: var(--ink2); margin-top: 8px; }
.chapters { margin-top: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.chapters h3 { font-size: 14px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.chapter { display: flex; justify-content: space-between; align-items: center; padding: 11px 14px; border-bottom: 1px solid #f4efe3; font-size: 13.5px; }
.chapter:last-child { border-bottom: 0; }
.chapter .try { font-size: 11px; color: #2e8b57; border: 1px solid #2e8b57; border-radius: 4px; padding: 0 5px; margin-left: 6px; }
.chapter .dur { color: var(--ink3); font-size: 12px; }
.btn-bar { display: flex; gap: 10px; margin-top: 16px; }
.btn { flex: 1; padding: 12px; border-radius: 24px; font-size: 15px; font-weight: 600; text-align: center; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-ghost { border: 1.5px solid var(--primary); color: var(--primary); background: #fff; }
.btn-gold { background: var(--gold); color: #5d3a10; }

/* ===== 弹窗 & 提示 ===== */
.modal { position: fixed; inset: 0; background: rgba(30,20,10,.45); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal-card { width: 100%; max-width: 360px; background: #fff; border-radius: 16px; padding: 22px 20px; display: flex; flex-direction: column; gap: 12px; }
.modal-card h2 { font-size: 18px; text-align: center; font-family: "Kaiti SC", serif; letter-spacing: 2px; color: var(--primary-deep); }
.modal-card .seg { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.modal-card .seg button { flex: 1; padding: 8px; font-size: 13.5px; color: var(--ink2); }
.modal-card .seg button.on { background: var(--primary); color: #fff; }
.modal-card label { font-size: 12.5px; color: var(--ink2); }
.modal-card input { width: 100%; margin-top: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.modal-card .submit { background: var(--primary); color: #fff; border-radius: 10px; padding: 11px; font-size: 15px; font-weight: 600; margin-top: 4px; }
.modal-card .swap { text-align: center; font-size: 12.5px; color: var(--ink3); }
.modal-card .swap button { color: var(--primary); }
.toast {
  position: fixed; top: 18%; left: 50%; transform: translateX(-50%);
  background: rgba(40, 30, 20, .88); color: #fff; padding: 10px 20px; border-radius: 10px;
  font-size: 13.5px; z-index: 99; max-width: 80vw; text-align: center;
}
.empty { text-align: center; color: var(--ink3); padding: 40px 0; font-size: 13.5px; }

/* 订单状态 tabs */
.status-tabs { display: flex; gap: 6px; padding: 4px 14px 8px; overflow-x: auto; }
.status-tabs button { padding: 6px 14px; border-radius: 16px; background: #fff; border: 1px solid var(--line); font-size: 12.5px; color: var(--ink2); white-space: nowrap; }
.status-tabs button.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.order-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin: 0 14px 10px; padding: 12px 14px; }
.order-head { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink3); }
.order-head b { color: var(--primary); font-size: 12.5px; }
.order-item { display: flex; gap: 10px; margin-top: 10px; align-items: center; }
.order-item img { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; }
.order-item .oi-t { font-size: 13.5px; flex: 1; }
.order-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; align-items: center; }
.order-foot .amount { margin-right: auto; font-size: 13px; }
.order-foot .amount b { color: var(--primary); }
.mini-btn { font-size: 12.5px; padding: 5px 14px; border-radius: 14px; border: 1px solid var(--line); color: var(--ink2); background: #fff; }
.mini-btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }

/* 购物车 */
.cart-item { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin: 0 14px 10px; padding: 10px; }
.cart-item img { width: 60px; height: 60px; border-radius: 8px; object-fit: cover; }
.stepper { display: flex; align-items: center; gap: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.stepper button { width: 26px; height: 26px; font-size: 15px; color: var(--ink2); background: #faf7f0; }
.stepper span { width: 30px; text-align: center; font-size: 13px; }
.del-btn { color: var(--ink3); font-size: 12px; }
.checkout-bar { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #fff; border-top: 1px solid var(--line); margin-top: 6px; }
.checkout-bar .total { flex: 1; font-size: 14px; }
.checkout-bar .total b { color: var(--primary); font-size: 18px; }

/* ================= 排盘工具 ================= */
.tool-list { display: flex; flex-direction: column; gap: 10px; padding: 0 14px; }
.tool-card { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.tool-icon { width: 46px; height: 46px; border-radius: 12px; flex: none; display: flex; align-items: center; justify-content: center; color: #fff; font-family: 'Kaiti SC', serif; font-size: 22px; }
.tool-name { font-size: 15px; font-weight: 600; }
.tool-desc { font-size: 12px; color: var(--ink3); margin-top: 3px; }
.tool-price { margin-left: auto; color: #b03a2e; font-weight: 700; font-size: 15px; flex: none; }
.tool-price i { font-style: normal; font-size: 11px; }
.tool-note { margin: 0 14px; padding: 12px 14px; background: #faf6ee; border: 1px dashed var(--line); border-radius: 10px; font-size: 12px; color: var(--ink2); line-height: 1.7; }

/* 排盘表单 */
.pp-form-sheet { z-index: 60; padding: 0 10px 20px; }
.pp-form-sheet .sheet-body { border-radius: 18px; padding: 18px 18px 24px; }
.pp-head { text-align: center; font-size: 19px; font-weight: bold; color: #fff; background: linear-gradient(135deg, #2e6e5e, #4a9a80); margin: -18px -18px 14px; padding: 18px; border-radius: 14px 14px 0 0; font-family: 'Kaiti SC', serif; letter-spacing: 6px; }
.pp-form { display: flex; flex-direction: column; }
.pp-row { display: flex; align-items: center; gap: 8px; padding: 11px 2px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.pp-row label:first-child { font-size: 13.5px; color: var(--ink); font-weight: 600; flex: none; }
.pp-row input, .pp-row select { flex: 1; min-width: 0; border: 0; background: none; text-align: right; font-size: 13.5px; color: var(--ink); outline: none; }
.pp-row select { appearance: none; -webkit-appearance: none; }
.pp-row input::placeholder { color: var(--ink3); }
.pp-radios { margin-left: auto; display: flex; gap: 14px; }
.pp-radio { display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; color: var(--ink2); cursor: pointer; }
.pp-radio i { width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid var(--ink3); display: inline-block; position: relative; }
.pp-radio.on i { border-color: #2e6e5e; background: #2e6e5e; box-shadow: inset 0 0 0 3px #fff; }
.pp-btn { margin-top: 14px; padding: 12px; border: 0; border-radius: 10px; background: linear-gradient(135deg, #2e6e5e, #4a9a80); color: #fff; font-size: 15px; font-weight: 600; letter-spacing: 2px; cursor: pointer; }
.pp-btn.ghost { background: #eef4f1; color: #2e6e5e; margin-top: 8px; }

/* 排盘结果页 */
.pp-page { position: fixed; inset: 0; background: #f5f1e8; z-index: 70; overflow-y: auto; padding-bottom: 60px; }
.pp-page-head { position: sticky; top: 0; display: flex; align-items: center; gap: 8px; background: #fff; padding: 12px 14px; font-size: 16px; font-weight: bold; z-index: 5; border-bottom: 1px solid var(--line); }
.pp-back { border: 0; background: none; font-size: 22px; color: var(--ink); padding: 0 6px; cursor: pointer; }
.pp-tabs { display: flex; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 45px; z-index: 4; }
.pp-tabs button { flex: 1; padding: 11px; border: 0; background: none; font-size: 14.5px; color: var(--ink2); border-bottom: 2px solid transparent; cursor: pointer; }
.pp-tabs button.on { color: #b03a2e; font-weight: bold; border-bottom-color: #b03a2e; }
.pp-body { padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; }
.pp-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.pp-name-row { font-size: 13.5px; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.pp-edit { border: 1px solid var(--line); background: #faf6ee; border-radius: 6px; padding: 3px 10px; font-size: 12px; cursor: pointer; }
.pp-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #e2d9c5; font-size: 13px; }
.pp-table td { border: 1px solid #e2d9c5; padding: 7px 4px; text-align: center; vertical-align: middle; }
.pp-td-label { background: #faf6ee; color: #8a6e34; font-size: 12px; width: 44px; padding: 7px 2px; }
.pp-ss { color: #2e6e5e; font-size: 12.5px; }
.pp-ss .red { color: #b03a2e; }
.pp-gz { font-family: 'Kaiti SC', serif; font-size: 22px; font-weight: 700; line-height: 1.15; padding: 8px 4px; }
.pp-gz span { display: block; }
.pp-gz .green { color: #2e7d32; } .pp-gz .red { color: #b03a2e; } .pp-gz .brown { color: #8a6e34; }
.pp-gz .gold { color: #b8860b; } .pp-gz .blue { color: #1e5a8a; }
.pp-gz .zhi { color: var(--ink); font-size: 20px; }
.pp-hide { font-size: 12px; }
.pp-hide span { display: block; line-height: 1.35; }
.pp-hide em { font-style: normal; font-size: 10px; color: var(--ink3); margin-left: 3px; }
.pp-small { font-size: 11.5px; color: var(--ink2); }
.pp-sslist { font-size: 11px; color: #8a6e34; line-height: 1.6; }
.pp-hechong { color: #2e6e5e; font-size: 12.5px; text-align: left !important; line-height: 1.9; }
.pp-dayun td { padding: 5px 2px; }
.pp-dayun b { display: block; font-family: 'Kaiti SC', serif; font-size: 15px; color: var(--ink); }
.pp-dayun td.cur b { color: #b03a2e; }
.pp-dayun i { display: block; font-style: normal; font-size: 10px; color: var(--ink3); }
.pp-dayun em { display: block; font-style: normal; font-size: 10px; color: #2e6e5e; }
.pp-tip { text-align: center; font-size: 12px; color: var(--ink3); padding: 2px 0 8px; }
.pp-cta { position: fixed; left: 0; right: 0; bottom: 52px; background: linear-gradient(135deg, #b03a2e, #d96a4a); color: #fff; text-align: center; padding: 11px; font-size: 14px; font-weight: 600; cursor: pointer; z-index: 8; }
.pp-nav { position: fixed; left: 0; right: 0; bottom: 0; display: flex; background: #fff; border-top: 1px solid var(--line); z-index: 9; }
.pp-nav button { flex: 1; border: 0; background: none; padding: 7px 0 9px; font-size: 11px; color: var(--ink2); cursor: pointer; }
.pp-nav i { display: block; font-style: normal; font-size: 17px; margin-bottom: 2px; }

/* 解析页 */
.ana-sec { background: #fff; border: 1px solid var(--line); border-left: 3px solid #2e6e5e; border-radius: 10px; padding: 12px 14px; }
.ana-sec h3 { margin: 0 0 8px; font-size: 14.5px; color: #2e6e5e; }
.ana-sec p { margin: 0; font-size: 13px; line-height: 1.8; color: var(--ink); text-align: justify; }
.ana-sec .red { color: #b03a2e; }
.wx-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.wx-badge { width: 30px; height: 30px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-family: 'Kaiti SC', serif; font-size: 15px; flex: none; }
.wx-bar { flex: 1; height: 9px; border-radius: 5px; background: #eee7d8; overflow: hidden; }
.wx-bar i { display: block; height: 100%; border-radius: 5px; }
.wx-row em { font-style: normal; font-size: 12px; color: var(--ink2); width: 46px; text-align: right; flex: none; }
.pp-locked { position: relative; max-height: 320px; overflow: hidden; display: flex; flex-direction: column; gap: 10px; -webkit-mask-image: linear-gradient(to bottom, #000 45%, rgba(0,0,0,0) 98%); mask-image: linear-gradient(to bottom, #000 45%, rgba(0,0,0,0) 98%); }
.pp-paywall { position: relative; margin-top: 12px; text-align: center; z-index: 3; }
.pp-pay-tip { font-size: 13px; color: var(--ink2); padding: 10px 0 8px; }
.pp-pay-btn { width: 100%; padding: 13px; border: 0; border-radius: 24px; background: linear-gradient(135deg, #d97b2e, #e8a23c); color: #fff; font-size: 15.5px; font-weight: bold; cursor: pointer; box-shadow: 0 4px 14px rgba(217,123,46,.35); }
.pp-pay-note { font-size: 11px; color: var(--ink3); padding: 9px 0 3px; }
.pp-pay-list { text-align: left; background: #fff; border: 1px dashed var(--line); border-radius: 10px; padding: 10px 14px; font-size: 12.5px; color: var(--ink2); line-height: 1.8; }
.pp-recharge { display: flex; gap: 10px; justify-content: center; padding: 12px 0; }
.pp-recharge button { padding: 10px 22px; border: 1px solid #2e6e5e; border-radius: 10px; background: #eef4f1; color: #2e6e5e; font-size: 15px; font-weight: 600; cursor: pointer; }

/* ================= 登录 / 注册（微信授权优先） ================= */
.auth-mask { position: fixed; inset: 0; background: rgba(30,20,10,.5); z-index: 70; display: flex; align-items: flex-end; justify-content: center; }
.auth-sheet { position: relative; width: 100%; max-width: 420px; background: #fff; border-radius: 18px 18px 0 0; padding: 24px 22px calc(16px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 11px; animation: authUp .24s ease; }
@keyframes authUp { from { transform: translateY(24px); opacity: .5 } to { transform: none; opacity: 1 } }
@media (min-width: 520px) { .auth-mask { align-items: center; padding: 24px; } .auth-sheet { border-radius: 18px; } }
.auth-x { position: absolute; right: 10px; top: 8px; width: 30px; height: 30px; border-radius: 50%; color: var(--ink3); font-size: 21px; line-height: 1; background: none; }
.auth-head { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding-bottom: 2px; }
.auth-logo { width: 44px; height: 44px; border-radius: 13px; background: linear-gradient(135deg, var(--primary), var(--primary-deep)); color: #fff; font-family: "Kaiti SC", serif; font-size: 24px; display: grid; place-items: center; box-shadow: 0 6px 14px rgba(176,58,46,.22); }
.auth-title { font-family: "Kaiti SC", serif; font-size: 19px; letter-spacing: 3px; color: var(--primary-deep); }
.auth-sub { font-size: 11.5px; color: var(--ink3); letter-spacing: .5px; }
.wx-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 12px; border: 0; border-radius: 26px; background: #07c160; color: #fff; font-size: 15px; font-weight: 600; letter-spacing: 1px; box-shadow: 0 6px 16px rgba(7,193,96,.24); cursor: pointer; }
.wx-btn:active { transform: translateY(1px); }
.wx-btn.is-loading { background: #9ddcbc; box-shadow: none; }
.auth-or { display: flex; align-items: center; gap: 10px; color: var(--ink3); font-size: 11.5px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-link { font-size: 13px; color: var(--primary); padding: 3px; background: none; }
.auth-phone { display: flex; flex-direction: column; gap: 8px; }
.auth-phone[hidden] { display: none; }
.auth-seg { display: flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.auth-seg button { flex: 1; padding: 7px; font-size: 13px; color: var(--ink2); background: none; }
.auth-seg button.on { background: var(--primary); color: #fff; }
.auth-phone input { padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; font-size: 14px; background: #fdfcfa; width: 100%; }
.auth-submit { background: var(--ink); color: #fff; border: 0; border-radius: 10px; padding: 11px; font-size: 14.5px; font-weight: 600; cursor: pointer; }
.auth-note { font-size: 11.5px; color: #a5762a; background: #fdf5e6; border: 1px solid #f3e3c4; border-radius: 8px; padding: 7px 10px; line-height: 1.55; }
.auth-skip { font-size: 12.5px; color: var(--ink3); padding: 4px; background: none; }

/* 排盘工具宫格 */
.tk-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 0 14px; }
@media (max-width: 360px) { .tk-grid { grid-template-columns: repeat(3, 1fr); } }
.tk {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 6px 13px; display: flex; flex-direction: column; align-items: center; gap: 9px;
}
.tk:active { transform: scale(.96); }
.tk-ic {
  width: 56px; height: 56px; border-radius: 17px; display: grid; place-items: center;
  color: #fff; font-family: "Kaiti SC", serif; font-size: 27px;
  box-shadow: 0 4px 10px rgba(40,30,20,.14);
}
.tk-name { font-size: 13px; color: var(--ink); white-space: nowrap; }

/* 商品富文本详情 */
.detail-html img { max-width: 100%; height: auto; border-radius: 8px; margin: 6px 0; }
.detail-html h2 { font-size: 15.5px; margin: 10px 0 4px; }
.detail-html p { margin: 6px 0; line-height: 1.8; }
.detail-html ul { padding-left: 18px; margin: 6px 0; }

/* ================= 钱包 / 分销 ================= */
.sheet-title { font-size: 17px; font-weight: bold; padding-bottom: 8px; }
.wallet-sheet { margin: 0 0 10px; grid-template-columns: 1fr 1fr; padding: 14px; }
.wallet-sheet b { font-size: 23px; }
.wallet-ops { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.wop { display: flex; align-items: center; justify-content: center; gap: 5px; padding: 10px 4px; border-radius: 10px; background: #fff; border: 1px solid var(--line); font-size: 13px; color: var(--ink); }
.wop b { font-size: 15px; color: var(--primary); }
.wop.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.wop.primary b { color: #fff; }
.wallet-tip { font-size: 11.5px; color: var(--ink3); line-height: 1.6; margin: 8px 2px 0; }
.sheet-sec { display: flex; align-items: center; justify-content: space-between; margin: 14px 0 6px; }
.sheet-sec h3 { font-size: 14.5px; }
.tx-list { display: flex; flex-direction: column; gap: 6px; }
.tx-row { display: flex; align-items: center; gap: 9px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; }
.tx-i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; flex: none; }
.tx-i.in { background: #eaf5ef; color: #1e8e5a; }
.tx-i.out { background: #fdeeee; color: #b03a2e; }
.tx-main { flex: 1; min-width: 0; }
.tx-t { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-sub { font-size: 11px; color: var(--ink3); }
.tx-amt { font-size: 14px; font-weight: 700; flex: none; }
.tx-amt.in { color: #1e8e5a; }
.tx-amt.out { color: var(--ink); }

.money-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 4px; }
.money-grid button { padding: 12px 4px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-size: 15px; font-weight: 600; color: var(--ink2); }
.money-grid button.on { border-color: var(--primary); color: var(--primary); background: #fdf1ee; }
.field-line { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.field-line label { font-size: 13px; color: var(--ink); flex: none; width: 74px; }
.field-line input { flex: 1; min-width: 0; border: 0; background: none; font-size: 14px; color: var(--ink); }
.field-line input::placeholder { color: var(--ink3); }
.link-btn { color: var(--primary); font-size: 12.5px; flex: none; }
.seg-mini { margin-left: auto; display: flex; gap: 6px; }
.seg-mini button { padding: 5px 12px; border-radius: 14px; border: 1px solid var(--line); background: #fff; font-size: 12.5px; color: var(--ink2); }
.seg-mini button.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.pay-note { font-size: 11.5px; color: var(--ink3); background: #faf6ee; border: 1px dashed var(--line); border-radius: 8px; padding: 8px 10px; margin-top: 8px; line-height: 1.65; }
.wd-avail { display: flex; align-items: baseline; justify-content: space-between; background: #fdf7ec; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 4px; }
.wd-avail span { font-size: 12.5px; color: var(--ink2); }
.wd-avail b { font-size: 20px; color: var(--primary); }
.wd-fee { font-size: 12px; color: var(--ink2); padding: 8px 2px 0; }
.share-line { margin-top: 10px; text-align: center; font-size: 12.5px; color: var(--primary); background: #fdf1ee; border: 1px dashed #edc9c0; border-radius: 8px; padding: 8px; }

.dist-hero { border-radius: 14px; padding: 14px; color: #fff; background: linear-gradient(135deg, #b03a2e, #d4703f); }
.dh-top { display: flex; align-items: baseline; justify-content: space-between; }
.dh-top span { font-size: 12px; opacity: .88; }
.dh-top b { font-size: 26px; }
.dh-row { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.24); }
.dh-row b { display: block; font-size: 17px; }
.dh-row span { font-size: 11px; opacity: .88; }
.dist-code { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; }
.dist-code span { font-size: 11.5px; color: var(--ink3); display: block; }
.dist-code b { font-family: "Kaiti SC", serif; font-size: 18px; letter-spacing: 3px; color: var(--primary-deep); }
.dist-code button { font-size: 12px; color: var(--primary); border: 1px solid #edc9c0; background: #fdf1ee; border-radius: 14px; padding: 5px 12px; }
.dist-ops { display: grid; grid-template-columns: 2fr 1fr; gap: 8px; margin-top: 8px; }
.dop { padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-size: 13.5px; color: var(--ink); }
.dop.primary { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.dist-rule { text-align: center; font-size: 11.5px; color: var(--ink3); padding: 8px 0; }
.seg-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.seg-tabs button { flex: 1; padding: 8px 2px; font-size: 12.5px; color: var(--ink2); border-bottom: 2px solid transparent; }
.seg-tabs button.on { color: var(--primary); font-weight: 600; border-bottom-color: var(--primary); }
.dist-body { display: flex; flex-direction: column; gap: 6px; min-height: 60px; }
.team-row { display: flex; align-items: center; gap: 9px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; }
.avatar.sm { width: 32px; height: 32px; font-size: 14px; }
.team-main { flex: 1; min-width: 0; }
.team-main b { font-size: 13.5px; font-weight: 600; display: block; }
.team-main span { font-size: 11px; color: var(--ink3); }
.lv { font-size: 10.5px; color: #8a6e34; background: #f7efdf; border-radius: 4px; padding: 1px 5px; margin-left: 5px; white-space: nowrap; }
.cm-row { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; }
.cm-main { flex: 1; min-width: 0; }
.cm-t { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-sub { font-size: 11px; color: var(--ink3); }
.cm-right { text-align: right; flex: none; }
.cm-right b { display: block; font-size: 14px; color: var(--primary); }
.cm-st { font-size: 10.5px; color: var(--ink3); }
.cm-st.pending { color: #b26a00; }
.cm-st.settled { color: #1e8e5a; }
.cm-st.invalid { color: var(--ink3); }
.dist-rule-full { font-size: 11px; color: var(--ink3); line-height: 1.75; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }

/* 在线充值：收款码 */
.rc-qr-box { display: flex; flex-direction: column; align-items: center; gap: 8px; background: #faf6ee; border: 1px solid var(--line); border-radius: 12px; padding: 14px 12px; margin-top: 10px; }
.rc-qr-box img { width: 180px; height: 180px; object-fit: contain; background: #fff; border-radius: 8px; }
.rc-qr-tip { font-size: 12px; color: var(--ink2); text-align: center; line-height: 1.6; }
.rc-acc { font-size: 12.5px; color: var(--ink); text-align: center; line-height: 1.7; }
.rc-note { font-size: 11.5px; color: var(--ink3); text-align: center; line-height: 1.6; }

/* 站点 Logo 与客服二维码 */
.head-title { display: flex; align-items: center; gap: 8px; }
.head-logo { height: 34px; width: auto; object-fit: contain; flex: none; }
.cs-qr { display: flex; flex-direction: column; align-items: center; gap: 8px; background: #faf6ee; border: 1px solid var(--line); border-radius: 12px; padding: 14px 12px; margin: 6px 0 10px; }
.cs-qr img { width: 190px; height: 190px; object-fit: contain; background: #fff; border-radius: 8px; }
.cs-qr span { font-size: 12px; color: var(--ink3); }
