/* ===============================================================
   Órbita — layout da aplicação.
   =============================================================== */

/* ---------------------------------------------------------- titlebar */

.titlebar {
  position: fixed; inset: 0 0 auto; z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  height: var(--titlebar-h);
  background: var(--bg-elev);
  border-bottom: 1px solid var(--line-soft);
}
body.is-desktop { padding-top: var(--titlebar-h); }
.titlebar__drag { display: flex; align-items: center; gap: 9px; flex: 1; height: 100%; padding-left: 13px; -webkit-app-region: drag; }
/* A marca: um V, desenhado em SVG para ficar igual no titulo, na entrada
   e no icone do aplicativo. Herda a cor do acento. */
.mark { width: 26px; height: 26px; color: var(--accent); flex: none; }
.mark--sm { width: 16px; height: 16px; }
.mark path, .mark rect { stroke-linecap: round; }
.titlebar__name { font-size: 12.5px; font-weight: 600; letter-spacing: 0.02em; color: var(--text-dim); }
.titlebar__actions { display: flex; -webkit-app-region: no-drag; }
.winbtn { width: 44px; height: var(--titlebar-h); display: grid; place-items: center; background: transparent; border: 0; color: var(--text-dim); cursor: pointer; transition: background var(--fast); }
.winbtn svg { width: 10px; height: 10px; stroke-width: 1.3; }
.winbtn:hover { background: var(--bg-hover); color: var(--text); }
.winbtn--close:hover { background: var(--danger); color: #fff; }

/* ---------------------------------------------------------- gate */

.gate {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-content: center; gap: 26px; justify-items: center;
  padding: 40px;
  background:
    radial-gradient(900px 480px at 50% -10%, var(--accent-soft), transparent 70%),
    var(--bg);
}
.gate__panel {
  width: min(384px, 92vw);
  padding: 30px 28px 26px;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: rise var(--slow) both;
}
.gate__brand { display: flex; align-items: center; gap: 11px; }

.gate__sub { margin-top: 7px; color: var(--text-dim); font-size: 13.5px; }
.gate__form { display: flex; flex-direction: column; gap: 15px; margin-top: 24px; }
.gate__advanced summary { font-size: 12.5px; color: var(--text-faint); cursor: pointer; list-style: none; }
.gate__advanced summary::-webkit-details-marker { display: none; }
.gate__advanced summary::before { content: "+ "; }
.gate__advanced[open] summary::before { content: "− "; }
.gate__advanced[open] { display: flex; flex-direction: column; gap: 12px; }
.gate__error { min-height: 16px; font-size: 12.5px; color: var(--danger); }
.gate__foot { font-size: 11.5px; color: var(--text-faint); }

/* ---------------------------------------------------------- shell */

.app {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr) 0;
  height: 100%;
  transition: grid-template-columns var(--slow);
}
.app.with-chat { grid-template-columns: var(--rail-w) minmax(0, 1fr) var(--chat-w); }
body.is-desktop .app { height: calc(100% - var(--titlebar-h)); }

/* ---------------------------------------------------------- rail */

.rail {
  display: flex; flex-direction: column;
  min-height: 0;
  background: var(--bg-elev);
  border-right: 1px solid var(--line-soft);
}
.rail__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 15px var(--pad) 12px; border-bottom: 1px solid var(--line-soft); }
.rail__server { font-size: 14px; font-weight: 640; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail__section { padding: 13px 8px 0; min-height: 0; display: flex; flex-direction: column; }
.rail__title { display: flex; align-items: center; justify-content: space-between; padding: 0 7px 7px; font-size: 11px; font-weight: 650; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-faint); }
.rail__spacer { flex: 1; min-height: 8px; }

