/* H5 返利站 - 移动端样式 */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* ===== 移动端触摸优化 ===== */
/* 消除 300ms 点击延迟（老 WebView 内核） */
a, button, input, select, textarea, [onclick] {
  touch-action: manipulation;
  -webkit-touch-callout: none;
}
/* 防止长按选中/弹出菜单（可点元素） */
a, button, .goods-card, .rank-item, .zone-card, .chip, [onclick] {
  -webkit-user-select: none;
  user-select: none;
}
/* 统一按压反馈：可点元素按下时轻微缩放 + 透明度变化 */
a:active, button:active, .btn:active, .submit-btn:active,
.goods-card:active, .rank-item:active, .zone-card:active,
.chip:active, .article-card:active, .fav-del:active {
  transform: scale(.97);
  opacity: .85;
  transition: transform .08s ease, opacity .08s ease;
}
:root {
  /* 品牌橙系（参考 oklch(0.66 0.24 38) / 0.75 0.2 38 / 0.72 0.2 22） */
  --primary: #FF4000;            /* 主按钮/选中态：亮橙红 */
  --primary-2: #FF7643;          /* 辅助橙 */
  --primary-3: #FF6569;          /* 渐变尾部（偏粉橙） */
  --primary-grad: linear-gradient(135deg, #FF4000, #FF7643);
  --text: #1a1a1a;               /* 深墨色正文 */
  --text-2: #8a8f98;             /* 柔和灰 */
  --bg: #f7f7f9;                 /* 极浅冷灰 */
  --card: #fff;
  --price: #FF4000;              /* 价格：亮橙红 */
  --rebate: linear-gradient(135deg, #FF4000, #FF6569);
  --radius: 14px;
  --shadow: 0 2px 12px rgba(20, 20, 40, 0.06);
  --hairline: #ececf0;           /* 发丝线 */
}
html, body { min-height: 100%; }
/* 页面根背景与内容同色：滚动回弹（overscroll）露出的区域不再是刺眼的白底 */
html { background: var(--bg); }
/* 减弱 Android/Chrome 的滚动回弹（iOS 橡皮筋无法完全禁用，配合毛玻璃导航视觉化解） */
html, body { overscroll-behavior-y: none; }
/* 移动端隐藏全局滚动条（APP 风格）；桌面端保留滚动条，避免用户不知道页面可继续滚动 */
@media (max-width: 767px) {
  html, body {
    scrollbar-width: none;        /* Firefox */
    -ms-overflow-style: none;     /* IE / Edge 旧版 */
  }
  html::-webkit-scrollbar,
  body::-webkit-scrollbar {
    display: none;                /* Chrome / Safari */
  }
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  max-width: 480px;
  margin: 0 auto;
  padding-bottom: 64px;
  /* 底部安全区（iPhone Home 指示条）：给底部导航留足空间，不支持 env() 的老浏览器用 64px */
  padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* 数字/价格统一等宽数字（对齐更整齐，价格显示更精致） */
.price-now, .detail-price, .exp-price, .rebate-badge, .coupon-badge,
.pt-range, .rank-num, .goods-title b, .price-old, .goods-meta {
  font-variant-numeric: tabular-nums;
}

/* ===== 顶栏 =====
   顶部安全区适配（刘海屏/挖孔屏）：padding-top 加上 env(safe-area-inset-top)，
   状态栏区域不会遮挡标题；不支持 env() 的浏览器自动回退到固定值 */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  color: var(--text); padding: 14px 16px 12px;
  padding-top: calc(14px + env(safe-area-inset-top, 0px));
  border-bottom: 1px solid var(--hairline);
}
.topbar h1 { font-size: 20px; font-weight: 800; letter-spacing: .01em; }
/* 页头小 logo */
.topbar .logo-mini {
  width: 26px; height: 26px;
  border-radius: 7px;
  vertical-align: -6px;
  margin-right: 7px;
}
.topbar .sub { font-size: 12px; opacity: .9; margin-top: 3px; color: var(--text-2); letter-spacing: .02em; }
/* 管理后台退出按钮 */
.topbar-logout {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.22); color: #fff;
  font-size: 12px; padding: 5px 14px; border-radius: 14px; cursor: pointer;
  user-select: none;
}
.topbar-logout:active { background: rgba(255, 255, 255, 0.38); }

/* 首页顶栏右侧按钮组（日志/搜索） */
.topbar-actions {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  display: flex; gap: 8px;
}
.topbar-actions .topbar-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: #f1f2f4;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; cursor: pointer; user-select: none;
  transition: background .15s;
}
/* 收藏入口：红色心形 */
.topbar-actions .topbar-btn#topFav { color: #ff3b30; }

