/* 访客端 H5 通用样式：移动端优先，桌面居中模拟手机宽度 */

:root {
  --primary: #0178ff;
  --primary-dark: #0066D6;
  --text: #1f2329;
  --text-2: #5c6570;
  --text-3: #98a1ab;
  --bg: #f5f6f8;
  --card: #ffffff;
  --line: #eceef1;
  --radius: 14px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  /* 全局皮肤（P33）—— 后台「全局设置」写这些变量，访客端与预览共用 */
  --btn-bg: #0178ff;
  --btn-color: #ffffff;
  --btn-h: 44px;
  --btn-r: 24px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

/*
 * App 式页面壳（P30，结构对齐 fog-shell.html）
 *
 *   body        固定视口、不滚动；壳外浅灰底（桌面上看得出"这是一个手机壳"）
 *   .h5-frame   页面容器：最大 420px 居中，flex 三段（顶栏 / 内容 / 底栏）
 *   .h5-content 唯一滚动区；顶栏与购买栏不随内容滚动
 *
 * 为什么改：原来整页滚 + 顶栏 sticky + 购买栏 fixed，桌面端会出现
 * "内容比购买栏宽、购买栏贴窗口边缘"的错位，安全区（刘海/home 条）也算不准。
 * 壳内滚动之后，一屏高度、安全区、底部固定栏三者才统一。
 */
body {
  background: #f0f1f3;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue',
    'Microsoft YaHei', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  overflow: hidden;
  display: flex;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
}

.h5-frame {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 420px;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.04), 0 14px 44px rgba(15, 23, 42, 0.1);
}

/* 手机上就是全屏，不要那圈投影 */
@media (max-width: 420px) {
  .h5-frame {
    box-shadow: none;
  }
}

/* 唯一滚动区 */
.h5-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  /*
   * P42：水平留白收到这一层
   *
   * 原来靠每个 `.section` 的 `margin:12px` 留边，区块一旦裸放（不套容器）就贴屏边。
   * 改成壳自己带 12px 内边距后：裸块天然有边距，`.section` 只需保留上下间距，
   * 通栏块（封面/导航/自定义代码）用负边距抵消。
   */
  padding: 0 12px;
  padding-bottom: calc(10px + var(--safe-bottom));
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
}

