:root {
  color-scheme: dark;
  --bg: #0e1218;
  --panel: rgba(18, 22, 28, 0.92);
  --panel-strong: rgba(20, 26, 34, 0.96);
  --line: rgba(255, 255, 255, 0.1);
  --gold: #6b9fd4;
  --accent: #3d6a9e;
  --accent-bright: #5088bf;
  --red: #c45a6a;
  --green: #4ade80;
  --cream: #e8eaed;
  --muted: #8a939e;
  --text: #e8eaed;
}

* {
  box-sizing: border-box;
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #121820;
}

::-webkit-scrollbar-thumb {
  background: #2a3038;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #8a939e;
}


body {
  min-height: 100vh;
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--cream);
  background:
    radial-gradient(circle at top left, rgba(61, 106, 158, 0.18), transparent 28rem),
    radial-gradient(circle at bottom right, rgba(107, 159, 212, 0.1), transparent 26rem),
    linear-gradient(180deg, #0e1218 0%, #121820 55%, #0c1016 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  display: grid;
  place-items: center;
  width: min(100% - 32px, 1240px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 0;
}

.panel {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--panel);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px);
}

.auth-panel {
  max-width: 560px;
  padding: clamp(22px, 5vw, 42px);
}

.app-panel {
  padding: clamp(18px, 4vw, 34px);
}

.hidden {
  display: none;
}

.staff-mute-banner {
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid rgba(196, 90, 106, 0.55);
  border-radius: 18px;
  background: rgba(196, 90, 106, 0.16);
  color: #f0d4d8;
  font-weight: 800;
  text-align: center;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  color: #e8eaed;
  background: var(--accent);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-weight: 950;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 6px;
  font-size: clamp(2.2rem, 7vw, 4.8rem);
  line-height: 0.9;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

h2 {
  margin-bottom: 0;
  font-size: 1.1rem;
}

p {
  color: var(--muted);
  line-height: 1.55;
}

.code-form {
  display: grid;
  gap: 12px;
}

label,
.eyebrow,
.status-grid span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  color: var(--cream);
  background: rgba(0, 0, 0, 0.28);
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(107, 159, 212, 0.14);
}

.code-form input {
  padding: 16px 18px;
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 0.3em;
  text-align: center;
}

.code-form button,
.mute-button,
.small-button,
.mobile-ptt-button {
  border: 0;
  border-radius: 999px;
  font-weight: 950;
}

