.icman-ai-lock {
  overflow: hidden;
}

.icman-ai-root {
  position: relative;
  z-index: 10020;
}

.icman-ai-overlay {
  position: fixed;
  inset: 0;
  z-index: 10020;
  pointer-events: none;
}

.icman-ai-panel {
  position: fixed;
  right: clamp(20px, 3vw, 54px);
  bottom: 26px;
  z-index: 10021;
  display: flex;
  width: min(420px, calc(100vw - 40px));
  height: min(650px, calc(100dvh - 52px));
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 28px;
  background: rgba(247, 252, 255, 0.74);
  box-shadow:
    0 24px 70px rgba(24, 72, 107, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
  backdrop-filter: blur(22px) saturate(145%);
  opacity: 0;
  pointer-events: none;
  transform: translateY(22px) scale(0.96);
  transform-origin: bottom right;
  transition: opacity 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}

.icman-ai-panel.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.icman-ai-panel.is-dragging,
.icman-ai-panel.is-resizing {
  cursor: grabbing;
  transition: none;
  user-select: none;
}

.icman-ai-panel.is-resizing {
  cursor: nwse-resize;
}

.icman-ai-resize-handle {
  display: none;
}

.icman-ai-header {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(168, 201, 221, 0.42);
  background: linear-gradient(135deg, rgba(244, 252, 255, 0.74) 0%, rgba(255, 255, 255, 0.4) 72%);
  cursor: grab;
  touch-action: none;
}

.icman-ai-avatar {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border-radius: 14px;
  border: 1px solid var(--icman-glass-border);
  background: linear-gradient(135deg, var(--icman-glass-surface), var(--icman-glass-tint));
  color: var(--icman-action-text);
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 18px rgba(52, 111, 128, 0.08);
}

.icman-ai-heading {
  min-width: 0;
  flex: 1;
}

.icman-ai-title {
  overflow: hidden;
  margin: 0;
  color: #10263a;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icman-ai-status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  color: #708397;
  font-size: 12px;
}

.icman-ai-status::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #27b67a;
  content: "";
}

.icman-ai-status.is-offline::before {
  background: #a7b1bc;
}

.icman-ai-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.icman-ai-header-actions,
.icman-ai-header-actions * {
  cursor: auto;
}

.icman-ai-header-actions .icman-ai-icon-button {
  cursor: pointer;
}

.icman-ai-icon-button {
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #5d7185;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  transition: color 0.18s ease, background 0.18s ease;
}

.icman-ai-icon-button:hover,
.icman-ai-icon-button:focus-visible {
  background: #edf7fc;
  color: #087fa8;
  outline: none;
}

.icman-ai-messages {
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 20px 18px 16px;
  background:
    radial-gradient(circle at 100% 0, rgba(31, 185, 224, 0.13), transparent 32%),
    rgba(245, 250, 253, 0.58);
  overscroll-behavior: contain;
}

.icman-ai-empty {
  padding: 30px 12px;
  color: #62778b;
  text-align: center;
}

.icman-ai-empty strong {
  display: block;
  margin-bottom: 10px;
  color: #173047;
  font-size: 17px;
}

.icman-ai-empty p {
  margin: 0;
  font-size: 13px;
  line-height: 1.8;
}

.icman-ai-message {
  display: flex;
  margin-bottom: 16px;
}

.icman-ai-message.is-user {
  justify-content: flex-end;
}

.icman-ai-bubble {
  max-width: 86%;
  padding: 11px 13px;
  border: 1px solid #dce8f1;
  border-radius: 5px 16px 16px;
  background: #fff;
  color: #243a4d;
  font-size: 14px;
  line-height: 1.72;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  box-shadow: 0 7px 20px rgba(30, 61, 88, 0.06);
}