/* 顶部条 */
.h5-topbar {
  position: relative;
  z-index: 20;
  flex: none;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.h5-topbar .logo {
  height: 22px;
  width: auto;
}

.h5-topbar .name {
  font-size: 16px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 区块 */
.section {
  background: var(--card);
  border-radius: var(--radius);
  /* P42：水平边距由 .h5-content 统一提供，这里只管上下 */
  margin: 12px 0;
  padding: 16px;
}

/* ---------- 自定义区块的容器（P42） ----------
 *
 * 容器不是区块类型，而是区块的一个分组属性：相邻同名 `box` 的块渲染在同一个 .diy-box 里，
 * 不设容器的块裸放在壳里。四种预设样式与 H5TplService::BOX_STYLES 一一对应。
 *
 * 为什么用 padding 而不是子元素 margin：容器内的块（尤其 code、image 自带的 margin）
 * 逐块处理容易漏，容器统一内边距 + 块间 `+` 相邻选择器最稳。
 */
.diy-box {
  border-radius: var(--radius);
  /*
   * 间距与内边距走 CSS 变量（P131），默认值 = 加主题之前写死的 12px，老页面不变。
   *
   * 两个变量的分工不能混：
   *   --box-pad-g  全局「疏密」档位，挂在 .h5-frame 上，所有容器继承；
   *   --box-pad    单个容器的微调，挂在 .diy-box 自己的 inline style 上。
   * 后者写在元素自身，天然优先于继承来的前者。分开是必要的 ——
   * 合并成一个的话，--plain 那种「不画内边距」的容器会被全局值意外撑出留白。
   */
  margin: var(--box-my, 12px) 0;
  padding: var(--box-pad, var(--box-pad-g, 12px));
}

.diy-box--card {
  background: var(--box-bg, var(--card));
  box-shadow: 0 1px 3px rgba(17, 24, 39, 0.06);
}

.diy-box--soft {
  background: var(--box-bg, #f6f7f9);
}

.diy-box--line {
  background: var(--box-bg, var(--card));
  border: 1px solid var(--line);
}

/* 只分组：不画背景、不留内边距，等价于裸放，只是告诉编辑器「这几块是一组」 */
.diy-box--plain {
  /* 容器级 box_pad 设了就尊重它（有人确实想给分组加留白） */
  padding: var(--box-pad, 0);
  background: var(--box-bg, transparent);
}

/* ============================================================
 * 容器扩展（P129）：band / cols2
 *
 * 都不是新区块类型，只是 `.diy-box` 的两种预设样式，走同一套「相邻同名 box」
 * 分组机制。后端 BOX_STYLES 与 blocks.js 的白名单对象必须同步加键，
 * 否则 normalizeSchema 回落 card、渲染端也回落 card —— 看起来"配了没生效"。
 * ============================================================ */

/* 通栏底色：抵消 .h5-content 的 12px 水平内边距，铺满屏宽形成分区 */
.diy-box--band {
  background: var(--box-bg, #f2f4f7);
  border-radius: 0;
  /*
   * 上下各留一点，和相邻裸块不黏在一起；纵向随「疏密」档位变化。
   * 左右固定 12px：band 用负边距铺到屏宽，这 12px 正好把内容对回 .h5-content 的边。
   * 容器级的 box_pad 若设了，只让它改纵向 —— 改横向会和负边距打架。
   */
  padding: var(--box-pad, var(--box-band-py, 16px)) 12px;
}

.h5-content > .diy-box--band,
.h5-content > .pv-blk > .diy-box--band {
  margin-left: -12px;
  margin-right: -12px;
  width: calc(100% + 24px);
  max-width: none;
}

/* 两栏并排：组内块按网格排，奇数个时最后一块自然占满一列 */
.diy-box--cols2 {
  display: grid;
  grid-template-columns: repeat(var(--box-cols, 2), 1fr);
  gap: var(--box-gap, 12px);
  align-items: start;
}

/* 网格里块的 margin 会把 gap 撑成两倍，容器内统一归零 */
.diy-box--cols2 > *,
.diy-box--cols2 .pv-blk > * {
  margin-top: 0;
  margin-bottom: 0;
}

/* 窄屏（小屏手机）两栏挤不下，退回单列 */
@media (max-width: 340px) {
  .diy-box--cols2 {
    grid-template-columns: 1fr;
  }
}

/* 留白区块（P129）：高度由 inline style 给，这里只保证它是块级且不吃间距 */
.diy-spacer {
  width: 100%;
  height: 24px;
  padding: 0;
  margin: 0;
}

/* 容器内不需要再叠一层通栏负边距（容器自己有内边距） */
.diy-box .diy-code {
  margin-left: 0;
  margin-right: 0;
}

/*
 * 通栏块：抵消 .h5-content 的水平内边距，让代码铺满整宽
 *
 * 线上是 `#app > 块`，预览里多一层 `.pv-blk`（无 padding/margin/overflow），
 * 所以两条选择器都要写。容器内的块由上面 `.diy-box .xxx` 收回，保持容器留白。
 * 轮播图**不在这里**：它有圆角，本来就该跟内容区留边（规格 8px 边距）。
 */
.h5-content > .diy-code,
.h5-content > .pv-blk > .diy-code {
  margin-left: -12px;
  margin-right: -12px;
  width: calc(100% + 24px);
  max-width: none;
  border-radius: 0;
}

/* ============================================================
 * 轮播图（P50）—— 规格照 UI主题/fogshop-ui-mobile/preview/fog-swiper.html
 *
 * 尺寸/间距/颜色全部走 CSS 变量：作者在后台调高度、圆角，改的是 --fs-h / --fs-radius，
 * 不需要重新生成样式表。
 *
 * 为什么用 transform 而不是 scroll-snap：
 *   snap 在部分安卓 WebView 上会和页面纵向滚动抢手势（表现为"划不动"或"整页跟着跳"），
 *   位移法只有一个属性在变，过渡交给 CSS，最不容易出意外。
 * ============================================================ */
.fs {
  --fs-h: 180px;
  --fs-radius: 12px;
  --fog-swiper-interval: 3500ms;
  position: relative;
  height: var(--fs-h);
  /* 与 .section 的纵向间距保持一致；左右不用留 —— .h5-content 已有 12px 内边距 */
  margin: 12px 0;
  border-radius: var(--fs-radius);
  overflow: hidden;
  /* 图片没加载完时的占位底色，避免白闪 */
  background: #e8eaee;
  -webkit-tap-highlight-color: transparent;
  /* 纵向滚动交还给页面，只让我们接管横向 */
  touch-action: pan-y;
}

.fs-track {
  display: flex;
  height: 100%;
  transition: transform 0.45s cubic-bezier(0.25, 0.8, 0.35, 1);
  will-change: transform;
}

.fs-slide {
  position: relative;
  flex: 0 0 100%;
  height: 100%;
  overflow: hidden;
}

.fs-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 无图时的默认渐变（作者填了起止色会用 inline style 覆盖） */
.fs-slide.is-text {
  background: linear-gradient(135deg, #59a7ff, #2e8cf0);
}

/* 整屏可点：单独一层，不把 img 包进 <a>（那会打乱 flex，标题也点不到） */
.fs-hit {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.fs-title,
.fs-sub {
  position: absolute;
  left: 18px;
  max-width: 70%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  z-index: 1;
  pointer-events: none;
}

.fs-title {
  bottom: 16px;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.18);
}

.fs-sub {
  bottom: 8px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.5px;
}

/* 主副标题同现时标题上移，否则两行会挤在一起 */
.fs-slide.has-sub .fs-title {
  bottom: 30px;
}

/* ---------- 指示器：一种 DOM，靠修饰类换形态与位置 ---------- */

.fs-dots {
  position: absolute;
  left: 50%;
  bottom: 9px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 2;
  /*
   * 规格没写阴影。加它是为了浅色图：白点压在 #fff 上会彻底消失，
   * 而"指示器看不见"是这样的组件最难被反馈的问题（用户以为只有一张）。
   */
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.28));
}

.fs-dot {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  transition: width 0.3s ease, height 0.3s ease, background 0.3s ease, transform 0.18s ease;
}

/* 视觉 6px、可点区域外扩到 16px：手机上手点得中 */
.fs-dot::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 999px;
}

/*
 * 指示器由 hover 驱动切换（P51）：鼠标扫过即切，不用点。
 * 所以 hover 必须给出明确反馈 —— 否则用户不知道"划过去就换了一张"是自己的鼠标干的。
 */
.fs-dot:hover {
  background: #fff;
  transform: scale(1.25);
}

.fs-dot.is-on {
  width: 16px;
  background: #fff;
}

/* 右侧竖胶囊 */
.fs--ind-right .fs-dots {
  left: auto;
  right: 8px;
  bottom: 50%;
  transform: translateY(50%);
  flex-direction: column;
  gap: 5px;
}

.fs--ind-right .fs-dot {
  width: 4px;
  height: 4px;
}

.fs--ind-right .fs-dot.is-on {
  width: 4px;
  height: 14px;
}

/* 顶部进度条：4px 方块横排，间距靠 margin（容器 gap 归零） */
.fs--ind-bar .fs-dots {
  left: auto;
  right: 10px;
  top: 9px;
  bottom: auto;
  transform: none;
  gap: 0;
}

.fs--ind-bar .fs-dot {
  width: 4px;
  height: 4px;
  margin: 0 2px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.4);
}

/* 进度条形态横排靠得很近，hover 只改颜色不放大，否则会压到相邻方块 */
.fs--ind-bar .fs-dot:hover {
  transform: none;
}

/*
 * 当前段：26px 的"轨道 + 填充"（P52 合并了原来的静态白条）
 *
 * 静态那条本来就是填充条的"没走完"状态，摆成两个选项只会让作者纠结选哪个。
 * 现在选了顶部进度条就一定有填充 —— 等于把停留倒计时直接画出来。
 */
.fs--ind-bar .fs-dot.is-on {
  width: 26px;
  background: rgba(255, 255, 255, 0.38);
  overflow: hidden;
}

.fs--ind-bar .fs-dot.is-on .fs-fill {
  position: absolute;
  inset: 0;
  background: #fff;
  transform-origin: left center;
  /*
   * duration 直接吃根节点注进来的 --fog-swiper-interval（= 后台配的停留时长），
   * JS 里只负责"换一个节点"触发重播，不在 JS 里算动画时长 —— 两处各算一次必然不同步。
   */
  animation: fs-fill var(--fog-swiper-interval) linear forwards;
}

@keyframes fs-fill {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

/* 悬停暂停：选择器权重必须≥动画那条，否则 animation 简写会把 play-state 重置 */
.fs--ind-bar.is-paused .fs-dot.is-on .fs-fill {
  animation-play-state: paused;
}

/* 不自动播放时进度条没有"进度"可言，直接满格静态 */
.fs--no-auto.fs--ind-bar .fs-dot.is-on .fs-fill {
  animation: none;
  transform: scaleX(1);
}

/* ---------- 桌面箭头：≥768px 才显示，悬停才出现 ---------- */

.fs-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: none;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 3;
}

.fs-btn-prev {
  left: 8px;
}

.fs-btn-next {
  right: 8px;
}

.fs:hover .fs-btn {
  opacity: 1;
}

.fs--no-arrow .fs-btn {
  display: none !important;
}

@media (min-width: 768px) {
  .fs-btn {
    display: flex;
  }
}

/* 系统开了"减少动效"：进度条直接满格，别做扫动 */
@media (prefers-reduced-motion: reduce) {
  .fs--ind-bar .fs-dot.is-on .fs-fill {
    animation: none;
    transform: scaleX(1);
  }

  .fs-track {
    transition-duration: 0.01ms;
  }
}

/* ============================================================
 * 首屏大图（P132）
 *
 * 一张图 + 一层暗遮罩 + 压在图里的白字。用 image + text 两个区块拼不出来
 * （text 只会排到图片下面），所以做成独立组件。
 *
 * 三层结构而不是给容器直接挂 background-image：
 *   ① 遮罩必须独立成层，才能做到「不管背景图多浅，白字都读得清」，
 *      而且调深浅不用动图片本身；
 *   ② 图片层用 div + background-size:cover，宽高比不对也不会拉变形。
 *
 * 通栏：抵消 .h5-content 的 12px 内边距铺满屏宽（同 band 的套路）。
 * 首屏通常在全页最上方，所以第一个子元素时去掉上边距，贴住顶部。
 * ============================================================ */

.diy-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  border-radius: var(--radius);
  margin: 12px 0;
  background: #dbe4f0;
}

