.digital-human-root-passive { display: contents; }

.digital-human-vr-layer {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
}

.digital-human-vr-layer > * { pointer-events: auto; }

.digital-human-vr-layer .digital-human-float { position: absolute; }

.digital-human-vr-layer .float-popup-mask {
  position: absolute;
  inset: 0;
}

.digital-human-vr-layer .float-popup.is-mobile {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
}

.digital-human-float {
  position: fixed;
  z-index: 9999;
  display: flex;
  cursor: move;
  align-items: center;
  gap: 12px;
  touch-action: none;
}

.digital-human-float .tip-bubble {
  background: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: dhTipSlideIn 0.5s ease;
  white-space: nowrap;
  z-index: 10000;
  position: relative;
}

@keyframes dhTipSlideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

.digital-human-float .tip-text {
  font-size: 14px;
  color: #333;
  min-height: 20px;
}

.digital-human-float .tip-close {
  width: 20px;
  height: 20px;
  border: none;
  background: #f0f0f0;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.digital-human-float .tip-close:hover { background: #e0e0e0; }

.digital-human-float .float-btn {
  position: relative;
  cursor: grab;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  filter: drop-shadow(0 10px 30px rgba(102, 126, 234, 0.5));
  transition: all 0.3s ease;
}

.digital-human-float:active { cursor: grabbing; }

.digital-human-float .avatar-wrapper {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: visible;
  border: 4px solid rgba(255, 255, 255, 0.95);
  transition: none;
  background: #f0f0f0;
  position: relative;
}

.digital-human-float .dh-human-sdk-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
}

.digital-human-float.is-expanded .dh-human-sdk-wrap {
  overflow: visible;
}

.digital-human-float.is-expanded:not(.is-mobile) .dh-human-sdk-wrap {
  width: 170%;
  height: 210%;
  left: -100%;
  top: -270%;
  transform: translateX(-50%);
  border-radius: 0;
}

.digital-human-float.is-mobile.is-expanded .dh-human-sdk-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
}

.digital-human-float.is-expanded .dh-human-sdk-wrap canvas,
.digital-human-float.is-expanded .dh-human-sdk-wrap video#remotevideo500 {
  object-fit: contain !important;
  object-position: center bottom !important;
}

.digital-human-float.is-expanded .float-btn {
  overflow: visible;
}

.digital-human-float.is-expanded .avatar-wrapper,
.digital-human-float.is-expanded .avatar-video,
.digital-human-float.is-expanded .avatar-img {
  pointer-events: auto;
}

.digital-human-float.is-expanded:not(.is-mobile) .float-btn {
  transform: translateY(-5px) scale(1.05);
  filter: none;
}

.digital-human-float.is-expanded:not(.is-mobile) .avatar-wrapper {
  transform: scale(1.3);
  border: none;
  box-shadow: none;
  background: transparent;
  overflow: visible;
}

.digital-human-float .avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.digital-human-float .avatar-video {
  width: 115%;
  height: 115%;
  object-fit: cover;
  object-position: center 25%;
  pointer-events: none;
  position: relative;
  top: -20px;
  left: -7.5%;
  transition: all 0.3s ease;
}

.digital-human-float.is-expanded:not(.is-mobile) .avatar-video {
  width: 200px;
  height: 340px;
  top: -210px;
  left: 0;
  transform: translateX(-70%);
  object-fit: contain;
  object-position: center bottom;
}

.digital-human-float .default-avatar {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  font-size: 18px;
  font-weight: 600;
}

.digital-human-float .btn-label {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  --dh-btn-label-w: 96px;
  width: var(--dh-btn-label-w);
  min-width: var(--dh-btn-label-w);
  max-width: var(--dh-btn-label-w);
  padding: 10px 12px;
  border-radius: 24px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(4px);
  letter-spacing: 1px;
  margin-top: -50px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
}

#ciip-dh-root.is-en .digital-human-float .btn-label {
  font-size: 9px;
  letter-spacing: 0;
  white-space: normal;
  line-height: 1.2;
  padding: 8px 10px;
}

.digital-human-float.is-expanded:not(.is-mobile) .btn-label {
  margin-top: 0;
  transform: translateX(-120%) translateY(-170%);
}

.float-popup-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.float-popup-mask.is-open {
  opacity: 1;
  visibility: visible;
}

.float-popup {
  position: fixed;
  --dh-popup-bg: #ffffff3d;
  background: var(--dh-popup-bg);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  will-change: transform;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform: translateZ(0);
}

