/* 乡赛智助手 AI 视觉与交互增强：纯前端规则引擎 */
#xsh-ai-root {
  --ai-red: #a41623;
  --ai-red-dark: #650b18;
  --ai-gold: #ffcf72;
  --ai-ink: #251b1d;
  --ai-muted: #756b6d;
  --ai-line: rgba(121, 24, 38, 0.12);
  --ai-surface: rgba(255, 255, 255, 0.96);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 600;
}

#xsh-ai-root.is-mobile-fixed {
  right: 16px !important;
  bottom: 16px !important;
  left: auto !important;
  top: auto !important;
}

#xsh-ai-root .xsh-ai-fab--v2 {
  position: relative;
  width: 66px;
  height: 66px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  overflow: visible;
  box-shadow: 0 14px 34px rgba(112, 10, 27, 0.34), 0 3px 10px rgba(112, 10, 27, 0.22);
  isolation: isolate;
  transition: transform 0.22s ease, filter 0.22s ease;
}

#xsh-ai-root .xsh-ai-fab--v2:hover {
  transform: translateY(-3px) scale(1.03);
  filter: brightness(1.06);
}

#xsh-ai-root .xsh-ai-fab--v2:focus-visible {
  outline: 3px solid rgba(255, 207, 114, 0.7);
  outline-offset: 4px;
}

.xsh-ai-fab-ring {
  position: absolute;
  inset: -2px;
  z-index: -2;
  border-radius: inherit;
  background: conic-gradient(from 0deg, #ffd98e, #a41623 32%, #fff 49%, #761021 67%, #ffd98e);
  animation: xsh-ai-rotate 7s linear infinite;
}

.xsh-ai-fab-ring::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: inherit;
  background: linear-gradient(145deg, #bd2435 0%, #730c1d 78%);
}

.xsh-ai-fab-core {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font: 800 1.24rem/1 Arial, sans-serif;
  letter-spacing: 0.08em;
  text-indent: 0.08em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}

.xsh-ai-fab-live {
  position: absolute;
  z-index: 3;
  right: 2px;
  bottom: 4px;
  width: 13px;
  height: 13px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #39d98a;
  box-shadow: 0 0 0 4px rgba(57, 217, 138, 0.18);
}

#xsh-ai-root.is-analyzing .xsh-ai-fab-live {
  background: #ffcf72;
  animation: xsh-ai-live 1s ease-in-out infinite;
}

#xsh-ai-root .xsh-ai-bubble {
  right: calc(100% + 14px);
  padding: 0.58rem 0.78rem;
  border: 1px solid rgba(164, 22, 35, 0.12);
  border-radius: 12px;
  color: #5e2029;
  font-size: 0.78rem;
  font-weight: 600;
  box-shadow: 0 10px 26px rgba(62, 22, 28, 0.12);
}

#xsh-ai-root .xsh-ai-bubble span {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 20px;
  margin-right: 0.28rem;
  border-radius: 7px;
  color: #fff;
  background: linear-gradient(135deg, #ba2637, #710d1d);
  font: 800 0.68rem/1 Arial, sans-serif;
}

#xsh-ai-root .xsh-ai-panel--v2 {
  width: min(440px, calc(100vw - 32px));
  max-height: min(650px, calc(100vh - 96px));
  border: 1px solid rgba(111, 16, 32, 0.12);
  border-radius: 24px;
  background: var(--ai-surface);
  box-shadow: 0 26px 70px rgba(55, 13, 22, 0.24), 0 6px 22px rgba(55, 13, 22, 0.12);
  backdrop-filter: blur(20px);
  overflow: hidden;
  transform-origin: bottom right;
  animation: xsh-ai-panel-in 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#xsh-ai-root .xsh-ai-panel-head--v2 {
  position: relative;
  min-height: 92px;
  padding: 1rem 1.05rem;
  overflow: hidden;
  align-items: center;
  background:
    radial-gradient(circle at 12% 15%, rgba(255, 213, 135, 0.22), transparent 28%),
    linear-gradient(120deg, #5e0918 0%, #941429 48%, #b9283a 100%);
}

#xsh-ai-root .xsh-ai-panel-head--v2::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.24;
  background-image: linear-gradient(rgba(255,255,255,0.12) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.12) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(90deg, #000, transparent 82%);
}

.xsh-ai-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.72rem;
  min-width: 0;
}

.xsh-ai-brand-mark {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(145deg, rgba(255,255,255,0.2), rgba(255,255,255,0.07));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.28), 0 8px 20px rgba(35,0,7,0.2);
  font: 800 1rem/1 Arial, sans-serif;
  letter-spacing: 0.06em;
  backdrop-filter: blur(8px);
}

.xsh-ai-brand-mark i {
  position: absolute;
  right: -3px;
  top: -3px;
  width: 10px;
  height: 10px;
  border: 2px solid #851226;
  border-radius: 50%;
  background: #65efa9;
  box-shadow: 0 0 10px rgba(101, 239, 169, 0.8);
}

.xsh-ai-title-block {
  min-width: 0;
}

