:root {
  --bg: #0f1115; --card: #1a1d24; --fg: #e8eaed; --muted: #8b90a0;
  --accent: #3b82f6; --ok: #22c55e; --busy: #f59e0b; --danger: #ef4444;
  --line: #2a2e38;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--fg);
  font: 16px/1.4 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  display: flex; justify-content: center;
  padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom);
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
#app { width: 100%; max-width: 460px; display: flex; flex-direction: column; gap: 16px; padding-top: 20px; }
header { display: flex; align-items: center; justify-content: space-between; }
h1 { font-size: 22px; margin: 0; letter-spacing: .5px; }
.tag { font-size: 11px; background: var(--accent); color: #fff; padding: 2px 6px; border-radius: 6px; vertical-align: middle; }
.status { font-size: 13px; padding: 4px 10px; border-radius: 999px; }
.status.off { background: #33373f; color: var(--muted); }
.status.on { background: rgba(34,197,94,.15); color: var(--ok); }
.status.err { background: rgba(239,68,68,.15); color: var(--danger); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.hidden { display: none !important; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
input { background: #0f1115; border: 1px solid var(--line); color: var(--fg); border-radius: 10px; padding: 12px; font-size: 16px; }
button { cursor: pointer; border: none; border-radius: 12px; font-size: 16px; font-weight: 600; padding: 14px; color: #fff; background: var(--accent); }
button:active { filter: brightness(.92); }

.talking { text-align: center; font-size: 15px; color: var(--muted); min-height: 22px; }
.talking.active { color: var(--ok); font-weight: 600; }
.talking.me { color: var(--accent); font-weight: 700; }

.ptt {
  aspect-ratio: 1 / 1; width: 100%; max-width: 260px; margin: 6px auto;
  border-radius: 50%; font-size: 22px; line-height: 1.2; text-transform: uppercase;
  background: radial-gradient(circle at 50% 35%, #2b64c9, #1e40af);
  box-shadow: 0 10px 30px rgba(30,64,175,.35), inset 0 2px 0 rgba(255,255,255,.15);
  transition: transform .06s ease, box-shadow .06s ease;
}
.ptt.talking-now { background: radial-gradient(circle at 50% 35%, #26d366, #15a34a); transform: scale(.97); box-shadow: 0 6px 18px rgba(34,197,94,.45); }
.ptt.busy { background: #3a3f4a; box-shadow: none; color: var(--muted); }
.ptt:disabled { cursor: not-allowed; }

.roster { border-top: 1px solid var(--line); padding-top: 12px; }
.roster-title { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
#members { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
#members li { background: #0f1115; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 14px; }
#members li.talking { border-color: var(--ok); color: var(--ok); }

.leave { background: transparent; color: var(--danger); border: 1px solid var(--line); font-weight: 500; }

.err-msg { color: var(--danger); font-size: 13px; min-height: 16px; }
.who { font-size: 13px; color: var(--muted); }
select { background: #0f1115; border: 1px solid var(--line); color: var(--fg); border-radius: 10px; padding: 12px; font-size: 16px; }
