/* =============================================================================
   访客聊天页 · 淡蓝毛玻璃
   -----------------------------------------------------------------------------
   作用域：body.v-chat —— 只作用于聊天页，登录页 / 群组页仍用 visitor.css。

   三条设计主张：
   1. 彩色来自背景光斑，玻璃本身是半透明白（面板涂色会糊成一团）
   2. 内部元素白度必须高于容器，否则一起"雾"掉、抓不住视线
   3. 磨砂颗粒噪点压在最上层（z-index 90），这是"毛边"质感的来源
   ============================================================================= */

/* ---------------------------------------------------------------- 设计令牌 */
body.v-chat{
  /* 玻璃层：白度递增，越靠前越实 */
  --g-1:rgba(255,255,255,.24);
  --g-2:rgba(255,255,255,.47);
  --g-3:rgba(255,255,255,.44);
  --g-4:rgba(255,255,255,.80);
  --g-5:rgba(255,255,255,.92);

  /* 玻璃棱边 */
  --hair:rgba(255,255,255,.72);
  --hair-2:rgba(255,255,255,.44);
  --edge:rgba(56,46,82,.10);

  --surface:rgba(255,255,255,.82);
  --surface-2:rgba(255,255,255,.46);
  --surface-3:rgba(255,255,255,.34);
  --line:rgba(56,46,82,.10);
  --line-soft:rgba(56,46,82,.055);

  /* 文字：带紫调，与彩色背景同族 */
  --ink:#1d1a28;
  --ink-2:#534e68;
  --ink-3:#7f7993;
  --ink-4:#a49eb4;

  /* 品牌淡蓝 */
  --brand:#4f86d9;
  --brand-hover:#3f74c6;
  --brand-soft:rgba(79,134,217,.15);
  --brand-line:rgba(79,134,217,.30);

  /* 语义色 */
  --accent:#5566c9;
  --accent-soft:rgba(85,102,201,.17);
  --accent-line:rgba(85,102,201,.28);
  --amber:#a06a1a;
  --amber-soft:rgba(160,106,26,.18);
  --amber-line:rgba(160,106,26,.24);
  --violet:#7562a6;
  --violet-soft:rgba(117,98,166,.18);
  --violet-line:rgba(117,98,166,.26);
  --rose:#a8454c;
  --rose-soft:rgba(168,69,76,.17);
  --rose-line:rgba(168,69,76,.24);
  --gold:#c08a3e;
  --sky:#3d94c9;
  --sky-soft:rgba(61,148,201,.18);
  --sky-line:rgba(61,148,201,.28);

  --r-sm:9px; --r-md:12px; --r-lg:15px; --r-xl:24px;

  --sh-1:0 1px 2px rgba(56,46,82,.05);
  --sh-2:0 6px 20px -8px rgba(56,46,82,.22), 0 1px 2px rgba(56,46,82,.05);
  --sh-3:0 26px 64px -22px rgba(56,46,82,.36), 0 4px 12px -4px rgba(56,46,82,.10);

  --ease:cubic-bezier(.32,.72,.28,1);

  /* 页面本体 */
  margin:0;
  padding:32px;
  min-height:100dvh;
  display:flex;align-items:center;justify-content:center;
  overflow:hidden;
  background:#eef0f8;
  color:var(--ink);
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","PingFang SC",
              "HarmonyOS Sans SC","MiSans","Source Han Sans SC","Microsoft YaHei",sans-serif;
  font-size:14px;
  -webkit-font-smoothing:antialiased;
}

/* 注意：这里不能写 body.v-chat button{background:none} —— 它的优先级 (0,1,2)
   高于所有单类选择器 (0,1,0)，会把 .qs-card / .send-btn / .btn-line 的底色与边框清空。
   基础重置 base.css 已经做过。 */
body.v-chat svg{display:block}
body.v-chat :focus-visible{outline:2px solid var(--brand);outline-offset:2px;border-radius:4px}

body.v-chat .ic{width:18px;height:18px;flex:0 0 auto}
body.v-chat .num{font-variant-numeric:tabular-nums}

/* ---------------------------------------------------------------- 背景光斑
   五团柔光各自缓慢漂移，时长与方向都不同，避免"一起呼吸"的机械感。
   只用 transform 驱动（走合成层），不触发重排。 */
.bg-light{position:fixed;inset:0;z-index:0;overflow:hidden;pointer-events:none}
.orb{position:absolute;border-radius:50%;will-change:transform}