#xsh-ai-root .xsh-ai-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  margin-bottom: 0.15rem;
  color: rgba(255,255,255,0.76);
  font-size: 0.67rem;
  letter-spacing: 0.08em;
}

#xsh-ai-root .xsh-ai-eyebrow em {
  padding: 0.12rem 0.34rem;
  border: 1px solid rgba(255, 214, 137, 0.42);
  border-radius: 999px;
  color: #ffe3aa;
  font-size: 0.58rem;
  font-style: normal;
  letter-spacing: 0;
}

#xsh-ai-root .xsh-ai-panel-head--v2 strong {
  font-size: 1.08rem;
  letter-spacing: 0.02em;
}

#xsh-ai-root .xsh-ai-panel-head--v2 small {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.3rem;
  color: rgba(255,255,255,0.78);
  font-size: 0.68rem;
}

.xsh-ai-online-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #63eca6;
  box-shadow: 0 0 9px rgba(99, 236, 166, 0.8);
}

#xsh-ai-root .xsh-ai-head-actions {
  position: relative;
  z-index: 2;
}

#xsh-ai-root .xsh-ai-head-actions button {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 9px;
  background: rgba(255,255,255,0.11);
  transition: background 0.18s ease, transform 0.18s ease;
}

#xsh-ai-root .xsh-ai-head-actions button:hover {
  background: rgba(255,255,255,0.22);
  transform: translateY(-1px);
}

.xsh-ai-system-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.3rem;
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid var(--ai-line);
  background: linear-gradient(90deg, #fff8f6, #fffdfb);
}

.xsh-ai-system-strip span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  color: #76676a;
  font-size: 0.67rem;
}

.xsh-ai-system-strip i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #b91e32;
  box-shadow: 0 0 0 3px rgba(185, 30, 50, 0.08);
}

#xsh-ai-root .xsh-ai-messages--v2 {
  min-height: 220px;
  max-height: 312px;
  padding: 1rem;
  color: var(--ai-ink);
  background:
    radial-gradient(circle at 90% 8%, rgba(164, 22, 35, 0.045), transparent 24%),
    linear-gradient(180deg, #fbfaf9, #f8f6f5);
  scrollbar-width: thin;
  scrollbar-color: rgba(164,22,35,0.25) transparent;
}

.xsh-ai-intro {
  display: flex;
  align-items: flex-start;
  gap: 0.68rem;
  padding: 0.82rem;
  border: 1px solid rgba(164, 22, 35, 0.09);
  border-radius: 16px;
  background: rgba(255,255,255,0.9);
  box-shadow: 0 8px 22px rgba(66, 34, 38, 0.05);
}

.xsh-ai-intro p {
  margin: 0.28rem 0 0.58rem;
  color: #54494b;
  font-size: 0.82rem;
  line-height: 1.65;
}

.xsh-ai-avatar {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(145deg, #b51e32, #690b19);
  box-shadow: 0 6px 14px rgba(111, 13, 29, 0.2);
  font: 800 0.68rem/1 Arial, sans-serif;
  letter-spacing: 0.04em;
}

.xsh-ai-avatar--small {
  width: 31px;
  height: 31px;
  border-radius: 10px;
  font-size: 0.62rem;
}

.xsh-ai-message-source {
  display: block;
  color: #7e1223;
  font-size: 0.74rem;
  font-weight: 700;
}

.xsh-ai-capability-tags,
.xsh-ai-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.xsh-ai-capability-tags span {
  padding: 0.22rem 0.44rem;
  border-radius: 7px;
  color: #8a1b2b;
  background: #fff2ef;
  font-size: 0.65rem;
}

#xsh-ai-root .xsh-ai-msg {
  animation: xsh-ai-message-in 0.22s ease both;
}

#xsh-ai-root .xsh-ai-msg--user {
  display: flex;
  align-items: flex-start;
  gap: 0.48rem;
  max-width: 88%;
  margin: 0.85rem 0 0.72rem auto;
  padding: 0.66rem 0.76rem;
  border: 1px solid rgba(164, 22, 35, 0.08);
  border-radius: 14px 14px 4px 14px;
  color: #54222a;
  background: linear-gradient(135deg, #fff0ed, #fde4e7);
}

#xsh-ai-root .xsh-ai-msg--user > span {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 23px;
  height: 23px;
  border-radius: 7px;
  color: #fff;
  background: #a41623;
  font-size: 0.64rem;
}

#xsh-ai-root .xsh-ai-msg--user p {
  margin: 0.08rem 0 0;
  font-size: 0.8rem;
  line-height: 1.55;
}

#xsh-ai-root .xsh-ai-messages--v2 .xsh-ai-msg--bot {
  margin: 0 0 0.75rem;
  padding: 0.82rem;
  border: 1px solid rgba(116, 25, 38, 0.1);
  border-radius: 16px 16px 16px 5px;
  background: rgba(255,255,255,0.96);
  box-shadow: 0 8px 20px rgba(74, 36, 40, 0.05);
}

.xsh-ai-answer-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.xsh-ai-answer-head > div {
  min-width: 0;
  flex: 1;
}

.xsh-ai-answer-head small {
  display: block;
  margin-top: 0.12rem;
  color: #9a8e90;
  font-size: 0.62rem;
}

