/* Pixie + Narration — unified top-left widget.
 * Pixie face is an EMO-style screen rendered with procedural SVG. */

.pixie-narrator {
  position: relative;
  width: fit-content;
  margin: 0 auto 1.25rem;
  z-index: 30;
  pointer-events: auto;
}
@media (min-width: 768px) {
  .pixie-narrator {
    position: fixed;
    top: 5.5rem;
    inset-inline-start: 0.75rem;
    margin: 0;
  }
}

.pixie-narrator__row {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  flex-wrap: nowrap;
}

/* ---------- Pixie face ---------------------------------------------------- */
.pixie {
  position: relative;
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  user-select: none;
}
@media (min-width: 640px) {
  .pixie { width: 84px; height: 84px; }
}

.pixie__shell {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 200ms cubic-bezier(.4,.0,.2,1), filter 200ms;
  animation: pixie-breathe 4s ease-in-out infinite;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.15));
}

.pixie__screen {
  position: absolute;
  inset: 0;
  border-radius: 22%;
  background: radial-gradient(ellipse at 50% 25%, #1f2547 0%, #0d0f24 70%, #06081a 100%);
  box-shadow:
    inset 0 0 0 2px #2a2f5a,
    inset 0 0 0 4px #0a0b1f,
    inset 0 4px 10px rgba(255,255,255,0.06),
    inset 0 -6px 12px rgba(0,0,0,0.5),
    0 0 18px var(--pixie-glow, rgba(120,180,255,0.25));
  overflow: hidden;
  transition: box-shadow 320ms ease;
}
.pixie__screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.05) 0 1px,
    transparent 1px 3px
  );
  pointer-events: none;
  opacity: 0.55;
  mix-blend-mode: screen;
}
.pixie__screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.45) 100%);
  pointer-events: none;
}

.pixie__face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform-origin: 50% 60%;
  transition: transform 320ms cubic-bezier(.4,.0,.2,1);
}

.pixie__eye,
.pixie__mouth {
  fill: #b9e4ff;
  filter: drop-shadow(0 0 4px rgba(180,220,255,0.65));
  transition:
    cx 250ms ease, cy 250ms ease, rx 250ms ease, ry 250ms ease, d 250ms ease;
}
.pixie__mouth {
  fill: none;
  stroke: #b9e4ff;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pixie__antenna {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 7px;
  height: 12px;
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(to top, #2a2f5a 0 60%, #ff6f9e 60% 100%);
  box-shadow: 0 0 8px rgba(255,111,158,0.6);
  opacity: 0.9;
}
.pixie[data-state="speaking"] .pixie__antenna {
  animation: pixie-antenna-pulse 0.6s ease-in-out infinite;
}

/* Bubble sits directly below Pixie so reactions ("Nice!", "Almost!") feel
 * attached to the face. When the action dock happens to be open at the same
 * time, the bubble overlays it — reactions are transient and take priority
 * over the controls visually. */
.pixie__bubble {
  position: absolute;
  top: calc(100% + 6px);
  inset-inline-start: 50%;
  transform: translateX(-50%);
  max-width: 220px;
  padding: 0.45rem 0.7rem;
  background: #fffdf6;
  color: #1c1c2e;
  border: 2px solid #1c1c2e;
  border-radius: 0.8rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  box-shadow: 3px 3px 0 0 rgba(28,28,46,0.85);
  white-space: nowrap;
  z-index: 6;
  pointer-events: none;
}
.pixie__bubble::before {
  content: "";
  position: absolute;
  top: -8px;
  inset-inline-start: 50%;
  width: 12px;
  height: 12px;
  background: #fffdf6;
  border-top: 2px solid #1c1c2e;
  border-left: 2px solid #1c1c2e;
  transform: translateX(-50%) rotate(45deg);
}

/* Make the shell clickable so tap on Pixie toggles the actions row. */
.pixie__shell {
  cursor: pointer;
  outline: none;
}
.pixie__shell:focus-visible {
  box-shadow: 0 0 0 3px rgba(180,220,255,0.55);
  border-radius: 22%;
}

/* ---------- Unified action dock (below Pixie) ---------------------------- */
/* Visual theme mirrors Pixie's screen: deep navy gradient, subtle inner glow,
 * scanline-free pill. Hidden by default; revealed on hover/focus with a
 * spring-eased scale-in. Buttons fade in with a small stagger. */
.pixie__actions {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px) scale(0.88);
  transform-origin: top center;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  background: linear-gradient(180deg, #1f2547 0%, #0d0f24 100%);
  border: 1.5px solid rgba(185, 228, 255, 0.18);
  border-radius: 999px;
  box-shadow:
    0 6px 14px rgba(13, 15, 36, 0.40),
    inset 0 1px 0 rgba(255,255,255,0.08),
    inset 0 -2px 4px rgba(0,0,0,0.4),
    0 0 14px var(--pixie-glow, rgba(120,180,255,0.20));
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms cubic-bezier(.4,.0,.2,1),
              transform 260ms cubic-bezier(.34, 1.56, .64, 1),
              box-shadow 320ms ease;
  z-index: 4;
  white-space: nowrap;
}

.pixie:hover .pixie__actions,
.pixie:focus-within .pixie__actions,
.pixie.is-actions-open .pixie__actions {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0) scale(1);
}

