






html, body { height: 100%; }
body { overflow: hidden; }

#app {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: #04060e;
}
@media (min-width: 520px) {
  #app {
    height: min(880px, 100dvh);
    margin-top: max(0px, calc((100dvh - 880px) / 2));
    border-radius: 30px;
    box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .06);
  }
}

.screen-stack {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(180deg, #070c18, #04060e);
  border-radius: inherit;
}


.safetop {
  position: relative;
  z-index: 6;
  flex: none;
  height: max(env(safe-area-inset-top), 14px);
}


.appbar { padding-top: 6px; }
.appbar .sp { flex: 1; }
.appbar .act {
  width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
  color: var(--gt); background: var(--glass-2); border: 1px solid var(--card-bd);
}
.appbar .act svg { width: 16px; height: 16px; }
.appbar .chat-reset-act {
  width: auto; min-width: 0; padding: 0 10px 0 9px; display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; line-height: 1; font-weight: 900; white-space: nowrap;
}
.appbar .chat-reset-act .act-plus {
  font-size: 19px; line-height: .8; font-weight: 900; transform: translateY(-1px);
}
.appbar .chat-reset-act .act-text { color: var(--ink); }


.tabbar { height: auto; padding: 8px 8px max(8px, env(safe-area-inset-bottom)); }


.has-tab .content { padding-bottom: 16px; }


.hidden { display: none !important; }
.row { display: flex; align-items: center; gap: 10px; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.center-col { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.txt-c { text-align: center; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.gap8 { gap: 8px; } .gap12 { gap: 12px; }


.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2.4px solid rgba(120, 200, 255, .25); border-top-color: var(--gt);
  animation: spin .8s linear infinite;
}
.spinner.lg { width: 34px; height: 34px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }

.loading-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--muted); font-size: 13px; }

.empty {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; text-align: center; padding: 30px 26px; color: var(--muted);
}
.empty .ei {
  width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; color: #86e9ff;
  background: linear-gradient(150deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .05));
  border: 1px solid rgba(120, 200, 255, .22);
}
.empty .ei svg { width: 30px; height: 30px; }
.empty .et { font-size: 15px; font-weight: 800; color: var(--ink); }
.empty .es { font-size: 12.5px; line-height: 1.7; max-width: 260px; }


#toast-host {
  position: fixed; left: 50%; top: 18px; transform: translateX(-50%);
  z-index: 9999; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none; width: max-content; max-width: 90vw;
}
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 9px;
  padding: 11px 16px; border-radius: 14px; font-size: 13px; font-weight: 700; color: var(--ink);
  background: rgba(18, 26, 46, .92); border: 1px solid var(--card-bd);
  box-shadow: 0 18px 44px -20px rgba(0, 0, 0, .8); backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  animation: toastIn .26s var(--ease); max-width: 88vw;
}
.toast.out { animation: toastOut .26s var(--ease) forwards; }
.toast .ti { width: 18px; height: 18px; flex: none; display: grid; place-items: center; }
.toast .ti svg { width: 18px; height: 18px; }
.toast.ok .ti { color: #38ffd0; } .toast.err .ti { color: #ff8aa0; } .toast.info .ti { color: var(--gt); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-12px); } }


.sheet-mask {
  position: absolute; inset: 0; z-index: 50; display: flex; align-items: flex-end;
  background: rgba(4, 8, 20, .55); backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px);
  opacity: 0; transition: opacity .3s var(--ease);
}
.sheet-mask.on { opacity: 1; }
.sheet {
  width: 100%; max-height: 86%; display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(20, 28, 50, .96), rgba(10, 15, 30, .98));
  border-top-left-radius: 26px; border-top-right-radius: 26px;
  border: 1px solid var(--card-bd); border-bottom: 0;
  box-shadow: 0 -24px 60px -20px rgba(0, 0, 0, .8);
  padding: 8px 18px max(18px, env(safe-area-inset-bottom));
  transform: translateY(100%); transition: transform .32s var(--ease);
}
.sheet-mask.on .sheet { transform: none; }
.sheet .grip { width: 40px; height: 4px; border-radius: 999px; background: rgba(255, 255, 255, .22); margin: 6px auto 12px; flex: none; }
.sheet .sh-title { font-size: 16px; font-weight: 900; margin-bottom: 4px; }
.sheet .sh-sub { font-size: 12px; color: var(--muted); margin-bottom: 12px; line-height: 1.6; }
.sheet .sh-body { overflow-y: auto; min-height: 0; }
.sheet .sh-body::-webkit-scrollbar { width: 0; }
.sheet .sh-actions { display: flex; gap: 10px; margin-top: 16px; flex: none; }