.h5-content > .diy-hero,
.h5-content > .pv-blk > .diy-hero {
  margin-left: -12px;
  margin-right: -12px;
  width: calc(100% + 24px);
  max-width: none;
  border-radius: 0;
}

.h5-content > .diy-hero:first-child,
.h5-content > .pv-blk:first-child > .diy-hero {
  margin-top: 0;
}

.diy-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/*
 * 遮罩：先给一条不依赖 calc 的兜底，再用渐变覆盖。
 * 老浏览器解析不了 calc() 里的 rgba 时，整条声明会被丢弃，
 * 兜底那条留下来 —— 至少白字不会直接趴在浅色图上。
 */
.diy-hero__mask {
  position: absolute;
  inset: 0;
  background: rgba(12, 16, 24, 0.35);
  background: linear-gradient(
    to top,
    rgba(12, 16, 24, var(--hero-mask, 0.4)),
    rgba(12, 16, 24, calc(var(--hero-mask, 0.4) * 0.25))
  );
}

.diy-hero__body {
  position: relative;
  width: 100%;
  padding: 22px 18px 24px;
  color: #fff;
}

.diy-hero--center .diy-hero__body {
  text-align: center;
}

.diy-hero--left .diy-hero__body {
  text-align: left;
}

.diy-hero__badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.6;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.34);
}