.float-popup-mask.is-open .float-popup {
  animation: dhPopupScaleIn 0.3s ease;
}

@keyframes dhPopupScaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.float-popup .popup-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  position: relative;
  cursor: move;
  padding: 12px 16px;
  background: transparent;
  flex-shrink: 0;
  z-index: 2;
}

.float-popup.is-mobile .popup-content {
  flex: 1;
  height: 100%;
}

.float-popup.is-mobile .digital-human-iframe { border-radius: 0; }

.float-popup.is-mobile.mobile-landscape,
.float-popup.is-mobile.mobile-portrait { border-radius: 0; }

.float-popup .popup-content {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: var(--dh-popup-bg);
}

.float-popup .resize-handle {
  position: absolute;
  width: 12px;
  height: 12px;
  z-index: 1000;
  background: transparent;
}

.float-popup .resize-handle:hover { background: rgba(102, 126, 234, 0.5); }

.float-popup .resize-nw { top: 0; left: 0; cursor: nw-resize; border-top-left-radius: 12px; }
.float-popup .resize-ne { top: 0; right: 0; cursor: ne-resize; border-top-right-radius: 12px; }
.float-popup .resize-sw { bottom: 0; left: 0; cursor: sw-resize; border-bottom-left-radius: 12px; }
.float-popup .resize-se { bottom: 0; right: 0; cursor: se-resize; border-bottom-right-radius: 12px; }

.float-popup .digital-human-iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 12px;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.digital-human-float.is-mobile {
  flex-direction: row;
  align-items: flex-end;
  justify-content: flex-end;
  cursor: grab;
  gap: 8px;
  touch-action: none;
}

.digital-human-float.is-mobile.is-landscape {
  align-items: flex-end;
  justify-content: flex-end;
}

.digital-human-float.is-mobile:active { cursor: grabbing; }

.digital-human-float.is-mobile .tip-bubble {
  white-space: normal;
  max-width: 160px;
}

.digital-human-float.is-mobile .float-btn {
  cursor: grab;
  filter: drop-shadow(0 6px 16px rgba(102, 126, 234, 0.45));
}

.digital-human-float.is-mobile .avatar-wrapper {
  width: 72px;
  height: 72px;
  border-width: 3px;
  overflow: hidden;
}

.digital-human-float.is-mobile .avatar-video {
  position: static;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  transform: none;
  object-fit: cover;
  object-position: center 12%;
}

.digital-human-float.is-mobile.is-expanded .float-btn {
  --dh-expanded-w: min(44vw, 44vmin, 180px);
  --dh-expanded-h: min(72vw, 72vmin, 300px);
  --dh-btn-bottom: 7%;
  position: relative;
  width: var(--dh-expanded-w);
  height: var(--dh-expanded-h);
  max-height: min(52vh, 320px);
  overflow: visible;
}

.digital-human-float.is-mobile.is-landscape.is-expanded .float-btn {
  --dh-expanded-w: min(28vh, 160px);
  --dh-expanded-h: min(48vh, 260px);
  max-height: min(52vh, 280px);
}

.digital-human-float.is-mobile.is-expanded .avatar-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 0;
  overflow: visible;
  border: none;
  background: transparent;
  flex-shrink: 0;
}

.digital-human-float.is-mobile.is-expanded .avatar-video {
  position: static;
  display: block;
  width: 100%;
  height: 100%;
  transform: none;
  object-fit: contain;
  object-position: center bottom;
  pointer-events: auto;
}

.digital-human-float.is-mobile .btn-label {
  --dh-btn-label-w: 76px;
  width: var(--dh-btn-label-w);
  min-width: var(--dh-btn-label-w);
  max-width: var(--dh-btn-label-w);
  padding: 6px 8px;
  font-size: 12px;
  cursor: pointer;
  touch-action: manipulation;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

#ciip-dh-root.is-en .digital-human-float.is-mobile .btn-label {
  font-size: 8px;
  line-height: 1.15;
  padding: 5px 6px;
}

.digital-human-float.is-mobile:not(.is-expanded) .btn-label { margin-top: -36px; }

.digital-human-float.is-mobile.is-expanded .btn-label {
  position: absolute;
  left: 50%;
  bottom: var(--dh-btn-bottom);
  margin-top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
}

.float-popup-mask.is-mobile { background: rgba(0, 0, 0, 0.65); }

