
:root {
  --qa-page-bg: #e6e8eb;
  --qa-blue: #2655a8;
  --qa-blue-light: #659dff;
  --qa-text: #333333;
  --qa-muted: #666666;
  --qa-black: #000000;
  --qa-white: #ffffff;
  --qa-pill: #f5f5f5; 
  --qa-line: rgba(0, 0, 0, 0.08); 
  --qa-line-faq: rgba(0, 0, 0, 0.1);
  --qa-green: #6fae2c;
  --qa-sky: #3071b9;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
}

body.qa-body {
  font-family: Arial, Helvetica, sans-serif;
  background: var(--qa-page-bg);
  color: var(--qa-text);
  -webkit-font-smoothing: antialiased;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
}

.qa-page {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  margin: 0;
  position: relative;
  background: var(--qa-page-bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

@supports (height: 100dvh) {
  .qa-page {
    height: 100dvh;
    max-height: 100dvh;
  }
}

.qa-page__frost {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.5);
  pointer-events: none;
  z-index: 0;
}

.qa-page__layout {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

/* —— 左侧栏 420 —— */
.qa-sidebar {
  width: 420px;
  flex-shrink: 0;
  background: var(--qa-white);
  position: relative;
  z-index: 2;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 0.28s ease, transform 0.28s ease, box-shadow 0.28s ease;
}

.qa-layout--sidebar-collapsed:not(.qa-layout--overlay) .qa-sidebar {
  width: 0;
}

.qa-layout--sidebar-collapsed:not(.qa-layout--overlay) .qa-sidebar__inner {
  opacity: 0;
  pointer-events: none;
}

.qa-sidebar__inner {
  padding: 60px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.qa-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: auto;
  max-width: 100%;
  margin-bottom: 56px;
}

.qa-brand__logo-wrap {
  width: 100px;
  height: 100px;
  flex-shrink: 0;
  line-height: 0;
    border-radius: 50%;
    overflow: hidden;
    background-color: rgba(38,85,168, .1);
}

.qa-brand__logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
 
.qa-brand__title {
  margin: 24px 0 0;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.125;
  color: var(--qa-black);
  text-align: center;
  white-space: nowrap;
  display: none;
}

.qa-sidebar__contacts {
  width: 100%;
  padding: 0 40px;
}

/* 与稿中侧栏分割线一致：360px 宽、左移11px；整块联系信息顶部、底部各一根 */
.qa-sidebar__contacts::before,
.qa-sidebar__contacts::after {
  content: "";
  display: block;
  height: 1px;
  background: var(--qa-line);
  width: 360px;
  margin-left: -11px;
  flex-shrink: 0;
}

.qa-sidebar__contacts::before {
  margin-bottom: 17px;
}

.qa-sidebar__contacts::after {
  margin-top: 17px;
}

.qa-divider {
  height: 1px;
  background: var(--qa-line);
  margin: 0 0 0 -11px;
  width: 360px;
}

.qa-contact-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 45px;
  margin-bottom: 0;
}

/* 稿中相邻联系人行间距约 35px（含 1px 分割线），分割线上下各约 17px */
.qa-contact-row + .qa-divider {
  margin-top: 17px;
  margin-bottom: 17px;
}

.qa-contact-row--tight-next + .qa-divider {
  margin-top: 17px;
  margin-bottom: 17px;
}

.qa-ico-circle {
  width: 45px;
  height: 45px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--qa-pill);
  overflow: hidden;
}

.qa-ico-circle img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.qa-contact-body {
  padding-top: 2px;
  min-width: 0;
}

.qa-contact-label {
  margin: 0;
  font-size: 14px;
  line-height: 16px;
  color: var(--qa-muted);
}

.qa-contact-value {
  margin: 5px 0 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--qa-black);
}

.qa-contact-value a {
  color: inherit;
  text-decoration: none;
}

.qa-contact-value a:hover {
  text-decoration: underline;
}

/* —— 主区域 —— */
.qa-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.qa-topbar {
  height: 50px;
  background: var(--qa-blue);
  display: flex;
  align-items: center;
  padding: 0 16px 0 0;
  flex-shrink: 0;
}

@media (min-width: 1201px) {
  .qa-topbar {
    padding-left: 40px;
  }
}

.qa-sidebar-toggle {
  display: none;
  width: 54px;
  height: 50px;
  margin-right: 12px;
  border: none;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  background: var(--qa-blue);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.18s ease;
}