.diy-hero__title {
  margin: 0;
  font-size: 24px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: 0.2px;
  /* 图片再深一点也能压住：这层投影是给"遮罩调太浅"兜底的 */
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.diy-hero__sub {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.88);
}

.diy-hero__btn {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 26px;
  border: 0;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: #1f2329;
  background: #fff;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.diy-hero__btn:active {
  transform: translateY(1px);
}

.section-title {
  /* 字号随主题「章节标题字号」变化；默认 15px = 加主题之前的写死值 */
  font-size: var(--section-title-fs, 15px);
  font-weight: 600;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-title::before {
  content: '';
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: var(--primary);
}

/* 封面 */
.cover {
  width: 100%;
  border-radius: var(--radius);
  background: #f0f1f3;
}

.cover-empty {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #f3f4f6, #e8eaed);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  font-size: 13px;
}

/* 产品标题区 */
.product-name {
  font-size: 19px;
  font-weight: 600;
  margin: 0 0 6px;
  line-height: 1.4;
}

.product-desc {
  color: var(--text-2);
  font-size: 14px;
  margin: 0;
  white-space: pre-wrap;
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 12px;
}

.price {
  color: var(--primary);
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
}

.price::before {
  content: '¥';
  font-size: 15px;
  margin-right: 1px;
}

.price-origin {
  color: var(--text-3);
  font-size: 13px;
  text-decoration: line-through;
}

.tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 11px;
  background: #e8f1ff;
  color: var(--primary);
}

.meta-row {
  display: flex;
  gap: 16px;
  color: var(--text-3);
  font-size: 12px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

/* 富文本详情 */
.detail-body {
  font-size: 14.5px;
  color: #33383f;
  word-break: break-word;
}

.detail-body img {
  border-radius: 8px;
  margin: 8px 0;
}

.detail-body p {
  margin: 0 0 10px;
}

/* 客服 */
.service {
  display: flex;
  gap: 12px;
  align-items: center;
}

.service img {
  width: 92px;
  height: 92px;
  border-radius: 8px;
  object-fit: cover;
}

/* hidden 属性必须赢过任何组件自身的 display 规则
   （否则 .buybar{display:flex} 会把 hidden 的购买条顶出来，404/失败页挂个 ¥0.00） */
[hidden] {
  display: none !important;
}

/* 底部购买栏 */
.buybar {
  position: relative;
  z-index: 30;
  flex: none;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(6px);
  border-top: 1px solid var(--line);
  padding: 10px 16px calc(10px + var(--safe-bottom));
  display: flex;
  align-items: center;
  gap: 12px;
}

.buybar-inner {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
}

.buybar .price {
  font-size: 22px;
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
  transition: opacity 0.15s;
}

.btn:active {
  opacity: 0.85;
}

.btn:disabled {
  background: #c8ccd2;
  cursor: not-allowed;
}

.btn-block {
  display: block;
  width: 100%;
}

.btn-ghost {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
}

.btn-sm {
  padding: 5px 12px;
  font-size: 12.5px;
  border-radius: 6px;
  font-weight: 500;
}

.btn-main {
  flex: 1;
}

/* 支付方式 */
.pay-methods {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pay-method {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
}

.pay-method.active {
  border-color: var(--primary);
  background: #eef4ff;
}

.pay-method .radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid #c8ccd2;
  flex: none;
  position: relative;
}

.pay-method.active .radio {
  border-color: var(--primary);
}

.pay-method.active .radio::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--primary);
}

/* 交付内容 */
.delivery-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
}

.delivery-title {
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.delivery-value {
  background: #f6f7f9;
  border-radius: 8px;
  padding: 10px 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
  word-break: break-all;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.delivery-qrcode {
  text-align: center;
}

.delivery-qrcode img {
  max-width: 220px;
  margin: 0 auto;
  border-radius: 8px;
}

.hint {
  color: var(--text-3);
  font-size: 12.5px;
  margin-top: 6px;
}

/* 状态 */
.state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-2);
}

.state .icon {
  font-size: 40px;
  line-height: 1;
  margin-bottom: 12px;
}

/* 404 页（域名未绑产品）：插画取自 UI-B 模板（Rocker）自带素材 */
.nf404 {
  text-align: center;
  padding: 48px 24px 60px;
  color: var(--text-2);
}

.nf404-img {
  width: min(72vw, 300px);
  height: auto;
  display: block;
  margin: 0 auto 4px;
}

.nf404-code {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-1);
  margin-top: 8px;
}

.nf404-code span {
  color: var(--primary);
}

.nf404-title {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--text-1);
  margin-top: 10px;
}

.nf404-sub {
  font-size: 12.5px;
  color: var(--text-3);
  margin-top: 6px;
}

.nf404-btn {
  display: inline-block;
  margin-top: 22px;
  padding: 9px 28px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  text-decoration: none;
}

