/* 橙白商务极简设计系统 */
:root {
  --brand: #FF6A00;
  --brand-soft: #FFF7F0;
  --brand-line: #FFD9B3;
  --brand-press: #E55F00;
  --surface: #FFFFFF;
  --surface-2: #F7F7F7;
  --bg: rgb(251, 249, 245);
  --ink: #1C1B19;
  --ink-2: #4A4A4A;
  --ink-3: #8A8A8A;
  --line: #EEEEEE;
  --line-strong: #DEDEDE;
  --danger: #FF4D4F;
  --ok: #52C41A;
  --warn: #FAAD14;
  --shadow-sm: 0 2px 8px rgba(28, 27, 25, 0.04);
  --shadow-md: 0 4px 16px rgba(28, 27, 25, 0.08);
  --shadow-brand: 0 4px 14px rgba(255, 106, 0, 0.25);
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-pill: 999px;
  --appbar-h: 56px;
  --tabbar-h: 60px;
  --safe-bottom: env(safe-area-inset-bottom, 0);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
/* overflow:hidden（2026-10-01）：整页壳本就是满屏应用（滚动一律交给 .view 与各页自己的容器）。
   显式的 overflow:hidden 让 iOS 微信键盘弹起时 WKWebView 原生层没有可滚空间，
   避免「原生层滚动 → DOM 层不可滚 → 弹回」的反复纠偏（登录按钮闪现）。
   height 也一起绑到 --app-h（理由见 .phone 那段的注释）：键盘弹起后若只有 .phone 收缩，
   html/body 仍是满屏高 ⇒ documentElement.scrollHeight 仍大于可视区 ⇒ 原生层照样能滚。
   回落 100% 即原行为（无 JS / 无 visualViewport 的老 WebView 逐像素不变）。 */
html, body {
  height: 100%;
  height: var(--app-h, 100%);
  margin: 0;
  overflow: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.phone {
  position: relative;
  width: 100%;
  max-width: 420px;
  /* 高度绑到 --app-h（由 app.js 按 visualViewport.height 实时写入）：
     回落 100vh —— 无 JS / 无 visualViewport 的老 WebView 上逐像素退回原行为。
     iOS 上 100vh 是「大视口」高、**键盘弹起时不收缩**，于是键盘占掉半屏后
     整个壳仍按满屏布局，卡片（居中）与登录按钮被压到键盘之下（实测按钮 bottom 溢出 20px），
     而 DOM 又无可滚空间 ⇒ iOS 反复纠偏滚动 ⇒ 登录按钮在输入框附近闪现。 */
  height: 100vh;
  height: var(--app-h, 100vh);
  max-height: 812px;
  margin: 0 auto;
  background: var(--bg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
}

.appbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--appbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 12px;
  z-index: 30;
}
.appbar .back, .appbar .action, .appbar .spacer {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--ink);
  cursor: pointer;
}
.appbar .back svg, .appbar .action svg { width: 20px; height: 20px; }
.appbar .title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  max-width: calc(100% - 96px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tabbar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--tabbar-h) + var(--safe-bottom));
  min-height: var(--tabbar-h);
  background: var(--surface);
  border-top: 1px solid var(--line);
  display: flex;
  z-index: 30;
  padding-bottom: var(--safe-bottom);
  box-sizing: border-box;
}
.tab {
  flex: 1;
  height: var(--tabbar-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  font-size: 11px;
  cursor: pointer;
  transition: color 0.2s;
}
.tab svg { width: 22px; height: 22px; margin-bottom: 2px; }
.tab.active { color: var(--brand); }
/* 游客模式：隐藏工作台/我的 tab（内联兜底样式用 !important，这里需同权重覆盖） */
#tabbar.tabbar .tab.guest-hide { display: none !important; }

.view {
  position: absolute;
  top: var(--appbar-h);
  bottom: calc(var(--tabbar-h) + var(--safe-bottom));
  left: 0;
  right: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 16px 20px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.view::-webkit-scrollbar { display: none; }
.view.no-tab {
  bottom: 0;
  /* 无 TabBar 的二级页：底部留出安全区，保证最后一个元素完整可见、可滚动到最底 */
  padding-bottom: calc(28px + var(--safe-bottom));
}

/* 排版 */
.tiny { font-size: 12px; color: var(--ink-3); }
.label { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.strong { font-size: 15px; font-weight: 700; color: var(--ink); }

.row { display: flex; align-items: center; }
.row.between { justify-content: space-between; }

/* 团队概览 2×2（v1.174，我的团队页顶部）：团队总人数/团队总商户/直推服务商/直推商户数。
   等宽两列用 grid —— 不用 flex：flex-basis 作用于内盒、padding 先被扣掉，外框比例会被稀释（REDLINES 16′）。 */
.team-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 8px; }
.ts-cell { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.ts-k { font-size: 12px; color: var(--ink-3); line-height: 1.2; }
.ts-v { font-size: 17px; font-weight: 700; color: var(--brand); line-height: 1.2; }

.section-gap { margin-top: 18px; }
.h2 { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; color: var(--ink); margin-bottom: 12px; }
.h2 .ln { width: 4px; height: 16px; background: var(--brand); border-radius: 2px; }

/* 卡片与列表 */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.list { display: flex; flex-direction: column; gap: 10px; }

.tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: transform 0.15s var(--ease), box-shadow 0.2s, border-color 0.2s;
}
.tile:active { transform: scale(0.99); border-color: var(--brand-line); box-shadow: var(--shadow-md); }
.tile .meta { flex: 1; min-width: 0; }
/* 服务商卡片（v1.173）：第一行「名称」、第二行「级别」，右侧「商户:N 服务商:N」+ 箭头。
   右侧计数块变宽 ⇒ 名称必须能截断，否则窄屏上会把计数挤出卡片、撑出横向滚动。 */
.tile .name { font-size: 15px; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .sub { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.tile .chev { color: var(--ink-3); display: grid; place-items: center; }
/* 右侧计数块（v1.173）：标签用次要色、数字用品牌色；两项不换行也不收缩（宽度不够时由名称让位）。
   取值与「服务商详情页」完全一致 —— 商户 ↔ 直推商户数，服务商 ↔ 直推服务商数。 */
.tile .cnt { display: flex; gap: 10px; white-space: nowrap; font-size: 12px; color: var(--ink-2); }
.tile .cnt .n { color: var(--brand); font-weight: 700; margin-left: 2px; }

.empty { text-align: center; padding: 40px 20px; color: var(--ink-3); }
.empty .ic { font-size: 36px; margin-bottom: 8px; }

/* 金额、头像、标签 */
.amount { color: var(--brand); font-weight: 800; }
.amount .cur { font-size: 0.75em; margin-right: 2px; }

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
  overflow: hidden; /* HTv1.102：容器内可能是系统头像库的图片，需裁掉圆角外的部分 */
}
/* 系统头像库图片（我的团队 / 直推奖励明细卡片）：铺满容器并居中裁切 */
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.sm { width: 36px; height: 36px; border-radius: 10px; font-size: 14px; }

.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 500;
}
.tag.brand { background: var(--brand-soft); color: var(--brand); }
.tag.ok { background: #E6F7E6; color: var(--ok); }
.tag.warn { background: #FFF7E6; color: var(--warn); }

/* 按钮 */
.btn {
  appearance: none;
  background: var(--brand);
  color: #fff;
  border: none;
  padding: 12px 16px;
  border-radius: var(--r-md);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.2s, transform 0.15s var(--ease);
}
.btn:active { transform: scale(0.985); background: var(--brand-press); }
.btn.ghost { background: #fff; color: var(--brand); border: 1px solid var(--brand-line); }
.btn:disabled, .btn.disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
}
.btn.soft { background: var(--brand-soft); color: var(--brand); }
.btn.sm { padding: 8px 12px; font-size: 13px; }

/* 搜索 */
.search {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-sm);
}
.search input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  color: var(--ink);
}
.search input::placeholder { color: var(--ink-3); }
.search svg { width: 18px; height: 18px; color: var(--brand); flex-shrink: 0; }

/* Banner */
.banner {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-md);
  background: var(--brand);
}
.banner .track { display: flex; transition: transform 0.3s var(--ease); }
.banner .slide {
  min-width: 100%;
  padding: 18px 16px;
  color: #fff;
}
/* 图片型 banner（后台 banner 管理下发）：铺满轮播容器 */
.banner .slide.img-slide { padding: 0; }
.banner .slide.img-slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.banner .badge {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--r-pill);
  font-size: 11px;
  margin-bottom: 8px;
}
.banner .t { font-size: 18px; font-weight: 800; }
.banner .d { font-size: 12px; opacity: 0.9; margin-top: 4px; }
.banner .dots {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
}
.banner .dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.5); }
.banner .dots i.on { background: #fff; }

/* 首页公告条（后台「运营活动-首页公告」下发；无生效公告时整块不渲染） */
.notice-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 9px 12px;
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  border-radius: var(--r-md);
}
.notice-bar .nb-ic { display: flex; color: var(--brand); flex-shrink: 0; }
.notice-bar .nb-txt {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
}
/* 滚动时的两段文案间隔（可调：5em = 5 个汉字宽，13px 字号下 65px） */
.nb-track { display: inline-flex; white-space: nowrap; --nb-gap: 5em; }
/* 两份副本：默认只显示第一份——不然文案短到不溢出（不滚动）时，
   第二份会平白露出来，页面上显示成重复的两段文案。
   只有内容溢出、JS 加上 .rolling 之后才补出第二份（marquee 需要两份首尾相接）。 */
