.exh-cfg {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100060;
  background: rgba(18, 16, 28, .55);
  align-items: center;
  justify-content: center;
  padding: 24px;
  pointer-events: none;
}
.exh-cfg.show {
  display: flex;
  pointer-events: auto;
}
.exh-cfg-panel {
  width: min(920px, 100%);
  max-height: min(86vh, 920px);
  overflow: auto;
  background: #f7f4ff;
  border-radius: 24px;
  box-shadow: 0 24px 64px rgba(40, 24, 90, .28);
  display: flex;
  flex-direction: column;
  pointer-events: auto;
}
.exh-cfg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px 12px;
  border-bottom: 1px solid rgba(95, 75, 219, .12);
  position: sticky;
  top: 0;
  background: #f7f4ff;
  z-index: 1;
}
.exh-cfg-head h2 {
  margin: 0;
  font-size: 1.15rem;
  color: #2b2450;
}
.exh-cfg-head p {
  margin: 4px 0 0;
  color: #7a7398;
  font-size: .82rem;
}
.exh-cfg-body { padding: 16px 22px 24px; }
.exh-cfg-sec { margin-bottom: 22px; }
.exh-cfg-sec h3 {
  margin: 0 0 12px;
  font-size: .95rem;
  color: #5f4bdb;
}
.exh-case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}
.exh-case {
  background: #fff;
  border: 1px solid rgba(95, 75, 219, .14);
  border-radius: 16px;
  padding: 14px;
}
.exh-case h4 {
  margin: 0 0 10px;
  font-size: .92rem;
  color: #322a58;
}
.exh-case label {
  display: block;
  font-size: .75rem;
  color: #6d668c;
  margin: 8px 0 4px;
}
.exh-case input, .exh-case select, .exh-case textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #e4def6;
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  background: #fbfaff;
}
.exh-case textarea { min-height: 72px; resize: vertical; }
.exh-file-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.exh-file-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 32px;
  flex: 1;
}
.exh-file-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 999px;
  background: #efe9ff;
  color: #433a68;
  font-size: .75rem;
  line-height: 1.3;
}
.exh-file-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 180px;
}
.exh-file-chip button {
  border: 0;
  background: transparent;
  color: #7a7398;
  cursor: pointer;
  font-size: .9rem;
  line-height: 1;
  padding: 0;
}
.exh-file-empty { color: #9a93b3; font-size: .75rem; }
.btn-exh-pick {
  border: 1px solid #5f4bdb;
  background: #fff;
  color: #5f4bdb;
  border-radius: 10px;
  padding: 6px 10px;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.btn-exh-pick:hover { background: #f3f0ff; }
.exh-case .exh-file-hint {
  margin: 6px 0 0;
  font-size: .72rem;
  color: #8a83a8;
}
.exh-case input[data-f="title"] { font-weight: 700; }
.exh-case .row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: .82rem;
  color: #433a68;
}
.exh-cfg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.exh-cfg-actions .btn {
  border: 0;
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
  background: #5f4bdb;
  color: #fff;
}
.exh-cfg-actions .btn-outline {
  background: #fff;
  color: #5f4bdb;
  border: 1px solid #5f4bdb;
}
.exh-cfg-actions .btn:disabled { opacity: .55; cursor: wait; }
.exh-progress {
  margin-top: 12px;
  background: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(95, 75, 219, .12);
}
.exh-progress-track {
  height: 8px;
  border-radius: 99px;
  background: #ece7ff;
  overflow: hidden;
  margin-top: 8px;
}
.exh-progress-fill {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #5f4bdb, #34d399);
  transition: width .25s ease;
}
.exh-progress-msg {
  font-size: .82rem;
  color: #5b5480;
}
.exh-cfg-toast {
  margin-top: 10px;
  font-size: .85rem;
  color: #15803d;
}
.exh-case-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
}
.exh-case-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 12px;
  background: #efe9ff;
  flex-shrink: 0;
}
.exh-case-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .68rem;
  color: #9a93b3;
}
.btn-exh-launch {
  border: 0;
  background: #5f4bdb;
  color: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
}
.btn-exh-launch:hover { filter: brightness(1.05); }
.exh-demo-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}
.exh-demo-bar[hidden] { display: none !important; }
.exh-demo-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #ddd6fe;
  background: #f7f4ff;
  color: #322a58;
  border-radius: 999px;
  padding: 4px 12px 4px 4px;
  cursor: pointer;
  font-size: .8rem;
  font-weight: 650;
}
.exh-demo-chip img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: #ece7ff;
}
.exh-demo-chip:hover { background: #efe9ff; border-color: #5f4bdb; }
.exh-demo-quick {
  background: #5f4bdb;
  color: #fff;
  border-color: #5f4bdb;
  font-weight: 800;
}
.exh-demo-quick:hover { background: #4c3cc4; border-color: #4c3cc4; color: #fff; }
.exh-demo-quick i { font-size: .85rem; }
#exhRemoteId {
  border: 1px solid #e4def6;
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  background: #fbfaff;
}
body.exh-offline-demo .create-input-row,
body.exh-offline-demo .composer-options,
body.exh-offline-demo #exhDemoBar,
body.exh-offline-demo #quotePreview,
body.exh-offline-demo #attachmentPreview,
body.exh-offline-demo #tokenFloatBall,
body.exh-offline-demo .create-chat-toolbar-actions,
body.exh-offline-demo #newChatSidebarBtn,
body.exh-offline-demo .create-preview-pane,
body.exh-offline-demo .btn-session-rename,
body.exh-offline-demo .btn-session-delete {
  display: none !important;
}
.exh-offline-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 4px;
  padding: 12px 14px;
  border: 1px dashed rgba(95, 75, 219, .28);
  border-radius: 16px;
  background: #f7f4ff;
}
.exh-offline-bar[hidden] { display: none !important; }
.exh-offline-note {
  margin: 0;
  color: #6d668c;
  font-size: .82rem;
  font-weight: 650;
}
.exh-offline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.exh-offline-actions button {
  border: 0;
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 800;
  cursor: pointer;
  font-size: .88rem;
}
.btn-exh-next { background: #5f4bdb; color: #fff; }
.btn-exh-auto { background: #fff; color: #5f4bdb; border: 1px solid #5f4bdb !important; }
.btn-exh-restart { background: #efe9ff; color: #433a68; }
.exh-offline-actions button:disabled { opacity: .55; cursor: wait; }
.create-session-item.is-exh-demo .csi-title { font-weight: 800; }
.btn-upload-file.exh-pulse,
.create-send-btn.exh-pulse {
  outline: 3px solid #5f4bdb;
  outline-offset: 2px;
  animation: exhPulse 0.65s ease-in-out 3;
}
@keyframes exhPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.ai-msg:has(.exh-chat-gen3d) .msg-body,
.ai-msg:has(.exh-gen3d-result) .msg-body {
  max-width: min(96%, 860px);
}
.exh-chat-gen3d.gen3d-progress-wrap {
  width: 100%;
  max-width: none;
  min-height: 460px;
  margin: 0 auto;
  border-radius: 22px;
  background: radial-gradient(circle at 30% 20%, #1e293b, #0f172a 70%);
  color: #e2e8f0;
  padding: 40px 28px 32px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.exh-chat-gen3d .gen3d-progress-icon {
  font-size: 3.6rem;
}
.exh-chat-gen3d .gen3d-progress-title {
  font-size: 1.18rem !important;
}
.exh-gen3d-result {
  width: 100%;
}
.exh-gen3d-caption {
  margin: 0 0 10px;
  color: #4c3cc4;
  font-size: .92rem;
  font-weight: 650;
}
.exh-gen3d-stage {
  border-radius: 22px;
  background: radial-gradient(circle at 30% 20%, #1e293b, #0f172a 70%);
  min-height: 520px;
  overflow: hidden;
}
.exh-gen3d-viewer.gen3d-model-viewer {
  height: 560px !important;
  min-height: 520px !important;
}
.exh-gen3d-hint {
  margin: 8px 0 0;
  color: #888;
  font-size: .82rem;
  text-align: center;
}
