:root {
  color-scheme: dark;
  --page: #10141d;
  --surface: #181e29;
  --surface-raised: #202735;
  --surface-hover: #293242;
  --text: #f1f3f8;
  --muted: #9ba6b7;
  --quiet: #737f91;
  --border: #2c3544;
  --primary: #8c82ff;
  --primary-light: #b7b0ff;
  --green: #67d8a1;
  --red: #f06472;
  font-family: "Vazirmatn", Tahoma, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(ellipse at 12% 9%, rgb(140 130 255 / 10%), transparent 30rem),
    var(--page);
  line-height: 1.65;
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgb(183 176 255 / 75%);
  outline-offset: 3px;
}

button,
select {
  cursor: pointer;
}

.icon-library,
.is-hidden,
[hidden] {
  display: none !important;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.meeting-header {
  position: relative;
  z-index: 1;
  min-height: 76px;
  padding: 0 clamp(20px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid rgb(255 255 255 / 7%);
  background: rgb(16 20 29 / 84%);
  backdrop-filter: blur(18px);
}

.meeting-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  font-size: 1.12rem;
  font-weight: 850;
  text-decoration: none;
}

.meeting-brand > span:last-child {
  display: grid;
  line-height: 1.3;
}

.meeting-brand small {
  color: var(--muted);
  font-size: 0.69rem;
  font-weight: 550;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, #a59eff, #7167e5);
  box-shadow: 0 7px 22px rgb(124 113 255 / 23%);
  font-size: 1.18rem;
}

.header-actions,
.secure-label,
.eyebrow,
.preview-top,
.preview-status,
.preview-quality,
.preview-controls,
.privacy-note,
.card-footnote,
.room-meta,
.room-header-actions,
.connection-badge,
.panel-tabs,
.panel-tab,
.panel-section-heading,
.host-tool-button,
.tile-caption,
.call-toolbar,
.toolbar-info,
.call-controls,
.toolbar-side,
.call-control,
.control-icon,
.toolbar-panel-button,
.copy-button {
  display: flex;
  align-items: center;
}

.header-actions {
  gap: 23px;
}

.secure-label {
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
}

.secure-label svg {
  width: 17px;
  height: 17px;
  color: var(--green);
}

.language-switch {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: #d7d9e8;
  background: var(--surface);
  font-size: 0.78rem;
  font-weight: 700;
}

.language-switch:hover,
.icon-button:hover,
.toolbar-panel-button:hover {
  border-color: #514d7a;
  background: var(--surface-hover);
}

.lobby-page {
  width: min(1190px, calc(100% - 48px));
  min-height: calc(100vh - 76px);
  margin-inline: auto;
  padding: clamp(42px, 7vh, 82px) 0;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(335px, 0.82fr);
  align-items: center;
  gap: clamp(35px, 6vw, 83px);
}

.lobby-main {
  min-width: 0;
}

.lobby-intro {
  max-width: 690px;
  margin-bottom: 29px;
}

.eyebrow {
  gap: 9px;
  margin: 0 0 13px;
  color: var(--primary-light);
  font-size: 0.84rem;
  font-weight: 750;
}

.eyebrow svg {
  width: 17px;
  height: 17px;
}

.lobby-intro h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4vw, 3.35rem);
  font-weight: 850;
  letter-spacing: -0.035em;
  line-height: 1.38;
}

.lobby-intro > p:last-child {
  max-width: 590px;
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.9;
}

.preview-card,
.join-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: linear-gradient(145deg, rgb(29 36 50 / 97%), rgb(23 29 40 / 97%));
  box-shadow: 0 24px 80px rgb(0 0 0 / 19%);
}

.preview-card {
  padding: 17px;
}

.preview-top {
  min-height: 31px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.preview-status {
  gap: 8px;
  color: #cbd2de;
  font-size: 0.78rem;
  font-weight: 650;
}

.status-dot,
.live-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgb(103 216 161 / 11%);
}

