/* ===== ARIA — FLOATING ORB AGENT ===== */

/* ===== 1. ORB (fixed, bottom-right) ===== */
.agent-orb {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: var(--agent-orb-size);
  height: var(--agent-orb-size);
  z-index: var(--z-agent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.agent-orb-core {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: radial-gradient(circle at 35% 35%, #F5D78E, var(--color-accent) 50%, #C9872A);
  box-shadow: 0 0 20px var(--agent-glow), 0 0 60px rgba(232,168,56,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 14px;
  color: var(--color-primary-dark);
  letter-spacing: 0.5px;
  z-index: 3;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

/* Concentric rings */
.agent-orb-ring {
  position: absolute;
  border-radius: var(--radius-full);
  border: 1.5px solid rgba(232,168,56,0.2);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  pointer-events: none;
}

.agent-orb-ring:nth-child(3) {
  width: 52px;
  height: 52px;
  animation: orbRingSpin 12s linear infinite;
  border-style: dashed;
}

.agent-orb-ring:nth-child(4) {
  width: 62px;
  height: 62px;
  animation: orbRingSpin 20s linear infinite reverse;
  border-color: rgba(232,168,56,0.12);
}

/* Outer pulse */
.agent-orb-pulse {
  position: absolute;
  width: var(--agent-orb-size);
  height: var(--agent-orb-size);
  border-radius: var(--radius-full);
  background: radial-gradient(circle, rgba(232,168,56,0.1) 0%, transparent 70%);
  z-index: 0;
  pointer-events: none;
  animation: orbBreathe 4s ease-in-out infinite;
}

@keyframes orbRingSpin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes orbBreathe {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.15); opacity: 1; }
}

/* ===== ORB STATES ===== */

/* Thinking — rings speed up */
.agent-orb.thinking .agent-orb-ring:nth-child(3) {
  animation-duration: 3s;
  border-color: rgba(232,168,56,0.4);
}
.agent-orb.thinking .agent-orb-ring:nth-child(4) {
  animation-duration: 5s;
  border-color: rgba(232,168,56,0.25);
}
.agent-orb.thinking .agent-orb-core {
  box-shadow: 0 0 30px var(--agent-glow), 0 0 80px rgba(232,168,56,0.25);
}

/* Speaking — pulse faster */
.agent-orb.speaking .agent-orb-pulse {
  animation: orbSpeakPulse 1.2s ease-in-out infinite;
}
.agent-orb.speaking .agent-orb-core {
  box-shadow: 0 0 25px var(--agent-glow), 0 0 70px rgba(232,168,56,0.2);
}

@keyframes orbSpeakPulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.25); opacity: 1; }
}

/* Pointing — orb shifts toward content */
.agent-orb.pointing .agent-orb-core {
  transform: translateX(-6px) translateY(-6px);
}

/* Active (bubble open) — subtle glow boost */
.agent-orb.active .agent-orb-core {
  box-shadow: 0 0 24px var(--agent-glow), 0 0 70px rgba(232,168,56,0.2);
}

/* ===== 2. SPEECH BUBBLE ===== */
.agent-speech {
  position: fixed;
  bottom: calc(28px + var(--agent-orb-size) + 12px);
  right: 16px;
  max-width: var(--agent-bubble-max-w);
  min-width: 220px;
  background: var(--color-primary-dark);
  border: 1px solid rgba(232,168,56,0.18);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  box-shadow: 0 12px 40px rgba(0,0,0,0.35), 0 0 20px rgba(232,168,56,0.08);
  z-index: var(--z-agent);
  opacity: 0;
  transform: translateY(10px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.agent-speech.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Speech bubble tail (pointing to orb) */
.agent-speech::after {
  content: '';
  position: absolute;
  bottom: -7px;
  right: 24px;
  width: 14px;
  height: 14px;
  background: var(--color-primary-dark);
  border-right: 1px solid rgba(232,168,56,0.18);
  border-bottom: 1px solid rgba(232,168,56,0.18);
  transform: rotate(45deg);
}

/* Bubble header (ARIA label + history btn + close) */
.agent-speech-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.agent-speech-name {
  font-size: var(--font-size-xs);
  font-weight: 700;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex: 1;
}

.agent-speech-header-btn {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: all var(--transition-fast);
  padding: 0;
}

.agent-speech-header-btn:hover {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8);
}

.agent-speech-header-btn svg {
  width: 14px;
  height: 14px;
}

/* Message body */
.agent-speech-body {
  font-size: var(--font-size-sm);
  line-height: 1.65;
  color: rgba(255,255,255,0.9);
}

/* Auto-dismiss timer bar */
.agent-speech-timer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255,255,255,0.06);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  overflow: hidden;
}

