/* ============================================================
   ref-align.css  —  星枢AI × 参考站 1:1 视觉对齐（集中精修层，最后引入，优先级最高）
   覆盖：上传斜槽动效(需求3/13) · 附件斜叠 · 参数芯片丰富配色(11/20) ·
        科技生成动画(需求2) · 长文去白块(需求9) · 输入框玻璃辉光
   ============================================================ */

/* ---------- 输入框整体：参考站实测 #1B1C21 平涂 + #1E1F25 细边，无玻璃辉光 ---------- */
.cp-v2 .composer-box{
  background:#1b1c21;
  border:1px solid #1e1f25;
  border-radius:18.9px;
  box-shadow:none;
  transition:border-color .25s, box-shadow .25s;
}
.cp-v2.cp-focused .composer-box,
.cp-v2.cp-expanded .composer-box{
  border-color:#1e1f25;
  box-shadow:none;
}

/* ---------- 上传空槽：1:1 参考站实测 = 单槽（附件/单参考图）正立虚线暗卡；仅视频首尾帧等【多槽】才向外 ±8° 斜切 ---------- */
.cp-v2 .cp-frames{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:2px 0 8px;}
/* 空槽本体：58×74，bg #2d2f35，.67px dashed rgba(98,105,113,.6)，圆角3.15px；默认正立（不旋转） */
.cp-v2 .cp-refs .cp-frame-add:not(.filled),
.cp-v2 .cp-frames .cp-frame-add:not(.filled){
  width:58px !important; height:74px !important;
  border-radius:3.15px !important;
  background:#2d2f35 !important;
  border:.67px dashed rgba(98,105,113,.6) !important;
  box-shadow:none !important;
  transform:none !important;
  transform-origin:center center;
  color:#626971;
  transition:transform .4s cubic-bezier(.4,0,.2,1),box-shadow .25s,border-color .25s,background .25s;
}
/* 仅多槽（首尾帧 / 参考图+参考视频等 ≥2 个 .cp-frame-add）扇形斜切：首槽 -8°、末槽 +8°；箭头直立居中 */
.cp-v2 .cp-frames:has(.cp-frame-add~.cp-frame-add)>.cp-frame-add:first-child:not(.filled){ transform:rotate(-8deg) !important; }
.cp-v2 .cp-frames:has(.cp-frame-add~.cp-frame-add)>.cp-frame-add:last-child:not(.filled){ transform:rotate(8deg) !important; }
.cp-v2 .cp-frames .cp-frame-arrow{ transform:none !important; color:rgba(148,163,184,.55); font-weight:400; align-self:center; }
/* 单槽 hover：正立轻微放大；多槽 hover 保留斜角 */
.cp-v2 .cp-refs .cp-frame-add:not(.filled):hover,
.cp-v2 .cp-frames>.cp-frame-add:only-child:not(.filled):hover{
  transform:scale(1.04) !important;
  border-color:rgba(140,149,159,.9) !important;
  z-index:6;
}
.cp-v2 .cp-frames:has(.cp-frame-add~.cp-frame-add)>.cp-frame-add:first-child:not(.filled):hover{ transform:rotate(-4deg) scale(1.04) !important; }
.cp-v2 .cp-frames:has(.cp-frame-add~.cp-frame-add)>.cp-frame-add:last-child:not(.filled):hover{ transform:rotate(4deg) scale(1.04) !important; }
.cp-v2 .cp-frame-add .cp-plus-icon,
.cp-v2 .cp-refs .cp-frame-add:not(.filled) em,
.cp-v2 .cp-refs .cp-frame-add:not(.filled) .cp-frame-count{ color:#626971; }
/* 已填充槽（首帧/尾帧/参考图等语义槽）：默认正立；白边拍立得抬升 */
.cp-v2 .cp-frame-add.filled{transform:none;overflow:hidden;}
.cp-v2 .cp-frame-add.filled:hover{transform:translateY(-4px) scale(1.05);}
.cp-v2 .cp-frame-add.filled img,
.cp-v2 .cp-frame-add.filled video{width:100%;height:100%;object-fit:cover;border-radius:inherit;}
.cp-v2 .cp-frame-arrow{color:rgba(148,163,184,.6);font-weight:700;}
.cp-v2 .cp-frame-add:not(.filled){animation:none;}

/* ---------- 附件拍立得牌堆（v32 1:1 参考站 fujian-card / stack-container / unified-upload-component 实测） ---------- */
/* 容器：58×74，与单张卡同尺寸 */
#attachmentList.sp-stack{ width:58px !important; height:74px !important; margin:6px 0 2px; }
#attachmentList.sp-stack .sp-stack-card{
  width:58px !important; height:74px !important;
  border:2px solid #fff !important; border-radius:3.15px !important;
  background:#2d2f35;
  box-shadow:rgba(0,0,0,.3) 0 4.2px 12.6px !important;
  transition:transform .4s cubic-bezier(.4,0,.2,1),box-shadow .4s cubic-bezier(.4,0,.2,1),border-color .2s;
}
#attachmentList.sp-stack .sp-stack-card img,
#attachmentList.sp-stack .sp-stack-card video{ border-radius:1px; }
/* hover 扇形手牌展开：兄弟卡每张右移 58.8px、收到 ±8° 小角（参考站实测 58.8px 间距） */
#attachmentList.sp-stack:hover .sp-stack-card:not(:hover){
  transform:translateX(calc(var(--i,0) * 58.8px)) rotate(var(--hr,0deg)) scale(1);
}
/* 单张悬停：放大 1.24、上浮 12.6px、保留自身倾角、置顶（参考站实测 scale≈1.24 / translateY -12.6） */
#attachmentList.sp-stack:hover .sp-stack-card:hover{
  transform:translateX(calc(var(--i,0) * 58.8px)) translateY(-12.6px) rotate(var(--sr,0deg)) scale(1.24);
  border-color:#fff;
  box-shadow:0 12px 26px rgba(0,0,0,.5);
  z-index:1000 !important;
}
#attachmentList.sp-stack:hover ~ .cp-frames,
#attachmentList.sp-stack:hover ~ *{ /* 展开时不额外推开，+卡随扇形末位 */ }
/* 圆形删除 X：30px 深灰圆（参考站 delete-btn-expanded） */
#attachmentList.sp-stack .sp-stack-card .sp-x{
  display:none; position:absolute; top:-9px; right:-9px;
  width:30px !important; height:30px !important; border-radius:50%;
  background:#1f2227 !important; border:.67px solid #41474c;
  color:rgba(255,255,255,.9); font-size:13px; line-height:1; place-items:center;
  box-shadow:none; padding:0; z-index:1000;
}
#attachmentList.sp-stack .sp-stack-card:hover .sp-x{ display:grid; }
/* 文件名+大小气泡（参考站 file-tooltip） */
#attachmentList.sp-stack .sp-stack-card .sp-name{
  bottom:calc(100% + 10px);
  background:rgba(56,60,68,.88); border:none;
  border-radius:8.4px; padding:5.25px 10.5px;
  box-shadow:0 12px 28px rgba(0,0,0,.5);
}
#attachmentList.sp-stack .sp-stack-card .sp-name::after{ border-top-color:rgba(56,60,68,.88); }
#attachmentList.sp-stack .sp-stack-card .spn-name{ font-size:10.5px; color:rgba(140,153,160,.95); }
#attachmentList.sp-stack .sp-stack-card .spn-size{ font-size:9.45px; color:rgba(140,153,160,.95); }