.icon-button {
  width: 38px;
  height: 38px;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 11px;
  color: #d8deea;
  background: transparent;
  transition: background 160ms ease, border-color 160ms ease;
}

.icon-button svg {
  width: 18px;
  height: 18px;
}

.preview-stage {
  position: relative;
  min-height: 250px;
  aspect-ratio: 16 / 8.2;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 5%);
  border-radius: 15px;
  color: #a7b0c1;
  background:
    radial-gradient(ellipse at 50% 25%, rgb(102 98 184 / 23%), transparent 47%),
    linear-gradient(145deg, #202838, #141a25);
}

.preview-stage video,
.video-tile > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #191f2a;
  transform: scaleX(-1);
}

.preview-stage video,
.video-tile > video {
  display: none;
}

.preview-stage.has-video video,
.video-tile.has-video > video {
  display: block;
}

.preview-stage.has-video .video-placeholder,
.video-tile.has-video > .video-placeholder {
  display: none;
}

.video-placeholder {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 11px;
  color: #b3bdcc;
  font-size: 0.81rem;
}

.avatar {
  width: 38px;
  height: 38px;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #a28eff, #6658bd);
  font-weight: 800;
}

.avatar-large {
  width: 74px;
  height: 74px;
  font-size: 1.65rem;
  box-shadow: 0 0 0 9px rgb(164 150 255 / 9%);
}

.preview-name,
.preview-quality {
  position: absolute;
  z-index: 2;
  bottom: 12px;
  padding: 5px 10px;
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: 9px;
  color: #fff;
  background: rgb(12 16 24 / 65%);
  font-size: 0.73rem;
  backdrop-filter: blur(10px);
}

.preview-name {
  inset-inline-start: 12px;
}

.preview-quality {
  inset-inline-end: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #dbd8ff;
  font-weight: 750;
}

.preview-quality svg {
  width: 14px;
  height: 14px;
}

.preview-controls {
  min-height: 55px;
  justify-content: center;
  gap: 12px;
  padding-top: 13px;
}

.round-control {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid #394355;
  border-radius: 50%;
  color: #eef0f6;
  background: #293242;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.round-control:hover {
  transform: translateY(-1px);
  border-color: #5d6381;
}

.round-control[aria-pressed="false"] {
  color: #fff;
  background: #a74452;
  border-color: #a74452;
}

.round-control svg {
  width: 19px;
  height: 19px;
}

.control-hint {
  color: var(--quiet);
  font-size: 0.7rem;
}

.privacy-note {
  align-items: flex-start;
  gap: 9px;
  margin-top: 17px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.8;
}

.privacy-note svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin-top: 3px;
  color: var(--green);
}

.join-card {
  padding: clamp(24px, 3vw, 34px);
  border-color: #343749;
  background:
    radial-gradient(ellipse at 92% 0, rgb(140 130 255 / 12%), transparent 19rem),
    #191f2a;
}

.card-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  border: 1px solid rgb(183 176 255 / 20%);
  border-radius: 14px;
  color: var(--primary-light);
  background: rgb(140 130 255 / 12%);
}

.card-icon svg {
  width: 21px;
  height: 21px;
}

.card-kicker {
  margin: 0 0 4px;
  color: var(--primary-light);
  font-size: 0.76rem;
  font-weight: 750;
}

.join-card h2 {
  margin: 0 0 7px;
  font-size: 1.44rem;
  font-weight: 820;
}

.card-description {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.85;
}

.field-label {
  display: block;
  margin-bottom: 7px;
  color: #dce1ea;
  font-size: 0.78rem;
  font-weight: 700;
}

