/* ============================================
   同城便民系统 - H5/公众号移动端样式
   ============================================ */
:root {
  --primary: #2b6cff;
  --primary-dark: #1e56d6;
  --primary-light: #e8f0ff;
  --danger: #ff4d4f;
  --warning: #ff9f0a;
  --success: #00b578;
  --text-main: #1a1a2e;
  --text-sub: #666;
  --text-light: #999;
  --border: #eee;
  --bg: #f5f6fa;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text-main);
  font-size: 14px;
  padding-bottom: 60px;
}

a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
input, textarea, select, button { font-family: inherit; outline: none; -webkit-appearance: none; }

/* 顶部导航 */
.hd {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.05);
}
.hd-inner {
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
}
.hd-title { font-size: 17px; font-weight: 700; }
.hd-logo { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--primary); font-size: 17px; }
.hd-logo i { font-style: normal; font-size: 20px; }
.hd-right { display: flex; gap: 8px; }
.hd-btn {
  padding: 5px 14px;
  border-radius: 15px;
  border: none;
  font-size: 13px;
  cursor: pointer;
  background: #fff;
  color: var(--text-sub);
}
.hd-btn.primary { background: var(--primary); color: #fff; }
.hd-btn.outline { border: 1px solid var(--primary); color: var(--primary); background: #fff; }

/* 搜索栏 */
.search-bar {
  margin: 12px 14px;
  background: #fff;
  border-radius: 20px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  height: 40px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.search-bar input {
  flex: 1;
  border: none;
  background: none;
  font-size: 14px;
  height: 100%;
}
.search-bar .search-icon { margin-right: 8px; font-size: 16px; }

/* 轮播 */
.banner {
  margin: 0 14px;
  height: 140px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, #2b6cff, #5e9bff);
}
.banner-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  padding: 20px;
  text-align: center;
  background-size: cover;
  background-position: center;
}
.banner-slide.active { opacity: 1; }
.banner-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
}
.banner-dots span {
  width: 14px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.5);
}
.banner-dots span.active { background: #fff; width: 22px; }

/* 分类宫格 */
.cat-grid {
  margin: 12px 14px;
  background: #fff;
  border-radius: 12px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 12px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 0;
}
.cat-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
}
.cat-name { font-size: 12px; color: var(--text-sub); }

/* 区块 */
.section { margin: 16px 14px; }
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.section-title h2 {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}
.section-title h2::before {
  content: '';
  width: 4px;
  height: 16px;
  background: var(--primary);
  border-radius: 2px;
}
.section-title .more { color: var(--text-light); font-size: 12px; }