.agent-speech-timer-bar {
  height: 100%;
  background: var(--color-accent);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  width: 100%;
  transform-origin: left;
  transition: transform linear;
}

/* Paused timer */
.agent-speech.paused .agent-speech-timer-bar {
  animation-play-state: paused !important;
  transition: none;
}

/* ===== 3. QUICK ACTIONS (inside speech bubble) ===== */
.agent-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.agent-action-btn {
  padding: 7px 16px;
  border: 1px solid rgba(232,168,56,0.4);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  color: var(--color-accent);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  font-family: var(--font-family);
}

.agent-action-btn:hover {
  background: var(--color-accent);
  color: var(--color-primary-dark);
  border-color: var(--color-accent);
}

/* ===== 4. INLINE INPUT (below speech bubble) ===== */
.agent-input-wrap {
  position: fixed;
  bottom: calc(28px + var(--agent-orb-size) + 12px);
  right: 16px;
  max-width: var(--agent-bubble-max-w);
  min-width: 220px;
  z-index: var(--z-agent);
  display: flex;
  gap: var(--space-2);
  align-items: center;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.agent-input-wrap.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* When both speech + input are visible, input goes below speech */
.agent-speech.visible ~ .agent-input-wrap.visible {
  /* positioned dynamically by JS */
}

.agent-input {
  flex: 1;
  padding: 10px 16px;
  border: 1.5px solid rgba(232,168,56,0.25);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  outline: none;
  background: var(--color-primary-dark);
  color: #fff;
  transition: border-color var(--transition-fast);
  font-family: var(--font-family);
}

.agent-input::placeholder {
  color: rgba(255,255,255,0.35);
}

.agent-input:focus {
  border-color: var(--color-accent);
  background: rgba(15,26,46,0.95);
}

.agent-send-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--color-accent);
  color: var(--color-primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.agent-send-btn:hover {
  background: var(--color-accent-hover);
  transform: scale(1.05);
}

.agent-send-btn svg {
  width: 18px;
  height: 18px;
}

/* ===== 5. TYPING INDICATOR ===== */
.agent-typing {
  display: flex;
  gap: 4px;
  padding: var(--space-1) 0;
}

.agent-typing-dot {
  width: 7px;
  height: 7px;
  background: rgba(255,255,255,0.4);
  border-radius: var(--radius-full);
  animation: agentTypingBounce 1.4s ease-in-out infinite;
}

.agent-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.agent-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes agentTypingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-5px); opacity: 1; }
}

/* ===== 6. MINI PROGRAM CARDS (inside bubble) ===== */
.agent-program-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  margin-top: var(--space-2);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.agent-program-card:hover {
  border-color: var(--color-accent);
  background: rgba(232,168,56,0.08);
}

.agent-program-card h5 {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: var(--space-1);
}

.agent-program-card p {
  font-size: var(--font-size-xs);
  color: rgba(255,255,255,0.5);
  margin-bottom: 0;
}

/* ===== 7. COMPARISON TABLE (inside bubble) ===== */
.agent-compare-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--space-3);
  font-size: var(--font-size-xs);
}

