/* ============================================================
   方案搭配助手 · UI v3（新App项目交付标准 第 5、6 章 · 问答定型版）
   中性底 + 图标绿 #07C160 + 大留白 + 克制的玻璃
   - 卡片一律实色（card 16 圆角 + 1px line 描边），列表不加 blur
   - 液态玻璃只做 顶栏 / 弹层 / tab，默认关（html[data-glass="1"] 才开）
   - 分段控件 / 底部 tab：玻璃滑块左右滑动（.seg-thumb / .tab-thumb）
   ============================================================ */

:root {
  color-scheme: light;

  /* 品牌四兄弟（唯一来源，页面不写 hex） —— 取自 App 图标主色 #07C160 */
  --brand: #07C160;
  --brand-deep: #04A552;
  --brand-soft: #E7F9EF;
  --brand-ink: #068A47;
  --brand-line: rgba(7, 193, 96, .22);

  /* 页面 */
  --bg: #F3F4F7;
  --card: #FFFFFF;
  --card-2: #F7F8FA;
  --text: #16191F;
  --text-2: #3C4350;
  --sub: #6B7280;
  --sub-2: #9AA1AC;
  --faint: #9AA1AC;

  /* 描边 / 控件 */
  --line: rgba(0, 0, 0, .07);
  --line-2: rgba(0, 0, 0, .12);
  --chip: #F7F8FA;
  --chip-on: #E7F9EF;
  --field: #F7F8FA;
  --track: rgba(0, 0, 0, .06);
  --ink: var(--text);

  /* 语义 */
  --ok: #1F9D55;
  --warn: #B4741A;
  --danger: #C93B36;
  --bubble-me-a: #0AC867;
  --bubble-me-b: #049B4D;
  --bubble-me-ink: #FFFFFF;

  /* 玻璃材质（交付标准 6.12 统一配方，只在 html[data-glass="1"] 时被引用）
     浅色：白 62% + 1px 白 45% 边 + 中性柔影；浓淡只有 blur(20px) / blur(12px) 两档 */
  --glass: rgba(255, 255, 255, .62);
  --glass-2: rgba(255, 255, 255, .62);
  --glass-bd: rgba(255, 255, 255, .45);
  --glass-hi: transparent;                    /* 标准禁止内画高光 */
  --glass-sh: 0 2px 14px rgba(20, 40, 80, .10);
  --glass-blur: blur(20px) saturate(180%);

  --r-lg: 16px;
  --r-md: 16px;
  --r-sm: 12px;
  --ease: cubic-bezier(.32, .72, 0, 1);
  /* 液态滑块：轻微过冲再回弹，像玻璃球滑过去 */
  --ease-lq: cubic-bezier(.34, 1.32, .46, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --dock-h: 64px;
  --card-sh: 0 1px 2px rgba(20, 16, 12, .04);
}

html[data-theme="dark"] {
  color-scheme: dark;

  --brand: #07C160;
  --brand-deep: #04864A;
  --brand-soft: #10291C;
  --brand-ink: #3CDD8C;
  --brand-line: rgba(7, 193, 96, .3);

  --bg: #0F1211;
  --card: #191D1B;
  --card-2: #222725;
  --text: #F1F4F2;
  --text-2: #D2D9D5;
  --sub: #98A39D;
  --sub-2: #6D7873;
  --faint: #6D7873;

  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --chip: #222725;
  --chip-on: #13301F;
  --field: #222725;
  --track: rgba(255, 255, 255, .09);

  --ok: #5FD08A;
  --warn: #F0B45E;
  --danger: #E86A5E;
  --bubble-me-a: #06B45A;
  --bubble-me-b: #047A44;

  /* 深色玻璃：标准 6.12 深色档（深底 58% + 1px 白 10% 边） */
  --glass: rgba(23, 27, 34, .58);
  --glass-2: rgba(23, 27, 34, .58);
  --glass-bd: rgba(255, 255, 255, .10);
  --glass-hi: transparent;
  --glass-sh: 0 2px 14px rgba(0, 0, 0, .35);
  --card-sh: 0 1px 2px rgba(0, 0, 0, .3);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
/* 通用隐藏：任何带 .hide 的层都必须真正收起 */
.hide { display: none !important; }

html, body { margin: 0; height: 100%; }
html { -webkit-text-size-adjust: 100%; }

body {
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column;
  overflow: hidden;
  position: relative;
}

h1, h2, h3, p { margin: 0; }
button {
  font: inherit; color: inherit; background: none; border: 0; padding: 0;
  cursor: pointer;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
input, textarea, select { font: inherit; color: inherit; }
input, textarea { -webkit-user-select: text; user-select: text; }

/* ---------------- 顶栏（实色；玻璃开时才半透明） ---------------- */
.top {
  flex: 0 0 auto;
  position: relative; z-index: 6;
  display: flex; align-items: center; gap: 4px;
  padding: calc(var(--safe-t) + 8px) 10px 8px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
html[data-glass="1"] .top {
  background: var(--glass-2);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
.top h1 {
  flex: 1; text-align: center; font-size: 17px; font-weight: 650;
  letter-spacing: .2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.back {
  width: 34px; height: 34px; border-radius: 17px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; line-height: 1; color: var(--text);
  background: var(--card-2);
  transition: transform .14s var(--ease);
}
.back:active { transform: scale(.9); }
.back.hide { visibility: hidden; display: flex !important; }
.top-act {
  min-width: 34px; height: 34px; padding: 0 10px; border-radius: 17px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: var(--brand-ink); font-weight: 600;
  background: var(--card-2);
}
.top-act:empty { display: none; }
.top-btn {
  width: 34px; height: 34px; border-radius: 17px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  background: var(--card-2);
  color: var(--text-2);
  transition: transform .14s var(--ease), background .2s;
}
.top-btn:active { transform: scale(.9); }

/* ---------------- 主体 ---------------- */
#main { flex: 1 1 auto; position: relative; overflow: hidden; }
.view {
  position: absolute; inset: 0;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 14px 16px calc(var(--dock-h) + 20px + var(--safe-b));
}
.view.hide { display: none; }
.view::-webkit-scrollbar { width: 0; height: 0; }

/* ---------------- 大标题页头（我的页） ---------------- */
.page-head { padding: 6px 4px 4px; margin-bottom: 6px; }
.page-head h2 { font-size: 30px; font-weight: 700; letter-spacing: -.5px; line-height: 1.15; }
.page-head p { font-size: 12.5px; color: var(--sub); margin-top: 3px; }

/* ---------------- 底部 dock：悬浮液态玻璃胶囊 ----------------
   复刻「问答」App 的系统 TabBar 外观与几何：
     · 悬浮在内容之上（fixed），页面文字滚动时从玻璃下透出 → 文字透视
      · 高 62 / 左右 20 / 底 20（安全区更大时取安全区）/ 全圆角 31
        —— 量自「问答」App 截图 1206×2622 @3x → 402×874pt：胶囊 62pt、底距 21pt
      · 白色亮边 + 半透磨砂 + 中性柔影；深色另配一套
      · 选中胶囊不再叠加自己的 backdrop-filter：两层模糊会互相采样，
        在胶囊上沿拉出一条横贯细线，也会压暗背后文字（见 .tab-thumb 注释）
     · 材质常驻（不受「我的 → 液态玻璃」开关影响，该开关只管顶栏/弹层）
     · App 内 iOS 26+ 由 UIKit UIGlassEffect 接管材质（见文件末尾让位规则），
       网页/浏览器侧用 backdrop-filter 兜底；两者共用同一位置上报 syncNativeGlass。 */
.tabbar {
  position: fixed;
  left: 20px; right: 20px;
  /* 双声明：老 WebKit 忽略 max() 时用安全区兜底；新 WebKit 用至少 20px，
     对齐问答 App 胶囊「距屏底约 21pt」的悬浮位，同时真机仍避开 Home 指示条 */
  bottom: calc(10px + var(--safe-b));
  bottom: max(20px, calc(10px + var(--safe-b)));
  height: 62px;
  display: flex; gap: 2px;
  margin: 0;
  padding: 6px;
  border-radius: 31px;
  /* 白度压到 .34：太白会把背后滚过来的文字糊成一块实色，失去「文字透视」 */
  background: rgba(255, 255, 255, .34);
  border: 1px solid rgba(255, 255, 255, .72);
  box-shadow: 0 10px 30px rgba(20, 20, 25, .13), 0 2px 6px rgba(20, 20, 25, .05);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  z-index: 30;
  touch-action: pan-y;
}
html[data-theme="dark"] .tabbar {
  background: rgba(28, 32, 36, .42);
  border-color: rgba(255, 255, 255, .16);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .48);
}
.tabbar button {
  flex: 1; height: 48px;
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: rgba(22, 25, 31, .82); font-size: 10.5px; font-weight: 500;
  border-radius: 24px;
  background: transparent;
  transition: transform .16s var(--ease), color .2s;
}
html[data-theme="dark"] .tabbar button { color: rgba(241, 244, 242, .80); }
.tabbar button:active { transform: scale(.94); }
.tabbar i {
  font-style: normal; font-size: 19px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: transform .28s var(--ease);
}
.tabbar i svg { width: 21px; height: 21px; display: block; }
.tabbar button.on {
  color: var(--brand-ink);
  font-weight: 650;
}
.tabbar button.on i { transform: translateY(-1px) scale(1.06); }

/* ---------------- 玻璃胶囊滑块 ----------------
   tab 的选中态对齐「问答」系统 TabBar：一个独立的浅灰圆角药丸，
   半透灰 + 白亮边、无彩色 glow。
   注意：这里刻意不再写 backdrop-filter —— 它嵌在同样带 backdrop-filter 的
   .tabbar 里，两层模糊互相采样会在胶囊上沿拉出一条横贯细线，还会把背后
   文字压暗；玻璃材质统一由父级 .tabbar 提供，视觉反而更接近系统 TabBar。
   分段控件（seg-thumb）沿用交付标准 6.12 统一配方，不受本次改动影响。 */
.tab-thumb {
  position: absolute; top: 6px; left: 0;
  width: 0; height: 48px;
  border-radius: 24px;
  pointer-events: none; z-index: 0;
  background: rgba(118, 118, 128, .14);
  border: 1px solid rgba(255, 255, 255, .50);
  box-shadow: none;
  transition: transform .42s var(--ease-lq), width .42s var(--ease-lq);
  will-change: transform, width;
}
html[data-theme="dark"] .tab-thumb {
  background: rgba(255, 255, 255, .13);
  border-color: rgba(255, 255, 255, .07);
  box-shadow: none;
}
.seg-thumb {
  position: absolute; top: 4px; bottom: 4px; left: 0;
  width: 0; border-radius: 999px;
  pointer-events: none; z-index: 0;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 2px 14px rgba(20, 40, 80, .10);
  transition: transform .42s var(--ease-lq), width .42s var(--ease-lq);
  will-change: transform, width;
}
html[data-theme="dark"] .seg-thumb {
  box-shadow: 0 2px 14px rgba(0, 0, 0, .35);
}
/* 胶囊档：blur(12px)（6.12-3 只允许 20px 与 12px 两档）；tab-thumb 已固定常驻玻璃，不再跟随开关 */
html[data-glass="1"] .seg-thumb {
  background: rgba(255, 255, 255, .62);
  border-color: rgba(255, 255, 255, .45);
  box-shadow: 0 2px 14px rgba(20, 40, 80, .10);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  backdrop-filter: blur(12px) saturate(180%);
}
html[data-theme="dark"][data-glass="1"] .seg-thumb {
  background: rgba(23, 27, 34, .58);
  border-color: rgba(255, 255, 255, .10);
  box-shadow: 0 2px 14px rgba(0, 0, 0, .35);
}

/* 6.12-6 兜底：不支持 backdrop-filter 的环境，玻璃表面退回实色卡 + 常规投影 */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .tabbar {
    background: var(--card);
    border-color: var(--line);
    box-shadow: 0 10px 28px rgba(20, 16, 12, .12);
  }
  .tab-thumb {
    background: rgba(118, 118, 128, .14);
    border-color: var(--line);
  }
  html[data-theme="dark"] .tabbar { background: var(--card); }
  html[data-theme="dark"] .tab-thumb { background: rgba(255, 255, 255, .13); }
  html[data-glass="1"] .top,
  html[data-glass="1"] .sheet,
  html[data-glass="1"] .gen-bar,
  html[data-glass="1"] .actbar {
    background: var(--card);
    border-color: var(--line);
    box-shadow: var(--card-sh);
  }
  html[data-glass="1"] .seg-thumb {
    background: var(--card);
    border-color: var(--line);
  }
}

/* ---------------- 历史 ---------------- */
.list-hint { padding: 2px 4px 8px; color: var(--sub); font-size: 12.5px; }
.chat-list { display: flex; flex-direction: column; gap: 10px; }
.chat-item {
  display: flex; gap: 12px; align-items: center;
  width: 100%; text-align: left;
  padding: 13px 14px;
  border-radius: var(--r-md);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--card-sh);
  transition: transform .16s var(--ease);
}
.chat-item:active { transform: scale(.985); }
.ci-ico {
  width: 44px; height: 44px; border-radius: 15px; flex: 0 0 auto;
  background: linear-gradient(150deg, var(--brand), var(--brand-deep));
  color: #fff; font-size: 19px;
  display: flex; align-items: center; justify-content: center;
}
.ci-main { flex: 1; min-width: 0; }
.ci-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.ci-title {
  font-size: 15.5px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ci-time { color: var(--sub-2); font-size: 11.5px; flex: 0 0 auto; }
.ci-sub {
  color: var(--sub); font-size: 12.5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  margin-top: 3px;
}
.ci-tag {
  font-size: 10.5px; padding: 1px 7px; border-radius: 9px; margin-left: 6px;
  background: var(--chip-on); color: var(--brand-ink); font-weight: 600;
}
.ci-tag.warn { background: rgba(180, 116, 26, .14); color: var(--warn); }

/* 历史列表：左滑单元格（从右往左滑出 置顶/删除） */
.sw-wrap { position: relative; border-radius: var(--r-md); overflow: hidden; }
.sw-actions {
  position: absolute; top: 0; right: 0; bottom: 0;
  display: flex; align-items: stretch; gap: 6px;
  padding-left: 10px;
}
.sw-btn {
  width: 62px; border-radius: var(--r-md); border: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 11px; font-weight: 600; color: #fff;
}
.sw-btn i { font-style: normal; font-size: 17px; }
.sw-btn.pin { background: #B4741A; }
.sw-btn.del { background: var(--danger); }
html[data-theme="dark"] .sw-btn.del { color: #fff; }
.sw-btn:active { transform: scale(.94); }
.sw-slide {
  position: relative; z-index: 1;
  transition: transform .22s var(--ease);
  will-change: transform;
  /* 不透明底：盖住下面的滑动按钮 */
  background: var(--bg);
  border-radius: var(--r-md);
}
.sw-slide .chat-item { border-radius: var(--r-md); }
.ci-pin-badge {
  display: inline-block; margin-left: 6px; font-size: 10px;
  color: var(--warn); background: rgba(180, 116, 26, .16);
  padding: 1px 6px; border-radius: 9px; vertical-align: 1px;
}

.empty { text-align: center; color: var(--sub); padding: 56px 20px; }
.empty-ico {
  font-size: 38px; margin-bottom: 14px;
  width: 76px; height: 76px; margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 26px;
  background: var(--card-2);
  border: 1px solid var(--line);
  color: var(--sub-2);
}
.empty p { font-size: 13.5px; }
.empty .btn { margin-top: 18px; }

/* ---------------- 聊天 ---------------- */
#view-chat { display: flex; flex-direction: column; padding: 0; }
#view-chat.hide { display: none; }
.msgs {
  flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 14px 16px 6px;
  display: flex; flex-direction: column;
}
.msgs::-webkit-scrollbar { width: 0; }

.msg { display: flex; margin-bottom: 12px; gap: 8px; animation: msgIn .3s var(--ease); }
.msg.me { flex-direction: row-reverse; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.bub {
  max-width: 80%; padding: 10px 14px;
  border-radius: var(--r-md); border-bottom-left-radius: 8px;
  background: var(--card-2);
  border: 1px solid var(--line);
  white-space: pre-wrap; word-break: break-word;
  font-size: 15px; color: var(--text);
}
.msg.me .bub {
  background: linear-gradient(150deg, var(--bubble-me-a), var(--bubble-me-b));
  color: var(--bubble-me-ink);
  border: 0;
  border-radius: var(--r-md); border-bottom-right-radius: 8px;
  font-weight: 500;
}

.sysmsg {
  align-self: center; text-align: center;
  color: var(--sub); font-size: 12px;
  margin: 8px 0; max-width: 90%;
}
/* 出表进度：品牌浅底胶囊 + 呼吸 */
.sysmsg.working {
  display: inline-flex; align-items: center; gap: 8px;
  align-self: center;
  padding: 9px 16px; border-radius: 999px;
  background: var(--brand-soft);
  border: 1px solid var(--line);
  color: var(--brand-ink); font-size: 12.5px; font-weight: 550;
  max-width: 88%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sysmsg.working::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto;
  background: var(--brand);
  animation: pulse 1.4s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { opacity: .55; transform: scale(.85); }
  50% { opacity: 1; transform: scale(1.1); }
}


/* 问题卡自填行 */
.qfree { display: flex; gap: 8px; margin: 2px 0 10px; }
.qfree input {
  flex: 1; min-width: 0; padding: 9px 12px; font-size: 14px;
  border: 1px solid var(--line-2); border-radius: 12px;
  background: var(--field); color: var(--text); outline: none;
}
.qfree input:focus { border-color: var(--brand); }
.qfree input::placeholder { color: var(--sub-2); }

/* 问题卡 */
.qcard {
  max-width: 94%; padding: 16px;
  border-radius: var(--r-lg);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--card-sh);
}
.qcard .qh {
  display: inline-block; font-size: 11px; color: var(--brand-ink);
  background: var(--chip-on); padding: 2px 8px; border-radius: 9px;
  margin-bottom: 8px; font-weight: 600;
}
.qcard .qt { font-weight: 650; font-size: 16px; margin-bottom: 8px; letter-spacing: .1px; }
.qcard .hint { color: var(--sub); font-size: 12.5px; margin-bottom: 10px; }

.opts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.opt {
  padding: 9px 15px; border-radius: 999px; font-size: 14px;
  background: var(--card-2); border: 1px solid var(--line-2);
  color: var(--text-2);
  transition: transform .14s var(--ease), background .2s, border-color .2s, color .2s;
}
.opt:active { transform: scale(.93); }
.opt.on {
  background: linear-gradient(150deg, var(--bubble-me-a), var(--bubble-me-b));
  border-color: transparent; color: var(--bubble-me-ink); font-weight: 600;
}
.qcard .btn { margin-top: 4px; }
.notes {
  margin-top: 12px; padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--sub); font-size: 12px;
}
.notes li { margin: 3px 0; }

/* 汇总表 / 方案块 */
.sumtable { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; margin: 8px 0; }
.sumtable th, .sumtable td { padding: 7px 8px; text-align: left; border-bottom: 1px solid var(--line); }
.sumtable tbody tr:nth-child(even) td { background: var(--card-2); }
.sumtable tr:first-child th:first-child { border-top-left-radius: 12px; }
.sumtable th { color: var(--sub); font-weight: 500; width: 88px; white-space: nowrap; }
.plans { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.plan-block {
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px;
  background: var(--card-2);
}
.plan-block.peak { background: var(--brand-soft); }
.pb-top { display: flex; justify-content: space-between; font-weight: 650; font-size: 13px; margin-bottom: 5px; }
.pb-top small { color: var(--sub); font-weight: 400; }
.pb-item { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-2); padding: 2px 0; }
.pb-item span:last-child { color: var(--sub); }

.filebtn {
  display: flex; align-items: center; gap: 10px; width: 100%;
  margin-top: 10px; padding: 12px 14px;
  border-radius: 13px;
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  color: var(--brand-ink); font-size: 13.5px; font-weight: 600;
  transition: transform .14s var(--ease);
}
html[data-theme="dark"] .filebtn { border-color: var(--brand-line); }
.filebtn:active { transform: scale(.97); }
.filebtn::after { content: '↓'; margin-left: auto; font-size: 15px; opacity: .85; }
.actions { display: flex; gap: 8px; margin-top: 12px; }

/* 输入区 */
.composer {
  flex: 0 0 auto;
  display: flex; gap: 8px; align-items: flex-end;
  padding: 8px 16px;
  background: var(--card);
  border-top: 1px solid var(--line);
}
html[data-glass="1"] .composer {
  background: var(--glass-2);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
.composer textarea {
  flex: 1; resize: none; max-height: 108px;
  padding: 10px 14px; border-radius: 21px;
  border: 1px solid var(--line-2);
  background: var(--field);
  outline: none; line-height: 1.42; font-size: 15px;
  transition: border-color .2s, box-shadow .2s;
}
.composer textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(7, 193, 96, .14);
}
.composer textarea::placeholder { color: var(--sub-2); }
.mic, .send {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  border: 1px solid var(--line-2);
  background: var(--card-2); color: var(--text-2);
  transition: transform .14s var(--ease), background .2s;
}
.mic:active, .send:active { transform: scale(.9); }
.mic.on {
  background: rgba(180, 116, 26, .18); border-color: rgba(180, 116, 26, .5); color: var(--warn);
  animation: pulse 1.2s ease-in-out infinite;
}
.send {
  font-size: 13px; font-weight: 650;
  color: #fff;
  background: linear-gradient(150deg, var(--brand), var(--brand-deep));
  border-color: transparent;
}
.send:disabled { opacity: .5; }

/* 识别中浮层 */
.voice-tip {
  position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%);
  z-index: 5; width: min(86%, 340px);
  padding: 10px 14px; border-radius: 18px; font-size: 13px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(20, 16, 12, .14);
  color: var(--text);
  animation: rise .2s var(--ease);
  pointer-events: none;
}
.voice-tip .vt-bar {
  display: flex; align-items: center; gap: 8px;
  color: var(--brand-ink); font-weight: 600; font-size: 12px;
}
.voice-tip .vt-bar i {
  width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto;
  background: var(--brand);
  animation: pulse 1.2s ease-in-out infinite;
}
.voice-tip .vt-text {
  margin-top: 5px; max-height: 66px; overflow: hidden;
  color: var(--sub); font-size: 13px; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
}
/* 长按录音时麦克风按钮强调 */
.mic.rec {
  background: linear-gradient(150deg, var(--bubble-me-a), var(--bubble-me-b));
  border-color: transparent; color: var(--bubble-me-ink);
  animation: pulse 1s ease-in-out infinite;
}
.gen-bar {
  flex: 0 0 auto;
  padding: 8px 16px 10px;
  background: var(--card);
  border-top: 1px solid var(--line);
}
html[data-glass="1"] .gen-bar {
  background: var(--glass-2);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
.gen-bar .btn { animation: rise .26s var(--ease); }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------------- 方案池 ---------------- */
.seg {
  display: flex; gap: 3px; padding: 4px;
  border-radius: 999px;
  background: var(--card-2); border: 1px solid var(--line);
  margin: 2px 2px 10px;
  position: relative;
  touch-action: pan-y;    /* 水平手势留给玻璃胶囊拖拽，垂直滚动不受影响 */
}
.seg button {
  flex: 1; padding: 8px 0; border-radius: 999px;
  position: relative; z-index: 1;
  font-size: 13px; color: var(--sub); font-weight: 500;
  background: transparent; border: 1px solid transparent;
  transition: color .26s var(--ease), font-weight .2s;
}
.seg button.on {
  color: var(--brand-ink); font-weight: 650;
}
.panel-card {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--card-sh);
  border-radius: var(--r-lg);
  margin: 0 0 10px; padding: 14px;
}
.panel-card h3 { font-size: 15px; margin-bottom: 10px; font-weight: 650; }
.stat-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; padding: 8px 0; border-bottom: 1px solid var(--line);
}
.stat-row:last-child { border: 0; }
.bar { height: 6px; background: var(--track); border-radius: 3px; overflow: hidden; margin-top: 5px; }
.bar > i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--brand), var(--brand-deep)); }
.pool-list { max-height: none; }
.pool-item { display: flex; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; align-items: baseline; }
.pool-item:last-child { border: 0; }
.pool-item .nm { flex: 1; color: var(--text-2); }
.pool-item .pr { color: var(--danger); font-weight: 650; white-space: nowrap; }
.search {
  width: 100%; padding: 10px 14px; margin-bottom: 10px;
  border: 1px solid var(--line-2); border-radius: 13px;
  background: var(--field); outline: none; font-size: 14px;
}
.aud-row { border-bottom: 1px solid var(--line); padding: 9px 0; font-size: 13px; }
.aud-row:last-child { border: 0; }
.aud-row b { display: block; margin-bottom: 3px; font-size: 14px; }
.aud-row p { color: var(--sub); font-size: 12px; }

