/* ============================================================================
   ★★★ v2.923：hidden 属性必须真的能隐藏
   ----------------------------------------------------------------------------
   🔴 用户实测：「工具选择页面就出现了这个生成按钮」（附截图）。
   ★ 根因：HTML 的 hidden 属性靠【UA 样式表】里的 display:none 生效，
      而 UA 表的优先级【极低】—— 只要 CSS 里对同一元素写了显式 display 就盖掉它：
          .mm-actionbar { display: flex; }   ← 就是这一行
      ⇒ 加不加 hidden 都照样显示（工具选择页上那条「开始生成」就是这么冒出来的）。
   ⚠️ 全站凡是「用 hidden 控制显隐」的地方都受影响，不只是电商页：
      吸底操作条 / 会员徽章 / 团队积分行 / 补签区 / 自定义宽高输入框 …
      ⇒ 所以这条规则放在文件最前面，一次修全站。
   ⚠️ 为什么必须 !important：
       hidden 属性选择器和 .cls 的优先级相同（都是 0-1-0）——
       靠「谁在后面」定胜负太脆（以后加一条 #id .cls（0-1-1-0）就又坏了）。
       而这条规则的语义就是「隐藏就是隐藏」，没有例外场景 ⇒ !important 一劳永逸。
   ============================================================================ */
[hidden] { display: none !important; }

/* ============================================================================
   public/css/mobile.css —— ★★★ v2.905：【独立手机版】的样式（/m/*）
   ----------------------------------------------------------------------------
   🔴 用户决策（原话）：
        「你不要再PC的页面上做适配了，重新写手机版的界面吧。
          比如PC版的网址为：https://mj.hccst.top/
          手机版就是 https://mj.hccst.top/m
          手机访问电脑版设备识别后自动跳转到手机版，
          平板电脑设备可以不跳转，所有手机都跳转移动端。」

   ★ 为什么推倒重来（而不是继续修 PC 页面的自适应）：
      我在 v2.902~v2.904 连续三轮想在 PC 页面上"打补丁"适配手机，
      每轮都修好一处、又弄坏另一处：
        · 底栏被 iPhone 安全区裁掉一半（box-sizing 吃掉了高度）
        · 吸底操作条被祖先的 overflow 关住 ⇒ 按钮跟着内容滚走
        · 我给共用类名加全局 fixed ⇒ 压住了电商页的文本框
      ⇒ 根因是【PC 页面的布局前提就是为宽屏写的】：
          固定宽度列、内层滚动区、sticky 侧栏 —— 这些在手机上全是负担。
      ⇒ 独立手机版可以【从零按手机来写】：整页滚动、无内层滚动区、
          底栏用固定高度 + 安全区、操作条吸底。

   ⚠️⚠️ 本文件的纪律（很重要，不然又会变成"到处打补丁"）：
      ① 只服务 /m/* 页面 —— 绝不加载到 PC 页面上
         （PC 页面不引这个文件，所以不可能互相影响）
      ② 不写 @media 查询 —— 手机版【就是】手机，不需要断点
         （唯一例外：横屏/大屏手机给一个内容居中上限，见 .mmw）
      ③ 不用 !important —— 没有别的样式来跟它抢，
         !important 只会掩盖"选择器写错了"这类问题
      ④ 安全区一律用 env(safe-area-inset-*) 并且【加在尺寸之外】
         （v2.903 的教训：写进 height 里会把内容裁掉）

   ★ 依赖：只用 design-tokens.css 的 CSS 变量（颜色/圆角/阴影），
     不引 style.css —— 避免把 PC 的全局规则（body/table/.studio-* 等）
     带进来。需要的基础重置在下面自己写。
   ============================================================================ */

/* ---------- 复用项目的设计变量（没有就兜底） ---------- */
:root {
  --m-acc: #7c3aed;
  --m-acc-2: #a855f7;
  --m-ink: #111827;
  --m-ink-2: #6b7280;
  --m-ink-3: #9ca3af;
  --m-line: #e9ecf3;
  --m-bg: #f6f7fb;
  --m-card: #ffffff;
  --m-ok: #059669;
  --m-warn: #d97706;
  --m-err: #dc2626;
  /* 底栏总高（内容 56 + 安全区）—— 所有"给底栏留位"的地方都用它 */
  --m-tabbar: calc(56px + env(safe-area-inset-bottom, 0px));
  --m-radius: 14px;
  --m-pad: 14px;
}