.agent-compare-table th {
  text-align: left;
  padding: 6px 8px;
  color: var(--color-accent);
  font-weight: 600;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.agent-compare-table td {
  padding: 6px 8px;
  color: rgba(255,255,255,0.75);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: top;
}

.agent-compare-table tr td:first-child {
  color: rgba(255,255,255,0.45);
  font-weight: 500;
  white-space: nowrap;
}

.agent-compare-actions {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.agent-compare-actions button {
  flex: 1;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  font-size: var(--font-size-xs);
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
  font-family: var(--font-family);
}

.agent-compare-actions .compare-view-btn {
  background: var(--color-accent);
  color: var(--color-primary-dark);
  font-weight: 600;
}

.agent-compare-actions .compare-view-btn:hover {
  background: var(--color-accent-hover);
}

.agent-compare-actions .compare-info-btn {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8);
}

.agent-compare-actions .compare-info-btn:hover {
  background: rgba(255,255,255,0.15);
}

/* ===== 8. HISTORY PANEL ===== */
.agent-history {
  position: fixed;
  bottom: calc(28px + var(--agent-orb-size) + 12px);
  right: 16px;
  width: var(--agent-bubble-max-w);
  max-height: 420px;
  background: var(--color-primary-dark);
  border: 1px solid rgba(232,168,56,0.15);
  border-radius: var(--radius-lg);
  z-index: calc(var(--z-agent) + 1);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(10px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

.agent-history.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.agent-history-header {
  display: flex;
  align-items: center;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.agent-history-header span {
  flex: 1;
  font-size: var(--font-size-xs);
  font-weight: 700;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.agent-history-close {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  padding: 0;
}

.agent-history-close:hover {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8);
}

.agent-history-close svg {
  width: 14px;
  height: 14px;
}

.agent-history-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-3) var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}

.agent-history-messages::-webkit-scrollbar {
  width: 4px;
}
.agent-history-messages::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 4px;
}

/* History message items */
.agent-history-msg {
  max-width: 88%;
  animation: agentMsgSlide 0.2s ease forwards;
}

.agent-history-msg.bot {
  align-self: flex-start;
}

.agent-history-msg.user {
  align-self: flex-end;
}

.agent-history-msg .agent-bubble {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-xs);
  line-height: 1.55;
}

.agent-history-msg.bot .agent-bubble {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.85);
  border-bottom-left-radius: var(--radius-sm);
}

.agent-history-msg.user .agent-bubble {
  background: var(--color-accent);
  color: var(--color-primary-dark);
  border-bottom-right-radius: var(--radius-sm);
  font-weight: 500;
}

@keyframes agentMsgSlide {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== 9. SPOTLIGHT OVERLAY ===== */
.agent-spotlight-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: var(--z-spotlight);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.agent-spotlight-overlay.active {
  opacity: 1;
}

/* Highlighted element */
.agent-highlight {
  position: relative;
  z-index: calc(var(--z-spotlight) + 1) !important;
  box-shadow: 0 0 0 4px var(--color-accent), 0 0 20px rgba(232,168,56,0.4), 0 0 40px rgba(232,168,56,0.15) !important;
  border-radius: var(--radius-md);
  animation: agentHighlightPulse 2s ease-in-out infinite;
  transition: box-shadow 0.3s ease;
}

@keyframes agentHighlightPulse {
  0%, 100% { box-shadow: 0 0 0 4px var(--color-accent), 0 0 20px rgba(232,168,56,0.4), 0 0 40px rgba(232,168,56,0.15); }
  50% { box-shadow: 0 0 0 6px var(--color-accent), 0 0 30px rgba(232,168,56,0.5), 0 0 60px rgba(232,168,56,0.2); }
}

/* ===== 10. POINTER LINE (orb → element) ===== */
.agent-pointer {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-agent) - 1);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.agent-pointer.visible {
  opacity: 1;
}

.agent-pointer line {
  stroke: var(--color-accent);
  stroke-width: 2;
  stroke-dasharray: 6 4;
  stroke-linecap: round;
}

/* ===== 11. NOTIFICATION BADGE ===== */
.agent-orb-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  background: var(--color-error);
  color: white;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  opacity: 0;
  transform: scale(0);
  transition: all 0.3s ease;
}

.agent-orb-badge.active {
  opacity: 1;
  transform: scale(1);
}

/* ===== 12. VOICE MODE ===== */

/* Voice ring (hidden by default) */
.agent-orb-voice-ring {
  display: none;
}