.field { margin-top: 12px; }
.field > label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin: 0 2px 7px; }
.input, .textarea {
  width: 100%; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 14px; color: var(--ink); font-size: 14px; padding: 13px 15px; outline: 0;
  font-family: inherit; transition: border-color .2s;
}
.input:focus, .textarea:focus { border-color: rgba(79, 214, 255, .6); }
.input::placeholder, .textarea::placeholder { color: var(--dim); }
.textarea { resize: none; line-height: 1.6; min-height: 120px; }
.input-count { font-size: 11px; color: var(--dim); text-align: right; margin-top: 5px; }
.btn.primary {
  color: #04121e; background: linear-gradient(120deg, #16E6FF, #2D78FF);
  border: 0; box-shadow: 0 14px 30px -12px rgba(45, 150, 255, .7);
}
.btn.danger { color: #fff; background: linear-gradient(135deg, #ff5a7a, #ff7a5a); border: 0; }
.btn[disabled] { opacity: .5; pointer-events: none; }


.ana-card { display: flex; flex-direction: column; gap: 12px; }
.ai-generated-notice {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 11px;
  color: var(--muted); font-size: 11.5px; line-height: 1.45;
  background: rgba(72, 175, 255, .08); border: 1px solid rgba(92, 190, 255, .24);
}
.ai-generated-badge {
  flex: none; padding: 3px 7px; border-radius: 999px; color: #061222;
  font-size: 10.5px; line-height: 1.2; font-weight: 900;
  background: linear-gradient(135deg, #5edfff, #86a7ff);
}
.ana-sec { position: relative; }
.ana-sec .sec-h { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 900; color: var(--muted); margin-bottom: 8px; letter-spacing: 0; }
.ana-sec .sec-h .dotc { width: 7px; height: 7px; border-radius: 50%; background: rgb(var(--g)); box-shadow: 0 0 10px rgb(var(--g)); flex: none; }
.ana-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tag {
  font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 999px; color: var(--ink);
  background: rgba(255, 255, 255, .07); border: 1px solid var(--card-bd);
}
.tag.warn { color: #ffd08a; border-color: rgba(255, 190, 110, .3); background: rgba(255, 170, 70, .08); }
.ana-text { font-size: 15px; line-height: 1.75; color: var(--ink); }
.reply {
  border-radius: 15px; padding: 12px 13px; background: rgba(255, 255, 255, .05);
  border: 1px solid var(--card-bd); margin-bottom: 9px;
}
.reply:last-child { margin-bottom: 0; }
.reply .rh { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.reply .rt { font-size: 14px; font-weight: 900; color: var(--gt); }
.reply .rc { font-size: 15px; line-height: 1.75; color: var(--ink); white-space: pre-wrap; }
.copy-btn {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 800; color: var(--gt);
  padding: 5px 11px; border-radius: 999px; background: rgba(120, 200, 255, .1); border: 1px solid rgba(120, 200, 255, .25);
  transition: transform .15s;
}
.copy-btn:active { transform: scale(.94); }
.copy-btn svg { width: 13px; height: 13px; }
.copy-btn.ok { color: #38ffd0; border-color: rgba(56, 255, 208, .4); background: rgba(56, 255, 208, .12); }
.ol-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 7px; }
.ol-list li { font-size: 14.5px; line-height: 1.7; color: var(--ink); }
.ana-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border-top: 1px solid var(--line); padding-top: 11px; margin-top: 2px;
}
.ana-foot .cost { font-size: 12px; color: var(--muted); }
.ana-foot .cost b { color: var(--gt); }
.ana-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.fb-group { display: inline-flex; align-items: center; gap: 6px; }
.fb-btn {
  width: 34px; height: 34px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted); background: rgba(255, 255, 255, .04); border: 1px solid var(--card-bd);
  transition: transform .15s, color .15s, border-color .15s, background .15s, box-shadow .15s;
}
.fb-btn .fb-ico,
.fb-btn svg { width: 17px; height: 17px; display: block; }
.fb-btn:active { transform: scale(.92); }
.fb-btn:disabled { opacity: .45; pointer-events: none; }
.fb-btn.on {
  color: #2fe6c3;
  border-color: rgba(47, 230, 195, .55);
  background: rgba(47, 230, 195, .14);
  box-shadow: 0 0 0 1px rgba(47, 230, 195, .12), 0 6px 14px -8px rgba(47, 230, 195, .55);
}
.fb-btn.on .fb-ico { fill: rgba(47, 230, 195, .22); }
.fb-btn.on.down {
  color: #ff8aa3;
  border-color: rgba(255, 138, 163, .55);
  background: rgba(255, 90, 130, .14);
  box-shadow: 0 0 0 1px rgba(255, 138, 163, .12), 0 6px 14px -8px rgba(255, 90, 130, .5);
}
.fb-btn.on.down .fb-ico { fill: rgba(255, 138, 163, .22); }


.kb-radar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.kb-chip {
  display: inline-flex; align-items: center; gap: 5px;
  width: auto; height: auto; min-height: 0;
  font-size: 11px; font-weight: 750; line-height: 1; letter-spacing: .02em;
  padding: 6px 10px; border-radius: 999px;
}
.kb-chip-ico { width: 12px; height: 12px; flex: none; }
.kb-chip.radar {
  color: #ffb861; background: rgba(255, 170, 70, .12); border: 1px solid rgba(255, 170, 70, .32);
}
.kb-chip.kb-stage {
  color: #7ee0b0; background: rgba(90, 220, 160, .1); border: 1px solid rgba(90, 220, 160, .3);
}

.kb-cite {
  margin-top: 2px; padding-top: 10px; border-top: 1px dashed var(--line);
  display: flex; flex-direction: column; gap: 7px;
}
.kb-cite-h {
  font-size: 11.5px; font-weight: 800; color: var(--muted); letter-spacing: .02em;
}
.kb-cite-list { display: flex; flex-wrap: wrap; gap: 6px; }
.kb-cite-item {
  max-width: 100%; font-size: 11px; font-weight: 650; line-height: 1.35; color: var(--gt);
  padding: 5px 9px; border-radius: 999px; background: rgba(120, 200, 255, .08);
  border: 1px solid rgba(120, 200, 255, .22);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}


.bubble.them.analysis { max-width: 100%; width: 100%; padding: 14px; }


.bubble.me .mini-imgs { display: flex; gap: 6px; margin-top: 7px; flex-wrap: wrap; }
.bubble.me .mini-imgs img { width: 54px; height: 54px; border-radius: 9px; object-fit: cover; border: 1px solid rgba(255, 255, 255, .3); }


.pend-imgs { display: flex; gap: 8px; flex-wrap: wrap; padding: 8px 10px; margin: 0 0 6px; background: var(--glass-2); border: 1px solid var(--card-bd); border-radius: 14px; }
.pend-imgs[hidden] { display: none; }
.pend-imgs .pi { position: relative; width: 56px; height: 56px; }
.pend-imgs .pi img { width: 100%; height: 100%; border-radius: 10px; object-fit: cover; border: 1px solid rgba(255, 255, 255, .25); display: block; }
.pend-imgs .pi .rm { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%; background: rgba(10, 14, 26, .92); color: #fff; font-size: 12px; line-height: 18px; text-align: center; border: 1px solid rgba(255, 255, 255, .35); cursor: pointer; }
.pend-imgs .pi-hint { align-self: center; font-size: 11.5px; color: var(--muted); }


.chat-empty { overflow-y: auto; }
.chat-empty::-webkit-scrollbar { width: 0; }
.chat-empty .ce-inner { width: 100%; max-width: 430px; margin: auto; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 12px 0; }
.mode-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; margin-top: 12px; }
.mode-big { position: relative; min-height: 196px; padding: 16px 15px; cursor: pointer; text-align: left;
  background: linear-gradient(168deg, rgba(26, 158, 255, .5), rgba(40, 100, 230, .42) 52%, rgba(16, 46, 116, .55));
  border-color: rgba(105, 200, 255, .45);
  backdrop-filter: blur(16px) saturate(1.5); -webkit-backdrop-filter: blur(16px) saturate(1.5);
  transition: transform .18s var(--ease); }
.mode-big.wx { background: linear-gradient(168deg, rgba(44, 214, 186, .48), rgba(24, 146, 214, .42) 55%, rgba(14, 66, 128, .55));
  border-color: rgba(88, 226, 200, .42); }
.mode-big:active { transform: scale(.982); }
.mode-big::after { background: linear-gradient(180deg, rgba(7, 12, 26, 0) 55%, rgba(7, 12, 26, .24)); }
.mode-big .sc-canvas { opacity: .85; }
.mode-big .mb-body { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 11px; height: 100%; }
.mode-big .mb-ic { width: 48px; height: 48px; border-radius: 16px; flex: none; display: grid; place-items: center; color: var(--ink-on);
  background: linear-gradient(150deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, .14) 46%, rgba(255, 255, 255, 0) 64%), linear-gradient(135deg, rgb(var(--g)), rgb(var(--g2)));
  box-shadow: 0 14px 30px -12px rgba(var(--g), .8), inset 0 0 0 1.5px rgba(255, 255, 255, .5), inset 0 1px 0 rgba(255, 255, 255, .8); }
.mode-big .mb-ic svg { width: 24px; height: 24px; }
.mode-big.wx .mb-ic { background: linear-gradient(150deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, .14) 46%, rgba(255, 255, 255, 0) 64%), linear-gradient(135deg, #38ffd0, #16a6ff);
  box-shadow: 0 14px 30px -12px rgba(56, 255, 208, .6), inset 0 0 0 1.5px rgba(255, 255, 255, .5), inset 0 1px 0 rgba(255, 255, 255, .8); }
.mode-big .mb-copy { flex: 1; min-width: 0; }
.mode-big .mb-t { font-size: 19px; font-weight: 900; letter-spacing: -.01em; font-family: var(--font-display); color: #fff; }
.mode-big .mb-s { font-size: 11.5px; color: rgba(235, 245, 255, .78); margin-top: 4px; white-space: nowrap; }
.mode-big .mb-btn { align-self: stretch; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px;
  font-size: 13px; font-weight: 900; color: var(--ink-on);
  background: linear-gradient(120deg, #9ff0ff, #2D78FF); box-shadow: 0 10px 22px -8px rgba(45, 150, 255, .72); }
.mode-big.wx .mb-btn { background: linear-gradient(120deg, #8dffe4, #16a6ff); box-shadow: 0 10px 22px -8px rgba(40, 210, 190, .6); }
[data-theme="light"] .mode-big { background: linear-gradient(168deg, rgba(70, 175, 255, .5), rgba(110, 155, 255, .36) 55%, rgba(235, 245, 255, .6)); border-color: rgba(40, 140, 230, .38); }
[data-theme="light"] .mode-big.wx { background: linear-gradient(168deg, rgba(60, 215, 190, .48), rgba(70, 170, 235, .34) 55%, rgba(235, 248, 255, .6)); border-color: rgba(30, 180, 160, .36); }
[data-theme="light"] .mode-big::after { background: linear-gradient(180deg, rgba(255, 255, 255, 0) 60%, rgba(228, 240, 251, .35)); }
[data-theme="light"] .mode-big .mb-t { color: #0e1830; }
[data-theme="light"] .mode-big .mb-s { color: #3d5578; }


.chat-input[hidden] { display: none !important; }
.plus-wrap { position: relative; flex: none; }
.plus-btn { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: var(--gt);
  background: var(--glass-2); border: 1px solid var(--card-bd); transition: color .2s, border-color .2s; }
.plus-btn svg { width: 19px; height: 19px; transition: transform .3s var(--ease); }
.plus-btn.open svg { transform: rotate(45deg); }
.plus-btn.open { color: #ff9db0; border-color: rgba(255, 140, 165, .38); }
.plus-menu { position: absolute; left: 0; bottom: calc(100% + 14px); z-index: 30; min-width: 238px;
  display: flex; flex-direction: column; gap: 2px; padding: 8px; border-radius: 18px;
  background: rgba(15, 22, 42, .97); border: 1px solid var(--card-bd);
  box-shadow: 0 26px 60px -22px rgba(0, 0, 0, .85), inset 0 1px 0 rgba(255, 255, 255, .12);
  backdrop-filter: blur(24px) saturate(1.4); -webkit-backdrop-filter: blur(24px) saturate(1.4);
  transform-origin: 13px 100%; transform: scale(.86) translateY(10px); opacity: 0; pointer-events: none;
  transition: transform .24s var(--ease), opacity .2s var(--ease); }
.plus-menu.open { transform: none; opacity: 1; pointer-events: auto; }
.plus-menu::after { content: ""; position: absolute; left: 15px; top: 100%; border: 7px solid transparent; border-top-color: rgba(15, 22, 42, .97); }
.pm-item { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 13px; text-align: left; transition: background .15s; }
.pm-item:hover, .pm-item:active { background: rgba(255, 255, 255, .07); }
.pm-ic { width: 38px; height: 38px; border-radius: 12px; flex: none; display: grid; place-items: center; color: #86e9ff;
  background: linear-gradient(150deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .05)); border: 1px solid rgba(120, 200, 255, .24); }
.pm-ic svg { width: 19px; height: 19px; }
.pm-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pm-t { font-size: 13.5px; font-weight: 800; color: var(--ink); }
.pm-s { font-size: 11px; color: var(--muted); }
.send-txt { height: 38px; padding: 0 17px; border-radius: 12px; flex: none; font-size: 13.5px; font-weight: 900; color: var(--ink-on);
  background: linear-gradient(135deg, rgb(var(--g)), rgb(var(--g2))); box-shadow: 0 10px 22px -8px rgba(var(--g), .8);
  transition: transform .15s; }
.send-txt:active { transform: scale(.94); }
[data-theme="light"] .plus-menu { background: rgba(255, 255, 255, .97); box-shadow: 0 26px 60px -24px rgba(40, 80, 150, .5), inset 0 1px 0 rgba(255, 255, 255, .9); }
[data-theme="light"] .plus-menu::after { border-top-color: rgba(255, 255, 255, .97); }
[data-theme="light"] .pm-ic { color: var(--gt); background: linear-gradient(150deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .4)); border-color: rgba(28, 120, 200, .3); }
[data-theme="light"] .pm-item:hover, [data-theme="light"] .pm-item:active { background: rgba(20, 70, 140, .08); }


.sk-lines { display: flex; flex-direction: column; gap: 8px; padding: 2px 0 4px; }
.sk-lines i { display: block; height: 12px; border-radius: 6px;
  background: linear-gradient(90deg, rgba(140, 200, 255, .08), rgba(140, 200, 255, .2), rgba(140, 200, 255, .08));
  background-size: 200% 100%; animation: skshine 1.15s linear infinite; }
.sk-lines i:nth-child(1) { width: 92%; }
.sk-lines i:nth-child(2) { width: 74%; animation-delay: .12s; }
.sk-lines i:nth-child(3) { width: 58%; animation-delay: .24s; }
@keyframes skshine { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.streaming-content[hidden] { display: none; }
[data-theme="light"] .sk-lines i { background: linear-gradient(90deg, rgba(30, 100, 190, .1), rgba(30, 100, 190, .22), rgba(30, 100, 190, .1)); background-size: 200% 100%; }


.typing { display: inline-flex; gap: 4px; align-items: center; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--gt); opacity: .5; animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }


.voice-ov .vtimer { font-size: 30px; font-weight: 900; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.voice-ov .vbtns { display: flex; gap: 14px; }


.voice-ov.tele {
  justify-content: flex-start;
  padding-top: max(48px, env(safe-area-inset-top));
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  background:
    radial-gradient(120% 86% at 84% -12%, rgba(45, 120, 255, .42), transparent 62%),
    radial-gradient(100% 70% at -6% 24%, rgba(22, 230, 255, .2), transparent 56%),
    radial-gradient(130% 100% at 50% 118%, rgba(139, 61, 255, .3), transparent 62%),
    linear-gradient(180deg, #0a1330, #04060e 78%);
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.tele-panel { width: 100%; max-width: 440px; flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; }

.tele-head { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex: none; }
.tele-head-main { min-width: 0; display: flex; align-items: center; gap: 12px; }
.tele-head-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.tele-head .vtimer { font-size: 30px; line-height: 1; }
.tele-orb { position: relative; width: 64px; height: 64px; flex: none; }
.tele-orb::before { content: ""; position: absolute; inset: -42%; z-index: 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 50% 47%, rgba(70,175,255,.5), rgba(45,120,255,.24) 48%, transparent 72%);
  filter: blur(11px); animation: pulse 4.8s ease-in-out infinite; }
.tele-orb canvas { position: relative; z-index: 1; width: 100%; height: 100%; display: block;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 58%, rgba(0,0,0,.5) 74%, transparent 86%);
  mask-image: radial-gradient(circle at 50% 50%, #000 58%, rgba(0,0,0,.5) 74%, transparent 86%); }
.tele-status { font-size: 12px; color: var(--muted); line-height: 1.55; flex: none; text-align: center; min-height: 18px; }

.tele-workspace { flex: 1; min-height: 0; display: grid; grid-template-rows: minmax(150px, .72fr) minmax(220px, 1.28fr); gap: 10px; }
.tele-box { min-height: 0; display: flex; flex-direction: column; overflow: hidden; border-radius: 16px;
  background: rgba(255, 255, 255, .055); border: 1px solid rgba(120, 180, 255, .18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.055); }
.tele-ai-box { background: linear-gradient(145deg, rgba(30, 132, 255, .12), rgba(114, 70, 255, .08)); border-color: rgba(92, 172, 255, .3); }
.tele-ai-box .tele-box-head { font-size: 14px; }
.tele-ai-box > .ai-generated-notice { margin: 8px 10px 0; flex: none; }
.tele-box-head { flex: none; min-height: 39px; padding: 8px 11px; display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid rgba(120, 180, 255, .13); color: #e8f2ff; font-size: 12.5px; font-weight: 800; }
.tele-box-head small { margin-left: auto; color: #7894bb; font-size: 10.5px; font-weight: 650; }
.tele-analyze-btn { margin-left: auto; min-height: 25px; padding: 0 9px; border-radius: 8px; color: #061222;
  font-size: 10.5px; font-weight: 850; background: linear-gradient(135deg, #5edfff, #86a7ff); box-shadow: 0 6px 15px -10px rgba(94,223,255,.9); }
.tele-analyze-btn:disabled { opacity: .6; cursor: wait; }

.tele-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 11px; padding: 10px 11px; text-align: left; }
.tele-list::-webkit-scrollbar { width: 0; }
.tele-item { background: none; border: 0; padding: 0; }

.tele-item .tt { display: none; }
.tele-item .tc { white-space: pre-wrap; word-break: break-word; }

.tele-item.cust .tt,
.tele-item.sales .tt { display: inline; margin-right: 7px; font-size: 12px; line-height: 1.6; font-weight: 800; }
.tele-item.cust,
.tele-item.sales { padding: 8px 10px; border-radius: 10px; border-left: 3px solid transparent; }
.tele-item.cust { background: rgba(36, 205, 255, .085); border-left-color: #39d9ff; }
.tele-item.sales { background: rgba(255, 183, 77, .085); border-left-color: #ffb74d; }
.tele-item.cust .tt { color: #4fe1ff; }
.tele-item.cust .tc { display: inline; color: #c3f4ff; font-size: 12.5px; line-height: 1.6; font-weight: 560; }
.tele-item.sales .tt { color: #ffc86f; }
.tele-item.sales .tc { display: inline; color: #ffe1ae; font-size: 12.5px; line-height: 1.6; font-weight: 560; opacity: 1; }
.tele-item.cust[data-kind="转写中"] .tt { display: none; }

.tele-item.spk .tt {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  color: #7a93b4;
  margin-bottom: 4px;
  opacity: .9;
}
.tele-item.spk .tc { color: #8aa0bc; font-size: 12.5px; line-height: 1.6; font-weight: 500; opacity: .92; }
.tele-item.ai { padding: 2px 1px; }
.tele-item.ai + .tele-item.ai { margin-top: 5px; padding-top: 16px; border-top: 1px solid rgba(126, 184, 255, .28); }
.tele-item.ai .tt { display: block; margin-bottom: 9px; color: #72ddff; font-size: 11.5px; font-weight: 750; }
.tele-item.ai .tc { color: #f4f8ff; font-size: 14.5px; line-height: 1.7; font-weight: 500; }
.tele-item.ai .tc > p { margin: 0 0 9px; }
.tele-ai-direction { display: grid; grid-template-columns: 25px minmax(0, 1fr); gap: 4px; align-items: start; margin: 0 0 12px; }
.tele-ai-direction:last-child { margin-bottom: 0; }
.tele-ai-index { color: #72ddff; font-weight: 800; }
.tele-ai-direction strong { display: block; color: #fff; font-size: 14.5px; line-height: 1.45; font-weight: 800; }
.tele-ai-direction p { margin: 3px 0 0; color: #cbd9ee; font-size: 13.5px; line-height: 1.65; font-weight: 500; }
.tele-ai-empty { margin: auto; padding: 12px; color: #7894bb; font-size: 11.5px; line-height: 1.6; text-align: center; }
.tele-ai-cites { margin-top: 8px; padding-top: 7px; border-top: 1px dashed rgba(140, 175, 225, .28); color: #7f9cc4; font-size: 11.5px; line-height: 1.55; }
.tele-item.sys { align-self: center; text-align: center; max-width: 88%; }
.tele-item.sys .tt { display: none; }
.tele-item.sys .tc { color: var(--dim); font-size: 12px; line-height: 1.6; }
.tele-item.err .tt { color: #ff9db0; }
.tele-item.err .tc { color: #ff9db0; font-size: 14px; line-height: 1.65; }

.tele-ctl { display: flex; align-items: flex-start; justify-content: center; gap: 14px; flex: none; }
.tele-head-ctl { margin-left: auto; }
.tele-head-ctl .tcb { gap: 4px; }
.tele-head-ctl .tcb .tcb-ic { width: 46px; height: 46px; }
.tele-head-ctl .tcb .tcb-ic svg { width: 19px; height: 19px; }
.tele-head-ctl .tcb .tcb-t { font-size: 10.5px; }

.tele-spk-bind {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 0;
  background: rgba(255, 255, 255, .06);
  border: 0;
  border-bottom: 1px solid rgba(120, 180, 255, .16);
}
.tele-spk-bind.is-hidden { display: none; }
.tele-spk-bind-tip {
  font-size: 10.5px;
  font-weight: 650;
  color: var(--dim);
  text-align: center;
}
.tele-spk-bind-btns {
  display: flex;
  gap: 6px;
  margin-left: auto;
}
.tele-spk-bind-btn {
  min-width: 82px;
  height: 28px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  background: rgba(var(--g), .12);
  border: 1px solid rgba(var(--g), .42);
  cursor: pointer;
}
.tele-spk-bind-btn:active { transform: scale(.97); }
[data-theme="light"] .tele-spk-bind {
  background: rgba(20, 40, 80, .05);
  border-color: rgba(40, 80, 140, .16);
}
[data-theme="light"] .tele-item.spk .tt { color: #5e7799; }
[data-theme="light"] .tele-item.spk .tc { color: #4d6485; }
.tcb { display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; }
.tcb .tcb-ic { width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; color: #eaf4ff;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 16px 32px -18px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .2);
  backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  transition: transform .16s var(--ease), background .2s; }
.tcb .tcb-ic svg { width: 24px; height: 24px; }
.tcb:active .tcb-ic { transform: scale(.92); }
.tcb .tcb-t { font-size: 12px; font-weight: 700; color: var(--muted); }
.tcb.paused .tcb-ic { color: var(--ink-on); background: linear-gradient(135deg, rgb(var(--g)), rgb(var(--g2))); border-color: transparent;
  box-shadow: 0 16px 34px -14px rgba(45, 150, 255, .8); }
.tcb.danger .tcb-ic { color: #fff; background: linear-gradient(135deg, #ff5a7a, #ff7a5a); border-color: transparent;
  box-shadow: 0 16px 34px -14px rgba(255, 90, 122, .7); }

[data-theme="light"] .voice-ov.tele {
  background:
    radial-gradient(120% 86% at 84% -12%, rgba(110, 185, 255, .48), transparent 62%),
    radial-gradient(100% 70% at -6% 24%, rgba(70, 220, 255, .3), transparent 56%),
    radial-gradient(130% 100% at 50% 118%, rgba(175, 140, 255, .3), transparent 62%),
    linear-gradient(180deg, #ecf3fd, #dfeaf9 78%);
}
[data-theme="light"] .tele-item.cust { background: rgba(0, 158, 219, .09); border-left-color: #009edb; }
[data-theme="light"] .tele-item.sales { background: rgba(230, 139, 0, .09); border-left-color: #df8500; }
[data-theme="light"] .tele-item.cust .tc { color: #145772; }
[data-theme="light"] .tele-item.cust .tt { color: #007ea8; }
[data-theme="light"] .tele-item.sales .tc { color: #6b480d; }
[data-theme="light"] .tele-item.sales .tt { color: #a75f00; }
[data-theme="light"] .tele-item.ai .tc { color: #0f1c36; }
[data-theme="light"] .tele-item.ai .tt,
[data-theme="light"] .tele-ai-index { color: #007ea8; }
[data-theme="light"] .tele-ai-direction strong { color: #0f1c36; }
[data-theme="light"] .tele-ai-direction p { color: #425674; }
[data-theme="light"] .tele-box { background: rgba(255,255,255,.55); border-color: rgba(40, 100, 170, .16); }
[data-theme="light"] .tele-ai-box { background: linear-gradient(145deg, rgba(225,244,255,.86), rgba(235,230,255,.7)); border-color: rgba(50,125,220,.24); }
[data-theme="light"] .tele-box-head { color: #14233e; border-bottom-color: rgba(40,100,170,.12); }
[data-theme="light"] .tele-ai-empty { color: #607594; }
[data-theme="light"] .tele-ai-cites { color: #5f7290; border-top-color: rgba(60, 110, 180, .22); }
[data-theme="light"] .tcb .tcb-ic { color: #14335c; background: rgba(255, 255, 255, .74); border-color: rgba(28, 120, 200, .3); }
[data-theme="light"] .tcb .tcb-t { color: #43536f; }
[data-theme="light"] .tcb.paused .tcb-ic { color: var(--ink-on); background: linear-gradient(135deg, rgb(var(--g)), rgb(var(--g2))); border-color: transparent; }
[data-theme="light"] .tcb.danger .tcb-ic { color: #fff; background: linear-gradient(135deg, #ff5a7a, #ff7a5a); border-color: transparent; }


.thumbs { display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: 12px; }
.thumb { position: relative; width: 66px; height: 66px; border-radius: 12px; overflow: hidden; border: 1px solid var(--card-bd); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .del { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .6); color: #fff; }
.thumb .del svg { width: 11px; height: 11px; }


.badge { font-size: 10.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px; }
.badge.paid { color: #04121e; background: linear-gradient(120deg, #16E6FF, #38ffd0); }
.badge.pending { color: #ffd08a; background: rgba(255, 180, 80, .14); border: 1px solid rgba(255, 180, 80, .3); }
.badge.failed, .badge.closed { color: #ff8aa0; background: rgba(255, 110, 140, .12); border: 1px solid rgba(255, 110, 140, .3); }


.detail-block { margin-top: 12px; }
.detail-block .dl { font-size: 12px; font-weight: 800; color: var(--muted); margin-bottom: 6px; }
.session-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 8px; padding: 9px 11px; border-radius: 12px;
  font-size: 11px; color: var(--muted); background: rgba(29, 211, 150, .08); border: 1px solid rgba(48, 220, 166, .22); }
.session-summary b { color: #30dca6; font-size: 11.5px; }
.session-turn { padding-top: 13px; border-top: 1px solid var(--line); }
.session-turn:first-of-type { border-top: 0; }
.raw-text {
  font-size: 13px; line-height: 1.7; color: var(--ink); white-space: pre-wrap; word-break: break-word;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 12px; padding: 12px;
}

.bubble.tele-archive {
  align-self: stretch; width: 100%; max-width: 100%; padding: 0; border-radius: 16px;
  background: transparent; color: var(--ink);
}
.tele-archive-card {
  overflow: hidden; border: 1px solid var(--card-bd); border-radius: 16px;
  background: linear-gradient(145deg, rgba(25, 42, 75, .72), rgba(10, 20, 42, .72));
  box-shadow: 0 16px 34px -26px rgba(41, 160, 255, .68);
}
.tele-archive-head {
  display: flex; align-items: center; gap: 8px; padding: 11px 14px;
  color: var(--muted); font-size: 12px; font-weight: 800;
  border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .025);
}
.tele-archive-rows { display: flex; flex-direction: column; padding: 5px 0; }
.tele-archive-row {
  display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 11px;
  align-items: start; padding: 10px 14px;
}
.tele-archive-row + .tele-archive-row { border-top: 1px solid rgba(255, 255, 255, .045); }
.tele-archive-role {
  display: inline-flex; align-items: center; justify-content: center; min-height: 24px;
  padding: 4px 8px; border-radius: 999px; font-size: 11px; line-height: 1; font-weight: 850;
  white-space: nowrap;
}
.tele-archive-row.customer .tele-archive-role {
  color: #73e8c1; background: rgba(47, 220, 166, .12); border: 1px solid rgba(47, 220, 166, .3);
}
.tele-archive-row.sales .tele-archive-role {
  color: #80d7ff; background: rgba(63, 162, 255, .12); border: 1px solid rgba(63, 162, 255, .3);
}
.tele-archive-text { min-width: 0; color: var(--ink); font-size: 14px; line-height: 1.72; word-break: break-word; }
.tele-archive-loading { display: inline-flex; align-items: center; gap: 10px; }
.tele-archive-loading .typing { margin-right: 2px; }
.tele-detail-transcript { border-top: 0; padding-top: 0; }

[data-theme="light"] .tele-archive-card {
  background: linear-gradient(145deg, rgba(246, 251, 255, .94), rgba(232, 243, 255, .9));
}
[data-theme="light"] .tele-archive-row + .tele-archive-row { border-top-color: rgba(48, 91, 145, .09); }


.invite-box { display: flex; align-items: center; gap: 10px; }
.invite-code {
  flex: 1; font-family: "SF Mono", ui-monospace, monospace; font-size: 22px; font-weight: 900; letter-spacing: .22em;
  color: var(--gt); text-align: center; padding: 12px; border-radius: 14px;
  background: rgba(120, 200, 255, .08); border: 1px dashed rgba(120, 200, 255, .4);
}


.bar .rm { margin-left: auto; color: #ff8aa0; padding: 6px; border-radius: 9px; }
.bar .rm svg { width: 17px; height: 17px; }


.legal { font-size: 13px; line-height: 1.85; color: var(--muted); }
.legal h3 { font-size: 14.5px; color: var(--ink); margin: 18px 0 6px; font-weight: 800; }
.legal p { margin: 0 0 10px; }
.legal strong { color: var(--ink); }


.seg { display: flex; gap: 6px; background: var(--glass-2); border: 1px solid var(--card-bd); border-radius: 13px; padding: 4px; }
.seg button { flex: 1; padding: 8px 0; border-radius: 10px; font-size: 12px; font-weight: 700; color: var(--muted); }
.seg button.on { color: var(--ink-on); background: linear-gradient(120deg, rgb(var(--g)), rgb(var(--g2))); }


.credit-switch { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); }
.switch { position: relative; width: 42px; height: 24px; border-radius: 999px; background: rgba(255, 255, 255, .12); border: 1px solid var(--card-bd); flex: none; transition: background .2s; }
.switch.on { background: linear-gradient(120deg, rgb(var(--g)), rgb(var(--g2))); }
.switch i { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch.on i { transform: translateX(18px); }


.kb-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.kb-chips button {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 11px; border-radius: 999px; max-width: 100%;
  font-size: 12px; font-weight: 700; color: var(--muted); line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: var(--glass-2); border: 1px solid var(--card-bd);
  transition: color .18s, background .18s, border-color .18s;
}
.kb-chips button.on {
  color: var(--ink-on);
  background: linear-gradient(120deg, rgb(var(--g)), rgb(var(--g2)));
  border-color: transparent;
  box-shadow: 0 8px 18px -8px rgba(45, 150, 255, .55);
}
.kb-chips .kb-b {
  font-style: normal; font-size: 9.5px; font-weight: 800; line-height: 1;
  padding: 3px 6px; border-radius: 999px; flex: none;
}
.kb-chips .kb-b.mine { color: #38ffd0; background: rgba(56, 255, 208, .13); }
.kb-chips .kb-b.gen { color: #8ecbff; background: rgba(90, 170, 255, .16); }
.kb-chips .kb-b.demo { color: #ffd08a; background: rgba(255, 180, 80, .15); }
.kb-chips button.on .kb-b { color: inherit; background: rgba(255, 255, 255, .32); }
.kb-chips .kb-more {
  color: var(--gt); background: none; border: 1px dashed var(--card-bd);
}
[data-theme="light"] .kb-chips .kb-b.mine { color: #067a5c; background: rgba(10, 158, 125, .14); }
[data-theme="light"] .kb-chips .kb-b.gen { color: #0b62a8; background: rgba(30, 130, 220, .13); }
[data-theme="light"] .kb-chips .kb-b.demo { color: #8f5600; background: rgba(255, 175, 60, .2); }


* { -webkit-tap-highlight-color: transparent; }
input, textarea, button { font-family: inherit; }





[data-theme="light"] {
  --bg0: #e9f0fa;
  --bg1: #f7fbff;
  --ink: #0e1830;
  --muted: #43536f;
  --dim: #7787a0;
  --line: rgba(14, 24, 48, .12);
  --glass: rgba(255, 255, 255, .5);
  --glass-2: rgba(255, 255, 255, .42);
  --card-bd: rgba(28, 120, 200, .3);
  --shadow: 0 30px 70px -32px rgba(40, 80, 150, .35);
  --gt: #086f9e;
}


[data-theme="light"] body { background: var(--bg0); }
[data-theme="light"] .bg::before {
  background:
    radial-gradient(900px 700px at 82% 8%, rgba(22, 200, 255, .22), transparent 60%),
    radial-gradient(800px 620px at 10% 22%, rgba(139, 61, 255, .14), transparent 60%),
    radial-gradient(900px 800px at 60% 100%, rgba(45, 120, 255, .16), transparent 60%),
    linear-gradient(180deg, #ffffff, var(--bg0) 60%);
}
[data-theme="light"] .grain { background-image: radial-gradient(rgba(20, 40, 80, .06) .6px, transparent .8px); }
[data-theme="light"] #app { background: #e9f0fa; }
@media (min-width: 520px) {
  [data-theme="light"] #app { box-shadow: 0 40px 90px -30px rgba(50, 90, 160, .4), 0 0 0 1px rgba(20, 60, 130, .08); }
}
[data-theme="light"] .screen-stack { background: linear-gradient(180deg, #f4f9ff, #e9f0fa); }
[data-theme="light"] #screen-home { background: #edf3fb; }


[data-theme="light"] .glass-card,
[data-theme="light"] .gcard,
[data-theme="light"] .bar,
[data-theme="light"] .login-card {
  background: rgba(255, 255, 255, .5);
  box-shadow: 0 22px 50px -28px rgba(40, 90, 170, .4), inset 0 1px 0 rgba(255, 255, 255, .9), inset 0 0 0 1px rgba(255, 255, 255, .35);
}
[data-theme="light"] .bar .bi { color: var(--gt); background: rgba(255, 255, 255, .5); border-color: rgba(28, 120, 200, .3); }


[data-theme="light"] .toast { background: rgba(255, 255, 255, .88); box-shadow: 0 18px 44px -20px rgba(40, 80, 150, .45); }
[data-theme="light"] .toast.ok .ti { color: #0a9e7d; }
[data-theme="light"] .toast.err .ti { color: #d6455f; }
[data-theme="light"] .sheet-mask { background: rgba(40, 65, 110, .3); }
[data-theme="light"] .sheet { background: linear-gradient(180deg, rgba(255, 255, 255, .94), rgba(240, 246, 253, .96)); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); }
[data-theme="light"] .sheet .grip { background: rgba(14, 24, 48, .18); }


[data-theme="light"] .textarea,
[data-theme="light"] .input { background: rgba(255, 255, 255, .55); border-color: rgba(14, 24, 48, .16); }
[data-theme="light"] .lg-input { background: rgba(255, 255, 255, .55); border: 1px solid rgba(14, 24, 48, .16); }
[data-theme="light"] .switch { background: rgba(14, 24, 48, .16); }
[data-theme="light"] .switch.on { background: linear-gradient(120deg, rgb(var(--g)), rgb(var(--g2))); }


[data-theme="light"] .reply-card { background: rgba(255, 255, 255, .5); }
[data-theme="light"] .ai-generated-notice {
  color: #405874; background: rgba(8, 111, 158, .07); border-color: rgba(8, 111, 158, .22);
}
[data-theme="light"] .tag { background: rgba(255, 255, 255, .5); }
[data-theme="light"] .tag.warn { color: #8f5600; border-color: rgba(190, 130, 20, .42); background: rgba(255, 186, 80, .2); }
[data-theme="light"] .copy-btn { background: rgba(8, 111, 158, .1); border-color: rgba(8, 111, 158, .35); }
[data-theme="light"] .copy-btn.ok { color: #0a8a6d; border-color: rgba(10, 158, 125, .45); background: rgba(10, 158, 125, .12); }
[data-theme="light"] .fb-btn { background: rgba(8, 111, 158, .06); border-color: rgba(8, 111, 158, .18); color: #5a6b7d; }
[data-theme="light"] .fb-btn.on { color: #0a8a6d; border-color: rgba(10, 158, 125, .45); background: rgba(10, 158, 125, .12); box-shadow: none; }
[data-theme="light"] .fb-btn.on .fb-ico { fill: rgba(10, 158, 125, .18); }
[data-theme="light"] .fb-btn.on.down { color: #c23b5a; border-color: rgba(194, 59, 90, .4); background: rgba(194, 59, 90, .1); box-shadow: none; }
[data-theme="light"] .fb-btn.on.down .fb-ico { fill: rgba(194, 59, 90, .16); }
[data-theme="light"] .kb-cite-item {
  color: #086f9e; background: rgba(8, 111, 158, .08); border-color: rgba(8, 111, 158, .22);
}
[data-theme="light"] .kb-chip.radar { color: #a05a00; background: rgba(210, 130, 20, .1); border-color: rgba(210, 130, 20, .32); }
[data-theme="light"] .kb-chip.kb-stage { color: #0a7d4d; background: rgba(20, 160, 100, .1); border-color: rgba(20, 160, 100, .3); }
[data-theme="light"] .badge.pending { color: #8f5600; background: rgba(255, 186, 80, .22); border-color: rgba(190, 130, 20, .4); }
[data-theme="light"] .badge.failed, [data-theme="light"] .badge.closed { color: #c23a55; background: rgba(214, 69, 95, .12); border-color: rgba(214, 69, 95, .32); }


[data-theme="light"] .empty .ei,
[data-theme="light"] .func .fi,
[data-theme="light"] .prow .pri { color: var(--gt); background: linear-gradient(150deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .4)); border-color: rgba(28, 120, 200, .3); }


[data-theme="light"] .bubble.them { box-shadow: 0 14px 34px -22px rgba(40, 90, 170, .4); }
[data-theme="light"] .chat-input { box-shadow: 0 14px 34px -22px rgba(40, 90, 170, .35); }
[data-theme="light"] .voice-ov { background: rgba(238, 245, 253, .6); }
[data-theme="light"] .pend-imgs .pi .rm { background: rgba(30, 45, 80, .88); }


[data-theme="light"] .tabbar { background: linear-gradient(transparent, rgba(250, 253, 255, .9)); }



[data-theme="light"] .card-sc { box-shadow: 0 20px 44px -26px rgba(40, 90, 170, .45), inset 0 1px 0 rgba(255, 255, 255, .85); }
[data-theme="light"] .card-sc::after { background: linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(238, 246, 253, .55)); }
[data-theme="light"] .card-sc .sc-canvas { opacity: .55; }
[data-theme="light"] .hero-card { background: rgba(255, 255, 255, .5); }
[data-theme="light"] .hero-card::after { background: linear-gradient(180deg, transparent 56%, rgba(190, 220, 248, .4)); }
[data-theme="light"] .mod-card { background: rgba(255, 255, 255, .5); }
[data-theme="light"] .mod-card::after { background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(228, 240, 251, .5)); }
[data-theme="light"] .mod-card .mod-ic { color: var(--gt); background: rgba(255, 255, 255, .6); border-color: rgba(28, 120, 200, .3); }


[data-theme="light"] .hero-orb canvas,
[data-theme="light"] .tele-orb canvas,
[data-theme="light"] .asst-orb canvas {
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 50%, rgba(0, 0, 0, .45) 64%, transparent 74%);
  mask-image: radial-gradient(circle at 50% 50%, #000 50%, rgba(0, 0, 0, .45) 64%, transparent 74%);
}


[data-theme="light"] .tok-bar { background: rgba(14, 24, 48, .12); }
[data-theme="light"] .rch-card { background: rgba(255, 255, 255, .5); box-shadow: 0 18px 40px -24px rgba(40, 90, 170, .35), inset 0 1px 0 rgba(255, 255, 255, .9); }
[data-theme="light"] .kb-up { background: rgba(8, 111, 158, .07); }
[data-theme="light"] .btn { background: linear-gradient(150deg, rgba(255, 255, 255, .75), rgba(255, 255, 255, .35)); box-shadow: inset 0 0 0 1.4px rgba(255, 255, 255, .6), 0 14px 30px -16px rgba(40, 90, 170, .35); }




body, input, textarea, button { font-family: var(--font-sans); }

.appbar,
.page-title,
.hello .hi-title,
.hero-txt,
.login-t,
.login-brand-title,
.brand-t,
.chat-empty .ce-t,
.sheet .sh-title,
.empty .et,
.err-body .et,
.bar .bt,
.rec .rt,
.entry .et,
.func .ft,
.mod-card .mod-t,
.rch-card .rn,
.tcard .tname,
.profhead .pname,
.ana-sec .sec-h,
.sec-h,
.reply .rt,
.stat .sv,
.credit .num,
.rch-head .rh-num,
.shader-card .pn,
.shader-card .pp {
  font-family: var(--font-display);
  letter-spacing: var(--track-tight);
}

.page-title {
  font-size: var(--fs-title);
  line-height: var(--lh-title);
  font-weight: var(--fw-title);
}
.page-title.compact { font-size: var(--fs-title-sm); }
.chat-empty .ce-t,
.login-t,
.sheet .sh-title,
.empty .et {
  font-size: var(--fs-title-sm);
  line-height: var(--lh-title);
  font-weight: var(--fw-title);
}
.page-sub {
  font-size: var(--fs-meta);
  line-height: var(--lh-meta);
  font-weight: var(--fw-medium);
}
.appbar {
  font-size: var(--fs-subtitle);
  line-height: var(--lh-tight);
  font-weight: var(--fw-strong);
}

.hello .hi-title { font-size: var(--fs-title-lg); line-height: var(--lh-title); font-weight: var(--fw-title); }
.hello .hi-sub,
.credit-chip,
.brand-s,
.login-s,
.login-brand-sub,
.chat-empty .ce-s,
.entry .es,
.func .fs,
.mod-card .mod-s,
.rec .rs,
.bar .bs,
.page-sub,
.muted,
.sheet .sh-sub,
.field > label,
.rch-card .rd,
.tcard .tmeta,
.profhead .pid,
.voice-ov .vlisten,
.listen-hint,
.tele-status,
.empty .es,
.legal,
.loading-wrap {
  font-size: var(--fs-meta);
  line-height: var(--lh-meta);
  font-weight: var(--fw-medium);
}

.ana-text,
.reply .rc,
.raw-text,
.bubble,
.dyn-card .tline,
.voice-ov .vtext {
  font-size: var(--fs-body-lg);
  line-height: var(--lh-body);
  font-weight: var(--fw-body);
}

.bar .bt,
.rec .rt,
.entry .et,
.func .ft,
.mod-card .mod-t,
.rch-card .rn,
.tcard .tname,
.profhead .pname,
.empty .et,
.sec-h,
.ana-sec .sec-h {
  font-size: var(--fs-body-lg);
  line-height: var(--lh-tight);
  font-weight: var(--fw-strong);
}

.btn,
.hero-btn,
.lg-btn,
.lg-wechat,
.rch-card .rbuy,
.shader-card .buy,
.seg button,
.tab,
.kb-chips button,
.appbar .chat-reset-act,
.lg-input .code-btn,
.copy-btn {
  font-size: var(--fs-body);
  line-height: 1;
  font-weight: var(--fw-strong);
}
.btn.sm { font-size: var(--fs-meta); }

.input,
.textarea,
.lg-input input,
.chat-input input,
.searchbox input {
  font-size: var(--fs-body);
  line-height: var(--lh-meta);
  font-weight: var(--fw-body);
}

.sectit,
.credit .lab,
.detail-block .dl,
.rch-head .rh-pct,
.session-summary,
.credit-switch,
.ana-foot .cost,
.input-count,
.bar .bk,
.bar .bv,
.rec .rmeta .rk,
.rec .rmeta .rc,
.member .mr,
.stat .sl,
.tcard .tnl,
.tabbar .tb,
.badge,
.inline-note,
.inline-meta {
  font-size: var(--fs-caption);
  line-height: var(--lh-meta);
  font-weight: var(--fw-medium);
}

.sectit,
.ana-sec .sec-h,
.sec-h {
  letter-spacing: var(--track-label);
}

.credit .num,
.rch-head .rh-num,
.voice-ov .vtimer,
.invite-code {
  font-variant-numeric: tabular-nums;
}

.credit-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 0 2px;
  color: var(--muted);
  font-size: var(--fs-meta);
  line-height: var(--lh-meta);
  font-weight: var(--fw-medium);
}
.sec-h { color: var(--ink); }

.home-top .brand,
.prow .prt,
.member .mn,
.tag,
.legal h3 {
  font-size: var(--fs-body);
  line-height: var(--lh-tight);
  font-weight: var(--fw-strong);
}

.tcard .tnum,
.rch-card .rp,
.stat .sv {
  font-size: var(--fs-title-sm);
  line-height: var(--lh-tight);
  font-weight: var(--fw-title);
}

.prow .prg,
.member .mu,
.credit-chip b {
  font-size: var(--fs-meta);
  line-height: var(--lh-meta);
  font-weight: var(--fw-medium);
}
.credit-chip b { color: var(--gt); font-weight: var(--fw-title); }

.feat,
.lg-or,
.lg-agree,
.agree,
.sectit a,
.session-context-copy b,
.session-context-copy span,
.shader-card .pd,
.credit .num small,
.rch-head .rh-num small,
.rch-card .rp small,
.vc-tag,
.pend-imgs .pi-hint,
.copy-btn {
  font-size: var(--fs-caption);
  line-height: var(--lh-meta);
  font-weight: var(--fw-medium);
}

.badge,
.shader-card .best,
.rch-card .rtag,
.kb-chips .kb-b,
.icon-btn__label {
  font-size: var(--fs-micro);
  line-height: 1;
  font-weight: var(--fw-strong);
}

.invite-code,
.voice-ov .vtimer {
  font-family: var(--font-mono);
  letter-spacing: .12em;
}


/* 小程序 web-view 环境：H5 调不到 wx.login，登录只能交给原生桥，
   手机号验证码那套又只是演示，所以整块藏掉，只留「微信一键登录」。 */
body.in-miniprogram #screen-login .lg-input,
body.in-miniprogram #screen-login .lg-or,
body.in-miniprogram #screen-login [data-login-phone-btn] {
  display: none;
}


/* 客服工单：工单列表 + 会话线程 + 底部输入条 */
.sp-dot {
  width: 8px; height: 8px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, #ff6b8a, #ff4d6d);
  box-shadow: 0 0 8px rgba(255, 77, 109, .8);
}
.prow .prg { gap: 7px; grid-auto-flow: column; align-items: center; }

.sp-msg { display: flex; }
.sp-msg.me { justify-content: flex-end; }
.sp-msg .sp-wrap { max-width: 80%; min-width: 0; }
.sp-meta { font-size: var(--fs-micro); color: var(--dim); margin: 0 3px 4px; }
.sp-msg.me .sp-meta { text-align: right; }
.sp-b {
  padding: 10px 13px; border-radius: 16px; font-size: 13.5px; line-height: 1.65;
  white-space: pre-wrap; word-break: break-word;
  background: rgba(255, 255, 255, .06); border: 1px solid var(--line);
  border-bottom-left-radius: 6px;
}
.sp-msg.me .sp-b {
  color: #04121e; border: 0; border-bottom-left-radius: 16px; border-bottom-right-radius: 6px;
  background: linear-gradient(120deg, #16E6FF, #2D78FF);
  box-shadow: 0 12px 26px -14px rgba(45, 150, 255, .7);
}
.sp-sys { text-align: center; font-size: var(--fs-caption); color: var(--dim); padding: 2px 0; }

.sp-composer {
  position: relative; z-index: 6; flex: none;
  display: flex; align-items: flex-end; gap: 9px;
  padding: 9px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: linear-gradient(transparent, rgba(8, 12, 24, .94));
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.sp-input {
  flex: 1; min-width: 0; min-height: 42px; max-height: 116px; resize: none; overflow-y: auto;
  padding: 11px 14px; border-radius: 14px; outline: 0;
  color: var(--ink); font-family: inherit; font-size: 14px; line-height: 1.5;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .14);
  transition: border-color .2s;
}
.sp-input:focus { border-color: rgba(79, 214, 255, .6); }
.sp-input::placeholder { color: var(--dim); }
.sp-send {
  width: 42px; height: 42px; border-radius: 13px; flex: none; display: grid; place-items: center;
  color: var(--ink-on); background: linear-gradient(135deg, rgb(var(--g)), rgb(var(--g2)));
  box-shadow: 0 10px 22px -8px rgba(var(--g), .9);
}
.sp-send svg { width: 18px; height: 18px; }
.sp-send:disabled { opacity: .5; }

/* 原生 select 的下拉列表由系统渲染，深色背景下要显式给可读的对比色。 */
select.input { font-family: inherit; }
select.input option { color: #04121e; background: #eef4ff; }

[data-theme="light"] .sp-b { background: rgba(12, 30, 56, .05); }
[data-theme="light"] .sp-composer { background: linear-gradient(transparent, rgba(233, 240, 250, .94)); }
