:root {
  --owo-asistente-size: 76px;
  --owo-asistente-accent: #7CFF7A;
  --owo-asistente-bg: rgba(8, 10, 9, 0.72);
  --owo-asistente-panel: rgba(12, 15, 13, 0.86);
  --owo-asistente-border: rgba(255, 255, 255, 0.18);
  --owo-asistente-text: #f7f3e8;
  --owo-asistente-muted: rgba(247, 243, 232, 0.76);
  --owo-asistente-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.owo-asistente,
.owo-asistente-tray {
  font-family: inherit;
  box-sizing: border-box;
}

.owo-asistente *,
.owo-asistente-tray * {
  box-sizing: border-box;
}

.owo-asistente {
  position: fixed;
  z-index: 99998;
  display: block;
  pointer-events: none;
}

.owo-asistente--bottom-right { right: 18px; bottom: 18px; }
.owo-asistente--bottom-left { left: 18px; bottom: 18px; }
.owo-asistente--top-right { right: 18px; top: 18px; }
.owo-asistente--top-left { left: 18px; top: 18px; }

.owo-asistente__orb,
.owo-asistente-tray,
.owo-asistente-trigger {
  pointer-events: auto;
}

.owo-asistente__orb {
  width: var(--owo-asistente-size);
  height: var(--owo-asistente-size);
  position: relative;
  border: 1px solid var(--owo-asistente-border);
  border-radius: 999px;
  background:
    radial-gradient(circle at 42% 30%, rgba(255, 255, 255, 0.28), transparent 20%),
    radial-gradient(circle at 50% 58%, color-mix(in srgb, var(--owo-asistente-accent), transparent 28%), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02)),
    var(--owo-asistente-bg);
  box-shadow: var(--owo-asistente-shadow), inset 0 0 26px rgba(255, 255, 255, 0.06);
  cursor: pointer;
  display: grid;
  place-items: center;
  overflow: hidden;
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.owo-asistente__orb:hover,
.owo-asistente__orb:focus-visible {
  transform: translateY(-2px) scale(1.03);
  border-color: color-mix(in srgb, var(--owo-asistente-accent), white 24%);
  outline: none;
}

.owo-asistente__halo {
  position: absolute;
  inset: 7px;
  border-radius: inherit;
  border: 1px solid color-mix(in srgb, var(--owo-asistente-accent), transparent 45%);
  box-shadow: 0 0 28px color-mix(in srgb, var(--owo-asistente-accent), transparent 64%);
  opacity: 0.85;
}

.owo-asistente__face {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  display: block;
}

.owo-asistente__eye {
  position: absolute;
  top: 16px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--owo-asistente-text);
  box-shadow: 0 0 12px color-mix(in srgb, var(--owo-asistente-accent), white 10%);
}

.owo-asistente__eye--left { left: 13px; }
.owo-asistente__eye--right { right: 13px; }

.owo-asistente__mouth {
  position: absolute;
  left: 50%;
  top: 30px;
  width: 18px;
  height: 5px;
  border-radius: 999px;
  transform: translateX(-50%);
  background: var(--owo-asistente-text);
  box-shadow: 0 0 12px color-mix(in srgb, var(--owo-asistente-accent), white 10%);
  transition: width 70ms ease, height 70ms ease, border-radius 70ms ease, transform 70ms ease;
}

.owo-asistente__mouth[data-viseme="a"] { width: 19px; height: 17px; border-radius: 50%; }
.owo-asistente__mouth[data-viseme="e"] { width: 24px; height: 9px; border-radius: 999px; }
.owo-asistente__mouth[data-viseme="i"] { width: 26px; height: 4px; border-radius: 999px; }
.owo-asistente__mouth[data-viseme="o"] { width: 15px; height: 15px; border-radius: 50%; }
.owo-asistente__mouth[data-viseme="u"] { width: 12px; height: 16px; border-radius: 50%; }
.owo-asistente__mouth[data-viseme="m"] { width: 18px; height: 3px; border-radius: 999px; }
.owo-asistente__mouth[data-viseme="f"] { width: 22px; height: 5px; transform: translateX(-50%) rotate(-2deg); }
.owo-asistente__mouth[data-viseme="soft"] { width: 16px; height: 8px; border-radius: 999px; }
.owo-asistente__mouth[data-viseme="idle"] { width: 18px; height: 5px; }

.owo-asistente__spark {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--owo-asistente-accent);
  opacity: 0.8;
  filter: blur(0.2px);
}

.owo-asistente__spark--one { left: 4px; top: 28px; }
.owo-asistente__spark--two { right: 4px; top: 26px; }
.owo-asistente__spark--three { left: 50%; bottom: 2px; }