.float-popup-mask.is-dock-right {
  background: transparent;
  pointer-events: none;
}

.float-popup-mask.is-dock-right.is-open {
  opacity: 1;
  visibility: visible;
}

.float-popup.is-dock-right {
  border-radius: 0;
  box-shadow: -8px 0 32px rgba(15, 23, 42, 0.12);
  pointer-events: auto;
}

.float-popup-mask.is-open.is-dock-right .float-popup {
  animation: dhPopupDockIn 0.28s ease;
}

@keyframes dhPopupDockIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.float-popup.is-dock-right .popup-toolbar {
  cursor: move;
  user-select: none;
}

.float-popup.is-dock-right .popup-toolbar-title {
  cursor: move;
}

.float-popup .popup-toolbar {
  display: none;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 12px 0 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  /* background: linear-gradient(90deg, #0284c7 0%, #0ea5e9 100%); */
  flex-shrink: 0;
}

.float-popup .popup-toolbar-title {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.float-popup .popup-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.float-popup .popup-toolbar-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.float-popup .popup-toolbar-btn[hidden] {
  display: none !important;
}

.float-popup .popup-toolbar-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.float-popup .popup-toolbar-btn img {
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

.float-popup .popup-toolbar-ext-icon {
  width: 18px;
  height: 18px;
  display: block;
  object-fit: contain;
}

.float-popup .popup-toolbar-close-icon {
  width: 24px;
  height: 24px;
  display: block;
  object-fit: contain;
}

.float-popup .popup-toolbar-speech-icon {
  display: block;
}

.float-popup .popup-toolbar-speech-icon--off {
  display: none;
}

.float-popup .popup-toolbar-speech.is-muted .popup-toolbar-speech-icon--on {
  display: none;
}

.float-popup .popup-toolbar-speech.is-muted .popup-toolbar-speech-icon--off {
  display: block;
}

.float-popup .popup-toolbar-zoom-icon {
  display: block;
}

.float-popup .popup-toolbar-zoom-icon--out {
  display: none;
}

.float-popup .popup-toolbar-zoom.is-active .popup-toolbar-zoom-icon--in {
  display: none;
}

.float-popup .popup-toolbar-zoom.is-active .popup-toolbar-zoom-icon--out {
  display: block;
}

.float-popup.is-dock-right .popup-content {
  flex: 1;
  min-height: 0;
  background: var(--dh-popup-bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dh-chat-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  /* background: var(--dh-popup-bg); */
  background: #ffffffc7;
}

.dh-chat-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  margin: 8px 12px;
  background: var(--dh-popup-bg);
  border-radius: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.45) #f1f5f9;
}

.float-popup .dh-chat-scroll::-webkit-scrollbar {
  width: 6px;
}

.float-popup .dh-chat-scroll::-webkit-scrollbar-track {
  background: #f1f5f9;
}

.float-popup .dh-chat-scroll::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.45);
  border-radius: 3px;
}

.float-popup .dh-chat-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.55);
}

.dh-chat-hero {
  position: relative;
  overflow: hidden;
  overflow-anchor: none;
  padding: 12px 16px;
  background: var(--dh-popup-bg);
  border-radius: 12px 12px 0 0;
  display: flex;
  flex-direction: column;
}

