:root {
  color-scheme: light dark;
  --bg: #fbfbfa;
  --fg: #1a1a18;
  --muted: #6b6b66;
  --line: #e3e3df;
  --accent: #2d6a4f;
  --accent-live: #b23a2e;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14140f;
    --fg: #f0efe8;
    --muted: #9a9a92;
    --line: #2c2c26;
    --accent: #52b788;
    --accent-live: #e5675a;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

main {
  width: min(32rem, 100% - 2rem);
  padding: 2rem 0;
  text-align: center;
}

h1 {
  margin: 0;
  font-size: 2rem;
  letter-spacing: -0.02em;
}

.sub {
  margin: 0.25rem 0 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.talk {
  width: 11rem;
  height: 11rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--accent);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.talk:hover {
  transform: scale(1.02);
}

.talk:disabled {
  opacity: 0.5;
  cursor: progress;
}

.talk.live {
  background: var(--accent-live);
}

.state {
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.warning {
  margin-top: 1.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  text-align: left;
  font-size: 0.85rem;
  line-height: 1.45;
}

.log {
  margin-top: 1.5rem;
  padding: 0.75rem;
  max-height: 14rem;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: transparent;
  color: var(--muted);
  text-align: left;
  font: 12px/1.6 ui-monospace, "Cascadia Code", Consolas, monospace;
  white-space: pre-wrap;
}
