/* ==========================================================================
   抖音代发任务平台 · 用户端样式
   设计基调：墨绿 + 米白 + 低饱和金，克制排版，无渐变按钮、无高饱和堆叠
   ========================================================================== */

:root {
  --ink:        #14201b;
  --ink-2:      #4d5c55;
  --ink-3:      #8a978f;
  --brand:      #0f6b4f;
  --brand-2:    #14805e;
  --brand-soft: #e9f2ee;
  --brand-line: #cfe1d8;
  --gold:       #9b7736;
  --gold-soft:  #fbf5e9;
  --gold-line:  #ecdcbc;
  --danger:     #b4442f;
  --danger-soft:#fdf1ee;
  --bg:         #f3f2ec;
  --card:       #ffffff;
  --line:       #e7e5dd;
  --line-2:     #f0eee7;
  --r-lg:       18px;
  --r-md:       13px;
  --r-sm:       9px;
  --shadow:     0 1px 2px rgba(20, 32, 27, .04), 0 8px 24px -18px rgba(20, 32, 27, .28);
  /* 内容栏宽度：.app / 底部栏 / 弹层都跟它，桌面端只改这一处就整体变宽 */
  --shell:      500px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas, monospace;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.7 var(--sans);
  overscroll-behavior-y: none;
}

/* 桌面端把内容收进一条居中的窄栏，两侧留白 */
body::before {
  content: "";
  position: fixed; inset: 0 0 auto 0; height: 240px;
  background: linear-gradient(180deg, #e7efea 0%, rgba(243, 242, 236, 0) 100%);
  pointer-events: none; z-index: 0;
}

img { max-width: 100%; display: block; border: 0; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }

/* --------------------------------------------------------------------------
   布局骨架
   -------------------------------------------------------------------------- */

.app {
  position: relative; z-index: 1;
  max-width: var(--shell); margin: 0 auto;
  min-height: 100vh;
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
}

.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 10px;
  height: 54px; padding: 0 16px;
  background: rgba(243, 242, 236, .86);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid rgba(20, 32, 27, .06);
}
.topbar .logo {
  width: 28px; height: 28px; border-radius: 9px;
  background: var(--brand); color: #fff;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700; letter-spacing: 0;
}
.topbar .name { font-size: 16px; font-weight: 600; letter-spacing: .01em; }
.topbar .spacer { margin-left: auto; }
.topbar .act {
  font-size: 13px; color: var(--ink-2);
  padding: 6px 11px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff;
}
.topbar .back {
  width: 30px; height: 30px; margin-left: -4px;
  display: grid; place-items: center; border-radius: 9px;
  color: var(--ink-2);
}
.topbar .back svg { width: 18px; height: 18px; }

.page { padding: 16px 14px 24px; }

/* 底部导航 */
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; z-index: 60;
  width: 100%; max-width: var(--shell);
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 8px; font-size: 11px; color: var(--ink-3); letter-spacing: .02em;
}
.tabbar a svg { width: 21px; height: 21px; stroke-width: 1.6; }
.tabbar a.on { color: var(--brand); font-weight: 600; }

/* --------------------------------------------------------------------------
   通用零件
   -------------------------------------------------------------------------- */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card + .card { margin-top: 12px; }
.card .pad { padding: 16px 16px; }

/* 小标题：英文微标 + 中文主标 */
.eyebrow {
  font-size: 10px; letter-spacing: .24em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600;
}
.sec-title { display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.sec-title h2 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: .01em; }
.sec-title .more { margin-left: auto; font-size: 12.5px; color: var(--ink-3); }