/* Invisible bridge covering the gap between Pixie and the dock so the cursor
 * can travel from face → dock without :hover flipping off mid-traverse.
 * Slightly wider than the dock and tall enough to reach Pixie's chin. */
.pixie__actions::after {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% + 16px);
  height: 14px;
  background: transparent;
  pointer-events: auto;
}

/* Subtle connector pointing up toward Pixie's chin. */
.pixie__actions::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 7px;
  height: 7px;
  background: #1f2547;
  border-top: 1.5px solid rgba(185, 228, 255, 0.18);
  border-left: 1.5px solid rgba(185, 228, 255, 0.18);
}

/* Unified action button — small, ghost-style on the dark dock.
 * Same shape for every control; state communicated by tint, not by shape. */
.pixie__action {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: rgba(185, 228, 255, 0.72);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  box-shadow: none;
  position: relative;
  opacity: 0;
  transform: translateY(-3px);
  transition: background 160ms ease, color 160ms ease,
              transform 160ms ease, box-shadow 200ms ease;
}
.pixie:hover .pixie__action,
.pixie:focus-within .pixie__action,
.pixie.is-actions-open .pixie__action {
  animation: pixie-action-in 260ms cubic-bezier(.34, 1.56, .64, 1) forwards;
}
.pixie:hover .pixie__action:nth-child(1),
.pixie:focus-within .pixie__action:nth-child(1),
.pixie.is-actions-open .pixie__action:nth-child(1) { animation-delay: 30ms; }
.pixie:hover .pixie__action:nth-child(2),
.pixie:focus-within .pixie__action:nth-child(2),
.pixie.is-actions-open .pixie__action:nth-child(2) { animation-delay: 70ms; }
.pixie:hover .pixie__action:nth-child(3),
.pixie:focus-within .pixie__action:nth-child(3),
.pixie.is-actions-open .pixie__action:nth-child(3) { animation-delay: 110ms; }
.pixie:hover .pixie__action:nth-child(4),
.pixie:focus-within .pixie__action:nth-child(4),
.pixie.is-actions-open .pixie__action:nth-child(4) { animation-delay: 150ms; }
.pixie:hover .pixie__action:nth-child(5),
.pixie:focus-within .pixie__action:nth-child(5),
.pixie.is-actions-open .pixie__action:nth-child(5) { animation-delay: 190ms; }

.pixie__action:hover {
  background: rgba(185, 228, 255, 0.14);
  color: #d8efff;
}
.pixie__action:active { transform: translateY(0.5px) scale(0.96); }
.pixie__action:focus-visible {
  outline: 2px solid rgba(185, 228, 255, 0.7);
  outline-offset: 1px;
}
.pixie__action .material-symbols-outlined { font-size: 13px; }