/* 有附件后：「+附件 n/10」收成 34px 圆形，压在牌堆右下角（参考站 unified-upload-component.collapsed 实测） */
.cp-v2 .cp-refs.has-items{ position:relative; }
.cp-v2 .cp-refs.has-items .cp-frame-add[data-frame-role="附件"],
.cp-v2 .cp-refs.has-items .cp-frame-add[data-frame-role="参考图"]{
  position:absolute !important; left:42px !important; top:58px !important;
  width:34px !important; height:34px !important; border-radius:50% !important;
  border:none !important; background:#31343c !important;
  box-shadow:rgba(0,0,0,.3) 0 2.1px 8.4px !important;
  transform:none !important; margin:0; z-index:100;
}
.cp-v2 .cp-refs.has-items .cp-frame-add[data-frame-role="附件"] .cp-plus-icon,
.cp-v2 .cp-refs.has-items .cp-frame-add[data-frame-role="参考图"] .cp-plus-icon{ font-size:16px !important; color:#c9d1d6; }
.cp-v2 .cp-refs.has-items .cp-frame-add[data-frame-role="附件"] em,
.cp-v2 .cp-refs.has-items .cp-frame-add[data-frame-role="参考图"] em,
.cp-v2 .cp-refs.has-items .cp-frame-add[data-frame-role="附件"] .cp-frame-count,
.cp-v2 .cp-refs.has-items .cp-frame-add[data-frame-role="参考图"] .cp-frame-count{ display:none; }

/* ---------- 参数胶囊：v32 1:1 参考站 深底 #292b33 + 按功能彩色图标/同色渐变描边（参考站 *-btn 实测） ---------- */
.cp-v2 .param-chip{
  height:31.5px !important; border-radius:6.3px !important;
  padding:0 10.5px; gap:6.3px;
  border:.67px solid transparent;
  background:#292b33; color:#f5fbff;
  transition:transform .18s,box-shadow .2s,border-color .2s,background .2s;
}
.cp-v2 .param-chip:hover{ transform:none; background:#33363f; box-shadow:none; }
.cp-v2 .param-chip .param-ico svg{ fill:currentColor; stroke:currentColor; }
/* 综合最优：实心深底 + 品红 #ab47bc 图标（参考站 channel-selector-btn，无渐变描边） */
.cp-v2 .param-chip.param-purple,
.cp-v2 .param-chip.param-schedule{ background:#292b33; }
.cp-v2 .param-chip.param-purple .param-ico,
.cp-v2 .param-chip.param-schedule .param-ico{ color:#ab47bc; }
/* 高级设置：青(6,182,212)→紫(139,92,246) 135° 渐变描边 + 青色图标（gaoji-btn） */
.cp-v2 .param-chip.param-panel-btn[data-panel="advanced"]{
  background-image:linear-gradient(#292b33,#292b33),linear-gradient(135deg,rgba(6,182,212,.65),rgba(139,92,246,.65));
  background-origin:padding-box,border-box; background-clip:padding-box,border-box;
}
.cp-v2 .param-chip.param-panel-btn[data-panel="advanced"] .param-ico{ color:rgba(6,182,212,.9); }
/* 长期记忆：紫(139,92,246)→浅紫(167,139,250) 135° 渐变描边 + 紫色图标（cqjy-btn） */
.cp-v2 .param-chip.param-panel-btn[data-panel="memory"]{
  background-image:linear-gradient(#292b33,#292b33),linear-gradient(135deg,rgba(139,92,246,.6),rgba(167,139,250,.5));
  background-origin:padding-box,border-box; background-clip:padding-box,border-box;
}
.cp-v2 .param-chip.param-panel-btn[data-panel="memory"] .param-ico{ color:rgba(139,92,246,.85); }
/* 技能广场：靛(99,102,241)→品红(168,85,247) 135° 渐变描边 + 靛色图标 + 蓝色数字角标（jsby-btn） */
.cp-v2 .param-chip.param-plaza-btn,
.cp-v2 .param-chip.param-panel-btn[data-panel="skill"]{
  background-image:linear-gradient(#292b33,#292b33),linear-gradient(135deg,rgba(99,102,241,.6),rgba(168,85,247,.5));
  background-origin:padding-box,border-box; background-clip:padding-box,border-box;
}
.cp-v2 .param-chip.param-plaza-btn .param-ico,
.cp-v2 .param-chip.param-panel-btn[data-panel="skill"] .param-ico{ color:rgba(99,102,241,.85); }
.cp-v2 .param-chip.param-plaza-btn .param-plaza-cnt{
  min-width:16px; height:16px; line-height:16px; padding:0 4px; margin-left:2px;
  border-radius:999px; background:#3b82f6; color:#fff; font-size:10px; font-weight:700;
  display:inline-grid; place-items:center;
}
/* 下拉菜单：深色玻璃 + 彩色选中（保持） */
.cp-v2 .param-dropdown-menu{background:rgba(17,24,38,.97);border:1px solid rgba(148,163,184,.2);border-radius:12px;box-shadow:0 18px 44px -12px rgba(0,0,0,.8);backdrop-filter:blur(10px);}
.cp-v2 .param-dropdown-menu button{color:#cbd5e1;border-radius:8px;}
.cp-v2 .param-dropdown-menu button:hover{background:rgba(34,211,238,.12);color:#a5f3fc;}
.cp-v2 .param-dropdown-menu button.selected{background:rgba(34,211,238,.16);color:#67e8f9;font-weight:700;}

/* ============================================================
   需求2：生成等待框 —— 科技感皮肤（结构由 buildMediaWaiting 提供）
   ============================================================ */
.mw-box{
  position:relative;overflow:hidden;
  margin:10px 0;padding:16px 18px;border-radius:16px;
  background:
    radial-gradient(120% 140% at 0% 0%,rgba(34,211,238,.10),transparent 55%),
    linear-gradient(180deg,rgba(16,23,36,.94),rgba(10,15,25,.96));
  border:1px solid rgba(34,211,238,.28);
  box-shadow:0 12px 36px -16px rgba(34,211,238,.35),inset 0 1px 0 rgba(255,255,255,.04);
}
/* 顶部流光扫描 */
.mw-box::before{content:"";position:absolute;inset:0 0 auto 0;height:2px;
  background:linear-gradient(90deg,transparent,rgba(34,211,238,.9),rgba(167,139,250,.9),transparent);
  background-size:200% 100%;animation:mwSweep 1.8s linear infinite;}
@keyframes mwSweep{0%{background-position:200% 0}100%{background-position:-200% 0}}
/* 细网格底纹 */
.mw-box::after{content:"";position:absolute;inset:0;pointer-events:none;opacity:.18;
  background-image:linear-gradient(rgba(34,211,238,.18) 1px,transparent 1px),linear-gradient(90deg,rgba(34,211,238,.18) 1px,transparent 1px);
  background-size:22px 22px;mask-image:radial-gradient(80% 80% at 50% 0%,#000,transparent);}
.mw-box>*{position:relative;z-index:1;}
.mw-meta{display:flex;align-items:center;gap:9px;margin-top:4px;color:#9fd8e6;font-size:12.5px;}
.mw-spin{width:15px;height:15px;border-radius:50%;border:2px solid rgba(34,211,238,.25);border-top-color:#22d3ee;animation:mwRot .8s linear infinite;}
@keyframes mwRot{to{transform:rotate(360deg)}}
/* 图片骨架 */
.mw-skel{display:flex;gap:10px;margin-bottom:6px;}
.mw-skel i{flex:1;height:84px;border-radius:12px;background:linear-gradient(100deg,rgba(148,163,184,.08) 30%,rgba(34,211,238,.18) 50%,rgba(148,163,184,.08) 70%);background-size:220% 100%;animation:mwShimmer 1.3s ease-in-out infinite;}
.mw-skel i:nth-child(2){animation-delay:.18s}.mw-skel i:nth-child(3){animation-delay:.36s}
@keyframes mwShimmer{0%{background-position:200% 0}100%{background-position:-200% 0}}
/* 声波/均衡器 */
.mw-wave,.mw-eq{display:flex;align-items:flex-end;gap:4px;height:34px;margin-bottom:6px;}
.mw-wave i,.mw-eq i{width:5px;border-radius:3px;background:linear-gradient(180deg,#22d3ee,#a78bfa);animation:mwBar 1s ease-in-out infinite;}
.mw-wave i{height:100%}.mw-eq i{height:100%}
.mw-wave i:nth-child(2),.mw-eq i:nth-child(2){animation-delay:.12s}
.mw-wave i:nth-child(3),.mw-eq i:nth-child(3){animation-delay:.24s}
.mw-wave i:nth-child(4),.mw-eq i:nth-child(4){animation-delay:.36s}
.mw-wave i:nth-child(5),.mw-eq i:nth-child(5){animation-delay:.48s}
.mw-wave i:nth-child(6){animation-delay:.6s}.mw-wave i:nth-child(7){animation-delay:.72s}
@keyframes mwBar{0%,100%{transform:scaleY(.3);opacity:.6}50%{transform:scaleY(1);opacity:1}}
/* 视频引擎 */
.mv-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;}
.mv-title{display:flex;align-items:center;gap:9px;font-weight:700;color:#dff6fb;letter-spacing:.5px;}
.mv-core{width:16px;height:16px;border-radius:50%;background:radial-gradient(circle,#67e8f9,#0891b2);box-shadow:0 0 12px #22d3ee;animation:mwPulse 1.4s ease-in-out infinite;}
@keyframes mwPulse{0%,100%{transform:scale(.85);opacity:.75}50%{transform:scale(1.1);opacity:1}}
.mv-pct{font-variant-numeric:tabular-nums;font-weight:800;color:#22d3ee;}
.mv-track{height:8px;border-radius:6px;background:rgba(148,163,184,.14);overflow:hidden;}
.mv-fill{display:block;height:100%;border-radius:6px;background:linear-gradient(90deg,#0891b2,#22d3ee,#a78bfa);box-shadow:0 0 12px rgba(34,211,238,.6);transition:width .5s ease;}
.mv-scan{position:relative;height:3px;margin-top:8px;border-radius:3px;overflow:hidden;background:rgba(148,163,184,.1);}
.mv-scan span{position:absolute;top:0;bottom:0;width:34%;border-radius:3px;background:linear-gradient(90deg,transparent,#67e8f9,transparent);animation:mwScanMove 1.5s ease-in-out infinite;}
@keyframes mwScanMove{0%{left:-34%}100%{left:100%}}
.mw-nodes{list-style:none;margin:12px 0 0;padding:0;display:grid;gap:7px;}
.mw-nodes li{display:flex;align-items:center;gap:9px;color:#64748b;font-size:12.5px;transition:color .3s;}
.mw-dot{width:9px;height:9px;border-radius:50%;background:#334155;flex:none;transition:.3s;}
.mw-nodes li.active{color:#a5f3fc;}
.mw-nodes li.active .mw-dot{background:#22d3ee;box-shadow:0 0 10px #22d3ee;animation:mwPulse 1.2s infinite;}
.mw-nodes li.done{color:#86efac;}
.mw-nodes li.done .mw-dot{background:#34d399;box-shadow:0 0 8px rgba(52,211,153,.6);}
.mw-sub{color:inherit;opacity:.65;font-size:11px;margin-left:6px;}

/* ============================================================
   需求9：AI 长文展开后去除突兀白块（代码块/展开区统一深色）
   ============================================================ */
.msg.ai pre,.msg-ai pre,.chat-bubble pre,.ai-msg pre,
.message-ai pre{background:#0d1526!important;color:#dbe7f3!important;border:1px solid rgba(148,163,184,.18);border-radius:12px;}
.msg.ai code,.msg-ai code,.chat-bubble code{background:rgba(148,163,184,.14)!important;color:#e2e8f0;border-radius:5px;padding:1px 5px;}
.msg.ai pre code,.msg-ai pre code,.chat-bubble pre code{background:transparent!important;padding:0;}
.msg-expand-btn,.toggle-long,.collapse-btn{background:transparent!important;box-shadow:none!important;}
/* 兜底：AI 气泡内任何纯白/浅灰底块压成深色玻璃 */
.msg.ai [style*="background: rgb(255"],.msg.ai [style*="background:#fff"],.msg.ai [style*="background: #fff"],
.msg-ai [style*="background: rgb(255"],.msg-ai [style*="background:#fff"]{background:rgba(148,163,184,.08)!important;color:#e2e8f0!important;}

/* ============================================================
   需求8/17：AI 气泡模型胶囊（图标+名称）+ 每条消耗（默认收起，hover 看明细）
   ============================================================ */
.chat-bubble.assistant .cb-head{display:flex;align-items:center;margin-bottom:7px;}
.chat-bubble.assistant .cb-model{display:inline-flex;align-items:center;gap:6px;padding:3px 10px 3px 5px;border-radius:999px;background:rgba(34,211,238,.08);border:1px solid rgba(34,211,238,.22);font-size:12px;font-weight:700;color:#a5f3fc;max-width:80%;}
.chat-bubble.assistant .cb-model-img{width:18px;height:18px;border-radius:50%;object-fit:cover;background:rgba(255,255,255,.06);}
.chat-bubble.assistant .cb-model-em{display:inline-grid;place-items:center;width:18px;height:18px;border-radius:50%;background:linear-gradient(135deg,rgba(34,211,238,.25),rgba(167,139,250,.25));font-size:11px;font-style:normal;}
.chat-bubble.assistant .cb-model-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.chat-bubble.assistant .cb-usage{display:inline-flex;align-items:center;gap:6px;flex-wrap:wrap;margin-top:8px;font-size:11.5px;color:rgba(148,163,184,.85);cursor:default;user-select:none;}
.chat-bubble.assistant .cb-usage .cbu-main{display:inline-flex;align-items:center;gap:6px;color:rgba(148,163,184,.9);}
.chat-bubble.assistant .cb-usage .cbu-tokens{color:#60a5fa;font-weight:500;letter-spacing:.2px;}
.chat-bubble.assistant .cb-usage .cbu-done{display:inline-flex;align-items:center;height:18px;padding:0 7px;border-radius:9px;font-size:10.5px;color:#34d399;background:rgba(52,211,153,.12);border:1px solid rgba(52,211,153,.25);}
.chat-bubble.assistant .cb-usage .cbu-detail{display:inline-flex;align-items:center;gap:4px;margin-left:2px;color:#fbbf24;font-weight:600;}
.chat-bubble.assistant .cb-usage .cbu-time{color:rgba(148,163,184,.6);font-weight:400;}
.chat-bubble.user{display:flex;flex-direction:column;align-items:flex-end;margin-left:auto;}
.chat-bubble.assistant{margin-right:auto;}

/* 需求10：具体分类下模型右侧绿色“能力契合度”徽章（对齐参考站） */
.ws-model .m-fit{font-style:normal;display:inline-flex;align-items:center;justify-content:center;min-width:54px;padding:3px 9px;border-radius:9px;font-size:12px;font-weight:800;letter-spacing:.3px;color:#34d399;background:rgba(16,185,129,.13);border:1px solid rgba(52,211,153,.30);font-variant-numeric:tabular-nums;line-height:1.4;white-space:nowrap;}
.ws-model.active .m-fit{background:rgba(16,185,129,.22);border-color:rgba(52,211,153,.55);color:#6ee7b7;box-shadow:0 0 0 1px rgba(52,211,153,.15);}
html[data-theme="light"] .ws-model .m-fit{background:rgba(16,185,129,.10);color:#059669;border-color:rgba(16,185,129,.30);}
.chat-bubble.user strong{align-self:flex-end;}

/* ============================================================
   需求18：左栏模型 hover 介绍浮卡
   ============================================================ */
.sp-model-card{position:fixed;z-index:99999;width:268px;padding:13px 14px;border-radius:14px;
  background:linear-gradient(180deg,rgba(20,28,44,.98),rgba(12,18,30,.98));
  border:1px solid rgba(34,211,238,.3);box-shadow:0 22px 50px -14px rgba(0,0,0,.85),0 0 24px -10px rgba(34,211,238,.4);
  backdrop-filter:blur(12px);pointer-events:none;animation:spmcIn .16s ease;}
@keyframes spmcIn{from{opacity:0;transform:translateX(-6px)}to{opacity:1;transform:none}}
.sp-model-card .spmc-head{display:flex;align-items:center;gap:9px;margin-bottom:8px;}
.sp-model-card .spmc-head img{width:30px;height:30px;border-radius:8px;object-fit:cover;background:rgba(255,255,255,.06);}
.sp-model-card .spmc-em{display:inline-grid;place-items:center;width:30px;height:30px;border-radius:8px;font-size:16px;background:linear-gradient(135deg,rgba(34,211,238,.22),rgba(167,139,250,.22));}
.sp-model-card .spmc-t1{display:flex;flex-direction:column;min-width:0;flex:1;}
.sp-model-card .spmc-t1 b{font-size:13.5px;color:#f1f5f9;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.sp-model-card .spmc-t1 span{font-size:11px;color:#7dd3fc;}
.sp-model-card .spmc-type{font-size:10.5px;padding:2px 8px;border-radius:999px;background:rgba(167,139,250,.14);color:#c4b5fd;}
.sp-model-card .spmc-desc{margin:0 0 10px;font-size:12px;line-height:1.6;color:#b6c2d4;max-height:96px;overflow:hidden;}
.sp-model-card .spmc-foot{display:flex;align-items:center;justify-content:space-between;}
.sp-model-card .spmc-price{font-size:11.5px;color:#fbbf24;font-weight:700;}
.sp-model-card .spmc-go{font-size:11px;color:#67e8f9;}

/* ============================================================
   需求19：历史对话按模型分组 + 竖排入口仅在有历史时出现
   ============================================================ */
.hist-group{margin-bottom:12px;}
.hist-group-head{display:flex;align-items:center;gap:7px;padding:5px 6px;font-size:11.5px;font-weight:700;color:#7dd3fc;position:sticky;top:0;z-index:1;background:linear-gradient(180deg,rgba(13,18,28,.96),rgba(13,18,28,.86));border-radius:8px;}
.hist-group-head img,.hist-group-head .pivot-badge{width:22px;height:22px;border-radius:6px;object-fit:cover;}
.hg-name{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.hg-count{font-size:10px;background:rgba(34,211,238,.15);border:1px solid rgba(34,211,238,.25);border-radius:999px;padding:0 7px;color:#67e8f9;}
.hist-group-body{margin-top:3px;}
.hist-group-body .history-item{margin-left:12px;}
[data-history-rail]{display:none!important;}
[data-history-rail].has{display:flex!important;}

/* ============================================================
   需求16：灵感广场标签配色（默认琥珀、选中青色）+ 搜索栏/标签间距
   ============================================================ */
.if-search{gap:10px;margin-bottom:16px;}
.if-search #ifSearch{height:38px;border-radius:11px;}
.if-tagcloud{display:flex!important;flex-wrap:wrap;gap:9px 10px;margin-top:2px;}
.if-tag{padding:6px 14px;border-radius:999px;font-size:12.5px;line-height:1.4;border:1px solid var(--itb,rgba(148,163,184,.22));background:var(--itbg,rgba(148,163,184,.06));color:var(--itc,rgba(255,255,255,.7));cursor:pointer;transition:all .18s ease;white-space:nowrap;}
.if-tag:nth-child(5n+1){--itc:#67e8f9;--itbg:rgba(34,211,238,.07);--itb:rgba(34,211,238,.3);}
.if-tag:nth-child(5n+2){--itc:#c4b5fd;--itbg:rgba(139,92,246,.09);--itb:rgba(139,92,246,.32);}
.if-tag:nth-child(5n+3){--itc:#f9a8d4;--itbg:rgba(236,72,153,.09);--itb:rgba(236,72,153,.32);}
.if-tag:nth-child(5n+4){--itc:#fcd34d;--itbg:rgba(251,191,36,.08);--itb:rgba(251,191,36,.32);}
.if-tag:nth-child(5n+5){--itc:#86efac;--itbg:rgba(34,197,94,.08);--itb:rgba(34,197,94,.3);}
.if-tag:hover{color:var(--itc);border-color:var(--itc);background:var(--itbg);transform:translateY(-1px);}
.if-tag.on{background:var(--itbg);border-color:var(--itc);color:var(--itc);font-weight:700;box-shadow:0 0 14px -3px var(--itb);}
.if-foot{margin-top:14px;gap:10px;}
.ig-tabs{gap:10px;margin-bottom:14px;}
.ig-cats{gap:9px;margin-bottom:14px;flex-wrap:wrap;}
.ig-tabs button,.ig-cats button{border-radius:999px!important;}

/* 需求1：移除右下角独立悬浮圆钮（功能收进右上用户中心大菜单；输入框左侧角色按钮仍可用） */
.floating-user{display:none!important;}

/* ============================================================
   需求10/12：智能体——引导胶囊、输入框不过高、发送钮紫色（参考站智能体为紫色主题）
   ============================================================ */
.agent-suggest-strip{display:flex;flex-wrap:wrap;gap:9px;justify-content:center;max-width:760px;margin:14px auto 4px;padding:0 18px;}
.agent-suggest-strip .agent-q{padding:8px 15px;border-radius:999px;font-size:12.5px;cursor:pointer;color:#e9d5ff;
  background:rgba(168,85,247,.1);border:1px solid rgba(168,85,247,.32);transition:.16s;}
.agent-suggest-strip .agent-q:hover{background:rgba(168,85,247,.2);border-color:rgba(168,85,247,.6);transform:translateY(-1px);box-shadow:0 8px 20px -8px rgba(168,85,247,.6);}
#wsComposer.agent-mode .composer-box textarea,
#wsComposer.agent-mode textarea{min-height:44px!important;height:auto!important;max-height:200px;}
#wsComposer.agent-mode #sendBtn:not(:disabled){background:linear-gradient(135deg,#a855f7,#7c3aed)!important;border-color:transparent!important;box-shadow:0 8px 22px -8px rgba(168,85,247,.7);}
.agent-item .ag-badge{border-radius:11px!important;box-shadow:0 0 0 1px rgba(168,85,247,.25),0 6px 16px -8px rgba(168,85,247,.65);transition:.18s;}
.agent-item:hover .ag-badge{transform:translateY(-1px) scale(1.05);box-shadow:0 0 0 1px rgba(168,85,247,.5),0 10px 22px -8px rgba(168,85,247,.8);}
.agent-item.active .ag-badge{box-shadow:0 0 0 1px rgba(168,85,247,.6),0 0 18px -2px rgba(168,85,247,.85);}

/* ============================================================
   需求1：对话气泡 1:1 对齐参考站（左模型头像 + 深色宽卡片 + 底栏：左操作 / 右 tokens·状态）
   ============================================================ */
.chat-bubble{max-width:88%;}
.chat-bubble.assistant{display:flex;flex-direction:row;align-items:flex-start;gap:10px;width:100%;max-width:100%;margin-right:auto;}
.chat-bubble.user{display:flex;flex-direction:column;align-items:flex-end;margin-left:auto;}
/* AI 左侧模型头像（34） */
.chat-bubble.assistant .cb-ava{flex:0 0 34px;width:34px;height:34px;border-radius:9px;display:grid;place-items:center;margin-top:2px;
  background:rgba(34,211,238,.10);border:1px solid rgba(34,211,238,.20);overflow:hidden;}
.chat-bubble.assistant .cb-ava .cb-model-img{width:30px;height:30px;border-radius:7px;object-fit:cover;}
.chat-bubble.assistant .cb-ava .cb-model-em{display:grid;place-items:center;width:30px;height:30px;border-radius:7px;font-style:normal;font-size:16px;
  background:linear-gradient(135deg,rgba(34,211,238,.32),rgba(99,102,241,.32));}
.chat-bubble.assistant .cb-col{flex:1;min-width:0;max-width:calc(100% - 48px);display:flex;flex-direction:column;}
.chat-bubble.assistant .cb-name{font-size:12.5px;font-weight:600;color:rgba(255,255,255,.62);margin:0 2px 6px;}
/* AI 气泡卡片：深色、左上小圆角、宽 */
.chat-bubble.assistant>p,
.chat-bubble.assistant .cb-col>p{background:rgba(20,20,25,.95)!important;border:1px solid rgba(255,255,255,.06)!important;
  border-radius:4px 16px 16px 16px!important;padding:16px 20px!important;font-size:15px;line-height:1.8;color:rgba(200,203,212,.92);
  white-space:normal;min-width:280px;max-width:100%;margin:0;}
/* 用户气泡：深灰、右下小圆角、靠右（非青色渐变） */
.chat-bubble.user>p{background:rgb(26,26,28)!important;border:1px solid rgba(255,255,255,.10)!important;
  border-radius:16px 16px 4px!important;padding:12px 16px!important;font-size:15px;line-height:1.75;color:#fff!important;max-width:100%;}
/* 底栏：左操作、右用量 */
.chat-bubble.assistant .cb-bottom{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:7px;padding:0 4px;flex-wrap:wrap;}
.cb-bottom .ma-slot{display:inline-flex;}
.cb-bottom .ma-actions{margin-top:0!important;opacity:1!important;}
.chat-bubble.assistant .cb-usage{margin-top:0!important;}
.chat-bubble.user .ma-actions{justify-content:flex-end;opacity:1!important;margin-top:6px!important;}
.ma-actions .ma-btn{background:rgba(30,31,37,.95);border:0;border-radius:6px;color:rgba(255,255,255,.6);
  height:28px;padding:0 11px;font-size:12.5px;gap:6px;}
.ma-actions .ma-btn i{font-style:normal;font-size:11px;}
.ma-actions .ma-btn:hover{background:rgba(48,50,60,.98);color:#fff;}
.ma-actions .ma-btn.ma-danger:hover{background:rgba(248,113,113,.16);color:#fca5a5;}
/* markdown 富排版（block 级 span，外层容器为 p） */
.chat-bubble .md-h{display:block;font-weight:600;color:rgba(255,255,255,.92);line-height:1.45;}
.chat-bubble .md-h1{font-size:20px;margin:18px 0 10px;}
.chat-bubble .md-h2{font-size:18px;margin:16px 0 9px;}
.chat-bubble .md-h3,.chat-bubble .md-h4,.chat-bubble .md-h5,.chat-bubble .md-h6{font-size:17px;margin:15px 0 8px;}
.chat-bubble .md-h:first-child{margin-top:2px;}
.chat-bubble .md-hr{display:block;height:1px;margin:14px 0;background:rgba(255,255,255,.10);border:0;}
.chat-bubble .md-li{display:block;position:relative;margin:5px 0;line-height:1.75;color:rgba(200,203,212,.9);}
.chat-bubble .md-ul{padding-left:20px;}
.chat-bubble .md-ul::before{content:"•";position:absolute;left:6px;color:rgba(34,211,238,.75);}
.chat-bubble .md-ol{padding-left:24px;}
.chat-bubble .md-num{position:absolute;left:-22px;width:16px;text-align:right;color:rgba(34,211,238,.85);font-weight:600;}
.chat-bubble.assistant p strong{color:rgba(255,255,255,.94);font-weight:600;}
.chat-bubble p a{color:#60a5fa;text-decoration:none;}
.chat-bubble p a:hover{text-decoration:underline;}
/* 浅色模式适配 */
html[data-theme="light"] .chat-bubble.assistant .cb-col>p,
.theme-light .chat-bubble.assistant .cb-col>p{background:rgba(255,255,255,.96)!important;border-color:rgba(15,23,42,.08)!important;color:#334155;}
html[data-theme="light"] .chat-bubble.user>p,.theme-light .chat-bubble.user>p{background:#eef1f6!important;border-color:rgba(15,23,42,.08)!important;color:#0f172a!important;}
html[data-theme="light"] .chat-bubble .md-h,.theme-light .chat-bubble .md-h{color:#0f172a;}
html[data-theme="light"] .chat-bubble .md-li,.theme-light .chat-bubble .md-li{color:#475569;}
html[data-theme="light"] .chat-bubble.assistant p strong,.theme-light .chat-bubble.assistant p strong{color:#0f172a;}
@media(max-width:760px){.chat-bubble{max-width:94%;}.chat-bubble.assistant .cb-col{max-width:calc(100% - 42px);}.chat-bubble.assistant>p,.chat-bubble.assistant .cb-col>p{font-size:14.5px;padding:13px 15px!important;}}

/* ============================================================
   点8：长文折叠按钮 + 历史项 N轮/类型徽标
   ============================================================ */
.chat-bubble.assistant .cb-col>p.folded{overflow:hidden;position:relative;}
.chat-bubble.assistant .cb-col>p.folded::after{content:"";position:absolute;left:0;right:0;bottom:0;height:60px;
  background:linear-gradient(180deg,rgba(20,20,25,0),rgba(20,20,25,.96));pointer-events:none;}
html[data-theme="light"] .chat-bubble.assistant .cb-col>p.folded::after,
.theme-light .chat-bubble.assistant .cb-col>p.folded::after{background:linear-gradient(180deg,rgba(255,255,255,0),rgba(255,255,255,.96));}
.cb-fold-btn{display:inline-flex;align-items:center;gap:4px;align-self:flex-start;margin:6px 0 0 4px;
  background:transparent;border:1px solid rgba(255,255,255,.12);color:#94a3b8;font-size:12px;
  padding:3px 12px;border-radius:999px;cursor:pointer;transition:.16s;}
.cb-fold-btn:hover{color:#fff;border-color:rgba(34,211,238,.45);background:rgba(34,211,238,.08);}
.cb-fold-btn i{font-style:normal;font-size:11px;}
/* 历史项：N轮（黄）+ 类型徽标 */
.history-item{display:flex;align-items:center;gap:8px;}
.history-item .hi-rounds{color:#fbbf24;font-style:normal;font-weight:600;margin-right:4px;}
.history-item .hi-badge{flex:0 0 auto;font-size:10px;padding:1px 7px;border-radius:999px;
  background:rgba(96,165,250,.14);color:#93c5fd;border:1px solid rgba(96,165,250,.28);}
/* tokens 悬停明细提示（原生 title，多行） */
.cb-usage .cbu-main{cursor:help;}

/* ============================================================
   点11：历史面板停靠列（左侧，紧邻菜单，不盖模型列表）
   ============================================================ */
.history-panel{left:0!important;right:auto!important;width:300px!important;border-left:0;border-right:1px solid var(--border);padding:14px 14px 12px;z-index:120;opacity:1!important;transform:none!important;}
.history-panel .hh-title{display:flex;align-items:center;gap:6px;}
.history-panel .hh-clock{color:#fbbf24;font-size:15px;}
.history-panel .hh-title strong{font-size:15px;}
.history-panel .hh-unread{font-size:10px;font-weight:700;min-width:16px;height:16px;line-height:16px;text-align:center;
  border-radius:999px;background:rgba(251,191,36,.2);color:#fbbf24;border:1px solid rgba(251,191,36,.4);padding:0 4px;}
.history-panel .hh-tools{display:flex;align-items:center;gap:6px;}
.history-panel .hh-pin{background:transparent;border:0;color:#94a3b8;font-size:14px;cursor:pointer;opacity:.7;}
.history-panel .hh-pin.active{opacity:1;color:#fbbf24;}
.history-panel .hh-tools button:last-child{font-size:18px;background:transparent;border:0;color:#94a3b8;cursor:pointer;}
.hp-new-chat{display:block;width:100%;margin:12px 0 10px;padding:9px 0;border:0;border-radius:10px;cursor:pointer;
  background:linear-gradient(135deg,#fcd34d,#f59e0b);color:#3a2a05;font-size:13.5px;font-weight:700;box-shadow:0 6px 16px -8px rgba(245,158,11,.6);}
.hp-new-chat:hover{filter:brightness(1.05);}
.hp-toolrow{display:flex;align-items:center;justify-content:space-between;margin:2px 0 8px;}
.hp-selectall{display:flex;align-items:center;gap:5px;font-size:12px;color:#94a3b8;cursor:pointer;}
.hp-viewtoggle{display:flex;gap:6px;}
.hp-viewtoggle button{background:transparent;border:0;color:#94a3b8;cursor:pointer;font-size:13px;padding:2px 5px;border-radius:6px;}
.hp-viewtoggle button:hover{background:rgba(255,255,255,.06);color:#fff;}

/* ============================================================
   点13：长期记忆弹窗 + AI采访须知
   ============================================================ */
.lm-mask{position:fixed;inset:0;z-index:400;background:rgba(0,0,0,.6);backdrop-filter:blur(4px);
  display:flex;align-items:center;justify-content:center;padding:20px;}
.lm-mask.hidden{display:none;}
.lm-modal{width:460px;max-width:100%;max-height:86vh;display:flex;flex-direction:column;
  background:linear-gradient(180deg,#161a26,#0f1219);border:1px solid rgba(255,255,255,.08);
  border-radius:18px;box-shadow:0 30px 80px -20px rgba(0,0,0,.8);overflow:hidden;}
.lm-head{display:flex;align-items:flex-start;justify-content:space-between;padding:18px 18px 12px;}
.lm-head-l{display:flex;gap:11px;align-items:center;}
.lm-logo{font-size:24px;}
.lm-head-l strong{font-size:16px;display:block;}
.lm-head-l p{font-size:11.5px;color:#94a3b8;margin:2px 0 0;max-width:280px;line-height:1.4;}
.lm-head-r{display:flex;align-items:center;gap:8px;}
.lm-add{background:rgba(96,165,250,.14);border:1px solid rgba(96,165,250,.35);color:#93c5fd;
  padding:5px 12px;border-radius:9px;font-size:12.5px;cursor:pointer;}
.lm-add:hover{background:rgba(96,165,250,.24);}
.lm-x{background:transparent;border:0;color:#94a3b8;font-size:20px;cursor:pointer;line-height:1;}
.lm-logrow{display:flex;align-items:center;gap:8px;margin:0 18px;padding:9px 12px;border-radius:10px;
  background:rgba(255,255,255,.04);cursor:pointer;font-size:12.5px;color:#cbd5e1;}
.lm-logrow:hover{background:rgba(255,255,255,.07);}
.lm-log-sub{color:#64748b;font-size:11.5px;}
.lm-body{flex:1;overflow-y:auto;padding:14px 18px;}
.lm-empty{text-align:center;padding:26px 10px;}
.lm-empty-star{font-size:34px;color:#a78bfa;margin-bottom:8px;}
.lm-empty h4{font-size:16px;margin:0 0 8px;color:#fff;}
.lm-empty p{font-size:12.5px;color:#94a3b8;line-height:1.6;margin:0 auto 16px;max-width:340px;}
.lm-grad{background:linear-gradient(135deg,#a78bfa,#22d3ee);color:#0b1020;border:0;
  padding:9px 22px;border-radius:999px;font-size:13.5px;font-weight:700;cursor:pointer;}
.lm-grad:hover{filter:brightness(1.08);}
.lm-items{display:flex;flex-direction:column;gap:8px;}
.lm-item{display:flex;align-items:center;gap:9px;padding:9px 11px;border-radius:11px;
  background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.06);}
.lm-item-cat{flex:0 0 auto;font-size:10.5px;padding:2px 8px;border-radius:999px;
  background:rgba(167,139,250,.16);color:#c4b5fd;}
.lm-item-text{flex:1;font-size:13px;color:#e2e8f0;line-height:1.4;}
.lm-item-ops{display:flex;gap:4px;}
.lm-item-ops button{background:transparent;border:0;color:#94a3b8;cursor:pointer;font-size:13px;padding:2px 5px;}
.lm-item-ops button:hover{color:#fff;}
.lm-logs{padding:10px 18px 16px;border-top:1px solid rgba(255,255,255,.06);}
.lm-logs-title{font-size:12px;color:#94a3b8;margin-bottom:8px;}
.lm-log{font-size:12px;color:#cbd5e1;padding:5px 0;border-bottom:1px dashed rgba(255,255,255,.05);}
.lm-log-a{color:#fbbf24;margin-right:6px;}
.lm-log small{color:#64748b;float:right;}
.lm-notice{width:380px;text-align:center;padding:26px 26px 22px;}
.lm-notice-icon{font-size:38px;color:#a78bfa;margin-bottom:8px;}
.lm-notice h3{margin:0 0 8px;font-size:18px;color:#fff;}
.lm-notice-lead{font-size:13px;color:#94a3b8;line-height:1.6;margin:0 0 12px;}
.lm-notice-list{text-align:left;margin:0 0 16px;padding:10px 14px;background:rgba(255,255,255,.04);border-radius:10px;}
.lm-notice-list li{font-size:12.5px;color:#cbd5e1;line-height:1.9;list-style:none;}
.lm-notice-list li::before{content:"•";color:#22d3ee;margin-right:6px;}
.lm-notice-actions{display:flex;gap:10px;justify-content:center;}
.lm-ghost{background:transparent;border:1px solid rgba(255,255,255,.15);color:#cbd5e1;
  padding:8px 20px;border-radius:999px;font-size:13px;cursor:pointer;}
.lm-ghost:hover{background:rgba(255,255,255,.06);}

/* ============================================================
   参考站牌堆系统 v33 —— 1:1 hz.lk888.ai
   image-stack-container(拍立得牌堆) · frame-wrapper(类型空槽) · middle-icon(箭头)
   ============================================================ */

/* —— 序列容器：顶对齐，槽间不留 flex gap（箭头自带宽度）—— */
.cp-v2 .cp-frames{display:contents;}
.cp-v2 .cp-refs{align-items:flex-start;overflow:visible;}

/* —— 牌堆容器：恒 55×70，relative，承载堆叠卡 + 常驻 +钮 —— */
.cp-v2 .cp-fstack{
  position:relative; flex:0 0 auto; display:block;
  width:55px; height:70px;
  margin:8px 10px 12px 2px;
  transition:width .4s cubic-bezier(.4,0,.2,1),height .4s cubic-bezier(.4,0,.2,1);
}
.cp-v2 .cp-fstack:first-child{margin-left:2px;}

/* —— 常驻 +钮 · 空态：55×70 虚线暗卡，参考图 -8° —— */
.cp-v2 .cp-fstack .cp-fstack-add{
  position:absolute; top:0; left:0; z-index:10;
  width:55px !important; height:70px !important;
  border-radius:3px !important;
  background:#2d2f35 !important;
  border:.67px dashed rgba(98,105,113,.62) !important;
  box-shadow:none !important; padding:0 !important;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px;
  transform:rotate(-8deg) !important;
  transition:transform .4s cubic-bezier(.4,0,.2,1),width .4s,height .4s,border-radius .4s,background .3s,left .4s,top .4s;
}
.cp-v2 .cp-fstack .cp-fstack-add:hover{transform:rotate(-4deg) scale(1.07) !important;border-color:rgba(140,149,159,.92) !important;z-index:60;}
.cp-v2 .cp-fstack .cp-fstack-add .cp-plus-icon{font-size:26px;font-weight:300;color:#626971;line-height:1;}
.cp-v2 .cp-fstack .cp-fstack-add em{font-style:normal;font-size:11px;color:#626971;line-height:1.2;}

/* —— 有卡后 +钮收成 32px 圆，压在牌堆右下角（unified-upload-component.collapsed）—— */
.cp-v2 .cp-fstack.has-cards .cp-fstack-add{
  width:32px !important; height:32px !important; border-radius:50% !important;
  background:#32323c !important; border:none !important;
  transform:translate(39px,54px) !important;
  box-shadow:0 2px 8px rgba(0,0,0,.35) !important; z-index:100;
}
.cp-v2 .cp-fstack.has-cards .cp-fstack-add .cp-plus-icon{font-size:18px;color:#fff;}
.cp-v2 .cp-fstack.has-cards .cp-fstack-add em{display:none;}
.cp-v2 .cp-fstack.has-cards .cp-fstack-add:hover{background:#3c3c46 !important;transform:translate(39px,54px) scale(1.1) !important;}
/* hover 扇形展开时，圆钮跟到末位卡右下角 */
.cp-v2 .cp-fstack.has-cards:hover .cp-fstack-add{
  transform:translate(calc((var(--n,1) - 1)*56px + 30px),52px) !important;
}
/* 达到上限隐藏 +钮 */
.cp-v2 .cp-fstack.is-full .cp-fstack-add{opacity:0;pointer-events:none;}

/* —— 牌堆卡：absolute 55×70，无白边/青边，直接图片；角度层级由内联 --sr/--hr/--i/z 控制 —— */
.cp-v2 .cp-fstack .cp-fstack-card{
  position:absolute; top:0; left:0;
  width:55px !important; height:70px !important;
  border-radius:3px !important; border:none !important; padding:0 !important; margin:0 !important;
  background:#202229; overflow:hidden;
  box-shadow:0 3px 9px rgba(0,0,0,.32);
  transform:rotate(var(--sr,-10deg));
  transition:transform .4s cubic-bezier(.4,0,.2,1),box-shadow .3s;
  cursor:zoom-in;
}
.cp-v2 .cp-fstack .cp-fstack-card img,
.cp-v2 .cp-fstack .cp-fstack-card video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:inherit;background:#000;}
.cp-v2 .cp-fstack .cp-fstack-card em{display:none !important;}
/* 删除钮：收起态隐藏，卡 hover 才显示（delete-btn-expanded） */
.cp-v2 .cp-fstack .cp-fstack-card .cp-frame-x{
  position:absolute;top:-7px;right:-7px;width:20px;height:20px;line-height:18px;
  border-radius:50%;background:#1f2227;border:1px solid #41474c;color:#fff;
  font-size:12px;font-style:normal;text-align:center;z-index:1001;cursor:pointer;padding:0;
  opacity:0;transform:scale(.7);transition:opacity .2s,transform .2s,background .2s;
}
.cp-v2 .cp-fstack .cp-fstack-card .cp-frame-x:hover{background:#ef4444;border-color:#ef4444;}

/* —— hover 容器：容器加宽平铺扇形（不裁切），卡 translateX(i*56) 收到 ±8° —— */
.cp-v2 .cp-fstack:hover{
  width:calc(55px + (var(--n,1) - 1)*56px + 52px);
  height:98px; z-index:1200;
}
.cp-v2 .cp-fstack:hover .cp-fstack-card{
  transform:translateX(calc(var(--i,0)*56px)) rotate(var(--hr,-8deg));
  transition:transform .3s cubic-bezier(.4,0,.2,1);
}
/* 悬停的那张：放大 1.25、上移 12px、置顶、显删除钮 */
.cp-v2 .cp-fstack:hover .cp-fstack-card:hover{
  transform:translateX(calc(var(--i,0)*56px)) translateY(-12px) rotate(var(--hr,-8deg)) scale(1.25);
  z-index:1000 !important; box-shadow:0 12px 26px rgba(0,0,0,.55);
}
.cp-v2 .cp-fstack:hover .cp-fstack-card:hover .cp-frame-x{opacity:1;transform:scale(1);}

/* —— 独立类型空槽角度（首帧/图 -8°，视频 0°，尾帧/音频/文档 +8°），覆盖旧几何 ±8° —— */
.cp-v2 .cp-frames > .cp-frame-add.cp-kind-image:not(.filled),
.cp-v2 .cp-frames > .cp-frame-add.cp-kind-first:not(.filled){transform:rotate(-8deg) !important;}
.cp-v2 .cp-frames > .cp-frame-add.cp-kind-video:not(.filled){transform:none !important;}
.cp-v2 .cp-frames > .cp-frame-add.cp-kind-audio:not(.filled),
.cp-v2 .cp-frames > .cp-frame-add.cp-kind-last:not(.filled),
.cp-v2 .cp-frames > .cp-frame-add.cp-kind-doc:not(.filled){transform:rotate(8deg) !important;}
.cp-v2 .cp-frames > .cp-frame-add.cp-kind-image:not(.filled):hover,
.cp-v2 .cp-frames > .cp-frame-add.cp-kind-first:not(.filled):hover{transform:rotate(-4deg) scale(1.06) !important;}
.cp-v2 .cp-frames > .cp-frame-add.cp-kind-video:not(.filled):hover{transform:scale(1.06) !important;}
.cp-v2 .cp-frames > .cp-frame-add.cp-kind-audio:not(.filled):hover,
.cp-v2 .cp-frames > .cp-frame-add.cp-kind-last:not(.filled):hover,
.cp-v2 .cp-frames > .cp-frame-add.cp-kind-doc:not(.filled):hover{transform:rotate(4deg) scale(1.06) !important;}

/* —— 独立填充槽（首帧/尾帧/视频/音频单张）：去青边、按类型微倾 —— */
.cp-v2 .cp-frames > .cp-frame-add.filled{border:none !important;box-shadow:0 3px 9px rgba(0,0,0,.32);}
.cp-v2 .cp-frames > .cp-frame-add.filled.cp-kind-first{transform:rotate(-8deg);}
.cp-v2 .cp-frames > .cp-frame-add.filled.cp-kind-last,
.cp-v2 .cp-frames > .cp-frame-add.filled.cp-kind-audio{transform:rotate(8deg);}
.cp-v2 .cp-frames > .cp-frame-add.filled.cp-kind-video{transform:none;}
/* 音频卡：紫蓝渐变（参考站 audio-card） */
.cp-v2 .cp-frame-add.filled .cpf-file.cpf-audio{background:linear-gradient(135deg,rgba(99,102,241,.5),rgba(139,92,246,.38)) !important;color:#ede9fe;}

/* —— 槽间箭头 middle-icon：28×70 淡白、直立居中、无辉光 —— */
.cp-v2 .cp-mid-arrow{
  align-self:flex-start; flex:0 0 auto; display:flex; align-items:center; justify-content:center;
  width:26px; height:70px; margin:8px 0 0; transform:translateY(-4px);
  color:rgba(255,255,255,.38); opacity:.9; text-shadow:none; font-weight:400;
}
.cp-v2 .cp-mid-arrow svg{width:20px;height:20px;}

/* —— 牌堆参考图全屏预览（image-preview-overlay）—— */
.cp-img-overlay{position:fixed;inset:0;background:rgba(0,0,0,.9);display:none;align-items:center;justify-content:center;z-index:10001;cursor:zoom-out;animation:cpFade .2s ease;}
.cp-img-overlay.show{display:flex;}
.cp-img-overlay img{max-width:90vw;max-height:90vh;border-radius:6px;box-shadow:0 20px 60px rgba(0,0,0,.6);}
.cp-img-overlay-x{position:absolute;top:24px;right:32px;width:40px;height:40px;border-radius:50%;background:rgba(255,255,255,.12);color:#fff;font-size:22px;line-height:1;border:none;cursor:pointer;}
.cp-img-overlay-x:hover{background:rgba(255,255,255,.24);}
@keyframes cpFade{from{opacity:0}to{opacity:1}}

/* —— 牌堆 +钮空态按媒体类型倾斜（图 -8° 默认、视频 0°、音频 +8°），与独立空槽角度一致；有卡后让位给圆形收起定位 —— */
.cp-v2 .cp-fstack:not(.has-cards) .cp-fstack-add.cp-kind-video{transform:none !important;}
.cp-v2 .cp-fstack:not(.has-cards) .cp-fstack-add.cp-kind-audio{transform:rotate(8deg) !important;}
.cp-v2 .cp-fstack:not(.has-cards) .cp-fstack-add.cp-kind-video:hover{transform:scale(1.07) !important;}
.cp-v2 .cp-fstack:not(.has-cards) .cp-fstack-add.cp-kind-audio:hover{transform:rotate(4deg) scale(1.07) !important;}

/* —— 牌堆卡内音频：55×70 紫蓝渐变卡，音符居中、文件名小字省略（参考站 audio-card）—— */
.cp-v2 .cp-fstack .cp-fstack-card{cursor:pointer;}
.cp-v2 .cp-fstack .cp-fstack-card .cpf-file.cpf-audio{
  position:absolute;inset:0;width:100%;height:100%;border-radius:inherit;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
  background:linear-gradient(135deg,rgba(99,102,241,.62),rgba(139,92,246,.46)) !important;
  color:#ede9fe;font-size:20px;line-height:1;overflow:hidden;padding:0 3px;margin:0;
}
.cp-v2 .cp-fstack .cp-fstack-card .cpf-audio small{display:block;font-size:8px;line-height:1.1;max-width:49px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:500;}
.cp-v2 .cp-fstack .cp-fstack-card .cpf-file.cpf-doc{position:absolute;inset:0;width:100%;height:100%;border-radius:inherit;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;background:#262a33;color:#cbd5e1;font-size:20px;margin:0;padding:0 3px;overflow:hidden;}
.cp-v2 .cp-fstack .cp-fstack-card .cpf-doc small{display:block;font-size:8px;line-height:1.1;max-width:49px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}

/* —— 牌堆全屏预览：图 / 视频 / 音频 播放器尺寸 —— */
.cp-img-overlay .cp-ov-media{display:flex;align-items:center;justify-content:center;}
.cp-img-overlay .cp-ov-media video{max-width:90vw;max-height:90vh;border-radius:6px;background:#000;box-shadow:0 20px 60px rgba(0,0,0,.6);}
.cp-img-overlay .cp-ov-media img{max-width:90vw;max-height:90vh;border-radius:6px;box-shadow:0 20px 60px rgba(0,0,0,.6);}
.cp-img-overlay .cp-ov-media audio{width:min(440px,82vw);}



/* ============================================================
   1:1 参考站：AI 输出 思考中三点卡 / 红框停止 / 黄色生成中
   ============================================================ */
.chat-bubble.assistant{position:relative;}
.chat-bubble.assistant .cb-stop-btn{
  position:absolute;top:24px;right:2px;z-index:6;display:inline-flex;align-items:center;gap:5px;
  height:30px;padding:0 14px;border-radius:9px;cursor:pointer;
  background:rgba(255,80,80,.08);border:1px solid rgba(255,96,96,.55);
  color:#ff7a7a;font-size:13px;font-weight:600;letter-spacing:.5px;
  transition:background .18s,box-shadow .18s,border-color .18s;
}
.chat-bubble.assistant .cb-stop-btn:hover{background:rgba(255,80,80,.18);border-color:#ff5a5a;color:#ff9b9b;box-shadow:0 0 16px rgba(255,80,80,.32);}
.chat-bubble.assistant:not(.is-generating) .cb-stop-btn{display:none;}
.cb-gen-tag{display:inline-flex;align-items:center;height:20px;padding:0 9px;border-radius:6px;font-size:11px;font-weight:700;letter-spacing:.5px;color:#fbbf24;background:rgba(251,191,36,.12);border:1px solid rgba(251,191,36,.32);}
.cb-gen-tag::before{content:"";width:6px;height:6px;border-radius:50%;background:#fbbf24;margin-right:5px;box-shadow:0 0 7px rgba(251,191,36,.8);animation:cbGenPulse 1s ease-in-out infinite;}
@keyframes cbGenPulse{0%,100%{opacity:.35;transform:scale(.8);}50%{opacity:1;transform:scale(1.18);}}
.cb-think-wait{display:inline-flex;align-items:center;gap:11px;padding:13px 17px;border-radius:13px;
  background:linear-gradient(145deg,rgba(22,26,35,.96),rgba(15,18,25,.92));
  border:1px solid rgba(0,202,224,.2);box-shadow:0 0 26px rgba(0,202,224,.1),inset 0 0 18px rgba(0,202,224,.04);}
.cb-think-wait .ctw-ico{color:#00cae0;font-size:15px;line-height:1;animation:ctwSpin 3s linear infinite;text-shadow:0 0 10px rgba(0,202,224,.7);}
.cb-think-wait .ctw-tx{font-size:14px;font-weight:600;color:#cbd5e1;letter-spacing:1px;}
.cb-think-wait .ctw-dots{display:inline-flex;gap:5px;align-items:center;}
.cb-think-wait .ctw-dots i{width:7px;height:7px;border-radius:50%;background:#fbbf24;box-shadow:0 0 8px rgba(251,191,36,.75);animation:ctwBounce 1s ease-in-out infinite;}
.cb-think-wait .ctw-dots i:nth-child(2){animation-delay:.15s;}
.cb-think-wait .ctw-dots i:nth-child(3){animation-delay:.3s;}
@keyframes ctwBounce{0%,80%,100%{transform:translateY(0);opacity:.4;}40%{transform:translateY(-6px);opacity:1;}}
@keyframes ctwSpin{to{transform:rotate(360deg);}}
.chat-bubble.assistant.cb-stream-waiting .cb-col>p:has(.cb-think-wait){background:transparent !important;border:0 !important;box-shadow:none !important;padding:2px !important;min-height:0;}
.chat-bubble.assistant.cb-stream-waiting .cb-col>p:has(.cb-think-wait)::before,
.chat-bubble.assistant.cb-stream-waiting .cb-col>p:has(.cb-think-wait)::after{content:none !important;}
@media(max-width:760px){.chat-bubble.assistant .cb-stop-btn{top:22px;right:1px;height:28px;padding:0 11px;font-size:12px;}}

.chat-bubble.assistant .cb-col>.cb-gen-tag{align-self:flex-start;margin:7px 4px 0;}