.agent-orb.voice-active .agent-orb-voice-ring {
  display: block;
  position: absolute;
  width: 68px;
  height: 68px;
  border-radius: var(--radius-full);
  border: 2px solid var(--color-accent);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  pointer-events: none;
  animation: voiceRingPulse 2s ease-in-out infinite;
}

@keyframes voiceRingPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
  50% { transform: translate(-50%, -50%) scale(1.15); opacity: 0.4; }
}

/* Voice listening — green glow (mic hot) */
.agent-orb.voice-listening .agent-orb-core {
  box-shadow: 0 0 30px rgba(16,185,129,0.4), 0 0 60px rgba(16,185,129,0.15);
}

.agent-orb.voice-listening .agent-orb-pulse {
  animation: voiceListenPulse 1.5s ease-in-out infinite;
  background: radial-gradient(circle, rgba(16,185,129,0.15) 0%, transparent 70%);
}

@keyframes voiceListenPulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.1); opacity: 1; }
}

/* Voice speaking — fast golden pulse */
.agent-orb.voice-speaking .agent-orb-pulse {
  animation: voiceSpeakPulse 0.8s ease-in-out infinite;
}

.agent-orb.voice-speaking .agent-orb-core {
  box-shadow: 0 0 30px var(--agent-glow), 0 0 80px rgba(232,168,56,0.3);
}

@keyframes voiceSpeakPulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
}

/* Voice status label near orb */
.agent-voice-status {
  position: fixed;
  bottom: calc(28px + var(--agent-orb-size) + 4px);
  right: 28px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-accent);
  text-align: center;
  width: var(--agent-orb-size);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: var(--z-agent);
}

.agent-voice-status.visible {
  opacity: 1;
}

/* Mic toggle button */
.agent-mic-toggle svg {
  width: 14px;
  height: 14px;
}

.agent-mic-toggle.voice-on {
  color: var(--color-success);
  background: rgba(16,185,129,0.15);
}

.agent-mic-toggle.voice-on:hover {
  background: rgba(16,185,129,0.25);
}

/* Transcription text in bubble */
.agent-transcription {
  font-style: italic;
  color: rgba(255,255,255,0.5);
  font-size: var(--font-size-xs);
  margin-top: var(--space-2);
  min-height: 1.2em;
}

.agent-transcription.final {
  color: rgba(255,255,255,0.75);
  font-style: normal;
}

/* ===== 13. ARIA INTRO OVERLAY ===== */

.aria-intro-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--aria-intro-z, 550);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.aria-intro-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.aria-intro-overlay.exiting {
  pointer-events: none;
}

.aria-intro-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 26, 46, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.aria-intro-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-4);
  max-width: 420px;
  padding: var(--space-8);
}

/* Avatar container — large, centered */
.aria-intro-avatar {
  width: 200px;
  height: 200px;
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 3px solid var(--color-accent);
  box-shadow: 0 0 40px rgba(232, 168, 56, 0.3), 0 0 80px rgba(232, 168, 56, 0.1);
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
}

.aria-intro-overlay.active .aria-intro-avatar {
  opacity: 1;
  transform: scale(1);
}

/* Video / image inside avatar */
.aria-intro-avatar .aria-avatar-video,
.aria-intro-avatar .aria-avatar-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* Name + subtitle */
.aria-intro-text {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease 0.3s, transform 0.4s ease 0.3s;
}

.aria-intro-overlay.active .aria-intro-text {
  opacity: 1;
  transform: translateY(0);
}

.aria-intro-name {
  font-size: var(--font-size-2xl);
  font-weight: 900;
  color: var(--color-accent);
  letter-spacing: 2px;
  margin: 0;
}

.aria-intro-subtitle {
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.7);
  margin: var(--space-1) 0 0;
  font-weight: 400;
}

/* Message */
.aria-intro-message {
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  max-width: 360px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease 0.6s, transform 0.4s ease 0.6s;
}

.aria-intro-overlay.active .aria-intro-message {
  opacity: 1;
  transform: translateY(0);
}

/* Quick reply actions */
.aria-intro-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease 0.9s, transform 0.4s ease 0.9s;
}