.xsh-ai-match-score {
  flex: 0 0 auto;
  padding: 0.3rem 0.48rem;
  border: 1px solid rgba(164,22,35,0.1);
  border-radius: 8px;
  color: #8f2736;
  background: #fff6f3;
  font-size: 0.61rem;
}

.xsh-ai-match-score b {
  font-size: 0.71rem;
}

#xsh-ai-root .xsh-ai-answer-text {
  margin: 0.72rem 0 0;
  color: #443a3c;
  font-size: 0.8rem;
  line-height: 1.7;
}

.xsh-ai-basis {
  margin-top: 0.68rem;
  padding: 0.6rem 0.68rem;
  border-radius: 11px;
  background: #faf7f4;
}

.xsh-ai-basis strong {
  color: #7d1726;
  font-size: 0.68rem;
}

.xsh-ai-basis ul {
  display: grid;
  gap: 0.28rem;
  margin: 0.38rem 0 0;
  padding: 0;
  list-style: none;
}

.xsh-ai-basis li {
  position: relative;
  padding-left: 0.78rem;
  color: #6f6365;
  font-size: 0.68rem;
  line-height: 1.45;
}

.xsh-ai-basis li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.43rem;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #bd2a3c;
}

.xsh-ai-actions {
  margin-top: 0.62rem;
}

.xsh-ai-actions span {
  padding: 0.24rem 0.48rem;
  border: 1px solid rgba(164,22,35,0.12);
  border-radius: 999px;
  color: #8e1d2d;
  background: #fff;
  font-size: 0.64rem;
}

.xsh-ai-disclaimer {
  display: flex;
  align-items: center;
  gap: 0.32rem;
  margin-top: 0.68rem;
  padding-top: 0.52rem;
  border-top: 1px dashed rgba(122, 34, 46, 0.12);
  color: #a09698;
  font-size: 0.61rem;
}

.xsh-ai-thinking {
  display: flex;
  align-items: center;
  gap: 0.72rem;
}

.xsh-ai-thinking-orb {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: conic-gradient(#a41623, #ffcf72, #a41623);
  animation: xsh-ai-rotate 1.7s linear infinite;
}

.xsh-ai-thinking-orb::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: inherit;
  background: #fff;
}

.xsh-ai-thinking-orb span {
  position: relative;
  z-index: 1;
  color: #8c1426;
  font: 800 0.63rem/1 Arial, sans-serif;
}

.xsh-ai-thinking-body {
  flex: 1;
  min-width: 0;
}

.xsh-ai-thinking-body strong {
  color: #6e1422;
  font-size: 0.75rem;
}

.xsh-ai-thinking-body > p {
  margin: 0.2rem 0 0.52rem !important;
  color: #8b7f81;
  font-size: 0.68rem;
}

.xsh-ai-thinking-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.28rem;
}

.xsh-ai-thinking-steps span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: #aaa0a2;
  font-size: 0.58rem;
  white-space: nowrap;
}

.xsh-ai-thinking-steps i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ddd5d6;
}

.xsh-ai-thinking-steps span.active {
  color: #961729;
  font-weight: 700;
}

.xsh-ai-thinking-steps span.active i {
  background: #b91e32;
  box-shadow: 0 0 0 4px rgba(185, 30, 50, 0.11);
  animation: xsh-ai-live 0.9s ease-in-out infinite;
}

.xsh-ai-thinking-steps span.done {
  color: #438a68;
}

.xsh-ai-thinking-steps span.done i {
  background: #54bd89;
}

#xsh-ai-root .xsh-ai-quick--v2 {
  display: block;
  padding: 0.7rem 0.9rem 0.75rem;
  border-top: 1px solid var(--ai-line);
  background: #fff;
}

.xsh-ai-quick-label {
  margin-bottom: 0.48rem;
  color: #74696b;
  font-size: 0.66rem;
  font-weight: 600;
}

.xsh-ai-quick-label span {
  color: #aa1b2d;
}

.xsh-ai-quick-list {
  display: flex;
  gap: 0.38rem;
  overflow-x: auto;
  padding-bottom: 0.08rem;
  scrollbar-width: none;
}

.xsh-ai-quick-list::-webkit-scrollbar { display: none; }

#xsh-ai-root .xsh-ai-qbtn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.42rem 0.66rem;
  border: 1px solid rgba(142, 25, 42, 0.14);
  border-radius: 10px;
  color: #7f1727;
  background: linear-gradient(180deg, #fff, #fff9f7);
  font-size: 0.7rem;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

#xsh-ai-root .xsh-ai-qbtn span {
  color: #bd283a;
  font-size: 0.76rem;
}

#xsh-ai-root .xsh-ai-qbtn:hover {
  border-color: rgba(142, 25, 42, 0.32);
  background: #fff1ed;
  transform: translateY(-1px);
}

#xsh-ai-root .xsh-ai-qbtn:disabled {
  cursor: wait;
  opacity: 0.48;
  transform: none;
}