/* 可筛选表头 chips */
.hdr-chips { display: flex; gap: 6px; flex-wrap: wrap; padding: 2px 0 8px; }
.hchip {
  border: 1px solid var(--line-2); background: var(--field); color: var(--sub);
  font-size: 11.5px; padding: 4px 9px; border-radius: 999px;
}
.hchip.on { background: var(--chip-on); color: var(--brand-ink); border-color: var(--brand); }
.hchip.off { color: var(--danger); border-color: var(--danger); }
.row-tap { cursor: pointer; }
.row-tap:active { background: var(--field); }

/* 筛选值列表 */
.fil-list { max-height: 46vh; overflow: auto; margin-top: 4px; }
.mat-item .chev { color: var(--sub-2); font-size: 16px; }

/* ---------------- 素材管理（方案池） ---------------- */
.mat-tools {
  display: flex; gap: 7px; align-items: center; margin: 0 2px 10px;
}
.mat-tools .search { flex: 1; margin-bottom: 0; min-width: 0; }
.tool-btn {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; color: var(--text-2);
  background: var(--card-2); border: 1px solid var(--line-2);
  transition: transform .14s var(--ease);
}
.tool-btn:active { transform: scale(.9); }
.tool-btn.danger-on { color: #fff; background: var(--danger); border-color: transparent; }
.mat-item {
  display: flex; gap: 8px; align-items: center;
  padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px;
}
.mat-item:last-child { border: 0; }
.mat-item .chk {
  flex: 0 0 auto; width: 20px; height: 20px; border-radius: 7px;
  border: 1.5px solid var(--line-2); background: var(--card);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: transparent; transition: all .15s;
}
.mat-item .chk.on {
  background: linear-gradient(150deg, var(--brand), var(--brand-deep));
  border-color: transparent; color: #fff;
}
.mat-item .nm { flex: 1; min-width: 0; color: var(--text-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mat-item .nm small { color: var(--sub-2); }
.mat-item .pr { color: var(--danger); font-weight: 650; white-space: nowrap; font-size: 12.5px; }
.mat-del {
  flex: 0 0 auto; font-size: 11.5px; color: var(--danger);
  padding: 3px 9px; border-radius: 9px; background: rgba(201, 59, 54, .12);
}
.mat-bulk {
  display: flex; gap: 8px; margin-top: 10px;
}
.mat-bulk .btn { flex: 1; }
.mat-custom-tag {
  display: inline-block; margin-left: 6px; font-size: 10px;
  color: var(--brand-ink); background: var(--chip-on);
  padding: 1px 6px; border-radius: 9px;
}
.add-form { display: flex; flex-direction: column; gap: 9px; }
.add-form .row2 { display: flex; gap: 8px; }
.add-form .row2 > label { flex: 1; }
.add-form input {
  width: 100%; padding: 10px 12px; font-size: 14px;
  border: 1px solid var(--line-2); border-radius: 12px;
  background: var(--field); outline: none;
}
.add-form input:focus { border-color: var(--brand); }

/* ---------------- 我的 ---------------- */
/* 身份卡：头像 + 名字 + 角色说明 + 右侧状态胶囊 */
.id-card {
  display: flex; gap: 12px; align-items: center;
  padding: 14px; margin-bottom: 10px;
  border-radius: var(--r-lg);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--card-sh);
}
.id-row { display: flex; gap: 12px; align-items: center; width: 100%; min-width: 0; }
.id-main { flex: 1; min-width: 0; }
.avatar {
  width: 48px; height: 48px; border-radius: 24px; flex: 0 0 auto;
  background: linear-gradient(150deg, var(--brand), var(--brand-deep));
  color: #fff; font-size: 20px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.id-main input {
  border: 0; background: transparent; outline: none;
  font-size: 17px; font-weight: 650; width: 100%; max-width: 170px; color: var(--text);
  border-bottom: 1px solid transparent;
  padding: 0;
}
.id-main input:focus { border-bottom-color: var(--line-2); }
.id-main input::placeholder { color: var(--sub-2); font-weight: 500; }
.id-main .sub { color: var(--sub); font-size: 11.5px; margin-top: 2px; }

/* 状态胶囊（在线 / 未接入） */
.st-chip {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 9px; border-radius: 9px;
  font-size: 10.5px; font-weight: 600;
  background: var(--card-2); color: var(--sub);
}
.st-chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--sub-2); flex: 0 0 auto; }
.st-chip.ok { background: rgba(31, 157, 85, .12); color: var(--ok); }
.st-chip.ok i { background: var(--ok); }
html[data-theme="dark"] .st-chip.ok { background: rgba(95, 208, 138, .14); }