/* ---------- 基础重置（只在本页生效） ---------- */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--m-bg);
  color: var(--m-ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  /* ★ 手机端一律整页滚动：不设 height/overflow，让它自然滚 */
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

/* ---------- 页面骨架：头 + 内容 + 底栏 ---------- */
.mm-head {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 var(--m-pad);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--m-line);
}
.mm-head .mm-title { font-weight: 800; font-size: 1.02rem; flex: 1 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mm-head .mm-icon-btn {
  flex: 0 0 auto; width: 38px; height: 38px; display: inline-flex;
  align-items: center; justify-content: center; border: 0; background: transparent;
  border-radius: 10px; font-size: 1.15rem;
}
.mm-head .mm-icon-btn:active { background: #f1f2f7; }

/* ★ 内容区：整页滚动，【没有】内层滚动容器 ——
   这正是 PC 页面在手机上的主要负担（内层滚动会让手指滑动"卡住"）。
   ⚠️ padding-bottom 必须 >= 底栏高度，否则最后一块内容被底栏永久压住。 */
.mm-body {
  padding: var(--m-pad);
  padding-bottom: calc(var(--m-tabbar) + 18px);
}
/* 有吸底操作条时（比如生成按钮）还要多留一条 */
.mm-body.has-actionbar { padding-bottom: calc(var(--m-tabbar) + 86px); }

/* 内容最宽限制：大屏手机/横屏时居中，不让它拉成一条 */
.mmw { max-width: 560px; margin: 0 auto; }

/* ---------- 卡片 ---------- */
.mm-card {
  background: var(--m-card);
  border: 1px solid var(--m-line);
  border-radius: var(--m-radius);
  padding: 14px;
  margin-bottom: 12px;
}
.mm-card-h { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.mm-card-h b { font-size: .96rem; font-weight: 800; }
.mm-card-h .mm-more { margin-left: auto; font-size: .78rem; color: var(--m-ink-3); }

.mm-sec-title {
  display: flex; align-items: center; gap: 8px;
  margin: 18px 0 10px; font-weight: 800; font-size: 1rem;
}
.mm-sec-title::before {
  content: ''; width: 4px; height: 16px; border-radius: 2px;
  background: linear-gradient(180deg, var(--m-acc), var(--m-acc-2));
}
.mm-sec-title .mm-more { margin-left: auto; font-size: .78rem; font-weight: 500; color: var(--m-ink-3); }

/* ---------- 网格（手机版一律 2 列，不用断点） ---------- */
.mm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mm-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

.mm-tile {
  background: var(--m-card); border: 1px solid var(--m-line);
  border-radius: 12px; padding: 11px 10px;
  display: flex; align-items: center; gap: 9px; min-height: 62px;
  text-align: left;
}
.mm-tile:active { background: #fafaff; border-color: #ddd6fe; }
/* ★★★ v2.997：`.mm-tile.is-on` —— **这条规则以前根本不存在**，
   于是"选中态"在视觉上是【没有的】。补上它是这一版最重要的一行。
   ----------------------------------------------------------------------------
   🔴 用户实测（截图）：「来客商品套图还是选不了模型」。
   ★ 真因（查了很久，因为【代码两边都是对的】）：
      · `bindMdls()` 的点击处理是对的 —— 点了确实给那张卡加了 `is-on` 类
      · `paintForm()` 也确实是 `i === 0 ? ' is-on' : ''`（第一个默认选中）
      · 提交时还会【从控件重读一次】`.is-on` 再发出去（v2.923 的兜底）
     ⚠️⚠️ **但整个 mobile.css 里没有 `.mm-tile.is-on` 这条规则**（搜过：0 处）。
        ⇒ 类名加了、**框看起来一模一样** ⇒ 用户看到的就是"点了没反应"。
   ★ 这个 bug 特别难发现的原因（值得记）：
     我验证的是 **`classList` 变了**（DOM 探针通过），
     而用户看的是 **那个框变没变**。**"状态变了"和"看得出来变了"是两件事。**
     （同一个坑这个项目里还有一处：v2.9x 修过 `.mm-btn-chip.is-on` 缺失，
       见下面 L218 那段注释 —— 那次是发消息气泡，这次是模型卡。
       ⇒ **`.is-on` 的样式缺失是这一类"点了没反应"的通用成因**，
         所以下面把用到的几个都补齐，并按同一套配色。）
   ⚠️ 配色和 `.mm-seg-b.is-on` / `.mm-ratio.is-on` / `.mm-btn-chip.is-on` 保持一致
      （紫底白字 / 紫边浅紫底），**不要在这里发明新颜色** ——
      同一个 App 里"选中"应该只有一个样子。 */
.mm-tile.is-on {
  border-color: #7c3aed; background: #f5f3ff;
}
.mm-tile.is-on .mm-tile-tx b { color: #6d28d9; }
.mm-tile.is-on .mm-tile-tx span { color: #7c3aed; }
.mm-tile.is-on .mm-tile-ico { background: #ede9fe; }
/* ⚠️ 选中态必须盖过 `:active`（手指按住时 `:active` 会改底色，
   顺序放在它后面 + 同优先级即可；用 :active 与 .is-on 同时命中时的表现验证过）。 */
.mm-tile.is-on:active { background: #ede9fe; border-color: #6d28d9; }
.mm-tile .mm-tile-ico { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #f5f3ff; font-size: 1rem; }
.mm-tile .mm-tile-tx { min-width: 0; }
.mm-tile .mm-tile-tx b { display: block; font-size: .82rem; font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mm-tile .mm-tile-tx span { display: block; font-size: .68rem; color: var(--m-ink-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 大卡片（带图/带图标的大入口） */
.mm-big {
  border-radius: var(--m-radius); overflow: hidden;
  border: 1px solid var(--m-line); background: var(--m-card);
}
.mm-big .mm-big-img { height: 96px; display: flex; align-items: center;
  justify-content: center; font-size: 2.4rem; }
.mm-big .mm-big-tx { padding: 9px 11px 11px; }
.mm-big .mm-big-tx b { display: block; font-size: .9rem; font-weight: 800; }
.mm-big .mm-big-tx span { display: block; font-size: .72rem; color: var(--m-ink-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 按钮 ---------- */
.mm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px;                      /* ★ 手指能点中的最小高度 */
  padding: 0 16px; border-radius: 11px; border: 1px solid var(--m-line);
  background: #fff; font-size: .9rem; font-weight: 700; cursor: pointer;
}
.mm-btn:active { opacity: .85; }
.mm-btn-primary {
  border: 0; color: #fff;
  background: linear-gradient(135deg, var(--m-acc), var(--m-acc-2));
  box-shadow: 0 6px 16px rgba(124, 58, 237, .28);
}
.mm-btn-ghost { background: #fff; color: var(--m-ink-2); }
.mm-btn-block { display: flex; width: 100%; }
.mm-btn[disabled] { opacity: .5; }

/* ---------- 紧凑按钮（比例/分类这种"一排好几个"的） ----------
   ★★★ v2.911：修一个我在用户截图上看到的排版问题
   ----------------------------------------------------------------------------
   🔴 现象：图片创作页的「画面比例」按钮文字【竖着折行】了 ——
        显示成 "1:1 方" 换行 "形"，很难看。
   ★ 根因：四列网格里每个按钮只有约 78px 宽，
      而按钮有 `padding: 0 16px`（左右各 16px = 32px）⇒ 只剩 46px 放字
      ⇒ "1:1 方形" 放不下就折行；中文没空格，只能一个字一个字折
      ⇒ 竖排效果。
   ⚠️ 这类"文字被容器挤到折行"在手机上很常见，判据是：
      文字长度 × 字号 > 可用宽度 - 左右内边距。
      ⇒ 紧凑按钮必须【收窄内边距 + 禁止折行 + 允许省略】。 */
/* ============================================================================
   ★★★ v2.934：胶囊按钮的【选中态】
   ----------------------------------------------------------------------------
   🔴 用户实测：「下面风格按钮点不动」。
   ★ 真因：绑定其实是好的（点击确实加了 is-on 类），
      但【整个 mobile.css 里没有 .mm-btn-chip.is-on 这条规则】
      ⇒ 点亮后没有任何视觉变化 ⇒ 用户以为是"点不动"。
   ⚠️ 全项目有 19 处在给胶囊加 is-on（首页 / 电商 / 图片创作 / 文案 / 音乐 /
      视频 / 配音 / 图片编辑），全都没有视觉反馈 —— 这是普遍性问题。
   ⚠️ 配色和 .mm-seg-b.is-on / .mm-ratio.is-on 保持一致（紫底白字），
      这样"选中"在整站是同一个视觉语言。 */
.mm-btn-chip.is-on {
  background: var(--m-acc);
  border-color: var(--m-acc);
  color: #fff;
  font-weight: 700;
}
.mm-btn-chip.is-on:active { opacity: .85; }

.mm-btn-chip {
  padding: 0 6px;
  min-width: 0;
  font-size: .78rem;
  white-space: nowrap;      /* 不折行 */
  overflow: hidden;
  text-overflow: ellipsis;  /* 实在放不下就省略号，而不是折成两行 */
}
/* 一排 4 个（比例） */
.mm-chips-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
/* 一排 3 个（分类/张数等） */
.mm-chips-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
/* 一排 2 个 */
.mm-chips-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

/* ---------- 表单 ---------- */
.mm-field {
  width: 100%; min-height: 44px; padding: 10px 12px;
  border: 1px solid var(--m-line); border-radius: 11px; background: #fff;
  /* ★ 16px：小于 16px 时 iOS 会在聚焦时自动放大页面（然后不会缩回去） */
  font-size: 16px;
}
textarea.mm-field { min-height: 96px; line-height: 1.6; resize: vertical; }
.mm-label { display: block; font-size: .8rem; font-weight: 700; color: var(--m-ink-2);
  margin: 12px 0 6px; }
.mm-note { font-size: .74rem; color: var(--m-ink-3); margin: 6px 0 0; }

/* ---------- 吸底操作条 ----------
   ⚠️⚠️ 这里是 PC 页面反复出问题的地方，手机版用【确定的做法】：
       · position: fixed（相对视口）—— 前提是【祖先没有任何 overflow】
         （.mm-body 故意不设 overflow，就是为了这个）
       · bottom 用底栏高度变量 ⇒ 永远在底栏上面
       · 高度写死 56px 但【padding 不掺进高度】—— 不写 box-sizing 的坑
         （v2.903 的教训：安全区不能写进 height 里） */
.mm-actionbar {
  position: fixed;
  left: 0; right: 0;
  bottom: var(--m-tabbar);
  z-index: 25;
  display: flex; gap: 10px; align-items: center;
  padding: 10px var(--m-pad);
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--m-line);
  box-shadow: 0 -4px 18px rgba(31, 38, 135, .08);
}
.mm-actionbar .mm-btn { flex: 0 0 auto; }
.mm-actionbar .mm-btn-primary { flex: 1 1 auto; }

/* ============================================================================
   ★ v3.19.1：SVG 图标基础样式（手机页只加载 mobile.css，之前漏了这条）
   ----------------------------------------------------------------------------
   🔴 用户：「底部按钮黑色太难看了」—— 根因是 SVG 没有 fill:none，
     浏览器按默认填黑 ⇒ 图标变成一坨黑块。
   ⚠️ 以后凡是在 style.css 里加的「通用原子样式」，手机页要用的必须同步到这里。
   ============================================================================ */
.ic {
  width: 1em; height: 1em; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  vertical-align: -0.14em; flex: 0 0 auto;
}

/* ---------- 底栏 ----------
   ★ 高度 = 内容 56px + 安全区（加在外侧，不掺进去）
      = v2.902~v2.904 反复踩的那个坑，这里一次写对。 */
.mm-tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 30;
  display: flex;
  height: auto;
  min-height: 56px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--m-line);
}
.mm-tab {
  flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; padding: 5px 2px 5px;
  color: var(--m-ink-3); font-size: .66rem; font-weight: 600;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
/* ★★★ v2.918：底栏按参考图改（用户要求「底部按钮样式」+ 两张参考图）
   ----------------------------------------------------------------------------
   ★ 参考图（MXAI / MJ）的做法：图标外面套一个【圆角块】，选中时
       · 图标变成紫底白字
       · 文字变紫色加粗
     这样「我在哪一页」一眼可辨 —— 比只把文字变色清楚得多。
   ⚠️ 为什么是【图标有底色】而不是【整格有底色】：
      整格加淡紫底会让 5 个格子连成一整条紫边，反而分不清选中哪个
      （我一开始想的就是整格底色，看了参考图才改对）。
   ⚠️ 图标块固定 30x24：5 个格子每格约 74px，再大就会挤到文字。
   ⚠️ 不给 .mm-tab 设 height：底栏靠 min-height + padding-bottom 处理安全区，
      这里设死高度会把 iPhone 底部小横条区域挤掉（v2.903 踩过的坑）。 */
/* ★★★ v3.19.1：底栏图标与选中态重画
   🔴 用户：「黑色太难看了，选中的时候只看到一坨坨」
   ★ 改法：
     · 图标用 SVG 描边（手机页现在也有 .ic 基础样式了，不再是黑块）
     · 选中态从「紫底白图」改成「**淡紫胶囊 + 紫图标**」——
       白图在紫底上本来就糊，改浅底之后线条清清楚楚
     · 图标盒 28×26、圆角 10px；未选中透明、选中淡紫 */
.mm-tab i {
  font-size: 1.1rem; line-height: 1; font-style: normal;
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 26px; border-radius: 10px;
  color: var(--m-ink-3);
  transition: background .16s ease, color .16s ease;
}
.mm-tab .ic, .mm-tab .ic-tab { width: 21px; height: 21px; stroke-width: 1.85; }
.mm-tab.is-on { color: var(--m-acc); font-weight: 800; }
.mm-tab.is-on i {
  background: #f1ebff;          /* 淡紫胶囊 */
  color: var(--m-acc);          /* 图标用主色，线条清晰 */
}
.mm-tab.is-on .ic { stroke-width: 2.1; }

/* ---------- 加载 / 空态 ---------- */
.mm-loading, .mm-empty {
  padding: 40px 16px; text-align: center; color: var(--m-ink-3); font-size: .86rem;
}
.mm-spin {
  width: 22px; height: 22px; margin: 0 auto 10px;
  border: 2px solid #e5e7eb; border-top-color: var(--m-acc);
  border-radius: 50%; animation: mm-spin .8s linear infinite;
}
@keyframes mm-spin { to { transform: rotate(360deg); } }

/* ---------- 提示条 ---------- */
.mm-toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--m-tabbar) + 14px); z-index: 60;
  max-width: calc(100vw - 32px);
  padding: 9px 14px; border-radius: 10px;
  background: rgba(17, 24, 39, .92); color: #fff; font-size: .82rem;
  opacity: 0; transition: opacity .2s; pointer-events: none;
}
.mm-toast.is-on { opacity: 1; }
.mm-toast.is-err { background: rgba(220, 38, 38, .94); }
.mm-toast.is-ok { background: rgba(5, 150, 105, .94); }

/* ---------- 抽屉（左侧导航） ---------- */
.mm-drawer-mask {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(17, 24, 39, .45);
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.mm-drawer-mask.is-on { opacity: 1; pointer-events: auto; }
.mm-drawer {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 51;
  /* ★★★ v2.943：抽屉变窄（用户："菜单栏太宽了，没必要这么宽"）
     ----------------------------------------------------------------------------
     🔴 原来是 width:78vw / max-width:300px —— 在 390px 宽的手机上占 304px，
        几乎整屏，看起来像"换了一页"而不是"拉出菜单"。
     ★ 参考 MXAI：侧边菜单只占约 2/3 屏，右边留出明显的背景，
        用户一眼就知道"这是能从左边收回去的"。
     ⚠️ 用 min(66vw, 340px) 而不是写死：
          · 大屏手机（430px）：66vw ≈ 284px，够放"电商专区"这种 4 字菜单
          · 小屏手机（320px）：66vw ≈ 211px，也够放
          · max 340px 兜住平板横屏，避免抽屉宽得离谱
     ⚠️ 不能再窄：菜单里有"包装展开图""开业物料套餐"这类 5-6 字的项，
        太窄会折行（折行比宽一点更难用）。 */
  width: min(66vw, 340px);
  background: #fff; border-right: 1px solid var(--m-line);
  transform: translateX(-102%); transition: transform .22s ease;
  overflow-y: auto;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.mm-drawer.is-on { transform: none; }
.mm-drawer-h { padding: 16px 16px 12px; border-bottom: 1px solid var(--m-line); }
.mm-drawer-h b { font-size: .98rem; font-weight: 800; }
.mm-drawer-h span { display: block; font-size: .74rem; color: var(--m-ink-3); margin-top: 2px; }
.mm-drawer-g { padding: 8px 8px 0; }
.mm-drawer-g .mm-gt { font-size: .7rem; color: var(--m-ink-3); padding: 8px 8px 4px; }
.mm-drawer-i {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 10px; border-radius: 10px; font-size: .88rem;
}
.mm-drawer-i:active { background: #f5f6fa; }
.mm-drawer-i.is-on { background: #f5f3ff; color: var(--m-acc); font-weight: 700; }

/* ---------- 标签胶囊（身份 / 靓号 / 会员特权） ---------- */
.mm-tag {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 1px 7px; border-radius: 7px;
  font-size: .68rem; font-weight: 700; line-height: 1.5;
  background: #f5f3ff; color: #7c3aed; border: 1px solid #ede9fe;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* ★ v2.923：会员「剩余免费次数」胶囊（用户要求：别和模型名一个颜色）
   ----------------------------------------------------------------------------
   🔴 用户实测（附截图）：「可免费用次数的字体颜色不要和模型颜色一样」。
   ★ 原来那块和模型名用的是同一个 .mm-tag（紫底紫字）——
      两种性质完全不同的信息长得一样 ⇒ 用户分不清哪行是模型、哪行是次数。
   ★ 改：剩余次数用绿色。绿色本身就在说"你还有额度"；
      用完自动变灰 —— 颜色即状态，不用再加一句文字说明。
   ⚠️ 不用红色：红色在"额度"语境下等于"出错了"，而"用完了"是正常状态。 */
.mm-tag.is-quota { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.mm-tag.is-quota.is-out { background: #f3f4f6; color: #9ca3af; border-color: #e5e7eb; }

.mm-tag.is-dim { background: #f3f4f6; color: #6b7280; border-color: #e5e7eb; }

/* ★★★ v2.963：「火爆 / 最常用」徽章（用户要求把两个套图工具做显眼）
   ----------------------------------------------------------------------------
   🔴 用户原话：「工具页面把 AI 商品套图和来客商品套图，做的显眼一点，
      加个火爆的标签，或者后台加个控制能弄个常用工具的分组。」
   ★ 配色理由（为什么用橙红而不是品牌紫）：
      全站的「选中/主操作」是品牌紫（#7c3aed）——
      如果用紫，徽章会和"已选中"混在一起，用户分不清"这是热门"还是"这是当前选中"。
      橙红在整站只出现在这一处 ⇒ 一眼就是"这是标记，不是状态"。
   ⚠️ 和 .mm-tag 的其它变体（is-quota 绿 / is-dim 灰）同一套尺寸，
      不另造一种徽章形状 —— 全站徽章大小一致才不显乱。
   ⚠️ 不用纯红（#ef4444 那种）：红色在中文语境里容易被读成"警告/错误"。 */
.mm-tag.is-hot {
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  color: #c2410c;
  border-color: #fdba74;
  font-weight: 800;
}

/* ============================================================================
   ★★★ v2.912：会员视觉（用户反馈「会员标识不够完善」）
   ----------------------------------------------------------------------------
   ★ 对齐 PC 版的做法（见 me-center.js 的注释）：
       PC 是"五层标识"，手机版收敛成【三处】但一个不少：
         ① 头像金环          ② 昵称金色渐变          ③ 卡片右上角到期胶囊
       （另外两处 —— 斜纹丝带和会员特权区块 —— 手机版用胶囊代替丝带、
         特权单独一行，因为手机屏幕窄，丝带会挡住昵称。）
   ⚠️⚠️ 两条纪律（PC 注释里专门写过，照做）：
      ① 等级配色【不在 JS 里拼颜色】—— 只写 data-lv="pro" 这种 key，
         颜色在本文件里按 key 映射 ⇒ 以后改配色只改 CSS。
      ② 普通用户必须【完全回到原样】：不亮金环、不显示徽章。
         所以下面所有样式都以 .mm-vip-on / data-lv 为前提，
         没有那个类时一条都不生效。
   ============================================================================ */
/* ① 头像金环（会员） */
.mm-vip-ava {
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px #f59e0b, 0 0 14px rgba(245, 158, 11, .5);
}
/* ② 昵称金色渐变（会员） */
.mm-vip-name {
  background: linear-gradient(90deg, #b45309, #f59e0b, #b45309);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #b45309;              /* 不支持 background-clip 时的兜底色 */
  font-weight: 800;
}
/* ③ 卡片描边（会员），颜色按等级 key 映射 —— JS 不拼颜色 */
.mm-vipcard.mm-vip-on { border-color: #fcd34d; }
.mm-vipcard[data-lv="basic"]       { border-color: #cbd5e1; }
.mm-vipcard[data-lv="intermediate"]{ border-color: #93c5fd; }
.mm-vipcard[data-lv="pro"]         { border-color: #a78bfa; }
.mm-vipcard[data-lv="divine"]      { border-color: #f0abfc; }
.mm-vipcard[data-lv="ultimate"]    { border-color: #fcd34d; }
/* 会员卡片的极浅底纹（只会员有，普通用户无） */
.mm-vipcard.mm-vip-on {
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 60%);
}

/* ---------- 抽屉 / 列表项（个人中心的功能入口复用） ---------- */
.mm-drawer-i > span:first-child { flex: 0 0 auto; }
.mm-drawer-i > span:nth-child(2) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 空态 / 加载态里的小链接 ---------- */
.mm-empty .mm-btn { min-height: 40px; }
/* ============================================================================
   ★★★ v2.917：画面比例的【形状卡片】（用户要求"做成 MJ 这样"）
   ----------------------------------------------------------------------------
   🔴 用户原话（附 MJ 截图）：「画面比例没有形状，要做成 MJ 这样」
   ★ 每格结构：
        .mm-ratio            —— 可点的一格（按钮）
          .mm-ratio-art      —— 形状的画布（固定尺寸，居中）
            <i>              —— 真正按比例缩放的形状（宽高由 JS 算成百分比）
          .mm-ratio-tx       —— 比例值文字（1:1 / 9:16 …）
   ⚠️⚠️ 为什么形状要"画布固定 + 形状按百分比缩放"：
       如果直接给形状设死像素，12 个格子的形状会高低不齐、格子也对不齐。
       用固定画布 + 百分比 ⇒ 格子整齐，而每个形状的比例仍然准确。
       （这是本页最容易做错的一点：形状不按真实比例画，用户按形状选就会选错。）
   ⚠️ 4 列：手机上每格约 78px，够放下 34px 的形状和 4 个字符的比例值。
      5 列就只剩 60px，形状要缩到 26px，比例差异就看不清了（那就失去意义）。
   ⚠️ 选中态必须【明显】（紫描边 + 淡紫底 + 形状变紫）：
      手机上没有 hover，选中态是用户唯一能确认"我选了这个"的反馈。
   ============================================================================ */
.mm-ratio-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.mm-ratio {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 62px;                 /* >= 44px 的可点面积（手指友好） */
  padding: 7px 4px;
  border: 1px solid #e9ecf3;
  border-radius: 11px;
  background: #fff;
  color: #374151;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.mm-ratio:active { background: #f9fafb; }
/* 形状画布：固定 34x30，里面的 i 按百分比缩放并居中 */
.mm-ratio-art {
  width: 34px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.mm-ratio-art > i {
  display: block;
  background: #9aa3b2;
  border-radius: 3px;
  max-width: 100%;
  max-height: 100%;
}
.mm-ratio-tx { font-size: .7rem; line-height: 1; white-space: nowrap; }
/* 选中态 */
.mm-ratio.is-on {
  border-color: #7c3aed;
  background: #f5f3ff;
  color: #5b21b6;
  font-weight: 800;
  box-shadow: 0 0 0 1px #7c3aed inset;
}
.mm-ratio.is-on .mm-ratio-art > i { background: #7c3aed; }

/* ============================================================================
   ★★★ v2.918：首页「工具铺满」+ 分组胶囊（用户要求）
   ----------------------------------------------------------------------------
   🔴 用户原话：「首页可以把工具铺满」（附 MXAI / MJ 参考图）。
      参考图里一屏能看到十来个工具格 —— 我原来只有 4 个大卡，太浪费屏幕。
   ★ 网格：两列（一行两个）。54 个工具两列 = 27 行，比一列短一半。
     ⚠️ 为什么不用 3 列：手机宽 390px，3 列每格约 118px，
        图标 + 4 个字 + 说明就挤不下（会折行或截断），两列每格 180px 刚好。
   ⚠️ 工具格高度【不固定】：说明字数不一样，固定高度会截断或留白。
      用 min-height 保证最小可点面积（>= 64px）。
   ============================================================================ */
.mm-tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.mm-tool {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 74px;
  padding: 11px 12px;
  border: 1px solid #eef0f5;
  border-radius: 14px;
  background: #fff;
  color: #111827;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.mm-tool:active { background: #fafafe; }
.mm-tool-i {
  font-size: 1.25rem;
  line-height: 1;
  margin-bottom: 3px;
}
.mm-tool b { font-size: .84rem; font-weight: 800; line-height: 1.2; }
.mm-tool-d {
  font-size: .68rem;
  color: #9ca3af;
  line-height: 1.3;
  /* 说明最多两行，超出省略 —— 不然格子会长短不一很难看 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* 「内测」角标：未上线的工具必须自己说明，否则用户点进去看到
   "建设中"会以为产品坏了 */
.mm-tool-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: .6rem;
  font-weight: 700;
  line-height: 1;
  padding: 3px 5px;
  border-radius: 6px;
  background: #f3f4f6;
  color: #9ca3af;
}

/* ---------- 分组胶囊（横滑单选） ---------- */
.mm-seg {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
}
.mm-seg-b {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid #e9ecf3;
  border-radius: 17px;
  background: #fff;
  color: #6b7280;
  font: inherit;
  font-size: .78rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.mm-seg-b.is-on {
  border-color: #7c3aed;
  background: #7c3aed;
  color: #fff;
  font-weight: 800;
}

/* ============================================================================
   ★★★ v2.919：物料/规格选择格（广告物料页用）
   ----------------------------------------------------------------------------
   ★ 为什么单独一套（不复用 .mm-tool）：
       .mm-tool 是"跳转到另一个页面"的入口（<a href>），
       而 .mm-pick 是"在当前页做选择"的按钮（<button>）。
       两者视觉可以像，但语义不同 —— 复用会让"点了会不会跳走"变得不可预期。
   ⚠️ 选中态必须【一眼可辨】（紫描边 + 淡紫底 + 加粗）：
      手机上没有 hover，「我选了哪个」全靠这个反馈。
   ⚠️ 三列：物料名多是 2-4 个中文字（海报 / 易拉宝 / 门头），
      三列每格约 112px 够用；两列会让 55 个物料滚很久。
      规格那边也是三列 —— 两个网格对齐看起来更整齐。
   ============================================================================ */
.mm-pick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.mm-pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 58px;
  padding: 8px 6px;
  border: 1px solid #e9ecf3;
  border-radius: 11px;
  background: #fff;
  color: #374151;
  font: inherit;
  font-size: .76rem;
  text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.mm-pick:active { background: #f9fafb; }
.mm-pick-i { font-size: 1.15rem; line-height: 1; }
.mm-pick b { font-weight: 700; font-size: .76rem; line-height: 1.25; }
.mm-pick-d { font-size: .64rem; color: #9ca3af; line-height: 1.2; }
.mm-pick.is-on {
  border-color: #7c3aed;
  background: #f5f3ff;
  color: #5b21b6;
  box-shadow: 0 0 0 1px #7c3aed inset;
}
.mm-pick.is-on b { font-weight: 800; }
.mm-pick.is-on .mm-pick-d { color: #7c3aed; }

/* ============================================================================
   ★★★ v2.919：签到页的「未来 7 天」+「最近 30 天日历」
   ----------------------------------------------------------------------------
   ★ 7 格：手机上 7 列每格约 46px —— 刚好放下「第7天 / 📅 / +12 / 周三」四行小字。
     ⚠️ 不要再塞内容，46px 是极限（我算过 390px 屏：390-2*10(页边) - 2*11(卡内边)
        = 348，除以 7 = 49.7，减去 3px 间隙约 46）。
   ★ 30 天日历：7 列 × 5 行（不按真实星期对齐 —— 后端只给滚动 30 天，
     没有"这个月从周几开始"的信息，硬对齐要前端算月份，容易出错且没必要）。
     ⚠️ 用 day 的数字显示，不用星期几 —— 用户看"哪几天没签"更直观。
   ⚠️ 补签的格子要能区分（里面显示"补"而不是"✓"）——
     用户得看出"这天是补的"，否则会以为系统帮他自动签了。
   ============================================================================ */
.mm-ck7 {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}
.mm-ck7-c {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 7px 2px;
  border: 1px solid #eef0f5;
  border-radius: 9px;
  background: #fff;
}
.mm-ck7-c.is-today { border-color: #7c3aed; background: #f5f3ff; }
.mm-ck7-c.is-ms { border-color: #fcd34d; background: #fffbeb; }
.mm-ck7-d { font-size: .58rem; color: #9ca3af; line-height: 1.1; }
.mm-ck7-i { font-size: .92rem; line-height: 1.1; }
.mm-ck7-p { font-size: .62rem; font-weight: 800; color: #7c3aed; line-height: 1.1; }
.mm-ck7-w { font-size: .56rem; color: #c3cad8; line-height: 1.1; }

.mm-cal {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 5px;
}
.mm-cal-c {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border: 1px solid #eef0f5;
  border-radius: 8px;
  background: #fff;
  font-size: .7rem;
  color: #9ca3af;
}
.mm-cal-c.is-on {
  border-color: #7c3aed;
  background: #f5f3ff;
  color: #5b21b6;
  font-weight: 800;
}
.mm-cal-c.is-today { box-shadow: 0 0 0 2px #c4b5fd inset; }
/* 已签的小勾/「补」角标 */
.mm-cal-c > i {
  position: absolute;
  right: 1px;
  bottom: 0;
  font-size: .5rem;
  font-style: normal;
  line-height: 1;
  color: #7c3aed;
}

/* ============================================================================
   ★★★ v2.919：滑块（视频时长用）
   ----------------------------------------------------------------------------
   ⚠️ 为什么不直接用浏览器默认的 input[type=range]：
       手机上默认滑块轨道只有 2~3px、圆点很小，
       手指拖起来很难精准停在想要的秒数上
       （而视频【按秒计费】，停错一秒就是钱）。
   ★ 做法：把轨道加粗到 8px、圆点做到 24px —— 这是 iOS 上比较通用的手感值。
   ⚠️ 必须同时写 -webkit- 和 -moz- 两套伪元素：
      只写一套在部分机型上会完全没样式（回退成默认细线）。
   ============================================================================ */
.mm-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: #eef0f5;
  outline: none;
}
.mm-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: #7c3aed;
  border: 3px solid #fff;
  box-shadow: 0 1px 5px rgba(124, 58, 237, .45);
  cursor: pointer;
}
.mm-range::-moz-range-thumb {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #7c3aed;
  border: 3px solid #fff;
  cursor: pointer;
}

/* ---------- 作品卡片（列表用） ---------- */
/* ============================================================================
   ★★★ v2.926：作品列表【两列网格】（用户要求：每行两列显示缩略图）
   ----------------------------------------------------------------------------
   ★ 形态：两列，每格 = 方形缩略图 + 一行提示词 + 时间 + 两个小按钮。
   ⚠️ 缩略图统一 1:1 裁切（object-fit: cover）——
      作品比例五花八门（1:1 / 9:16 / 21:9），原比例会让两列高度参差不齐，
      网格看起来像坏了。缩略图只是预览，点开能看全图 ⇒ 裁切不丢信息。
   ⚠️ 按钮最小高度从 38 降到 34：每格只有半屏宽，两个按钮各占一半，
      38px 会把按钮文字挤到折行；34px 仍然 >= 手指可点面积的下限（约 32px）。
   ⚠️ 音频没有画面 ⇒ 用音符占位，不能让它拉出一个空白方块。
   ============================================================================ */
.mm-work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
/* ⚠️ 网格里的卡片不要再 margin-bottom（那是单列时的做法，会破坏 gap 的均匀） */
.mm-work-grid .mm-work { margin-bottom: 0; }

/* 缩略图区：1:1 方形 */
.mm-work-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f3f4f8;
  overflow: hidden;
}
/* ⚠️ aspect-ratio 在个别老浏览器不支持 ⇒ 加一条 padding-top 兜底不划算，
   直接给 img 撑高也能保持方形（见下面 img 的 height:100%）。 */
.mm-work-thumb img,
.mm-work-thumb video {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
/* 音频/无图占位 */
.mm-work-audio {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; font-size: 1.8rem; color: #c3cad8;
}
/* 视频播放角标 */
.mm-work-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(17, 24, 39, .6); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; padding-left: 2px;
}
/* 类型角标（图片/视频/音频） */
.mm-work-kind {
  position: absolute; left: 6px; top: 6px;
  font-size: .58rem; font-weight: 700; line-height: 1;
  padding: 3px 5px; border-radius: 6px;
  background: rgba(255, 255, 255, .92); color: #7c3aed;
}
/* 网格里的文字更紧凑 */
.mm-work-grid .mm-work-tx { padding: 7px 9px 3px; font-size: .72rem; -webkit-line-clamp: 2; }
.mm-work-grid .mm-work-h { padding: 0 9px 6px; font-size: .64rem; }
.mm-work-grid .mm-work-a { padding: 0 9px 9px; gap: 6px; }
.mm-work-grid .mm-work-a .mm-btn { min-height: 34px; font-size: .72rem; }

.mm-work {
  background: var(--m-card); border: 1px solid var(--m-line);
  border-radius: var(--m-radius); overflow: hidden; margin-bottom: 12px;
}
.mm-work-h { display: flex; align-items: center; gap: 6px; padding: 10px 12px 8px;
  font-size: .74rem; color: var(--m-ink-3); flex-wrap: wrap; }
.mm-work-h b { color: var(--m-ink); font-size: .78rem; }
.mm-work-img { width: 100%; background: #f3f4f8; }
.mm-work-img img { width: 100%; height: auto; }
.mm-work-tx { padding: 9px 12px; font-size: .78rem; color: var(--m-ink-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mm-work-a { display: flex; gap: 8px; padding: 0 12px 12px; }
.mm-work-a .mm-btn { flex: 1 1 0; min-height: 38px; font-size: .8rem; }

/* ============================================================================
   ★★★ v2.934：热门模板卡（照 PC 首页 .tpl-card 的形态）
   ----------------------------------------------------------------------------
   ★ 为什么用【渐变方块 + 大 emoji】而不是真实模板图：
      · PC 就是这么做的（.tpl-thumb 是 background:linear-gradient + emoji）
      · 24 张模板图会让首屏多 24 个请求（手机上很贵）
      · 渐变本身就是"分类色"：粉=服装、橙=水果、绿=生鲜 ⇒ 一眼能找
   ⚠️ 3 列：模板名最长 5 个汉字（"朋友圈九宫格"），3 列在 375px 宽下
      每格 ~104px，刚好放得下；4 列会挤到换行。
   ============================================================================ */
.mm-tpl-grid {
  /* v2.958: 4 columns (user asked for 4 per row, 8 templates = 2 rows).
     Was 3 columns, which left the 8th template alone on a third row.
     gap 8px keeps a similar outer rhythm to the 3-column version. */
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.mm-tpl {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}
.mm-tpl:active { transform: scale(.96); }
.mm-tpl-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  box-shadow: 0 2px 8px rgba(17, 24, 39, .10);
}
.mm-tpl-name {
  font-size: .7rem;
  color: var(--m-ink, #111827);
  line-height: 1.3;
  text-align: center;
  /* ⚠️ 最多两行 —— "朋友圈九宫格"这种长的不能撑破格子 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================================
   ★★★ v2.934：最近作品 —— 3 列瀑布流（用户："最下面的最近作品做成3列的瀑布流"）
   ----------------------------------------------------------------------------
   ⚠️ 用 CSS 多列（column-count）而不是 grid：
      grid 的每行高度由最高的那一格决定 ⇒ 竖图和横图并排会留大片空白，
      而"瀑布流"的意义正是【让不同高度的图紧贴】。
      ⚠️ 这和 mobile-works 页的 .mm-work-grid 是两套：
         作品页是等高方格（有操作按钮，需要整齐）；
         首页只展示，所以用真瀑布流。
   ⚠️ break-inside:avoid 必须加 —— 不加的话一张图会被【从中间切到两列】。
   ============================================================================ */
.mm-falls {
  column-count: 3;
  column-gap: 8px;
}
.mm-fall-i {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  display: block;
  margin-bottom: 8px;
  border-radius: 11px;
  overflow: hidden;
  position: relative;
  background: #f3f4f6;
  border: 1px solid var(--m-line, #e9ecf3);
}
.mm-fall-i img {
  width: 100%;
  display: block;
  /* ⚠️ 不设固定高度 —— 让图片按自己的比例撑开，这才是瀑布流 */
}
.mm-fall-kind {
  position: absolute;
  left: 4px;
  top: 4px;
  font-size: .58rem;
  line-height: 1.4;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(17, 24, 39, .55);
  color: #fff;
  backdrop-filter: blur(3px);
}

/* ============================================================================
   ★★★ v2.935：素材库 / 模板库 / 人像库 弹窗
   ----------------------------------------------------------------------------
   ⚠️ 弹窗从【底部滑上来】—— 手机上"从下面出来"是标准手势语言；
      从中间弹出会像 PC 的模态框，在手机上很别扭。
   ⚠️ 最高 82vh + 内部滚动：素材可能几十个，占满整屏会让用户
      看不到底部的操作，容易迷路。
   ⚠️ 底部留 env(safe-area-inset-bottom)：不然 iPhone 的横条会盖住最后一行。
   ⚠️ 显隐用 .is-on 一个类控制（opacity + transform），
      不要同时写内联 display —— 两者会互相覆盖，弹窗关不掉。
   ============================================================================ */
.mm-lib {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(17, 24, 39, .5);
  display: flex;
  align-items: flex-end;
  opacity: 0;
  transition: opacity .2s;
}
.mm-lib.is-on { opacity: 1; }
.mm-lib-in {
  width: 100%;
  max-height: 82vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  border-radius: 18px 18px 0 0;
  padding: 14px 14px calc(14px + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%);
  transition: transform .24s;
}
.mm-lib.is-on .mm-lib-in { transform: none; }

/* 素材网格：3 列（和模板卡一致 —— 同一屏两种网格宽度会让眼睛很累） */
.mm-mat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.mm-mat-i {
  position: relative;
  padding: 0;
  border: 1px solid var(--m-line, #e9ecf3);
  border-radius: 11px;
  overflow: hidden;
  background: #f3f4f6;
  aspect-ratio: 1 / 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.mm-mat-i:active { transform: scale(.97); }
.mm-mat-i img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mm-mat-ic {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
}
/* ⚠️ 删除按钮 26px：手指点 12px 的小叉会误点到"选中" */
.mm-mat-del {
  position: absolute;
  right: 0;
  top: 0;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  color: #fff;
  background: rgba(220, 38, 38, .82);
  border-radius: 0 10px 0 10px;
}

/* ============================================================================
   ★★★ v2.943：抽屉里的账号区（对齐 MXAI）
   ----------------------------------------------------------------------------
   ★ MXAI 的抽屉顶部是：圆形头像 + 用户名 + 积分，一行排开。
   ⚠️ 头像 34px：比首页那张卡的 44px 小 —— 抽屉是"辅助信息区"，
      头像是点缀而不是主角（太大反而把菜单挤下去）。
   ⚠️ 积分用 nfmt 格式化（998762 → 99.9万），
      否则长数字会把用户名挤掉（用户名过长时也要能省略）。
   ============================================================================ */
.mm-drawer-acc {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mm-drawer-av {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: #fff;
  font-weight: 800;
  font-size: .95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.mm-drawer-nm {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.mm-drawer-nm b {
  font-size: .9rem;
  font-weight: 800;
  line-height: 1.25;
  /* ⚠️ 长用户名要能省略 —— 抽屉变窄了，不省略会撑破 */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mm-drawer-nm > span {
  font-size: .7rem;
  color: var(--m-ink-3);
  line-height: 1.25;
}

/* ============================================================================
   ★★★ v2.943：首页大标题（对齐 MXAI）
   ----------------------------------------------------------------------------
   🔴 用户要求（附 MXAI 截图）：「首页那句话不是一个按钮，你这做的像是一个按钮，
      完全参考 mj 做一样的」。
   ★ MXAI 那页的这两行字是：【居中】的大标题 + 下面一行小字，
     纯文字 —— 没有边框、没有背景、点不了。
   ⚠️⚠️ 关键：这里【绝不能】加 border / background / box-shadow /
      cursor:pointer —— 任何一条都会让它重新看起来像按钮
      （用户已经提过两次了）。
   ⚠️ 字号：主标题 1.26rem，明显大于正文（0.86rem）。
      MXAI 那行字是整页的视觉重心；小了就变成"一句说明"。
   ⚠️ 两侧留白 8px：不让它贴到屏幕边缘（贴边会显得"没做完"）。
   ⚠️ 不放在卡片里 —— 卡片自带边框白底，一放进去又像按钮了。
   ============================================================================ */
.mm-hero {
  text-align: center;
  padding: 6px 8px 14px;
}
.mm-hero b {
  display: block;
  font-size: 1.26rem;
  font-weight: 800;
  color: #111827;
  line-height: 1.35;
  letter-spacing: -.01em;
}
.mm-hero > span {
  display: block;
  margin-top: 5px;
  font-size: .76rem;
  color: var(--m-ink-3, #9ca3af);
  line-height: 1.4;
}

/* ============================================================================
   ★★★ v2.943：横滑容器【隐藏原生滚动条】
   ----------------------------------------------------------------------------
   🔴 我自己截图时发现的：首页「风格」那一行下面出现了一条灰黑色的原生滚动条
      （PC 版 Chrome 的横滑容器默认就带）。手机上没有鼠标，滚动条：
        · 没用（用户用手指滑，不看滚动条）
        · 很丑（一条灰条横在中间，把两行内容隔开）
        · 而且它占了高度 ⇒ 那一行看起来比别的行矮
   ★ 用 scrollbar-width:none（Firefox）+ ::-webkit-scrollbar（Safari/Chrome）
      两个都要写，缺一个就在某个浏览器上露出来。
   ⚠️ 只隐藏【视觉】—— 横滑功能保留（overflow-x:auto 不动），
      所以用户仍然能左右滑。
   ⚠️ 不加 -webkit-overflow-scrolling:touch 之类的：那会让某些机型
      出现"滑动惯性过大"（手指停了画面还在滑），现代浏览器默认就够了。
   ============================================================================ */
.mm-scroll-x,
.mm-chips-2,
.mm-chips-3,
.mm-chips-4,
.mm-seg,
.mm-ratio-grid,
.mm-tpl-grid {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.mm-scroll-x::-webkit-scrollbar,
.mm-chips-2::-webkit-scrollbar,
.mm-chips-3::-webkit-scrollbar,
.mm-chips-4::-webkit-scrollbar,
.mm-seg::-webkit-scrollbar,
.mm-ratio-grid::-webkit-scrollbar,
.mm-tpl-grid::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
/* ⚠️ 首页「风格 / 尺寸」那一行是内联样式写的 overflow-x:auto，
      没有类名 ⇒ 单独给它一个 id 选择器（#mm-quick 是它的 id）。 */
#mm-quick,
#mm-thumbs {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
#mm-quick::-webkit-scrollbar,
#mm-thumbs::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

/* ============================================================================
   ★★★ v2.944：底部抽屉式弹窗（AI 生成模特用）
   ----------------------------------------------------------------------------
   ⚠️ 为什么用「从底部滑上来」而不是居中弹窗：
      手机上居中弹窗会挡住键盘弹出的位置，而且大拇指够不到中间的按钮。
      底部抽屉是原生 App 的标准做法（也和我之前做的 M.openLib 一致）。
   ⚠️ 内容区必须能滚动：5 组条件 + 描述框 + 两个按钮 ≈ 700px，
      矮一点的手机（iPhone SE 667px）一屏放不下。
   ⚠️ 底部留 safe-area：不然 iPhone 的横条会盖住「生成模特」按钮。
   ⚠️ 显隐用 [hidden] + .is-on 两个状态：hidden 负责"真的不显示"（不挡点击），
      .is-on 负责过渡动画。只用一个的话要么没动画、要么挡住下面的内容。
   ============================================================================ */
.mm-sheet {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(17, 24, 39, .5);
  display: flex;
  align-items: flex-end;
  opacity: 0;
  transition: opacity .2s;
}
.mm-sheet.is-on { opacity: 1; }
/* ⚠️ [hidden] 要显式覆盖 display:flex —— 浏览器默认的 [hidden] 优先级不够 */
.mm-sheet[hidden] { display: none !important; }
.mm-sheet-in {
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  border-radius: 18px 18px 0 0;
  padding: 14px 14px calc(14px + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%);
  transition: transform .24s;
}
.mm-sheet.is-on .mm-sheet-in { transform: none; }

/* ============================================================================
   ★★★ v2.950：首页顶部那块加"淡淡的背景色"（用户：「这块有点素」）
   ----------------------------------------------------------------------------
   🔴 用户实测（截图框了「大标题 + 快速作图框」整块）：整块纯白 + 白底输入框 +
      白底按钮 ⇒ 完全没有层次 ⇒ "素"。
   ⚠️⚠️ 为什么背景色加在 .mm-hero 上而不是 .mm-card 上：
      .mm-body 有 padding（--m-pad）⇒ 给卡片加色的话，卡片【外面】会露白边
      ⇒ 看起来像"贴了一张色纸"。
      ⇒ 色只能加在【卡片内部】的元素上。
   ★ 配色：品牌紫（#7c3aed）的极低透明度渐变，不引入新色系
      （引入新色系会有"这不是我们的产品"的感觉）。
   ⚠️ "淡"是硬要求：太深会盖过「开始创作」那个主按钮 ——
      主按钮必须是整屏视觉最重的元素。
   ⚠️ 用【径向渐变】而不是线性：径向从中间往上淡开，
      更柔和、不像"贴了一条色带"。
   ⚠️ 大标题区原来有 padding: 6px 8px 14px ⇒ 加了背景之后
      要把左右 padding 撑开一点，否则色块比文字宽不了多少，看起来局促。
   ============================================================================ */
.mm-hero {
  padding: 14px 8px 18px;
  border-radius: 14px;
  /* 淡紫 → 白的径向渐变（两个色停都很浅，加起来也不会重） */
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(124, 58, 237, .075) 0%, rgba(124, 58, 237, 0) 72%),
    linear-gradient(180deg, rgba(245, 243, 255, .85) 0%, rgba(255, 255, 255, 0) 100%);
}

/* ============================================================================
   v2.951: two-column tool grid (all-tools page).
   ----------------------------------------------------------------------------
   User: "this tools page -> two columns please, one column is too long".
   One column was 36 x 52px = about 1900px for the e-commerce category alone.
   Two columns halves the scroll.
   Grid instead of flex-wrap so both cards in a row are the same height and the
   columns line up even when a name wraps to two lines.
   minmax(0, 1fr) instead of 1fr: without minmax(0,...) a long unbreakable
   string can push a grid column wider than its share.
   ============================================================================ */
.mm-tgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 4px;
}
/* ★★★ v3.1.4：工具卡改成【图标在左、文字在右】（用户要求）——
   ----------------------------------------------------------------------------
   🔴 用户原话：「主标题放在图标右侧，工具介绍放下面。图标在左侧可以大一点」
   ★ 原来是 flex-direction:column（图标/标题/介绍 各占一行，共三行）。
     半宽卡片只有约 170px ⇒ 标题一长就换行、卡片高度参差。
   ★ 现在：row 布局 —— 左边图标，右边两行文字。
   ⚠️ align-items:center 让图标和两行文字垂直居中（比 flex-start 更稳：
      文字两行时图标不会偏上）。
   ⚠️ gap 从 6px 加到 9px：横排时图标和文字贴太近会显拥挤。
   ⚠️ min-height 从 96px 降到 64px：横排后本来就不需要那么高，
      留着会让卡片下半截空一大块（用户一眼能看出"没排好"）。 */
.mm-tcard {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 9px;
  padding: 10px;
  background: var(--m-card, #fff);
  border: 1px solid var(--m-line, #eef0f4);
  border-radius: 13px;
  text-decoration: none;
  color: inherit;
  min-height: 64px;
}
.mm-tcard:active { background: #f8f7ff; }
/* 图标块：放【大一点】（用户明确要求）并且固定尺寸 ——
   ⚠️ flex:0 0 auto 不能少：半宽卡里标题一长就会挤压图标，
      没有这一条图标会被压成细条。 */
.mm-tcard-ic {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: #f5f3ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  line-height: 1;
  flex: 0 0 auto;
}

/* 右侧文字容器：两行（标题 + 介绍）。
   ⚠️ min-width:0 是让子元素【允许收缩】的开关 ——
      不写的话长标题会把这一列撑宽、把图标挤出卡片。 */
.mm-tcard-tx {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1 1 auto;
}
/* Name clamps to 2 lines so cards in the same row stay the same height. */
.mm-tcard-nm {
  font-size: .8rem;
  font-weight: 700;
  line-height: 1.32;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* Description is supporting info: one line with an ellipsis is enough. */
.mm-tcard-ds {
  font-size: .66rem;
  color: #9ca3af;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================================
   v2.952: two-column waterfall (inspire page).
   ----------------------------------------------------------------------------
   User: the inspire page should be a waterfall with no blank gaps.
   Root cause of the gaps: the page used CSS grid, which lays out BY ROW, so the
   two cells in a row both stretch to the taller one. With mixed aspect ratios
   (9:16 next to 1:1) the shorter cell leaves a blank block underneath.
   Multi-column lays out BY COLUMN so each column stacks on its own and no gap
   appears.
   break-inside:avoid keeps one card from being split across the two columns.
   display:block on the children is required for multi-column to behave.
   Pagination still works: appending to the container just reflows it.
   ============================================================================ */
.mm-falls2 {
  column-count: 2;
  column-gap: 10px;
  /* column-fill:auto makes the browser fill the first column to the container
     height before moving on; with no fixed height it balances instead, which is
     what we want for an endlessly growing list. */
  column-fill: balance;
}
.mm-falls2 > * {
  display: block;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  margin: 0 0 10px;
}

/* ============================================================================
   v2.953: one-row horizontal scroll for the home page style/size chips.
   ----------------------------------------------------------------------------
   The user asked twice, in opposite directions:
     v2.947 "make it two rows, nothing scrolls sideways"
       - because a sideways row clipped a chip and showed half a character,
         which looked like broken layout
     v2.953 "make it one scrolling row, and when the home page first opens
             show a blinking hint that you can swipe"
   Both requests together say: one scrolling row, but do NOT let it look
   broken. So:
     1. one scrolling row (saves height, matches the PC layout)
     2. a FADE MASK on the right edge instead of a hard cut - it reads as
        "there is more" rather than "the layout is broken"
     3. a one-time blinking hint on first open
   The mask is drawn with a pseudo element so it costs no extra markup and
   never intercepts taps.
   ============================================================================ */
.mm-hscroll {
  position: relative;
  overflow: hidden;
}
.mm-hscroll-in {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  /* hide the native scrollbar: on a phone it is useless and ugly */
  scrollbar-width: none;
  -ms-overflow-style: none;
  /* a little right padding so the fade does not sit on top of a chip */
  padding-right: 14px;
}
.mm-hscroll-in::-webkit-scrollbar { width: 0; height: 0; display: none; }
/* the fade mask */
.mm-hscroll::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 22px;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), #fff);
}
/* the one-time "you can swipe" hint */
/* ⚠️⚠️ v2.953：这个提示【不是】绝对定位了。
   我试了两次绝对定位都压住了胶囊：
     ① top:50% + right:0（挂在风格行）⇒ 压住"促销活力"
     ② bottom 贴进尺寸行              ⇒ 压住"16:9"
   根因：那两行本来就被胶囊填得差不多满，任何悬浮徽标都会压到东西。
   ⇒ 改成【独立一行】（在尺寸行下面），零遮挡。占约 18px 高，2.6 秒后撤掉。
   保留 position:relative 只是为了 z-index 生效，不做偏移。 */
.mm-hswipe-tip {
  position: relative;
  z-index: 3;
  pointer-events: none;
  display: block;
  text-align: right;
  margin-top: 4px;
  font-size: .66rem;
  font-weight: 700;
  color: #7c3aed;
  background: rgba(245, 243, 255, .96);
  border: 1px solid #ede9fe;
  border-radius: 999px;
  padding: 3px 7px;
  white-space: nowrap;
  /* ⚠️ 节奏调过：原来 0/100% 都是 opacity:0（暗段很长），
     实测在 1.6 秒截图时 opacity 只有 0.008 —— 几乎看不见。
     ★ 现在"亮"占大半时间（暗段只占两端各 12%），
       闪两次共 2.4 秒，用户一定看得到。
     ⚠️ 不能常亮：常亮会变成"一个奇怪的标签"，
        而不是"提示你可以滑一下"。闪才像提示。 */
  animation: mm-hswipe-blink 1.2s ease-in-out 2;
}
@keyframes mm-hswipe-blink {
  0%, 100% { opacity: .25; }
  18%, 82% { opacity: 1; }
}
/* a gentle nudge so "this row can scroll" becomes a visible fact */
.mm-hswipe-nudge {
  animation: mm-hswipe-nudge 1.1s ease-in-out 2;
}
@keyframes mm-hswipe-nudge {
  0%, 100% { transform: translateX(0); }
  30% { transform: translateX(-10px); }
  70% { transform: translateX(4px); }
}
/* respect the OS reduced-motion setting: this is an accessibility
   requirement, not a nice-to-have */
@media (prefers-reduced-motion: reduce) {
  .mm-hswipe-tip { animation: none; opacity: 1; }
  .mm-hswipe-nudge { animation: none; }
}

/* ============================================================================
   v2.954: personal center visual redesign.
   ----------------------------------------------------------------------------
   User: "the personal center page is too plain, improve the styling and colors."
   Why it looked plain:
     - every card was the same white surface with the same grey border
     - the numbers were plain text on white with no shape around them
     - the link list was one flat list, no hierarchy
   What changed:
     1. a gradient hero card for the profile block, so the page has a focal point
     2. the points card is now the heaviest element (it is the main action)
     3. the data numbers became tiles with soft tinted backgrounds, so the eye
        can scan them instead of reading a row of equal-looking digits
     4. the entries became a two-column tile grid
     5. a short entrance animation (respecting reduced motion)
   IMPORTANT constraints kept from before:
     - a non-member must look exactly as before: no gold ring, no crown badge.
       All member styling hangs off .mm-vip-on / [data-lv], never applied by default.
     - the level colors are still mapped by data-lv in CSS, not built in JS.
   ============================================================================ */

/* ---------- 1. profile hero ---------- */
.mm-me-hero {
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: var(--m-radius);
  padding: 15px 14px;
  margin-bottom: 12px;
  color: #fff;
  background: linear-gradient(135deg, #6d28d9 0%, #8b5cf6 52%, #a78bfa 100%);
  box-shadow: 0 6px 20px rgba(109, 40, 217, .22);
}
/* two soft light blobs so the gradient is not a flat band */
.mm-me-hero::before,
.mm-me-hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  background: rgba(255, 255, 255, .14);
}
.mm-me-hero::before { width: 130px; height: 130px; top: -58px; right: -34px; }
.mm-me-hero::after { width: 92px; height: 92px; bottom: -50px; left: -26px; background: rgba(255, 255, 255, .09); }
.mm-me-hero > * { position: relative; z-index: 1; }
.mm-me-hero-ava {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .22);
  border: 2px solid rgba(255, 255, 255, .6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.4rem;
  flex: 0 0 auto;
}
.mm-me-name {
  display: block;
  font-size: 1.02rem;
  font-weight: 800;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* tags inside the hero need a light-on-dark treatment, the default tag is
   dark-on-light, so override rather than reuse */
.mm-me-hero .mm-tag {
  background: rgba(255, 255, 255, .2);
  color: #fff;
  border-color: rgba(255, 255, 255, .28);
}
.mm-me-exp {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .64rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #7c2d12;
  white-space: nowrap;
}
/* ============================================================================
   ⚠️⚠️ v2.954 事故记录：这两条规则之间的 .mm-me-ava 定义【被我误删了】
   ----------------------------------------------------------------------------
   🔴 根因（我的操作失误，不是设计问题）：
      我用 Node 的 String.replace('.mm-me-ava {', ...) 改样式，
      而 `.mm-me-ava {` 是 `.mm-me-hero.mm-vip-on .mm-me-ava {` 的【子串】
      ⇒ replace 从中间切开，规则头被换掉、后面的 body 留了下来
      ⇒ `.mm-me-ava` 的【全部尺寸样式】（width/height/border-radius/flex…）丢了
      ⇒ 头像塌成一个方框里的小方块（截图里看到的那个"缺字方块"）。
      然后我第二次 replace 又误伤了同一条规则（把注释插进了选择器中间）。
   ★ 教训（写下来防止再犯）：
      ① 用 String.replace 改 CSS/JS 时，锚点必须是【整行】或【唯一子串】，
         不能是"可能出现在更长选择器里"的片段（比如 .a vs .b .a）。
      ② 改完必须【渲染验证】，不能只看 lint（lint 看不出"规则丢了"）。
      ③ 更稳的做法：用文件级 edit 工具精确定位，而不是全局替换。
   ============================================================================ */
.mm-me-hero-ava {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .22);
  border: 2px solid rgba(255, 255, 255, .6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.4rem;
  flex: 0 0 auto;
}
/* ⚠️ 页面用的是 .mm-me-ava（不带 -hero 前缀）—— 两个都留着，
   因为模板里用的是这个，而上面那个是我第一版写的前缀（留着不碍事，
   但真正的样式必须挂在这个名字上，否则头像又塌了）。 */
.mm-me-ava {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .22);
  border: 2px solid rgba(255, 255, 255, .6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.4rem;
  flex: 0 0 auto;
}
/* ★★★ v3.0.4：头像尺寸【改回固定 px】——
   ----------------------------------------------------------------------------
   🔴 用户原话：「头像太大了，吓到我了。我的意思左边放头像，右边放三行内容即可，
      头像没必要搞这么大的。」
   ⚠️⚠️ 我 v3.0.2 把「占满行」理解成"把头做大占满整行"——**理解错了**。
      用户说的是**布局**（头像在行首、内容在右边），不是尺寸。
   ★ 现在 72px：比最早的 56px 稍大一点点（显得头像"有分量"），
      但**绝不再用 vw** —— 就是那个 vw 让它在手机上失控成 118px 的。
   ⚠️ 固定 px 的好处：不管屏幕多宽，它都不会变。
      这一版踩的坑正是"响应式写法用在了不该响应的地方"。 */
/* ============================================================================
   ★★★ v3.0.7：会员卡上的【免费额度】卡片（用户要求"好看一点、别糊"）
   ----------------------------------------------------------------------------
   🔴 用户实测两次：
        「可免费用次数的字体颜色不要和模型颜色一样」（第一次）
        「这一块感觉很模糊，不清晰，免费模型使用次数也调整的好看一点」（第二次）
   ★ 第一次只换了颜色（做成绿胶囊）——**不够**：那一排挤成一条半透明的细胶囊，
     叠在紫色渐变上对比度很低，看起来就是"糊"。
   ★ 这一次改成【实底白卡片】：
        · 背景 rgba(255,255,255,.96) —— **接近不透明**，和紫底形成硬对比
        · 两行：模型名（小、灰）/ 次数（大、粗、深色）
        · 剩余次数是这个卡上用户最关心的数字 ⇒ 给它最大的字号
   ⚠️ 为什么必须"接近不透明"：半透明白叠在渐变紫上，每个像素底色都不一样
      ⇒ 文字边缘看起来发毛 —— 这就是"糊"的物理原因，不是字体问题。
   ⚠️ 宽度 auto + 最小宽度：模型名长短不一，固定宽度会截断长的、给短的留白。
   ============================================================================ */
/* ★★★ v3.2.13：免费额度网格的布局搬到这里（原来是 mobile-me.html 里的内联 style）——
   ----------------------------------------------------------------------------
   🔴 用户两次反馈「两个卡片之间没有距离」，我 v3.2.8 把 gap 6px→9px 并**实测生效**，
      但用户还是看不到。
   ★ 根因：那段样式原本写在 **JS 拼的内联 style** 里，而 **`/m-me` 页面 HTML
     本身没有版本号**（只有 .css/.js 带 ?v=）⇒ 浏览器缓存旧页面 ⇒ 还是旧 gap。
   ★ 所以搬进 mobile.css（带 ?v=APP_VERSION，每次发版必然重下）。
   ⚠️ 放进 CSS 后：【不要再在页面里写 inline grid/gap】——
      内联优先级高于外部样式表，会把它覆盖回旧值（那就白搬了）。
   ⚠️ gap 用 12px 而不是 9px：白卡片贴在浅色底上，9px 的"白缝"在真机上很难看出边界；
      12px + 卡片自带 1px 淡边（见 .mm-quota-card）才读得出"这是两张卡"。 */
#mm-perks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.mm-quota-card {
  /* ★★★ v3.1.1：改成【2 列格子 + 卡内竖排】（用户要求）——
     ----------------------------------------------------------------------------
     🔴 用户原话：「每行两个，四行改成 2 行。」
     ★ 演变（三轮，别再来回改）：
         ① flex-wrap 横排 ⇒ 每行 2 个**窄**卡片，名字被截断（用户不满意）
         ② 「沾满整行」⇒ 一条一行（4 行，用户现在要 2 行）
         ③ **现在**：2 列 grid（列宽等分）+ **卡内竖排**
            —— 网格由容器管，卡片只管填满自己的格子
     ⚠️ 卡内为什么必须竖排：两列时每张只有约 175px，
        横排（名字左 + 次数右）会把长模型名挤成省略号，
        而"gpt-image-2.5-flare · 4K"这种名字在 175px 里根本放不下。
        竖排：名字一行（可省略）、次数一行（大字）—— 两列也看得清。
     ⚠️ height:100%：让同一行的两张卡片等高（名字长短不一时不会一高一低）。
     ⚠️ 宽度靠 grid 的 1fr，不要在这里写 width —— 否则和容器打架。 */
  display: flex; flex-direction: column; gap: 2px;
  height: 100%;
  padding: 8px 10px;
  border-radius: 11px;
  background: rgba(255, 255, 255, .96);
  /* ★★★ v3.2.8：阴影收【紧】一点（用户实测「两个卡片之间紧贴着，应该有个间距」）——
     ----------------------------------------------------------------------------
     ⚠️ 原来 `0 2px 8px`，8px 的模糊半径意味着**阴影往下洇出约 4px**，
        而格子间距只有 6px ⇒ 上排的阴影几乎吃掉了整个间距，
        两排卡片看起来就是"贴在一起"（用户截图里正是这样）。
     ★ 改法两头一起动，这才是关键：
        · 容器 gap 6px → **9px**（mobile-me.html 里那个 grid）
        · 这里把模糊半径收小到 6px + 加一条 1px 的边，
          **让"卡片边界"自己看得见** —— 不靠间距去区分
     ⚠️ 为什么不只把 gap 加到 12px：卡片是白底，间距再大也只是"更宽的白缝"，
        边界依然靠间距表达；加一条淡边之后，间距 9px 就足够读出来。
     ⚠️ 边框色不能用纯灰（会显脏）：用带一点紫的 rgba(124,58,237,.10)，
        和整页的紫色调同族，在白卡上是一条很淡的轮廓线。 */
  border: 1px solid rgba(124, 58, 237, .10);
  box-shadow: 0 2px 6px rgba(49, 16, 100, .14);
}
.mm-quota-name {
  /* ⚠️ min-width:0 是给 flex/grid 子项"允许收缩"的开关 ——
     不写的话长模型名会把整张卡片撑宽、挤坏另一列。 */
  min-width: 0;
  font-size: .66rem; font-weight: 600; color: #6b7280;
  letter-spacing: .01em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mm-quota-num {
  font-size: .72rem; font-weight: 700; color: #4c1d95;
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
/* 剩余次数那个数字：全卡最大的字，一眼能看到 */
.mm-quota-num > b { font-size: .92rem; font-weight: 900; color: #059669; }
.mm-quota-card.is-empty { background: rgba(255, 255, 255, .74); }
.mm-quota-card.is-empty .mm-quota-num { color: #9ca3af; font-size: .7rem; }
.mm-quota-card.is-empty .mm-quota-num > b { color: #9ca3af; font-size: .72rem; }
/* 并发数那条：它是"身份说明"，横跨两列（一条占满行）——
   ⚠️ grid-column:1/-1 让它不占一个"格子"，否则它会挤掉一个额度卡片的位置。 */
.mm-perk-note {
  grid-column: 1 / -1;
  padding: 2px 2px 0;
  font-size: .68rem; color: rgba(255, 255, 255, .82);
}

.mm-me-hero .mm-me-ava {
  width: 72px;
  height: 72px;
  font-size: 1.85rem;
  border-width: 3px;
  border-color: rgba(255, 255, 255, .78);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .14), inset 0 0 18px rgba(255, 255, 255, .12);
}
/* the member ring: only when the account is actually a member */
.mm-me-hero.mm-vip-on .mm-me-ava {
  border-color: #fcd34d;
  box-shadow: 0 0 0 3px rgba(252, 211, 77, .35);
}

/* ★★★ v3.0.2：会员【身份特效】（只在 .mm-vip-on 下生效 —— 普通用户零变化）
   ----------------------------------------------------------------------------
   ★ 三重效果叠起来，做出"金环 + 微光"的尊贵感：
       ① 金色渐变环（不是纯色 —— 纯色看起来像"边框没调好"）
       ② 外圈光晕（box-shadow 两层：近处实、远处虚）
       ③ 缓慢流转的高光（::after 一道斜向渐变，6 秒一轮）
   ⚠️⚠️ 前提：**必须在 .mm-me-hero.mm-vip-on 下**。
      这个项目里"会员样式漏到普通用户身上"出过事故
      （见上面 v2.954 那段记录：Hero 卡被刷成浅黄渐变）。
   ⚠️ 动画用 transform/opacity（合成层，不触发重排）——
      手机上滚动页面时不能因为它掉帧。
   ⚠️ 加 prefers-reduced-motion 兜底：开了"减弱动效"的用户只看静态金环。
   ⚠️ overflow:hidden 必须加在【环那一层】上，否则 ::after 的高光会溢到圆外。 */
.mm-me-hero.mm-vip-on .mm-me-ava {
  position: relative;
  overflow: hidden;
  /* ⚠️⚠️ 这里【必须】是一条真实的金色 border，不能用"透明 border + 渐变背景
     裁到 border-box"那种写法 —— 我第一版就是那么写的，结果：
        · 视觉上那条渐变环【不一定画出来】（取决于背景层的裁剪实现）
        · 更要紧的是 `border-color` 的计算值变成 rgba(0,0,0,0)，
          **mobile-nav-probe 的会员态断言直接报红**（那条断言查的就是金边）。
     ⇒ 老老实实给一条金边，渐变留给"外圈光晕"去做（box-shadow 那两层）。 */
  border: 3px solid #fcd34d;
  background: linear-gradient(160deg, rgba(255, 255, 255, .26), rgba(255, 255, 255, .10));
  box-shadow:
    0 0 0 4px rgba(252, 211, 77, .22),
    0 8px 26px rgba(245, 158, 11, .38),
    inset 0 0 22px rgba(253, 230, 138, .20);
  color: #fff8e1;
  text-shadow: 0 1px 6px rgba(120, 53, 15, .55);
}
.mm-me-hero.mm-vip-on .mm-me-ava::after {
  content: '';
  position: absolute;
  inset: -40% -120%;
  background: linear-gradient(115deg,
    rgba(255, 255, 255, 0) 38%,
    rgba(255, 255, 255, .42) 50%,
    rgba(255, 255, 255, 0) 62%);
  transform: translateX(-62%);
  animation: mmVipShine 6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes mmVipShine {
  0%, 62% { transform: translateX(-62%); opacity: 0; }
  70%     { opacity: .9; }
  100%    { transform: translateX(62%); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .mm-me-hero.mm-vip-on .mm-me-ava::after { animation: none; opacity: 0; }
}

/* ============================================================================
   ⚠️⚠️ v2.954：把上面那套"会员视觉"从 Hero 卡上【摘出去】
   ----------------------------------------------------------------------------
   🔴 事故：改版后会员的 Hero 卡被刷成了【浅黄渐变底】，用户名变成【橙色渐变大字】。
   ★ 根因：上面第 84~90 行的会员样式是给【旧的白色账号卡】写的：
        .mm-vipcard.mm-vip-on {
          border-color: #fcd34d;
          background: linear-gradient(180deg, #fffbeb 0%, #ffffff 60%);   ← 浅黄底
        }
        .mm-vip-name {
          background: linear-gradient(90deg,...金色...);
          -webkit-background-clip: text; -webkit-text-fill-color: transparent;  ← 金字
        }
      而新 Hero 卡【也用 id="mm-vipcard"】⇒ 那套样式照样命中
      ⇒ 紫色渐变底被浅黄底覆盖、白字被金字特效覆盖。
   ★ 修法：不是删掉旧规则（PC 端和别的路径还可能用），而是【加作用域】：
        · 用 :not(.mm-me-hero) 把那两条排除在 Hero 卡之外
        · 用 .mm-me-hero 前缀把 Hero 卡里的用户名强制回白字
      ⚠️ 为什么不直接改 .mm-vip-name 的 color：那个类还被用在别处
         （PC 的账号页 .vip-name 是另一套，但手机版别的地方也可能挂）。
         加作用域比改语义安全。
   ⚠️ 金环（.mm-me-hero.mm-vip-on .mm-me-ava）和皇冠徽章【保留】——
      它们是会员身份的表达，在新的紫色卡上依然好看（金环 + 紫底对比更强）。
   ============================================================================ */
.mm-vipcard.mm-vip-on:not(.mm-me-hero) {
  border-color: #fcd34d;
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 60%);
}
/* Hero 卡里的用户名：强制纯白（覆盖 .mm-vip-name 的金色渐变文字） */
.mm-me-hero .mm-me-name,
.mm-me-hero.mm-vip-on .mm-me-name {
  color: #fff;
  background: none;
  -webkit-text-fill-color: #fff;
}

/* ---------- 2. points (wallet) card ---------- */
.mm-me-wallet {
  position: relative;
  overflow: hidden;
  border: 0;
  /* ⚠️ 底色改浅了，文字色必须一起改深（配套改动，不能只改背景） */
  color: #4c1d95;
  border-radius: var(--m-radius);
  padding: 15px 14px;
  margin-bottom: 12px;
  /* ★★★ v3.1.6：**颜色调浅**（用户要求「太扎眼了，弄浅一点点」）——
     原来是 #4c1d95（接近黑紫）打头的深紫渐变 + 重阴影 ⇒
     在浅色页面里就是一块黑紫方块，最抢眼。
     ⚠️ 三个方向要一起收（只改一个不够）：底色 / 文字色 / 阴影。
     ⚠️ 底色一变浅，**文字必须跟着改深**，否则白字看不见 —— 配套的，不能只改背景。 */
  background: linear-gradient(120deg, #ede9fe 0%, #ddd6fe 52%, #c4b5fd 100%);
  box-shadow: 0 4px 14px rgba(109, 40, 217, .10);
}
.mm-me-wallet::after {
  content: '';
  position: absolute;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  right: -56px;
  top: -66px;
  /* ⚠️ 浅底上"白斑"看不见 ⇒ 换成淡紫斑，才有层次 */
  background: rgba(124, 58, 237, .10);
  pointer-events: none;
}
.mm-me-wallet > * { position: relative; z-index: 1; }
.mm-me-wallet-lbl {
  font-size: .72rem;
  letter-spacing: .04em;
  opacity: .82;
}
.mm-me-wallet-num {
  font-size: 2.05rem;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.mm-me-wallet .mm-btn {
  /* ⚠️ 原来是白底紫字（在深紫卡上很亮）；底色变浅后白底会糊进背景
     ⇒ 改成实心紫底白字。**充值仍是这张卡上最显眼的元素** ——
     调浅不等于把这个主要动作也弱化掉。 */
  background: #7c3aed;
  color: #fff;
  border: 0;
  font-weight: 800;
  min-height: 42px;
  box-shadow: 0 3px 10px rgba(124, 58, 237, .30);
}
.mm-me-team {
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid rgba(255, 255, 255, .28);
}

/* ---------- 3. stat tiles ---------- */
.mm-me-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.mm-me-tile {
  border-radius: 12px;
  padding: 10px 4px;
  text-align: center;
  background: #f7f7fb;
  border: 1px solid #f0f0f6;
}
.mm-me-tile b {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.mm-me-tile span {
  display: block;
  font-size: .66rem;
  color: #9ca3af;
  margin-top: 2px;
}
/* per-tile tint so the row is not four identical grey boxes */
.mm-me-tile.t1 b { color: #7c3aed; }
.mm-me-tile.t2 b { color: #2563eb; }
.mm-me-tile.t3 b { color: #db2777; }
.mm-me-tile.t4 b { color: #059669; }
.mm-me-tile.t1 { background: #f8f5ff; border-color: #ede9fe; }
.mm-me-tile.t2 { background: #f2f7ff; border-color: #dbeafe; }
.mm-me-tile.t3 { background: #fdf3f8; border-color: #fce7f3; }
.mm-me-tile.t4 { background: #f1fdf8; border-color: #d1fae5; }
.mm-me-mini {
  flex: 1 1 0;
  text-align: center;
}
.mm-me-mini b {
  display: block;
  font-size: .92rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.mm-me-mini span {
  display: block;
  font-size: .64rem;
  color: #9ca3af;
  margin-top: 1px;
}

/* ---------- 4. entry tiles ---------- */
.mm-me-entries {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.mm-me-entry {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 10px;
  border-radius: 12px;
  background: #fafafd;
  border: 1px solid #f0f0f6;
  text-decoration: none;
  color: inherit;
  min-height: 52px;
}
.mm-me-entry:active { background: #f4f2ff; }
.mm-me-entry-ic {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: #f3f0ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .95rem;
  flex: 0 0 auto;
}
.mm-me-entry b {
  font-size: .78rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- 5. entrance animation ---------- */
.mm-me-in {
  animation: mm-me-in .3s ease both;
}
@keyframes mm-me-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .mm-me-in { animation: none; }
}

/* ============================================================================
   v2.955: hero identity block (user: "am I a super member or a normal user?")
   ----------------------------------------------------------------------------
   Two fixes:
     1. the ID line. The user asked to stop calling it "靓号" (premium number)
        and just call it ID. So: "ID 888888" on its own line, no competition
        with the tags.
     2. one identity tag instead of two. The page used to show
        "普通用户" (role) and "超级会员" (membership) side by side, which reads
        as a contradiction. The role tag is now computed in JS as a single
        value, and this CSS only colors it:
          .is-admin  -> gold   (admin)
          .is-agent  -> blue   (agent)
          .is-member -> gold   (bought a membership)
          (none)     -> plain  (a plain user)
   ============================================================================ */
.mm-me-id {
  display: block;
  margin-top: 3px;
  font-size: .68rem;
  letter-spacing: .02em;
  color: rgba(255, 255, 255, .78);
  font-variant-numeric: tabular-nums;
}
.mm-me-ids {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 7px;
}
/* the identity tag: one only, colored by meaning */
.mm-me-ident {
  background: rgba(255, 255, 255, .2) !important;
  color: #fff !important;
  border-color: rgba(255, 255, 255, .3) !important;
  font-weight: 800;
}
.mm-me-ident.is-member {
  background: linear-gradient(135deg, #fbbf24, #f59e0b) !important;
  color: #7c2d12 !important;
  border-color: rgba(255, 255, 255, .35) !important;
}
.mm-me-ident.is-admin {
  background: linear-gradient(135deg, #f472b6, #db2777) !important;
  color: #fff !important;
  border-color: rgba(255, 255, 255, .35) !important;
}
.mm-me-ident.is-agent {
  background: linear-gradient(135deg, #38bdf8, #0284c7) !important;
  color: #fff !important;
  border-color: rgba(255, 255, 255, .35) !important;
}
/* ⚠️⚠️ v2.955：头像上【不再挂徽章】。
   ----------------------------------------------------------------------------
   我试了三版绝对定位都不行：
     ① 垂直居中压在圆上 ⇒ 盖住名字首字母
     ② 贴底居中        ⇒ 压住下面的身份标签行（间距怎么调都挤）
     ③ 贴右下角        ⇒ CSS 覆盖没生效（徽章还是压在左下）
   ⇒ 放弃"徽章骑在头像上"。头像就是一个干净的金环圆；
      会员等级做成身份行里的金色药丸（.mm-me-exp），和"代理商"并排。
   ★ 理由：手机屏幕上"不遮挡"比"徽章叠在头像上好看"重要得多。
   ============================================================================ */
.mm-me-hero .mm-me-ava { margin-bottom: 0; }
/* 右上角的到期药丸（只在会员态显示）
   ⚠️⚠️ 这里必须用 !important 压过 .mm-me-exp：
      两条规则的优先级【完全相同】，而 .mm-me-exp 在文件里【更靠后】
      ⇒ 到期药丸会意外继承"金色渐变底"（那是给会员等级药丸用的）。
      🔴 我第一版没加，截图里到期时间变成了金底白字、还带着皇冠图标
         —— 看起来像"又一个会员标识"，很乱。
      ⚠️ 更规范的写法是两条规则合成一条、用类区分；
         但这里加 !important 只影响这三个属性，改动最小、风险最低。 */
.mm-me-due {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  font-size: .62rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .22) !important;
  border: 1px solid rgba(255, 255, 255, .3) !important;
  color: #fff !important;
  white-space: nowrap;
}
/* 普通用户那个角色标签：隐藏（不显示"普通用户"——说了等于没说，
   而且和会员等级并列时会自相矛盾）。JS 里直接加 hidden，这里只是兜底。 */
.mm-me-ident.is-plain { display: none !important; }

/* ============================================================================
   v2.956: JS balanced waterfall (two/three columns).
   ----------------------------------------------------------------------------
   The page used CSS multi-column before: no gaps, but it fills column by
   column, so reading order became 1,2,3 down the left then 4,5,6 down the
   right. The user asked for JS column assignment instead: no gaps AND roughly
   left-to-right order. Each cell goes into the currently shortest column.
   flex + min-width:0 so a wide image cannot push a column wider than its share.
   The cells carry aspect-ratio (from the backend aspectRatio field) so the
   column heights are correct before the images load, which is what makes the
   shortest-column calculation work at all.
   .mm-falls2 (the old multi-column rule) is left in place but unused.
   ============================================================================ */
.mm-fall2 {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.mm-fall-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ============================================================================
   ★★★ v3.1.5：整屏面板的【不确定进度条】—— 挪到共用 CSS
   ----------------------------------------------------------------------------
   🔴 用户实测（截图）：「没有进度条呢？」——图片创作页的生成卡里没有进度条。
   ★ 真因：这套样式原来**只写在 mobile-ecommerce.html 的页面内 style 里**，
      而图片创作页用了同一个类名 .mm-stage-bar ⇒
      **元素在 DOM 里、但宽高为 0 ⇒ 完全看不见**（不报错，最难查的一类）。
   ⇒ 挪到这里（每个手机版页面都加载 mobile.css）：
      所有"生成中"的页面共用一份，不会再出现"这页有那页没有"。
   ⚠️ 电商页里那一份【已删掉】—— 留两份必然漂（改一处忘一处）。

   ⚠️⚠️ 关于"实时进度条"（用户已经要求四次了，事实必须再说一次）：
      上游返回里**有** progress 字段，但**那个模型恒定返回 0**：
          {"state":"running","progress":0}   （ImageApi.php 日志原文）
      ⇒ **拿不到真实百分比**，"按真实进度走"做不到。
   ★ 所以这里是一条【不确定进度条】（色块左右滑动），它**不谎报百分比**。
      用户能感知的"走完就出图"仍然成立：**图一好整块立刻换成结果**。
   ⚠️ 以后上游若开始给真 progress：透传到 /api/check，
      这里改成按百分比设 width 即可（结构已经留好）。
   ============================================================================ */
.mm-stage-bar {
  width: 62%; height: 4px; border-radius: 3px;
  background: #ece9f7; overflow: hidden; margin-top: 4px;
}
.mm-stage-bar > i {
  display: block; width: 38%; height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, #a78bfa, #7c3aed);
  animation: mmStageSlide 1.15s ease-in-out infinite;
}
@keyframes mmStageSlide {
  0%   { transform: translateX(-105%); }
  100% { transform: translateX(275%); }
}
/* ⚠️ 开了"减弱动效"的用户：动画停掉，用一条静态半透明条代替
   （不能干脆不显示 —— 那样就分不清"排队中"和"生成中"了）。 */
@media (prefers-reduced-motion: reduce) {
  .mm-stage-bar > i { animation: none; width: 100%; opacity: .55; }
}

/* ============================================================================
   ★★★ v3.1.6：「重新生成」按钮 —— 从"压在图上的浮层"改成【标题行里的按钮】
   ----------------------------------------------------------------------------
   🔴 用户原话：「重新生成按钮放在上面右边角，不要压在生成的图片上。」
   ★ 改之前：position:absolute; top:6px; right:6px —— **盖在图上**，
      截图里它挡住了画面右上角的内容。
   ★ 现在：它是卡片标题行（flex 行）里的最后一个子元素 ⇒
      **天然不会盖住图**（图在下一行），位置也正好是"上面右边角"。
   ⚠️ flex:0 0 auto 不能少：模块名很长时（"到店核销流程"这种）会把按钮挤扁；
      给了它固定尺寸 + 不收缩，名字才会去截断。
   ⚠️ 原来那个失败态专用的居中类（is-mid）**已删** ——
      位置统一到标题行之后它没用了；留着只会让人以为"失败时还要特殊定位"。
   ⚠️ 这条样式放在 mobile.css 而不是某个页面里：
      图片创作页也有重新生成按钮，放页面里就会重演
      "这页有那页没有"（进度条那次就是这么翻车的）。
   ============================================================================ */
.mm-stage-again {
  flex: 0 0 auto;
  width: 30px; height: 30px; min-height: 0; padding: 0;
  border: 0; border-radius: 50%;
  background: #7c3aed; color: #fff;
  font-size: 1rem; line-height: 1; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(124, 58, 237, .28);
}
.mm-stage-again:active { opacity: .82; }

/* ★ v3.79.0：作品卡片「套图 N 张」角标
   🔴 用户：「一次生成 3 张，电脑是幻灯组，手机只显示一张，另外两张看不到」
   ⇒ 先在卡片上标出这一批有几张，再点开才能横滑看全。 */
.mm-work-thumb { position: relative; }
.mm-work-group {
  position: absolute; top: 6px; right: 6px; z-index: 2;
  background: rgba(17, 24, 39, .72); color: #fff;
  font-size: .64rem; font-weight: 700; line-height: 1;
  padding: 4px 7px; border-radius: 999px;
  pointer-events: none;
}
