.cj-chat-widget {
  --cj-chat-bg: #090a12;
  --cj-chat-panel: rgba(18, 16, 32, 0.76);
  --cj-chat-panel-strong: rgba(31, 27, 52, 0.82);
  --cj-chat-text: #fbf8ff;
  --cj-chat-muted: rgba(251, 248, 255, 0.68);
  --cj-chat-line: rgba(255, 255, 255, 0.18);
  --cj-chat-line-strong: rgba(255, 255, 255, 0.3);
  --cj-chat-gold: #e9c76b;
  --cj-chat-teal: #31c3b0;
  --cj-chat-violet: #8e6cff;
  --cj-chat-violet-soft: #c6b6ff;
  --cj-chat-danger: #ff9d9d;
  --cj-chat-shadow: 0 28px 90px rgba(4, 3, 12, 0.44);
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 90;
  color: var(--cj-chat-text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  pointer-events: none;
}

.cj-chat-widget *,
.cj-chat-widget *::before,
.cj-chat-widget *::after {
  box-sizing: border-box;
}

.cj-chat-widget [hidden] {
  display: none !important;
}

.cj-chat-launcher,
.cj-chat-panel,
.cj-chat-panel button,
.cj-chat-panel input,
.cj-chat-panel textarea {
  font: inherit;
}

.cj-chat-launcher,
.cj-chat-panel {
  pointer-events: auto;
}

.cj-chat-launcher {
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  padding: 8px 16px 8px 8px;
  color: var(--cj-chat-text);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05)),
    linear-gradient(135deg, rgba(142, 108, 255, 0.36), rgba(49, 195, 176, 0.12)),
    rgba(9, 10, 18, 0.74);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -1px 0 rgba(255, 255, 255, 0.08),
    0 18px 54px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  cursor: pointer;
  transform: translateZ(0);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.cj-chat-launcher:hover {
  border-color: rgba(233, 199, 107, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.46),
    0 22px 62px rgba(0, 0, 0, 0.36),
    0 0 0 5px rgba(142, 108, 255, 0.1);
  transform: translateY(-2px);
}

.cj-chat-widget.is-open .cj-chat-launcher {
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px) scale(0.96);
}

.cj-chat-launcher-logo,
.cj-chat-brand-logo,
.cj-chat-manager-logo {
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(4, 4, 9, 0.72);
}

.cj-chat-launcher-logo {
  width: 42px;
  height: 42px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    0 0 0 1px rgba(198, 182, 255, 0.26);
}

.cj-chat-launcher-logo img,
.cj-chat-brand-logo img,
.cj-chat-manager-logo img {
  width: 82%;
  height: 82%;
  object-fit: contain;
}

.cj-chat-launcher-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
  text-align: left;
}

.cj-chat-launcher-copy strong {
  overflow: hidden;
  color: var(--cj-chat-text);
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cj-chat-launcher-copy span {
  color: rgba(218, 255, 246, 0.84);
  font-size: 11px;
  font-weight: 850;
}

.cj-chat-unread-dot {
  position: absolute;
  top: 3px;
  right: 9px;
  min-width: 18px;
  height: 18px;
  border: 2px solid rgba(9, 10, 18, 0.82);
  border-radius: 999px;
  background: var(--cj-chat-teal);
  box-shadow: 0 0 0 4px rgba(49, 195, 176, 0.14);
}

.cj-chat-panel {
  position: absolute;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(430px, calc(100vw - 24px));
  height: min(690px, calc(100dvh - 24px));
  min-height: 560px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 26px;
  background:
    radial-gradient(circle at 92% 4%, rgba(49, 195, 176, 0.24), transparent 24%),
    radial-gradient(circle at 4% 16%, rgba(142, 108, 255, 0.34), transparent 31%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.034) 46%, rgba(233, 199, 107, 0.05)),
    var(--cj-chat-panel);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -1px 0 rgba(255, 255, 255, 0.08),
    var(--cj-chat-shadow);
  backdrop-filter: blur(24px) saturate(190%) contrast(112%);
  -webkit-backdrop-filter: blur(24px) saturate(190%) contrast(112%);
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px) scale(0.96);
  transform-origin: 100% 100%;
  transition: opacity 180ms ease, transform 180ms ease;
}

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