.qa-sidebar-toggle:hover {
  background: #1d4488;
}

.qa-sidebar-toggle__line {
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--qa-white);
}

.qa-sidebar-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.06);
  cursor: pointer;
  z-index: 23;
}

.qa-sidebar-close:hover {
  background: rgba(0, 0, 0, 0.12);
}

.qa-sidebar-close__line {
  position: absolute;
  left: 8px;
  top: 15px;
  width: 16px;
  height: 2px;
  background: #555;
  border-radius: 2px;
}

.qa-sidebar-close__line:first-child {
  transform: rotate(45deg);
}

.qa-sidebar-close__line:last-child {
  transform: rotate(-45deg);
}

.qa-sidebar-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.32);
  z-index: 21;
}

.qa-topbar__ico {
  flex-shrink: 0;
  margin-right: 10px;
  line-height: 0;
}

.qa-topbar__ico img {
  display: block;
  width: auto;
  height: auto;
  max-height: 14px;
}

.qa-topbar__text {
  margin: 0;
  font-size: 14px;
  line-height: 16px;
  color: var(--qa-white);
  flex: 1;
  min-width: 0;
}

.qa-lang {
  position: relative;
  margin-left: 12px;
  flex-shrink: 0;

    visibility: hidden !important;
}

.qa-lang__toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--qa-white);
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.qa-lang__toggle:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.4);
}

.qa-lang__toggle svg {
  width: 16px;
  height: 16px;
  display: block;
}

.qa-lang__caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.9;
}

.qa-lang__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 116px;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid rgba(10, 33, 71, 0.16);
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.2);
  z-index: 30;
}

.qa-lang__option {
  width: 100%;
  border: none;
  background: transparent;
  border-radius: 8px;
  text-align: left;
  font-size: 14px;
  line-height: 18px;
  color: #1f2937;
  padding: 8px 10px;
  cursor: pointer;
}

.qa-lang__option:hover {
  background: #f1f5f9;
}

.qa-main-scroll {
  flex: 1 1 auto;
  min-height: 0;
  padding: 47px 20px 16px 20px;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
}

