:root {
  color-scheme: light dark;
  --accent: #2f6fed;
  --bg: #0f1216;
  --panel: #171b21;
  --text: #e8ebf0;
  --muted: #8b93a1;
  --user-bubble: #2f6fed;
  --agent-bubble: #262c35;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  justify-content: center;
  padding: 2rem 1rem;
}

main {
  width: 100%;
  max-width: 640px;
}

header h1 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.badge {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--accent);
  color: white;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  vertical-align: middle;
  margin-left: 0.5rem;
}

.sub {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.call-panel {
  background: var(--panel);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  margin: 1.5rem 0;
}

.call-btn {
  font-size: 1rem;
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: white;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.call-btn:hover { opacity: 0.9; }
.call-btn.active { background: #e0393e; }
.call-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.status {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.transcript {
  background: var(--panel);
  border-radius: 16px;
  padding: 1rem 1.25rem;
  min-height: 240px;
  max-height: 420px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.hint { color: var(--muted); font-size: 0.85rem; }

.bubble {
  max-width: 80%;
  padding: 0.5rem 0.9rem;
  border-radius: 14px;
  font-size: 0.92rem;
  line-height: 1.4;
}

.bubble.user {
  align-self: flex-end;
  background: var(--user-bubble);
  color: white;
  border-bottom-right-radius: 4px;
}

.bubble.agent {
  align-self: flex-start;
  background: var(--agent-bubble);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.bubble.system {
  align-self: center;
  color: var(--muted);
  font-size: 0.78rem;
  font-style: italic;
}

footer {
  margin-top: 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
}
