/* ============================================================
 * 善立方 · 独立页样式
 * 视觉语言：暖色公益调，米白底 + 轻投影卡片
 * 与 baozang.css 保持亲缘关系，但更「商城」一些
 * ============================================================ */

/* ============================================================
 * ⚠️ 必须保留：解除公共样式表的全局滚动锁定
 *
 * styles.css 第 24 行写了 `html,body{height:100%;overflow:hidden}`——
 * 那是给主应用（#app 是 100vh 的 flex 布局，内部各区自己滚）用的。
 * 善立方是独立长页面，直接引用这份样式表就会连滚动一起继承过来：
 * 页面高度 3166px、内容确实渲染了，但 html 的 overflow 是 hidden，
 * 用户手指怎么滑都纹丝不动，只能看到第一屏。
 *
 * 这条必须写在文件靠前的位置，并且用 html body 提高特异性，
 * 才能压住 styles.css 里的 `html,body{overflow:hidden}`。
 * ============================================================ */
html.cm-page,
body.cm-page {
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  /* iOS Safari 惯性滚动；老写法保留兼容 */
  -webkit-overflow-scrolling: touch;
  /* ⚠️ 必须是 block，不能是 flex。
     flex 容器里的子元素 position:sticky 会失效——吸顶的 header 和
     一/二级导航会跟着页面一起滚走，滚到哪儿上面都是一片空白。
     原设计用 flex 是为了让 footer 贴底，但页面本来就够长，
     贴底需求不存在，改成 block 更安全。 */
  display: block;
}

.cm-page {
  --cm-red: #E8453C;
  --cm-orange: #FF8A3D;
  --cm-green: #2BA471;
  --cm-blue: #3B82F6;
  --cm-gold: #D97706;
  --cm-bg: #FDFBF7;
  --cm-card: #FFFFFF;
  --cm-text: #1F2328;
  --cm-text-2: #6B7280;
  --cm-text-3: #9CA3AF;
  --cm-line: #F0EBE3;
  --cm-shadow: 0 2px 12px rgba(0, 0, 0, .05);
  --cm-shadow-hover: 0 6px 22px rgba(0, 0, 0, .09);
  --cm-radius: 14px;

  margin: 0;
  background: var(--cm-bg);
  color: var(--cm-text);
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  /* 不用 flex，理由同上方 html/body 注释（会让 sticky 失效） */
  display: block;
}

.cm-page * { box-sizing: border-box; }

/* ==================== 顶部 ==================== */
/* 用 fixed 而不是 sticky：
   sticky 要求祖先链上没有「会裁切/不滚动」的容器，而这个页面是
   styles.css 的全局规则（html,body overflow:hidden、body 是 flex）
   一路继承下来的，祖先条件很难控制——实测 sticky 在这里完全不吸顶，
   header 会跟页面一起滚走。fixed 脱离文档流，直接相对视口定位，
   不受祖先影响，最稳。
   撑开的那段高度由 .cm-main 的 padding-top 补回来（见下方）。 */
.cm-head {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--cm-line);
}
.cm-head-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cm-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.cm-brand-mark {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, #FFF2E6, #FFE0CC);
  display: grid; place-items: center;
  font-size: 20px;
  flex-shrink: 0;
}
.cm-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.cm-brand-text strong { font-size: 15px; letter-spacing: .5px; }
.cm-brand-en { font-size: 10.5px; color: var(--cm-text-3); letter-spacing: 1.6px; }
.cm-brand-split { width: 1px; height: 26px; background: var(--cm-line); margin: 0 4px; }
/* 品牌区：左侧「邻聚 + LINJU」两行，右侧「善立方」一行。
   右侧只剩一个词，用 justify-content:center 让它垂直居中——
   否则会和左边两行错位，看着像掉下来了。 */
.cm-brand-mod { display: flex; flex-direction: column; justify-content: center; line-height: 1.2; }
.cm-brand-mod strong { font-size: 15px; color: var(--cm-red); }
.cm-brand-mod small { font-size: 10px; color: var(--cm-text-3); }

.cm-user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.cm-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #FFE0CC;
  color: var(--cm-orange);
  display: grid; place-items: center;
  font-size: 14px; font-weight: 600;
  flex-shrink: 0;
}
.cm-user-info { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.cm-nick { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; }
.cm-sub { font-size: 10px; color: var(--cm-text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.cm-comm { display: flex; flex-direction: column; gap: 2px; }
.cm-comm-label { font-size: 10.5px; color: var(--cm-text-3); }
.cm-comm-select {
  height: 30px;
  border: 1px solid var(--cm-line);
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
  padding: 0 8px;
  color: var(--cm-text);
  max-width: 140px;
}

/* ==================== 主体 ==================== */
.cm-main {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  /* 顶部 padding = fixed header 72 + fixed 一级导航 52 + 原有留白 16 = 140px。
     header 和一级导航都是 fixed 脱离文档流的，不腾出这段高度内容会被压住。 */
  padding: 140px 20px 40px;
}
/* 板块页除了 header + 一级导航，还多一条 fixed 二级导航（48px），
   内容要再往下让这么多，否则内容顶部会被二级导航压住。 */
body.cm-has-sub .cm-main { padding-top: 188px; }

/* ==================== 公益横幅 ==================== */
.cm-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--cm-radius);
  background: linear-gradient(120deg, #FFF6EA 0%, #FFEDE4 55%, #FFF3E8 100%);
  border: 1px solid #FFDFC8;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}
.cm-banner::after {
  content: '';
  position: absolute;
  right: -40px; top: -60px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 138, 61, .16), transparent 68%);
  pointer-events: none;
}
.cm-banner-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: #fff;
  display: grid; place-items: center;
  font-size: 22px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(217, 119, 6, .12);
}
.cm-banner-body { flex: 1; min-width: 0; }
.cm-banner-title { font-size: 15px; font-weight: 700; color: #8A4B12; letter-spacing: .2px; }
.cm-banner-desc { font-size: 12px; color: #A9703A; margin-top: 3px; }
.cm-banner-bar {
  height: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .75);
  margin-top: 8px;
  overflow: hidden;
  max-width: 420px;
}
.cm-banner-bar > i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--cm-orange), var(--cm-red));
  transition: width .8s cubic-bezier(.2, .8, .2, 1);
}
.cm-banner-num { text-align: right; flex-shrink: 0; padding-right: 4px; }
.cm-banner-num strong { display: block; font-size: 24px; color: var(--cm-gold); font-weight: 800; letter-spacing: -.5px; }
.cm-banner-num small { font-size: 10px; color: #B08850; }

/* ==================== 板块卡片（首页五宫格） ==================== */
.cm-section-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 22px 0 12px;
}
.cm-section-title h2 { font-size: 16px; margin: 0; letter-spacing: .2px; }
.cm-section-title span { font-size: 11px; color: var(--cm-text-3); }

.cm-boards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.cm-board {
  position: relative;
  background: var(--cm-card);
  border: 1px solid var(--cm-line);
  border-radius: var(--cm-radius);
  padding: 16px;
  cursor: pointer;
  transition: transform .18s, box-shadow .18s, border-color .18s;
  overflow: hidden;
  text-align: left;
  font: inherit;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 118px;
}
.cm-board:hover {
  transform: translateY(-2px);
  box-shadow: var(--cm-shadow-hover);
  border-color: var(--cm-accent, var(--cm-line));
}
.cm-board::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--cm-accent, var(--cm-orange));
}
.cm-board-head {
  display: flex;
  align-items: center;
  gap: 9px;
}
.cm-board-emoji {
  width: 38px; height: 38px;
  border-radius: 11px;
  display: grid; place-items: center;
  font-size: 19px;
  background: var(--cm-accent-soft, #FFF4EC);
  flex-shrink: 0;
}
.cm-board-name { font-size: 15px; font-weight: 700; }
.cm-board-tag {
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 99px;
  background: var(--cm-accent-soft, #FFF4EC);
  color: var(--cm-accent, var(--cm-orange));
  font-weight: 600;
  margin-left: 2px;
  white-space: nowrap;
}
.cm-board-sub { font-size: 11px; color: var(--cm-text-3); line-height: 1.5; }
.cm-board-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.cm-board-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--cm-accent, var(--cm-orange));
}
.cm-board-go {
  font-size: 11px;
  color: var(--cm-text-3);
  display: flex;
  align-items: center;
  gap: 2px;
}
.cm-board:hover .cm-board-go { color: var(--cm-accent, var(--cm-orange)); }

/* 暖心推车：横向宽带 */
.cm-board-cart {
  grid-column: 1 / -1;
  min-height: auto;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
}
.cm-board-cart .cm-board-head { flex: 1; }
.cm-board-cart .cm-board-foot { margin: 0; flex-shrink: 0; }

