:root {
  color-scheme: dark;
  --bg: #20232a;
  --sidebar: #191c22;
  --card: #2c313b;
  --raised: #383e49;
  --line: #484f5d;
  --text: #ffffff;
  --muted: #c5c9d2;
  --accent: #ffcf36;
  --green: #8ce9b4;
  --danger: #ffb4bd;
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --sidebar-width: 224px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 500 15px/1.5 var(--font);
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  font-weight: 650;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
:where(button, a, input, select):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
a {
  color: inherit;
  text-decoration: none;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-weight: 750;
  line-height: 1.2;
}
svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
  flex-shrink: 0;
}
[data-icon] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
[hidden] {
  display: none !important;
}
.workspace-wrap {
  width: 100%;
}
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100dvh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  min-height: 540px;
  padding: 20px 12px 0;
  background: var(--sidebar);
  border-right: 1px solid #353b46;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  margin: 0 8px 16px;
}
.brand-logo {
  display: block;
  width: 150px;
  height: 44px;
  object-fit: contain;
}
.space-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 6px 18px;
  font-weight: 700;
  font-size: 15px;
}
.space-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: #3d3824;
  color: #ffe38b;
  border: 1px solid #665a30;
  font-weight: 850;
}
.space-label small {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 550;
  margin-top: 2px;
}
.online-dot,
.status-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--green);
}
.space-label > .online-dot {
  margin-left: auto;
}
.section-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.6px;
  margin: 0 8px 8px;
}
.channel-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}
.tiny-button,
.icon-button {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: #f6f7fa;
  background: #303640;
}
.tiny-button:hover,
.icon-button:hover {
  background: #474e5c;
}
.tiny-button svg,
.icon-button svg {
  width: 20px;
  height: 20px;
}
.channel-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.channel-link {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #edf0f5;
  font-size: 15px;
  font-weight: 700;
  text-align: left;
}
.channel-link:hover {
  background: #303641;
  border-color: #596170;
}
.channel-link.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #191c22;
}
.channel-link svg {
  width: 21px;
  height: 21px;
}
.channel-count {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  padding: 2px 5px;
  border-radius: 7px;
  background: #11151c;
  color: #c8ced9;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.channel-count i {
  width: 5px;
  height: 5px;
  background: currentColor;
  border-radius: 50%;
}
.channel-count.occupied {
  color: var(--green);
}
.channel-link.selected .channel-count {
  background: #2e2915;
  color: #fff0b4;
}
.private-room {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  margin-top: 16px;
  border: 1px dashed #646c78;
  border-radius: 10px;
  font-size: 14px;
  color: #f7dfa0;
  text-align: left;
}
.private-room:hover {
  border-color: var(--accent);
  background: #373a3f;
}
.private-room > span:last-child {
  margin-left: auto;
}
.private-room svg {
  width: 18px;
  height: 18px;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 24px;
}
.sidebar-settings {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 8px 6px;
  font-size: 14px;
  color: #f0f2f7;
}
.sidebar-settings:hover {
  color: var(--accent);
}
.keycap {
  margin-left: auto;
  color: var(--muted);
}
.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 2px;
  border-top: 1px solid #3d444f;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}