.orb-1{
  width:56vw;height:56vw;min-width:700px;min-height:700px;
  left:-17vw;top:-26vh;
  background:radial-gradient(circle,#ffd7c6 0%,rgba(255,215,198,0) 68%);
  animation:orbDrift1 32s ease-in-out infinite;
}
.orb-2{
  width:52vw;height:52vw;min-width:660px;min-height:660px;
  right:-15vw;top:-22vh;
  background:radial-gradient(circle,#b7d2ff 0%,rgba(183,210,255,0) 68%);
  animation:orbDrift2 38s ease-in-out infinite;
}
.orb-3{
  width:54vw;height:54vw;min-width:680px;min-height:680px;
  right:-17vw;bottom:-27vh;
  background:radial-gradient(circle,#addff5 0%,rgba(173,223,245,0) 68%);
  animation:orbDrift3 34s ease-in-out infinite;
}
.orb-4{
  width:52vw;height:52vw;min-width:660px;min-height:660px;
  left:-15vw;bottom:-25vh;
  background:radial-gradient(circle,#dcc9fa 0%,rgba(220,201,250,0) 68%);
  animation:orbDrift4 41s ease-in-out infinite;
}
.orb-5{
  width:44vw;height:44vw;min-width:540px;min-height:540px;
  left:28vw;top:18vh;
  background:radial-gradient(circle,#ffd9ec 0%,rgba(255,217,236,0) 72%);
  animation:orbDrift5 47s ease-in-out infinite;
}

@keyframes orbDrift1{0%,100%{transform:translate3d(0,0,0) scale(1)}50%{transform:translate3d(3.5vw,4vh,0) scale(1.09)}}
@keyframes orbDrift2{0%,100%{transform:translate3d(0,0,0) scale(1.06)}50%{transform:translate3d(-4.5vw,3.5vh,0) scale(1)}}
@keyframes orbDrift3{0%,100%{transform:translate3d(0,0,0) scale(1)}50%{transform:translate3d(-3.5vw,-4.5vh,0) scale(1.1)}}
@keyframes orbDrift4{0%,100%{transform:translate3d(0,0,0) scale(1.07)}50%{transform:translate3d(4vw,-3.5vh,0) scale(1)}}
@keyframes orbDrift5{0%,100%{transform:translate3d(0,0,0) scale(1)}50%{transform:translate3d(-5vw,5vh,0) scale(1.13)}}

/* ---------------------------------------------------------------- 应用容器 */
.app{
  position:relative;z-index:1;
  width:min(1180px,100%);
  height:min(812px,calc(100vh - 132px));
  background:var(--g-1);
  backdrop-filter:blur(40px) saturate(190%);
  -webkit-backdrop-filter:blur(40px) saturate(190%);
  border:1px solid var(--hair);
  border-radius:var(--r-xl);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.92),
    inset 0 -1px 0 rgba(255,255,255,.30),
    0 2px 8px rgba(56,46,82,.06),
    0 46px 100px -46px rgba(56,46,82,.48);
  display:grid;
  grid-template-columns:298px minmax(0,1fr);
  overflow:hidden;
}

/* ---------------------------------------------------------------- 左侧栏 */
.side{
  background:
    linear-gradient(180deg, rgba(255,255,255,.24) 0%, rgba(255,255,255,.02) 210px),
    var(--g-2);
  backdrop-filter:blur(22px) saturate(160%);
  -webkit-backdrop-filter:blur(22px) saturate(160%);
  border-right:1px solid rgba(255,255,255,.55);
  box-shadow:4px 0 18px -10px rgba(56,46,82,.16);
  display:flex;flex-direction:column;min-height:0;
  position:relative;z-index:2;
}

.brand-mark{
  width:34px;height:34px;flex:0 0 34px;
  border-radius:10px;
  background:linear-gradient(148deg,#79aef0 0%,#4a7ed2 100%);
  display:grid;place-items:center;
  color:#fff;
  box-shadow:0 3px 10px -3px rgba(46,94,170,.5), inset 0 1px 0 rgba(255,255,255,.14);
}
.brand-mark svg{width:17px;height:17px}
.brand-name{font-size:14px;font-weight:600;letter-spacing:-.01em;line-height:1.3}
.brand-hours{
  font-size:11.5px;color:#5c7590;margin-top:2px;
  display:flex;align-items:center;gap:5px;
}
.brand-hours .live{
  width:5px;height:5px;border-radius:50%;background:var(--sky);
  box-shadow:0 0 0 2.5px rgba(61,148,201,.16);
}

.side-body{flex:1;min-height:0;overflow:hidden;padding:12px 14px 8px;
  display:flex;flex-direction:column}
.side-body::-webkit-scrollbar{width:8px}
.side-body::-webkit-scrollbar-thumb{background:#d9d3c8;border-radius:4px;border:2px solid transparent;background-clip:content-box}
.side-body::-webkit-scrollbar-track{background:transparent}

.sec{padding:16px 6px}
.sec + .sec{border-top:1px solid var(--line-soft)}

/* 侧栏两段等高：我的会话 / 群组 各占一半，内容各自滚动。
   原来是"最后一段撑满剩余"，会话区只有自然高度、群组吞掉全部空白，显得一窄一宽。 */
.side-body > .sec{flex:1 1 0;min-height:0;display:flex;flex-direction:column;overflow:hidden}
.side-body > .sec > .sec-head{flex:0 0 auto}
.sec-grow{flex:1 1 0;min-height:0;display:flex;flex-direction:column}
.sec-grow > .empty{flex:0 0 auto;margin:auto 0;padding:22px 14px}
.sec-grow > .group-list{flex:1;min-height:0;overflow-y:auto}
.sec-head{display:flex;align-items:center;gap:8px;margin-bottom:10px}
.sec-head h3{
  font-size:11px;font-weight:600;letter-spacing:.06em;
  color:var(--ink-3);text-transform:uppercase;
}
.sec-count{
  margin-left:auto;font-size:11px;color:var(--violet);
  font-variant-numeric:tabular-nums;font-weight:500;
}


/* ---------- 侧栏：未登录引导 / 已登录账户卡 ---------- */
.side-login{
  flex:0 0 auto;
  margin:2px 0 10px;padding:12px;
  border-radius:var(--r-md);
  background:linear-gradient(135deg, rgba(79,134,217,.14), rgba(124,58,237,.10));
  border:1px solid var(--brand-line);
}
.sl-head{display:flex;gap:9px;align-items:flex-start}
.sl-ico{
  width:28px;height:28px;flex:0 0 28px;border-radius:9px;
  display:grid;place-items:center;
  background:rgba(255,255,255,.78);color:var(--brand);
}
.sl-txt{min-width:0}
.sl-txt b{display:block;font-size:12.5px;color:var(--ink);line-height:1.4}
.sl-txt span{display:block;margin-top:2px;font-size:10.5px;color:var(--ink-3)}
.sl-acts{display:flex;gap:6px;margin-top:10px}
.sl-btn{
  flex:1;height:28px;border-radius:8px;
  display:flex;align-items:center;justify-content:center;
  font-size:12px;color:var(--ink-2);
  border:1px solid var(--line);background:rgba(255,255,255,.82);
  transition:.15s;
}
.sl-btn:hover{border-color:var(--brand-line);color:var(--brand)}
.sl-btn.primary{background:var(--brand);border-color:var(--brand);color:#fff}
.sl-btn.primary:hover{background:var(--brand-hover);color:#fff}

/* 头部：转人工（侧栏卡片移除后，这里是唯一入口） */
.head-act{
  flex:0 0 auto;
  height:30px;padding:0 13px;border-radius:999px;
  border:1px solid var(--brand-line);background:var(--brand-soft);
  color:var(--brand);font-size:12px;cursor:pointer;transition:.15s;
}
.head-act:hover{background:rgba(79,134,217,.24)}
.head-act:disabled{
  background:rgba(255,255,255,.6);color:var(--ink-4);
  border-color:var(--line);cursor:not-allowed;
}

/* ---------- 头部右上角：用户卡片 + 下拉 ---------- */
.head-user{position:relative;flex:0 0 auto;margin-left:5px}
.hu-btn{
  display:flex;align-items:center;gap:7px;
  height:30px;padding:0 8px 0 4px;border-radius:999px;
  border:1px solid var(--line);background:rgba(255,255,255,.62);
  cursor:pointer;transition:.15s;
}
.hu-btn:hover{border-color:var(--brand-line);background:rgba(255,255,255,.94)}
.hu-btn[aria-expanded="true"]{border-color:var(--brand-line);background:#fff}
.hu-av{
  width:22px;height:22px;flex:0 0 22px;border-radius:50%;overflow:hidden;
  display:grid;place-items:center;
  background:var(--av-bg,#7E90A8);color:var(--av-fg,#f2f5f9);
  font-size:11px;font-weight:600;
}
.hu-av img{width:100%;height:100%;object-fit:cover;display:block}
.hu-av.lg{width:38px;height:38px;flex:0 0 38px;font-size:14px}
.hu-name{
  font-size:12.5px;color:var(--ink-2);
  max-width:96px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.hu-chev{color:var(--ink-4);flex:0 0 auto;transition:.15s}
.hu-btn[aria-expanded="true"] .hu-chev{transform:rotate(180deg)}

.hu-pop{
  position:absolute;top:calc(100% + 9px);right:0;z-index:60;
  width:200px;padding:8px;
  border-radius:14px;
  background:rgba(255,255,255,.98);
  border:1px solid var(--line);
  box-shadow:0 18px 40px -16px rgba(28,26,48,.32);
  animation:huIn .14s ease-out;
}
@keyframes huIn{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:none}}
.hu-card{
  display:flex;align-items:center;gap:9px;
  padding:5px 7px 11px;margin-bottom:6px;
  border-bottom:1px solid var(--line-soft);
}
.hu-card-meta{min-width:0}
.hu-card-meta b{
  display:block;font-size:12.5px;color:var(--ink);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.hu-card-meta span{
  display:block;margin-top:1px;font-size:10.5px;color:var(--ink-3);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.hu-item{
  display:flex;align-items:center;height:34px;padding:0 9px;border-radius:9px;
  font-size:12.5px;color:var(--ink-2);transition:.13s;
}
/* 菜单项里的 <button> 需要重置默认样式 */
button.hu-item{
  width:100%;border:0;background:none;cursor:pointer;
  font-family:inherit;text-align:left;
}
.hu-item:hover{background:var(--surface-2);color:var(--ink)}
.hu-item.danger{color:var(--rose)}
.hu-item.danger:hover{background:#fdeef0;color:var(--rose)}

@media (max-width:560px){
  .hu-name{display:none}
  .hu-btn{padding:0 4px 0 3px;gap:3px}
  .hu-pop{width:186px}
}

/* 头部右上角：登录 / 退出 */
.head-auth{
  flex:0 0 auto;margin-left:5px;
  height:30px;padding:0 13px;border-radius:999px;
  display:inline-flex;align-items:center;
  font-size:12px;color:var(--ink-2);
  border:1px solid var(--line);background:rgba(255,255,255,.62);
  transition:.15s;
}
.head-auth:hover{border-color:var(--brand-line);color:var(--brand);background:rgba(255,255,255,.92)}
.head-auth.primary{color:var(--brand);border-color:var(--brand-line);background:var(--brand-soft)}
.head-auth.primary:hover{background:rgba(79,134,217,.22)}

@media (max-width:920px){
  .head-auth{height:26px;padding:0 10px;font-size:11.5px;margin-left:2px}
}

/* ---------- 我的会话（当前 / 已结束） ---------- */
.conv-sec > .conv-tabs{flex:0 0 auto}
.conv-tabs{display:flex;gap:5px;margin-bottom:8px}
.conv-tabs a{
  flex:1;display:flex;align-items:center;justify-content:center;gap:5px;
  height:28px;border-radius:8px;font-size:11.5px;color:var(--ink-3);
  border:1px solid transparent;transition:.15s;
}
.conv-tabs a i{font-style:normal;font-size:10px;color:var(--ink-4)}
.conv-tabs a:hover{background:var(--surface-2)}
.conv-tabs a.on{
  background:var(--surface);color:var(--ink);
  border-color:var(--line);box-shadow:var(--sh-1);
}
.conv-tabs a.on i{color:var(--brand)}
.conv-list{display:flex;flex-direction:column;gap:3px;flex:1;min-height:0;overflow-y:auto}
.conv-list::-webkit-scrollbar,.group-list::-webkit-scrollbar{width:8px}
.conv-list::-webkit-scrollbar-thumb,.group-list::-webkit-scrollbar-thumb{
  background:#d9d3c8;border-radius:4px;border:2px solid transparent;background-clip:content-box}
.conv-list::-webkit-scrollbar-track,.group-list::-webkit-scrollbar-track{background:transparent}
.conv-item{
  display:flex;gap:8px;padding:8px 9px;border-radius:10px;
  border:1px solid transparent;transition:.15s;
}
.conv-item:hover{background:var(--surface-2)}
.conv-item.on{background:var(--surface);border-color:var(--line);box-shadow:var(--sh-1)}
.ci-dot{
  width:6px;height:6px;flex:0 0 6px;border-radius:50%;
  margin-top:5px;background:var(--ink-4);
}
.ci-dot[data-s="human"]{background:var(--brand)}
.ci-dot[data-s="waiting_human"]{background:var(--amber)}
.ci-dot[data-s="bot"]{background:var(--violet)}
.ci-main{flex:1;min-width:0}
.ci-r1{display:flex;align-items:baseline;gap:6px}
.ci-id{font-size:11.5px;color:var(--ink-2);font-variant-numeric:tabular-nums}
.ci-time{margin-left:auto;font-size:10px;color:var(--ink-4)}
.ci-r2{display:flex;align-items:center;gap:5px;margin-top:2px}
.ci-flag{
  flex:0 0 auto;font-size:9.5px;color:var(--ink-3);
  background:var(--surface-3);border-radius:4px;padding:1px 4px;
}
.ci-prev{
  flex:1;min-width:0;font-size:11px;color:var(--ink-3);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.ci-badge{
  flex:0 0 auto;min-width:15px;height:15px;padding:0 4px;border-radius:8px;
  background:var(--rose);color:#fff;font-size:9.5px;font-style:normal;
  display:grid;place-items:center;
}
.conv-empty{padding:16px 8px;text-align:center;font-size:11.5px;color:var(--ink-4)}

/* ---------- 已结束会话：底部只读条 ---------- */
.closed-bar{
  display:flex;align-items:center;gap:10px;
  margin:0 20px 16px;padding:12px 14px;border-radius:12px;
  background:var(--surface-2);border:1px solid var(--line-soft);
}
.cb-txt{display:flex;align-items:center;gap:6px;font-size:12.5px;color:var(--ink-3)}
.cb-act{
  margin-left:auto;flex:0 0 auto;
  font-size:12px;color:var(--brand);
  padding:4px 11px;border-radius:999px;
  border:1px solid var(--brand-line);background:var(--brand-soft);
}

/* 状态胶囊：颜色承担语义 */
.sec-tag{
  margin-left:auto;
  font-size:10.5px;font-weight:500;line-height:1.65;
  padding:0 7px;border-radius:999px;
  background:rgba(255,255,255,.55);color:var(--ink-3);
  border:1px solid rgba(255,255,255,.7);
  transition:.22s var(--ease);
}
.sec-tag[data-tone="accent"]{
  background:linear-gradient(var(--accent-soft),var(--accent-soft)),rgba(255,255,255,.62);
  color:var(--accent);border-color:var(--accent-line);
}
.sec-tag[data-tone="amber"]{
  background:linear-gradient(var(--amber-soft),var(--amber-soft)),rgba(255,255,255,.62);
  color:var(--amber);border-color:var(--amber-line);
}
.sec-tag[data-tone="sky"]{
  background:linear-gradient(var(--sky-soft),var(--sky-soft)),rgba(255,255,255,.62);
  color:var(--sky);border-color:var(--sky-line);
}

/* 会话卡 */
.conv{
  background:rgba(255,255,255,.54);
  border:1px solid rgba(255,255,255,.92);
  border-radius:var(--r-md);
  padding:12px;
  backdrop-filter:blur(14px) saturate(150%);
  -webkit-backdrop-filter:blur(14px) saturate(150%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.8);
  transition:border-color .26s var(--ease), background .26s var(--ease);
}
.conv[data-state="none"]{border-color:var(--hair)}
.conv[data-state="bot"]{border-color:var(--accent-line);background:linear-gradient(170deg,rgba(255,255,255,.56),rgba(232,240,253,.42))}
.conv[data-state="waiting"]{border-color:var(--amber-line);background:linear-gradient(170deg,rgba(255,255,255,.56),rgba(253,244,230,.42))}
.conv[data-state="human"]{border-color:var(--sky-line);background:linear-gradient(170deg,rgba(255,255,255,.56),rgba(226,240,252,.44))}
.conv[data-state="closed"]{border-color:var(--line);background:rgba(255,255,255,.4)}

.conv-row1{display:flex;align-items:center;gap:7px}
.state-dot{
  width:6px;height:6px;border-radius:50%;background:var(--ink-4);flex:0 0 6px;
  transition:background .24s, box-shadow .24s;
}
.conv[data-state="bot"] .state-dot{background:var(--accent);box-shadow:0 0 0 3px rgba(85,102,201,.10)}
.conv[data-state="waiting"] .state-dot{background:var(--amber);box-shadow:0 0 0 3px rgba(160,106,26,.10);animation:pulse 1.8s ease-in-out infinite}
.conv[data-state="human"] .state-dot{background:var(--sky);box-shadow:0 0 0 3px rgba(61,148,201,.12)}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.35}}

.state-label{font-size:12.5px;font-weight:550;transition:color .24s var(--ease)}
.conv[data-state="bot"] .state-label{color:var(--accent)}
.conv[data-state="waiting"] .state-label{color:var(--amber)}
.conv[data-state="human"] .state-label{color:var(--sky)}

.conv-time{
  margin-left:auto;font-size:11px;color:var(--ink-4);
  font-variant-numeric:tabular-nums;
}

.conv-person{
  display:flex;align-items:center;gap:9px;
  margin-top:11px;padding-top:11px;
  border-top:1px solid var(--line-soft);
}
.mini-av{
  width:28px;height:28px;flex:0 0 28px;border-radius:8px;
  display:grid;place-items:center;
  background:var(--brand-soft);color:var(--brand);
  font-size:12px;font-weight:600;
}
.mini-av svg{width:15px;height:15px}
.conv-person-meta{min-width:0;flex:1}
.conv-person-name{
  font-size:12.5px;color:var(--ink);font-weight:500;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.conv-person-role{
  font-size:11px;color:var(--ink-3);margin-top:1px;
  display:flex;align-items:center;gap:5px;
}
.conv-person-role .on{width:4px;height:4px;border-radius:50%;background:var(--sky)}

.conv-actions{display:flex;gap:6px;margin-top:11px}
.btn-line{
  flex:1;
  display:inline-flex;align-items:center;justify-content:center;gap:5px;
  height:31px;padding:0 10px;
  border:1px solid rgba(74,84,140,.16);
  border-radius:var(--r-sm);
  background:rgba(255,255,255,.62);
  font-size:12.5px;color:var(--ink-2);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  transition:.15s var(--ease);
}
.btn-line:hover{border-color:var(--brand-line);background:var(--brand-soft);color:var(--brand)}
.btn-line:active{transform:translateY(.5px)}
.btn-line:disabled{opacity:1;cursor:not-allowed;transform:none;background:var(--surface-3);border-color:var(--line-soft);color:var(--ink-4);font-weight:400}
.btn-line:disabled:hover{background:var(--surface-3);border-color:var(--line-soft);color:var(--ink-4)}
.btn-line.primary{
  border-color:transparent;
  background:linear-gradient(150deg,#7aabee 0%,#4b81d6 100%);
  color:#fff;font-weight:500;
  box-shadow:0 3px 11px -4px rgba(46,94,170,.42), inset 0 1px 0 rgba(255,255,255,.22);
}
.btn-line.primary:hover{
  background:linear-gradient(150deg,#8ab6f2 0%,#5689db 100%);
  box-shadow:0 5px 16px -5px rgba(46,94,170,.5), inset 0 1px 0 rgba(255,255,255,.28);
}
.btn-line.primary:disabled,
.btn-line.primary:disabled:hover{
  background:var(--surface-3);border-color:var(--line-soft);
  color:var(--ink-4);box-shadow:none;font-weight:400;
}
.btn-line.quiet{flex:0 0 auto;color:var(--ink-3)}
.btn-line.quiet:hover{border-color:var(--rose-line);background:var(--rose-soft);color:var(--rose)}

/* 群组 */
.group-list{display:flex;flex-direction:column;gap:1px}
.group-item{
  display:flex;align-items:center;gap:9px;
  padding:7px 8px;border-radius:var(--r-sm);
  transition:.14s var(--ease);
}
.group-item:hover{background:var(--surface);box-shadow:var(--sh-1)}
.group-av{
  width:26px;height:26px;flex:0 0 26px;border-radius:7px;
  display:grid;place-items:center;
  background:var(--surface-3);color:var(--ink-3);
}
.group-av svg{width:14px;height:14px}
.group-meta{min-width:0;flex:1}
.group-name{
  font-size:12.5px;color:var(--ink);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.group-sub{
  font-size:11px;color:var(--ink-3);margin-top:1px;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.group-badge{
  min-width:18px;height:18px;flex:0 0 auto;
  border-radius:999px;background:var(--rose);color:#fff;
  font-size:10.5px;font-weight:600;
  display:grid;place-items:center;padding:0 5px;
  font-variant-numeric:tabular-nums;
}

.empty{
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:4px;padding:28px 14px 26px;
  border:1px dashed rgba(117,98,166,.26);
  border-radius:var(--r-md);
  background:rgba(255,255,255,.46);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.55);
  text-align:center;
}
.empty svg{color:#9b8cc2;margin-bottom:7px;width:26px;height:26px}
.empty b{font-size:12.5px;font-weight:500;color:var(--ink-2)}
.empty span{font-size:11px;color:var(--ink-3);line-height:1.6}

/* 消息中心入口 */
.aside-link{
  flex:0 0 auto;
  display:flex;align-items:center;justify-content:space-between;gap:8px;
  margin:6px 6px 2px;padding:9px 10px;
  border-radius:var(--r-sm);
  font-size:12.5px;color:var(--ink-3);
  border:1px solid transparent;transition:.15s;
}
.aside-link span{display:flex;align-items:center;gap:8px}
.aside-link:hover{background:var(--surface);border-color:var(--line);color:var(--ink)}

.side-foot{
  flex:0 0 auto;
  padding:13px 20px 16px;
  border-top:1px solid var(--line-soft);
  display:flex;gap:8px;align-items:flex-start;
  font-size:11px;line-height:1.65;color:var(--ink-3);
}
.side-foot svg{color:#8fb2cf;margin-top:1px;flex:0 0 auto;width:13px;height:13px}

/* ---------------------------------------------------------------- 对话区 */
.chat{
  display:flex;flex-direction:column;min-height:0;min-width:0;
  background:var(--g-3);
  backdrop-filter:blur(26px) saturate(165%);
  -webkit-backdrop-filter:blur(26px) saturate(165%);
  position:relative;
}

.chat-head{
  flex:0 0 auto;
  position:relative;
  height:66px;padding:0 20px;
  display:flex;align-items:center;gap:11px;
  background:linear-gradient(180deg,rgba(255,255,255,.40),rgba(255,255,255,.14));
  border-bottom:1px solid var(--hair-2);
}
.chat-head::after{
  content:'';position:absolute;left:0;right:0;bottom:-1px;height:1px;
  background:linear-gradient(90deg,rgba(79,134,217,.22) 0%,rgba(79,134,217,.06) 28%,rgba(79,134,217,0) 58%);
  pointer-events:none;
}

.peer-av{
  position:relative;
  width:36px;height:36px;flex:0 0 36px;border-radius:11px;
  background:linear-gradient(150deg,rgba(255,255,255,.86),rgba(207,226,250,.62));
  color:var(--brand);
  border:1px solid var(--hair);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.95), 0 2px 8px -4px rgba(46,94,170,.28);
  display:grid;place-items:center;
}
.peer-av svg{width:18px;height:18px}
.peer-av .presence{
  position:absolute;right:-2px;bottom:-2px;
  width:11px;height:11px;border-radius:50%;
  background:var(--sky);
  border:2px solid #ffffff;
  transition:background .2s;
}
.peer-av .presence[data-on="0"]{background:var(--ink-4)}

.peer-meta{min-width:0;flex:1}
/* 标题与未读角标同一行：角标独立成兄弟节点，不会被 applyState 改写 #v-title
   的 textContent 时连带清掉 */
.peer-line{display:flex;align-items:center;gap:6px;min-width:0}
.peer-name{
  font-size:14px;font-weight:600;letter-spacing:-.01em;
  min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}

/* 未读角标：靠一次轻微弹跳抓住注意力，不改变头部布局 */
.v-unread{
  flex:0 0 auto;
  display:inline-flex;align-items:center;justify-content:center;
  min-width:17px;height:17px;padding:0 4px;
  border-radius:999px;
  background:#e5484d;color:#fff;
  font-size:10.5px;font-weight:600;line-height:1;
  font-variant-numeric:tabular-nums;
  box-shadow:0 2px 6px -2px rgba(229,72,77,.7);
  animation:unreadPop .3s var(--ease);
}
.v-unread[hidden]{display:none}
@keyframes unreadPop{
  0%{transform:scale(.4);opacity:0}
  60%{transform:scale(1.12)}
  100%{transform:scale(1);opacity:1}
}

/* 提示音开关：关闭时喇叭打叉、声波淡出 */
.v-sound .v-slash{opacity:0;transition:opacity .18s var(--ease)}
.v-sound .v-w1,.v-sound .v-w2{transition:opacity .18s var(--ease)}
.v-sound[data-on="0"]{color:var(--ink-4)}
.v-sound[data-on="0"] .v-slash{opacity:1}
.v-sound[data-on="0"] .v-w1,.v-sound[data-on="0"] .v-w2{opacity:.18}

/* 桌面通知开关：开启时铃铛点亮。.icon-btn 自身是 display:grid，
   会盖掉浏览器对 [hidden] 的默认 display:none，所以这条必须写 */
.v-notify[hidden]{display:none}
.v-notify[data-on="1"]{color:var(--brand)}
.v-notify[data-on="1"] .ic{stroke-width:2}
.peer-sub{
  font-size:11.5px;color:var(--ink-3);margin-top:2px;
  display:flex;align-items:center;gap:6px;
}
.peer-sub .sep{width:1px;height:9px;background:var(--line)}
#peerTag{font-weight:500;transition:color .22s var(--ease)}
#peerTag[data-tone="sky"]{color:var(--sky)}
#peerTag[data-tone="amber"]{color:var(--amber)}

.head-actions{display:flex;align-items:center;gap:6px}
/* 手机上左栏隐藏，转人工入口必须搬到头部 */
.only-mobile{display:none !important}
.icon-btn{
  width:32px;height:32px;border-radius:var(--r-sm);
  display:grid;place-items:center;
  color:var(--ink-3);
  transition:.14s var(--ease);
}
.icon-btn:hover{background:var(--surface-3);color:var(--ink)}
.icon-btn:active{transform:scale(.96)}

/* 连接状态条 */
.conn-banner{
  flex:0 0 auto;
  display:flex;align-items:center;justify-content:center;gap:7px;
  padding:6px 12px;
  background:linear-gradient(var(--amber-soft),var(--amber-soft)),rgba(255,255,255,.7);
  border-bottom:1px solid var(--amber-line);
  color:var(--amber);font-size:11.5px;
}
.conn-banner[hidden]{display:none}

/* 顶部渐隐 */
.stream-fade{
  position:absolute;left:0;right:0;top:66px;height:22px;
  background:linear-gradient(180deg,rgba(255,255,255,.44) 6%,rgba(255,255,255,0));
  pointer-events:none;z-index:2;
}

/* ---------------------------------------------------------------- 消息流 */
.stream{
  flex:1;min-height:0;overflow-y:auto;
  padding:22px 20px 8px;
}
.stream::-webkit-scrollbar{width:9px}
.stream::-webkit-scrollbar-thumb{background:#d9d3c8;border-radius:5px;border:2.5px solid transparent;background-clip:content-box}
.stream::-webkit-scrollbar-track{background:transparent}

/* 消息不足一屏时贴底（真实 IM 行为），超出时正常向上滚 */
.stream-inner{
  max-width:708px;margin:0 auto;min-width:0;
  display:flex;flex-direction:column;gap:15px;
  min-height:100%;
}
.stream-inner::before{content:'';margin-top:auto}
/* 空会话：欢迎语 + 快捷问题整体居中，避免上半屏空一大片 */
/* 空态：内容贴底，快捷问题正好落在输入框上方 */
.stream-inner.is-empty{justify-content:flex-end;padding-bottom:2px}
.stream-inner.is-empty::before{display:none}
.stream-inner.is-empty .daybar{display:none}
.stream-inner.is-empty .quick-start{margin-top:6px}

.daybar{
  align-self:center;
  font-size:11px;color:var(--ink-3);
  padding:2px 0;
  font-variant-numeric:tabular-nums;
}

.msg{display:flex;gap:10px;align-items:flex-start;animation:msgIn .22s var(--ease) both}
@keyframes msgIn{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}

.msg .av{
  width:30px;height:30px;flex:0 0 30px;border-radius:50%;
  display:grid;place-items:center;
  /* 原来的渐变接近纯白，在浅色背景上几乎看不出头像框，只剩一个小图标悬空 */
  background:linear-gradient(160deg,#eaf2ff,#d7e6fb);
  color:#3b6cb0;
  border:1px solid rgba(79,134,217,.30);
  box-shadow:0 1px 3px -1px rgba(46,94,170,.28);
  margin-top:2px;
  font-size:11.5px;font-weight:600;
}
.msg .av svg{width:16px;height:16px}

/* 机器人头像：白底 + 薄荷色描边，和人工客服的蓝色气泡图标区分开。
   图标是彩色填充（#64EDAC 机身 + #333C50 轮廓），放到 20px 才看得清眼睛与天线。 */
.msg .av.is-bot{
  background:#ffffff;
  border-color:rgba(100,237,172,.55);
  box-shadow:0 1px 3px -1px rgba(40,110,85,.22);
}
.msg .av.is-bot svg{width:20px;height:20px}

.msg-body{max-width:min(462px,80%);display:flex;flex-direction:column;gap:5px}
.bubble{
  padding:10px 14px;
  border-radius:var(--r-lg);
  font-size:14.5px;line-height:1.62;
  white-space:pre-wrap;word-break:break-word;
  letter-spacing:-.003em;
  max-width:100%;
}
.msg.in .bubble{
  background:rgba(255,255,255,.88);
  border:1px solid rgba(255,255,255,.98);
  color:var(--ink);
  /* 头像在左上角，缺口也放左上，气炮才像从头像"长"出来 */
  border-top-left-radius:6px;
  backdrop-filter:blur(10px) saturate(150%);
  -webkit-backdrop-filter:blur(10px) saturate(150%);
  box-shadow:0 2px 10px -5px rgba(56,46,82,.18);
}
.msg.out{justify-content:flex-end}
.msg.out .msg-body{align-items:flex-end;max-width:min(462px,82%)}
.msg.out .bubble{
  background:linear-gradient(158deg,rgba(116,163,232,.96) 0%,rgba(62,111,198,.97) 100%);
  color:#fff;
  border:1px solid rgba(255,255,255,.16);
  border-bottom-right-radius:6px;
  backdrop-filter:blur(6px);
  -webkit-backdrop-filter:blur(6px);
  box-shadow:0 4px 14px -6px rgba(46,94,170,.55), inset 0 1px 0 rgba(255,255,255,.18);
}
.stamp{
  font-size:10.5px;color:var(--ink-3);
  padding:0 3px;font-variant-numeric:tabular-nums;
}
.msg.out .stamp{text-align:right}

/* 图片消息 */
.bubble-img{
  max-width:260px;max-height:320px;
  border-radius:var(--r-md);
  border:1px solid var(--hair);
  background:var(--surface-3);
  object-fit:cover;
  display:block;
}

/* 系统提示 / 撤回占位 */
.sys-line{
  align-self:center;max-width:88%;
  display:flex;align-items:center;gap:6px;
  padding:5px 11px;border-radius:999px;
  background:rgba(255,255,255,.55);
  border:1px solid var(--hair);
  font-size:11.5px;color:var(--ink-3);
  text-align:center;
  animation:msgIn .22s var(--ease) both;
}
.sys-line svg{width:12px;height:12px;flex:0 0 auto}
.sys-line[data-tone="sky"]{
  background:linear-gradient(var(--sky-soft),var(--sky-soft)),rgba(255,255,255,.6);
  color:var(--sky);border-color:var(--sky-line);
}
.sys-line[data-tone="amber"]{
  background:linear-gradient(var(--amber-soft),var(--amber-soft)),rgba(255,255,255,.6);
  color:var(--amber);border-color:var(--amber-line);
}
.sys-line[data-tone="rose"]{
  background:linear-gradient(var(--rose-soft),var(--rose-soft)),rgba(255,255,255,.6);
  color:var(--rose);border-color:var(--rose-line);
}

/* 发送失败 */
.msg.failed .bubble{
  background:linear-gradient(var(--rose-soft),var(--rose-soft)),rgba(255,255,255,.86);
  color:var(--rose);
  border-color:var(--rose-line);
}
.msg.failed .stamp{color:var(--rose)}
.retry-btn{
  margin-left:6px;padding:0 6px;height:18px;
  border-radius:5px;border:1px solid var(--rose-line);
  background:rgba(255,255,255,.8);
  font-size:10.5px;color:var(--rose);
  vertical-align:middle;
}
.retry-btn:hover{background:var(--rose-soft)}

/* 历史消息：向上翻页 */
.more-btn{
  display:block;margin:4px auto 16px;padding:6px 15px;
  border:1px solid var(--line);border-radius:999px;
  background:rgba(255,255,255,.72);color:var(--ink-3);
  font-size:12px;cursor:pointer;transition:.15s;
}
.more-btn:hover{color:var(--brand);border-color:var(--brand-line);background:#fff}
.more-btn[hidden]{display:none}
.more-btn:disabled{opacity:.6;cursor:default}

/* 新消息 / 回到最新 */
.jump{
  position:absolute;left:50%;bottom:132px;transform:translateX(-50%) translateY(6px);
  display:inline-flex;align-items:center;gap:6px;
  height:31px;padding:0 13px;
  border-radius:999px;
  background:linear-gradient(150deg,#7aabee,#4b81d6);
  color:#fff;font-size:12px;
  box-shadow:0 4px 14px -6px rgba(46,94,170,.5);
  opacity:0;pointer-events:none;
  transition:.18s var(--ease);
  z-index:3;
}
.jump.show{opacity:1;pointer-events:auto;transform:translateX(-50%) translateY(0)}
.jump svg{width:13px;height:13px}

/* ---------------------------------------------------------------- 输入区 */
.composer-wrap{flex:0 0 auto;padding:8px 20px 18px;position:relative}
.composer{
  max-width:708px;margin:0 auto;
  background:rgba(255,255,255,.70);
  border:1px solid rgba(255,255,255,.95);
  border-radius:var(--r-lg);
  backdrop-filter:blur(20px) saturate(165%);
  -webkit-backdrop-filter:blur(20px) saturate(165%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9), 0 6px 22px -14px rgba(56,46,82,.34);
  transition:border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
.composer:focus-within{
  border-color:rgba(79,134,217,.52);
  background:rgba(255,255,255,.82);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.95), 0 0 0 4px rgba(79,134,217,.11);
}
#v-text{
  display:block;width:100%;
  padding:11px 14px 2px;
  font-size:14.5px;line-height:1.6;
  min-height:44px;max-height:132px;
  overflow-y:auto;
  /* textarea 自身的边框 / 底色要清掉，否则玻璃里会套一个白框 */
  border:0;outline:none;background:transparent;resize:none;
}
#v-text::placeholder{color:var(--ink-4)}
#v-text::-webkit-scrollbar{width:6px}
#v-text::-webkit-scrollbar-thumb{background:rgba(74,84,140,.18);border-radius:3px}

.composer-bar{display:flex;align-items:center;gap:2px;padding:4px 8px 8px}
.composer-bar .icon-btn{width:30px;height:30px}
.composer-bar .spacer{flex:1}
.send-hint{font-size:11px;color:var(--ink-3);margin-right:8px;transition:opacity .2s}

.send-btn{
  width:32px;height:32px;flex:0 0 32px;
  border-radius:50%;
  background:linear-gradient(150deg,#7aabee 0%,#4b81d6 100%);
  color:#fff;
  display:grid;place-items:center;
  transition:.16s var(--ease);
  box-shadow:0 2px 7px -2px rgba(46,94,170,.46), inset 0 1px 0 rgba(255,255,255,.12);
}
.send-btn svg{width:16px;height:16px}
.send-btn:hover{box-shadow:0 4px 12px -3px rgba(46,94,170,.55), inset 0 1px 0 rgba(255,255,255,.16);transform:translateY(-.5px)}
.send-btn:active{transform:scale(.94)}
.send-btn:disabled{background:var(--surface-3);color:var(--ink-4);box-shadow:none;cursor:not-allowed;transform:none}

/* ---------------------------------------------------------------- 快捷提问 */
.quick-start{
  /* 原来是 grid + 1fr，宽屏会被拉成一整排等宽按钮，像工具条；
     改成 flex 后按钮按文字取宽，放不下自动换行 */
  display:flex;flex-wrap:wrap;
  gap:8px;
  margin-top:0;
  max-width:100%;
}
.qs-card{
  display:flex;align-items:center;justify-content:center;gap:3px;
  height:34px;padding:0 12px;
  flex:0 1 auto;
  min-width:0;max-width:100%;
  border:1px solid var(--brand-line);
  border-radius:9px;
  background:var(--brand-soft);
  transition:.14s var(--ease);
}
.qs-card-title{
  display:block;min-width:0;
  font-size:12px;font-weight:500;color:var(--brand);line-height:1;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.qs-card:hover{background:#dbe8fa;border-color:#a8c8ee}
.qs-card:active{transform:translateY(.5px)}
.qs-more{
  border-style:dashed;
  border-color:rgba(79,134,217,.42);
  background:rgba(255,255,255,.42);
}
.qs-more .qs-card-title{color:var(--ink-2);font-weight:500}
.qs-more svg{color:var(--brand);opacity:.6;flex:0 0 auto;transition:.15s var(--ease)}
.qs-more:hover{background:#eef4ff;border-color:var(--brand-line)}
.qs-more:hover svg{transform:translateX(1.5px);opacity:1}

/* ---------------------------------------------------------------- 表情面板 */
.emoji-pop{
  position:absolute;left:22px;bottom:calc(100% - 2px);z-index:6;
  width:290px;
  background:rgba(255,255,255,.78);
  border:1px solid rgba(255,255,255,.95);
  border-radius:var(--r-lg);
  backdrop-filter:blur(36px) saturate(190%);
  -webkit-backdrop-filter:blur(36px) saturate(190%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,1), 0 28px 68px -24px rgba(56,46,82,.44);
  padding:10px;
  display:grid;grid-template-columns:repeat(8,1fr);gap:1px;
  animation:popIn .16s var(--ease);
}
.emoji-pop[hidden]{display:none}
@keyframes popIn{from{opacity:0;transform:translateY(5px) scale(.985)}to{opacity:1;transform:none}}
.emoji-pop button{
  height:31px;border-radius:7px;
  font-size:18px;line-height:1;
  display:grid;place-items:center;
  transition:.12s;
}
.emoji-pop button:hover{background:var(--brand-soft);transform:scale(1.1)}

/* ---------------------------------------------------------------- 其它问题浮层 */
.qs-pop{
  position:absolute;left:50%;bottom:calc(100% - 2px);z-index:7;
  width:min(380px,calc(100% - 48px));
  background:rgba(255,255,255,.93);
  border:1px solid rgba(255,255,255,.98);
  border-radius:16px;
  backdrop-filter:blur(34px) saturate(180%);
  -webkit-backdrop-filter:blur(34px) saturate(180%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,1), 0 28px 68px -22px rgba(56,46,82,.46);
  padding:7px;
  /* 居中定位不能靠 transform 动画，单独写一条 */
  animation:popInCenter .18s var(--ease) both;
}
.qs-pop[hidden]{display:none}
@keyframes popInCenter{
  from{opacity:0;transform:translateX(-50%) translateY(6px) scale(.985)}
  to{opacity:1;transform:translateX(-50%) scale(1)}
}
.qs-pop-head{display:flex;align-items:center;gap:6px;padding:2px 7px 6px}
.qs-pop-head b{
  font-size:10.5px;font-weight:700;letter-spacing:.09em;
  text-transform:uppercase;color:var(--ink-3);
}
.qs-pop-head span{
  margin-left:auto;font-size:10.5px;color:var(--ink-4);
  font-variant-numeric:tabular-nums;
}
.qs-pop-list{
  display:flex;flex-direction:column;gap:3px;
  max-height:min(430px,calc(100vh - 240px));overflow-y:auto;
  overscroll-behavior:contain;
}
.qs-pop-list::-webkit-scrollbar{width:6px}
.qs-pop-list::-webkit-scrollbar-thumb{background:rgba(74,84,140,.18);border-radius:3px}

.qs-pop-item{
  display:flex;flex-direction:column;gap:1px;
  width:100%;padding:8px 10px;
  border-radius:10px;
  background:rgba(255,255,255,.9);
  border:1px solid rgba(74,84,140,.07);
  text-align:left;
  transition:.13s var(--ease);
}
.qs-pop-item .t{
  display:block;max-width:100%;
  font-size:12.5px;font-weight:600;color:var(--ink);line-height:1.4;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.qs-pop-item .d{
  display:block;max-width:100%;
  font-size:11px;color:var(--ink-2);line-height:1.45;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.qs-pop-item:hover{background:#fff;border-color:var(--brand-line);transform:translateY(-1px)}
.qs-pop-item:active{transform:none}

/* ---------------------------------------------------------------- 评价弹窗 */
.overlay{
  position:absolute;inset:0;z-index:20;
  background:rgba(38,30,56,.16);
  backdrop-filter:blur(9px) saturate(125%);
  -webkit-backdrop-filter:blur(9px) saturate(125%);
  display:grid;place-items:center;
  padding:24px;
  animation:fadeIn .2s var(--ease);
}
.overlay[hidden]{display:none}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}

.modal{
  position:relative;
  width:min(378px,100%);
  background:rgba(255,255,255,.82);
  border-radius:var(--r-xl);
  border:1px solid rgba(255,255,255,.96);
  backdrop-filter:blur(40px) saturate(185%);
  -webkit-backdrop-filter:blur(40px) saturate(185%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,1), 0 34px 80px -28px rgba(56,46,82,.5);
  padding:26px 26px 22px;
  text-align:center;
  animation:modalIn .24s var(--ease);
}
@keyframes modalIn{from{opacity:0;transform:translateY(10px) scale(.985)}to{opacity:1;transform:none}}

.modal-close{
  position:absolute;top:12px;right:12px;
  width:28px;height:28px;border-radius:7px;
  display:grid;place-items:center;color:var(--ink-4);
  transition:.14s;
}
.modal-close:hover{background:var(--surface-3);color:var(--ink-2)}

.modal-mark{
  width:44px;height:44px;margin:0 auto 14px;
  border-radius:12px;
  background:var(--brand-soft);color:var(--brand);
  display:grid;place-items:center;
}
.modal-mark svg{width:21px;height:21px}
.modal h2{font-size:16px;font-weight:600;letter-spacing:-.012em}
.modal p{font-size:12.5px;color:var(--ink-3);margin-top:6px;line-height:1.6}

.stars{display:flex;justify-content:center;gap:7px;margin:18px 0 4px}
.stars button{
  width:38px;height:38px;
  display:grid;place-items:center;
  color:rgba(110,100,130,.32);
  transition:.14s var(--ease);
}
.stars button svg{width:27px;height:27px}
.stars button:hover{transform:scale(1.09)}
.stars button.on{color:var(--gold)}
.stars button.on svg{fill:currentColor}

.star-label{
  font-size:12px;color:var(--ink-3);
  height:16px;margin-bottom:14px;
  transition:.15s;
}
.star-label[data-filled="1"]{color:var(--ink-2);font-weight:500}

.modal textarea{
  width:100%;
  border:1px solid rgba(255,255,255,.9);border-radius:var(--r-md);
  padding:9px 11px;
  font-size:13px;line-height:1.6;
  min-height:64px;
  background:rgba(255,255,255,.55);
  box-shadow:inset 0 1px 3px rgba(56,46,82,.06);
  transition:.15s;
}
.modal textarea:focus{border-color:var(--brand-line);background:#fff;outline:none;box-shadow:0 0 0 3px rgba(79,134,217,.08)}
.modal textarea::placeholder{color:var(--ink-4)}

.btn-primary{
  width:100%;height:40px;margin-top:14px;
  border-radius:var(--r-md);
  background:linear-gradient(150deg,#7aabee 0%,#4b81d6 100%);
  color:#fff;font-size:13.5px;font-weight:500;
  transition:.15s var(--ease);
  box-shadow:0 1px 3px rgba(46,94,170,.24);
}
.btn-primary:hover:not(:disabled){background:linear-gradient(150deg,#8ab6f2,#5689db)}
.btn-primary:active:not(:disabled){transform:translateY(.5px)}
.btn-primary:disabled{background:var(--surface-3);color:var(--ink-4);box-shadow:none;cursor:not-allowed}

.done-mark{
  width:52px;height:52px;margin:6px auto 16px;
  border-radius:50%;background:var(--brand-soft);color:var(--brand);
  display:grid;place-items:center;
  animation:doneIn .3s var(--ease);
}
@keyframes doneIn{from{transform:scale(.7);opacity:0}to{transform:none;opacity:1}}
.done-mark svg{width:26px;height:26px}

/* ---------------------------------------------------------------- 手机预览模式 */
body.v-chat.preview-mobile{padding:20px}
body.v-chat.preview-mobile .app{
  width:390px;
  height:min(800px,calc(100vh - 40px));
  grid-template-columns:1fr;
  border-radius:26px;
}
body.v-chat.preview-mobile .side{display:none}
body.v-chat.preview-mobile .chat-head{height:60px;padding:0 16px}
body.v-chat.preview-mobile .stream-fade{top:60px}
body.v-chat.preview-mobile .stream{padding:16px 14px 8px}
body.v-chat.preview-mobile .composer-wrap{padding:6px 12px 12px}
body.v-chat.preview-mobile .msg-body{max-width:82%}
body.v-chat.preview-mobile .send-hint{display:none}

/* ---------------------------------------------------------------- 响应式 */
@media (max-width:920px){
  body.v-chat{padding:0;display:block;overflow:hidden}
  .app{
    width:100%;height:100dvh;
    border:0;border-radius:0;box-shadow:none;
    grid-template-columns:1fr;
  }
  .side{display:none}
  .chat-head{height:58px;padding:0 14px}
  .stream-fade{top:58px}
  .stream{padding:16px 14px 6px}
  .composer-wrap{padding:6px 12px calc(12px + env(safe-area-inset-bottom))}
  .bubble{font-size:15px}
  .msg-body{max-width:82%}
  .quick-start{padding-left:0;margin-top:0}
  .qs-card{height:36px}
  .emoji-pop{left:12px;width:min(320px,calc(100vw - 48px))}
  .jump{bottom:118px}
  /* 触摸设备没有 Enter 键，这条提示留着是噪音 */
  .send-hint{display:none}
  .only-mobile{display:grid !important}
  body.v-chat.preview-mobile{padding:0}
  body.v-chat.preview-mobile .app{width:100%;height:100dvh;border-radius:0}
}

@media (max-width:420px){
  .sec{padding:20px 6px}
}

@media (prefers-reduced-motion:reduce){
  body.v-chat *,body.v-chat *::before,body.v-chat *::after{
    animation-duration:.001ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.001ms !important;
  }
  .orb{animation:none}
  .stream{scroll-behavior:auto}
}

/* 键盘可见焦点：鼠标点击不出现，Tab 时清晰可见 */
.head-act:focus-visible,
.hu-btn:focus-visible,
.hu-item:focus-visible,
.icon-btn:focus-visible,
.head-auth:focus-visible,
.conv-tabs a:focus-visible,
.aside-link:focus-visible{
  outline:2px solid var(--brand);
  outline-offset:2px;
}

/* 群聊：向上翻页 */
.g-older{
  display:block;margin:10px auto 6px;padding:5px 12px;
  border-radius:999px;border:1px solid var(--line);
  background:rgba(255,255,255,.72);color:var(--ink-3);
  font-size:11.5px;cursor:pointer;transition:.15s;
}
.g-older:hover{border-color:var(--brand-line);color:var(--brand)}
.g-older:disabled{opacity:.6;cursor:default}

/* 系统提示里的客服昵称 */
.sys-agent{color:var(--brand);font-weight:600;font-style:normal}

/* 转人工：输入栏左下角，发送图片右侧 */
.transfer-btn{
  display:inline-flex;align-items:center;gap:4px;
  height:28px;padding:0 10px;margin-left:5px;
  border-radius:999px;font-size:11.5px;font-weight:500;
  color:var(--brand);background:var(--brand-soft);
  border:1px solid var(--brand-line);
  transition:.14s var(--ease);
}
.transfer-btn:hover{background:#e9f2ff;border-color:#bcd6f7}
.transfer-btn:disabled{opacity:.45;cursor:not-allowed;background:var(--surface-2);border-color:var(--line)}
.transfer-btn svg{width:13px;height:13px}


/* 矮屏（如 1366x640 笔记本）：半栏高度有限，空态收紧，别把"消息中心"顶掉 */
@media (max-height:720px){
  .side-body{padding:8px 14px 6px}
  .sec{padding:10px 6px}
  .sec-head{margin-bottom:6px}
  .sec-grow > .empty{padding:8px 10px;gap:4px}
  .sec-grow > .empty svg{width:20px;height:20px}
  .sec-grow > .empty span{display:none}
  .side-login{margin-bottom:8px;padding:10px}
}
