/* =============================================================
   补贴优选 · 网站 H5（移动端用户端）
   自适应策略：
   1) viewport-fit=cover + env(safe-area-inset-*) 适配刘海屏 / 手势条
   2) dvh 单位跟随移动端地址栏收缩，避免底部被遮挡
   3) clamp() 字号随屏宽平滑缩放，无需断点跳变
   4) auto-fill grid 自动决定商品列数（窄屏 2 列 / 大屏 3-4 列）
   5) 大屏（平板 / 桌面）居中限宽成"手机页"形态
   ============================================================= */

:root {
  --accent: #6366f1;
  --accent-2: #8b5cf6;
  --money: #f43f5e;
  --ok: #22c55e;
  --warn: #f59e0b;
  --radius: 14px;
  --tab-h: 56px;
  --maxw: 560px;
  /* r201：外壳实际宽度。手机 = 560 以内铺满；平板 / 折叠展开 / 横屏放开到 1080，
     并且 .app、底部导航、悬浮球都用这一个值，永远对齐、不会一边宽一边窄。 */
  --shell-w: min(var(--maxw), 100vw);
}

html[data-theme="dark"] {
  --bg-page: #0a0d14;
  --bg: #0d1117;
  --panel: #151a24;
  --panel-2: #1b2230;
  --text: #e8edf6;
  --text-2: #a3adc0;
  --text-3: #6b7688;
  --border: rgba(255, 255, 255, .07);
  --border-2: rgba(255, 255, 255, .13);
  --shadow: 0 8px 26px rgba(0, 0, 0, .45);
  --hero: linear-gradient(135deg, #4f46e5 0%, #7c3aed 52%, #a855f7 100%);
}

html[data-theme="light"] {
  --bg-page: #eef1f7;
  --bg: #f6f8fc;
  --panel: #ffffff;
  --panel-2: #f4f6fb;
  --text: #131722;
  --text-2: #5a6478;
  --text-3: #8b93a5;
  --border: rgba(16, 24, 40, .08);
  --border-2: rgba(16, 24, 40, .16);
  --shadow: 0 8px 24px rgba(20, 28, 50, .10);
  --hero: linear-gradient(135deg, #4f46e5 0%, #7c3aed 55%, #a855f7 100%);
}

/* ---------- 主题色（用户中心 / 账户页可切，实时生效并记忆） ----------
 * 共 8 项：「跟随系统」+ 7 个颜色。
 *   · 跟随系统（auto）—— 不写规则：落回上面的默认主色（靛蓝），即"跟着系统深浅走"。
 *   · 7 个颜色 —— 深色模式取亮色系，浅色模式换成同色系加深版（白底更清晰）。
 * 必须放在两个 data-theme 块之后：与 html[data-theme="dark"] 同特异性，靠顺序取胜。 */
html[data-accent="indigo"]   { --accent: #6366f1; --accent-2: #8b5cf6; --hero: linear-gradient(135deg, #4f46e5 0%, #7c3aed 52%, #a855f7 100%); }
html[data-accent="ocean"]    { --accent: #0ea5e9; --accent-2: #38bdf8; --hero: linear-gradient(135deg, #0369a1 0%, #0284c7 52%, #38bdf8 100%); }
html[data-accent="emerald"]  { --accent: #10b981; --accent-2: #34d399; --hero: linear-gradient(135deg, #047857 0%, #059669 52%, #34d399 100%); }
html[data-accent="violet"]   { --accent: #8b5cf6; --accent-2: #d946ef; --hero: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 52%, #e879f9 100%); }
html[data-accent="rose"]     { --accent: #f43f5e; --accent-2: #fb7185; --hero: linear-gradient(135deg, #be123c 0%, #e11d48 52%, #fb7185 100%); }
html[data-accent="amber"]    { --accent: #f59e0b; --accent-2: #fbbf24; --hero: linear-gradient(135deg, #b45309 0%, #d97706 52%, #fbbf24 100%); }
html[data-accent="graphite"] { --accent: #64748b; --accent-2: #94a3b8; --hero: linear-gradient(135deg, #334155 0%, #475569 52%, #94a3b8 100%); }
/* 浅色模式：同色系加深 */
html[data-theme="light"][data-accent="indigo"]   { --accent: #4f46e5; --accent-2: #7c3aed; --hero: linear-gradient(135deg, #4f46e5 0%, #7c3aed 55%, #a855f7 100%); }
html[data-theme="light"][data-accent="ocean"]    { --accent: #0284c7; --accent-2: #0369a1; --hero: linear-gradient(135deg, #075985 0%, #0284c7 55%, #0ea5e9 100%); }
html[data-theme="light"][data-accent="emerald"]  { --accent: #059669; --accent-2: #047857; --hero: linear-gradient(135deg, #065f46 0%, #059669 55%, #10b981 100%); }
html[data-theme="light"][data-accent="violet"]   { --accent: #7c3aed; --accent-2: #a21caf; --hero: linear-gradient(135deg, #6d28d9 0%, #7c3aed 55%, #a855f7 100%); }
html[data-theme="light"][data-accent="rose"]     { --accent: #e11d48; --accent-2: #be123c; --hero: linear-gradient(135deg, #9f1239 0%, #e11d48 55%, #fb7185 100%); }
html[data-theme="light"][data-accent="amber"]    { --accent: #d97706; --accent-2: #b45309; --hero: linear-gradient(135deg, #92400e 0%, #d97706 55%, #f59e0b 100%); }
html[data-theme="light"][data-accent="graphite"] { --accent: #475569; --accent-2: #334155; --hero: linear-gradient(135deg, #1e293b 0%, #475569 55%, #94a3b8 100%); }

/* ---------- 主题设置面板（用户中心 / 账户页） ---------- */
.theme-sec { margin-bottom: 14px; }
.theme-sec:last-child { margin-bottom: 0; }
.theme-sec .sec-label { font-size: .82em; font-weight: 700; color: var(--text-3); margin-bottom: 8px; }
.theme-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.theme-grid.mode { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.theme-opt {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 4px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--panel-2); color: var(--text);
  font: inherit; font-size: .78em; line-height: 1.2; text-align: center; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.theme-opt .dot { width: 26px; height: 26px; border-radius: 9px; flex: none; }
.theme-opt.auto .dot {
  background: linear-gradient(90deg, #0f172a 0 50%, #e2e8f0 50% 100%);
  border: 1px solid var(--border-2);
}
.theme-grid.mode .theme-opt .dot {
  display: grid; place-items: center; background: transparent; border: 0; font-size: 1.25em;
}
.theme-opt.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.theme-opt.on .nm { color: var(--accent); font-weight: 700; }
.theme-opt .nm { white-space: nowrap; }

/* ---------- 节日氛围 / 缅怀日 + 节日元素包 ---------- */
/* 缅怀日：整站素色。选择器带 [data-accent] / [data-theme="light"]，
 * 否则会被上面 2 类特异性的浅色主题色规则盖掉。 */
html[data-mourning="1"],
html[data-mourning="1"][data-accent],
html[data-theme="light"][data-mourning="1"] {
  --accent: #6b7280; --accent-2: #9ca3af;
  --hero: linear-gradient(135deg, #4b5563, #6b7280 55%, #9ca3af);
}
/* ⚠️ 不能用 html{filter:grayscale()} —— filter 会把 position:fixed 的定位基准
 *    从"视口"变成该元素自己（弹层 / 底部导航会错位）。改用全屏混合模式层去色。 */
@supports (mix-blend-mode: saturation) {
  html[data-mourning="1"] body::after {
    content: ''; position: fixed; inset: 0; z-index: 9999;
    background: #808080; mix-blend-mode: saturation; pointer-events: none;
  }
}

/* 节日 / 缅怀横幅（用户端只显示节日名 + 祝福） */
.fest-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 10px 14px 0; padding: 8px 12px;
  border: 1px solid var(--accent); border-radius: 12px;
  background: var(--panel-2); font-size: .8em; line-height: 1.3;
}
.fest-bar .fb-orn { animation: fb-sway 3.6s ease-in-out infinite; }
.fest-bar .fb-icon { font-size: 1.15em; line-height: 1; }
.fest-bar .fb-name { font-weight: 700; color: var(--accent); }
.fest-bar .fb-text { color: var(--text-2); }
.fest-bar.mourning { border-color: var(--border); }
.fest-bar.mourning .fb-name { color: var(--text-2); }
.fest-bar.mourning .fb-orn { display: none; }
@keyframes fb-sway { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg); } }

/* 节日漂浮装饰层（元素包 sky）：pointer-events:none，绝不挡点击 */
.fest-sky {
  position: fixed; inset: 0; z-index: 3; overflow: hidden;
  pointer-events: none; user-select: none;
}
.fest-sky > span {
  position: absolute; top: -10vh; line-height: 1;
  animation-name: fest-fall; animation-timing-function: linear; animation-iteration-count: infinite;
  will-change: transform;
}
@keyframes fest-fall {
  0%   { transform: translate3d(0, -12vh, 0) rotate(0deg); }
  100% { transform: translate3d(2.5vw, 116vh, 0) rotate(300deg); }
}
@media (prefers-reduced-motion: reduce) { .fest-sky { display: none; } }
html[data-mourning="1"] .fest-sky { display: none; }

/* 节日期间顶栏描边跟着主题色走（元素包生效时才命中） */
html[data-deco]:not([data-deco=""]) .topbar { border-bottom-color: var(--accent); }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg-page);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  /* 全站字号基准：整体放大一档（原 13.5~15px → 15~17px），
     站内绝大多数文字用 em 相对单位，改这里即全站同步放大。 */
  font-size: clamp(15.5px, 4.3vw, 17px);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

body { display: flex; justify-content: center; }

/* ---------- 外壳：任意机型自适应（r201 重做） ----------
 * 手机：铺满屏幕宽度；平板 / 折叠展开 / 横屏：放开到 1080 并铺满，
 * 不再留两条大黑边（原来 ≥700px 会缩成 660px 的「手机卡片」，两边全是空白）。
 * 注意：宽屏下 .app 不再 overflow:hidden，否则内容超高时会被裁掉且滚不动。 */
.app {
  position: relative;
  display: flex; flex-direction: column;
  width: 100%;
  max-width: var(--shell-w);
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
}
@media (min-width: 700px) {
  :root { --shell-w: min(1080px, 100vw); }
  body { align-items: stretch; padding: 0; }
  .app { max-width: var(--shell-w); }
}
/* 超宽屏（平板横屏 / 折叠展开 / 桌面）：再放宽一档，购物体验更好 */
@media (min-width: 1200px) {
  :root { --shell-w: min(1280px, 100vw); }
}

/* 页面主体：纵向 flex，让「内容 + 页脚」能自然撑开，短页面（消息空态等）也能填满 */
.page { flex: 1 1 auto; display: flex; flex-direction: column; padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 16px); }
.page-inner { flex: 1 1 auto; display: flex; flex-direction: column; width: 100%; padding: 0 clamp(12px, 3.6vw, 22px); }
/* 页面里原有块级子元素保持「不拉伸、按内容高度」，避免改成 flex 后间距变化 */
.page-inner > * { flex: 0 0 auto; }
/* 只有空态和页脚需要撑开：空态吃满剩余空间，页脚贴底 */
.page-inner > .empty { flex: 1 1 auto; }
.page-inner > .h5-footer { flex: 0 0 auto; }

/* ---------- 顶部 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: var(--hero);
  color: #fff;
  padding: calc(env(safe-area-inset-top) + 12px) clamp(12px, 3.6vw, 18px) 14px;
}
.topbar.plain { background: var(--bg); color: var(--text); border-bottom: 1px solid var(--border); }
.topbar-row { display: flex; align-items: center; gap: 10px; }
.topbar h1 { margin: 0; font-size: 1.12em; font-weight: 650; letter-spacing: .2px; }
.topbar .sub { font-size: .78em; opacity: .82; margin-top: 2px; }
.brand-mark {
  width: 60px; height: 60px; border-radius: 16%; flex: none;
  /* r170：去掉容器垫色 —— LOGO 直接铺在顶栏主题色上，四角/边缘不再显出空隙 */
  background: transparent;
  display: grid; place-items: center; font-size: 16px;
  overflow: hidden;
  /* r175q：LOGO 必须浮在最上层 —— 避免被节日飘落层 / 装饰背景 / 相邻卡片盖住 */
  position: relative;
  z-index: 5;
}
.brand-mark img, .login-logo img {
  width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit;
  /* r175q：图片自身再抬一层，容器有背景也压不住它 */
  position: relative;
  z-index: 1;
}
/* r161：LOGO 图加载失败后的默认标识（与「没配 LOGO」时的回落一致） */
.logo-fallback { font-size: 1em; line-height: 1; display: grid; place-items: center; width: 100%; height: 100%; }
.topbar-icon {
  margin-left: auto; display: flex; gap: 8px; align-items: center;
}
.icon-btn {
  width: 34px; height: 34px; border-radius: 10px; border: 1px solid transparent;
  background: rgba(255, 255, 255, .16); color: inherit;
  display: grid; place-items: center; font-size: 15px; cursor: pointer;
}
.topbar.plain .icon-btn { background: var(--panel-2); border-color: var(--border); }

/* 搜索框 */
.search {
  display: flex; align-items: center; gap: 8px;
  margin-top: 12px;
  background: rgba(255, 255, 255, .95);
  border-radius: 12px; padding: 0 6px 0 12px;
  height: 42px;
}
.search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  font-size: 1em; color: #111827;
}
.search input::placeholder { color: #9aa3b2; }
.search .go {
  flex: none; height: 32px; padding: 0 14px; border: 0; border-radius: 9px;
  background: var(--accent); color: #fff; font-size: .92em; font-weight: 600; cursor: pointer;
}

/* 搜索框内「平台下拉」按钮（r53，原「粘贴」按钮位） */
.search .plate-pick {
  flex: none; display: inline-flex; align-items: center; gap: 3px;
  height: 32px; padding: 0 8px 0 10px; border: 0; border-radius: 9px;
  background: var(--accent); color: #fff; font-size: .86em; font-weight: 600;
  cursor: pointer; white-space: nowrap;
}
.search .plate-pick .caret { font-style: normal; font-size: .8em; opacity: .85; }
.search .plate-pick:active { opacity: .88; }

/* 平台选择弹层 */
.plate-list { display: flex; flex-direction: column; margin-top: 6px; }
.plate-opt {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 12px 4px; border: 0; border-bottom: 1px solid var(--border);
  background: transparent; color: var(--text); text-align: left; cursor: pointer; font: inherit;
}
.plate-opt:last-child { border-bottom: 0; }
.plate-opt .pi { font-size: 1.35em; flex: none; }
.plate-opt .pn { font-size: 1.02em; }
.plate-opt.on { font-weight: 700; }
.plate-opt:active { background: var(--panel-2); }

/* 横屏（矮屏）压缩头部 */
@media (orientation: landscape) and (max-height: 520px) {
  .topbar { padding-top: calc(env(safe-area-inset-top) + 8px); padding-bottom: 10px; }
  .topbar h1 { font-size: 1em; }
  .sub { display: none; }
}

/* ---------- 卡片 / 通用 ---------- */
.card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px;
  margin-top: clamp(10px, 2.6vw, 14px);
}
.card.tight { padding: 12px; }
.card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.card-head h3 { margin: 0; font-size: 1em; font-weight: 650; }
.card-head .more { margin-left: auto; font-size: .82em; color: var(--text-3); background: none; border: 0; cursor: pointer; }

.hero-card {
  background: var(--hero); color: #fff; border: 0;
  border-radius: var(--radius); padding: 16px;
  margin-top: -8px;
}
.hero-card .label { font-size: .84em; opacity: .85; }
.hero-card .amount {
  font-size: clamp(26px, 8vw, 34px); font-weight: 700; letter-spacing: -.5px;
  font-variant-numeric: tabular-nums; line-height: 1.2;
}
.hero-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .22);
}
.hero-grid div { text-align: center; }
.hero-grid b { display: block; font-size: 1.02em; font-variant-numeric: tabular-nums; }
.hero-grid span { font-size: .74em; opacity: .85; }

.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
/* r189：四格固定 2×2（田字格）——原先 auto-fit + minmax(120px) 在手机上会退化成单列竖排 */
.stat-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat-grid.three { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
.stat-box { background: var(--panel-2); border-radius: 12px; padding: 11px 12px; }
.stat-box .k { font-size: .78em; color: var(--text-2); }
.stat-box .v { font-size: 1.16em; font-weight: 680; font-variant-numeric: tabular-nums; margin-top: 2px; }

.money { color: var(--money); font-variant-numeric: tabular-nums; }
.muted { color: var(--text-3); }
.small { font-size: .84em; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* ---------- 商品列表 ---------- */
.goods {
  display: grid; gap: clamp(9px, 2.6vw, 13px);
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  margin-top: clamp(10px, 2.6vw, 14px);
}
@media (min-width: 420px) { .goods { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); } }
@media (min-width: 700px) { .goods { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); } }
/* r334：超窄屏（预览面板 / 小屏手机）也不退化成单列 —— 商品列表始终两列往下排 */
@media (max-width: 370px) { .goods { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.good {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; display: flex; flex-direction: column;
  text-align: left; padding: 0; color: inherit; font: inherit;
  transition: transform .12s ease, border-color .12s ease;
}
.good:active { transform: scale(.985); border-color: var(--border-2); }
.good .thumb {
  position: relative; width: 100%; aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, var(--panel-2), var(--panel));
  display: grid; place-items: center; font-size: 30px; color: var(--text-3);
  overflow: hidden;
}
.good .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.good .thumb img.broken { display: none; }
.good .plate {
  position: absolute; left: 6px; top: 6px; z-index: 2;
  font-size: .68em; padding: 2px 7px; border-radius: 999px; color: #fff; font-weight: 600;
}
/* 置顶角标：置顶商品排在最前，到期后自动消失 */
.good .pin-badge {
  position: absolute; right: 6px; top: 6px; z-index: 2;
  font-size: .68em; padding: 2px 7px; border-radius: 999px;
  background: rgba(99,102,241,.92); color: #fff; font-weight: 600;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.good.pinned { box-shadow: 0 0 0 1.5px rgba(99,102,241,.55); }
.good .body { padding: 9px 10px 11px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.good .title {
  font-size: .88em; line-height: 1.42; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.good .price-row { display: flex; align-items: baseline; gap: 6px; margin-top: auto; }
.good .price { color: var(--money); font-weight: 700; font-size: 1.06em; font-variant-numeric: tabular-nums; }
.good .origin { font-size: .76em; color: var(--text-3); text-decoration: line-through; }
.good .badge-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; }
.good .rebate {
  display: flex; align-items: center; justify-content: flex-start; gap: 6px;
  font-size: .8em; color: var(--text-2); margin-top: 4px;
}
.good .rebate b { color: var(--money); font-size: 1.05em; font-variant-numeric: tabular-nums; }
.good .coupon {
  font-size: .72em; padding: 1px 6px; border-radius: 5px;
  color: #e11d48; background: rgba(244, 63, 94, .12); border: 1px solid rgba(244, 63, 94, .28);
}

/* ---------- 筛选 chips ---------- */
.chips {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 4px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.chips::-webkit-scrollbar { display: none; }
/* 平铺换行形态：内容全部直接显示，不做横向滑动裁切 */
.chips.wrap { flex-wrap: wrap; overflow-x: visible; row-gap: 8px; }
.chips.wrap .chip { flex: 0 0 auto; }
.chip {
  flex: none; height: 28px; padding: 0 11px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--panel-2); color: var(--text-2);
  font-size: .78em; cursor: pointer; white-space: nowrap;
}
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }

/* ---------- 在线 / 联盟直搜结果卡片标记（r53） ---------- */
.good .thumb .online-tag {
  position: absolute; left: 6px; bottom: 6px; z-index: 2;
  background: rgba(0,0,0,.62); color: #fff; font-size: .62em;
  padding: 2px 7px; border-radius: 999px;
}

/* ---------- 列表行 ---------- */
.list { display: flex; flex-direction: column; }
.row {
  display: flex; gap: 11px; padding: 12px 0; border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.row:last-child { border-bottom: 0; padding-bottom: 2px; }
/* r178b：thumb-sm 原来只在 .row 里生效（.row .thumb-sm）—— r176 把它用进了
   转链结果弹层（那里没有 .row 包裹），结果容器没有 overflow、img 也没有任何
   尺寸约束，商品原图直接撑满整个弹层，文案全叠在图上（用户截图的"图片不正常"）。
   改成通用类：任何地方的 thumb-sm 都是小方图，img 一律裁剪填充。 */
.thumb-sm {
  width: 58px; height: 58px; flex: none; border-radius: 10px; overflow: hidden;
  background: var(--panel-2); display: grid; place-items: center; font-size: 20px; color: var(--text-3);
}
.thumb-sm img { width: 100%; height: 100%; object-fit: cover; }
.thumb-sm img.broken { display: none; }
.row .grow { flex: 1; min-width: 0; }
.row .t {
  font-size: .9em; line-height: 1.42; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.row .meta { font-size: .78em; color: var(--text-3); margin-top: 3px; display: flex; gap: 8px; flex-wrap: wrap; }
.row .amt { text-align: right; flex: none; font-variant-numeric: tabular-nums; }

/* ---------- 站内消息（r146）：列表只留预览，点开看全文 ---------- */
.msg-row { cursor: pointer; border-radius: 10px; transition: background .15s ease; }
.msg-row:active { background: var(--panel-2); }
.msg-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.msg-preview {
  font-size: .85em; color: var(--text-2); margin-top: 4px; line-height: 1.55;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  word-break: break-word;
}
.msg-more { margin-left: auto; color: var(--accent-2); white-space: nowrap; }
.msg-detail-meta { font-size: .78em; color: var(--text-3); margin-bottom: 10px; }
.msg-detail-body {
  font-size: .95em; line-height: 1.8; color: var(--text);
  white-space: pre-wrap; word-break: break-word;
  max-height: 56dvh; overflow-y: auto;
  padding: 12px 13px; border-radius: 12px; background: var(--panel-2);
}
.row .amt b { font-size: 1.02em; }

/* ---------- 标签 ---------- */
.tag {
  display: inline-block; font-size: .72em; padding: 1.5px 7px; border-radius: 999px;
  border: 1px solid var(--border-2); color: var(--text-2); white-space: nowrap;
}
.tag.ok { color: var(--ok); border-color: rgba(34, 197, 94, .4); background: rgba(34, 197, 94, .1); }
.tag.warn { color: var(--warn); border-color: rgba(245, 158, 11, .4); background: rgba(245, 158, 11, .1); }
.tag.danger { color: var(--money); border-color: rgba(244, 63, 94, .4); background: rgba(244, 63, 94, .1); }
.tag.info { color: #38bdf8; border-color: rgba(56, 189, 248, .4); background: rgba(56, 189, 248, .1); }
.tag.accent { color: var(--accent-2); border-color: rgba(139, 92, 246, .4); background: rgba(139, 92, 246, .1); }

/* ---------- 按钮 ---------- */
.btn {
  height: 44px; padding: 0 16px; border-radius: 11px; border: 1px solid var(--border-2);
  background: var(--panel-2); color: var(--text); font-size: .95em; font-weight: 600;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.grad { background: var(--hero); border: 0; color: #fff; }
.btn.ghost { background: transparent; }
.btn.block { width: 100%; }
.btn.sm { height: 34px; font-size: .85em; padding: 0 12px; border-radius: 9px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-row { display: flex; gap: 10px; margin-top: 12px; }
.btn-row > * { flex: 1; }

/* ---------- 表单 ---------- */
.field { margin-top: 12px; }
.field label { display: block; font-size: .84em; color: var(--text-2); margin-bottom: 6px; }
.input {
  width: 100%; height: 44px; padding: 0 12px; border-radius: 11px;
  border: 1px solid var(--border-2); background: var(--panel-2); color: var(--text);
  font-size: 1em; outline: 0;
}
.input:focus { border-color: var(--accent); }
textarea.input { height: auto; min-height: 88px; padding: 10px 12px; resize: vertical; line-height: 1.55; }
.select { width: 100%; height: 44px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--border-2); background: var(--panel-2); color: var(--text); font-size: 1em; }

/* ---------- 底部 tabbar ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: var(--shell-w); z-index: 40;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--panel);            /* 不透明底：半透明+blur 在部分机型上会让文字发灰看不清 */
  border-top: 1px solid var(--border-2);
  padding-bottom: env(safe-area-inset-bottom);
}
/* r201：宽屏也保持 fixed（sticky 在 .app 变高时会把导航带到屏幕外 / 被内容推走） */
.tab {
  border: 0; background: transparent; color: var(--text); cursor: pointer;
  height: var(--tab-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: .82em; font-weight: 500; padding: 0; line-height: 1.2;
}
.tab i { display: block; width: 22px; height: 22px; line-height: 1; }
.tab i svg { width: 22px; height: 22px; display: block; }
.tab.on { color: var(--accent); font-weight: 650; }
.tab .badge {
  position: absolute; margin: -18px 0 0 20px; min-width: 15px; height: 15px; padding: 0 4px;
  border-radius: 999px; background: var(--money); color: #fff; font-size: 11.5px;
  display: grid; place-items: center;
}

/* ---------- 底部弹层 ---------- */
.sheet-mask {
  position: fixed; inset: 0; z-index: 60; background: rgba(6, 9, 16, .55);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fade .16s ease;
}
.sheet {
  width: 100%; max-width: var(--shell-w); max-height: 88vh; max-height: 88dvh;
  background: var(--panel); border-radius: 18px 18px 0 0;
  padding: 16px clamp(12px, 3.6vw, 18px) calc(env(safe-area-inset-bottom) + 16px);
  overflow-y: auto; animation: up .22s cubic-bezier(.22, 1, .36, 1);
}
@media (min-width: 700px) {
  .sheet-mask { align-items: center; }
  .sheet { border-radius: 18px; max-height: 84dvh; }
}
.sheet-grab { width: 38px; height: 4px; border-radius: 99px; background: var(--border-2); margin: 0 auto 12px; }
.sheet-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.sheet-head h3 { margin: 0; font-size: 1.05em; }
.sheet-head .x { margin-left: auto; border: 0; background: transparent; color: var(--text-3); font-size: 19px; cursor: pointer; }

@keyframes up { from { transform: translateY(18%); opacity: .4; } to { transform: translateY(0); opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- r204：邀请落地页 —— 底部 tab 上方常驻药丸按钮（未注册受邀用户） ---------- */
.invite-pillbar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 12px);
  z-index: 45; width: 100%; max-width: var(--shell-w);
  display: flex; gap: 12px; justify-content: center;
  padding: 0 clamp(12px, 3.6vw, 22px); box-sizing: border-box;
  pointer-events: none;            /* 仅按钮可点，其余透传，不挡页面滚动/点击 */
}
.invite-pillbar.hide { display: none; }
.invite-pillbar .pill {
  pointer-events: auto;
  flex: 1 1 0; max-width: 200px; height: 44px; border-radius: 999px;
  font-size: .95em; font-weight: 600; cursor: pointer;
  background: transparent;         /* 透明背景药丸 */
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
}
.invite-pillbar .pill:active { transform: scale(.96); }
/* 用户登录：中性描边、透明底 */
.invite-pillbar .pill-login { color: var(--text-2); border: 1.5px solid var(--border-2); }
/* 用户注册：主题色描边、透明底 + 柔和光晕，作为主行动点 */
.invite-pillbar .pill-reg { color: var(--accent); border: 1.5px solid var(--accent); box-shadow: 0 6px 18px -8px var(--accent); }
.invite-pillbar .pill-reg:active { box-shadow: 0 4px 12px -6px var(--accent); }

/* ---------- r204：邀请问候 —— 居中浮窗（任意端通用，自适应不变形） ---------- */
.invite-float-mask {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; box-sizing: border-box;
  background: rgba(8, 12, 20, .52);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  animation: ifade .2s ease;
}
.invite-float {
  position: relative; width: 100%; max-width: 340px; box-sizing: border-box;
  background: var(--panel); border: 1px solid var(--border-2); border-radius: 22px;
  padding: 26px 22px 22px; text-align: center;
  box-shadow: 0 24px 70px -16px rgba(0, 0, 0, .5);
  animation: ipop .28s cubic-bezier(.22, 1, .36, 1);
}
.invite-float .if-close {
  position: absolute; top: 10px; right: 12px; width: 30px; height: 30px;
  border: 0; background: transparent; color: var(--text-3); font-size: 17px;
  cursor: pointer; border-radius: 50%; line-height: 1;
}
.invite-float .if-close:active { background: var(--panel-2); }
.invite-float .if-quote {
  margin: 22px 4px 6px; font-size: 1.16em; line-height: 1.62;
  font-weight: 600; color: var(--text); letter-spacing: .3px;
}
.invite-float .if-from { font-size: .9em; color: var(--text-2); margin-top: 2px; }
.invite-float .if-from b { color: var(--accent); font-weight: 650; }
.invite-float .if-actions { display: flex; gap: 10px; margin-top: 20px; }
.invite-float .if-actions .btn { flex: 1; height: 46px; border-radius: 999px; font-weight: 650; font-size: .95em; }
@keyframes ifade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ipop { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .invite-float-mask, .invite-float { animation: none; } }

/* 复制条 */
.copy-field {
  display: flex; align-items: center; gap: 8px; margin-top: 10px;
  background: var(--panel-2); border: 1px dashed var(--border-2); border-radius: 11px; padding: 9px 10px;
}
.copy-field .val { flex: 1; min-width: 0; font-size: .9em; word-break: break-all; }
/* 长链接默认单行收起，点「展开」看全文（点正文任意处也可切换） */
.copy-field .val.fold {
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
  overflow: hidden; word-break: break-all;
}
.copy-field .btn { flex: none; }

/* 提示 */
.note {
  font-size: .82em; color: var(--text-2); background: var(--panel-2);
  border-left: 3px solid var(--accent); border-radius: 8px; padding: 9px 11px; margin-top: 10px;
}
.note ol { margin: 4px 0 0 -14px; padding-left: 14px; }
.note li { margin: 3px 0; }

/* toast */
.toast-root {
  position: fixed; left: 50%; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 22px);
  transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px;
  align-items: center; pointer-events: none; width: min(92vw, 420px);
}
/* r325：弹层（转链结果 / 复制口令下单）打开时，提示挪到顶部 —— 弹层贴底，
   提示留在底部会压住口令文本与「复制口令 / 一键打开」按钮。 */
.toast-root.at-top {
  top: calc(env(safe-area-inset-top, 0px) + 58px);
  bottom: auto;
}
.toast {
  background: rgba(17, 22, 33, .95); color: #fff; font-size: .88em;
  padding: 10px 15px; border-radius: 12px; box-shadow: var(--shadow);
  animation: up .18s ease; max-width: 100%; text-align: center;
  pointer-events: auto; cursor: pointer;   /* r326：点一下即可立即消灭（含排队） */
}
.toast.ok { background: rgba(22, 122, 74, .96); }
.toast.err { background: rgba(159, 32, 62, .96); }

/* 加载 / 空态 */
.loading { display: grid; place-items: center; gap: 10px; padding: 46px 0; color: var(--text-3); }
.spin {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--border-2); border-top-color: var(--accent);
  animation: sp .7s linear infinite;
}
@keyframes sp { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 42px 16px; color: var(--text-3); font-size: .9em;
  /* r201：短页面（消息 / 订单空态）至少占可视区一半，并把图标+文字整体居中，不再挤在顶部 */
  min-height: 46vh; min-height: 46dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.empty .ico { font-size: 34px; display: block; margin-bottom: 8px; }

/* 预览模式提示条（后台预览时注入） */
.preview-bar {
  position: sticky; top: 0; z-index: 50;
  background: var(--warn); color: #1a1205; font-size: .78em; font-weight: 600;
  padding: 5px clamp(12px, 3.6vw, 18px); text-align: center;
}

/* 骨架 */
.skel { background: linear-gradient(90deg, var(--panel-2) 25%, var(--border) 37%, var(--panel-2) 63%); background-size: 400% 100%; animation: sk 1.3s ease infinite; border-radius: 8px; }
@keyframes sk { from { background-position: 100% 50%; } to { background-position: 0 50%; } }

/* ---------- 首页类目频道（后台「H5 装修」管理） ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px 4px;
  padding: 12px 10px 6px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
}
.cat-item {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  background: none; border: 0; padding: 2px 0; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.cat-item .ci-icon {
  width: 46px; height: 46px; border-radius: 14px;
  display: grid; place-items: center;
  font-size: 23px; color: #fff;
  background: linear-gradient(135deg, var(--tone), color-mix(in srgb, var(--tone) 62%, #000));
  box-shadow: 0 4px 10px color-mix(in srgb, var(--tone) 38%, transparent);
  transition: transform .15s ease;
}
.cat-item:active .ci-icon { transform: scale(.9); }
.cat-item .ci-name {
  font-size: .84em; color: var(--text-2); max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cat-item.on .ci-name { color: var(--tone); font-weight: 650; }
.cat-item.on .ci-icon { outline: 2px solid var(--tone); outline-offset: 2px; }
@media (min-width: 700px) { .cat-grid { grid-template-columns: repeat(6, 1fr); } }
/* r202：宽屏（平板 / 横屏 / 折叠展开）分类宫格直接放成一排，不再折行成两排 */
@media (min-width: 900px) { .cat-grid { grid-template-columns: repeat(10, 1fr); } }
@media (min-width: 1200px) { .cat-grid { grid-template-columns: repeat(10, 1fr); } }
@media (min-width: 700px) { .goods { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); } }
/* r202：宽屏幻灯片比例放宽（3.4:1），比手机矮一点但不会被压扁 */
@media (min-width: 900px) { .h5-slide { aspect-ratio: 3.4 / 1; } }
@media (min-width: 700px) { .stat-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 700px) { .stat-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } }

/* ---------- 底部 Banner（后台可管理） ---------- */
.banner {
  width: 100%; display: flex; align-items: center; gap: 11px;
  margin-top: 12px; padding: 12px 14px;
  border: 0; border-radius: 14px; cursor: pointer; text-align: left;
  background: linear-gradient(120deg, var(--tone), color-mix(in srgb, var(--tone) 55%, #1c2230));
  color: #fff; box-shadow: 0 6px 16px color-mix(in srgb, var(--tone) 30%, transparent);
  -webkit-tap-highlight-color: transparent;
}
.banner .bn-ico {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  display: grid; place-items: center; font-size: 19px;
  background: rgba(255,255,255,.18);
}
.banner .bn-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.banner .bn-body b { font-size: .92em; }
.banner .bn-body i { font-style: normal; font-size: .74em; opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.banner .bn-arrow { opacity: .8; font-size: 18px; }
.banner.has-link .bn-arrow::after { content: ''; }

/* ---------- 抽奖奖品池（多级别） ---------- */
.prize-list { display: flex; flex-direction: column; }
.prize-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.prize-row:last-child { border-bottom: 0; }
.prize-level {
  flex: none; padding: 3px 9px; border-radius: 999px;
  font-size: .7em; font-weight: 650; color: #fff; letter-spacing: .5px;
}

/* ---------- 底部 Banner v2：柔和卡片风（主题色仅点缀） ---------- */
.banner {
  width: 100%; display: flex; align-items: center; gap: 12px;
  margin-top: 12px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 14px; cursor: pointer; text-align: left;
  background: var(--panel); color: var(--text);
  box-shadow: var(--shadow-sm, 0 2px 8px rgba(0,0,0,.06));
  position: relative; overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  transition: transform .12s ease;
}
.banner:active { transform: scale(.985); }
.banner::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--tone, #6366f1);
}
.banner .bn-ico {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  display: grid; place-items: center; font-size: 19px;
  color: var(--tone, #6366f1);
  background: color-mix(in srgb, var(--tone, #6366f1) 14%, transparent);
}
.banner .bn-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.banner .bn-body b { font-size: .9em; color: var(--text); }
.banner .bn-body i { font-style: normal; font-size: .74em; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.banner .bn-arrow { color: var(--text-3, var(--text-2)); opacity: .55; font-size: 17px; }

/* ---------- 页脚版权 ---------- */
.h5-footer {
  margin-top: auto;   /* r201：内容短时把页脚推到屏幕底部，页面看起来是「满」的 */ padding: 14px 0 10px; text-align: center;
  color: var(--text-3, var(--text-2)); font-size: .7em; line-height: 1.7;
  opacity: .85;
}
.h5-footer .sep { margin: 0 6px; opacity: .5; }
/* 页脚最底行：手机 App 下载按钮（r210：整体放大一倍、加描边与投影，远看也显眼） */
/* r212：尺寸与底部「用户登录 / 用户注册」药丸对齐（同为 44px 高、.95em、600 字重），
   不再做成大号按钮 —— 之前 2em 比登录/注册药丸大一圈，看着不协调 */
.h5-footer .h5-applink {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; margin-top: 12px;
  height: 44px; padding: 0 22px; border-radius: 999px;
  border: 1.5px solid var(--accent); background: var(--panel-2);
  color: var(--accent); font-weight: 700; text-decoration: none;
  font-size: 1.2em; line-height: 1;
  box-shadow: 0 6px 18px -8px var(--accent);
}
.h5-footer .h5-applink:active { opacity: .65; }

/* 资金溯源：分类改为「名称 / 金额」上下两排，平铺一行全部显示（不再横向裁切） */
.chips.trace-tabs { display: flex; gap: 6px; overflow-x: visible; }
.chips.trace-tabs .trace-chip {
  flex: 1 1 0; min-width: 0; height: auto; padding: 7px 3px; border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.trace-chip .tc-top { font-size: .78em; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trace-chip .tc-amt { font-size: .8em; font-weight: 700; font-family: Consolas, 'Courier New', monospace; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============ 用户中心 / 登录页 ============ */
.btn.danger-solid { background: var(--money); border-color: var(--money); color: #fff; }
.link-x { border: 0; background: transparent; color: var(--text-3); font-size: .78em; cursor: pointer; padding: 0 0 0 8px; text-decoration: underline; }

.uc-avatar {
  width: 52px; height: 52px; border-radius: 16px; flex: none;
  background: rgba(255, 255, 255, .22); display: grid; place-items: center; font-size: 26px;
}

.login-wrap { padding: 34px clamp(14px, 4vw, 20px) 30px; display: flex; flex-direction: column; gap: 14px; max-width: var(--maxw); margin: 0 auto; }
.login-brand { text-align: center; padding: 16px 0 6px; }
.login-logo {
  width: 128px; height: 128px; margin: 0 auto 12px; border-radius: 22%; font-size: 56px;
  background: var(--hero); display: grid; place-items: center; box-shadow: var(--shadow);
  /* r175q：登录页大标同样置顶，飘落装饰与背景层不得盖住 */
  position: relative;
  z-index: 5;
}
.login-brand h1 { margin: 0; font-size: 1.5em; font-weight: 700; letter-spacing: .5px; }
.login-brand p { margin: 6px 0 0; font-size: .84em; color: var(--text-3); }
.login-foot { text-align: center; font-size: .76em; color: var(--text-3); margin-top: 6px; }

/* 抽奖机会横幅（每笔订单结算到账 +1） */
.draw-chance {
  display: flex; align-items: center; gap: 10px; margin-top: 10px;
  padding: 9px 12px; border-radius: 12px;
  background: rgba(99, 102, 241, .10); border: 1px solid rgba(99, 102, 241, .30);
}
.draw-chance .dc-ico { font-size: 18px; flex: none; }
.draw-chance .t { font-size: .88em; font-weight: 600; }
.draw-chance b { color: var(--accent-2); font-size: 1.05em; font-variant-numeric: tabular-nums; }

/* 转链形态小标签（优惠券推广链 / 商品直推链） */
.tag-mini {
  margin-left: 6px; padding: 1px 6px; border-radius: 999px; font-size: .72em;
  background: rgba(99,102,241,.14); color: #4f46e5; font-weight: 600;
}

/* =============================================================
   机器人客服（右下悬浮球 + 聊天面板）
   层级：fab 45（高于 tabbar 40、低于遮罩 60）；面板 70（高于遮罩，避免被商品详情盖住）
   ============================================================= */
.bot-fab {
  position: fixed; z-index: 45;
  right: max(14px, calc((100vw - var(--shell-w)) / 2 + 14px));
  bottom: calc(var(--tab-h) + 18px + env(safe-area-inset-bottom));
  width: 65px; height: 65px; border-radius: 50%; padding: 0;
  display: flex; align-items: flex-end; justify-content: center;
  background: transparent; border: 0; cursor: pointer; overflow: visible;
  transition: transform .16s ease;
}
.bot-fab:active { transform: scale(.94); }
/* r210：补贴助手换吉祥物立绘（透明 PNG），加轻微浮动 + 摆动动画，看着更有活力 */
.bot-fab .bot-mascot {
  width: 58px; height: auto; display: block; pointer-events: none;
  filter: drop-shadow(0 5px 9px rgba(30, 30, 60, .30));
  animation: botMascotBob 2.8s ease-in-out infinite;
  transform-origin: 50% 85%;
}
@keyframes botMascotBob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  28% { transform: translateY(-3.5px) rotate(-5deg); }
  55% { transform: translateY(1px) rotate(4deg); }
  78% { transform: translateY(-1.5px) rotate(-2deg); }
}
@media (prefers-reduced-motion: reduce) {
  .bot-fab .bot-mascot { animation: none; }
}
/* r210 兜底：吉祥物图片没拉到时（旧安装包 / 服务器尚未更新），悬浮球恢复实心🤖，
   不会变成「透明背景 + 空图」这种看不见的状态 */
.bot-fab.fab-fallback {
  background: linear-gradient(135deg, #7c3aed, #6366f1);
  box-shadow: var(--shadow);
  align-items: center;
}
.bot-fallback-emoji { font-size: 25px; line-height: 1; }
/* r211：底部有「用户登录 / 用户注册」药丸条时，把机器人球与返回顶部球整体抬到药丸上方，避免互相遮挡 */
body.has-pillbar .bot-fab { bottom: calc(var(--tab-h) + 74px + env(safe-area-inset-bottom)); }
/* r228：返回顶部跟着机器人一起上移，否则会压在注册/登录药丸条上 */
body.has-pillbar .back-top-fab { bottom: calc(var(--tab-h) + 74px + env(safe-area-inset-bottom) + 75px); }

/* 一键返回顶部（r228）：位置完全由 CSS 固定（见 .back-top-fab），
 * 与机器人助理同列、紧贴其正上方；外观比机器人球素一点，避免两个球抢视觉焦点 */
/* r228：返回顶部球改为「纯 CSS 固定定位」——与机器人助理同一列、紧挨其正上方。
 * 以前没有 right/bottom，位置全靠 JS 写 left/top，一旦读到 localStorage 的旧坐标
 * 就永远漂在页面顶部（用户反复反馈的问题）。现在它不依赖任何 JS 计算，换机型、
 * 旋转屏幕、滚动、路由切换都恒定在右下角；脚本只负责显示/隐藏。
 *   · right：与 .bot-fab 完全一致再加 (65-52)/2 = 6.5px → 两球水平居中对齐
 *   · bottom：机器人的 bottom + 机器人高度 65px + 间距 10px → 紧贴机器上方不重叠 */
.back-top-fab {
  position: fixed; z-index: 44;
  /* 老 WebView（不支持 max()）兜底；下一行同属性覆盖，支持则精确居中 */
  right: 20.5px;
  bottom: calc(var(--tab-h) + 18px + env(safe-area-inset-bottom) + 75px);
  right: calc(max(14px, calc((100vw - var(--shell-w)) / 2 + 14px)) + 6.5px);
  width: 52px; height: 52px; border-radius: 50%; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--panel); color: var(--text);
  border: 1px solid var(--border-2); box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform .16s ease;
}
.back-top-fab:active { transform: scale(.94); }
.back-top-fab svg { width: 24px; height: 24px; }
/* r125：未登录（登录页）不显示返回顶部与机器人浮动球 */
body.no-float .bot-fab, body.no-float .back-top-fab { display: none !important; }
/* r178：返回顶部按钮的显示条件 = 页面够长（≥3 屏）且已滚过第一屏；
   短页面 / 第一屏内一律隐藏，避免白占位置挡内容 */
.back-top-fab.fab-hidden { display: none !important; }

/* 下拉刷新指示（r118）：顶部居中小药丸，拉动时滑入 */
.pull-tip {
  position: fixed; top: 10px; left: 50%;
  transform: translateX(-50%) translateY(-64px);
  z-index: 200; pointer-events: none;
  background: var(--panel); color: var(--text);
  border: 1px solid var(--border-2); border-radius: 999px;
  padding: 7px 16px; font-size: 12.5px; font-weight: 600;
  box-shadow: var(--shadow);
  transition: transform .16s ease;
}
.pull-tip.on { transform: translateX(-50%) translateY(0); }

.bot-panel {
  position: fixed; z-index: 70; display: none; flex-direction: column;
  left: 0; right: 0; top: 0; bottom: 0;
  background: var(--bg); color: var(--text);
  padding-bottom: env(safe-area-inset-bottom);
  animation: botIn .18s ease;
}
.bot-panel.on { display: flex; }
@keyframes botIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (min-width: 720px) {
  .bot-panel {
    left: auto; right: calc((100vw - var(--maxw)) / 2 + 14px);
    top: auto; bottom: 24px; width: 384px; height: 610px;
    border-radius: 18px; border: 1px solid var(--border-2); box-shadow: var(--shadow);
    overflow: hidden;
  }
}

/* 顶部栏 */
.bot-head {
  display: flex; align-items: center; gap: 10px; flex: none;
  padding: 12px 14px; border-bottom: 1px solid var(--border);
  background: var(--panel);
}
.bot-head-ava {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: flex; align-items: flex-end; justify-content: center;
  background: var(--hero); overflow: hidden;
}
.bot-head-ava img { width: 30px; height: auto; display: block; }
.bot-head-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.bot-head-t b { font-size: .98em; }
.bot-head-t span { font-size: .74em; color: var(--text-3); }
.bot-x {
  width: 30px; height: 30px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--panel-2); color: var(--text-2); font-size: 14px;
}

/* 消息区 */
.bot-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 14px 12px 6px; }
.bm-row { display: flex; gap: 8px; margin-bottom: 12px; align-items: flex-start; }
.bm-row.me { justify-content: flex-end; }
.bm-ava {
  width: 28px; height: 28px; border-radius: 50%; flex: none; font-size: 15px;
  display: flex; align-items: center; justify-content: center; background: var(--panel-2);
}
.bm-bubble {
  max-width: 86%; padding: 9px 12px; border-radius: 4px 14px 14px 14px;
  background: var(--panel); border: 1px solid var(--border);
  font-size: .9em; line-height: 1.55; word-break: break-word;
}
.bm-row.me .bm-bubble {
  border-radius: 14px 4px 14px 14px;
  background: var(--accent); color: #fff; border-color: transparent;
}
.bt-text + .bt-text { margin-top: 6px; }
.bt-note {
  margin-top: 8px; padding: 7px 9px; border-radius: 8px; font-size: .86em;
  background: var(--panel-2); color: var(--text-2);
  border-left: 3px solid var(--border-2);
}
.bt-note.warn { border-left-color: var(--warn); background: rgba(245, 158, 11, .1); color: var(--text); }
.bt-note.ok { border-left-color: var(--ok); background: rgba(34, 197, 94, .1); color: var(--text); }
.bt-list { margin: 6px 0 0; padding-left: 18px; font-size: .95em; }
.bt-list li { margin-bottom: 3px; }

/* 商品卡 */
.bt-prods { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.bp-card {
  display: flex; gap: 9px; width: 100%; padding: 8px; text-align: left; cursor: pointer;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px;
  color: inherit; font: inherit;
}
.bp-card:active { border-color: var(--accent); }
.bp-img {
  width: 54px; height: 54px; border-radius: 8px; flex: none; overflow: hidden;
  background: var(--panel); display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.bp-img img { width: 100%; height: 100%; object-fit: cover; }
.bp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.bp-title {
  font-size: .88em; line-height: 1.35; font-weight: 550;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.bp-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.bp-plat, .bp-coupon {
  font-style: normal; font-size: .7em; padding: 1px 5px; border-radius: 4px;
  background: rgba(99, 102, 241, .14); color: var(--accent);
}
.bp-coupon { background: rgba(244, 63, 94, .13); color: var(--money); }
.bp-price { display: flex; align-items: baseline; gap: 8px; }
.bp-price b { color: var(--money); font-size: 1em; }
.bp-price em { font-style: normal; font-size: .78em; color: var(--ok); }

/* 转链卡（r135：对齐「圆角卡片 + 彩色平台标签 + ¥金额 + 实线链接框 + 全宽按钮」效果） */
.bv-card {
  margin-top: 6px; padding: 14px; border-radius: 14px;
  background: var(--panel); border: 1px solid var(--border-2);
  box-shadow: 0 1px 3px rgba(20, 24, 40, .05);
}
.bv-head { display: flex; gap: 10px; margin-bottom: 9px; }
.bv-head img { width: 54px; height: 54px; border-radius: 9px; object-fit: cover; flex: none; }
.bv-title { font-weight: 600; font-size: .98em; line-height: 1.45; color: var(--text); }
.bv-sub { font-size: .78em; color: var(--text-3); margin-top: 4px; }
.bv-tag {
  /* 彩色平台标签：淘宝红 / 拼多多红 / 京东蓝 / 唯品会紫 */
  display: inline-block; font-size: .74em; font-weight: 600; padding: 3px 9px;
  border-radius: 5px; margin: 7px 0 2px;
}
.bv-tag.tb { background: #fff0ed; color: #e5432f; }
.bv-tag.pdd { background: #fef0ea; color: #e63946; }
.bv-tag.jd { background: #eef3ff; color: #3366cc; }
.bv-tag.vip { background: #f5f0ff; color: #6633cc; }
.bv-tag.def { background: var(--panel-3); color: var(--text-3); }
.bv-nums { display: flex; gap: 26px; margin: 10px 0 12px; }
.bv-nums span { display: flex; flex-direction: column; gap: 3px; }
.bv-nums em { font-style: normal; font-size: .76em; color: var(--text-3); }
.bv-nums b { font-size: 1.28em; font-weight: 700; line-height: 1.1; color: var(--money); }
.bv-nums b.up { color: var(--ok); }
.bv-code {
  margin: 8px 0; padding: 11px 12px; border-radius: 10px;
  background: var(--panel-2); border: 1px solid var(--border-2);
  font-size: .86em; line-height: 1.5; word-break: break-all;
}
.bv-card .btn-bot.block { width: 100%; height: 42px; border-radius: 10px; font-size: .95em; font-weight: 600; margin-top: 4px; }
/* 复制按钮：全宽更醒目，颜色跟随平台（淘宝橙红 / 拼多多红 / 京东红 / 唯品会紫） */
.bv-card .btn-bot.plat-taobao { background: #ff5000; }
.bv-card .btn-bot.plat-pdd { background: #e02e24; }
.bv-card .btn-bot.plat-jd { background: #e1251b; }
.bv-card .btn-bot.plat-vip { background: #6a2ea8; }
.bv-tip { margin-top: 9px; font-size: .78em; color: var(--text-3); line-height: 1.5; }

/* 订单 */
.bt-orders { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.bo-row {
  display: flex; gap: 8px; align-items: center; padding: 8px 9px;
  background: var(--panel-2); border-radius: 9px;
}
.bo-main { flex: 1; min-width: 0; }
.bo-title {
  font-size: .86em; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bo-sub { font-size: .74em; color: var(--text-3); margin-top: 2px; }
.bo-right { text-align: right; flex: none; display: flex; flex-direction: column; gap: 2px; }
.bo-right b { font-size: .88em; }
.bo-right em { font-style: normal; font-size: .76em; color: var(--text-3); }
.bo-right em.up { color: var(--ok); }

/* 资金 */
.bf-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 6px 0; }
.bf-cell {
  padding: 8px 4px; border-radius: 9px; background: var(--panel-2);
  text-align: center; display: flex; flex-direction: column; gap: 3px;
}
.bf-cell span { font-size: .72em; color: var(--text-3); }
.bf-cell b { font-size: .96em; }
.bf-cell b.up { color: var(--ok); }

/* 输入区 */
.bot-typing {
  display: none; gap: 4px; padding: 0 18px 8px; align-items: center;
}
.bot-typing i {
  width: 5px; height: 5px; border-radius: 50%; background: var(--text-3);
  animation: botDot 1s infinite ease-in-out;
}
.bot-typing i:nth-child(2) { animation-delay: .15s; }
.bot-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes botDot { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
/* r277：等待文案（「正在为你转链…」）—— 转链要等联盟接口，光闪三个点用户不知道是在干活还是卡死 */
.bot-typing .bt-label {
  display: none; margin-left: 6px; font-size: 12px; color: var(--text-3); white-space: nowrap;
}

.bot-actions { padding: 0 12px 8px; display: flex; flex-direction: column; gap: 6px; }
.bot-chips {
  padding: 0 12px 8px; display: flex; gap: 6px; overflow-x: auto; flex: none;
  scrollbar-width: none;
}
.bot-chips::-webkit-scrollbar { display: none; }
.chip-bot {
  flex: none; padding: 6px 12px; border-radius: 999px; cursor: pointer;
  background: var(--panel); border: 1px solid var(--border-2); color: var(--text-2);
  font-size: .82em; white-space: nowrap;
}
.chip-bot:active { background: var(--panel-2); color: var(--accent); }

.bot-input {
  flex: none; display: flex; gap: 8px; padding: 9px 12px 11px;
  border-top: 1px solid var(--border); background: var(--panel);
}
.bot-input input {
  flex: 1; min-width: 0; height: 38px; padding: 0 13px; border-radius: 999px;
  border: 1px solid var(--border-2); background: var(--panel-2); color: var(--text);
  font-size: .92em; outline: none;
}
.bot-input input:focus { border-color: var(--accent); }
.bot-input button {
  flex: none; height: 38px; padding: 0 16px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--accent); color: #fff; font-size: .9em; font-weight: 600;
}
.bot-input button:disabled { opacity: .55; }

/* 面板内按钮 */
.btn-bot {
  display: inline-flex; align-items: center; justify-content: center;
  height: 34px; padding: 0 14px; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--border-2); background: var(--panel-2); color: var(--text);
  font-size: .86em; font-weight: 550;
}
.btn-bot.primary { background: var(--accent); border-color: transparent; color: #fff; }
.btn-bot.ghost { background: transparent; color: var(--text-2); }
.btn-bot.sm { height: 28px; padding: 0 10px; font-size: .8em; margin-left: 6px; }
.btn-bot.block { width: 100%; }
.btn-bot:disabled { opacity: .6; }

.bt-input {
  width: 100%; margin-top: 7px; padding: 9px 10px; border-radius: 9px;
  border: 1px solid var(--border-2); background: var(--panel-2); color: var(--text);
  font-size: .88em; font-family: inherit; resize: none; outline: none;
}
.bt-input:focus { border-color: var(--accent); }

/* 面板内轻提示 */
.bot-tip {
  position: absolute; left: 50%; bottom: 82px; transform: translate(-50%, 8px);
  padding: 8px 16px; border-radius: 999px; font-size: .82em; white-space: nowrap;
  background: rgba(20, 24, 34, .92); color: #fff; opacity: 0; pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.bot-tip.on { opacity: 1; transform: translate(-50%, 0); }
body.bot-open { overflow: hidden; }

/* ===== r101：客服表情 / 图片 / 对话时间线 ===== */
.bot-tool {
  flex: none; width: 34px; height: 38px; border: 0; background: none;
  font-size: 19px; line-height: 1; cursor: pointer; border-radius: 9px; padding: 0;
}
.bot-tool:active { background: var(--panel-2); }
.bm-time {
  flex: none; align-self: flex-end; font-size: .68em; color: var(--text-3);
  margin-left: 6px; margin-bottom: 2px; white-space: nowrap;
}
.bm-row.me .bm-time { margin-left: 0; margin-right: 6px; }
.bm-row { flex-wrap: wrap; }

/* ================= 图片画廊（r105：商品图点击看大图，多图左右切换） ================= */
.gal-row { display: flex; gap: 6px; margin-top: 10px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.gal-row img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; flex: 0 0 auto; cursor: zoom-in; border: 1px solid rgba(0,0,0,.06); }
.pd-mainimg { cursor: zoom-in; }
.pd-mainimg img { pointer-events: none; }
/* 全屏查看器（盖过底部弹层 sheet 的 z-index 60） */
.gal-viewer { position: fixed; inset: 0; z-index: 200; background: rgba(8, 10, 14, .94); display: flex; flex-direction: column; animation: galIn .18s ease; }
@keyframes galIn { from { opacity: 0; } to { opacity: 1; } }
.gal-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; color: #fff; flex: 0 0 auto; }
.gal-count { font-size: 13px; opacity: .85; font-variant-numeric: tabular-nums; }
.gal-close { background: rgba(255,255,255,.12); border: 0; color: #fff; width: 34px; height: 34px; border-radius: 50%; font-size: 16px; cursor: pointer; }
.gal-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 0 10px; touch-action: pan-y; }
.gal-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; user-select: none; -webkit-user-drag: none; transition: transform .15s ease; }
.gal-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.14); border: 0; color: #fff; width: 40px; height: 56px; font-size: 26px; border-radius: 10px; cursor: pointer; }
.gal-nav.prev { left: 10px; } .gal-nav.next { right: 10px; }
.gal-nav:active { background: rgba(255,255,255,.28); }
.gal-thumbs { flex: 0 0 auto; display: flex; gap: 6px; overflow-x: auto; padding: 10px 12px calc(12px + env(safe-area-inset-bottom)); -webkit-overflow-scrolling: touch; }
.gal-thumbs img { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; opacity: .5; cursor: pointer; border: 2px solid transparent; flex: 0 0 auto; }
.gal-thumbs img.on { opacity: 1; border-color: #fff; }
@media (hover: hover) { .gal-thumbs img:hover { opacity: .9; } }

/* 聊天字号按钮（r105）：手机双指缩放的等价入口，电脑 / 触屏都能用 */
.bot-zoom {
  width: 30px; height: 30px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--panel-2); color: var(--text-2); font-size: 12px; font-weight: 700;
  margin-right: 6px; flex: none;
}
.bot-zoom:active { background: var(--accent); color: #fff; }

/* ================= 邀请好友（r106）：海报式主视觉 + 二维码卡 ================= */
.invite-hero { position: relative; border-radius: 16px; padding: 26px 16px 56px; color: #fff; text-align: center; overflow: hidden; min-height: 210px; display: flex; align-items: center; justify-content: center; }
.invite-hero.has-bg { min-height: 260px; }
.invite-hero.has-bg .inv-hero-inner { background: rgba(0,0,0,.28); border-radius: 12px; padding: 14px 10px; }
/* 模板渐变（后台未传背景图时兜底） */
.invite-hero.tpl-default { background: linear-gradient(160deg, #34d399, #059669 60%, #047857); }
.invite-hero.tpl-festival618 { background: linear-gradient(160deg, #fb923c, #ea580c 55%, #c2410c); }
.invite-hero.tpl-festivalDouble11 { background: linear-gradient(160deg, #f87171, #dc2626 55%, #991b1b); }
.invite-hero.tpl-festivalNewyear { background: linear-gradient(160deg, #f87171, #e11d48 50%, #9f1239); }
.inv-hero-inner { max-width: 92%; }
.inv-title { margin: 0 0 6px; font-size: 1.5em; font-weight: 800; letter-spacing: .02em; text-shadow: 0 2px 8px rgba(0,0,0,.18); }
.inv-sub { margin: 0 0 12px; font-size: .92em; opacity: .95; }
.inv-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.inv-tag { background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.42); border-radius: 99px; padding: 3px 10px; font-size: .74em; backdrop-filter: blur(4px); }
.inv-qr { display: inline-grid; place-items: center; padding: 10px; background: #fff; border-radius: 14px; box-shadow: 0 4px 18px rgba(0,0,0,.08); }
.inv-qr img { display: block; width: 200px; height: 200px; image-rendering: pixelated; }
.inv-code { margin-top: 12px; font-size: 1.02em; }
.inv-code b { letter-spacing: .14em; }
.inv-from { font-size: 1.05em; margin-top: 4px; }

/* ================= r148：注册时的性别选择 + 武侠昵称 ================= */
.gender-row { display: flex; gap: 8px; }
.gender-btn {
  flex: 1; padding: 11px 8px; border-radius: 10px; cursor: pointer;
  background: var(--panel-2); color: var(--text-2);
  border: 1px solid var(--border); font-size: .95em;
  transition: background .15s, color .15s, border-color .15s;
}
.gender-btn.on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff; font-weight: 700;
}
.nick-row { display: flex; gap: 8px; align-items: stretch; }
.nick-row .input { flex: 1; min-width: 0; }
.nick-re { flex: 0 0 auto; white-space: nowrap; padding: 0 12px; }

/* ===== 首页幻灯片（后台「Banner / 首页幻灯片」，小程序 / H5 / APP 共用同一组数据） ===== */
#home-slides { margin-top: 12px; }
.h5-slides { position: relative; border-radius: var(--radius); overflow: hidden; }
.h5-track { display: flex; transition: transform .45s ease; will-change: transform; }
/* r202：幻灯片按正常比例缩放 —— 手机约 2.6:1 横幅；宽屏放宽到 3.4:1，
 * 不再因为 min-height 固定 + 宽度被拉宽后把图压成一条（横屏尤其明显）。
 * 用 aspect-ratio 控制高度：宽屏更高一点，图片不变形、文字也有地方放。 */
.h5-slide {
  flex: 0 0 100%; position: relative;
  aspect-ratio: 2.6 / 1; min-height: 0;
  display: flex; align-items: flex-end; cursor: pointer;
  background: linear-gradient(135deg, rgba(255,255,255,.16), rgba(0,0,0,.2)), var(--tone, #ff6a3d);
}
.h5-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
/* 兜底：不支持 aspect-ratio 的老 WebView，用 padding-top 百分比撑出同比例高度 */
@supports not (aspect-ratio: 2.6 / 1) {
  .h5-slide { min-height: 132px; }
  .h5-slide::before { content: ''; display: block; padding-top: 38.5%; }
}
.h5-slide-txt {
  position: relative; z-index: 1; width: 100%; padding: 14px 16px; color: #fff;
  display: flex; flex-direction: column; gap: 3px;
  background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.38));
}
.h5-slide-txt b { font-size: 17px; font-weight: 800; line-height: 1.3; }
.h5-slide-txt i { font-size: 12px; font-style: normal; opacity: .92; }
.hs-ico { font-size: 20px; }
.h5-dots { display: flex; justify-content: center; gap: 6px; margin-top: 8px; }
.h5-dots span { width: 6px; height: 6px; border-radius: 3px; background: rgba(0,0,0,.16); transition: all .25s; cursor: pointer; }
.h5-dots span.on { width: 16px; background: var(--money); }

/* r212：App 内（安卓壳 / 鸿蒙壳）隐藏页脚「APP 下载」药丸，避免应用内引导下载安装包 */
html.host-app .h5-applink { display: none !important; }

/* ============================================================
 * r210 扫一扫：顶栏入口 + 全屏取景层
 * ============================================================ */
#scan-btn svg { display: block; }
.scan-layer {
  position: fixed; inset: 0; z-index: 9999;
  background: #101418; color: #fff;
  display: flex; flex-direction: column;
  animation: scanIn .18s ease-out;
}
@keyframes scanIn { from { opacity: 0; } to { opacity: 1; } }
.scan-head {
  display: flex; align-items: center; gap: 10px;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 12px 10px;
}
.scan-close {
  width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: rgba(255,255,255,.14); color: #fff; font-size: 16px; cursor: pointer;
}
.scan-title { font-size: 1.05em; font-weight: 650; flex: 1; }
.scan-mode {
  border: 0; border-radius: 999px; padding: 8px 14px; cursor: pointer;
  background: var(--accent, #e8401f); color: #fff; font-size: .9em; font-weight: 600;
}
.scan-mode:disabled { opacity: .6; }
.scan-stage { position: relative; flex: 1; overflow: hidden; }
.scan-stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scan-frame {
  position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%);
  width: min(72vw, 300px); aspect-ratio: 1;
  border-radius: 18px; box-shadow: 0 0 0 100vmax rgba(0,0,0,.42);
  pointer-events: none;
}
.scan-frame::before, .scan-frame::after,
.scan-frame i::before, .scan-frame i::after {
  content: ''; position: absolute; width: 26px; height: 26px;
  border: 3px solid #fff; border-radius: 4px;
}
.scan-frame::before { left: -2px; top: -2px; border-right: 0; border-bottom: 0; }
.scan-frame::after { right: -2px; top: -2px; border-left: 0; border-bottom: 0; }
.scan-frame i { position: absolute; inset: 0; }
.scan-frame i::before { left: -2px; bottom: -2px; border-right: 0; border-top: 0; }
.scan-frame i::after { right: -2px; bottom: -2px; border-left: 0; border-top: 0; }
.scan-line {
  position: absolute; left: 12%; right: 12%; top: calc(44% - min(36vw, 150px) + 12px);
  height: 2px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--money, #16a34a), transparent);
  animation: scanMove 2.1s ease-in-out infinite;
}
@keyframes scanMove { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(min(66vw, 276px)); } }
.scan-hint {
  position: absolute; left: 0; right: 0; top: calc(44% + min(36vw, 150px) + 14px);
  text-align: center; font-size: .88em; color: rgba(255,255,255,.85);
  text-shadow: 0 1px 4px rgba(0,0,0,.6);
}
.scan-privacy {
  padding: 10px 16px calc(env(safe-area-inset-bottom, 0px) + 14px);
  font-size: .78em; line-height: 1.7; color: rgba(255,255,255,.66); text-align: center;
}
.scan-privacy a { color: rgba(255,255,255,.85); }

/* ============================================================
 * r210 搜索结果头部：各平台件数（一行放不下自动分两行）
 *  显示形如：小零食[拼多多300件][淘宝200件][天猫20件]  共520件
 * ============================================================ */
.card-head .pcounts {
  display: inline-flex; flex-wrap: nowrap; align-items: center;
  gap: 4px; min-width: 0; overflow: hidden;
}
.card-head .pcounts .pc-item {
  font-style: normal; font-weight: 600; white-space: nowrap;
  font-size: .8em; color: var(--text-2, #4b5563);
  background: var(--panel-2, #f3f4f6); border-radius: 6px; padding: 2px 6px;
  cursor: pointer; transition: background .15s, color .15s;
}
/* r224：平台件数可点击筛选 —— hover 高亮，选中平台高亮 */
.card-head .pcounts .pc-item:hover { background: var(--accent-soft, #ffe8e0); color: var(--accent, #e8401f); }
.card-head .pcounts .pc-item.on { background: var(--accent, #e8401f); color: #fff; }

/* r270：搜索下拉面板（淘宝式）—— 点搜索框弹出，点遮罩/搜索时收起，首页不再固定展示 */
.search-drop-mask {
  position: fixed; inset: 0; z-index: 29;
  background: rgba(15, 23, 42, .35); border: 0; padding: 0;
}
.search-drop {
  position: absolute; left: 0; right: 0; top: 100%;
  z-index: 31;
  background: var(--bg, #fff); color: var(--text, #1f2937);
  border-radius: 0 0 16px 16px;
  max-height: min(58vh, 430px); overflow-y: auto;
  padding: 0 16px 12px;
}
.search-drop .sp-sec { padding: 12px 0 8px; }
.search-drop .sp-sec + .sp-sec { border-top: 1px dashed var(--border, #e5e7eb); }
.search-drop .sp-guess-item { padding: 9px 2px; }
.sd-hint { padding: 8px 0 4px; font-size: 13px; color: #9aa3b2; }

/* r269：搜索面板（对齐淘宝搜索页）—— 历史搜索胶囊标签 + 猜你想搜两列文字列表
   （r270 起仅作为搜索下拉的内容样式使用，不再固定渲染在首页） */
.sp-sec { padding: 12px 0 8px; }
.sp-sec + .sp-sec { border-top: 1px dashed var(--line, #e5e7eb); margin-top: 6px; }
.sp-head { display: flex; align-items: center; justify-content: space-between; }
.sp-head h3 { font-size: 14px; font-weight: 600; margin: 0; color: var(--text, #1f2937); }
.sp-head h3.dim { color: #c3c8d0; }
.sp-head-ops { display: inline-flex; align-items: center; gap: 2px; }
.sp-op {
  border: none; background: transparent; color: #9ca3af;
  font-size: 16px; line-height: 1; padding: 5px 7px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.sp-op:hover, .sp-op:active { color: var(--accent, #e8401f); }
/* 历史搜索：胶囊标签自然宽度流式排布（不再是死板三列网格），最多两行折叠 */
.sp-chips {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 10px 0 2px;
}
.sp-chips .hist-item {
  width: auto; max-width: 46%; height: 32px; line-height: 32px;
  padding: 0 14px; border: none; border-radius: 16px;
  background: var(--panel-2, #f3f4f6); color: var(--text-2, #4b5563);
  font-size: 13px; text-align: center; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; cursor: pointer;
  transition: background .15s, color .15s;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.sp-chips .hist-item:hover, .sp-chips .hist-item:active {
  background: var(--accent-soft, #ffe8e0); color: var(--accent, #e8401f);
}
.hist-more {
  display: block; width: 100%; margin-top: 2px; padding: 6px 0 0;
  border: none; background: transparent; color: #9ca3af; font-size: 12px;
  text-align: right; cursor: pointer;
}
.hist-more:hover { color: var(--accent, #e8401f); }
/* 猜你想搜：两列纯文字行，点一下直接搜 */
.sp-guess {
  display: grid; grid-template-columns: 1fr 1fr;
  column-gap: 16px; padding: 4px 0 0;
}
.sp-guess-item {
  min-width: 0; text-align: left; background: none; border: none;
  padding: 10px 2px; font-size: 14px; color: var(--text, #1f2937);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.sp-guess-item:hover, .sp-guess-item:active { color: var(--accent, #e8401f); }
.card-head.stacked { flex-wrap: wrap; row-gap: 6px; }
.card-head.stacked .pcounts { flex: 1 1 100%; order: 5; flex-wrap: wrap; overflow: visible; }

/* =====================================================================
   r278：认领成功的金币雨
   独立一层，z-index 300（高于底部弹层 sheet 60、全屏看图 200），
   宽度跟着手机外壳走 —— 桌面浏览器上不会出现"金币飞满整个 27 寸屏"的怪相。
   ===================================================================== */
.coin-fx {
  position: fixed; left: 50%; top: 0; bottom: 0; transform: translateX(-50%);
  width: var(--shell-w); z-index: 300; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(120% 78% at 50% 44%,
    rgba(34, 22, 4, .93) 0%, rgba(7, 9, 15, .965) 55%, rgba(3, 4, 7, .985) 100%);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  opacity: 0; animation: cfIn .22s ease forwards;
  -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none;
}
@keyframes cfIn { to { opacity: 1; } }
.coin-fx.out { animation: cfOut .22s ease forwards; pointer-events: none; }
@keyframes cfOut { to { opacity: 0; } }

.cf-inner {
  /* 内容压在金币之上：金币从文字「后面」落下再钻进袋子，标题和金额任何时候都读得清 */
  position: relative; z-index: 3; display: flex; flex-direction: column;
  align-items: center; padding: 0 24px; text-align: center;
}
.cf-title {
  font-size: 15px; letter-spacing: 2px; font-weight: 600; color: #ffd98a;
  opacity: 0; transform: translateY(-8px);
  animation: cfUp .4s .05s ease forwards;
}
@keyframes cfUp { to { opacity: 1; transform: translateY(0); } }

.cf-amt {
  display: flex; align-items: baseline; gap: 2px; margin-top: 4px;
  color: #ffcf4d; font-variant-numeric: tabular-nums;
  text-shadow: 0 0 28px rgba(255, 190, 40, .5), 0 2px 0 rgba(120, 70, 0, .55);
  opacity: 0; transform: scale(.84);
}
/* 金额等金币砸进袋子那一刻才「弹」出来 —— 先出现再落币，会显得数字跟金币没关系 */
.cf-amt.show { animation: cfPop .5s cubic-bezier(.2, 1.5, .5, 1) forwards; }
.cf-amt.none { display: none; }
@keyframes cfPop { to { opacity: 1; transform: scale(1); } }
.cf-yen { font-size: 26px; font-weight: 700; }
.cf-approx { font-size: 24px; font-weight: 700; margin-right: 3px; opacity: .8; }
.cf-amt b { font-size: 46px; font-weight: 800; letter-spacing: -.5px; }

.cf-bag {
  margin: 2px 0 4px; transform-origin: 50% 86%;
  filter: drop-shadow(0 8px 22px rgba(255, 180, 30, .3));
}
.cf-bag.pop { animation: cfBagPop .5s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes cfBagPop {
  0%   { transform: scale(1); }
  32%  { transform: scale(1.12, .9); }
  60%  { transform: scale(.96, 1.06); }
  100% { transform: scale(1); }
}

.cf-sub {
  font-size: 13px; color: #f0d9a8; margin-top: 2px;
  opacity: 0; animation: cfUp .4s .28s ease forwards;
}
/* r284：消息页顶部「桌面角标没数字」提示条 */
.badge-tip {
  display: flex; align-items: center; gap: 10px;
  margin: 12px 12px 0; padding: 11px 12px; border-radius: 12px;
  background: rgba(255, 208, 138, .1); border: 1px solid rgba(255, 208, 138, .28);
  font-size: .86em; color: var(--text);
}
.badge-tip .grow { flex: 1; min-width: 0; }
.badge-tip-x {
  width: 22px; text-align: center; color: var(--muted); font-size: 17px; line-height: 1; cursor: pointer;
}

.cf-order {
  margin-top: 10px; max-width: 78vw; padding: 8px 12px; border-radius: 12px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 214, 145, .22);
  text-align: center; opacity: 0; animation: cfUp .42s .2s ease forwards;
}
.cf-order-t { font-size: 12.5px; color: #ffe6bd; line-height: 1.45; }
.cf-order-m {
  display: flex; gap: 10px; justify-content: center; margin-top: 4px;
  font-size: 11.5px; color: rgba(255, 255, 255, .62);
}
.cf-order-m span:first-child { color: #ffd08a; font-weight: 700; }

.cf-tip {
  margin-top: 18px; font-size: 12px; color: rgba(255, 255, 255, .55);
  opacity: 0; transition: opacity .25s;
}
.cf-tip.show { opacity: 1; animation: cfBlink 1.7s ease-in-out infinite; }
@keyframes cfBlink { 0%, 100% { opacity: .35; } 50% { opacity: .9; } }

.cf-mute {
  position: absolute; top: calc(14px + env(safe-area-inset-top, 0px)); right: 14px; z-index: 3;
  width: 34px; height: 34px; border-radius: 50%; padding: 0; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .07);
  color: #fff; font-size: 15px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.cf-fall { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.cf-coin {
  position: absolute; left: 0; top: 0; width: 26px; height: 26px; margin: -13px 0 0 -13px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 34% 26%, #fffbe0 0%, #ffdc6a 30%, #f4b81c 62%, #c8840a 100%);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .48),
              inset 0 -3px 6px rgba(140, 84, 0, .5),
              0 3px 8px rgba(0, 0, 0, .3);
  color: #8a5600; font-size: 13px; font-weight: 800;
  will-change: transform, opacity;
}

.cf-glow {
  position: absolute; left: 50%; top: 50%; z-index: 0;
  width: 260px; height: 260px; margin: -130px 0 0 -130px;
  border-radius: 50%; pointer-events: none; opacity: 0;
  background: radial-gradient(circle,
    rgba(255, 196, 60, .5) 0%, rgba(255, 170, 20, .12) 45%, transparent 70%);
}
.coin-fx.got .cf-glow { animation: cfGlow 1.1s ease-out; }
@keyframes cfGlow {
  0%   { opacity: .15; transform: scale(.5); }
  40%  { opacity: 1; }
  100% { opacity: 0; transform: scale(1.7); }
}

/* 无障碍：系统开了「减少动态效果」就只做淡入，不落金币、不闪不跳。
   注意 .coin-fx 自身的 transform 是居中用的，不能在这条里被抹掉，否则整层会偏到右半屏。 */
@media (prefers-reduced-motion: reduce) {
  .coin-fx { opacity: 1; animation: none !important; }
  .coin-fx.out { animation: none !important; }
  .cf-title, .cf-amt, .cf-sub, .cf-bag.pop,
  .coin-fx.got .cf-glow {
    animation: none !important; opacity: 1 !important; transform: none !important;
  }
  .cf-tip.show { animation: none !important; opacity: .8 !important; }
}

/* ============================================================
 * r292：每日签到页（H5 应用内视图）
 * 采用与独立页一致的暖色调，但完全嵌在单页应用里 ——
 * 顶栏返回 + 底部 TAB 都在，不再是一跳走不回来的独立页。
 * ============================================================ */
.ck-hero {
  margin-top: 12px;
  padding: 18px 16px 16px;
  border-radius: 18px;
  background: linear-gradient(160deg, #ff7a45 0%, #e64340 62%, #d93a37 100%);
  color: #fff;
  box-shadow: 0 8px 22px rgba(230, 67, 64, .22);
}
.ck-hero-t { font-size: 1.16em; font-weight: 800; letter-spacing: .5px; }
/* r327：标题行 + 右侧积分余额徽标 */
.ck-hero-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ck-pt-pill {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 10px; border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, .95); color: #a8341d;
  font-size: .78em; font-weight: 700; white-space: nowrap;
  box-shadow: 0 2px 6px rgba(120, 0, 0, .22);
}
.ck-pt-pill b { font-size: 1.06em; }
.ck-pt-ico { font-size: 1.02em; }
.ck-pt-pill:active { transform: scale(.96); }
/* 点积分徽标跳转到兑换区时的短暂高亮 */
.ck-flash { box-shadow: 0 0 0 2px rgba(230, 67, 64, .45), var(--shadow, 0 4px 14px rgba(0, 0, 0, .07)); }
.ck-hero-s { font-size: .76em; opacity: .96; margin-top: 5px; line-height: 1.5; text-shadow: 0 1px 2px rgba(120, 0, 0, .30); }

.ck-face { display: flex; align-items: baseline; gap: 4px; margin-top: 16px; }
.ck-face-num { font-size: 2.15em; font-weight: 800; line-height: 1; }
.ck-face-total { font-size: .95em; opacity: .95; text-shadow: 0 1px 2px rgba(120, 0, 0, .30); }
.ck-face-tag {
  margin-left: auto; align-self: center;
  font-size: .72em; padding: 4px 11px; border-radius: 999px;
  background: rgba(255, 255, 255, .22); font-weight: 600;
}

.ck-bar { height: 9px; border-radius: 999px; background: rgba(255, 255, 255, .26); overflow: hidden; margin-top: 14px; }
.ck-bar > i { display: block; height: 100%; border-radius: 999px; background: #fff; transition: width .35s ease; }
.ck-bar-meta { display: flex; justify-content: space-between; font-size: .72em; opacity: .96; margin-top: 7px; text-shadow: 0 1px 2px rgba(120, 0, 0, .28); }

.ck-tranches { display: flex; gap: 8px; margin-top: 15px; }
.ck-rt {
  flex: 1; min-width: 0; text-align: center;
  padding: 10px 4px 8px; border-radius: 12px;
  /* r314：由半透明白改为深色半透明 chip —— 白/浅色字在浅粉底上看不清，深底才能让
   *   已获得（绿）与需解锁（黄）两种状态色都拉满对比度 */
  background: rgba(0, 0, 0, .22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .10);
}
.ck-rt-label { font-size: .72em; opacity: 1; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.ck-rt-amt { font-size: 1.1em; font-weight: 800; margin-top: 3px; color: #ffd84d; text-shadow: 0 1px 3px rgba(0, 0, 0, .40); }
.ck-rt-amt.on { color: #5fe089; }
.ck-rt-state { font-size: .66em; opacity: 1; margin-top: 3px; color: #ffd84d; text-shadow: 0 1px 2px rgba(0, 0, 0, .40); }
.ck-rt-state.on { color: #5fe089; opacity: 1; font-weight: 700; }

.ck-note { font-size: .8em; line-height: 1.65; color: var(--text-2); }
.ck-warn { font-size: .76em; color: #e64340; margin-top: 8px; text-align: center; }

.ck-wallet { display: flex; }
.ck-w { flex: 1; text-align: center; }
.ck-w-v { font-size: 1.4em; font-weight: 800; color: #e64340; }
.ck-w-k { font-size: .72em; color: var(--text-3); margin-top: 3px; }

.ck-bn { padding: 10px 0; border-top: 1px solid var(--line, #f0f0f0); }
.ck-bn:first-of-type { border-top: 0; }

html[data-theme="dark"] .ck-note { color: #a9b1bd; }
html[data-theme="dark"] .ck-bn { border-top-color: #232a35; }

/* r293：签到「延期奖励」提示条 —— 抽中有惊喜，没抽中也不打扰 */
.ck-lucky {
  margin-top: 10px;
  padding: 9px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff5e8, #ffece4);
  color: #d93a37;
  font-size: .78em;
  line-height: 1.55;
  text-align: center;
  font-weight: 600;
}
html[data-theme="dark"] .ck-lucky {
  background: linear-gradient(135deg, #2a2118, #2d1d18);
  color: #ffb08a;
}

/* r294：签到解锁金额说明块 */
.ck-hint-block {
  margin-top: 10px;
  padding: 11px 12px;
  border-radius: 12px;
  background: var(--bg-soft, #f7f8fa);
  border: 1px solid var(--line, #eee);
}
.ck-hint-t { font-size: .84em; font-weight: 700; margin-bottom: 5px; }
.ck-hint-d { font-size: .76em; color: var(--text-2); line-height: 1.7; }
.ck-hint-d b { color: var(--danger, #e64340); font-weight: 700; }
html[data-theme="dark"] .ck-hint-block { background: #1a2029; border-color: #262e3a; }
html[data-theme="dark"] .ck-hint-d { color: #a9b1bd; }

/* r294：签到须知（规则说明区） */
.ck-rule-sec {
  margin: 14px 0 6px;
  font-size: .82em;
  font-weight: 800;
  color: var(--text-1, #1f2329);
  padding-left: 8px;
  border-left: 3px solid var(--danger, #e64340);
  line-height: 1.2;
}
.ck-rule-sec:first-of-type { margin-top: 4px; }
.ck-rule { padding: 6px 0; }
.ck-rule-h { font-size: .82em; font-weight: 700; margin-bottom: 3px; }
.ck-rule-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #ffece8;
  color: #e64340;
  font-size: .78em;
  font-weight: 600;
  vertical-align: 1px;
}
.ck-rule-b { font-size: .78em; color: var(--text-2); line-height: 1.75; }
.ck-rule-li { font-size: .96em; line-height: 1.75; }
.ck-rule b { color: var(--danger, #e64340); font-weight: 700; }
html[data-theme="dark"] .ck-rule-sec { color: #e6e9ef; }
html[data-theme="dark"] .ck-rule-tag { background: #3a201c; color: #ff9b7a; }
html[data-theme="dark"] .ck-rule-b { color: #a9b1bd; }

/* r313：签到大红包两栏（首签到账 / 待解锁） */
.ck-split { display: flex; gap: 10px; margin: 12px 0 4px; }
.ck-split-col {
  flex: 1; border-radius: 12px; padding: 12px 6px; text-align: center;
  background: #fff6f4; border: 1px solid #ffe1da;
}
.ck-split-col.on { background: #fff1e9; border-color: #ffd0bf; }
.ck-sc-amt { font-size: 24px; font-weight: 900; color: var(--danger, #e64340); line-height: 1.1; }
.ck-sc-label { font-size: 12px; color: var(--text, #2b2b2b); font-weight: 700; margin-top: 3px; }
.ck-sc-sub { font-size: 10px; color: var(--text-2, #9a9a9a); margin-top: 2px; }
.ck-rt-direct .ck-rt-amt.on, .ck-rt-direct .ck-rt-state.on { color: #5fe089; }
/* 上方两栏汇总：已到账=绿、待解锁=琥珀（白底上纯黄不可读，用深琥珀色保持"黄系"且清晰） */
.ck-split-col.on .ck-sc-amt { color: #15a34a; }
.ck-split-col:not(.on) .ck-sc-amt { color: #c79100; }

/* r313：体验金提现通道 */
.ck-exp-grid { display: flex; gap: 6px; margin: 12px 0 8px; }
.ck-exp-cell {
  flex: 1; aspect-ratio: 1 / 1; max-width: 52px; width: 100%; margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px; font-size: 15px; font-weight: 700;
  background: #f3f5f7; color: var(--text-2, #9a9a9a); border: 1px solid #e8eaed;
}
.ck-exp-cell.done { background: #e7f7ee; color: #18a058; border-color: #bfe9cf; }
.ck-exp-cell.today { background: #fff1e9; color: var(--danger, #e64340); border-color: #ffd0bf; box-shadow: 0 0 0 2px rgba(230,67,64,.12); }
.ck-exp-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12px; color: var(--text-2, #9a9a9a); }
.ck-exp-today { color: var(--danger, #e64340); font-weight: 700; }
.ck-exp-done { color: #18a058; font-weight: 700; }
.ck-exp-broken { color: #d48806; font-weight: 600; }
.ck-exp-note { font-size: 12px; color: var(--text-2, #9a9a9a); line-height: 1.7; margin-top: 8px; }
.ck-exp-note b { color: var(--danger, #e64340); }
/* r330：把「不受 ¥20 门槛限制」写成显眼的说明，避免用户以为小额提现被门槛挡住 */
.ck-exp-badge {
  flex: 0 0 auto; font-size: 11px; font-weight: 800; color: #0b7a46;
  background: #e8f8ee; border: 1px solid #b7e6c8; border-radius: 999px; padding: 3px 9px; white-space: nowrap;
}
.ck-exp-free {
  font-size: 12px; line-height: 1.75; color: #0b7a46;
  background: #edf9f1; border-left: 3px solid #18a058; border-radius: 8px;
  padding: 8px 10px; margin: 10px 0 2px;
}
.ck-exp-free b { color: #0b7a46; }

html[data-theme="dark"] .ck-split-col { background: #2a2320; border-color: #3a2e29; }
html[data-theme="dark"] .ck-split-col.on { background: #2f2620; border-color: #4a352e; }
html[data-theme="dark"] .ck-sc-label { color: #e6e9ef; }
html[data-theme="dark"] .ck-exp-cell { background: #1f242c; color: #8a93a0; border-color: #2a313b; }
html[data-theme="dark"] .ck-exp-cell.done { background: #16301f; color: #4ad07f; border-color: #1f4a32; }
html[data-theme="dark"] .ck-exp-cell.today { background: #2f2620; color: #ff9b7a; border-color: #4a352e; }
html[data-theme="dark"] .ck-exp-meta, html[data-theme="dark"] .ck-exp-note { color: #a9b1bd; }
html[data-theme="dark"] .ck-exp-badge { background: #12301f; border-color: #1e5236; color: #7ee2a8; }
html[data-theme="dark"] .ck-exp-free { background: #12261b; color: #a8e6c2; border-left-color: #2f9e63; }
html[data-theme="dark"] .ck-exp-free b { color: #a8e6c2; }

/* r318：解锁 ¥30 · 三种方式（签到 / 订单 / 看广告）—— 一目了然 */
.ck-channels .ck-ch {
  display: flex; align-items: center; gap: 10px;
  padding: 12px; border-radius: 12px;
  background: var(--bg-soft, #f7f8fa); border: 1px solid var(--line, #eee);
  margin-top: 10px;
}
.ck-channels .ck-ch.is-done { background: #f2fbf5; border-color: #cdebd8; }
.ck-channels .ck-ch.is-off { opacity: .72; }
.ck-ch-ico {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
}
.ck-ch-main { flex: 1; min-width: 0; }
.ck-ch-top { display: flex; align-items: center; gap: 8px; }
.ck-ch-name { font-size: .92em; font-weight: 800; color: var(--text-1, #1f2329); }
.ck-ch-idx { font-size: .62em; color: var(--danger, #e64340); background: #ffece8; padding: 1px 6px; border-radius: 999px; font-weight: 700; }
.ck-ch.is-done .ck-ch-idx { color: #18a058; background: #e7f7ee; }
.ck-ch-desc { font-size: .74em; color: var(--text-2, #6b7280); line-height: 1.55; margin-top: 3px; }
.ck-ch-desc b { color: var(--danger, #e64340); }
.ck-ch-prog { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: .68em; color: var(--text-2, #8a93a0); margin-top: 5px; }
.ck-ch-ok { color: #18a058; font-weight: 700; }
/* r328：看广告渠道里的「体验金提现 ›」直达链接 */
.ck-exp-link {
  color: var(--accent, #6366f1); font-weight: 700; text-decoration: none;
  white-space: nowrap; margin-left: auto;
}
.ck-exp-link:active { opacity: .55; }
html[data-theme="dark"] .ck-exp-link { color: #8fb4ff; }
.ck-ch-foot { font-size: .72em; color: var(--text-2, #8a93a0); line-height: 1.6; margin-top: 10px; }
.ck-channels .ck-ch > .btn { flex: 0 0 auto; align-self: center; white-space: nowrap; }
.ck-ad-refresh { border: 1px solid var(--line, #e5e5e5); background: #fff; color: var(--text, #333); border-radius: 6px; width: 24px; height: 22px; line-height: 20px; padding: 0; cursor: pointer; font-size: 13px; }
.ck-ad-pending { color: #fa8c16; font-size: 11px; }
html[data-theme="dark"] .ck-channels .ck-ch { background: #1a2029; border-color: #262e3a; }
html[data-theme="dark"] .ck-channels .ck-ch.is-done { background: #14251b; border-color: #1f4a32; }
html[data-theme="dark"] .ck-ch-ico { background: #222b36; }
html[data-theme="dark"] .ck-ch-name { color: #e6e9ef; }
html[data-theme="dark"] .ck-ch-desc, html[data-theme="dark"] .ck-ch-prog, html[data-theme="dark"] .ck-ch-foot { color: #a9b1bd; }
html[data-theme="dark"] .ck-ad-refresh { background: #222b36; border-color: #2a313b; color: #cbd3de; }

/* r322：签到须知独立成页，签到页只留一个轻量入口 */
.ck-rules-entry { margin-top: 12px; text-align: center; }
.ck-rules-entry a { display: inline-block; font-size: .82em; color: var(--text-2, #8a93a0); text-decoration: none; padding: 8px 4px; }
.ck-rules-entry a:active { opacity: .6; }
html[data-theme="dark"] .ck-rules-entry a { color: #a9b1bd; }

/* ============================================================
 * r333：首页商品「下拉分批加载」—— 底部哨兵 + 到底提醒
 * 到底文案用户明确要求「字体不要太小」，这里主文案 18px 加粗、副文案 14px，
 * 不做成 11px 的小灰字；浅色 / 深色主题各给一套对比色。
 * ============================================================ */
.goods-feed-sentinel {
  text-align: center; padding: 18px 12px 22px;
  font-size: 15px; color: var(--text-2, #8a93a0); letter-spacing: .4px;
}
.goods-feed-end {
  margin: 16px 4px 22px; padding: 18px 14px;
  background: var(--panel, #fff);
  border: 1px dashed var(--line, #dcdfe6);
  border-radius: var(--radius, 14px);
  text-align: center;
}
.goods-feed-end[hidden] { display: none; }
/* r334：只留一句话，按逗号分两排；18px 加粗，不做小灰字、不挂图标和副文案 */
.gfe-txt {
  display: block; font-size: 18px; font-weight: 800; line-height: 1.75;
  color: var(--text, #333); letter-spacing: .2px;
}
html[data-theme="dark"] .goods-feed-end { background: #151a24; border-color: #2a313b; }
html[data-theme="dark"] .goods-feed-sentinel { color: #a9b1bd; }
html[data-theme="dark"] .gfe-txt { color: #e8edf6; }

/* ============================================================
 * r334：签到日历 + 积分明细
 * 格子里的说明不能挤成看不清的小字：日期 11px、图标 17px、标签 11px，
 * 图例与详情统一 13px 以上；深色主题另给一套底色。
 * ============================================================ */
.ck-asset-links { display: flex; align-items: center; gap: 12px; }
.ck-cal-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 10px 0 8px; }
.ck-cal-nav b { font-size: 15px; }
.ck-cal-week, .ck-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.ck-cal-week span { text-align: center; font-size: 12px; color: var(--text-2, #8a93a0); padding: 4px 0; }
.ck-cal-blank { display: block; }
.ck-cal-cell {
  border: 1px solid var(--line, #e5e5e5); background: var(--panel, #fff);
  border-radius: 9px; min-height: 58px; padding: 4px 2px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  color: var(--text, #333); overflow: hidden;
}
.ck-cal-d { font-size: 11px; color: var(--text-2, #8a93a0); }
.ck-cal-i { font-size: 17px; line-height: 1.25; }
.ck-cal-l { font-size: 11px; line-height: 1.3; text-align: center; max-width: 100%; overflow: hidden; }
.ck-cal-cell.signed { background: rgba(34,197,94,.10); border-color: rgba(34,197,94,.35); }
.ck-cal-cell.signed .ck-cal-l { color: #18a058; font-weight: 700; }
.ck-cal-cell.today { border: 2px solid var(--money, #f43f5e); }
.ck-cal-cell.missed { opacity: .45; }
.ck-cal-cell.future { background: var(--bg, #f7f8fa); }
.ck-cal-cell.big-jackpot, .ck-cal-cell.big-cash { border-color: rgba(244,63,94,.45); background: rgba(244,63,94,.07); }
.ck-cal-cell.big-boost { border-color: rgba(245,158,11,.45); background: rgba(245,158,11,.07); }
.ck-cal-cell:active { transform: scale(.96); }
.ck-cal-loading { grid-column: 1 / -1; text-align: center; padding: 24px 0; color: var(--text-2, #8a93a0); font-size: 14px; }
.ck-cal-legend { margin-top: 10px; font-size: 13px; line-height: 1.85; color: var(--text-2, #8a93a0); }
.ck-cal-legend b { font-size: 15px; }
.ck-cal-detail .row { border-bottom: 1px solid var(--line, #eee); }
html[data-theme="dark"] .ck-cal-cell { background: #151a24; border-color: #262e3a; }
html[data-theme="dark"] .ck-cal-cell.future { background: #10151e; }
html[data-theme="dark"] .ck-cal-cell.signed { background: #14251b; border-color: #1f4a32; }
html[data-theme="dark"] .ck-cal-legend { color: #a9b1bd; }

/* ============================================================
 * r334：任何商品列表页统一显示「店铺名称 + 店铺类型 + 商品销量」
 * 拼多多品牌官方黑标单独凸显：黑金胶囊 + ◆ + 金边投影，比普通店型徽标大一号。
 * ============================================================ */
.shop-line { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin: 5px 0 0; line-height: 1.4; }
.shop-line.compact { gap: 4px; margin-top: 4px; }
.shop-name {
  font-size: 11px; color: var(--text-2, #8a93a0); max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.shop-tag {
  display: inline-block; padding: 1px 6px; border-radius: 4px;
  font-size: 10px; font-weight: 600; line-height: 1.5; white-space: nowrap;
}
.shop-tag.brand-black {
  padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .3px;
  background: linear-gradient(135deg, #111318, #2b2113 55%, #000);
  color: #ffd77a; border: 1px solid #a9812f;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .28);
}
.sales-tag {
  display: inline-block; font-size: 10px; line-height: 1.5;
  color: var(--text-2, #8a93a0); white-space: nowrap;
}
html[data-theme="dark"] .shop-name { color: #a9b1bd; }
html[data-theme="dark"] .sales-tag { color: #a9b1bd; }

/* r336：补位格做成和本月一样的药丸，只是淡色、绝不显示奖励 / 盲盒内容 —— 便民日历。
   跨月第一格用虚线边 + 月份小字，用户一眼知道「下月 1 号是几月」。 */
.ck-cal-cell.outside { opacity: .72; background: var(--bg, #f7f8fa); border-color: var(--line, #e5e5e5); }
.ck-cal-cell.outside .ck-cal-d { color: var(--text-2, #8a93a0); font-weight: 600; }
.ck-cal-cell.outside .ck-cal-i { min-height: 17px; }   /* 空占位，保持与本月格子同高 */
.ck-cal-cell.outside .ck-cal-l { color: var(--text-2, #8a93a0); font-size: 10px; }
.ck-cal-cell.outside.out-month { border-style: dashed; }
.ck-cal-cell.outside.out-month .ck-cal-l { color: var(--money, #f43f5e); font-weight: 700; }
.ck-cal-cell.outside:active { transform: scale(.96); }
html[data-theme="dark"] .ck-cal-cell.outside { background: #10151e; border-color: #262e3a; }
