:root {
  --bg: #0a0f1a;
  --panel: #111a2b;
  --panel-2: #0e1727;
  --line: #1f2e47;
  --text: #d9e8ff;
  --muted: #88a3c9;
  --accent: #2f7ddf;
  --success: #22b07d;
  --danger: #d85252;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 20%, rgba(26, 79, 155, 0.32), transparent 35%),
    radial-gradient(circle at 80% 80%, rgba(23, 52, 114, 0.25), transparent 35%),
    linear-gradient(180deg, #060b14 0%, #0a1322 60%, #09101d 100%);
  color: var(--text);
  font-family: "Trebuchet MS", "Verdana", sans-serif;
}

button,
input {
  font: inherit;
}

.layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 64px 300px 1fr 320px;
}

.rail {
  border-right: 1px solid var(--line);
  background: #090f1b;
  display: grid;
  grid-auto-rows: min-content;
  gap: 10px;
  padding: 14px 10px;
  justify-items: center;
  position: relative;
  z-index: 5;
}

.rail-logo,
.rail-item {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

.rail-logo {
  border: none;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(150deg, #4894ff, #124795);
}

.rail-item {
  background: #1a2940;
  border: 1px solid #2a3f63;
  color: #d8e7ff;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.rail-item.active {
  box-shadow: 0 0 0 2px rgba(80, 140, 230, 0.5);
}

.left-panel,
.right-panel {
  background: var(--panel-2);
  border-right: 1px solid var(--line);
  padding: 14px;
}

.left-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: visible;
  padding-bottom: 198px;
}

.right-panel {
  border-right: none;
  border-left: 1px solid var(--line);
  overflow: auto;
}

.panel-head h1 {
  margin: 0;
  font-size: 1.2rem;
}

.panel-head p {
  margin: 4px 0 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.channel-block {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(16, 25, 41, 0.92);
  padding: 10px;
}

.channel-block h2 {
  margin: 0 0 8px 0;
  font-size: 0.96rem;
}

.channel-name {
  margin: 0 0 10px 0;
  color: #8fb7f1;
}

.voice-actions,
.friends-add {
  display: grid;
  gap: 8px;
}

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

.voice-channel-btn {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(12, 24, 42, 0.95);
  color: #79aef9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  cursor: pointer;
}

.voice-channel-btn.active {
  border-color: #3c72c4;
  background: rgba(22, 45, 78, 0.95);
}

.voice-cap {
  border: 1px solid #334f78;
  border-radius: 999px;
  font-size: 0.76rem;
  padding: 2px 7px;
  color: #d5e6ff;
  background: rgba(7, 14, 25, 0.9);
}

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

.voice-member-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 18, 31, 0.95);
  padding: 7px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.92rem;
}

.voice-live-badge {
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  background: #d93a3a;
}

.voice-dock {
  position: absolute;
  left: -52px;
  right: 14px;
  bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(9, 17, 30, 0.98);
  padding: 10px;
  z-index: 35;
  box-shadow: 0 12px 24px rgba(2, 7, 15, 0.45);
}

.voice-dock-state {
  margin: 0;
  color: #7df2ca;
  font-weight: 700;
}

.voice-dock-actions {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.voice-dock-actions button {
  min-height: 40px;
  font-size: 1.15rem;
  padding: 8px;
}

#leave-dock-btn {
  background: var(--danger);
}

