.shuoshuo-chat {
  --shuoshuo-primary: #11285b;
  --shuoshuo-accent: #23bfd1;
  --shuoshuo-surface: rgba(255, 255, 255, 0.96);
  --shuoshuo-line: rgba(17, 40, 91, 0.14);
  bottom: 22px;
  color: #17233d;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  position: fixed;
  right: 22px;
  z-index: 80;
}

.shuoshuo-chat * {
  box-sizing: border-box;
}

.shuoshuo-chat__hint {
  align-items: center;
  background: var(--shuoshuo-surface);
  border: 1px solid rgba(35, 191, 209, 0.26);
  border-radius: 16px;
  box-shadow: 0 16px 44px rgba(17, 40, 91, 0.18);
  color: #24334f;
  display: flex;
  font-size: 14px;
  font-weight: 800;
  gap: 8px;
  line-height: 1.35;
  margin: 0 0 -18px auto;
  max-width: 230px;
  padding: 10px 12px;
  position: relative;
  transition: opacity 160ms ease, transform 160ms ease;
  width: max-content;
}

.shuoshuo-chat.is-open .shuoshuo-chat__hint {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

.shuoshuo-chat__hint::after {
  background: var(--shuoshuo-surface);
  border-bottom: 1px solid rgba(35, 191, 209, 0.26);
  border-right: 1px solid rgba(35, 191, 209, 0.26);
  bottom: -6px;
  content: "";
  height: 10px;
  position: absolute;
  right: 52px;
  transform: rotate(45deg);
  width: 10px;
}

.shuoshuo-chat__launcher {
  background: transparent;
  border: 0;
  cursor: pointer;
  display: block;
  filter: drop-shadow(0 18px 30px rgba(10, 35, 74, 0.24));
  margin-left: auto;
  padding: 0;
  position: relative;
}

.shuoshuo-chat__mascot-shell {
  height: 190px;
  position: relative;
  width: 185px;
}

.shuoshuo-chat__mascot {
  bottom: -16px;
  height: auto;
  left: 50%;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  transform: translateX(-50%);
  transition: opacity 140ms ease;
  width: 185px;
}

.shuoshuo-chat__mascot.is-active {
  opacity: 1;
}

.shuoshuo-chat__panel {
  background: var(--shuoshuo-surface);
  border: 1px solid rgba(35, 191, 209, 0.24);
  border-radius: 18px;
  bottom: 178px;
  box-shadow: 0 24px 70px rgba(13, 32, 68, 0.22);
  display: grid;
  grid-template-rows: auto 1fr auto;
  max-height: min(620px, calc(100vh - 220px));
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  position: absolute;
  right: 8px;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
  width: min(380px, calc(100vw - 32px));
}

.shuoshuo-chat.is-open .shuoshuo-chat__panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.shuoshuo-chat__header {
  align-items: center;
  background: linear-gradient(135deg, #102454, #0d5d8b 58%, var(--shuoshuo-accent));
  color: #fff;
  display: flex;
  gap: 10px;
  padding: 12px 14px;
}

.shuoshuo-chat__avatar {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  flex: 0 0 34px;
  height: 34px;
  object-fit: cover;
  object-position: 52% 24%;
  width: 34px;
}

.shuoshuo-chat__name {
  font-size: 16px;
  font-weight: 900;
  line-height: 1.2;
}

.shuoshuo-chat__close {
  background: rgba(255, 255, 255, 0.16);
  border: 0;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  font-size: 20px;
  height: 30px;
  line-height: 26px;
  margin-left: auto;
  width: 30px;
}

.shuoshuo-chat__log {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding: 14px;
}

.shuoshuo-chat__msg {
  display: flex;
  max-width: 88%;
}

.shuoshuo-chat__msg--bot {
  align-self: flex-start;
}

.shuoshuo-chat__msg--user {
  align-self: flex-end;
  justify-content: flex-end;
}

.shuoshuo-chat__bubble {
  border-radius: 15px;
  font-size: 14px;
  line-height: 1.65;
  padding: 10px 12px;
  white-space: pre-wrap;
  word-break: break-word;
}

.shuoshuo-chat__msg--bot .shuoshuo-chat__bubble {
  background: #f2f7fb;
  border: 1px solid #dcecf4;
  border-top-left-radius: 5px;
  color: #26354d;
}

.shuoshuo-chat__msg--user .shuoshuo-chat__bubble {
  background: var(--shuoshuo-primary);
  border-top-right-radius: 5px;
  color: #fff;
}

.shuoshuo-chat__composer {
  border-top: 1px solid var(--shuoshuo-line);
  padding: 10px;
}

.shuoshuo-chat__row {
  display: flex;
  gap: 8px;
}

.shuoshuo-chat__input {
  border: 1px solid #cfdbe7;
  border-radius: 999px;
  color: #17233d;
  flex: 1;
  font: inherit;
  min-width: 0;
  padding: 10px 13px;
}

.shuoshuo-chat__input:focus {
  border-color: var(--shuoshuo-accent);
  outline: 2px solid rgba(35, 191, 209, 0.2);
}

.shuoshuo-chat__send {
  background: var(--shuoshuo-primary);
  border: 0;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  min-width: 58px;
  padding: 9px 11px;
}

.shuoshuo-chat__cta {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 9px;
}

.shuoshuo-chat__cta.is-visible {
  display: flex;
}

.shuoshuo-chat__cta a {
  background: #eef8fb;
  border: 1px solid #cfeaf2;
  border-radius: 999px;
  color: #174468;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  padding: 9px 11px;
  text-decoration: none;
}

@media (max-width: 640px) {
  .shuoshuo-chat {
    bottom: 10px;
    right: 10px;
  }

  .shuoshuo-chat__hint {
    display: none;
  }

  .shuoshuo-chat__mascot,
  .shuoshuo-chat__mascot-shell {
    width: 68px;
  }

  .shuoshuo-chat__mascot-shell {
    height: 68px;
  }

  .shuoshuo-chat__panel {
    bottom: 78px;
    max-height: calc(100vh - 104px);
    right: 0;
  }
}