.cj-chat-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(233, 199, 107, 0.18), rgba(142, 108, 255, 0.16) 48%, rgba(49, 195, 176, 0.08)),
    rgba(255, 255, 255, 0.046);
}

.cj-chat-brand-logo {
  width: 42px;
  height: 42px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    0 0 0 1px rgba(198, 182, 255, 0.26),
    0 12px 28px rgba(142, 108, 255, 0.18);
}

.cj-chat-head-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.cj-chat-head-copy span {
  color: var(--cj-chat-violet-soft);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.cj-chat-head-copy strong {
  overflow: hidden;
  color: var(--cj-chat-text);
  font-size: 18px;
  font-weight: 950;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cj-chat-head-copy small {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(218, 255, 246, 0.84);
  font-size: 11px;
  font-weight: 800;
}

.cj-chat-head-copy small::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--cj-chat-teal);
  box-shadow: 0 0 0 4px rgba(49, 195, 176, 0.13);
}

.cj-chat-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.cj-chat-icon-button {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: var(--cj-chat-text);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.038)),
    rgba(255, 255, 255, 0.052);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.cj-chat-icon-button:hover {
  border-color: rgba(233, 199, 107, 0.42);
  transform: translateY(-1px);
}

.cj-chat-icon-button svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.cj-chat-body {
  display: grid;
  min-height: 0;
}

.cj-chat-auth,
.cj-chat-maintenance,
.cj-chat-room {
  min-height: 0;
}

.cj-chat-maintenance {
  display: grid;
  align-content: start;
  gap: 18px;
  margin: 18px;
  border: 1px solid rgba(233, 199, 107, 0.28);
  border-radius: 24px;
  padding: 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(233, 199, 107, 0.2), transparent 32%),
    radial-gradient(circle at 0% 10%, rgba(142, 108, 255, 0.22), transparent 30%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.044)),
    rgba(255, 255, 255, 0.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 18px 46px rgba(0, 0, 0, 0.22);
}

.cj-chat-maintenance-mark {
  display: inline-grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid rgba(233, 199, 107, 0.34);
  border-radius: 999px;
  color: #16111e;
  background: linear-gradient(135deg, var(--cj-chat-violet-soft), var(--cj-chat-gold));
  font-size: 15px;
  font-weight: 950;
  box-shadow: 0 14px 34px rgba(142, 108, 255, 0.2);
}