.voice-dock-user {
  margin-top: 10px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-open-btn {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  border-radius: 8px;
}

.profile-open-btn:hover {
  background: rgba(31, 46, 71, 0.35);
}

.voice-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(145deg, #3f8eff, #1f4f95);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #fff;
}

.has-image {
  background-size: cover !important;
  background-position: center !important;
  color: transparent;
}

.voice-user-name {
  margin: 0;
  font-weight: 700;
}

.voice-user-sub {
  margin: 2px 0 0 0;
  color: #78f0c1;
  font-size: 0.85rem;
}

.profile-overlay {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 84px;
  z-index: 80;
  pointer-events: none;
}

.profile-overlay[hidden] {
  display: none;
}

.profile-modal {
  width: 100%;
  border: 1px solid #2b3954;
  border-radius: 14px;
  background: linear-gradient(180deg, #434651 0%, #3b3e49 36%, #373a45 100%);
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.55);
  overflow: auto;
  max-height: calc(100vh - 130px);
  pointer-events: auto;
  position: relative;
  z-index: 81;
}

.profile-banner {
  height: 96px;
  background: #07090f;
}

.profile-header {
  margin-top: -40px;
  padding: 0 14px;
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.profile-quick-row {
  margin: 10px 14px 0 14px;
}

.profile-quick-status-btn {
  width: 100%;
  text-align: left;
  border: 1px solid #4b5163;
  background: rgba(62, 67, 82, 0.95);
  color: #d6deee;
  border-radius: 999px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.profile-plus {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #616776;
  font-size: 0.74rem;
}

.profile-avatar {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: 4px solid #2a2e39;
  background: linear-gradient(145deg, #4ca8ff, #2f5fd2);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 2rem;
}

.profile-name {
  margin: 0;
  font-size: 1.7rem;
  line-height: 1.1;
}

.profile-status {
  margin: 2px 0 0 0;
  color: #ccd9ef;
}

.profile-body {
  margin: 12px 14px 0 14px;
  border: 1px solid #4a4f5f;
  border-radius: 10px;
  background: rgba(34, 38, 47, 0.78);
  padding: 11px;
}

.profile-label {
  margin: 0;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9aa6be;
}

.profile-bio {
  margin: 8px 0 0 0;
}

.profile-live-card {
  margin: 12px 14px 0 14px;
  border: 1px solid #4a4f5f;
  border-radius: 10px;
  background: rgba(31, 35, 44, 0.85);
  padding: 10px;
}

.profile-live-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 700;
}

.profile-live-room {
  margin: 6px 0 10px 0;
  color: #d2d9e8;
  font-size: 0.9rem;
}

.profile-live-preview {
  margin-top: 8px;
  border-radius: 8px;
  min-height: 92px;
  border: 1px solid #4a536c;
  background:
    radial-gradient(circle at 20% 20%, rgba(128, 161, 255, 0.3), transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(92, 101, 174, 0.3), transparent 45%),
    linear-gradient(135deg, #49526b 0%, #65657d 42%, #4e566f 100%);
}

.profile-menu {
  margin: 12px 14px 0 14px;
  border: 1px solid #4a4f5f;
  border-radius: 10px;
  background: rgba(31, 35, 44, 0.85);
  padding: 6px;
  display: grid;
  gap: 4px;
}

.profile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  border: none;
  background: transparent;
  color: #e6edf9;
  border-radius: 8px;
  min-height: 40px;
  padding: 8px 10px;
}

.profile-menu-btn:hover {
  background: rgba(84, 95, 124, 0.25);
}

.profile-chevron {
  color: #bbc8df;
  font-size: 1.15rem;
  line-height: 1;
}

.profile-badge-new {
  border-radius: 999px;
  background: #e34b5c;
  color: #fff;
  font-weight: 800;
  font-size: 0.7rem;
  padding: 2px 8px;
}

.account-settings-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 5, 12, 0.76);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 120;
}

.account-settings-overlay[hidden] {
  display: none;
}

.account-settings-modal {
  width: min(1120px, 96vw);
  height: min(760px, 92vh);
  border: 1px solid #434756;
  border-radius: 14px;
  background: #353844;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  display: grid;
  grid-template-columns: 260px 1fr;
}

.account-settings-sidebar {
  background: #2a2c36;
  border-right: 1px solid #3e4252;
  padding: 14px;
  display: grid;
  align-content: start;
  gap: 10px;
  overflow: auto;
}

.account-settings-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.account-settings-user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(145deg, #3f8eff, #1f4f95);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #fff;
}

.account-settings-user-name {
  margin: 0;
  font-weight: 700;
  font-size: 1.05rem;
}

.account-settings-user-sub {
  margin: 2px 0 0 0;
  color: #afb7ca;
  font-size: 0.86rem;
}

.account-settings-sidebar input {
  border: 1px solid #44485a;
  background: rgba(44, 47, 58, 0.95);
}

.account-settings-group {
  margin: 6px 2px 0 2px;
  color: #9ba6bf;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.account-settings-nav {
  text-align: left;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #cdd6ea;
  padding: 10px 12px;
}

.account-settings-nav:hover {
  background: rgba(98, 108, 136, 0.25);
}

.account-settings-nav.active {
  background: rgba(109, 121, 155, 0.35);
  color: #fff;
}

.account-settings-main {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
}

.account-settings-header {
  border-bottom: 1px solid #454958;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.account-settings-header h2 {
  margin: 0;
  font-size: 1.08rem;
}

.account-settings-close-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #53576a;
  background: rgba(61, 65, 77, 0.9);
  padding: 0;
}

.account-settings-body {
  overflow: auto;
  padding: 16px;
  display: grid;
  align-content: start;
  gap: 14px;
}

.account-settings-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.account-settings-tab {
  background: transparent;
  border: none;
  color: #b9c5de;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 8px 4px;
  min-width: 80px;
}

.account-settings-tab.active {
  color: #9fb8ff;
  border-bottom-color: #6f89e4;
}

