/* ==========================================================================
   豆子搜索 · 界面样式（豆包 PC 端风格 · 浅色主题）
   ========================================================================== */

:root {
  --brand: #4e6ef2;
  --brand-strong: #3a56d4;
  --brand-soft: #eef2ff;
  --brand-soft-2: #e4eaff;
  --bg: #ffffff;
  --bg-side: #f6f7fb;
  --bg-soft: #fafbfd;
  --line: #eaecf1;
  --line-strong: #dfe3ec;
  --text: #1c1f28;
  --text-2: #5c6475;
  --text-3: #9aa1b1;
  --ok: #12b76a;
  --warn: #f79009;
  --danger: #ef4444;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-1: 0 1px 2px rgba(20, 26, 45, .05), 0 4px 14px rgba(20, 26, 45, .05);
  --shadow-2: 0 2px 8px rgba(20, 26, 45, .06), 0 12px 36px rgba(20, 26, 45, .10);
  --sidebar-w: 264px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); text-decoration: none; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #d7dae3; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #c3c7d3; }
::-webkit-scrollbar-track { background: transparent; }

/* ------------------------------- 通用组件 ------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent;
  background: #fff; color: var(--text); cursor: pointer; font-weight: 500;
  transition: .16s; white-space: nowrap;
}
.btn:hover { background: var(--bg-soft); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-strong); }
.btn-ghost { border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--bg-soft); border-color: #cdd2de; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn-lg { height: 44px; padding: 0 22px; border-radius: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-danger { color: var(--danger); border-color: #f6c9c9; }
.btn-danger:hover { background: #fff5f5; }

.input, .select, .textarea {
  width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--line-strong);
  border-radius: 10px; background: #fff; outline: none; transition: .16s;
}
.textarea { height: auto; padding: 10px 12px; resize: vertical; min-height: 96px; line-height: 1.7; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(78, 110, 242, .12); }
.field { margin-bottom: 14px; }
.field > label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; font-weight: 500; }
.hint { font-size: 12px; color: var(--text-3); margin-top: 6px; }
.err { font-size: 12px; color: var(--danger); margin-top: 6px; }

.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; background: var(--bg-soft); border: 1px solid var(--line); color: var(--text-2); font-size: 12px; white-space: nowrap; }
.tag-brand { background: var(--brand-soft); border-color: var(--brand-soft-2); color: var(--brand-strong); }
.tag-ok { background: #e9faf1; border-color: #cdf2e0; color: #0e9f5e; }
.tag-warn { background: #fff7e8; border-color: #ffe6bf; color: #b26a00; }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.panel-title { font-size: 15px; font-weight: 600; margin: 0 0 14px; display: flex; align-items: center; justify-content: space-between; }
.muted { color: var(--text-3); }
.small { font-size: 12.5px; }
.divider { height: 1px; background: var(--line); margin: 16px 0; border: 0; }

/* ------------------------------- 登录 / 注册 ------------------------------- */
/* 两列都限宽：整组在屏幕水平居中；剩余宽度不再被某一列吃掉（间隙封顶不失控）。
   屏幕变窄时两列按各自上限等比收缩，任何分辨率都排得下、不溢出。 */