.nb-track > span { display: none; }
.nb-track > span:not([aria-hidden="true"]) { display: block; }
/* 间隔做成「每份文案自带的尾部空白」而不是 track 的 gap：
   两份于是等宽，translateX(-50%) 仍正好等于一份（含间隔），循环接缝不会错位；
   间隔落在两份文案之间，即两段消息之间的空白。 */
.nb-track.rolling > span { display: block; padding-right: var(--nb-gap); }
.nb-track.rolling { animation: nb-marquee 18s linear infinite; }
@keyframes nb-marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* 数据总览 */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.stat .k { font-size: 12px; color: var(--ink-2); display: flex; align-items: center; }
.stat .v { margin-top: 8px; }
.stat .s { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}

/* 快捷入口 */
.entry-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.entry-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s var(--ease), border-color 0.2s, box-shadow 0.2s;
}
.entry-card:active { transform: scale(0.985); border-color: var(--brand-line); box-shadow: var(--shadow-md); }
.entry-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: #FFF7F0; color: var(--brand); }
.entry-ic svg { width: 20px; height: 20px; }
.entry-num { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; margin-top: 12px; color: var(--ink); }
.entry-label { font-size: 14px; font-weight: 700; margin-top: 4px; color: var(--ink); }
.entry-foot { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--ink-3); margin-top: 10px; }
.entry-foot svg { width: 14px; height: 14px; color: var(--ink-3); }

/* 筛选 chips */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.chip.active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* 表单 */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.field label .req { color: var(--danger); margin-left: 2px; }
.hint-inline { font-size: 12px; color: var(--ink-3); font-weight: 400; margin-left: 6px; }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: 14px;
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  outline: none;
}
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--brand-line); }
.field textarea { min-height: 90px; resize: vertical; }
/* 只读字段（个人信息维护的名称/联系人/联系手机、下单页推荐人等）：弱化底色但保持文字可读可复制 */
.field input[readonly] {
  background: var(--surface-2);
  color: var(--ink-2);
  cursor: default;
}
.field input[readonly]:focus { border-color: var(--line); }
.field .hint { font-size: 12px; color: var(--ink-3); margin-top: 6px; }
/* 按钮下方的置灰小字说明（发展新商户页：草稿不保存图片） */
.draft-note { font-size: 12px; line-height: 1.5; color: var(--ink-3); text-align: center; }
/* 输入框内嵌单位后缀（如 团购/外卖订单基点 的 %） */
.input-suffix { position: relative; }
.input-suffix input { padding-right: 38px; }
.input-suffix .suffix { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 14px; color: var(--ink-3); pointer-events: none; }
.field .err { font-size: 12px; color: var(--danger); margin-top: 6px; }