.xsh-ai-composer {
  padding: 0.72rem 0.9rem 0.62rem;
  border-top: 1px solid var(--ai-line);
  background: linear-gradient(180deg, #fff, #fcf9f8);
}

#xsh-ai-root .xsh-ai-input-row {
  display: flex;
  gap: 0.48rem;
  padding: 0;
  border: 0;
  background: transparent;
}

#xsh-ai-root .xsh-ai-input-row input {
  height: 43px;
  border: 1px solid rgba(118, 36, 48, 0.16);
  border-radius: 13px;
  padding: 0 0.88rem;
  color: #332a2c;
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(45, 20, 24, 0.03);
  font-size: 0.78rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

#xsh-ai-root .xsh-ai-input-row input:focus {
  outline: none;
  border-color: rgba(164,22,35,0.48);
  box-shadow: 0 0 0 3px rgba(164,22,35,0.08);
}

#xsh-ai-root .xsh-ai-input-row input:disabled {
  cursor: wait;
  background: #faf7f6;
}

#xsh-ai-root .xsh-ai-send {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border-radius: 13px;
  background: linear-gradient(145deg, #bb2436, #720d1c);
  box-shadow: 0 7px 16px rgba(122, 12, 29, 0.24);
  transition: transform 0.18s ease, filter 0.18s ease;
}

#xsh-ai-root .xsh-ai-send span {
  transform: translateY(-1px);
  font-size: 1.08rem;
  font-weight: 700;
}

#xsh-ai-root .xsh-ai-send:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

#xsh-ai-root .xsh-ai-send:disabled {
  cursor: wait;
  opacity: 0.54;
  transform: none;
}

.xsh-ai-input-hint {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.42rem;
  color: #a29799;
  font-size: 0.58rem;
}

.xsh-ai-input-hint span:first-child {
  display: flex;
  align-items: center;
  gap: 0.28rem;
}

.xsh-ai-input-hint i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #4fc184;
  box-shadow: 0 0 0 3px rgba(79,193,132,0.1);
}

@keyframes xsh-ai-rotate { to { transform: rotate(360deg); } }
@keyframes xsh-ai-live { 50% { opacity: 0.48; transform: scale(0.82); } }
@keyframes xsh-ai-panel-in {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes xsh-ai-message-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
  #xsh-ai-root .xsh-ai-fab--v2 {
    width: 58px;
    height: 58px;
  }
  #xsh-ai-root .xsh-ai-panel--v2 {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 82px);
    border-radius: 20px;
  }
  #xsh-ai-root .xsh-ai-panel-head--v2 {
    min-height: 84px;
    padding: 0.82rem;
  }
  .xsh-ai-brand-mark {
    width: 43px;
    height: 43px;
  }
  #xsh-ai-root .xsh-ai-messages--v2 {
    min-height: 185px;
    max-height: min(300px, calc(100vh - 340px));
    padding: 0.78rem;
  }
  .xsh-ai-system-strip span {
    font-size: 0.61rem;
  }
  .xsh-ai-thinking-steps span {
    font-size: 0.54rem;
  }
}

/* 始终保持入口醒目、中文完整、不会被旧版圆形样式压缩。 */
#xsh-ai-root {
  right: 22px !important;
  bottom: 22px !important;
  left: auto !important;
  top: auto !important;
  z-index: 1200 !important;
}
#xsh-ai-root .xsh-ai-fab--v2 {
  display: inline-flex;
  width: 154px;
  height: 58px;
  padding: 0 1rem;
  border-radius: 16px;
  background: linear-gradient(135deg, #0b2734, #103b4a);
  border: 1px solid rgba(119, 227, 228, 0.72);
  box-shadow: 0 14px 34px rgba(7, 27, 40, 0.38), 0 0 0 4px rgba(119, 227, 228, 0.08);
}
#xsh-ai-root .xsh-ai-fab-core {
  gap: 0.22rem;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  letter-spacing: 0;
  text-indent: 0;
  white-space: nowrap;
}
#xsh-ai-root .xsh-ai-fab-core b { color: #d8ffff; font-size: 1rem; line-height: 1.1; }
#xsh-ai-root .xsh-ai-fab-core small { color: #ffb19d; font-size: 0.7rem; letter-spacing: 0; }
#xsh-ai-root .xsh-ai-fab-ring { border-radius: 15px; }
#xsh-ai-root .xsh-ai-bubble { right: calc(100% + 12px); font-size: 0.86rem; }
#xsh-ai-root .xsh-ai-panel--v2 { z-index: 1201; }
#xsh-ai-root .xsh-ai-messages--v2 { font-size: 0.95rem; }
#xsh-ai-root .xsh-ai-intro p,
#xsh-ai-root .xsh-ai-answer-text,
#xsh-ai-root .xsh-ai-msg--user p { font-size: 0.9rem; line-height: 1.7; }
@media (max-width: 600px) {
  #xsh-ai-root { right: 12px !important; bottom: 12px !important; }
  #xsh-ai-root .xsh-ai-fab--v2 { width: 142px; height: 54px; }
}

