.coheus-talk {
  position: fixed;
  right: clamp(20px, 4vw, 40px);
  bottom: clamp(20px, 4vh, 36px);
  z-index: 12000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.coheus-talk__orb {
  width: 6.75rem;
  height: 6.75rem;
  border-radius: 50%;
  overflow: hidden;
  border: 0.5px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.14);
}

.coheus-talk__orb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.15);
}

.coheus-talk__label {
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: #0f172a;
  font-family: Figtree, system-ui, sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.coheus-voice {
  position: fixed;
  top: auto;
  right: clamp(16px, 4vw, 40px);
  bottom: calc(6.75rem + clamp(20px, 4vh, 36px) + 2.75rem);
  left: auto !important;
  z-index: 2147483000;
  width: min(calc(100vw - 2rem), 20rem);
  max-width: 20rem;
  margin: 0;
  padding: 1.25rem;
  border-radius: 1.5rem;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.12);
  font-family: Figtree, system-ui, sans-serif;
  color: #0f172a;
  transform: none !important;
  pointer-events: auto;
  isolation: isolate;
}

.coheus-voice--terms .coheus-voice__kicker {
  margin: 0 0 0.35rem;
  color: #64748b;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.coheus-voice--terms .coheus-voice__title {
  margin: 0 0 0.55rem;
  font-family: Sora, Figtree, system-ui, sans-serif;
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.coheus-voice__lead {
  margin: 0 0 1.1rem;
  color: #64748b;
  font-size: 0.875rem;
  line-height: 1.5;
}

.coheus-voice__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.coheus-voice__btn {
  border: 0;
  border-radius: 999px;
  padding: 0.6rem 1.05rem;
  background: #0b1220;
  color: #fff;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.coheus-voice__btn--ghost {
  background: transparent;
  color: #475569;
  border: 1px solid rgba(15, 23, 42, 0.1);
}

.coheus-voice--call {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.15rem 1.05rem 0.85rem;
  text-align: center;
  width: min(calc(100vw - 2rem), 22rem);
  max-height: min(88vh, 34rem);
}

.coheus-voice--call .coheus-voice__body {
  flex: 0 0 auto;
}

.coheus-voice--call .coheus-voice__sphere {
  width: 5.5rem;
  height: 5.5rem;
  margin-bottom: 0.55rem;
}

.coheus-voice__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  flex: 1;
}

.coheus-voice__sphere {
  display: block;
  width: 7.5rem;
  height: 7.5rem;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0.9rem;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  align-self: center;
  box-shadow:
    0 0 0 1px #fff,
    0 0 0 2px rgba(20, 80, 140, 0.12),
    0 14px 32px rgba(15, 23, 42, 0.12);
}

.coheus-voice__sphere video {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
  object-position: center center;
  transform: none;
}

.coheus-voice__name {
  margin: 0;
  width: 100%;
  text-align: center;
  font-family: Sora, Figtree, system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  color: #0b1220;
}

.coheus-voice__status {
  margin: 0.2rem 0 0;
  width: 100%;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #94a3b8;
}

.coheus-voice__status.is-live {
  color: #14508c;
}

.coheus-voice__transcript,
.ci-voice-sandbox__transcript {
  width: 100%;
  max-height: 9.5rem;
  margin-top: 0.65rem;
  padding: 0.45rem 0.5rem;
  overflow-y: auto;
  text-align: left;
  border-radius: 0.75rem;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.06);
  -webkit-overflow-scrolling: touch;
}

.coheus-voice__transcript-empty,
.ci-voice-sandbox__transcript-empty {
  margin: 0;
  color: #94a3b8;
  font-size: 0.72rem;
  line-height: 1.45;
  text-align: center;
}

.coheus-voice__turn,
.ci-voice-sandbox__turn {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-bottom: 0.5rem;
}

.coheus-voice__turn:last-child,
.ci-voice-sandbox__turn:last-child {
  margin-bottom: 0;
}

.coheus-voice__turn--caller,
.ci-voice-sandbox__turn--caller {
  align-items: flex-end;
}

.coheus-voice__turn--agent,
.ci-voice-sandbox__turn--agent {
  align-items: flex-start;
}

.coheus-voice__turn-label,
.ci-voice-sandbox__turn-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
}