/* 数据概览卡：三列等分 */
.ov-card {
  display: flex; align-items: stretch;
  padding: 14px 0; margin-bottom: 10px;
  border-radius: var(--r-lg);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--card-sh);
}
.ov-col { flex: 1; text-align: center; border-right: 1px solid var(--line); padding: 0 8px; }
.ov-col:last-child { border-right: 0; }
.ov-col b { display: block; font-size: 22px; font-weight: 650; letter-spacing: -.3px; font-variant-numeric: tabular-nums; }
.ov-col span { font-size: 10.5px; color: var(--sub); margin-top: 2px; display: block; }

/* 分组卡（标题 + 品牌红竖条） */
.grp-card {
  margin-bottom: 10px; padding: 14px;
  border-radius: var(--r-lg);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--card-sh);
}
.grp-title {
  display: flex; align-items: center; gap: 7px;
  font-size: 14.5px; font-weight: 650; margin-bottom: 2px;
}
.grp-title::before {
  content: ''; width: 3px; height: 13px; border-radius: 2px;
  background: var(--brand); flex: 0 0 auto;
}
.grp-sub { color: var(--sub); font-size: 11.5px; margin-bottom: 4px; }

.cells {
  border-radius: var(--r-lg); overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--card-sh);
}
.cell {
  display: flex; align-items: center; width: 100%;
  padding: 14px 14px; text-align: left;
  border-bottom: 1px solid var(--line);
  transition: background .16s;
}
.cell:last-child { border: 0; }
.cell:active { background: var(--card-2); }
.cell-t { flex: 1; font-size: 15px; }
.cell-v { color: var(--sub); font-size: 12.5px; margin-right: 4px; }
.chev { color: var(--sub-2); font-size: 17px; }