@media (prefers-reduced-motion: reduce) {
  #xsh-ai-root *,
  #xsh-ai-root *::before,
  #xsh-ai-root *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* AI terminal skin: local simulation UI */
#xsh-ai-root {
  --ai-bg: #07121d;
  --ai-bg-soft: #0b1b29;
  --ai-panel: #0b1724;
  --ai-panel-2: #102333;
  --ai-line: rgba(116, 205, 224, 0.18);
  --ai-line-strong: rgba(116, 205, 224, 0.42);
  --ai-cyan: #77e3e4;
  --ai-cyan-soft: #b9ffff;
  --ai-coral: #ff907d;
  --ai-gold: #ffd478;
  --ai-ink: #e9f5f4;
  --ai-muted: #8ca5ae;
  --ai-surface: rgba(8, 20, 32, 0.98);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

#xsh-ai-root .xsh-ai-fab--v2 {
  width: 76px;
  height: 76px;
  border: 1px solid rgba(119, 227, 228, 0.7);
  border-radius: 20px;
  background: #07131f;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.33), 0 0 0 5px rgba(119, 227, 228, 0.08), inset 0 0 24px rgba(119, 227, 228, 0.08);
  overflow: visible;
}

#xsh-ai-root .xsh-ai-fab--v2::before,
#xsh-ai-root .xsh-ai-fab--v2::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border: 1px solid rgba(119, 227, 228, 0.45);
  border-radius: 13px;
}

#xsh-ai-root .xsh-ai-fab--v2::before { inset: 7px; }
#xsh-ai-root .xsh-ai-fab--v2::after { inset: -6px; border-color: rgba(255, 144, 125, 0.24); }
#xsh-ai-root .xsh-ai-fab--v2:hover { transform: translateY(-4px); filter: none; border-color: var(--ai-cyan-soft); }
#xsh-ai-root .xsh-ai-fab--v2:focus-visible { outline-color: var(--ai-cyan); }

#xsh-ai-root .xsh-ai-fab-ring {
  inset: -1px;
  border-radius: 19px;
  background: repeating-linear-gradient(90deg, rgba(119, 227, 228, 0.5) 0 2px, transparent 2px 9px);
  opacity: 0.8;
  animation: xsh-ai-scan 2.8s linear infinite;
}
#xsh-ai-root .xsh-ai-fab-ring::after {
  inset: 2px;
  border-radius: 17px;
  background: #07131f;
}
#xsh-ai-root .xsh-ai-fab-core {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  height: 100%;
  color: var(--ai-cyan-soft);
  text-shadow: 0 0 12px rgba(119, 227, 228, 0.75);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: 0.1em;
}
#xsh-ai-root .xsh-ai-fab-core b { font-size: 1.22rem; line-height: 1; }
#xsh-ai-root .xsh-ai-fab-core small { color: var(--ai-coral); font-size: 0.48rem; letter-spacing: 0.18em; }
#xsh-ai-root .xsh-ai-fab-live {
  right: -4px;
  bottom: -4px;
  width: 13px;
  height: 13px;
  border-color: var(--ai-bg);
  background: #70e0b0;
  box-shadow: 0 0 0 4px rgba(112, 224, 176, 0.14), 0 0 13px rgba(112, 224, 176, 0.8);
}
#xsh-ai-root.is-analyzing .xsh-ai-fab-live { background: var(--ai-gold); box-shadow: 0 0 0 4px rgba(255, 212, 120, 0.16), 0 0 13px rgba(255, 212, 120, 0.9); }

#xsh-ai-root .xsh-ai-bubble {
  right: calc(100% + 13px);
  padding: 0.58rem 0.72rem;
  border: 1px solid var(--ai-line-strong);
  border-radius: 8px;
  color: var(--ai-cyan-soft);
  background: var(--ai-panel);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.7rem;
}
#xsh-ai-root .xsh-ai-bubble::before { content: "> "; color: var(--ai-coral); }
#xsh-ai-root .xsh-ai-bubble span { display: none; }

#xsh-ai-root .xsh-ai-panel--v2 {
  width: min(458px, calc(100vw - 32px));
  max-height: min(690px, calc(100vh - 76px));
  border: 1px solid var(--ai-line-strong);
  border-radius: 18px;
  background: var(--ai-surface);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.4), 0 0 0 5px rgba(119, 227, 228, 0.05);
  backdrop-filter: blur(18px);
  transform-origin: bottom right;
  isolation: isolate;
}
#xsh-ai-root .xsh-ai-panel--v2::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 5px, rgba(119, 227, 228, 0.025) 6px 7px);
  mix-blend-mode: screen;
}

#xsh-ai-root .xsh-ai-panel-head--v2 {
  min-height: 100px;
  padding: 1rem 1.05rem;
  border-bottom: 1px solid var(--ai-line);
  background: linear-gradient(135deg, #07131f 0%, #0a1d2b 56%, #102c39 100%);
}
#xsh-ai-root .xsh-ai-panel-head--v2::before {
  opacity: 0.38;
  background-image: linear-gradient(rgba(119, 227, 228, 0.14) 1px, transparent 1px), linear-gradient(90deg, rgba(119, 227, 228, 0.14) 1px, transparent 1px);
  background-size: 18px 18px;
  mask-image: linear-gradient(90deg, #000, transparent 92%);
}
#xsh-ai-root .xsh-ai-brand { gap: 0.72rem; }
#xsh-ai-root .xsh-ai-brand-mark {
  width: 50px;
  height: 50px;
  border: 1px solid rgba(119, 227, 228, 0.5);
  border-radius: 14px;
  color: var(--ai-cyan-soft);
  background: rgba(119, 227, 228, 0.08);
  box-shadow: inset 0 0 20px rgba(119, 227, 228, 0.08), 0 0 18px rgba(119, 227, 228, 0.08);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