.text-field,
.chat-form input {
  width: 100%;
  min-height: 47px;
  padding: 10px 13px;
  border: 1px solid #384253;
  border-radius: 10px;
  outline: none;
  color: var(--text);
  background: #141a24;
  font-size: 0.82rem;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.text-field::placeholder,
.chat-form input::placeholder {
  color: #778194;
  opacity: 1;
}

.text-field:focus,
.chat-form input:focus {
  border-color: #8c82ff;
  box-shadow: 0 0 0 3px rgb(140 130 255 / 14%);
}

.primary-button,
.secondary-button {
  min-height: 48px;
  padding: 0 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 0.84rem;
  font-weight: 760;
  transition: filter 160ms ease, transform 160ms ease, background 160ms ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(110deg, #8075f3, #675dd0);
  box-shadow: 0 8px 20px rgb(106 94 220 / 22%);
}

.primary-button:hover,
.secondary-button:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.full-button {
  width: 100%;
}

#create-meeting {
  margin-top: 12px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--quiet);
  font-size: 0.72rem;
}

.divider::before,
.divider::after {
  height: 1px;
  flex: 1;
  content: "";
  background: #303848;
}

.join-row {
  display: flex;
  gap: 9px;
}

.room-code-field {
  min-width: 0;
  flex: 1;
  direction: ltr;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.room-code-field::placeholder {
  letter-spacing: 0;
}

.secondary-button {
  flex: 0 0 auto;
  color: #e4e0ff;
  border-color: #514b83;
  background: rgb(140 130 255 / 11%);
}

.card-footnote {
  gap: 7px;
  margin: 18px 0 0;
  color: var(--quiet);
  font-size: 0.69rem;
}

.card-footnote svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.meeting-page {
  width: min(1600px, 100%);
  min-height: calc(100vh - 76px);
  margin-inline: auto;
  padding: 19px clamp(16px, 3vw, 40px) 17px;
  display: flex;
  flex-direction: column;
}

.room-header {
  min-height: 57px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 17px;
}

.room-heading h1 {
  margin: 0 0 2px;
  font-size: 1.1rem;
  font-weight: 770;
}

.room-meta {
  gap: 9px;
  color: var(--muted);
  font-size: 0.72rem;
}

.room-meta strong {
  color: #e2e4ee;
  direction: ltr;
  font-size: 0.77rem;
  letter-spacing: 0.07em;
}

.meta-divider,
.toolbar-divider {
  width: 1px;
  height: 15px;
  background: #3a4352;
}

.live-dot {
  width: 7px;
  height: 7px;
  background: #f16f7d;
  box-shadow: 0 0 0 4px rgb(241 111 125 / 12%);
}

.copy-button {
  width: 27px;
  height: 27px;
  justify-content: center;
  border: 0;
  border-radius: 7px;
  color: #b9b2ff;
  background: transparent;
}

.copy-button svg {
  width: 15px;
  height: 15px;
}

.room-header-actions {
  gap: 12px;
}

.connection-badge {
  min-height: 31px;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  font-size: 0.69rem;
}

.connection-badge .status-dot {
  width: 7px;
  height: 7px;
}

.connection-badge.is-connected .status-dot {
  background: var(--green);
}

.meeting-layout {
  min-height: 0;
  flex: 1;
  display: flex;
  gap: 17px;
}

.stage-column {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.video-grid {
  min-height: 280px;
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(210px, 1fr);
  gap: 12px;
  align-content: center;
}

.video-grid[data-count="1"] {
  grid-template-columns: minmax(0, 1fr);
}

.video-grid[data-count="1"] .video-tile {
  width: min(100%, 980px);
  justify-self: center;
}

.video-grid[data-count="3"] .video-tile:first-child {
  grid-column: span 2;
}

.video-tile {
  position: relative;
  min-width: 0;
  min-height: 210px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid #303948;
  border-radius: 17px;
  background:
    radial-gradient(ellipse at 50% 34%, rgb(95 89 164 / 21%), transparent 55%),
    linear-gradient(145deg, #202837, #171d28);
}

.video-tile > video {
  z-index: 0;
  transform: none;
}

.video-tile.local-tile > video {
  transform: scaleX(-1);
}

.video-tile.has-video > video {
  z-index: 0;
}

.tile-caption {
  position: absolute;
  z-index: 2;
  inset-inline: 12px;
  bottom: 12px;
  justify-content: space-between;
  gap: 9px;
  pointer-events: none;
}

.tile-name,
.tile-state {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: 9px;
  color: #fff;
  background: rgb(12 16 24 / 68%);
  font-size: 0.75rem;
  backdrop-filter: blur(12px);
}

.tile-state {
  min-width: 30px;
  justify-content: center;
  padding: 4px 7px;
}

.tile-state svg {
  width: 15px;
  height: 15px;
}

.tile-state.is-muted {
  color: #ffabb2;
}

.host-chip {
  position: absolute;
  z-index: 2;
  top: 12px;
  inset-inline-start: 12px;
  padding: 3px 8px;
  border: 1px solid rgb(183 176 255 / 25%);
  border-radius: 7px;
  color: #e7e3ff;
  background: rgb(81 72 153 / 58%);
  font-size: 0.65rem;
}

.room-banner {
  min-height: 37px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding-top: 10px;
  color: var(--quiet);
  font-size: 0.7rem;
}

.room-banner svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: #8a84cb;
}

.side-panel {
  width: 340px;
  min-width: 290px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #181e29;
}

.side-panel.is-collapsed {
  display: none;
}

.panel-top {
  min-height: 57px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: 12px;
  border-bottom: 1px solid var(--border);
}

.panel-tabs {
  gap: 5px;
}

.panel-tab {
  min-height: 38px;
  gap: 7px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  font-size: 0.76rem;
}

.panel-tab svg {
  width: 17px;
  height: 17px;
}

.panel-tab.is-active {
  color: #e6e2ff;
  background: rgb(140 130 255 / 13%);
}

.count-pill {
  min-width: 19px;
  height: 19px;
  display: inline-grid;
  place-items: center;
  padding-inline: 5px;
  border-radius: 99px;
  color: #dad6ff;
  background: rgb(140 130 255 / 22%);
  font-size: 0.65rem;
  font-weight: 750;
}

.panel-close {
  width: 32px;
  height: 32px;
  color: var(--muted);
}

.panel-close svg {
  width: 17px;
  height: 17px;
}

.panel-content {
  min-height: 0;
  flex: 1;
  overflow: auto;
  padding: 20px 16px;
}

.panel-section-heading {
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 15px;
}

.panel-section-heading h2,
.chat-heading h2 {
  margin: 0 0 3px;
  font-size: 0.91rem;
  font-weight: 750;
}

.panel-section-heading p,
.chat-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
}

.copy-invite-text {
  min-height: 31px;
  padding: 0 11px;
  border: 1px solid #514b83;
  border-radius: 8px;
  color: #dbd7ff;
  background: rgb(140 130 255 / 10%);
  font-size: 0.7rem;
}

.participants-list {
  display: grid;
  gap: 5px;
}

.participant-row {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 5px;
  border-radius: 10px;
}

.participant-row:hover {
  background: rgb(255 255 255 / 3%);
}

.participant-info {
  min-width: 0;
  flex: 1;
}

.participant-info strong {
  display: block;
  overflow: hidden;
  color: #e7e9f1;
  font-size: 0.75rem;
  font-weight: 690;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.participant-info small {
  color: var(--quiet);
  font-size: 0.65rem;
}

.participant-state {
  width: 27px;
  height: 27px;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  color: #aab4c3;
  background: #252d3b;
}

.participant-state.is-muted {
  color: #ff9aa5;
  background: rgb(240 100 114 / 11%);
}

.participant-state svg {
  width: 14px;
  height: 14px;
}

.remove-participant {
  width: 29px;
  height: 29px;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: #fa9ca6;
  background: transparent;
}

.remove-participant:hover {
  background: rgb(240 100 114 / 13%);
}

.remove-participant svg {
  width: 15px;
  height: 15px;
}

.host-tools {
  margin-top: 20px;
  padding-top: 17px;
  border-top: 1px solid var(--border);
}

.tools-label {
  display: block;
  margin-bottom: 9px;
  color: var(--quiet);
  font-size: 0.68rem;
  font-weight: 700;
}

.host-tool-button {
  width: 100%;
  min-height: 42px;
  gap: 9px;
  padding: 0 10px;
  border: 1px solid #333d4e;
  border-radius: 10px;
  color: #e1e4ec;
  background: #202735;
  text-align: start;
  font-size: 0.74rem;
}

.host-tool-button svg {
  width: 17px;
  height: 17px;
  color: #b8b2ff;
}

.host-tool-button .tool-state {
  margin-inline-start: auto;
  color: var(--green);
  font-size: 0.65rem;
}

.host-tools > p {
  margin: 9px 0 0;
  color: var(--quiet);
  font-size: 0.66rem;
  line-height: 1.8;
}

.chat-panel {
  display: flex;
  flex-direction: column;
}

.chat-heading {
  margin-bottom: 14px;
}

.chat-messages {
  min-height: 100px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 11px;
  padding: 5px 0 15px;
}

.chat-empty {
  margin: auto;
  color: var(--quiet);
  font-size: 0.75rem;
  text-align: center;
}

.chat-message {
  max-width: 95%;
  padding: 8px 11px;
  border: 1px solid #303a4a;
  border-radius: 11px 11px 11px 3px;
  background: #222a38;
}

.chat-message.is-mine {
  align-self: flex-end;
  border-color: rgb(140 130 255 / 22%);
  border-radius: 11px 11px 3px 11px;
  background: rgb(140 130 255 / 11%);
}

.chat-message strong {
  display: block;
  margin-bottom: 2px;
  color: #c0b9ff;
  font-size: 0.65rem;
}

.chat-message p {
  margin: 0;
  overflow-wrap: anywhere;
  color: #e0e3eb;
  font-size: 0.75rem;
  line-height: 1.7;
}

.chat-form {
  display: flex;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.chat-form input {
  min-width: 0;
  min-height: 42px;
  flex: 1;
  font-size: 0.74rem;
}

.chat-form button {
  width: 42px;
  height: 42px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: #7167dd;
}

.chat-form button svg {
  width: 17px;
  height: 17px;
}

.call-toolbar {
  min-height: 84px;
  justify-content: space-between;
  gap: 15px;
  margin-top: 15px;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: #191f2a;
}

.toolbar-info {
  min-width: 150px;
  gap: 10px;
  color: var(--muted);
  font-size: 0.68rem;
}

.toolbar-info > span:first-child {
  color: #dee1eb;
  direction: ltr;
  letter-spacing: 0.06em;
}

.call-controls {
  justify-content: center;
  gap: 8px;
}

.call-control {
  min-width: 59px;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  border: 0;
  color: #dce0e9;
  background: transparent;
  font-size: 0.63rem;
  white-space: nowrap;
}

.control-icon {
  width: 43px;
  height: 39px;
  justify-content: center;
  border: 1px solid #394354;
  border-radius: 13px;
  color: #e6e8f0;
  background: #282f3e;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.call-control:hover .control-icon {
  transform: translateY(-1px);
  border-color: #5f6680;
  background: #323b4d;
}

.control-icon svg {
  width: 18px;
  height: 18px;
}

.call-control[aria-pressed="false"] .control-icon {
  border-color: #a74452;
  color: #fff;
  background: #a74452;
}

.call-control[aria-pressed="true"]#raise-hand .control-icon,
.call-control[aria-pressed="true"]#record-button .control-icon {
  border-color: #655bb6;
  color: #d7d2ff;
  background: #393456;
}

.call-control.leave-control {
  margin-inline-start: 5px;
}

.leave-control .control-icon {
  width: 52px;
  border-color: #e75c6b;
  color: #fff;
  background: #d54d5c;
}

.leave-control:hover .control-icon {
  border-color: #f16d7a;
  background: #e05868;
}

.toolbar-side {
  min-width: 83px;
  justify-content: flex-end;
  gap: 7px;
}

.toolbar-panel-button {
  min-width: 37px;
  height: 37px;
  justify-content: center;
  gap: 5px;
  padding: 0 7px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #cbd1dd;
  background: transparent;
}

.toolbar-panel-button svg {
  width: 18px;
  height: 18px;
}

.toolbar-panel-button span {
  font-size: 0.7rem;
}

.settings-dialog {
  width: min(440px, calc(100% - 32px));
  max-height: min(90vh, 680px);
  padding: 23px;
  border: 1px solid #414a5a;
  border-radius: 18px;
  color: var(--text);
  background: #1b222e;
  box-shadow: 0 30px 100px rgb(0 0 0 / 55%);
}

.settings-dialog::backdrop {
  background: rgb(4 7 12 / 72%);
  backdrop-filter: blur(5px);
}

.dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 19px;
}

.dialog-heading p {
  margin: 0 0 3px;
  color: var(--primary-light);
  font-size: 0.7rem;
  font-weight: 750;
}

.dialog-heading h2 {
  margin: 0;
  font-size: 1.14rem;
}

.dialog-fields {
  display: grid;
  gap: 14px;
}

.dialog-fields label {
  display: grid;
  gap: 6px;
  color: #d7dce5;
  font-size: 0.76rem;
  font-weight: 680;
}

.dialog-fields select {
  width: 100%;
  min-height: 43px;
  padding: 8px 11px;
  border: 1px solid #394355;
  border-radius: 9px;
  color: #edf0f7;
  background: #141a24;
  font-size: 0.75rem;
}

.settings-footnote {
  margin: 12px 0 17px;
  color: var(--quiet);
  font-size: 0.69rem;
}

.toast {
  position: fixed;
  z-index: 10;
  inset-inline-start: 50%;
  bottom: 26px;
  max-width: min(500px, calc(100% - 32px));
  padding: 11px 17px;
  border: 1px solid #454e60;
  border-radius: 11px;
  color: #f5f6fa;
  background: #242c3a;
  box-shadow: 0 14px 40px rgb(0 0 0 / 28%);
  font-size: 0.78rem;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.is-error {
  border-color: rgb(240 100 114 / 45%);
}

@media (min-width: 1100px) {
  .meeting-page {
    height: calc(100vh - 76px);
    min-height: 620px;
  }
}

@media (max-width: 1050px) {
  .lobby-page {
    grid-template-columns: minmax(0, 1fr) minmax(310px, 0.82fr);
    gap: 32px;
  }

  .toolbar-info {
    min-width: unset;
  }

  .toolbar-info > span:last-child,
  .toolbar-info .toolbar-divider {
    display: none;
  }

  .call-controls {
    gap: 4px;
  }

  .side-panel {
    width: 305px;
    min-width: 275px;
  }
}

@media (max-width: 800px) {
  .lobby-page {
    width: min(660px, calc(100% - 36px));
    grid-template-columns: 1fr;
    gap: 24px;
    padding-block: 42px;
  }

  .lobby-intro {
    margin-bottom: 21px;
  }

  .join-card {
    max-width: 100%;
  }

  .meeting-page {
    min-height: calc(100vh - 76px);
    padding-inline: 13px;
  }

  .meeting-layout {
    flex-direction: column;
  }

  .stage-column {
    min-height: 48vh;
    flex: 1;
  }

  .video-grid {
    min-height: 250px;
    grid-auto-rows: minmax(150px, 1fr);
    gap: 8px;
  }

  .video-tile {
    min-height: 150px;
  }

  .side-panel {
    width: 100%;
    min-width: 0;
    max-height: 290px;
    flex: 0 0 250px;
  }

  .panel-content {
    padding: 14px;
  }

  .chat-heading {
    margin-bottom: 8px;
  }

  .chat-messages {
    min-height: 0;
  }

  .chat-form {
    padding-top: 8px;
  }

  .side-panel.is-collapsed {
    display: none;
  }

  .call-toolbar {
    min-height: 75px;
    gap: 5px;
    padding-inline: 9px;
  }

  .toolbar-info {
    display: none;
  }

  .call-controls {
    min-width: 0;
    flex: 1;
    justify-content: space-around;
  }

  .call-control {
    min-width: 43px;
    font-size: 0.58rem;
  }

  .control-icon {
    width: 39px;
    height: 36px;
    border-radius: 11px;
  }

  .leave-control .control-icon {
    width: 45px;
  }

  .toolbar-side {
    min-width: 35px;
    flex-direction: column;
    gap: 0;
  }
}

@media (max-width: 560px) {
  .meeting-header {
    min-height: 65px;
    padding-inline: 15px;
  }

  .secure-label {
    display: none;
  }

  .header-actions {
    gap: 0;
  }

  .meeting-page {
    min-height: calc(100vh - 65px);
    padding: 12px 9px 10px;
  }

  .room-header {
    min-height: 48px;
    margin-bottom: 10px;
  }

  .room-heading h1 {
    font-size: 0.95rem;
  }

  .room-meta {
    gap: 6px;
    font-size: 0.64rem;
  }

  .room-header-actions {
    gap: 5px;
  }

  .connection-badge {
    min-height: 28px;
    gap: 6px;
    padding-inline: 7px;
    font-size: 0.62rem;
  }

  .room-header-actions > .icon-button {
    width: 32px;
    height: 32px;
  }

  .stage-column {
    min-height: 40vh;
  }

  .video-grid {
    min-height: 225px;
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: minmax(112px, 1fr);
  }

  .video-grid[data-count="1"] .video-tile {
    width: 100%;
  }

  .video-tile {
    min-height: 112px;
    border-radius: 12px;
  }

  .video-grid[data-count="3"] .video-tile:first-child {
    grid-column: span 2;
  }

  .avatar-large {
    width: 52px;
    height: 52px;
    font-size: 1.3rem;
  }

  .video-placeholder {
    gap: 6px;
    font-size: 0.65rem;
  }

  .tile-caption {
    inset-inline: 6px;
    bottom: 6px;
    gap: 4px;
  }

  .tile-name,
  .tile-state {
    min-height: 25px;
    padding: 3px 7px;
    font-size: 0.64rem;
  }

  .tile-state {
    min-width: 25px;
  }

  .host-chip {
    top: 7px;
    inset-inline-start: 7px;
    padding: 2px 6px;
    font-size: 0.57rem;
  }

  .room-banner {
    align-items: flex-start;
    font-size: 0.62rem;
  }

  .call-toolbar {
    min-height: 70px;
    margin-top: 9px;
    padding: 6px 4px;
  }

  .call-controls {
    gap: 0;
  }

  .call-control {
    min-width: 38px;
    gap: 3px;
    font-size: 0.53rem;
  }

  .control-icon {
    width: 34px;
    height: 33px;
    border-radius: 10px;
  }

  .control-icon svg {
    width: 16px;
    height: 16px;
  }

  .leave-control .control-icon {
    width: 39px;
  }

  .toolbar-side {
    min-width: 29px;
  }

  .toolbar-panel-button {
    min-width: 29px;
    width: 29px;
    height: 30px;
    padding: 0;
  }

  .toolbar-panel-button svg {
    width: 16px;
    height: 16px;
  }

  .optional-control {
    display: none;
  }

  .preview-stage {
    min-height: 205px;
  }

  .control-hint {
    max-width: 150px;
    line-height: 1.55;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