.account-settings-profile-card {
  border: 1px solid #4a4f60;
  border-radius: 10px;
  background: rgba(45, 49, 60, 0.85);
  overflow: hidden;
}

.account-settings-banner {
  height: 94px;
  background: #080b12;
}

.account-settings-profile-head {
  margin-top: -30px;
  padding: 0 12px 12px 12px;
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.account-settings-avatar {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  border: 3px solid #353844;
  background: linear-gradient(145deg, #4ca8ff, #2f5fd2);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #fff;
}

.account-settings-display-name {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
}

.account-settings-status-preview {
  margin: 2px 0 0 0;
  color: #bdc9df;
}

.account-settings-form {
  border: 1px solid #4a4f60;
  border-radius: 10px;
  background: rgba(43, 47, 58, 0.86);
  padding: 12px;
  display: grid;
  gap: 8px;
}

.account-settings-form label {
  color: #cdd8ef;
  font-size: 0.9rem;
  margin-top: 2px;
}

.account-settings-form textarea {
  border-radius: 9px;
  padding: 10px 12px;
  border: 1px solid #2a4066;
  background: #0d1627;
  color: var(--text);
  resize: vertical;
}

.account-settings-actions {
  margin-top: 4px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.account-settings-actions button {
  min-width: 140px;
}

@media (max-width: 980px) {
  .account-settings-modal {
    grid-template-columns: 1fr;
    height: min(820px, 95vh);
  }

  .account-settings-sidebar {
    border-right: none;
    border-bottom: 1px solid #3e4252;
  }
}

.center-panel {
  background: rgba(7, 12, 22, 0.88);
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
}

.center-head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.center-top-bar {
  min-height: 52px;
  background: #05070c;
  border-bottom: 1px solid #181d2a;
}

.center-stage {
  padding: 16px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 12px;
  background: #000;
  overflow: auto;
}

.participant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 280px));
  gap: 10px;
  justify-content: center;
  width: min(1200px, 100%);
  margin: 0 auto;
}

.participant-grid:not(.stream-layout)[data-count="1"] {
  grid-template-columns: minmax(420px, 860px);
  width: min(900px, 100%);
}

.participant-grid:not(.stream-layout)[data-count="2"] {
  grid-template-columns: repeat(2, minmax(320px, 520px));
  width: min(1080px, 100%);
}

.participant-grid.stream-layout {
  width: min(1400px, 100%);
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  gap: 12px;
  align-content: start;
}

.participant-strip {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  width: 100%;
}

.participant-grid.stream-layout > .participant-card {
  width: min(100%, 1200px);
  justify-self: center;
  aspect-ratio: 16 / 9;
  max-height: 62vh;
}

.participant-grid.stream-layout > .participant-card .participant-media {
  background: #000;
}

.participant-grid.stream-layout > .participant-card .participant-media video {
  object-fit: contain;
  background: #000;
}

.participant-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(11, 18, 30, 0.96);
  overflow: hidden;
  min-height: 0;
  aspect-ratio: 16 / 10;
  display: grid;
  grid-template-rows: 1fr auto;
}

.participant-grid:not(.stream-layout)[data-count="1"] .participant-card {
  aspect-ratio: 16 / 9;
}

.participant-grid:not(.stream-layout)[data-count="1"] .participant-avatar {
  width: 116px;
  height: 116px;
  font-size: 2.5rem;
}

.participant-card.is-focused {
  box-shadow: 0 0 0 2px rgba(64, 232, 155, 0.7);
}

.participant-card.empty {
  min-height: 120px;
  aspect-ratio: auto;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 700;
}

.participant-card.compact {
  aspect-ratio: 16 / 9;
  width: clamp(180px, 16vw, 230px);
  flex: 0 0 auto;
}

.participant-card.compact .participant-avatar {
  width: 64px;
  height: 64px;
  font-size: 1.4rem;
}

.participant-card.compact .participant-footer {
  padding: 7px 9px;
  font-size: 0.9rem;
}

.participant-card.compact .participant-live {
  top: 7px;
  right: 7px;
  font-size: 0.62rem;
  padding: 2px 7px;
}

.participant-card.stream-selectable {
  cursor: pointer;
}

.participant-card.stream-focused-clickable {
  cursor: zoom-out;
}

.participant-card.compact.active-peer {
  box-shadow: 0 0 0 2px rgba(64, 232, 155, 0.65);
}

.participant-media {
  position: relative;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 35%, rgba(68, 108, 179, 0.24), rgba(5, 10, 17, 0.95));
}

.participant-media video {
  width: 100%;
  height: 100%;
  max-height: none;
  border: 0;
  border-radius: 0;
  object-fit: cover;
  background: #060b13;
}

.participant-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-weight: 800;
  border: 3px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 30px rgba(5, 10, 20, 0.45);
}