.cj-chat-maintenance span:not(.cj-chat-maintenance-mark) {
  color: var(--cj-chat-violet-soft);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.cj-chat-maintenance h2 {
  margin: 8px 0 0;
  color: var(--cj-chat-text);
  font-size: clamp(28px, 6vw, 42px);
  font-weight: 950;
  letter-spacing: 0;
  line-height: 0.98;
}

.cj-chat-maintenance p {
  margin: 10px 0 0;
  color: var(--cj-chat-muted);
  font-size: 15px;
  font-weight: 760;
  line-height: 1.48;
}

.cj-chat-maintenance a {
  display: inline-flex;
  min-height: 48px;
  width: fit-content;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 0 18px;
  color: #100e18;
  background: linear-gradient(135deg, var(--cj-chat-violet-soft), var(--cj-chat-gold));
  font-size: 14px;
  font-weight: 950;
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 12px 34px rgba(142, 108, 255, 0.2);
}

.cj-chat-auth {
  display: grid;
  align-content: start;
  gap: 16px;
  overflow: auto;
  padding: 18px;
}

.cj-chat-auth-hero {
  display: grid;
  gap: 8px;
}

.cj-chat-auth-hero span {
  color: var(--cj-chat-violet-soft);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.cj-chat-auth-hero h2 {
  margin: 0;
  color: var(--cj-chat-text);
  font-size: clamp(28px, 6vw, 42px);
  font-weight: 950;
  letter-spacing: 0;
  line-height: 0.98;
}

.cj-chat-auth-hero p {
  margin: 0;
  color: var(--cj-chat-muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.cj-chat-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 5px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.cj-chat-tabs button {
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  color: rgba(251, 248, 255, 0.72);
  background: transparent;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.cj-chat-tabs button.is-active {
  color: #110d1b;
  background: linear-gradient(135deg, var(--cj-chat-violet-soft), var(--cj-chat-gold));
}

.cj-chat-form {
  display: grid;
  gap: 12px;
}

.cj-chat-form label {
  display: grid;
  gap: 7px;
  color: rgba(246, 248, 251, 0.78);
  font-size: 12px;
  font-weight: 850;
}

.cj-chat-input,
.cj-chat-textarea {
  width: 100%;
  border: 1px solid var(--cj-chat-line);
  border-radius: 16px;
  color: var(--cj-chat-text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.042)),
    rgba(255, 255, 255, 0.052);
  outline: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 10px 26px rgba(0, 0, 0, 0.08);
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.cj-chat-input {
  min-height: 50px;
  padding: 0 14px;
}

.cj-chat-textarea {
  min-height: 42px;
  max-height: 124px;
  border: 0;
  padding: 10px 6px;
  background: transparent;
  box-shadow: none;
  resize: none;
}

.cj-chat-input:focus,
.cj-chat-textarea:focus {
  border-color: rgba(142, 108, 255, 0.72);
  background: rgba(142, 108, 255, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 0 0 3px rgba(142, 108, 255, 0.12);
}

.cj-chat-textarea:focus {
  background: transparent;
  box-shadow: none;
}

.cj-chat-form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.cj-chat-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 18px;
  color: #100e18;
  background: linear-gradient(135deg, var(--cj-chat-violet-soft), var(--cj-chat-gold));
  font-size: 14px;
  font-weight: 950;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 12px 34px rgba(142, 108, 255, 0.2);
  transition: transform 160ms ease, opacity 160ms ease;
}

.cj-chat-button:hover {
  transform: translateY(-1px);
}

.cj-chat-button:disabled,
.cj-chat-icon-button:disabled,
.cj-chat-send:disabled {
  cursor: wait;
  opacity: 0.64;
  transform: none;
}

.cj-chat-status {
  min-height: 20px;
  margin: 0;
  color: var(--cj-chat-muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.cj-chat-status.is-error {
  color: var(--cj-chat-danger);
}

.cj-chat-status.is-ok {
  color: #9ef3d9;
}

.cj-chat-room {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.cj-chat-manager {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  margin: 14px 14px 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  padding: 10px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.038)),
    rgba(255, 255, 255, 0.052);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 14px 34px rgba(0, 0, 0, 0.12);
}

.cj-chat-manager-logo {
  width: 38px;
  height: 38px;
  box-shadow: 0 0 0 1px rgba(198, 182, 255, 0.2);
}

.cj-chat-manager-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.cj-chat-manager-copy span {
  color: var(--cj-chat-violet-soft);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.cj-chat-manager-copy strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cj-chat-manager-copy small {
  overflow: hidden;
  color: var(--cj-chat-muted);
  font-size: 11px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cj-chat-messages {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  padding: 14px 14px 16px;
  overflow: auto;
  scrollbar-color: rgba(198, 182, 255, 0.38) transparent;
}

.cj-chat-message {
  display: grid;
  gap: 7px;
  max-width: 84%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  padding: 11px 12px 9px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.045)),
    rgba(255, 255, 255, 0.07);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 12px 30px rgba(0, 0, 0, 0.15);
}

.cj-chat-message.is-client {
  justify-self: end;
  border-color: rgba(233, 199, 107, 0.32);
  border-bottom-right-radius: 6px;
  background:
    linear-gradient(135deg, rgba(233, 199, 107, 0.22), rgba(198, 182, 255, 0.18)),
    rgba(255, 255, 255, 0.064);
}

.cj-chat-message.is-manager {
  justify-self: start;
  border-color: rgba(142, 108, 255, 0.34);
  border-bottom-left-radius: 6px;
  background:
    linear-gradient(135deg, rgba(142, 108, 255, 0.2), rgba(49, 195, 176, 0.11)),
    rgba(255, 255, 255, 0.054);
}

.cj-chat-message.is-system {
  justify-self: center;
  max-width: 92%;
  color: var(--cj-chat-muted);
  text-align: center;
}

.cj-chat-message-text {
  color: var(--cj-chat-text);
  font-size: 14px;
  font-weight: 720;
  line-height: 1.44;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.cj-chat-message-meta {
  color: rgba(246, 248, 251, 0.56);
  font-size: 10px;
  font-weight: 800;
}

.cj-chat-empty {
  display: grid;
  gap: 12px;
  justify-items: center;
  justify-self: center;
  max-width: 340px;
  margin-top: min(52px, 9vh);
  color: var(--cj-chat-muted);
  text-align: center;
}

.cj-chat-empty-badge {
  display: inline-grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(233, 199, 107, 0.28);
  border-radius: 999px;
  color: #14111e;
  background: linear-gradient(135deg, var(--cj-chat-violet-soft), var(--cj-chat-gold));
  font-size: 13px;
  font-weight: 950;
  box-shadow: 0 14px 30px rgba(142, 108, 255, 0.2);
}

.cj-chat-empty p {
  margin: 0;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}

.cj-chat-quick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.cj-chat-quick-row button {
  min-height: 32px;
  border: 1px solid rgba(142, 108, 255, 0.3);
  border-radius: 999px;
  padding: 0 11px;
  color: var(--cj-chat-text);
  background:
    linear-gradient(135deg, rgba(142, 108, 255, 0.14), rgba(49, 195, 176, 0.06)),
    rgba(255, 255, 255, 0.048);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.cj-chat-composer {
  display: grid;
  gap: 9px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding: 11px 12px 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.068), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.048);
  box-shadow: 0 -18px 54px rgba(0, 0, 0, 0.14);
}

.cj-chat-attachment-preview {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(198, 182, 255, 0.32);
  border-radius: 18px;
  padding: 7px 8px;
  background:
    linear-gradient(135deg, rgba(142, 108, 255, 0.18), rgba(233, 199, 107, 0.1)),
    rgba(255, 255, 255, 0.06);
}

.cj-chat-attachment-media {
  display: inline-grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  overflow: hidden;
  border-radius: 15px;
  color: #17121e;
  background: linear-gradient(135deg, var(--cj-chat-violet-soft), var(--cj-chat-gold));
}

.cj-chat-attachment-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cj-chat-file-icon {
  display: inline-grid;
  width: 100%;
  height: 100%;
  place-items: center;
}

.cj-chat-file-icon::before {
  content: "";
  width: 15px;
  height: 18px;
  border-radius: 4px 4px 3px 3px;
  background: currentColor;
  box-shadow: inset -5px 5px 0 rgba(255, 255, 255, 0.36);
}

.cj-chat-file-icon[data-kind="audio"]::before {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  box-shadow:
    inset 0 0 0 5px currentColor,
    inset 0 0 0 8px rgba(255, 255, 255, 0.3);
}

.cj-chat-attachment-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.cj-chat-attachment-copy strong,
.cj-chat-attachment-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cj-chat-attachment-copy strong {
  color: var(--cj-chat-text);
  font-size: 12px;
  font-weight: 900;
}

.cj-chat-attachment-copy small {
  color: var(--cj-chat-muted);
  font-size: 10px;
  font-weight: 800;
}

.cj-chat-clear-attachment {
  display: inline-grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: var(--cj-chat-text);
  background: rgba(255, 255, 255, 0.08);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.cj-chat-composer-shell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 7px;
  align-items: end;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 23px;
  padding: 7px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.045)),
    rgba(10, 10, 19, 0.46);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 14px 36px rgba(0, 0, 0, 0.16);
}

.cj-chat-composer.is-recording .cj-chat-composer-shell {
  border-color: rgba(255, 157, 157, 0.56);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 0 0 3px rgba(255, 157, 157, 0.08),
    0 14px 36px rgba(0, 0, 0, 0.16);
}

.cj-chat-tool,
.cj-chat-send {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: var(--cj-chat-text);
  background:
    linear-gradient(135deg, rgba(142, 108, 255, 0.13), rgba(233, 199, 107, 0.06)),
    rgba(255, 255, 255, 0.052);
  cursor: pointer;
}

.cj-chat-tool svg,
.cj-chat-send svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.cj-chat-file-input input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.cj-chat-voice {
  color: var(--cj-chat-violet-soft);
}

.cj-chat-voice .cj-chat-stop-icon,
.cj-chat-recording-time {
  display: none;
}

.cj-chat-voice.is-recording {
  width: 104px;
  gap: 7px;
  padding: 0 10px;
  border-color: rgba(255, 157, 157, 0.58);
  color: #ffcad4;
  background:
    linear-gradient(135deg, rgba(236, 93, 123, 0.22), rgba(142, 108, 255, 0.14)),
    rgba(255, 255, 255, 0.064);
}

.cj-chat-voice.is-recording .cj-chat-mic-icon {
  display: none;
}

.cj-chat-voice.is-recording .cj-chat-stop-icon,
.cj-chat-voice.is-recording .cj-chat-recording-time {
  display: block;
}

.cj-chat-recording-time {
  min-width: 50px;
  color: #ffcad4;
  font-size: 11px;
  font-weight: 900;
}

.cj-chat-send {
  color: #100e18;
  border-color: rgba(255, 255, 255, 0.28);
  background: linear-gradient(135deg, var(--cj-chat-violet-soft), var(--cj-chat-gold));
}

.cj-chat-message-attachment {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  width: min(300px, 100%);
  max-width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 15px;
  padding: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.045)),
    rgba(255, 255, 255, 0.06);
}

.cj-chat-message-attachment.has-image-preview {
  width: min(320px, 100%);
}

.cj-chat-message-image {
  display: block;
  grid-column: 1 / -1;
  overflow: hidden;
  border-radius: 13px;
}

.cj-chat-message-image img {
  display: block;
  width: 100%;
  max-height: 230px;
  object-fit: cover;
}

.cj-chat-message-attachment .cj-chat-file-icon {
  width: 36px;
  height: 36px;
  border-radius: 13px;
  color: #17121e;
  background: linear-gradient(135deg, var(--cj-chat-violet-soft), var(--cj-chat-gold));
}

.cj-chat-message-attachment strong {
  overflow: hidden;
  color: var(--cj-chat-text);
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cj-chat-message-attachment small {
  overflow: hidden;
  color: var(--cj-chat-muted);
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .cj-chat-widget {
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
  }

  .cj-chat-launcher {
    min-height: 54px;
    padding-right: 14px;
  }

  .cj-chat-panel {
    width: calc(100vw - 20px);
    height: min(700px, calc(100dvh - 20px));
    min-height: 0;
    border-radius: 24px;
  }

  .cj-chat-head-copy strong {
    font-size: 16px;
  }

  .cj-chat-form-row {
    grid-template-columns: 1fr;
  }

  .cj-chat-message {
    max-width: 90%;
  }
}

@media (max-width: 390px) {
  .cj-chat-launcher-copy span {
    display: none;
  }

  .cj-chat-panel {
    width: calc(100vw - 12px);
    height: calc(100dvh - 12px);
    right: -4px;
    bottom: -4px;
    border-radius: 22px;
  }

  .cj-chat-auth,
  .cj-chat-messages {
    padding-left: 12px;
    padding-right: 12px;
  }
}