#xsh-ai-root .xsh-ai-brand-mark b { font-size: 0.96rem; }
#xsh-ai-root .xsh-ai-brand-mark i {
  right: 5px;
  top: 5px;
  width: 7px;
  height: 7px;
  border: 0;
  background: #70e0b0;
  box-shadow: 0 0 9px rgba(112, 224, 176, 0.9);
}
#xsh-ai-root .xsh-ai-eyebrow { color: var(--ai-cyan); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.6rem; letter-spacing: 0.1em; }
#xsh-ai-root .xsh-ai-eyebrow em { border-color: rgba(255, 212, 120, 0.55); color: var(--ai-gold); background: rgba(255, 212, 120, 0.08); }
#xsh-ai-root .xsh-ai-panel-head--v2 strong { color: #f4fbfa; font-size: 1.12rem; letter-spacing: 0.04em; }
#xsh-ai-root .xsh-ai-cursor { display: inline-block; width: 0.45rem; height: 1rem; margin-left: 0.28rem; vertical-align: -0.12rem; background: var(--ai-coral); animation: xsh-ai-blink 1s steps(2, start) infinite; }
#xsh-ai-root .xsh-ai-panel-head--v2 small { color: var(--ai-muted); font-size: 0.65rem; }
#xsh-ai-root .xsh-ai-online-dot { background: var(--ai-cyan); box-shadow: 0 0 10px rgba(119, 227, 228, 0.9); }
#xsh-ai-root .xsh-ai-head-actions button { border-color: var(--ai-line); border-radius: 7px; color: var(--ai-cyan-soft); background: rgba(119, 227, 228, 0.06); }
#xsh-ai-root .xsh-ai-head-actions button:hover { background: rgba(119, 227, 228, 0.16); }

#xsh-ai-root .xsh-ai-system-strip {
  gap: 0;
  padding: 0.62rem 0.9rem;
  border-bottom: 1px solid var(--ai-line);
  background: #081724;
}
#xsh-ai-root .xsh-ai-system-strip span { justify-content: flex-start; color: var(--ai-muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.61rem; }
#xsh-ai-root .xsh-ai-system-strip span + span { padding-left: 0.5rem; border-left: 1px solid var(--ai-line); }
#xsh-ai-root .xsh-ai-system-strip b { margin-right: 0.18rem; color: rgba(119, 227, 228, 0.55); font-size: 0.55rem; }
#xsh-ai-root .xsh-ai-system-strip i { width: 5px; height: 5px; margin-right: 0.32rem; background: var(--ai-cyan); box-shadow: 0 0 8px rgba(119, 227, 228, 0.75); }

#xsh-ai-root .xsh-ai-messages--v2 {
  min-height: 238px;
  max-height: 330px;
  padding: 0.95rem;
  color: var(--ai-ink);
  background: radial-gradient(circle at 85% 5%, rgba(119, 227, 228, 0.08), transparent 30%), #07131f;
  scrollbar-color: rgba(119, 227, 228, 0.38) transparent;
}
#xsh-ai-root .xsh-ai-intro {
  padding: 0.88rem;
  border: 1px solid var(--ai-line);
  border-radius: 10px;
  background: rgba(12, 32, 47, 0.72);
  box-shadow: inset 0 0 24px rgba(119, 227, 228, 0.035);
}
#xsh-ai-root .xsh-ai-avatar { width: 35px; height: 35px; border: 1px solid rgba(119, 227, 228, 0.55); border-radius: 9px; color: var(--ai-cyan-soft); background: #0b2734; box-shadow: 0 0 18px rgba(119, 227, 228, 0.12); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
#xsh-ai-root .xsh-ai-message-source { color: var(--ai-cyan); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.68rem; letter-spacing: 0.04em; }
#xsh-ai-root .xsh-ai-intro p { margin-top: 0.38rem; color: #c8d9da; font-size: 0.8rem; line-height: 1.7; }
#xsh-ai-root .xsh-ai-capability-tags span { border: 1px solid rgba(119, 227, 228, 0.16); border-radius: 4px; color: var(--ai-cyan); background: rgba(119, 227, 228, 0.06); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.55rem; }
#xsh-ai-root .xsh-ai-intro-log { display: grid; gap: 0.18rem; margin-top: 0.72rem; padding-top: 0.58rem; border-top: 1px dashed var(--ai-line); color: #6fa9ad; font: 0.58rem/1.45 ui-monospace, SFMono-Regular, Consolas, monospace; }
#xsh-ai-root .xsh-ai-intro-log span::first-letter { color: var(--ai-coral); }
#xsh-ai-root .xsh-ai-log-cursor { color: var(--ai-coral); animation: xsh-ai-blink 1s steps(2, start) infinite; }