.spinner {
  width: 22px;
  height: 22px;
  border: 2px solid var(--line);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 提示条 */
.toast {
  position: fixed;
  left: 50%;
  top: 40%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 999;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
}

/* 遮罩层表单（联系方式） */
.mask {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 420px;
  background: rgba(0, 0, 0, 0.45);
  z-index: 100;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.mask.show {
  display: flex;
}

.sheet {
  background: #fff;
  width: 100%;
  max-width: 420px;
  border-radius: 16px 16px 0 0;
  padding: 20px 16px calc(20px + var(--safe-bottom));
}

.sheet h4 {
  margin: 0 0 14px;
  font-size: 16px;
}

.input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  font-size: 15px;
  outline: none;
}

.input:focus {
  border-color: var(--primary);
}

.sheet-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.sheet-actions .btn {
  flex: 1;
}

/* 页脚：备案号 + 品牌署名（后台「品牌与 SEO」配置，留空则不渲染） */
.h5-footer {
  padding: 18px 12px 26px;
  text-align: center;
  font-size: 12px;
  color: #9aa0a6;
  line-height: 1.7;
}

/* ---------- 落地页自定义区块（P29 / 3-7） ---------- */
.diy-image {
  display: block;
  width: 100%;
  border-radius: 8px;
  margin: 8px 0;
}

/* 图片画廊（P121 · 合并原轮播图）：单张 / 宫格 / 顺铺 */
.diy-image-single {
  margin: 8px 0;
  overflow: hidden;
}
.diy-image-single .diy-image {
  border-radius: 0;
  margin: 0;
}

.diy-gallery {
  margin: 8px 0;
  --gg-gap: 8px;
  --gg-radius: 12px;
}
.diy-gallery__cell,
.diy-gallery--seq .diy-gallery__item img {
  display: block;
  width: 100%;
  border-radius: var(--gg-radius);
}
.diy-gallery--grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gg-gap);
}
.diy-gallery--grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.diy-gallery--grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.diy-gallery--grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.diy-gallery--grid .diy-gallery__cell { overflow: hidden; }

.diy-gallery--seq {
  display: flex;
  flex-direction: column;
  gap: var(--gg-gap);
}
.diy-gallery--seq .diy-gallery__item { margin: 0; }
.diy-gallery__cap {
  margin: 6px 2px 0;
  font-size: 13px;
  color: #333;
  line-height: 1.5;
}
.diy-gallery__cap span {
  display: block;
  font-size: 12px;
  color: #999;
}

.diy-video {
  display: block;
  width: 100%;
  border-radius: 8px;
  margin: 8px 0;
  background: #000;
}

.diy-notice {
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff7e6;
  border: 1px solid #ffe0a3;
  color: #8a5a00;
  font-size: 13px;
  line-height: 1.6;
}

.diy-hr {
  border: none;
  border-top: 1px solid #eceff3;
  margin: 16px 0;
}

.diy-quote {
  margin: 10px 0;
  padding: 8px 12px;
  border-left: 3px solid #4b7bec;
  background: #f6f8fc;
  color: #4a4f57;
  font-size: 14px;
  line-height: 1.7;
}

.diy-btn {
  display: block;
  width: 100%;
  margin: 12px 0;
  text-align: center;
}

/*
 * 按钮的三种样式（P46）
 *
 * 默认（primary）直接用 .btn 的主色，这里不重复写 —— 皮肤改了主色，它跟着变。
 * ghost / plain 是"次要操作"用的：一页只有一个主张，其余都该往后退。
 */
.diy-btn--ghost {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
}

.diy-btn--plain {
  background: transparent;
  color: var(--primary);
  padding-left: 0;
  padding-right: 0;
}

/*
 * 按钮里的两行结构（P119）
 *
 * 原「行动号召」的主文案 + 副文案，随组件合并到按钮上：主文案一行、
 * 副文案换行小字（「已有 328 人加入」这类）。副文案用 block 强制换行，
 * 这样按钮本身的 display:block + text-align:center 不用改。
 */
.diy-btn__text {
  display: inline-block;
}

.diy-btn__sub {
  display: block;
  margin-top: 1px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
  opacity: 0.88;
}

/*
 * 底部固定栏（P119）
 *
 * 按钮开「固定吸底」后，pageBody 把它从正文摘出来放进这个栏，挂在购买栏上方。
 *
 * 为什么不用 position:fixed：
 *   `.h5-frame` 是 flex 纵列（内容区 flex:1 可滚动，栏 flex:none），栏天然就在
 *   屏幕底部，不参与滚动 —— fixed 反而会被 iOS 的地址栏收起/橡皮筋搞错位。
 *
 * `background-color: inherit` 是刻意的：栏要跟页面底色一致，否则会看到一条
 * 和内容区不同色的横带。多颗吸底按钮按 flex 纵列排列并留 8px 间隙。
 */
.h5-fixbar {
  position: relative;
  z-index: 28;
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 12px calc(8px + var(--safe-bottom));
  background-color: inherit;
}

/* 正文里 .diy-btn 自带 12px 上下外边距，进栏后由 gap 统一控距 */
.h5-fixbar .diy-btn {
  margin: 0 auto;
}


/*
 * 自定义代码区块（P40）
 *
 * 只做「兜底不撑破页面」这一件事：宽度跟随内容区、超宽元素裁掉。
 * 其余样式全是作者自己写的，这里一律不干预 —— 一旦给它加 padding/字体，
 * 作者写的 style 就得跟我们的默认值打架。
 */
.diy-code {
  overflow: hidden;
}
.diy-code img,
.diy-code iframe,
.diy-code video {
  max-width: 100%;
}

