* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: #0b0b0f; color: #f2f2f5;
  font-family: -apple-system, system-ui, "Segoe UI", Roboto, sans-serif; }
#app { display: flex; flex-direction: column; height: 100dvh; }

#stage { position: relative; flex: 1; overflow: hidden; background: #000; }
#cam { width: 100%; height: 100%; object-fit: cover; display: block; }

#status { position: absolute; top: calc(env(safe-area-inset-top) + 10px); left: 12px;
  display: flex; align-items: center; gap: 8px; padding: 6px 12px;
  background: rgba(0,0,0,.55); border-radius: 999px; font-size: 14px; backdrop-filter: blur(6px); }
#dot { width: 10px; height: 10px; border-radius: 50%; background: #888; transition: background .2s; }
#dot.idle { background: #5b6; }
#dot.listening { background: #3af; animation: pulse 1s infinite; }
#dot.thinking { background: #fb3; animation: pulse 1s infinite; }
#dot.speaking { background: #c5f; animation: pulse .6s infinite; }
#dot.err { background: #f55; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

#answer { position: absolute; left: 12px; right: 12px;
  bottom: calc(env(safe-area-inset-bottom) + 12px);
  max-height: 40%; overflow-y: auto; padding: 14px 16px; font-size: 18px; line-height: 1.4;
  background: rgba(0,0,0,.6); border-radius: 16px; backdrop-filter: blur(8px);
  white-space: pre-wrap; }
#answer:empty { display: none; }

#controls { padding: 16px 16px calc(env(safe-area-inset-bottom) + 16px);
  display: flex; flex-direction: column; gap: 10px; background: #0b0b0f; }
.btn { border: 0; border-radius: 14px; padding: 18px; font-size: 18px; font-weight: 600;
  color: #fff; background: #2b2b36; cursor: pointer; user-select: none; }
.btn:active { transform: scale(.99); }
.btn.talk { background: #2563eb; }
.btn.talk.recording { background: #dc2626; }