.select-wrap { position: relative; width: 100%; }
.select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 100%;
  height: 44px;
  padding: 0 36px 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.select:focus { border-color: var(--brand-line); box-shadow: 0 0 0 3px var(--brand-soft); }
.select:disabled { opacity: 0.6; background: var(--surface-2); cursor: not-allowed; }
.select-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--ink-3);
  pointer-events: none;
}

/* 图片上传 */
.uploader { display: inline-block; vertical-align: top; }
.upload-btn {
  width: 84px;
  height: 84px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--ink-3);
  cursor: pointer;
  background: var(--surface);
  transition: border-color 0.2s var(--ease), background 0.15s;
}
.upload-btn svg { width: 24px; height: 24px; color: var(--brand); }
.upload-btn span { font-size: 12px; }
.upload-btn:active { border-color: var(--brand); background: var(--brand-soft); }
.upload-preview {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--surface-2);
}
.upload-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.upload-del {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  background: rgba(28, 27, 25, 0.65);
  color: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}
.upload-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* 悬浮按钮 */
.fab-wrap { position: sticky; bottom: 14px; display: flex; justify-content: flex-end; pointer-events: none; z-index: 25; margin-top: 14px; }
.fab {
  pointer-events: auto;
  background: var(--brand);
  color: #fff;
  border: none;
  font-family: inherit;
  font-weight: 700;
  padding: 12px 18px;
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-brand);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  transition: transform 0.15s var(--ease), background 0.2s, opacity 0.2s;
}
.fab:active { transform: scale(0.975); background: var(--brand-press); }

/* 邀请弹层 */
.invite { text-align: center; }
.invite-poster { width: 100%; border-radius: 14px; display: block; box-shadow: var(--shadow-md); }
.invite-code { margin-top: 14px; }
.invite-code .code { font-size: 22px; font-weight: 800; letter-spacing: 0.04em; margin-top: 4px; }

/* 底部弹层 */
.sheet-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 50;
  display: none;
}
/* open 态显示（ui.openSheet 依赖；此前缺失该规则导致所有底部弹层无法显示） */
.sheet-mask.open {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
}
.sheet {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 420px; /* 与 .phone 容器同宽，桌面宽屏下不超出手机框 */
  margin: 0 auto;
  background: #fff;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  max-height: 80%;
  overflow-y: auto;
}
.sheet.tall { max-height: 94%; }
.sheet .grab { width: 40px; height: 4px; background: var(--line); border-radius: 2px; margin: 10px auto; }
/* 弹层头部：标题 + 右侧动作入口（ui.openSheet 第 4 参 opts.action，如「选择头像」弹层的「从相册选择」）。
   16px 内边距挪到 .sheet-head 上、.sheet-title 归零 —— 不带动作用时与原版逐像素一致。 */
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 16px; }
.sheet-title { flex: 1 1 auto; min-width: 0; padding: 0; font-weight: 800; }
.sheet-action {
  display: none; /* 默认不占位；⚠️ 用类切换而非 [hidden]（后者会被本类特异性压过，见技能 §3.33） */
  flex: none;
  align-items: center;
  padding: 4px 0 4px 8px;
  border: 0;
  background: none;
  color: var(--brand);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.sheet-action.is-on { display: inline-flex; }
.sheet-action:disabled { opacity: 0.55; cursor: default; }
.sheet-body { padding: 0 16px 20px; }

/* 居中提示弹窗（小型对话框，屏幕中间展示，z-index 高于底部弹层与 toast） */
.center-alert-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}
.center-alert-mask.open { opacity: 1; }
.center-alert {
  width: 72%;
  max-width: 280px;
  background: #fff;
  border-radius: 14px;
  padding: 22px 18px 16px;
  text-align: center;
  transform: scale(0.92);
  transition: transform 0.2s;
}
.center-alert-mask.open .center-alert { transform: scale(1); }
.center-alert-title { font-weight: 800; font-size: 16px; color: var(--ink); }
.center-alert-body { margin: 12px 0 18px; }
.center-alert-ok { width: 100%; border-radius: 22px; }
.center-alert-actions { display: flex; gap: 10px; }
.center-alert-actions .center-alert-ok { width: auto; }
/* 「微信号在哪看？」示例图（2026-09-28，居中弹窗 openWechatSample 的内容）。
   两处页面共用（邀请注册页 / 入驻下单页），故放**全局**样式表而不是邀请页的作用域样式。
   示例图是手机长截图（1179×2556，宽高比 ≈0.46）—— 只按宽度缩放会把弹窗撑出屏幕，
   必须同时用 max-height 限高（宽高比不变，靠 max-width:100% 兜窄屏）。 */
.wx-sample-img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 52vh;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}
/* 居中 loading（提交等耗时动作）：复用 .center-alert 卡片，只是没有按钮 */
.center-loading { padding: 26px 18px 24px; }
.center-loading-spin {
  width: 28px;
  height: 28px;
  margin: 0 auto 12px;
  border: 2.5px solid var(--brand-line);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: center-loading-rotate 0.8s linear infinite;
}
@keyframes center-loading-rotate { to { transform: rotate(360deg); } }
.center-loading-text { font-size: 14px; font-weight: 600; color: var(--ink-2); }

/* Toast */
.toast-wrap {
  position: fixed;
  top: calc(var(--appbar-h) + 8px);
  left: 0;
  right: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}
.toast {
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  margin-top: 8px;
  font-size: 13px;
  text-align: center;
  max-width: 80%;
}

/* 加载更多 */
.load-more { text-align: center; padding: 14px 0; font-size: 13px; color: var(--ink-3); }

/* 进度条 */
.bar { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--brand); border-radius: 3px; }

