:root {
  color-scheme: dark;
  --text: #f6f0e8;
  --line: rgba(255, 255, 255, 0.16);
  --glass: rgba(10, 10, 10, 0.58);
  --accent: #7b3fc7;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #000;
  color: var(--text);
  font-family: Tahoma, Arial, sans-serif;
}

button {
  font: inherit;
}

.app,
.stage {
  position: relative;
  width: 100vw;
  height: 100svh;
  min-height: 100vh;
  overflow: hidden;
  background: #000;
}

#scene {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.voice-orb {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--glass);
  color: var(--text);
  backdrop-filter: blur(14px);
  cursor: pointer;
}

.mic-glyph {
  position: relative;
  width: 18px;
  height: 28px;
  border: 2px solid var(--text);
  border-radius: 12px;
}

.mic-glyph::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -11px;
  width: 22px;
  height: 14px;
  border: 2px solid var(--text);
  border-top: 0;
  border-radius: 0 0 14px 14px;
  transform: translateX(-50%);
}

.mic-glyph::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -18px;
  width: 18px;
  height: 2px;
  background: var(--text);
  transform: translateX(-50%);
}

.voice-orb.listening {
  border-color: rgba(160, 117, 255, 0.8);
  box-shadow: 0 0 0 6px rgba(123, 63, 199, 0.16), 0 0 28px rgba(123, 63, 199, 0.45);
}

.voice-orb.speaking {
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 32px rgba(255, 255, 255, 0.18);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@media (max-width: 560px) {
  .voice-orb {
    right: 50%;
    transform: translateX(50%);
    bottom: max(12px, env(safe-area-inset-bottom));
    width: 58px;
    height: 58px;
  }
}
