:root {
  --bg: #080c18;
  --bg-soft: #0e1424;
  --panel: rgba(17, 24, 42, .82);
  --panel-solid: #11182a;
  --panel-raised: #151e34;
  --line: rgba(160, 177, 218, .16);
  --line-strong: rgba(160, 177, 218, .28);
  --text: #f4f7ff;
  --muted: #98a4bd;
  --muted-strong: #c3cce0;
  --accent: #b5f47b;
  --accent-strong: #86d84e;
  --accent-ink: #17230e;
  --violet: #9b83ff;
  --danger: #ff7c96;
  --shadow: 0 24px 80px rgba(0, 0, 0, .32);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  min-width: 320px; min-height: 100vh; margin: 0; color: var(--text);
  background: radial-gradient(circle at 70% -10%, #1a2440 0, transparent 38%), var(--bg);
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { border: 0; cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 3px solid rgba(181, 244, 123, .34); outline-offset: 2px; }
[hidden] { display: none !important; }

.app-shell { position: relative; min-height: 100vh; overflow: hidden; }
.ambient { position: absolute; pointer-events: none; filter: blur(2px); border-radius: 999px; opacity: .2; }
.ambient-one { width: 420px; height: 420px; top: 300px; left: -230px; background: var(--violet); filter: blur(120px); }
.ambient-two { width: 360px; height: 360px; top: 60px; right: -180px; background: var(--accent); filter: blur(140px); opacity: .11; }
.topbar, .wrap { position: relative; max-width: 1180px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }
.topbar { height: 88px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(160,177,218,.08); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; }
.brand-mark { width: 36px; height: 36px; display: block; border: 1px solid rgba(181,244,123,.38); border-radius: 11px; box-shadow: 0 5px 16px rgba(0,0,0,.18); transform: rotate(-4deg); transition: transform .25s, box-shadow .25s; }
.brand:hover .brand-mark { transform: rotate(0deg) scale(1.04); box-shadow: 0 7px 20px rgba(181,244,123,.13); }
.brand-mark span { width: 3px; border-radius: 3px; background: var(--accent); }
.brand-mark span:nth-child(1) { height: 8px; opacity: .6; }.brand-mark span:nth-child(2) { height: 15px; }.brand-mark span:nth-child(3) { height: 11px; opacity: .78; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.05; }.brand-copy strong { font: 700 1.05rem "Space Grotesk", sans-serif; letter-spacing: -.03em; }.brand-copy small { margin-top: 4px; color: var(--muted); font-size: .61rem; letter-spacing: .11em; text-transform: uppercase; }
.connection-pill, .live-badge { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .73rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.connection-dot, .status-dot, .live-badge span { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(181,244,123,.1); }
.wrap { padding-top: 72px; padding-bottom: 100px; }
.hero { max-width: 720px; text-align: center; margin: 0 auto 48px; animation: rise .65s ease both; }
.eyebrow, .section-kicker, .chat-kicker { display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--accent); font-size: .65rem; font-weight: 700; letter-spacing: .2em; }
.eyebrow-line { width: 27px; height: 1px; background: var(--accent); opacity: .7; }
h1, h2, p { margin: 0; } h1, h2 { font-family: "Space Grotesk", sans-serif; }
h1 { margin: 18px 0 18px; font-size: clamp(2.55rem, 6vw, 4.7rem); line-height: .99; letter-spacing: -.075em; } h1 em { color: var(--accent); font-style: normal; }
.sub { max-width: 510px; margin: auto; color: var(--muted); font-size: 1rem; line-height: 1.65; }
.join-card { position: relative; max-width: 940px; margin: auto; padding: 28px; background: linear-gradient(135deg, rgba(22,31,54,.92), rgba(14,20,36,.88)); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); animation: rise .7s .08s ease both; }
.join-card::before { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; background: linear-gradient(110deg, rgba(181,244,123,.08), transparent 36%); }
.join-card-heading { position: relative; display: flex; align-items: center; gap: 14px; margin-bottom: 25px; }.join-card-heading h2 { font-size: 1.1rem; letter-spacing: -.03em; }.join-card-heading p { margin-top: 4px; color: var(--muted); font-size: .78rem; }.heading-icon { width: 35px; height: 35px; display: grid; place-items: center; color: var(--accent); border: 1px solid rgba(181,244,123,.25); border-radius: 10px; background: rgba(181,244,123,.08); font-size: 1.2rem; }
.join-fields { position: relative; display: flex; align-items: end; gap: 14px; }.field { display: flex; flex: 0 1 245px; flex-direction: column; gap: 9px; }.field.grow { flex: 1 1 290px; }.field label { color: var(--muted-strong); font-size: .72rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }.input-wrap { position: relative; }.input-icon { position: absolute; top: 50%; left: 14px; color: var(--muted); transform: translateY(-50%); font-size: 1rem; pointer-events: none; }.input-wrap input { width: 100%; height: 49px; padding: 0 14px 0 39px; color: var(--text); background: rgba(6,10,20,.56); border: 1px solid var(--line); border-radius: 11px; transition: border-color .2s, box-shadow .2s, background .2s; }.input-wrap input::placeholder { color: #626d85; }.input-wrap input:focus { border-color: rgba(181,244,123,.7); background: rgba(6,10,20,.8); box-shadow: 0 0 0 4px rgba(181,244,123,.08); outline: none; }
.primary-action { height: 49px; display: inline-flex; align-items: center; justify-content: space-between; gap: 28px; padding: 0 16px 0 20px; color: var(--accent-ink); background: var(--accent); border-radius: 11px; font-size: .84rem; font-weight: 700; white-space: nowrap; transition: transform .2s, background .2s, box-shadow .2s; }.primary-action:hover { background: #c8fa9d; box-shadow: 0 9px 25px rgba(181,244,123,.16); transform: translateY(-2px); }.button-arrow { font-size: 1.2rem; }.invite-action { position: relative; margin: 18px 0 0 auto; display: block; padding: 0; color: var(--muted); background: none; font-size: .73rem; transition: color .2s; }.invite-action:hover { color: var(--accent); }.invite-action span { margin-right: 5px; color: var(--accent); font-size: 1.1rem; }
.status-row { max-width: 940px; min-height: 45px; display: flex; align-items: center; gap: 10px; margin: 18px auto 34px; padding: 0 4px; }.status { color: var(--muted); font-size: .78rem; }.status-dot { width: 6px; height: 6px; opacity: .75; }
.room-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 36px; padding: 11px; background: rgba(17,24,42,.78); border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 15px 35px rgba(0,0,0,.14); }.toolbar-group { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }.toolbar-end { justify-content: flex-end; }.toolbar-label { margin: 0 8px 0 5px; color: var(--muted); font-size: .61rem; font-weight: 700; letter-spacing: .13em; }.room-toolbar button { padding: 9px 12px; color: var(--muted-strong); background: rgba(255,255,255,.035); border: 1px solid var(--line); border-radius: 9px; font-size: .73rem; transition: all .2s; }.room-toolbar button:hover { color: var(--text); background: rgba(255,255,255,.09); border-color: var(--line-strong); }.room-toolbar button.active { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }.room-toolbar button:disabled { cursor: not-allowed; opacity: .45; }.room-toolbar button.danger { color: #ffadbb; border-color: rgba(255,124,150,.2); background: rgba(255,124,150,.07); }.room-toolbar button.danger:hover { color: white; background: var(--danger); }.volume-control { display: flex; align-items: center; gap: 9px; padding: 8px 10px; color: var(--muted); border: 1px solid var(--line); border-radius: 9px; }.volume-control label { font-size: .7rem; white-space: nowrap; }.volume-control input { width: 84px; accent-color: var(--accent); }
.participants-heading { display: flex; align-items: end; justify-content: space-between; max-width: 1120px; margin: 0 auto 17px; }.section-kicker { justify-content: flex-start; margin-bottom: 7px; color: var(--muted); font-size: .6rem; letter-spacing: .18em; }.participants-heading h2 { font-size: 1.35rem; letter-spacing: -.04em; }.live-badge { padding: 7px 10px; color: var(--accent); background: rgba(181,244,123,.07); border: 1px solid rgba(181,244,123,.15); border-radius: 99px; font-size: .6rem; }.live-badge span { width: 5px; height: 5px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 17px; max-width: 1120px; margin: auto; transition: gap .25s ease; }

/* ===== Modo expandido (dentro da página, sem Fullscreen API) ===== */
/* ===== Modo expandido (dentro da página, sem Fullscreen API) ===== */
/* O card expandido vira um overlay fixo cobrindo quase a tela toda,
   por cima de tudo — os outros participantes ficam escondidos até
   voltar, pra maximizar o espaço do vídeo em destaque. */
body.has-expanded-overlay {
  overflow: hidden;
}
body.has-expanded-overlay::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 39;
  background: rgba(4, 6, 12, .96);
  backdrop-filter: blur(4px);
}

.grid.has-expanded .card:not(.expanded) {
  display: none;
}

.card.expanded {
  position: fixed;
  z-index: 40;
  top: 20px;
  left: 20px;
  right: 20px;
  bottom: 20px;
  width: auto;
  height: auto;
  aspect-ratio: auto;
  margin: 0;
  resize: none;
  border-radius: 18px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .6);
}

.card.expanded:hover {
  transform: none;
}
.expand-btn {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  padding: 5px 9px;
  color: var(--text);
  background: rgba(6,9,17,.68);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 7px;
  font-size: .72rem;
  line-height: 1;
  backdrop-filter: blur(6px);
  transition: background .2s, border-color .2s;
}
.expand-btn:hover { background: rgba(6,9,17,.9); border-color: rgba(255,255,255,.3); }
.card.expanded .expand-btn { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }

.card { position: relative; min-width: 0; min-height: 185px; overflow: hidden; aspect-ratio: 16/10; background: #090e1a; border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 12px 30px rgba(0,0,0,.16); resize: both; transition: border-color .25s, box-shadow .25s, transform .25s, width .25s ease, height .25s ease, flex-basis .25s ease; animation: card-in .42s ease both; }.card:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: 0 17px 35px rgba(0,0,0,.25); }.card.expanded:hover { transform: none; }.card.speaking { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(181,244,123,.6), 0 0 30px rgba(181,244,123,.22); }.card video[hidden], .card .avatar[hidden] { display: none !important; }.card video { width: 100%; height: 100%; display: block; object-fit: contain; background: #070b14; cursor: zoom-in; }.avatar { position: absolute; inset: 0; display: grid; place-items: center; color: white; font: 700 2rem "Space Grotesk", sans-serif; letter-spacing: .02em; }.card-label { position: absolute; z-index: 1; left: 11px; bottom: 11px; max-width: calc(100% - 22px); overflow: hidden; padding: 6px 9px; color: var(--text); background: rgba(6,9,17,.78); border: 1px solid rgba(255,255,255,.12); border-radius: 7px; backdrop-filter: blur(8px); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }.reconnect-badge { position: absolute; z-index: 2; top: 10px; right: 10px; padding: 5px 8px; color: white; background: rgba(255,124,150,.82); border-radius: 6px; font-size: .65rem; animation: pulse-badge 1.4s ease-in-out infinite; }
.chat-toggle { position: fixed; z-index: 20; right: 28px; bottom: 28px; width: 56px; height: 56px; display: grid; place-items: center; color: var(--accent-ink); background: var(--accent); border: 5px solid rgba(8,12,24,.72); border-radius: 18px; box-shadow: 0 12px 32px rgba(0,0,0,.35); font-size: 1.25rem; transition: transform .2s, background .2s; }.chat-toggle:hover { background: #c8fa9d; transform: translateY(-3px) rotate(4deg); }.chat-unread { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 4px; color: white; background: var(--danger); border: 2px solid var(--bg); border-radius: 99px; font-size: .62rem; font-weight: 700; }.chat-panel { position: fixed; z-index: 20; right: 28px; bottom: 98px; width: 350px; max-width: calc(100vw - 32px); height: 440px; max-height: calc(100vh - 130px); display: flex; flex-direction: column; overflow: hidden; background: rgba(17,24,42,.96); border: 1px solid var(--line-strong); border-radius: 18px; box-shadow: var(--shadow); animation: panel-in .25s ease both; backdrop-filter: blur(22px); }.chat-header { display: flex; align-items: center; justify-content: space-between; padding: 18px; border-bottom: 1px solid var(--line); }.chat-header > div { display: flex; flex-direction: column; gap: 4px; }.chat-kicker { justify-content: flex-start; color: var(--accent); font-size: .57rem; }.chat-header strong { font: 600 1rem "Space Grotesk", sans-serif; }.chat-close { padding: 4px; color: var(--muted); background: transparent; font-size: .85rem; }.chat-close:hover { color: var(--text); }.chat-messages { flex: 1; display: flex; flex-direction: column; gap: 9px; overflow-y: auto; padding: 16px; }.chat-msg { max-width: 85%; padding: 9px 11px; color: var(--muted-strong); background: var(--panel-raised); border: 1px solid var(--line); border-radius: 11px 11px 11px 3px; font-size: .8rem; line-height: 1.4; word-wrap: break-word; }.chat-msg.self { align-self: flex-end; color: #edffe1; background: rgba(119,171,70,.35); border-color: rgba(181,244,123,.18); border-radius: 11px 11px 3px 11px; }.chat-msg .chat-msg-name { display: block; margin-bottom: 3px; color: var(--muted); font-size: .64rem; font-weight: 700; }.chat-msg.self .chat-msg-name { color: #c8efb0; }.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }.chat-form input { flex: 1; min-width: 0; padding: 10px 12px; color: var(--text); background: rgba(6,10,20,.6); border: 1px solid var(--line); border-radius: 9px; outline: none; }.chat-form input:focus { border-color: var(--accent); }.chat-form button { width: 40px; color: var(--accent-ink); background: var(--accent); border-radius: 9px; font-size: 1.2rem; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } } @keyframes card-in { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: scale(1); } } @keyframes panel-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } } @keyframes pulse-badge { 0%,100% { opacity: 1; } 50% { opacity: .55; } }
@media (max-width: 760px) { .topbar, .wrap { padding-left: 20px; padding-right: 20px; }.topbar { height: 72px; }.connection-pill { display: none; }.wrap { padding-top: 53px; }.hero { margin-bottom: 34px; } .join-card { padding: 22px 18px; }.join-fields { align-items: stretch; flex-direction: column; gap: 15px; }.field, .field.grow { flex-basis: auto; }.primary-action { justify-content: center; }.invite-action { margin-right: 0; }.room-toolbar { align-items: stretch; flex-direction: column; }.toolbar-end { justify-content: space-between; }.grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }.grid.has-expanded .card { width: 104px; flex-basis: 104px; }.grid.has-expanded .card.expanded { height: min(52vh, 420px); }.chat-toggle { right: 18px; bottom: 18px; }.chat-panel { right: 16px; bottom: 87px; } }
@media (max-width: 430px) { h1 { font-size: 2.55rem; }.sub { font-size: .9rem; }.join-card-heading p { line-height: 1.4; }.toolbar-group { align-items: stretch; }.toolbar-group button { flex: 1 1 calc(50% - 8px); }.toolbar-label { width: 100%; }.toolbar-end { flex-direction: column; }.volume-control { justify-content: space-between; }.volume-control input { flex: 1; }.grid { grid-template-columns: 1fr; }.card { min-height: 210px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; } }


/* ===== Extensões aditivas de UX: controles, presença e visualização ===== */
.room-toolbar button, .chat-clear, .overlay-btn, .moderate-btn, .screen-overlay button { transition: all .2s ease; }
.toggle-control.active { color: var(--accent-ink) !important; background: var(--accent) !important; border-color: var(--accent) !important; }
.quality-control { display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px; color: var(--muted); border: 1px solid var(--line); border-radius: 9px; font-size: .7rem; }
.quality-control select { min-width: 82px; padding: 4px 6px; color: var(--text); background: rgba(6,10,20,.7); border: 1px solid var(--line); border-radius: 6px; outline: none; }
.quality-control select:focus { border-color: var(--accent); }
.adaptive-status { padding: 7px 9px; color: var(--muted); border: 1px solid var(--line); border-radius: 8px; font-size: .65rem; white-space: nowrap; }
.overlay-btn, .moderate-btn { position: absolute; z-index: 3; top: 10px; width: 28px; height: 26px; display: grid; place-items: center; color: var(--text); background: rgba(6,9,17,.72); border: 1px solid rgba(255,255,255,.14); border-radius: 7px; backdrop-filter: blur(8px); }
.overlay-btn { right: 44px; }
.moderate-btn { right: 10px; color: #ffbdc8; background: rgba(150,35,58,.5); }
.overlay-btn:hover, .moderate-btn:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-1px); }
.chat-header-actions { display: flex; align-items: center; gap: 8px; }
.chat-clear { padding: 5px 8px; color: var(--muted); background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 7px; font-size: .65rem; }
.chat-clear:hover { color: var(--text); border-color: var(--line-strong); }
.typing-indicator { min-height: 14px; color: var(--accent); font-size: .66rem; font-weight: 500; }
.screen-overlay { position: fixed; z-index: 35; right: 28px; bottom: 28px; width: min(520px, calc(100vw - 32px)); overflow: hidden; background: rgba(12,18,32,.93); border: 1px solid var(--line-strong); border-radius: 16px; box-shadow: var(--shadow); backdrop-filter: blur(18px); animation: panel-in .25s ease both; }
.screen-overlay-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 13px; border-bottom: 1px solid var(--line); }
.screen-overlay-head strong { flex: 1; overflow: hidden; font: 600 .78rem "Space Grotesk", sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.screen-overlay-head button { width: 25px; height: 25px; color: var(--muted); background: rgba(255,255,255,.05); border-radius: 6px; }
.screen-overlay-head button:hover { color: var(--text); background: rgba(255,255,255,.12); }
.screen-overlay video { width: 100%; max-height: 300px; display: block; object-fit: contain; background: #050812; }
.opacity-control { display: flex; align-items: center; gap: 10px; padding: 10px 13px; color: var(--muted); font-size: .68rem; }
.opacity-control input { flex: 1; accent-color: var(--accent); }
@media (max-width: 760px) {
  .quality-control { flex: 1 1 calc(50% - 8px); justify-content: space-between; }
  .adaptive-status { align-self: center; }
  .screen-overlay { right: 16px; bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) { .screen-overlay { animation: none; } }


/* ===== Overlay avançado: fullscreen, drag e janela destacada ===== */
.screen-overlay-head { cursor: grab; user-select: none; }
.screen-overlay-head:active { cursor: grabbing; }
.overlay-actions { display: flex; align-items: center; gap: 5px; }
.overlay-actions button { flex: 0 0 auto; }
.screen-overlay:fullscreen { inset: 0; width: 100vw; height: 100vh; max-width: none; border: 0; border-radius: 0; background: rgba(4,6,12,.92); }
.screen-overlay:fullscreen video { width: 100%; height: calc(100vh - 94px); max-height: none; }
.screen-overlay:fullscreen .screen-overlay-head { padding: 16px 20px; }
@media (max-width: 560px) {
  .screen-overlay { width: calc(100vw - 24px); right: 12px; bottom: 12px; }
  .overlay-actions { gap: 2px; }
}


/* Overlay web: exibe somente o vídeo remoto com alpha; a versão Electron
   usa janela nativa transparente para revelar o aplicativo atrás. */
.overlay-stage { position: relative; width: 100%; height: 300px; overflow: hidden; background: #050812; }
.overlay-stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.overlay-front-video { z-index: 2; background: transparent !important; }
.screen-overlay:fullscreen .overlay-stage { height: calc(100vh - 94px); }
.screen-overlay:fullscreen .overlay-stage video { width: 100%; height: 100%; max-height: none; }


/* ===== Modo sala ao vivo: foco no conteúdo e menor ruído visual ===== */
body.in-room .hero,
body.in-room .join-card { display: none; }
body.in-room .wrap { max-width: 1440px; padding-top: 28px; padding-bottom: 42px; }
body.in-room .status-row { max-width: none; min-height: 30px; margin: 0 0 18px; padding: 0 2px; }
body.in-room .room-toolbar { position: sticky; top: 12px; z-index: 12; max-width: 1180px; margin: 0 auto 28px; padding: 10px 12px; background: rgba(10,16,29,.9); backdrop-filter: blur(18px); }
body.in-room .participants-heading { max-width: 1360px; margin-bottom: 14px; }
body.in-room .grid { max-width: 1360px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
body.in-room .card { min-height: 220px; border-radius: 13px; }
body.in-room .topbar { max-width: 1440px; height: 70px; }
body.in-room .ambient { opacity: .08; }
.room-toolbar .toolbar-label { flex-basis: 100%; margin-bottom: 1px; }
.room-toolbar .toolbar-group:first-child { flex: 1 1 auto; }
.room-toolbar .toolbar-end { flex: 0 0 auto; }
.room-toolbar button { white-space: nowrap; }
.room-toolbar .quality-control { white-space: nowrap; }
.screen-overlay { border-color: rgba(181,244,123,.28); }
.screen-overlay-head { background: rgba(10,16,29,.92); }
@media (min-width: 1100px) {
  body.in-room .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.in-room .grid:has(.card:nth-child(3)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  body.in-room .room-toolbar { position: relative; top: 0; }
  body.in-room .grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .room-toolbar .toolbar-end { width: 100%; justify-content: flex-start; }
}
@media (max-width: 560px) {
  body.in-room .wrap { padding-top: 16px; }
  body.in-room .participants-heading { align-items: center; }
  body.in-room .grid { grid-template-columns: 1fr; }
  body.in-room .card { min-height: 210px; }
  .room-toolbar .toolbar-group:first-child { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .room-toolbar .toolbar-label { grid-column: 1 / -1; }
  .room-toolbar .toolbar-group:first-child button,
  .room-toolbar .quality-control { min-width: 0; width: 100%; }
  .room-toolbar .quality-control { justify-content: space-between; }
}


/* ===== Volume individual por participante ===== */
.card { cursor: pointer; }
.peer-volume-pop { position: fixed; z-index: 9999; width: 230px; padding: 12px 14px 10px; color: var(--text); background: var(--panel-solid); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 18px 40px rgba(0,0,0,.45); animation: card-in .18s ease both; }
.peer-volume-pop[hidden] { display: none; }
.pvp-title { margin-bottom: 9px; overflow: hidden; font: 600 .8rem "DM Sans", sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.pvp-row { display: flex; align-items: center; gap: 9px; }
.pvp-mute { flex: 0 0 auto; width: 30px; height: 28px; padding: 0; display: grid; place-items: center; color: var(--text); background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); border-radius: 7px; cursor: pointer; }
.pvp-mute:hover { border-color: var(--accent); }
.pvp-mute.active { color: #ffbdc8; background: rgba(150,35,58,.5); border-color: rgba(255,124,150,.5); }
.pvp-slider { flex: 1; min-width: 0; height: 6px; margin: 0; cursor: pointer; appearance: none; -webkit-appearance: none; background: linear-gradient(to right, var(--accent) var(--fill, 100%), rgba(255,255,255,.16) var(--fill, 100%)); border-radius: 99px; outline: none; }
.pvp-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 15px; height: 15px; background: #fff; border-radius: 50%; box-shadow: 0 1px 4px rgba(0,0,0,.5); }
.pvp-slider::-moz-range-thumb { width: 15px; height: 15px; background: #fff; border: 0; border-radius: 50%; }
.pvp-pct { flex: 0 0 42px; text-align: right; font-size: .72rem; color: var(--muted-strong); font-variant-numeric: tabular-nums; }
.pvp-hint { margin-top: 8px; font-size: .62rem; color: var(--muted); }
