:root {
  color-scheme: dark light;
  font-family: system-ui, -apple-system, sans-serif;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  background: #111;
  color: #eee;
}

main {
  width: min(92vw, 28rem);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

h1 {
  margin: 0;
  font-size: 1.4rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
}

input {
  padding: 0.7rem;
  font-size: 1rem;
  border-radius: 0.5rem;
  border: 1px solid #444;
  background: #1c1c1c;
  color: inherit;
}

button {
  padding: 0.9rem;
  font-size: 1.05rem;
  border: 0;
  border-radius: 0.5rem;
  background: #2d6cdf;
  color: #fff;
}

button:active {
  filter: brightness(0.9);
}

button:disabled {
  opacity: 0.5;
}

#talk[data-active="true"] {
  background: #c0392b;
}

.status {
  margin: 0;
  font-weight: 600;
}

.status[data-state="connected"] {
  color: #4caf50;
}

.status[data-state^="closed"],
.status[data-state="error"] {
  color: #e06c6c;
}

.meta {
  margin: 0;
  font-size: 0.85rem;
  color: #999;
}