.build {
  margin-left: auto;
}
.main-shell {
  min-width: 0;
}
.topbar {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
  border-bottom: 1px solid #373e49;
  background: #22262e;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 14px;
  color: var(--muted);
}
.breadcrumb strong {
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 35vw;
}
.slash {
  color: #929cab;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.live-badge {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 700;
  color: #edf0f5;
}
.live-badge i {
  height: 8px;
  width: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #f8dc82;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.7px;
}
.eyebrow > span {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
}
.primary-button,
.secondary-button,
.room-enter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid #69717d;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}
.secondary-button {
  color: #fff;
  background: #3b424e;
}
.secondary-button:hover {
  border-color: var(--accent);
  background: #495160;
}
.primary-button,
.room-enter {
  background: var(--accent);
  color: #171a20;
  border-color: var(--accent);
}
.primary-button:hover,
.room-enter:hover {
  background: #ffe277;
  border-color: #ffe277;
}
.primary-button {
  width: 100%;
  margin-top: 24px;
}
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 36px;
  padding: 6px 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
}
.text-button:hover {
  color: #ffeaa8;
}
#callClock {
  font-variant-numeric: tabular-nums;
  font-weight: 750;
}
.entry-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  margin-bottom: 10px;
  background: #3c3420;
  border: 1px solid #ac8d35;
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  color: #fff2c6;
  font-size: 14px;
  font-weight: 600;
}
.entry-notice .secondary-button {
  background: var(--accent);
  border-color: var(--accent);
  color: #191c22;
  flex-shrink: 0;
}
.call-tip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 550;
  color: #d3d7e0;
  text-align: center;
}
.call-tip svg {
  width: 16px;
  height: 16px;
}
.call-controls {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  width: min(100%, 600px);
  padding: 6px;
  border: 1px solid #626b79;
  border-radius: 12px;
  background: #2b313b;
  box-shadow: 0 8px 28px #0004;
}
.control-divider {
  display: none;
}
.control-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  min-height: 54px;
  padding: 6px;
  border: 1px solid #535d6c;
  border-radius: 8px;
  color: #fff;
  background: #3a424f;
}
.control-button:hover {
  border-color: var(--accent);
  background: #4a5463;
}
.control-button small {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
}
.control-button svg {
  width: 21px;
  height: 21px;
}
.control-button[aria-pressed="true"] {
  background: var(--accent);
  color: #191c22;
  border-color: var(--accent);
}
.control-button.off {
  background: #692d3b;
  color: #ffe1e6;
  border-color: #b56578;
}
.leave-button {
  background: #bc3e54;
  border-color: #ed8b9b;
  color: #fff;
}
.leave-button:hover {
  background: #d54b62;
  border-color: #ffb2bf;
}
.lobby {
  padding: 0 20px 24px;
}
.workspace-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 2px solid var(--line);
}
.workspace-intro h2 {
  font-size: 28px;
  margin: 10px 0;
}
.workspace-intro p {
  font-size: 15px;
  color: var(--muted);
}
.workspace-create {
  color: #191c22;
  background: var(--accent);
  border-color: var(--accent);
  flex-shrink: 0;
}
.content-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 22px;
  padding: 24px 0;
}
.section-title,
.setup-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.section-title {
  margin-bottom: 20px;
}
.section-title h2,
.setup-title h2 {
  font-size: 21px;
}
.section-title p,
.setup-card > p {
  font-size: 14px;
  color: var(--muted);
  margin-top: 8px;
}
.subtle-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 2px solid #617366;
  border-radius: 24px;
  padding: 7px 12px;
  font-size: 14px;
  font-weight: 750;
  white-space: nowrap;
  color: var(--green);
}
.subtle-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}
.room-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.room-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid #566171;
  border-radius: 14px;
  background: var(--card);
}
.room-card:hover {
  border-color: var(--accent);
}
.room-symbol {
  display: grid;
  place-items: center;
  height: 40px;
  width: 40px;
  flex-shrink: 0;
  background: #494229;
  border: 2px solid #81703b;
  color: #ffdd72;
  border-radius: 12px;
}
.room-info {
  min-width: 0;
}
.room-info h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 18px;
}
.room-info p {
  font-size: 15px;
  color: var(--muted);
  margin-top: 6px;
}
.room-tag {
  font-size: 12px;
  color: #ffdf80;
  padding: 4px 7px;
  border-radius: 6px;
  background: #463f28;
  font-weight: 800;
}
.room-action {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}
.room-occupancy {
  font-size: 14px;
  color: #d2d8e3;
  white-space: nowrap;
}
.room-enter {
  min-height: 46px;
  padding: 10px 14px;
}
.invite-card {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  margin-top: 20px;
  width: 100%;
  border: 2px dashed #7a8493;
  border-radius: 12px;
  text-align: left;
}
.invite-card:hover {
  background: #313844;
  border-color: var(--accent);
}
.invite-icon {
  color: var(--accent);
}
.invite-card strong {
  display: block;
  font-size: 18px;
  font-weight: 800;
}
.invite-card small {
  display: block;
  font-size: 15px;
  font-weight: 550;
  margin-top: 6px;
  color: var(--muted);
}
.invite-card > span:last-child {
  margin-left: auto;
  color: var(--accent);
}
.feature-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 22px;
  margin-top: 24px;
  font-size: 14px;
  color: var(--muted);
}
.feature-strip > span {
  display: flex;
  align-items: center;
  gap: 8px;
}
.feature-strip svg {
  height: 20px;
  width: 20px;
  color: var(--accent);
}
.setup-card {
  padding: 18px;
  border: 1px solid #636d7c;
  border-radius: 14px;
  background: var(--card);
  height: fit-content;
}
.setup-card > label {
  display: block;
  margin: 24px 0 10px;
  font-size: 14px;
  font-weight: 800;
}
.name-input {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 2px solid #778295;
  border-radius: 10px;
  background: #202731;
}
.name-input > span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 8px;
  background: #5c4c26;
  color: #ffe8a2;
  font-weight: 800;
}
.name-input input {
  min-width: 0;
  width: 100%;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 17px;
  padding: 6px 0;
}
.setup-card > small {
  display: block;
  color: var(--muted);
  font-size: 14px;
  margin-top: 10px;
}
.setup-divider {
  height: 2px;
  background: var(--line);
  margin: 24px 0;
}
.mic-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
}
.device-status {
  margin-left: auto;
  font-size: 14px;
  color: var(--green);
}
.mic-meter {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 18px 0;
  height: 30px;
}
.mic-meter i {
  height: 22px;
  flex: 1;
  border-radius: 3px;
  background: #545f70;
}
.mic-meter i.lit {
  background: var(--accent);
}
.mic-test {
  width: 100%;
}
.noise-note {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  color: #f4dda0;
  margin-top: 16px;
}
.device-button {
  margin-top: 16px;
  width: 100%;
  justify-content: space-between;
}
.setup-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 2px solid var(--line);
  margin-top: 20px;
  padding-top: 16px;
  font-size: 14px;
  color: var(--muted);
}
.modal {
  width: min(540px, calc(100vw - 32px));
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  padding: 24px;
  border: 1px solid #7b8595;
  border-radius: 12px;
  background: #252b35;
  color: #fff;
  box-shadow: 0 24px 100px #0009;
}
.modal::backdrop {
  background: #090d15c9;
}
.small-modal {
  width: min(460px, calc(100vw - 32px));
}
.modal-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
}
.modal-heading > div {
  min-width: 0;
}
.modal-heading h2 {
  font-size: 25px;
  overflow-wrap: anywhere;
}
.modal-heading .eyebrow {
  margin-bottom: 10px;
}
.settings-content {
  display: flex;
  flex-direction: column;
}
.field-label {
  display: block;
  margin: 14px 0 8px;
  color: #f1f3f8;
  font-size: 15px;
  font-weight: 700;
}
select,
.modal input:not([type="checkbox"]) {
  width: 100%;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid #818c9e;
  border-radius: 8px;
  color: #fff;
  background: #353e4c;
  font-size: 16px;
  font-weight: 650;
}
input::placeholder {
  color: #bec5d1;
}
.settings-content select + small {
  color: var(--muted);
  margin-top: 8px;
  font-size: 14px;
}
.settings-content > .secondary-button {
  margin-top: 20px;
}
.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid #4b5565;
}
.toggle-row > span {
  min-width: 0;
}
.toggle-row strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
}
.toggle-row small {
  display: block;
  color: var(--muted);
  font-size: 14px;
  font-weight: 550;
  margin-top: 6px;
}
.toggle-row input {
  appearance: none;
  flex: 0 0 52px;
  width: 52px;
  height: 30px;
  background: #697489;
  border: 2px solid #929db0;
  border-radius: 18px;
  position: relative;
  margin: 0;
  cursor: pointer;
}
.toggle-row input:before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  top: 3px;
  left: 3px;
  border-radius: 50%;
  background: #fff;
}
.toggle-row input:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.toggle-row input:checked:before {
  transform: translateX(22px);
  background: #191c22;
}
.actual-audio {
  padding: 14px;
  margin: 18px 0 8px;
  border: 2px solid #657181;
  border-radius: 10px;
  color: #e9edf5;
  font-size: 15px;
}
.modal-description {
  font-size: 15px;
  color: #d7dde7;
  line-height: 1.65;
}
.help-steps p {
  margin: 24px 0;
}
.help-steps strong {
  display: block;
  font-size: 17px;
  font-weight: 800;
  color: #ffdf80;
}
.help-steps span {
  display: block;
  color: #d7dde7;
  margin-top: 8px;
  font-size: 15px;
}
.toast-region {
  position: fixed;
  bottom: 140px;
  right: 24px;
  max-width: min(480px, calc(100vw - 48px));
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 99;
}
.toast {
  padding: 12px 16px;
  border: 1px solid #c4a447;
  border-radius: 12px;
  color: #fff0bb;
  background: #443b24;
  box-shadow: 0 8px 30px #0005;
  font-size: 14px;
  font-weight: 650;
}
.toast.error {
  background: #5d2936;
  border-color: #e496a6;
  color: #ffe0e6;
}
.error-hint {
  color: var(--danger);
}
@media (max-width: 1250px) {
  :root {
    --sidebar-width: 224px;
  }
  .sidebar {
    padding-inline: 14px;
  }
  .space-label {
    font-size: 16px;
    gap: 9px;
  }
  .channel-link {
    padding-inline: 10px;
    gap: 10px;
  }
  .content-columns {
    grid-template-columns: minmax(0, 1fr);
  }
  .setup-card {
    max-width: 620px;
  }
  .room-occupancy {
    display: none;
  }
  .control-button small {
    font-size: 14px;
  }
}
@media (max-width: 1050px) {
  .topbar {
    padding-inline: 20px;
  }
  .live-badge {
    display: none;
  }
  .lobby {
    padding-inline: 20px;
  }
  .entry-notice {
    flex-wrap: wrap;
  }
}
@media (max-width: 900px) {
  :root {
    --sidebar-width: 0px;
  }
  .app-shell {
    display: block;
  }
  .sidebar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    height: auto;
    min-height: 0;
    padding: 14px 20px;
    border: 0;
    border-bottom: 2px solid #515a69;
    z-index: 10;
  }
  .brand {
    margin: 0;
    height: 44px;
  }
  .space-label,
  .sidebar-bottom,
  .private-room {
    display: none;
  }
  .channel-heading {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    font-size: 0;
  }
  .channel-list {
    grid-column: 1 / -1;
    grid-row: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  .channel-link {
    justify-content: center;
    min-height: 50px;
    padding: 10px;
    border-color: #596373;
    background: #303741;
  }
  .channel-count {
    margin-left: 0;
  }
  .topbar {
    height: 0;
    padding: 0;
    border: 0;
  }
  .breadcrumb,
  .live-badge {
    display: none;
  }
  .header-actions {
    position: fixed;
    top: 14px;
    right: 76px;
    z-index: 11;
  }
  .toast-region {
    right: 16px;
  }
}
@media (max-width: 600px) {
  body {
    font-size: 16px;
  }
  .sidebar {
    padding: 12px 16px;
    gap: 12px;
  }
  .header-actions {
    top: 12px;
    right: 72px;
  }
  .channel-list {
    gap: 8px;
  }
  .channel-link {
    font-size: 16px;
    min-height: 48px;
    padding: 10px 6px;
  }
  .channel-link > svg,
  .channel-count {
    display: none;
  }
  .eyebrow {
    font-size: 13px;
  }
  .entry-notice {
    padding: 10px 12px;
    gap: 10px;
    font-size: 14px;
  }
  .entry-notice .secondary-button {
    width: 100%;
  }
  .call-tip {
    font-size: 13px;
    gap: 6px;
  }
  .call-controls {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 9px;
    border-radius: 14px;
  }
  .control-button {
    flex-direction: row;
    min-height: 58px;
    gap: 7px;
    padding: 10px 5px;
  }
  .control-button svg {
    width: 23px;
    height: 23px;
  }
  .control-button small {
    font-size: 14px;
  }
  .lobby {
    padding-inline: 16px;
  }
  .workspace-intro {
    flex-wrap: wrap;
  }
  .workspace-intro h2 {
    font-size: 30px;
  }
  .workspace-intro p {
    font-size: 16px;
  }
  .content-columns {
    gap: 24px;
    padding-top: 24px;
  }
  .section-title {
    flex-wrap: wrap;
  }
  .section-title h2,
  .setup-title h2 {
    font-size: 23px;
  }
  .room-card {
    flex-wrap: wrap;
    padding: 16px;
    gap: 14px;
  }
  .room-symbol {
    width: 44px;
    height: 44px;
  }
  .room-info {
    flex: 1;
  }
  .room-info h3 {
    font-size: 20px;
  }
  .room-info p {
    font-size: 15px;
  }
  .room-tag {
    display: none;
  }
  .room-action {
    width: 100%;
    margin: 0;
  }
  .room-enter {
    width: 100%;
  }
  .invite-card {
    padding: 16px;
  }
  .feature-strip {
    gap: 12px;
    font-size: 14px;
  }
  .setup-card {
    padding: 20px;
  }
  .setup-foot {
    font-size: 14px;
  }
  .modal {
    padding: 22px;
    max-height: calc(100dvh - 24px);
  }
  .modal-heading h2 {
    font-size: 28px;
  }
  .modal-description {
    font-size: 16px;
  }
  .toggle-row {
    gap: 14px;
  }
  .toggle-row strong {
    font-size: 17px;
  }
  .toggle-row small {
    font-size: 15px;
  }
  .settings-content > .secondary-button {
    font-size: 15px;
  }
  .toast-region {
    bottom: 205px;
    right: 12px;
    max-width: calc(100vw - 24px);
  }
  .toast {
    font-size: 15px;
    padding: 14px 16px;
  }
}
@media (max-width: 380px) {
  .call-controls {
    gap: 6px;
    padding: 8px;
  }
  .control-button {
    flex-direction: column;
    gap: 5px;
    min-height: 60px;
  }
  .control-button small {
    font-size: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* The call owns the available viewport; media never sits behind a fixed toolbar. */
.mobile-channel-toggle {
  display: none;
}
body.in-call {
  overflow: hidden;
}
body.in-call .app-shell {
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}
body.in-call .main-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
body.in-call .sidebar {
  min-height: 0;
}
.topbar {
  flex-shrink: 0;
}
.call-view {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  padding: 16px 20px 12px;
  gap: 10px;
}
.call-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
}
.call-heading-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
  overflow: hidden;
}
.call-heading .eyebrow {
  display: none;
}
.call-heading h1 {
  font-size: 26px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.call-heading p {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 14px;
}
.call-heading-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
#copyInvite {
  background: var(--accent);
  border-color: var(--accent);
  color: #171a20;
}
#copyInvite:hover {
  background: #ffe277;
}
.layout-toggle svg {
  width: 18px;
  height: 18px;
}
.layout-toggle[aria-pressed="true"] {
  border-color: var(--accent);
  color: #ffe69c;
}
.connection-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  flex-shrink: 0;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 13px;
}
.connection-strip > span:first-child {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 8px;
  border: 1px solid #3d7457;
  border-radius: 7px;
  color: var(--green);
  background: #163b2b;
  font-weight: 700;
}
.connection-strip > span:last-child {
  margin-left: auto;
}
.entry-notice {
  flex-shrink: 0;
  margin: 0;
}
.call-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 12px;
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.has-screen:not(.grid-view) .call-layout {
  grid-template-columns: minmax(0, 1fr) minmax(270px, 32%);
}
.share-stage {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid #616d7d;
  border-radius: 10px;
  background: #11151c;
}
.stage-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  height: 38px;
  min-width: 0;
  padding: 4px 8px;
  background: #343c48;
}
.stage-heading > span,
.stage-heading > div {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.stage-heading > span {
  flex: 1;
}
.stage-heading strong {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stage-heading svg {
  width: 18px;
  height: 18px;
}
.stage-heading .icon-button {
  width: 28px;
  height: 28px;
}
.stage-heading select {
  width: auto;
  max-width: 140px;
  min-height: 28px;
  padding: 4px;
  font-size: 13px;
}
.share-stage > video {
  display: block;
  flex: 1;
  width: 100%;
  height: 0;
  min-height: 0;
  object-fit: contain;
  background: #11151c;
}
.share-stage:fullscreen {
  border: 0;
  border-radius: 0;
}
.participants-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.participants-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  min-height: 24px;
  gap: 10px;
}
.participants-heading h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #e6ebf3;
}
.participants-heading h2 span {
  padding: 2px 6px;
  border-radius: 5px;
  background: #353d49;
  color: #dce4f0;
  font-size: 12px;
}
.participants-navigation {
  display: flex;
  gap: 5px;
}
.participants-navigation .icon-button {
  width: 26px;
  height: 24px;
}
.participants-navigation svg {
  width: 16px;
  height: 16px;
}
.participant-grid {
  display: grid;
  flex: 1;
  min-width: 0;
  min-height: 0;
  gap: 10px;
  justify-content: center;
  align-content: center;
  overflow: hidden;
}
.participant-tile {
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid #596574;
  border-radius: 9px;
  background: radial-gradient(ellipse at 50% 35%, #3b424f, #2a2f39 80%);
}
.participant-tile.speaking {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.participant-tile .avatar {
  display: grid;
  place-items: center;
  height: var(--avatar-size, 64px);
  width: var(--avatar-size, 64px);
  margin-bottom: 28px;
  border-radius: 18px;
  border: 2px solid hsl(var(--hue, 42) 50% 60%);
  background: hsl(var(--hue, 42) 35% 30%);
  color: #fff;
  font-size: clamp(17px, calc(var(--avatar-size, 64px) * 0.4), 27px);
  font-weight: 750;
}
.participant-tile video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(100% - 28px);
  object-fit: contain;
  background: #141920;
  z-index: 1;
}
.participant-tile.self video {
  transform: scaleX(-1);
}
.tile-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 28px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  color: #fff;
  background: #151c26;
  font-size: 14px;
  font-weight: 650;
  z-index: 2;
}
.tile-label > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tile-label .you {
  color: #c7cfdb;
  font-size: 12px;
}
.tile-state {
  display: flex;
  gap: 6px;
  margin-left: auto;
  color: #ffe28b;
}
.tile-state svg {
  width: 16px;
  height: 16px;
}
.tile-connection {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 3px 6px;
  border-radius: 6px;
  background: #111720df;
  color: #e3e8f1;
  font-size: 12px;
  font-weight: 650;
  z-index: 2;
}
.participant-volume {
  display: flex;
  align-items: center;
  gap: 5px;
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 3;
  padding: 4px 6px;
  background: #111720df;
  border-radius: 6px;
}
.participant-volume svg {
  width: 16px;
  height: 16px;
}
.participant-volume input {
  width: 52px;
  height: 18px;
  accent-color: var(--accent);
}
.participant-grid.dense .tile-label {
  font-size: 13px;
  padding-inline: 6px;
}
.participant-grid.dense .tile-label .you {
  display: none;
}
.participant-grid.dense .tile-connection {
  font-size: 11px;
  padding: 2px 4px;
}
.participant-grid.dense .participant-volume input {
  width: 36px;
}
.call-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-shrink: 0;
  color: var(--muted);
  font-size: 14px;
}
.call-empty .text-button {
  min-height: 28px;
  padding-block: 2px;
}
.call-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  padding: 4px 0 max(0px, env(safe-area-inset-bottom));
}
.call-controls {
  flex-shrink: 0;
}
@media (max-width: 900px) {
  body.in-call .app-shell {
    display: flex;
    flex-direction: column;
  }
  body.in-call .sidebar {
    position: relative;
    flex-shrink: 0;
    height: 64px;
    grid-template-columns: minmax(0, 1fr) 84px;
    gap: 10px;
    padding: 10px 16px;
  }
  body.in-call .brand {
    grid-column: 1;
    grid-row: 1;
    height: 44px;
  }
  body.in-call .channel-heading {
    display: none;
  }
  body.in-call .header-actions {
    top: 15px;
    right: 116px;
  }
  body.in-call .mobile-channel-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    grid-column: 2;
    grid-row: 1;
    height: 34px;
    align-self: center;
    border: 1px solid #657080;
    border-radius: 7px;
    font-size: 14px;
  }
  .mobile-channel-toggle svg {
    width: 15px;
    height: 15px;
  }
  body.in-call .channel-list {
    display: none;
    position: absolute;
    top: calc(100% - 1px);
    left: 16px;
    right: 16px;
    padding: 10px;
    border: 1px solid #657080;
    border-radius: 9px;
    background: var(--sidebar);
    box-shadow: 0 10px 25px #0008;
    z-index: 12;
  }
  body.in-call .sidebar.channels-open .channel-list {
    display: grid;
  }
  body.in-call .main-shell {
    flex: 1;
    height: 0;
  }
  .call-view {
    padding: 12px 16px 8px;
    gap: 8px;
  }
  .call-heading h1 {
    font-size: 24px;
  }
  .has-screen:not(.grid-view) .call-layout {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .has-screen:not(.grid-view) .share-stage {
    flex: 1;
    height: 0;
  }
  .has-screen:not(.grid-view) .participants-panel {
    flex: 0 0 180px;
  }
  .has-screen:not(.grid-view) .participant-grid {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 5px;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scrollbar-color: #738098 #202630;
  }
  .has-screen:not(.grid-view) .participant-tile {
    flex: 0 0 200px;
    width: 200px;
    height: 140px;
    scroll-snap-align: start;
  }
  .has-screen:not(.grid-view) .participant-tile .avatar {
    height: 48px;
    width: 48px;
    font-size: 22px;
  }
  .toast-region {
    bottom: 150px;
  }
}
@media (max-width: 600px) {
  .call-heading {
    flex-wrap: nowrap;
    gap: 8px;
  }
  .call-heading-title {
    display: block;
    flex: 1;
  }
  .call-heading h1 {
    font-size: 23px;
  }
  .call-heading p {
    display: none;
  }
  .call-heading-actions {
    gap: 6px;
  }
  .call-heading-actions .secondary-button {
    min-height: 34px;
    padding: 6px 9px;
    font-size: 13px;
  }
  #copyInvite {
    width: 34px;
    padding: 6px;
  }
  #copyInvite .invite-label {
    display: none;
  }
  .connection-strip {
    gap: 6px 10px;
    font-size: 12px;
  }
  .connection-strip > span:first-child {
    padding: 3px 6px;
  }
  .connection-strip > span:last-child {
    margin-left: 0;
  }
  .entry-notice {
    gap: 8px;
    padding: 8px 10px;
    font-size: 13px;
    flex-wrap: wrap;
    max-height: 120px;
    overflow-y: auto;
  }
  .entry-notice .secondary-button {
    width: auto;
    min-height: 32px;
    padding: 5px 8px;
    font-size: 13px;
  }
  .has-screen:not(.grid-view) .participants-panel {
    flex-basis: 154px;
  }
  .has-screen:not(.grid-view) .participant-tile {
    flex-basis: 160px;
    width: 160px;
    height: 118px;
  }
  .has-screen:not(.grid-view) .participant-tile .avatar {
    height: 40px;
    width: 40px;
    font-size: 20px;
  }
  .has-screen:not(.grid-view) .tile-label {
    font-size: 13px;
  }
  .has-screen:not(.grid-view) .tile-label .you {
    display: none;
  }
  .has-screen:not(.grid-view) .participant-volume input {
    width: 36px;
  }
  .call-bottom {
    padding-top: 0;
    gap: 4px;
  }
  .call-controls {
    gap: 6px;
    padding: 6px;
  }
  .control-button {
    min-height: 48px;
    padding: 6px 5px;
  }
  .control-button svg {
    height: 20px;
    width: 20px;
  }
  .call-tip {
    font-size: 12px;
  }
  .call-empty {
    display: none;
  }
  .stage-heading {
    height: 34px;
    padding: 3px 6px;
    gap: 6px;
  }
  .stage-heading strong {
    font-size: 12px;
  }
  .stage-heading > div {
    gap: 5px;
  }
  .stage-heading select {
    max-width: 90px;
    font-size: 12px;
    padding: 3px;
  }
}
@media (max-width: 380px) {
  .control-button {
    min-height: 54px;
  }
}
@media (max-height: 500px) and (max-width: 900px) {
  body.in-call .sidebar {
    height: 52px;
    padding-block: 4px;
  }
  body.in-call .header-actions {
    top: 9px;
  }
  .call-view {
    padding-block: 6px;
    gap: 5px;
  }
  .call-heading h1 {
    font-size: 19px;
  }
  .connection-strip {
    display: none;
  }
  .call-tip {
    display: none;
  }
  .call-controls {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .control-button {
    min-height: 34px;
    padding: 5px;
  }
  .control-button small {
    display: none;
  }
  .has-screen:not(.grid-view) .call-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 170px;
  }
  .has-screen:not(.grid-view) .share-stage {
    height: 100%;
  }
  .has-screen:not(.grid-view) .participants-panel {
    min-height: 0;
  }
  .has-screen:not(.grid-view) .participant-grid {
    display: grid;
    grid-template-columns: 1fr !important;
    grid-auto-rows: 100px !important;
    overflow-y: auto;
  }
  .has-screen:not(.grid-view) .participant-tile {
    width: 100%;
    height: 100px;
  }
}