.auth-wrap {
  min-height: 100vh; display: grid;
  grid-template-columns: minmax(0, 500px) minmax(0, 420px);
  justify-content: center; align-items: center;
  column-gap: clamp(24px, 4vw, 72px);
  padding: 24px 20px;
  background: linear-gradient(140deg, #eef2ff 0%, #f7f9ff 45%, #ffffff 100%);
}
.auth-left { display: flex; flex-direction: column; justify-content: center; padding: 16px 0; min-width: 0; }
/* 屏幕足够高时左侧品牌区粘性固定（注册表单较长时仍居中可见） */
@media (min-height: 760px) {
  .auth-left { position: sticky; top: 0; height: 100vh; }
}
.auth-left > * { max-width: 560px; }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 34px; }
.auth-brand .logo { width: 42px; height: 42px; border-radius: 12px; overflow: hidden; }
.auth-brand .logo img, .side-brand .logo img, .welcome .logo-lg img { width: 100%; height: 100%; display: block; border-radius: inherit; }
.auth-brand b { font-size: 19px; }
.auth-h1 { font-size: 34px; line-height: 1.32; font-weight: 700; margin: 0 0 14px; letter-spacing: -.5px; }
.auth-h1 span { background: linear-gradient(100deg, #4e6ef2, #8a6bf0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-p { color: var(--text-2); font-size: 15px; max-width: 480px; }
.auth-feats { margin-top: 32px; display: grid; gap: 14px; max-width: 460px; }
.auth-feat { display: flex; gap: 12px; align-items: flex-start; }
.auth-feat .ic { width: 32px; height: 32px; border-radius: 9px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; font-size: 15px; flex: none; }
.auth-feat b { display: block; font-size: 14px; }
.auth-feat p { margin: 2px 0 0; font-size: 13px; color: var(--text-2); }
.auth-right { display: grid; place-items: center; padding: 24px 0; }
.auth-card { width: 100%; max-width: 396px; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 30px; box-shadow: var(--shadow-2); }
.auth-tabs { display: flex; gap: 4px; background: var(--bg-soft); padding: 4px; border-radius: 12px; margin-bottom: 22px; }
.auth-tabs button { flex: 1; height: 34px; border: 0; background: transparent; border-radius: 9px; cursor: pointer; color: var(--text-2); font-weight: 500; }
.auth-tabs button.on { background: #fff; color: var(--text); box-shadow: var(--shadow-1); }
.auth-foot { text-align: center; font-size: 12.5px; color: var(--text-3); margin-top: 16px; }
.demo-tip { margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-strong); font-size: 12.5px; line-height: 1.7; }

/* ------------------------------- 应用框架 ------------------------------- */
.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; height: 100vh; overflow: hidden; }
.sidebar { background: var(--bg-side); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.side-top { padding: 14px 14px 10px; }
.side-brand { display: flex; align-items: center; gap: 9px; padding: 4px 6px 12px; }
.side-brand .logo { width: 30px; height: 30px; border-radius: 9px; overflow: hidden; }
.side-brand b { font-size: 15.5px; letter-spacing: .2px; }
.new-chat { width: 100%; justify-content: flex-start; background: #fff; border: 1px solid var(--line-strong); font-weight: 500; }
.new-chat:hover { border-color: var(--brand); color: var(--brand); background: #fff; }
.side-nav { padding: 6px 10px 2px; display: grid; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; border-radius: 10px; cursor: pointer; color: var(--text-2); font-weight: 500; transition: .14s; }
.nav-item:hover { background: #fff; color: var(--text); }
.nav-item.on { background: #fff; color: var(--brand-strong); box-shadow: var(--shadow-1); }
.nav-item .ic { width: 18px; text-align: center; font-size: 15px; }
.nav-item .badge { margin-left: auto; font-size: 11px; background: var(--brand); color: #fff; border-radius: 20px; padding: 1px 7px; }

.side-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 10px; }
.side-label { font-size: 12px; color: var(--text-3); padding: 10px 8px 6px; font-weight: 500; }
.chat-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 9px; cursor: pointer; color: var(--text-2); font-size: 13.5px; }
.chat-item:hover { background: #fff; color: var(--text); }
.chat-item.on { background: #fff; color: var(--brand-strong); }
.chat-item .t { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-item .del { opacity: 0; font-size: 12px; color: var(--text-3); border: 0; background: none; cursor: pointer; }
.chat-item:hover .del { opacity: 1; }
.chat-item .del:hover { color: var(--danger); }

.side-bottom { padding: 10px 12px 14px; border-top: 1px solid var(--line); }
.credit-card { background: linear-gradient(135deg, #eef2ff, #f6f2ff); border: 1px solid var(--brand-soft-2); border-radius: 12px; padding: 12px; margin-bottom: 10px; }
.credit-card .row { display: flex; justify-content: space-between; align-items: baseline; }
.credit-card .num { font-size: 21px; font-weight: 700; color: var(--brand-strong); letter-spacing: -.4px; }
.credit-card .lbl { font-size: 12px; color: var(--text-2); }
.credit-card .sub { font-size: 12px; color: var(--text-2); margin-top: 4px; display: flex; justify-content: space-between; }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 8px; border-radius: 11px; cursor: pointer; }
.user-chip:hover { background: #fff; }
.avatar { width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(135deg, #7a90ff, #4e6ef2); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 13px; flex: none; }
.user-chip .u { flex: 1; min-width: 0; }
.user-chip .u b { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip .u span { font-size: 11.5px; color: var(--text-3); }

.main { min-width: 0; display: flex; flex-direction: column; height: 100vh; overflow: hidden; background: var(--bg); }
.topbar { height: 58px; flex: none; display: flex; align-items: center; gap: 14px; padding: 0 22px; border-bottom: 1px solid var(--line); }
.topbar h1 { font-size: 16px; margin: 0; font-weight: 600; }
.topbar .grow { flex: 1; }
.view { flex: 1; min-height: 0; overflow-y: auto; }
.view-pad { padding: 22px 26px 40px; max-width: 1280px; }

/* ------------------------------- AI 搜索 ------------------------------- */
.chat-wrap { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.chat-scroll { flex: 1; min-height: 0; overflow-y: auto; }
.chat-inner { max-width: 830px; margin: 0 auto; padding: 26px 24px 12px; }

.welcome { text-align: center; padding: 11vh 10px 30px; }
.welcome .logo-lg { width: 60px; height: 60px; border-radius: 18px; margin: 0 auto 18px; overflow: hidden; box-shadow: 0 10px 26px rgba(20, 36, 63, .22); }
.welcome .q-hi { display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 30px; margin: 0 0 12px; font-weight: 700; letter-spacing: -.4px; }
.q-hi .q-hi-ic { width: 36px; height: 36px; border-radius: 10px; box-shadow: 0 6px 18px rgba(20, 36, 63, .18); }
.welcome p { color: var(--text-3); font-size: 14px; margin: 0 0 30px; }
.chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 760px; margin: 0 auto; }
.chip { text-align: left; padding: 14px 16px; border: 1px solid var(--line); background: #fff; border-radius: 16px; cursor: pointer; transition: .16s; }
.chip:hover { border-color: var(--brand); box-shadow: var(--shadow-1); transform: translateY(-1px); }
.chip b { display: block; font-size: 13.8px; margin-bottom: 3px; }
.chip span { font-size: 12.5px; color: var(--text-3); }
/* 千问风：空态整体居中（标题 + 搜索框 + 滚动广告） */
.chat-wrap.hero { justify-content: center; }
.chat-wrap.hero .chat-scroll { flex: 0 0 auto; min-height: 0; }
.chat-wrap.hero .chat-inner { padding: 0 24px; }
.welcome.q-hero { padding: 0 10px 20px; }
/* 搜索框下方滚动广告（多帧轮播，左侧圆点，悬停暂停） */
.q-ads { max-width: 830px; margin: 12px auto 0; position: relative; }
.q-ads-viewport { overflow: hidden; border: 1px solid #e2e9ff; border-radius: 16px; background: linear-gradient(90deg, #edf2ff, #f8faff); }
.q-ads-track { display: flex; transition: transform .5s ease; }
.q-ad { flex: 0 0 100%; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 12px 16px; text-align: left; }
.q-ad .q-banner-btn { flex: none; }
.q-ads-dots { position: absolute; left: -22px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 6px; }
.q-ads-dots i { width: 6px; height: 6px; border-radius: 3px; background: #cdd6ea; cursor: pointer; transition: .2s; font-style: normal; }
.q-ads-dots i.on { height: 16px; background: var(--brand); }
.q-banner-ic { flex: none; width: 38px; height: 38px; display: grid; place-items: center; font-size: 19px; background: #fff; border-radius: 11px; box-shadow: 0 3px 10px rgba(78, 110, 242, .12); }
.q-banner-tx { flex: 1; min-width: 0; }
.q-banner-tx b { display: block; font-size: 14px; margin-bottom: 2px; }
.q-banner-tx span { font-size: 12.5px; color: var(--text-3); }
.q-banner-btn { flex: none; height: 34px; padding: 0 16px; border: 0; border-radius: 999px; background: #17181c; color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; transition: .16s; }
.q-banner-btn:hover { background: #2c2e36; }

.msg { display: flex; gap: 12px; margin-bottom: 22px; }
.msg .who { width: 32px; height: 32px; border-radius: 9px; flex: none; display: grid; place-items: center; font-size: 14px; font-weight: 600; }
.msg.user .who { background: #eef0f4; color: var(--text-2); }
.msg.bot .who { background: linear-gradient(135deg, #6c88ff, #3a56d4); color: #fff; }
.msg .body { flex: 1; min-width: 0; padding-top: 3px; }
.msg.user .body { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 11px 15px; }
.answer h2 { font-size: 15px; margin: 18px 0 8px; font-weight: 650; }
.answer h2:first-child { margin-top: 0; }
.answer p { margin: 8px 0; }
.answer ul { margin: 8px 0; padding-left: 20px; }
.answer li { margin: 5px 0; }
.answer table { border-collapse: collapse; width: 100%; margin: 10px 0; font-size: 13px; }
.answer th, .answer td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; }
.answer th { background: var(--bg-soft); font-weight: 600; color: var(--text-2); white-space: nowrap; }
.answer blockquote { margin: 10px 0; padding: 8px 12px; border-left: 3px solid var(--brand-soft-2); background: var(--bg-soft); color: var(--text-2); border-radius: 0 8px 8px 0; }
.answer code { background: var(--bg-soft); padding: 1px 5px; border-radius: 5px; font-size: 12.5px; }
.cursor::after { content: '▍'; color: var(--brand); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.sources { margin-top: 16px; border-top: 1px dashed var(--line-strong); padding-top: 12px; }
.sources .st { font-size: 12.5px; color: var(--text-3); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.src-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); gap: 9px; }
.src { border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; background: var(--bg-soft); cursor: pointer; transition: .16s; }
.src:hover { border-color: var(--brand); background: #fff; box-shadow: var(--shadow-1); }
.src .n { font-weight: 600; font-size: 13px; margin-bottom: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src .c { font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src .p { font-size: 12px; color: var(--brand-strong); margin-top: 5px; font-weight: 500; }
.toolbar-msg { display: flex; gap: 8px; margin-top: 10px; }

/* 全网搜索的网页来源卡片（外链，新窗口打开） */
.web-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); gap: 9px; }
.web-src { display: block; border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; background: var(--bg-soft); text-decoration: none; color: inherit; transition: .16s; }
.web-src:hover { border-color: var(--brand); background: #fff; box-shadow: var(--shadow-1); transform: translateY(-1px); }
.web-src .n { font-weight: 600; font-size: 13px; margin-bottom: 3px; display: flex; align-items: flex-start; gap: 6px; line-height: 1.45; }
.web-src .n i { flex: none; font-style: normal; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 6px; background: var(--brand-soft); color: var(--brand-strong); font-size: 11px; line-height: 18px; text-align: center; font-weight: 600; margin-top: 1px; }
.web-src .c { font-size: 11.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.web-src .s { font-size: 12px; color: var(--text-2); margin-top: 4px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* 「添加模型」弹窗（类 WorkBuddy 模型接入面板，OpenAI 兼容协议） */
.ai-modal-mask { position: fixed; inset: 0; background: rgba(15,20,40,.45); z-index: 320; display: grid; place-items: center; animation: fadeIn .14s ease; }
.ai-modal { width: min(440px, calc(100vw - 32px)); background: #fff; border-radius: 16px; box-shadow: 0 18px 60px rgba(15,20,40,.28); padding: 20px 22px 16px; animation: popIn .16s ease; }
.ai-modal .am-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.ai-modal .am-head b { font-size: 16.5px; }
.ai-modal .am-x { border: 0; background: transparent; font-size: 15px; color: var(--text-3); cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.ai-modal .am-x:hover { background: var(--bg-soft); color: var(--text-1); }
.ai-modal .am-sub { font-size: 12.5px; color: var(--text-2); margin: 12px 0 6px; }
.ai-modal .am-keyrow { display: flex; gap: 8px; }
.ai-modal .am-keyrow .input { flex: 1; min-width: 0; }
.ai-modal .input, .ai-modal .select { width: 100%; height: 38px; border: 1px solid var(--line-strong); border-radius: 10px; padding: 0 12px; font-size: 13.5px; outline: none; background: #fff; box-sizing: border-box; }
.ai-modal .input:focus, .ai-modal .select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(78,110,242,.12); }
.ai-modal .btn { height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-strong); background: #fff; cursor: pointer; font-size: 13px; white-space: nowrap; }
.ai-modal .btn:hover { border-color: var(--brand); color: var(--brand-strong); }
.ai-modal .btn:disabled { opacity: .55; cursor: not-allowed; }
.ai-modal .btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.ai-modal .btn.primary:hover { filter: brightness(1.06); color: #fff; }
.ai-modal .am-hint { min-height: 18px; font-size: 12px; margin-top: 8px; }
.ai-modal .am-hint.ok { color: #16a34a; }
.ai-modal .am-hint.err { color: #dc2626; }.ai-modal .am-check { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-2); margin-top: 12px; cursor: pointer; }
.ai-modal .am-check input { width: 15px; height: 15px; accent-color: var(--brand); }
.web-tip { margin-top: 10px; padding: 9px 11px; font-size: 12px; line-height: 1.6; color: #92570a; background: #fff7e6; border: 1px solid #ffd591; border-radius: 9px; }
.ai-modal .am-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
@keyframes popIn { from { transform: scale(.96) translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }

/* 模型菜单里的用途说明 */
.model-note { padding: 7px 12px 2px; font-size: 11px; color: var(--text-3); line-height: 1.5; }

/* AI 搜索词分析弹窗（采集后台） */
.ai-modal.kw-box { width: min(680px, calc(100vw - 32px)); max-height: calc(100vh - 80px); display: flex; flex-direction: column; }
.kw-list { flex: 1; min-height: 0; overflow-y: auto; margin: 4px -4px 0; padding: 0 4px; }
.kw-prod { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.kw-prod-hd { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.kw-prod-hd b { font-size: 13.5px; }
.kw-prod-hd .sub { font-size: 11.5px; color: var(--text-3); }
.kw-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.kw-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; font-size: 12px; background: #eef2ff; color: #3b4fd8; border: 1px solid #c9d4fb; border-radius: 999px; cursor: default; }
.kw-chip i { font-style: normal; color: #8b96d8; cursor: pointer; font-size: 13px; line-height: 1; }
.kw-chip i:hover { color: #b3261e; }
.kw-chip.kw-old { background: var(--bg-soft); color: var(--text-3); border-color: var(--line); }
.kw-addrow { display: flex; gap: 8px; margin-top: 8px; }
.kw-addrow .input { flex: 1; min-width: 0; height: 32px; font-size: 12.5px; }
.kw-addrow .btn { height: 32px; padding: 0 12px; }
.kw-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
/* 产品搜索场景文字输入框（企业后台 panel / 总后台 pf-card 共用） */
.kw-scenes { width: 100%; resize: vertical; border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 12px; font-size: 13px; line-height: 1.8; color: var(--text-1); background: #fff; font-family: inherit; }
.kw-scenes:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(78,110,242,.10); }
.kw-scenes::placeholder { color: var(--text-3); }

.composer-wrap { flex: none; padding: 10px 24px 18px; background: linear-gradient(180deg, rgba(255,255,255,0), #fff 26%); }
.composer { max-width: 830px; margin: 0 auto; border: 1px solid var(--line-strong); border-radius: 24px; background: #fff; box-shadow: 0 4px 24px rgba(15, 20, 40, .06); padding: 14px 16px 10px; transition: .16s; }
.composer:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(78,110,242,.10); }
.composer textarea { border: 0; outline: none; width: 100%; resize: none; max-height: 168px; min-height: 27px; line-height: 1.7; font-size: 15px; padding: 2px 2px 10px; }
.composer .cb-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 2px; }
.cb-left { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; min-width: 0; }
.cb-right { display: flex; align-items: center; gap: 4px; flex: none; }
/* 千问风工具条：无边框幽灵药丸，选中态浅蓝底 */
.switch { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 10px; border: 0; font-size: 13px; color: var(--text-2); cursor: pointer; user-select: none; background: transparent; transition: .15s; }
.switch:hover { background: var(--bg-soft); }
.switch.on { color: var(--brand-strong); background: var(--brand-soft); }
.send { margin-left: auto; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; cursor: pointer; display: grid; place-items: center; transition: .16s; box-shadow: 0 2px 8px rgba(78,110,242,.35); }
.send:hover { filter: brightness(1.06); transform: translateY(-1px); }
.send:disabled { background: #dfe3ec; color: #fff; cursor: not-allowed; box-shadow: none; }
.composer-foot { text-align: center; font-size: 11.5px; color: var(--text-3); margin-top: 8px; }

/* 「留言」按钮：已并入输入框工具栏（千问风幽灵按钮） */
.dm-entry { display: flex; justify-content: flex-end; align-items: center; gap: 8px; max-width: 830px; margin: 0 auto 6px; padding: 0 4px; }
.dm-entry-btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 10px; border: 0; background: transparent; color: var(--text-2); font-size: 13px; font-weight: 500; cursor: pointer; position: relative; transition: .15s; }
.dm-entry-btn:hover { background: var(--brand-soft); color: var(--brand-strong); }
.dm-entry-ic { font-size: 15px; }
.dm-entry-badge { position: absolute; top: -6px; right: -6px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #ff4d4f; color: #fff; font-size: 11px; font-style: normal; line-height: 17px; text-align: center; box-shadow: 0 0 0 2px #fff; }

/* 「＋ 新任务」：已并入输入框工具栏左侧（类千问「＋」入口），幽灵按钮 */
.task-new { position: relative; }
.task-new-btn { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; border-radius: 10px; border: 0; background: transparent; color: var(--text-2); font-size: 13px; font-weight: 500; cursor: pointer; transition: .15s; }
.task-new-btn:hover { color: var(--brand-strong); background: var(--brand-soft); }
.task-new-ic { font-size: 14px; line-height: 1; }
.task-new-menu { position: absolute; left: 0; bottom: calc(100% + 8px); width: 264px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 44px rgba(15, 20, 40, .18); padding: 8px; z-index: 60; animation: popIn .14s ease; }
.task-new-item { display: block; width: 100%; text-align: left; border: 0; background: transparent; border-radius: 10px; padding: 9px 10px; cursor: pointer; }
.task-new-item:hover { background: var(--bg-soft); }
.task-new-item b { display: block; font-size: 13.5px; color: var(--text-1); margin-bottom: 2px; }
.task-new-item small { display: block; font-size: 12px; color: var(--text-3); line-height: 1.5; }
.task-new-note { margin-top: 4px; padding: 8px 10px 4px; border-top: 1px dashed var(--line); font-size: 11.5px; color: var(--text-3); line-height: 1.6; }

/* 合并检索消息：上方「全网解读」+ 下方「企业推荐」两大分区 */
.mix-sec { margin-top: 14px; }
.mix-sec:first-child { margin-top: 0; }
.mix-hd { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; font-size: 14.5px; font-weight: 700; color: var(--text-1); margin-bottom: 8px; }
.mix-sub { font-size: 11.5px; font-weight: 400; color: var(--text-3); }
.mix-web .mix-hd { color: #0b6bcb; }
.mix-kb .mix-hd { color: var(--brand-strong); }
.mix-kb-note { margin-top: 12px; padding: 9px 12px; border-radius: 10px; background: var(--bg-soft); border: 1px dashed var(--line-strong); font-size: 12.5px; color: var(--text-2); line-height: 1.7; }
.mix-web-tip { margin-top: 10px; }

/* 来源卡上的地域徽标（同城 / 同省，按检索用户 IP） */
.src .rt { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 6px; font-size: 11px; font-weight: 600; line-height: 17px; vertical-align: 1px; }
.src .rt.city { background: #ffece4; color: #d4380d; }
.src .rt.prov { background: #e6f4ff; color: #0958d9; }

/* 搜索框右侧「语音输入」按钮（类 WorkBuddy 模型界面） */
/* 话筒按钮：描边圆形 + 深灰话筒图标（图5 设计稿，类 WorkBuddy） */
.mic-btn { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-strong); background: #fff; color: var(--text-2); cursor: pointer; display: grid; place-items: center; transition: .16s; }
.mic-btn:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); transform: translateY(-1px); }
.mic-btn:active { transform: translateY(0); }
.mic-btn.listening { color: #ff4d4f; border-color: #ff4d4f; background: #fff1f0; animation: micPulse 1.1s ease-in-out infinite; }
@keyframes micPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 77, 79, .40); } 50% { box-shadow: 0 0 0 7px rgba(255, 77, 79, 0); } }
.mic-btn.mic-unsupported { color: #b9c0cc; border-color: #e3e7ee; background: #f6f8fb; cursor: not-allowed; }
/* --------------------- 模型插件（类 WorkBuddy「Hy3 ▾」） --------------------- */
.model-pick { position: relative; margin-left: 0; }
.composer .cb-bottom .send { margin-left: 0; }
.model-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 9px; border: 0; background: transparent; color: var(--text-2); font-size: 13px; font-weight: 600; cursor: pointer; transition: .15s; white-space: nowrap; }
.model-btn:hover { background: var(--bg-soft); color: var(--text); }
.model-btn svg { display: block; }
.model-menu { position: absolute; bottom: calc(100% + 8px); right: 0; min-width: 224px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-2); padding: 6px; z-index: 60; }
.model-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 8px 10px; border: 0; background: transparent; border-radius: 8px; font-size: 13px; color: var(--text); cursor: pointer; text-align: left; }
.model-item:hover { background: var(--bg-soft); }
.model-item.on { color: var(--brand-strong); background: var(--brand-soft); }
.model-item.disabled { color: var(--text-3); cursor: not-allowed; }
.model-item-name { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.model-item-name small { font-size: 11px; color: var(--text-3); font-weight: 400; }
.model-item.on .model-item-name small { color: var(--brand-strong); }
.model-soon { flex: none; font-style: normal; font-size: 11px; color: #d48806; background: #fff7e6; border: 1px solid #ffd591; border-radius: 6px; padding: 0 5px; line-height: 16px; }
.model-add { padding: 8px 10px 4px; margin-top: 3px; border-top: 1px solid var(--line); font-size: 12px; color: var(--text-3); cursor: pointer; }
.model-search { padding: 4px 10px 8px; font-size: 12px; color: var(--text-2); cursor: pointer; }
.model-search:hover { color: var(--brand-strong); }
.model-add:hover { color: var(--brand-strong); }
.mic-btn-sm { width: 32px; height: 32px; }
.mic-btn-sm svg { width: 15px; height: 15px; }
.search-with-mic { display: flex; align-items: center; position: relative; }
.search-with-mic .input { flex: 1; padding-right: 44px; }
.search-with-mic .mic-btn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; width: 30px; height: 30px; }
.search-with-mic .mic-btn:hover { transform: translateY(-50%); background: var(--brand-soft); }

/* ------------------------------- 数据市场 ------------------------------- */
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar .search { position: relative; flex: 1; min-width: 240px; max-width: 460px; }
.toolbar .search .input { padding-left: 34px; }
.toolbar .search::before { content: '🔍'; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 13px; opacity: .6; }
.filters { display: flex; gap: 7px; flex-wrap: wrap; }
.pill { height: 32px; padding: 0 13px; border-radius: 20px; border: 1px solid var(--line-strong); background: #fff; cursor: pointer; font-size: 13px; color: var(--text-2); }
.pill:hover { border-color: var(--brand); color: var(--brand); }
.pill.on { background: var(--brand); border-color: var(--brand); color: #fff; }

.grid-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(288px, 1fr)); gap: 14px; }
.pcard { border: 1px solid var(--line); border-radius: var(--radius); padding: 15px; background: #fff; transition: .16s; display: flex; flex-direction: column; }
.pcard:hover { border-color: var(--brand-soft-2); box-shadow: var(--shadow-1); transform: translateY(-2px); }
.pcard .ph { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 9px; }
.pcard .ph b { font-size: 14.5px; line-height: 1.45; flex: 1; }
.pcard .co { font-size: 12.5px; color: var(--text-2); display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.pcard .spec { font-size: 12.5px; color: var(--text-2); background: var(--bg-soft); border-radius: 8px; padding: 7px 9px; margin-bottom: 9px; line-height: 1.6; }
.pcard .pf { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: 10px; border-top: 1px dashed var(--line); }
.pcard .price { font-size: 16px; font-weight: 700; color: #e5484d; }
.pcard .tags { display: flex; gap: 4px; flex-wrap: wrap; }
/* 产品图片：卡片封面 / 详情大图 / 列表缩略图 */
.pcard .pimg { height: 150px; background: var(--bg-soft); border-radius: 10px; overflow: hidden; display: grid; place-items: center; margin-bottom: 10px; }
.pcard .pimg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pcard .pimg .muted { font-size: 12px; }
.pd-hero { max-height: 260px; border-radius: var(--radius); overflow: hidden; background: var(--bg-soft); display: grid; place-items: center; margin-bottom: 14px; }
.pd-hero img { max-width: 100%; max-height: 260px; object-fit: contain; display: block; }
.pd-thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); background: var(--bg-soft); display: block; }

/* ------------------------------- 数据分析 ------------------------------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 16px; background: linear-gradient(160deg, #fff, var(--bg-soft)); }
.stat .k { font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; }
.stat .v { font-size: 25px; font-weight: 700; letter-spacing: -.6px; }
.stat .v.b { color: var(--brand-strong); }
.stat .v.r { color: #e5484d; }
.stat .d { font-size: 12px; color: var(--text-3); margin-top: 3px; }

.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 130px 1fr 74px; gap: 10px; align-items: center; font-size: 13px; }
.bar-row .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.bar-track { height: 22px; background: var(--bg-soft); border-radius: 6px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, #6c88ff, #4e6ef2); border-radius: 6px; transition: width .5s ease; }
.bar-fill.g2 { background: linear-gradient(90deg, #7bd6a8, #12b76a); }
.bar-fill.g3 { background: linear-gradient(90deg, #ffc46b, #f79009); }
.bar-row .vl { text-align: right; font-weight: 600; color: var(--text); font-size: 12.5px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th, table.data td { padding: 10px 13px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { background: var(--bg-soft); font-weight: 600; color: var(--text-2); white-space: nowrap; font-size: 12.5px; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover td { background: #fcfcfe; }
table.data td.wrap { max-width: 340px; }

/* ------------------------------- 管理后台 ------------------------------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tab { height: 40px; padding: 0 15px; border: 0; background: none; cursor: pointer; color: var(--text-2); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--brand); border-bottom-color: var(--brand); }

.scan-log { background: #101827; color: #b9c6e0; border-radius: 12px; padding: 13px 15px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; line-height: 1.85; max-height: 190px; overflow-y: auto; }
.scan-log .ok { color: #64d39a; }
.scan-log .warn { color: #f5c451; }
.scan-log .k { color: #7fb0ff; }

.empty { text-align: center; padding: 54px 20px; color: var(--text-3); }
.empty .ic { font-size: 34px; margin-bottom: 12px; opacity: .8; }
.empty b { display: block; color: var(--text-2); font-size: 14.5px; margin-bottom: 6px; }

/* ------------------------------- 弹层 / 提示 ------------------------------- */
.modal-mask { position: fixed; inset: 0; background: rgba(16, 22, 38, .42); display: grid; place-items: center; z-index: 90; padding: 24px; backdrop-filter: blur(2px); }
.modal { background: #fff; border-radius: 18px; width: 100%; max-width: 620px; max-height: 88vh; overflow-y: auto; box-shadow: var(--shadow-2); }
.modal-hd { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; border-radius: 18px 18px 0 0; }
.modal-hd b { font-size: 16px; }
.modal-bd { padding: 20px 22px; }
.modal-ft { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; position: sticky; bottom: 0; background: #fff; border-radius: 0 0 18px 18px; }
.x { border: 0; background: none; font-size: 19px; color: var(--text-3); cursor: pointer; line-height: 1; }
.x:hover { color: var(--text); }

.toasts { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; justify-items: center; }
.toast { background: #1c1f28; color: #fff; padding: 10px 18px; border-radius: 11px; font-size: 13.5px; box-shadow: var(--shadow-2); animation: pop .22s ease; max-width: 620px; }
.toast.ok { background: #0f9d58; }
.toast.err { background: #d93a3a; }
@keyframes pop { from { opacity: 0; transform: translateY(-8px); } }

.kv { display: grid; grid-template-columns: 116px 1fr; gap: 8px 14px; font-size: 13px; }
.kv .k { color: var(--text-3); }
.row-flex { display: flex; gap: 12px; flex-wrap: wrap; }
.row-flex > * { flex: 1; min-width: 190px; }

/* 登录页「记住账号密码」勾选行 */
.remember-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: -2px 0 10px; font-size: 13px; color: var(--text-2); cursor: pointer; user-select: none;
}
.remember-row input[type="checkbox"] {
  width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; margin: 0; flex: 0 0 auto;
}
.remember-row .rm-clear {
  margin-left: auto; background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--text-3); font-size: 12px; text-decoration: underline;
}
.remember-row .rm-clear:hover { color: var(--text-1); }

/* ============ 数据评价 & 图片素材（企业端「数据评价」页 + 答案下方评价条） ============ */
.page-head { margin-bottom: 16px; }
.page-title { font-size: 20px; font-weight: 600; margin: 0 0 6px; }
.page-desc { font-size: 13px; color: var(--text-2); margin: 0; line-height: 1.6; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.kpi .k { font-size: 12px; color: var(--text-3); }
.kpi .v { font-size: 22px; font-weight: 600; color: var(--text-1); }
.kpi .s { font-size: 12px; color: var(--text-3); }
.chips-row { display: flex; flex-wrap: wrap; gap: 8px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

.rate-bar { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: var(--radius-sm); background: var(--bg-soft); }
.rate-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.rate-t { font-size: 13px; font-weight: 500; }
.rate-now { font-size: 12px; color: var(--text-3); }
.rate-stars { display: flex; align-items: center; gap: 4px; margin: 8px 0 6px; }
.rate-stars .star { background: none; border: 0; padding: 0 2px; font-size: 22px; line-height: 1; color: #d8dbe4; cursor: pointer; }
.rate-stars .star.on { color: #f5a623; }
.rate-score { font-size: 12px; color: var(--text-3); margin-left: 6px; }
.rate-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.rate-tag { font-size: 12px; padding: 3px 10px; border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; color: var(--text-2); cursor: pointer; }
.rate-tag.on { border-color: var(--brand); color: var(--brand-strong); background: var(--brand-soft); }
.rate-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.rate-cmt { flex: 1; min-width: 200px; font-size: 13px; }
.rate-done { font-size: 13px; color: var(--brand-strong); background: var(--brand-soft); border-radius: var(--radius-sm); padding: 8px 10px; }

.rate-item { border-top: 1px solid var(--line); padding: 10px 0; }
.rate-item:first-child { border-top: 0; }
.ri-hd { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ri-star { color: #f5a623; letter-spacing: 1px; }
.rate-dist { display: flex; flex-direction: column; gap: 6px; }
.rd-row { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-2); }
.rd-k { width: 34px; flex: 0 0 auto; }
.rd-bar { flex: 1; height: 8px; background: var(--brand-soft); border-radius: 999px; overflow: hidden; }
.rd-bar i { display: block; height: 100%; background: #f5a623; }
.rd-n { width: 52px; text-align: right; flex: 0 0 auto; color: var(--text-3); }

.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.asset-card { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: #fff; }
.asset-img { height: 120px; background: var(--bg-soft); display: grid; place-items: center; overflow: hidden; }
.asset-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.asset-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 8px 10px 4px; }
.asset-ops { display: flex; gap: 6px; padding: 0 10px 10px; flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; } .mb16 { margin-bottom: 16px; } .mb20 { margin-bottom: 20px; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.hidden { display: none !important; }

/* ---- 分辨率自适应：登录页按屏幕宽/高分档自动排版 ---- */
/* 中档（小笔记本 / 系统 125% 缩放）：双栏保留，压缩字号与留白 */
@media (max-width: 1280px) {
  .auth-wrap { grid-template-columns: minmax(0, 430px) minmax(0, 380px); column-gap: clamp(20px, 3vw, 44px); }
  .auth-brand { margin-bottom: 20px; }
  .auth-h1 { font-size: 27px; margin-bottom: 10px; }
  .auth-p { font-size: 14px; }
  .auth-feats { margin-top: 20px; gap: 9px; }
  .auth-feat .ic { width: 28px; height: 28px; font-size: 13px; border-radius: 8px; }
  .auth-feat b { font-size: 13px; }
  .auth-feat p { font-size: 12px; }
  .auth-card { max-width: 400px; padding: 24px; border-radius: 16px; }
  .auth-tabs { margin-bottom: 16px; }
}
/* 低高度屏（如 1366×768，去掉浏览器工具栏后可视区更小）：再压纵向空间 */
@media (max-height: 780px) and (min-width: 961px) {
  .auth-wrap { padding: 10px 16px; }
  .auth-left { padding: 6px 0; }
  .auth-brand { margin-bottom: 12px; }
  .auth-brand .logo { width: 34px; height: 34px; }
  .auth-brand b { font-size: 16px; }
  .auth-h1 { font-size: 23px; margin-bottom: 8px; }
  .auth-feats { margin-top: 14px; gap: 7px; }
  .auth-card { padding: 18px 20px; }
  .auth-tabs { margin-bottom: 12px; }
  .auth-tabs button { height: 30px; }
}
/* 窄屏：只显示登录卡（原有行为，断点从 1080 降到 960，笔记本仍可见品牌区） */
@media (max-width: 960px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-left { display: none; }
}
@media (max-width: 860px) {
  :root { --sidebar-w: 0px; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 268px; z-index: 80; transform: translateX(-100%); transition: .2s; }
  .sidebar.open { transform: none; box-shadow: var(--shadow-2); }
  .shell { grid-template-columns: 1fr; }
  .chips { grid-template-columns: 1fr; }
  .q-hi { font-size: 24px; gap: 9px; }
  .q-hi .q-hi-ic { width: 28px; height: 28px; border-radius: 8px; }
  .q-ads-dots { display: none; }
  .q-ad { flex-wrap: wrap; }
  .composer .cb-bottom { flex-wrap: wrap; }
}

/* ---------------------- 营业执照上传（企业注册） ---------------------- */
.lic-drop {
  border: 1.5px dashed var(--line-strong); border-radius: 12px; background: var(--bg-soft);
  padding: 14px; text-align: center; cursor: pointer; transition: .15s; line-height: 1.6;
}
.lic-drop:hover, .lic-drop.over { border-color: var(--brand); background: var(--brand-soft); }
.lic-drop .ic { font-size: 22px; }
.lic-drop b { font-size: 13px; }
.lic-drop .small { font-size: 12px; color: var(--text-3); }
.lic-preview { display: flex; gap: 12px; align-items: flex-start; }
.lic-preview img {
  width: 132px; height: 96px; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; cursor: zoom-in;
}
.lic-preview .lic-meta { flex: 1; min-width: 0; font-size: 12.5px; color: var(--text-2); line-height: 1.7; }
.lic-ocr { margin-top: 8px; font-size: 12.5px; border-radius: 10px; padding: 8px 10px; line-height: 1.7; }
.lic-ocr.ok { background: #ecfdf3; color: #067647; }
.lic-ocr.err { background: #fef3f2; color: #b42318; }
.lic-ocr.wait { background: var(--brand-soft); color: var(--brand-strong); }
.lic-fields { margin: 6px 0 0; font-size: 12.5px; color: var(--text-2); line-height: 1.8; }
.lic-fields b { color: var(--text); font-weight: 600; }
.req { color: var(--danger); }

/* 营业执照卡片（企业概况 / 总后台企业详情） */
.lic-big {
  width: 100%; max-width: 360px; border-radius: 10px; border: 1px solid var(--line);
  cursor: zoom-in; display: block; background: #fff;
}
.lic-big.zoom { max-width: 100%; width: 100%; cursor: zoom-out; }
.lic-kv { margin-top: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; }
.lic-kv > div { display: flex; gap: 8px; font-size: 12.5px; line-height: 1.7; min-width: 0; }
.lic-kv > div > span { color: var(--text-3); white-space: nowrap; }
.lic-kv > div > b { color: var(--text); font-weight: 600; word-break: break-all; }

/* ---------------------- 本地服务提示条（boot.js） ---------------------- */
.svc-tip {
  background: #fff7e6; border-bottom: 1px solid #f0d49a; color: #7a4d00;
  font-size: 13px; line-height: 1.7;
}
.svc-tip-in { max-width: 1180px; margin: 0 auto; padding: 10px 16px; display: flex; gap: 10px; align-items: flex-start; }
.svc-tip-ic {
  flex: none; width: 20px; height: 20px; border-radius: 50%; background: #f0a500; color: #fff;
  font-weight: 700; text-align: center; line-height: 20px; font-size: 13px; margin-top: 1px;
}
.svc-tip-txt { flex: 1; min-width: 0; }
.svc-tip-txt b { font-size: 13.5px; }
.svc-tip-sub { color: #8a6520; margin-top: 2px; }
.svc-tip-txt code {
  background: rgba(0,0,0,.07); padding: 1px 5px; border-radius: 4px;
  font-size: 12.5px; font-family: ui-monospace, Consolas, monospace;
}
/* 桥接成功绿条（虚拟主机 + 本机服务在跑） */
.svc-tip-ok { background: #ecfaf0; border-bottom-color: #b6e2c3; color: #1d6b38; }
.svc-tip-ok .svc-tip-ic-ok { background: #2fa45c; }
.svc-tip-ok .svc-tip-sub { color: #3f8558; }
.svc-tip-ok .svc-tip-txt code { background: rgba(0,0,0,.06); }
.svc-tip-help {
  margin: 8px 0 4px; padding: 8px 12px; background: rgba(255,255,255,.8);
  border-radius: 8px; border: 1px solid #f0d49a;
}
.svc-tip-help ol { margin: 0 0 4px; padding-left: 20px; }
.svc-tip-help li { margin: 2px 0; }
.svc-tip-acts { flex: none; display: flex; gap: 6px; align-items: center; }
.svc-tip-x {
  border: 0; background: transparent; color: #a9822f; font-size: 18px; line-height: 1;
  cursor: pointer; padding: 2px 4px;
}
.svc-tip-x:hover { color: #7a4d00; }
.svc-tip.shake { animation: svcShake .4s; }
@keyframes svcShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}
@media (max-width: 720px) {
  .svc-tip-in { flex-wrap: wrap; }
  .svc-tip-acts { width: 100%; justify-content: flex-end; }
}

/* ---------------------- 账户管理（子账户 / 权限 / 算力额度） ---------------------- */
.quota-bar {
  height: 6px; border-radius: 99px; background: var(--bg-soft);
  border: 1px solid var(--line); margin: 5px 0 3px; overflow: hidden;
}
.quota-bar > i {
  display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-strong));
}
.perm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 620px) { .perm-grid { grid-template-columns: 1fr; } }
.perm-item {
  display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer;
  font-size: 12.5px; line-height: 1.5;
}
.perm-item:hover { border-color: var(--brand); }
.perm-item input { margin-top: 2px; flex: none; }
.perm-item > span { min-width: 0; }
.perm-item b { display: block; font-size: 13px; color: var(--text); font-weight: 600; }
.perm-item i { font-style: normal; color: var(--text-3); }

/* ---------------------- 吉祥物「豆子」 ---------------------- */
.mascot-root {
  position: fixed; left: 22px; top: 47%; transform: translateY(-50%);
  width: 138px; z-index: 60; user-select: none; pointer-events: none;
  /* 由 JS 根据光标写入：眼睛位移 --ex/--ey，机身倾斜 --bx/--by/--br，天线 --ax */
  --ex: 0px; --ey: 0px; --bx: 0px; --by: 0px; --br: 0deg; --ax: 0px;
}
/* 拖动后就地定位，不再垂直居中 */
.mascot-root.dragged { transform: none; }
/* 宽屏才展示（左侧留白区域足够大时不遮挡内容） */
@media (min-width: 1280px) { .mascot-root { pointer-events: auto; } }
@media (max-width: 1279px) { .mascot-root { display: none; } }

.mascot-root .m-stage {
  position: relative; cursor: pointer; touch-action: none;
  transition: transform .18s;
  filter: drop-shadow(0 22px 30px rgba(8,16,38,.30)) drop-shadow(0 4px 10px rgba(0,180,255,.14));
}
.mascot-root .m-stage:hover { transform: scale(1.05); }
.mascot-root .m-stage:active { transform: scale(.97); }
.mascot-root.dragged .m-stage { cursor: move; }
.mascot-root.dragging .m-stage { transition: none; cursor: grabbing; }
.mascot-root.happy .m-stage { animation: mHappy .5s cubic-bezier(.34,1.56,.64,1); }
@keyframes mHappy {
  0% { transform: scale(1); }
  45% { transform: scale(1.12) rotate(-3deg); }
  100% { transform: scale(1); }
}
.mascot-root svg { width: 100%; display: block; overflow: visible; }

/* 机身随光标倾斜（外层，与漂浮动画解耦） */
.m-look {
  transform-box: fill-box; transform-origin: 50% 96%;
  transform: translate(var(--bx), var(--by)) rotate(var(--br));
  transition: transform .18s ease-out;
}
/* 整体悬浮 */
.m-bob { animation: mBob 3.6s ease-in-out infinite; }
@keyframes mBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}
/* 落地投影 / 影子 / 地表光环随悬浮呼吸 */
.m-drop { transform-box: fill-box; transform-origin: center; animation: mDrop 3.6s ease-in-out infinite; }
@keyframes mDrop {
  0%, 100% { transform: scale(1); opacity: .34; }
  50% { transform: scale(.9); opacity: .26; }
}
.m-shadow { transform-box: fill-box; transform-origin: center; animation: mShadow 3.6s ease-in-out infinite; }
@keyframes mShadow {
  0%, 100% { transform: scale(1); opacity: .20; }
  50% { transform: scale(.85); opacity: .12; }
}
.m-floor { transform-box: fill-box; transform-origin: center; animation: mFloor 3.6s ease-in-out infinite; }
@keyframes mFloor {
  0%, 100% { transform: scale(1); opacity: .9; }
  50% { transform: scale(.88); opacity: .65; }
}

/* ===== 3D 体感增强 ===== */
/* 身后青色大气泡：缓慢呼吸（与官网首屏大圆同语言） */
.m-aura { transform-box: fill-box; transform-origin: center; animation: mAura 5.2s ease-in-out infinite; }
@keyframes mAura {
  0%, 100% { transform: scale(1); opacity: .9; }
  50% { transform: scale(1.07) translateY(-4px); opacity: 1; }
}
/* 玻璃斜向扫光：在机身上往复滑过（釉面 3D 高光） */
.m-sheen { animation: mSheen 6.5s ease-in-out infinite; }
@keyframes mSheen {
  0%, 12% { transform: translateX(-96px); opacity: 0; }
  22% { opacity: 1; }
  46%, 100% { transform: translateX(228px); opacity: 0; }
}
/* 悬浮时轻微 3D 俯仰（配合 hover 放大，更像实体） */
.mascot-root .m-stage:hover { transform: scale(1.05) perspective(600px) rotateX(3deg); }

/* ===== 光眼：视线跟随 + 颜色循环 + 眨眼 ===== */
.m-eye-move { transform: translate(var(--ex), var(--ey)); transition: transform .12s linear; }
.m-eye-hue { animation: mHue 11s ease-in-out infinite; }
@keyframes mHue {
  0%, 100% { filter: hue-rotate(0deg); }
  30% { filter: hue-rotate(-18deg); }
  65% { filter: hue-rotate(16deg); }
}
.m-eye { transform-box: fill-box; transform-origin: center; animation: mBlink 4.4s infinite; }
@keyframes mBlink {
  0%, 90%, 96%, 100% { transform: scaleY(1); }
  93% { transform: scaleY(.1); }
}
/* 光晕外圈：青 → 紫 → 薄荷 循环，并带呼吸明暗 */
.m-eye-halo { animation: mHaloColor 7s ease-in-out infinite, mHaloPulse 2.6s ease-in-out infinite; }
@keyframes mHaloColor {
  0%, 100% { fill: #00e5ff; }
  33% { fill: #a86bff; }
  66% { fill: #00ffc6; }
}
@keyframes mHaloPulse {
  0%, 100% { opacity: .85; }
  50% { opacity: 1; }
}
/* 灯芯：与光晕错开相位，形成流动的色彩层次 */
.m-eye-core { animation: mCoreColor 7s ease-in-out infinite .9s; }
@keyframes mCoreColor {
  0%, 100% { fill: #d7fdff; }
  33% { fill: #f0d8ff; }
  66% { fill: #d4fff0; }
}
/* 说话时的声波灯条也参与变色（动画在下方统一声明） */
.m-bar { fill: #7ff4ff; }
/* 挥手 */
.m-arm-l { transform-box: fill-box; transform-origin: 82% 14%; animation: mWave 2.8s ease-in-out infinite; }
@keyframes mWave {
  0%, 100% { transform: rotate(4deg); }
  35% { transform: rotate(-40deg); }
  55% { transform: rotate(-12deg); }
  75% { transform: rotate(-32deg); }
}
/* 天线信号灯呼吸 */
.m-antenna { transform-box: fill-box; transform-origin: 50% 100%; transform: translateX(var(--ax)); animation: mAntenna 3.6s ease-in-out infinite; }
@keyframes mAntenna {
  0%, 100% { transform: translateX(var(--ax)) rotate(0deg); }
  50% { transform: translateX(var(--ax)) rotate(-5deg); }
}
/* 全息核心脉冲 */
.m-core { transform-box: fill-box; transform-origin: center; animation: mCore 2.4s ease-in-out infinite; }
@keyframes mCore {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.09); }
}
.m-core-txt { fill: #7ff4ff; animation: mCoreColor 6s ease-in-out infinite; }

/* 说话态：声波灯条（默认隐藏，说话时替换微笑） */
.m-eq { display: none; }
.mascot-root.talking .m-eq { display: block; }
.mascot-root.talking .m-mouth-smile { display: none; }
.m-bar { transform-box: fill-box; transform-origin: center; animation: mBar .34s ease-in-out infinite alternate, mCoreColor 4.2s ease-in-out infinite; }
.m-bar1 { animation-delay: 0s; }
.m-bar2 { animation-delay: .09s; }
.m-bar3 { animation-delay: .18s; }
.m-bar4 { animation-delay: .27s; }
@keyframes mBar {
  from { transform: scaleY(.35); opacity: .7; }
  to { transform: scaleY(1.9); opacity: 1; }
}
/* 悬浮粒子 */
.m-dot { transform-box: fill-box; animation: mDot 3.6s ease-in-out infinite; }
.m-dot2 { animation-delay: .9s; animation-duration: 4.2s; }
.m-dot3 { animation-delay: 1.7s; animation-duration: 4.8s; }
@keyframes mDot {
  0% { transform: translateY(6px); opacity: 0; }
  30% { opacity: .9; }
  100% { transform: translateY(-26px); opacity: 0; }
}

/* 全息对话气泡（科技风） */
.m-bubble {
  position: absolute; left: 116px; bottom: 128px; width: 254px;
  background: linear-gradient(160deg, rgba(18,26,46,.96), rgba(10,16,32,.96));
  border: 1.5px solid rgba(0,229,255,.45); border-radius: 14px 14px 14px 4px;
  padding: 10px 13px; font-size: 12.8px; line-height: 1.7; color: #e6f6ff;
  box-shadow: 0 10px 30px rgba(0,229,255,.18), inset 0 0 22px rgba(0,229,255,.07);
  backdrop-filter: blur(6px);
  opacity: 0; transform: translateY(8px) scale(.95); transition: .22s;
  pointer-events: none; min-height: 20px;
}
.m-bubble.show { opacity: 1; transform: none; }
.m-bubble:after {
  content: ''; position: absolute; left: -7px; bottom: 12px;
  width: 12px; height: 12px;
  background: rgba(14,21,39,.96);
  border-left: 1.5px solid rgba(0,229,255,.45); border-bottom: 1.5px solid rgba(0,229,255,.45);
  transform: rotate(45deg);
}
.m-bubble b { color: #4ff0ff; font-weight: 600; }

/* 拖到屏幕右半边时气泡翻到左侧，避免超出视口 */
.mascot-root.flip .m-bubble { left: auto; right: 116px; border-radius: 14px 14px 4px 14px; }
.mascot-root.flip .m-bubble:after {
  left: auto; right: -7px;
  border-left: 0; border-bottom: 0;
  border-right: 1.5px solid rgba(0,229,255,.45); border-top: 1.5px solid rgba(0,229,255,.45);
}

/* 语音开关 */
.m-voice {
  position: absolute; right: 2px; top: -4px; width: 30px; height: 30px;
  border-radius: 50%; border: 1px solid rgba(0,229,255,.45);
  background: linear-gradient(160deg, rgba(18,26,46,.96), rgba(10,16,32,.96));
  color: #7ff4ff; font-size: 14px; line-height: 1; cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,229,255,.20); transition: .15s;
  display: grid; place-items: center; padding: 0;
}
.m-voice:hover { border-color: #4ff0ff; box-shadow: 0 6px 22px rgba(0,229,255,.4); transform: scale(1.08); }
/* 试听按钮：叠在语音开关下方 */
.m-voice.m-vtest { top: 32px; font-size: 12px; }

/* ---------------- 客服中心 ---------------- */
.svc-hero { background: linear-gradient(120deg, #2f6bff, #5b8cff); color: #fff; border-radius: 16px; padding: 26px 28px; margin-bottom: 18px; }
.svc-hero h2 { margin: 0 0 6px; font-size: 22px; }
.svc-hero p { margin: 0; opacity: .92; font-size: 14px; }
.svc-sec { margin: 18px 0 10px; font-size: 15px; }
.svc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.svc-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; cursor: pointer; transition: box-shadow .15s, transform .15s; }
.svc-card:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
.svc-card .ic { font-size: 20px; }
.svc-card b { display: block; margin: 8px 0 4px; font-size: 14px; }
.svc-card p { margin: 0; font-size: 12.5px; color: var(--text-2); line-height: 1.6; }
.svc-faq-tabs { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.svc-faq-tabs button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 14px; font-size: 13px; cursor: pointer; color: var(--text-2); }
.svc-faq-tabs button.on { background: #4e6ef2; color: #fff; border-color: transparent; }
details.faq { border-bottom: 1px solid var(--line); padding: 10px 4px; }
details.faq:last-child { border-bottom: 0; }
details.faq summary { cursor: pointer; font-size: 14px; font-weight: 500; }
details.faq p { margin: 8px 0 2px; font-size: 13px; color: var(--text-2); line-height: 1.7; }
.svc-contact { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.svc-contact .box { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; align-items: center; gap: 12px; }
.svc-contact .ic { font-size: 22px; }
@media (max-width: 1100px) { .svc-grid { grid-template-columns: repeat(2, 1fr); } .svc-contact { grid-template-columns: 1fr; } }

/* ---------------- 分类标签 ---------------- */
.sol-list { display: grid; gap: 8px; }
.sol-item { font-size: 13px; color: var(--text); background: var(--bg-soft); border-radius: 8px; padding: 8px 12px; }
.lt-list { display: flex; flex-wrap: wrap; gap: 6px; max-height: 220px; overflow: auto; }
.lt-list .tag { font-size: 12px; }

/* ====================== 吉祥物「豆子」· 英雄升级形态 ======================
 * 触发方式：连续点击豆子 5 次，或控制台执行 Mascot.upgrade()
 * 升级后：背后披风飘动 + 左手能量刀 + 右手盾牌 + 英雄光效
 * 状态持久化在 localStorage（douzi.mascot.hero）
 * ====================================================================== */

/* ---- 升级态总开关：武器与披风默认不显示 ---- */
.mascot-root .m-cape,
.mascot-root .m-sword,
.mascot-root .m-shield,
.mascot-root .m-hero-ring { display: none; }

.mascot-root.hero .m-cape,
.mascot-root.hero .m-sword,
.mascot-root.hero .m-shield { display: block; }

/* ---- 披风：随风摆动（外摆 + 内衬错相，制造布料波动） ---- */
.m-cape {
  transform-box: fill-box; transform-origin: 72% 8%;
  animation: mCape 3.4s ease-in-out infinite;
}
@keyframes mCape {
  0%, 100% { transform: rotate(0deg) scaleX(1) skewX(0deg); }
  28%      { transform: rotate(-3.2deg) scaleX(1.045) skewX(1.6deg); }
  55%      { transform: rotate(1.8deg) scaleX(0.975) skewX(-1.3deg); }
  78%      { transform: rotate(-2.1deg) scaleX(1.03) skewX(1deg); }
}
.m-cape-inner {
  transform-box: fill-box; transform-origin: 72% 6%;
  animation: mCapeInner 4.1s ease-in-out infinite;
}
@keyframes mCapeInner {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  35%      { transform: translate(-1.6px, 1.2px) rotate(-1.8deg); }
  70%      { transform: translate(1.2px, -0.8px) rotate(1.4deg); }
}

/* ---- 刀：随手挥动，刀锋流光 ---- */
.m-sword {
  transform-box: fill-box; transform-origin: 78% 92%;
  animation: mSword 3.4s ease-in-out infinite;
}
@keyframes mSword {
  0%, 100% { transform: rotate(0deg); }
  30%      { transform: rotate(-6deg); }
  62%      { transform: rotate(2.5deg); }
  85%      { transform: rotate(-3deg); }
}
/* 刀锋呼吸辉光 */
.mascot-root.hero .m-sword path:nth-of-type(1) {
  animation: mBladeGlow 2.1s ease-in-out infinite;
}
@keyframes mBladeGlow {
  0%, 100% { opacity: .32; }
  50%      { opacity: .72; }
}

/* ---- 盾牌：轻微前举 + 能量核脉冲 ---- */
.m-shield {
  transform-box: fill-box; transform-origin: 50% 90%;
  animation: mShieldIdle 3.4s ease-in-out infinite;
}
@keyframes mShieldIdle {
  0%, 100% { transform: translate(190px, 164px) rotate(0deg) scale(1.28); }
  50%      { transform: translate(190px, 164px) rotate(-2.4deg) scale(1.32); }
}
/* 盾心能量核 */
.mascot-root.hero .m-shield circle[fill^="url(#mShieldCore)"] {
  transform-box: fill-box; transform-origin: center;
  animation: mShieldCore 1.8s ease-in-out infinite;
}
@keyframes mShieldCore {
  0%, 100% { transform: scale(1); opacity: .85; }
  50%      { transform: scale(1.35); opacity: 1; }
}

/* ---- 升级瞬间：金光爆发 + 落地冲击波 ---- */
.mascot-root.hero-pop .m-stage { animation: mHeroPop .78s cubic-bezier(.26,1.5,.5,1); }
@keyframes mHeroPop {
  0%   { transform: scale(1); }
  32%  { transform: scale(1.24) rotate(-2.5deg); }
  58%  { transform: scale(.955) rotate(1.2deg); }
  100% { transform: scale(1); }
}
/* 升级光晕环 */
.mascot-root .m-hero-ring {
  position: absolute; left: 50%; top: 46%;
  width: 10px; height: 10px; margin: -5px 0 0 -5px;
  border-radius: 50%; pointer-events: none;
  border: 2px solid rgba(0,229,255,.9);
  box-shadow: 0 0 22px 6px rgba(0,229,255,.55), inset 0 0 22px rgba(0,229,255,.5);
}
.mascot-root.hero-pop .m-hero-ring { display: block; animation: mHeroRing .95s ease-out forwards; }
@keyframes mHeroRing {
  0%   { transform: scale(.4); opacity: 1; }
  70%  { opacity: .55; }
  100% { transform: scale(26); opacity: 0; }
}

/* ---- 升级后：机身常驻英雄光环 + 眼睛更亮 ---- */
.mascot-root.hero .m-stage { filter: drop-shadow(0 18px 26px rgba(20,32,60,.22)) drop-shadow(0 0 16px rgba(0,229,255,.35)); }
.mascot-root.hero .m-eye-halo { animation-duration: 4.5s, 1.5s; }
.mascot-root.hero .m-core { animation-duration: 1.5s; }

/* ---- 战斗形态：点击时挥刀 ---- */
.mascot-root.hero.happy .m-stage { animation: mHeroPop .6s cubic-bezier(.34,1.56,.64,1); }

/* ---- 移动端同样隐藏（与主体一致） ---- */
@media (max-width: 1279px) { .mascot-root .m-hero-ring { display: none !important; } }

/* ====================== 吉祥物「豆子」· 闲置自种场景（昼夜双剧本） ======================
 * 触发条件：60 秒没有搜索、没有交互（Mascot.pokeIdle 重置计时）
 * 按互联网时间（Asia/Shanghai，06:00–18:00 为白天）分两套剧本：
 *   白天 .idle-day：铁锹一点一点挖大坑 → 躺进土里 → 大土丘合拢 → 一点点发芽 → 太阳晒 → 淋雨 → 长成豆苗
 *   晚上 .idle-night：直接用手挖土 → 半埋睡觉 → 打呼噜流口水（Zzz 循环到用户回来）
 * 阶段类（挂在 .mascot-root 上）：
 *   .idle-scene + .idle-day/.idle-night
 *   + .idle-dig/.idle-bury/.idle-sprout/.idle-sun/.idle-rain/.idle-grown（白天）
 *   + .idle-dig/.idle-bury/.idle-sleep（晚上）
 * ====================================================================================== */

/* ---- 场景元素默认隐藏（父组 .m-scene 常显，各子元素自行控制） ---- */
.m-scene-sun, .m-scene-cloud, .m-scene-rain, .m-scene-moon, .m-scene-stars,
.m-scene-hole, .m-scene-mound, .m-scene-crop, .m-scene-zzz, .m-scene-night { opacity: 0; }
.m-scene-crop-head, .m-shovel, .m-scene-snore, .m-scene-drool { opacity: 0; }
.m-scene-star { opacity: 0; }

/* ---- 豆子：落地、闭眼、停止漂浮 ---- */
.mascot-root.idle-scene .m-bob,
.mascot-root.idle-scene .m-drop,
.mascot-root.idle-scene .m-shadow,
.mascot-root.idle-scene .m-floor,
.mascot-root.idle-scene .m-dot,
.mascot-root.idle-scene .m-antenna { animation: none; }
.mascot-root.idle-scene .m-drop,
.mascot-root.idle-scene .m-shadow,
.mascot-root.idle-scene .m-floor,
.mascot-root.idle-scene .m-dot { opacity: 0; }
.mascot-root.idle-scene .m-eye { animation: none; transform: scaleY(.12); }
/* 闲置场景收起英雄装备：专心挖坑/睡觉 */
.mascot-root.idle-scene .m-cape,
.mascot-root.idle-scene .m-sword,
.mascot-root.idle-scene .m-shield { display: none; }
/* 下沉与渐隐（保留光标跟随变量；旋转原点改到身体中心，方便躺倒） */
.mascot-root.idle-scene .m-look {
  transform-box: fill-box; transform-origin: 50% 50%;
  transform: translate(var(--bx), calc(var(--by) + 74px)) rotate(var(--br));
  transition: transform .8s cubic-bezier(.45,0,.25,1), opacity .6s ease .25s;
  opacity: 0;
}
/* ---- 白天：蹲下挖坑 ---- */
.mascot-root.idle-day.idle-dig .m-look {
  transform: translate(var(--bx), calc(var(--by) + 34px)) rotate(var(--br));
  opacity: 1;
}
/* ---- 晚上：蹲低一点直接用手刨 ---- */
.mascot-root.idle-night.idle-dig .m-look {
  transform: translate(var(--bx), calc(var(--by) + 26px)) rotate(var(--br));
  opacity: 1;
}
/* 挖土：双臂交替刨土（晚上更急一点） */
.m-arm-r { transform-box: fill-box; transform-origin: 6% 18%; }
.mascot-root.idle-day.idle-dig .m-arm-l { animation: mDig .48s ease-in-out infinite; }
.mascot-root.idle-day.idle-dig .m-arm-r { animation: mDig .48s ease-in-out infinite reverse; }
.mascot-root.idle-night.idle-dig .m-arm-l { animation: mDig .34s ease-in-out infinite; }
.mascot-root.idle-night.idle-dig .m-arm-r { animation: mDig .34s ease-in-out infinite reverse; }
@keyframes mDig {
  0%, 100% { transform: rotate(4deg); }
  50%      { transform: rotate(56deg); }
}

/* ---- 铁锹：白天挖坑时握在右手，绕握点阶梯式刨土（一点一点） ---- */
.m-shovel {
  transform-box: view-box; transform-origin: 191px 160px;
  transition: opacity .35s ease;
}
.mascot-root.idle-day.idle-dig .m-shovel { opacity: 1; animation: mShovelDig .56s steps(5, end) infinite; }
@keyframes mShovelDig {
  0%, 100% { transform: rotate(-5deg); }
  55%      { transform: rotate(15deg); }
}

/* ---- 土坑：从挖坑起一直留在地面，且随挖掘一点点变大 ---- */
.m-scene-hole {
  transform-box: fill-box; transform-origin: 50% 50%;
  transform: scale(.5);
  transition: opacity .5s ease, transform 3.2s ease-out;
}
.mascot-root.idle-scene .m-scene-hole { opacity: 1; transform: scale(1); }
.mascot-root.idle-night.idle-scene .m-scene-hole { transition: opacity .5s ease, transform 2.2s ease-out; }

/* ---- 土堆：坑边一小撮 → 合拢盖住豆子（大土丘） ---- */
.m-scene-mound {
  transform-box: fill-box; transform-origin: 50% 100%;
  transform: scale(.38) translateX(20px);
  transition: opacity .5s ease, transform .9s cubic-bezier(.45,0,.25,1);
}
.mascot-root.idle-scene.idle-dig .m-scene-mound { opacity: 1; transform: scale(.42) translateX(22px); }
.mascot-root.idle-scene.idle-bury .m-scene-mound,
.mascot-root.idle-scene.idle-sleep .m-scene-mound,
.mascot-root.idle-scene.idle-sprout .m-scene-mound,
.mascot-root.idle-scene.idle-sun .m-scene-mound,
.mascot-root.idle-scene.idle-rain .m-scene-mound,
.mascot-root.idle-scene.idle-grown .m-scene-mound { opacity: 1; transform: scale(1) translateX(0); }

/* ---- 白天：躺进土里（绕身体中心倾倒，沉入坑中渐隐） ---- */
.mascot-root.idle-day.idle-bury .m-look {
  transform: translate(var(--bx), calc(var(--by) + 76px)) rotate(calc(var(--br) + 62deg));
  opacity: 0;
}

/* ---- 豆苗：分阶段长高（白天 sprout 用 steps 一点一点冒，sun → rain 匀速连长） ---- */
.m-scene-crop {
  transform-box: fill-box; transform-origin: 50% 100%;
  transform: scaleY(.05);
}
.mascot-root.idle-sprout .m-scene-crop { opacity: 1; animation: mSprout 2.6s steps(6, end) forwards; }
.mascot-root.idle-sun    .m-scene-crop { opacity: 1; animation: mGrowSun 1.7s ease-out forwards; }
.mascot-root.idle-rain   .m-scene-crop { opacity: 1; animation: mGrowRain 1.7s ease-out forwards; }
.mascot-root.idle-grown  .m-scene-crop { opacity: 1; transform: scaleY(1); }
@keyframes mSprout   { from { transform: scaleY(.05); } to { transform: scaleY(.34); } }
@keyframes mGrowSun  { from { transform: scaleY(.34); } to { transform: scaleY(.66); } }
@keyframes mGrowRain { from { transform: scaleY(.66); } to { transform: scaleY(1); } }
/* 顶端小豆子：长大阶段「啵」地结出 */
.mascot-root.idle-grown .m-scene-crop-head { animation: mHeadPop .9s cubic-bezier(.34,1.5,.64,1) .45s both; }
@keyframes mHeadPop {
  0%   { opacity: 0; transform: translateY(16px) scale(.3); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---- 太阳：sprout 后登场，下雨时躲起来 ---- */
.m-scene-sun {
  transform-box: fill-box; transform-origin: center;
  transition: opacity .7s ease;
}
.m-scene-sun-rays { transform-box: fill-box; transform-origin: center; }
.m-scene-sun-glow { transform-box: fill-box; transform-origin: center; }
.mascot-root.idle-sun   .m-scene-sun { opacity: 1; }
.mascot-root.idle-grown .m-scene-sun { opacity: .85; }
.mascot-root.idle-rain  .m-scene-sun { opacity: .18; }
.mascot-root.idle-sun   .m-scene-sun-rays { animation: mRays 10s linear infinite; }
.mascot-root.idle-rain  .m-scene-sun-rays { animation: none; }
.mascot-root.idle-grown .m-scene-sun-rays { animation: mRays 16s linear infinite; }
@keyframes mRays { to { transform: rotate(360deg); } }
.mascot-root.idle-sun .m-scene-sun-glow { animation: mSunGlow 2.2s ease-in-out infinite; }
@keyframes mSunGlow {
  0%, 100% { opacity: .22; transform: scale(1); }
  50%      { opacity: .5; transform: scale(1.2); }
}

/* ---- 雨云与雨滴：只在淋雨阶段 ---- */
.m-scene-cloud {
  transform-box: fill-box; transform-origin: center;
  transform: translateY(-6px);
  transition: opacity .7s ease, transform .7s ease;
}
.mascot-root.idle-rain .m-scene-cloud { opacity: 1; transform: translateY(0); }
.m-scene-rain { transition: opacity .7s ease; }
.mascot-root.idle-rain .m-scene-rain { opacity: 1; }
.m-scene-rain line {
  stroke: #7fd0ff; stroke-width: 2.4; stroke-linecap: round;
  transform-box: fill-box; transform-origin: center; opacity: 0;
}
.mascot-root.idle-rain .m-scene-rain line { animation: mRainDrop .66s linear infinite; }
.m-scene-rain line:nth-of-type(2) { animation-delay: .10s; }
.m-scene-rain line:nth-of-type(3) { animation-delay: .22s; }
.m-scene-rain line:nth-of-type(4) { animation-delay: .05s; }
.m-scene-rain line:nth-of-type(5) { animation-delay: .30s; }
.m-scene-rain line:nth-of-type(6) { animation-delay: .16s; }
@keyframes mRainDrop {
  0%   { opacity: 0; transform: translateY(-8px); }
  30%  { opacity: .95; }
  100% { opacity: 0; transform: translateY(16px); }
}

/* ====================== 夜晚：月亮 / 星星 / 夜空 ====================== */
.m-scene-moon { transition: opacity .8s ease; }
.mascot-root.idle-night .m-scene-moon { opacity: 1; }
.m-scene-moon-glow { transform-box: fill-box; transform-origin: center; }
.mascot-root.idle-night .m-scene-moon-glow { animation: mSunGlow 3.4s ease-in-out infinite; }
.m-scene-stars { transition: opacity .8s ease; }
.mascot-root.idle-night .m-scene-stars { opacity: 1; }
.m-scene-star { transform-box: fill-box; transform-origin: center; }
.mascot-root.idle-night .m-scene-star { animation: mTwinkle 2.6s ease-in-out infinite; }
.mascot-root.idle-night .m-scene-star:nth-of-type(2) { animation-delay: .5s; }
.mascot-root.idle-night .m-scene-star:nth-of-type(3) { animation-delay: 1.1s; }
.mascot-root.idle-night .m-scene-star:nth-of-type(4) { animation-delay: 1.7s; }
.mascot-root.idle-night .m-scene-star:nth-of-type(5) { animation-delay: .8s; }
@keyframes mTwinkle {
  0%, 100% { opacity: .25; transform: scale(.75); }
  50%      { opacity: 1; transform: scale(1.15); }
}
/* 夜空压暗层 */
.m-scene-night { transition: opacity .8s ease; }
.mascot-root.idle-night .m-scene-night { opacity: .34; }

/* ====================== 夜晚：半埋睡觉（脸露出土丘） ====================== */
.mascot-root.idle-night.idle-bury .m-look,
.mascot-root.idle-night.idle-sleep .m-look {
  transform: translate(var(--bx), calc(var(--by) + 44px)) rotate(var(--br));
  opacity: 1;
}
/* 睡觉呼吸：肚皮一起一伏 */
.mascot-root.idle-night.idle-sleep .m-bob { animation: mSnoreBreath 2.8s ease-in-out infinite; }
@keyframes mSnoreBreath {
  0%, 100% { transform: scale(1, 1) translateY(0); }
  50%      { transform: scale(1.03, 1.035) translateY(1px); }
}
/* 打呼噜：嘴边气泡鼓起、放大、啵地消失 */
.m-scene-snore { transform-box: view-box; transform-origin: 115px 140px; }
.mascot-root.idle-night.idle-bury .m-scene-snore,
.mascot-root.idle-night.idle-sleep .m-scene-snore { opacity: 1; animation: mSnore 2.3s ease-in-out infinite; }
@keyframes mSnore {
  0%   { opacity: 0; transform: scale(.25); }
  35%  { opacity: .95; transform: scale(1); }
  70%  { opacity: .95; transform: scale(1.12); }
  100% { opacity: 0; transform: scale(1.55); }
}
/* 流口水：挂在嘴角的水滴越拉越长，滴落消失 */
.m-scene-drool { transform-box: view-box; transform-origin: 109px 146px; }
.mascot-root.idle-night.idle-sleep .m-scene-drool { animation: mDrool 2.9s ease-in infinite; }
@keyframes mDrool {
  0%   { opacity: 0; transform: scale(.35); }
  15%  { opacity: .95; transform: scale(1); }
  55%  { opacity: .9; transform: scale(1) translateY(10px); }
  85%  { opacity: .5; transform: scale(.9) translateY(26px); }
  100% { opacity: 0; transform: scale(.8) translateY(38px); }
}
/* Zzz：从土丘上飘起来（三个错峰） */
.m-zzz { transform-box: fill-box; }
.mascot-root.idle-night.idle-bury .m-scene-zzz,
.mascot-root.idle-night.idle-sleep .m-scene-zzz { opacity: 1; }
.mascot-root.idle-night.idle-bury .m-zzz,
.mascot-root.idle-night.idle-sleep .m-zzz { animation: mZzz 2.4s ease-out infinite; }
.mascot-root.idle-night.idle-bury .m-zzz2,
.mascot-root.idle-night.idle-sleep .m-zzz2 { animation-delay: .8s; }
.mascot-root.idle-night.idle-bury .m-zzz3,
.mascot-root.idle-night.idle-sleep .m-zzz3 { animation-delay: 1.6s; }
@keyframes mZzz {
  0%   { opacity: 0; transform: translate(0, 8px) scale(.7); }
  25%  { opacity: .95; }
  100% { opacity: 0; transform: translate(6px, -14px) scale(1.15); }
}

/* 全局兜底：hidden 属性永远优先于组件自身的 display 设置（否则切换无效） */
[hidden] { display: none !important; }

/* ==========================================================================
   个人中心 / 个人注册（personal.js、注册表单的联系方式公示）
   ========================================================================== */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
.num-pos { color: #0f9d58; font-weight: 600; }
.num-neg { color: #6b7280; }

/* 注册页：联系方式公示二选一 */
.contact-choice { display: grid; gap: 8px; }
.cc-item {
  display: flex; gap: 10px; align-items: flex-start; cursor: pointer;
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  transition: border-color .15s, background .15s;
}
.cc-item:hover { border-color: #c9d4e3; background: var(--bg-soft); }
.cc-item input { margin-top: 3px; }
.cc-item b { display: block; font-size: 13px; color: var(--text-1); }
.cc-item em { display: block; font-style: normal; font-size: 12px; color: var(--text-3); line-height: 1.6; margin-top: 2px; }
.cc-item input:checked ~ span b { color: #0b8f84; }

/* 个人中心：公示状态条 */
.cc-state {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 14px; font-size: 13px;
}
.cc-state .dot { width: 8px; height: 8px; border-radius: 50%; background: #9aa4b2; }
.cc-state.on { background: #f2fbf8; border-color: #bfe9e2; }
.cc-state.on .dot { background: #12b3a0; box-shadow: 0 0 0 3px rgba(18,179,160,.16); }

/* ---------------------- 企业留言 · 右下角浮动面板（dm.js） ---------------------- */
#dmBtn {
  position: fixed; right: 16px; bottom: 52px; z-index: 9995;
  display: flex; align-items: center; gap: 6px;
  height: 38px; padding: 0 14px 0 11px; border: 1px solid var(--line-strong); border-radius: 999px;
  background: #fff; color: var(--text); cursor: pointer;
  box-shadow: var(--shadow-2); font-size: 13px; font-weight: 600;
  transition: transform .15s, box-shadow .15s;
}
#dmBtn:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(78,110,242,.28); border-color: var(--brand); }
#dmBtn .dm-btn-ic { font-size: 16px; }
#dmBtn .dm-badge {
  position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px;
  background: var(--danger); color: #fff; border-radius: 999px;
  font-size: 11px; font-style: normal; font-weight: 700; line-height: 17px; text-align: center;
  box-shadow: 0 0 0 2px #fff;
}
#dmPanel {
  position: fixed; right: 16px; bottom: 104px; z-index: 9995;
  width: 372px; height: min(560px, calc(100vh - 140px));
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: 16px;
  box-shadow: 0 18px 50px rgba(20,26,45,.22);
  animation: dmIn .18s ease;
}
#dmPanel[hidden] { display: none; }
@keyframes dmIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.dm-head {
  display: flex; align-items: center; gap: 8px; padding: 12px 14px;
  border-bottom: 1px solid var(--line); background: var(--bg-side);
}
.dm-head b { font-size: 15px; }
.dm-head .dm-sub { font-size: 12px; color: var(--text-3); margin-right: auto; }
.dm-back, .dm-close {
  border: 0; background: none; cursor: pointer; color: var(--text-2);
  font-size: 16px; line-height: 1; padding: 4px 6px; border-radius: 8px;
}
.dm-back { font-size: 20px; padding: 2px 8px 4px 4px; }
.dm-back:hover, .dm-close:hover { background: var(--brand-soft); color: var(--brand); }
.dm-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.dm-foot {
  display: flex; gap: 8px; align-items: flex-end;
  padding: 10px 12px; border-top: 1px solid var(--line); background: var(--bg-side);
}
.dm-foot[hidden] { display: none; }
#dmInput {
  flex: 1; resize: none; border: 1px solid var(--line-strong); border-radius: 10px;
  padding: 8px 10px; font-size: 13px; line-height: 1.5; background: #fff; outline: none;
}
#dmInput:focus { border-color: var(--brand); }
.dm-send {
  border: 0; border-radius: 10px; padding: 8px 14px;
  background: var(--brand); color: #fff; font-size: 13px; font-weight: 600; cursor: pointer;
}
.dm-send:hover { background: var(--brand-strong); }
/* 会话列表 */
.dm-threads { padding: 6px; }
.dm-thread {
  display: flex; align-items: center; gap: 10px; padding: 10px 10px;
  border-radius: var(--radius-sm); cursor: pointer;
}
.dm-thread:hover { background: var(--brand-soft); }
.dm-ava {
  flex: none; width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #5b7cfa, #8a5cf6); color: #fff;
  font-size: 16px; font-weight: 700;
}
.dm-thread-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dm-thread-top { display: flex; align-items: baseline; gap: 8px; font-size: 14px; }
.dm-thread-top b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-thread-top i { margin-left: auto; font-style: normal; font-size: 11px; color: var(--text-3); flex: none; }
.dm-thread-last { font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-tag {
  font-style: normal; font-size: 10px; color: var(--brand); background: var(--brand-soft);
  border-radius: 4px; padding: 0 4px; flex: none;
}
.dm-dot {
  flex: none; min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--danger); color: #fff; border-radius: 999px;
  font-size: 11px; font-style: normal; font-weight: 700; line-height: 18px; text-align: center;
}
.dm-go { font-size: 12px; color: var(--brand); flex: none; }
/* 选择企业 */
.dm-picker { padding: 10px; }
.dm-search input {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 8px 14px; font-size: 13px; outline: none; background: #fff;
}
.dm-search input:focus { border-color: var(--brand); }
.dm-co-list { margin-top: 8px; }
.dm-co {
  display: flex; align-items: center; gap: 10px; padding: 9px 8px;
  border-radius: var(--radius-sm); cursor: pointer;
}
.dm-co:hover { background: var(--brand-soft); }
.dm-co .dm-ava { width: 34px; height: 34px; border-radius: 10px; font-size: 14px; }
/* 聊天 */
.dm-chat { padding: 14px 12px; display: flex; flex-direction: column; gap: 14px; }
.dm-msg { display: flex; flex-direction: column; max-width: 82%; }
.dm-msg.mine { align-self: flex-end; align-items: flex-end; }
.dm-msg.theirs { align-self: flex-start; }
.dm-msg-who { font-size: 11px; color: var(--text-3); margin-bottom: 3px; }
.dm-bubble {
  padding: 8px 12px; border-radius: 12px; font-size: 13px; line-height: 1.6;
  white-space: pre-wrap; word-break: break-word;
}
.dm-msg.theirs .dm-bubble { background: var(--bg-side); border: 1px solid var(--line); border-top-left-radius: 4px; }
.dm-msg.mine .dm-bubble { background: var(--brand); color: #fff; border-top-right-radius: 4px; }
/* 空态 */
.dm-empty { padding: 46px 28px; text-align: center; }
.dm-empty-s { padding: 34px 28px; }
.dm-empty .ic { font-size: 38px; margin-bottom: 8px; }
.dm-empty b { font-size: 14px; }
.dm-empty p { margin: 6px 0 14px; font-size: 12px; color: var(--text-3); }
.dm-primary {
  border: 0; border-radius: 999px; padding: 8px 18px;
  background: var(--brand); color: #fff; font-size: 13px; font-weight: 600; cursor: pointer;
}
.dm-primary:hover { background: var(--brand-strong); }
/* 窄屏：面板半屏，豆子不显示的断点不受影响 */
@media (max-width: 640px) {
  #dmPanel { width: calc(100vw - 24px); right: 12px; }
  #dmBtn { right: 12px; }
}

/* 聊天窗内：搜索其他企业，直接切换对话 */
.dm-chat-search {
  position: sticky; top: 0; z-index: 2;
  padding: 10px 12px; background: var(--bg); border-bottom: 1px solid var(--line);
}
.dm-chat-search input {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 7px 14px; font-size: 13px; outline: none; background: var(--bg-soft);
}
.dm-chat-search input:focus { border-color: var(--brand); background: #fff; }
.dm-chat-results { padding: 8px 6px; }
.dm-chat-results[hidden] { display: none; }