.panel {
  margin-top: 10px; padding: 16px;
  border-radius: var(--r-lg);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--card-sh);
}
.panel h3 { font-size: 15px; margin-bottom: 6px; font-weight: 650; }
.tip { color: var(--sub); font-size: 12px; margin-bottom: 12px; line-height: 1.55; }
.fld { display: block; margin-bottom: 11px; }
.fld > span { display: block; font-size: 12px; color: var(--sub); margin-bottom: 5px; }
.fld input {
  width: 100%; padding: 11px 14px;
  border: 1px solid var(--line-2); border-radius: 13px;
  background: var(--field); outline: none; font-size: 14px;
}
.fld input:focus { border-color: var(--brand); }
.kv-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px;
}
.q-item {
  border: 1px solid var(--line-2); border-radius: 14px;
  padding: 12px; margin-bottom: 9px; background: var(--card-2);
}
.q-item .qh { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.q-item .qh b { font-size: 13px; }
.q-item input, .q-item textarea {
  width: 100%; padding: 9px 12px; margin-bottom: 6px;
  border: 1px solid var(--line-2); border-radius: 12px;
  background: var(--card); outline: none; font-size: 13px;
}

/* 控件行（分组卡内） */
.pref-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.pref-row:last-child { border: 0; }
.pref-row .pl { flex: 1; }
.pref-row .pl b { display: block; font-size: 14.5px; font-weight: 550; }
.pref-row .pl small { color: var(--sub); font-size: 11.5px; }
.pref-row .seg { margin: 0; width: 200px; flex: 0 0 auto; }
.pref-row .seg button { padding: 7px 0; font-size: 12.5px; }
.pref-label { font-size: 12px; color: var(--sub); padding: 14px 0 0; }

/* iOS 风格开关 */
.switch {
  position: relative; width: 51px; height: 31px; flex: 0 0 auto;
  border-radius: 999px;
  background: var(--track);
  border: 1px solid var(--line-2);
  transition: background .28s var(--ease), border-color .28s;
}
.switch::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 25px; height: 25px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .22), 0 1px 2px rgba(0, 0, 0, .14);
  transition: transform .28s var(--ease);
}
.switch.on { background: var(--brand); border-color: transparent; }
.switch.on::after { transform: translateX(20px); }
.switch:active::after { transform: scale(.94); }
.switch.on:active::after { transform: translateX(20px) scale(.94); }