/* Settings have their own fixed header/footer; only the selected pane scrolls. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.settings-dialog {
  width: min(760px, calc(100vw - 32px));
  max-width: none;
  max-height: min(680px, calc(100dvh - 40px));
  padding: 0;
  border: 1px solid #687587;
  border-radius: 16px;
  background: #252b35;
  color: #fff;
  box-shadow: 0 24px 90px #0008;
  overflow: hidden;
}
.settings-dialog[open] {
  display: flex;
  flex-direction: column;
}
.settings-dialog::backdrop {
  background: #070b12b8;
}
.settings-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 18px;
  flex-shrink: 0;
}
.settings-header h2 {
  font-size: 25px;
}
.settings-header p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 14px;
}
.settings-tabs {
  display: flex;
  gap: 6px;
  padding: 0 24px 12px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--line);
}
.settings-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  color: #d0d6df;
  border: 1px solid transparent;
}
.settings-tab svg {
  width: 19px;
  height: 19px;
}
.settings-tab:hover {
  background: #353e4b;
}
.settings-tab[aria-selected="true"] {
  background: #ffcf36;
  color: #171c23;
  border-color: #ffcf36;
}
.settings-body {
  padding: 20px 24px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #69768a transparent;
}
.settings-device-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.settings-device-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border: 1px solid #4b5667;
  border-radius: 11px;
  background: #1b222d;
}
#settingsDialog .field-label {
  margin: 0;
  font-size: 14px;
}
#settingsDialog select,
#settingsDialog input:not([type="checkbox"]) {
  font-size: 15px;
  min-height: 42px;
  background: #333d4c;
  border: 1px solid #68778d;
}
.settings-device-card .secondary-button {
  width: 100%;
  margin-top: auto;
  min-height: 36px;
  padding: 7px 10px;
  font-size: 14px;
}
.settings-device-card small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.settings-meter-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
#settingsMicState {
  color: #9eebbe;
  font-weight: 650;
}
.settings-mic-meter {
  display: flex;
  gap: 3px;
  height: 16px;
}
.settings-mic-meter i {
  flex: 1;
  border-radius: 2px;
  background: #445063;
}
.settings-mic-meter i.lit {
  background: var(--accent);
}
.settings-section-title {
  font-size: 15px;
  margin: 20px 0 4px;
}
.settings-toggle-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 24px;
}
#settingsDialog .toggle-row {
  gap: 14px;
  padding: 12px 0;
  border-color: #434e5f;
}
#settingsDialog .toggle-row strong {
  font-size: 14px;
}
#settingsDialog .toggle-row small {
  font-size: 12px;
  line-height: 1.45;
  margin-top: 3px;
}
#settingsDialog .toggle-row input {
  flex-basis: 42px;
  width: 42px;
  height: 25px;
  border-width: 1px;
}
#settingsDialog .toggle-row input:before {
  height: 17px;
  width: 17px;
  top: 3px;
  left: 3px;
}
#settingsDialog .toggle-row input:checked:before {
  transform: translateX(17px);
}
#settingsDialog .actual-audio {
  font-size: 12px;
  line-height: 1.5;
  padding: 9px 12px;
  border: 1px solid #45556a;
  margin: 14px 0 0;
  background: #1d2632;
  border-radius: 8px;
  color: #c9d7e7;
}
.settings-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  flex-shrink: 0;
  border-top: 1px solid #485363;
  background: #202630;
}
.settings-footer > div {
  min-width: 0;
  flex: 1;
}
.settings-refresh {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  font-size: 13px;
  color: #e0e7f2;
  min-height: 26px;
}
.settings-refresh svg {
  height: 15px;
  width: 15px;
}
#settingsFeedback {
  display: block;
  color: #aebaca;
  font-size: 12px;
  margin-top: 3px;
}
#settingsFeedback.error,
.settings-error {
  color: #ffb4bd;
}
.settings-dialog .settings-footer .primary-button {
  width: auto;
  margin: 0;
  min-height: 40px;
  padding: 9px 18px;
  font-size: 14px;
  flex-shrink: 0;
}
.settings-camera-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.settings-camera-preview {
  aspect-ratio: 16/10;
  border: 1px solid #58677b;
  background: #111821;
  border-radius: 11px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.settings-camera-preview video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scaleX(-1);
}
#cameraPreviewPlaceholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: #a8b7cb;
  font-size: 14px;
}
#cameraPreviewPlaceholder svg {
  height: 38px;
  width: 38px;
}
#cameraPreviewBadge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  padding: 4px 7px;
  border-radius: 5px;
  background: #101723d9;
  font-size: 12px;
  color: #d8e8f9;
}
.settings-camera-options {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.settings-camera-options p {
  font-size: 13px;
  color: var(--muted);
}
.settings-camera-options .secondary-button {
  padding: 8px;
  font-size: 14px;
  min-height: 38px;
}
.settings-camera-options .toggle-row {
  margin-top: 4px;
}
.settings-profile-card {
  display: flex;
  gap: 20px;
  padding: 16px;
  border: 1px solid #4b5667;
  border-radius: 11px;
  background: #1b222d;
}
.settings-profile-card > div {
  min-width: 0;
  flex: 1;
}
.settings-profile-avatar {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: #594a24;
  border: 1px solid #aa9147;
  border-radius: 15px;
  color: #ffe49a;
  font-size: 24px;
  font-weight: 750;
}
.settings-profile-card input {
  margin: 10px 0;
}
.settings-profile-card p {
  font-size: 13px;
  color: var(--muted);
}
.settings-profile-card .settings-error {
  color: #ffb4bd;
  margin-top: 8px;
}

/* Chat is docked alongside media on desktop, never over the call controls. */
.call-workspace {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  flex: 1;
  min-width: 0;
  min-height: 0;
  gap: 14px;
}
.call-workspace.chat-open {
  grid-template-columns: minmax(0, 1fr) 310px;
}
.chat-toggle {
  position: relative;
}
.chat-toggle svg {
  width: 18px;
  height: 18px;
}
.chat-toggle[aria-expanded="true"] {
  color: #ffe59a;
  border-color: #9e8848;
  background: #3b3627;
}
.chat-unread {
  display: grid;
  place-items: center;
  min-width: 21px;
  height: 21px;
  padding: 0 5px;
  border-radius: 7px;
  background: var(--accent);
  color: #1b2028;
  font-size: 12px;
  font-weight: 800;
}
.chat-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: min(460px, 100%);
  align-self: end;
  border: 1px solid #5a6576;
  border-radius: 12px;
  background: #1b222c;
  overflow: hidden;
  box-shadow: 0 10px 28px #10141a50;
}
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid #414b59;
  flex-shrink: 0;
  background: #2b3440;
}
.chat-header h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
}
.chat-header h2 svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}
.chat-header p {
  color: #b6c3d4;
  font-size: 12px;
  margin-top: 5px;
}
.chat-header .icon-button {
  height: 30px;
  width: 30px;
  background: #3a4655;
}
.chat-history {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #65748b transparent;
  padding: 14px 12px;
}
.chat-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 30px 8px;
  gap: 10px;
  color: #aebdd0;
}
.chat-empty > [data-icon] {
  padding: 12px;
  border-radius: 14px;
  background: #303b4a;
  color: #ffe299;
}
.chat-empty strong {
  font-size: 14px;
  color: #f3f5fa;
}
.chat-empty p {
  font-size: 13px;
  max-width: 220px;
}
.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chat-message {
  max-width: 95%;
  min-width: 0;
  align-self: flex-start;
  padding: 10px 11px;
  border: 1px solid #435065;
  border-radius: 3px 11px 11px;
  background: #2c3747;
}
.chat-message.own {
  align-self: flex-end;
  background: #463f29;
  border-color: #796a3c;
  border-radius: 11px 3px 11px 11px;
}
.chat-message-heading {
  display: flex;
  align-items: baseline;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 4px;
}
.chat-message-heading strong {
  color: #ffe399;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-message-heading time {
  color: #b5bfcc;
  font-size: 11px;
  flex-shrink: 0;
}
.chat-message p {
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.chat-composer {
  border-top: 1px solid #414c5c;
  padding: 10px;
  flex-shrink: 0;
}
.chat-input-row {
  display: flex;
  align-items: flex-end;
  gap: 7px;
}
.chat-composer textarea {
  display: block;
  flex: 1;
  width: 0;
  min-width: 0;
  resize: none;
  border: 1px solid #68788d;
  border-radius: 8px;
  padding: 10px;
  height: 64px;
  max-height: 96px;
  color: #fff;
  background: #303c4d;
  font: 500 14px/1.5 var(--font);
}
.chat-composer textarea::placeholder {
  color: #bcc9d9;
}
#chatSend {
  height: 44px;
  width: 40px;
  flex-shrink: 0;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: #1a2029;
}
#chatSend svg {
  height: 20px;
  width: 20px;
}
.chat-composer-hint {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #9cacc1;
  font-size: 10px;
  margin-top: 7px;
}
.chat-error {
  margin-top: 8px;
  color: #ffbac4;
  font-size: 12px;
}
.chat-new-messages {
  align-self: center;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  margin: 4px;
  border-radius: 7px;
  color: #1a2029;
  background: var(--accent);
  font-size: 12px;
}
.chat-new-messages svg {
  width: 15px;
  height: 15px;
}
@media (max-width: 1199px) {
  .call-workspace.chat-open {
    grid-template-columns: minmax(0, 1fr);
  }
  .chat-panel {
    position: absolute;
    right: 0;
    bottom: 0;
    width: min(350px, 100%);
    height: 100%;
    max-height: 460px;
    z-index: 4;
    box-shadow: 0 10px 36px #0009;
  }
}
@media (max-width: 600px) {
  .chat-toggle {
    width: 34px;
    padding: 6px !important;
  }
  .chat-toggle-label {
    display: none;
  }
  .chat-unread {
    position: absolute;
    right: -5px;
    top: -6px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    font-size: 10px;
  }
  .chat-panel {
    width: 100%;
    height: 100%;
    max-height: none;
  }
  .call-workspace.chat-open > .call-layout {
    visibility: hidden;
  }
  .chat-header {
    padding: 11px 12px;
  }
  .chat-composer textarea {
    font-size: 16px;
  }
  .chat-composer-hint > span:first-child {
    display: none;
  }
  .settings-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 24px);
    border-radius: 13px;
  }
  .settings-header {
    padding: 17px 16px 14px;
  }
  .settings-header h2 {
    font-size: 23px;
  }
  .settings-header p {
    font-size: 13px;
  }
  .settings-tabs {
    gap: 4px;
    padding: 0 12px 10px;
  }
  .settings-tab {
    padding: 9px 7px;
    gap: 5px;
    font-size: 13px;
    flex: 1;
    white-space: nowrap;
  }
  .settings-tab svg {
    width: 16px;
    height: 16px;
  }
  .settings-body {
    padding: 14px;
  }
  .settings-device-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .settings-device-card {
    padding: 13px;
    gap: 9px;
  }
  .settings-toggle-grid {
    grid-template-columns: 1fr;
  }
  #settingsDialog .toggle-row strong {
    font-size: 15px;
  }
  #settingsDialog .toggle-row small {
    font-size: 13px;
  }
  .settings-footer {
    padding: 12px 14px;
    gap: 10px;
  }
  .settings-dialog .settings-footer .primary-button {
    width: auto;
    margin: 0;
    padding: 9px 13px;
  }
  #settingsFeedback {
    font-size: 11px;
  }
  .settings-refresh {
    font-size: 12px;
  }
  .settings-camera-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .settings-camera-preview {
    aspect-ratio: 16/9;
    max-height: 220px;
  }
  .settings-profile-card {
    padding: 12px;
    gap: 12px;
  }
  .settings-profile-avatar {
    width: 44px;
    height: 44px;
    font-size: 20px;
    border-radius: 10px;
  }
}

/* Keep transient notices away from the chat composer. */
body.in-call.chat-open .toast-region {
  top: 64px;
  bottom: auto;
}
@media (max-width: 900px) {
  body.in-call.chat-open .toast-region {
    top: 72px;
  }
}