.dh-chat-hero::before {
  content: '';
  position: absolute;
  top: -36px;
  right: -28px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.dh-chat-hero::after {
  content: '';
  position: absolute;
  top: 6px;
  right: 20px;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 1px solid rgba(37, 99, 235, 0.1);
  box-shadow: 0 0 0 16px rgba(37, 99, 235, 0.04), 0 0 0 32px rgba(37, 99, 235, 0.02);
  pointer-events: none;
}

.dh-chat-greet-row,
.dh-chat-hero .desc-wrapper,
.dh-chat-hero .desc-toggle-btn {
  position: relative;
  z-index: 1;
}

.dh-chat-greet-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.dh-chat-logo {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
}

.dh-chat-greet-time {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}

.dh-chat-hero .desc-wrapper {
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.dh-chat-hero .desc-wrapper:not(.expanded) {
  max-height: 88px;
}

.dh-chat-hero .desc-wrapper:not(.expanded) .desc {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dh-chat-hero .desc-wrapper.expanded {
  max-height: none;
}

.dh-chat-hero .desc-wrapper.expanded .desc {
  display: block;
  overflow: visible;
}

.dh-chat-hero .desc-toggle-btn {
  display: none;
  align-items: center;
  justify-content: center;
  align-self: flex-end;
  gap: 4px;
  margin-top: 8px;
  margin-bottom: 0;
  padding: 4px 0;
  font-size: 12px;
  color: #667eea;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.dh-chat-hero .desc-toggle-btn:hover {
  color: #4c63c7;
}

.dh-chat-toggle-icon {
  width: 12px;
  height: 12px;
  display: block;
  flex-shrink: 0;
}

.dh-chat-welcome.desc {
  margin: 0;
  font-size: 14px;
  line-height: 22px;
  color: #000311;
  white-space: pre-wrap;
}

.dh-chat-section {
  padding: 0 16px 8px;
}

.dh-chat-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.dh-chat-section-title {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
}

.dh-chat-refresh {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  border-radius: 6px;
}

.dh-chat-refresh:hover {
  background: #f1f5f9;
  color: #334155;
}

.dh-chat-hot-layout {
  min-width: 0;
}

.dh-chat-hot-layout:not(.expanded) .dh-chat-hot-list-extra {
  display: none;
}

.dh-chat-hot-list-main,
.dh-chat-hot-list-extra {
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.dh-chat-refresh .dh-chat-toggle-icon {
  width: 12px;
  height: 12px;
  display: block;
  flex-shrink: 0;
}

.dh-chat-hot-list {
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.dh-chat-hot-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 0;
}

.dh-chat-hot-row-dual {
  gap: 10px;
  flex-wrap: nowrap;
}

.dh-chat-hot-row-dual .dh-chat-hot-cell:first-child {
  flex: 1;
  min-width: 0;
}

.dh-chat-hot-cell-side {
  flex-shrink: 0;
  padding-left: 10px;
  border-left: 1px solid #f1f5f9;
}

.dh-chat-hot-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.dh-chat-hot-item {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: default;
}

button.dh-chat-hot-api-btn {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  text-align: left;
  width: 100%;
}

button.dh-chat-hot-api-btn:hover .dh-chat-hot-label {
  color: #2563eb;
}

.dh-chat-hot-label {
  font-size: 14px;
  color: #334155;
  line-height: 1.4;
}

.dh-chat-hot-coop {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  flex-wrap: nowrap;
}

.dh-chat-hot-lang-link {
  font-size: 13px;
  color: #2563eb;
  text-decoration: none;
  cursor: pointer;
}

.dh-chat-hot-lang-link + .dh-chat-hot-lang-link {
  margin-left: 12px;
}

.dh-chat-hot-lang-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.dh-chat-hot-lang-link.is-disabled {
  color: #94a3b8;
  cursor: default;
  text-decoration: none;
}

.dh-chat-hot-coop-label {
  font-size: 14px;
  color: #334155;
  white-space: nowrap;
}

.dh-chat-hot-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
  background: var(--dh-popup-bg);
  padding: 2px;
  box-sizing: border-box;
}


.dh-chat-messages {
  margin: 16px 0 8px;
  padding: 0 16px 12px;
}

.dh-chat-msg {
  margin-bottom: 16px;
}

.dh-chat-msg-content {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 100%;
}

.dh-chat-msg.is-user .dh-chat-msg-content {
  justify-content: flex-end;
  margin-left: auto;
}

.dh-chat-msg.is-assistant .dh-chat-msg-content {
  justify-content: flex-start;
}

.dh-chat-msg-avatar {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.1);
}

.dh-chat-msg.is-user .dh-chat-msg-avatar {
  order: 2;
}

.dh-chat-msg-body {
  max-width: calc(100% - 46px);
  min-width: 0;
}

.dh-chat-msg-name {
  margin: 0 0 4px;
  font-size: 12px;
  color: #64748b;
}

.dh-chat-msg-bubble {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.dh-chat-msg.is-user .dh-chat-msg-bubble {
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.dh-chat-msg.is-assistant .dh-chat-msg-bubble {
  background: var(--dh-popup-bg);
  color: #334155;
  border-bottom-left-radius: 4px;
}

.dh-chat-msg-bubble.is-thinking {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  line-height: 1;
  background: var(--dh-popup-bg);
  white-space: normal;
  padding: 10px 16px;
}

.dh-chat-thinking {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.dh-chat-thinking-icon {
  display: block;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  object-fit: contain;
  transform-origin: center center;
  animation: dh-chat-thinking-spin 1s linear infinite;
}

.dh-chat-thinking-text {
  font-size: 13px;
  line-height: 22px;
  color: #64748b;
}

@keyframes dh-chat-thinking-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.dh-chat-msg-bubble.dh-chat-markdown {
  white-space: normal;
}

.dh-chat-msg-bubble.markdown-body {
  background: transparent;
  font-size: 13px;
  line-height: 1.65;
  color: inherit;
}

.dh-chat-msg-bubble.markdown-body h1,
.dh-chat-msg-bubble.markdown-body h2,
.dh-chat-msg-bubble.markdown-body h3,
.dh-chat-msg-bubble.markdown-body h4,
.dh-chat-msg-bubble.markdown-body h5,
.dh-chat-msg-bubble.markdown-body h6 {
  font-weight: 600;
  line-height: 1.4;
  margin: 0.65em 0 0.35em;
}

.dh-chat-msg-bubble.markdown-body h3 {
  font-size: 1.08em;
}

.dh-chat-msg-bubble.markdown-body p {
  margin: 0.45em 0;
}

.dh-chat-msg-bubble.markdown-body ul,
.dh-chat-msg-bubble.markdown-body ol {
  margin: 0.4em 0;
  padding-left: 1.35em;
}

.dh-chat-msg-bubble.markdown-body li {
  margin: 0.2em 0;
}

.dh-chat-msg-bubble.markdown-body ul {
  list-style: disc;
}

.dh-chat-msg-bubble.markdown-body ol {
  list-style: decimal;
}

.dh-chat-msg-bubble.markdown-body strong {
  font-weight: 600;
}

.dh-chat-msg-bubble.markdown-body code {
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.06);
  font-size: 0.92em;
}

.dh-chat-msg-bubble.markdown-body pre {
  margin: 0.5em 0;
  padding: 10px;
  border-radius: 8px;
  background: #0f172a;
  color: #e2e8f0;
  overflow-x: auto;
}

.dh-chat-msg-bubble.markdown-body pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.dh-chat-msg-bubble.markdown-body a {
  color: #2563eb;
  text-decoration: underline;
}

.dh-chat-msg-bubble.markdown-body blockquote {
  margin: 0.5em 0;
  padding-left: 0.8em;
  border-left: 3px solid #cbd5e1;
  color: #64748b;
}

.dh-chat-section-manual {
  margin-top: 0px;
}

.dh-chat-manual-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.dh-chat-manual-card {
  border: none;
  background: var(--dh-popup-bg);
  border-radius: 8px;
  padding: 16px 8px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #334155;
  transition: background 0.2s;
}

.dh-chat-manual-card:hover {
  background: rgba(255, 255, 255, 0.45);
}

.dh-chat-manual-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.dh-icon-bag::after {
  content: '';
  position: absolute;
  inset: 7px 8px 6px;
  border: 2px solid #2563eb;
  border-radius: 3px 3px 4px 4px;
}

.dh-icon-coupon::after {
  content: '';
  position: absolute;
  inset: 8px 6px;
  border: 2px dashed #2563eb;
  border-radius: 3px;
}

.dh-icon-headset::after {
  content: '';
  position: absolute;
  left: 6px;
  right: 6px;
  top: 10px;
  height: 8px;
  border: 2px solid #2563eb;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
}

.dh-chat-footer {
  flex-shrink: 0;
  padding: 12px 16px 14px;
  background: var(--dh-popup-bg);
  border-top: 1px solid rgba(255, 255, 255, 0.35);
}

.dh-chat-input-wrap {
  position: relative;
  border-radius: 10px;
  border: 2px solid transparent;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(90deg, #fbbf24, #a855f7, #3b82f6) border-box;
}

.dh-chat-input {
  width: 100%;
  min-height: 88px;
  border: none;
  border-radius: 8px;
  padding: 12px 48px 12px 14px;
  font-size: 14px;
  line-height: 1.5;
  resize: none;
  outline: none;
  font-family: inherit;
  color: #1e293b;
  background: #fff;
  box-sizing: border-box;
}

.dh-chat-input::placeholder {
  color: #94a3b8;
}

.dh-chat-send {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.dh-chat-send:hover {
  background: #1d4ed8;
}

.dh-chat-send:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.dh-chat-input:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.dh-chat-disclaimer {
  margin: 10px 0 0;
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
}

.dh-coop-dialog {
  position: fixed;
  inset: 0;
  z-index: 100000;
}

.dh-coop-dialog[hidden] {
  display: none !important;
}

.dh-coop-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.dh-coop-box {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 420px;
  max-width: calc(100vw - 32px);
}

.dh-coop-inner {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
  position: relative;
}

.dh-coop-tabs {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
}

.dh-coop-tab {
  border: none;
  background: transparent;
  font-size: 16px;
  color: #666;
  margin-right: 20px;
  cursor: pointer;
  padding: 0 0 4px;
}

.dh-coop-tab.active {
  color: #000;
  font-weight: 500;
  border-bottom: 2px solid #000;
}

.dh-coop-content {
  text-align: center;
  min-height: 200px;
}

.dh-coop-form {
  padding: 16px 16px 0 10px;
  text-align: left;
}

.dh-coop-field {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-bottom: 12px;
}

.dh-coop-label {
  width: 90px;
  flex-shrink: 0;
  font-size: 14px;
  color: #606266;
  line-height: 32px;
  text-align: right;
  padding-right: 8px;
}

.dh-coop-field input,
.dh-coop-field textarea {
  flex: 1;
  min-width: 0;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
}

.dh-coop-field textarea {
  resize: vertical;
  min-height: 72px;
}

.dh-coop-field-err {
  width: 100%;
  margin: 4px 0 0 98px;
  font-size: 12px;
  color: #f56c6c;
  min-height: 16px;
}

.dh-coop-actions {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  margin: 8px 0 16px 74px;
}

.dh-coop-cancel,
.dh-coop-submit {
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid #dcdfe6;
  background: #fff;
  color: #606266;
}

.dh-coop-submit {
  border-color: #409eff;
  background: #409eff;
  color: #fff;
}

.dh-coop-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.dh-coop-qrcode {
  width: 200px;
  height: 200px;
  background: #fff;
  border-radius: 8px;
  margin: 16px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.dh-coop-qrcode img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.dh-coop-desc {
  font-size: 14px;
  color: #333;
  margin: 0 0 16px;
}

.dh-coop-toast {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  color: #fff;
  white-space: nowrap;
  z-index: 2;
}

.dh-coop-toast.is-success {
  background: #67c23a;
}

.dh-coop-toast.is-error {
  background: #f56c6c;
}

.dh-coop-toast[hidden] {
  display: none !important;
}

.ciip-sd-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.ciip-sd-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.ciip-sd-modal-overlay .dh-coop-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.ciip-sd-modal-host {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% - 2rem);
  max-width: 860px;
  max-height: 92vh;
  z-index: 1;
  pointer-events: none;
}

.ciip-sd-modal-host .modal {
  pointer-events: auto;
}

@media (max-width: 500px) {
  .digital-human-float.is-narrow {
    justify-content: flex-start;
    align-items: flex-end;
  }

  .digital-human-float.is-narrow.is-expanded:not(.is-mobile) .float-btn,
  .digital-human-float.is-narrow.is-expanded.is-mobile .float-btn {
    --dh-expanded-w: min(34vw, 132px);
    --dh-expanded-h: min(56vw, 220px);
    width: var(--dh-expanded-w);
    height: var(--dh-expanded-h);
    max-height: min(46vh, 240px);
    transform: none;
    position: relative;
    overflow: visible;
  }

  .digital-human-float.is-narrow.is-expanded:not(.is-mobile) .avatar-wrapper,
  .digital-human-float.is-narrow.is-expanded.is-mobile .avatar-wrapper {
    transform: none;
    width: 100%;
    height: 100%;
  }

  .digital-human-float.is-narrow.is-expanded:not(.is-mobile) .avatar-video,
  .digital-human-float.is-narrow.is-expanded.is-mobile .avatar-video {
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    transform: none;
    object-fit: contain;
    object-position: center bottom;
  }

  .digital-human-float.is-narrow.is-expanded:not(.is-mobile) .dh-human-sdk-wrap,
  .digital-human-float.is-narrow.is-expanded.is-mobile .dh-human-sdk-wrap {
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    transform: none;
  }

  .digital-human-float.is-narrow.is-expanded:not(.is-mobile) .btn-label,
  .digital-human-float.is-narrow.is-expanded.is-mobile .btn-label {
    position: absolute;
    left: 50%;
    bottom: 7%;
    margin-top: 0;
    transform: translateX(-50%);
  }

  .float-popup .popup-toolbar-ext {
    display: none !important;
  }
}
