:root {
  color-scheme: dark;
  --bg: #0f1115;
  --text: #f4f6f8;
  --muted: #b7c0cc;
  --button: #f4f6f8;
  --button-text: #0f1115;
  --danger: #ff8d8d;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  min-height: 100dvh;
}

main {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding:
    calc(24px + env(safe-area-inset-top))
    24px
    calc(24px + env(safe-area-inset-bottom));
  text-align: center;
}

#status {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 650;
  letter-spacing: 0.01em;
}

#talk {
  width: min(46vw, 180px);
  height: min(46vw, 180px);
  border: 0;
  border-radius: 50%;
  background: var(--button);
  color: var(--button-text);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}

#talk[aria-pressed="true"] {
  background: #d7dde6;
}

#talk:focus-visible {
  outline: 3px solid #8eb6ff;
  outline-offset: 6px;
}

#talk-v2,
#talk-v2-stream,
#talk-v2-stream-v2 {
  min-width: 10rem;
  padding: 12px 18px;
  border: 1px solid #3a4250;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 650;
  cursor: pointer;
  touch-action: manipulation;
}

.v2-caption {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

#talk-v2[aria-pressed="true"],
#talk-v2-stream[aria-pressed="true"],
#talk-v2-stream-v2[aria-pressed="true"] {
  border-color: var(--button);
  color: var(--text);
}

#talk-v2:focus-visible,
#talk-v2-stream:focus-visible,
#talk-v2-stream-v2:focus-visible {
  outline: 3px solid #8eb6ff;
  outline-offset: 4px;
}

#error {
  min-height: 1.4em;
  margin: 0;
  max-width: 28rem;
  color: var(--danger);
  font-size: 1rem;
}