/* 列表项 li（用于卡片内明细） */
.li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.li:last-child { border-bottom: none; }
.li .meta { flex: 1; min-width: 0; }
.li .t { font-size: 14px; font-weight: 700; color: var(--ink); }
.li .s { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.li .amt { text-align: right; flex-shrink: 0; }
/* 收益明细金额正负着色（含符号）：+红 / -绿 */
.li .amt.pos { color: #E02020; }
.li .amt.neg { color: #0A9E4A; }
/* amount() 内层 <span class="amount"> 自带品牌橙色，会盖过父级继承色，需强制回随父级 */
.li .amt.pos .amount,
.li .amt.neg .amount { color: inherit; }
/* 退款行金额（明细副行，2026-10-09 需求）：与「-」金额同为绿色，一眼识别这是一笔退款。
   .refund 包住「退款 ¥x」整段；内层 .amount 品牌橙同样要回随父级。 */
.li .s .refund { color: #0A9E4A; }
.li .s .refund .amount { color: inherit; }
.li .tag { flex-shrink: 0; }
/* 收益明细卡片：奖励状态显示在**金额下方**（2026-10-13 需求，三个收益明细页统一）。
   ⚠️ 位置是用户拍板的：金额是卡片视觉焦点，状态贴着金额才醒目；放回副行（.s，12px 灰字）
      会被订单号/时间淹没 —— 那正是本次要修的问题，改回去等于回退需求。
   ⚠️ .amt 是 flex-shrink:0、宽度由**金额**决定：标签「待奖励 / 已完成」3 字 ≈52px，窄于金额，
      故不会把 meta 挤窄。**改标签文案时必须重新量** —— 一旦宽过金额，右侧列变宽会连带副行折行。 */
.li .amt .st { margin-top: 5px; }
/* 收益明细卡片：奖励明细**创建时间**另起一行（2026-10-13 需求，用户拍板：范围＝仅直推服务
   奖励明细页、位置＝卡片新起一行）。
   ⚠️ 为什么另起一行而不是接在副行（.s）后面：副行已有订单号，再接 19 字符时间戳在 375 窄屏
      必然折行，且会把「订单号」和「时间」挤成视觉上的一坨。
   🔴 margin-top 必须与 .li .s 同值（2px）—— 用户二轮反馈：初版写 5px 时，创建时间与上方订单号
      之间空隙明显大于另两个分佣明细页卡片内的行距，看着像「两段不相干的信息」。三页卡片里小字
      之间的行距要**同一套**：名称→副行 = 副行→创建时间 = 2px。
   ⚠️ 与 .s 同字号/同色但用**独立类名**：创建时间与副行是两个语义层（将来可能只给其中一行加
      图标/换色）。代价是**间距不再自动联动** ⇒ 调 .s 的 margin-top 时，这里要一起改。
   ⚠️ 只有直推页渲染这一行；团购/外卖、流水页的副行时间仍走 .s（见 app.js rowOf 注释）。 */
.li .tm { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

/* Hero 卡片 */
.hero {
  background: linear-gradient(135deg, var(--brand), #1C1B19);
  color: #fff;
  padding: 20px 16px;
  border-radius: var(--r-md);
  position: relative;
  overflow: hidden;
}
.hero .hi { font-size: 13px; opacity: 0.85; }
.hero .nm { font-size: 24px; font-weight: 800; margin-top: 4px; }
.hero .lv { margin-top: 8px; }
.hero .pill {
  display: inline-flex;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--r-pill);
  font-size: 12px;
}
.hero .share {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  font-size: 12px;
  cursor: pointer;
}

/* 余额卡片（SVG 背景风格） */
.balance-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface) url('/assets/images/bg-balance-card.svg?v=42') center/cover no-repeat;
  border: none;
  border-radius: var(--r-md);
  padding: 20px 16px;
}
.balance-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  flex: 1;
}
.balance-card .hi { font-size: 13px; color: var(--ink-2); }
.balance-card .nm { font-size: 28px; font-weight: 800; color: var(--brand); }
.balance-card .lv { margin-top: 2px; }
.balance-card .pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: var(--surface-2);
  border-radius: var(--r-pill);
  font-size: 12px;
  color: var(--ink-2);
}
.withdraw-btn {
  flex-shrink: 0;
  background: var(--brand);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  line-height: 1.4;
}

/* 资质照片 */
.img-stack { margin-top: 10px; }
.img-group { margin-bottom: 14px; }
.img-group .tiny { font-size: 12px; color: var(--ink-3); margin-bottom: 6px; }
.img-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.img-row::-webkit-scrollbar { display: none; }
.thumb {
  width: 84px;
  height: 84px;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--surface-2);
  flex-shrink: 0;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* FAQ */
.faq-ic { transition: transform 0.2s; }
.faq-a { font-size: 13.5px; line-height: 1.7; color: var(--ink-2); }

/* 骨架屏 */
.sk {
  background: linear-gradient(90deg, var(--surface-2) 25%, #EBEBEB 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  border-radius: var(--r-sm);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* 产品卡片 */
.product-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.product-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.15s var(--ease), box-shadow 0.2s, border-color 0.2s;
}
.product-card:active { transform: scale(0.99); border-color: var(--brand-line); box-shadow: var(--shadow-md); }
.product-thumb { width: 100%; aspect-ratio: 16 / 9; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-thumb .pt-level { font-size: 28px; font-weight: 800; color: #fff; letter-spacing: 2px; text-shadow: 0 1px 2px rgba(0,0,0,0.18); }
.product-body { padding: 14px 16px; }
.product-name { font-size: 16px; font-weight: 800; color: var(--ink); }
.product-intro { font-size: 13px; font-weight: 600; color: var(--brand); margin-top: 6px; }
.product-desc { font-size: 12px; color: var(--ink-3); margin-top: 8px; line-height: 1.55; }
.product-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.product-price .amount { font-size: 22px; }
/* 已入驻数量标签 */
.tag.join { background: var(--brand-soft); color: var(--brand); white-space: nowrap; }
/* 详情页封面 */
.product-hero-cover { width: 100%; aspect-ratio: 16 / 9; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; border-radius: var(--r-md); }
.product-hero-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-hero-cover .pt-level { font-size: 34px; font-weight: 800; color: #fff; letter-spacing: 3px; text-shadow: 0 1px 2px rgba(0,0,0,0.18); }
/* 详情页详情图画廊 */
.product-detail-gallery { display: grid; grid-template-columns: 1fr; gap: 10px; }
.product-detail-gallery img { width: 100%; display: block; border-radius: var(--r-sm); border: 1px solid var(--line); }
/* 产品详情页底部悬浮操作栏：分享 / 我要入驻
   用 sticky 而非 fixed：fixed 相对视口定位，桌面宽屏下会铺满窗口超出 .phone 容器；
   sticky 在 .view 滚动容器内贴底，自动继承 .phone 限宽（420px）与垂直边界 */
.view.no-tab.has-actionbar { padding-bottom: 0; }
.pd-actionbar {
  position: -webkit-sticky;
  position: sticky;
  bottom: 0;
  z-index: 30;
  display: flex;
  gap: 10px;
  /* 负 margin 抵消 .view 的 16px 左右内边距，实现通栏 */
  margin: 0 -16px;
  padding: 12px 16px calc(12px + var(--safe-bottom));
  background: var(--surface);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 18px rgba(28, 27, 25, 0.06);
}
.pd-actionbar .btn { flex: 1; }
.pd-actionbar .btn.ghost { flex: 0 0 30%; } /* 分享按钮固定窄占比，主按钮（我要入驻/提交）占剩余宽度 */
.pd-actionbar .btn .amount { color: #fff; } /* 提交按钮上的价格保持白色 */
/* 确认下单页按钮宽度（2026-09-21 v1.144 用户定调）：**与上方表单卡片左右对齐**。
   底栏是 full-bleed（margin 0 -16px）＋左右 16px 内边距 ⇒ 其内容区边缘 == .card 边缘
   （两者都等于 .view 的 16px 内边距）⇒ 直接沿用默认的 `.pd-actionbar .btn{flex:1}` 即得所需宽度，
   无需任何修饰类。
   ⚠️ 沿革：v1.139/v1.140 曾给本页底栏加一个「收窄居中」的专属修饰类（min-width:200px + 左右 padding 40px）；
      375 视口实测按钮 75.2–299.8（宽 224.6）而卡片 16–359（宽 343）⇒ 视觉上悬浮脱节，故撤销。
      产品详情页那套「分享 + 我要入驻」双按钮仍是通栏（`.btn.ghost` 占 30%），未受影响。 */
/* 确认下单页专属（2026-09-21）：底栏贴**屏幕底部**。
   ⚠️ 光靠 .pd-actionbar 的 sticky bottom:0 不够：内容不满一屏（如二次复购页只有一张卡片）时
   sticky 不触发，底栏会停在内容末尾、浮在页面中部。.view 本身是 position:absolute 撑满的
   滚动容器，改成 flex 列 + 底栏 margin-top:auto 即可把它压到最底；
   内容超一屏时 auto 边距归 0，底栏回到内容末尾，页面照常滚动。 */
.view.apply-bottom { display: flex; flex-direction: column; }
.view.apply-bottom .pd-actionbar { margin-top: auto; }
/* 确认下单页底栏加「支付方式建议」行（2026-09-24 用户定调）：提示在上、主按钮在下。
   ⚠️ 必须走 .col 修饰类：.pd-actionbar 的横向布局被产品详情页「分享 + 我要入驻」、
      订单详情页等**多处共用**，改基类会一起改坏。
   ⚠️ 顺带重置按钮的 flex：基类 .pd-actionbar .btn{flex:1} 在纵向 flex 下会让按钮**纵向拉伸**
      占满底栏剩余高度（变成一根高柱），故这里改回不伸缩 + 满宽。 */
.pd-actionbar.col { flex-direction: column; gap: 8px; }
.pd-actionbar.col .btn { flex: 0 0 auto; width: 100%; }
/* 支付方式建议提示：与全站 .tiny 同字号同灰度（12px / --ink-3），居中与按钮对齐 */
.pd-pay-hint {
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.5;
  text-align: center;
}

/* 产品邀请页：纯色邀请图（占位）+ 二维码 */
.pdp-invite-poster {
  border-radius: var(--r-md);
  background: linear-gradient(160deg, #FF8A3D 0%, var(--brand) 42%, #E04E00 100%);
  padding: 26px 20px 20px;
  color: #fff;
  box-shadow: var(--shadow-md);
}
.pdp-invite-head { text-align: center; }
.pdp-invite-brand { font-size: 12px; letter-spacing: 4px; opacity: 0.85; }
.pdp-invite-name { font-size: 22px; font-weight: 800; margin-top: 10px; letter-spacing: 1px; }
.pdp-invite-price { font-size: 30px; font-weight: 800; margin-top: 6px; }
.pdp-invite-price .amount { color: #fff; } /* .amount 默认品牌橙，在橙色海报上需强制白 */
.pdp-invite-price span { font-size: 12px; font-weight: 500; opacity: 0.8; margin-left: 4px; }
.pdp-invite-qr {
  width: 200px;
  margin: 18px auto 0;
  background: #fff;
  border-radius: var(--r-sm);
  padding: 12px 12px 10px;
  text-align: center;
}
.pdp-invite-qr svg { width: 100%; height: auto; display: block; }
.pdp-invite-qr-tip { font-size: 11px; color: var(--ink-3); margin-top: 8px; }
.pdp-invite-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
}
.pdp-invite-code { font-size: 11px; color: rgba(255,255,255,0.92); }
.product-detail-label { font-size: 13px; font-weight: 700; color: var(--ink); margin-top: 12px; }
.product-detail-label:first-child { margin-top: 0; }
.product-detail-text { font-size: 13px; color: var(--ink-2); margin-top: 4px; line-height: 1.55; }

/* 我的页面 */
.me-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}
.me-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  cursor: pointer;
}
.me-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #1C1B19;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}
.me-info { flex: 1; min-width: 0; }
.me-name { font-size: 17px; font-weight: 800; color: var(--ink); }
.me-level {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 500;
}
.me-invite {
  appearance: none;
  background: #fff;
  color: var(--brand);
  border: 1px solid var(--brand-line);
  border-radius: var(--r-pill);
  padding: 7px 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.15s var(--ease);
}
.me-invite svg { width: 14px; height: 14px; }
.me-invite:active { transform: scale(0.97); background: var(--brand-soft); }

.me-entries {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 18px 4px;
  gap: 4px;
}
.me-entry {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 6px 0;
  transition: transform 0.15s var(--ease);
}
.me-entry:active { transform: scale(0.96); }
.me-entry-ic {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--ink);
}
.me-entry-ic svg { width: 24px; height: 24px; }
.me-entry-label { font-size: 13px; font-weight: 600; color: var(--ink); }

.me-menu-item { transition: background 0.15s; border-radius: var(--r-sm); }
.me-menu-item:active { background: var(--surface-2); }

.invite-page { padding: 12px 16px 20px; }
.invite-poster-wrap {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: var(--surface);
}
.invite-poster {
  display: block;
  width: 100%;
  height: auto;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: default;
}
.invite-watermark {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 16px 18px;
  background: linear-gradient(to top, rgba(0,0,0,0.55), transparent);
  color: #fff;
  text-align: center;
}
.invite-code-label { font-size: 12px; opacity: 0.9; }
.invite-code { font-size: 22px; font-weight: 800; letter-spacing: 1px; margin-top: 4px; }
.invite-actions { margin-top: 16px; display: flex; gap: 10px; }
.invite-actions .btn { flex: 1; }
.poster-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 13px;
  color: var(--ink-3);
  background: var(--surface-2);
  z-index: 1;
}

/* ============ 登录页（服务商账号 / 游客模式） ============ */
.login-mode .appbar,
.login-mode .tabbar { display: none !important; }
.login-mode .view { top: 0 !important; bottom: 0 !important; padding: 0 !important; }

.login-page {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  /* 垂直居中改为靠子项 margin:auto（见 .login-card），不再用容器的对齐属性：
     flex 容器一旦可滚动，「对齐到中间」会把溢出部分裁在顶部且滚不上去；
     margin:auto 在空间不足时自动归 0、滚动恢复正常。
     空间充足时两者结果逐像素一致（本地 375x812 实测卡片 top 同为 234）。
     overflow-y:auto + 上下 20px 内边距：键盘把可视区压得很矮时仍能滚到卡片与按钮。 */
  overflow-y: auto;
  padding: 20px 0;
}
.login-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 106, 0, 0.20), rgba(255, 251, 245, 0.62));
}
.login-card {
  position: relative;
  z-index: 2;
  margin: auto;
  width: 84%;
  max-width: 340px;
  background: #fff;
  border-radius: var(--r-lg);
  padding: 28px 22px 22px;
  box-shadow: var(--shadow-md);
  text-align: center;
}
.login-logo {
  width: 56px; height: 56px;
  margin: 0 auto;
  border-radius: 16px;
  background: var(--brand);
  color: #fff;
  font-size: 26px; font-weight: 700;
  display: grid; place-items: center;
  box-shadow: var(--shadow-brand);
}
.login-title { margin-top: 14px; font-size: 20px; font-weight: 700; color: var(--ink); }
.login-sub { margin-top: 6px; font-size: 12px; color: var(--ink-3); }
.login-form { margin-top: 22px; display: flex; flex-direction: column; gap: 12px; }
.login-field {
  display: flex; align-items: center; gap: 10px;
  height: 46px; padding: 0 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.login-field:focus-within { border-color: var(--brand-line); background: #fff; }
.login-ic { color: var(--brand); display: flex; flex-shrink: 0; }
.login-field input {
  flex: 1; border: none; outline: none; background: transparent;
  /* 必须是 16px（原来是 15px）：iOS（含微信 WKWebView）聚焦 font-size < 16px 的输入框时
     会自动放大整个页面来「看清」文字，表现为输入时页面/元素位置乱跳。
     viewport 里的 maximum-scale=1.0 在部分 iOS 版本上挡不住，只能把字号做到 16px。 */
  font-size: 16px; color: var(--ink); height: 100%;
}
.login-err { color: var(--danger); font-size: 12px; min-height: 16px; }
.login-btn {
  height: 46px; border: none; border-radius: 10px;
  background: var(--brand); color: #fff;
  font-size: 16px; font-weight: 600; letter-spacing: 2px;
  cursor: pointer; margin-top: 2px;
}
.login-btn:disabled { opacity: 0.6; cursor: default; }
.login-btn:active { background: var(--brand-press); }
.login-guest {
  margin-top: 14px; border: none; background: transparent;
  color: var(--brand); font-size: 14px; cursor: pointer;
  text-decoration: underline;
}
.login-tip { margin-top: 10px; font-size: 11px; color: var(--ink-3); line-height: 1.5; }

/* ============ 游客模式浮动条 ============ */
.guest-bar {
  position: fixed;
  top: 8px; left: 50%; transform: translateX(-50%);
  z-index: 200;
  display: flex; align-items: center; gap: 8px;
  background: rgba(28, 27, 25, 0.78);
  color: #fff; font-size: 12px;
  padding: 6px 14px; border-radius: 999px;
  box-shadow: var(--shadow-md);
}
.guest-bar-action { color: #FFD9B3; font-weight: 600; cursor: pointer; text-decoration: underline; }

/* 收益明细筛选卡（团购/外卖、流水佣金明细页） */
.earn-filter { padding: 12px 16px 10px; display: grid; gap: 10px; }
.earn-filter .ef-dates { display: flex; align-items: center; gap: 6px; }
.earn-filter .ef-sep { font-size: 12px; color: var(--ink-3); flex: none; }
.earn-filter .ef-date {
  flex: 1; min-width: 0; height: 40px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink);
  font-size: 13px; font-family: inherit; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.earn-filter .ef-date:focus { border-color: var(--brand-line); box-shadow: 0 0 0 3px var(--brand-soft); }
.earn-filter .select { height: 40px; font-size: 13px; }
/* 明细标题行右侧汇总：共X笔，计¥XX.XX（随筛选实时联动） */
.h2 .earn-result { margin-left: auto; font-weight: 600; white-space: nowrap; }
.h2 .earn-result .amount { font-size: 13px; }

/* ===== 系统头像库（2026-09-14）=====
   头像为 512×512 白底 PNG，圆形容器裁切展示；无头像回落「姓名首字 + 品牌色」文字头像 */
.me-avatar { overflow: hidden; }
.me-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }

.avatar-edit { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 20px; }
.avatar-edit-img {
  width: 84px; height: 84px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: #1C1B19; color: #fff; display: grid; place-items: center;
  font-size: 28px; font-weight: 700; box-shadow: 0 4px 14px rgba(28, 27, 25, .12);
}
.avatar-edit-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.avatar-group-title { font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 8px 0 10px; }
.avatar-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 14px; }
.avatar-pick {
  border: 2px solid transparent; background: var(--surface-2); border-radius: 14px;
  padding: 3px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 3px;
  transition: border-color .15s, background .15s;
}
.avatar-pick img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 11px; display: block; }
.avatar-pick span { font-size: 10px; color: var(--ink-3); white-space: nowrap; }
.avatar-pick.on { border-color: var(--brand); background: var(--brand-soft); }
.avatar-pick.on span { color: var(--brand); font-weight: 700; }
.avatar-pick.busy { opacity: .45; pointer-events: none; }