/* Active/on state — borrows Pixie's "speaking" purple-blue glow. */
.pixie__action.is-on,
.pixie__action--chat.is-on,
.pixie__action--controls.is-on {
  background: linear-gradient(180deg, rgba(179, 93, 255, 0.55), rgba(144, 38, 230, 0.35));
  color: #fff;
  box-shadow:
    inset 0 0 6px rgba(179, 93, 255, 0.45),
    0 0 8px rgba(179, 93, 255, 0.30);
}

/* Off-state for narration toggle reads as muted, not error. */
.pixie__action--narration.is-off {
  color: rgba(185, 228, 255, 0.35);
}

/* Close gets a warm danger tint so it reads as "destructive". */
.pixie__action--close:hover {
  background: rgba(255, 120, 150, 0.18);
  color: #ffa6b7;
}

/* Tooltip on hover — uses data-tooltip attr for an extensible labeling API. */
.pixie__action[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%) translateY(-2px);
  background: #1c1c2e;
  color: #fffdf6;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 3px 6px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 140ms ease 80ms, transform 140ms ease 80ms;
  z-index: 10;
}
.pixie__action[data-tooltip]:hover::after,
.pixie__action[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@keyframes pixie-action-in {
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- State-driven animations -------------------------------------- */
.pixie[data-state="happy"] .pixie__shell { animation: pixie-bounce 600ms ease-out, pixie-breathe 4s ease-in-out infinite 600ms; }
.pixie[data-state="sad"]   .pixie__shell { animation: pixie-shake 500ms ease-in-out, pixie-breathe 4s ease-in-out infinite 500ms; }

@keyframes pixie-breathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.025); }
}
@keyframes pixie-bounce {
  0%   { transform: translateY(0) scale(1); }
  30%  { transform: translateY(-8px) scale(1.06); }
  60%  { transform: translateY(0) scale(0.96); }
  100% { transform: translateY(0) scale(1); }
}
@keyframes pixie-shake {
  0%, 100% { transform: translateX(0) rotate(0); }
  25%      { transform: translateX(-4px) rotate(-2deg); }
  50%      { transform: translateX(0) rotate(0); }
  75%      { transform: translateX(4px) rotate(2deg); }
}
@keyframes pixie-antenna-pulse {
  0%, 100% { box-shadow: 0 0 6px rgba(255,111,158,0.5); }
  50%      { box-shadow: 0 0 14px rgba(255,111,158,0.95); }
}

/* ---------- Audio controls panel ----------------------------------------- */
/* Treated as an extension of Pixie's screen: same navy gradient, scanlines,
 * cyan stroke palette, and ambient glow. Sized tightly so it sits next to
 * the 72/84px Pixie face without dominating the viewport. */
.pixie-narrator__controls {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.3rem 0.45rem;
  border-radius: 0.7rem;
  background: linear-gradient(180deg, #1f2547 0%, #0d0f24 100%);
  border: 1.5px solid rgba(185, 228, 255, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    inset 0 -2px 4px rgba(0,0,0,0.4),
    0 4px 10px rgba(13, 15, 36, 0.35),
    0 0 12px var(--pixie-glow, rgba(120,180,255,0.18));
  min-width: 184px;
  overflow: hidden;
}
.pixie-narrator__controls::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.04) 0 1px,
    transparent 1px 3px
  );
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: screen;
}

.pixie-narrator__controls-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  z-index: 1;
}

.pixie-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(185, 228, 255, 0.7);
  border-radius: 0.45rem;
  transition: background 140ms, color 140ms, transform 100ms, box-shadow 200ms;
  cursor: pointer;
  padding: 0;
}
.pixie-btn:hover:not(:disabled) {
  background: rgba(185, 228, 255, 0.12);
  color: #d8efff;
}
.pixie-btn:active:not(:disabled) { transform: translateY(0.5px); }
.pixie-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.pixie-btn:focus-visible {
  outline: 1.5px solid rgba(185, 228, 255, 0.7);
  outline-offset: 1px;
}