.coheus-voice__turn-text,
.ci-voice-sandbox__turn-text {
  margin: 0;
  max-width: 92%;
  padding: 0.45rem 0.6rem;
  border-radius: 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  word-break: break-word;
}

.coheus-voice__turn--caller .coheus-voice__turn-text,
.ci-voice-sandbox__turn--caller .ci-voice-sandbox__turn-text {
  background: #14508c;
  color: #fff;
  border-bottom-right-radius: 0.2rem;
}

.coheus-voice__turn--agent .coheus-voice__turn-text,
.ci-voice-sandbox__turn--agent .ci-voice-sandbox__turn-text {
  background: #fff;
  color: #0f172a;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-bottom-left-radius: 0.2rem;
}

.coheus-voice__composer,
.ci-voice-sandbox__composer {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  margin-top: 0.55rem;
}

.coheus-voice__composer-input,
.ci-voice-sandbox__composer-input {
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #fff;
  font: inherit;
  font-size: 0.8125rem;
  color: #0f172a;
}

.coheus-voice__composer-input:focus,
.ci-voice-sandbox__composer-input:focus {
  outline: 2px solid rgba(20, 80, 140, 0.25);
  outline-offset: 1px;
}

.coheus-voice__composer-input:disabled,
.ci-voice-sandbox__composer-input:disabled {
  opacity: 0.55;
  background: #f1f5f9;
}

.coheus-voice__composer-send,
.ci-voice-sandbox__composer-send {
  flex-shrink: 0;
  padding: 0.48rem 0.85rem;
  border: 0;
  border-radius: 999px;
  background: #0b1220;
  color: #fff;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 650;
  cursor: pointer;
}

.coheus-voice__composer-send:disabled,
.ci-voice-sandbox__composer-send:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.analyze-attach {
  position: relative;
  display: inline-flex;
}

.analyze-attach__menu {
  position: absolute;
  bottom: calc(100% + 0.45rem);
  left: 50%;
  z-index: 2;
  min-width: 11.5rem;
  padding: 0.35rem;
  transform: translateX(-50%);
  border-radius: 0.75rem;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}

.analyze-attach__item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  width: 100%;
  padding: 0.45rem 0.55rem;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  color: #0f172a;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.analyze-attach__item:hover {
  background: #f1f5f9;
}

.analyze-attach__hint {
  font-size: 0.68rem;
  font-weight: 500;
  color: #64748b;
}

.analyze-attach__input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.coheus-voice__controls {
  display: flex;
  justify-content: center;
  align-items: center;
  align-self: stretch;
  gap: 0.5rem;
  width: 100%;
  margin-top: 0.65rem;
  padding: 0.55rem;
  border-radius: 999px;
  background: #f4f6f8;
  border: 1px solid rgba(15, 23, 42, 0.05);
}

.coheus-voice__ctrl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  color: #334155;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.coheus-voice__ctrl:hover {
  background: #fff;
  color: #0f172a;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
}

.coheus-voice__ctrl.is-active {
  background: #e8f1ff;
  color: #14508c;
  box-shadow: none;
}

.coheus-voice__ctrl--end {
  background: #fff;
  color: #b91c1c;
}

.coheus-voice__ctrl--end:hover {
  background: #fef2f2;
  color: #991b1b;
}

.coheus-voice__ctrl:disabled {
  opacity: 0.5;
  cursor: wait;
}

.coheus-voice__file {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.coheus-voice__attach-note {
  width: 100%;
  margin: 0.75rem 0 0;
  padding: 0.5rem 0.65rem;
  border-radius: 0.65rem;
  background: #f3f8ff;
  color: #14508c;
  font-size: 0.72rem;
  line-height: 1.4;
}

/* Hidden ConvAI engine — never steal clicks from custom controls */
.coheus-voice__engine,
.coheus-voice__engine elevenlabs-convai {
  position: fixed !important;
  left: -9999px !important;
  top: 0 !important;
  width: 1px !important;
  height: 1px !important;
  max-width: 1px !important;
  max-height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  z-index: -1 !important;
}

.coheus-talk {
  z-index: 2147483001;
}

@media (max-width: 480px) {
  .coheus-voice {
    right: 0.75rem;
    left: 0.75rem !important;
    width: auto;
    max-width: none;
    bottom: calc(6.75rem + 3.5rem);
  }
}