/* ===== 划拨 · 数字许可额度配额包划拨（2026-10-08 需求；2026-10-09 改名：资产 → 划拨 / 额度）=====
   三个页面共用：TabBar「划拨」页 / 配额包详情页 / 确认转让页。
   配色沿用品牌橙 + 暖白；只有「顶部红框提示」用红色（需求原文指定「红框」）。
   ⚠️ 类名/函数名一律沿用 .asset-*（改名只动**展示文案**，不动 CSS/JS 内部标识符与接口路径）。 */

/* ① 顶部红框提示：交易价格线下协商、平台只做过户登记。
   ⚠️ 用独立的 .asset-tip，不复用 .notice-bar —— 后者是品牌橙底的滚动公告条
   （white-space:nowrap + 跑马灯），与本处「整段可换行的静态警示」语义不同。 */
.asset-tip {
  display: flex;
  gap: 9px;
  padding: 12px 13px;
  background: #FFF5F4;
  border: 1px solid #FFC9C4;
  border-radius: var(--r-md);
}
.asset-tip-ic { color: var(--danger); flex-shrink: 0; display: flex; }
.asset-tip-ic svg { width: 18px; height: 18px; }
.asset-tip-txt { flex: 1; min-width: 0; font-size: 12.5px; line-height: 1.7; color: #C0392B; }

/* ② 可转让配额包类型：单个成行（单列满宽），布局口径对齐「产品管理」页的 .product-grid。 */
.asset-pkgs { display: grid; grid-template-columns: 1fr; gap: 12px; }
.asset-pkg {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform .15s var(--ease), border-color .2s;
}
.asset-pkg:active { transform: scale(0.985); border-color: var(--brand-line); }
/* 封面按 16:9 展示 —— 尺寸口径**对齐「产品管理」页的 `.product-thumb`**（同为 1fr 单列满宽 + 16/9）。
   上传封面「平铺铺满」整框：`object-fit: cover` 铺满、不留白、不拉伸变形（与 .product-thumb img 同款）。
   ⚠️ 运营注意：框是 16:9（375 视口下 341×192），**1:1 的 800×800 方图会被上下裁掉约 44%**
   （页头/底部条目会被切掉）⇒ 封面请按 16:9 出图，或参考确认转让页的 1:1 详情图。 */
.asset-pkg-cover { width: 100%; aspect-ratio: 16 / 9; background: var(--surface-2); }
.asset-pkg-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* 名称行 = 左「名称」+ 右「剩余可转让 N 份」：
   ① 截断改由内层 .apn-t 承担（flex 子项必须 min-width:0 才能省略号生效，父级原有的 overflow/nowrap 已挪走）；
   ② 右侧=灰色小字 + 品牌橙数值（拍板「红色」取 --brand #FF6A00，不用 --danger）；
   ③ .apn-r flex:none + nowrap：右侧是原子信息，任何情况下不许被名称挤压折行。 */
.asset-pkg-name {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 14px; font-weight: 700; color: var(--ink); padding: 10px 12px 12px;
}
.asset-pkg-name .apn-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asset-pkg-name .apn-r { flex: none; font-size: 12px; font-weight: 400; color: var(--ink-3); white-space: nowrap; }
.asset-pkg-name .apn-r b { color: var(--brand); font-weight: 700; margin: 0 1px; }

/* ③ 缺省页（无可划拨配额包：A7 或缺配置） */
.asset-empty {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 44px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.asset-empty-ic { color: var(--ink-3); display: flex; opacity: .45; }
.asset-empty-ic svg { width: 46px; height: 46px; }
.asset-empty-txt { font-size: 13px; color: var(--ink-3); }

/* ④ 配额包详情页头图（与 .product-hero-cover 同规格：16:9）
   ⚠️ 头图下方不再有信息卡（2026-10-08 按需求去除），故本块是页面首元素，
   与下方「产品详情」标题的间距由 .h2.section-gap 提供。 */
.asset-pkg-hero {
  width: 100%; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface-2);
}
.asset-pkg-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ⑤ 转入方「查询栏 + 匹配按钮」
   ⚠️ input 必须 flex:1 + min-width:0：否则 input 的默认 size 会把按钮挤出卡片（窄屏上横向溢出）。 */
.asset-match { display: flex; align-items: center; gap: 8px; width: 100%; }
.asset-match input {
  flex: 1; min-width: 0; height: 40px; padding: 0 12px;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  font-size: 14px; background: #fff; color: var(--ink);
  font-family: inherit;
}
.asset-match input:focus { border-color: var(--brand-line); outline: none; }
.asset-match input[readonly] { background: var(--surface-2); color: var(--ink-2); }
.asset-match .btn { flex-shrink: 0; }
/* 匹配结果（带入的转入方信息）：品牌浅底区分「这是系统带出来的，不是你填的」 */
.asset-match-info {
  display: flex; flex-direction: column; gap: 6px;
  padding: 10px 12px;
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  border-radius: var(--r-sm);
}
.asset-match-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.asset-match-row b { margin-left: auto; color: var(--ink); text-align: right; word-break: break-all; }
/* 页面内提示（匹配失败 / 未匹配就提交）：需求指定「页面提示」而不是弹窗 */
.asset-err { font-size: 12px; color: var(--danger); line-height: 1.6; }

/* ⑥ 平台提示（转让信息下方）：标题 + 编号条款。
   序号手写（.n + .t，flex 两列）而非 <ol> —— 项目全局无列表重置，
   浏览器默认 padding-inline-start:40px 会在 12px 内距的卡片里把序号顶出去；
   且 flex 能让换行文字悬挂对齐在文字左沿，不会绕到序号下方。
   🔴 字号由**最长条的实测宽度**反推，不是随手定的（本块文本列宽固定 301.88px，
   375 视口实测「单字推进量 = 字号」）：
     · 12px（最初）：最长条 26 字需 312px > 301.88 ⇒ 甩出 2 字孤字尾行；
     · 11px（2026-10-08）：26 字需 286px、余量 15.9px ⇒ 单行（当时只有 4 条）；
     · 10.5px（2026-10-09，文案调整为 5 条）：新最长条 28 字
       （第 3 条「转让成功后，转入方将自动获得转入的平台权益和服务商级别；」）
       @11px 需 308px、@10.5px 需 294px ⇒ 取 10.5px，余量 7.88px，5 条全部单行、无孤字。
   ⚠️ 维护：改这 5 条文案后必须重算「最长条字数 × 字号 ≤ 301.88」，否则会复现孤字尾行。 */
.asset-platform-tip {
  margin-top: 14px; padding: 12px 13px;
  background: var(--surface-2);
  border-radius: var(--r-md);
  font-size: 10.5px; line-height: 1.8; color: var(--ink-3);
}
.asset-tip-title { color: var(--ink-2); font-weight: 600; }
.asset-tip-item { display: flex; gap: 4px; }
.asset-tip-item .n { flex-shrink: 0; font-variant-numeric: tabular-nums; }
.asset-tip-item .t { flex: 1; min-width: 0; }

/* ⑦ 图片查看器（H5 首次引入：级别标准配额包图 / 配额包封面 / 详情图 点开看大图）
   必须挂在 body 上而不是 #view 内 —— #view 是滚动容器，postion:fixed 在里面会被裁掉。 */
.img-viewer {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0, 0, 0, .92);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  opacity: 0; transition: opacity .2s var(--ease);
  /* 遮罩自身不吃点击 —— 点图片/空白都关：见 openImageViewer 的 mask.onclick */
  cursor: zoom-out;
}
.img-viewer.open { opacity: 1; }
.img-viewer img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; display: block; }