.participant-live {
  position: absolute;
  top: 10px;
  right: 10px;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.7rem;
  font-weight: 800;
  color: #fff;
  background: #d93a3a;
}

.participant-watch-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid #4f6080;
  background: rgba(44, 54, 74, 0.9);
  min-width: 150px;
}

.participant-footer {
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  font-weight: 700;
  color: #edf4ff;
  background: rgba(6, 12, 22, 0.95);
}

.center-bottom-bar {
  min-height: 72px;
  background: #05070c;
  border-top: 1px solid #181d2a;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 10px 16px;
}

.center-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(48px, 56px));
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid #232b3b;
  border-radius: 12px;
  background: rgba(10, 14, 22, 0.95);
}

.center-controls button {
  min-height: 44px;
  font-size: 1.12rem;
  padding: 6px;
}

#center-leave-btn {
  background: var(--danger);
}

.fullscreen-fab {
  width: 48px;
  height: 48px;
  border: 1px solid #40577d;
  border-radius: 12px;
  background: rgba(12, 23, 40, 0.96);
  font-size: 1.25rem;
  padding: 0;
}

.stream-browser h3 {
  margin: 0 0 8px 0;
  color: #9ec3ff;
  font-size: 0.92rem;
}

.stream-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.stream-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(12, 20, 34, 0.95);
  min-height: 128px;
  padding: 10px;
  display: grid;
  align-content: space-between;
  gap: 8px;
}

.stream-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.92rem;
}

.stream-card-live {
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  background: #d93a3a;
}

.stream-card button {
  width: 100%;
  border: 1px solid #3e516f;
  background: rgba(42, 58, 84, 0.9);
}

#status {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(16, 24, 40, 0.85);
  padding: 10px 12px;
}

video {
  width: 100%;
  max-height: 72vh;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #03070e;
}

input,
button {
  border-radius: 9px;
  padding: 10px 12px;
}

input {
  border: 1px solid #2a4066;
  background: #0d1627;
  color: var(--text);
}

button {
  border: none;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#leave-btn,
.logout-btn {
  background: var(--danger);
}

#share-btn {
  background: #2860b8;
}

#deafen-btn {
  background: #5a3fb5;
}

.right-panel section {
  margin-bottom: 12px;
}

.right-panel h3 {
  margin: 0 0 8px 0;
  font-size: 0.9rem;
  color: #9ec3ff;
}

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

.simple-list li {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 27, 44, 0.95);
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.user-presence-item {
  justify-content: flex-start !important;
  gap: 10px !important;
}

.user-presence-avatar-wrap {
  position: relative;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
}

.user-presence-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 1px solid #3e516f;
  background: #101826;
}

.user-presence-dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid rgba(17, 27, 44, 0.95);
}

.user-presence-dot.online {
  background: #2ecc71;
}

.user-presence-dot.offline {
  background: #7b8499;
}

.user-presence-name {
  font-weight: 700;
  color: #e4efff;
}

.inline-actions {
  display: flex;
  gap: 6px;
}

.inline-actions button {
  padding: 6px 9px;
}

.container {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 24px 16px;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(13, 22, 38, 0.96);
  box-shadow: 0 18px 45px rgba(4, 10, 20, 0.6);
  padding: 18px;
}

.card h1 {
  margin: 0;
}

.subtitle {
  margin-top: 6px;
  color: var(--muted);
}

.auth-grid {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.auth-links {
  margin-top: 12px;
  color: var(--muted);
}

.auth-links a {
  color: #9bc4ff;
}

@media (max-width: 1200px) {
  .layout {
    grid-template-columns: 64px 280px 1fr;
  }

  .right-panel {
    display: none;
  }
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .rail {
    display: none;
  }

  .left-panel,
  .right-panel {
    display: block;
    border: none;
    border-bottom: 1px solid var(--line);
  }

  .left-panel {
    padding-bottom: 14px;
    overflow: auto;
  }

  .voice-dock {
    position: static;
    left: auto;
    right: auto;
    bottom: auto;
    margin-top: 12px;
    box-shadow: none;
  }

  .center-panel {
    min-height: 60vh;
  }

  .center-controls {
    gap: 8px;
  }

  .center-bottom-bar {
    justify-content: space-between;
    padding: 10px 12px;
  }

  .participant-grid:not(.stream-layout)[data-count="2"] {
    grid-template-columns: minmax(220px, 1fr);
    width: 100%;
  }

  .participant-grid.stream-layout {
    grid-template-rows: auto auto;
  }

  .participant-strip {
    justify-content: flex-start;
  }

  .participant-card.compact {
    width: clamp(140px, 40vw, 180px);
  }
}
