:root{
  --bg:#f4f5fb;
  --ink:#1f2330;
  --brand:#4f46e5;
  --brand2:#6366f1;
  --u:#2f6bed;
  --a:#ffffff;
  --line:#ece9f5;
  /* 各功能点缀色 */
  --c-ref:#2f6bed;
  --c-related:#7c3aed;
  --c-graph:#4f46e5;
  --c-mindmap:#0d9488;
}
*{ box-sizing:border-box; }
html,body{ margin:0; height:100%; font-family:"PingFang SC","Microsoft YaHei",system-ui,sans-serif; color:var(--ink); background:var(--bg); }
.app{ max-width:860px; margin:0 auto; height:100vh; display:flex; flex-direction:column; }
.hdr{ min-height:calc(140px + env(safe-area-inset-top,0px)); padding:18px 22px;
  padding-top:calc(18px + env(safe-area-inset-top,0px)); background:#5C8AFF; color:#fff; }
.brand{ font-size:22px; font-weight:700; letter-spacing:1px; }
.tag{ font-size:13px; opacity:.9; margin-top:3px; }
.messages{ flex:1; overflow-y:auto; padding:20px; display:flex; flex-direction:column; gap:14px; }
.row{ display:flex; }
.row.u{ justify-content:flex-end; }
/* 助手消息：气泡 + 卡片纵向堆叠 */
.row.a{ flex-direction:column; align-items:flex-start; }
.row.a .card{ width:92%; max-width:560px; }
.bubble{ max-width:78%; padding:11px 15px; border-radius:14px; line-height:1.6; font-size:15px; box-shadow:0 1px 2px rgba(0,0,0,.06); word-break:break-word; }
.row.u .bubble{ background:var(--u); color:#fff; border-bottom-right-radius:4px; }
.row.a .bubble{ background:var(--a); color:var(--ink); border:1px solid var(--line); border-bottom-left-radius:4px; }
.bubble :first-child{ margin-top:0; } .bubble :last-child{ margin-bottom:0; }
.bubble table{ border-collapse:collapse; margin:8px 0; font-size:13px; }
.bubble th,.bubble td{ border:1px solid var(--line); padding:5px 9px; }
.bubble code{ background:#eef0f8; padding:1px 5px; border-radius:4px; }
.hint{ text-align:center; color:#998; font-size:13px; margin:auto 0; max-width:80%; align-self:center; line-height:1.7; }
.composer{ position:relative; z-index:2; display:flex; align-items:flex-end; gap:8px; padding:12px 16px; border-top:1px solid var(--line); background:#fff; }
.icon{ cursor:pointer; font-size:22px; padding:6px 8px; border-radius:10px; user-select:none; }
.icon:hover{ background:#eef0f8; }
#input{ flex:1; resize:none; border:1px solid var(--line); border-radius:12px; padding:10px 12px; font:inherit; font-size:26px; max-height:120px; outline:none; }
#input:focus{ border-color:var(--brand2); }
.send{ background:var(--brand); color:#fff; border:0; border-radius:12px; padding:10px 18px; font-size:15px; cursor:pointer; }
.send:disabled{ opacity:.5; cursor:default; }
.typing::after{ content:"▋"; animation:blink 1s steps(2) infinite; }
@keyframes blink{ 50%{ opacity:0; } }

/* 顶栏按钮 */
.hdr{ position:relative; z-index:2; display:flex; align-items:center; align-content:center; gap:10px; flex-wrap:wrap; }
.hdr .brand{ flex:1; }
.hdr-actions{ display:flex; gap:6px; }
.hdr-btn{ background:rgba(255,255,255,.18); color:#fff; border:0; border-radius:10px;
  min-width:40px; height:40px; font-size:18px; cursor:pointer; line-height:1; }
.hdr-btn:active{ background:rgba(255,255,255,.30); }
.hdr .tag{ flex-basis:100%; }

/* 页脚免责声明 */
.disclaimer{ text-align:center; font-size:11px; color:#aa9; padding:4px 0 8px; background:#fff; }

/* 结构化卡片基础 */
.card{ margin-top:8px; background:#ffffff; border:1px solid var(--line); border-radius:12px;
  padding:10px 12px; box-shadow:0 1px 4px rgba(79,70,229,.06); }
.card-hd{ font-weight:600; color:var(--brand); margin-bottom:6px; font-size:14px; }
.card-empty{ color:#998; font-size:13px; padding:4px 0; }
.card-action{ margin-top:8px; background:var(--brand); color:#fff; border:0; border-radius:10px;
  padding:9px 14px; font-size:14px; cursor:pointer; min-height:40px; }

/* ---------- 书目条目（bookItem） ---------- */
.bk-item{
  display:flex;
  gap:12px;
  padding:10px 0;
  border-top:1px solid var(--line);
}
.bk-item:first-of-type{ border-top:0; }

/* 封面占位块 */
.bk-cover{
  flex-shrink:0;
  width:56px; height:72px;
  background:#eef0f8;
  border-radius:6px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.bk-cover svg{ width:24px; height:24px; stroke:#a5b4fc; stroke-width:1.5; fill:none; }
/* 真实封面图：填满占位盒（56x72），保持比例裁切 */
.bk-cover-img{ width:100%; height:100%; object-fit:cover; border-radius:6px; display:block; }

/* 右侧内容区 */
.bk-body{
  flex:1;
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:3px;
}
.bk-title{ font-size:15px; font-weight:600; color:var(--ink); line-height:1.4; }
.bk-rows{ margin:0; padding:0; list-style:none; display:flex; flex-direction:column; gap:2px; }
.bk-rows li{
  font-size:12px;
  color:#6b7280;
  display:flex;
  gap:4px;
  line-height:1.5;
}
.bk-rows li::before{
  content:"·";
  flex-shrink:0;
  color:#a5b4fc;
}
.bk-rows li b{ color:var(--ink); font-weight:500; }
.bk-reason{
  font-size:12px;
  color:var(--brand);
  margin-top:2px;
  line-height:1.5;
}
.bk-reason::before{ content:"推荐理由："; font-weight:600; }

/* ---------- 操作入口卡（operations，每 entry 独立整行卡） ---------- */
.operations{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-top:0;
  /* 取消 card 上的 padding，让子卡撑满 */
  padding:0;
  background:transparent;
  border:none;
  box-shadow:none;
}

/* 单个操作行卡 */
.op-row{
  display:flex;
  align-items:center;
  gap:12px;
  width:100%;
  padding:12px 14px;
  background:#ffffff;
  border:1px solid var(--line);
  border-radius:12px;
  box-shadow:0 1px 3px rgba(79,70,229,.07);
  cursor:pointer;
  text-align:left;
  font:inherit;
  min-height:48px;
  /* 去除 button 默认样式 */
  appearance:none;
  -webkit-appearance:none;
  transition:background .15s;
}
.op-row:active{ background:#f5f3ff; }
.op-row:disabled{ opacity:.55; cursor:default; }

/* 图标底块 */
.op-icon{
  flex-shrink:0;
  width:36px; height:36px;
  border-radius:10px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.op-icon svg{ width:20px; height:20px; stroke-width:1.6; fill:none; }

/* 图标底色 by kind */
.op-row[data-kind="references"] .op-icon{ background:rgba(47,107,237,.10); }
.op-row[data-kind="references"] .op-icon svg{ stroke:var(--c-ref); }
.op-row[data-kind="related"]    .op-icon{ background:rgba(124,58,237,.10); }
.op-row[data-kind="related"]    .op-icon svg{ stroke:var(--c-related); }
.op-row[data-kind="graph"]      .op-icon{ background:rgba(79,70,229,.10); }
.op-row[data-kind="graph"]      .op-icon svg{ stroke:var(--c-graph); }
.op-row[data-kind="mindmap"]    .op-icon{ background:rgba(13,148,136,.10); }
.op-row[data-kind="mindmap"]    .op-icon svg{ stroke:var(--c-mindmap); }
.op-row[data-kind="detail"]     .op-icon{ background:rgba(79,70,229,.10); }
.op-row[data-kind="detail"]     .op-icon svg{ stroke:var(--c-graph); }

/* 标签文字 */
.op-label{
  flex:1;
  font-size:15px;
  font-weight:500;
  color:var(--ink);
  min-width:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* 右侧 badge / 箭头 */
.op-badge{
  flex-shrink:0;
  background:#eef0f8;
  color:#6366f1;
  font-size:12px;
  font-weight:600;
  border-radius:999px;
  padding:2px 9px;
  min-width:28px;
  text-align:center;
  line-height:20px;
}
.op-arrow{
  flex-shrink:0;
  color:#9ca3af;
  font-size:16px;
  line-height:1;
}

/* references 展开区 */
.op-sources{
  display:none;
  background:#f9f9ff;
  border:1px solid var(--line);
  border-radius:10px;
  padding:8px 10px;
  margin-top:-4px;  /* 紧贴上方行卡 */
}
.op-sources.open{ display:block; }
.op-source{ padding:6px 0; border-top:1px dashed var(--line); }
.op-source:first-child{ border-top:0; }
.op-source-title{ font-size:13px; font-weight:600; color:var(--ink); }
.op-source-snip{ font-size:12px; color:#6b7280; line-height:1.6; margin-top:2px; }

/* 超期/借出 badge */
.badge-overdue{ display:inline-block; background:#e23; color:#fff; border-radius:6px;
  font-size:11px; padding:1px 7px; margin-left:4px; }
.badge-out{ display:inline-block; background:#999; color:#fff; border-radius:6px; font-size:11px; padding:1px 7px; margin-left:4px; }

/* 借阅列表 */
.bk-meta{ font-size:13px; color:#6b7280; margin:2px 0; }
.bk-call{ font-size:13px; color:#4b5563; }
.bk-call b{ color:var(--brand); }

.rec-reason{ font-size:13px; color:var(--brand2); margin-bottom:6px; }
.cc-ocr{ font-size:12px; color:#776; margin-bottom:6px; word-break:break-all; }

/* 欢迎页 */
.welcome{ margin:auto 0; align-self:center; max-width:96%; text-align:center; display:flex;
  flex-direction:column; align-items:center; gap:10px; padding:8px 4px; }
.wc-logo{ font-size:44px; }
.wc-greet{ font-size:18px; font-weight:700; color:var(--ink); }
.wc-sub{ font-size:13px; color:#776; }
.wc-tips{ width:100%; background:#ffffff; border:1px solid var(--line); border-radius:12px;
  padding:10px 12px; text-align:left; }
.wc-tips-hd{ font-size:14px; font-weight:600; color:var(--brand); display:flex;
  justify-content:space-between; align-items:center; margin-bottom:6px; }
.wc-refresh{ background:none; border:1px solid var(--line); border-radius:8px; color:var(--brand);
  font-size:12px; padding:4px 10px; cursor:pointer; }
.tip{ padding:6px 0; border-top:1px dashed var(--line); }
.tip:first-child{ border-top:0; }
.tip-title{ font-size:13px; font-weight:600; }
.tip-content{ font-size:12px; color:#776; line-height:1.6; }
.wc-loading{ font-size:13px; color:#998; }
/* 快速回复芯片 */
.wc-quick{ display:flex; flex-wrap:wrap; gap:8px; justify-content:center; }
.chip{ background:#fff; border:1px solid var(--brand2); color:var(--brand); border-radius:999px;
  padding:9px 14px; font-size:13px; cursor:pointer; min-height:38px; }
.chip:active{ background:#eef0f8; }

/* 知识图谱 / 思维导图卡 */
.graphcard, .mindmapcard{ margin-top:8px; background:#ffffff; border:1px solid var(--line); border-radius:12px; padding:10px 12px; }
.mermaid-host{ overflow-x:auto; text-align:center; }
.mermaid-host svg{ max-width:none; height:auto; }
.graph-hint{ font-size:12px; color:#998; margin-top:6px; text-align:center; }

/* 径向图谱 host（环绕式布局） */
.radial-host{
  width:100%;
  text-align:center;
  min-height:360px;
  padding:4px 0;
  overflow:visible;  /* SVG 自适应 */
}
.radial-host svg{
  display:block;
  margin:0 auto;
}

/* 力导向图谱 host（D3 实体枢纽网络） */
.force-host{
  width:100%;
  text-align:center;
  min-height:360px;
  padding:4px 0;
  overflow:visible;  /* 节点拖拽不裁切 */
}
.force-host svg{
  display:block;
  margin:0 auto;
}

/* 图书详情底部抽屉 */
.sheet-backdrop{ position:fixed; inset:0; background:rgba(0,0,0,.35); display:none; z-index:50; }
.sheet-backdrop.open{ display:block; }
.sheet-panel{ position:absolute; left:0; right:0; bottom:0; max-height:85vh; overflow-y:auto;
  background:#fff; border-radius:16px 16px 0 0; transform:translateY(100%); transition:transform .25s ease; }
.sheet-backdrop.open .sheet-panel{ transform:translateY(0); }
.sheet-bar{ position:sticky; top:0; background:#fff; display:flex; justify-content:flex-end;
  padding:8px 12px; border-bottom:1px solid var(--line); }
.sheet-close{ background:none; border:1px solid var(--line); border-radius:10px; color:var(--brand);
  font-size:13px; padding:8px 14px; min-height:40px; cursor:pointer; }
.sheet-content{ padding:12px 14px; }
.sheet-loading{ text-align:center; color:#998; padding:20px 0; }
/* 详情卡 */
.bookdetail .detail-hint{ font-size:13px; color:var(--brand2); margin:6px 0; }
.lib-block{ margin-top:10px; background:#f9f9ff; border:1px solid var(--line); border-radius:10px; padding:8px 10px; }
.lib-name{ font-size:14px; font-weight:600; color:var(--brand); margin-bottom:4px; }
.copy-row{ padding:4px 0; border-top:1px dashed var(--line); }
.lib-name + .copy-row{ border-top:0; }
.copy-call{ font-size:13px; color:#4b5563; }
.copy-call b{ color:var(--brand); }

/* ---------- related 行内横向展开 ---------- */
.op-related-expand{
  display:none;
  margin-top:4px;
}
.op-related-expand.open{ display:block; }

/* 箭头展开态旋转 */
.op-row.related-open .op-related-arrow{
  display:inline-block;
  transform:rotate(90deg);
  transition:transform .2s ease;
}
.op-related-arrow{
  display:inline-block;
  transition:transform .2s ease;
}

/* 状态文字（加载中 / 暂无 / 失败） */
.op-rel-status{
  font-size:13px;
  color:#998;
  padding:10px 4px;
  text-align:center;
}
.op-rel-error{
  color:var(--c-related);
  cursor:pointer;
  text-decoration:underline;
}

/* 横向滚动容器 */
.op-rel-scroller{
  display:flex;
  gap:10px;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  padding:4px 2px 10px;
  /* 隐藏滚动条（保留滚动能力） */
  scrollbar-width:none;
}
.op-rel-scroller::-webkit-scrollbar{ display:none; }

/* 单本精简书卡（fixed 宽，竖向） */
.rel-book-card{
  flex-shrink:0;
  width:152px;
  display:flex;
  flex-direction:column;
  gap:6px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:10px;
  padding:10px 10px 8px;
  box-shadow:0 1px 3px rgba(79,70,229,.06);
}

/* 封面占位块 */
.rel-book-cover{
  width:100%;
  height:88px;
  background:#eef0f8;
  border-radius:6px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
}
.rel-book-cover svg{
  width:28px; height:28px;
  stroke:#a5b4fc;
  stroke-width:1.5;
  fill:none;
}

/* 书名：2 行省略 */
.rel-book-title{
  font-size:13px;
  font-weight:600;
  color:var(--ink);
  line-height:1.4;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
}

/* 作者：1 行省略 */
.rel-book-author{
  font-size:12px;
  color:#6b7280;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* ISBN 小字 */
.rel-book-isbn{
  font-size:11px;
  color:#9ca3af;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* 查看详情按钮 */
.rel-book-detail{
  margin-top:auto;
  width:100%;
  background:var(--c-related);
  color:#fff;
  border:0;
  border-radius:8px;
  padding:7px 0;
  font-size:12px;
  font-weight:500;
  cursor:pointer;
  min-height:34px;
  -webkit-appearance:none;
  appearance:none;
}
.rel-book-detail:active{ opacity:.8; }

/* N本 徽标 */
.op-related-badge{
  margin-left:4px;
}

/* ---------- 全屏图谱/思维导图 viewer ---------- */
.gv-backdrop{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.5);
  display:none;
  z-index:100;
  /* 点背景可关闭，modal 内阻止冒泡不需要，backdrop 本身监听 */
}
.gv-backdrop.open{ display:flex; align-items:stretch; }

.gv-modal{
  position:absolute;
  inset:0;
  display:flex;
  flex-direction:column;
  background:#fff;
  /* 顶部安全区 */
  padding-top:env(safe-area-inset-top, 0px);
  padding-bottom:env(safe-area-inset-bottom, 0px);
}

/* 顶部标题栏 */
.gv-hdr{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 16px;
  border-bottom:1px solid var(--line);
  background:#fff;
  flex-shrink:0;
}

.gv-title-icon{
  flex-shrink:0;
  width:28px; height:28px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.gv-title-icon svg{
  width:22px; height:22px;
  stroke:currentColor;
  stroke-width:1.6;
  fill:none;
}

.gv-title-text{
  flex:1;
  font-size:16px;
  font-weight:600;
  color:var(--ink);
  min-width:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* 关闭按钮：≥44px 触控区 */
.gv-close{
  flex-shrink:0;
  width:44px; height:44px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:none;
  border:1px solid var(--line);
  border-radius:10px;
  cursor:pointer;
  -webkit-appearance:none;
  appearance:none;
  padding:0;
}
.gv-close svg{
  width:18px; height:18px;
  stroke:var(--ink);
  stroke-width:2;
  fill:none;
}
.gv-close:active{ background:#f0f0f8; }

/* 内容区：双向可滚动 */
.gv-body{
  flex:1;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
  padding:12px;
}

/* viewer 内图谱卡：去掉外边框，让 mermaid-host 自然尺寸 */
.gv-body .graphcard,
.gv-body .mindmapcard{
  border:none;
  box-shadow:none;
  padding:0;
  margin:0;
  background:transparent;
}
.gv-body .mermaid-host{
  overflow:auto;
  -webkit-overflow-scrolling:touch;
  text-align:left;
}
.gv-body .mermaid-host svg{
  /* 不强制缩放，保持自然尺寸，可横向滚动查看 */
  max-width:none;
  height:auto;
}

/* 波次 3：TTS 播放按钮 */
.row.a { position: relative; }
.tts-btn {
  margin-top: 4px;
  min-width: 32px; min-height: 32px;
  padding: 2px 8px;
  border: 1px solid var(--brand);
  border-radius: 16px;
  background: #fff;
  color: var(--brand);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}
.tts-btn.playing { background: var(--brand); color: #fff; }

/* 波次 3：录音中态 */
#voiceBtn.recording {
  background: var(--brand);
  border-radius: 50%;
  animation: voice-pulse 1s ease-in-out infinite;
}
@keyframes voice-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

/* 推荐/书目卡：索书号橙色高亮 + 馆藏地点 */
.bk-rows .callno{ background:#fff3e6; color:#d2691e; padding:1px 6px; border-radius:4px; font-weight:600; }
.bk-loc{ font-size:13px; color:#4b5563; margin-top:4px; }
.bk-loc b{ color:var(--brand); font-weight:600; }

/* ============================================================
   首页/欢迎页 玻璃拟态皮肤（Stitch 设计移植，纯 CSS 本地化，离线可用）
   仅作用于空会话欢迎态；聊天态不受影响。配色复用 --brand/--brand2。
   ============================================================ */
:root{
  --glass-bg:rgba(255,255,255,.65);
  --glass-border:rgba(255,255,255,.6);
  --grad-a:#a855f7;   /* 紫 */
  --grad-b:#6366f1;   /* 靛 */
  --grad-c:#0ea5e9;   /* 青 */
}

/* 固定渐变背景层：随 .welcome 一起出现/消失（DOM 删除即移除），不污染聊天态
   z-index:-1 沉到所有内容之下，避免遮挡 header / 底部输入栏（fixed+z-index:0 会盖住 static 的 composer） */
.home-bg{
  position:fixed; inset:0; z-index:-1; pointer-events:none; overflow:hidden;
  background:linear-gradient(180deg,#e0f2fe 0%,#f1f5f9 45%,#eef2ff 100%);
}
/* 两团模糊光晕（左上/右下），营造大气层次 */
.home-bg::before,.home-bg::after{
  content:""; position:absolute; width:320px; height:320px; border-radius:50%;
  filter:blur(90px); opacity:.55;
}
.home-bg::before{ top:-80px; left:-90px; background:radial-gradient(circle,#c4b5fd,transparent 70%); }
.home-bg::after{ bottom:-100px; right:-90px; background:radial-gradient(circle,#7dd3fc,transparent 70%); }

/* 欢迎容器：抬到背景层之上；各区块间距按设计稿规格逐子项 margin 控制（非统一 gap） */
.welcome.home{ position:relative; z-index:1; width:100%; max-width:460px; margin:0 auto; gap:0; padding:0; }
/* 欢迎态去掉 messages 上下内边距，使首尾间距精确（侧边距保留防贴边） */
.messages:has(.welcome.home){ padding-top:0; padding-bottom:0; }
.welcome.home>.home-avatar{ margin-top:35px; padding:0; }          /* 机器人 ↔ 天海智图板块 35px */
.welcome.home>.home-title{ margin-top:35px; }                      /* 机器人 ↔ 主标题 35px */
.welcome.home>.home-sub{ margin-top:25px; }                        /* 主标题 ↔ 副标题 25px */
.welcome.home>.home-card{ margin-top:45px; }                       /* 副标题 ↔ 你可能想看 45px */
.welcome.home>.home-chips{ margin-top:60px; margin-bottom:30px; }  /* 你可能想看 ↔ 快捷入口 60px；快捷入口 ↔ 输入框 30px */

/* 复用玻璃面 */
.glass{
  background:var(--glass-bg);
  -webkit-backdrop-filter:blur(20px); backdrop-filter:blur(20px);
  border:1px solid var(--glass-border);
  box-shadow:0 10px 30px -5px rgba(37,99,235,.08), inset 0 1px 0 rgba(255,255,255,.8);
}

/* ---------- 头像区（成品 robot.png 自带圆盘/HI/光晕，仅加漂浮动画，避免重复装饰） ---------- */
.home-avatar{ display:flex; align-items:center; justify-content:center; padding:2px 0; }
.avatar-img{ width:168px; height:auto; display:block;
  animation:home-float 4s ease-in-out infinite;
  filter:drop-shadow(0 14px 26px rgba(79,70,229,.20)); }
@keyframes home-float{ 0%,100%{ transform:translateY(0); } 50%{ transform:translateY(-12px); } }

/* ---------- 标题 ---------- */
.home-title{ font-size:21px; font-weight:700; color:#1e293b; letter-spacing:-.01em; text-align:center; }
.home-sub{ font-size:11px; color:#64748b; letter-spacing:.18em; text-transform:none; opacity:.85; text-align:center; }

/* ---------- “你可能想看” 玻璃卡 ---------- */
.home-card{ width:100%; border-radius:28px; padding:22px; }
.home-card-hd{ display:flex; justify-content:space-between; align-items:flex-end; margin-bottom:16px; }
.home-card-hd h2{ margin:0; font-size:17px; font-weight:700; color:#0f172a; }
.home-card-hd .sub-en{ font-size:9px; font-weight:700; color:#94a3b8; letter-spacing:.18em; text-transform:uppercase; }
.home-refresh{ display:flex; align-items:center; gap:4px; background:none; border:0; color:var(--brand);
  font-size:12px; font-weight:600; cursor:pointer; padding:4px; }
.home-refresh svg{ width:15px; height:15px; }
.home-picks{ display:flex; flex-direction:column; gap:12px; }

/* 单个推荐项：玻璃按钮 + 3D 渐变图标 + 标题 + chevron */
.pick-row{
  display:flex; align-items:center; gap:14px; width:100%; padding:14px;
  background:rgba(255,255,255,.55); -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px);
  border:1px solid rgba(255,255,255,.6); border-radius:18px;
  box-shadow:0 4px 10px -2px rgba(37,99,235,.06);
  cursor:pointer; text-align:left; font:inherit;
  transition:transform .2s, background .2s;
}
.pick-row:active{ transform:scale(.97); background:rgba(255,255,255,.85); }
.pick-ico{
  flex-shrink:0; width:42px; height:42px; border-radius:14px;
  display:flex; align-items:center; justify-content:center; color:#fff;
  box-shadow:0 6px 14px rgba(0,0,0,.12);
}
.pick-ico svg{ width:22px; height:22px; }
.pick-row:nth-child(3n+1) .pick-ico{ background:linear-gradient(135deg,#60a5fa,#2563eb); }
.pick-row:nth-child(3n+2) .pick-ico{ background:linear-gradient(135deg,#c084fc,#7c3aed); }
.pick-row:nth-child(3n+3) .pick-ico{ background:linear-gradient(135deg,#22d3ee,#0891b2); }
.pick-title{ flex:1; min-width:0; font-size:15px; font-weight:600; color:#334155;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pick-arrow{ flex-shrink:0; color:#cbd5e1; }
.pick-arrow svg{ width:18px; height:18px; }
.home-pick-loading{ font-size:13px; color:#94a3b8; padding:8px 2px; }

/* ---------- 横滑快捷 chips ---------- */
.home-chips{ width:100%; display:flex; gap:12px; overflow-x:auto; padding:2px; scrollbar-width:none; }
.home-chips::-webkit-scrollbar{ display:none; }
.home-chip{
  flex-shrink:0; display:flex; align-items:center; gap:8px; padding:10px 16px;
  background:rgba(255,255,255,.6); -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px);
  border:1px solid rgba(255,255,255,.6); border-radius:999px;
  box-shadow:0 4px 8px -2px rgba(37,99,235,.05);
  font-size:12px; font-weight:600; color:#334155; cursor:pointer; white-space:nowrap;
  transition:transform .2s;
}
.home-chip:active{ transform:scale(.95); }
.home-chip svg{ width:16px; height:16px; flex-shrink:0; }
.home-chip:nth-child(3n+1) svg{ color:#3b82f6; }
.home-chip:nth-child(3n+2) svg{ color:#a855f7; }
.home-chip:nth-child(3n+3) svg{ color:#0ea5e9; }

/* 宽屏(web/iPad)：快捷 chips 全部展开换行居中，不再横向滚动；窄屏维持横滑 */
@media (min-width:680px){
  .home-chips{ flex-wrap:wrap; overflow-x:visible; justify-content:center; }
}

/* ---------- 底部输入栏图标（PNG 替换 emoji，全局生效，聊天态一致） ---------- */
.icon-img{ width:24px; height:24px; display:block; object-fit:contain; }
.send{ display:flex; align-items:center; justify-content:center; }
/* send.png 自带紫色渐变圆，按钮去掉原背景/内边距，避免双层圆 */
#send.send{ background:transparent; padding:0; }
.send-img{ width:44px; height:44px; display:block; }
.send:disabled .send-img{ opacity:.5; }