/* ============ 我的消息（v1.23.0 / 2026-10-14 需求） ============
   接收端唯一入口：。#/messages 列表 + #/messages/:id 详情。
   数据源 = admin 公开口转发（h5 不 own 不 load），故本页纯展示样式。 */

/* ① 「我的」页三宫格「我的消息」未读角标（拍板⑥：要角标；0 / 取不到时不渲染）。
   定位锚点 = .me-entry 自身（原来没有 position，这里补；不覆盖原规则只叠加一条）。 */
.me-entries .me-entry { position: relative; }
.me-badge {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(10px);
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  /* 白描边让角标压在图标上时仍可辨（图标是线性 SVG，留白很薄） */
  box-shadow: 0 0 0 2px var(--surface);
  pointer-events: none; /* 角标只是装饰，点击要落到 .me-entry 上 */
}

/* ② 消息列表 */
.msg-list { gap: 10px; }
.msg-item {
  padding: 14px;
  cursor: pointer;
  transition: transform 0.15s var(--ease), box-shadow 0.2s, border-color 0.2s;
}
.msg-item:active { transform: scale(0.99); border-color: var(--brand-line); box-shadow: var(--shadow-md); }
/* 未读高亮（拍板⑤：进列表未读高亮，点进详情才置已读） */
.msg-item.unread {
  background: var(--brand-soft);
  border-color: var(--brand-line);
}
.msg-item.unread .msg-title { font-weight: 800; }
/* 未读圆点：放在标题前，与标题同排（列表里最先看到的信号） */
.msg-item.unread .msg-title::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--danger);
  margin-right: 6px;
  vertical-align: middle;
}