/*
 * 只在后台画布/预览里出现的边界线（线上不加）：
 * 自定义代码没有默认样式，画布上很可能"看不见这一块在哪"。
 * 用 outline 而不是 border —— 不占布局，不会把作者算好的间距顶歪。
 */
.diy-code--pv {
  outline: 1px dashed #cfd6e0;
  outline-offset: 2px;
}

/* ---------- 预览占位（后台实时预览用，线上不会出现） ---------- */
.preview-empty {
  padding: 38px 16px;
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
  line-height: 1.7;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: #fbfcfd;
}

/* 预览里"有区块但没填内容"的占位：作者才知道块加成功了 */
.diy-empty {
  padding: 14px;
  margin: 6px 0;
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

/* ---------- 预览里的区块框（P32 画布点选定位） ----------
 * 只用 outline，不占布局：预览必须和线上长得一样，加个 margin 就失真了。
 */
.pv-blk {
  position: relative;
  cursor: pointer;
  outline: 1px dashed transparent;
  outline-offset: -1px;
  transition: outline-color 0.15s;
}

.pv-blk:hover {
  outline-color: rgba(75, 123, 236, 0.45);
}

.pv-blk.is-active {
  outline: 2px solid #4b7bec;
  outline-offset: -2px;
}


/* ---------- 全局皮肤：底部购买栏（P33） ----------
 * 用变量而不是直接改选择器：后台一改值就生效，预览与线上同一套。
 */
.buybar .btn-main {
  background: var(--btn-bg);
  color: var(--btn-color);
  height: var(--btn-h);
  border-radius: var(--btn-r);
  padding: 0 18px;
  box-sizing: border-box;
}

/*
 * 流光边框 / 按钮抖动 / 悬浮人物图 / 限时秒杀标 的样式已随「页面设置」一起删除（P46）
 *
 * 这些效果的开关原来是全局皮肤字段，字段删了、元素也不会再被创建 ——
 * 留着 CSS 只会让人以为「还有这个功能，只是没找到入口」，属于最难排查的一类死代码。
 * 要恢复就按区块做：效果属于按钮自己，不该是页面级开关。
 */

/* ---------- 业务型区块（P33，内容为示例文案） ---------- */
.diy-block-title {
  margin: 4px 0 10px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.diy-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 10px 0;
}

.diy-stats[data-n="2"] { grid-template-columns: repeat(2, 1fr); }
.diy-stats[data-n="4"] { grid-template-columns: repeat(2, 1fr); }

.diy-stat {
  padding: 12px 6px;
  border-radius: 12px;
  background: #f7f8fa;
  text-align: center;
}

.diy-stat b {
  display: block;
  font-size: 19px;
  line-height: 1.25;
  color: var(--text);
}

.diy-stat span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-3);
}

.diy-members__list {
  display: grid;
  /* P117：固定 5 列（和 WP 群成员墙密度一致），窄屏靠下面 @media 降列 */
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px 8px;
  margin: 6px 0 4px;
}