/* 页脚 */
.me-foot {
  text-align: center; color: var(--sub-2); font-size: 11.5px;
  padding: 14px 0 6px; line-height: 1.6;
}

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 10px 18px;
  border-radius: 13px; font-size: 15px; font-weight: 550;
  background: var(--card-2); border: 1px solid var(--line-2);
  color: var(--text);
  transition: transform .14s var(--ease), background .2s, opacity .2s;
}
.btn:active { transform: scale(.975); }
.btn.primary {
  background: linear-gradient(150deg, var(--brand), var(--brand-deep));
  color: #fff; border-color: transparent;
  font-weight: 650;
}
.btn.primary:active { opacity: .9; }
.btn.ghost {
  background: var(--card);
  border: 1px solid var(--line-2);
}
.btn.sm { min-height: 34px; padding: 6px 13px; font-size: 13px; border-radius: 11px; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .55; }

/* ---------------- 浮层 ---------------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--dock-h) + 28px + var(--safe-b));
  transform: translateX(-50%) translateY(10px) scale(.96);
  padding: 11px 20px; border-radius: 999px;
  font-size: 13.5px; max-width: 82vw; text-align: center;
  background: rgba(24, 22, 20, .9);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, .12);
  color: #F2EEE8;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .3);
  opacity: 0; pointer-events: none; z-index: 90;
  transition: opacity .22s var(--ease), transform .22s var(--ease);
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
.toast.err { background: rgba(160, 40, 36, .92); }

/* 底部弹层：实色卡；玻璃开时才磨砂 */
.sheet-wrap {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: flex-end;
  background: rgba(10, 8, 7, .45);
  animation: fade .2s var(--ease);
}
.sheet {
  width: 100%;
  max-height: 78vh; overflow-y: auto;
  padding: 12px 16px calc(18px + var(--safe-b));
  border-radius: 22px 22px 0 0;
  background: var(--card);
  border-top: 1px solid var(--line);
  box-shadow: 0 -16px 46px rgba(0, 0, 0, .18);
  animation: up .3s var(--ease);
}
html[data-glass="1"] .sheet {
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-top: 1px solid var(--glass-bd);
  box-shadow: none;             /* 标准 6.4：玻璃弹层不加投影 */
}
.sheet::before {
  content: ''; display: block; width: 36px; height: 5px; border-radius: 3px;
  background: var(--line-2); margin: 0 auto 12px;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes up { from { transform: translateY(46%); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet h3 { font-size: 16px; margin-bottom: 12px; font-weight: 650; }
.sheet .cell { border-radius: 13px; }


/* ============================================================
   老客户数据（嘉兴大学）
   ============================================================ */
.cli-hero {
  position: relative;
  margin: 4px 16px 14px;
  padding: 22px 20px 18px;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(150deg, var(--brand) 0%, var(--brand-deep) 100%);
  box-shadow: 0 14px 36px rgba(4, 134, 74, .28);
  color: #fff;
}
.cli-hero::after {
  content: '';
  position: absolute; right: -46px; top: -52px;
  width: 190px; height: 190px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(255,255,255,.22), rgba(255,255,255,0) 66%);
  pointer-events: none;
}
.cli-eyebrow {
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  opacity: .82; margin-bottom: 6px;
}
.cli-name { font-size: 33px; font-weight: 760; letter-spacing: -.5px; line-height: 1.14; }
.cli-sub { font-size: 12.5px; opacity: .88; margin-top: 7px; }
.cli-stats {
  display: flex; gap: 8px; margin-top: 16px;
}
.cli-stat {
  flex: 1; padding: 9px 10px; border-radius: 13px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.22);
}
.cli-stat b { display: block; font-size: 15.5px; font-weight: 700; letter-spacing: -.2px; }
.cli-stat span { font-size: 10.5px; opacity: .8; }

.cli-cards { display: flex; flex-direction: column; gap: 11px; padding: 0 16px 20px; }
.cli-card {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 15px 14px 15px 16px;
  text-align: left; color: var(--text);
  border-radius: var(--r-lg);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--card-sh);
}
.cli-card:active { transform: scale(.985); }
.cc-main { flex: 1; min-width: 0; }
.cc-main h3 { font-size: 14.5px; font-weight: 650; letter-spacing: -.2px; }
.cc-main p { font-size: 11.5px; color: var(--sub); margin-top: 4px; }
.cc-chart { width: 66px; height: 58px; display: grid; place-items: center; flex: 0 0 auto; }
.cc-chart .mini { width: 100%; height: 100%; }
.cc-chev { color: var(--sub-2); font-size: 20px; margin-left: 2px; }