.msg-top { display: flex; align-items: baseline; gap: 8px; }
.msg-title {
  flex: 1;
  min-width: 0; /* 必须：否则 nowrap + ellipsis 不生效，长标题会把时间挤出去 */
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.msg-time {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums; /* 等宽数字，多行时间右对齐不抖 */
}
.msg-brief {
  margin-top: 6px;
  font-size: 13px;
  color: var(--ink-2);
  /* 正文摘要最多两行，超出省略（不做 -webkit-line-clamp 的浏览器回落就自然多行，可接受） */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.msg-foot { margin-top: 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* 注：原 `.msg-node`（节点灰字标签）样式已随「消息节点」字段从 H5 删除（2026-10-14），
   列表与详情两处都不再渲染该节点 ⇒ 该类名全仓零引用，一并清理，避免留下孤立死样式。 */

/* ③ 消息详情 */
.msg-detail { padding: 18px 16px; }
.msg-detail-title { font-size: 17px; font-weight: 800; color: var(--ink); line-height: 1.4; }
.msg-detail-meta {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 12px;
  color: var(--ink-3);
}
.msg-detail-body {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-2);
  /* 模板正文可能含换行（内容模板由后台维护）⇒ 保留换行；长串（单号等）必须能断 */
  white-space: pre-wrap;
  word-break: break-word;
}
.msg-detail-ref { margin-top: 12px; font-size: 12px; color: var(--ink-3); }