/* ==================== 精选商品 ==================== */
.cm-featured-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.cm-prod {
  background: var(--cm-card);
  border: 1px solid var(--cm-line);
  border-radius: var(--cm-radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform .18s, box-shadow .18s;
  display: flex;
  flex-direction: column;
}
.cm-prod:hover { transform: translateY(-2px); box-shadow: var(--cm-shadow-hover); }
.cm-prod-img {
  aspect-ratio: 1 / .82;
  /* 首页板块里商品卡是整宽三/四列，按比例算下来图标区能有 210px 高，
     里面只有一个 emoji，白占一屏。给个上限，一眼能看见三四行商品 */
  max-height: 132px;
  background: linear-gradient(150deg, #FFF8F0, #FFEFE2);
  display: grid; place-items: center;
  font-size: 46px;
  position: relative;
}
.cm-prod-badge {
  position: absolute;
  left: 8px; top: 8px;
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .92);
  color: var(--cm-text-2);
  font-weight: 600;
  backdrop-filter: blur(4px);
}
.cm-prod-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.cm-prod-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  /* 两行高度写死（13 × 1.4 × 2 ≈ 36px），跟 min-height 一致，
     避免 clamp 在部分浏览器算成 flow-root 后只留一行 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 36px;
  max-height: 36px;
}
.cm-prod-price { display: flex; align-items: baseline; gap: 6px; margin-top: auto; }
.cm-prod-price strong { font-size: 17px; color: var(--cm-red); font-weight: 800; letter-spacing: -.3px; }
.cm-prod-price strong::before { content: '¥'; font-size: 11px; font-weight: 600; margin-right: 1px; }
.cm-prod-orig { font-size: 11px; color: var(--cm-text-3); text-decoration: line-through; }
.cm-prod-welfare {
  font-size: 10px;
  color: var(--cm-gold);
  background: #FEF6E7;
  border-radius: 6px;
  padding: 2px 6px;
  align-self: flex-start;
  font-weight: 600;
}

/* ==================== 板块内页：工具条 ==================== */
.cm-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.cm-back {
  font-size: 12px;
  color: var(--cm-text-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 6px 10px 6px 4px;
  border-radius: 8px;
  background: none;
  border: none;
  font: inherit;
}
.cm-back:hover { background: #F5F1EA; color: var(--cm-text); }
.cm-search {
  flex: 1;
  min-width: 140px;
  height: 34px;
  border: 1px solid var(--cm-line);
  border-radius: 9px;
  padding: 0 12px;
  font-size: 13px;
  background: #fff;
  color: var(--cm-text);
}
.cm-search:focus { outline: none; border-color: var(--cm-orange); box-shadow: 0 0 0 3px rgba(255, 138, 61, .12); }
.cm-btn {
  height: 34px;
  padding: 0 14px;
  border-radius: 9px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .16s;
  font-family: inherit;
  white-space: nowrap;
}
.cm-btn-primary { background: var(--cm-red); color: #fff; }
.cm-btn-primary:hover { background: #D3392F; }
.cm-btn-ghost { background: #fff; border-color: var(--cm-line); color: var(--cm-text-2); }
.cm-btn-ghost:hover { border-color: var(--cm-text-3); color: var(--cm-text); }
.cm-btn-accent { background: var(--cm-orange); color: #fff; }
.cm-btn-accent:hover { background: #F07A2B; }
.cm-btn-sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.cm-btn:disabled { opacity: .45; cursor: not-allowed; }

/* 分类 chips */
.cm-chips { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 14px; }
.cm-chip {
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 99px;
  border: 1px solid var(--cm-line);
  background: #fff;
  color: var(--cm-text-2);
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
  white-space: nowrap;
}
.cm-chip:hover { border-color: var(--cm-text-3); }
.cm-chip.active {
  background: var(--cm-red);
  border-color: var(--cm-red);
  color: #fff;
  font-weight: 600;
}

/* ==================== 善物易站：列表 ==================== */
.cm-sh-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.cm-sh {
  display: flex;
  gap: 12px;
  background: var(--cm-card);
  border: 1px solid var(--cm-line);
  border-radius: var(--cm-radius);
  padding: 12px;
  cursor: pointer;
  transition: transform .18s, box-shadow .18s;
}
.cm-sh:hover { transform: translateY(-2px); box-shadow: var(--cm-shadow-hover); }
.cm-sh-img {
  width: 84px; height: 84px;
  border-radius: 10px;
  background: linear-gradient(150deg, #F0FDF7, #E2F8EE);
  display: grid; place-items: center;
  font-size: 36px;
  flex-shrink: 0;
  position: relative;
}
.cm-sh-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cm-sh-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.cm-sh-tag {
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 5px;
  background: #E9F8F1;
  color: var(--cm-green);
  font-weight: 600;
}
.cm-sh-tag.gray { background: #F4F4F5; color: var(--cm-text-2); }
.cm-sh-title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.cm-sh-price { display: flex; align-items: baseline; gap: 6px; margin-top: auto; }
.cm-sh-price strong { font-size: 17px; color: var(--cm-green); font-weight: 800; }
.cm-sh-price strong::before { content: '¥'; font-size: 11px; }
.cm-sh-meta { font-size: 10px; color: var(--cm-text-3); display: flex; gap: 8px; }

/* ==================== 幸福善集 ==================== */
.cm-fair-list { display: flex; flex-direction: column; gap: 12px; }
.cm-fair {
  background: var(--cm-card);
  border: 1px solid var(--cm-line);
  border-radius: var(--cm-radius);
  padding: 14px 16px;
  cursor: pointer;
  transition: transform .18s, box-shadow .18s;
}
.cm-fair:hover { transform: translateY(-2px); box-shadow: var(--cm-shadow-hover); }
.cm-fair-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.cm-fair-date {
  background: #FFF3E8;
  color: var(--cm-orange);
  border-radius: 9px;
  padding: 5px 9px;
  text-align: center;
  line-height: 1.15;
  flex-shrink: 0;
}
.cm-fair-date strong { display: block; font-size: 15px; font-weight: 800; }
.cm-fair-date small { font-size: 10.5px; }
.cm-fair-title { font-size: 15px; font-weight: 700; flex: 1; min-width: 0; }
.cm-fair-heat {
  font-size: 10px;
  color: #E8590C;
  background: #FFF0E6;
  padding: 2px 7px;
  border-radius: 99px;
  font-weight: 600;
  flex-shrink: 0;
}
.cm-fair-loc { font-size: 11.5px; color: var(--cm-text-2); margin-bottom: 9px; }
.cm-fair-mods { display: flex; gap: 7px; flex-wrap: wrap; }
.cm-fair-mod {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 7px;
  background: #FBF7F1;
  color: var(--cm-text-2);
  border: 1px solid var(--cm-line);
}
.cm-fair-mod b { color: var(--cm-orange); }

/* ==================== 暖心推车 ==================== */
.cm-cart-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 14px; align-items: start; }
.cm-card {
  background: var(--cm-card);
  border: 1px solid var(--cm-line);
  border-radius: var(--cm-radius);
  padding: 16px;
}
.cm-card-title {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.cm-field { margin-bottom: 12px; }
.cm-label { display: block; font-size: 12px; color: var(--cm-text-2); margin-bottom: 5px; font-weight: 500; }
.cm-input, .cm-select, .cm-textarea {
  width: 100%;
  border: 1px solid var(--cm-line);
  border-radius: 9px;
  padding: 8px 11px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  color: var(--cm-text);
}
.cm-input:focus, .cm-select:focus, .cm-textarea:focus {
  outline: none;
  border-color: var(--cm-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
}
.cm-textarea { min-height: 62px; resize: vertical; }
.cm-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.cm-slot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cm-slot {
  border: 1px solid var(--cm-line);
  border-radius: 9px;
  padding: 8px 6px;
  text-align: center;
  cursor: pointer;
  font-size: 11.5px;
  background: #fff;
  font-family: inherit;
  color: var(--cm-text-2);
  transition: all .15s;
  line-height: 1.4;
}
.cm-slot:hover:not(:disabled) { border-color: var(--cm-blue); }
.cm-slot.active { background: #EFF6FF; border-color: var(--cm-blue); color: #1D4ED8; font-weight: 600; }
.cm-slot:disabled { opacity: .38; cursor: not-allowed; text-decoration: line-through; }
.cm-slot small { display: block; font-size: 10.5px; color: var(--cm-text-3); }

.cm-check { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: var(--cm-text-2); cursor: pointer; margin-bottom: 9px; line-height: 1.5; }
.cm-check input { margin-top: 2px; accent-color: var(--cm-blue); width: 15px; height: 15px; flex-shrink: 0; }

.cm-fee-box {
  background: #F8FBFF;
  border: 1px solid #DBEAFE;
  border-radius: 10px;
  padding: 12px;
  margin: 12px 0;
}
.cm-fee-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--cm-text-2); padding: 3px 0; }
.cm-fee-row.sub { color: var(--cm-green); }
.cm-fee-row.total {
  border-top: 1px dashed #CBD5E1;
  margin-top: 6px;
  padding-top: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--cm-text);
}
.cm-fee-row.total b { color: var(--cm-blue); font-size: 18px; }

/* 待接单池 */
.cm-pool-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--cm-line);
  font-size: 12.5px;
}
.cm-pool-item:last-child { border-bottom: none; }
.cm-pool-main { flex: 1; min-width: 0; }
.cm-pool-addr { font-weight: 600; margin-bottom: 2px; }
.cm-pool-meta { font-size: 10.5px; color: var(--cm-text-3); }

/* ==================== 订单列表 ==================== */
.cm-order {
  background: var(--cm-card);
  border: 1px solid var(--cm-line);
  border-radius: 11px;
  padding: 12px 14px;
  margin-bottom: 10px;
}
.cm-order-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.cm-order-no { font-size: 10.5px; color: var(--cm-text-3); font-family: ui-monospace, monospace; }
.cm-order-status {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 99px;
  font-weight: 600;
}
.st-pending { background: #FEF3C7; color: #92400E; }
.st-reserved { background: #DBEAFE; color: #1E40AF; }
.st-accepted { background: #DBEAFE; color: #1E40AF; }
.st-delivering { background: #EDE9FE; color: #5B21B6; }
.st-done { background: #D1FAE5; color: #065F46; }
.st-cancelled { background: #F4F4F5; color: #71717A; }
.cm-order-body { font-size: 13px; display: flex; align-items: center; gap: 8px; }
.cm-order-money { margin-left: auto; font-weight: 700; color: var(--cm-red); }

/* ==================== 空状态 / 加载 ==================== */
.cm-empty {
  text-align: center;
  padding: 46px 20px;
  color: var(--cm-text-3);
  font-size: 13px;
}
.cm-empty-icon { font-size: 40px; margin-bottom: 10px; opacity: .55; }
.cm-empty-hint { font-size: 11.5px; margin-top: 6px; color: var(--cm-text-3); }

/* ==================== 一级导航（4 个，等分） ==================== */
/* 和 header 一样用 fixed，不用 sticky。
   这个页面继承了 styles.css 的全局 flex/overflow 规则，sticky 实测直接失效
   （导航跟着页面滚走，滚到下面顶部一片空白）。fixed 不受祖先影响。
   它整宽通栏、深色底，所以背景和圆角要在这里自己补齐。 */
.cm-tabbar {
  display: flex;
  gap: 6px;
  position: fixed;
  top: 72px;                /* 紧贴 header 下沿（桌面 header 72px） */
  left: 0;
  right: 0;
  z-index: 55;
  padding: 8px max(20px, calc((100vw - 1180px) / 2 + 20px)) 8px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--cm-line);
  background: var(--cm-bg);
  box-shadow: 0 4px 10px -6px rgba(31, 35, 40, .10);
}
.cm-tab {
  /* 4 个等分，390px 屏上每个 ~90px，文字能完整显示 */
  flex: 1 1 0;
  min-width: 0;
  font-size: 12.5px;
  padding: 8px 4px;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: var(--cm-text-2);
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: all .15s;
}
.cm-tab:hover { background: #F5F1EA; }
.cm-tab.active { background: var(--cm-red); color: #fff; font-weight: 600; }

/* ==================== 二级导航（板块内横排） ==================== */
.cm-subtabbar {
  display: flex;
  gap: 4px;
  padding: 8px 0 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--cm-line);
  overflow-x: auto;
  scrollbar-width: none;
  /* 同理用 fixed：紧贴一级导航下沿。header 72 + 一级导航 52 = 124px。
     它只出现在板块页（首页隐藏），所以不难看。 */
  position: fixed;
  top: 124px;
  left: 0;
  right: 0;
  z-index: 54;
  padding-left: max(20px, calc((100vw - 1180px) / 2 + 20px));
  padding-right: max(20px, calc((100vw - 1180px) / 2 + 20px));
  background: var(--cm-bg);
  box-shadow: 0 4px 10px -6px rgba(31, 35, 40, .10);
}
.cm-subtabbar::-webkit-scrollbar { display: none; }
.cm-subtab {
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--cm-line);
  background: #fff;
  color: var(--cm-text-2);
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: all .15s;
}
.cm-subtab:hover { border-color: #D9C9B6; }
.cm-subtab.active {
  background: #FFF1E6;
  border-color: var(--cm-red);
  color: var(--cm-red);
  font-weight: 600;
}

/* ==================== 弹窗 ==================== */
.cm-mask {
  position: fixed;
  inset: 0;
  background: rgba(28, 22, 18, .42);
  backdrop-filter: blur(3px);
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.cm-modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 440px;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .2);
  animation: cm-pop .2s cubic-bezier(.2, .9, .3, 1);
}
@keyframes cm-pop {
  from { transform: scale(.94) translateY(10px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}
.cm-modal-head {
  padding: 15px 18px 12px;
  border-bottom: 1px solid var(--cm-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cm-modal-head h3 { margin: 0; font-size: 15px; }
.cm-modal-close {
  border: none;
  background: none;
  font-size: 16px;
  color: var(--cm-text-3);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
}
.cm-modal-close:hover { background: #F5F1EA; color: var(--cm-text); }
.cm-modal-body { padding: 16px 18px; overflow-y: auto; flex: 1; }
.cm-modal-foot {
  padding: 12px 18px 16px;
  display: flex;
  gap: 9px;
  justify-content: flex-end;
  border-top: 1px solid var(--cm-line);
}
.cm-modal-foot .cm-btn { height: 38px; min-width: 84px; }

/* ==================== Toast ==================== */
.cm-toast {
  position: fixed;
  left: 50%;
  bottom: 46px;
  transform: translateX(-50%) translateY(14px);
  background: rgba(28, 22, 18, .9);
  color: #fff;
  font-size: 13px;
  padding: 10px 20px;
  border-radius: 99px;
  opacity: 0;
  pointer-events: none;
  transition: all .26s;
  z-index: 1000;
  max-width: 82vw;
  text-align: center;
  line-height: 1.45;
}
.cm-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ==================== 尾部 ==================== */
.cm-footer {
  border-top: 1px solid var(--cm-line);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  color: var(--cm-text-3);
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
}
.cm-footer-links { display: flex; gap: 14px; }
.cm-footer-links a { color: var(--cm-text-3); text-decoration: none; }
.cm-footer-links a:hover { color: var(--cm-text-2); }

/* ==================== 骨架屏 ==================== */
.cm-skel {
  background: linear-gradient(90deg, #F3EFE9 25%, #FAF7F2 50%, #F3EFE9 75%);
  background-size: 200% 100%;
  animation: cm-shimmer 1.3s infinite;
  border-radius: 8px;
}
@keyframes cm-shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

/* ==================== 响应式 ==================== */
@media (max-width: 960px) {
  .cm-featured-grid { grid-template-columns: repeat(3, 1fr); }
  .cm-cart-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .cm-head-inner { padding: 10px 14px; gap: 10px; }
  .cm-brand-en, .cm-brand-mod small { display: none; }
  .cm-brand-mod strong { font-size: 13.5px; }
  .cm-user-info { display: none; }
  .cm-comm-select { max-width: 108px; font-size: 11px; height: 28px; }
  /* 手机端：header 66 + 一级导航 66 + 留白 12 = 144px */
  .cm-main { padding: 144px 14px 32px; }
  /* 板块页再多让一条二级导航（49px） */
  body.cm-has-sub .cm-main { padding-top: 196px; }

  .cm-banner { flex-wrap: wrap; padding: 13px 14px; gap: 10px; }
  .cm-banner-icon { width: 36px; height: 36px; font-size: 18px; }
  .cm-banner-title { font-size: 13.5px; }
  .cm-banner-desc { font-size: 11px; }
  .cm-banner-num { text-align: left; }
  .cm-banner-num strong { font-size: 20px; }

  .cm-boards { grid-template-columns: 1fr; }
  .cm-board { min-height: auto; }
  .cm-board-cart { flex-direction: column; align-items: flex-start; }

  .cm-featured-grid { grid-template-columns: repeat(2, 1fr); }
  .cm-sh-list { grid-template-columns: 1fr; }
  .cm-sh-img { width: 74px; height: 74px; font-size: 32px; }

  .cm-slot-grid { grid-template-columns: repeat(2, 1fr); }
  .cm-row2 { grid-template-columns: 1fr; }
  .cm-toolbar { gap: 8px; }
  .cm-search { order: 3; flex-basis: 100%; }

  /* 手机端导航：改成两级以后，一级只剩 4 个（390px 屏每个 ~91px），
     终于不用再为了塞下 9 个 tab 把字号压到 8.5px。
     教训保留：绝不能靠「横向滑动」藏 tab——用户不会想到去横滑，
     被切在视口外的模块等于不存在。所以 4 个依旧等分、不滚动。 */
  .cm-tabbar {
    gap: 4px;
    padding: 8px 8px 7px;
    /* 顶部 header 手机端实测 66px，紧跟它下沿 */
    top: 66px;
    background: rgba(253, 251, 247, .97);
    backdrop-filter: blur(8px);
    overflow-x: visible;
  }
  .cm-tab {
    flex: 1 1 0;
    min-width: 0;
    /* 图标一行、文字一行，字号回到可读区间；触控区高度 ≥48px */
    font-size: 17px;
    padding: 7px 0 8px;
    border-radius: 9px;
    text-align: center;
    line-height: 1.15;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    letter-spacing: 0;
  }
  .cm-tab span {
    font-size: 11.5px;
    white-space: nowrap;
    letter-spacing: 0;
  }
}

/* 一级导航从 4 个变 5 个（第十一轮加「善资助」）：
   390px 屏上每格从 91px 降到 ~74px，图标 17px + 文字 11.5px 仍然放得下，
   但 3 个字的名字（善物资/善服务/善资助/公益金）需要把字距收一点，
   宁可紧 0.3px 也不能截断或换行——换行会让 5 个格子高度不齐。 */
@media (max-width: 420px) {
  .cm-tab { font-size: 16px; padding: 7px 0; }
  .cm-tab span { font-size: 11px; letter-spacing: -.3px; }
  .cm-tabbar { gap: 3px; padding: 7px 6px 6px; }
}

/* 超窄屏（iPhone SE 375px 及以下）：5 个 tab 每格 ~68px，
   图标降到 15px、文字 10.5px，这是不换行前提下的下限 */
@media (max-width: 375px) {
  .cm-tab { font-size: 15px; padding: 6px 0; }
  .cm-tab span { font-size: 10.5px; letter-spacing: -.4px; }
  .cm-tabbar { gap: 2px; padding: 6px 4px 5px; }
}

@media (max-width: 400px) {
  .cm-prod-img { font-size: 38px; }
  .cm-prod-name { font-size: 12px; min-height: 33px; }
  .cm-prod-price strong { font-size: 15px; }
  .cm-toast { bottom: 22px; font-size: 12px; padding: 9px 16px; }
}

/* ============================================================
 * 首页 · 善立方入口横幅（.charity-band）
 * 五个板块做成可点击的真实入口卡片，右边带实时数量
 * 样式放在 charity.css，首页只多引一个 css 即可
 * ============================================================ */
.charity-band {
  padding: clamp(28px, 4vw, 52px) clamp(16px, 4vw, 48px) clamp(20px, 3vw, 36px);
}
.charity-band-box {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(22px, 3vw, 36px);
  border-radius: 26px;
  overflow: hidden;
  background:
    radial-gradient(120% 130% at 96% 4%, #FFE7D6 0%, rgba(255, 231, 214, 0) 58%),
    radial-gradient(120% 130% at 2% 100%, #FDE8E6 0%, rgba(253, 232, 230, 0) 55%),
    linear-gradient(135deg, #FFFBF6 0%, #FFF6EE 52%, #FEF4F2 100%);
  border: 1px solid #F3E3D3;
  box-shadow: 0 22px 52px -32px rgba(196, 120, 70, .55);
}

/* 头部：左标题 + 右按钮/公益金 */
.cb-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: clamp(18px, 2.4vw, 26px);
}
.cb-head-left { max-width: 36em; }
.cb-tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: .16em;
  font-weight: 700;
  color: #C2410C;
  background: #FFEDE0;
  border: 1px solid #FBD5B9;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.cb-head-left h2 {
  font-size: clamp(24px, 2.8vw, 34px);
  line-height: 1.22;
  margin: 0 0 8px;
  color: #2B2118;
  letter-spacing: -.015em;
}
.cb-head-left p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: #6B5B4D;
}

.cb-head-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.cb-ledger-link {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 10px 18px;
  border-radius: 13px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid #F0E0D2;
  text-decoration: none;
  transition: all .18s;
  min-width: 148px;
}
.cb-ledger-link:hover { border-color: #E8B98E; transform: translateY(-1px); box-shadow: 0 10px 22px -16px rgba(160, 90, 50, .6); }
.cb-ledger-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
}
.cb-ledger-link span { font-size: 10.5px; color: #9A8878; }
.cb-ledger-link strong {
  font-size: 18px;
  color: #C2410C;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.2;
}
.cb-ledger-link em {
  font-style: normal;
  font-size: 10.5px;
  color: #E8453C;
  font-weight: 600;
}

/* 五个板块网格 */
.cb-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
.cb-tile {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 16px 15px 13px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #F2E6DA;
  text-decoration: none;
  color: inherit;
  min-height: 148px;
  transition: transform .18s, box-shadow .18s, border-color .18s;
  position: relative;
  overflow: hidden;
}
.cb-tile::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--c);
  opacity: .85;
}
.cb-tile:hover {
  transform: translateY(-3px);
  border-color: var(--c);
  box-shadow: 0 14px 30px -20px rgba(120, 80, 50, .6);
}
.cb-tile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.cb-tile-emoji {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--cs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
}
.cb-tile-badge {
  font-size: 10px;
  font-weight: 600;
  color: var(--c);
  background: var(--cs);
  padding: 2px 7px;
  border-radius: 6px;
  white-space: nowrap;
}
.cb-tile-name {
  font-size: 15px;
  font-weight: 700;
  color: #2B2118;
  letter-spacing: -.01em;
  margin-top: 2px;
}
.cb-tile-sub {
  font-size: 11.5px;
  color: #8C7A6A;
  line-height: 1.55;
  min-height: 2.5em;
}
.cb-tile-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 9px;
  border-top: 1px dashed #F2E8DD;
}
.cb-tile-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--c);
  letter-spacing: -.01em;
}
.cb-tile-arrow {
  font-size: 15px;
  color: #CBB9A8;
  line-height: 1;
  flex: 0 0 auto;
  transition: transform .18s, color .18s;
}
.cb-tile:hover .cb-tile-arrow { transform: translateX(3px); color: var(--c); }

/* 导航里的「善立方」高亮 */
.nav-links a.nav-charity {
  color: #C2410C;
  font-weight: 700;
  position: relative;
}
.nav-links a.nav-charity::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 5px; height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: #FF8A3D;
}

/* 平板：3 列会剩两张掉行，改成「3 + 2」后两张变宽，视觉上更稳 */
@media (max-width: 960px) {
  .cb-grid { grid-template-columns: repeat(6, 1fr); gap: 11px; }
  .cb-grid .cb-tile { grid-column: span 2; }
  .cb-grid .cb-tile:nth-child(4),
  .cb-grid .cb-tile:nth-child(5) { grid-column: span 3; }
  .cb-head { align-items: flex-start; }
  .cb-tile { min-height: 140px; }
}

/* 手机：两列 */
@media (max-width: 620px) {
  .charity-band { padding: 22px 14px 10px; }
  .charity-band-box { padding: 18px 16px; border-radius: 20px; }
  .cb-head { gap: 14px; margin-bottom: 16px; }
  .cb-head-left h2 { font-size: 21px; }
  .cb-head-left p { font-size: 12.5px; }
  .cb-head-right { width: 100%; gap: 10px; }
  .cb-head-right .btn { flex: 1 1 auto; text-align: center; }
  .cb-ledger-link { flex: 1 1 100%; flex-direction: row; align-items: baseline; gap: 8px; padding: 8px 12px; }
  .cb-ledger-link strong { font-size: 15px; }
  .cb-grid { grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .cb-grid .cb-tile,
  .cb-grid .cb-tile:nth-child(4),
  .cb-grid .cb-tile:nth-child(5) { grid-column: span 1; }
  .cb-tile { padding: 12px 11px 10px; border-radius: 13px; min-height: 0; gap: 5px; }
  .cb-tile-emoji { width: 32px; height: 32px; font-size: 16px; border-radius: 9px; }
  .cb-tile-name { font-size: 13.5px; }
  .cb-tile-sub { font-size: 10.5px; min-height: 2.2em; }
  .cb-tile-badge { font-size: 10.5px; padding: 1px 5px; }
  .cb-tile-foot { padding-top: 7px; }
  .cb-tile-num { font-size: 11px; }
}

/* 下单确认弹窗里的信息块 */
.cm-tip-box {
  background: #FFFBF6;
  border: 1px solid #F3E4D7;
  border-radius: 12px;
  padding: 4px 14px;
  margin-bottom: 12px;
}
.cm-tip-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  font-size: 13px;
  border-bottom: 1px dashed #F0E4D8;
}
.cm-tip-row:last-child { border-bottom: none; }
.cm-tip-row span { color: var(--cm-text-3); flex: 0 0 auto; }
.cm-tip-row strong { color: var(--cm-text-1); font-weight: 600; text-align: right; }
.cm-tip-row strong.money { color: var(--cm-red); font-size: 15px; }
.cm-tip-note {
  font-size: 12.5px;
  line-height: 1.7;
  color: #7A6653;
  background: #FFF7E8;
  border-left: 3px solid #FFB74D;
  border-radius: 0 8px 8px 0;
  padding: 10px 12px;
}

/* ============================================================
 * 公益金账本（ledger）
 * ============================================================ */

/* 横幅上的「看明细」小字 */
.cm-banner-more {
  display: block;
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--cm-gold);
  font-weight: 600;
  opacity: .85;
}
.cm-banner { cursor: pointer; transition: box-shadow .18s, transform .18s; }
.cm-banner:hover { box-shadow: 0 10px 28px -18px rgba(200, 120, 60, .55); transform: translateY(-1px); }
.cm-banner:focus-visible { outline: 2px solid var(--cm-orange); outline-offset: 2px; }

/* 面包屑 */
.cm-crumb {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.cm-back {
  font-size: 12.5px;
  color: var(--cm-text-3);
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px 9px;
  border-radius: 8px;
  font-family: inherit;
  transition: all .15s;
}
.cm-back:hover { background: #F5F1EA; color: var(--cm-text-1); }
.cm-crumb-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--cm-text-1);
  display: flex;
  align-items: baseline;
  gap: 9px;
}
.cm-crumb-sub { font-size: 11.5px; font-weight: 400; color: var(--cm-text-3); }

/* 四个关键数字 */
.cm-lg-kpi {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.cm-lg-kpi-item {
  background: #fff;
  border: 1px solid var(--cm-line);
  border-radius: 13px;
  padding: 13px 15px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.cm-lg-kpi-item small { font-size: 11.5px; color: var(--cm-text-3); }
.cm-lg-kpi-item strong {
  font-size: 21px;
  font-weight: 700;
  color: var(--cm-text-1);
  letter-spacing: -.02em;
  line-height: 1.15;
}
.cm-lg-kpi-item strong.money { color: var(--cm-red); }
.cm-lg-kpi-item strong i {
  font-size: 11.5px;
  font-style: normal;
  font-weight: 400;
  color: var(--cm-text-3);
  margin-left: 3px;
}

/* 区块 */
.cm-lg-block {
  background: #fff;
  border: 1px solid var(--cm-line);
  border-radius: 15px;
  padding: 16px 18px;
  margin-bottom: 14px;
}
.cm-lg-block-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--cm-text-1);
  margin-bottom: 13px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.cm-lg-count { font-size: 11.5px; font-weight: 400; color: var(--cm-text-3); }

/* 来源占比条 */
.cm-lg-bar {
  display: flex;
  height: 13px;
  border-radius: 7px;
  overflow: hidden;
  background: #F4EFE8;
  margin-bottom: 14px;
}
.cm-lg-bar i { display: block; height: 100%; transition: width .45s ease; }
.cm-lg-legend { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; }
.cm-lg-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 12px;
}
.cm-lg-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.cm-lg-legend-name { color: var(--cm-text-2); }
.cm-lg-legend-item strong { color: var(--cm-text-1); font-size: 13px; }
.cm-lg-legend-item small { color: var(--cm-text-3); font-size: 11px; }
.cm-lg-legend-item em {
  font-style: normal;
  font-size: 10.5px;
  color: var(--cm-gold);
  background: #FFF7E8;
  padding: 1px 6px;
  border-radius: 5px;
}

/* 月度柱状图 */
.cm-lg-chart {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  height: 128px;
  padding-top: 6px;
}
.cm-lg-col {
  flex: 1 1 0;
  max-width: 92px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 5px;
}
.cm-lg-col i {
  display: block;
  width: 100%;
  min-width: 32px;
  border-radius: 6px 6px 3px 3px;
  background: linear-gradient(180deg, #FFB07C, #FF8A3D);
  transition: height .45s ease;
}
.cm-lg-col-val { font-size: 10.5px; color: var(--cm-text-2); font-weight: 600; }
.cm-lg-col small { font-size: 10.5px; color: var(--cm-text-3); }

/* 流水列表 */
.cm-chips-sm { margin-bottom: 12px; }
.cm-lg-list { display: flex; flex-direction: column; }
.cm-lg-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed #F0E8DD;
}
.cm-lg-row:last-child { border-bottom: none; }
.cm-lg-ico {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex: 0 0 auto;
}
.cm-lg-main { flex: 1 1 auto; min-width: 0; }
.cm-lg-title {
  font-size: 13.5px;
  color: var(--cm-text-1);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.cm-lg-meta {
  font-size: 11.5px;
  color: var(--cm-text-3);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cm-lg-tag {
  font-size: 10px;
  font-weight: 500;
  padding: 1px 6px;
  border-radius: 5px;
  flex: 0 0 auto;
}
.cm-lg-tag.done { background: #E8F6EE; color: #12805C; }
.cm-lg-tag.pending { background: #FFF4E3; color: #B26A00; }
.cm-lg-tag.cancel { background: #F3F1EE; color: #9A9086; }
.cm-lg-amt { text-align: right; flex: 0 0 auto; }
.cm-lg-amt strong {
  display: block;
  font-size: 14.5px;
  color: var(--cm-red);
  font-weight: 700;
}
.cm-lg-amt small { font-size: 11px; color: var(--cm-text-3); }

@media (max-width: 720px) {
  .cm-lg-kpi { grid-template-columns: repeat(2, 1fr); }
  .cm-lg-kpi-item { padding: 11px 12px; }
  .cm-lg-kpi-item strong { font-size: 18px; }
  .cm-lg-legend { grid-template-columns: 1fr; gap: 8px; }
  .cm-lg-block { padding: 13px 14px; }
  .cm-crumb-title { font-size: 15.5px; }
  .cm-crumb-sub { display: none; }
  .cm-lg-chart { height: 108px; gap: 6px; }
  .cm-lg-col-val { font-size: 10.5px; }
  .cm-lg-ico { width: 34px; height: 34px; font-size: 16px; border-radius: 10px; }
  .cm-lg-meta { font-size: 10.5px; }
}

/* 只有一个月数据时，给一句解释，避免空荡 */
.cm-lg-chart-note {
  text-align: center;
  font-size: 11.5px;
  color: var(--cm-text-3);
  margin-top: 4px;
}

/* 微信支付二维码弹窗 */
.cm-qr-wrap {
  display: flex;
  justify-content: center;
  padding: 8px 0 12px;
}
.cm-qr {
  width: 200px;
  height: 200px;
  border-radius: 12px;
  border: 1px solid #F0E4D8;
  background: #fff;
  padding: 8px;
}

/* ============================================================
 * 排行榜
 *
 * 两段并列：公益商户榜（致谢向，金银铜奖牌）+ 热销榜（发现向，序号）。
 * 视觉上用「同一套行结构 + 不同底色」表达这是两个维度，
 * 而不是做成两个完全不同的组件——那样看起来像两个页面。
 * ============================================================ */

.cm-rk-sec {
  background: var(--cm-card);
  border-radius: var(--cm-radius);
  border: 1px solid var(--cm-line);
  box-shadow: var(--cm-shadow);
  margin-bottom: 14px;
  overflow: hidden;
}

/* ---------- 段头 ---------- */
.cm-rk-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 16px 13px;
  border-bottom: 1px solid var(--cm-line);
  background: linear-gradient(180deg, #FFFDF9 0%, #FFFFFF 100%);
}
.cm-rk-head-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.cm-rk-emoji {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
}
.cm-rk-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--cm-text);
  letter-spacing: -.01em;
}
.cm-rk-sub {
  font-size: 11px;
  color: var(--cm-text-3);
  margin-top: 2px;
}
.cm-rk-head-stat {
  text-align: right;
  flex-shrink: 0;
}
.cm-rk-head-stat strong {
  display: block;
  font-size: 17px;
  font-weight: 800;
  color: var(--cm-red);
  letter-spacing: -.02em;
  line-height: 1.2;
}
.cm-rk-head-stat strong.money { font-variant-numeric: tabular-nums; }
.cm-rk-head-stat strong i {
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  margin-left: 2px;
}
.cm-rk-head-stat small {
  display: block;
  font-size: 10px;
  color: var(--cm-text-3);
  margin-top: 2px;
  white-space: nowrap;
}

/* ---------- 榜单行 ---------- */
.cm-rk-list { padding: 6px 8px 8px; }

.cm-rk-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 9px;
  border-radius: 11px;
  transition: background .15s;
}
.cm-rk-item + .cm-rk-item { margin-top: 1px; }
.cm-rk-item:hover { background: #FDFBF7; }

/* 榜首：淡金底 + 左侧金线，让第一名有独立分量 */
.cm-rk-first {
  background: linear-gradient(90deg, #FFFBF0 0%, #FFFDF9 60%, #FFFFFF 100%);
  border-left: 3px solid #E8B93C;
  padding-left: 6px;
}
.cm-rk-prod { cursor: pointer; }
.cm-rk-prod:hover { background: #FFF9F7; }

/* 名次徽章 */
.cm-rk-badge {
  width: 24px;
  flex-shrink: 0;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--cm-text-3);
  font-variant-numeric: tabular-nums;
}
.cm-rk-medal { font-size: 20px; line-height: 1; }
/* 奖牌比数字宽，稍收一点，避免行内文字被推右 */
.cm-rk-medal { width: 24px; }

/* 商户头像 / 商品缩略 */
.cm-rk-av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #7A4A22;
}
.cm-rk-thumb {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: #FBF7F1;
}

/* 主体 */
.cm-rk-body { flex: 1; min-width: 0; }
.cm-rk-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--cm-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cm-rk-meta {
  font-size: 10.5px;
  color: var(--cm-text-3);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cm-rk-meta b {
  color: var(--cm-red);
  font-weight: 700;
}
/* 「历史销量」这类说明弱化，不抢主数字 */
.cm-rk-meta em {
  font-style: normal;
  color: #B0A79C;
}

/* 占比条 */
.cm-rk-bar {
  height: 3px;
  border-radius: 2px;
  background: #F3EDE4;
  margin-top: 6px;
  overflow: hidden;
}
.cm-rk-bar i {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, #F0A13C, #E8453C);
  transition: width .4s ease;
}
.cm-rk-bar-hot i { background: linear-gradient(90deg, #FF8A3D, #E8453C); }

/* 右侧数值 */
.cm-rk-val {
  flex-shrink: 0;
  text-align: right;
  min-width: 62px;
}
.cm-rk-val strong {
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: var(--cm-text);
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.cm-rk-val strong.money { color: var(--cm-red); }
.cm-rk-val small {
  display: block;
  font-size: 10.5px;
  color: var(--cm-text-3);
  margin-top: 2px;
  white-space: nowrap;
}

/* ---------- 空态 / 脚注 ---------- */
.cm-rk-empty {
  padding: 30px 20px;
  text-align: center;
  font-size: 12.5px;
  color: var(--cm-text-3);
}

.cm-rk-note {
  padding: 9px 16px 13px;
  font-size: 10px;
  color: #B0A79C;
  line-height: 1.6;
  border-top: 1px dashed var(--cm-line);
}

.cm-rk-foot {
  display: flex;
  gap: 10px;
  justify-content: center;
  padding: 4px 0 18px;
}

/* ---------- 手机端 ---------- */
@media (max-width: 620px) {
  .cm-rk-head { padding: 13px 13px 11px; }
  .cm-rk-head-stat strong { font-size: 15px; }
  .cm-rk-item { gap: 8px; padding: 10px 6px; }
  .cm-rk-first { padding-left: 4px; }
  .cm-rk-av, .cm-rk-thumb { width: 32px; height: 32px; }
  .cm-rk-thumb { font-size: 17px; }
  .cm-rk-badge, .cm-rk-medal { width: 22px; }
  .cm-rk-medal { font-size: 18px; }
  .cm-rk-name { font-size: 12.5px; }
  .cm-rk-val { min-width: 54px; }
  .cm-rk-val strong { font-size: 14px; }
  .cm-rk-emoji { font-size: 19px; }
  .cm-rk-title { font-size: 14px; }
}

/* ============================================================
 * 首页 · 排行榜入口横条
 * 底部导航 8 个 tab，排行容易被忽略，所以首页再给一条显式入口
 * ============================================================ */
.cm-rank-entry {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  margin: 4px 0 16px;
  padding: 13px 15px;
  border-radius: 13px;
  border: 1px solid #F3E3C8;
  background: linear-gradient(100deg, #FFFBF0 0%, #FFF6E8 55%, #FFFDF9 100%);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: all .16s;
}
.cm-rank-entry:hover {
  border-color: #E8B93C;
  box-shadow: 0 4px 16px rgba(217, 119, 6, .13);
  transform: translateY(-1px);
}
.cm-rank-entry-icon {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
}
.cm-rank-entry-body {
  flex: 1;
  min-width: 0;
}
.cm-rank-entry-body strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #8A5A12;
  letter-spacing: -.01em;
}
.cm-rank-entry-body small {
  display: block;
  font-size: 10.5px;
  color: #B08A50;
  margin-top: 2px;
}
.cm-rank-entry-go {
  flex-shrink: 0;
  font-size: 11px;
  color: #C08A2A;
  font-weight: 600;
  white-space: nowrap;
}

@media (max-width: 620px) {
  .cm-rank-entry { padding: 11px 12px; gap: 9px; }
  .cm-rank-entry-icon { font-size: 21px; }
  .cm-rank-entry-body strong { font-size: 13px; }
  .cm-rank-entry-go { font-size: 10px; }
}

/* ============================================================
 * 首页 · 善心愿入口横条
 * 与排行榜入口同构（同 padding / 同圆角），但换淡紫配色：
 * 两条横条挨着放，结构一致才像一组，颜色不同才分得清是两个地方。
 * ============================================================ */
.cm-wish-entry {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  margin: 4px 0 10px;
  padding: 13px 15px;
  border-radius: 13px;
  border: 1px solid #E6DEFB;
  background: linear-gradient(100deg, #FBFAFF 0%, #F5F1FF 55%, #FDFCFF 100%);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: all .16s;
}
.cm-wish-entry:hover {
  border-color: #8B5CF6;
  box-shadow: 0 4px 16px rgba(139, 92, 246, .15);
  transform: translateY(-1px);
}
.cm-wish-entry-icon {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
}
.cm-wish-entry-body {
  flex: 1;
  min-width: 0;
}
.cm-wish-entry-body strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #6D3FC4;
  letter-spacing: -.01em;
}
.cm-wish-entry-body small {
  display: block;
  font-size: 10.5px;
  color: #8C7BB5;
  margin-top: 2px;
}
.cm-wish-entry-go {
  flex-shrink: 0;
  font-size: 11px;
  color: #7C4DD1;
  font-weight: 600;
  white-space: nowrap;
}

@media (max-width: 620px) {
  .cm-wish-entry { padding: 11px 12px; gap: 9px; }
  .cm-wish-entry-icon { font-size: 21px; }
  .cm-wish-entry-body strong { font-size: 13px; }
  .cm-wish-entry-go { font-size: 10px; }
}

/* 榜单补充：身份标签 + 单商户提示 */
.cm-rk-tag {
  display: inline-block;
  margin-left: 5px;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 600;
  color: #9A6A20;
  background: #FBF0DC;
  vertical-align: 1px;
  letter-spacing: 0;
}
.cm-rk-tip {
  margin: 0 16px 12px;
  padding: 9px 12px;
  border-radius: 8px;
  background: #FBF7F1;
  font-size: 10.5px;
  color: #9C8E7C;
  line-height: 1.6;
}

/* ============================================================
 * 善心愿（发布 & 揭榜）
 *
 * 视觉基调：比其他板块更「柔」。这里是人求人的地方，
 * 用大奖牌、红大字会显得在围观别人的困难。
 * 所以用淡紫作主色（--ws-color 由 kind 覆盖），卡片圆角更大、
 * 阴影更轻，让气氛偏温和。
 * ============================================================ */

/* ---------- 顶部统计 ---------- */
.cm-ws-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.cm-ws-stat {
  background: var(--cm-card);
  border: 1px solid var(--cm-line);
  border-radius: 11px;
  padding: 11px 6px;
  text-align: center;
  box-shadow: var(--cm-shadow);
}
.cm-ws-stat strong {
  display: block;
  font-size: 19px;
  font-weight: 800;
  color: #8B5CF6;
  letter-spacing: -.02em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.cm-ws-stat small {
  display: block;
  font-size: 10.5px;
  color: var(--cm-text-3);
  margin-top: 3px;
  white-space: nowrap;
}

/* ---------- 操作行 ---------- */
.cm-ws-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
/* 审核按钮上的待办数字 */
.cm-ws-dot {
  display: inline-block;
  margin-left: 4px;
  min-width: 14px;
  height: 14px;
  line-height: 14px;
  padding: 0 3px;
  border-radius: 7px;
  background: #E8453C;
  color: #fff;
  font-size: 10.5px;
  font-style: normal;
  font-weight: 700;
  vertical-align: 1px;
}

/* ---------- 心愿卡片 ---------- */
.cm-ws-list { display: flex; flex-direction: column; gap: 10px; }

.cm-ws-card {
  position: relative;
  background: var(--cm-card);
  border: 1px solid var(--cm-line);
  border-radius: 15px;
  padding: 14px 15px 12px;
  box-shadow: var(--cm-shadow);
  cursor: pointer;
  transition: all .16s;
  /* 左侧彩色细条标识类型，比整块上色更克制 */
  border-left: 3px solid var(--ws-color, #8B5CF6);
}
.cm-ws-card:hover {
  box-shadow: var(--cm-shadow-hover);
  transform: translateY(-1px);
}

.cm-ws-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 7px;
  flex-wrap: wrap;
}
.cm-ws-kind {
  font-size: 10px;
  font-weight: 600;
  color: var(--ws-color, #8B5CF6);
  background: color-mix(in srgb, var(--ws-color, #8B5CF6) 11%, white);
  padding: 2px 7px;
  border-radius: 5px;
  white-space: nowrap;
}
/* color-mix 有兼容性顾虑，兜底一个浅底 */
@supports not (background: color-mix(in srgb, red 10%, white)) {
  .cm-ws-kind { background: #F5F3FF; }
}
.cm-ws-tag {
  font-size: 10.5px;
  padding: 2px 6px;
  border-radius: 5px;
  background: #F3F4F6;
  color: #6B7280;
  white-space: nowrap;
}
.cm-ws-tag-open { background: #FFF4E5; color: #B9741A; }
.cm-ws-tag-claimed { background: #E9F0FF; color: #2B6CB0; }
.cm-ws-tag-done { background: #E9F8F1; color: #1F7A5A; }
.cm-ws-tag-review { background: #F5F3FF; color: #7C4DD6; }
.cm-ws-tag-rej { background: #FDECEA; color: #C0392B; }
.cm-ws-urgent {
  font-size: 10.5px;
  font-weight: 700;
  color: #fff;
  background: #E8453C;
  padding: 2px 5px;
  border-radius: 4px;
  white-space: nowrap;
}

.cm-ws-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--cm-text);
  line-height: 1.4;
  letter-spacing: -.01em;
  margin-bottom: 5px;
}
.cm-ws-desc {
  font-size: 12px;
  color: var(--cm-text-2);
  line-height: 1.65;
  /* 卡片上只露三行，详情里看全文 */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 进度条 */
.cm-ws-prog {
  height: 4px;
  border-radius: 2px;
  background: #F3EDE4;
  margin: 9px 0 0;
  overflow: hidden;
}
.cm-ws-prog i {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, #A78BFA, #8B5CF6);
  transition: width .4s ease;
}

.cm-ws-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
  font-size: 10.5px;
  color: var(--cm-text-3);
  flex-wrap: wrap;
}
.cm-ws-owner {
  font-weight: 600;
  color: #9C8E7C;
}
.cm-ws-progtip { color: #8B5CF6; font-weight: 600; }
.cm-ws-date { color: var(--cm-text-3); }

/* 卡片内动作区 */
.cm-ws-acts {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px dashed var(--cm-line);
}
.cm-ws-hint { font-size: 10.5px; color: var(--cm-text-3); }

/* ---------- 脚注 ---------- */
.cm-ws-note {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 9px;
  background: #FAF8F5;
  font-size: 10.5px;
  color: #9C8E7C;
  line-height: 1.7;
}

/* ---------- 发布表单 ---------- */
.cm-form-label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--cm-text-2);
  margin: 12px 0 5px;
}
.cm-form-label:first-child { margin-top: 0; }
.cm-form-req {
  font-size: 10.5px;
  color: #E8453C;
  font-weight: 600;
  margin-left: 3px;
}
.cm-form-hint {
  font-size: 10.5px;
  color: var(--cm-text-3);
  margin-top: 4px;
  line-height: 1.5;
}

/* 类型选择：三块大按钮，比下拉框更直观 */
.cm-ws-kindpick {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-bottom: 4px;
}
.cm-ws-kindbtn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 4px 8px;
  border-radius: 11px;
  border: 1.5px solid var(--cm-line);
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.25;
  transition: all .15s;
}
.cm-ws-kindbtn span {
  font-size: 11px;
  font-weight: 600;
  color: var(--cm-text);
}
.cm-ws-kindbtn small {
  font-size: 10.5px;
  color: var(--cm-text-3);
  white-space: nowrap;
}
.cm-ws-kindbtn.active {
  border-color: #8B5CF6;
  background: #F7F5FF;
}
.cm-ws-kindbtn.active span { color: #6D3FD6; }

.cm-ws-urgentpick { display: flex; gap: 8px; }

/* ---------- 揭榜方式选择 ---------- */
.cm-ws-waypick {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cm-ws-waybtn {
  display: grid;
  grid-template-columns: 30px 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: center;
  text-align: left;
  padding: 11px 13px;
  border-radius: 11px;
  border: 1.5px solid var(--cm-line);
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
}
.cm-ws-wayemoji { grid-row: 1 / 3; font-size: 20px; text-align: center; }
.cm-ws-wayname { font-size: 12.5px; font-weight: 600; color: var(--cm-text); }
.cm-ws-waybtn small { font-size: 10px; color: var(--cm-text-3); }
.cm-ws-waybtn.active {
  border-color: #8B5CF6;
  background: #F7F5FF;
}

/* ---------- 详情 ---------- */
.cm-ws-dhead { margin-bottom: 10px; }
.cm-ws-dkind {
  font-size: 10.5px;
  font-weight: 600;
  color: #8B5CF6;
  margin-bottom: 5px;
}
.cm-ws-dtitle {
  margin: 0 0 5px;
  font-size: 16px;
  font-weight: 700;
  color: var(--cm-text);
  line-height: 1.4;
}
.cm-ws-dmeta { font-size: 11px; color: var(--cm-text-3); }
.cm-ws-ddesc {
  font-size: 12.5px;
  color: var(--cm-text-2);
  line-height: 1.75;
  background: #FAF8F5;
  border-radius: 9px;
  padding: 11px 12px;
  margin-bottom: 12px;
}
.cm-ws-dprog { margin-bottom: 12px; }
.cm-ws-dprogtip {
  font-size: 10.5px;
  color: #8B5CF6;
  font-weight: 600;
  margin-top: 5px;
  text-align: right;
}

/* 揭榜人名单 */
.cm-ws-claims {
  border-top: 1px dashed var(--cm-line);
  padding-top: 11px;
}
.cm-ws-claims-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--cm-text-2);
  margin-bottom: 9px;
}
.cm-ws-claimrow {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 7px 0;
}
.cm-ws-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #7A4A22;
}
.cm-ws-claimbody { flex: 1; min-width: 0; }
.cm-ws-claimname {
  font-size: 12px;
  font-weight: 600;
  color: var(--cm-text);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.cm-ws-way {
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #F0EBFF;
  color: #6D3FD6;
  font-weight: 600;
}
.cm-ws-way-done { background: #E9F8F1; color: #1F7A5A; }
.cm-ws-claimnote {
  font-size: 11px;
  color: var(--cm-text-2);
  margin-top: 3px;
  line-height: 1.5;
}
.cm-ws-noclaim {
  text-align: center;
  font-size: 11.5px;
  color: var(--cm-text-3);
  padding: 16px 0 6px;
  border-top: 1px dashed var(--cm-line);
}

/* 审核区 */
.cm-ws-reviewbox {
  margin-top: 12px;
  padding: 11px 12px;
  border-radius: 10px;
  background: #F7F5FF;
  border: 1px solid #E4DCFF;
}
.cm-ws-reviewtip { font-size: 11px; color: #6D3FD6; line-height: 1.6; }

/* 揭榜弹窗头 */
.cm-ws-claimhead {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--cm-text);
  padding: 0 0 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--cm-line);
  line-height: 1.5;
}

/* ---------- 手机端 ---------- */
@media (max-width: 620px) {
  .cm-ws-stats { gap: 6px; }
  .cm-ws-stat { padding: 9px 4px; border-radius: 9px; }
  .cm-ws-stat strong { font-size: 17px; }
  .cm-ws-stat small { font-size: 10.5px; }
  .cm-ws-card { padding: 12px 13px 11px; border-radius: 13px; }
  .cm-ws-title { font-size: 13.5px; }
  .cm-ws-desc { font-size: 11.5px; }
  .cm-ws-kindbtn { padding: 9px 3px 7px; font-size: 15px; }
  .cm-ws-kindbtn span { font-size: 10.5px; }
  .cm-ws-kindbtn small { font-size: 10.5px; }
  .cm-ws-dtitle { font-size: 15px; }
}

/* ============================================================
 * 首页 · 两大板块（善物资 / 善服务）
 * 两个板块用不同的底色和左侧竖线区分——第一眼就知道「换区了」，
 * 靠间距区分不够，长页面滚到底会分不清自己在哪一块。
 * ============================================================ */
.cm-sec {
  margin-bottom: 26px;
  padding: 16px 15px 18px;
  border-radius: 16px;
  border: 1px solid var(--cm-line);
}
.cm-sec-goods {
  background: linear-gradient(180deg, #FFFDFB 0%, #FFFCF8 100%);
  border-color: #F5E6D8;
}
.cm-sec-service {
  background: linear-gradient(180deg, #FCFDFF 0%, #F8FBFF 100%);
  border-color: #E3EBF5;
}

/* 板块头：emoji + 标题 + 四个子板块快捷跳转 */
.cm-sec-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.cm-sec-head-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.cm-sec-emoji {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  font-size: 21px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--cm-line);
  flex-shrink: 0;
}
.cm-sec-head-main h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--cm-text-1);
  line-height: 1.2;
}
.cm-sec-head-main small {
  display: block;
  font-size: 11.5px;
  color: var(--cm-text-3);
  margin-top: 2px;
}
.cm-sec-nav {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.cm-sec-navbtn {
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--cm-line);
  background: #fff;
  color: var(--cm-text-2);
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: all .15s;
}
.cm-sec-navbtn:hover { border-color: var(--cm-red); color: var(--cm-red); }

/* 板块内的三张入口卡：一列三张，手机上也不会挤 */
.cm-home-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 14px 0 6px;
}

/* ---------- 子板块横向紧凑条 ----------
   替代原来的三张竖排大卡（cm-home-tiles）。
   动因：手机端「善物资」整段 2422px，「善服务」被顶到第 6 屏，
   用户根本翻不到——入口占位太多是主因。 */
.cm-rows {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 12px 0 4px;
}
.cm-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px 9px 10px;
  background: #fff;
  border: 1px solid var(--cm-line);
  border-left: 3px solid var(--rc, #2BA471);
  border-radius: 11px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: all .15s;
}
.cm-row:hover {
  border-color: var(--rc, #2BA471);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
  transform: translateX(1px);
}
.cm-row-ico {
  width: 34px; height: 34px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  border-radius: 9px;
  background: var(--rs, #F3F4F6);
}
.cm-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cm-row-name {
  display: flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 700; color: var(--cm-text-1);
  line-height: 1.25;
}
.cm-row-tag {
  font-size: 10.5px; font-style: normal; font-weight: 600;
  color: var(--rc, #2BA471);
  background: var(--rs, #F3F4F6);
  border-radius: 5px;
  padding: 1px 5px;
  flex-shrink: 0;
}
.cm-row-sub {
  font-size: 11.5px; color: var(--cm-text-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cm-row-right {
  flex-shrink: 0;
  font-size: 11.5px;
  color: var(--cm-text-2);
  display: flex; align-items: center; gap: 3px;
}
.cm-row-right i { font-style: normal; color: var(--rc, #2BA471); font-weight: 700; font-size: 14px; }

/* ---------- 首页横排小商品卡 ----------
   比 prodCard 矮一半（图 64px 而不是 213px）。
   首页只做「东西不错，点进去看」的引子，不搬整个货架。 */
.cm-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-bottom: 6px;
}
.cm-mini {
  background: #fff;
  border: 1px solid var(--cm-line);
  border-radius: 11px;
  overflow: hidden;
  cursor: pointer;
  min-width: 0;
  transition: all .15s;
}
.cm-mini:hover { transform: translateY(-2px); box-shadow: 0 3px 12px rgba(0, 0, 0, .07); }
.cm-mini-img {
  height: 64px;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
  background: linear-gradient(150deg, #FFF8F0, #FFEFE2);
}
.cm-mini-name {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--cm-text-1);
  padding: 7px 9px 0;
  /* 两行写死，三张等高 */
  height: 41px;
  overflow: hidden;
}
.cm-mini-foot {
  display: flex; align-items: baseline; gap: 5px;
  padding: 3px 9px 9px;
  flex-wrap: nowrap;
  overflow: hidden;
}
.cm-mini-foot strong { font-size: 14.5px; color: var(--cm-red); font-weight: 800; flex-shrink: 0; }
.cm-mini-foot strong::before { content: '¥'; font-size: 10px; font-weight: 600; margin-right: 1px; }
.cm-mini-foot small {
  font-size: 10.5px;
  color: var(--cm-text-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 首页善服务里的幸福善集：活动卡在独立板块页是竖排整宽（信息多），
   首页只放「即将开始」的两三条，铺满 1100px 会空得难受，改两列并排。
   第十轮时序调整：这段卡片已挪到「善物资」段收尾，
   所以选择器改成不绑定板块，两个板块里都能正常两列。 */
.cm-fair-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (max-width: 720px) {
  .cm-fair-list { grid-template-columns: 1fr; }
}

/* ---------- 首页排行榜预览 ---------- */
.cm-skel { display: flex; gap: 6px; padding: 8px 0; }
.cm-skel i {
  flex: 1; height: 46px; border-radius: 10px;
  background: linear-gradient(90deg, #F3EEE7 25%, #FAF7F2 50%, #F3EEE7 75%);
  background-size: 200% 100%;
  animation: cm-shine 1.2s infinite;
}
@keyframes cm-shine { 0% { background-position: 200% 0 } 100% { background-position: -200% 0 } }

.cm-home-rank {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 4px;
}
.cm-hrk-block {
  background: #fff;
  border: 1px solid var(--cm-line);
  border-radius: 13px;
  padding: 11px 12px 8px;
  min-width: 0;
}
.cm-hrk-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
}
.cm-hrk-ico { font-size: 18px; flex-shrink: 0; }
.cm-hrk-head strong {
  display: block;
  /* 榜单是这一屏的主角，标题要压得住场——
     之前 12.5px 跟板块名（18px）差太远，看着像是卡片里的附注 */
  font-size: 14.5px;
  font-weight: 800;
  color: var(--cm-text-1);
  line-height: 1.2;
  letter-spacing: -.2px;
}
.cm-hrk-head small {
  display: block;
  font-size: 11px;
  color: var(--cm-text-3);
  margin-top: 2px;
}
.cm-hrk-head > div { flex: 1; min-width: 0; }
.cm-hrk-more {
  font-size: 10px;
  color: var(--cm-red);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  padding: 2px 0;
  flex-shrink: 0;
}
.cm-hrk-more:hover { text-decoration: underline; }

.cm-hrk-list { display: flex; flex-direction: column; gap: 1px; }
.cm-hrk-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 4px;
  border-radius: 7px;
  font-size: 11.5px;
  min-width: 0;
  /* 零成交 / 已结课的行稍微淡一点 */
}
.cm-hrk-row.top { background: #FFFAF0; }
.cm-hrk-row[data-cm-prod] { cursor: pointer; }
.cm-hrk-row[data-cm-prod]:hover { background: #F7F3ED; }
.cm-hrk-medal {
  width: 17px;
  text-align: center;
  font-size: 11px;
  flex-shrink: 0;
  color: var(--cm-text-3);
  font-weight: 600;
}
.cm-hrk-emoji { font-size: 14px; flex-shrink: 0; }
.cm-hrk-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--cm-text-1);
}
.cm-hrk-val {
  flex-shrink: 0;
  text-align: right;
  line-height: 1.25;
}
.cm-hrk-val strong {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--cm-red);
}
.cm-hrk-val small {
  display: block;
  font-size: 10.5px;
  color: var(--cm-text-3);
}

.cm-home-empty {
  padding: 16px 10px;
  text-align: center;
  font-size: 11.5px;
  color: var(--cm-text-3);
}
.cm-home-empty-sub { font-size: 10px; margin-top: 4px; opacity: .8; }
.cm-linkbtn {
  background: none; border: none; padding: 0;
  color: var(--cm-red); font-family: inherit; font-size: inherit;
  cursor: pointer; text-decoration: underline;
}

/* ---------- 首页善心愿 ---------- */
.cm-home-wish { margin-bottom: 4px; }

.cm-hws-kpi {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.cm-hws-kpi-i {
  /* 数字 + 标签横排，块矮一点、信息密度高一点；
     原来竖排 9px padding 在 1440px 宽屏上显得空荡 */
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--cm-line);
  border-radius: 11px;
  padding: 10px 8px;
  text-align: center;
}
.cm-hws-kpi-i strong {
  font-size: 20px;
  font-weight: 800;
  color: #7C4DD1;
  line-height: 1;
}
.cm-hws-kpi-i small {
  font-size: 11.5px;
  color: var(--cm-text-2);
  margin-top: 0;
}
/* 三个数字各给一个语义色，一眼能分出「待办 / 成绩 / 人」 */
.cm-hws-kpi-i:nth-child(1) strong { color: #E8833A; }
.cm-hws-kpi-i:nth-child(2) strong { color: #2BA471; }
.cm-hws-kpi-i:nth-child(3) strong { color: #7C4DD1; }

.cm-hws-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: var(--cm-text-1);
  margin: 10px 0 8px;
}

.cm-hws-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}
.cm-hws-item {
  background: #fff;
  border: 1px solid var(--cm-line);
  border-left: 3px solid var(--ws-color, #8B5CF6);
  border-radius: 11px;
  padding: 9px 10px;
  cursor: pointer;
  min-width: 0;
  transition: all .15s;
  /* 列布局：底部的进度条/参与人数固定贴底，标题多长都不会把它顶出去 */
  display: flex;
  flex-direction: column;
}
.cm-hws-item:hover { box-shadow: 0 3px 12px rgba(0,0,0,.07); transform: translateY(-1px); }
.cm-hws-top {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 5px;
  flex-wrap: wrap;
}
.cm-hws-kind {
  font-size: 10.5px;
  color: var(--ws-color, #8B5CF6);
  font-weight: 600;
  white-space: nowrap;
}
.cm-hws-title {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--cm-text-1);
  margin-bottom: 2px;
  /* 固定两行高度（12.5px × 1.45 × 2 ≈ 36px）。
     教训：之前用 -webkit-line-clamp 配 min-height:34px，clamp 在
     display:-webkit-box 被算成 flow-root 后只留一行高度，正文被裁得
     只剩几个残字（截图里只剩「旧」「纪」）。改成写死高度更稳。
     也不取三行高度——短标题下方会空出一大块，看着像没内容。 */
  height: 34px;
  overflow: hidden;
  word-break: break-word;
}
.cm-hws-foot {
  display: flex;
  justify-content: space-between;
  /* 撑开剩余空间，把参与情况压到卡片底部，三张卡底部对齐 */
  margin-top: auto;
  padding-top: 6px;
  font-size: 11px;
  color: var(--cm-text-2);
  gap: 4px;
}
.cm-hws-foot span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 提榜人名字给点分量，别让它看着像脚注 */
.cm-hws-foot span:first-child { font-weight: 600; color: var(--cm-text-1); }

/* 已实现的：一行一个，做成「成绩单」的样子 */
.cm-hws-done-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: #fff;
  border: 1px solid var(--cm-line);
  border-radius: 11px;
  overflow: hidden;
}
.cm-hws-done {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  font-size: 11.5px;
  cursor: pointer;
}
.cm-hws-done:hover { background: #FAFBFC; }
.cm-hws-done-ico { flex-shrink: 0; font-size: 13px; }
.cm-hws-done-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--cm-text-1);
}
.cm-hws-done-by {
  flex-shrink: 0;
  font-size: 10px;
  color: var(--cm-text-3);
}

@media (max-width: 620px) {
  .cm-sec { padding: 13px 11px 15px; border-radius: 13px; margin-bottom: 18px; }
  .cm-sec-head { gap: 9px; margin-bottom: 11px; }
  .cm-sec-head-main h2 { font-size: 16px; }
  .cm-sec-emoji { width: 34px; height: 34px; font-size: 18px; border-radius: 10px; }
  .cm-sec-nav { width: 100%; }
  .cm-sec-navbtn { font-size: 10px; padding: 3px 8px; }
  .cm-home-tiles { grid-template-columns: 1fr; gap: 8px; }
  /* 手机端：小商品卡两列（三列每个只有 110px，名字全折成三行反而更高），
     紧凑条再压一点内边距 */
  .cm-mini-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .cm-mini-img { height: 58px; font-size: 27px; }
  .cm-rows { gap: 6px; margin: 10px 0 4px; }
  .cm-row { padding: 8px 10px 8px 9px; gap: 9px; }
  .cm-row-ico { width: 32px; height: 32px; font-size: 17px; }
  .cm-row-name { font-size: 13.5px; }
  .cm-row-sub { font-size: 11px; }
  .cm-row-right { font-size: 11px; }
  /* 手机端两张榜改为上下排——并排的话每张只有 170px，名字全被截断 */
  .cm-home-rank { grid-template-columns: 1fr; gap: 8px; }
  .cm-hws-list { grid-template-columns: 1fr; gap: 8px; }
  .cm-hws-kpi-i strong { font-size: 17px; }
}

/* ============================================================
 * 慈善课堂
 * 和商品板块不同：用户判断「要不要报」靠的是时间和名额，
 * 所以卡片左侧单独留一列放日期，字号比正文大。
 * ============================================================ */
.cm-cl-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.cm-cl-stat {
  background: #fff;
  border: 1px solid var(--cm-line);
  border-radius: 11px;
  padding: 11px 6px;
  text-align: center;
}
.cm-cl-stat strong {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: #3B82F6;
  line-height: 1.1;
}
.cm-cl-stat small { display: block; font-size: 10px; color: var(--cm-text-3); margin-top: 3px; }

.cm-cl-bar { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }

.cm-cl-list { display: flex; flex-direction: column; gap: 11px; }

.cm-cl-card {
  background: #fff;
  border: 1px solid var(--cm-line);
  border-left: 3px solid var(--cl-color, #3B82F6);
  border-radius: 13px;
  padding: 13px 14px;
  cursor: pointer;
  transition: all .16s;
}
.cm-cl-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.07); transform: translateY(-1px); }

.cm-cl-card-top { display: flex; gap: 12px; min-width: 0; }
.cm-cl-date {
  flex-shrink: 0;
  width: 46px;
  text-align: center;
  background: #F8FAFC;
  border: 1px solid var(--cm-line);
  border-radius: 10px;
  padding: 6px 0 5px;
}
.cm-cl-date strong {
  display: block;
  font-size: 19px;
  font-weight: 800;
  line-height: 1;
  color: var(--cl-color, #3B82F6);
}
.cm-cl-date small {
  display: block;
  font-size: 10.5px;
  color: var(--cm-text-2);
  margin-top: 2px;
}
.cm-cl-card-main { flex: 1; min-width: 0; }

.cm-cl-tags { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; margin-bottom: 5px; }
.cm-cl-kind {
  font-size: 10px;
  font-weight: 600;
  color: var(--cl-color, #3B82F6);
  background: #EFF6FF;
  padding: 1px 6px;
  border-radius: 5px;
  white-space: nowrap;
}
.cm-cl-tag {
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 5px;
  background: #F3F4F6;
  color: var(--cm-text-3);
  white-space: nowrap;
}
.cm-cl-tag-open { background: #E8F6EE; color: #2BA471; }
.cm-cl-tag-live { background: #FEF3C7; color: #B45309; }
.cm-cl-tag-done { background: #F3F4F6; color: #6B7280; }
.cm-cl-tag-wait { background: #EDE9FE; color: #7C4DD1; }

.cm-cl-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--cm-text-1);
  line-height: 1.35;
  margin-bottom: 6px;
}
.cm-cl-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 10.5px;
  color: var(--cm-text-3);
}
.cm-cl-desc {
  font-size: 11.5px;
  color: var(--cm-text-2);
  line-height: 1.6;
  margin: 9px 0 7px;
  padding-top: 8px;
  border-top: 1px dashed var(--cm-line);
}
.cm-cl-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10.5px;
  color: var(--cm-text-3);
  margin-top: 6px;
}
.cm-cl-teacher { font-weight: 500; }

.cm-cl-seat {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
  font-size: 10px;
  color: var(--cm-text-3);
}
.cm-cl-seat-bar {
  flex: 1;
  height: 5px;
  background: #F1F5F9;
  border-radius: 999px;
  overflow: hidden;
}
.cm-cl-seat-bar i {
  display: block;
  height: 100%;
  background: #3B82F6;
  border-radius: 999px;
  transition: width .3s;
}

.cm-cl-acts { margin-top: 10px; display: flex; justify-content: flex-end; }
.cm-cl-signed { font-size: 11px; color: #2BA471; font-weight: 600; }
.cm-cl-full { font-size: 11px; color: #E8453C; font-weight: 600; }
.cm-cl-hint { font-size: 11px; color: var(--cm-text-3); }

/* 详情 */
.cm-cl-dhead {
  background: #F8FAFC;
  border-radius: 11px;
  padding: 13px 14px;
  margin-bottom: 12px;
}
.cm-cl-dtitle { font-size: 16px; font-weight: 700; margin: 6px 0 8px; line-height: 1.35; }
.cm-cl-dtime { font-size: 12px; color: var(--cm-text-2); margin-top: 4px; }
.cm-cl-ddesc {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--cm-text-2);
  margin-bottom: 12px;
  white-space: pre-wrap;
}
.cm-cl-dseat {
  font-size: 12px;
  color: var(--cm-text-2);
  background: #FFF8ED;
  border-radius: 8px;
  padding: 8px 11px;
  margin-bottom: 12px;
}
.cm-cl-dlist-title {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--cm-text-3);
  margin-bottom: 7px;
}
.cm-cl-dlist { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.cm-cl-dperson {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  background: #F5F7FA;
  border-radius: 999px;
  padding: 3px 9px 3px 4px;
  color: var(--cm-text-2);
}
.cm-cl-dperson.me { background: #E8F6EE; color: #2BA471; font-weight: 600; }
.cm-cl-dperson i {
  width: 16px; height: 16px;
  border-radius: 50%;
  display: inline-block;
}
.cm-cl-manage {
  display: flex;
  gap: 7px;
  padding-top: 12px;
  border-top: 1px dashed var(--cm-line);
  flex-wrap: wrap;
}

/* 开课表单的类型选择 */
.cm-cl-kindpick {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-bottom: 14px;
}
.cm-cl-kindbtn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 9px 4px;
  border-radius: 10px;
  border: 1.5px solid var(--cm-line);
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: 17px;
  transition: all .15s;
}
.cm-cl-kindbtn span { font-size: 10.5px; color: var(--cm-text-2); }
.cm-cl-kindbtn.active { border-color: #3B82F6; background: #EFF6FF; }
.cm-cl-kindbtn.active span { color: #2563EB; font-weight: 600; }

@media (max-width: 620px) {
  .cm-cl-stats { grid-template-columns: repeat(2, 1fr); }
  .cm-cl-card { padding: 11px 12px; }
  .cm-cl-title { font-size: 13px; }
  .cm-cl-meta { gap: 8px; font-size: 10px; }
  .cm-cl-date { width: 40px; }
  .cm-cl-date strong { font-size: 17px; }
  .cm-cl-kindpick { grid-template-columns: repeat(2, 1fr); }

  /* 手机端二级 tab 条：一级导航在手机上是「图标+文字」两行，实测 ~62px，
     sticky 下沿必须跟着改，否则滚动时会被一级导航压住半截。
     ⚠️ 不横滑：4 个二级 tab 等分铺满，每个 ~90px。
     教训和一级导航一样——横滑会把最后一项切在屏幕外（截图里「善物易站」
     只露出半截），用户根本不会想到去滑，等于这个模块不存在。 */
  .cm-subtabbar {
    /* header 66 + 一级导航 66 = 132px */
    top: 132px;
    padding: 6px 14px 8px;
    margin-bottom: 12px;
    gap: 5px;
    overflow-x: visible;
  }
  .cm-subtab {
    flex: 1 1 0;
    min-width: 0;
    font-size: 12px;
    padding: 6px 2px;
    /* 触控区不低于 34px，手指点得准 */
    min-height: 34px;
    text-align: center;
    /* 放不下就缩字号，绝不换行——格子里必须完整显示 */
    white-space: nowrap;
    letter-spacing: -.2px;
  }
  .cm-subtab span {
    font-size: 11.5px;
    letter-spacing: -.2px;
  }
}

/* 超窄屏（iPhone SE 375px）：4 个二级 tab 每个 ~85px，
   「善物易站」四个字需要再省 1px 字号 */
@media (max-width: 380px) {
  .cm-subtab span { font-size: 11px; letter-spacing: -.4px; }
  .cm-subtab { padding: 6px 0; }
}

/* ============================================================
 * 善资助板块 + 善项目（第十一轮新增，2026-10-27）
 *
 * 「善资助」把原来散在善服务里的善心愿收了过来，并新增善项目。
 * 两类东西的共同点：都是「你出手帮一把」，一个给具体的人，一个给一群人。
 *
 * 只展示不资助：项目页没有任何支付按钮，一律标注线下入账。
 * ============================================================ */

/* 板块底色：跟前两块区分开，一眼知道换区了 */
.cm-sec-aid {
  background: linear-gradient(180deg, #FFFCFD 0%, #FFF9FB 100%);
  border-color: #F7E4EC;
}

/* ==================== 项目卡（板块页） ==================== */
.cm-pj-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 11px;
  margin-top: 12px;
}
.cm-pj {
  background: #fff;
  border: 1px solid var(--cm-line);
  border-left: 3px solid var(--pj-color, #2BA471);
  border-radius: 12px;
  padding: 12px 13px 11px;
  cursor: pointer;
  transition: all .16s;
  display: flex;
  flex-direction: column;
}
.cm-pj:hover {
  box-shadow: 0 5px 18px rgba(0, 0, 0, .08);
  transform: translateY(-2px);
}

.cm-pj-top {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 7px;
}
.cm-pj-emoji {
  width: 36px; height: 36px;
  flex-shrink: 0;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px;
  background: color-mix(in srgb, var(--pj-color, #2BA471) 12%, #fff);
}
.cm-pj-head { flex: 1; min-width: 0; }
.cm-pj-title {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--cm-text-1);
  /* 固定两行高度：标题长短不一，不锁高卡片高度会参差，
     同排两张卡底部对不齐很难看 */
  height: 37px;
  overflow: hidden;
  word-break: break-word;
}
.cm-pj-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
  font-size: 11px;
  color: var(--cm-text-3);
  flex-wrap: wrap;
}
.cm-pj-cat { color: var(--pj-color, #2BA471); font-weight: 600; }
.cm-pj-dl { color: #E8833A; }

/* 状态标签：四种状态四种色，不靠文字颜色区分（色盲友好：文字本身就不同） */
.cm-pj-tag {
  flex-shrink: 0;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 6px;
  white-space: nowrap;
}
.cm-pj-tag-raising { background: #FFF1E6; color: #D97706; }
.cm-pj-tag-reached { background: #E9F8F1; color: #2BA471; }
.cm-pj-tag-building { background: #EFF6FF; color: #3B82F6; }
.cm-pj-tag-done { background: #F3F4F6; color: #6B7280; }

.cm-pj-desc {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--cm-text-2);
  /* 两行截断：写死高度而不是 line-clamp，
     clamp 配 -webkit-box 时计算值会变成 flow-root，只留一行（踩过） */
  height: 34px;
  overflow: hidden;
  word-break: break-word;
  margin-bottom: 9px;
}

/* 进度条：项目页最关键的视觉——筹到多少一眼看到 */
.cm-pj-prog { margin-bottom: 8px; }
.cm-pj-prog-bar {
  height: 6px;
  background: #F2F4F7;
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 6px;
}
.cm-pj-prog-bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--pj-color, #2BA471), #7ED9A9);
  transition: width .45s ease;
}
.cm-pj-prog-num {
  display: flex;
  align-items: baseline;
  gap: 5px;
  font-size: 11px;
  color: var(--cm-text-3);
}
.cm-pj-prog-num strong {
  font-size: 15px;
  font-weight: 800;
  color: var(--cm-text-1);
}
.cm-pj-prog-num em {
  font-style: normal;
  margin-left: auto;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--pj-color, #2BA471);
}

.cm-pj-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dashed var(--cm-line);
  font-size: 11px;
  color: var(--cm-text-2);
}
.cm-pj-more { margin-left: auto; color: var(--pj-color, #2BA471); font-weight: 600; }

.cm-pj-latest {
  margin-top: 8px;
  padding: 7px 9px;
  background: #FAFBFC;
  border-radius: 8px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--cm-text-2);
  height: 45px;
  overflow: hidden;
}
.cm-pj-latest span {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: var(--pj-color, #2BA471);
  padding: 1px 5px;
  border-radius: 4px;
  margin-right: 5px;
}

/* 公示说明条：放在列表上方，必须先于金额被看到 */
.cm-pj-notice {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 9px 12px;
  margin: 12px 0 4px;
  background: #F8FAFF;
  border: 1px solid #E3EBF5;
  border-radius: 10px;
  font-size: 11.5px;
  line-height: 1.5;
  color: #4B5563;
}
.cm-pj-notice-ico { flex-shrink: 0; }

/* ==================== 项目详情（弹窗内） ==================== */
.cm-pjd-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--cm-line);
}
.cm-pjd-emoji {
  width: 50px; height: 50px;
  flex-shrink: 0;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  background: color-mix(in srgb, var(--pj-color, #2BA471) 12%, #fff);
}
.cm-pjd-hero-main { flex: 1; min-width: 0; }
.cm-pjd-title {
  font-size: 15.5px;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 4px;
  word-break: break-word;
}
.cm-pjd-cat { font-size: 11.5px; color: var(--cm-text-3); }

.cm-pjd-money {
  margin: 12px 0;
  padding: 13px 14px;
  background: #FAFBFC;
  border-radius: 11px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.cm-pjd-money-main { flex: 1; min-width: 140px; }
.cm-pjd-money-main strong {
  display: block;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.1;
  color: #2BA471;
}
.cm-pjd-money-main small { font-size: 11.5px; color: var(--cm-text-3); }
.cm-pjd-money-side {
  display: flex;
  gap: 16px;
  text-align: right;
}
.cm-pjd-money-side strong { display: block; font-size: 15px; font-weight: 800; }
.cm-pjd-money-side small { font-size: 10.5px; color: var(--cm-text-3); }
.cm-pjd-dl { color: #E8833A; font-size: 13px !important; }
.cm-pjd-bar { margin-top: 10px; flex-basis: 100%; }

/* 不资助的说明块：替代一个点不了的按钮 */
.cm-pjd-nodn {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 13px;
  margin-bottom: 14px;
  background: #F0F9F4;
  border: 1px solid #D6EDE0;
  border-radius: 11px;
}
.cm-pjd-nodn-ico { font-size: 17px; flex-shrink: 0; }
.cm-pjd-nodn strong { display: block; font-size: 12.5px; margin-bottom: 3px; }
.cm-pjd-nodn small { font-size: 11.5px; line-height: 1.5; color: #4B7A61; }

.cm-pjd-sec { margin-bottom: 16px; }
.cm-pjd-sec-title {
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.cm-pjd-sec-title em {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--cm-text-3);
  background: #F3F4F6;
  padding: 1px 6px;
  border-radius: 99px;
}
.cm-pjd-desc {
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--cm-text-2);
  word-break: break-word;
}
.cm-pjd-none {
  font-size: 11.5px;
  color: var(--cm-text-3);
  padding: 10px 0;
}

/* 进展时间轴 */
.cm-pjd-timeline {
  position: relative;
  padding-left: 20px;
}
.cm-pjd-timeline::before {
  content: '';
  position: absolute;
  left: 6px; top: 6px; bottom: 6px;
  width: 1px;
  background: var(--cm-line);
}
.cm-pjd-tl {
  position: relative;
  padding-bottom: 12px;
}
.cm-pjd-tl-dot {
  position: absolute;
  left: -20px; top: 0;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--cm-line);
  display: flex; align-items: center; justify-content: center;
  font-size: 7px;
  line-height: 1;
}
.cm-pjd-tl.latest .cm-pjd-tl-dot {
  border-color: #2BA471;
  background: #E9F8F1;
}
.cm-pjd-tl-text {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--cm-text-1);
  word-break: break-word;
}
.cm-pjd-tl-meta {
  font-size: 10.5px;
  color: var(--cm-text-3);
  margin-top: 3px;
}

/* 资助人名单 */
.cm-pjd-dons {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: #fff;
  border: 1px solid var(--cm-line);
  border-radius: 10px;
  overflow: hidden;
}
.cm-pjd-don {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  font-size: 12px;
}
.cm-pjd-don + .cm-pjd-don { border-top: 1px solid #F7F8FA; }
.cm-pjd-don-av {
  width: 22px; height: 22px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #E9F8F1;
  color: #2BA471;
  font-size: 11px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.cm-pjd-don-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-pjd-don-amt { font-weight: 700; color: #2BA471; }

/* ==================== 首页：善项目 ==================== */
.cm-hpj-kpi {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.cm-hpj-kpi-i {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--cm-line);
  border-radius: 11px;
  padding: 10px 8px;
}
.cm-hpj-kpi-i strong {
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  color: var(--cm-text-1);
}
.cm-hpj-kpi-i:nth-child(1) strong { color: #E8833A; }
.cm-hpj-kpi-i:nth-child(2) strong { color: #2BA471; }
.cm-hpj-kpi-i:nth-child(3) strong { color: #7C4DD1; }
.cm-hpj-kpi-i small { font-size: 11px; color: var(--cm-text-2); }

.cm-hpj-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}
.cm-hpj {
  background: #fff;
  border: 1px solid var(--cm-line);
  border-left: 3px solid var(--pj-color, #2BA471);
  border-radius: 11px;
  padding: 10px 11px;
  cursor: pointer;
  transition: all .15s;
}
.cm-hpj:hover { box-shadow: 0 3px 12px rgba(0, 0, 0, .07); transform: translateY(-1px); }
.cm-hpj-top {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
}
.cm-hpj-emoji { font-size: 17px; flex-shrink: 0; }
.cm-hpj-title {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cm-hpj-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-top: 7px;
  font-size: 10.5px;
  color: var(--cm-text-3);
}
.cm-hpj-amt strong { font-size: 13.5px; font-weight: 800; color: var(--cm-text-1); }
.cm-hpj-side { white-space: nowrap; }

/* 幸福善集段首小标题（从善服务段首用） */
.cm-hfair-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--cm-text-1);
  margin: 2px 0 8px;
}

/* ==================== 手机端 ==================== */
@media (max-width: 620px) {
  .cm-pj-list { grid-template-columns: 1fr; gap: 9px; }
  .cm-pj { padding: 11px 12px 10px; }
  .cm-pj-title { font-size: 13px; height: 35px; }
  .cm-pj-desc { height: 32px; font-size: 11px; }
  .cm-pj-prog-num strong { font-size: 14px; }
  .cm-pj-latest { height: 42px; }

  .cm-hpj-kpi { gap: 6px; margin-bottom: 10px; }
  .cm-hpj-kpi-i { padding: 8px 4px; gap: 4px; }
  .cm-hpj-kpi-i strong { font-size: 15.5px; }
  .cm-hpj-kpi-i small { font-size: 10px; }
  /* 默认跟着文字走，不想让「个项目筹集中」这种 5 字标签把数字挤出去 */
  .cm-hpj-kpi-i small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  .cm-hpj-list { grid-template-columns: 1fr; gap: 8px; }
  .cm-hpj { padding: 9px 10px; }
  .cm-hpj-title { font-size: 12px; }

  .cm-pj-notice { font-size: 11px; padding: 8px 10px; }

  /* 详情弹窗在手机上几乎占满屏，内边距收一点 */
  .cm-pjd-emoji { width: 44px; height: 44px; font-size: 22px; }
  .cm-pjd-money-main strong { font-size: 23px; }
  .cm-pjd-money-side { gap: 12px; }
}