#xsh-ai-root .xsh-ai-msg--user { border-color: rgba(255, 144, 125, 0.2); border-radius: 10px 10px 3px 10px; color: #ffe5df; background: rgba(100, 47, 48, 0.42); }
#xsh-ai-root .xsh-ai-msg--user > span { width: 23px; height: 23px; border-radius: 5px; color: #07131f; background: var(--ai-coral); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
#xsh-ai-root .xsh-ai-messages--v2 .xsh-ai-msg--bot { border-color: var(--ai-line); border-radius: 10px 10px 10px 3px; background: rgba(13, 34, 49, 0.9); box-shadow: inset 0 0 20px rgba(119, 227, 228, 0.025); }
#xsh-ai-root .xsh-ai-answer-head small { color: #719199; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
#xsh-ai-root .xsh-ai-answer-head small i { display: inline-block; width: 5px; height: 5px; margin-right: 0.24rem; border-radius: 50%; background: #70e0b0; }
#xsh-ai-root .xsh-ai-match-score { display: grid; gap: 0.1rem; min-width: 52px; padding: 0.3rem 0.4rem; border-color: rgba(119, 227, 228, 0.28); border-radius: 6px; color: var(--ai-cyan); background: rgba(119, 227, 228, 0.07); text-align: center; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
#xsh-ai-root .xsh-ai-match-score small { color: #719199; font-size: 0.5rem; }
#xsh-ai-root .xsh-ai-match-score b { color: var(--ai-cyan-soft); font-size: 0.78rem; }
#xsh-ai-root .xsh-ai-answer-text { color: #d4e3e2; font-size: 0.79rem; }
#xsh-ai-root .xsh-ai-basis { border-left: 2px solid var(--ai-cyan); border-radius: 3px; background: rgba(119, 227, 228, 0.055); }
#xsh-ai-root .xsh-ai-basis strong { color: var(--ai-cyan); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
#xsh-ai-root .xsh-ai-basis li { color: #91aeb3; }
#xsh-ai-root .xsh-ai-basis li::before { background: var(--ai-coral); }
#xsh-ai-root .xsh-ai-actions span { border-color: rgba(119, 227, 228, 0.24); border-radius: 4px; color: var(--ai-cyan); background: transparent; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
#xsh-ai-root .xsh-ai-disclaimer { color: #70858b; border-top-color: var(--ai-line); }

#xsh-ai-root .xsh-ai-thinking { align-items: flex-start; }
#xsh-ai-root .xsh-ai-thinking-orb { width: 42px; height: 42px; border-radius: 10px; background: conic-gradient(var(--ai-cyan), transparent, var(--ai-coral), var(--ai-cyan)); animation: xsh-ai-rotate 1.4s linear infinite; }
#xsh-ai-root .xsh-ai-thinking-orb::after { inset: 2px; border-radius: 8px; background: #0a1d2b; }
#xsh-ai-root .xsh-ai-thinking-orb span { color: var(--ai-cyan-soft); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
#xsh-ai-root .xsh-ai-thinking-body strong { color: var(--ai-cyan-soft); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.7rem; }
#xsh-ai-root .xsh-ai-terminal-prompt { color: var(--ai-coral); }
#xsh-ai-root .xsh-ai-thinking-dots { color: var(--ai-coral); animation: xsh-ai-dots 1.1s steps(4, end) infinite; }
#xsh-ai-root .xsh-ai-thinking-body > p { color: #91aeb3; }
#xsh-ai-root .xsh-ai-thinking-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.2rem; }
#xsh-ai-root .xsh-ai-thinking-steps span { color: #526d75; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.5rem; }
#xsh-ai-root .xsh-ai-thinking-steps span.active { color: var(--ai-cyan); }
#xsh-ai-root .xsh-ai-thinking-steps span.active i { background: var(--ai-cyan); box-shadow: 0 0 0 3px rgba(119, 227, 228, 0.13); }
#xsh-ai-root .xsh-ai-thinking-steps span.done { color: #70e0b0; }
#xsh-ai-root .xsh-ai-thinking-steps span.done i { background: #70e0b0; }
#xsh-ai-root .xsh-ai-thinking-log { margin-top: 0.55rem; color: #6fa9ad; font: 0.57rem/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; }

#xsh-ai-root .xsh-ai-quick--v2 { padding: 0.7rem 0.9rem 0.75rem; border-top-color: var(--ai-line); background: #081724; }
#xsh-ai-root .xsh-ai-quick-label { color: #78939a; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.59rem; }
#xsh-ai-root .xsh-ai-quick-label span { color: var(--ai-coral); }
#xsh-ai-root .xsh-ai-qbtn { padding: 0.4rem 0.58rem; border-color: var(--ai-line); border-radius: 5px; color: var(--ai-cyan); background: rgba(119, 227, 228, 0.045); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.62rem; }
#xsh-ai-root .xsh-ai-qbtn span { color: var(--ai-coral); }
#xsh-ai-root .xsh-ai-qbtn:hover { border-color: var(--ai-line-strong); background: rgba(119, 227, 228, 0.12); transform: translateY(-1px); }