.topbar-actions .topbar-btn:active { background: #e4e5e8; }
/* 首页顶栏右侧搜索按钮（单按钮页面用） */
.topbar-search {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; cursor: pointer; user-select: none;
}
.topbar-search:active { background: rgba(255, 255, 255, 0.38); }
.topbar .sub { font-size: 12px; opacity: .85; margin-top: 2px; }

/* ===== 二级页返回栏 ===== */
.back-bar {
  position: sticky; top: 0; z-index: 50;
  position: -webkit-sticky; background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  color: var(--text);
  display: block;                       /* 子元素全绝对定位，容器需自己撑高 */
  min-height: 56px;                     /* 固定导航栏高度 */
  padding-top: calc(8px + env(safe-area-inset-top, 0px));
  border-bottom: 1px solid var(--hairline);
  box-shadow: 0 2px 8px rgba(20, 20, 40, 0.04);
}
/* 返回/分享按钮颜色（按钮自身已绝对定位 + top50% 居中） */
.back-bar .back-btn { color: var(--text); }
.back-bar .back-title { color: var(--text); }
.back-bar .share-btn { color: var(--text); }
/* 商品详情专属透明导航：product.html 的 .back-bar.nav-transparent 才生效 */
/* 商品详情透明导航：中性白色磨砂（背景由 JS 按滚动插值，滚过主图不透明白）。
   标题深色；两侧按钮为半透明白底 + 黑色图标 */
.back-bar.nav-transparent {
  position: fixed; top: 0; left: 0; right: 0;
  width: 100%; z-index: 50;                 /* 铺满整个视口宽度 */
  background: rgba(255, 255, 255, 0.06);   /* JS 会覆盖此值 */
  border-bottom: none; box-shadow: none;
  transition: color .2s ease;
}
.back-bar.nav-transparent .back-title { color: var(--text); }
/* 按钮：半透明白底 + 黑色图标 */
.back-bar.nav-transparent .back-btn {
  background: rgba(255, 255, 255, 0.82);
  color: #111; border-radius: 18px; font-weight: 600;
}
.back-bar.nav-transparent .share-btn {
  background: rgba(255, 255, 255, 0.82);
  color: #111; border-radius: 18px;
}
.back-bar .back-btn {
  position: absolute; left: 8px; top: 50%; transform: translateY(-50%);
  display: flex; align-items: center; gap: 2px;
  font-size: 15px; cursor: pointer; user-select: none;
  padding: 6px 10px 6px 6px;
}
.back-bar .back-title {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font-size: 16px; font-weight: 600; text-align: center;
  max-width: 60%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  pointer-events: none;   /* 不挡返回/分享按钮点击 */
}
/* 商品页分享按钮 */
.back-bar .share-btn {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  font-size: 18px; line-height: 1; cursor: pointer; user-select: none;
  padding: 6px; opacity: .92;
}
/* 收藏按钮：位于分享按钮左侧 */
.back-bar .fav-btn {
  position: absolute; right: 42px; top: 50%; transform: translateY(-50%);
  font-size: 18px; line-height: 1; cursor: pointer; user-select: none;
  padding: 6px; opacity: .92;
}
.back-bar .fav-btn:active { opacity: .6; }
.back-bar .fav-btn.liked { color: #ff3b30; }

.back-bar .share-btn:active { opacity: .6; }

/* ===== 分类/排序 ===== */
.filter-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid var(--hairline); position: sticky; z-index: 40;
  /* 吸附顶值由 app.js 按顶部栏实际高度动态设置（避免猜测导致滚动跳动） */
  top: 0;
}
.chips { display: flex; gap: 8px; overflow-x: auto; flex: 1; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; padding: 7px 16px; border-radius: 20px;
  background: #f1f2f4; font-size: 13px; font-weight: 500; color: #555;
  border: 1px solid transparent; cursor: pointer;
  transition: all .15s ease;
}
.chip.active { background: #fff; color: var(--primary); border-color: rgba(232, 85, 31, .45); font-weight: 600; box-shadow: 0 1px 4px rgba(232,85,31,.12); }
.sort-select {
  border: 1px solid var(--hairline); border-radius: 8px; padding: 5px 8px;
  font-size: 13px; color: #555; background: #fff; outline: none;
}

/* ===== 商品卡片 ===== */
.goods-list { padding: 14px 16px; display: flex; flex-direction: column; gap: 14px; }
/* 专区页面：列表紧跟 hero，顶部间距收敛到与左右边距一致（hero 自带 margin-bottom） */
.zone-hero + .goods-list { padding-top: 2px; }
.goods-card {
  position: relative; /* 供收藏删除按钮等绝对定位子元素定位 */
  display: flex; gap: 14px; background: var(--card);
  border-radius: 16px; padding: 14px; box-shadow: var(--shadow);
  cursor: pointer; transition: transform .12s ease, box-shadow .12s ease;
}
.goods-card:active { transform: scale(.985); box-shadow: 0 1px 6px rgba(20,20,40,.05); }
.goods-card:active { transform: scale(.98); }
.goods-card img {
  width: 100px; height: 100px; border-radius: 14px; object-fit: cover;
  background: #f0f0f0; flex-shrink: 0;
}
.goods-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.goods-title {
  font-size: 14.5px; font-weight: 600; line-height: 1.4; color: var(--text);
  letter-spacing: .01em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.goods-meta { font-size: 11px; color: var(--text-2); letter-spacing: .01em; }
.goods-desc {
  font-size: 12px; color: #888; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.detail-desc { padding: 16px 0; border-top: 1px solid var(--hairline); margin-top: 14px; }
.detail-desc h3 { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 10px; letter-spacing: .01em; }
.detail-desc p { font-size: 14px; color: #555; line-height: 1.8; letter-spacing: .01em; }
.price-row {
  display: flex; align-items: baseline; gap: 6px; margin-top: auto;
  flex-wrap: nowrap; white-space: nowrap; overflow: hidden;
}
.price-now { color: var(--price); font-size: 20px; font-weight: 800; flex-shrink: 0; }
.price-now small { font-size: 12px; font-weight: 600; }
.price-old { color: #bbb; font-size: 12px; text-decoration: line-through; flex-shrink: 0; }
.rebate-badge {
  background: var(--rebate); color: #fff; font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 10px; white-space: nowrap; flex-shrink: 0;
  margin-left: auto; /* 徽章靠右，且不参与压缩换行 */
}
/* 优惠券票券样式（微信卡券风）：
   圆角票身 + 中间竖向撕开虚线 + 左右各一个白色半圆缺口（露出卡片底） */
.coupon-badge {
  position: relative;
  color: #fff;
  font-size: 11px; font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  white-space: nowrap; flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  background:
    radial-gradient(circle at 0 50%, var(--card) 3.6px, transparent 4.2px),
    radial-gradient(circle at 100% 50%, var(--card) 3.6px, transparent 4.2px),
    var(--primary);
}
/* 中间竖向撕开虚线 */
.coupon-badge::after {
  content: '';
  position: absolute; left: 50%; top: 2px; bottom: 2px;
  border-left: 1px dashed rgba(255, 255, 255, 0.65);
}

/* 收藏列表：删除按钮（绝对定位在卡片右上角，不占文档流空间） */
.fav-del {
  position: absolute; top: 20px; right: 20px; z-index: 3;
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255,255,255,.92); color: #999; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 1px 6px rgba(0,0,0,.18);
}
.fav-del:active { background: #e4e5e8; }

/* ===== 加载更多 / 空状态 ===== */
.load-more, .empty {
  text-align: center; padding: 20px 0; color: var(--text-2); font-size: 13px;
}
.btn-load {
  display: block; margin: 10px auto; padding: 10px 32px; border: none; border-radius: 22px;
  background: var(--primary-grad); color: #fff; font-size: 14px; cursor: pointer;
}

/* ===== 查返利结果卡片 ===== */
.check-result {
  background: var(--card);
  border-radius: var(--radius);
  margin: 12px;
  padding: 14px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.check-head { display: flex; gap: 12px; }
.check-head img {
  width: 96px; height: 96px; border-radius: 10px;
  object-fit: cover; background: #f0f0f0; flex-shrink: 0;
}
.check-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.check-title {
  font-size: 14px; line-height: 1.4; color: #333;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.check-meta { font-size: 11px; color: var(--text-2); }
.result-actions { display: flex; gap: 10px; margin-top: 14px; }
.result-actions .btn {
  flex: 1; padding: 12px 0; border-radius: 22px;
  font-size: 15px; text-align: center; cursor: pointer;
  border: none; text-decoration: none; display: inline-block;
}
.result-actions .btn-primary { line-height: 1.4; }
/* 保险：a 标签按钮强制白色文字（防止浏览器默认链接色覆盖） */
.result-actions a.btn-primary { color: #fff; text-decoration: none; }

/* 图片选中工具条 */
.img-toolbar {
  position: fixed; z-index: 95;
  display: flex; gap: 6px; align-items: center;
  background: #333; border-radius: 10px;
  padding: 6px 8px; box-shadow: 0 2px 10px rgba(0,0,0,.2);
}
.img-toolbar .admin-btn { white-space: nowrap; }

/* 分段选择按钮（文字叠加设置用） */
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg-btn {
  padding: 6px 14px; border-radius: 8px;
  border: 1px solid #e0e0e0; background: #fff;
  font-size: 13px; cursor: pointer; color: #555;
}
.seg-btn.active { border-color: var(--primary); color: var(--primary); background: #fff0e6; font-weight: 600; }

/* ===== 富文本编辑器（即见即所得） ===== */
.editor-rich {
  width: 100%; min-height: 320px;
  border: 1px solid #e5e5e5; border-radius: 10px;
  padding: 14px; box-sizing: border-box;
  font-size: 15px; line-height: 1.9; color: #333;
  background: #fff; outline: none; overflow-y: auto;
}
.editor-rich:focus { border-color: var(--primary); }
.editor-rich:empty::before { content: attr(data-placeholder); color: #bbb; }
.editor-rich h2 { font-size: 17px; margin: 12px 0 8px; }
.editor-rich p { margin: 8px 0; }
.editor-rich ul { padding-left: 22px; margin: 8px 0; }
.editor-rich blockquote {
  border-left: 4px solid var(--primary); background: #fff8f0;
  padding: 8px 12px; margin: 8px 0; border-radius: 0 8px 8px 0;
}
.editor-rich img { max-width: 100%; border-radius: 8px; margin: 8px 0; }
.editor-rich b { font-weight: 700; }

/* ===== 文章模块（瀑布流） ===== */
/* 真瀑布流：CSS 多列（column-count 按列填充，每张卡片紧跟所在列的上一张） */
.masonry {
  column-count: 2;            /* 手机 2 列 */
  column-gap: 10px;
  padding: 10px 12px;
}
.masonry .article-card {
  break-inside: avoid;        /* 防止卡片跨列断裂 */
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  margin-bottom: 10px;        /* 列内卡片间距（替代 gap） */
  width: 100%;
  background: var(--card);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.masonry .article-card:active { opacity: .9; }
.article-cover {
  width: 100%; height: auto; display: block;  /* 自然高度，形成瀑布流错落 */
  background: #f0f0f0;
}
.article-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.article-title { font-size: 14px; font-weight: 600; line-height: 1.4; color: #333; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-summary { font-size: 12px; color: var(--text-2); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-meta { font-size: 11px; color: #bbb; }

@media (min-width: 768px) { .masonry { column-count: 3; } }
@media (min-width: 1200px) { .masonry { column-count: 4; } }
@media (min-width: 1600px) { .masonry { column-count: 5; } }
@media (min-width: 2000px) { .masonry { column-count: 6; } }

.article-detail { background: var(--card); margin: 12px; padding: 18px; border-radius: var(--radius); }
.article-cover-big {
  width: 100%; max-height: 320px; object-fit: cover;
  border-radius: 12px; margin-bottom: 14px; background: #f0f0f0;
}
.article-detail-title { font-size: 20px; font-weight: 700; line-height: 1.5; }
.article-detail-meta { font-size: 12px; color: #999; margin: 8px 0 16px; }
.article-content { font-size: 15px; line-height: 1.9; color: #333; word-break: break-word; }
.article-content h2 { font-size: 17px; margin: 22px 0 10px; color: #222; }
.article-content p { margin: 10px 0; }
.article-content ul { padding-left: 20px; margin: 10px 0; }
.article-content li { margin: 4px 0; }
.article-content a { color: var(--primary); text-decoration: underline; word-break: break-all; }
.article-content blockquote { border-left: 4px solid var(--primary); background: #fff8f0; padding: 10px 14px; margin: 12px 0; color: #555; border-radius: 0 10px 10px 0; }
.article-content img { max-width: 100%; border-radius: 10px; margin: 10px 0; }

/* 文章内嵌商品卡片 */
.article-goods {
  display: flex; gap: 12px; background: #fafafa;
  border: 1px solid #f0f0f0; border-radius: 12px; padding: 12px; margin: 14px 0;
}
.article-goods img { width: 84px; height: 84px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: #eee; }
.article-goods-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.article-goods-title { font-size: 13px; line-height: 1.4; color: #333; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-goods-btn {
  align-self: flex-start; border: none; background: var(--primary-grad);
  color: #fff; font-size: 12px; padding: 6px 14px; border-radius: 16px; cursor: pointer;
}

/* ===== 专区页 ===== */
.rush-banner {
  background: linear-gradient(135deg, #ff3d2e, #e62e1f);
  color: #fff; padding: 16px 16px 12px; margin: 0 12px 4px;
  border-radius: 16px;
}
.rush-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rush-title { font-size: 15px; font-weight: 700; white-space: nowrap; flex-shrink: 0; }
.rush-countdown {
  font-size: 13px; opacity: .95; white-space: nowrap;
  text-align: right; margin-left: auto; min-width: 0;
}
.rush-countdown b {
  font-size: 18px; background: rgba(255,255,255,.2);
  padding: 2px 8px; border-radius: 6px; font-variant-numeric: tabular-nums;
}
/* 横幅内场次页签 */
.rush-rounds {
  display: flex; gap: 8px; overflow-x: auto;
  margin-top: 10px; padding-bottom: 2px;
  scrollbar-width: none;
}
.rush-rounds::-webkit-scrollbar { display: none; }
.rush-rounds .chip {
  flex-shrink: 0; padding: 5px 12px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.18); color: #fff;
  font-size: 12px; border: 1px solid rgba(255,255,255,.25);
  white-space: nowrap;
}
.rush-rounds .chip.active {
  background: #fff; color: #ff3d2e; font-weight: 700;
  border-color: #fff;
}
.zone-grid {
  padding: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
/* grid 兜底：不支持 grid 的浏览器退化为单列 */
.zone-grid { display: flex; flex-direction: column; }
@supports (display: grid) {
  .zone-grid { display: grid; grid-template-columns: 1fr 1fr; }
}
.zone-card {
  background: var(--card); border-radius: 16px;
  padding: 18px 14px; display: flex; flex-direction: column; align-items: center; gap: 0;
  box-shadow: var(--shadow); cursor: pointer;
  text-align: center; transition: transform .12s ease;
}
.zone-card:active { transform: scale(.97); }
.zone-emoji {
  width: 54px; height: 54px; border-radius: 50%; flex-shrink: 0;
  background: var(--primary-grad);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: #fff;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}
.zone-name { font-size: 15px; font-weight: 700; color: var(--text); margin-top: 12px; letter-spacing: .01em; }
.zone-desc { font-size: 11px; color: var(--text-2); margin-top: 4px; }
/* 各专区主题渐变色 */
.gc-orange { background: linear-gradient(135deg, #ff7a3d, #ff4d1f); }
.gc-red    { background: linear-gradient(135deg, #ff5e3a, #ff2e00); }
.gc-violet { background: linear-gradient(135deg, #7c4dff, #4a2fb8); }
.gc-green  { background: linear-gradient(135deg, #00b578, #007a55); }
.gc-gold   { background: linear-gradient(135deg, #e6a23c, #b88230); }
.gc-blue   { background: linear-gradient(135deg, #00a0e9, #0066cc); }
.gc-cyan   { background: linear-gradient(135deg, #13c2c2, #007a7a); }
.gc-pink   { background: linear-gradient(135deg, #ff4d6d, #c9184a); }
.zone-banner {
  background: var(--primary-grad);
  color: #fff; font-size: 13px; font-weight: 600;
  text-align: center; padding: 8px 12px; margin: 0 12px 4px;
  border-radius: 10px;
}

/* ===== 邀请分享页 ===== */
.invite-card {
  background: var(--card);
  border-radius: var(--radius);
  margin: 12px;
  padding: 24px 18px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.invite-logo { width: 64px; height: 64px; border-radius: 16px; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.invite-name { font-size: 20px; font-weight: 700; margin-top: 10px; }
.invite-slogan { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.qr-wrap {
  display: inline-block; margin-top: 18px; padding: 10px;
  background: #fff; border: 1px solid #f0f0f0; border-radius: 12px;
}
.qr-img { width: 200px; height: 200px; display: block; }
.qr-tip { font-size: 12px; color: var(--text-2); margin-top: 10px; }
.invite-qr-row { display: flex; align-items: center; gap: 12px; margin: 10px 0 12px; }
.invite-qr-row .qr-wrap-sm {
  flex-shrink: 0; padding: 6px; background: #fff; border: 1px solid #f0f0f0; border-radius: 10px;
}
.invite-qr-row .qr-wrap-sm .qr-img { width: 84px; height: 84px; display: block; }
.invite-qr-info { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text); }
.invite-qr-info b { color: var(--primary); }
.invite-actions { display: flex; gap: 10px; margin-top: 12px; }
.invite-actions .btn { flex: 1; }
.invite-actions .btn {
  flex: 1; padding: 12px 0; border-radius: 22px;
  font-size: 15px; text-align: center; cursor: pointer; border: none;
}
.invite-text {
  margin-top: 20px; padding: 14px; background: #f8f9fb;
  border-radius: 12px; text-align: left; font-size: 13px; color: #555;
}
.invite-text h3 { font-size: 14px; color: #333; margin-bottom: 8px; }
.invite-text p { line-height: 1.7; }

/* ===== 分享弹层（商品图片卡片） ===== */
.share-modal {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0, 0, 0, 0.55);
  display: flex; align-items: flex-end; justify-content: center;
}
.share-sheet {
  width: 100%; max-width: 480px; background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 20px 18px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  max-height: 88vh; overflow-y: auto;
}
.card-preview { position: relative; }
.card-loading { text-align: center; color: var(--text-2); font-size: 13px; padding: 60px 0; }
.share-sheet-actions { display: flex; gap: 10px; margin-top: 14px; }
.share-sheet-actions .btn {
  flex: 1; padding: 13px 0; border-radius: 22px;
  font-size: 15px; text-align: center; cursor: pointer; border: none;
}
.share-tip { font-size: 12px; color: var(--text-2); text-align: center; margin-top: 10px; }

/* ===== 管理后台 ===== */
.admin-tabs {
  display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 12px 0;
}
.admin-tab {
  padding: 7px 14px; border-radius: 18px; white-space: nowrap;
  background: #f2f3f5; font-size: 13px; color: #666; cursor: pointer;
}
.admin-tab.active { background: var(--primary-grad); color: #fff; font-weight: 600; }
.stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  padding: 12px;
}
.stat-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.stat-card .num { font-size: 22px; font-weight: 700; color: var(--primary); }
.stat-card .label { font-size: 12px; color: var(--text-2); margin-top: 4px; }
.admin-wrap { overflow-x: auto; margin: 0 12px; }
.admin-table {
  width: 100%; min-width: 720px; border-collapse: collapse;
  background: var(--card); border-radius: var(--radius); font-size: 13px;
}
.admin-table th, .admin-table td {
  padding: 10px 12px; text-align: left;
  border-bottom: 1px solid #f0f0f0; white-space: nowrap;
}
.admin-table th { background: #fafafa; color: #666; font-weight: 600; position: sticky; top: 0; }
.admin-btn {
  padding: 4px 10px; border-radius: 8px; border: none;
  font-size: 12px; cursor: pointer; margin-right: 4px;
}

/* ===== 底部导航（毛玻璃，类 iOS Tab Bar） ===== */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  /* 半透明 + 背景模糊：回弹/滚动时透出内容而不露生硬白底，更像原生 APP */
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  display: flex; z-index: 60;
  /* 顶部发丝线 + 细阴影 */
  border-top: 1px solid var(--hairline);
  box-shadow: 0 -2px 12px rgba(20, 20, 40, 0.05);
  /* Home 指示条安全区：老浏览器回退 0，新浏览器用 env() */
  padding-bottom: 0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.bottom-nav a {
  flex: 1; text-align: center; padding: 9px 0 7px;
  color: #999; text-decoration: none; font-size: 11px;
  letter-spacing: .01em; transition: color .15s;
}
.bottom-nav a .ico { font-size: 20px; display: block; line-height: 1.2; }
.bottom-nav a.active { color: var(--primary); font-weight: 600; }

/* ===== 搜索页 ===== */
/* 输入框容器 + 读取剪贴板 + 一键清空 */
.search-input-wrap { position: relative; flex: 1; display: flex; align-items: center; }
.search-bar .search-input-wrap input {
  flex: 1;
  padding-left: 38px; padding-right: 34px;   /* 给 📋 图标和 ✕ 留位，避免重叠 */
  padding-top: 10px; padding-bottom: 10px;
}
.clip-btn {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  font-size: 17px; line-height: 1; cursor: pointer; user-select: none;
  opacity: .65; z-index: 2; padding: 4px;
}
.clip-btn:active { opacity: 1; }
.clear-btn {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; border-radius: 50%;
  background: #cfd2d6; color: #fff; font-size: 12px; line-height: 20px;
  text-align: center; cursor: pointer; user-select: none;
  display: none; z-index: 2;
}
.clear-btn:active { background: #b3b6ba; }
.search-input-wrap input:not(:placeholder-shown) ~ .clear-btn { display: block; }
/* 剪贴板提示行 */
.clip-hint {
  font-size: 12px; color: var(--text-2); text-align: center;
  padding: 8px 12px 4px;
}
.search-bar {
  display: flex; align-items: center; gap: 8px; padding: 12px; background: var(--card);
  position: sticky; top: 0; z-index: 40;
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
}
/* 搜索页返回按钮 */
.search-bar .back-btn-ico {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--text); background: #f2f3f5;
  cursor: pointer; user-select: none; transition: background .15s;
}
.search-bar .back-btn-ico:active { background: #e4e5e8; }
.search-bar input {
  flex: 1; border: none; background: #f2f3f5; border-radius: 20px;
  padding: 10px 16px; font-size: 14px; outline: none;
}
.search-bar button {
  border: none; background: var(--primary-grad); color: #fff;
  border-radius: 20px; padding: 0 20px; font-size: 14px; cursor: pointer;
  height: 40px;   /* 精确与输入框等高（padding 10px×2 + 行高 20px） */
  display: flex; align-items: center; justify-content: center;
}
/* 搜索历史 + 热搜词 */
.search-history { padding: 12px 14px 4px; }
.hot-words { padding: 12px 14px 4px; }
.sh-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.sh-title { font-size: 14px; font-weight: 700; color: var(--text); }
.sh-clear { font-size: 12px; color: var(--text-2); cursor: pointer; padding: 2px 6px; }
.sh-clear:active { color: var(--primary); }
.sh-words { display: flex; flex-wrap: wrap; gap: 8px; }
.sh-words .chip { background: #fff; border: 1px solid #eee; }
.sh-words .chip.hot-top { color: var(--primary); border-color: rgba(232,85,31,.3); font-weight: 600; }

/* ===== 商品详情页 ===== */
/* ===== 商品详情（现代分区布局） ===== */
/* 主图展示区 */
.pic-stage {
  position: relative; background: #f7f7f9;
  padding: 0;
}
/* 满减券卡（票券样式） */
.coupon-card {
  display: flex; align-items: center; gap: 14px;
  border: 1px dashed #ffc3a3; border-radius: 14px;
  padding: 12px 14px 12px 16px;
  margin-bottom: 12px;
  background: #fff8f4;
}
/* 券面金额：票券撕边 + 撕开虚线 */
.coupon-ticket {
  position: relative;
  color: #fff; font-size: 16px; font-weight: 800;
  font-variant-numeric: tabular-nums;
  padding: 8px 18px;
  background:
    radial-gradient(circle at 0 50%, var(--card) 4px, transparent 4.6px),
    radial-gradient(circle at 100% 50%, var(--card) 4px, transparent 4.6px),
    var(--primary);
  flex-shrink: 0;
}
.coupon-ticket::after {
  content: '';
  position: absolute; left: 50%; top: 3px; bottom: 3px;
  border-left: 1px dashed rgba(255, 255, 255, 0.65);
}
.coupon-card-info { flex: 1; min-width: 0; }
.coupon-card-name { font-size: 14px; font-weight: 700; color: var(--text); }
.coupon-card-tip { font-size: 12px; color: #a45a2e; margin-top: 3px; }
.coupon-get {
  flex-shrink: 0; border: none; background: var(--primary-grad); color: #fff;
  font-size: 13px; font-weight: 700; padding: 9px 18px; border-radius: 19px; cursor: pointer;
}
.coupon-get:active { opacity: .88; }
/* 折扣标签（省 X%） */
.save-tag {
  background: #fff0e6; color: var(--primary);
  font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px;
}

.detail { padding-bottom: 100px; padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }
.detail .big-pic { width: 100%; aspect-ratio: 1/1; background: #f0f0f0; object-fit: cover; display: block; border-radius: 0 0 16px 16px; }
.detail-body { background: var(--card); border-radius: 20px 20px 0 0; margin-top: -16px; padding: 20px 18px; position: relative; }
.detail-title {
  font-size: 18px; line-height: 1.5; font-weight: 700; letter-spacing: .01em;
  color: var(--text);
}
.detail-price-row { display: flex; align-items: baseline; gap: 12px; margin: 16px 0 10px; flex-wrap: wrap; }
.detail-price { color: var(--price); font-size: 32px; font-weight: 800; letter-spacing: -0.01em; }
.detail-price small { font-size: 18px; font-weight: 700; }
.detail-old { color: #bbb; font-size: 14px; text-decoration: line-through; }
.detail-rebate {
  display: inline-block; background: var(--rebate); color: #fff; font-weight: 700;
  font-size: 13px; padding: 5px 14px; border-radius: 16px;
  align-self: center;      /* 价格行内垂直居中 */
  margin-left: auto;       /* 推到价格行最右端 */
  letter-spacing: .01em;
}
/* 历史价格 */
.price-trend {
  margin-top: 8px; padding: 8px 10px 4px;
  background: #fff7e6; border-radius: 8px; font-size: 12px;
}
.pt-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pt-label { color: #b88230; font-weight: 600; }
.pt-range { color: #b88230; font-weight: 700; }
.pt-min {
  color: #fff; background: var(--primary-grad);
  padding: 1px 6px; border-radius: 4px; font-size: 10px; font-weight: 600;
}
.pt-chart { width: 100%; height: 90px; margin-top: 4px; }
.detail-meta { display: flex; gap: 16px; font-size: 12px; color: var(--text-2); padding: 14px 0; border-top: 1px solid var(--hairline); margin-top: 14px; letter-spacing: .01em; }
.shop-row { font-size: 13px; color: #666; padding: 12px 0; border-top: 1px solid var(--hairline); }
.action-bar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-top: none;
  box-shadow: 0 -1px 8px rgba(0, 0, 0, 0.06);
  display: flex; gap: 10px; padding: 10px 14px;
  padding-bottom: 10px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  z-index: 60;
}
.action-bar .btn { flex: 1; text-align: center; padding: 0; height: 50px; border-radius: 25px; font-size: 15px; font-weight: 600; cursor: pointer; border: none; letter-spacing: .02em; }
.btn-primary { background: var(--primary-grad); color: #fff; font-weight: 600; }
.btn-outline { background: #fff; color: var(--primary); border: 1.5px solid var(--primary) !important; font-weight: 600; }
.steps { background: #fff8f0; border-radius: 16px; padding: 16px; margin-top: 16px; font-size: 14px; color: #555; }
.steps h3 { font-size: 15px; font-weight: 700; color: var(--primary); margin-bottom: 12px; letter-spacing: .01em; }
.steps ol { padding-left: 20px; line-height: 2; }

/* ===== 返利页 ===== */
.form-card { background: var(--card); border-radius: var(--radius); padding: 16px; margin: 12px; }
.form-card h2 { font-size: 15px; margin-bottom: 12px; }
.form-item { margin-bottom: 12px; }
.form-item label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form-item input {
  width: 100%; box-sizing: border-box; border: 1px solid #e5e5e5; border-radius: 10px; padding: 11px 12px;
  font-size: 14px; outline: none; background: #fafafa;
}
.form-item input:focus { border-color: var(--primary); background: #fff; }
.form-item .hint { font-size: 12px; color: #bbb; margin-top: 4px; }
.submit-btn {
  width: 100%; border: none; border-radius: 22px; padding: 13px 0;
  background: var(--primary-grad); color: #fff; font-size: 15px; font-weight: 600; cursor: pointer;
}
.records { padding: 0 12px; }
.record-item {
  background: var(--card); border-radius: var(--radius); padding: 12px;
  margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.record-item .left { flex: 1; min-width: 0; }
.record-item .title { font-size: 13px; color: #444; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.record-item .sub { font-size: 12px; color: #bbb; margin-top: 3px; }
.record-item .amount { font-size: 17px; font-weight: 700; color: var(--price); }
.status-tag { font-size: 11px; padding: 2px 8px; border-radius: 10px; }
.status-pending { background: #fff3e0; color: #e67e00; }
.status-paid { background: #e8f5e9; color: #2e7d32; }
.status-rejected { background: #fdecea; color: #c62828; }
.rules { background: var(--card); border-radius: var(--radius); padding: 14px 16px; margin: 12px; font-size: 13px; color: #666; line-height: 1.9; }
.rules h3 { font-size: 14px; margin-bottom: 6px; color: #333; }

/* ===== Toast ===== */
#toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(20px);
  background: rgba(0,0,0,.78); color: #fff; font-size: 13px;
  padding: 10px 18px; border-radius: 20px; z-index: 999;
  opacity: 0; pointer-events: none; transition: all .25s; max-width: 86%;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== 平板 / 桌面端适配 =====
   手机（<768px）：单列 480px 居中（基准移动端体验）
   平板（≥768px）：内容随屏幕宽度自适应（上限 1280px），商品两列
   桌面（≥1200px）：商品三列；大屏（≥1600px）：商品四列
   表单/记录/规则等表单型内容保持 720px 居中（过宽反而不友好） */
@media (min-width: 768px) {
  body { max-width: 1280px; }

  /* 顶部条文字与浏览内容左对齐 */
  .topbar,
  .back-bar {
    padding-left: 12px;
    padding-right: 12px;
  }

  /* 浏览型内容：随宽度自适应（搜索栏/分类栏/热门词/商品列表） */
  .search-bar,
  .filter-bar,
  .hot-words,
  .goods-list {
    max-width: none;
  }

  /* 商品列表：两列网格，随容器宽度自动铺开 */
  .goods-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  /* 网格布局下：空状态提示/加载按钮占满整行，保持页面居中 */
  .goods-list .empty,
  .goods-list .load-more,
  .record-list .empty {
    grid-column: 1 / -1;
  }

  /* 底部固定栏跟随放宽后的宽度 */
  .bottom-nav,
  .action-bar { max-width: 1280px; }

  /* 详情大图：宽屏下 1:1 方图太大，限高 */
  .detail .big-pic { max-height: 520px; aspect-ratio: auto; object-fit: cover; }

  /* 表单/记录/规则：保持 720px 居中（表单类内容过宽不友好） */
  .form-card,
  .records,
  .rules {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
  }
  .records { padding-left: 0; padding-right: 0; }

  /* 详情内容区：限 960px 居中 */
  .detail-body { max-width: 960px; margin: -14px auto 0; }


  /* 认领表单：订单号 + 付款金额 两列并排（手机端保持单列） */
  .form-card .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
  }

  /* 返利记录：两列网格（手机端保持单列） */
  .record-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .record-item { margin-bottom: 0; }
}

@media (min-width: 1200px) {
  /* 桌面：商品三列，卡片改纵向布局 */
  .goods-list { grid-template-columns: repeat(3, 1fr); }
  .goods-card { flex-direction: column; }
  .goods-card img {
    width: 100%; height: auto; aspect-ratio: 1/1;
    border-radius: 10px;
  }
}

@media (min-width: 1600px) {
  /* 大屏显示器：商品四列，充分利用宽度 */
  .goods-list { grid-template-columns: repeat(4, 1fr); }
}

/* ===== 首页每日爆款好物（横滑） ===== */
.explosive-sec { padding: 6px 0 18px; }
.explosive-head {
  display: flex; align-items: baseline; gap: 12px;
  padding: 14px 16px 14px;
  white-space: nowrap; overflow: hidden;
}
.explosive-title {
  font-size: 18px; font-weight: 800; color: var(--text); flex-shrink: 0;
  letter-spacing: .01em; display: flex; align-items: center; gap: 9px;
}
.explosive-title::before {
  content: ''; width: 4px; height: 18px; border-radius: 3px;
  background: var(--primary-grad);
}
.explosive-sub {
  font-size: 12px; color: var(--text-2); min-width: 0;
  overflow: hidden; text-overflow: ellipsis; letter-spacing: .01em;
}
.explosive-row {
  display: flex; gap: 13px; overflow-x: auto;
  padding: 2px 16px 10px; scrollbar-width: none;
}
.explosive-row::-webkit-scrollbar { display: none; }
.exp-card {
  flex-shrink: 0; width: 168px; background: var(--card);
  border-radius: 16px; overflow: hidden; cursor: pointer;
  box-shadow: var(--shadow); transition: transform .12s ease;
}
.exp-card:active { transform: scale(.98); }
.exp-pic { position: relative; width: 100%; aspect-ratio: 1 / 1; }
.exp-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.exp-badge {
  position: absolute; left: 6px; bottom: 6px; max-width: 120px;
  background: rgba(255, 61, 46, .92); color: #fff; font-size: 11px;
  padding: 2px 6px; border-radius: 4px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.exp-price {
  padding: 10px 14px 0; font-size: 17px; font-weight: 800;
  color: var(--price); font-variant-numeric: tabular-nums;
  display: flex; align-items: baseline; gap: 5px;
  flex-wrap: nowrap; white-space: nowrap; overflow: hidden;
}
.exp-price small { font-size: 12px; font-weight: 600; flex-shrink: 0; }
.exp-price .exp-num { flex-shrink: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.exp-price em {
  font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--primary);
  background: rgba(232, 85, 31, .1); border-radius: 6px;
  padding: 2px 7px; margin-left: auto; flex-shrink: 0;
  letter-spacing: .01em;
}
.exp-title {
  font-size: 13px; font-weight: 600; color: var(--text); line-height: 16px;
  padding: 6px 14px;                 /* 上下对称，文字垂直居中 */
  /* 固定三行高度（3×16px 行高 + 12px 上下 padding = 60px，border-box 全局生效）：
     无论 -webkit-line-clamp 是否生效，文字最多占三行，下方内容永不被撑出 */
  height: 60px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; word-break: break-all; overflow-wrap: anywhere;
}

/* ===== 首页顶部渐变区（每日爆款 + 各大榜单） =====
   背景参考 oklch 渐变：0.66 0.24 38 → 0.75 0.2 38 → 0.72 0.2 22
   hex 兜底老浏览器，oklch 优先新浏览器 *//* ===== 首页轮播 Banner ===== *//* ===== 新用户引导浮层 ===== */
.guide-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 0 32px;
}
.guide-card {
  position: relative; width: 100%; max-width: 320px;
  background: var(--card); border-radius: 20px; padding: 28px 22px 22px;
  text-align: center; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}
.guide-close {
  position: absolute; right: 12px; top: 12px;
  width: 30px; height: 30px; border-radius: 50%;
  border: none; background: #f1f2f4; color: #999; font-size: 14px;
  cursor: pointer;
}
.guide-slide { position: relative; min-height: 150px; }
.guide-panel { display: none; padding: 6px 4px; }
.guide-panel.on { display: block; animation: guideFade .3s ease; }
@keyframes guideFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.guide-icon { font-size: 44px; margin-bottom: 14px; }
.guide-title { font-size: 18px; font-weight: 800; color: var(--text); margin-bottom: 10px; }
.guide-desc { font-size: 13px; color: var(--text-2); line-height: 1.7; }
.guide-dots { display: flex; justify-content: center; gap: 6px; margin: 18px 0 16px; }
.guide-dots .gdot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #ddd; cursor: pointer; transition: all .2s;
}
.guide-dots .gdot.on { background: var(--primary); width: 18px; border-radius: 4px; }
.guide-next {
  width: 100%; border: none; background: var(--primary-grad); color: #fff;
  font-size: 15px; font-weight: 700; padding: 13px 0; border-radius: 24px;
  cursor: pointer; letter-spacing: .02em;
}
.guide-next:active { opacity: .9; }/* ===== 品牌专区横幅（大卡片 + 分类页签一体，金色主题） ===== *//* ===== 精选专辑横幅（大卡片 + 类型页签一体，蓝色主题） ===== */
.album-banner {
  margin: 0 12px 4px;
  padding: 16px 16px 12px;
  border-radius: 16px;
  background: linear-gradient(135deg, #00a0e9, #0066cc);
  color: #fff;
  box-shadow: 0 6px 20px rgba(0, 102, 204, 0.3);
}
.album-banner-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
}
.album-banner-title { font-size: 19px; font-weight: 800; letter-spacing: .02em; }
.album-banner-sub { font-size: 12px; opacity: .92; margin-top: 5px; }
.album-banner-badge {
  flex-shrink: 0; font-size: 11px; font-weight: 700;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 3px 10px; border-radius: 12px;
}
.album-banner-tabs {
  display: flex; gap: 8px; overflow-x: auto;
  margin-top: 14px; scrollbar-width: none;
}
.album-banner-tabs::-webkit-scrollbar { display: none; }
.album-banner-tabs .chip {
  flex-shrink: 0; padding: 5px 13px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.18); color: #fff;
  font-size: 12px; border: 1px solid rgba(255, 255, 255, 0.25);
}
.album-banner-tabs .chip.active {
  background: #fff; color: #0066cc; font-weight: 700; border-color: #fff;
}

/* ===== 分类榜单横幅（大卡片 + 分类页签一体，青色主题） ===== */
.catrank-banner {
  margin: 0 12px 4px;
  padding: 16px 16px 12px;
  border-radius: 16px;
  background: linear-gradient(135deg, #13c2c2, #007a7a);
  color: #fff;
  box-shadow: 0 6px 20px rgba(0, 122, 122, 0.3);
}
.catrank-banner-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
}
.catrank-banner-title { font-size: 19px; font-weight: 800; letter-spacing: .02em; }
.catrank-banner-sub { font-size: 12px; opacity: .92; margin-top: 5px; }
.catrank-banner-badge {
  flex-shrink: 0; font-size: 11px; font-weight: 700;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 3px 10px; border-radius: 12px;
}
.catrank-banner-cats {
  display: flex; gap: 8px; overflow-x: auto;
  margin-top: 14px; scrollbar-width: none;
}
.catrank-banner-cats::-webkit-scrollbar { display: none; }
.catrank-banner-cats .chip {
  flex-shrink: 0; padding: 5px 13px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.18); color: #fff;
  font-size: 12px; border: 1px solid rgba(255, 255, 255, 0.25);
}
.catrank-banner-cats .chip.active {
  background: #fff; color: #007a7a; font-weight: 700; border-color: #fff;
}

/* ===== 官方活动横幅（大卡片 + 排序下拉，玫红主题） ===== */
.topic-banner {
  margin: 0 12px 4px;
  padding: 16px 16px 12px;
  border-radius: 16px;
  background: linear-gradient(135deg, #ff4d6d, #c9184a);
  color: #fff;
  box-shadow: 0 6px 20px rgba(201, 24, 74, 0.3);
}
.topic-banner-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.topic-banner-title { font-size: 19px; font-weight: 800; letter-spacing: .02em; }
.topic-banner-sub { font-size: 12px; opacity: .92; margin-top: 5px; }
.topic-sort {
  flex-shrink: 0;
  border: none; border-radius: 14px;
  background: rgba(255, 255, 255, 0.95); color: #c9184a;
  font-size: 12px; font-weight: 600; padding: 7px 10px;
  outline: none; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}


.brand-banner {
  margin: 0 12px 4px;
  padding: 16px 16px 12px;
  border-radius: 16px;
  background: linear-gradient(135deg, #e6a23c, #b88230);
  color: #fff;
  box-shadow: 0 6px 20px rgba(184, 130, 48, 0.3);
}
.brand-banner-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
}
.brand-banner-title { font-size: 19px; font-weight: 800; letter-spacing: .02em; }
.brand-banner-sub { font-size: 12px; opacity: .92; margin-top: 5px; }
.brand-banner-badge {
  flex-shrink: 0; font-size: 11px; font-weight: 700;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 3px 10px; border-radius: 12px;
}
.brand-banner-cats {
  display: flex; gap: 8px; overflow-x: auto;
  margin-top: 14px; scrollbar-width: none;
}
.brand-banner-cats::-webkit-scrollbar { display: none; }
.brand-banner-cats .chip {
  flex-shrink: 0; padding: 5px 13px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.18); color: #fff;
  font-size: 12px; border: 1px solid rgba(255, 255, 255, 0.25);
}
.brand-banner-cats .chip.active {
  background: #fff; color: #a06a1f; font-weight: 700; border-color: #fff;
}


/* ===== 折上折横幅（大卡片 + 排序/分类页签一体，紫色主题） ===== */
.discount-banner {
  margin: 0 12px 4px;
  padding: 16px 16px 12px;
  border-radius: 16px;
  background: linear-gradient(135deg, #7c4dff, #4a2fb8);
  color: #fff;
  box-shadow: 0 6px 20px rgba(122, 77, 255, 0.3);
}
.discount-banner-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
}
.discount-banner-title { font-size: 19px; font-weight: 800; letter-spacing: .02em; }
.discount-banner-sub { font-size: 12px; opacity: .92; margin-top: 5px; }
.discount-banner-badge { font-size: 12px; opacity: .92; margin-top: 5px; }
/* 排序下拉框：白底紫字，融入横幅右上角 */
.discount-sort {
  flex-shrink: 0;
  border: none; border-radius: 14px;
  background: rgba(255, 255, 255, 0.95); color: #5b2fd4;
  font-size: 12px; font-weight: 600; padding: 7px 10px;
  outline: none; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.discount-banner-cats {
  display: flex; gap: 8px; overflow-x: auto;
  margin-top: 14px; scrollbar-width: none;
}
.discount-banner-cats::-webkit-scrollbar { display: none; }
.discount-banner-cats .chip {
  flex-shrink: 0; padding: 5px 13px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.18); color: #fff;
  font-size: 12px; border: 1px solid rgba(255, 255, 255, 0.25);
}
.discount-banner-cats .chip.active {
  background: #fff; color: #5b2fd4; font-weight: 700; border-color: #fff;
}


/* ===== 9.9 专区横幅（大卡片 + 页签一体） ===== *//* 专区 banner：文档流正常展示（不固定），页签吸顶逻辑见 .zone-sticky-tabs */
.nine-banner,
.discount-banner,
.brand-banner,
.album-banner,
.catrank-banner,
.topic-banner,
.rush-banner,
.daily-banner {
  margin: 0 12px 4px;
  padding: 16px 16px 12px;
  border-radius: 16px;
  color: #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  /* background 由各 banner 独立规则定义（橙/紫/金/蓝/青/玫红/红/绿） */
}
/* 专区页签（随 .zone-hero 容器整体吸顶） */
.zone-sticky-tabs {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 10px 12px 0;
  scrollbar-width: none;
}
.zone-sticky-tabs::-webkit-scrollbar { display: none; }
.zone-sticky-tabs .chip {
  flex-shrink: 0; padding: 6px 14px; border-radius: 18px;
  background: #f1f2f4; font-size: 13px; font-weight: 500; color: #555;
  border: 1px solid transparent; cursor: pointer;
  transition: all .15s ease;
}
.zone-sticky-tabs .chip.active {
  background: #fff; color: var(--primary);
  border-color: rgba(232, 85, 31, .45); font-weight: 600;
  box-shadow: 0 1px 4px rgba(232, 85, 31, .12);
}

/* ===== banner 区域：白底 + 整体吸顶（banner+页签随滚动固定，不跟列表滚动） ===== */
.zone-hero {
  position: -webkit-sticky;   /* 老 Safari */
  position: sticky;
  top: calc(56px + env(safe-area-inset-top, 0px));
  z-index: 45;
  background: #fff;
  padding: 12px 0 10px;
  margin-bottom: 12px;   /* hero 下方留白，与列表区拉开 */
  border-bottom: 1px solid var(--hairline);
}


.nine-banner {
  margin: 0 12px 4px;
  padding: 16px 16px 12px;
  border-radius: 16px;
  background: linear-gradient(135deg, #ff7a3d, #ff4d1f);
  color: #fff;
  box-shadow: 0 6px 20px rgba(255, 77, 31, 0.25);
}
/* 榜单列表容器：浅灰蓝背景衬托白色卡片（仅榜单页，不影响其他页面） */
/* 榜单列表容器：浅灰蓝背景，紧贴 hero（无圆角、无白色间隙） */
.rank-list-wrap {
  background: #eef0f4;
  padding: 4px 0 12px;
}
/* 榜单页：hero 与列表无缝衔接（hero 无下边距，分隔线保留） */
.zone-hero:has(+ .rank-list-wrap) {
  margin-bottom: 0;
}

/* 榜单页 hero 横幅（与专区页面一致的体验） */
.rank-banner {
  margin: 0 12px 4px;
  padding: 16px 16px 12px;
  border-radius: 16px;
  background: linear-gradient(135deg, #ff6b35, #e8431c);
  color: #fff;
  box-shadow: 0 6px 20px rgba(232, 67, 28, 0.25);
}
.nine-banner-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
}
.nine-banner-title { font-size: 19px; font-weight: 800; letter-spacing: .02em; }
.nine-banner-sub { font-size: 12px; opacity: .92; margin-top: 5px; }
.nine-banner-badge {
  flex-shrink: 0; font-size: 11px; font-weight: 700;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 3px 10px; border-radius: 12px;
}
/* 横幅内页签 */
.nine-banner-tabs {
  display: flex; gap: 8px; overflow-x: auto;
  margin-top: 14px; scrollbar-width: none;
}
.nine-banner-tabs::-webkit-scrollbar { display: none; }
.nine-banner-tabs .chip {
  flex-shrink: 0; padding: 5px 13px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.18); color: #fff;
  font-size: 12px; border: 1px solid rgba(255, 255, 255, 0.25);
}
.nine-banner-tabs .chip.active {
  background: #fff; color: #ff4d1f; font-weight: 700; border-color: #fff;
}

/* 登录状态条（我的返利页） */
.login-bar {
  display: flex; align-items: center; gap: 8px;
  margin: 10px 12px; padding: 12px 14px;
  background: var(--card); border-radius: 12px;
  box-shadow: var(--shadow);
}
.login-bar-info {
  flex: 1; min-width: 0;
  font-size: 13px; line-height: 1.4; color: var(--text);
}
.login-bar-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.login-bar-btn {
  font-size: 12px; font-weight: 600; color: #fff;
  background: var(--primary-grad); padding: 6px 14px; border-radius: 16px;
  cursor: pointer; white-space: nowrap;
}

/* 返利档位 */
.level-card {
  background: linear-gradient(160deg, #fffdf8, #fef6e8);
  border: 1px solid #f5e6c8;
}
.level-current {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 0 10px;
}
.level-badge {
  font-size: 14px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #e6a23c, #b88230);
  padding: 6px 16px; border-radius: 16px;
  box-shadow: 0 2px 6px rgba(184, 130, 48, 0.25);
}
.level-ratio { font-size: 13px; color: #8a6a3a; }
.level-progress { padding: 4px 0 10px; }
.level-bar {
  height: 8px; background: #f3e8d2; border-radius: 4px; overflow: hidden;
}
.level-bar i {
  display: block; height: 100%;
  background: linear-gradient(90deg, #ffd76a, #e6a23c);
  border-radius: 4px; transition: width .4s ease;
}
.level-bar-text { font-size: 12px; color: #8a6a3a; margin-top: 8px; }
.level-tip { font-size: 12px; color: #b88230; padding: 2px 0 10px; font-weight: 600; }
.level-actions { padding: 2px 0 14px; }
.level-redeem {
  width: 100%; border: none;
  background: linear-gradient(135deg, #f5a623, #e2871d);
  color: #fff; font-size: 14px; font-weight: 700;
  padding: 13px 0; border-radius: 24px; cursor: pointer;
  letter-spacing: .02em;
}
.level-redeem:active { opacity: .9; }
.level-redeem:disabled {
  background: linear-gradient(135deg, #e6a23c, #b88230);
  cursor: default; opacity: 1;
}

/* ===== 我的账号页 ===== */
.account-wrap { padding: 16px; }
.account-card {
  background: var(--card); border-radius: 14px; padding: 6px 14px;
  box-shadow: var(--shadow); margin-bottom: 12px;
}
.account-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 13px 0; border-bottom: 1px solid var(--hairline); font-size: 14px;
}
.account-row:last-child { border-bottom: none; }
.account-label { color: var(--text-2); }
.account-value { color: var(--text); font-weight: 600; }
.account-card-title { font-size: 15px; font-weight: 700; padding: 12px 0 4px; }
.account-share p { font-size: 12px; color: var(--text-2); line-height: 1.6; padding: 6px 0 10px; }
.share-link-row { display: flex; gap: 8px; margin-bottom: 12px; }
.share-link-row .copy-btn {
  flex-shrink: 0; border: none; background: #f1f2f4; color: #555;
  font-size: 12px; font-weight: 600; padding: 0 16px; border-radius: 10px;
  cursor: pointer;
}
.share-link-row .copy-btn:active { background: #e4e5e8; }
.share-link-row .auth-input { margin-bottom: 0; flex: 1; font-size: 12px; }
.share-fp { font-size: 11px; color: var(--text-2); line-height: 1.6; padding-top: 2px; }
.share-fp b { color: var(--primary); font-weight: 700; }

/* ===== 登录/注册页 ===== */
.auth-wrap { padding: 30px 24px 20px; }
.auth-logo { text-align: center; margin-bottom: 24px; }
.auth-logo img { width: 64px; height: 64px; border-radius: 16px; }
.auth-title { font-size: 22px; font-weight: 800; margin-top: 10px; color: var(--text); }
.auth-sub { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.auth-card { margin-bottom: 16px; }
.auth-tip { font-size: 11px; color: var(--text-2); text-align: center; margin-top: 8px; }
.auth-divider {
  display: flex; align-items: center; gap: 10px; color: var(--text-2);
  font-size: 12px; margin: 18px 0;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--hairline);
}
.auth-input {
  width: 100%; box-sizing: border-box; border: 1px solid var(--hairline); border-radius: 12px;
  padding: 12px 14px; font-size: 14px; margin-bottom: 10px; outline: none;
  background: #fff; box-sizing: border-box;
}
.auth-input:focus { border-color: rgba(232, 85, 31, .5); }
.btn-lg { width: 100%; height: 48px; font-size: 15px; border-radius: 24px; }
.auth-link { text-align: right; font-size: 12px; color: var(--text-2); margin-top: 8px; cursor: pointer; }
.auth-agree { font-size: 11px; color: var(--text-2); text-align: center; margin-top: 20px; }


.banner-carousel {
  position: relative;
  margin: 10px 16px 4px; border-radius: 16px; overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16);
  background: linear-gradient(135deg, #ffe0cc, #ffd6c2); /* 首图加载中的占位底色 */
}

/* 宽屏：轮播全宽 + 限高（横幅铺满无留白，图片 cover 裁剪保持比例） */
@media (min-width: 768px) {
  .banner-carousel {
    max-width: none;
    margin: 10px 16px 4px;   /* 与手机端一致，仅左右留边距 */
  }
}
.banner-track { position: relative; width: 100%; aspect-ratio: 2.2 / 1; }

/* 宽屏：轮播轨道固定高度（必须在上述 aspect-ratio 规则之后，覆盖比例） */
@media (min-width: 768px) {
  .banner-track { aspect-ratio: auto; height: 300px; }
}
.banner-slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity .5s ease;
  cursor: pointer; pointer-events: none;   /* 非激活 slide 不接收点击 */
}
.banner-slide.active { opacity: 1; pointer-events: auto; }
.banner-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.banner-slide .banner-title {
  position: absolute; left: 12px; bottom: 10px; z-index: 2;
  color: #fff; font-size: 12px; font-weight: 600;
  text-shadow: 0 1px 4px rgba(0,0,0,.5);
  max-width: 80%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.banner-dots {
  position: absolute; right: 10px; bottom: 8px; z-index: 3;
  display: flex; gap: 5px;
}
.banner-dots .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.5); cursor: pointer; transition: all .2s;
}
.banner-dots .dot.on { background: #fff; width: 14px; border-radius: 3px; }


.hero-zone {
  background: linear-gradient(to right, #FF4000, #FF7643, #FF6569);
  background: linear-gradient(to right,
    oklch(0.66 0.24 38),
    oklch(0.75 0.2 38),
    oklch(0.72 0.2 22));
  padding: 10px 0 20px;
  margin-bottom: 6px;
}
/* 渐变区内标题/副标题白色化 */
.hero-zone .explosive-title,
.hero-zone .rank-title { color: #fff; }
.hero-zone .explosive-sub,
.hero-zone .rank-sub { color: rgba(255, 255, 255, .88); }
.hero-zone .explosive-title::before,
.hero-zone .rank-title::before { background: rgba(255, 255, 255, .92); }
/* 渐变区内卡片：白底浮起 */
.hero-zone .exp-card,
.hero-zone .rank-item {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16);
}

/* ===== 首页榜单入口 ===== */
.rank-sec { padding: 0 0 6px; }
.rank-head {
  display: flex; align-items: baseline; gap: 12px;
  padding: 6px 16px 14px; white-space: nowrap; overflow: hidden;
}
.rank-title {
  font-size: 18px; font-weight: 800; color: var(--text); flex-shrink: 0;
  letter-spacing: .01em; display: flex; align-items: center; gap: 9px;
}
.rank-title::before {
  content: ''; width: 4px; height: 18px; border-radius: 3px;
  background: linear-gradient(135deg, #3a3f4b, #1a1d24);
}
.rank-sub { font-size: 12px; color: var(--text-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.rank-row {
  display: flex; gap: 11px; overflow-x: auto;
  padding: 0 16px 8px; scrollbar-width: none;
}
.rank-row::-webkit-scrollbar { display: none; }
.rank-item {
  flex-shrink: 0; width: 100px; padding: 15px 8px; border-radius: 16px;
  background: var(--card); border: 1px solid var(--hairline); text-align: center;
  cursor: pointer; box-shadow: var(--shadow);
  transition: transform .12s ease;
}
.rank-item:active { transform: scale(.97); }
.rank-item em {
  display: block; font-style: normal; font-size: 15px; font-weight: 700;
  color: var(--text); letter-spacing: .01em;
}
.rank-item b { display: block; font-size: 10px; font-weight: 400; color: var(--text-2); margin-top: 3px; }
/* 榜单页：排名角标（奖牌式，叠在图片左上角，不占列表宽度）
   前 3 名金/银/铜区分，其余深灰毛玻璃 */
.rank-wrap { position: relative; flex-shrink: 0; }
.rank-badge {
  position: absolute; left: 6px; top: 6px; z-index: 2;
  min-width: 30px; height: 26px; padding: 0 8px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800;
  font-family: -apple-system, "PingFang SC", sans-serif;
  color: #666;
  background: rgba(255, 255, 255, 0.94);   /* 白底：奖杯 emoji 清晰不混色 */
  border: 1.5px solid #d8d8dc;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.14);
  font-variant-numeric: tabular-nums;
}
.rank-badge .medal { margin-right: 2px; font-size: 13px; }
/* 第 4 名起：恢复原来的斜体数字样式 */
.rank-badge.plain {
  font-style: italic;
  font-family: Georgia, serif;
  font-size: 15px;
}
/* 前三名：金属色边框点缀 */
.rank-badge.g1 { border-color: #e6a23c; }
.rank-badge.g2 { border-color: #b9c1cc; }
.rank-badge.g3 { border-color: #c47a3e; }

/* 榜单卡片差异化：前三名用彩色边框区分，背景保持白底 */
.rank-card.g1 { border: 2px solid #e6a23c; }   /* 金 */
.rank-card.g2 { border: 2px solid #b9c1cc; }   /* 银 */
.rank-card.g3 { border: 2px solid #c47a3e; }   /* 铜 */
.rank-hot { font-size: 10px; color: #ff5e3a; white-space: nowrap; }

/* ===== 精选专辑页 ===== */
.album-list { display: flex; flex-direction: column; gap: 10px; padding: 12px; }
.album-list .album-card + .album-card { margin-top: 10px; } /* gap 兜底 */
.album-card {
  display: flex; gap: 13px; background: var(--card);
  border-radius: 16px; padding: 13px; cursor: pointer;
  box-shadow: var(--shadow); transition: transform .12s ease;
}
.album-card:active { transform: scale(.98); }
.album-covers {
  width: 92px; height: 92px; border-radius: 12px; overflow: hidden;
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr;
  gap: 2px; background: #f5f5f5; flex-shrink: 0;
}
.album-covers img { width: 100%; height: 100%; object-fit: cover; }
.album-covers img:first-child:nth-last-child(1) { grid-column: 1 / 3; grid-row: 1 / 3; }
.album-covers.empty-cover {
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; color: #ccc;
}
.album-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.album-title { font-size: 14.5px; font-weight: 700; color: var(--text); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.album-label { font-size: 11px; color: var(--primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.album-meta { font-size: 11px; color: var(--text-2); display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
/* 专辑详情头 */
.album-detail-head {
  display: flex; align-items: center; gap: 10px;
  margin: 10px 12px; padding: 12px;
  background: linear-gradient(135deg, #00a0e9, #0066cc); color: #fff;
  border-radius: 12px;
}
.album-detail-avatar {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
  border: 2px solid rgba(255,255,255,.5); flex-shrink: 0;
}
.album-detail-info { flex: 1; min-width: 0; }
.album-detail-name { font-size: 15px; font-weight: 700; }
.album-detail-sub { font-size: 11px; opacity: .9; margin-top: 3px; }

/* ===== 线报速递页 ===== */
.tipoff-list { display: flex; flex-direction: column; gap: 10px; padding: 12px; }
.tipoff-list .tipoff-card + .tipoff-card { margin-top: 10px; } /* gap 兜底 */
.tipoff-card {
  display: flex; gap: 12px; background: var(--card);
  border-radius: 12px; padding: 12px; cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.tipoff-card:active { transform: scale(.98); }
.tipoff-pic { width: 88px; height: 88px; border-radius: 10px; overflow: hidden; flex-shrink: 0; background: #f5f5f5; }
.tipoff-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tipoff-main { flex: 1; min-width: 0; }
.tipoff-tag {
  display: inline-block; font-size: 10px; color: #fff; font-weight: 600;
  background: linear-gradient(135deg, #fa8c16, #d46b08);
  padding: 1px 6px; border-radius: 4px; margin-bottom: 4px;
}
.tipoff-title { font-size: 14px; font-weight: 600; color: #333; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tipoff-content {
  font-size: 12px; color: #888; margin-top: 4px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tipoff-meta { font-size: 11px; color: #999; margin-top: 5px; display: flex; gap: 8px; }

/* ===== 官方活动页 ===== */
.topic-list { display: flex; flex-direction: column; gap: 10px; padding: 12px; }
.topic-list .topic-card + .topic-card { margin-top: 10px; } /* gap 兜底 */
.topic-card {
  background: var(--card); border-radius: 12px; overflow: hidden;
  cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.topic-card:active { transform: scale(.98); }
.topic-pic { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #f5f5f5; }
.topic-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topic-body { padding: 10px 12px 12px; }
.topic-name { font-size: 15px; font-weight: 700; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topic-info {
  font-size: 12px; color: #888; margin-top: 4px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.topic-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 8px; gap: 8px;
}
.topic-time { font-size: 11px; color: #999; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topic-side { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.topic-status { font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: 600; }
.topic-status.live { color: #fff; background: linear-gradient(135deg, #ff4d6d, #c9184a); }
.topic-status.soon { color: #13c2c2; background: #e6fffb; }
.topic-status.over { color: #999; background: #f2f3f5; }
.topic-go { font-size: 12px; color: var(--primary); font-weight: 600; }

/* ===== 品牌详情页 ===== */
.brand-detail-head {
  display: flex; align-items: center; gap: 12px;
  margin: 10px 12px; padding: 14px;
  background: linear-gradient(135deg, #e6a23c, #b88230); color: #fff;
  border-radius: 12px;
}
.brand-detail-logo {
  width: 52px; height: 52px; border-radius: 12px; object-fit: contain;
  background: #fff; flex-shrink: 0; padding: 6px;
}
.brand-detail-info { flex: 1; min-width: 0; }
.brand-detail-name { font-size: 17px; font-weight: 700; }
.brand-detail-feat { font-size: 12px; opacity: .95; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-detail-meta { font-size: 11px; opacity: .85; margin-top: 4px; }
.brand-detail-desc {
  margin: 0 12px 10px; padding: 10px 12px; font-size: 12px; color: #666;
  background: var(--card); border-radius: 10px; line-height: 1.7;
}

/* ===== 品牌专区页 ===== */
.brand-grid {
  display: flex; flex-direction: column; gap: 10px;
  padding: 12px;
}
/* 兜底：flex gap 在部分 WebView 不生效，用相邻 margin 保证卡片间距 */
.brand-grid .brand-cell + .brand-cell { margin-top: 10px; }
.brand-cell {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border-radius: 12px; padding: 12px;
  cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.brand-cell:active { transform: scale(.98); }
.brand-logo {
  width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0;
  overflow: hidden; background: #f5f5f5; display: flex; align-items: center; justify-content: center;
}
.brand-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.brand-cell-info { flex: 1; min-width: 0; }
.brand-name { font-size: 14px; color: #333; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-label {
  font-size: 11px; color: #999; margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand-cell-arrow { font-size: 20px; color: #ccc; flex-shrink: 0; }
.brand-cols { display: flex; flex-direction: column; gap: 12px; padding: 12px; }
.brand-col {
  background: var(--card); border-radius: 12px; padding: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.brand-col-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.brand-col-logo {
  width: 44px; height: 44px; border-radius: 10px; object-fit: contain;
  background: #f5f5f5; flex-shrink: 0; padding: 4px;
}
.brand-col-info { flex: 1; min-width: 0; }
.brand-col-name { font-size: 15px; font-weight: 700; color: #333; }
.brand-col-feat {
  font-size: 11px; color: #999; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand-col-disc {
  flex-shrink: 0; font-size: 11px; color: #fff; font-weight: 600;
  background: var(--primary-grad);
  padding: 3px 8px; border-radius: 10px;
}
.brand-col-sales { font-size: 11px; color: #ff5e3a; margin-top: 2px; font-weight: 600; }
.brand-goods { display: flex; flex-direction: column; gap: 8px; }
/* 兜底：部分 WebView 对 flex gap 支持不完整，用相邻 margin 保证卡片间距 */
.brand-goods .goods-card + .goods-card { margin-top: 8px; }
.brand-cols .brand-col + .brand-col { margin-top: 12px; }

/* ===== 每日低价页：场次面板 ===== */
.daily-banner {
  background: linear-gradient(135deg, #00b578, #007a55);
  color: #fff; padding: 16px 16px 12px; margin: 0 12px 4px;
  border-radius: 16px;
}
.daily-banner .rush-countdown b { background: rgba(255,255,255,.22); }

/* ===== 折上折页：filter-bar 两行（排序 + 分类） ===== */
.filter-col { flex-direction: column; align-items: stretch; gap: 6px; }
.filter-col .chips { flex: none; width: 100%; }

/* 品牌跳转定位高亮 */
.brand-flash {
  animation: brandFlash 1.8s ease;
}
@keyframes brandFlash {
  0% { box-shadow: 0 0 0 3px rgba(255, 61, 46, .55); }
  100% { box-shadow: 0 1px 4px rgba(0,0,0,.04); }
}

/* ===== PWA 安装引导 ===== */
.install-bar {
  position: fixed; left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom));
  z-index: 90; display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; background: #fff; border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,.14); border: 1px solid #f0f0f0;
  animation: install-in .3s ease;
}
@keyframes install-in { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.install-bar .install-info { flex: 1; min-width: 0; }
.install-bar .install-title { font-size: 13px; font-weight: 700; color: var(--text); }
.install-bar .install-desc { font-size: 11px; color: var(--text-2); margin-top: 2px; }
.install-bar .install-btn {
  flex-shrink: 0; border: none; cursor: pointer;
  background: var(--primary-grad); color: #fff;
  font-size: 13px; font-weight: 700; padding: 9px 18px; border-radius: 18px;
}
.install-bar .install-close {
  flex-shrink: 0; border: none; background: none; color: #bbb;
  font-size: 16px; cursor: pointer; padding: 4px 6px;
}
/* iOS 添加到主屏幕图文引导弹层 */
.ios-guide { text-align: center; }
.ios-guide .ios-arrow { font-size: 40px; display: block; margin: 6px 0 10px; }
.ios-guide p { font-size: 13px; color: var(--text-2); line-height: 1.8; }

/* ===== 全局表单宽度安全：所有输入控件统一 border-box，防止 width:100%+padding 溢出 ===== */
input, select, textarea { box-sizing: border-box; }

/* ===== 管理后台表单面板：跟随面板宽度（与下方表格一致，自适应屏幕） ===== */
#panel .form-card {
  max-width: none;          /* 取消 720px 限宽，随面板宽度 */
  margin-left: 12px;
  margin-right: 12px;
}
#panel .form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 16px;
}
@media (min-width: 768px) {
  #panel .form-grid { grid-template-columns: 1fr 1fr; }
}
/* System 文本域跟随卡片宽度 */
#panel textarea {
  width: 100%;
}

/* ===== 文章编辑页（admin-edit.html）：表单卡片跟随屏幕宽度 ===== */
body.admin-edit-page .form-card {
  max-width: none;
  margin-left: 12px;
  margin-right: 12px;
}

/* ===== 我的返利页（rebate.html）：表单/记录/规则跟随屏幕宽度 ===== */
body.rebate-page .form-card,
body.rebate-page .records,
body.rebate-page .rules {
  max-width: none;
  margin-left: 12px;
  margin-right: 12px;
}

/* ===== 超宽屏（≥1920px）：内容放宽到 1600，瀑布流/商品列表充分利用宽度 ===== */
@media (min-width: 1920px) {
  body { max-width: 1600px; }
  .bottom-nav, .action-bar { max-width: 1600px; }
}

/* ===== 日志模块关闭：隐藏底部"日志"导航（服务端给 body 加 articles-off） ===== */
body.articles-off .bottom-nav a[data-page="articles"] { display: none !important; }
