/* ==========================================================================
   design-v7.css — 工作台「焦点 + 对话」与探索「情报画廊」版式层
   对齐 C:\Users\Administrator\Desktop\crm design (2026-11-30)
   原则：只做版式与配色覆盖，业务结构与权限逻辑不动
   依赖变量：--card/--text/--text-2/--muted/--border/--primary/--primary-light
   ========================================================================== */

:root{
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --ds-serif: Georgia, "Songti SC", serif;
}

/* ---------- 1. 工作台：页头 ---------- */
.dash-head{display:flex;justify-content:space-between;align-items:flex-end;gap:12px;flex-wrap:wrap}

/* 其它页面页头：标题 / 说明上下排列（此前 flex 把说明推到最右侧，看着像两块内容） */
.page-head:not(.dash-head){display:block;position:relative}
.page-head:not(.dash-head)>p{margin-top:7px;max-width:860px}
.page-head:not(.dash-head):has(>.btn){padding-right:140px}
.page-head:not(.dash-head)>.btn{position:absolute;right:0;top:2px;margin:0}

/* ---------- 2. 工作台：今日焦点 ---------- */
.ask-banner{
  position:relative;overflow:hidden;display:flex;align-items:center;gap:26px;justify-content:space-between;
  margin-bottom:18px;padding:30px 32px;border-radius:22px;
  border:1px solid #dbeafe;
  background:linear-gradient(120deg,#f1f7ff,#f8fbff 48%,#edf5ff);
}
.ask-banner::after{
  content:"";position:absolute;width:270px;height:270px;border-radius:50%;
  border:1px solid #c5ddf9;right:20%;top:-180px;pointer-events:none;
}
.ask-banner-copy{position:relative;z-index:1;min-width:0}
.ask-banner small{display:block;color:var(--primary);font:10px var(--mono);letter-spacing:.12em}
.ask-banner h2{font-size:24px;letter-spacing:-.04em;margin:6px 0 4px;color:var(--text)}
.ask-banner p{color:var(--text-2);font-size:13px}
.ask-input{
  position:relative;z-index:1;flex:none;display:flex;flex-direction:column;align-items:flex-start;gap:2px;
  min-width:230px;padding:12px 20px;border-radius:980px;cursor:pointer;text-align:left;
  background:var(--card);border:1px solid #d2d2d7;
  box-shadow:0 2px 8px rgba(16,40,72,.05);transition:all .18s;
}
.ask-input:hover{border-color:var(--primary);box-shadow:0 8px 22px rgba(37,99,235,.14);transform:translateY(-1px)}
.ask-input-q{font-size:13px;color:var(--text-2)}
.ask-input-go{font-size:11px;font-weight:600;color:var(--primary)}

/* ---------- 3. 工作台：对话区 ---------- */
.workbench-dialog{
  display:grid;grid-template-columns:245px minmax(0,1fr);
  grid-template-areas:"intro thread" "intro composer";
  gap:12px 28px;margin:0 0 20px;padding:21px 24px;border-radius:20px;
  border:1px solid #cadcf4;background:linear-gradient(115deg,#e7f0fc,#f6f9fe 65%);
  box-shadow:0 8px 22px rgba(48,86,129,.045);
}
.dialog-intro{grid-area:intro;display:flex;align-items:flex-start;gap:11px;min-width:0}
.dialog-orb{
  width:31px;height:31px;flex:none;display:grid;place-items:center;border-radius:50%;
  color:#fff;font-size:14px;background:linear-gradient(145deg,#1677dc,#76b2fa);
  box-shadow:0 5px 12px rgba(22,119,220,.23);
}
.dialog-intro small{display:block;color:#397ab8;font:10px var(--mono);letter-spacing:.08em}
.dialog-intro h3{font-size:15px;letter-spacing:-.025em;margin-top:5px;color:var(--text);line-height:1.35}
.dialog-thread{
  grid-area:thread;display:flex;flex-direction:column;align-items:flex-start;gap:8px;
  font-size:12px;max-height:168px;overflow-y:auto;padding-right:2px;
}
.assistant-line,.user-line{padding:8px 11px;border-radius:10px;line-height:1.55;max-width:100%}
.assistant-line{background:rgba(255,255,255,.86);color:#52677f}
.assistant-line.assistant-summary{max-width:350px;margin-left:auto}
.assistant-line.answer{background:rgba(255,255,255,.94);color:var(--text-2);max-width:560px}
.assistant-line .dlg-text{
  display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;white-space:pre-wrap;
}
.dlg-more{display:block;margin-top:5px;font-size:11px;font-weight:600;color:var(--primary);background:none;border:0;padding:0;cursor:pointer}
.dlg-more:hover{text-decoration:underline}
.user-line{margin-left:auto;background:#d8eaff;color:#205e9d}
.dialog-composer{
  grid-area:composer;display:flex;gap:8px;align-items:center;width:100%;
  padding:5px 5px 5px 12px;border-radius:12px;background:var(--card);border:1px solid #c9d9ec;
}
.dialog-composer input{min-width:0;flex:1;border:0;outline:0;background:transparent;font-size:12px;color:var(--text)}
.dialog-composer input::placeholder{color:var(--muted)}
.dialog-composer .btn{flex:none;border-radius:9px}

/* 工作台项目区：单行横向滚动，避免换行把整栏撑高（对齐设计稿 project-scroll）
   2026-11-30：去掉可见滚动条（用户反馈难看），滚轮在卡区内可直接横向滚动 */
.dash-two-col .project-grid{
  position:relative;display:flex;flex-wrap:nowrap;gap:12px;padding:0 20px 16px;
  overflow-x:auto;scroll-snap-type:x proximity;
  scrollbar-width:none;-ms-overflow-style:none;overscroll-behavior-x:contain;
  -webkit-mask-image:linear-gradient(to right,#000 calc(100% - 22px),transparent);
  mask-image:linear-gradient(to right,#000 calc(100% - 22px),transparent);
}
.dash-two-col .project-grid::-webkit-scrollbar{height:0;width:0;display:none}
.dash-two-col .project-grid .project-card{flex:0 0 calc(50% - 6px);min-width:0;scroll-snap-align:start}
.dash-two-col .project-grid .pc-title{
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
  min-height:2.9em;line-height:1.45;
}

/* ---------- 4. 探索：画廊 ---------- */
.explore-page{padding-top:0}
.explore-gallery{
  position:relative;overflow:hidden;padding:34px;border-radius:28px;border:1px solid #d5e1ef;isolation:isolate;
  background:
    radial-gradient(circle at 87% 12%,#d5e8fc 0,rgba(213,232,252,.28) 15%,transparent 32%),
    linear-gradient(135deg,#f7faff,#eaf2fa 100%);
}
.explore-gallery::after{
  content:"";position:absolute;width:420px;height:420px;right:-170px;bottom:-190px;border-radius:50%;
  border:1px solid rgba(55,132,214,.16);z-index:-1;
  box-shadow:0 0 0 56px rgba(107,172,238,.05),0 0 0 112px rgba(107,172,238,.035);
}
.gallery-head{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;margin-bottom:24px;flex-wrap:wrap}
.gallery-head small,.gallery-index{display:block;font:10px var(--mono);letter-spacing:.1em;color:#367fbe}
.gallery-head h2{max-width:560px;margin:8px 0 0;font-size:31px;line-height:1.18;letter-spacing:-.05em;color:var(--text);
  text-wrap:balance}
.gallery-head h2 em{font-family:var(--ds-serif);font-style:italic;font-weight:400;color:#4c87bd}
.gallery-status{
  display:flex;align-items:center;gap:9px;padding:11px 14px;border-radius:12px;
  border:1px solid #c4d9ee;background:rgba(255,255,255,.58);
}
.gallery-status>span{width:8px;height:8px;flex:none;background:#36b37e;border-radius:50%;box-shadow:0 0 0 4px rgba(54,179,126,.14)}
.gallery-status small{font-size:10px;color:#5b7288}
.gallery-status b{display:block;margin-top:2px;font-size:11px;font-weight:500;color:#526b84}

.gallery-grid{display:grid;grid-template-columns:1.35fr .72fr;grid-template-rows:232px 254px;gap:14px}
.gallery-grid article{position:relative;overflow:hidden;border-radius:20px;border:1px solid #cbdceb}

/* 01 优先推进 */
.gallery-feature{
  grid-row:span 2;padding:27px;color:#fff;
  background:linear-gradient(145deg,#0d3760,#18558c 58%,#357db4);
}
.gallery-feature::after{
  content:"";position:absolute;width:310px;height:310px;border-radius:50%;right:-80px;top:-115px;
  border:1px solid rgba(193,225,255,.4);
  box-shadow:0 0 0 45px rgba(193,225,255,.08),0 0 0 90px rgba(193,225,255,.04);
}
.gallery-feature .gallery-index{color:#a7d0f8}
.feature-copy{position:relative;z-index:1;margin-top:57px}
.feature-copy p{font-size:12px;color:#c7e0f5}
.feature-copy h3{margin:6px 0 10px;font-size:30px;line-height:1.16;letter-spacing:-.05em;color:#fff}
.feature-copy span{font-size:11px;color:#b7d3ea}
.feature-numbers{position:absolute;left:27px;bottom:61px;z-index:1;display:flex;gap:32px}
.feature-numbers b{display:block;font:600 28px var(--mono);letter-spacing:-.03em;font-variant-numeric:tabular-nums}
.feature-numbers b span{font:12px "Noto Sans SC",sans-serif;margin-left:2px}
.feature-numbers small{color:#afd1ed;font-size:10px}
.feature-link{position:absolute;z-index:1;bottom:23px;right:25px;display:flex;align-items:center;gap:6px;
  font-size:12px;color:#fff;background:none;border:0;cursor:pointer}
.feature-link:hover{text-decoration:underline}

/* 02 信号 */
.gallery-signal{padding:22px;background:rgba(255,255,255,.72)}
.gallery-signal h3{position:relative;margin:38px 0 1px;font:600 42px var(--mono);letter-spacing:-.06em;
  color:var(--text);font-variant-numeric:tabular-nums}
.gallery-signal p{position:relative;font-size:13px;color:var(--text-2)}
.gallery-signal small{position:relative;margin-top:4px}
.gallery-signal button{position:absolute;left:22px;bottom:20px;display:flex;align-items:center;gap:4px;
  font-size:11px;color:#2477bb;background:none;border:0;cursor:pointer}
.gallery-signal button:hover{text-decoration:underline}
.signal-orbit{position:absolute;right:-18px;top:-33px;width:140px;height:140px;border-radius:50%;border:1px solid #c6ddf2}
.signal-orbit i{position:absolute;border-radius:50%;border:1px solid #d6e7f6}
.signal-orbit i:nth-child(1){inset:24px}
.signal-orbit i:nth-child(2){inset:48px}
.signal-orbit i:nth-child(3){inset:66px;background:#6daaea;border:0}

/* 03 上下文 */
.gallery-context{padding:20px;background:rgba(255,255,255,.72)}
.gallery-context h3{margin:23px 0 4px;font-size:17px;letter-spacing:-.03em;color:var(--text)}
.gallery-context p{font-size:12px;color:var(--text-2)}
.gallery-context>div{margin-top:8px;display:flex;flex-direction:column}
.gallery-context button{display:flex;align-items:center;gap:8px;padding:5px 0;font-size:12px;text-align:left;
  color:var(--text-2);background:none;border:0;border-bottom:1px solid rgba(180,200,220,.35);cursor:pointer}
.gallery-context button:last-child{border-bottom:0}
.gallery-context button:hover{color:var(--primary)}
.gallery-context button b{font:10px var(--mono);color:#7f9bb5;flex:none}
.gallery-context button span{margin-left:auto;color:var(--primary)}

/* 查询区 */
.gallery-query{margin-top:15px;padding:16px 18px 12px;border-radius:18px;
  border:1px solid #bcd5ee;background:rgba(255,255,255,.84);box-shadow:0 14px 35px rgba(31,83,130,.11)}
.gq-input{display:flex;gap:10px;align-items:flex-start}
.gq-input textarea{width:100%;height:36px;padding:6px 0;resize:none;border:0;outline:0;background:transparent;
  font-size:16px;line-height:1.5;color:var(--text);font-family:inherit}
.gq-input textarea::placeholder{color:#98a9bb}
.query-foot{display:flex;align-items:center;gap:6px;margin-top:5px;padding-left:41px}
.query-foot>span{margin-right:auto;color:#8395a9;font-size:10px}
.query-foot .mode{padding:5px 8px;border-radius:7px;font-size:10px;color:#708195;background:none;border:0;cursor:pointer}
.query-foot .mode.selected{background:rgba(22,119,220,.1);color:var(--primary);font-weight:600}
.studio-send{width:32px;height:32px;display:grid;place-items:center;border-radius:50%;flex:none;
  background:var(--primary);color:#fff;font-size:15px;border:0;cursor:pointer;transition:.15s}
.studio-send:hover{background:var(--primary-d)}
.studio-send:disabled{opacity:.5;cursor:not-allowed}

.gallery-history{align-self:flex-end;display:block;margin:10px 4px 0 auto;font-size:11px;color:#557491;
  background:none;border:0;cursor:pointer}
.gallery-history:hover{color:var(--primary)}

/* 快捷问题：查一查填入输入框，办一办直接提交（执行类会走二次确认） */
.gallery-chips{display:flex;gap:6px;margin-top:10px;overflow-x:auto;padding-bottom:2px;scrollbar-width:none}
.gallery-chips::-webkit-scrollbar{display:none}
.gallery-chips button{flex:none;padding:5px 11px;border-radius:999px;font-size:11px;cursor:pointer;
  border:1px solid #c9dcee;background:rgba(255,255,255,.72);color:#4a6b8a;transition:.15s}
.gallery-chips button:hover{border-color:#94bfe6;color:#1b6fbd}
.gallery-chips button.act{border-color:#d8e3ef;background:rgba(246,250,255,.9);color:#5b7fa3}

/* 研究中 / 结果 */
.gallery-response{display:flex;align-items:center;gap:10px;margin-top:14px;padding:12px 15px;
  border-radius:13px;border:1px solid #b8d4ed;background:#f9fcff;box-shadow:0 8px 22px rgba(31,83,130,.1)}
.gallery-response small{font-size:10px;color:#3c82be}
.gallery-response b{display:block;font-size:12px;margin-top:2px;color:var(--text)}

.gallery-result{margin-top:16px;border-radius:20px;border:1px solid var(--border);background:var(--card);
  box-shadow:var(--shadow);overflow:hidden}
.gr-head{display:flex;align-items:center;justify-content:space-between;padding:13px 18px;border-bottom:1px solid var(--border)}
.gr-head b{font-size:13px;color:var(--text)}
.gr-head button{font-size:12px;color:var(--muted);background:none;border:0;cursor:pointer}
.gr-head button:hover{color:var(--danger)}
.gr-body{max-height:460px;overflow-y:auto;padding:16px 18px}
.gr-body .ag-turn+.ag-turn{border-top:1px solid var(--border);padding-top:14px;margin-top:14px}
.gr-body .ag-cards{grid-template-columns:repeat(auto-fill,minmax(212px,1fr))}
.gr-body .ag-card-title{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.gr-body .ag-card-sub{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* 结果区里的「正在整理」占位，避免点了发送后一片静止 */
.ag-pending{display:flex;align-items:center;gap:8px;padding:10px 2px 2px;font-size:12px;color:var(--muted)}
.ag-pending i{width:7px;height:7px;border-radius:50%;background:var(--primary);animation:gqPulse 1.1s ease-in-out infinite}

/* ---------- 4.5 AI 营销推文：创作 / 结果 / 历史 / 预览 分层 ---------- */
.post-page{max-width:1180px}
.post-layout{
  display:grid;grid-template-columns:minmax(0,1fr) 344px;gap:28px;
  max-width:none;align-items:start;
}
.post-main{display:flex;flex-direction:column;gap:18px;min-width:0}

.post-card{
  background:var(--card);border:1px solid var(--border);border-radius:16px;
  padding:20px 22px;box-shadow:var(--shadow);
}
.post-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:16px}
.post-card-head b{display:block;font-size:14px;letter-spacing:-.01em;color:var(--text)}
.post-card-head small{display:block;margin-top:3px;font-size:11.5px;color:var(--muted);line-height:1.5}
.post-step{flex:none;padding-top:3px;font:10px var(--mono);letter-spacing:.08em;color:#93a7ba}

/* 输入卡：输入框与操作行分开，不再挤成一团 */
.post-compose-card .chat-compose{padding:0;border:0;box-shadow:none;background:transparent}
.post-compose-card .chat-compose textarea{
  min-height:132px;padding:15px 16px;border:1px solid var(--border);border-radius:12px;
  background:#fbfdff;font-size:13.5px;line-height:1.75;
}
.post-compose-card .chat-compose textarea:focus{border-color:var(--primary);background:var(--card)}
.post-compose-card .chat-tools{margin-top:16px;padding-top:15px;border-top:1px dashed var(--border);gap:10px}
.post-compose-card .chat-tools select{
  padding:8px 12px;border-radius:9px;font-size:12.5px;background:#fbfdff;
}
/* 主按钮单独成行、通栏（对齐设计稿 .primary.full），避免与筛选挤在一行换行 */
.post-compose-card .chat-tools .btn{
  flex:1 0 100%;width:100%;margin:6px 0 0;padding:11px 14px;
  justify-content:center;border-radius:10px;
}
.post-compose-card .inline-check{font-size:12.5px;color:var(--text-2)}

/* 结果卡 */
.post-structured .post-actions{margin-top:4px;padding-top:16px;border-top:1px solid var(--border)}
.post-structured .setting-note{margin-top:14px;background:#f7fafd;border:1px solid var(--border);border-radius:10px;padding:10px 12px}

/* 历史卡 */
.history-card .history-list{margin:0}
.history-card .history-item{margin-bottom:10px;background:#fbfdff}
.history-card .history-item:last-child{margin-bottom:0}
.history-card .history-content{
  display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;line-height:1.6;
}
.history-empty{
  display:flex;flex-direction:column;align-items:center;gap:7px;
  padding:36px 16px;border:1px dashed var(--border);border-radius:12px;background:#fbfdff;text-align:center;
}
.history-empty .he-mark{
  width:32px;height:32px;display:grid;place-items:center;border-radius:50%;
  background:var(--primary-light);color:var(--primary);font-size:14px;
}
.history-empty b{font-size:12.5px;color:var(--text-2);font-weight:600}
.history-empty small{font-size:11px;color:var(--muted)}

/* 预览卡 */
.post-preview-pane{
  position:sticky;top:16px;display:flex;flex-direction:column;gap:14px;
  padding:18px;border-radius:16px;
}
.post-preview-pane .pp-head{margin-bottom:0;align-items:flex-start;gap:10px}
.pp-title b{display:block;font-size:13.5px;color:var(--text)}
.pp-title small{display:block;margin-top:2px;font-size:11px;color:var(--muted)}
.post-preview-pane .pp-switch{flex:none}
.post-preview-pane .phone-frame{width:min(100%,252px)}
.post-preview-pane .phone-screen{height:446px}
.post-preview-pane .xh-cover{height:206px}
.xh-cover-ph{flex-direction:column;gap:3px;background:#f7f9fc;font-size:11.5px}
.xh-cover-ph small{font-size:10px;color:#a9b6c4}
.pp-note{
  font-size:10.5px;line-height:1.65;color:var(--muted);
  padding-top:12px;border-top:1px solid var(--border);
}

/* ---------- 4.6 统计看板 / 视频页 / 通用浮层 ---------- */

/* 成员排行：固定 60px 的假条改成按第一名归一化的真条形 */
.metric .rank{gap:9px;padding:9px 0;border-bottom:1px solid #edf1f6}
.metric .rank .rank-nm{
  flex:0 1 auto;width:auto;max-width:5.6em;height:auto;margin:0;background:none;border-radius:0;
  font-size:12.5px;color:var(--text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.metric .rank .rank-track{
  flex:1 1 auto;width:auto;height:6px;margin:0;background:#edf2f8;border-radius:999px;overflow:hidden;
}
.metric .rank .rank-track i{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#0e70d3,#5aa6ff)}
.metric .rank .rank-num{
  flex:none;margin-left:auto;font-style:normal;font-weight:600;font-size:12px;color:var(--text-2);
  font-variant-numeric:tabular-nums;
}

/* 部门对比：补轨道，和状态分布明细统一成一套条形语言 */
.bar-chart .bar-row{margin:12px 0}
.bar-chart .bar-track{background:#eef3f9}

/* 成片预览操作区：4 个按钮排成 2×2，不再参差换行 */
.preview-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}
.preview-actions .btn{width:100%;justify-content:center;white-space:nowrap}
.preview-actions .btn-danger{grid-column:1 / -1}

/* 浮层打开时锁住背景滚动，避免滚轮把底层页面带着跑 */
body.modal-open{overflow:hidden}

/* ---------- 5. 深色 ---------- */
html[data-theme="dark"] .ask-banner{
  background:linear-gradient(120deg,#182c47,#1d385d 50%,#1b304d);border-color:#35597f;
}
html[data-theme="dark"] .ask-banner::after{border-color:#3d6288}
html[data-theme="dark"] .ask-banner h2{color:#F1F5FA}
html[data-theme="dark"] .ask-banner p{color:#A9BFD8}
html[data-theme="dark"] .ask-input{background:#202C3B;border-color:#34455B}
html[data-theme="dark"] .ask-input-q{color:#B4C2D3}
html[data-theme="dark"] .workbench-dialog{background:linear-gradient(115deg,#162b45,#1a293c 65%);border-color:#315675}
html[data-theme="dark"] .dialog-intro small{color:#72b2ef}
html[data-theme="dark"] .assistant-line{background:#223247;color:#c7d6e7}
html[data-theme="dark"] .assistant-line.answer{background:#20303f;color:#C7D6E7}
html[data-theme="dark"] .user-line{background:#234f7d;color:#dfeeff}
html[data-theme="dark"] .dialog-composer{background:#17273a;border-color:#38536f}
html[data-theme="dark"] .explore-gallery{
  background:
    radial-gradient(circle at 87% 12%,#214e7e 0,rgba(33,78,126,.27) 15%,transparent 32%),
    linear-gradient(135deg,#111d2b,#142942 100%);
  border-color:#345677;
}
html[data-theme="dark"] .gallery-head h2{color:#EDF5FE}
html[data-theme="dark"] .gallery-head h2 em{color:#7DB6E4}
html[data-theme="dark"] .gallery-head small,html[data-theme="dark"] .gallery-index{color:#6BA8DE}
html[data-theme="dark"] .gallery-grid article{border-color:#355876}
html[data-theme="dark"] .gallery-status{background:rgba(23,39,59,.66);border-color:#355876}
html[data-theme="dark"] .gallery-status b{color:#BDCCE0}
html[data-theme="dark"] .gallery-status small{color:#8FA7BF}
html[data-theme="dark"] .gallery-signal,html[data-theme="dark"] .gallery-context{background:rgba(23,39,59,.75)}
html[data-theme="dark"] .gallery-signal small{color:#8FA7BF}
html[data-theme="dark"] .gallery-context button{color:#BDCCE0;border-color:#2e4c69}
html[data-theme="dark"] .gallery-context button:hover{color:#8EC8FF}
html[data-theme="dark"] .signal-orbit{border-color:#35597c}
html[data-theme="dark"] .signal-orbit i{border-color:#2e4c69}
html[data-theme="dark"] .gallery-query{background:#192b40;border-color:#385d7c;box-shadow:0 14px 35px rgba(0,0,0,.28)}
html[data-theme="dark"] .gq-input textarea::placeholder{color:#7B8FA6}
html[data-theme="dark"] .query-foot>span{color:#7F92A8}
html[data-theme="dark"] .query-foot .mode{color:#9BB0C6}
html[data-theme="dark"] .query-foot .mode.selected{background:#21476f;color:#8EC8FF}
html[data-theme="dark"] .gallery-history{color:#8FA7BF}
html[data-theme="dark"] .gallery-chips button{background:rgba(27,45,66,.8);border-color:#36516e;color:#B8C9DC}
html[data-theme="dark"] .gallery-chips button:hover{border-color:#5a86b0;color:#8EC8FF}
html[data-theme="dark"] .gallery-chips button.act{background:rgba(23,39,58,.9);border-color:#2e4c69;color:#9FB4C9}
html[data-theme="dark"] .gallery-response{background:#192b40;border-color:#385d7c}
html[data-theme="dark"] .gallery-response small{color:#6BA8DE}
html[data-theme="dark"] .gallery-result{background:#182230;border-color:#2B3748}
html[data-theme="dark"] .gr-head{border-color:#2B3748}

/* 推文页深色 */
html[data-theme="dark"] .post-compose-card .chat-compose textarea,
html[data-theme="dark"] .post-compose-card .chat-tools select{background:#1a2637;border-color:#2f4056;color:#E6EDF6}
html[data-theme="dark"] .history-card .history-item,
html[data-theme="dark"] .history-empty{background:#1a2637;border-color:#2f4056}
html[data-theme="dark"] .post-structured .setting-note{background:#1a2637;border-color:#2f4056}
html[data-theme="dark"] .post-step{color:#7e93a9}
html[data-theme="dark"] .post-card{border-color:#2f4056}
html[data-theme="dark"] .post-step{color:#7e93a9}
/* 手机预览始终按真实 App 的浅色界面呈现（模拟截图），不随主题变暗 */
html[data-theme="dark"] .post-preview-pane .phone-screen{background:#fff;color:#111827}
html[data-theme="dark"] .post-preview-pane .xh-title{color:#111827}
html[data-theme="dark"] .post-preview-pane .xh-text{color:#374151}
html[data-theme="dark"] .post-preview-pane .xh-cover-ph{background:#f7f9fc;border-color:#e5e7eb;color:#9ca3af}
html[data-theme="dark"] .post-preview-pane .xh-bottom{border-color:#f0f0f0;color:#6b7280}
html[data-theme="dark"] .post-preview-pane .moments-item{background:#fff}
html[data-theme="dark"] .post-preview-pane .moments-text{color:#333}
html[data-theme="dark"] .post-preview-pane .moments-time{color:#9ca3af}
html[data-theme="dark"] .pp-note{border-color:#2b3748}

/* 深色补齐：指定派单步骤卡（原来固定白底，浅色文字直接看不见） */
html[data-theme="dark"] .dispatch{background:#182230;border-color:#2b3748}
html[data-theme="dark"] .dispatch-step,
html[data-theme="dark"] .dispatch-preview{border-bottom-color:#2b3748}
html[data-theme="dark"] .dispatch-preview{background:#1a2536}
html[data-theme="dark"] .dispatch h3{color:#e8eef6}
html[data-theme="dark"] .dispatch p{color:#93a7ba}
html[data-theme="dark"] .dispatch-step>span,
html[data-theme="dark"] .dispatch-preview>span{color:#7fa9d6}

/* 深色补齐：统计看板条形与标签 */
html[data-theme="dark"] .metric .rank{border-bottom-color:#26313f}
html[data-theme="dark"] .metric .rank .rank-track{background:#243244}
html[data-theme="dark"] .metric .rank .rank-nm{color:#c2d2e3}
html[data-theme="dark"] .metric .rank .rank-num{color:#93a7ba}
html[data-theme="dark"] .bar-chart .bar-track{background:#202b3a}
html[data-theme="dark"] .bar-label,
html[data-theme="dark"] .bar-chart span{color:#93a7ba}
html[data-theme="dark"] .bar-val{color:#b7c6d6}
html[data-theme="dark"] .bar-fill{background:linear-gradient(90deg,#2e7bd6,#5fb0f5)}

/* 深色补齐：表单标签（原来硬编码 #345B82，深色下几乎看不清） */
html[data-theme="dark"] .field label,
html[data-theme="dark"] .setting-field label{color:#93a7ba}

/* 深色补齐：筛选栏输入框（v5 的 .filter-bar .search-input 白底优先级高于 v6 的 input 覆盖） */
html[data-theme="dark"] .search-input,
html[data-theme="dark"] .filter-bar input,
html[data-theme="dark"] .filter-bar select,
html[data-theme="dark"] .filter-bar .search-input,
html[data-theme="dark"] .filter-bar .date-input{background:#1b2635;border-color:#34455b;color:#e4edf7}
html[data-theme="dark"] .search-input::placeholder{color:#7f92a8}

/* 深色补齐：推文手机预览里的浅灰占位文字 */
html[data-theme="dark"] .post-preview-pane .xh-cover-ph{color:#6b7a8d}
.xh-cover-ph{color:#5f6d7f}
.xh-cover-ph small{color:#6b7686}

/* 对比度微调：主按钮白字 & 预览切换（原 #2E7BD6 / #5AA6FF 仅 4.27 / 2.52） */
html[data-theme="dark"] .btn-primary{background:#2c74cc;border-color:#2c74cc}
html[data-theme="dark"] .btn-primary:hover{background:#3481de}
.pp-switch button.active{background:#2c74cc}
.preview-placeholder{color:#8b95a3}
/* 深色下这几处仍是浅底/深底组合，单独提亮 */
html[data-theme="dark"] .post-preview-pane .xh-cover-ph{color:#5a6879}
html[data-theme="dark"] .xh-cover-ph small{color:#65707e}
html[data-theme="dark"] .gallery-signal button{color:#7fb6e6}
html[data-theme="dark"] .ops-card-head .badge.res{color:#9db0c4}
.xh-follow{color:#e51c3c}

/* 探索：研究中 / 已排队 状态提示 */
.query-foot .gq-busy{display:inline-flex;align-items:center;gap:6px;color:var(--primary);font-weight:500}
.query-foot .gq-busy i{
  width:6px;height:6px;border-radius:50%;background:var(--primary);
  animation:gqPulse 1.1s ease-in-out infinite;
}
@keyframes gqPulse{0%,100%{opacity:.3;transform:scale(.75)}50%{opacity:1;transform:scale(1)}}

/* ---------- 6. 响应式 ---------- */
@media(max-width:1279px){
  .ask-banner{padding:26px}
  .ask-banner h2{font-size:21px}
  .gallery-head h2{font-size:26px}
  .gallery-grid{grid-template-columns:1.2fr .8fr;grid-template-rows:220px 240px}
  .feature-copy h3{font-size:25px}
  .post-layout{grid-template-columns:minmax(0,1fr) 312px;gap:20px}
  .post-preview-pane .phone-frame{width:min(100%,232px)}
  .post-preview-pane .phone-screen{height:428px}
  .post-preview-pane .xh-cover{height:186px}
}
@media(max-width:1023px){
  .post-layout{grid-template-columns:1fr;gap:18px}
  .post-preview-pane{position:static}
  .post-preview-pane .phone-frame{width:260px}
  .post-preview-pane .phone-screen{height:452px}
}
@media(max-width:767px){
  .dash-head{align-items:flex-start}
  /* 视频流程条：5 列在窄屏会把「首帧图」拆成两行，收紧内边距并禁止折行 */
  .video-flow>div{padding:10px 8px;gap:2px}
  .video-flow b{font-size:12px;white-space:nowrap}
  .video-flow small{font-size:9.5px;white-space:nowrap}
  .video-flow span{font-size:10px}
  .preview-actions{gap:6px}
  .preview-actions .btn{font-size:12px;padding:9px 6px}
  .ask-banner{display:block;padding:21px;border-radius:18px}
  .ask-banner h2{font-size:18px}
  .ask-input{width:100%;min-width:0;margin-top:16px}
  .workbench-dialog{grid-template-columns:1fr;grid-template-areas:"intro" "thread" "composer";padding:17px;gap:12px}
  .dialog-thread{max-height:none}
  .dash-two-col .project-grid .project-card{flex:0 0 78%}
  .dash-two-col .project-grid .pc-title{min-height:0}
  .explore-gallery{padding:22px;border-radius:20px}
  .gallery-head{display:block}
  .gallery-head h2{font-size:26px}
  .gallery-status{display:inline-flex;margin-top:16px}
  .gallery-grid{grid-template-columns:1fr;grid-template-rows:auto;gap:12px}
  .gallery-feature{grid-row:auto;display:flex;flex-direction:column;padding:20px;min-height:0}
  .gallery-feature::after{width:200px;height:200px;right:-70px;top:-80px}
  .feature-copy{margin-top:24px}
  .feature-copy h3{font-size:22px;margin:5px 0 8px}
  .feature-numbers{position:static;left:auto;bottom:auto;margin-top:22px;gap:22px}
  .feature-numbers b{font-size:24px}
  .feature-link{position:static;right:auto;bottom:auto;margin-top:12px;align-self:flex-end}
  .gallery-signal{padding:18px;min-height:0;display:flex;flex-direction:column}
  .gallery-signal h3{margin-top:22px;font-size:36px}
  .gallery-signal button{position:static;left:auto;bottom:auto;margin-top:10px}
  .signal-orbit{width:108px;height:108px;right:-26px;top:-28px}
  .gallery-context{padding:18px;min-height:0}
  .gallery-context h3{margin-top:18px}
  .gallery-context button{padding:7px 0;align-items:flex-start;line-height:1.45}
  .gallery-query{padding:14px 14px 10px}
  .gq-input textarea{font-size:15px}
  .query-foot{padding-left:0;flex-wrap:wrap}
  .query-foot>span{display:none}
  .gallery-history{display:none}
  .gr-body{max-height:none}
  .post-card{padding:16px}
  .post-compose-card .chat-compose textarea{min-height:116px}
  .post-compose-card .chat-tools select,.post-compose-card .inline-check{flex:1 1 auto;min-width:0}
  .post-preview-pane{padding:14px}
  .post-preview-pane .phone-frame{width:100%;max-width:268px}
  .page-head:not(.dash-head):has(>.btn){padding-right:0}
  .page-head:not(.dash-head)>.btn{position:static;margin-top:12px}
}