.pixie-btn--play {
  width: 24px; height: 24px;
  background: linear-gradient(180deg, rgba(28, 167, 224, 0.85) 0%, rgba(0, 143, 199, 0.85) 100%);
  color: #fff;
  border-color: rgba(185, 228, 255, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.2),
    0 0 8px rgba(28, 167, 224, 0.4);
}
.pixie-btn--play:hover:not(:disabled) {
  background: linear-gradient(180deg, rgba(32, 182, 240, 0.95) 0%, rgba(0, 148, 207, 0.95) 100%);
  color: #fff;
}
.pixie-btn--play.is-playing {
  background: linear-gradient(180deg, rgba(179, 93, 255, 0.85) 0%, rgba(144, 38, 230, 0.85) 100%);
  border-color: rgba(179, 93, 255, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.2),
    0 0 10px rgba(179, 93, 255, 0.5);
}

.pixie-btn--toggle.is-on {
  background: linear-gradient(180deg, rgba(179, 93, 255, 0.55), rgba(144, 38, 230, 0.35));
  color: #fff;
  border-color: rgba(179, 93, 255, 0.4);
  box-shadow:
    inset 0 0 5px rgba(179, 93, 255, 0.4),
    0 0 6px rgba(179, 93, 255, 0.25);
}
.pixie-btn--small { width: 20px; height: 20px; font-size: 11px; }
.pixie-btn--text  { padding: 0 0.35rem; height: 18px; font-size: 9px; font-weight: 700; letter-spacing: 0.04em; }

