/* ============================================================
   Kefuxt 访客端 H5 聊天页样式
   品牌主色 #0050ff · 微信式气泡 · 日/夜主题 · 响应式
   ============================================================ */

:root{--brand:#0050ff;--bubble:#0050ff;--brand-d:#3d7bff;--brand-soft:#e9f0ff;--brand-line:#c8daff;--bg:#f2f5fa;--card:#ffffff;--line:#e4e9f1;--line-2:#d3dae5;--text:#0f172a;--text-2:#334155;--sub:#64748b;--muted:#94a3b8;--ok:#0f9d6e;--ok-soft:#e6f6f0;--danger:#e11d48;--warn:#f59e0b;--shadow:0 4px 16px rgba(15,23,42,.08);--shadow-md:0 12px 40px rgba(15,23,42,.16);--radius:14px}

html.dark{
  --brand:#4d86ff;
  --brand-d:#6b9dff;
  --brand-soft:#16264a;
  --brand-line:#24407a;
  --bg:#080c14;
  --card:#101724;
  --line:#1e293b;
  --line-2:#2b3852;
  --text:#e2e8f0;
  --text-2:#cbd5e1;
  --sub:#94a3b8;
  --muted:#64748b;
  --ok:#22b98a;
  --ok-soft:#0f2e26;
  --shadow:0 4px 16px rgba(0,0,0,.4);
  --shadow-md:0 12px 40px rgba(0,0,0,.6);
}

*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
/* v66：宽度链路全段封顶。
   真机上出现过「聊天窗比屏幕宽、能左右横向拖、发送/图片按钮被顶出屏外」——
   只要这条链上任何一环被内容撑开（一条不断行的消息、一串快捷按钮、一段长单据号），
   超宽就会一路顶到 iframe，再顶到宿主页面。这里从 html 起逐级钉死：
     html/body            —— 100% 宽 + 禁止任何滚动（滚动只允许发生在 .h5-body）
     .h5-shell            —— 100% 且不超视口
     main/header/foot/tools —— 各自不许超过父级宽度
   再配 .h5-tools 的 nowrap+overflow:hidden：工具行空间不足时**在自身内部裁切**，
   而不是把输入区挤宽——发送按钮因此永远留在屏内、永不被遮挡。 */
html{width:100%;height:100%;overflow:hidden}
body{width:100%;max-width:100%;height:100%;overflow:hidden}
body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;background:#f2f5fa;background:var(--bg);color:#0f172a;color:var(--text);font-size:14px;line-height:1.5}
button{font-family:inherit}
input,textarea{font-family:inherit}
/* 全局：禁止 textarea 右下角拉伸手柄（不影响 JS 高度自适应组件——那是脚本改 height，与 resize 属性无关） */
textarea{resize:none;}

/* ---------- 外壳布局 ---------- */
/* 桌面非嵌入：浅灰底 + 居中窄栏卡片；嵌入/移动端：满铺 */
.h5-shell{position:relative;/* 遮罩/底部菜单 absolute 限定在卡片内，不越界盖全屏 */
  display:flex;flex-direction:column;height:100vh;height:100dvh;background:#ffffff;background:var(--card);overflow:hidden;
  max-width:100vw}
.h5-shell.retracted{display:none}    /* 缩回气泡后隐藏整个聊天窗口 */
/* 主列（移动端=整个聊天区；PC 布局中为右侧消息列） */
.h5-main{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1 1 0%;flex:1 1 0%;min-width:0;min-height:0;max-width:100%}
body.embed .h5-shell{height:100vh;height:100dvh;max-width:none;border-radius:0;max-width:100%}
/* v66：嵌入态把文档滚动整个锁死——聊天窗高度恒等于 iframe 高度（100dvh），
   纵向滚动只允许发生在 .h5-body 消息区。此前若内核不支持 dvh 导致 shell 高度塌陷，
   body 自己会出现纵向滚动条，header/悬浮客服球(#floatTrigger)就跟着页面一起滚走，
   这正是「header 不能随页面滚动而滚动」要根治的场景。 */
body.embed{overflow:hidden}
/* v66：header 吸顶双保险。flex 布局里 header 本就不随 .h5-body 滚动，
   但加上 sticky 后，即使外壳高度在异常内核上塌了、body 出现滚动，头部也钉在顶部。 */
.h5-header{position:-webkit-sticky;position:sticky;top:0;z-index:5}

/* ---------- 问题4：移动端嵌入底部半屏弹窗（bottom sheet） ----------
 * mobileHalfScreen=true 时 #h5Shell 加 .half-sheet(.h-50/.h-80)：
 *   容器固定在视口底部，高度=视口 50%/80%，顶部圆角，上方露出外层网页背景。
 *   头部/消息流/输入区仍在容器内按 flex 列布局正常工作；.h5-body 内部滚动不变。
 *   false 时不加这些 class，保持原全屏行为。 */
.h5-shell.half-sheet{
  position:fixed;left:0;right:0;bottom:0;top:auto;
  height:80vh;height:80dvh;
  border-radius:16px 16px 0 0;
  box-shadow:0 -8px 32px rgba(15,23,42,.18);box-shadow:var(--shadow-md);
  z-index:1200;
}
.h5-shell.half-sheet.h-50{height:50vh;height:50dvh}
.h5-shell.half-sheet.h-80{height:80vh;height:80dvh}
/* v70 需求2：嵌入态（JS 嵌入 / iframe 嵌入）半屏同样要顶部左右圆角。
   上面 body.embed .h5-shell 那条（第 53 行）为了「嵌入永远铺满」把 border-radius 归零，
   它的特异性是 (0,2,1)，压过了 .h5-shell.half-sheet 的 (0,2,0)——于是同一个配置在
   独立 H5 上有圆角、嵌到客户网站里却被抹平成直角。这里补一条更高特异性的规则，
   只对**半屏**放行圆角；全屏（未开半屏）仍然 0，符合「没有开启则无需圆角」。 */
body.embed .h5-shell.half-sheet{border-radius:16px 16px 0 0}
/* v65：JS 嵌入 / iframe 嵌入时，外层 iframe 在移动端已铺满宿主视口。此时若开了半屏，
   卡片上方的 20%~50% 必须透出**客户自己的网页**——H5 的 body 灰底不摘掉，
   用户看到的就是「灰底 + 一张白卡」，而不是自己网站上的一张浮层。
   注意只摘 body：html 默认透明，.h5-shell 自带白底不受影响，聊天窗内部观感零变化。 */
body.has-half-sheet{background:transparent!important}

/* ---------- PC 布局（独立外链 + ≥768px，body.pc-layout 由 h5.js 按视口切换） ---------- */
/* 左侧信息栏：移动端/嵌入态隐藏 */
.h5-side{display:none}
body.pc-layout:not(.embed) .h5-shell{
  -ms-flex-direction:row;flex-direction:row;
  max-width:920px;margin:0 auto;height:94vh;height:94dvh;min-height:520px;margin-top:3vh;margin-bottom:3vh;
  /* v70 需求1：去掉边外框。此前这里有一圈 1px solid #e4e9f1，于是「同一个聊天窗口」
     在三种入口下观感不一致——JS 嵌入有框、iframe 嵌入没框、移动端也没框。统一抹掉，
     层次仍由下面这行 box-shadow 撑住，不会显得贴在页面里。 */
  border-radius:20px;box-shadow:0 12px 40px rgba(15,23,42,.16);box-shadow:var(--shadow-md);
}
body.pc-layout:not(.embed){
  background:#f2f5fa;
  background:radial-gradient(1200px 600px at 80% -10%, #e9f0ff, transparent 60%), #f2f5fa;
  background:#e9f0ff;background:radial-gradient(1200px 600px at 80% -10%, var(--brand-soft), transparent 60%), var(--bg);
}
body.pc-layout:not(.embed) .h5-side{
  display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;
  width:228px;flex:none;min-width:0;
  background:#f2f5fa;background:var(--bg);
  border-right:1px solid #e4e9f1;border-right:1px solid var(--line);
}
.hs-agent{padding:22px 16px 16px;text-align:center;background:#0050ff;background:var(--brand);color:#fff}
.hs-avatar-wrap{width:56px;height:56px;border-radius:50%;overflow:hidden;margin:0 auto 10px;background:#fff}
.hs-avatar-wrap img{width:100%;height:100%;object-fit:cover;display:block}
.hs-name{font-size:15px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hs-status{font-size:12px;opacity:.92;margin-top:5px}
.hs-status i{width:6px;height:6px;border-radius:50%;background:#5eead4;margin-right:5px;display:inline-block}
.hs-status.offline i{background:#fca5a5}
.hs-info{padding:10px 16px}
.hs-row{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;font-size:12.5px;padding:8px 0;border-bottom:1px solid #e4e9f1;border-bottom:1px solid var(--line)}
.hs-row span{color:#94a3b8;color:var(--muted)}
.hs-row b{color:#334155;color:var(--text-2);font-weight:500;margin-left:10px;text-align:right;word-break:break-all}
.hs-tip{margin:auto 16px 18px;font-size:11px;color:#94a3b8;color:var(--muted);text-align:center;line-height:1.6}

/* ---------- 顶栏 ---------- */
.h5-header{flex:none;display:flex;align-items:center;gap:11px;padding:12px 14px;background:#0050ff;background:var(--brand);color:#fff}
.h5-logo{width:38px;height:38px;border-radius:11px;flex:none;background:rgba(255,255,255,.2);display:flex;align-items:center;justify-content:center}
.h5-logo svg{width:20px;height:20px;fill:#fff}
/* 接待客服头像（PC 窗口化模式下由 /api/h5/config 的 agent 字段驱动，缺省隐藏） */
.h5-logo .agent-avatar{display:none;width:100%;height:100%;object-fit:cover;border-radius:11px}
.h5-logo.has-agent .agent-avatar{display:block}
.h5-logo.has-agent svg{display:none}
.h5-logo.has-agent{background:#fff}
.h5-head-txt{-ms-flex:1 1 0%;flex:1 1 0%;min-width:0}
.h5-title{font-size:15.5px;font-weight:600;letter-spacing:.2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.h5-status{font-size:11.5px;opacity:.9;display:flex;align-items:center;gap:5px;margin-top:2px}
.h5-status i{width:6px;height:6px;border-radius:50%;background:#5eead4;display:inline-block}
.h5-status.offline i{background:#fca5a5}
.h5-actions{display:flex;gap:6px}
.h5-act{width:30px;height:30px;border-radius:8px;border:0;cursor:pointer;background:rgba(255,255,255,.16);color:#fff;display:inline-flex;align-items:center;justify-content:center;-webkit-transition:background .14s;transition:background .14s}
.h5-act:hover{background:rgba(255,255,255,.3)}
.h5-act svg{width:15px;height:15px;fill:currentColor}
.h5-act.off{opacity:.55}

.encrypt-tip{flex:none;display:flex;align-items:center;justify-content:center;gap:5px;background:#e9f0ff;background:var(--brand-soft);border-bottom:1px solid #c8daff;border-bottom:1px solid var(--brand-line);color:#0050ff;color:var(--brand);font-size:11.5px;padding:5px}
.encrypt-tip svg{width:11px;height:11px;fill:#0050ff;fill:var(--brand)}

/* ---------- 排队横幅 ---------- */
.queue-banner{flex:none;display:none;align-items:center;justify-content:center;gap:7px;background:#f59e0b;background:var(--warn);color:#fff;font-size:12.5px;font-weight:500;padding:8px 12px}
.queue-banner.show{display:flex}
.queue-banner .qd{width:7px;height:7px;border-radius:50%;background:#fff;opacity:.9;-webkit-animation:qd 1s infinite;animation:qd 1s infinite}
@keyframes qd{0%,100%{opacity:.3}50%{opacity:1}}

/* ---------- 消息区 ---------- */
.h5-body{-ms-flex:1 1 0%;flex:1 1 0%;overflow-y:auto;overflow-x:hidden;padding:16px 12px 12px;background:#f2f5fa;background:var(--bg);-webkit-overflow-scrolling:touch}
.h5-body::-webkit-scrollbar{width:6px}
.h5-body::-webkit-scrollbar-thumb{background:#d3dae5;background:var(--line-2);border-radius:3px}

/* 项55：头像顶对齐 flex-start（用户拍板否决上一轮居中验收）；-ms-flex-align:start 兼容 IE11 */
.msg{display:flex;gap:9px;margin-bottom:10px;max-width:86%;-ms-flex-align:start;align-items:flex-start;-webkit-animation:mIn .2s ease;animation:mIn .2s ease}
@keyframes mIn{from{opacity:0;-webkit-transform:translateY(6px);transform:translateY(6px)}to{opacity:1;-webkit-transform:none;transform:none}}
.msg.mine{margin-left:auto;flex-direction:row-reverse}
/* 头像统一 34px 正圆（AI=绿/客服=蓝灰/自己=品牌蓝，视觉一致） */
.msg .avatar{width:34px;height:34px;border-radius:50%;flex:none;font-size:14px;color:#fff;font-weight:600;display:flex;align-items:center;justify-content:center;background:#7b8ca8}
.msg.mine .avatar{background:#0050ff;background:var(--brand)}
.msg.ai .avatar{background:#0f9d6e;background:var(--ok)}
.msg.sysmsg{max-width:100%;justify-content:center;display:flex}
.msg.sysmsg .bubble{background:transparent;color:#94a3b8;color:var(--muted);font-size:11.5px;padding:0;border:none;box-shadow:none;text-align:center}
.msg-col{min-width:0;display:flex;flex-direction:column}
.msg.mine .msg-col{align-items:flex-end}
/* 气泡：统一 14px 大圆角 + 贴头像侧 4px 小尖角；内边距 10px 13px；行高 1.55 */
.bubble{background:#ffffff;background:var(--card);color:#0f172a;color:var(--text);border:1px solid #e4e9f1;border:1px solid var(--line);padding:10px 13px;border-radius:14px;word-break:break-word;white-space:pre-wrap;box-shadow:0 4px 16px rgba(15,23,42,.08);box-shadow:var(--shadow);line-height:1.55;font-size:14px}
.msg:not(.mine):not(.sysmsg) .bubble{border-radius:4px 14px 14px 14px}
.msg.mine .bubble{background:#0050ff;background:var(--bubble);border-color:#0050ff;border-color:var(--bubble);color:#fff;border-radius:14px 4px 14px 14px}
/* v51 需求2：客服/AI（对方侧）文字气泡——白色背景 + 略明显的淡阴影 + 实边框，
   与聊天区底色拉开层次，一眼分得清"这是对方发的"；
   自己发的文字/语音气泡维持主题色不变。 */
/* v52 需求2：阴影整体调淡（原 .13 偏重，客户侧看着发灰），改为两层极淡投影，
   只保留"浮起来一点"的层次感；圆角统一为 14px 系，左上/右上做差角形成气泡尾巴。 */
.msg:not(.mine):not(.sysmsg):not(.ai) .bubble{
  background:#fff;background:var(--card,#fff);
  border:1px solid #e8edf5;border:1px solid var(--line-2,#e8edf5);
  border-radius:4px 14px 14px 14px;
  box-shadow:0 1px 2px rgba(15,23,42,.05),0 2px 6px rgba(15,23,42,.04)}
/* AI 气泡：同为白底淡阴影（与客服一致），只用一条品牌色左边条做轻微区分 */
.msg.ai .bubble{background:#fff;background:var(--card,#fff);
  border:1px solid #e8edf5;border:1px solid var(--line-2,#e8edf5);
  border-radius:4px 14px 14px 14px;
  box-shadow:0 1px 2px rgba(15,23,42,.05),0 2px 6px rgba(15,23,42,.04);
  border-left:3px solid #0f9d6e;border-left:3px solid var(--ok,#0f9d6e)}
/* 自己发的气泡：主题色 + 同色系淡投影（与对面白底气泡层次一致） */
.msg.mine .bubble{border-radius:14px 4px 14px 14px;
  box-shadow:0 1px 2px rgba(0,80,255,.14),0 2px 8px rgba(0,80,255,.12)}
.msg-time{font-size:10px;color:#94a3b8;color:var(--muted);margin-top:3px;padding:0 3px}
.msg-status{font-size:10.5px;color:#94a3b8;color:var(--muted);margin-top:3px;padding:0 3px}
.msg-status.fail{color:#e11d48;color:var(--danger)}
/* v20 双语：客服消息中文原文气泡下方的客户语言译文小灰字 */
.msg-translate{margin-top:5px;padding:5px 9px;border-top:1px dashed rgba(148,163,184,.45);font-size:12px;line-height:1.55;color:#94a3b8;color:var(--muted);word-break:break-word;white-space:pre-wrap}
.msg-translate .mt-tag{display:inline-block;font-size:10px;line-height:1;margin-right:5px;padding:1px 4px;border-radius:3px;background:#eef2f7;background:var(--brand-soft,#eef2f7);color:#64748b;color:var(--muted);vertical-align:1px}
/* 翻译开关关闭时：客户侧隐藏所有译文小灰字（与大厅 #hallBody:not(.translate-on) 同口径） */
#chatBody:not(.translate-on) .msg-translate{display:none}

.bubble img.msg-img{max-width:200px;max-height:200px;border-radius:9px;display:block;cursor:pointer}
.msg.mine .bubble img.msg-img{border:0}
/* 项53：纯图片消息气泡去内边距/边框，仅留圆角（图文混排仍走普通 .bubble） */
.bubble.img-bubble{padding:0;border:0;box-shadow:none}
.bubble.img-bubble img.msg-img{max-width:200px;max-height:200px;border-radius:10px;display:block}

/* v51 需求2：图片消息彻底去掉气泡外壳——不套 .bubble，无背景/边框/阴影，
   只有图片本体 + 圆角；尺寸按容器自适应（比文字气泡里的图小一圈），
   小屏自动再缩小，避免大图把聊天区顶满。 */
.img-only{display:inline-block;max-width:100%;line-height:0;border-radius:12px;overflow:hidden;background:transparent}
.img-only img.msg-img{display:block;border-radius:12px;cursor:pointer;
  width:auto;height:auto;max-width:150px;max-height:150px;object-fit:cover}
.msg.mine .img-only{margin-left:auto}
@media (max-width:480px){
  .img-only img.msg-img{max-width:120px;max-height:120px}
}

/* 媒体过期占位（图片/语音）：灰底灰字，不渲染真实图/音频 */
.bubble.media-expired-bubble{background:#f1f5f9;background:var(--expired-bg,#f1f5f9);border-color:#e2e8f0;border-color:var(--expired-line,#e2e8f0);color:#94a3b8;color:var(--muted,#94a3b8);box-shadow:none}
.bubble.media-expired-bubble .media-expired-tip{font-size:12.5px;color:inherit}
html.dark .bubble.media-expired-bubble{background:#262b36;border-color:#333a48;color:#8a93a6}

/* ---------- v51 需求3：天气 / 快递结构化卡片 ---------- */
.wx-card{width:250px;max-width:100%;background:#fff;background:var(--card,#fff);border:1px solid #e4e9f1;border:1px solid var(--line);border-radius:12px;overflow:hidden;box-shadow:0 3px 12px rgba(15,23,42,.10);margin:2px 0}
.msg.mine .wx-card{margin-left:auto}
.wx-card .wc-hd{display:flex;align-items:center;gap:6px;padding:9px 12px;font-size:12.5px;color:#334155;color:var(--sub,#334155);border-bottom:1px solid #eef2f7;border-bottom:1px solid var(--line)}
.wx-card .wc-hd i{color:#0284c7}
.wx-card .wc-hd b{-ms-flex:1 1 0%;flex:1 1 0%;font-weight:600;font-size:12.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.wx-card .wc-time,.wx-card .lc-status{font-size:10.5px;color:#94a3b8;color:var(--muted);flex:none}
.wx-card .lc-status{padding:1px 6px;border-radius:8px;background:#eef2f7;background:var(--brand-soft,#eef2f7);color:#334155;color:var(--sub,#334155)}
/* 天气卡片 */
.weather-card .wc-body{display:flex;align-items:center;gap:14px;padding:12px}
.weather-card .wc-temp{font-size:32px;font-weight:700;color:#0284c7;line-height:1}
.weather-card .wc-temp span{font-size:14px;font-weight:500;margin-left:1px}
.weather-card .wc-info{min-width:0}
.weather-card .wc-txt{font-size:14px;font-weight:600;color:#0f172a;color:var(--text)}
.weather-card .wc-sub{font-size:11.5px;color:#94a3b8;color:var(--muted);margin-top:3px}
.weather-card .wc-ft{padding:7px 12px;border-top:1px solid #eef2f7;border-top:1px solid var(--line);font-size:11.5px;color:#64748b;color:var(--sub);background:#fafbfd}
/* 快递卡片 */
.logistics-card .lc-upd{padding:5px 12px 0;font-size:10.5px;color:#94a3b8;color:var(--muted)}
.logistics-card .lc-no{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:8px 12px 0;font-size:11.5px;color:#64748b;color:var(--sub)}
.logistics-card .lc-no>span:first-child{color:#94a3b8;color:var(--muted)}
.logistics-card .lc-no b{font-size:12.5px;color:#0f172a;color:var(--text);letter-spacing:.3px;font-weight:600}
.logistics-card .lc-copy{border:1px solid #dbe3ee;border:1px solid var(--line);background:#f8fafd;background:var(--bg);color:#64748b;color:var(--sub);font-size:10.5px;padding:1px 6px;border-radius:6px;cursor:pointer;line-height:1.7;font-family:inherit}
.logistics-card .lc-copy:active{background:#eef2f7}
.logistics-card .lc-no .lc-com{margin-left:auto;font-size:10.5px;color:#94a3b8;color:var(--muted)}
/* 派件员/网点电话：移动端可拨（lc-tel 用主题色 + 电话图标感），PC 端纯文本不可点 */
.logistics-card .lc-phones{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin:8px 12px 0;padding:6px 8px;border-radius:8px;background:#f0f7ff;background:var(--brand-soft,#f0f7ff);font-size:11.5px;color:#475569;color:var(--sub)}
.logistics-card .lc-phones>i{color:#0284c7;color:var(--brand,#0284c7)}
.logistics-card .lc-phone-list{display:flex;gap:10px;flex-wrap:wrap}
.logistics-card a.lc-tel{color:#0284c7;color:var(--brand,#0284c7);font-weight:600;text-decoration:none;border-bottom:1px dashed rgba(2,132,199,.5)}
.logistics-card .lc-tel-ro{color:#334155;color:var(--text);font-weight:600}
/* 阶段条：揽收 → 运输 → 派件 → 签收 */
.logistics-card .lc-steps{display:flex;align-items:flex-start;padding:10px 10px 4px;position:relative}
.logistics-card .lc-step{flex:1 1 0;min-width:0;text-align:center;position:relative}
.logistics-card .lc-step-dot{width:22px;height:22px;margin:0 auto;border-radius:50%;background:#f1f5f9;background:var(--bg);color:#cbd5e1;display:flex;align-items:center;justify-content:center;font-size:10px;position:relative;z-index:1}
.logistics-card .lc-step-t{font-size:10.5px;color:#94a3b8;color:var(--muted);margin-top:3px;white-space:nowrap}
.logistics-card .lc-step:not(:last-child):after{content:'';position:absolute;top:11px;left:50%;width:100%;height:2px;background:#eef2f7;background:var(--line);z-index:0}
.logistics-card .lc-step.done .lc-step-dot{background:#d1fae5;color:#059669}
.logistics-card .lc-step.done .lc-step-t{color:#059669}
.logistics-card .lc-step.done:not(:last-child):after{background:#a7f3d0}
.logistics-card .lc-step.cur .lc-step-dot{background:#0284c7;color:#fff;box-shadow:0 0 0 3px rgba(2,132,199,.18)}
.logistics-card .lc-step.cur .lc-step-t{color:#0284c7;font-weight:600}
.logistics-card .lc-step.bad .lc-step-dot{background:#e11d48;color:#fff;box-shadow:0 0 0 3px rgba(225,29,72,.16)}
.logistics-card .lc-step.bad .lc-step-t{color:#e11d48;font-weight:600}
.logistics-card .lc-bad-tip{position:absolute;left:12px;right:12px;bottom:-4px;font-size:10.5px;color:#e11d48;text-align:left}
.logistics-card .lc-bad-tip i{margin-right:3px}
.logistics-card .lc-trace{padding:8px 12px 10px;border-top:1px solid #eef2f7;border-top:1px solid var(--line);margin-top:10px}
.logistics-card .lc-item{display:flex;gap:8px;position:relative;padding:5px 0}
.logistics-card .lc-item .lc-dot{flex:none;width:7px;height:7px;border-radius:50%;background:#cbd5e1;margin-top:5px}
.logistics-card .lc-item.cur .lc-dot{background:#0284c7;box-shadow:0 0 0 3px rgba(2,132,199,.18)}
.logistics-card .lc-item.signed .lc-dot{background:#059669;box-shadow:0 0 0 3px rgba(5,150,105,.16)}
.logistics-card .lc-item.deliver .lc-dot{background:#f59e0b}
.logistics-card .lc-item.problem .lc-dot{background:#e11d48}
.logistics-card .lc-item:not(:last-child):before{content:'';position:absolute;left:3px;top:14px;bottom:-6px;width:1px;background:#e2e8f0}
.logistics-card .lc-main{min-width:0}
.logistics-card .lc-desc{font-size:12.5px;line-height:1.5;color:#0f172a;color:var(--text);word-break:break-word}
.logistics-card .lc-item.cur .lc-desc{font-weight:600}
.logistics-card .lc-time{font-size:11px;color:#94a3b8;color:var(--muted);margin-top:2px}
.logistics-card .lc-empty{font-size:12px;color:#94a3b8;color:var(--muted);padding:6px 0}
.logistics-card .lc-more{display:block;width:100%;border:0;border-top:1px dashed #eef2f7;border-top:1px dashed var(--line);background:transparent;color:#0284c7;color:var(--brand,#0284c7);font-size:11.5px;padding:7px 0 2px;cursor:pointer;font-family:inherit}
.logistics-card .lc-more i{margin-right:4px;transition:transform .18s}
.logistics-card .lc-more.open i{transform:rotate(180deg)}
html.dark .wx-card{background:#ffffff;background:var(--card);border-color:#e4e9f1;border-color:var(--line)}
html.dark .wx-card .wc-ft{background:rgba(255,255,255,.03)}

/* 商品卡片（与接待大厅 .prod-msg 对齐：媒体区+名称+描述+价格/详情按钮） */
.prod-card{width:230px;background:#ffffff;background:var(--card);border:1px solid #e4e9f1;border:1px solid var(--line);border-radius:11px;overflow:hidden;display:block;text-decoration:none;color:#0f172a;color:var(--text)}
.msg.mine .prod-card{border-color:#c8daff;border-color:var(--brand-line)}
.prod-card .pc-img{width:100%;height:96px;object-fit:cover;display:block;background:#f2f5fa;background:var(--bg)}
.prod-card .pc-img.pc-ph{display:flex;align-items:center;justify-content:center;background:#e9f0ff;background:var(--brand-soft);color:#0050ff;color:var(--brand)}
.prod-card .pc-bd{padding:9px 11px}
.prod-card .pc-title{font-size:13px;font-weight:700;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.prod-card .pc-desc{font-size:12px;color:#64748b;color:var(--sub);margin-top:3px;line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.prod-card .pc-foot{display:flex;justify-content:space-between;align-items:center;margin-top:8px}
.prod-card .pc-price{color:#e11d48;color:var(--danger);font-weight:800;font-size:14px}
.msg.mine .prod-card .pc-price{color:#e11d48;color:var(--danger)}
.prod-card .pc-btn{font-size:11.5px;padding:3px 10px;border-radius:6px;background:#0050ff;background:var(--brand);color:#fff;text-decoration:none;white-space:nowrap}
.prod-card .pc-btn:hover{background:#3d7bff;background:var(--brand-d)}
/* 产品卡片标题行：标题 + 来源渠道角标 */
.prod-card .pc-head{display:flex;align:flex-start;justify-content:space-between;gap:6px}
.prod-card .pc-head .pc-title{-ms-flex:1 1 0%;flex:1 1 0%;min-width:0}
/* 来源渠道角标：官方=蓝、拼多多=红、淘宝/天猫=橙、京东=红、其他=灰 */
.pm-channel{flex:none;display:inline-block;font-size:10px;line-height:1;padding:3px 6px;border-radius:4px;color:#fff;font-weight:600;margin-top:1px;white-space:nowrap;letter-spacing:.2px}
.pm-ch-official{background:#0050ff;background:var(--brand)}
.pm-ch-pdd{background:#e11d48;background:var(--danger)}
.pm-ch-taobao{background:#ff7a00}
.pm-ch-jd{background:#e11d48;background:var(--danger)}
.pm-ch-other{background:#94a3b8;background:var(--muted)}

/* 知识库富文本气泡（answerType=richtext，内容为后端可信 HTML） */
.rich-bubble{white-space:normal}
.rich-bubble p{margin:4px 0}
.rich-bubble p:first-child{margin-top:0}
.rich-bubble p:last-child{margin-bottom:0}
.rich-bubble img{max-width:100%;height:auto;border-radius:8px;display:block;margin:4px 0}
/* v29 项20：富文本/KB 气泡里的图片，RTE 设置了显式宽高（行内 style）时不被通用消息图 200px 上限截断；
   仍保留 max-width:100% 防溢出；显式行内 width/height 优先级高于本表，尺寸设置生效。 */
.rich-bubble img.msg-img,.kb-bubble img.msg-img{max-width:100%;max-height:none}
/* v29 项5：AI 推荐产品卡片列表间距 */
.prod-list .prod-card{margin-bottom:8px}
.prod-list .prod-card:last-child{margin-bottom:0}
.rich-bubble a{color:#0050ff;color:var(--brand);word-break:break-all;text-decoration:underline}
.rich-bubble ul,.rich-bubble ol{margin:4px 0;padding-left:20px}
.rich-bubble li{margin:2px 0}
.rich-bubble strong,.rich-bubble b{font-weight:700}
.rich-bubble em{font-style:italic}

/* 空态 / 连接状态 */
.hint-line{text-align:center;color:#94a3b8;color:var(--muted);font-size:11.5px;margin:6px 0 14px}

/* ---------- 快捷操作 ---------- */
.quick-ops{position:relative;flex:none;display:flex;gap:7px;overflow-x:auto;padding:8px 12px;background:#ffffff;background:var(--card);border-top:1px solid #e4e9f1;border-top:1px solid var(--line)}
.quick-ops::-webkit-scrollbar{height:0}
.quick-ops:empty{display:none}
/* 项61：横向滚动右侧渐隐遮罩，提示可滑动（静态遮罩，滚动到边缘不消失也接受；pointer-events 穿透） */
.quick-ops::after{content:'';position:absolute;top:0;right:0;width:26px;height:100%;pointer-events:none;
  background:linear-gradient(to right,rgba(255,255,255,0),#ffffff);
  background:#ffffff;background:linear-gradient(to right,rgba(255,255,255,0),var(--card))}
.qop-chip{flex:none;padding:6px 12px;border-radius:16px;background:#e9f0ff;background:var(--brand-soft);color:#0050ff;color:var(--brand);border:1px solid #c8daff;border:1px solid var(--brand-line);font-size:12.5px;cursor:pointer;white-space:nowrap;-webkit-transition:background .15s,color .15s;transition:background .15s,color .15s}
.qop-chip:hover,.qop-chip:active{background:#0050ff;background:var(--brand);color:#fff;border-color:#0050ff;border-color:var(--brand)}

/* ---------- 输入区 ---------- */
.h5-foot{flex:none;background:#ffffff;background:var(--card);border-top:1px solid #e4e9f1;border-top:1px solid var(--line);padding:8px 10px calc(8px + env(safe-area-inset-bottom));position:relative}
.h5-tools{display:flex;gap:2px;align-items:center;margin-bottom:6px}
.tbtn{width:30px;height:30px;border-radius:8px;border:0;background:transparent;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;color:#64748b;color:var(--sub);-webkit-transition:background .14s;transition:background .14s}
.tbtn:hover{background:#e9f0ff;background:var(--brand-soft);color:#0050ff;color:var(--brand)}
.tbtn svg{width:18px;height:18px;fill:currentColor}
.h5-input-row{display:flex;gap:8px;align-items:flex-end}
#msgInput{-ms-flex:1 1 0%;flex:1 1 0%;min-width:0;resize:none;border:1px solid #d3dae5;border:1px solid var(--line-2);background:#f2f5fa;background:var(--bg);border-radius:10px;padding:9px 12px;font-size:14px;outline:none;color:#0f172a;color:var(--text);max-height:100px;line-height:1.4;-webkit-transition:border-color .16s,box-shadow .16s;transition:border-color .16s,box-shadow .16s;overflow-y:hidden;}
#msgInput:focus{border-color:#0050ff;border-color:var(--brand);background:#ffffff;background:var(--card);box-shadow:0 0 0 3px #e9f0ff;box-shadow:0 0 0 3px var(--brand-soft)}
#sendBtn{flex:none;width:42px;height:42px;border-radius:10px;border:0;cursor:pointer;background:#0050ff;background:var(--brand);color:#fff;display:flex;align-items:center;justify-content:center;-webkit-transition:background .16s;transition:background .16s}
#sendBtn:hover{background:#3d7bff;background:var(--brand-d)}
#sendBtn:disabled{background:#d3dae5;background:var(--line-2);cursor:not-allowed}
#sendBtn svg{width:18px;height:18px;fill:#fff}

/* 表情面板 */
/* 第十九轮（项3）：宽度与网格列数匹配防溢出。
   - 基础规则去掉 grid（IE11 不认 display:grid 会回落到 display:none 导致面板打不开），
     先给 flex 兜底（IE11/旧 Safari 走 flex-wrap），现代浏览器再用 grid 覆盖；
   - 格子统一 20px 字号+4px padding ≈ 28px/格，8 列 ≈ 252px + 内边距 20px ≈ 272px ≤ 280px；
   - overflow:hidden 双保险，表情格绝不溢出框外。 */
.emoji-panel{position:absolute;left:10px;bottom:74px;z-index:30;background:#ffffff;background:var(--card);border:1px solid #e4e9f1;border:1px solid var(--line);border-radius:12px;box-shadow:0 12px 40px rgba(15,23,42,.16);box-shadow:var(--shadow-md);padding:10px;display:none;overflow:hidden;max-width:340px;box-sizing:border-box}
.emoji-panel.show{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:5px}
/* 项58：PC 态（>480px）10 列、面板加宽到 340px；移动态媒体查询降 6 列防溢出 */
.emoji-panel.show{display:flex;flex-wrap:wrap;display:grid;grid-template-columns:repeat(10,1fr);gap:5px;-webkit-animation:popIn .16s ease;animation:popIn .16s ease}
@keyframes popIn{from{opacity:0;-webkit-transform:translateY(4px);transform:translateY(4px)}to{opacity:1;-webkit-transform:none;transform:none}}
.emoji-panel span{font-size:20px;line-height:1;text-align:center;cursor:pointer;padding:4px;border-radius:6px;box-sizing:border-box}
.emoji-panel span:hover{background:#e9f0ff;background:var(--brand-soft)}
/* 移动端窄屏：媒体查询覆盖为视口宽度并降 6 列适配（IE11 支持 calc()） */
@media (max-width:480px){
  .emoji-panel{max-width:calc(100vw - 24px)}
  .emoji-panel.show{grid-template-columns:repeat(6,1fr);gap:4px}
}

/* ---------- 遮罩：手机号验证 ---------- */
.mask{position:absolute;top:0;right:0;bottom:0;left:0;inset:0;background:rgba(9,14,26,.5);display:none;align-items:center;justify-content:center;padding:18px;z-index:40}
.mask.show{display:flex}
.mask-card{background:#ffffff;background:var(--card);border-radius:14px;padding:22px 20px;width:100%;max-width:320px;box-shadow:0 12px 40px rgba(15,23,42,.16);box-shadow:var(--shadow-md)}
.mask-card h4{margin:0 0 6px;font-size:16px;color:#0f172a;color:var(--text)}
.mask-card p{margin:0 0 16px;font-size:12.5px;color:#64748b;color:var(--sub);line-height:1.6}
.fld{margin-bottom:11px;display:flex;gap:8px}
.fld input{-ms-flex:1 1 0%;flex:1 1 0%;min-width:0;border:1px solid #d3dae5;border:1px solid var(--line-2);background:#f2f5fa;background:var(--bg);border-radius:9px;padding:10px 12px;font-size:14px;outline:none;color:#0f172a;color:var(--text)}
.fld input:focus{border-color:#0050ff;border-color:var(--brand);background:#ffffff;background:var(--card)}
.code-btn{flex:none;border:1px solid #c8daff;border:1px solid var(--brand-line);background:#e9f0ff;background:var(--brand-soft);color:#0050ff;color:var(--brand);border-radius:9px;padding:0 12px;font-size:12.5px;cursor:pointer;white-space:nowrap;-webkit-transition:background .16s;transition:background .16s}
.code-btn:hover{background:#c8daff;background:var(--brand-line)}
.code-btn:disabled{color:#94a3b8;color:var(--muted);background:#f2f5fa;background:var(--bg);border-color:#e4e9f1;border-color:var(--line);cursor:not-allowed}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;border:0;cursor:pointer;border-radius:10px;padding:10px 14px;font-size:13.5px;font-weight:500;-webkit-transition:opacity .15s,background .15s;transition:opacity .15s,background .15s}
.btn-primary{background:#0050ff;background:var(--brand);color:#fff;width:100%}
.btn-primary:hover{background:#3d7bff;background:var(--brand-d)}
.btn-line{background:transparent;border:1px solid #d3dae5;border:1px solid var(--line-2);color:#334155;color:var(--text-2)}
.mask-sub{text-align:center;margin-top:12px;font-size:12px;color:#94a3b8;color:var(--muted);cursor:pointer}

/* ---------- 遮罩：满意度评价 ---------- */
.rate-card{text-align:center;max-width:330px}
.rate-stars{display:flex;justify-content:center;gap:8px;font-size:32px;margin:6px 0 14px}
.rate-stars span{color:#d3dae5;color:var(--line-2);cursor:pointer;-webkit-transition:color .14s,transform .14s;transition:color .14s,transform .14s}
.rate-stars span.on{color:#f59e0b;color:var(--warn)}
.rate-stars span:hover{-webkit-transform:scale(1.12);transform:scale(1.12)}
#rateText{width:100%;height:70px;resize:none;border:1px solid #d3dae5;border:1px solid var(--line-2);background:#f2f5fa;background:var(--bg);border-radius:9px;padding:10px 12px;font-size:13px;outline:none;color:#0f172a;color:var(--text)}
.rate-row{display:flex;gap:8px;margin-top:14px}
.rate-row .btn{-ms-flex:1 1 0%;flex:1 1 0%}

/* 第二十八轮（按用户口径）：客户头像一律默认图——原「更换我的头像」弹层预设网格
   （.av-grid）与「自己消息头像可点」指针样式随弹层一并移除，无残留引用 */

/* 结束页 */
.end-card{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:30px 20px;text-align:center}
.end-icon{width:64px;height:64px;border-radius:50%;background:#e6f6f0;background:var(--ok-soft);color:#0f9d6e;color:var(--ok);display:flex;align-items:center;justify-content:center;font-size:28px;margin-bottom:14px}
.end-icon svg{width:30px;height:30px;fill:#0f9d6e;fill:var(--ok)}
.end-card h3{margin:0 0 6px;color:#0f172a;color:var(--text);font-size:17px}
.end-card p{margin:0;color:#64748b;color:var(--sub);font-size:13px}

/* ---------- 图片查看器 ---------- */
.img-viewer{position:fixed;top:0;right:0;bottom:0;left:0;inset:0;background:rgba(6,10,20,.92);z-index:999;display:none;align-items:center;justify-content:center;padding:24px}
.img-viewer.show{display:flex}
.img-viewer img{max-width:96%;max-height:96%;border-radius:10px}

/* ---------- Toast ---------- */
#toastBox{position:fixed;left:50%;bottom:80px;-webkit-transform:translateX(-50%);transform:translateX(-50%);z-index:9999;display:flex;flex-direction:column;align-items:center;gap:8px;pointer-events:none}
.toast{background:rgba(15,23,42,.92);color:#fff;font-size:13px;padding:9px 16px;border-radius:20px;box-shadow:0 12px 40px rgba(15,23,42,.16);box-shadow:var(--shadow-md);-webkit-animation:mIn .2s ease;animation:mIn .2s ease;max-width:80vw;text-align:center}
.toast.warn{background:rgba(225,29,72,.95)}

/* 加载中 */
.loading-box{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;color:#94a3b8;color:var(--muted);font-size:13px;gap:12px}
.spinner{width:26px;height:26px;border:3px solid #d3dae5;border:3px solid var(--line-2);border-top-color:#0050ff;border-top-color:var(--brand);border-radius:50%;-webkit-animation:spin .8s linear infinite;animation:spin .8s linear infinite}
@keyframes spin{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}

@media (max-width:480px){.msg{max-width:88%}
  .bubble{font-size:13.5px}}

/* ---------- 悬浮气泡（独立 H5 缩回；嵌入模式由外层 widget 气泡接管） ---------- */
.h5-bubble{position:fixed;right:20px;bottom:20px;z-index:1000;display:none;align-items:center;gap:8px;height:48px;padding:0 18px;border:0;cursor:pointer;border-radius:24px;background:#0050ff;background:var(--brand);color:#fff;box-shadow:0 8px 22px rgba(0,80,255,.35);font-size:14px;font-weight:600}
.h5-bubble.show{display:flex}
.h5-bubble:hover{background:#3d7bff;background:var(--brand-d)}
.h5-bubble svg{width:20px;height:20px;fill:#fff}
.hb-badge{position:absolute;top:-4px;right:-4px;min-width:18px;height:18px;padding:0 5px;background:#e11d48;background:var(--danger);color:#fff;font-size:10.5px;line-height:18px;text-align:center;border-radius:9px;border:2px solid #fff;display:none;box-sizing:content-box;font-weight:600}
.hb-badge.show{display:block}
body.embed .h5-bubble{display:none !important}
/* v66：独立 H5 气泡按嵌入聊天应用设置的位置（pos=br/bl/ml/mr）定位。
   此前写死右下角——管理员把应用位置设成左下/左中/右中，独立外链的气泡仍钉在右下。
   body 上的 bubble-* 类由 h5.js 按 URL ?pos= 与 /api/embed/config 的 pos 维护，缺省 br。 */
body.bubble-bl .h5-bubble{right:auto;left:20px}
body.bubble-ml .h5-bubble{right:auto;left:20px;top:50%;bottom:auto;-webkit-transform:translateY(-50%);transform:translateY(-50%)}
body.bubble-mr .h5-bubble{top:50%;bottom:auto;-webkit-transform:translateY(-50%);transform:translateY(-50%)}

/* ---------- 图片底部菜单（发送相册 / 拍摄相机） ---------- */
.sheet-mask{position:absolute;top:0;right:0;bottom:0;left:0;inset:0;background:rgba(9,14,26,.45);display:none;z-index:30}
.sheet-mask.show{display:block}
.action-sheet{position:absolute;left:0;right:0;bottom:0;z-index:46;background:#ffffff;background:var(--card);border-radius:16px 16px 0 0;padding:8px 12px calc(12px + env(safe-area-inset-bottom));box-shadow:0 -8px 30px rgba(15,23,42,.18);display:none;flex-direction:column;gap:2px}
.action-sheet.show{display:flex;-webkit-animation:sheetUp .2s ease;animation:sheetUp .2s ease}
@keyframes sheetUp{from{-webkit-transform:translateY(30px);transform:translateY(30px);opacity:.6}to{-webkit-transform:none;transform:none;opacity:1}}
.as-title{text-align:center;color:#94a3b8;color:var(--muted);font-size:12px;padding:10px 0 6px}
.as-item{display:flex;align-items:center;gap:10px;border:0;background:transparent;cursor:pointer;padding:13px 10px;font-size:14.5px;color:#0f172a;color:var(--text);border-radius:10px}
.as-item svg{width:20px;height:20px;fill:#64748b;fill:var(--sub);flex:none}
.as-item:hover,.as-item:active{background:#e9f0ff;background:var(--brand-soft)}
.as-cancel{justify-content:center;color:#64748b;color:var(--sub);border-top:1px solid #e4e9f1;border-top:1px solid var(--line);margin-top:6px}
/* ============================================================
   [IE11 / Safari 兼容补丁 · 2026-10 迭代]
   1. 遮罩弹窗 fixed 全屏居中（替代 absolute+inset）
   2. msgInput 防 iOS 自动放大（16px）+ placeholder 兼容
   3. 刘海屏安全区回退
   ============================================================ */
.mask{
  position:fixed;top:0;left:0;right:0;bottom:0;
  background:rgba(9,14,26,.5);
  background:rgba(9,14,26,.5);
  display:none;
  -ms-flex-align:center;-ms-flex-pack:center;
  align-items:center;justify-content:center;
  padding:18px;z-index:60;
}
.sheet-mask{
  position:fixed;top:0;left:0;right:0;bottom:0;
  background:rgba(9,14,26,.45);display:none;z-index:30;
}
.img-viewer{
  position:fixed;top:0;left:0;right:0;bottom:0;
  background:rgba(6,10,20,.92);z-index:999;
  display:none;-ms-flex-align:center;-ms-flex-pack:center;
  align-items:center;justify-content:center;padding:24px;
}
/* 输入框 iOS 聚焦不自动放大：font-size>=16px */
#msgInput{
  font-size:16px;
  -webkit-appearance:none;-webkit-border-radius:10px;
}
#msgInput::-webkit-input-placeholder{color:#94a3b8}
#msgInput:-ms-input-placeholder{color:#94a3b8}
#msgInput::placeholder{color:#94a3b8}
.fld input{
  font-size:16px;-webkit-appearance:none;
}
.fld input::-webkit-input-placeholder{color:#94a3b8}
.fld input:-ms-input-placeholder{color:#94a3b8}
/* 底部栏安全区回退（env 不支持时退回 8px） */
.h5-foot{
  padding-bottom:8px;
  padding-bottom:calc(8px + env(safe-area-inset-bottom));
}
.action-sheet{
  padding-bottom:12px;
  padding-bottom:calc(12px + env(safe-area-inset-bottom));
}
/* 小屏不溢出 */
@media (max-width:480px){
  .mask-card{max-width:92vw}
  .bubble img.msg-img{max-width:160px;max-height:160px}
  .h5-foot{padding-left:6px;padding-right:6px}
}

/* ============================================================
   第十二轮迭代：欢迎语下方竖排常见问题 / KB 富内容块 / 输入计数
   ============================================================ */
/* 竖排常见问题列表：每个问题一行，整行可点 */
.quick-list{margin:2px 0 14px;display:block}
.quick-list:empty{display:none}
.qop-row{
  display:block;width:100%;text-align:left;cursor:pointer;
  padding:10px 12px;margin:0 0 6px;
  background:#ffffff;background:var(--card);
  color:#0050ff;color:var(--brand);
  border:1px solid #c8daff;border:1px solid var(--brand-line);
  border-radius:10px;font-size:13.5px;line-height:1.4;
  white-space:normal;-webkit-transition:background .15s,color .15s;transition:background .15s,color .15s;
}
.qop-row:hover,.qop-row:active{background:#e9f0ff;background:var(--brand-soft)}

/* KB 富内容气泡内块 */
.kb-bubble{display:block;max-width:260px}
.kb-text{word-break:break-word;white-space:pre-wrap;margin:2px 0}
.kb-text + .kb-text{margin-top:6px}
.kb-media{margin:4px 0}
.kb-media img.msg-img{max-width:220px;max-height:220px;border-radius:8px;display:block;cursor:pointer}
.kb-link{
  display:block;margin:5px 0;padding:7px 10px;border-radius:8px;
  background:#e9f0ff;background:var(--brand-soft);
  color:#0050ff;color:var(--brand);font-size:13px;word-break:break-all;
}
.kb-phone{
  display:inline-block;margin:5px 0;padding:7px 12px;border-radius:16px;
  background:#e6f6f0;background:var(--ok-soft);
  color:#0f9d6e;color:var(--ok);font-size:13px;font-weight:600;text-decoration:none;
}
.kb-prod{margin:5px 0}
.kb-prod .prod-card{width:220px}

/* 输入字数计数器 */
.h5-count{text-align:right;font-size:11px;color:#94a3b8;color:var(--muted);padding:0 2px 4px}

/* ============================================================
   [第十三轮] 项3：组合框右 10px 箭头（h5 防御性规则；当前 H5 页无 select，
   预留未来下拉使用。IE11 dataURI background 兼容。）
   ============================================================ */
select{
  -webkit-appearance:none;
  -moz-appearance:none;
  -webkit-appearance:none;
  background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 10px center;
  padding-right:28px;
}
html.dark select{
  background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ============================================================
   [第十三轮] 项5-CSS：H5 嵌入聊天窗 IE11 兼容再提升
   关键 flex 容器补 -ms-flexbox 前缀（外壳布局已有，此处补内层）
   ============================================================ */
.h5-header,.h5-actions,.encrypt-tip,.queue-banner.show,
.msg,.msg .avatar,.msg-col,.prod-card .pc-foot,
.quick-ops,.h5-input-row,#sendBtn,.rate-stars,.rate-row,
.end-card,#toastBox,.loading-box,.h5-bubble.show,
.action-sheet.show{
  display:-ms-flexbox;
}
.h5-header,.h5-actions,.encrypt-tip,.queue-banner.show,
.msg,.msg .avatar,.msg-col,.prod-card .pc-foot,
.quick-ops,.h5-input-row,#sendBtn,.rate-stars,.rate-row,
.end-card,#toastBox,.loading-box,.h5-bubble.show,
.action-sheet.show{
  display:flex;
}
.h5-act,.tbtn,.btn{display:-ms-inline-flexbox;display:inline-flex}
.msg-col,.end-card,#toastBox,.loading-box,.action-sheet{-ms-flex-direction:column;flex-direction:column}

/* ============================================================
   第十五轮 项4/5/6/7/9/12：嵌入端重设计
   约定：默认（窄栏/嵌入/手机）= 移动布局；body.pc-layout = PC 微信式窗口。
   ============================================================ */

/* ---------- 项5：评价入口图标重做（保留 #bindPhoneBtn id，新增美化 class） ---------- */
.h5-act.act-rate{background:rgba(255,255,255,.18);border-radius:50%}
.h5-act.act-rate:hover{background:rgba(255,255,255,.34)}
.h5-act.act-rate.on{background:#f59e0b;background:var(--warn)}

/* ---------- 项9：头部隐藏（show_header=false） ---------- */
body.no-header .h5-header{display:none}
body.no-header .encrypt-tip{display:none}
.float-trigger,.float-mask,.float-panel{display:none}
body.no-header .float-trigger{
  display:block;position:absolute;top:10px;right:12px;z-index:35;
  width:40px;height:40px;border-radius:50%;overflow:hidden;cursor:pointer;
  background:rgba(9,14,26,.55);border:1px solid rgba(255,255,255,.25);
  -webkit-box-shadow:0 4px 14px rgba(0,0,0,.25);box-shadow:0 4px 14px rgba(0,0,0,.25);
}
.float-trigger img{width:100%;height:100%;object-fit:cover;display:block}
.float-trigger .ft-more{position:absolute;left:0;right:0;bottom:2px;text-align:center;
  font-size:9px;line-height:1;color:#fff;letter-spacing:1px}
body.no-header .float-mask.show{
  display:block;position:absolute;top:0;left:0;right:0;bottom:0;
  background:rgba(9,14,26,.35);z-index:36;
}
body.no-header .float-panel.show{
  display:block;position:absolute;top:56px;right:12px;z-index:37;width:246px;
  background:rgba(9,14,26,.82);border-radius:14px;padding:12px;color:#fff;
  -webkit-box-shadow:0 10px 30px rgba(0,0,0,.32);box-shadow:0 10px 30px rgba(0,0,0,.32);
}
.fp-agent{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:10px;
  padding:2px 2px 10px;border-bottom:1px solid rgba(255,255,255,.15)}
.fp-agent.empty{display:none}
.fp-avatar{width:42px;height:42px;border-radius:50%;object-fit:cover;background:#fff;flex:none}
.fp-info{min-width:0;-ms-flex:1 1 0%;flex:1 1 0%}
.fp-name{font-size:14px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fp-phone{display:inline-block;margin-top:3px;font-size:12px;color:#7dd3fc;text-decoration:none}
.fp-actions{margin-top:6px}
.fp-btn{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px;
  width:100%;border:0;background:transparent;color:#fff;font-size:13.5px;
  padding:10px 6px;cursor:pointer;border-radius:9px;text-align:left}
.fp-btn:hover{background:rgba(255,255,255,.12)}
.fp-btn svg{width:17px;height:17px;fill:#fff;flex:none}
.fp-danger{color:#fda4af}
.fp-danger svg{fill:#fda4af}

/* ---------- 项6/项7：输入区重排（默认移动/窄栏：输入框在左 flex:1，工具条贴右） ---------- */
.h5-foot{
  display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;
  -ms-flex-align:flex-end;align-items:flex-end;gap:8px;
  padding:10px 10px 8px;padding:10px 10px calc(8px + env(safe-area-inset-bottom));
  max-width:100%;-ms-flex-wrap:nowrap;flex-wrap:nowrap;   /* v66：输入区永不换行、永不被撑宽 */
}
/* v66：工具行（表情/图片/计数/发送）在空间不足时于自身内部裁切，绝不撑宽输入区 */
.h5-tools{max-width:100%;-ms-flex-wrap:nowrap;flex-wrap:nowrap;overflow:hidden}
/* 项56/项4：字数计数由 JS 移入 #h5Tools（DOM 序 img→count→send），发送按钮 margin-left:auto 顶行尾；
   计数位于 imgBtn 之后、发送按钮之前。移动端（m-layout）隐藏字数标签。 */
.h5-count{text-align:right;line-height:34px;
  font-size:11px;color:#94a3b8;color:var(--muted);padding:0 4px;white-space:nowrap}
.m-layout .h5-count{display:none}
.h5-main{-ms-flex:1 1 0%;flex:1 1 0%;min-width:0}
.h5-input-wrap{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:flex-end;align-items:flex-end}
#msgInput{
  -ms-flex:1 1 0%;flex:1 1 0%;min-width:0;resize:none;
  border:1px solid #d3dae5;border:1px solid var(--line-2);
  background:#f2f5fa;background:var(--bg);border-radius:10px;
  padding:9px 12px;font-size:16px;line-height:1.4;outline:none;
  color:#0f172a;color:var(--text);height:40px;min-height:40px;max-height:120px;
  overflow-y:hidden;
  -webkit-appearance:none;-webkit-border-radius:10px;
  -webkit-transition:border-color .16s,box-shadow .16s;transition:border-color .16s,box-shadow .16s;
}
#msgInput:focus{border-color:#0050ff;border-color:var(--brand);background:#fff;background:var(--card);
  -webkit-box-shadow:0 0 0 3px #e9f0ff;-webkit-box-shadow:0 0 0 3px var(--brand-soft);
  box-shadow:0 0 0 3px #e9f0ff;box-shadow:0 0 0 3px var(--brand-soft)}
#msgInput::-webkit-input-placeholder{color:#94a3b8}
#msgInput:-ms-input-placeholder{color:#94a3b8}
#msgInput::placeholder{color:#94a3b8}
/* 发送按钮：默认(移动)态 = 工具行内小方图标按钮；PC 态见 body.pc-layout。
   第十七轮（项10）：按钮已由 h5.js 统一移入 #h5Tools，不再位于输入框右缘。 */
#sendBtn{
  flex:none;-ms-flex:none;width:38px;height:38px;margin-left:2px;border-radius:10px;border:0;
  cursor:pointer;background:#0050ff;background:var(--brand);color:#fff;
  display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;
  -ms-flex-pack:center;justify-content:center;-webkit-transition:background .16s,opacity .16s;transition:background .16s,opacity .16s;
}
#sendBtn .sb-icon{width:18px;height:18px;fill:#fff;display:block}
#sendBtn .sb-txt{display:none}
#sendBtn:hover{background:#3d7bff;background:var(--brand-d)}
#sendBtn:disabled{background:#d3dae5;background:var(--line-2);cursor:not-allowed}
.h5-foot.is-empty #sendBtn{opacity:.45}

/* 工具条（头像/表情/图片…）：移动态贴输入框右侧；PC 态见 body.pc-layout */
.h5-tools{flex:none;-ms-flex:none;margin-bottom:0;display:-ms-flexbox;display:flex;
  -ms-flex-direction:row;flex-direction:row;-ms-flex-align:flex-end;align-items:flex-end;gap:2px}

/* ---------- 第十七轮（项10）移动态：输入为空显图片图标，输入中图片图标变发送按钮 ----------
   body.m-layout = 移动/窄栏/嵌入（h5.js applyLayoutMode 切换）。
   输入为空：发送按钮隐藏、图片图标在位；.has-input（输入非空）：图片图标隐藏、发送按钮出现。
   body.pc-layout 下不命中这些规则，发送按钮恒为右侧文字按钮。 */
/* 输入栏布局：voiceBtn 由 JS 挪到 #h5Foot 首位（输入框左边），与输入框底对齐 */
.m-layout #voiceBtn{flex:none;-ms-flex:none;align-self:flex-end;margin-right:0}
.m-layout #sendBtn{display:none}
/* 输入有内容：图片图标位 → 文字「发送」按钮，背景取系统主题色 var(--brand)（不写死蓝） */
.m-layout .h5-foot.has-input #sendBtn{
  display:-ms-inline-flexbox;display:inline-flex;
  width:auto;height:34px;margin-left:2px;padding:0 14px;border-radius:8px;
  background:#0050ff;background:var(--brand);color:#fff;
}
.m-layout .h5-foot.has-input #sendBtn:hover{background:#3d7bff;background:var(--brand-d)}
.m-layout .h5-foot.has-input #sendBtn .sb-icon{display:none}
.m-layout .h5-foot.has-input #sendBtn .sb-txt{
  display:inline;font-size:14px;font-weight:600;line-height:1;letter-spacing:0;color:#fff;
}
.m-layout .h5-foot.has-input #imgBtn{display:none}
/* 项10-移动④：右侧保留图片图标；项57：移动态表情按钮常驻工具行左端（原 display:none 已移除），点击开/关 emojiPanel */
.m-layout .tbtn{width:34px;height:34px}
.m-layout .tbtn svg{width:22px;height:22px}

/* ---------- 第十八轮（项1）：头部隐藏模式浮层开关轻量过渡（IE11 降级为无动画即时显示） ---------- */
body.no-header .float-panel.show{-webkit-animation:fpIn .18s ease;animation:fpIn .18s ease}
@keyframes fpIn{from{opacity:0;-webkit-transform:translateY(-6px);transform:translateY(-6px)}to{opacity:1;-webkit-transform:none;transform:none}}

/* ---------- 项6 PC 布局（body.pc-layout）：输入框独占一行，工具行在下、发送文字按钮居右 ---------- */
body.pc-layout .h5-foot{
  -ms-flex-direction:column;flex-direction:column;-ms-flex-align:stretch;align-items:stretch;gap:0;
}
/* 项56：PC 态计数已在工具行内（margin-left:auto 跟随发送按钮），无需再绝对/静态定位 */
body.pc-layout .h5-count{padding:0 2px}
body.pc-layout .h5-main{width:100%}
/* 项10-PC①：输入框容器 100% 宽（发送按钮已移出，独占一行） */
body.pc-layout .h5-input-wrap{width:100%}
body.pc-layout #msgInput{min-height:76px;max-height:140px;font-size:14px}
/* 项10-PC②：发送按钮位于工具行 #h5Tools 内右侧（margin-left:auto 顶到行尾），文字「发送」 */
/* 第十八轮（项6）：「发送」文字 14px→15px、加粗 600，按钮纵向加高（padding 9px 22px）更醒目 */
body.pc-layout #sendBtn{
  display:-ms-inline-flexbox;display:inline-flex;width:auto;height:auto;margin-left:auto;
  padding:9px 22px;border-radius:10px;font-size:15px;font-weight:600;
}
body.pc-layout #sendBtn .sb-icon{display:none}
body.pc-layout #sendBtn .sb-txt{display:inline;font-size:15px;font-weight:600;line-height:1;letter-spacing:.5px}
body.pc-layout .h5-tools{-ms-flex-pack:start;justify-content:flex-start;margin-top:7px;gap:4px;-ms-flex-align:center;align-items:center}

/* ============================================================
   v63 需求：嵌入态 PC 布局的两种打开样式
   口径（与 v62 一致）：嵌入窗口内部与独立 H5 一样分 PC/移动两套样式、按设备自适应切换。
   在此基础上，PC 布局再按「嵌入聊天设置 - PC 端打开样式」分两档（body 上由 h5.js 挂类）：

     body.embed.pc-layout.pc-large  → 大窗口（面板 980×680）
        渲染**完整 PC 布局**：保留 228px 客服信息栏 + 消息列双栏，输入框/工具行/文字「发送」
        全部保持宽屏尺寸，观感与独立 H5 外链一致。这才是「pc 需要符合 pc 的样式」。

     body.embed.pc-layout.pc-small  → 小窗口（面板 384×600）
        保留 PC 布局结构（两行输入区 + 文字「发送」+ 字数计数），卸掉放不下的部分
        （信息侧栏）并收紧尺寸，使其完整落在窄面板内而不溢出挤压消息区。

   移动端（m-layout）与独立外链（pc-layout:not(.embed)）都不带这两个类，样式零改动。
   ============================================================ */

/* ---------- 小窗口：紧凑化（v62 那套，从通用 .embed.pc-layout 收窄到 .pc-small） ---------- */
/* 窄面板放不下 228px 信息侧栏（否则消息区只剩 ~150px），隐藏；头部已承载客服名/在线态 */
body.embed.pc-layout.pc-small .h5-side{display:none}
/* 输入框：76px 大方块 → 紧凑两行（与独立 PC 同结构，尺寸收窄） */
body.embed.pc-layout.pc-small #msgInput{min-height:44px;max-height:110px;font-size:14px}
body.embed.pc-layout.pc-small .h5-foot{padding:8px 10px 6px;padding:8px 10px calc(6px + env(safe-area-inset-bottom))}
body.embed.pc-layout.pc-small #sendBtn{padding:7px 16px;font-size:14px}
body.embed.pc-layout.pc-small .h5-tools{margin-top:5px}
/* 消息区左右留白收紧，气泡可用宽度最大化 */
body.embed.pc-layout.pc-small .h5-body{padding:12px 10px 10px}
/* 快捷按钮 chips 与消息区留一点呼吸 */
body.embed.pc-layout.pc-small .quick-ops{padding:6px 10px;gap:6px}

/* ---------- 大窗口：恢复完整 PC 双栏布局 ---------- */
/* 外壳改为横向双列（信息栏 + 主列），铺满整个面板（面板本身已是圆角卡片，内部不再套卡片） */
body.embed.pc-layout.pc-large .h5-shell{
  -ms-flex-direction:row;flex-direction:row;
  width:100%;height:100%;max-width:none;margin:0;
  border-radius:0;box-shadow:none;border:0;
}
/* 信息侧栏：宽度与独立 PC 一致（228px），纵向铺满 */
body.embed.pc-layout.pc-large .h5-side{
  display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;
  width:228px;flex:none;min-width:0;
  background:#f2f5fa;background:var(--bg);
  border-right:1px solid #e4e9f1;border-right:1px solid var(--line);
}
body.embed.pc-layout.pc-large .hs-agent{padding:16px 16px 12px}
body.embed.pc-layout.pc-large .hs-avatar-wrap{width:48px;height:48px;margin-bottom:8px}
/* 面板高度可能小于独立 PC 窗口，快捷按钮区与消息区留白略收一点点即可 */
body.embed.pc-layout.pc-large .h5-body{padding:14px 16px 10px}
/* v66：面板被宿主拖到较窄（<800px）时，信息栏才退场，避免消息区被挤到无法阅读。
   断点从 860 降到 800：980 基准的面板在 800~860 之间仍有 750+ 的消息区，
   双栏完全放得下——这条断点太宽是「大窗口丢了信息栏、看着像移动端拉宽」的帮凶。 */
@media (max-width:800px){
  body.embed.pc-layout.pc-large .h5-side{display:none}
}
/* v66：矮屏（笔记本半屏、宿主窗口不高）**不再整个藏掉信息栏**。
   旧规则在面板高 <620px 时把 228px 信息栏直接 display:none，双栏 PC 布局瞬间退化成
   「header + 消息 + 输入」的单列——视觉上和移动端样式拉宽一模一样，被用户判为
   「PC 端不是 H5 PC 样式」。改为收窄 + 隐藏次要行，双栏结构在任何高度都保持。 */
@media (min-width:769px) and (max-height:620px){
  body.embed.pc-layout.pc-large .h5-side{width:190px}
  body.embed.pc-layout.pc-large .hs-tip{display:none}
  body.embed.pc-layout.pc-large .hs-info{padding:6px 12px}
  body.embed.pc-layout.pc-large .hs-agent{padding:12px 12px 8px}
}

/* 窄屏 padding 收窄（项8） */
@media (max-width:480px){
  .h5-foot{padding-left:6px;padding-right:6px;gap:6px}
  #sendBtn{width:38px;height:38px}
}

/* 项71：结束提示条「开始新会话」按钮 */
#newSessionBtn{display:inline-block;margin-left:6px;border:0;background:transparent;
  color:#0050ff;color:var(--brand);font-size:12px;text-decoration:underline;cursor:pointer;padding:0;font-family:inherit}

/* ============================================================
   第三十三轮（项4）：嵌入端 PC/移动 样式精修（参考微信 PC / 七鱼 / 美洽 / 智齿）
   原则：纯叠加样式，不改 DOM 结构 / 不改事件绑定；功能零影响。
   IE/Safari 兼容：flex 均带 -ms- 前缀，不引入 Grid 高级特性。
   ============================================================ */

/* ① 发送按钮防误触冷却态（h5.js 触发：连点/回车 650ms 冷却） */
#sendBtn.cooldown{opacity:.7;cursor:wait;pointer-events:none}
#sendBtn.cooldown .sb-txt{letter-spacing:.2px}
#sendBtn{-webkit-transition:background .16s,opacity .16s,transform .06s;transition:background .16s,opacity .16s,transform .06s}
#sendBtn:active:not(:disabled):not(.cooldown){-webkit-transform:scale(.96);transform:scale(.96)}

/* ② 消息气泡：更柔和的阴影 + 舒适行距（不改配色/圆角约定，仅视觉微调） */
.msg{margin-bottom:12px}
.bubble{box-shadow:0 2px 8px rgba(15,23,42,.05);box-shadow:0 2px 8px rgba(15,23,42,.05);line-height:1.6}
.msg:not(.mine):not(.sysmsg) .bubble{border-radius:3px 12px 12px 12px}
.msg.mine .bubble{border-radius:12px 3px 12px 12px}

/* ③ 时间分隔条：微信式居中小灰条（更克制） */
.hint-line{margin:12px 0 16px;font-size:11px;color:#94a3b8;color:var(--muted);letter-spacing:.3px}

/* ④ 头像与间距：窄屏略收紧 */
.msg{gap:8px}
.msg .avatar{width:36px;height:36px}

/* ⑤ 快捷按钮区：更像微信/七鱼的胶囊 chip，按压反馈 */
.quick-ops{padding:8px 12px;gap:8px}
.qop-chip{padding:7px 14px;border-radius:18px;font-size:12.5px;-webkit-transition:background .15s,color .15s,transform .06s;transition:background .15s,color .15s,transform .06s}
.qop-chip:active{-webkit-transform:scale(.97);transform:scale(.97)}

/* ⑥ KB 富内容气泡：PC 稍宽、块间距更透气；移动收窄防溢出 */
.kb-bubble{max-width:280px}
.kb-media{margin:6px 0}
.kb-media img.msg-img{border-radius:10px}
.kb-link{border-radius:10px;padding:8px 12px;font-size:13px;-webkit-transition:background .15s;transition:background .15s}
.kb-link:hover{background:#c8daff;background:var(--brand-line)}
.kb-phone{border-radius:18px;padding:6px 14px}
.kb-prod .prod-card{border-radius:12px}
.kb-prod .prod-card .pc-img{height:108px}

/* ⑦ 产品卡片：窄屏自适应宽度 */
.prod-card{max-width:100%}

/* ⑧ 输入区：更圆润的聚焦态 + 工具按钮按压反馈 */
#msgInput{border-radius:12px}
.tbtn{border-radius:10px;-webkit-transition:background .14s,transform .06s;transition:background .14s,transform .06s}
.tbtn:active{-webkit-transform:scale(.94);transform:scale(.94)}
.h5-tools .tbtn:hover{background:#e9f0ff;background:var(--brand-soft);color:#0050ff;color:var(--brand)}

/* ⑨ PC 宽屏（非嵌入 body.pc-layout）：侧栏信息卡片更像七鱼/美洽 */
body.pc-layout:not(.embed) .hs-info{padding:12px 14px}
body.pc-layout:not(.embed) .hs-row{padding:9px 0;font-size:12.5px}
body.pc-layout:not(.embed) .hs-agent{padding:26px 16px 18px}
body.pc-layout:not(.embed) .h5-body{padding:18px 16px 14px}
body.pc-layout:not(.embed) .bubble{font-size:14px}

/* ⑩ 窄屏（移动/嵌入）专项 */
@media (max-width:480px){
  .h5-body{padding:12px 10px 10px}
  .msg{max-width:88%;gap:7px;margin-bottom:10px}
  .msg .avatar{width:34px;height:34px}
  .bubble{padding:9px 12px;font-size:13.5px}
  .kb-bubble{max-width:calc(100vw - 76px)}
  .kb-prod .prod-card{width:100%;max-width:230px}
  .quick-ops{padding:7px 10px}
  .qop-chip{padding:6px 12px;font-size:12px}
}

/* ============================================================
   第三轮改造（任务5.1）：主流客服 App 风格气泡美化
   - 对方（客服/AI）靠左浅灰气泡；我方靠右主色气泡
   - 圆形头像 + 昵称小字 + 气泡下小字时间戳
   - 图片圆角加大 + 点击预览（预览层已有 #imgViewer）
   - 普通文本气泡内 linkify 生成的链接样式
   ============================================================ */
/* v51 需求2（覆盖第三轮的浅灰无边框方案）：
   客服/AI（对方侧）文字气泡改为「白色背景 + 淡阴影 + 淡边框」——比纯浅灰更明显、
   与聊天区底色层次分明；自己发的文字/语音气泡仍为主色调。 */
.msg:not(.mine):not(.sysmsg) .bubble{
  background:#fff;background:var(--card,#fff);
  border:1px solid #dfe6f0;border:1px solid var(--line-2,#dfe6f0);
  color:#0f172a;color:var(--text);
  box-shadow:0 3px 10px rgba(15,23,42,.13),0 1px 2px rgba(15,23,42,.06);
}
/* AI 气泡同款白底淡阴影，仅用一条品牌绿左边条与人工客服轻微区分 */
.msg.ai .bubble{
  background:#fff;background:var(--card,#fff);
  border:1px solid #dfe6f0;border:1px solid var(--line-2,#dfe6f0);
  border-left:3px solid #0f9d6e;border-left:3px solid var(--ok,#0f9d6e);
  box-shadow:0 3px 10px rgba(15,23,42,.13),0 1px 2px rgba(15,23,42,.06);
}
/* 我方气泡：主色实底白字，保持现有配色，圆角更柔和 */
.msg.mine .bubble{
  background:#0050ff;background:var(--bubble);
  border-color:transparent;border:1px solid transparent;
  box-shadow:0 2px 8px rgba(0,80,255,.18);
}
/* 气泡尖角：贴头像侧小圆弧（已由 border-radius 控制，微调更圆润） */
.msg:not(.mine):not(.sysmsg) .bubble{border-radius:4px 16px 16px 16px}
.msg.mine .bubble{border-radius:16px 4px 16px 16px}

/* 昵称小字（对方侧）：11px 灰字，与气泡间距收紧 */
/* v52 需求2：昵称行——客户侧显示「访客ooki」/称呼，AI 接待时并列「AI接待」徽章 */
.msg-name{display:flex;align-items:center;gap:5px;font-size:11px;color:#94a3b8;color:var(--muted);margin:0 2px 4px;line-height:1.3}
.msg.mine .msg-name{justify-content:flex-end}
.ms-name{font-weight:600;color:#64748b;color:var(--sub)}
.ms-ai-badge{display:inline-flex;align-items:center;gap:2px;height:16px;padding:0 6px;border-radius:8px;font-size:10px;line-height:1;font-weight:600;background:#e7f7f1;background:var(--ok-soft,#e7f7f1);color:#0f9d6e;color:var(--ok);white-space:nowrap;flex:none}
.ms-ai-badge i{font-size:8.5px}

/* 气泡下时间戳：10px 更浅灰，居中于气泡下方（跟随气泡对齐方向） */
.msg-time{
  font-size:10px;color:#b6c0cf;color:var(--muted-2,#b6c0cf);
  margin-top:3px;padding:0 2px;line-height:1.2;
}
.msg.mine .msg-time{text-align:right}
.msg:not(.mine):not(.sysmsg) .msg-time{text-align:left}

/* 图片气泡：圆角加大，点击手型（预览已有） */
.bubble img.msg-img,
.bubble.img-bubble img.msg-img{
  border-radius:12px;
  max-width:220px;max-height:220px;
}
.kb-media img.msg-img{border-radius:12px}

/* v34：富文本气泡(欢迎语/知识库/话术)里的图片按编辑器设定尺寸显示——
   不套用上面单图气泡的 220px 上限。行内 style width/height 优先；
   max-width:100% 仅防超出气泡，窄屏时 height:auto 等比缩小不溢出。
   此规则必须放在 .bubble img.msg-img(220px) 之后，同优先级后者才能被覆盖。 */
.rich-bubble img.msg-img,
.kb-bubble img.msg-img{
  max-width:100%;
  max-height:none;
}
.faq-body .rich-bubble img.msg-img{max-width:100%;max-height:none}

/* 普通文本气泡内 linkify 生成的链接：主色下划线，电话用绿色 */
.bubble a{color:#0050ff;color:var(--brand);word-break:break-all;text-decoration:underline}
.bubble a[href^="tel:"]{color:#0f9d6e;color:var(--ok);text-decoration:none;font-weight:600}
.msg.mine .bubble a{color:#fff;text-decoration:underline}
.msg.mine .bubble a[href^="tel:"]{color:#fff;text-decoration:none}

/* 欢迎语气泡下昵称与时间戳对齐 */
#welcomeBlock .msg.ai .msg-name{font-size:11px;color:#94a3b8;color:var(--muted);margin:0 2px 3px}

/* FAQ 手风琴答案内富文本/链接排版 */
.faq-body .rich-bubble{font-size:13px;line-height:1.6}
.faq-body .rich-bubble a{color:#0050ff;color:var(--brand);word-break:break-all}
.faq-body .rich-bubble img{max-width:100%;border-radius:8px}
.faq-body a[href^="tel:"]{color:#0f9d6e;color:var(--ok);font-weight:600;text-decoration:none}

/* 深色模式适配（若 html.dark 启用） */
html.dark .msg:not(.mine):not(.sysmsg) .bubble{background:#2a2f3a;color:#e6e8ee}
html.dark .msg.mine .bubble{box-shadow:0 2px 8px rgba(0,80,255,.35)}


/* ============================================================
 * 语音消息 + 微信图片选择器修复（2026-10-10）
 * ============================================================ */

/* 相册/拍照 file input：移出按钮、不用 display:none。
   微信 iOS WKWebView 对 display:none 的 file input 禁止程序 .click() 唤起相册；
   这里放到屏幕外但保持"可被 webview 命中"（opacity:0 / 1px / absolute）。 */
.visually-hidden-file{
  position:absolute;left:-9999px;bottom:0;width:1px;height:1px;
  opacity:0;pointer-events:none;z-index:-1;
}

/* ---- 语音/键盘模式切换 ---- */
#holdToTalkBtn{display:none;-ms-flex:1 1 0%;flex:1 1 0%;min-width:0;height:40px;border-radius:10px;
  border:#d3dae5;border:1px solid var(--line-2,#d3dae5);background:#f2f5fa;background:var(--bg,#f2f5fa);
  color:#0f172a;color:var(--text,#0f172a);font-size:15px;font-weight:600;cursor:pointer;
  -webkit-tap-highlight-color:transparent;-webkit-user-select:none;-webkit-user-select:none;}
#holdToTalkBtn:active{background:#e6ebf3;}
.h5-foot.voice-mode #msgInput{display:none;}
.h5-foot.voice-mode #holdToTalkBtn{display:block;}
.h5-foot.voice-mode .h5-count{display:none;}
/* 语音模式下隐藏发送按钮（无文字可发），图片/表情/语音切换按钮保留 */
.h5-foot.voice-mode #sendBtn{display:none !important;}
/* 任务12：voiceBtn 图标随模式切换——文字模式显示麦克风；语音模式显示键盘（互斥不同时显示） */
.h5-foot #voiceBtn .icon-kb{display:none;}
.h5-foot.voice-mode #voiceBtn .icon-mic{display:none;}
.h5-foot.voice-mode #voiceBtn .icon-kb{display:inline-block;}
.h5-foot #voiceBtn svg{width:20px;height:20px;vertical-align:middle;}
/* 精致描边图标：覆盖 .tbtn svg{fill:currentColor} 的填充，改为线稿（高优先级选择器） */
.tbtn svg.icon-stroke{fill:none;stroke:currentColor;}

/* v60 需求1：语音切换按钮只按「PC / 移动」区分，不再按「是否嵌入」区分。
   原规则是 `body.pc-layout #voiceBtn, body.embed #voiceBtn{display:none !important}`——
   只要 URL 带 embed=1 就永久隐藏，于是手机上的 JS 嵌入 / iframe 嵌入窗口彻底失去语音入口，
   这正是需求里反馈的「移动端功能受限」。
   v61 需求3：嵌入态布局已恒为 m-layout（修「PC 嵌入面板错位」），布局类不再能表达设备，
   因此语音按钮显隐改挂在 **设备类 body.dev-pc** 上（h5.js applyLayoutMode 按宿主设备挂）：
     PC（含 PC 上的嵌入面板、独立 PC 外链）→ 隐藏，走键盘输入；
     移动（含手机上的嵌入窗口）→ 显示，走「按住说话」，与独立 H5 完全一致。 */
body.pc-layout #voiceBtn,
body.dev-pc #voiceBtn{display:none !important;}
body.m-layout:not(.dev-pc) #voiceBtn{display:inline-flex !important;}

/* 录音权限请求中：按住按钮 loading 态（文案切换 + 呼吸提示，禁止重复触发） */
#holdToTalkBtn.rec-loading{pointer-events:none;-webkit-animation:recHoldPulse 1s ease-in-out infinite;animation:recHoldPulse 1s ease-in-out infinite}
@keyframes recHoldPulse{0%,100%{opacity:.55}50%{opacity:.95}}

/* ---- 录音中遮罩（点不透穿，背景锁滚动） ---- */
/* v73 需求2：录音浮层必须压在聊天窗口最上层。
   原先 z-index:80，低于 .h5-shell.half-sheet 的 1200（移动端半屏嵌入时整壳自建层叠上下文），
   于是「按住说话」的录音面板被聊天窗口挡住——独立 H5 不会加 half-sheet 所以看不出问题。
   这里抬到 9000（低于 toastBox 9999，高于 shell 1200 / bubble 1000 / img-viewer 999），
   并加 !important 兜底：宿主页若对 iframe 内的 .h5-shell 做过内联 z-index 覆盖也不会压过录音层。 */
body.rec-locked{overflow:hidden;}
.rec-mask{position:fixed;top:0;right:0;bottom:0;left:0;inset:0;z-index:9000!important;display:none;pointer-events:none;
  background:rgba(15,23,42,.45);-webkit-backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px);
  align-items:center;justify-content:center;}
.rec-mask.show{display:flex;}
.rec-panel{width:180px;padding:22px 18px 18px;border-radius:18px;
  background:rgba(30,36,48,.92);color:#fff;text-align:center;}
.rec-mic{width:64px;height:64px;margin:0 auto 12px;border-radius:50%;
  background:#0050ff;background:var(--brand,#0050ff);display:flex;align-items:center;justify-content:center;}
.rec-mic svg{width:32px;height:32px;fill:#fff;}
.rec-waves{display:flex;align-items:center;justify-content:center;gap:3px;height:26px;margin-bottom:8px;}
.rec-waves i{width:3px;border-radius:2px;background:#7fb0ff;background:var(--brand,#0050ff);
  height:8px;-webkit-animation:recWave 1s ease-in-out infinite;animation:recWave 1s ease-in-out infinite;}
.rec-waves i:nth-child(1){animation-delay:0s}
.rec-waves i:nth-child(2){animation-delay:.12s}
.rec-waves i:nth-child(3){animation-delay:.24s}
.rec-waves i:nth-child(4){animation-delay:.36s}
.rec-waves i:nth-child(5){animation-delay:.48s}
.rec-waves i:nth-child(6){animation-delay:.60s}
.rec-waves i:nth-child(7){animation-delay:.72s}
@keyframes recWave{0%,100%{height:6px}50%{height:22px}}
.rec-timer{font-size:20px;font-weight:700;font-variant-numeric:tabular-nums;margin-bottom:6px;}
.rec-hint{font-size:12px;color:#9fb4d8;}
.rec-mask.cancel .rec-panel{background:rgba(150,30,40,.92);}
.rec-mask.cancel .rec-mic{background:#e5484d;}
.rec-mask.cancel .rec-waves i{background:#ffb3b6;-webkit-animation:none;animation:none;height:6px;}
.rec-mask.cancel .rec-hint{color:#ffd7d9;}

/* ---- 微信风格语音气泡 ---- */
/* v59 需求1：语音气泡内「声音组件在上、推荐卡片在下」，同属一个气泡纵向堆叠。
   原先 inline-flex + align-items:center 会让语音条与产品/天气/快递卡片**横排**
   （声音在左、卡片在右），语义割裂且卡片被压扁。
   改为列向：第 1 行语音条 → 第 2 行 ASR 转写（仅自己） → 其下依次推荐卡片。
   语音条用 align-self 单独控左右，其余子项 stretch 跟齐气泡宽度。 */
.bubble.voice-bubble{padding:8px 12px;display:inline-flex;flex-direction:column;align-items:stretch;min-width:80px;max-width:100%}
.bubble.voice-bubble > .voice-bar{align-self:flex-start}
.msg.mine .bubble.voice-bubble > .voice-bar{align-self:flex-end}
/* 气泡内的推荐卡片另起一行，与语音条留出呼吸 */
.bubble.voice-bubble > .wx-card,
.bubble.voice-bubble > .prod-card{margin:9px 0 1px}
.bubble.voice-bubble > .prod-list{margin:9px 0 1px;width:100%}
.voice-bar{display:inline-flex;align-items:center;gap:6px;cursor:pointer;
  -webkit-tap-highlight-color:transparent;-webkit-user-select:none;}
.voice-bar .vb-time{font-size:13px;font-variant-numeric:tabular-nums;white-space:nowrap;}
.voice-bar .vb-icon{width:18px;height:18px;flex:none;}
.voice-bar .vb-icon svg{width:18px;height:18px;fill:currentColor;display:block;}
/* 对方（左）：喇叭在左，时间在右；自己（右，蓝底白字）：喇叭在右，时间在左 */
.msg:not(.mine) .voice-bar{flex-direction:row;}
.msg.mine .voice-bar{flex-direction:row-reverse;}
.msg.mine .voice-bar{color:#fff;}
.msg.mine .voice-bar .vb-icon{fill:#fff;}
/* 播放中：喇叭旁 3 根竖条跳动动画 */
.voice-bar .vb-bars{display:none;align-items:flex-end;gap:2px;height:14px;}
.voice-bar.playing .vb-bars{display:inline-flex;}
.voice-bar.playing .vb-bars i{width:2px;background:currentColor;border-radius:1px;
  height:4px;-webkit-animation:vbBar .9s ease-in-out infinite;animation:vbBar .9s ease-in-out infinite;}
.voice-bar.playing .vb-bars i:nth-child(2){animation-delay:.15s;height:12px}
.voice-bar.playing .vb-bars i:nth-child(3){animation-delay:.3s;height:8px}
@keyframes vbBar{0%,100%{height:4px}50%{height:13px}}

/* v45：客户自己语音转写文字统一类（仅作用于自己语音，对方不显示） */
.voice-asr{
  margin-top:7px;
  padding:5px 9px;
  border-radius:8px;
  border-top:1px dashed rgba(0,0,0,.12);
  font-size:12.5px;
  line-height:1.6;
  color:#334155;color:var(--text-2,#334155);
  background:#eef1f7;background:var(--brand-soft,#eef1f7);
}
.msg.me .bubble .voice-asr{
  background:rgba(255,255,255,.22);
  color:rgba(255,255,255,.95);
  border-top-color:rgba(255,255,255,.3);
}

/* ==================================================================
 * v53 需求8：意图处理图片组 / 视频（嵌入聊天窗口）
 * ================================================================== */
.msg-img-group{display:flex;flex-wrap:wrap;display:grid;grid-template-columns:repeat(3,1fr);gap:4px;max-width:230px;margin-top:5px}
.msg-img-group.mig-1{grid-template-columns:1fr;max-width:160px}
.msg-img-group.mig-2{grid-template-columns:repeat(2,1fr);max-width:200px}
.msg-img-group img{width:100%;height:76px;object-fit:cover;border-radius:7px;display:block;background:#f2f5fa;cursor:zoom-in}
.msg-img-group.mig-1 img{height:150px}
.msg-video{width:100%;max-width:240px;border-radius:9px;background:#000;display:block;margin-top:5px}
/* v77 需求5：视频内联播放（IM 聊天风格）——有封面时先显封面 + 中间播放按钮 */
.msg-video-box{position:relative;width:100%;max-width:240px;margin-top:5px;line-height:0}
.msg-video-box .msg-video{margin-top:0;border-radius:9px}
.msg-video-box .mv-play{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);
  -webkit-transform:translate(-50%,-50%);width:44px;height:44px;border:0;border-radius:50%;
  background:rgba(9,14,26,.55);color:#fff;font-size:14px;line-height:44px;text-align:center;
  cursor:pointer;padding:0}
.msg-video-box .mv-play i{margin-left:2px}
.msg-video-box.playing .mv-play{display:none}
/* v81 需求3：视频全屏按钮。
   移动端原生控件一般自带全屏，PC 端/iframe 里常常没有入口，所以自己画一个。
   放在右上角：不与中间的播放按钮、底部的原生控件条打架。 */
.msg-video-box .mv-fs{position:absolute;right:6px;top:6px;width:28px;height:28px;border:0;
  border-radius:7px;background:rgba(9,14,26,.55);color:#fff;font-size:12px;line-height:28px;
  text-align:center;cursor:pointer;padding:0;opacity:.9;transition:opacity .15s}
.msg-video-box .mv-fs:hover{opacity:1;background:rgba(9,14,26,.75)}
/* 触屏设备（无 hover）常驻显示，避免"根本没发现有这个按钮" */
@media (hover:none){.msg-video-box .mv-fs{opacity:.95}}
/* 不支持的浏览器（iframe 未授权全屏等）→ 退化成"网页内放大"：
   铺满整个聊天区并居中，Esc 或再点一次收起。 */
.msg-video-box.zoomed{position:fixed;left:0;top:0;right:0;bottom:0;max-width:none;width:auto;
  z-index:2147483000;background:rgba(0,0,0,.94);display:-webkit-flex;display:flex;
  -webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;
  margin:0;border-radius:0}
.msg-video-box.zoomed .msg-video{max-width:96vw;max-height:88vh;width:auto;border-radius:6px}
.msg-video-box.zoomed .mv-fs{position:fixed;right:14px;top:14px;width:36px;height:36px;
  font-size:15px;line-height:36px;background:rgba(255,255,255,.16)}
.msg-video-box.zoomed .mv-play{width:60px;height:60px;line-height:60px;font-size:18px}
/* v77 需求5：图片组聚合卡片（微信「收藏」式多图并成一张卡）——整卡可点，进灯箱逐张看 */
.img-set-card{width:100%;max-width:236px;margin-top:5px;border:1px solid var(--line,#e4e9f1);
  border-radius:10px;overflow:hidden;background:var(--card,#fff);cursor:pointer}
.isc-hd{display:-webkit-flex;display:flex;align-items:center;gap:6px;padding:7px 10px 6px;
  border-bottom:1px solid var(--line,#eef2f8);font-size:12px}
.isc-hd i{color:var(--brand,#0050ff);font-size:12px}
.isc-hd .isc-title{font-weight:600;color:var(--text,#0f172a)}
.isc-hd .isc-count{margin-left:auto;color:var(--muted,#94a3b8);font-size:11.5px}
.isc-body{display:grid;grid-template-columns:repeat(3,1fr);gap:3px;padding:8px 8px 4px}
.isc-cell{position:relative;overflow:hidden;border-radius:6px;background:#f2f5fa;line-height:0}
.isc-cell img{width:100%;height:70px;object-fit:cover;display:block}
.isc-more{position:absolute;top:0;right:0;bottom:0;left:0;display:-webkit-flex;display:flex;
  align-items:center;justify-content:center;background:rgba(9,14,26,.48);color:#fff;
  font-size:14px;font-weight:600;line-height:1}
.isc-ft{padding:5px 10px 8px;text-align:center;color:var(--brand,#0050ff);font-size:11.5px}
.isc-ft i{margin-left:3px;font-size:10px}
.img-set-card.isc-1 .isc-body{grid-template-columns:1fr}
.img-set-card.isc-1 .isc-cell img{height:150px}
.img-set-card.isc-2 .isc-body{grid-template-columns:repeat(2,1fr)}
.img-set-card.isc-2 .isc-cell img{height:100px}
.img-gallery{position:fixed;top:0;right:0;bottom:0;left:0;inset:0;background:rgba(6,10,20,.94);z-index:2600;display:none;flex-direction:column;align-items:center;justify-content:center;padding:18px}
.img-gallery.show{display:flex}
.img-gallery .ig-stage{-ms-flex:1 1 0%;flex:1 1 0%;display:flex;align-items:center;justify-content:center;min-height:0;width:100%}
.img-gallery .ig-stage img{max-width:92vw;max-height:76vh;border-radius:8px}
.img-gallery .ig-bar{margin-top:12px;display:flex;align-items:center;gap:14px;color:#e2e8f0;font-size:13px}
.img-gallery .ig-nav{width:36px;height:36px;border-radius:50%;border:0;background:rgba(255,255,255,.14);color:#fff;font-size:16px;cursor:pointer}
.img-gallery .ig-nav:disabled{opacity:.3;cursor:default}
.img-gallery .ig-close{position:absolute;top:14px;right:16px;width:34px;height:34px;border:0;border-radius:50%;background:rgba(255,255,255,.14);color:#fff;font-size:16px;cursor:pointer}

/* ===== v81b 需求4：H5 订单卡里的完整物流轨迹（.oc-trace，与大厅同构） ===== */
.oc-trace{border-top:1px solid var(--line,#eef2f7);margin-top:10px;padding-top:8px}
.oc-trace .lc-trace-hd{display:flex;align-items:center;gap:6px;font-size:11.5px;font-weight:600;
  color:var(--muted,#64748b);margin-bottom:4px}
.oc-trace .lc-trace-n{font-weight:400;font-size:11px;color:var(--muted,#94a3b8)}
.oc-trace .lc-item{display:flex;gap:8px;position:relative;padding:5px 0}
.oc-trace .lc-item .lc-dot{flex:none;width:7px;height:7px;border-radius:50%;background:#cbd5e1;margin-top:5px}
.oc-trace .lc-item.cur .lc-dot{background:#0284c7;box-shadow:0 0 0 3px rgba(2,132,199,.18)}
.oc-trace .lc-item.signed .lc-dot{background:#059669;box-shadow:0 0 0 3px rgba(5,150,105,.16)}
.oc-trace .lc-item.deliver .lc-dot{background:#f59e0b}
.oc-trace .lc-item.problem .lc-dot{background:#e11d48}
.oc-trace .lc-item:not(:last-child):before{content:'';position:absolute;left:3px;top:14px;bottom:-6px;
  width:1px;background:#e2e8f0;background:var(--line,#e2e8f0)}
.oc-trace .lc-main{min-width:0;flex:1}
.oc-trace .lc-desc{font-size:12.5px;line-height:1.5;color:var(--text,#0f172a);word-break:break-word}
.oc-trace .lc-item.cur .lc-desc{font-weight:600}
.oc-trace .lc-time{font-size:11px;color:var(--muted,#94a3b8);margin-top:2px}
.oc-trace .lc-empty{font-size:12px;color:var(--muted,#94a3b8);padding:6px 0}


/* ---------- v85 需求3：优惠机制卡片（阶梯定价）----------
   结构：上半 = 关联产品（主图 / 名称 / 售价 / 立即购买），下半 = 本档优惠 + 档位一览。
   与天气卡、快递卡同属 .wx-card 家族，宽度略放宽（要同时放下产品行与档位表）。 */
.discount-card{width:272px}
.discount-card .dc-prod{display:flex;gap:10px;padding:10px 12px;align-items:center}
.discount-card .dc-img{-ms-flex:none;flex:none;width:54px;height:54px;border-radius:9px;overflow:hidden;background:#f1f5f9;display:flex;align-items:center;justify-content:center;color:#94a3b8;font-size:20px}
.discount-card .dc-img img{width:100%;height:100%;object-fit:cover;display:block}
.discount-card .dc-pb{min-width:0;-ms-flex:1 1 0%;flex:1 1 0%}
.discount-card .dc-name{font-size:13px;font-weight:600;color:#0f172a;color:var(--text);line-height:1.35;max-height:2.7em;overflow:hidden}
.discount-card .dc-desc{font-size:11px;color:#94a3b8;color:var(--muted);margin-top:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.discount-card .dc-line{margin-top:4px;font-size:11.5px;color:#64748b;color:var(--sub)}
.discount-card .dc-origin{text-decoration:line-through}
.discount-card .dc-buy{display:inline-flex;align-items:center;gap:4px;margin-top:7px;padding:4px 12px;border-radius:999px;background:#e11d48;color:#fff;font-size:12px;font-weight:600;text-decoration:none;line-height:1.7}
.discount-card .dc-buy-off{background:#cbd5e1;cursor:default}
.discount-card .dc-off{padding:9px 12px;border-top:1px solid #eef2f7;border-top:1px solid var(--line);background:#fff5f6}
.discount-card .dc-offrow{display:flex;align-items:baseline;gap:5px}
.discount-card .dc-price{font-size:20px;font-weight:700;color:#e11d48;line-height:1.1}
.discount-card .dc-price small{font-size:12px;font-weight:600;margin-left:1px}
.discount-card .dc-offqty{margin-left:auto;font-size:11.5px;color:#e11d48;font-weight:600}
.discount-card .dc-sum{margin-top:5px;font-size:11.5px;color:#64748b;color:var(--sub)}
.discount-card .dc-save{color:#e11d48;font-weight:600}
.discount-card .dc-tiers{border-top:1px solid #eef2f7;border-top:1px solid var(--line);padding:7px 12px}
/* v86 需求2：档位行重做 —— 「买N ｜ 单价¥X元/单位 ｜ 立省Y元」三段对齐。
   旧版面把数量、单位、单价连成一串（"买 3 1 ¥390/1 省144"），客户得自己数着看；
   而且选中档的红底上配红字，"立省多少"这块等于隐形。这里给三段各自独立的位置，
   并对「立省」徽章单独控色：常态红字浅红底，命中档白字深红底，任何情况下都读得出来。 */
.discount-card .dc-tier{display:flex;align-items:center;gap:8px;font-size:12px;padding:4px 6px;border-radius:7px;color:var(--sub)}
.discount-card .dc-tq{flex:none;min-width:42px;font-weight:600;color:#0f172a;color:var(--text)}
.discount-card .dc-tp{flex:1 1 auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.discount-card .dc-tp b{font-weight:700;color:#e11d48}
.discount-card .dc-ts{flex:none;font-size:11px;font-weight:600;padding:1px 8px;border-radius:999px;background:#fee2e2;color:#b91c1c;line-height:1.9}
/* 命中的那一档：浅红底 + 深红字 + 红底白字的立省徽章 */
.discount-card .dc-tier.on{background:#fff1f2;-webkit-box-shadow:inset 0 0 0 1px #fecdd3;box-shadow:inset 0 0 0 1px #fecdd3}
.discount-card .dc-tier.on .dc-tq,.discount-card .dc-tier.on .dc-tp{color:#9f1239}
.discount-card .dc-tier.on .dc-tp b{color:#be123c}
.discount-card .dc-tier.on .dc-ts{background:#e11d48;color:#fff}
.discount-card .dc-ft{padding:6px 12px;border-top:1px solid #eef2f7;border-top:1px solid var(--line);font-size:11px;color:#94a3b8;color:var(--muted);background:#fafbfd}