.muted { color: var(--ink-3); }
.small { font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* 标签 */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 11.5px; font-weight: 500; letter-spacing: .02em;
  background: var(--brand-soft); color: var(--brand); border: 1px solid var(--brand-line);
}
.tag.gold { background: var(--gold-soft); color: var(--gold); border-color: var(--gold-line); }
.tag.grey { background: #f2f1ea; color: var(--ink-3); border-color: var(--line); }
.tag.red  { background: var(--danger-soft); color: var(--danger); border-color: #f0d3cb; }

/* 金额 */
.amount { color: var(--gold); font-weight: 700; font-variant-numeric: tabular-nums; }
.amount .cur { font-size: .72em; font-weight: 600; margin-right: 1px; }

/* 按钮 */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 14px 18px; border: 0; border-radius: 14px;
  background: var(--brand); color: #fff;
  font-size: 15.5px; font-weight: 600; letter-spacing: .04em;
  transition: background .15s, opacity .15s;
}
.btn:active { background: #0b573f; }
.btn:disabled { background: #c2cac6; color: #fff; cursor: not-allowed; }
.btn.ghost { background: #fff; color: var(--brand); border: 1px solid var(--brand-line); }
.btn.ghost:active { background: var(--brand-soft); }
.btn.grey { background: #f2f1ea; color: var(--ink-2); border: 1px solid var(--line); }
.btn.sm { width: auto; padding: 9px 16px; font-size: 13.5px; border-radius: 11px; }
.btn .sub { display: block; font-size: 11.5px; font-weight: 400; opacity: .72; letter-spacing: .01em; margin-top: 2px; }
.btn-col { display: block; text-align: left; }
.btn-col .main { display: flex; align-items: center; justify-content: space-between; }
.btn svg { width: 18px; height: 18px; }

/* 进度条 */
.bar { height: 5px; border-radius: 99px; background: #eceae1; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: var(--brand); transition: width .4s ease; }
.bar.gold > i { background: var(--gold); }

/* 分割线 */
.hr { height: 1px; background: var(--line-2); margin: 14px 0; }
.hr-dash { height: 0; border-top: 1px dashed var(--line); margin: 14px 0; }

/* 空状态 */
.empty { text-align: center; padding: 56px 20px; color: var(--ink-3); }
.empty .ico {
  width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 16px;
  background: #ecebe3; display: grid; place-items: center; color: #b3bcb6;
}
.empty .ico svg { width: 24px; height: 24px; }
.empty p { margin: 0; font-size: 13.5px; }

/* --------------------------------------------------------------------------
   首页 · 头图与统计
   -------------------------------------------------------------------------- */

.hero { padding: 18px 16px 4px; }
.hero h1 {
  margin: 6px 0 6px; font-size: 25px; font-weight: 700; letter-spacing: -.01em; line-height: 1.35;
}
.hero p { margin: 0; font-size: 13.5px; color: var(--ink-2); }

.stat-row {
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  margin: 16px 0 4px; overflow: hidden; box-shadow: var(--shadow);
}
.stat-row > div { padding: 14px 8px; text-align: center; }
.stat-row > div + div { border-left: 1px solid var(--line-2); }
.stat-row b { display: block; font-size: 19px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.stat-row span { font-size: 11.5px; color: var(--ink-3); }

.notice {
  display: flex; gap: 9px; align-items: flex-start;
  margin: 14px 0 0; padding: 11px 13px;
  background: var(--gold-soft); border: 1px solid var(--gold-line);
  border-radius: var(--r-md); font-size: 12.5px; color: #7d6229; line-height: 1.65;
}
.notice svg { width: 15px; height: 15px; flex: none; margin-top: 3px; }

/* --------------------------------------------------------------------------
   任务卡片（列表）
   -------------------------------------------------------------------------- */

.task-list { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }

.task-card {
  display: block; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow); overflow: hidden;
  transition: transform .12s ease;
}
.task-card:active { transform: scale(.994); }

.task-card .head { display: flex; gap: 12px; padding: 14px 14px 12px; }
.task-card .thumb {
  width: 62px; height: 78px; flex: none; border-radius: 10px; overflow: hidden;
  background: #edece5; position: relative;
}
.task-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.task-card .thumb .kind {
  position: absolute; left: 0; bottom: 0; right: 0;
  background: linear-gradient(0deg, rgba(0,0,0,.5), transparent);
  color: #fff; font-size: 10px; text-align: center; padding: 8px 0 3px; letter-spacing: .06em;
}
.task-card .info { flex: 1; min-width: 0; }
.task-card h3 {
  margin: 1px 0 6px; font-size: 15.5px; font-weight: 600; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.task-card .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.task-card .pay { display: flex; align-items: baseline; gap: 6px; }
.task-card .pay .big { font-size: 20px; }
.task-card .pay .upto { font-size: 11.5px; color: var(--ink-3); }

.task-card .foot {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; background: #fbfaf6; border-top: 1px solid var(--line-2);
  font-size: 12px; color: var(--ink-2);
}
.task-card .foot .bar { flex: 1; }
.task-card .foot .go { color: var(--brand); font-weight: 600; letter-spacing: .02em; }

.filter { display: flex; gap: 7px; margin-top: 16px; overflow-x: auto; padding-bottom: 2px; }
.filter::-webkit-scrollbar { display: none; }
.filter button {
  flex: none; padding: 7px 14px; border-radius: 999px; font-size: 13px;
  background: #fff; border: 1px solid var(--line); color: var(--ink-2);
}
.filter button.on { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }

/* --------------------------------------------------------------------------
   任务详情
   -------------------------------------------------------------------------- */

.detail-head { padding: 20px 18px 16px; }
.detail-head .top { display: flex; align-items: flex-start; gap: 12px; }
.detail-head h1 { margin: 8px 0 0; font-size: 22px; font-weight: 700; line-height: 1.4; letter-spacing: -.005em; }
.detail-head .badge {
  flex: none; margin-left: auto;
  padding: 5px 10px; border-radius: 8px; font-size: 11.5px; font-weight: 600;
  background: var(--brand-soft); color: var(--brand); border: 1px solid var(--brand-line);
}

/* 领取成功状态块 */
.claimed-mark { text-align: center; padding: 22px 0 6px; }
.claimed-mark .ring {
  width: 52px; height: 52px; margin: 0 auto 10px; border-radius: 50%;
  background: var(--brand); color: #fff; display: grid; place-items: center;
}
.claimed-mark .ring svg { width: 24px; height: 24px; stroke-width: 2.6; }
.claimed-mark p { margin: 0; font-size: 14px; font-weight: 600; color: var(--brand); letter-spacing: .04em; }
.claimed-mark .sub { margin-top: 4px; font-size: 12px; font-weight: 400; color: var(--ink-3); letter-spacing: 0; }

/* 奖励说明 */
.reward-box {
  display: flex; align-items: center; gap: 12px;
  margin: 0 16px 12px; padding: 13px 14px;
  background: var(--gold-soft); border: 1px solid var(--gold-line); border-radius: var(--r-md);
}
.reward-box .coin {
  width: 34px; height: 34px; flex: none; border-radius: 10px;
  background: #fff; border: 1px solid var(--gold-line); color: var(--gold);
  display: grid; place-items: center; font-size: 18px; font-weight: 700;
  line-height: 1; font-variant-numeric: tabular-nums;
}
.reward-box .t { flex: 1; min-width: 0; }
.reward-box .t .l { font-size: 11.5px; color: #8a6c2f; }
.reward-box .t .v { font-size: 17px; font-weight: 700; color: var(--gold); letter-spacing: -.01em; }
.reward-box .t .v small { font-size: 12px; font-weight: 500; margin-left: 4px; }
.reward-box .r { font-size: 11px; color: #9a7d3f; text-align: right; line-height: 1.6; }

.tier-box {
  margin: 0 16px 12px; padding: 13px 14px;
  background: #fcfaf4; border: 1px solid var(--line); border-radius: var(--r-md);
}
.tier-box .h { display: flex; align-items: center; margin-bottom: 9px; }
.tier-box .h b { font-size: 13px; font-weight: 600; }
.tier-box .h span { margin-left: auto; font-size: 11px; color: var(--ink-3); }
.tier-box ul li {
  display: flex; align-items: center; font-size: 13px; padding: 5px 0;
  border-bottom: 1px dashed #ece9df;
}
.tier-box ul li:last-child { border-bottom: 0; }
.tier-box ul li .k { color: var(--ink-2); }
.tier-box ul li .v { margin-left: auto; font-weight: 600; color: var(--gold); font-variant-numeric: tabular-nums; }
.tier-box .loop { margin-top: 8px; font-size: 12px; color: var(--ink-3); }

/* 名额 / 进度 */
.quota-box { margin: 0 16px 12px; padding: 13px 14px; border: 1px solid var(--line); border-radius: var(--r-md); }
.quota-box .l { display: flex; align-items: baseline; font-size: 13px; margin-bottom: 9px; }
.quota-box .l b { font-weight: 600; }
.quota-box .l span { margin-left: auto; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* 可复制文本块 */
.copy-box { margin: 0 16px 12px; }
.copy-box .lab { display: flex; align-items: center; margin-bottom: 6px; }
.copy-box .lab b { font-size: 12px; font-weight: 600; color: var(--brand); letter-spacing: .04em; }
.copy-box .lab span { margin-left: auto; font-size: 11.5px; color: var(--ink-3); }
.copy-box .txt {
  padding: 13px 14px; border-radius: var(--r-md);
  background: #fbfaf5; border: 1px dashed var(--line);
  font-size: 14.5px; line-height: 1.7; white-space: pre-wrap; word-break: break-word;
  transition: background .2s, border-color .2s;
}
.copy-box .txt:active { background: var(--brand-soft); border-color: var(--brand-line); }
.copy-box.copied .txt { background: var(--brand-soft); border-color: var(--brand-line); border-style: solid; }

/* 素材区 */
.material {
  margin: 0 16px 12px; border: 1px solid var(--brand-line); border-radius: var(--r-md);
  background: #f7fbf9; overflow: hidden;
}
.material .h { display: flex; gap: 11px; padding: 13px 14px 11px; }
.material .h .ico {
  width: 30px; height: 30px; flex: none; border-radius: 9px;
  background: var(--brand); color: #fff; display: grid; place-items: center;
}
.material .h .ico svg { width: 16px; height: 16px; }
.material .h b { display: block; font-size: 13.5px; font-weight: 600; }
.material .h p { margin: 1px 0 0; font-size: 11.5px; color: var(--ink-2); }
.material .grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px; padding: 0 12px 12px;
}
/* 只作用于图片缩略格：视频格是 .vmat，高度由视频自己决定，不能被 3:4 撑高 */
.material .grid > a.mat {
  display: block; border-radius: 9px; overflow: hidden; background: #fff;
  border: 1px solid var(--brand-line); aspect-ratio: 3 / 4;
}
.material .grid img { width: 100%; height: 100%; object-fit: cover; }
.material .tip {
  padding: 9px 14px; border-top: 1px dashed var(--brand-line);
  font-size: 11.5px; color: #52705f; text-align: center;
}

/* 发布要求 */
.req { margin: 0 16px 12px; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.req .h { display: flex; gap: 11px; align-items: center; padding: 12px 14px; background: #fbfaf5; }
.req .h .no {
  width: 24px; height: 24px; border-radius: 7px; background: var(--ink); color: #fff;
  display: grid; place-items: center; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.req .h b { font-size: 13.5px; font-weight: 600; }
.req .h span { margin-left: auto; font-size: 11.5px; color: var(--ink-3); }
.req ol { padding: 4px 14px 12px; }
.req ol li {
  display: flex; gap: 9px; padding: 8px 0; font-size: 13.5px; line-height: 1.65;
  border-bottom: 1px dashed var(--line-2);
}
.req ol li:last-child { border-bottom: 0; }
.req ol li i {
  flex: none; width: 5px; height: 5px; margin-top: 8px; border-radius: 50%; background: var(--brand);
}

/* 底部固定操作条 */
.actionbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; z-index: 70;
  width: 100%; max-width: var(--shell);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.actionbar .hintline { text-align: center; font-size: 11.5px; color: var(--ink-3); margin-top: 7px; }
.has-actionbar { padding-bottom: calc(104px + env(safe-area-inset-bottom)); }

/* --------------------------------------------------------------------------
   表单
   -------------------------------------------------------------------------- */

.field { margin-bottom: 14px; }
.field > label {
  display: flex; align-items: center; gap: 5px;
  font-size: 12.5px; color: var(--ink-2); margin-bottom: 6px; font-weight: 500;
}
.field > label .req-star { color: var(--danger); }
.field > label .hint { margin-left: auto; font-size: 11.5px; color: var(--ink-3); font-weight: 400; }

.input, textarea.input, select.input {
  width: 100%; padding: 12px 13px;
  background: #fbfaf6; border: 1px solid var(--line); border-radius: var(--r-md);
  font-size: 14.5px; outline: none; transition: border-color .15s, background .15s;
  -webkit-appearance: none; appearance: none;
}
.input:focus { border-color: var(--brand); background: #fff; }
textarea.input { resize: vertical; min-height: 76px; line-height: 1.7; }
select.input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238a978f' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; padding-right: 34px;
}
.input::placeholder { color: #b3bcb6; }

.field-err { font-size: 12px; color: var(--danger); margin-top: 5px; }

/* 二选一切换（收款方式） */
.seg-pick { display: flex; gap: 8px; }
.seg-pick button {
  flex: 1; padding: 11px 0; border-radius: var(--r-md);
  border: 1px solid var(--line); background: #fbfaf6; color: var(--ink-2);
  font-size: 14.5px; transition: .15s;
}
.seg-pick button.on {
  background: var(--brand-soft); border-color: var(--brand);
  color: var(--brand); font-weight: 600;
}

/* 提现弹层顶部的收款信息卡 */
.pay-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: var(--r-md);
  background: var(--brand-soft); border: 1px solid var(--brand-line);
}
.pay-card .pc-l { flex: 1; min-width: 0; }
.pay-card img {
  width: 54px; height: 54px; border-radius: 9px; object-fit: cover;
  border: 1px solid var(--brand-line); background: #fff; cursor: zoom-in;
}

/* 上传 */
.uploader { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }.uploader .slot, .uploader .add {
  position: relative; aspect-ratio: 1; border-radius: 11px; overflow: hidden;
}
.uploader .slot { border: 1px solid var(--line); background: #f7f6f1; }
.uploader .slot img { width: 100%; height: 100%; object-fit: cover; }
.uploader .slot .del {
  position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%;
  background: rgba(20, 32, 27, .62); color: #fff; border: 0; font-size: 13px; line-height: 1;
  display: grid; place-items: center; backdrop-filter: blur(4px);
}
.uploader .add {
  border: 1px dashed var(--line); background: #fbfaf6; color: var(--ink-3);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-size: 11.5px;
}
.uploader .add svg { width: 20px; height: 20px; }
.uploader .add input { display: none; }

/* --------------------------------------------------------------------------
   我的 · 列表
   -------------------------------------------------------------------------- */

.wallet {
  margin: 14px 0 0; padding: 20px 18px;
  background: linear-gradient(160deg, #164e3c 0%, #0d3628 100%);
  border-radius: var(--r-lg); color: #fff; position: relative; overflow: hidden;
}
.wallet::after {
  content: ""; position: absolute; right: -46px; top: -46px; width: 150px; height: 150px;
  border-radius: 50%; border: 1px solid rgba(255, 255, 255, .1);
}
.wallet .lab { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: rgba(255,255,255,.55); }
.wallet .big { font-size: 33px; font-weight: 700; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.wallet .big .cur { font-size: 17px; font-weight: 600; margin-right: 3px; opacity: .8; }
.wallet .row { display: flex; gap: 22px; margin-top: 14px; font-size: 12px; color: rgba(255,255,255,.66); }
.wallet .row b { display: block; font-size: 15px; color: #fff; font-weight: 600; margin-top: 1px; font-variant-numeric: tabular-nums; }

/* 钱包操作：资金流水 + 提现 */
.wallet .wact {
  position: absolute; right: 18px; bottom: 18px;
  display: flex; gap: 8px; align-items: center;
}
.wallet .wbtn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 14px; border-radius: 11px; font-size: 13px; font-weight: 500;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2);
  color: #fff; white-space: nowrap;
}
.wallet .wbtn svg { width: 14px; height: 14px; opacity: .85; }
.wallet .wbtn.primary { background: #fff; color: #14402f; border-color: #fff; font-weight: 600; }
.wallet .wbtn:active { opacity: .85; }

.mini-stat { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.mini-stat div {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 11px 4px; text-align: center;
}
.mini-stat b { display: block; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.mini-stat span { font-size: 11px; color: var(--ink-3); }

.rec {
  display: flex; gap: 11px; padding: 13px 14px;
  border-bottom: 1px solid var(--line-2);
}
.rec:last-child { border-bottom: 0; }
.rec .thumb { width: 46px; height: 58px; flex: none; border-radius: 8px; overflow: hidden; background: #eeece5; }
.rec .thumb img { width: 100%; height: 100%; object-fit: cover; }
.rec .b { flex: 1; min-width: 0; }
.rec .b h4 { margin: 0 0 4px; font-size: 14px; font-weight: 600; }
.rec .b .l2 { font-size: 12px; color: var(--ink-3); display: flex; gap: 8px; flex-wrap: wrap; }
.rec .r { text-align: right; flex: none; }
.rec .r .st { font-size: 12px; font-weight: 600; }
.rec .r .amt { font-size: 15px; margin-top: 3px; }
.st-wait { color: var(--gold); }
.st-ok { color: var(--brand); }
.st-no { color: var(--danger); }
.st-grey { color: var(--ink-3); }

.note-line {
  margin-top: 8px; padding: 8px 10px; border-radius: 8px;
  background: var(--danger-soft); border: 1px solid #f2d8d1;
  font-size: 12px; color: var(--danger); line-height: 1.6;
}

/* 简单列表行 */
.rows { }
.rows .r {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid var(--line-2); font-size: 14.5px;
}
.rows .r:last-child { border-bottom: 0; }
.rows .r .k { color: var(--ink-2); }
.rows .r .v { margin-left: auto; color: var(--ink-3); font-size: 13.5px; display: flex; align-items: center; gap: 6px; }
.rows .r .v svg { width: 15px; height: 15px; opacity: .5; }

/* --------------------------------------------------------------------------
   登录页
   -------------------------------------------------------------------------- */

.auth { padding: 46px 24px 24px; }
.auth .mark {
  width: 46px; height: 46px; border-radius: 14px; background: var(--brand); color: #fff;
  display: grid; place-items: center; font-size: 19px; font-weight: 700; margin-bottom: 20px;
}
.auth h1 { margin: 0 0 6px; font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
.auth p.sub { margin: 0 0 26px; font-size: 13.5px; color: var(--ink-2); }
.auth .switch { text-align: center; margin-top: 18px; font-size: 13.5px; color: var(--ink-3); }
.auth .switch b { color: var(--brand); font-weight: 600; margin-left: 4px; }
.auth .agree { margin-top: 14px; font-size: 11.5px; color: var(--ink-3); text-align: center; line-height: 1.7; }

/* --------------------------------------------------------------------------
   Toast / 弹层
   -------------------------------------------------------------------------- */

.toast {
  position: fixed; left: 50%; bottom: 92px; transform: translate(-50%, 12px);
  z-index: 200; max-width: 78vw;
  padding: 11px 18px; border-radius: 12px;
  background: rgba(20, 32, 27, .92); color: #fff; font-size: 13.5px; line-height: 1.5;
  opacity: 0; pointer-events: none; transition: opacity .22s, transform .22s;
  backdrop-filter: blur(8px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.mask {
  position: fixed; inset: 0; z-index: 150; background: rgba(20, 32, 27, .44);
  opacity: 0; pointer-events: none; transition: opacity .22s;
}
.mask.show { opacity: 1; pointer-events: auto; }

/* 弹层由 JS 提到 body 下，与遮罩同层叠上下文；这里的高 z-index 才有意义 */
.sheet {
  position: fixed; left: 50%; bottom: 0; transform: translate(-50%, 100%);
  z-index: 160; width: 100%; max-width: var(--shell);
  background: var(--bg); border-radius: 22px 22px 0 0;
  transition: transform .28s cubic-bezier(.22,.7,.3,1);
  max-height: 88vh; display: flex; flex-direction: column;
  box-shadow: 0 -12px 40px -18px rgba(20, 32, 27, .5);
}
.sheet.show { transform: translate(-50%, 0); }
.sheet .sh {
  display: flex; align-items: center; padding: 16px 18px 12px;
  border-bottom: 1px solid var(--line);
}
.sheet .sh b { font-size: 16px; font-weight: 600; }
.sheet .sh .x {
  margin-left: auto; width: 28px; height: 28px; border-radius: 50%; border: 0;
  background: #eceae2; color: var(--ink-2); font-size: 15px; line-height: 1; display: grid; place-items: center;
}
.sheet .sb { padding: 16px 18px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sheet .sf { padding: 12px 18px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; }

/* 图片预览 */
.lightbox {
  position: fixed; inset: 0; z-index: 300; background: rgba(10, 16, 13, .94);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.lightbox.show { display: flex; }
.lightbox img { max-width: 100%; max-height: 84vh; object-fit: contain; border-radius: 8px; }
.lightbox .tipx {
  position: absolute; left: 0; right: 0; bottom: calc(26px + env(safe-area-inset-bottom));
  text-align: center; color: rgba(255,255,255,.66); font-size: 12.5px;
}

/* 加载骨架 */
.skel { background: linear-gradient(90deg, #edece5 25%, #f5f4ee 37%, #edece5 63%);
  background-size: 400% 100%; animation: sk 1.3s ease infinite; border-radius: 8px; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.skel-card { height: 120px; border-radius: var(--r-lg); margin-bottom: 12px; }

/* --------------------------------------------------------------------------
   完成榜
   -------------------------------------------------------------------------- */

.feed {
  display: flex; align-items: center; gap: 11px;
  padding: 13px 14px; border-bottom: 1px solid var(--line-2);
}
.feed:last-child { border-bottom: 0; }
.feed .fa {
  width: 36px; height: 36px; flex: none; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; font-size: 14px; font-weight: 700;
  border: 1px solid var(--brand-line);
}
.feed .fa.gold { background: var(--gold-soft); color: var(--gold); border-color: var(--gold-line); }
.feed .fb { flex: 1; min-width: 0; }
.feed .fb h4 {
  margin: 0 0 3px; font-size: 14px; font-weight: 600;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.feed .fb h4 .tag { height: 19px; font-size: 10.5px; padding: 0 6px; }
.feed .fb .l2 {
  font-size: 12px; color: var(--ink-3); display: flex; gap: 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.feed .fc { text-align: right; flex: none; }
.feed .fc .amount { font-size: 15px; }

/* --------------------------------------------------------------------------
   资金流水
   -------------------------------------------------------------------------- */

.led {
  display: flex; align-items: center; gap: 11px;
  padding: 13px 14px; border-bottom: 1px solid var(--line-2);
}
.led:last-child { border-bottom: 0; }
.led .li {
  width: 34px; height: 34px; flex: none; border-radius: 10px;
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
}
.led .lb { flex: 1; min-width: 0; }
.led .lb h4 {
  margin: 0 0 3px; font-size: 14px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.led .lb .l2 { font-size: 12px; color: var(--ink-3); display: flex; gap: 8px; }
.led .lc { text-align: right; flex: none; }
.led .lc .lv {
  font-size: 15.5px; font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}
.led .lc .lv.plus { color: var(--gold); }

/* 筛选链接（与 .filter button 同款，用于 a 标签） */
.filter .fbtn {
  flex: none; padding: 7px 14px; border-radius: 999px; font-size: 13px;
  background: #fff; border: 1px solid var(--line); color: var(--ink-2);
  white-space: nowrap;
}
.filter .fbtn.on { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }

/* --------------------------------------------------------------------------
   公告
   -------------------------------------------------------------------------- */

.notice-body p {
  margin: 0 0 10px; font-size: 14.5px; line-height: 1.85; color: var(--ink-2);
  word-break: break-word;
}
.notice-body p:last-child { margin-bottom: 0; }

/* 列表行 */
.nrow {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid var(--line-2);
}
.nrow:last-child { border-bottom: 0; }
.nrow .nb { flex: 1; min-width: 0; }
.nrow .nb h4 {
  margin: 0 0 4px; font-size: 14.5px; font-weight: 600;
  display: flex; align-items: center; gap: 6px;
}
.nrow .nb h4 .tag { height: 19px; font-size: 10.5px; padding: 0 6px; }
.nrow .nb p {
  margin: 0 0 4px; font-size: 12.5px; color: var(--ink-3); line-height: 1.6;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nrow > svg { width: 15px; height: 15px; color: var(--ink-3); flex: none; opacity: .6; }

/* 进站弹窗 */
.notice-pop {
  position: fixed; left: 50%; top: 50%; z-index: 170;
  width: calc(100% - 44px); max-width: 400px;
  transform: translate(-50%, -46%) scale(.96);
  background: var(--card); border-radius: 20px;
  box-shadow: 0 24px 60px -20px rgba(20, 32, 27, .5);
  opacity: 0; pointer-events: none;
  transition: opacity .24s, transform .28s cubic-bezier(.22,.7,.3,1);
  display: flex; flex-direction: column; max-height: 78vh; overflow: hidden;
}
.notice-pop.show { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.notice-pop .np-head { padding: 22px 22px 12px; border-bottom: 1px solid var(--line-2); }
.notice-pop .np-badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand); border: 1px solid var(--brand-line);
  font-size: 11px; font-weight: 600; letter-spacing: .1em; margin-bottom: 10px;
}
.notice-pop .np-head h3 { margin: 0 0 4px; font-size: 18px; font-weight: 700; line-height: 1.45; }
.notice-pop .np-body { padding: 16px 22px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.notice-pop .np-foot {
  padding: 12px 18px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line-2); display: flex; gap: 10px;
}
.notice-pop .np-foot .btn { padding: 12px; font-size: 14.5px; }

/* --------------------------------------------------------------------------
   视频素材
   竖版素材（9:16）是主流，按「限高、宽度自适应、深色底衬」处理：
   不给容器写死比例，改成压视频的 max-height 让宽度自己跟着算，
   这样竖版不会顶到一屏那么高，横版也不会出现上下黑边。
   -------------------------------------------------------------------------- */

.material .grid.vgrid { grid-template-columns: 1fr; gap: 12px; }

.material .vmat {
  border: 1px solid var(--brand-line); border-radius: 11px;
  background: var(--card); overflow: hidden;
}
.material .vmat .vwrap {
  display: flex; justify-content: center; align-items: center;
  background: #0d1a14; min-height: 120px;
}
.material .vmat video {
  display: block; width: auto; height: auto;
  max-width: 100%; max-height: min(56vh, 420px);
  background: #0d1a14;
}

/* 下载条：视频下面单独一行，左边说明右边按钮，不再是贴死的整条色块 */
.material .vmat .vbar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-top: 1px solid var(--brand-line);
}
.material .vmat .vmeta { flex: 1; min-width: 0; }
.material .vmat .vmeta b {
  display: block; font-size: 12.5px; font-weight: 600; line-height: 1.5;
}
.material .vmat .vmeta span {
  display: block; font-size: 11.5px; color: var(--ink-3); line-height: 1.5;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.material .vmat .vdl {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 15px; border-radius: 9px;
  background: var(--brand); color: #fff;
  font-size: 13px; font-weight: 600; letter-spacing: .02em;
  transition: background .15s;
}
.material .vmat .vdl svg { width: 15px; height: 15px; flex: none; }
.material .vmat .vdl:hover { background: var(--brand-2); }
.material .vmat .vdl:active { background: #0b573f; }

/* 窄屏（iPhone SE 一档）按钮换行到下面占满一行，别把说明文字挤没 */
@media (max-width: 359px) {
  .material .vmat .vbar { flex-wrap: wrap; }
  .material .vmat .vdl { width: 100%; justify-content: center; }
}

/* 提示条 */
.warn-line {
  padding: 10px 12px; border-radius: var(--r-md);
  background: var(--gold-soft); border: 1px solid var(--gold-line);
  font-size: 12.5px; color: #7d6229; line-height: 1.7;
}

/* --------------------------------------------------------------------------
   桌面适配
   -------------------------------------------------------------------------- */

@media (min-width: 620px) {
  body { background: #edece5; }
  .app {
    background: var(--bg);
    box-shadow: 0 0 0 1px rgba(20, 32, 27, .06), 0 30px 70px -40px rgba(20, 32, 27, .4);
    min-height: 100vh;
  }
  /* 内容栏稍微放宽，视频和图片素材在大屏上不至于挤成一条 */
  :root { --shell: 560px; }

  /* 鼠标能悬停，就给出反馈；手机上不要这些（:active 已经够了） */
  .btn:hover { background: var(--brand-2); }
  .btn.ghost:hover { background: var(--brand-soft); }
  .btn:disabled:hover { background: #c2cac6; }
  .material .grid > a.mat { cursor: zoom-in; transition: border-color .15s; }
  .material .grid > a.mat:hover { border-color: var(--brand); }

  /* 桌面竖屏空间富裕，视频可以再高一点，但仍不铺满一屏 */
  .material .vmat video { max-height: min(58vh, 480px); }
  .material .vmat .vwrap { min-height: 160px; }
}

@media (min-width: 1024px) {
  :root { --shell: 600px; }
  /* 视频仍然一行一个：并排两栏会把下载条挤到只剩图标，反而更难用 */
  .material .vmat video { max-height: min(62vh, 560px); }
  .material .vmat .vbar { padding: 12px 14px; }
  .material .vmat .vdl { padding: 10px 18px; font-size: 13.5px; }
}

/* 鼠标不可用（真手机/平板）时撤掉 hover，避免点完一直留着高亮态 */
@media (hover: none) {
  .material .vmat .vdl:hover { background: var(--brand); }
}