.code-form button {
  min-height: 54px;
  color: #e8eaed;
  background: linear-gradient(135deg, #2a4a6e, #3d6a9e);
}

.message {
  min-height: 24px;
  margin: 18px 0 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.player-identity {
  display: flex;
  gap: 16px;
  align-items: center;
  min-width: 0;
}

.skin-head {
  width: 42px;
  height: 42px;
  image-rendering: pixelated;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
}

.skin-head-staff {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--cream);
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  background:
    linear-gradient(135deg, rgba(107, 159, 212, 0.95), rgba(80, 136, 191, 0.75)),
    rgba(0, 0, 0, 0.28);
}

.skin-head-large.skin-head-staff,
img.skin-head-large.skin-head-staff {
  font-size: 1.35rem;
}

.skin-head-fallback {
  background:
    linear-gradient(135deg, rgba(107, 159, 212, 0.95), rgba(80, 136, 191, 0.75)),
    rgba(0, 0, 0, 0.28);
}

.skin-head-large {
  width: 62px;
  height: 62px;
  border-radius: 18px;
}

.topbar h1 {
  margin: 8px 0 4px;
}

.topbar p {
  margin-bottom: 0;
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.mute-button {
  min-width: 120px;
  min-height: 48px;
  color: var(--cream);
  background: var(--red);
}

.secondary-action {
  color: var(--gold);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.mute-button.is-muted {
  color: #e8eaed;
  background: var(--gold);
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin: 24px 0;
}

.status-grid article,
.settings,
.player-card {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 22px;
  background: rgba(0, 0, 0, 0.22);
}

.status-grid article {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.status-grid strong {
  font-size: 1.2rem;
}

.settings,
.control-card {
  display: grid;
  gap: 16px;
}

.settings {
  margin-bottom: 26px;
  padding: 18px;
}

.voice-section {
  margin-top: 22px;
}

.settings-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.settings-head span {
  color: var(--muted);
  font-size: 0.88rem;
}

.setting-row {
  display: grid;
  grid-template-columns: minmax(140px, 0.4fr) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.primary-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.control-card {
  align-content: start;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.18);
}

.setting-row input,
.setting-row select,
.setting-row textarea {
  min-height: 44px;
  padding: 0 14px;
}

.setting-row textarea {
  min-height: 84px;
  padding: 12px 14px;
  resize: vertical;
}

.voice-layout {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 16px;
  margin-top: 22px;
  min-height: 420px;
}

.channel-sidebar {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 22px;
  background: rgba(0, 0, 0, 0.22);
  min-height: 0;
}

.sidebar-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.sidebar-head h2 {
  margin: 0;
  font-size: 1.1rem;
}

.sidebar-head span {
  color: var(--muted);
  font-size: 0.82rem;
}

.channel-sidebar-list {
  display: grid;
  gap: 6px;
  align-content: start;
  overflow-y: auto;
  min-height: 0;
}

.sidebar-section-label {
  margin: 10px 0 4px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-channel-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.sidebar-channel-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-channel-item.is-active {
  border-color: rgba(107, 159, 212, 0.4);
  background: rgba(107, 159, 212, 0.12);
  color: var(--gold);
}

.sidebar-channel-item strong {
  font-size: 0.95rem;
}

.sidebar-channel-count {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.sidebar-channel-item.is-active .sidebar-channel-count {
  color: var(--gold);
}

.sidebar-group-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 4px 6px 10px;
}

.sidebar-creator {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 10px;
}

.channel-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 22px;
  background: rgba(0, 0, 0, 0.22);
  min-height: 0;
  max-height: min(680px, 72vh);
}

.channel-room-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 12px;
}

.channel-member-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.channel-member-scroll .player-list {
  align-content: start;
  grid-auto-rows: max-content;
}

.channel-member-scroll .player-card {
  width: 100%;
  align-self: start;
}

.sidebar-create-button {
  width: 100%;
}

.quick-controls {
  margin-top: 18px;
}

.quick-controls + .mobile-ptt-button {
  margin-top: 14px;
}

.quick-controls .control-card {
  max-width: 420px;
}

.settings-dialog {
  width: min(640px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 1px solid rgba(107, 159, 212, 0.3);
  border-radius: 22px;
  background: #141a22;
  color: var(--text);
  overflow: hidden;
}

.settings-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.settings-dialog-shell {
  display: grid;
  gap: 16px;
  max-height: calc(100vh - 32px);
  padding: 18px;
  overflow-y: auto;
}

.settings-dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.settings-dialog-head h2 {
  margin: 0 0 4px;
  font-size: 1.35rem;
}

.settings-dialog-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.settings-dialog-panel {
  margin: 0;
  padding: 0;
}

.settings-dialog-panel .settings-head h3 {
  margin: 0;
  font-size: 1rem;
}

.settings-dialog .primary-controls {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-dialog .setting-row {
  grid-template-columns: minmax(140px, 0.42fr) minmax(0, 1fr);
}

.group-editor-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 1px solid rgba(107, 159, 212, 0.3);
  border-radius: 22px;
  background: #141a22;
  color: var(--text);
  overflow: hidden;
}

.group-editor-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.group-editor-shell {
  display: grid;
  gap: 16px;
  max-height: calc(100vh - 32px);
  padding: 18px;
  overflow-y: auto;
}

.group-editor-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.group-editor-head h2 {
  margin: 0 0 4px;
  font-size: 1.35rem;
}

.group-editor-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.group-editor-dialog .setting-row {
  grid-template-columns: 1fr;
  gap: 8px;
}

.group-editor-dialog .group-form {
  margin-top: 0;
}

.channel-room-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.channel-room-head h2 {
  margin: 0 0 4px;
  font-size: 1.35rem;
}

.channel-room-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.channel-room-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.channel-room-actions span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.lobby-empty {
  display: grid;
  gap: 8px;
  place-content: center;
  flex: 1;
  min-height: 180px;
  padding: 24px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  text-align: center;
}

.channel-room-body.is-lobby .channel-member-scroll {
  display: none;
}

.lobby-empty.hidden {
  display: none;
}

.lobby-empty-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.channel-panel {
  display: grid;
  gap: 14px;
}

.channel-actions,
.online-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.group-creator {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.18);
}

.group-creator summary {
  cursor: pointer;
  color: var(--gold);
  font-weight: 950;
}

.group-form {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.compact-empty {
  width: 100%;
  padding: 10px;
  font-size: 0.85rem;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 4px;
}

.tab-button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  font-weight: 950;
}

.tab-button.is-active {
  color: #e8eaed;
  border-color: transparent;
  background: linear-gradient(135deg, #2a4a6e, #3d6a9e);
}

.tab-panel {
  display: none;
  gap: 16px;
}

.tab-panel.is-active {
  display: grid;
}

.range-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.range-control span {
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
  min-width: 48px;
  text-align: right;
}

.volume-slider {
  accent-color: var(--gold);
}

.player-volume input.volume-slider {
  width: 100%;
}

.small-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 42px;
  padding: 0 16px;
  color: var(--gold);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
}

.admin-button {
  color: #e8eaed;
  border-color: transparent;
  background: linear-gradient(135deg, #2a4a6e, #3d6a9e);
}

.danger-button {
  color: #f0d4d8;
  border-color: rgba(196, 90, 106, 0.55);
  background: rgba(196, 90, 106, 0.2);
}

.ptt-control {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.ptt-status {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.22);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ptt-status.is-pressed {
  color: #0c1016;
  border-color: transparent;
  background: var(--green);
}

.mobile-ptt-button {
  display: none;
  width: 100%;
  min-height: 64px;
  color: #e8eaed;
  background: linear-gradient(135deg, #2a4a6e, #3d6a9e);
  touch-action: none;
}

.mobile-ptt-button.is-pressed {
  background: var(--green);
}

.setting-toggle {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 44px;
  color: var(--cream);
  letter-spacing: 0;
  text-transform: none;
}

.setting-toggle input {
  width: auto;
}

.player-list {
  display: grid;
  gap: 10px;
  align-content: start;
  grid-auto-rows: max-content;
}

.player-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.player-card.is-speaking {
  border-color: rgba(74, 222, 128, 0.8);
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.14);
}

.player-card.has-volume {
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
}

.player-info {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.player-card strong {
  display: block;
}

.player-card span {
  color: var(--muted);
  font-size: 0.9rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.muted-tag,
.self-muted-tag {
  color: #f0d4d8;
  border-color: rgba(196, 90, 106, 0.55);
  background: rgba(196, 90, 106, 0.2);
}

.server-muted-tag {
  color: #c5cdd6;
  border-color: rgba(107, 159, 212, 0.55);
  background: rgba(107, 159, 212, 0.16);
}

.local-muted-tag {
  color: #e6ddff;
  border-color: rgba(167, 139, 250, 0.55);
  background: rgba(167, 139, 250, 0.16);
}

.deafened-tag {
  color: #c5cdd6;
  border-color: rgba(107, 159, 212, 0.45);
  background: rgba(107, 159, 212, 0.14);
}

.idle-tag {
  color: var(--muted);
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
}

.player-volume {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.player-volume input {
  min-height: 28px;
  min-width: 0;
  width: 100%;
  padding: 0;
}

.player-volume-value {
  min-width: 40px;
  text-align: right;
}

.player-mute-button {
  grid-column: 1 / -1;
  justify-self: end;
  min-height: 34px;
  padding: 0 12px;
}

.meter {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.meter div {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red), var(--gold), var(--green));
  transition: width 120ms linear;
}

.empty {
  margin: 0;
  padding: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  text-align: center;
}

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 22px;
  background: rgba(0, 0, 0, 0.22);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.admin-table th,
.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  vertical-align: top;
  white-space: pre-line;
}

.admin-table th {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.admin-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.admin-channel-select {
  min-width: 160px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
}


.connection-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
  margin-top: 14px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.18);
  font-size: 0.86rem;
}

.connection-bar em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-right: 6px;
}

.connection-bar-volume {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.connection-bar-volume label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.volume-slider-compact {
  width: 110px;
  min-height: auto;
}

.room-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.room-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.2);
  color: var(--muted);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
}

.room-tab.is-active {
  color: var(--gold);
  border-color: rgba(107, 159, 212, 0.3);
  background: rgba(61, 106, 158, 0.2);
}

.room-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
}

.room-panel {
  display: none;
  flex: 1;
  min-height: 0;
}

.room-panel.is-active {
  display: flex;
  flex-direction: column;
}

.lobby-help-list {
  margin: 0.75rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.9rem;
}

.lobby-help-list li + li {
  margin-top: 0.35rem;
}

.nearby-meta {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.channel-room-body.is-lobby .room-tabs,
.channel-room-body.is-lobby .room-panel {
  display: none;
}


@media (max-width: 720px) {
  .topbar,
  .settings-head {
    display: grid;
  }

  .setting-row,
  .primary-controls,
  .settings-dialog .primary-controls,
  .voice-layout,
  .player-card {
    grid-template-columns: 1fr;
  }

  .connection-bar-volume {
    width: 100%;
    margin-left: 0;
  }

  .voice-layout {
    grid-template-columns: 1fr;
  }

  .channel-sidebar {
    max-height: 280px;
  }

  .settings-dialog .setting-row {
    grid-template-columns: 1fr;
  }

  .player-card.has-volume {
    grid-template-columns: 1fr;
  }

  .top-actions {
    justify-content: stretch;
  }

  .mute-button,
  .top-actions .small-button {
    width: 100%;
  }

  .mobile-ptt-button {
    display: block;
  }

}


.auth-tabs {
  display: flex;
  gap: 0.65rem;
  margin: 1rem 0;
}

.auth-tab {
  min-height: 38px;
  padding: 0 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.22);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.auth-tab.is-active {
  color: var(--gold);
  border-color: rgba(107, 159, 212, 0.28);
  background: rgba(61, 106, 158, 0.2);
}

.auth-panel-body.hidden {
  display: none;
}

.section-copy {
  margin: 0 0 1rem;
  color: var(--muted);
  line-height: 1.6;
}

.global-roster-list {
  margin-bottom: 0.5rem;
}

.sidebar-channel-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-channel-block.is-your-channel .sidebar-channel-item {
  border-color: rgba(62, 207, 142, 0.35);
}

.sidebar-channel-block.is-active > .sidebar-channel-item {
  border-color: rgba(107, 159, 212, 0.4);
  background: rgba(107, 159, 212, 0.12);
  color: var(--gold);
}

.sidebar-cluster-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.14);
}

.sidebar-cluster-block.is-your-cluster {
  border-color: rgba(62, 207, 142, 0.35);
}

.sidebar-cluster-block.is-active {
  border-color: rgba(107, 159, 212, 0.4);
  background: rgba(107, 159, 212, 0.1);
}

.sidebar-cluster-members {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  width: 100%;
}

.cluster-member-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--cream);
  font-size: 0.78rem;
}

