.desktop-account-ai {
  position: fixed;
  z-index: 2147483400;
  left: 16px;
  right: auto;
  bottom: 16px;
  width: min(390px, calc(100vw - 32px));
  max-height: min(680px, calc(100vh - 32px));
  display: grid;
  grid-template-rows: auto auto minmax(120px, 1fr) auto auto auto;
  overflow: hidden;
  border: 1px solid #55827d;
  border-radius: 14px;
  background: #f5faf9;
  color: #163632;
  box-shadow: 0 20px 65px rgba(0, 0, 0, 0.48);
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
}

.desktop-account-ai[hidden] { display: none; }

.desktop-account-ai__head,
.desktop-account-ai__voice,
.desktop-account-ai__composer {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  border-bottom: 1px solid #d4e2e0;
  background: #fff;
}

.desktop-account-ai__head strong { min-width: 0; flex: 1; }
.desktop-account-ai__head {
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.desktop-account-ai.is-dragging .desktop-account-ai__head { cursor: grabbing; }
.desktop-account-ai__head span { max-width: 42%; color: #5b706e; font-size: 11px; line-height: 1.35; overflow-wrap: anywhere; }
.desktop-account-ai button {
  min-height: 34px;
  border: 1px solid #276d66;
  border-radius: 8px;
  background: #fff;
  color: #1a5a54;
  font-weight: 800;
}
.desktop-account-ai__voice button[aria-pressed="true"] { color: #fff; background: #b62e3b; border-color: #b62e3b; }
.desktop-account-ai__voice { flex-wrap: wrap; }
.desktop-account-ai__rate {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.desktop-account-ai__voice-select {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.desktop-account-ai__voice-select select {
  width: 150px;
  min-height: 30px;
  border: 1px solid #91b3af;
  border-radius: 7px;
  background: #fff;
  color: #234c47;
  font-weight: 700;
}
.desktop-account-ai__voice-note {
  flex: 1 1 100%;
  color: #765825;
  font-size: 11px;
  line-height: 1.35;
}
.desktop-account-ai__rate select {
  min-height: 30px;
  border: 1px solid #91b3af;
  border-radius: 7px;
  background: #fff;
  color: #234c47;
  font-weight: 700;
}
.desktop-account-ai__voice output {
  min-width: 150px;
  flex: 1 1 150px;
  color: #3f625e;
  font-size: 12px;
  line-height: 1.35;
  white-space: normal;
}
.desktop-account-ai__messages { min-height: 120px; overflow: auto; padding: 10px; }
.desktop-account-ai__message { width: fit-content; max-width: 88%; margin-bottom: 8px; padding: 8px 10px; border: 1px solid #d3e1df; border-radius: 10px; background: #fff; white-space: pre-wrap; overflow-wrap: anywhere; }
.desktop-account-ai__message small { display: block; color: #536e6a; line-height: 1.45; }
.desktop-account-ai__message.is-user { margin-left: auto; color: #fff; background: #166d64; border-color: #166d64; }
.desktop-account-ai__recommendation { max-width: 92%; margin: 0 0 8px auto; padding: 9px 10px; border: 1px solid #c99e52; border-radius: 10px; background: #fff8e7; }
.desktop-account-ai__recommendation strong,
.desktop-account-ai__recommendation span { display: block; line-height: 1.45; }
.desktop-account-ai__recommendation span { margin: 5px 0 7px; color: #765825; white-space: pre-wrap; }
.desktop-account-ai__recommendation button { width: 100%; }
.desktop-account-ai__video-task { margin-left: 0; border-color: #91b3af; background: #f4faf9; }
.desktop-account-ai__video-task video { display: block; width: 100%; max-height: 240px; margin: 7px 0; background: #111; }
.desktop-account-ai__video-task div { display: flex; gap: 7px; }
.desktop-account-ai__composer { border-top: 1px solid #d4e2e0; border-bottom: 0; }
.desktop-account-ai__asset { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-top: 1px solid #d4e2e0; color: #315f59; background: #eef7f5; }
.desktop-account-ai__asset[hidden] { display: none; }
.desktop-account-ai__asset span { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.desktop-account-ai__asset button { width: 32px; min-width: 32px; padding: 4px; }
.desktop-account-ai__composer [data-desktop-ai-attach] { flex: 0 0 auto; }
.desktop-account-ai__composer textarea { min-width: 0; min-height: 40px; flex: 1; resize: vertical; border: 1px solid #b9cecb; border-radius: 8px; padding: 8px; }
.desktop-account-ai__confirmation { margin: 0 10px 10px; padding: 9px; border: 1px solid #d49a46; border-radius: 9px; background: #fff8e7; }
.desktop-account-ai__confirmation > span,
.desktop-account-ai__confirmation > small { display: block; margin-top: 6px; line-height: 1.5; }
.desktop-account-ai__confirmation > small { color: #765825; }
.desktop-account-ai__confirmation div { display: flex; gap: 8px; margin-top: 7px; }
.desktop-account-ai__confirmation button { flex: 1; }
.desktop-account-ai__message.is-error { color: #8b1f2b; border-color: #dbaab0; background: #fff2f3; }
/* 批TGW-DEV333补：AI 生成标识行——贴着回复气泡下方的小字，不占独立气泡 */
.desktop-account-ai__notice { margin: -4px 0 8px; padding: 0 10px; border: 0; background: none; color: #6b7f7d; font-size: 12px; line-height: 1.4; }
.desktop-account-ai-launcher {
  position: fixed;
  z-index: 2147483300;
  left: 16px;
  right: auto;
  bottom: 16px;
  min-width: 100px;
  min-height: 42px;
  border: 2px solid #a4e5dc;
  border-radius: 999px;
  background: #075f57;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.42);
  font-weight: 900;
}

#quickIndicatorSeries [data-account-ai-selected="true"] {
  border-color: #ff6f77;
  background: #c92f39;
  color: #fff;
  box-shadow: 0 0 0 2px rgba(255, 223, 99, 0.88), 0 0 12px rgba(255, 92, 101, 0.75);
}

#quickIndicatorParameterOptions [data-account-ai-selected="true"] {
  border-color: #ffdf63;
  background: #c92f39;
  color: #fff;
  box-shadow: 0 0 0 2px rgba(255, 223, 99, 0.72);
}