.pixie-narrator__waveform {
  flex: 1 1 auto;
  min-width: 50px;
  height: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
}
.pixie-narrator__waveform-track {
  position: relative;
  flex: 1;
  height: 3px;
  border-radius: 999px;
  background: rgba(185, 228, 255, 0.12);
  overflow: hidden;
  box-shadow: inset 0 1px 1px rgba(0,0,0,0.25);
}
.pixie-narrator__waveform-fill {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  background: linear-gradient(90deg, #1ca7e0, #b35dff);
  border-radius: 999px;
  box-shadow: 0 0 6px rgba(179, 93, 255, 0.5);
  transition: width 120ms linear;
}

.pixie-narrator__time {
  font-size: 8.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: rgba(185, 228, 255, 0.7);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.pixie-narrator__status {
  font-size: 9px;
  font-weight: 600;
  color: rgba(185, 228, 255, 0.65);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.pixie-narrator__status.is-error { color: #ffa6b7; }

.pixie-narrator__controls.is-disabled {
  opacity: 0.6;
  filter: grayscale(40%);
}

/* ---------- Subtitle panel (bottom fixed) -------------------------------- */
.pixie-narrator__subtitle {
  position: fixed;
  inset-inline: 0.75rem;
  bottom: 6rem;
  z-index: 30;
  pointer-events: none;
}
@media (min-width: 640px) {
  .pixie-narrator__subtitle { bottom: 7rem; }
}
.pixie-narrator__subtitle-inner {
  max-width: 42rem;
  margin: 0 auto;
  pointer-events: auto;
  border-radius: 1rem;
  padding: 0.7rem 1rem;
  background: rgba(255,253,246,0.94);
  border: 1px solid rgba(28,28,46,0.08);
  box-shadow: 0 8px 20px rgba(28,28,46,0.10);
  backdrop-filter: blur(8px);
}
.pixie-narrator__subtitle-text {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  color: #1c1c2e;
  text-align: center;
}
@media (min-width: 640px) {
  .pixie-narrator__subtitle-text { font-size: 1.1rem; text-align: start; }
}

/* ---------- Ghost (minimized Pixie) -------------------------------------- */
/* A mini, sleeping Pixie — same rounded-square screen, scanlines, antenna,
 * and glow as the full mascot, just at ~half scale. Reads as "Pixie, dozing"
 * rather than a generic icon. Clicking restores the full mascot. */
.pixie-ghost {
  position: relative;
  width: 40px;
  height: 40px;
  padding: 0;
  flex-shrink: 0;
  border: none;
  background: transparent;
  border-radius: 22%;
  filter: drop-shadow(0 4px 8px rgba(13, 15, 36, 0.25));
  cursor: pointer;
  transition: transform 200ms cubic-bezier(.4, 0, .2, 1), filter 240ms ease;
}
.pixie-ghost:hover {
  transform: translateY(-1px) scale(1.06);
  filter: drop-shadow(0 6px 12px rgba(13, 15, 36, 0.35));
}
.pixie-ghost:active { transform: translateY(0) scale(1.02); }
.pixie-ghost:focus-visible { outline: none; }
.pixie-ghost:focus-visible .pixie-ghost__screen {
  box-shadow:
    inset 0 0 0 2px #2a2f5a,
    inset 0 0 0 4px #0a0b1f,
    0 0 0 3px rgba(185, 228, 255, 0.55),
    0 0 14px rgba(120, 180, 255, 0.35);
}

.pixie-ghost__antenna {
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 8px;
  border-radius: 3px 3px 1.5px 1.5px;
  background: linear-gradient(to top, #2a2f5a 0 60%, #ff6f9e 60% 100%);
  box-shadow: 0 0 5px rgba(255, 111, 158, 0.5);
  opacity: 0.85;
  z-index: 1;
}

.pixie-ghost__screen {
  position: absolute;
  inset: 0;
  border-radius: 22%;
  background: radial-gradient(ellipse at 50% 25%, #1f2547 0%, #0d0f24 70%, #06081a 100%);
  box-shadow:
    inset 0 0 0 2px #2a2f5a,
    inset 0 0 0 4px #0a0b1f,
    inset 0 3px 8px rgba(255,255,255,0.05),
    inset 0 -5px 10px rgba(0,0,0,0.5),
    0 0 12px rgba(120, 180, 255, 0.22);
  overflow: hidden;
  transition: box-shadow 240ms ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pixie-ghost__screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.05) 0 1px,
    transparent 1px 3px
  );
  pointer-events: none;
  opacity: 0.55;
  mix-blend-mode: screen;
}
.pixie-ghost__screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.45) 100%);
  pointer-events: none;
}
.pixie-ghost:hover .pixie-ghost__screen {
  box-shadow:
    inset 0 0 0 2px #2a2f5a,
    inset 0 0 0 4px #0a0b1f,
    inset 0 3px 8px rgba(255,255,255,0.06),
    inset 0 -5px 10px rgba(0,0,0,0.5),
    0 0 16px rgba(179, 93, 255, 0.45);
}

.pixie-ghost__face {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 1;
}
.pixie-ghost__eye {
  fill: #b9e4ff;
  filter: drop-shadow(0 0 3px rgba(180, 220, 255, 0.65));
}
.pixie-ghost__mouth {
  fill: none;
  stroke: #b9e4ff;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 3px rgba(180, 220, 255, 0.55));
  opacity: 0.85;
}
.pixie-ghost:hover .pixie-ghost__antenna {
  animation: pixie-antenna-pulse 0.9s ease-in-out infinite;
}

/* First-hide tooltip — same bubble idiom as Pixie's speech bubble. */
.pixie-ghost__hint {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-start: 0;
  padding: 0.4rem 0.6rem;
  background: #fffdf6;
  color: #1c1c2e;
  border: 2px solid #1c1c2e;
  border-radius: 0.7rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  box-shadow: 3px 3px 0 0 rgba(28, 28, 46, 0.85);
  white-space: nowrap;
  pointer-events: none;
  z-index: 3;
}
.pixie-ghost__hint::before {
  content: "";
  position: absolute;
  top: -8px;
  inset-inline-start: 10px;
  width: 12px;
  height: 12px;
  background: #fffdf6;
  border-top: 2px solid #1c1c2e;
  border-left: 2px solid #1c1c2e;
  transform: rotate(45deg);
}

/* ---------- Chat-drawer avatar (Pixie mini face) ------------------------- */
/* Slot-in replacement for the old emoji/img avatar in the chat header.
 * Same screen + antenna idiom as Pixie's mascot so the chat reads as the
 * same companion. Drops in at the 40×40 spot the old avatar occupied. */
.pixie-chat-avatar {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transform-origin: center;
  transition: transform 200ms cubic-bezier(.4, 0, .2, 1);
}
.pixie-chat-avatar:hover { transform: scale(1.05); }

/* Tiny Pixie bullet shown before each assistant message header — same
 * navy/cyan palette as the full avatar, sized like a status dot. */
.pixie-chat-bullet {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 30%;
  background: radial-gradient(ellipse at 50% 25%, #1f2547 0%, #0d0f24 80%);
  box-shadow:
    inset 0 0 0 1px rgba(185, 228, 255, 0.35),
    0 0 4px rgba(120, 180, 255, 0.4);
  position: relative;
}
.pixie-chat-bullet::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 25%;
  background:
    radial-gradient(circle at 30% 45%, #b9e4ff 0 1px, transparent 1.2px),
    radial-gradient(circle at 70% 45%, #b9e4ff 0 1px, transparent 1.2px);
  filter: drop-shadow(0 0 1px rgba(180, 220, 255, 0.8));
}

.pixie-chat-avatar__pixie {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
}
.pixie-chat-avatar__antenna {
  position: absolute;
  top: -3px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 7px;
  border-radius: 2.5px 2.5px 1px 1px;
  background: linear-gradient(to top, #2a2f5a 0 55%, #ff6f9e 55% 100%);
  box-shadow: 0 0 5px rgba(255, 111, 158, 0.55);
  z-index: 1;
}
.pixie-chat-avatar__screen {
  position: absolute;
  inset: 0;
  border-radius: 22%;
  background: radial-gradient(ellipse at 50% 25%, #1f2547 0%, #0d0f24 70%, #06081a 100%);
  box-shadow:
    inset 0 0 0 1.5px #2a2f5a,
    inset 0 0 0 3px #0a0b1f,
    inset 0 2px 6px rgba(255,255,255,0.05),
    inset 0 -3px 8px rgba(0,0,0,0.5),
    0 0 8px rgba(120, 180, 255, 0.25);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pixie-chat-avatar__screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.05) 0 1px,
    transparent 1px 3px
  );
  pointer-events: none;
  opacity: 0.55;
  mix-blend-mode: screen;
}
.pixie-chat-avatar__screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.45) 100%);
  pointer-events: none;
}
.pixie-chat-avatar__face {
  position: relative;
  width: 100%;
  height: 100%;
  fill: #b9e4ff;
  color: #b9e4ff;
  filter: drop-shadow(0 0 3px rgba(180, 220, 255, 0.55));
  z-index: 1;
}
.pixie-chat-avatar__emoji {
  font-size: 1.75rem;
  line-height: 1;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .pixie__shell,
  .pixie[data-state="happy"] .pixie__shell,
  .pixie[data-state="sad"] .pixie__shell { animation: none !important; }
  .pixie[data-state="speaking"] .pixie__antenna { animation: none !important; }
  .pixie__eye,
  .pixie__mouth,
  .pixie__face,
  .pixie__screen { transition-duration: 0ms !important; }

  .pixie__actions { transition-duration: 0ms !important; }
  .pixie__action,
  .pixie:hover .pixie__action,
  .pixie:focus-within .pixie__action,
  .pixie.is-actions-open .pixie__action {
    animation: none !important;
    opacity: 1;
    transform: none;
  }
  .pixie__action[data-tooltip]::after { transition: none !important; }

  .pixie-ghost { transition: none !important; }
  .pixie-ghost:hover { transform: none !important; }
}