.icman-ai-message.is-user .icman-ai-bubble {
  border-color: #0d8db7;
  border-radius: 16px 5px 16px 16px;
  background: linear-gradient(135deg, #118fb8, #156d9e);
  color: #fff;
}

.icman-ai-message.is-error .icman-ai-bubble {
  border-color: #f0d5d5;
  background: #fffafa;
  color: #8a4242;
}

.icman-ai-message.is-assistant .icman-ai-bubble {
  white-space: normal;
}

.icman-ai-rich {
  overflow-wrap: anywhere;
  word-break: normal;
}

.icman-ai-rich > :first-child {
  margin-top: 0;
}

.icman-ai-rich > :last-child {
  margin-bottom: 0;
}

.icman-ai-rich p {
  margin: 0 0 11px;
}

.icman-ai-rich h3,
.icman-ai-rich h4,
.icman-ai-rich h5,
.icman-ai-rich h6 {
  margin: 15px 0 7px;
  color: #173047;
  font-size: 15px;
  line-height: 1.5;
}

.icman-ai-rich ul,
.icman-ai-rich ol {
  margin: 7px 0 12px;
  padding-left: 21px;
}

.icman-ai-rich li {
  margin: 4px 0;
}

.icman-ai-rich strong {
  color: #173047;
  font-weight: 700;
}

.icman-ai-reference {
  display: inline;
  margin: 0 1px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: #087fa8;
  cursor: pointer;
  font: inherit;
  font-size: 0.84em;
  line-height: inherit;
  vertical-align: 0.08em;
}

.icman-ai-reference:hover,
.icman-ai-reference:focus-visible {
  color: #075d7b;
  outline: none;
}

.icman-ai-table-wrap {
  max-width: 100%;
  margin: 10px 0 13px;
  overflow-x: auto;
  border: 1px solid #dce8f1;
  border-radius: 10px;
}

.icman-ai-table {
  width: 100%;
  min-width: 360px;
  border-collapse: collapse;
  background: #fff;
  font-size: 12px;
  line-height: 1.55;
}

.icman-ai-table th,
.icman-ai-table td {
  min-width: 84px;
  padding: 8px 9px;
  border-right: 1px solid #e7eef4;
  border-bottom: 1px solid #e7eef4;
  text-align: left;
  vertical-align: top;
}

.icman-ai-table th {
  background: #eef7fb;
  color: #193e58;
  font-weight: 700;
}

.icman-ai-table tr:last-child td {
  border-bottom: 0;
}

.icman-ai-table th:last-child,
.icman-ai-table td:last-child {
  border-right: 0;
}

.icman-ai-source-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid #edf1f5;
}

.icman-ai-source-title {
  width: 100%;
  flex: 0 0 100%;
  color: #64798c;
  font-size: 11px;
  font-weight: 600;
}

.icman-ai-source {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eaf7fc;
  color: #0b7598;
  font-size: 11px;
  line-height: 1.35;
  text-decoration: none;
  transition: background 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

a.icman-ai-source:hover,
a.icman-ai-source:focus-visible {
  background: #d9f1fa;
  color: #075d7b;
  outline: none;
}

.icman-ai-source.is-highlighted {
  background: #c8edf9;
  box-shadow: 0 0 0 3px rgba(28, 174, 211, 0.18);
}

.icman-ai-source-ref {
  flex: 0 0 auto;
  font-weight: 700;
}

.icman-ai-source-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icman-ai-source-action {
  flex: 0 0 auto;
  color: #177fa2;
  font-weight: 600;
}

.icman-ai-answer-notice {
  margin-top: 10px;
  padding: 9px 10px;
  border-left: 3px solid #19a7cf;
  border-radius: 8px;
  background: #f1f9fc;
  color: #5b6f81;
  font-size: 11px;
  line-height: 1.65;
}

.icman-ai-retry {
  display: inline-flex;
  margin-top: 9px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0c82aa;
  cursor: pointer;
  font-size: 12px;
}

.icman-ai-loading {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 18px;
}

.icman-ai-loading i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5baac5;
  animation: icman-ai-pulse 1.1s infinite ease-in-out;
}

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

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