@media (max-width: 360px) {
  .diy-members__list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.diy-member {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

/* 外观统一由 P117 的 .diy-avatar 提供，这里只定尺寸（权重更高所以能覆写）。
 * 宽高用百分比 + aspect-ratio，跟着 5 列网格自适应，窄屏不会被挤成椭圆。 */
.diy-avatar.diy-member__avatar {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 12px;
  font-size: 20px;
}

.diy-member__name {
  max-width: 100%;
  font-size: 12px;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.diy-member__note {
  font-size: 11px;
  color: var(--text-3);
}

.diy-faq {
  margin: 8px 0;
}

.diy-faq__item {
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.diy-faq__item summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  list-style: none;
}

.diy-faq__item summary::-webkit-details-marker {
  display: none;
}

.diy-faq__item summary::after {
  content: '＋';
  float: right;
  color: var(--text-3);
}

.diy-faq__item[open] summary::after {
  content: '－';
}

.diy-faq__a {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-2);
}

.diy-reviews {
  margin: 8px 0;
}

.diy-review {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.diy-review:last-child {
  border-bottom: 0;
}

/* 外观统一由 P117 的 .diy-avatar 提供，这里只定尺寸 */
.diy-avatar.diy-review__avatar {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 11px;
  font-size: 17px;
}

.diy-review__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.diy-review__text {
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-2);
}

/* ---------- 后台画布拖拽指示（P33） ----------
 * 只在 editable 模式生效；线上不会出现这些类。
 */
.pv-blk.is-dragging {
  opacity: 0.45;
}

.pv-blk.is-drop-before {
  box-shadow: inset 0 3px 0 0 #4b7bec;
}

.pv-blk.is-drop-after {
  box-shadow: inset 0 -3px 0 0 #4b7bec;
}

/* ---------- 后台画布拖拽指示（P33） ----------
 * 只在 editable 模式生效；线上不会出现这些类。
 */
.pv-blk.is-dragging {
  opacity: 0.45;
}

.pv-blk.is-drop-before {
  box-shadow: inset 0 3px 0 0 #4b7bec;
}

.pv-blk.is-drop-after {
  box-shadow: inset 0 -3px 0 0 #4b7bec;
}

/* ---------- P66：底部自助入口（成为推广员 / 申请开站） ----------
 * 不做成浮窗：访客是来买东西的，浮窗会挡住购买栏；
 * 放在内容末尾，只有真的滑到底的人才看到 —— 正好是"想合作"的那批人。
 */
.h5-join {
  padding: 18px 16px 28px;
  text-align: center;
  font-size: 13px;
  color: #9aa0aa;
}

.h5-join a {
  color: #4b7bec;
  text-decoration: none;
}

/* ---------- P81：个人码收款页 ----------
 * 收款码是**买家唯一要操作的东西**，给足尺寸与白底：
 * 截图压缩、暗色主题、二维码被圆角裁切都会导致扫不出来，
 * 而扫不出来的表现是"买家说付不了"，排查时根本想不到是样式问题。
 */
.pay-qr {
  display: block;
  width: 232px;
  height: 232px;
  max-width: 70vw;
  max-height: 70vw;
  margin: 6px auto 0;
  object-fit: contain;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #eef0f3;
  padding: 6px;
  box-sizing: border-box;
}

/* 金额提示必须显眼：买家手输金额，差一分就对不上账 */
.pay-amount-warn {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff7e6;
  color: #ad6800;
  font-size: 13px;
  line-height: 1.6;
  text-align: left;
}

.pay-amount-warn b {
  font-size: 15px;
}

/* ---------- P116：营销区块（只借 FRPRO 视觉配方，代码自研） ----------
 * 借的是设计参数：10~14px 圆角、轻阴影、渐变扫光、聊天气泡左右分色、
 * 九宫格 10px 间距；HTML / 字段 / 交互全部按我方 `.diy-*` 契约重写。
 * 三条硬约束：
 *   ① 不引入 FRPRO 的 CSS 文件（开头有全局 `*`/`body` 重置、10rem 单位、
 *      `.modal`/`.close` 等通用类名，会冲掉手机壳与预览里的 Element Plus）；
 *   ② 尺寸一律 px（我方 H5 无 rem、不引 flexible.js，LESS 里的 (N/37.5)
 *      直接按 N px 读）；
 *   ③ 品牌色走 :root 变量，保证 P33 全局皮肤对新组件照样生效。
 *      唯一例外是滚动公告的中性深灰条 —— 它是「深色底」这个设计语言本身，
 *      不随品牌换色，所以保留固定值。
 */

/* 微信聊天：圆头像 + 左右分色气泡 */
.diy-chat__list {
  padding: 12px;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.diy-chat__row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 10px 0;
}

.diy-chat__row:first-child { margin-top: 0; }
.diy-chat__row:last-child  { margin-bottom: 0; }

.diy-chat__row--right { flex-direction: row-reverse; }

/* 外观统一由 P117 的 .diy-avatar 提供，这里只定尺寸 */
.diy-avatar.diy-chat__avatar {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  font-size: 16px;
}

.diy-chat__main { max-width: 72%; min-width: 0; }

/* P117：昵称 / 身份标记 / 时间收进同一行，右侧消息整体右对齐 */
.diy-chat__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
  font-size: 11px;
  line-height: 1.4;
}

.diy-chat__row--right .diy-chat__meta { justify-content: flex-end; }

.diy-chat__name { font-weight: 600; color: var(--text-2); }

.diy-chat__tag {
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
}

.diy-chat__time { color: var(--text-3); }

.diy-chat__bubble {
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
}

.diy-chat__row--right .diy-chat__bubble {
  background: var(--btn-bg);
  color: var(--btn-color);
}

/* 限时条：渐变扫光 + 等宽数字 */
.diy-countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 10px;
  color: var(--btn-color);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.diy-countdown--gradient {
  background: linear-gradient(90deg, var(--primary), var(--primary-dark), var(--primary));
  background-size: 200% auto;
  animation: fqCountdownShine 3s linear infinite;
}

.diy-countdown--solid { background: var(--btn-bg); }

.diy-countdown.is-expired { opacity: 0.82; filter: grayscale(0.5); }
.diy-countdown.is-expired .diy-countdown__clock { letter-spacing: 0; font-size: 14px; }

.diy-countdown__clock {
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.16);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
}

@keyframes fqCountdownShine {
  from { background-position: 0% center; }
  to   { background-position: 200% center; }
}

/* 加入流程：编号圆点 + 竖线 */
.diy-steps__list { list-style: none; margin: 0; padding: 4px 0 0; }

.diy-steps__item {
  position: relative;
  display: flex;
  gap: 12px;
  padding-bottom: 18px;
}

.diy-steps__item:last-child { padding-bottom: 0; }

.diy-steps__item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 13px;
  top: 28px;
  bottom: 0;
  width: 2px;
  background: var(--line);
}

.diy-steps__no {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--btn-bg);
  color: var(--btn-color);
  font-size: 13px;
  font-weight: 700;
}

.diy-steps__body { min-width: 0; padding-top: 2px; }
.diy-steps__title { font-size: 15px; font-weight: 600; color: var(--text); }
.diy-steps__desc { margin-top: 2px; font-size: 13px; color: var(--text-2); }

/* 套餐卡片：白底 + 圆角封面 + 轻阴影 */
.diy-pricecard {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.06);
}

.diy-pricecard__badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}