/* 二级图表页 */
.cd-top {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 18px 10px;
}
.cd-back {
  width: 34px; height: 34px; border-radius: 17px; font-size: 20px; line-height: 1;
  color: var(--text); background: var(--card-2);
  border: 1px solid var(--line);
}
.cd-t h3 { font-size: 17px; font-weight: 700; letter-spacing: -.3px; }
.cd-t p { font-size: 11.5px; color: var(--sub); margin-top: 2px; }
.cd-body { padding: 0 18px calc(24px + var(--safe-b)); display: flex; flex-direction: column; gap: 11px; }
.cd-card {
  padding: 14px 14px 12px; border-radius: var(--r-lg);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--card-sh);
}
.cd-card h3 { font-size: 13.5px; font-weight: 650; margin-bottom: 8px; color: var(--text-2); }
.cli-svg { width: 100%; height: auto; display: block; }
.cli-svg.half { width: 52%; }
.cli-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; padding-left: 4px; }
.cli-legend .lg, .legend-col .lg {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--sub);
}
.cli-legend .lg i, .legend-col .lg i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.lg-sub { font-size: 10.5px; color: var(--sub-2); margin-left: auto; }
.chart-split { display: flex; align-items: center; gap: 10px; }
.legend-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.lg-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11.5px; }
.lg-row b { font-variant-numeric: tabular-nums; color: var(--text-2); font-weight: 600; }