.owo-asistente--speaking .owo-asistente__halo {
  animation: owoAsistentePulse 1.05s ease-in-out infinite;
}

.owo-asistente--speaking .owo-asistente__spark--one { animation: owoAsistenteOrbit 1.4s linear infinite; }
.owo-asistente--speaking .owo-asistente__spark--two { animation: owoAsistenteOrbit 1.7s linear infinite reverse; }
.owo-asistente--speaking .owo-asistente__spark--three { animation: owoAsistentePulse 0.9s ease-in-out infinite; }

.owo-asistente-tray {
  position: fixed;
  z-index: 99997;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  width: min(860px, calc(100vw - 24px));
  color: var(--owo-asistente-text);
  transform: translateX(-50%) translateY(24px) scale(0.985);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.owo-asistente-tray--open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0) scale(1);
}

.owo-asistente-tray__inner {
  width: 100%;
  max-height: min(46vh, 360px);
  overflow: auto;
  border: 1px solid var(--owo-asistente-border);
  border-radius: 24px;
  background: var(--owo-asistente-panel);
  box-shadow: var(--owo-asistente-shadow);
  backdrop-filter: blur(22px) saturate(1.22);
  -webkit-backdrop-filter: blur(22px) saturate(1.22);
  padding: 12px;
}

.owo-asistente-tray__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.owo-asistente-tray__top-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.owo-asistente-tray__title {
  flex: 0 0 auto;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.owo-asistente-tray__levels,
.owo-asistente-tray__listen,
.owo-asistente-tray__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.owo-asistente-tray__levels {
  justify-content: flex-end;
}

.owo-asistente-tray__lock {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--owo-asistente-muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.owo-asistente-tray__lock input {
  appearance: none;
  width: 34px;
  height: 18px;
  margin: 0;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--owo-asistente-accent), transparent 54%);
  background: rgba(0, 0, 0, 0.3);
  position: relative;
  transition: background 160ms ease, border-color 160ms ease;
}

.owo-asistente-tray__lock input::before {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  left: 2px;
  top: 2px;
  border-radius: 999px;
  background: var(--owo-asistente-text);
  transition: transform 160ms ease;
}

.owo-asistente-tray__lock input:checked {
  background: color-mix(in srgb, var(--owo-asistente-accent), transparent 62%);
  border-color: color-mix(in srgb, var(--owo-asistente-accent), white 18%);
}

.owo-asistente-tray__lock input:checked::before {
  transform: translateX(15px);
}

.owo-asistente-tray__progress {
  height: 3px;
  margin: 10px 2px 0;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}

.owo-asistente-tray__progress span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  transform-origin: left center;
  transform: scaleX(0);
  background: color-mix(in srgb, var(--owo-asistente-accent), white 8%);
  transition: transform 120ms linear;
}

.owo-asistente-tray__progress.is-locked span {
  transform: scaleX(1) !important;
}

.owo-asistente-tray__timer {
  min-height: 16px;
  margin: 6px 4px 0;
  color: var(--owo-asistente-muted);
  font-size: 11px;
  line-height: 1.3;
}

.owo-asistente-tray__subtitle {
  min-height: 40px;
  max-height: 110px;
  overflow: auto;
  margin-top: 10px;
  color: var(--owo-asistente-text);
  font-size: 13px;
  line-height: 1.45;
  letter-spacing: 0.01em;
  padding: 9px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
}

.owo-asistente-tray__listen,
.owo-asistente-tray__actions {
  margin-top: 10px;
}

.owo-asistente-tray__listen {
  align-items: center;
}

.owo-asistente-tray__hint {
  color: var(--owo-asistente-muted);
  font-size: 12px;
  line-height: 1.35;
}

.owo-asistente-tray__button--primary {
  background: color-mix(in srgb, var(--owo-asistente-accent), transparent 74%);
  border-color: color-mix(in srgb, var(--owo-asistente-accent), white 18%);
}

.owo-asistente-tray__button,
.owo-asistente-tray__level,
.owo-asistente-trigger {
  border: 1px solid color-mix(in srgb, var(--owo-asistente-accent), transparent 42%);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--owo-asistente-text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  min-height: 34px;
  padding: 9px 12px;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.owo-asistente-tray__level {
  min-height: 30px;
  padding: 8px 10px;
  font-size: 11px;
}

.owo-asistente-tray__button--secondary {
  opacity: 0.88;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.045);
}