.diy-pricecard__cover {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.diy-pricecard__body { padding: 14px 16px 16px; }
.diy-pricecard__title { font-size: 16px; font-weight: 700; color: var(--text); }
.diy-pricecard__desc { margin-top: 6px; font-size: 13px; line-height: 1.6; color: var(--text-2); }
.diy-pricecard__price { margin: 12px 0; color: var(--primary); }
.diy-pricecard__price b { font-size: 26px; font-weight: 700; }
.diy-pricecard__price span { margin-left: 4px; font-size: 12px; color: var(--text-3); }

.diy-pricecard__btn {
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  text-decoration: none;
}

/* 尊重系统「减少动态效果」：扫光停，内容照常可读 */
@media (prefers-reduced-motion: reduce) {
  .diy-countdown--gradient { animation: none; }
}

/* ---------- P117：统一头像体系 + 人物组件精修（只借视觉配方，代码自研） ----------
 * 起因：WP 组件里每个「人」都有真实头像 + 昵称 + 副标签 + 赞数，
 * 我们三个组件原来一律是「昵称首字纯色圆」，整屏一个色、也没有头像质感。
 * 这里收口成一处：
 *   ① .diy-avatar 是所有人物区块共用的头像基类（方角、渐变、剪影兜底）；
 *   ② 旧的三条 *__avatar 规则已改成只定尺寸，外观一律由基类提供；
 *   ③ 6 组渐变只借 mk.less 按钮配色的色相区间，色值自研、纯 px、不引资源；
 *   ④ 品牌色仍走 :root 变量，P33 全局皮肤对新元素照样生效。
 */
.diy-avatar {
  flex: none;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 11px;
  background: linear-gradient(135deg, #cfe3ff, #7ea8ef);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  color: #fff;
  font-weight: 600;
  line-height: 1;
  user-select: none;
}

.diy-avatar > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 6 组柔和渐变：按昵称散列稳定选一个，同一昵称每次刷新颜色一致。
 * 收尾色刻意压深一档，白色剪影才不会糊在浅底上（P117 实拍微调）。 */
.diy-avatar--t0 { background: linear-gradient(135deg, #ffc9ad, #f0784f); }
.diy-avatar--t1 { background: linear-gradient(135deg, #b9d8ff, #5b8edb); }
.diy-avatar--t2 { background: linear-gradient(135deg, #ffdca3, #e89b3c); }
.diy-avatar--t3 { background: linear-gradient(135deg, #bfe8cf, #4fb184); }
.diy-avatar--t4 { background: linear-gradient(135deg, #e0c9ff, #9169d6); }
.diy-avatar--t5 { background: linear-gradient(135deg, #ffc6dc, #e26a9c); }

/*
 * 没上传头像时用「头 + 肩」剪影占位，不是字母圆。
 * 首字仍留在 DOM 里做兜底文本，视觉上让位给伪元素（不额外插标签）。
 */
.diy-avatar--ph { font-size: 0; }

/* 纯白 + 一层极淡投影，把人形从渐变底上托出来 */
.diy-avatar--ph::before,
.diy-avatar--ph::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14);
}

.diy-avatar--ph::before {
  top: 17%;
  width: 32%;
  height: 32%;
  border-radius: 50%;
}

.diy-avatar--ph::after {
  bottom: -14%;
  width: 66%;
  height: 48%;
  border-radius: 50% 50% 0 0;
}

/* 群成员墙：标题带人数 + 方角头像 + 末尾虚线加号位 */
.diy-members__count {
  margin-left: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-3);
}

.diy-member--plus { cursor: default; }

.diy-member__plus {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  box-sizing: border-box;
  border: 2px dashed #ccd2dc;
  border-radius: 12px;
  color: #a8b0bd;
  font-size: 26px;
  font-weight: 300;
  line-height: 1;
}

/* 群友评论精选：昵称 + 来源标签 + 右侧蓝色赞数 + 群主套娃回复 */
.diy-review { align-items: flex-start; }

.diy-review__body { flex: 1; min-width: 0; }

.diy-review__head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.diy-review__tag {
  font-size: 11px;
  color: var(--text-3);
}

.diy-review__likes {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  color: #4a7fd8;
  font-size: 13px;
}

.diy-review__likes b { font-weight: 600; }
.diy-thumb { flex: none; display: block; }

.diy-review__reply {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--bg);
}

.diy-avatar.diy-review__reply-avatar {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  box-shadow: none;
}

.diy-review__reply-tag {
  padding: 0 5px;
  border-radius: 4px;
  background: var(--card);
  color: var(--text-3);
  font-size: 11px;
  line-height: 20px;
}

.diy-review__reply-text {
  flex: 1 1 100%;
  font-size: 12px;
  line-height: 1.65;
  color: var(--text-2);
  word-break: break-word;
}

/* ================= R15 产品首页弹窗 ================= */

.popup-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 120;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
}

.popup-mask.show {
  display: flex;
}

.popup-card {
  position: relative;
  width: 100%;
  max-width: 360px;
  max-height: 72vh;
  background: var(--card);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.popup-scroll {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 22px 18px calc(18px + var(--safe-bottom));
}

.popup-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  z-index: 2;
}

.popup-close:active {
  background: var(--bg);
}

.popup-title {
  margin: 0 32px 10px 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
}

.popup-body {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-2);
  white-space: pre-wrap;
  word-break: break-word;
}

.popup-img {
  margin: 12px 0;
  text-align: center;
}

.popup-img img {
  max-width: 100%;
  max-height: 220px;
  border-radius: 10px;
  object-fit: contain;
}

.popup-link {
  margin-top: 14px;
  background: #0178ff;
  color: #fff;
}

.popup-link:active {
  background: #0066D6;
}

.popup-service {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.popup-service__title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.popup-service__txt {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
}

.popup-service__wechat {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