#xsh-ai-root .xsh-ai-composer { padding: 0.72rem 0.9rem 0.65rem; border-top-color: var(--ai-line); background: #07131f; }
#xsh-ai-root .xsh-ai-input-row input { height: 44px; border-color: var(--ai-line); border-radius: 7px; color: var(--ai-ink); background: #0b1d2b; box-shadow: inset 0 0 14px rgba(119, 227, 228, 0.035); font-size: 0.78rem; }
#xsh-ai-root .xsh-ai-input-row input::placeholder { color: #66818a; }
#xsh-ai-root .xsh-ai-input-row input:focus { border-color: var(--ai-cyan); box-shadow: 0 0 0 3px rgba(119, 227, 228, 0.1), inset 0 0 14px rgba(119, 227, 228, 0.05); }
#xsh-ai-root .xsh-ai-send { width: 44px; height: 44px; border: 1px solid var(--ai-cyan); border-radius: 7px; color: #07131f; background: var(--ai-cyan); box-shadow: 0 0 18px rgba(119, 227, 228, 0.2); }
#xsh-ai-root .xsh-ai-send:hover { filter: brightness(1.08); }
#xsh-ai-root .xsh-ai-input-hint { color: #66818a; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.53rem; }
#xsh-ai-root .xsh-ai-input-hint i { background: #70e0b0; box-shadow: 0 0 0 3px rgba(112, 224, 176, 0.1), 0 0 8px rgba(112, 224, 176, 0.7); }

@keyframes xsh-ai-scan { to { transform: rotate(360deg); } }
@keyframes xsh-ai-blink { 50% { opacity: 0; } }
@keyframes xsh-ai-dots { 0%, 20% { opacity: 0.2; } 50% { opacity: 1; } 80%, 100% { opacity: 0.35; } }

@media (max-width: 600px) {
  #xsh-ai-root .xsh-ai-fab--v2 { width: 60px; height: 60px; border-radius: 16px; }
  #xsh-ai-root .xsh-ai-fab-ring, #xsh-ai-root .xsh-ai-fab-ring::after { border-radius: 15px; }
  #xsh-ai-root .xsh-ai-panel--v2 { width: calc(100vw - 20px); max-height: calc(100vh - 72px); border-radius: 14px; }
  #xsh-ai-root .xsh-ai-panel-head--v2 { min-height: 88px; padding: 0.8rem; }
  #xsh-ai-root .xsh-ai-brand-mark { width: 43px; height: 43px; }
  #xsh-ai-root .xsh-ai-messages--v2 { min-height: 190px; max-height: min(310px, calc(100vh - 340px)); padding: 0.72rem; }
  #xsh-ai-root .xsh-ai-system-strip span { font-size: 0.51rem; }
  #xsh-ai-root .xsh-ai-system-strip b { display: none; }
  #xsh-ai-root .xsh-ai-thinking-steps span { font-size: 0.44rem; }
  #xsh-ai-root .xsh-ai-intro-log { font-size: 0.51rem; }
}

/* 最终覆盖：保证入口始终可见，并以中文横向按钮呈现。 */
#xsh-ai-root {
  position: fixed !important;
  right: 22px !important;
  bottom: 22px !important;
  left: auto !important;
  top: auto !important;
  z-index: 1200 !important;
}
#xsh-ai-root .xsh-ai-fab--v2 {
  display: inline-flex !important;
  width: 154px !important;
  height: 58px !important;
  padding: 0 1rem !important;
  border-radius: 16px !important;
  background: linear-gradient(135deg, #0b2734, #103b4a) !important;
  border: 1px solid rgba(119, 227, 228, 0.72) !important;
  box-shadow: 0 14px 34px rgba(7, 27, 40, 0.38), 0 0 0 4px rgba(119, 227, 228, 0.08) !important;
}
#xsh-ai-root .xsh-ai-fab-core {
  gap: 0.22rem !important;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif !important;
  letter-spacing: 0 !important;
  text-indent: 0 !important;
  white-space: nowrap !important;
}
#xsh-ai-root .xsh-ai-fab-core b { color: #d8ffff !important; font-size: 1rem !important; line-height: 1.1 !important; }
#xsh-ai-root .xsh-ai-fab-core small { color: #ffb19d !important; font-size: 0.7rem !important; letter-spacing: 0 !important; }
#xsh-ai-root .xsh-ai-fab-ring { border-radius: 15px !important; }
#xsh-ai-root .xsh-ai-panel--v2 { z-index: 1201 !important; }
#xsh-ai-root .xsh-ai-messages--v2 { font-size: 0.95rem !important; }
#xsh-ai-root .xsh-ai-intro p,
#xsh-ai-root .xsh-ai-answer-text,
#xsh-ai-root .xsh-ai-msg--user p { font-size: 0.9rem !important; line-height: 1.7 !important; }
@media (max-width: 600px) {
  #xsh-ai-root { right: 12px !important; bottom: 12px !important; }
  #xsh-ai-root .xsh-ai-fab--v2 { width: 142px !important; height: 54px !important; }
}