@keyframes icman-ai-pulse {
  0%,
  70%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  35% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

.icman-ai-human {
  position: relative;
  margin: 0 18px 12px;
  padding: 10px 40px 10px 12px;
  border: 1px solid #dce8f1;
  border-radius: 12px;
  background: #fff;
  color: #5e7285;
  font-size: 12px;
  line-height: 1.65;
}

.icman-ai-human[hidden] {
  display: none;
}

.icman-ai-human-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.icman-ai-human strong {
  display: block;
  margin-bottom: 3px;
  color: #233e55;
}

.icman-ai-human-close {
  position: absolute;
  top: 7px;
  right: 8px;
  display: grid;
  width: 27px;
  height: 27px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #71869a;
  cursor: pointer;
  font: inherit;
  font-size: 20px;
  line-height: 1;
}

.icman-ai-human-close:hover,
.icman-ai-human-close:focus-visible {
  background: #eef7fb;
  color: #087fa8;
  outline: 2px solid rgba(8, 127, 168, 0.2);
}

.icman-ai-human-transfer {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  padding: 0 13px;
  border: 1px solid var(--icman-glass-border);
  border-radius: 10px;
  background: linear-gradient(135deg, var(--icman-glass-surface), var(--icman-glass-tint));
  color: var(--icman-action-text);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.icman-ai-human-transfer:hover,
.icman-ai-human-transfer:focus-visible {
  box-shadow: 0 8px 18px rgba(17, 124, 168, 0.18);
  transform: translateY(-1px);
}

.icman-ai-composer {
  padding: 12px 18px max(14px, env(safe-area-inset-bottom));
  border-top: 1px solid #e4ebf2;
  background: #fff;
}

.icman-ai-input-wrap {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 8px 8px 8px 12px;
  border: 1px solid #ccdae5;
  border-radius: 15px;
  background: #fff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.icman-ai-input-wrap:focus-within {
  border-color: #20acd2;
  box-shadow: 0 0 0 3px rgba(32, 172, 210, 0.11);
}

.icman-ai-input {
  width: 100%;
  min-height: 24px;
  max-height: 116px;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: #20374b;
  font: inherit;
  font-size: 14px;
  line-height: 1.6;
}

.icman-ai-input::placeholder {
  color: #98a7b5;
}

.icman-ai-send {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--icman-glass-border);
  border-radius: 12px;
  background: linear-gradient(135deg, var(--icman-glass-surface), var(--icman-glass-tint));
  color: var(--icman-action-text);
  cursor: pointer;
  font-size: 18px;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.icman-ai-send:hover {
  transform: translateY(-1px);
}

.icman-ai-send:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.icman-ai-composer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 9px;
  font-size: 11px;
}

.icman-ai-composer-links {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 13px;
}

.icman-ai-composer-links[hidden] {
  display: none;
}

.icman-ai-composer-links a {
  color: #087fa8;
  text-decoration: none;
}

.icman-ai-composer-links a:hover,
.icman-ai-composer-links a:focus-visible {
  color: #075f80;
  text-decoration: underline;
}

.icman-ai-contact-button {
  min-height: 30px;
  flex: 0 0 auto;
  padding: 0 11px;
  border: 1px solid #087fa8;
  border-radius: 999px;
  background: #087fa8;
  color: #fff;
  box-shadow: 0 5px 13px rgba(8, 127, 168, 0.2);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.icman-ai-contact-button:hover,
.icman-ai-contact-button:focus-visible {
  background: #066a8d;
  box-shadow: 0 7px 17px rgba(8, 127, 168, 0.26);
  outline: 2px solid rgba(8, 127, 168, 0.2);
  outline-offset: 2px;
  transform: translateY(-1px);
}

.icman-ai-disclaimer {
  position: absolute;
  z-index: 20;
  inset: 76px 0 0;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow-y: auto;
  background: rgba(247, 250, 253, 0.96);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.icman-ai-disclaimer.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.icman-ai-disclaimer-card {
  width: min(100%, 390px);
  padding: 26px 24px 22px;
  border: 1px solid #d7e6ef;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(30, 69, 96, 0.14);
}

.icman-ai-disclaimer-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  border-radius: 15px;
  border: 1px solid var(--icman-glass-border);
  background: linear-gradient(135deg, var(--icman-glass-surface), var(--icman-glass-tint));
  color: var(--icman-action-text);
  font-size: 22px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(52, 111, 128, 0.08);
}

.icman-ai-disclaimer-card h3 {
  margin: 0 0 10px;
  color: #142b3e;
  font-size: 20px;
  line-height: 1.35;
}

.icman-ai-disclaimer-card p {
  margin: 0;
  color: #607387;
  font-size: 13px;
  line-height: 1.75;
}

.icman-ai-disclaimer-card ul {
  margin: 16px 0 20px;
  padding: 0;
  list-style: none;
}

.icman-ai-disclaimer-card li {
  position: relative;
  margin-top: 10px;
  padding-left: 18px;
  color: #42596d;
  font-size: 12px;
  line-height: 1.65;
}

.icman-ai-disclaimer-card li::before {
  content: "";
  position: absolute;
  top: 0.65em;
  left: 2px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #18a8ce;
}

.icman-ai-disclaimer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icman-ai-disclaimer-accept,
.icman-ai-disclaimer-human {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, color 160ms ease;
}

.icman-ai-disclaimer-accept {
  flex: 1;
  border: 1px solid var(--icman-glass-border);
  background: linear-gradient(135deg, var(--icman-glass-surface), var(--icman-glass-tint));
  color: var(--icman-action-text);
}

.icman-ai-disclaimer-human {
  border: 1px solid #cadce8;
  background: #ffffff;
  color: #456074;
}

.icman-ai-disclaimer-accept:hover,
.icman-ai-disclaimer-accept:focus-visible,
.icman-ai-disclaimer-human:hover,
.icman-ai-disclaimer-human:focus-visible {
  transform: translateY(-1px);
}

.icman-ai-disclaimer-human:hover,
.icman-ai-disclaimer-human:focus-visible {
  border-color: #8fcfe1;
  color: #0f83aa;
}

.icman-ai-vendor-bridge {
  position: fixed;
  top: -9999px;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.icman-ai-mobile-trigger {
  display: none;
}

.toolbar dd.qq a.icman-ai-trigger {
  cursor: pointer;
}

.icman-ai-float-trigger {
  position: fixed;
  top: 112px;
  left: 24px;
  z-index: 10010;
  display: inline-flex;
  width: 58px;
  height: 58px;
  padding: 0;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 18px;
  outline: 0;
  background: rgba(240, 250, 255, 0.68);
  box-shadow: 0 14px 30px rgba(35, 102, 143, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.78);
  color: #087fa8;
  cursor: grab;
  touch-action: none;
  -webkit-backdrop-filter: blur(18px) saturate(145%);
  backdrop-filter: blur(18px) saturate(145%);
  transition: transform 180ms ease, box-shadow 180ms ease, border-radius 180ms ease, background 180ms ease;
}

.icman-ai-float-trigger::after {
  position: absolute;
  top: 50%;
  left: calc(100% + 10px);
  padding: 8px 11px;
  border: 1px solid rgba(210, 228, 240, 0.9);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 22px rgba(30, 55, 92, 0.12);
  color: #086f9e;
  content: attr(data-service-label);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translate(-8px, -50%);
  transition: opacity 180ms ease, transform 180ms ease;
  white-space: nowrap;
}

.icman-ai-float-trigger:hover,
.icman-ai-float-trigger:focus-visible {
  border-radius: 20px;
  background: rgba(250, 253, 255, 0.82);
  box-shadow: 0 18px 34px rgba(35, 102, 143, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transform: translateY(-3px) scale(1.03);
}

.icman-ai-float-trigger:hover::after,
.icman-ai-float-trigger:focus-visible::after {
  opacity: 1;
  transform: translate(0, -50%);
}

.icman-ai-float-trigger.is-dragging {
  cursor: grabbing;
  transition: none;
}

.icman-ai-float-trigger.is-dragging:hover {
  transform: none;
}

.icman-ai-float-icon {
  display: flex;
  width: 43px;
  height: 43px;
  align-items: center;
  justify-content: center;
}

.icman-ai-float-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* 关闭 AI 时，悬浮球同步切换为人工客服视觉，不继续显示 AI 头像。 */
.icman-ai-float-trigger.is-human-mode .icman-ai-float-icon img {
  display: none;
}

.icman-ai-float-trigger.is-human-mode .icman-ai-float-icon::before {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border: 1px solid rgba(132, 196, 220, 0.78);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.76);
  color: #087fa8;
  content: "客服";
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
}

.icman-ai-float-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (min-width: 768px) {
  .icman-ai-resize-handle {
    position: absolute;
    right: 5px;
    bottom: 5px;
    z-index: 30;
    display: block;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #6d899c;
    cursor: nwse-resize;
    touch-action: none;
  }

  .icman-ai-resize-handle::before,
  .icman-ai-resize-handle::after {
    position: absolute;
    right: 4px;
    bottom: 4px;
    width: 10px;
    height: 1px;
    border-radius: 1px;
    background: currentColor;
    content: "";
    transform: rotate(-45deg);
    transform-origin: right center;
  }

  .icman-ai-resize-handle::after {
    right: 4px;
    bottom: 9px;
    width: 6px;
  }

  .icman-ai-resize-handle:hover,
  .icman-ai-resize-handle:focus-visible {
    background: rgba(225, 241, 249, 0.88);
    color: #087fa8;
    outline: 2px solid rgba(8, 127, 168, 0.24);
    outline-offset: 1px;
  }

  .toolbar dd.qq {
    left: -14px;
    width: 78px !important;
    height: 50px !important;
    border-color: var(--icman-glass-border) !important;
    background: linear-gradient(135deg, var(--icman-glass-surface), var(--icman-glass-tint)) !important;
    box-shadow: 0 8px 24px rgba(52, 111, 128, 0.08) !important;
  }

  .toolbar dd.qq:hover {
    border-color: #7dcce3 !important;
  }

  /* AI 开启时保持原来的 AI 标识 + AI客服排版不变。 */
  .toolbar .qq > a.icman-ai-trigger {
    width: 78px !important;
    color: var(--icman-action-text) !important;
    font-size: 13px !important;
    font-weight: 700;
    gap: 5px;
  }

  .toolbar .qq > a.icman-ai-trigger::before {
    content: "AI";
    display: grid;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    place-items: center;
    border: 1px solid #9bd8ea;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.62);
    color: var(--icman-action-text);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
  }

  /* 只有后台关闭 AI、切换到人工客服时，才隐藏左侧 AI 标识。 */
  .toolbar .qq > a.icman-ai-trigger.is-human-mode {
    justify-content: center;
    gap: 0;
    font-size: 14px !important;
    text-align: center;
    white-space: nowrap;
  }

  .toolbar .qq > a.icman-ai-trigger.is-human-mode::before {
    display: none !important;
    content: none !important;
  }
}

@media (max-width: 767px) {
  .icman-ai-float-trigger {
    display: none;
  }

  .icman-ai-overlay {
    background: rgba(12, 28, 45, 0.28);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s ease;
  }

  .icman-ai-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .icman-ai-panel {
    top: max(10px, env(safe-area-inset-top));
    right: 10px;
    bottom: calc(68px + env(safe-area-inset-bottom));
    left: 10px;
    width: auto;
    height: auto;
    max-height: none;
    border: 1px solid #d9e7f2;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 -18px 48px rgba(21, 56, 87, 0.18);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    transform: translateY(108%);
  }

  .icman-ai-resize-handle {
    display: none;
  }

  .icman-ai-panel.is-open {
    transform: translateY(0);
  }

  .icman-ai-disclaimer {
    inset: 66px 0 0;
    padding: 18px 14px;
  }

  .icman-ai-disclaimer-card {
    padding: 22px 18px 18px;
  }

  .icman-ai-disclaimer-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .icman-ai-disclaimer-accept,
  .icman-ai-disclaimer-human {
    width: 100%;
  }

  .icman-ai-header {
    min-height: 66px;
    padding: 10px 14px;
    cursor: default;
    touch-action: auto;
  }

  .icman-ai-avatar {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .icman-ai-messages {
    padding: 15px 13px 12px;
  }

  .icman-ai-bubble {
    max-width: 90%;
  }

  .icman-ai-table {
    min-width: 430px;
  }

  .icman-ai-source {
    width: 100%;
    border-radius: 10px;
  }

  .icman-ai-source-name {
    flex: 1;
  }

  .icman-ai-human {
    margin: 0 13px 9px;
  }

  .icman-ai-composer {
    padding: 10px 13px 12px;
  }

  .icman-ai-composer-meta {
    align-items: flex-start;
  }

  .icman-ai-composer-links {
    gap: 4px 10px;
    line-height: 1.45;
  }

  .icman-ai-mobile-trigger {
    position: fixed;
    right: 13px;
    bottom: 76px;
    z-index: 10010;
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    gap: 6px;
    padding: 0 14px;
    border: 1px solid var(--icman-glass-border);
    border-radius: 999px;
    background: linear-gradient(135deg, var(--icman-glass-surface), var(--icman-glass-tint));
    color: var(--icman-action-text);
    box-shadow: 0 8px 24px rgba(52, 111, 128, 0.08);
    font-size: 13px;
    font-weight: 600;
  }

  .icman-ai-mobile-trigger::before {
    content: "AI";
    font-size: 12px;
    font-weight: 800;
  }

  .icman-ai-mobile-trigger.is-human-mode::before {
    display: none;
    content: "";
  }
}

.mobile-bottom-nav svg {
  display: block;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

@media (prefers-reduced-motion: reduce) {
  .icman-ai-overlay,
  .icman-ai-panel,
  .icman-ai-send,
  .icman-ai-disclaimer,
  .icman-ai-human-transfer,
  .icman-ai-contact-button {
    transition: none;
  }

  .icman-ai-loading i {
    animation: none;
  }
}

/* 忠仕商务通只用于打开独立人工客服页，禁止其默认浮窗留在官网页面。 */
[id^="LRdiv"],
[id^="LRfloater"],
[id^="LRMINI"],
[id^="LR_Flash"],
[id^="LXB_CONTAINER"],
iframe[src*="zoosnet.net"],
iframe[src*="lr.zoosnet"] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
