:root {
  color-scheme: dark;
  --bg: #0b1220;
  --card: #121a2b;
  --line: #243047;
  --text: #e8eefc;
  --muted: #9aa8c7;
  --accent: #3b82f6;
  --accent-2: #22c55e;
  --danger: #ef4444;
  --warn: #f59e0b;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: radial-gradient(1200px 600px at 20% -10%, #1e3a8a55, transparent),
    radial-gradient(900px 500px at 100% 0%, #0ea5e933, transparent), var(--bg);
  color: var(--text);
}

body {
  display: flex;
  justify-content: center;
  padding: 24px 16px 48px;
}

.shell {
  width: min(480px, 100%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(145deg, #60a5fa, #2563eb);
  box-shadow: 0 8px 24px #2563eb55;
}

.brand h1 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.brand p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.card {
  background: color-mix(in srgb, var(--card) 92%, black);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 16px 40px #00000055;
}

.gate {
  text-align: center;
  padding: 28px 12px;
}

.gate h2 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.gate p {
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.45;
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  color: white;
  background: var(--accent);
  width: 100%;
  transition: transform 0.12s ease, filter 0.12s ease, background 0.12s ease;
}

.btn:hover {
  filter: brightness(1.08);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-join {
  background: linear-gradient(180deg, #60a5fa, #2563eb);
  font-size: 1.05rem;
  padding: 16px;
}

.btn-mute {
  background: #1f2937;
  border: 1px solid var(--line);
}

.btn-mute.is-muted {
  background: #7f1d1d;
  border-color: #991b1b;
}

.btn-leave {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
}

.row {
  display: grid;
  gap: 10px;
}

.hidden {
  display: none !important;
}

.status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 0.9rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 6px 10px;
  background: #0f172a;
  border: 1px solid var(--line);
  color: var(--muted);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--warn);
}

.dot.on {
  background: var(--accent-2);
  box-shadow: 0 0 0 4px #22c55e33;
}

.dot.off {
  background: var(--danger);
}

.meter {
  height: 8px;
  border-radius: 999px;
  background: #0f172a;
  border: 1px solid var(--line);
  overflow: hidden;
  margin: 8px 0 16px;
}

.meter > span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #22c55e, #3b82f6);
  transition: width 0.08s linear;
}

.list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: #0f172a;
  border: 1px solid var(--line);
  font-size: 0.92rem;
}

.list li.speaking {
  border-color: #22c55e66;
  box-shadow: inset 0 0 0 1px #22c55e33;
}

.vol {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
}

.error {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #450a0a;
  border: 1px solid #7f1d1d;
  color: #fecaca;
  font-size: 0.9rem;
}

.hint {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}