.cd-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 2px; border-bottom: 1px solid var(--line); font-size: 12.5px;
}
.cd-row:last-child { border-bottom: 0; }
.cd-row span { color: var(--text-2); min-width: 0; }
.cd-row small { display: block; color: var(--sub-2); font-size: 10.5px; margin-top: 2px; }
.cd-row b { color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cd-row.tot b { color: var(--brand-ink); }
.cd-row .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.nc-block { padding: 4px 0 2px; }
.nc-block > b { display: inline-block; font-size: 12px; font-weight: 650; color: var(--brand-ink);
  background: var(--chip-on); padding: 3px 10px; border-radius: 999px; margin-bottom: 4px; }

/* 多选批量操作条 */
.actbar {
  position: fixed; left: 16px; right: 16px;
  bottom: calc(var(--dock-h) + var(--safe-b) + 10px);
  z-index: 40;
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 12px 30px rgba(20, 16, 12, .18);
}
html[data-glass="1"] .actbar {
  background: var(--glass);
  border-color: var(--glass-bd);
  box-shadow: var(--glass-sh);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
.actbar .ab-n { flex: 1; font-size: 12px; color: var(--sub); }
.mat-item.sel { background: var(--chip-on); }
.tool-btn.on { color: var(--brand); border-color: var(--brand); }
.btn.sm.danger { color: #fff; background: var(--danger); border-color: transparent; }

/* 无障碍 / 降低动效 */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ================= 加号上传 / 品牌chips / 长图预览 / 下载记录 ================= */
.composer .attach {
  width: 40px; height: 40px; flex: 0 0 auto;
  border-radius: 13px; border: 1px solid var(--line-2);
  background: var(--card-2); color: var(--brand);
  font-size: 24px; font-weight: 500; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: transform .16s var(--ease), background .25s;
}
.composer .attach:active { transform: scale(.9); background: var(--chip-on); }

.opt.big { justify-content: flex-start; text-align: left; padding: 15px 16px; font-size: 15px; }

.file-row { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.file-row .filebtn { flex: 1 1 auto; cursor: pointer; }
.filebtn.pv { border-color: var(--brand-line); color: var(--brand-ink); }
html[data-theme="dark"] .filebtn.pv { color: var(--brand-ink); border-color: var(--brand-line); }

/* 认可品牌 chips */
.brand-item { display: block; }
.bchips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.bchip {
  font-size: 11.5px; padding: 2px 8px; border-radius: 9px;
  background: var(--chip-on); color: var(--brand-ink); font-weight: 500;
}
.bchip.red { background: rgba(201, 59, 54, .12); color: var(--danger); text-decoration: line-through; }
html[data-theme="dark"] .bchip.red { color: #F2907F; }

/* 方案长图预览 */
#view-preview { display: flex; flex-direction: column; background: #171614; }
html[data-theme="light"] #view-preview { background: #E7E9EE; }
.pv-bar {
  flex: 0 0 auto; display: flex; gap: 10px; padding: 10px 16px 6px;
}
.pv-btn {
  flex: 1; height: 42px; border-radius: 13px; border: 1px solid var(--line-2);
  background: var(--card); color: var(--text); font-size: 14.5px; font-weight: 600;
}
.pv-btn.primary {
  background: linear-gradient(150deg, var(--brand), var(--brand-deep)); color: #fff; border: 0;
}
.pv-scroll { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; padding: 8px 6px 30px; }
.pv-scroll img { width: 100%; height: auto; display: block; border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,.3); }
.pv-tip { text-align: center; color: var(--sub); font-size: 12px; padding: 10px 0 4px; }

/* ================= pane 工具条 / 筛选多选 / 客户列表 ================= */
.pane-tools { display: flex; gap: 8px; align-items: center; padding: 2px 0 10px; }
.pane-tools .search { flex: 1; }

.fil-item {
  display: flex; align-items: center; width: 100%; text-align: left;
  padding: 12px 14px; border-bottom: 1px solid var(--line);
  background: none; font-size: 14.5px; color: var(--text);
  max-height: none; overflow: visible;
}
.fil-item .fchk { opacity: 0; margin-right: 8px; color: var(--brand); font-weight: 700; }
.fil-item.on { color: var(--brand-ink); font-weight: 600; background: var(--chip-on); }
.fil-item.on .fchk { opacity: 1; }

.cli-list { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.cli-item {
  display: flex; align-items: center; gap: 10px; text-align: left;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 16px; color: var(--text);
  box-shadow: var(--card-sh);
}
.cli-item .nm { flex: 1; }
.cli-item .nm b { font-size: 16.5px; }
.cli-item .nm small { color: var(--sub-2); font-size: 11.5px; }
.cli-item .pr { font-size: 17px; font-weight: 700; color: var(--brand-ink); }
.cli-item .chev { color: var(--sub-2); font-size: 18px; }

/* ---------------- 原生液态玻璃接管（iOS 26/27 UIGlassEffect） ----------------
   壳里能拿到系统玻璃材质时（html[data-nativeglass="1"]），底部 tab 的整条背景
   和选中胶囊由 UIKit 渲染真正的 Liquid Glass；网页这层只保留文字与图标，
   自己的背景/描边/投影/模糊全部让位，否则两层玻璃叠在一起会发灰发脏。 */
html[data-nativeglass="1"] .tabbar {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
html[data-nativeglass="1"] .tab-thumb {
  background: transparent;
  border: 0;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
html[data-nativeglass="1"] .tabbar button { color: rgba(22, 25, 31, .82); }
html[data-nativeglass="1"][data-theme="dark"] .tabbar button { color: rgba(241, 244, 242, .80); }
html[data-nativeglass="1"] .tabbar button.on { color: var(--brand-ink); }
