:root {
  --fundo: #0b0d14; --lado: #11141d; --cartao: #171b26; --linha: #232838; --texto: #e6e8ef; --suave: #8b91a7;
  --cor: #7c5cff; --cor2: #a48bff; --verde: #22c55e; --vermelho: #ef4444; --amarelo: #f59e0b;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--fundo); color: var(--texto); font: 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
button, input, select { font: inherit; color: inherit; }
.oculto { display: none !important; }
.logo { font-weight: 800; font-size: 34px; letter-spacing: -1px; }
.logo span { color: var(--cor2); }
.logo.peq { font-size: 22px; }

/* entrada */
.entrada { min-height: 100%; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(1200px 600px at 50% 120%, #3b2a8a55, transparent), var(--fundo); }
.cartao { background: var(--cartao); border: 1px solid var(--linha); border-radius: 18px; padding: 28px; width: 100%; max-width: 380px; display: grid; gap: 14px; }
.cartao.largo { max-width: 460px; }
.sub { margin: -8px 0 6px; color: var(--suave); }
label { display: grid; gap: 6px; font-size: 13px; color: var(--suave); }
input:not([type=checkbox]):not([type=range]), select { background: #0f121a; border: 1px solid var(--linha); border-radius: 10px; padding: 11px 12px; outline: none; color: var(--texto); width: 100%; }
input:focus, select:focus { border-color: var(--cor); }
.btn { border: 1px solid var(--linha); background: #1e2331; border-radius: 10px; padding: 10px 14px; cursor: pointer; font-weight: 600; }
.btn:hover { background: #262c3d; }
.btn.primario { background: var(--cor); border-color: var(--cor); color: #fff; }
.btn.primario:hover { background: #6a48f5; }
.btn.perigo { background: #3a1820; border-color: #5b2230; color: #fca5a5; }
.btn.peq { padding: 6px 10px; font-size: 13px; }
.btn:disabled { opacity: .6; cursor: wait; }
.erro { color: #fca5a5; min-height: 18px; margin: 0; font-size: 13px; }

/* app */
.app { display: grid; grid-template-columns: 290px 1fr; height: 100%; }
.lado { background: var(--lado); border-right: 1px solid var(--linha); display: flex; flex-direction: column; min-height: 0; }
.lado-topo { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 10px; }
.online { font-size: 12px; color: var(--suave); }
.salas { flex: 1; overflow-y: auto; padding: 4px 8px; }
.sala { border-radius: 10px; padding: 8px 10px; cursor: pointer; margin-bottom: 2px; }
.sala:hover { background: #1a1f2c; }
.sala.atual { background: #1f1a38; }
.sala-l { display: flex; align-items: center; gap: 8px; }
.sala-l svg { width: 18px; height: 18px; color: var(--suave); flex: none; }
.sala.atual .sala-l svg, .sala.cheia-gente .sala-l svg { color: var(--verde); }
.sala-n { flex: 1; font-weight: 600; }
.sala-q { font-size: 11px; color: var(--suave); background: #0f121a; border-radius: 6px; padding: 1px 6px; }
.pessoas { margin: 4px 0 2px 26px; display: grid; gap: 3px; }
.pessoa { display: flex; align-items: center; gap: 7px; font-size: 13px; color: #c3c7d6; }
.pessoa .mini { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 700; color: #fff; flex: none; }
.pessoa .ao-vivo { font-size: 10px; background: var(--vermelho); color: #fff; border-radius: 4px; padding: 0 4px; font-weight: 700; }

.eu { display: flex; align-items: center; gap: 6px; padding: 10px; border-top: 1px solid var(--linha); background: #0e1119; }
.eu-nome { flex: 1; min-width: 0; display: grid; }
.eu-nome b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.eu-nome small { color: var(--suave); font-size: 11px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; flex: none; }
.ic { width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; display: grid; place-items: center; color: #c3c7d6; padding: 0; }
.ic:hover { background: #1e2331; }
.ic svg { width: 20px; height: 20px; }
.ic.desl { color: var(--vermelho); }

.palco { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.palco-topo { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--linha); }
.titulo { flex: 1; display: grid; min-width: 0; }
.titulo span { font-weight: 700; font-size: 17px; }
.titulo small { color: var(--suave); font-size: 12px; }
.qualidade { font-size: 12px; color: var(--suave); }
.qualidade.boa { color: var(--verde); } .qualidade.media { color: var(--amarelo); } .qualidade.ruim { color: var(--vermelho); }
.so-celular { display: none; }

.vazio { flex: 1; display: grid; place-content: center; text-align: center; padding: 30px; color: var(--suave);
  background: radial-gradient(900px 500px at 50% 110%, #3b2a8a40, transparent); }
.vazio h2 { color: var(--texto); margin: 10px 0 4px; }
.vazio p { max-width: 380px; margin: 0 auto; }
.vazio-ic { width: 64px; height: 64px; margin: 0 auto; border-radius: 18px; background: #1f1a38; display: grid; place-items: center; color: var(--cor2); }
.vazio-ic svg { width: 32px; height: 32px; }

.na-sala { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 320px;
  background: radial-gradient(900px 500px at 50% 110%, #3b2a8a33, transparent); }
.centro { overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.chat { border-left: 1px solid var(--linha); background: #0e1119cc; display: flex; flex-direction: column; min-height: 0; }
.chat-topo { padding: 12px 14px; border-bottom: 1px solid var(--linha); font-weight: 700; display: grid; }
.chat-topo small { font-weight: 400; color: var(--suave); font-size: 11px; }
.chat-lista { flex: 1; overflow-y: auto; padding: 10px 12px; display: grid; align-content: start; gap: 10px; }
.msg { display: grid; grid-template-columns: 28px 1fr; gap: 8px; }
.msg .mini { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; }
.msg-c { display: flex; align-items: baseline; gap: 6px; }
.msg-c b { font-size: 13px; }
.msg-c small { color: var(--suave); font-size: 11px; }
.msg-t { font-size: 14px; color: #d4d7e2; overflow-wrap: anywhere; white-space: pre-wrap; }
.msg-t a { color: var(--cor2); }
.msg.bot .msg-t { background: #1a1f2c; border-left: 3px solid var(--cor); padding: 6px 8px; border-radius: 6px; }
.tag { font-size: 9px; background: var(--cor); color: #fff; border-radius: 4px; padding: 1px 4px; font-weight: 700; vertical-align: middle; }
.chat-form { display: flex; gap: 6px; padding: 10px; border-top: 1px solid var(--linha); }
.chat-form input { flex: 1; }
.tile.musica { grid-column: span 2; cursor: pointer; }
.musica-player { width: 200px; height: 200px; border-radius: 10px; overflow: hidden; background: #000; }
.musica-player iframe { display: block; }
.grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.tile { background: var(--cartao); border: 2px solid var(--linha); border-radius: 16px; padding: 18px 12px 12px; display: grid; justify-items: center; gap: 8px; position: relative; cursor: pointer; transition: border-color .12s; }
.tile.falando { border-color: var(--verde); box-shadow: 0 0 0 3px #22c55e30; }
.tile .avatar { width: 64px; height: 64px; font-size: 22px; }
.tile .nm { font-weight: 600; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .icones { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; }
.tile .icones svg { width: 16px; height: 16px; color: var(--vermelho); }
.tile .voce { font-size: 11px; color: var(--suave); }
.tile .ruim { font-size: 11px; color: var(--amarelo); }

.telas-aviso { display: grid; gap: 8px; }
.telas-aviso:empty { display: none; }
.tela-conv { display: flex; align-items: center; gap: 10px; background: #1f1a38; border: 1px solid #3a2f6b; border-radius: 12px; padding: 10px 12px; }
.tela-conv span { flex: 1; }
.tela-conv .ao-vivo { font-size: 10px; background: var(--vermelho); color: #fff; border-radius: 4px; padding: 1px 5px; font-weight: 700; margin-right: 6px; }
.tela-box { flex: none; background: #000; border-radius: 14px; overflow: hidden; border: 1px solid var(--linha); }
.tela-topo { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: #0e1119; font-size: 13px; }
.tela-topo span:first-child { flex: 1; }
.tela-acoes { display: flex; gap: 6px; }
.tela-video { aspect-ratio: 16/9; max-height: 70vh; display: grid; place-items: center; color: var(--suave); }
.tela-video video { width: 100%; height: 100%; object-fit: contain; background: #000; }

.barra { display: flex; justify-content: center; align-items: center; gap: 12px; padding: 12px; border-top: 1px solid var(--linha); background: var(--lado); }
.redondo { width: 50px; height: 50px; border-radius: 50%; border: 0; background: #232838; cursor: pointer; display: grid; place-items: center; color: #e6e8ef; }
.redondo:hover { background: #2c3245; }
.redondo svg { width: 22px; height: 22px; }
.redondo.desl { background: #3a1820; color: #fca5a5; }
.redondo.ativo { background: var(--verde); color: #fff; }
.redondo.sair { background: var(--vermelho); }
.tela-grupo { display: flex; align-items: center; gap: 4px; background: #181c28; border-radius: 30px; padding-right: 6px; }
.tela-grupo select { width: auto; padding: 6px 8px; border-radius: 8px; font-size: 13px; }

.janela { position: fixed; inset: 0; background: #000a; display: grid; place-items: center; padding: 16px; z-index: 20; }
.jan-topo { display: flex; align-items: center; justify-content: space-between; }
.jan-topo h3 { margin: 0; }
.chave { grid-template-columns: auto 1fr; align-items: start; gap: 10px; cursor: pointer; }
.chave input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--cor); }
.chave b { color: var(--texto); font-weight: 600; display: block; }
.chave small { color: var(--suave); }
.medidor { display: grid; gap: 6px; font-size: 13px; color: var(--suave); }
.barra-nivel { height: 8px; background: #0f121a; border-radius: 5px; overflow: hidden; }
.barra-nivel i { display: block; height: 100%; width: 0; background: var(--verde); transition: width .08s; }
hr { border: 0; border-top: 1px solid var(--linha); width: 100%; }

.vol { position: fixed; z-index: 30; background: var(--cartao); border: 1px solid var(--linha); border-radius: 12px; padding: 12px; display: grid; gap: 6px; width: 220px; box-shadow: 0 10px 30px #0008; }
.vol small { color: var(--suave); }
.vol input { accent-color: var(--cor); }
.aviso { position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%); background: #1e2331; border: 1px solid var(--linha); padding: 10px 16px; border-radius: 10px; z-index: 40; max-width: 90vw; text-align: center; }
.aviso.erro2 { border-color: #5b2230; color: #fca5a5; }

@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .lado { position: fixed; inset: 0 25% 0 0; z-index: 15; transform: translateX(-105%); transition: transform .2s; box-shadow: 10px 0 30px #0009; }
  .lado.aberto { transform: none; }
  .so-celular { display: grid; }
  .grade { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .tela-grupo select { display: none; }
  .na-sala { grid-template-columns: 1fr; grid-template-rows: 1fr 260px; }
  .chat { border-left: 0; border-top: 1px solid var(--linha); }
  .tile.musica { grid-column: span 2; }
}

/* janelinhas AO VIVO e modo palco (tela grande + faixa de pessoas) */
.tile.tela-tile { padding: 0; overflow: hidden; grid-column: span 2; gap: 0; justify-items: stretch; }
.tile.tela-tile.vendo { border-color: var(--cor); }
.tela-mini { position: relative; aspect-ratio: 16/9; width: 100%; background: #05060a; display: grid; place-items: center; }
.tela-mini video { width: 100%; height: 100%; object-fit: contain; display: block; }
.tela-mini > .ao-vivo, .tela-topo .ao-vivo { font-size: 10px; background: var(--vermelho); color: #fff; border-radius: 4px; padding: 1px 5px; font-weight: 700; }
.tela-mini > .ao-vivo { position: absolute; top: 8px; left: 8px; z-index: 1; }
.tela-conv2 { color: var(--suave); font-size: 13px; }
.tela-rot { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 8px 12px; }
.tela-rot small { color: var(--suave); font-size: 11px; }
.centro.palco-on { overflow: hidden; }
.centro.palco-on .tela-box { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.centro.palco-on .tela-video { flex: 1; min-height: 0; aspect-ratio: auto; max-height: none; }
.centro.palco-on .grade { display: flex; gap: 10px; overflow-x: auto; flex: none; padding-bottom: 4px; }
.centro.palco-on .tile { flex: 0 0 140px; padding: 10px 8px 8px; gap: 4px; }
.centro.palco-on .tile .avatar { width: 44px; height: 44px; font-size: 16px; }
.centro.palco-on .tile .voce, .centro.palco-on .tile .ruim { display: none; }
.centro.palco-on .tile.tela-tile { flex: 0 0 220px; padding: 0; }
.centro.palco-on .tile.musica { flex: 0 0 220px; }

#cfg-ouvir { width: 100%; height: 36px; }
.medidor small { font-size: 11px; }

/* menu da pessoa (clique / botão direito) */
.vol { width: 240px; gap: 8px; }
.vol b small { color: var(--suave); font-weight: 400; }
.vol-l { display: flex; justify-content: space-between; color: var(--suave); font-size: 12px; }
.item-menu { display: flex; align-items: center; gap: 8px; width: 100%; background: transparent; border: 0; padding: 8px; border-radius: 8px; cursor: pointer; text-align: left; color: var(--texto); }
.item-menu:hover { background: #232838; }
.item-menu.on { color: #fca5a5; }
.item-menu svg { width: 18px; height: 18px; flex: none; }
.vol .dica { color: var(--suave); font-size: 11px; }
.tile .icones span { display: inline-flex; }
.tile .icones span svg { color: var(--amarelo); }
.pessoa[data-pid] { cursor: context-menu; }

/* transmissões: ações sobre a janelinha */
.tela-acoes2 { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; z-index: 2; }
.tela-tile:hover .tela-acoes2 { opacity: 1; }
.mini-btn { width: 30px; height: 30px; border: 0; border-radius: 8px; background: #000a; color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }
.mini-btn:hover { background: #7c5cffcc; }
.mini-btn svg { width: 16px; height: 16px; }
.tile.tela-tile.em-foco { border-color: var(--cor); opacity: .7; }
.tile.tela-tile.vendo .tela-mini video { cursor: zoom-in; }
.tela-mini:fullscreen { background: #000; }
.tela-mini:fullscreen video, .tela-video:fullscreen video { object-fit: contain; }
/* janela Transmitir */
.tr-grupo { display: grid; gap: 6px; font-size: 13px; color: var(--suave); }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { border: 1px solid var(--linha); background: #0f121a; border-radius: 9px; padding: 8px 12px; cursor: pointer; color: var(--texto); }
.seg button.on { background: var(--cor); border-color: var(--cor); color: #fff; }
.tr-info { margin: 0; font-size: 12px; color: var(--suave); background: #0f121a; border-radius: 10px; padding: 10px 12px; }
.tr-botoes { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
/* voz conectada + ping */
.voz-con { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--linha); background: #0e1119; cursor: default; }
.vc-t { display: grid; }
.vc-t b { color: var(--verde); font-size: 13px; }
.vc-t small { color: var(--suave); font-size: 11px; }
.sinal { display: flex; align-items: flex-end; gap: 2px; height: 16px; }
.sinal i { width: 4px; background: #343a4f; border-radius: 1px; }
.sinal i:nth-child(1) { height: 25%; } .sinal i:nth-child(2) { height: 50%; } .sinal i:nth-child(3) { height: 75%; } .sinal i:nth-child(4) { height: 100%; }
.sinal.n4 i { background: var(--verde); }
.sinal.n3 i:nth-child(-n+3) { background: var(--verde); }
.sinal.n2 i:nth-child(-n+2) { background: var(--amarelo); }
.sinal.n1 i:nth-child(1) { background: var(--vermelho); }
.vc-dica { position: absolute; left: 10px; bottom: calc(100% + 6px); background: #000; border: 1px solid var(--linha); border-radius: 8px; padding: 8px 10px; font-size: 12px; display: none; z-index: 5; white-space: nowrap; }
.vc-dica b { display: block; }
.vc-dica small { color: var(--suave); }
.voz-con:hover .vc-dica { display: block; }
/* baixar o app */
.baixar { display: block; margin: 0 12px 8px; padding: 8px 10px; border-radius: 10px; background: #1f1a38; color: var(--cor2); text-decoration: none; font-size: 13px; font-weight: 600; text-align: center; }
.baixar:hover { background: #2a2350; }
.cartao .baixar { margin: 4px 0 0; }

/* tela cheia: botão de sair no canto + barra de controles com o mouse embaixo */
#tela-box { position: relative; }
.fs-sair, .fs-zona { display: none; }
#tela-box:fullscreen { display: flex; flex-direction: column; border: 0; border-radius: 0; background: #000; }
#tela-box:fullscreen .tela-video { flex: 1; min-height: 0; aspect-ratio: auto; max-height: none; }
#tela-box:fullscreen .tela-topo { position: absolute; top: 0; left: 0; right: 0; z-index: 3; background: linear-gradient(#000d, transparent); opacity: 0; transition: opacity .2s; padding: 12px 70px 24px 14px; }
#tela-box:fullscreen .tela-topo:hover { opacity: 1; }
#tela-box:fullscreen .fs-sair { display: grid; place-items: center; position: absolute; top: 12px; right: 12px; z-index: 4; width: 42px; height: 42px; border: 0; border-radius: 10px; background: #000b; color: #fff; cursor: pointer; }
#tela-box:fullscreen .fs-sair:hover { background: #7c5cffdd; }
.fs-sair svg { width: 22px; height: 22px; }
#tela-box:fullscreen .fs-zona { display: flex; justify-content: center; align-items: flex-end; position: absolute; left: 0; right: 0; bottom: 0; height: 150px; z-index: 3; padding-bottom: 20px; }
.fs-barra { display: flex; align-items: center; gap: 10px; background: #0b0d14ee; border: 1px solid var(--linha); border-radius: 40px; padding: 8px 12px; opacity: 0; transform: translateY(12px); transition: opacity .18s, transform .18s; }
.fs-zona:hover .fs-barra { opacity: 1; transform: none; }
.fs-pessoas { display: flex; gap: 6px; margin-right: 4px; padding-right: 10px; border-right: 1px solid var(--linha); }
.fs-av { position: relative; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px; transition: box-shadow .12s; }
.fs-av.falando { box-shadow: 0 0 0 3px var(--verde); }
.fs-av svg { position: absolute; right: -3px; bottom: -3px; width: 15px; height: 15px; background: #000; border-radius: 50%; color: var(--vermelho); padding: 2px; }
.fs-barra .redondo { width: 44px; height: 44px; }

.vc-t { flex: 1; min-width: 0; }
.vc-botoes { display: flex; gap: 2px; }
.vc-botoes .ic { width: 32px; height: 32px; }
.vc-botoes .ic svg { width: 18px; height: 18px; }
#vc-sair:hover { color: var(--vermelho); }

/* barra da tela cheia sempre visível */
.fs-barra { opacity: 1; transform: none; }

/* camada transparente sobre o player: o clique abre o volume (não pausa nem leva ao YouTube) */
.musica-player { position: relative; }
.musica-capa { position: absolute; inset: 0; z-index: 2; cursor: pointer; background: transparent; }

/* contas e perfil */
.pilha { display: grid; gap: 12px; }
.abas2 { display: flex; background: #0f121a; border-radius: 10px; padding: 4px; gap: 4px; }
.abas2 button { flex: 1; border: 0; background: transparent; color: var(--suave); padding: 8px; border-radius: 8px; cursor: pointer; font-weight: 600; }
.abas2 button.on { background: var(--cor); color: #fff; }
.ou { display: flex; align-items: center; gap: 10px; color: var(--suave); font-size: 12px; margin: 4px 0 10px; }
.ou::before, .ou::after { content: ''; flex: 1; height: 1px; background: var(--linha); }
#g-botao { display: flex; justify-content: center; min-height: 44px; }
.btn.google { width: 100%; background: #fff; color: #1f1f1f; border-color: #fff; }
.link { background: none; border: 0; color: var(--suave); cursor: pointer; text-decoration: underline; font-size: 12px; justify-self: center; }
.avatar img, .mini img, .fs-av img, .pc-av img, .pe-av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.mini, .avatar { overflow: hidden; }
.eu-perfil { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; background: none; border: 0; padding: 4px; border-radius: 8px; cursor: pointer; text-align: left; position: relative; color: inherit; }
.eu-perfil:hover { background: #1a1f2c; }
.eu-perfil .pres { position: absolute; left: 30px; top: 30px; }
.pres { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #0e1119; background: var(--verde); display: inline-block; }
.pres.ausente { background: var(--amarelo); } .pres.nao_perturbar { background: var(--vermelho); }
.pessoa[data-uid], .msg[data-uid] .mini, .msg[data-uid] b { cursor: pointer; }
.cfg-botoes { display: flex; gap: 8px; flex-wrap: wrap; }
/* cartão de perfil */
.pcard { position: fixed; z-index: 35; width: 300px; background: var(--cartao); border: 1px solid var(--linha); border-radius: 14px; overflow: hidden; box-shadow: 0 16px 40px #000a; }
.pc-banner { height: 100px; }
.pc-banner img, .pe-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pc-av { position: absolute; top: 56px; left: 14px; width: 84px; height: 84px; border-radius: 50%; border: 6px solid var(--cartao); display: grid; place-items: center; font-size: 26px; font-weight: 700; color: #fff; }
.pc-av .pres { position: absolute; right: 0; bottom: 2px; width: 18px; height: 18px; border: 4px solid var(--cartao); }
.pc-corpo { padding: 48px 14px 14px; display: grid; gap: 6px; }
.pc-nome { font-size: 19px; }
.pc-pres, .pc-desde { color: var(--suave); font-size: 12px; }
.pc-sobre { background: #0f121a; border-radius: 8px; padding: 8px 10px; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.pc-acoes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.pc-acoes .btn.on { border-color: var(--cor); color: var(--cor2); }
/* editar perfil */
.pe-previa { position: relative; height: 150px; border-radius: 12px; overflow: hidden; background: #0f121a; }
.pe-banner { height: 100px; }
.pe-av { position: absolute; left: 14px; top: 52px; width: 88px; height: 88px; border-radius: 50%; border: 6px solid var(--cartao); display: grid; place-items: center; font-size: 26px; font-weight: 700; color: #fff; overflow: hidden; }
.pe-acoes { display: flex; flex-wrap: wrap; gap: 6px; }
.pe-acoes label.btn { display: inline-block; color: var(--texto); }
.dica2 { color: var(--suave); font-size: 12px; }
.pe-linha { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pe-linha input[type=color] { height: 42px; padding: 4px; background: #0f121a; border: 1px solid var(--linha); border-radius: 10px; width: 100%; }
textarea { background: #0f121a; border: 1px solid var(--linha); border-radius: 10px; padding: 10px 12px; color: var(--texto); font: inherit; resize: vertical; }
/* contas (admin) */
.ad-lista { display: grid; gap: 8px; max-height: 60vh; overflow-y: auto; }
.ad-item { display: flex; align-items: center; gap: 10px; background: #0f121a; border-radius: 10px; padding: 8px 10px; }
.ad-item .mini { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 12px; flex: none; }
.ad-t { flex: 1; min-width: 0; display: grid; }
.ad-t small { color: var(--suave); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* F5: não mostra nenhuma tela até saber qual (código, conta ou app) */
.entrada.iniciando > * { visibility: hidden; }
/* preenchimento automático do navegador no tema escuro (sem o fundo azul-claro) */
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #0f121a inset; -webkit-text-fill-color: var(--texto); caret-color: var(--texto);
  transition: background-color 9999s ease-out 0s; border-color: var(--linha);
}

/* ajustar imagem (recorte) */
.ct-palco { display: grid; place-items: center; background: #05060a; border-radius: 12px; padding: 18px; }
.ct-area { position: relative; overflow: hidden; background: #000; cursor: grab; touch-action: none; box-shadow: 0 0 0 2px var(--cor); }
.ct-area.arrastando { cursor: grabbing; }
.ct-area.foto { border-radius: 50%; }
.ct-area.banner { border-radius: 8px; }
.ct-area img { position: absolute; left: 0; top: 0; transform-origin: 0 0; max-width: none; user-select: none; pointer-events: none; }
.ct-zoom { display: flex; align-items: center; gap: 10px; }
.ct-zoom input { flex: 1; accent-color: var(--cor); }

/* ── grade da chamada (cartões 16:9 que se ajustam à quantidade de pessoas) ── */
.centro { padding: 18px; }
.grade { flex: 1; display: grid; justify-content: center; align-content: center; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grade > .tile { aspect-ratio: 16 / 9; height: auto; min-height: 0; padding: 0; border: 0; border-radius: 12px; overflow: hidden; display: grid; place-items: center; position: relative; }
.tile.pessoa-tile { background: color-mix(in srgb, var(--fundo, #7c5cff) 55%, #0b0d14); box-shadow: inset 0 0 0 0 transparent; transition: box-shadow .12s; }
.tile.pessoa-tile.falando { box-shadow: inset 0 0 0 3px var(--verde), 0 0 0 1px var(--verde); border: 0; }
.tile.pessoa-tile .avatar { width: clamp(48px, calc(var(--tile-h, 160px) * .42), 128px); height: clamp(48px, calc(var(--tile-h, 160px) * .42), 128px); font-size: clamp(16px, calc(var(--tile-h, 160px) * .14), 42px); box-shadow: 0 4px 18px #0006; }
.tile-rot { position: absolute; left: 10px; bottom: 10px; max-width: calc(100% - 20px); display: flex; align-items: center; gap: 6px; background: #000a; color: #fff; border-radius: 8px; padding: 4px 9px; font-size: 13px; font-weight: 600; }
.tile-rot span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-rot svg { width: 15px; height: 15px; color: var(--vermelho); flex: none; }
.tile-rot small { color: #ffffffa0; font-weight: 400; font-size: 11px; }
.tile-rot em { font-style: normal; font-size: 10px; background: var(--vermelho); border-radius: 4px; padding: 0 5px; font-weight: 700; }
.tile .icones { top: 10px; right: 10px; }
.tile .icones .fraca { width: 18px; height: 18px; border-radius: 50%; background: var(--amarelo); color: #000; display: grid; place-items: center; font-size: 12px; }
/* transmissões e o bot ocupam um cartão igual aos outros */
.grade > .tile.tela-tile { grid-column: auto; background: #05060a; display: block; }
.grade > .tile.tela-tile .tela-mini { position: absolute; inset: 0; aspect-ratio: auto; }
.grade > .tile.tela-tile .tela-rot { position: absolute; left: 10px; bottom: 10px; z-index: 2; background: #000a; border-radius: 8px; padding: 4px 9px; color: #fff; max-width: calc(100% - 20px); }
.grade > .tile.tela-tile .tela-rot small { color: #ffffffa0; }
.grade > .tile.musica { grid-column: auto; background: linear-gradient(135deg, #2a1f55, #120f22); }
.grade > .tile.musica .musica-player { width: 200px; height: 200px; }
.grade > .tile.musica .nm, .grade > .tile.musica .voce { display: none; }
.grade > .tile.musica::after { content: '🎵 Música · ' attr(data-titulo); position: absolute; left: 10px; bottom: 10px; max-width: calc(100% - 20px); background: #000a; color: #fff; border-radius: 8px; padding: 4px 9px; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* modo foco: a faixa embaixo continua pequena */
.centro.palco-on .grade { display: flex; }
.centro.palco-on .grade > .tile { flex: 0 0 auto; width: 180px; height: 101px; aspect-ratio: auto; }
.centro.palco-on .grade > .tile.musica { width: 220px; height: 220px; }
.centro.palco-on .tile.pessoa-tile .avatar { width: 44px; height: 44px; font-size: 16px; }
.centro.palco-on .tile-rot { font-size: 11px; padding: 2px 6px; left: 6px; bottom: 6px; }
@media (max-width: 760px) { .grade { grid-template-columns: 1fr !important; } }
.grade > .tile.musica { min-height: 224px; }

.ativar-som { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 45; border: 0; background: var(--cor); color: #fff; font-weight: 700; padding: 12px 20px; border-radius: 12px; cursor: pointer; box-shadow: 0 8px 30px #000a; }

/* aura da voz em volta da foto (cresce com o volume) */
.tile.pessoa-tile .avatar, .fs-av { overflow: visible; }
.tile.pessoa-tile .avatar img, .fs-av img { border-radius: 50%; }
.tile.pessoa-tile .avatar {
  box-shadow: 0 0 0 calc(var(--aura, 0) * 7px) #22c55e,
              0 0 calc(var(--aura, 0) * 46px) calc(var(--aura, 0) * 12px) #22c55e99, 0 4px 18px #0006;
  transform: scale(calc(1 + var(--aura, 0) * .06)); transition: box-shadow .08s linear, transform .08s linear;
}
.fs-av { box-shadow: 0 0 0 calc(var(--aura, 0) * 4px) #22c55e, 0 0 calc(var(--aura, 0) * 18px) calc(var(--aura, 0) * 4px) #22c55e99; transition: box-shadow .08s linear; }
.tile.pessoa-tile.falando { box-shadow: inset 0 0 0 2px #22c55e88; }

/* grade em linhas que quebram; a última linha incompleta fica centralizada */
.centro:not(.palco-on) .grade { display: flex; flex-wrap: wrap; justify-content: center; align-content: center; margin: 0 auto; width: 100%; }
.centro:not(.palco-on) .grade > .tile { width: var(--tile-w, 300px); flex: 0 0 auto; }
@media (max-width: 760px) { .centro:not(.palco-on) .grade > .tile { width: 100%; } }

/* bot Música: botão ⤢ e vídeo ocupando o cartão */
.musica-exp { position: absolute; top: 10px; right: 10px; z-index: 4; }
.grade > .tile.musica.cheio .musica-player { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 0; }
.grade > .tile.musica.cheio .musica-player iframe { width: 100% !important; height: 100% !important; }
.centro.palco-on .grade > .tile.musica.cheio .musica-player { position: static; width: 200px; height: 200px; }

/* silenciado para mim: ícone vermelho no centro ao passar o mouse */
.silenc-centro { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.8); z-index: 3; width: 64px; height: 64px; border-radius: 50%;
  background: #000c; display: grid; place-items: center; color: var(--vermelho); opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; }
.silenc-centro svg { width: 34px; height: 34px; }
.tile.silenciado:hover .silenc-centro { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.tile.silenciado .avatar { filter: grayscale(.6) brightness(.8); }

.sens { display: flex; align-items: center; gap: 10px; margin: -4px 0 4px 28px; }
.sens input { flex: 1; accent-color: var(--cor); }
.sens small { color: var(--suave); font-size: 12px; min-width: 120px; }

.vol-mic { display: grid; gap: 6px; }
.vol-mic small { color: var(--cor2); font-weight: 700; }
.vol-mic input { accent-color: var(--cor); }

/* contas: bolinha de status */
.ad-av { position: relative; flex: none; }
.ad-av .pres { position: absolute; right: -2px; bottom: -2px; width: 13px; height: 13px; border: 3px solid #0f121a; }
.pres.offline { background: #4b5263; }
.ad-st { color: var(--texto) !important; }
.tag.bloq { background: var(--vermelho); }

/* janelas maiores que a tela rolam (antes o fim ficava inalcançável em telas baixas) */
.janela { display: flex; overflow-y: auto; }
.janela > .cartao { margin: auto; }

.nova-versao { position: fixed; top: 12px; right: 16px; z-index: 46; border: 1px solid var(--cor); background: #1f1a38; color: #fff; font-weight: 600; padding: 10px 16px; border-radius: 12px; cursor: pointer; box-shadow: 0 8px 30px #000a; }
.nova-versao:hover { background: var(--cor); }

/* música desligada para mim */
.musica-off { position: absolute; top: 10px; right: 48px; z-index: 4; font-size: 15px; }
.musica-desligada { display: none; position: absolute; inset: 0; z-index: 3; place-content: center; text-align: center; gap: 4px; color: #fff; font-weight: 700; cursor: pointer; background: #0b0d14cc; }
.musica-desligada small { display: block; color: var(--suave); font-weight: 400; font-size: 12px; }
.tile.musica.desligada .musica-desligada { display: grid; }
.tile.musica.desligada .musica-player { visibility: hidden; }
.tile.musica.desligada .musica-exp { display: none; }
.tile.musica.desligada .musica-off { color: var(--verde); }

/* barra de progresso da música */
.mu-barra { position: absolute; left: 10px; right: 10px; bottom: 42px; z-index: 4; display: flex; align-items: center; gap: 8px; background: #000a; border-radius: 8px; padding: 4px 10px; font-size: 11px; color: #ffffffc0; opacity: 0; transition: opacity .15s; }
.tile.musica:hover .mu-barra { opacity: 1; }
.mu-barra input { flex: 1; accent-color: var(--cor); cursor: pointer; }
.tile.musica.desligada .mu-barra { display: none; }
.centro.palco-on .mu-barra { display: none; }

/* arrastar entre salas (administrador) */
.pessoa[draggable="true"] { cursor: grab; }
.pessoa.arrastado { opacity: .4; }
.sala.drop-alvo { background: #2a2350; box-shadow: inset 0 0 0 2px var(--cor); }

/* tela grande: o vídeo sempre cabe inteiro (antes podia cortar embaixo) */
.tela-video { position: relative; overflow: hidden; }
.tela-video video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.tela-video > span { position: absolute; inset: 0; display: grid; place-items: center; }
/* faixa de baixo (com transmissão em foco): a música encolhe igual aos outros cartões */
.centro.palco-on .grade > .tile.musica { width: 180px; height: 101px; min-height: 0; }
.centro.palco-on .grade > .tile.musica .musica-player { position: absolute; inset: 0; width: 100% !important; height: 100% !important; border-radius: 0; }
.centro.palco-on .grade > .tile.musica .musica-player iframe { width: 100% !important; height: 100% !important; }
.centro.palco-on .grade > .tile.musica::after { font-size: 10px; padding: 2px 6px; left: 6px; bottom: 6px; }
.centro.palco-on .grade > .tile.musica .musica-exp, .centro.palco-on .grade > .tile.musica .musica-off { top: 4px; width: 24px; height: 24px; }
.centro.palco-on .grade > .tile.musica .musica-off { right: 32px; }
.centro.palco-on .grade > .tile.musica .musica-exp { right: 4px; }

.retomar-tela { position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%); z-index: 45; background: var(--cor); color: #fff; font-weight: 700; padding: 12px 14px 12px 18px; border-radius: 12px; cursor: pointer; box-shadow: 0 8px 30px #000a; display: flex; align-items: center; gap: 10px; }
.retomar-tela button { background: #0004; border: 0; color: #fff; border-radius: 8px; width: 26px; height: 26px; cursor: pointer; }

/* chat recolhível */
.na-sala.sem-chat { grid-template-columns: 1fr; }
.na-sala.sem-chat .chat { display: none; }
.chat-alt { position: relative; }
.chat-alt.ativo { color: var(--cor2); }
.chat-badge { position: absolute; top: -2px; right: -2px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--vermelho); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; padding: 0 3px; }
@media (max-width: 760px) { .na-sala.sem-chat { grid-template-rows: 1fr; } }
/* "música desligada" na faixa pequena */
.centro.palco-on .tile.musica .musica-desligada { font-size: 11px; padding: 4px; }
.centro.palco-on .tile.musica .musica-desligada small { display: none; }
.centro.palco-on .tile.musica.desligada::after { display: none; }

/* AO VIVO no canto de cima do cartão da pessoa (igual à janelinha da transmissão) */
.tile-aovivo { position: absolute; top: 10px; left: 10px; z-index: 2; font-size: 10px; background: var(--vermelho); color: #fff; border-radius: 4px; padding: 1px 6px; font-weight: 700; }
.centro.palco-on .tile-aovivo { top: 6px; left: 6px; font-size: 9px; padding: 0 5px; }

/* 👁 espectadores */
.olho { font-size: 11px; font-weight: 700; background: #000b; color: #fff; border-radius: 4px; padding: 1px 6px; cursor: default; }
.olho.ninguem { color: #ffffff90; }
.tela-mini > .olho { position: absolute; top: 8px; left: 70px; z-index: 1; }
.centro.palco-on .tela-mini > .olho { top: 5px; left: 60px; font-size: 10px; }

/* ── amigos e mensagens diretas ── */
.b-amigos { position: relative; margin: 0 12px 8px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--linha); background: #171b26; color: var(--texto); font-weight: 600; cursor: pointer; text-align: left; }
.b-amigos:hover { background: #1f2433; }
.b-amigos .chat-badge { top: 8px; right: 10px; }
.palco { position: relative; }
.amigos { position: absolute; inset: 0; z-index: 12; background: var(--fundo); display: flex; flex-direction: column; }
.amigos > div { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.am-topo { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--linha); }
.am-topo > b { font-size: 16px; }
.am-abas { flex: 0 1 380px; }
.am-topo .ic:last-child { margin-left: auto; }
.am-busca { padding: 14px 18px 0; }
.am-lista { flex: 1; overflow-y: auto; padding: 10px 18px 20px; display: grid; align-content: start; gap: 4px; }
.am-sec { color: var(--suave); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; margin: 12px 0 4px; }
.am-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; border-top: 1px solid var(--linha); cursor: pointer; }
.am-item:hover { background: #171b26; }
.am-av { position: relative; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; flex: none; overflow: visible; }
.am-av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.am-av .pres { position: absolute; right: -2px; bottom: -2px; width: 13px; height: 13px; border: 3px solid var(--fundo); }
.am-t { flex: 1; min-width: 0; display: grid; }
.am-t small { color: var(--suave); font-size: 12px; }
.am-bt { display: flex; align-items: center; gap: 6px; }
.am-nl { position: static; }
.am-tag { color: var(--suave); font-size: 12px; }
.am-vazio { color: var(--suave); text-align: center; padding: 30px 10px; }
.dm-quem { flex: 1; display: grid; }
.dm-quem small { color: var(--suave); font-size: 12px; }
#dm-av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; cursor: pointer; overflow: hidden; }
#dm-av img { width: 100%; height: 100%; object-fit: cover; }
.dm-lista { flex: 1; padding: 16px 18px; }
.dm .chat-form { padding: 12px 18px; }

/* transmissão caiu por F5 de quem transmite: imagem congelada esperando voltar */
.espera-tile .tela-mini img, .espera-palco img { width: 100%; height: 100%; object-fit: contain; filter: brightness(.55) grayscale(.3); display: block; }
.espera-palco { position: relative; width: 100%; height: 100%; display: grid; place-items: center; }
.espera-msg { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 10px; color: #fff; font-weight: 700; text-shadow: 0 2px 8px #000; pointer-events: none; }
.espera-palco .espera-msg { font-size: 18px; }

/* Etapa 3: chamadas privadas */
.chamada-bloco { background: #1f2a22; box-shadow: inset 0 0 0 1px #3ba55c66; margin-bottom: 8px; cursor: default; }
.ch-ic { width: 18px; text-align: center; }
.ch-add { margin-left: auto; background: #ffffff14; border: 0; color: #fff; border-radius: 6px; width: 24px; height: 22px; cursor: pointer; font-size: 11px; }
.ch-add:hover { background: #3ba55c; }
.ch-tocando { margin-left: 6px; font-size: 10px; color: #3ba55c; animation: chPulsa 1.2s infinite; }
@keyframes chPulsa { 50% { opacity: .35; } }
.ch-lista { margin-top: 6px; display: grid; gap: 2px; max-height: 220px; overflow-y: auto; background: #0006; border-radius: 8px; padding: 4px; }
.ch-amigo { display: flex; align-items: center; gap: 8px; background: none; border: 0; color: var(--texto, #fff); padding: 5px 6px; border-radius: 6px; cursor: pointer; text-align: left; font: inherit; }
.ch-amigo:hover { background: #ffffff14; }
.ch-amigo small { margin-left: auto; color: var(--suave); font-size: 10px; }
.dm-ligar { font-size: 15px; }
.toque { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 60; background: #1e2130; border: 1px solid #3ba55c88; border-radius: 16px; padding: 14px 16px; display: flex; align-items: center; gap: 14px; box-shadow: 0 12px 40px #000c; min-width: 320px; }
.toque-av { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; overflow: hidden; flex: none; animation: toqueAura 1.4s infinite; }
.toque-av img { width: 100%; height: 100%; object-fit: cover; }
@keyframes toqueAura { 0% { box-shadow: 0 0 0 0 #3ba55caa; } 100% { box-shadow: 0 0 0 16px #3ba55c00; } }
.toque-t { display: grid; gap: 2px; flex: 1; }
.toque-t small { color: var(--suave); }
.toque-bt { display: flex; gap: 10px; }
.toque-bt button { width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer; font-size: 18px; color: #fff; }
.tq-sim { background: #3ba55c; } .tq-nao { background: #ed4245; }
.toque-bt button:hover { filter: brightness(1.15); }

/* transmissões lado a lado (som só na principal) */
.palco-multi { display: grid; gap: 6px; width: 100%; height: 100%; }
.palco-multi.n2 { grid-template-columns: 1fr 1fr; }
.palco-multi.n3, .palco-multi.n4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.pm-item { position: relative; background: #000; border-radius: 10px; overflow: hidden; cursor: pointer; min-height: 0; box-shadow: inset 0 0 0 2px transparent; }
.pm-item.principal { box-shadow: 0 0 0 2px #3ba55c; }
.pm-v { width: 100%; height: 100%; display: grid; place-items: center; color: var(--suave); }
.pm-v video { width: 100%; height: 100%; object-fit: contain; display: block; }
.pm-rot { position: absolute; left: 8px; top: 8px; display: flex; align-items: center; gap: 6px; background: #000a; padding: 3px 8px; border-radius: 8px; font-size: 12px; color: #fff; pointer-events: none; }
.pm-som { color: #ffffffc0; font-size: 11px; }
.pm-item:not(.principal) .pm-som { color: #ffb347; }
.pm-x { position: absolute; right: 8px; top: 8px; background: #000a; color: #fff; border: 0; border-radius: 8px; width: 26px; height: 26px; cursor: pointer; opacity: 0; transition: opacity .15s; }
.pm-item:hover .pm-x { opacity: 1; }
.lado-btn { font-size: 14px; }
.sem-som { color: #ffb347; }

/* banner do perfil como fundo da janelinha na chamada (GIF continua animado) */
.tile.pessoa-tile.com-banner { background: linear-gradient(#0b0d1433, #0b0d1477), var(--banner) center / cover no-repeat, #0b0d14; }
.tile.pessoa-tile.com-banner .avatar { box-shadow: 0 0 0 3px #0b0d14aa, 0 6px 20px #000a; }
