:root {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 16px;
  background: #0b1020;
  color: #eef2ff;
}
button, input { font: inherit; }
.app { width: min(620px, 100%); }
.card {
  background: #111831;
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 18px 50px rgba(0,0,0,.38);
}
.hidden { display: none !important; }
h1 { margin: 0 0 6px; }
h2 { font-size: 1rem; margin: 0 0 10px; }
p { margin: 6px 0; }
label { display: grid; gap: 6px; margin: 16px 0; }
input {
  width: 100%;
  border: 1px solid #33406c;
  border-radius: 12px;
  padding: 13px 14px;
  background: #182142;
  color: #fff;
  outline: none;
}
input:focus { border-color: #6c84ff; }
.primary, .secondary {
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  cursor: pointer;
}
.primary {
  width: 100%;
  background: #4c6fff;
  color: white;
  font-weight: 700;
}
.secondary { background: #263154; color: white; }
header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.stats {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-radius: 12px;
  background: #182142;
}
.ptt-area {
  display: grid;
  place-items: center;
  padding: 24px 0 12px;
}
.ptt {
  width: min(260px, 72vw);
  aspect-ratio: 1;
  border: 0;
  border-radius: 50%;
  background: #263154;
  color: white;
  font-weight: 800;
  font-size: 1.15rem;
  padding: 28px;
  box-shadow: inset 0 0 0 6px #33406c, 0 18px 36px rgba(0,0,0,.4);
  touch-action: none;
  user-select: none;
}
.ptt.ready { background: #235b9b; box-shadow: inset 0 0 0 6px #4d8fd1, 0 18px 36px rgba(35,91,155,.35); }
.ptt.talking { background: #d9384f; box-shadow: inset 0 0 0 6px #ff6b7c, 0 18px 36px rgba(217,56,79,.45); transform: scale(.97); }
.ptt.receiving { background: #15965b; box-shadow: inset 0 0 0 6px #4fd695, 0 18px 36px rgba(21,150,91,.45); }
.ptt:disabled { opacity: .65; }
.status { min-height: 24px; color: #c7d0f5; }
.center { text-align: center; }
.users-panel {
  margin-top: 16px;
  background: #182142;
  border-radius: 14px;
  padding: 14px;
}
.user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid #2b365d;
}
.user-row:last-child { border-bottom: 0; }
.badge {
  padding: 4px 8px;
  border-radius: 999px;
  background: #263154;
  font-size: .8rem;
}
.badge.speaking { background: #d9384f; }
#remoteAudio { width: 1px; height: 1px; opacity: .001; position: fixed; pointer-events: none; }

.ptt { touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.ptt.pressing:not(:disabled) { transform: scale(.97); }