/* 信息列表 - 移动端用横向紧凑卡片 */
.info-list { display: flex; flex-direction: column; gap: 10px; }
.m-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  display: flex;
  gap: 12px;
  padding: 12px;
  cursor: pointer;
  position: relative;
}
.m-card-img {
  width: 96px;
  height: 96px;
  border-radius: 8px;
  background: var(--primary-light);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: #b8cdf5;
  overflow: hidden;
}
.m-card-img img { width: 100%; height: 100%; object-fit: cover; }
.m-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.m-card-title {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.4;
}
.m-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  font-size: 12px;
  color: var(--text-light);
}
.m-card-price { color: var(--danger); font-weight: 700; font-size: 16px; }
.m-tags { position: absolute; top: 8px; left: 8px; display: flex; gap: 4px; }
.tag {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 3px;
  color: #fff;
}
.tag-top { background: var(--danger); }
.tag-essence { background: var(--warning); }
.tag-vip { background: linear-gradient(135deg, #ff9f0a, #ff6b00); }

/* 详情页 */
.detail-card {
  background: #fff;
  margin: 12px 14px;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.detail-title { font-size: 18px; font-weight: 700; line-height: 1.5; }
.detail-meta { display: flex; gap: 12px; color: var(--text-light); font-size: 12px; margin-top: 8px; flex-wrap: wrap; }
.detail-price { font-size: 22px; font-weight: 700; color: var(--danger); margin: 14px 0; }
.detail-images { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.detail-images img { width: 100%; height: 100px; object-fit: cover; border-radius: 6px; }
.detail-content { line-height: 1.8; margin-top: 14px; color: var(--text-main); white-space: pre-wrap; word-break: break-word; font-size: 14px; }
.detail-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* 联系方式 */
.contact-card {
  background: #fff;
  margin: 12px 14px;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.contact-card h3 { font-size: 15px; margin-bottom: 10px; color: var(--primary); }
.contact-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 14px;
}
.contact-row:last-child { border-bottom: none; }
.contact-row .label { color: var(--text-light); }
.contact-row .value { font-weight: 600; }

/* 评论 */
.comment-section { margin: 12px 14px; }
.comment-card {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.comment-input-row { display: flex; gap: 8px; margin-bottom: 12px; }
.comment-input-row input {
  flex: 1;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 19px;
  padding: 0 14px;
  font-size: 13px;
  background: #fafbfc;
}
.comment-item { padding: 12px 0; border-bottom: 1px solid var(--border); }
.comment-item:last-child { border-bottom: none; }
.comment-name { font-weight: 600; font-size: 13px; }
.comment-time { font-size: 11px; color: var(--text-light); margin-top: 2px; }
.comment-content { font-size: 13px; margin-top: 6px; line-height: 1.6; }

/* 表单 */
.form-card {
  background: #fff;
  margin: 12px 14px;
  border-radius: 12px;
  padding: 18px 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.form-title { font-size: 17px; font-weight: 700; text-align: center; margin-bottom: 18px; }
.form-item { margin-bottom: 14px; }
.form-item label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text-sub); }
.form-item label .req { color: var(--danger); }
.form-input, .form-select, .form-textarea {
  width: 100%;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 12px;
  font-size: 14px;
  background: #fafbfc;
}
.form-textarea { height: 110px; padding: 10px 12px; resize: vertical; line-height: 1.6; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-tip { font-size: 12px; color: var(--text-light); margin-top: 4px; }

/* 按钮 */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px 20px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  background: #fff;
  color: var(--text-main);
  transition: opacity 0.2s;
}
.btn:active { opacity: 0.8; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-outline { border: 1px solid var(--primary); color: var(--primary); background: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-block { width: 100%; }
.btn-lg { padding: 12px 0; font-size: 15px; border-radius: 24px; }

/* 收银台支付方式选择（底部弹层） */
.cashier-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 2100;
  display: flex; align-items: flex-end; justify-content: center;
}
.cashier-panel {
  width: 100%; max-width: 520px; background: #fff;
  border-radius: 18px 18px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  animation: cashierUp .25s ease;
}
@keyframes cashierUp { from { transform: translateY(80px); opacity: 0; } to { transform: none; opacity: 1; } }
.cashier-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.cashier-head b { font-size: 17px; }
.cashier-close { border: none; background: #f2f3f5; width: 26px; height: 26px; border-radius: 50%; font-size: 13px; line-height: 1; color: #666; }
.cashier-amt { font-size: 34px; font-weight: 800; color: #ff3b30; margin: 6px 0 2px; }
.cashier-tip { color: #999; font-size: 12px; line-height: 1.6; margin: 4px 0 10px; }
.cashier-list { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 14px; }
.cashier-opt {
  display: flex; align-items: center; gap: 10px; border: 1.5px solid #ebedf0; border-radius: 12px;
  padding: 12px 14px; position: relative; transition: all .15s;
}
.cashier-opt input { display: none; }
.cashier-opt.active { border-color: var(--primary); background: #f0f7ff; }
.cashier-opt .co-ic { font-size: 20px; }
.cashier-opt .co-main { font-size: 14px; font-weight: 600; display: flex; flex-direction: column; }
.cashier-opt .co-main b { font-size: 12px; color: #999; font-weight: 400; margin-top: 2px; }
.cashier-opt i { margin-left: auto; color: #fff; background: var(--primary); border-radius: 50%; width: 18px; height: 18px; font-style: normal; font-size: 12px; display: flex; align-items: center; justify-content: center; opacity: 0; }
.cashier-opt.active i { opacity: 1; }
.cashier-mask { display: none; }
.cashier-mask.show { display: flex; }

/* H5 钱包 */
.hd-back { font-size: 24px; line-height: 1; cursor: pointer; padding: 0 4px; }
.wallet-hero {
  margin: 12px 14px 0; background: linear-gradient(135deg, #2b6cff, #6a9bff); color: #fff;
  border-radius: 16px; padding: 20px;
}
.wh-label { font-size: 13px; opacity: .85; }
.wh-value { font-size: 36px; font-weight: 800; margin: 4px 0; }
.wh-sub { font-size: 12px; opacity: .9; }
.p-chip.active { background: var(--primary) !important; color: #fff !important; border-color: var(--primary) !important; }
.rc-input { background: #f7f8fa; }

/* 底部 Tab 导航 */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 0 6px;
  font-size: 11px;
  color: var(--text-light);
}
.tabbar a.active { color: var(--primary); }
.tabbar a .tab-icon { font-size: 20px; line-height: 1; }
.tabbar .publish-btn {
  background: linear-gradient(135deg, #2b6cff, #7bb0ff);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
  margin-top: -18px;
  box-shadow: 0 4px 12px rgba(43, 108, 255, 0.4);
}

/* 我的页面 */
.my-header {
  background: linear-gradient(135deg, #2b6cff, #7bb0ff);
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #fff;
}
.my-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  overflow: hidden;
  flex-shrink: 0;
}
.my-avatar img { width: 100%; height: 100%; object-fit: cover; }
.my-name { font-size: 17px; font-weight: 700; }
.my-vip {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.25);
}
.my-menu {
  background: #fff;
  margin: 12px 14px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.my-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font-size: 14px;
}
.my-menu-item:last-child { border-bottom: none; }
.my-menu-item .arrow { margin-left: auto; color: var(--text-light); }
.my-menu-item .icon { font-size: 20px; }

/* 我的列表 */
.my-tabs {
  display: flex;
  background: #fff;
  margin: 12px 14px;
  border-radius: 12px;
  padding: 0 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.my-tabs button {
  flex: 1;
  padding: 13px 0;
  border: none;
  background: none;
  font-size: 14px;
  color: var(--text-sub);
  border-bottom: 2px solid transparent;
  cursor: pointer;
}
.my-tabs button.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

/* 状态 */
.status { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; }
.status-pending { background: #fff7e6; color: #d48806; }
.status-active { background: #f6ffed; color: #52c41a; }
.status-rejected { background: #fff1f0; color: #ff4d4f; }

/* 上传 */
.upload-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.upload-item {
  aspect-ratio: 1;
  border: 2px dashed var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-light);
  font-size: 24px;
  overflow: hidden;
  position: relative;
  background: #fafbfc;
}
.upload-item img { width: 100%; height: 100%; object-fit: cover; }
.upload-item .remove {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

/* 分页 */
.load-more {
  text-align: center;
  padding: 16px;
  color: var(--text-light);
  font-size: 13px;
}

/* 空状态 */
.empty { text-align: center; padding: 40px 20px; color: var(--text-light); }
.empty-icon { font-size: 40px; margin-bottom: 10px; }

/* Toast */
#toast-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
}
.toast {
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 14px;
  white-space: nowrap;
  animation: toastIn 0.3s;
  max-width: 80vw;
  white-space: normal;
  text-align: center;
}
.toast.success { background: rgba(0, 181, 120, 0.95); }
.toast.error { background: rgba(255, 77, 79, 0.95); }
@keyframes toastIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

/* 公告 */
.notice {
  background: #fff8e6;
  border: 1px solid #ffe7a3;
  border-radius: 10px;
  margin: 12px 14px;
  padding: 10px 14px;
  display: flex;
  gap: 8px;
  font-size: 13px;
  color: #8a6d1a;
}

/* 商家 */
.merchant-card {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
  cursor: pointer;
}
.merchant-logo {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  overflow: hidden;
}
.merchant-logo img { width: 100%; height: 100%; object-fit: cover; }
.merchant-name { font-size: 15px; font-weight: 700; }
.merchant-sub { font-size: 12px; color: var(--text-sub); margin-top: 4px; }

/* 表格（我的列表简单展示） */
.simple-table {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.simple-table .row {
  display: flex;
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  align-items: center;
  gap: 10px;
}
.simple-table .row:last-child { border-bottom: none; }

/* ============ V2 新增模块样式 ============ */

/* 功能入口宫格（首页） */
.v2-grid {
  margin: 12px 14px;
  background: #fff;
  border-radius: 12px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 14px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.v2-entry {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
}
.v2-entry .v2-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.v2-entry .v2-name { font-size: 12px; color: var(--text-sub); }
.v2-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  border-radius: 9px;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* 功能页通用头部 */
.sub-hd {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.05);
}
.sub-hd-inner {
  height: 50px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
}
.sub-hd-back { font-size: 22px; cursor: pointer; color: var(--text-main); }
.sub-hd-title { font-size: 17px; font-weight: 700; flex: 1; }
.sub-hd-right { font-size: 13px; color: var(--primary); cursor: pointer; }

/* 跑腿/商品 卡片 */
.f-card {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.f-card .f-title { font-size: 15px; font-weight: 700; line-height: 1.4; }
.f-card .f-sub { font-size: 12px; color: var(--text-sub); margin-top: 6px; line-height: 1.6; }
.f-card .f-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; font-size: 12px; color: var(--text-light); }
.f-card .f-price { color: var(--danger); font-weight: 700; font-size: 16px; }
.f-card .f-row { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.f-card .f-chip {
  background: var(--primary-light);
  color: var(--primary);
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 12px;
}
.f-actions { display: flex; gap: 8px; margin-top: 10px; }

/* 商品卡片（商城） */
.shop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 14px; }
.shop-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); cursor: pointer; }
.shop-img { height: 110px; background: var(--primary-light); display: flex; align-items: center; justify-content: center; font-size: 34px; color: #b8cdf5; }
.shop-img img { width: 100%; height: 100%; object-fit: cover; }
.shop-body { padding: 10px; }
.shop-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-price { color: var(--danger); font-weight: 700; font-size: 15px; margin-top: 6px; }
.shop-price .shop-origin { color: var(--text-light); font-size: 11px; font-weight: 400; text-decoration: line-through; margin-left: 4px; }
.shop-sales { font-size: 11px; color: var(--text-light); margin-top: 2px; }

/* 首页 秒杀/团购 */
.hpromo-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hpromo-list .shop-card { margin: 0; }
.hpromo-card .shop-img { position: relative; }
.hpromo-card .shop-name {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  white-space: normal; height: 36px; line-height: 18px;
}
.hpromo-card .shop-sales { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hpromo-flag {
  position: absolute; left: 6px; top: 6px; z-index: 1;
  color: #fff; font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 5px;
}

/* 商品详情 */
.pd-price { display: flex; align-items: baseline; gap: 8px; }
.pd-origin { color: var(--text-light); font-size: 13px; text-decoration: line-through; }
.pd-buy-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 10px 14px;
  display: flex;
  gap: 10px;
  z-index: 99;
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
}
.pd-qty { display: flex; align-items: center; gap: 10px; }
.pd-qty button {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fafbfc;
  font-size: 16px;
  cursor: pointer;
}
.pd-qty span { min-width: 30px; text-align: center; font-size: 15px; font-weight: 600; }

/* 优惠券 */
.coupon-card {
  display: flex;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  position: relative;
}
.coupon-left {
  width: 108px;
  background: linear-gradient(135deg, #ff6b35, #ff9f0a);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 8px;
}
.coupon-left .amount { font-size: 24px; font-weight: 800; }
.coupon-left .amount small { font-size: 13px; }
.coupon-left .cond { font-size: 10px; opacity: 0.9; }
.coupon-right { flex: 1; padding: 12px 14px; }
.coupon-title { font-size: 14px; font-weight: 700; }
.coupon-info { font-size: 11px; color: var(--text-light); margin-top: 6px; line-height: 1.6; }
.coupon-btn {
  margin-top: 8px;
  padding: 5px 18px;
  border-radius: 15px;
  font-size: 12px;
  border: none;
  background: var(--warning);
  color: #fff;
}
.coupon-btn.received { background: #eee; color: var(--text-light); }

/* 社区帖子 */
.post-card { background: #fff; border-radius: 12px; padding: 14px; margin-bottom: 10px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); cursor: pointer; }
.post-card .post-title { font-size: 15px; font-weight: 700; line-height: 1.4; }
.post-card .post-content { font-size: 13px; color: var(--text-sub); margin-top: 8px; line-height: 1.6; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.post-card .post-meta { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 11px; color: var(--text-light); }
.post-cat { background: var(--primary-light); color: var(--primary); font-size: 10px; padding: 2px 8px; border-radius: 8px; }

/* 分区tab */
.v2-tabs { display: flex; background: #fff; border-radius: 12px; margin: 12px 14px; padding: 4px; gap: 4px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); overflow-x: auto; }
.v2-tabs button { flex-shrink: 0; padding: 8px 16px; border: none; background: none; font-size: 13px; color: var(--text-sub); border-radius: 10px; cursor: pointer; }
.v2-tabs button.active { background: var(--primary); color: #fff; font-weight: 600; }

/* 消息列表 */
.msg-item { display: flex; gap: 12px; padding: 14px; align-items: flex-start; }
.msg-icon { width: 40px; height: 40px; border-radius: 50%; background: var(--primary-light); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.msg-body { flex: 1; min-width: 0; }
.msg-title { font-size: 14px; font-weight: 600; }
.msg-title .unread-dot { display: inline-block; width: 7px; height: 7px; background: var(--danger); border-radius: 50%; margin-left: 5px; vertical-align: middle; }
.msg-content { font-size: 12px; color: var(--text-sub); margin-top: 4px; line-height: 1.6; }
.msg-time { font-size: 11px; color: var(--text-light); margin-top: 4px; }

/* 签到 */
.signin-card { background: linear-gradient(135deg, #2b6cff, #7bb0ff); margin: 12px 14px; border-radius: 14px; padding: 22px; color: #fff; text-align: center; }
.signin-points { font-size: 34px; font-weight: 800; }
.signin-label { font-size: 12px; opacity: 0.85; margin-top: 4px; }
.signin-btn { margin-top: 14px; padding: 10px 34px; border-radius: 24px; border: none; background: #fff; color: var(--primary); font-size: 15px; font-weight: 700; cursor: pointer; }
.signin-btn.done { background: rgba(255,255,255,0.3); color: #fff; }
.signin-history { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.signin-day { background: rgba(255,255,255,0.2); border-radius: 10px; padding: 8px 12px; font-size: 12px; text-align: center; }
.signin-day small { display: block; font-size: 10px; opacity: 0.8; margin-top: 2px; }

/* 状态徽标（V2） */
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; }
.badge-blue { background: #e8f0ff; color: #2b6cff; }
.badge-orange { background: #fff7e6; color: #d48806; }
.badge-green { background: #f6ffed; color: #52c41a; }
.badge-gray { background: #f5f5f5; color: #999; }

/* ===== 在线客服 ===== */
/* 悬浮客服按钮 */
.service-float { position: fixed; right: 16px; bottom: 90px; z-index: 999; }
.service-float-btn {
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, #2b6cff, #7bb0ff);
  color: #fff; font-size: 24px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(43, 108, 255, 0.4); cursor: pointer;
}
.service-float-btn:active { transform: scale(0.94); }
.service-float-badge {
  position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px;
  border-radius: 9px; background: #ff4d4f; color: #fff; font-size: 11px;
  align-items: center; justify-content: center; padding: 0 5px;
  border: 2px solid #fff;
}
/* 聊天页 */
.chat-page { display: flex; flex-direction: column; height: 100vh; background: #f5f6fa; }
.chat-body { flex: 1; overflow-y: auto; padding: 14px; }
.chat-date { text-align: center; font-size: 11px; color: #999; margin: 10px 0; }
.chat-row { display: flex; margin-bottom: 12px; align-items: flex-end; }
.chat-row.me { justify-content: flex-end; }
.chat-avatar {
  width: 34px; height: 34px; border-radius: 50%; background: #e8f0ff;
  display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; overflow: hidden;
}
.chat-row.me .chat-avatar { background: #d9f7be; order: 2; margin-left: 8px; }
.chat-row.other .chat-avatar { margin-right: 8px; }
.chat-avatar img { width: 100%; height: 100%; }
.chat-bubble {
  max-width: 70%; padding: 10px 14px; border-radius: 14px; font-size: 14px; line-height: 1.55;
  word-break: break-word; position: relative;
}
.chat-row.other .chat-bubble { background: #fff; color: #333; border-top-left-radius: 4px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.chat-row.me .chat-bubble { background: #2b6cff; color: #fff; border-top-right-radius: 4px; }
.chat-time { font-size: 10px; color: #bbb; margin-top: 4px; }
.chat-row.me .chat-time { text-align: right; }
.chat-input-bar {
  display: flex; gap: 10px; padding: 10px 14px; background: #fff;
  border-top: 1px solid var(--border); align-items: center;
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
}
.chat-input-bar input {
  flex: 1; height: 40px; border-radius: 20px; border: 1px solid var(--border);
  background: #f5f6fa; padding: 0 16px; font-size: 14px; outline: none;
}
.chat-input-bar .btn { flex-shrink: 0; border-radius: 20px; }
.chat-hint { text-align: center; font-size: 12px; color: #999; padding: 12px 20px; line-height: 1.7; background: #fff; margin: 0 14px; border-radius: 10px; }
.badge-red { background: #fff1f0; color: #ff4d4f; }

/* 增值服务底部弹层 */
.svc-sheet { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 999; display: none; align-items: flex-end; }
.svc-sheet.show { display: flex; }
.svc-sheet-panel { width: 100%; background: #fff; border-radius: 16px 16px 0 0; padding: 18px 16px calc(22px + env(safe-area-inset-bottom)); animation: svcUp .25s; }
@keyframes svcUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.svc-sheet-title { font-weight: 700; font-size: 16px; margin-bottom: 14px; }
.svc-opt {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px;
  margin-bottom: 8px; font-size: 14px; cursor: pointer;
}
.svc-opt b { color: var(--danger); font-size: 15px; }
.svc-opt.active { border-color: var(--primary); background: var(--primary-light); }
.svc-sheet-tip { font-size: 12px; color: #999; margin: 8px 0 14px; }
.svc-sheet-actions { display: flex; gap: 10px; }
.svc-sheet-actions .btn { flex: 1; }

/* 首页增值服务入口 */
.svc-h5 { margin: 12px 14px; background: linear-gradient(135deg, #fff7e6, #fff); border: 1px solid #ffe58f; border-radius: 12px; padding: 12px; }
.svc-h5-title { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: #ad6800; margin-bottom: 10px; }
.svc-h5-title a { flex-shrink: 0; }
.svc-h5-items { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.svc-h5-item {
  display: flex; align-items: center; gap: 8px; background: #fff;
  border-radius: 10px; padding: 10px; border: 1px solid #f0f0f0;
  min-width: 0;
}
.svc-h5-ico { font-size: 18px; flex-shrink: 0; }
.svc-h5-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.svc-h5-txt b { font-size: 13px; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.svc-h5-txt em { font-style: normal; font-size: 11px; color: var(--danger); font-weight: 600; white-space: nowrap; }

/* 公众号文章 */
.article-detail { background: #fff; border-radius: 12px; margin: 0 14px; padding: 18px 16px; }
.article-content { font-size: 15px; line-height: 1.9; color: #333; word-break: break-word; overflow-wrap: break-word; }
.article-content p { margin: 0 0 14px; }
.article-content img { max-width: 100% !important; height: auto !important; border-radius: 8px; display: block; margin: 10px auto; }
.article-content h1, .article-content h2, .article-content h3, .article-content h4 { margin: 16px 0 10px; line-height: 1.5; }
.article-content h1 { font-size: 19px; } .article-content h2 { font-size: 17px; } .article-content h3 { font-size: 16px; } .article-content h4 { font-size: 15px; }
.article-content blockquote { margin: 10px 0; padding: 8px 12px; border-left: 4px solid var(--primary); background: var(--primary-light); border-radius: 0 8px 8px 0; color: #555; }
.article-content a { color: var(--primary); }
.article-content table { max-width: 100%; border-collapse: collapse; margin: 10px 0; }
.article-content table td, .article-content table th { border: 1px solid #e5e5e5; padding: 6px 10px; }
.article-content ul, .article-content ol { padding-left: 20px; margin: 0 0 14px; }
.article-content iframe, .article-content video { display: block; width: 100%; border-radius: 8px; margin: 12px 0; background: #000; }
.article-content iframe { border: 0; aspect-ratio: 16 / 9; }
.article-content video { object-fit: contain; aspect-ratio: 16 / 9; }
.article-content .wx-sph-card { display: block; margin: 12px 0; border-radius: 10px; overflow: hidden; text-decoration: none; background: #fff; box-shadow: 0 1px 5px rgba(0, 0, 0, .12); }
.article-content .wx-sph-screen { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #20304b, #0b1524 60%, #15263f); }
.article-content .wx-sph-play { width: 54px; height: 54px; border-radius: 50%; background: rgba(255, 255, 255, .16); box-shadow: 0 0 0 6px rgba(255, 255, 255, .07); display: flex; align-items: center; justify-content: center; }
.article-content .wx-sph-play::before { content: ''; width: 0; height: 0; border-left: 18px solid #fff; border-top: 11px solid transparent; border-bottom: 11px solid transparent; margin-left: 5px; }
.article-content .wx-sph-badge { position: absolute; right: 10px; top: 10px; background: #07c160; color: #fff; font-size: 10px; line-height: 1; padding: 5px 9px; border-radius: 12px; letter-spacing: 2px; }
.article-content .wx-sph-foot { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; background: #fff; }
.article-content .wx-sph-tip { font-size: 13px; font-weight: 600; color: #333; }
.article-content .wx-sph-open { font-size: 11px; color: #07c160; white-space: nowrap; }
.article-content section { margin: 0; }
.article-content .rich_media_content { color: #333; }
