:root {
  --primary: #ff8a00;
  --primary-d: #f07000;
  --gold: #ffb84d;
  --red: #ff4d4f;
  --green: #17b26a;
  --bg: #f6f4f0;
  --card: #ffffff;
  --text: #26211a;
  --muted: #9a8f80;
  --line: #f0ece4;
  --radius: 16px;
  --shadow: 0 6px 20px rgba(255, 138, 0, .08);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg); color: var(--text);
  max-width: 480px; margin: 0 auto; line-height: 1.6;
  -webkit-font-smoothing: antialiased; padding-bottom: 76px;
}

/* ===== 顶部 ===== */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(135deg, #ff9a2e, #ff7a1a);
  color: #fff;
}
.brand { font-weight: 800; font-size: 19px; display: flex; align-items: center; gap: 6px; }
.brand .thumb { font-size: 22px; }
.topbar .right { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.topbar .right .link { color: #fff; text-decoration: none; background: rgba(255,255,255,.2); padding: 4px 12px; border-radius: 999px; font-weight: 600; }

/* ===== 钱包卡 ===== */
.wallet {
  margin: 14px 14px 0; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(135deg, #ffb02e 0%, #ff8a00 45%, #f07000 100%);
  color: #fff; box-shadow: 0 10px 26px rgba(255,138,0,.32); position: relative;
}
.wallet::after {
  content: "¥"; position: absolute; right: -18px; bottom: -40px;
  font-size: 150px; font-weight: 900; opacity: .08; transform: rotate(-12deg);
}
.wallet .balance-row { padding: 20px 20px 6px; display: flex; justify-content: space-between; align-items: flex-end; }
.wallet .balance-row .label { font-size: 12px; opacity: .85; }
.wallet .balance { font-size: 34px; font-weight: 900; line-height: 1.1; }
.wallet .balance small { font-size: 15px; font-weight: 700; margin-right: 2px; }
.wallet .today { text-align: right; font-size: 12px; opacity: .92; }
.wallet .today b { font-size: 15px; }
.wallet .ops { display: flex; padding: 12px 20px 18px; gap: 10px; }
.wallet .ops a {
  flex: 1; text-align: center; background: rgba(255,255,255,.94); color: #e86300;
  text-decoration: none; font-size: 13px; font-weight: 700; padding: 9px 0; border-radius: 999px;
}
.wallet .ops a.ghost { background: rgba(255,255,255,.16); color: #fff; }

/* ===== 快捷入口 ===== */
.quick { display: flex; background: var(--card); margin: 12px 14px 0; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 6px; }
.quick a { flex: 1; text-align: center; text-decoration: none; color: var(--text); }
.quick .qi { width: 46px; height: 46px; margin: 0 auto 6px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.quick .qi.q1 { background: #fff3e2; } .quick .qi.q2 { background: #ffe9e9; }
.quick .qi.q3 { background: #e7f6ee; } .quick .qi.q4 { background: #eef0ff; }
.quick .qt { font-size: 11.5px; color: #6b6155; font-weight: 600; }
.quick .badge { display: block; width: 8px; height: 8px; background: var(--red); border-radius: 50%; margin: -50px auto 0 62%; }

/* ===== 新人红包 ===== */
.newbie { margin: 12px 14px 0; border-radius: var(--radius); padding: 14px 16px; display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, #ff5b5b, #ff3b3b); color: #fff; box-shadow: 0 8px 20px rgba(255,59,59,.25); }
.newbie .hb { font-size: 34px; }
.newbie .nb-t { font-weight: 800; font-size: 15px; }
.newbie .nb-s { font-size: 11.5px; opacity: .92; }
.newbie .nb-btn { margin-left: auto; background: #fff; color: #ff3b3b; font-size: 12.5px; font-weight: 800; padding: 7px 14px; border-radius: 999px; text-decoration: none; white-space: nowrap; }

/* ===== 区块 ===== */
.block { padding: 18px 14px 0; }
.block-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.block-head h2 { font-size: 17px; margin: 0; font-weight: 800; }
.block-head .more { font-size: 12px; color: var(--muted); text-decoration: none; }
.block-head .more em { font-style: normal; color: var(--primary); }

/* ===== 任务筛选 Tab ===== */
.tabs { display: flex; gap: 8px; margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { white-space: nowrap; font-size: 12.5px; color: #7a6f61; text-decoration: none; padding: 6px 14px; border-radius: 999px; background: #efeae2; font-weight: 600; }
.tabs a.on { background: linear-gradient(135deg, #ff9a2e, #ff7a1a); color: #fff; }

/* ===== 任务卡片 ===== */
.task-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; margin-bottom: 12px; display: flex; gap: 12px; }
.task-card .tc-main { flex: 1; min-width: 0; }
.task-card .tc-tags { display: flex; gap: 6px; margin-bottom: 6px; }
.tag { font-size: 10px; padding: 2px 8px; border-radius: 6px; font-weight: 700; }
.tag.new { background: #ffe9e9; color: #ff4d4f; }
.tag.hot { background: #fff3e2; color: #ff8a00; }
.tag.high { background: #ffe9e9; color: #e60012; }
.tag.rec { background: #e7f6ee; color: #17b26a; }
.task-card h3 { margin: 0 0 4px; font-size: 14.5px; line-height: 1.45; font-weight: 700; }
.task-card .tc-meta { font-size: 11.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 10px; }
.task-card .tc-meta b { color: #6b6155; }
.task-card .tc-quota { font-size: 11px; color: var(--muted); margin-top: 4px; }
.task-card .tc-quota .qbar { display: inline-block; width: 52px; height: 5px; border-radius: 3px; background: #f0ece4; vertical-align: 2px; margin-left: 4px; position: relative; overflow: hidden; }
.task-card .tc-quota .qbar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--gold); border-radius: 3px; }
.task-card .tc-right { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; min-width: 84px; }
.task-card .price { color: #ff5a00; font-weight: 900; font-size: 20px; line-height: 1.1; }
.task-card .price small { font-size: 12px; }
.task-card .go { background: linear-gradient(135deg, #ff9a2e, #ff7a1a); color: #fff; font-size: 12px; font-weight: 700; padding: 7px 16px; border-radius: 999px; text-decoration: none; }
.task-card .per { font-size: 11px; color: var(--green); font-weight: 700; }

/* ===== 底部导航 ===== */
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px;
  background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
  display: flex; padding: 8px 0 calc(8px + env(safe-area-inset-bottom)); z-index: 30; }
.tabbar a { flex: 1; text-align: center; text-decoration: none; color: #b3a896; font-size: 10.5px; font-weight: 600; }
.tabbar a .ti { font-size: 20px; display: block; line-height: 1.2; }
.tabbar a.on { color: var(--primary); }

/* ===== 通用卡片/按钮 ===== */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.btn { display: block; text-align: center; background: linear-gradient(135deg, #ff9a2e, #ff7a1a); color: #fff; text-decoration: none;
  font-size: 15px; font-weight: 800; padding: 13px 0; border-radius: 999px; border: none; width: 100%; }
.btn:active { transform: scale(.98); }
.btn.gray { background: #efeae2; color: #7a6f61; }
.btn.red { background: linear-gradient(135deg, #ff5b5b, #ff3b3b); }
.text-muted { color: var(--muted); }
.center { text-align: center; }

/* ===== 页面标题栏 ===== */
.pgbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.pgbar .back { font-size: 20px; text-decoration: none; color: var(--text); padding: 0 4px; }
.pgbar h1 { font-size: 16px; margin: 0; flex: 1; font-weight: 800; }
.pgbar .ph { font-size: 12px; color: var(--muted); }

/* ===== 任务详情 ===== */
.detail-hero { margin: 14px; border-radius: var(--radius); overflow: hidden; background: linear-gradient(135deg, #ffb02e, #ff7a1a); color: #fff; padding: 20px; position: relative; }
.detail-hero .dh-tags { display: flex; gap: 6px; margin-bottom: 8px; }
.detail-hero .dh-tags span { background: rgba(255,255,255,.22); font-size: 10.5px; padding: 2px 9px; border-radius: 999px; font-weight: 700; }
.detail-hero h1 { margin: 0 0 6px; font-size: 18px; line-height: 1.4; }
.detail-hero .dh-price { font-size: 30px; font-weight: 900; margin-bottom: 6px; }
.detail-hero .dh-meta { font-size: 12px; opacity: .92; display: flex; gap: 12px; flex-wrap: wrap; }
.detail-sec { margin: 14px; padding: 16px; }
.detail-sec h2 { font-size: 15px; margin: 0 0 10px; font-weight: 800; }
.steps { padding: 0; margin: 0; list-style: none; counter-reset: st; }
.steps li { counter-increment: st; position: relative; padding: 0 0 14px 34px; font-size: 13px; color: #4a4238; }
.steps li::before { content: counter(st); position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%;
  background: #fff3e2; color: #ff7a1a; font-weight: 800; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 10px; top: 24px; bottom: 0; width: 2px; background: #f6ede0; }
.notice { background: #fffaf0; border: 1px solid #ffe8c2; border-radius: 12px; padding: 12px; font-size: 12px; color: #8a6d3b; margin-top: 10px; }
.fixed-bottom { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.97); border-top: 1px solid var(--line); z-index: 30; }
.fixed-bottom .row { display: flex; gap: 10px; align-items: center; }
.fixed-bottom .row .price { font-size: 22px; color: #ff5a00; font-weight: 900; flex: 1; }
.fixed-bottom .row .btn { flex: 1.4; }

/* ===== 邀请页 ===== */
.invite-hero { margin: 14px; border-radius: var(--radius); padding: 22px; text-align: center; color: #fff; position: relative;
  background: linear-gradient(135deg, #ffb02e 0%, #ff7a1a 55%, #e86300 100%); box-shadow: 0 10px 26px rgba(255,138,0,.3); }
.invite-hero h1 { margin: 0 0 6px; font-size: 19px; }
.invite-hero p { margin: 0 0 16px; font-size: 12.5px; opacity: .92; }
.qr { width: 120px; height: 120px; margin: 0 auto 12px; background: #fff; border-radius: 12px; padding: 8px; display: flex; align-items: center; justify-content: center; }
.qr svg { width: 100%; height: 100%; }
.invite-code { background: rgba(255,255,255,.18); display: inline-block; padding: 6px 18px; border-radius: 999px; font-size: 13px; font-weight: 700; letter-spacing: 2px; }
.rule-list { margin: 14px; padding: 16px; }
.rule-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.rule-item:last-child { border-bottom: none; }
.rule-item .ri { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.rule-item .rt { font-size: 13.5px; font-weight: 700; }
.rule-item .rs { font-size: 12px; color: var(--muted); }
.rule-item .rm { margin-left: auto; color: #ff5a00; font-weight: 800; font-size: 14px; white-space: nowrap; }

/* ===== 我的页 ===== */
.me-head { margin: 14px; border-radius: var(--radius); padding: 18px; display: flex; align-items: center; gap: 14px;
  background: linear-gradient(135deg, #ffb02e, #ff7a1a); color: #fff; }
.avatar { width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,.25); display: flex; align-items: center; justify-content: center; font-size: 30px; }
.me-head .nm { font-weight: 800; font-size: 16px; }
.me-head .id { font-size: 11.5px; opacity: .85; }
.me-head .vip { margin-left: auto; background: #fff; color: #e86300; font-size: 11px; font-weight: 800; padding: 5px 12px; border-radius: 999px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--card); margin: 0 14px; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 0; }
.stat-grid .st { text-align: center; }
.stat-grid .st b { display: block; font-size: 16px; color: #e86300; }
.stat-grid .st span { font-size: 11px; color: var(--muted); }
.menu-list { margin: 14px; padding: 4px 14px; }
.menu-list a { display: flex; align-items: center; gap: 12px; padding: 13px 0; text-decoration: none; color: var(--text); border-bottom: 1px solid var(--line); font-size: 13.5px; font-weight: 600; }
.menu-list a:last-child { border-bottom: none; }
.menu-list .mi { width: 32px; height: 32px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.menu-list .arr { margin-left: auto; color: #cfc4b4; font-size: 14px; }
.menu-list .val { margin-left: auto; color: var(--muted); font-size: 12px; }

/* ===== 收益明细 ===== */
.flow-list { margin: 14px; padding: 6px 14px; }
.flow { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.flow:last-child { border-bottom: none; }
.flow .fi { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 17px; background: #f6f1e9; flex-shrink: 0; }
.flow .ft { font-size: 13px; font-weight: 600; }
.flow .fs { font-size: 11px; color: var(--muted); }
.flow .fa { margin-left: auto; font-weight: 800; font-size: 15px; }
.flow .fa.in { color: #ff5a00; }
.flow .fa.out { color: var(--muted); }

/* ===== 弹窗 ===== */
.mask { position: fixed; inset: 0; background: rgba(30,20,10,.5); z-index: 60; display: none; align-items: flex-end; justify-content: center; }
.mask.show { display: flex; }
.sheet { width: 100%; max-width: 480px; background: #fff; border-radius: 20px 20px 0 0; padding: 18px 18px calc(20px + env(safe-area-inset-bottom)); animation: up .25s ease; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet h3 { margin: 0 0 14px; font-size: 16px; text-align: center; font-weight: 800; }
.sheet .close { position: absolute; }
.inp { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 15px; outline: none; margin-bottom: 12px; }
.inp:focus { border-color: var(--primary); }
.chips { display: flex; gap: 8px; margin-bottom: 14px; }
.chips a { flex: 1; text-align: center; font-size: 12.5px; padding: 9px 0; border-radius: 10px; border: 1.5px solid var(--line); color: #7a6f61; text-decoration: none; font-weight: 700; }
.chips a.on { border-color: var(--primary); color: var(--primary); background: #fff6ea; }
.amount-chips { display: flex; gap: 8px; margin-bottom: 6px; }
.amount-chips a { flex: 1; text-align: center; font-size: 13px; padding: 9px 0; border-radius: 10px; background: #f6f1e9; color: #7a6f61; text-decoration: none; font-weight: 700; }
.amount-chips a.on { background: #fff1e0; color: #ff7a1a; }

/* ===== 签到 ===== */
.sign-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 14px; }
.sign-day { text-align: center; background: #f6f1e9; border-radius: 10px; padding: 8px 2px; }
.sign-day .dw { font-size: 10px; color: var(--muted); }
.sign-day .dv { font-size: 13px; font-weight: 800; color: #e86300; margin: 2px 0; }
.sign-day .st { font-size: 9px; }
.sign-day.done { background: #e7f6ee; }
.sign-day.done .st { color: var(--green); }
.sign-day.today { background: linear-gradient(135deg, #ff9a2e, #ff7a1a); }
.sign-day.today .dw, .sign-day.today .dv, .sign-day.today .st { color: #fff; }

/* ===== Toast ===== */
.toast { position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%); background: rgba(30,20,10,.85); color: #fff;
  padding: 10px 22px; border-radius: 999px; font-size: 13px; z-index: 99; display: none; }
.toast.show { display: block; animation: fade .3s; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ===== 帮助/公告 ===== */
.qa { margin: 14px; padding: 6px 14px; }
.qa details { padding: 10px 0; border-bottom: 1px solid var(--line); }
.qa details:last-child { border-bottom: none; }
.qa summary { font-size: 13.5px; font-weight: 700; cursor: pointer; }
.qa p { font-size: 12.5px; color: #6b6155; margin: 8px 0 0; }

.empty { text-align: center; color: var(--muted); font-size: 13px; padding: 40px 0; }
