:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html,
body {
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
  background-color: #0b1120;
  color: #f8fafc;
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
}

.safe-top {
  padding-top: calc(0.75rem + var(--safe-top));
}

.safe-bottom {
  padding-bottom: calc(1rem + var(--safe-bottom));
}

.ptt-button {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  transition: transform 120ms ease, box-shadow 180ms ease;
}

.ptt-button.recording {
  transform: scale(1.06);
  box-shadow: 0 0 0 14px rgba(56, 189, 248, 0.22), 0 0 36px rgba(56, 189, 248, 0.55);
}

.ptt-button.thinking {
  animation: pulse-ring 1.4s ease-in-out infinite;
}

.orb {
  transition: transform 250ms ease, background 300ms ease, box-shadow 300ms ease;
}

.orb[data-state='listening'] {
  transform: scale(1.08);
  box-shadow: 0 0 42px rgba(56, 189, 248, 0.55);
}

.orb[data-state='thinking'] {
  animation: pulse-ring 1.2s ease-in-out infinite;
  box-shadow: 0 0 36px rgba(168, 85, 247, 0.5);
}

.orb[data-state='speaking'] {
  transform: scale(1.05);
  box-shadow: 0 0 44px rgba(52, 211, 153, 0.55);
}

@keyframes pulse-ring {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.95;
  }
  50% {
    transform: scale(1.07);
    opacity: 1;
  }
}

.chat-scroll::-webkit-scrollbar {
  width: 4px;
}

.chat-scroll::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.28);
  border-radius: 9999px;
}