.owo-asistente-tray__button:hover,
.owo-asistente-tray__button:focus-visible,
.owo-asistente-tray__level:hover,
.owo-asistente-tray__level:focus-visible,
.owo-asistente-trigger:hover,
.owo-asistente-trigger:focus-visible {
  background: color-mix(in srgb, var(--owo-asistente-accent), transparent 78%);
  border-color: color-mix(in srgb, var(--owo-asistente-accent), white 20%);
  outline: none;
  transform: translateY(-1px);
}

.owo-asistente-tray__level.is-active,
.owo-asistente-tray__level[aria-pressed="true"] {
  background: color-mix(in srgb, var(--owo-asistente-accent), rgba(255, 255, 255, 0.06) 72%);
  border-color: color-mix(in srgb, var(--owo-asistente-accent), white 30%);
  color: #071008;
}

.owo-asistente-tray__voice {
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.06);
}

.owo-asistente-tray__voice-label {
  display: grid;
  gap: 6px;
  color: var(--owo-asistente-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.owo-asistente-tray__voice-select {
  width: 100%;
  min-height: 34px;
  border: 1px solid color-mix(in srgb, var(--owo-asistente-accent), transparent 55%);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.32);
  color: var(--owo-asistente-text);
  font: inherit;
  font-size: 12px;
  padding: 7px 9px;
}

.owo-asistente-tray__voice-select:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--owo-asistente-accent), white 15%);
  outline-offset: 2px;
}

.owo-asistente-tray__voice-status {
  display: block;
  margin-top: 6px;
  color: var(--owo-asistente-muted);
  font-size: 11px;
  line-height: 1.3;
}

.owo-mood-happy .owo-asistente__eye { height: 6px; border-radius: 999px 999px 4px 4px; }
.owo-mood-alert .owo-asistente__halo { border-color: rgba(255, 180, 60, 0.75); box-shadow: 0 0 30px rgba(255, 180, 60, 0.32); }
.owo-mood-alert .owo-asistente__spark { background: #ffb13d; }
.owo-mood-thinking .owo-asistente__spark { opacity: 0.55; }

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

@keyframes owoAsistentePulse {
  0%, 100% { transform: scale(1); opacity: 0.72; }
  50% { transform: scale(1.08); opacity: 1; }
}

@keyframes owoAsistenteOrbit {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  25% { transform: translate3d(4px, -4px, 0) scale(1.2); }
  50% { transform: translate3d(0, -8px, 0) scale(0.92); }
  75% { transform: translate3d(-4px, -4px, 0) scale(1.1); }
  100% { transform: translate3d(0, 0, 0) scale(1); }
}

.owo-asistente--reduced-motion *,
.owo-asistente--reduced-motion *::before,
.owo-asistente--reduced-motion *::after {
  animation: none !important;
  transition-duration: 0.01ms !important;
}

.owo-asistente--draggable .owo-asistente__orb {
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.owo-asistente--dragging .owo-asistente__orb {
  cursor: grabbing;
  transform: scale(1.04);
}

.owo-asistente--custom-position {
  left: 18px;
  top: 18px;
  right: auto !important;
  bottom: auto !important;
}

.owo-asistente--paused .owo-asistente__halo {
  opacity: 0.58;
  box-shadow: 0 0 18px color-mix(in srgb, var(--owo-asistente-accent), transparent 78%);
}

@media (prefers-reduced-motion: reduce) {
  .owo-asistente *,
  .owo-asistente *::before,
  .owo-asistente *::after,
  .owo-asistente-tray {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 600px) {
  :root { --owo-asistente-size: 68px; }
  .owo-asistente--bottom-right { right: 12px; bottom: 12px; }
  .owo-asistente--bottom-left { left: 12px; bottom: 12px; }
  .owo-asistente--top-right { right: 12px; top: 12px; }
  .owo-asistente--top-left { left: 12px; top: 12px; }
  .owo-asistente-tray { width: calc(100vw - 16px); bottom: max(8px, env(safe-area-inset-bottom)); }
  .owo-asistente-tray__inner { max-height: min(54vh, 390px); border-radius: 22px; padding: 10px; }
  .owo-asistente-tray__topline { align-items: flex-start; flex-direction: column; gap: 8px; }
  .owo-asistente-tray__top-controls { justify-content: flex-start; width: 100%; }
  .owo-asistente-tray__levels { justify-content: flex-start; }
  .owo-asistente-tray__button,
  .owo-asistente-tray__level { min-height: 32px; padding: 8px 10px; font-size: 11px; }
  .owo-asistente-tray__subtitle { max-height: 96px; }
}

.owo-asistente-tray__button--primary {
  background: color-mix(in srgb, var(--owo-asistente-accent), transparent 74%);
  border-color: color-mix(in srgb, var(--owo-asistente-accent), white 18%);
}