.cluster-member-chip.is-speaking {
  background: rgba(62, 207, 142, 0.18);
}

.cluster-member-chip.is-muted,
.cluster-member-chip.is-deafened {
  opacity: 0.72;
}

.cluster-member-chip.is-idle {
  opacity: 0.55;
}

.cluster-admin-list {
  display: grid;
  gap: 0.85rem;
}

.cluster-admin-card {
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.18);
}

.cluster-admin-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.cluster-admin-head span {
  color: var(--muted);
  font-size: 0.85rem;
}

.admin-accounts-list {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.admin-account-row {
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--muted);
}

.admin-create-form {
  margin-top: 0.5rem;
}


.proximity-cluster-room {
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.proximity-cluster-room:last-child {
  border-bottom: 0;
}

.proximity-cluster-room-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.proximity-cluster-room-head span {
  color: var(--muted);
  font-size: 0.82rem;
}


.sidebar-empty-note {
  margin: 0 0 0.75rem;
  padding: 0.75rem 0.9rem;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.sidebar-cluster-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.sidebar-cluster-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  min-width: 0;
}

.sidebar-cluster-card-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
}

.sidebar-cluster-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 6px;
  padding: 0;
}

.sidebar-cluster-actions .small-button {
  width: 100%;
  justify-content: center;
  min-height: 34px;
  padding-inline: 8px;
  font-size: 0.78rem;
}
