/* ==========================================================================
   AI 助手插件 · 前台客服悬浮窗（买家侧）
   设计权威：artifacts/ai-assistant-handoff-20260928/demo.html + states.html
   作用域：.mall-ai-widget（根元素同时携带 .chat-win），全部规则限定根类内。
   布局：PC 右下固定 392×618；手机（≤600px）底部 78dvh 弹层，PC/手机同一份 HTML。
   深色：跟随 html[data-theme="dark"] 做变量覆盖（前台暂无该选择器在用，预写兼容）。
   ========================================================================== */

.mall-ai-widget {
  /* ---- 作用域变量（仅本根内生效，不污染页面） ---- */
  --aiw-accent: var(--store-accent, #2f63ff);
  --aiw-accent-deep: #1d4fd7;
  --aiw-grad: linear-gradient(135deg, #3d6bff 0%, #7a3df0 100%);
  --aiw-ink: #1c2333;  --aiw-ink-2: #4a5468;  --aiw-ink-3: #8a94a8;
  --aiw-line: #e6eaf2; --aiw-panel: #fff;     --aiw-body: #f3f5fa;
  --aiw-field: #f2f4f9; --aiw-quote-bg: #f5f7ff;
  --aiw-green: #0da76a; --aiw-green-soft: #e7f8f1;
  --aiw-red: #e5453c;   --aiw-red-soft: #fdeeed;  --aiw-red-line: #f3c1be;
  --aiw-amber: #b06a00; --aiw-amber-soft: #fff4e5; --aiw-amber-line: #ffd9a3;
  --aiw-violet: #7c5cff; --aiw-violet-soft: #f1edff;
  --aiw-chip-line: #c9d6ff;
  --aiw-avatar-fallback: #c3ccdd;
  --aiw-typing-dot: #b9c2d8;

  position: fixed; right: 24px; bottom: 24px; z-index: 70; /* 高于前台悬浮工具栏(z60) */
  width: 392px; height: 618px; max-height: calc(100dvh - 48px);
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--aiw-panel); border: 1px solid var(--aiw-line); border-radius: 18px;
  box-shadow: 0 26px 70px rgba(15, 23, 55, .35);
  color: var(--aiw-ink); font-size: 13px; line-height: 1.5;
}
/* 宿主隔离：PC 前台 storefront.css 的 body > * 全局规则（position:relative;z-index:1）特异性
   高于单类根选择器，会把根盖成相对定位落出视口；双类还原固定定位与层级，几何数值不变。
   挂进原生商品 dialog 时同理：dialog 内 z-index 只需高于其吸底购买条（z30）。 */
.mall-ai-widget.chat-win { position: fixed; z-index: 70; }
.mall-ai-widget[hidden],
.mall-ai-widget [hidden] { display: none !important; }
.mall-ai-widget *, .mall-ai-widget *::before, .mall-ai-widget *::after { box-sizing: border-box; }
.mall-ai-widget svg { width: 16px; height: 16px; flex: none; }
.mall-ai-widget button { margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; touch-action: manipulation; }
.mall-ai-widget :focus-visible { outline: 2px solid var(--aiw-accent); outline-offset: 2px; }

/* 最小化：JS 置 data-min="true"，只留头部 */
.mall-ai-widget[data-min="true"] { height: auto; }
.mall-ai-widget[data-min="true"] :is(.cw-body, .cw-foot) { display: none; }

/* 手机弹层拖动手柄（PC 隐藏） */
.mall-ai-widget .grab { display: none; width: 42px; height: 5px; border-radius: 3px; background: #d7dce8; margin: 8px auto 2px; flex: none; }

/* ---- 头部 ---- */
.mall-ai-widget .cw-head { flex: none; display: flex; align-items: center; gap: 11px; padding: 13px 15px; background: var(--aiw-grad); color: #fff; }
.mall-ai-widget .cw-head .face { width: 36px; height: 36px; border-radius: 12px; background: rgba(255, 255, 255, .18); display: flex; align-items: center; justify-content: center; font-size: 17px; flex: none; }
.mall-ai-widget .cw-head .face svg { width: 19px; height: 19px; }
.mall-ai-widget .cw-head .who { flex: 1; min-width: 0; }
.mall-ai-widget .cw-head .who b { display: block; font-size: 14px; }
.mall-ai-widget .cw-head .who span { display: flex; align-items: center; gap: 5px; font-size: 11px; opacity: .9; }
.mall-ai-widget .cw-head .who span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #4ade80; flex: none; }
.mall-ai-widget .cw-head .act { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; opacity: .85; flex: none; }
.mall-ai-widget .cw-head .act:hover { background: rgba(255, 255, 255, .14); opacity: 1; }

/* ---- 消息区 ---- */
.mall-ai-widget .cw-body { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 11px; padding: 13px 12px; background: var(--aiw-body); }
.mall-ai-widget .sys { align-self: center; font-size: 11px; color: var(--aiw-ink-3); background: #e8ecf5; padding: 3px 12px; border-radius: 999px; max-width: 92%; text-align: center; }
.mall-ai-widget .sys.hand { background: var(--aiw-amber-soft); color: var(--aiw-amber); border: 1px solid var(--aiw-amber-line); }
.mall-ai-widget .sys.fuse { background: var(--aiw-red-soft); color: var(--aiw-red); border: 1px solid var(--aiw-red-line); }
.mall-ai-widget .cw-closed { align-self: center; font-size: 11px; color: var(--aiw-ink-3); background: #e8ecf5; padding: 3px 12px; border-radius: 999px; }

.mall-ai-widget .msg { display: flex; gap: 8px; max-width: 92%; }
.mall-ai-widget .msg .av { width: 30px; height: 30px; border-radius: 10px; flex: none; display: flex; align-items: center; justify-content: center; font-size: 13px; color: #fff; background: var(--aiw-avatar-fallback); }
.mall-ai-widget .msg .av svg { width: 15px; height: 15px; }
.mall-ai-widget .msg .bubble { padding: 8px 11px; border-radius: 4px 13px 13px 13px; font-size: 12.5px; line-height: 1.62; box-shadow: 0 1px 2px rgba(20, 30, 60, .06); overflow-wrap: anywhere; }
.mall-ai-widget .msg.ai .av { background: var(--aiw-grad); }
.mall-ai-widget .msg.ai .bubble { background: var(--aiw-panel); border: 1px solid var(--aiw-line); color: var(--aiw-ink); }
.mall-ai-widget .msg.me { align-self: flex-end; flex-direction: row-reverse; }
.mall-ai-widget .msg.me .bubble { background: var(--aiw-accent); color: #fff; border-radius: 13px 4px 13px 13px; }
.mall-ai-widget .msg .ai-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 600; color: var(--aiw-violet); background: var(--aiw-violet-soft); border-radius: 5px; padding: 1px 6px; margin-bottom: 5px; }
.mall-ai-widget .msg .quote { display: block; margin-top: 6px; padding: 5px 9px; background: var(--aiw-quote-bg); border-left: 3px solid var(--aiw-accent); border-radius: 6px; font-size: 11px; color: var(--aiw-ink-2); }

/* AI 输入中（加载态，不锁输入栏） */
.mall-ai-widget .msg.ai.typing .bubble { display: flex; gap: 5px; align-items: center; padding: 12px 14px; }
.mall-ai-widget .msg.ai.typing .tdot { width: 7px; height: 7px; border-radius: 50%; background: var(--aiw-typing-dot); animation: aiw-tb 1.1s infinite; }
.mall-ai-widget .msg.ai.typing .tdot:nth-child(2) { animation-delay: .18s; }
.mall-ai-widget .msg.ai.typing .tdot:nth-child(3) { animation-delay: .36s; }
@keyframes aiw-tb { 0%, 60%, 100% { transform: translateY(0); opacity: .55; } 30% { transform: translateY(-4px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .mall-ai-widget .msg.ai.typing .tdot { animation: none; } }

/* 发送失败与重发（仅失败气泡，不清草稿） */
.mall-ai-widget .msg.me.failed .bubble { background: #8b95ab; opacity: .85; }
.mall-ai-widget .msg-retry { align-self: flex-end; display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--aiw-red); background: var(--aiw-red-soft); border: 1px solid var(--aiw-red-line); border-radius: 999px; padding: 3px 11px; }
.mall-ai-widget .msg-retry svg { width: 12px; height: 12px; }

/* AI 答复反馈按钮（仅 ai_active 态渲染） */
.mall-ai-widget .fb { display: flex; gap: 6px; margin-top: 7px; padding-top: 6px; border-top: 1px dashed var(--aiw-line); }
.mall-ai-widget .fb button { font-size: 11px; font-weight: 600; border-radius: 7px; padding: 4px 11px; }
.mall-ai-widget .fb .fb-ok { background: var(--aiw-green-soft); color: var(--aiw-green); }
.mall-ai-widget .fb .fb-no { border: 1px solid var(--aiw-line); color: var(--aiw-ink-2); }
.mall-ai-widget .fb .fb-no[aria-pressed="true"] { background: var(--aiw-red-soft); color: var(--aiw-red); border-color: var(--aiw-red-line); }
.mall-ai-widget .fb .fb-ok[aria-pressed="true"] { outline: 1px solid var(--aiw-green); }

/* 首次打开空态（AI 未启用时不渲染 AI 标识，由 JS 换人工留言文案） */
.mall-ai-widget .cw-empty { margin: auto; text-align: center; padding: 22px 26px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.mall-ai-widget .cw-empty .e-face { width: 52px; height: 52px; border-radius: 16px; background: var(--aiw-grad); color: #fff; font-size: 24px; display: flex; align-items: center; justify-content: center; }
.mall-ai-widget .cw-empty .e-face svg { width: 26px; height: 26px; }
.mall-ai-widget .cw-empty b { font-size: 14px; }
.mall-ai-widget .cw-empty p { margin: 0; font-size: 12px; color: var(--aiw-ink-3); line-height: 1.7; }
.mall-ai-widget .cw-empty .e-qs { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.mall-ai-widget .cw-empty .e-qs button { font-size: 11.5px; color: var(--aiw-accent-deep); background: var(--aiw-panel); border: 1px solid var(--aiw-chip-line); padding: 5px 11px; border-radius: 999px; }

/* 游客登录引导 */
.mall-ai-widget .need-login { margin: auto; text-align: center; padding: 22px 26px; display: flex; flex-direction: column; align-items: center; gap: 9px; }
.mall-ai-widget .need-login .n-ico { width: 46px; height: 46px; border-radius: 14px; background: var(--aiw-violet-soft); color: var(--aiw-violet); display: flex; align-items: center; justify-content: center; }
.mall-ai-widget .need-login .n-ico svg { width: 22px; height: 22px; }
.mall-ai-widget .need-login b { font-size: 13.5px; }
.mall-ai-widget .need-login p { margin: 0; font-size: 12px; color: var(--aiw-ink-3); line-height: 1.7; }
.mall-ai-widget .need-login .n-btn { background: var(--aiw-accent); color: #fff; font-size: 12.5px; font-weight: 600; border-radius: 9px; padding: 8px 26px; }

/* ---- 底部：快捷短语 + 输入栏 ---- */
/* 宿主隔离：PC/mobile  storefront 裸 footer 规则（display:flex; padding:28px 100px; 深色底浅色字）
   与商品 dialog footer 规则（justify-content:flex-end）会命中本 <footer>，显式还原为原稿块级布局 */
.mall-ai-widget .cw-foot { flex: none; display: block; padding: 0; align-items: normal; justify-content: normal; color: inherit; font-size: inherit; background: var(--aiw-panel); border-top: 1px solid var(--aiw-line); }
.mall-ai-widget .cw-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 9px 12px 4px; }
.mall-ai-widget .cw-chips button { font-size: 12px; color: var(--aiw-accent-deep); background: var(--aiw-panel); border: 1px solid var(--aiw-chip-line); padding: 5px 11px; border-radius: 999px; }
.mall-ai-widget .cw-chips button:hover { background: var(--aiw-quote-bg); }
.mall-ai-widget .cw-chips button.human { color: var(--aiw-amber); border-color: var(--aiw-amber-line); background: var(--aiw-amber-soft); }
.mall-ai-widget .cw-input { display: flex; gap: 8px; align-items: center; padding: 8px 12px 12px; }
.mall-ai-widget .cw-input .field { flex: 1; min-width: 0; border: 0; background: var(--aiw-field); border-radius: 999px; padding: 9px 14px; font: inherit; font-size: 13px; color: var(--aiw-ink); resize: none; }
.mall-ai-widget .cw-input .field::placeholder { color: var(--aiw-ink-3); }
.mall-ai-widget .cw-input .field:disabled, .mall-ai-widget .cw-input .field[readonly] { opacity: .6; cursor: not-allowed; }
.mall-ai-widget .cw-input .send { width: 36px; height: 36px; border-radius: 50%; background: var(--aiw-accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.mall-ai-widget .cw-input .send:disabled { opacity: .45; cursor: not-allowed; }
.mall-ai-widget .cw-reopen { display: block; margin: 9px 12px 12px; background: var(--aiw-accent); color: #fff; text-align: center; font-size: 13px; font-weight: 600; border-radius: 999px; padding: 10px 0; width: calc(100% - 24px); }

/* ---- 手机：底部弹层（≤600px，同一份 HTML） ---- */
@media (max-width: 600px) {
  .mall-ai-widget {
    left: 0; right: 0; width: auto;
    /* 手机键盘顶起：JS 用 visualViewport 更新 --ai-chat-viewport-*（仅数值），未提供时回落 dvh/0 */
    top: auto; bottom: var(--ai-chat-viewport-bottom, 0px);
    height: var(--ai-chat-viewport-height, 78dvh); max-height: none;
    border-radius: 22px 22px 0 0; border-bottom: 0;
  }
  .mall-ai-widget .grab { display: block; }
  /* 手机头部按原稿为白底（非 PC 蓝紫通栏）：渐变头像块 + 墨色标题 + 次要状态行 */
  .mall-ai-widget .cw-head { background: var(--aiw-panel); color: var(--aiw-ink); border-bottom: 1px solid var(--aiw-line); padding: 8px 16px 10px; }
  .mall-ai-widget .cw-head .face { width: 34px; height: 34px; border-radius: 11px; background: var(--aiw-grad); color: #fff; }
  .mall-ai-widget .cw-head .face.human { background: linear-gradient(135deg, #3a4358, #5a6478); }
  .mall-ai-widget .cw-head .who span { color: var(--aiw-ink-3); opacity: 1; }
  .mall-ai-widget .cw-head .act { color: var(--aiw-ink-3); opacity: 1; }
  .mall-ai-widget .cw-head .act:hover { background: var(--aiw-field); }
  .mall-ai-widget .cw-input { padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .mall-ai-widget .cw-reopen { margin-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
}

/* ---- 深色：变量覆盖（前台暂无 html[data-theme] 在用，预写兼容） ---- */
html[data-theme="dark"] .mall-ai-widget {
  --aiw-ink: #e7ebf4; --aiw-ink-2: #aab3c7; --aiw-ink-3: #7c879e;
  --aiw-line: #2b3342; --aiw-panel: #1a1f2a; --aiw-body: #161a23;
  --aiw-field: #232a38; --aiw-quote-bg: #1d2740;
  --aiw-green: #4fd6a0; --aiw-green-soft: #12362a;
  --aiw-red: #e88a84; --aiw-red-soft: #3a2120; --aiw-red-line: #5a2e2c;
  --aiw-amber: #e8b04c; --aiw-amber-soft: #3a2c14; --aiw-amber-line: #5a4520;
  --aiw-violet: #a894ff; --aiw-violet-soft: #2b2545;
  --aiw-chip-line: #33416b; --aiw-accent-deep: #9db1e8;
  --aiw-avatar-fallback: #39415a; --aiw-typing-dot: #4a5468;
  color-scheme: dark;
}
html[data-theme="dark"] .mall-ai-widget .sys,
html[data-theme="dark"] .mall-ai-widget .cw-closed { background: #232a38; }

/* ---- 入口未读角标（追加在既有入口内部，非本根元素；仅真实 live 客服链接挂载，自定义企业微信/QQ 链接不动） ---- */
#customerServiceFloating .ai-entry-unread,
#mallFloatingToolbar a[href*="/support/"] .ai-entry-unread {
  position: absolute; top: -4px; right: -4px; z-index: 2;
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: #e5453c; border: 2px solid #fff; color: #fff;
  font: 700 11px/16px "PingFang SC", "Microsoft YaHei", sans-serif; font-style: normal;
  pointer-events: none; /* 不拦截入口既有拖动/点击 */
}
#customerServiceFloating .ai-entry-unread[hidden],
#mallFloatingToolbar a[href*="/support/"] .ai-entry-unread[hidden] { display: none !important; }
/* 工具栏链接默认无定位，补相对定位仅作角标锚点，对既有布局无视觉影响；圆形入口本身已 fixed 定位 */
#mallFloatingToolbar a[href*="/support/"] { position: relative; }

/* ---- 小图附件（同源安全链接 <a><img>，限制尺寸避免大图撑开消息） ---- */
.mall-ai-widget .msg .bubble a:has(img) { display: block; margin-top: 4px; }
.mall-ai-widget .msg .bubble a img,
.mall-ai-widget .msg .bubble > img { display: block; max-width: min(220px, 100%); max-height: 220px; border-radius: 8px; }

/* 四项补全：KIMI complete-20260928/demo.html V5/V6 与 states.html S4/S6/S7。
   需求输入复用原 cw-input 语言；独立类避免聊天输入及宿主全局 form 样式串线。 */
.mall-ai-widget {
  --aiw-rec-line: #e9e2ff; --aiw-rec-dash: #efe9ff;
  --aiw-rec-start: #fbf9ff; --aiw-rec-deep: #5b3df0; --aiw-rec-blue: #eef3ff;
}
.mall-ai-widget .cw-chips .rec-chip { display: inline-flex; align-items: center; gap: 4px; color: var(--aiw-violet); border-color: var(--aiw-rec-line); background: var(--aiw-rec-start); }
.mall-ai-widget .cw-chips .rec-chip svg { width: 13px; height: 13px; }
.mall-ai-widget .rec-prompt { display: flex; align-items: center; gap: 8px; margin: 0; padding: 8px 12px; border: 0; background: var(--aiw-panel); }
.mall-ai-widget .rec-prompt .field { flex: 1; min-width: 0; width: 0; min-height: 54px; max-height: 80px; margin: 0; border: 1px solid var(--aiw-rec-line); border-radius: 13px; padding: 9px 14px; font: inherit; font-size: 13px; line-height: 1.5; color: var(--aiw-ink); background: var(--aiw-field); resize: vertical; }
.mall-ai-widget .rec-prompt .field::placeholder { color: var(--aiw-ink-3); }
.mall-ai-widget .rec-prompt .send { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; color: #fff; background: var(--aiw-accent); }
.mall-ai-widget .rec-prompt :disabled, .mall-ai-widget .rec-go:disabled { cursor: not-allowed; opacity: .55; }
.mall-ai-widget .rec-message { flex: none; max-width: 100%; min-width: 0; }
.mall-ai-widget .rec-message > .bubble { min-width: 0; max-width: calc(100% - 38px); }
.mall-ai-widget .rec-message:not(.typing) > .bubble { flex: 1; }
.mall-ai-widget .rec-demand { flex: none; }
.mall-ai-widget .mall-ai-rec { margin-top: 8px; min-width: 0; border: 1px solid var(--aiw-rec-line); border-radius: 12px; background: linear-gradient(180deg, var(--aiw-rec-start), var(--aiw-panel)); overflow: hidden; }
.mall-ai-widget .mall-ai-rec .rec-head { display: flex; align-items: center; gap: 7px; padding: 9px 12px; border-bottom: 1px solid var(--aiw-rec-dash); font-size: 12px; font-weight: 700; color: var(--aiw-rec-deep); white-space: nowrap; }
.mall-ai-widget .mall-ai-rec .rec-need { flex: 1; min-width: 0; max-width: 55%; margin-left: auto; font-size: 10.5px; font-weight: 400; color: var(--aiw-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mall-ai-widget .mall-ai-rec .rec-list { display: flex; flex-direction: column; }
.mall-ai-widget .mall-ai-rec .rec-item { display: flex; gap: 10px; padding: 10px 12px; border-top: 1px dashed var(--aiw-rec-dash); }
.mall-ai-widget .mall-ai-rec .rec-item:first-child { border-top: 0; }
.mall-ai-widget .mall-ai-rec .rec-pic { flex: none; display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 10px; background: var(--aiw-violet-soft); color: var(--aiw-ink-3); font-size: 11px; overflow: hidden; }
.mall-ai-widget .mall-ai-rec .rec-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mall-ai-widget .mall-ai-rec .rec-info { flex: 1; min-width: 0; }
.mall-ai-widget .mall-ai-rec .rec-name { display: block; font-size: 12.5px; font-weight: 600; color: var(--aiw-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mall-ai-widget .mall-ai-rec .rec-price { display: block; font-size: 13px; font-weight: 800; color: var(--aiw-red); margin-top: 1px; overflow-wrap: anywhere; }
.mall-ai-widget .mall-ai-rec .rec-price em { font-style: normal; font-size: 10px; color: var(--aiw-ink-3); font-weight: 400; margin-left: 5px; }
.mall-ai-widget .mall-ai-rec .rec-reason { display: block; font-size: 11px; color: var(--aiw-ink-2); line-height: 1.55; margin-top: 3px; white-space: pre-wrap; overflow-wrap: anywhere; }
.mall-ai-widget .mall-ai-rec .rec-go { flex: none; align-self: center; font-size: 11px; font-weight: 600; color: var(--aiw-accent-deep); background: var(--aiw-rec-blue); border-radius: 999px; padding: 5px 11px; white-space: nowrap; }
.mall-ai-widget .mall-ai-rec .rec-foot { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--aiw-rec-dash); font-size: 10.5px; color: var(--aiw-ink-3); }
.mall-ai-widget .mall-ai-rec .rec-again { flex: none; margin-left: auto; font-size: 11px; font-weight: 600; color: var(--aiw-violet); }
.mall-ai-widget .mall-ai-rec .rec-state { display: flex; flex-direction: column; align-items: center; gap: 7px; text-align: center; padding: 14px 16px; }
.mall-ai-widget .mall-ai-rec .rec-state .r-ico { width: 36px; height: 36px; border-radius: 11px; display: flex; align-items: center; justify-content: center; }
.mall-ai-widget .mall-ai-rec .r-ico.empty { color: var(--aiw-accent-deep); background: var(--aiw-rec-blue); }
.mall-ai-widget .mall-ai-rec .r-ico.err { color: var(--aiw-red); background: var(--aiw-red-soft); }
.mall-ai-widget .mall-ai-rec .rec-state b { font-size: 12.5px; }
.mall-ai-widget .mall-ai-rec .rec-state p { margin: 0; font-size: 11px; color: var(--aiw-ink-3); line-height: 1.65; }
.mall-ai-widget .mall-ai-rec .rec-off { display: block; font-size: 11px; color: var(--aiw-red); margin-top: 3px; }
.mall-ai-widget .mall-ai-rec .rec-stale { display: flex; gap: 10px; align-items: center; padding: 10px 12px; }
.mall-ai-widget .mall-ai-rec .rec-stale .rec-name { color: var(--aiw-ink-3); text-decoration: line-through; white-space: normal; }
html[data-theme="dark"] .mall-ai-widget {
  --aiw-rec-line: #2b2545; --aiw-rec-dash: #2b2545;
  --aiw-rec-start: #2b2545; --aiw-rec-deep: #a894ff; --aiw-rec-blue: #22304f;
}
@media (max-width: 360px) {
  .mall-ai-widget .mall-ai-rec .rec-item { display: grid; grid-template-columns: 56px minmax(0, 1fr); }
  .mall-ai-widget .mall-ai-rec .rec-go { grid-column: 2; justify-self: end; }
}