.rooms { list-style: none; margin: 0; padding: 0 0 8px; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; }
.room { border-radius: var(--radius-sm); }
.room__btn {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 8px 9px; font: inherit; font-size: 13.5px; color: var(--text-dim);
  background: transparent; border: 0; border-radius: var(--radius-sm); cursor: pointer; text-align: left;
  transition: background var(--fast), color var(--fast);
}
.room__btn:hover { background: var(--bg-hover); color: var(--text); }
.room.is-active .room__btn { background: var(--bg-active); color: var(--text); font-weight: 550; }
.room__hash { color: var(--text-faint); font-weight: 500; }
.room__name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room__badge { font-size: 11px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.room__members { display: flex; flex-direction: column; gap: 1px; padding: 2px 0 6px 12px; }
.member { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: var(--radius-xs); font-size: 12.5px; color: var(--text-dim); }
.member .avatar { width: 21px; height: 21px; font-size: 9px; border-radius: 34%; }
.member__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.member__tags { display: flex; gap: 4px; color: var(--text-faint); }
.member__tags svg { width: 13px; height: 13px; }
.member.is-speaking .avatar { box-shadow: 0 0 0 2px var(--live); }
.member.is-muted { opacity: 0.55; }

.me { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 10px var(--pad) 12px; border-top: 1px solid var(--line-soft); background: var(--bg-panel); }
.me__id { display: flex; align-items: center; gap: 9px; min-width: 0; }
.me__text { min-width: 0; display: flex; flex-direction: column; }
.me__name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me__meta { font-size: 11px; color: var(--text-faint); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me__controls { display: flex; gap: 1px; }
.me__level { grid-column: 1 / -1; height: 3px; border-radius: 99px; background: var(--bg-active); overflow: hidden; }
.me__level span { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--live); transition: width 90ms linear; }

/* ---------------------------------------------------------- stage */

.stage { display: flex; flex-direction: column; min-width: 0; position: relative; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 16px; border-bottom: 1px solid var(--line-soft); background: var(--bg); }
.topbar__where { display: flex; align-items: baseline; gap: 9px; min-width: 0; }
.topbar__count { font-size: 12px; color: var(--text-faint); white-space: nowrap; }
.topbar__actions { display: flex; align-items: center; gap: 6px; }

.stage__body { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: safe center; gap: 12px; padding: 14px 16px 16px; overflow-y: auto; }

.spotlight { flex: 1; min-height: 0; display: flex; width: 100%; }
.spotlight__frame { position: relative; flex: 1; min-height: 260px; border-radius: var(--radius); overflow: hidden; background: #000; border: 1px solid var(--line); }
.spotlight video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.spotlight__bar {
  position: absolute; inset: auto 0 0; display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  background: linear-gradient(to top, rgb(0 0 0 / 0.72), transparent);
  opacity: 0; transition: opacity var(--fast);
}
.spotlight__frame:hover .spotlight__bar, .spotlight__frame:focus-within .spotlight__bar { opacity: 1; }
.spotlight__who { font-size: 13px; font-weight: 600; color: #fff; }
.spotlight__tech { font-family: var(--mono); font-size: 11px; color: rgb(255 255 255 / 0.62); font-variant-numeric: tabular-nums; }
.spotlight__tools { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.spotlight__tools .icon-btn { color: rgb(255 255 255 / 0.8); }
.spotlight__tools .icon-btn:hover { background: rgb(255 255 255 / 0.14); color: #fff; }
.slider { display: flex; align-items: center; gap: 6px; color: rgb(255 255 255 / 0.8); }
.slider svg { width: 15px; height: 15px; }
.slider input { width: 78px; accent-color: var(--accent); }

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 10px;
  align-content: center;
  width: 100%; max-width: 1480px; margin-inline: auto;
}
.stage__body.has-spotlight .tiles { display: flex; max-width: none; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.stage__body.has-spotlight .tile { flex: 0 0 156px; max-width: none; }
.stage__body.has-spotlight .tile .avatar--lg { width: 44px; height: 44px; font-size: 15px; }
.tile {
  position: relative; aspect-ratio: 16 / 10;
  width: 100%; max-width: 460px; justify-self: center;
  display: grid; place-items: center;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--fast), box-shadow var(--fast);
}
.tile.is-speaking { border-color: var(--live); box-shadow: 0 0 0 1px var(--live); }
.tile.is-sharing { border-color: var(--accent); }
.tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.tile__foot { position: absolute; inset: auto 0 0; display: flex; align-items: center; gap: 6px; padding: 7px 9px; background: linear-gradient(to top, rgb(0 0 0 / 0.62), transparent); color: #fff; font-size: 12px; }
.tile--novideo .tile__foot { background: transparent; color: var(--text-dim); }
.tile__foot .avatar { display: none; }
.tile__name { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile__icons { margin-left: auto; display: flex; gap: 5px; opacity: 0.85; }
.tile__icons svg { width: 13px; height: 13px; }
.tile__live { position: absolute; top: 8px; left: 8px; display: flex; align-items: center; gap: 5px; padding: 3px 7px; border-radius: 99px; background: rgb(0 0 0 / 0.55); color: #fff; font-size: 10.5px; font-weight: 650; letter-spacing: 0.04em; }
.tile__live::before { content: ""; width: 5px; height: 5px; border-radius: 99px; background: var(--danger); }
.tile__watch { position: absolute; inset: 0; border: 0; background: transparent; cursor: pointer; }


.empty { display: grid; place-content: center; justify-items: center; gap: 7px; text-align: center; color: var(--text-dim); padding: 18px 40px 8px; }
.stage__body:has(#tiles:empty) .empty { flex: 1; padding: 40px; }
.empty__art { width: 52px; height: 52px; color: var(--line); margin-bottom: 4px; }
.empty h3 { color: var(--text); }
.empty p { font-size: 13px; max-width: 320px; }
.empty .btn { margin-top: 8px; }

/* ---------------------------------------------------------- diagnóstico */

.diag {
  position: absolute; right: 16px; bottom: 16px; z-index: 20;
  width: min(430px, calc(100% - 32px));
  padding: 12px 13px 11px;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  animation: rise var(--fast) both;
}
.diag__head { display: flex; align-items: center; justify-content: space-between; font-size: 11px; font-weight: 650; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 8px; }
.diag__table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.diag__table th { text-align: left; font-weight: 500; color: var(--text-faint); padding: 3px 6px 5px 0; border-bottom: 1px solid var(--line-soft); }
.diag__table td { padding: 3px 6px 3px 0; color: var(--text-dim); border-bottom: 1px solid var(--line-soft); }
.diag__table td:first-child { color: var(--text); font-family: var(--font); }
.diag__table .bad { color: var(--danger); }
.diag__table .warn { color: #eab308; }
.diag__note { margin-top: 8px; font-size: 11.5px; color: var(--text-faint); }

/* ---------------------------------------------------------- chat */

.chat { display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: var(--bg-elev); border-left: 1px solid var(--line-soft); }
.app:not(.with-chat) .chat { display: none; }
.chat__head { display: flex; align-items: baseline; gap: 8px; padding: 13px var(--pad); border-bottom: 1px solid var(--line-soft); font-size: 13px; font-weight: 600; }
.chat__room { font-size: 11.5px; font-weight: 500; color: var(--text-faint); }
.chat__log { flex: 1; overflow-y: auto; padding: 12px var(--pad); display: flex; flex-direction: column; gap: 12px; }
.msg { display: grid; grid-template-columns: auto 1fr; gap: 9px; animation: rise var(--fast) both; }
.msg__body { min-width: 0; }
.msg__head { display: flex; align-items: baseline; gap: 7px; }
.msg__who { font-size: 12.5px; font-weight: 600; }
.msg__at { font-size: 10.5px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.msg__text { font-size: 13.5px; color: var(--text-dim); overflow-wrap: anywhere; white-space: pre-wrap; }
.msg__text a { color: var(--accent); }
.msg--system { grid-template-columns: 1fr; }
.msg--system .msg__text { font-size: 12px; color: var(--text-faint); text-align: center; font-style: italic; }
.chat__form { display: flex; align-items: center; gap: 4px; padding: 9px 10px; border-top: 1px solid var(--line-soft); }

/* ---------------------------------------------------------- modais */

.modal { padding: 0; border: 0; background: transparent; max-width: none; max-height: none; }
.modal::backdrop { background: rgb(0 0 0 / 0.55); backdrop-filter: blur(3px); }
.modal__inner {
  width: min(560px, 94vw); max-height: 88vh; display: flex; flex-direction: column;
  background: var(--bg-panel); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: rise var(--fast) both;
}
.modal--wide .modal__inner { width: min(860px, 94vw); }
.modal--slim .modal__inner { width: min(400px, 94vw); }
.modal__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 12px; }
.modal__body { padding: 4px 18px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.modal__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 13px 18px; border-top: 1px solid var(--line-soft); }
.modal__foot--split { justify-content: space-between; align-items: center; }

.tabs { display: flex; gap: 2px; padding: 0 18px; border-bottom: 1px solid var(--line-soft); }
.tab { position: relative; padding: 9px 11px; font: inherit; font-size: 13px; color: var(--text-dim); background: transparent; border: 0; cursor: pointer; transition: color var(--fast); }
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--text); font-weight: 550; }
.tab.is-active::after { content: ""; position: absolute; inset: auto 8px -1px; height: 2px; border-radius: 2px; background: var(--accent); }
.panel { display: none; flex-direction: column; gap: 16px; }
.panel.is-active { display: flex; }

.budget { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 6px; }
.budget__cell { padding: 8px 9px; background: var(--bg-hover); border-radius: var(--radius-xs); }
.budget__k { font-size: 10.5px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.05em; }
.budget__v { font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }

.sources { display: grid; grid-template-columns: repeat(auto-fill, minmax(184px, 1fr)); gap: 10px; padding: 16px 18px; overflow-y: auto; max-height: 52vh; }
.source { padding: 0; background: var(--bg-elev); border: 1.5px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; text-align: left; transition: border-color var(--fast), transform var(--fast); }
.source:hover { border-color: var(--text-faint); transform: translateY(-1px); }
.source.is-picked { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.source img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: #000; }
.source__label { display: block; padding: 7px 9px; font-size: 12px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------- toasts */

.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 70; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 9px;
  max-width: 340px; padding: 10px 13px;
  font-size: 13px; color: var(--text);
  background: var(--bg-panel); border: 1px solid var(--line);
  border-radius: var(--radius-sm); box-shadow: var(--shadow);
  animation: rise var(--fast) both;
}
.toast::before { content: ""; width: 6px; height: 6px; border-radius: 99px; background: var(--accent); flex: none; }
.toast[data-kind="erro"]::before { background: var(--danger); }
.toast[data-kind="aviso"]::before { background: #eab308; }

.audio-sink { position: fixed; width: 0; height: 0; overflow: hidden; }

/* ---------------------------------------------------------- responsivo */

@media (max-width: 900px) {
  .app, .app.with-chat { grid-template-columns: 1fr; }
  .rail { position: fixed; inset: 0 auto 0 0; width: 82vw; max-width: 300px; z-index: 40; transform: translateX(-100%); transition: transform var(--slow); }
  .app.rail-open .rail { transform: none; box-shadow: var(--shadow-lg); }
  .chat { position: fixed; inset: 0 0 0 auto; width: min(88vw, 360px); z-index: 40; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------------------------------------------------------- áudio por pessoa */

.member { width: 100%; font: inherit; text-align: left; background: transparent; border: 0; cursor: pointer; }
.member:hover { background: var(--bg-hover); color: var(--text); }
.member.is-silenced { opacity: 0.5; }
.member.is-silenced .member__name { text-decoration: line-through; }

.tile__audio {
  display: grid; place-items: center;
  width: 26px; height: 26px; padding: 0; margin-left: 2px;
  color: rgb(255 255 255 / 0.85);
  background: rgb(0 0 0 / 0.35);
  border: 0; border-radius: var(--radius-xs);
  cursor: pointer; opacity: 0; transition: opacity var(--fast), background var(--fast);
}
.tile__audio svg { width: 14px; height: 14px; }
.tile:hover .tile__audio, .tile__audio:focus-visible { opacity: 1; }
.tile__audio:hover { background: rgb(0 0 0 / 0.6); }
.tile__audio.is-off { opacity: 1; color: var(--danger); }
.tile.is-silenced { border-style: dashed; }

.pop {
  position: fixed; z-index: 80;
  width: 268px; padding: 12px 13px 11px;
  display: flex; flex-direction: column; gap: 10px;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  animation: rise var(--fast) both;
}
.pop__head { display: flex; align-items: center; gap: 8px; }
.pop__name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pop__row { display: flex; align-items: center; gap: 9px; color: var(--text-dim); }
.pop__row svg { width: 16px; height: 16px; flex: none; }
.pop__range { flex: 1; accent-color: var(--accent); }
.pop__value { font-size: 11.5px; font-variant-numeric: tabular-nums; color: var(--text-dim); min-width: 34px; text-align: right; }
.pop__meter { height: 3px; border-radius: 99px; background: var(--bg-active); overflow: hidden; }
.pop__meter span { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--live); transition: width 80ms linear; }
.pop__check { font-size: 12.5px; }
.pop__btn { width: 100%; justify-content: center; }
.pop__hint { font-size: 11px; color: var(--text-faint); line-height: 1.4; }

/* ---------------------------------------------------------- chat com mídia */

.chat__log { position: relative; }
.chat__more {
  display: block; margin: 0 auto 10px; padding: 5px 11px;
  font: inherit; font-size: 11.5px; color: var(--text-dim);
  background: var(--bg-hover); border: 1px solid var(--line);
  border-radius: 99px; cursor: pointer; transition: background var(--fast);
}
.chat__more:hover { background: var(--bg-active); color: var(--text); }

.msg { position: relative; }
.msg--grouped { margin-top: -6px; }
.msg__gutter { width: 30px; }
.msg--gone .msg__body { opacity: 0.6; }
.msg__text--gone { font-style: italic; color: var(--text-faint); }
.msg.is-highlighted { animation: destaque 1.4s var(--ease); }
@keyframes destaque {
  0%, 60% { background: var(--accent-soft); }
  100% { background: transparent; }
}
.msg.is-highlighted { border-radius: var(--radius-xs); }

.msg__tools {
  position: absolute; top: -8px; right: 0;
  display: flex; gap: 2px; padding: 2px;
  background: var(--bg-panel); border: 1px solid var(--line);
  border-radius: var(--radius-xs); box-shadow: var(--shadow-sm);
  opacity: 0; pointer-events: none; transition: opacity var(--fast);
}
.msg:hover .msg__tools, .msg:focus-within .msg__tools { opacity: 1; pointer-events: auto; }
.msg__tool {
  display: grid; place-items: center; width: 24px; height: 24px; padding: 0;
  color: var(--text-dim); background: transparent; border: 0;
  border-radius: var(--radius-xs); cursor: pointer; transition: background var(--fast), color var(--fast);
}
.msg__tool svg { width: 13px; height: 13px; }
.msg__tool:hover { background: var(--bg-hover); color: var(--text); }
.msg__tool--danger:hover { background: var(--danger-soft); color: var(--danger); }

.msg__quote {
  display: flex; gap: 6px; align-items: baseline;
  width: 100%; margin-bottom: 4px; padding: 4px 8px;
  font: inherit; font-size: 11.5px; text-align: left;
  color: var(--text-faint);
  background: var(--bg-hover);
  border: 0; border-left: 2px solid var(--accent);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  cursor: pointer; overflow: hidden;
}
.msg__quote:hover { background: var(--bg-active); }
.msg__quote-who { font-weight: 600; color: var(--text-dim); flex: none; }
.msg__quote-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.media__wrap { margin: 6px 0 0; display: flex; flex-direction: column; gap: 3px; }
.media { max-width: 100%; border-radius: var(--radius-sm); display: block; }
.media--image { cursor: zoom-in; background: var(--bg-hover); max-height: 320px; object-fit: contain; object-position: left; }
.media--video { background: #000; max-height: 320px; }
.media__audio { margin-top: 6px; display: flex; flex-direction: column; gap: 3px; }
.media--audio { width: 100%; height: 34px; }
.media__meta { font-size: 10.5px; color: var(--text-faint); }
.media__file {
  display: inline-block; margin-top: 6px; padding: 7px 11px;
  font-size: 12px; color: var(--text);
  background: var(--bg-hover); border: 1px solid var(--line);
  border-radius: var(--radius-sm); text-decoration: none;
}
.media__file:hover { border-color: var(--accent); }

.chat__reply {
  display: flex; align-items: center; gap: 8px;
  margin: 0 10px; padding: 7px 9px;
  background: var(--bg-hover); border-radius: var(--radius-sm);
  animation: rise var(--fast) both;
}
.chat__reply-bar { width: 2px; align-self: stretch; background: var(--accent); border-radius: 2px; }
.chat__reply-body { min-width: 0; display: flex; flex-direction: column; }
.chat__reply-who { font-size: 11px; font-weight: 600; color: var(--accent); }
.chat__reply-text { font-size: 12px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.chat__queue { display: flex; flex-direction: column; gap: 4px; padding: 0 10px; }
.chat__queue:empty { display: none; }
.queue__item {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 8px;
  padding: 7px 9px; background: var(--bg-hover); border-radius: var(--radius-sm);
  font-size: 11.5px; color: var(--text-dim);
}
.queue__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue__size { font-variant-numeric: tabular-nums; }
.queue__track { grid-column: 1 / -1; height: 3px; border-radius: 99px; background: var(--bg-active); overflow: hidden; }
.queue__bar { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width 120ms linear; }

#btnRecord.is-recording { color: var(--danger); background: var(--danger-soft); }
#btnRecord.is-recording svg { animation: pulse 1s infinite; }

.chat__drop {
  position: absolute; inset: 0; z-index: 30;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 550; color: var(--accent);
  background: color-mix(in srgb, var(--bg-elev) 88%, transparent);
  border: 2px dashed var(--accent); border-radius: var(--radius);
  pointer-events: none;
}
.chat { position: relative; }

.lightbox {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center; padding: 40px;
  background: rgb(0 0 0 / 0.86);
  animation: rise var(--fast) both;
}
.lightbox img { max-width: 100%; max-height: 100%; border-radius: var(--radius-sm); }
.lightbox__close {
  position: absolute; top: 16px; right: 16px;
  display: grid; place-items: center; width: 38px; height: 38px;
  color: #fff; background: rgb(255 255 255 / 0.12); border: 0;
  border-radius: 50%; cursor: pointer;
}
.lightbox__close svg { width: 18px; height: 18px; }
.lightbox__close:hover { background: rgb(255 255 255 / 0.22); }