.aria-intro-overlay.active .aria-intro-actions {
  opacity: 1;
  transform: translateY(0);
}

.aria-intro-actions .agent-action-btn {
  padding: 9px 20px;
  font-size: var(--font-size-sm);
}

/* "Comenzar" button — prominent CTA */
.aria-intro-start-btn {
  padding: 12px 36px !important;
  font-size: var(--font-size-base) !important;
  background: var(--color-accent) !important;
  color: var(--color-primary-dark) !important;
  border-color: var(--color-accent) !important;
  font-weight: 700;
  letter-spacing: 0.5px;
  transition: all 0.3s ease !important;
}

.aria-intro-start-btn:hover {
  background: var(--color-accent-hover) !important;
  border-color: var(--color-accent-hover) !important;
  transform: scale(1.05);
}

/* Fly-to-corner animation */
.aria-intro-avatar.fly-to-corner {
  position: fixed !important;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1) !important;
  z-index: 600;
  border-width: 2px;
}

/* Orb hidden during intro */
.agent-orb.intro-hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0);
  transition: none;
}

/* Orb entrance after intro */
.agent-orb.intro-entering {
  animation: orbIntroAppear 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes orbIntroAppear {
  from { opacity: 0; transform: scale(0.3); }
  to { opacity: 1; transform: scale(1); }
}

/* ===== 14. ORB AVATAR (replaces AR text) ===== */

.agent-orb-core .agent-orb-fallback {
  display: block;
}

.agent-orb-core.has-avatar .agent-orb-fallback {
  display: none;
}

.agent-orb-core.has-avatar {
  background: none;
  overflow: hidden;
}

.agent-orb-avatar {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.agent-orb-avatar .aria-avatar-video,
.agent-orb-avatar .aria-avatar-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: var(--radius-full);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .agent-orb {
    width: var(--agent-orb-size-sm);
    height: var(--agent-orb-size-sm);
    bottom: 20px;
    right: 20px;
  }

  .agent-orb-core {
    width: 48px;
    height: 48px;
    font-size: 12px;
  }

  .agent-orb-ring:nth-child(3) {
    width: 44px;
    height: 44px;
  }

  .agent-orb-ring:nth-child(4) {
    width: 54px;
    height: 54px;
  }

  .agent-orb-pulse {
    width: var(--agent-orb-size-sm);
    height: var(--agent-orb-size-sm);
  }

  .agent-orb.voice-active .agent-orb-voice-ring {
    width: 58px;
    height: 58px;
  }

  .agent-voice-status {
    bottom: calc(20px + var(--agent-orb-size-sm) + 4px);
    right: 20px;
    width: var(--agent-orb-size-sm);
  }

  .agent-speech {
    bottom: calc(20px + var(--agent-orb-size-sm) + 10px);
    right: 12px;
    left: 12px;
    max-width: none;
    min-width: auto;
  }

  .agent-speech::after {
    right: 20px;
  }

  .agent-input-wrap {
    bottom: calc(20px + var(--agent-orb-size-sm) + 10px);
    right: 12px;
    left: 12px;
    max-width: none;
    min-width: auto;
  }

  .agent-history {
    bottom: calc(20px + var(--agent-orb-size-sm) + 10px);
    right: 12px;
    left: 12px;
    width: auto;
    max-height: 60vh;
  }

  /* No pulse animation for performance */
  .agent-highlight {
    animation: none;
  }

  /* Intro responsive */
  .aria-intro-avatar {
    width: 140px;
    height: 140px;
  }

  .aria-intro-name {
    font-size: var(--font-size-xl);
  }

  .aria-intro-message {
    font-size: var(--font-size-sm);
  }

  .agent-orb-avatar {
    width: 100%;
    height: 100%;
  }
}

@media (max-width: 480px) {
  .agent-orb {
    bottom: 16px;
    right: 16px;
  }

  .agent-speech,
  .agent-input-wrap,
  .agent-history {
    left: 8px;
    right: 8px;
  }

  .aria-intro-avatar {
    width: 100px;
    height: 100px;
  }

  .aria-intro-content {
    padding: var(--space-4);
  }
}