.qa-msg-list {
  width: 1140px;
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

/* 稿 3:152 / 3:158：两条消息纵向间距约 26px */
.qa-msg {
  display: flex;
  gap: 10px;
  max-width: 600px;
  margin-bottom: 26px;
}

.qa-msg--tight-after {
  margin-bottom: 12px;
}

.qa-msg-fx-move {
  transition: transform 0.38s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.qa-msg-fx-enter-active {
  transition:
    opacity 0.42s cubic-bezier(0.2, 0.65, 0.2, 1),
    transform 0.42s cubic-bezier(0.2, 0.65, 0.2, 1),
    filter 0.42s cubic-bezier(0.2, 0.65, 0.2, 1);
}

.qa-msg-fx-enter-from {
  opacity: 0;
  transform: translateY(14px) scale(0.985);
  filter: blur(4px);
}

.qa-msg-fx-enter-to {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

.qa-msg .qa-bubble {
  will-change: transform, opacity, filter;
  transform-origin: left bottom;
}

.qa-msg--self .qa-bubble {
  transform-origin: right bottom;
}

.qa-msg--self {
  margin-left: auto;
  flex-direction: row-reverse;
  max-width: 560px;
}

.qa-msg--faq {
  max-width: 700px;
}

.qa-msg__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
}

.qa-msg__avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.qa-msg__avatar--ghost {
  opacity: 0;
  pointer-events: none;
}

.qa-msg__col {
  min-width: 0;
  flex: 1;
}

.qa-msg__role {
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 19px;
  color: var(--qa-muted);
}

.qa-msg--bot .qa-msg__role {
  color: var(--qa-text);
}

.qa-bubble {
  position: relative;
  border-radius: 0 20px 20px 20px;
  padding: 20px;
  word-break: break-word;
}

.qa-bubble p {
  margin: 0;
  font-size: 16px;
  line-height: 22px;
}

.qa-bubble--system {
  background: var(--qa-white);
  color: var(--qa-text);
}

.qa-bubble--bot {
  background: var(--qa-blue);
  color: var(--qa-white);
}

.qa-msg--self .qa-msg__col {
  display: flex;
  justify-content: flex-end;
}

.qa-bubble--self {
  background: var(--qa-green);
  color: var(--qa-white);
  border-radius: 20px 20px 0 20px;
}

.qa-bubble--loading {
  min-width: 90px;
}

.qa-loading-inline {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  color: var(--qa-blue);
  background: transparent;
}

.qa-loading-dots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.qa-loading-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.3;
  animation: qa-loading 1.1s infinite ease-in-out;
}

.qa-loading-dots i:nth-child(2) {
  animation-delay: 0.15s;
}

.qa-loading-dots i:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes qa-loading {
  0%, 80%, 100% {
    opacity: 0.3;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

.qa-bubble__html p {
  margin: 0;
}

.qa-bubble__html p + p {
  margin-top: 10px;
}

.qa-bubble__html a {
  color: inherit;
  text-decoration: underline;
}

/* FAQ 卡片：与对话白气泡一致，左上直角、其余 20px */
.qa-faq {
  width: 600px;
  max-width: 100%;
  min-height: 280px;
  background: var(--qa-white);
  border-radius: 0 20px 20px 20px;
  margin: 0 0 0 50px;
  padding: 29px 26px 20px;
  overflow: hidden;
}

.qa-msg--faq .qa-faq {
  margin-left: 0;
}

.qa-faq__title {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 700;
  line-height: 19px;
  color: var(--qa-black);
}

.qa-faq__tabs {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 20px;
  position: relative;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--qa-line-faq);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.qa-faq__tabs::-webkit-scrollbar {
  display: none;
}

.qa-faq__tab {
  margin: 0;
  border: none;
  background: transparent;
  padding: 0;
  font-size: 14px;
  line-height: 16px;
  color: var(--qa-muted);
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s ease;
  flex: 0 0 auto;
}

.qa-faq__tab:hover {
  color: var(--qa-blue);
}

.qa-faq__tab--active {
  font-size: 16px;
  font-weight: 700;
  line-height: 19px;
  color: var(--qa-blue);
}

.qa-faq__tab-line {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 68px;
  height: 2px;
  background: var(--qa-blue);
  border-radius: 1px;
  transition: left 0.25s ease, width 0.25s ease;
}

.qa-faq__list-wrap {
  margin-top: 14px;
  padding-top: 0;
}

.qa-faq ul {
  margin: 0;
  padding: 0 0 0 24px;
  list-style: disc;
  list-style-position: outside;
}

.qa-faq li {
  margin: 0;
  font-size: 16px;
  line-height: 32px;
  color: var(--qa-muted);
  border-bottom: 1px solid var(--qa-line-faq);
}

.qa-faq li:last-child {
  border-bottom: none;
}

.qa-faq li::marker {
  color: var(--qa-muted);
}

.qa-faq li > a {
  color: var(--qa-blue);
  font: inherit;
  font-size: 16px;
  line-height: 19px;
  font-weight: 700;
  text-decoration: none;
}

.qa-faq li > a:hover {
  color: var(--qa-blue);
  text-decoration: underline;
}

.qa-faq__item-btn {
  color: var(--qa-blue);
  font: inherit;
  font-size: 16px;
  line-height: 19px;
  font-weight: 700;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.qa-faq__item-btn:hover {
  color: var(--qa-blue);
}

/*输入区 */
.qa-input-dock {
  margin-top: auto;
  flex-shrink: 0;
  padding: 0 20px 24px;
}

.qa-input-shell {
  position: relative;
  width: 1140px;
  max-width: 100%;
  margin: 0 auto;
  height: 160px;
  background: var(--qa-white);
  border: 1px solid var(--qa-line-faq);
  border-radius: 10px;
  padding: 20px 160px 20px 30px;
}

.qa-input-shell__textarea {
  margin: 0;
  width: 100%;
  height: 100%;
  resize: none;
  border: none;
  outline: none;
  background: transparent;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 24px;
  color: var(--qa-text);
}

.qa-input-shell__textarea::placeholder {
  color: var(--qa-muted);
}

.qa-send {
  position: absolute;
  right: 33px;
  bottom: 28px;
  width: 125px;
  height: 45px;
  border: none;
  border-radius: 10px;
  background: var(--qa-blue);
  color: var(--qa-white);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px 0 16px;
}

.qa-send:hover {
  filter: brightness(1.05);
}

.qa-send:active {
  filter: brightness(0.95);
}

.qa-send:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.qa-send__ico {
  flex-shrink: 0;
  line-height: 0;
}

.qa-send__ico img {
  display: block;
  width: 22px;
  height: 20px;
  object-fit: contain;
}

@media (max-width: 1599px) {
  .qa-input-shell {
    width: 100%;
  }

  .qa-faq {
    margin-left: 0;
  }
}

@media (max-width: 1200px) {
  .qa-sidebar-toggle {
    display: inline-flex;
  }

  .qa-sidebar.qa-sidebar--overlay {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 22;
    transform: translateX(-100%) !important;
    box-shadow: none;
    pointer-events: none;
    visibility: hidden;
  }

  .qa-sidebar.qa-sidebar--overlay.qa-sidebar--open {
    transform: translateX(0) !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.24);
    pointer-events: auto;
    visibility: visible;
  }
}

@media (max-width: 800px) {
  .qa-sidebar.qa-sidebar--overlay.qa-sidebar--mobile {
    width: 100%;
  }

  .qa-sidebar__contacts {
    padding: 0 20px;
  }

  .qa-sidebar__contacts::before,
  .qa-sidebar__contacts::after,
  .qa-divider {
    width: 100%;
    margin-left: 0;
  }
}

@media (max-width: 640px) {
  .qa-topbar {
    height: 48px;
    padding-right: 10px;
  }

  .qa-sidebar-toggle {
    width: 48px;
    height: 48px;
    margin-right: 12px;
  }

  .qa-topbar__ico {
    margin-right: 8px;
    padding-left: 2px;
  }

  .qa-topbar__text {
    font-size: 12px;
    line-height: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .qa-lang {
    margin-left: 8px;
  }

  .qa-lang__toggle {
    height: 30px;
    padding: 0 8px;
    gap: 4px;
    border-radius: 7px;
  }

  .qa-lang__toggle span {
    font-size: 12px;
    line-height: 14px;
  }

  .qa-main-scroll {
    padding: 18px 12px 12px;
  }

  .qa-msg-list {
    width: 100%;
  }

  .qa-msg {
    max-width: 100%;
    margin-bottom: 16px;
    gap: 8px;
  }

  .qa-msg--self {
    max-width: 100%;
  }

  .qa-msg__avatar,
  .qa-msg__avatar--ghost {
    width: 32px;
    height: 32px;
  }

  .qa-msg__role {
    margin-bottom: 6px;
    font-size: 13px;
    line-height: 16px;
  }

  .qa-bubble {
    padding: 12px 14px;
    border-radius: 0 14px 14px 14px;
  }

  .qa-bubble--self {
    border-radius: 14px 14px 0 14px;
  }

  .qa-bubble p,
  .qa-bubble__html p {
    font-size: 14px;
    line-height: 20px;
  }

  .qa-faq {
    width: 100%;
    min-height: 0;
    padding: 16px 14px 12px;
    border-radius: 0 14px 14px 14px;
  }

  .qa-faq__title {
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 17px;
  }

  .qa-faq__tabs {
    gap: 12px;
    padding-bottom: 4px;
  }

  .qa-faq__tab {
    font-size: 12px;
    line-height: 14px;
  }

  .qa-faq__tab--active {
    font-size: 14px;
    line-height: 17px;
  }

  .qa-faq ul {
    padding-left: 18px;
  }

  .qa-faq li {
    font-size: 14px;
    line-height: 26px;
  }

  .qa-input-dock {
    padding: 0 10px 12px;
  }

  .qa-input-shell {
    height: 124px;
    border-radius: 9px;
    padding: 12px 10px 52px 12px;
  }

  .qa-input-shell__textarea {
    font-size: 14px;
    line-height: 20px;
  }

  .qa-send {
    right: 10px;
    bottom: 10px;
    width: 92px;
    height: 34px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 18px;
    gap: 5px;
    padding: 0 8px 0 10px;
  }

  .qa-send__ico img {
    width: 16px;
    height: 14px;
  }
}

@media (max-width: 380px) {
  .qa-topbar__text {
    display: block;
    font-size: 11px;
    line-height: 13px;
  }

  .qa-lang {
    margin-left: auto;
  }

  .qa-lang__toggle {
    width: 30px;
    min-width: 30px;
    padding: 0;
    justify-content: center;
    gap: 0;
  }

  .qa-lang__toggle span,
  .qa-lang__caret {
    display: none;
  }

  .qa-sidebar-toggle {
    margin-right: 8px;
  }

  .qa-faq {
    padding-left: 12px;
    padding-right: 12px;
  }
}
