:root {
  --fundo: #1b1f2e;
  --painel: #262b40;
  --texto: #eef0f7;
  --suave: #9aa3c0;
  --destaque: #06d6a0;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body {
  margin: 0;
  height: 100%;
  background: var(--fundo);
  color: var(--texto);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  overflow: hidden;
}
#jogo { position: fixed; inset: 0; }
/* touch-action: o navegador não amplia nem rola a página quando os dedos estão no mapa (a pinça é do jogo) */
#jogo canvas { image-rendering: pixelated; touch-action: none; }

#entrada {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(360px, calc(100% - 32px));
  background: var(--painel);
  padding: 24px;
  border-radius: 12px;
  display: grid;
  gap: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}
#entrada h1 { margin: 0; font-size: 22px; }
#entrada label { display: grid; gap: 6px; font-size: 14px; color: var(--suave); }
#entrada input {
  font: inherit;
  color: var(--texto);
  background: var(--fundo);
  border: 1px solid #3a4160;
  border-radius: 8px;
  padding: 10px;
}
#entrada input[type='color'] { padding: 2px; height: 40px; }
#entrada button {
  font: inherit;
  font-weight: 600;
  border: 0;
  border-radius: 8px;
  padding: 12px;
  background: var(--destaque);
  color: #10231d;
  cursor: pointer;
}
.dica { margin: 0; font-size: 12px; color: var(--suave); }

#hud {
  position: fixed;
  top: 12px;
  left: 12px;
  display: flex;
  gap: 8px;
  pointer-events: none;
}
#hud > div {
  background: rgba(38, 43, 64, 0.9);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 14px;
}
#sala::before { content: '📍 '; }

#aviso {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(38, 43, 64, 0.95);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  pointer-events: none;
}
#aviso kbd {
  background: var(--texto);
  color: var(--fundo);
  border-radius: 4px;
  padding: 0 6px;
  font-weight: 700;
}

/* ---------- Vídeos (topo) e controles (embaixo) ---------- */
:root { --altura-barra: 64px; }
#aviso { bottom: calc(var(--altura-barra) + 12px); }

#videos {
  position: fixed;
  top: var(--fim-hud, 52px);
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0 12px;
  pointer-events: none;
  z-index: 2;
}
#miniaturas {
  display: flex;
  justify-content: center;
  gap: 8px;
  max-width: 100%;
  overflow-x: auto;
  pointer-events: auto;
}
#ninguem {
  margin: 0;
  font-size: 12px;
  color: var(--suave);
  background: rgba(38, 43, 64, 0.85);
  padding: 2px 10px;
  border-radius: 999px;
}
.miniatura {
  position: relative;
  flex: none;
  width: 160px;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: var(--painel);
  border: 2px solid var(--cor, #3498db);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.miniatura video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.miniatura.local video { transform: scaleX(-1); }
.miniatura .inicial {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 40px;
  font-weight: 700;
  color: var(--cor, #3498db);
}
.miniatura.com-video .inicial { display: none; }
.miniatura .rotulo {
  position: absolute;
  left: 6px;
  bottom: 6px;
  right: 36px;
  display: flex;
  gap: 4px;
  align-items: center;
  font-size: 12px;
}
.miniatura .nome {
  background: rgba(0, 0, 0, 0.6);
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.miniatura .mic::before { content: '🎤'; font-size: 11px; }
.miniatura .mic.mudo { opacity: 0.35; }
.miniatura .btn-som {
  position: absolute;
  right: 6px;
  bottom: 5px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  font-size: 13px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
}
.miniatura:hover .btn-som,
.miniatura .btn-som:focus-visible,
.miniatura.silenciado .btn-som,
.miniatura.local .btn-som { opacity: 1; }
.miniatura.silenciado .btn-som { background: #ef476f; }
.miniatura.silenciado::after {
  content: 'Silenciado para você';
  position: absolute;
  top: 6px;
  left: 6px;
  font-size: 10px;
  background: rgba(239, 71, 111, 0.85);
  padding: 1px 6px;
  border-radius: 4px;
}

/* Modo reunião: vídeos grandes em grade sobre o mapa */
body.videos-expandidos #videos {
  top: 0;
  bottom: var(--altura-barra);
  padding: 56px 16px 12px;
  background: var(--fundo);
  pointer-events: auto;
}
body.chat-aberto #videos { right: var(--largura-chat); }
body.videos-expandidos #miniaturas {
  flex: 1;
  width: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(var(--colunas, 1), minmax(0, 1fr));
  grid-template-rows: repeat(var(--linhas, 1), minmax(0, 1fr));
  gap: 10px;
  overflow: hidden;
}
body.videos-expandidos .miniatura { width: auto; height: auto; aspect-ratio: auto; min-height: 0; }
body.videos-expandidos .miniatura .inicial { font-size: 72px; }
body.videos-expandidos .miniatura .rotulo { font-size: 14px; }
/* Com um vídeo ampliado: ele em cima, ocupando quase tudo, e os outros numa fileira embaixo */
body.videos-expandidos #videos.com-destaque #miniaturas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: flex-start;
}
body.videos-expandidos .com-destaque .miniatura { order: 1; flex: none; width: 160px; height: 120px; }
body.videos-expandidos .com-destaque .miniatura.fixada { order: 0; width: 100%; height: calc(100% - 130px); }
.miniatura.fixada video,
.miniatura.tela video { object-fit: contain; background: #000; }
.miniatura.tela { border-color: var(--destaque); }

#barra {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--altura-barra);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  background: rgba(27, 31, 46, 0.92);
  border-top: 1px solid #3a4160;
  z-index: 3;
}
.grupo-botao { display: flex; }
#barra button {
  font: inherit;
  font-size: 13px;
  display: flex;
  gap: 6px;
  align-items: center;
  border: 0;
  padding: 9px 12px;
  background: #4a2a35;
  color: var(--texto);
  cursor: pointer;
  border-radius: 8px;
}
.grupo-botao .principal { border-radius: 8px 0 0 8px; }
.grupo-botao .seta { border-radius: 0 8px 8px 0; padding: 9px 8px; border-left: 1px solid rgba(255, 255, 255, 0.12); }
#barra button.ligado,
#barra .grupo-botao:has(.principal.ligado) .seta { background: var(--destaque); color: #10231d; }
#btn-expandir { background: var(--painel) !important; }
#barra #btn-expandir.ligado { outline: 2px solid var(--destaque); color: var(--texto); }
#status-video { font-size: 12px; color: var(--suave); max-width: 200px; margin-left: 4px; }

#menu-dispositivos {
  position: fixed;
  bottom: calc(var(--altura-barra) + 6px);
  width: 280px;
  max-height: 50vh;
  overflow-y: auto;
  background: var(--painel);
  border: 1px solid #3a4160;
  border-radius: 10px;
  padding: 8px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  z-index: 6;
}
#menu-dispositivos h4 { margin: 6px 6px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--suave); }
#menu-dispositivos p { margin: 0 6px 6px; font-size: 13px; color: var(--suave); }
#menu-dispositivos button {
  width: 100%;
  background: none !important;
  color: var(--texto) !important;
  justify-content: flex-start;
  padding: 7px 8px;
  border-radius: 6px;
  text-align: left;
}
#menu-dispositivos button:hover { background: rgba(255, 255, 255, 0.06) !important; }
#menu-dispositivos button[aria-checked='true']::before { content: '✓'; color: var(--destaque); }
#menu-dispositivos button[aria-checked='false']::before { content: ''; width: 0.7em; }

#zoom {
  position: fixed;
  right: 12px;
  bottom: calc(var(--altura-barra) + 12px);
  font-size: 12px;
  background: rgba(38, 43, 64, 0.9);
  padding: 4px 10px;
  border-radius: 999px;
  pointer-events: none;
  transition: opacity 0.3s;
}
body.chat-aberto #zoom { right: calc(var(--largura-chat) + 12px); }

/* Tela média: a barra fica só com ícones (o texto continua para leitores de tela) */
@media (max-width: 1000px) {
  #barra button span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  #barra button b { font-size: 16px; }
  #status-video { display: none; }
}
@media (max-width: 600px) {
  .miniatura { width: 110px; }
}

/* ---------- Chat (painel da direita) ---------- */
:root { --largura-chat: 320px; }
body.chat-aberto #jogo { right: var(--largura-chat); }
body.chat-aberto #barra { right: var(--largura-chat); }
body.chat-aberto #aviso { left: calc((100% - var(--largura-chat)) / 2); }
body.chat-aberto #btn-chat { right: calc(var(--largura-chat) + 12px); }

#btn-chat {
  position: fixed;
  top: 12px;
  right: 12px;
  font: inherit;
  font-size: 14px;
  border: 0;
  border-radius: 999px;
  padding: 6px 14px;
  background: rgba(38, 43, 64, 0.9);
  color: var(--texto);
  cursor: pointer;
  display: flex;
  gap: 6px;
  align-items: center;
}
#btn-chat[aria-expanded='true'] { background: var(--destaque); color: #10231d; }
#chat-selo, .nao-lidas {
  background: #ef476f;
  color: #fff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  padding: 1px 5px;
  text-align: center;
}

#chat {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--largura-chat);
  background: var(--painel);
  border-left: 1px solid #3a4160;
  display: flex;
  flex-direction: column;
  z-index: 5;
}
.chat-cabecalho {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 8px;
}
.chat-cabecalho h2 { margin: 0; font-size: 17px; }
.chat-cabecalho small { font-size: 12px; font-weight: 400; color: var(--suave); margin-left: 6px; }
#chat-fechar {
  font: inherit;
  font-size: 22px;
  line-height: 1;
  background: none;
  border: 0;
  color: var(--suave);
  cursor: pointer;
  padding: 2px 6px;
}
.chat-secao { padding: 0 14px 8px; border-bottom: 1px solid #3a4160; }
.chat-secao h3 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--suave); }
#chat-pessoas { display: grid; gap: 2px; max-height: 150px; overflow-y: auto; }
.pessoa {
  font: inherit;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 0;
  border-radius: 6px;
  color: var(--texto);
  padding: 5px 6px;
  cursor: pointer;
  text-align: left;
}
.pessoa:hover { background: rgba(255, 255, 255, 0.06); }
.pessoa::before {
  content: '';
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cor);
}
.pessoa span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pessoa small { color: var(--suave); font-size: 11px; white-space: nowrap; }

#chat-abas {
  display: flex;
  gap: 4px;
  padding: 8px 10px;
  overflow-x: auto;
  border-bottom: 1px solid #3a4160;
  flex: none;
}
.aba {
  font: inherit;
  font-size: 13px;
  flex: none;
  display: flex;
  gap: 6px;
  align-items: center;
  background: var(--fundo);
  color: var(--suave);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 4px 10px;
  cursor: pointer;
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.aba[style*='--cor'] { border-color: var(--cor); }
.aba.ativa { background: var(--texto); color: var(--fundo); }

#chat-mensagens {
  flex: 1;
  overflow-y: auto;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-vazio { margin: 0; font-size: 13px; color: var(--suave); }
.msg-topo { display: flex; gap: 8px; align-items: baseline; font-size: 13px; }
.msg-topo time { font-size: 11px; color: var(--suave); }
.msg-onde {
  font-size: 10px;
  color: var(--suave);
  border: 1px solid #3a4160;
  border-radius: 4px;
  padding: 0 4px;
}
.msg p { margin: 2px 0 0; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; white-space: pre-wrap; }
.msg small { display: block; font-size: 11px; color: #f4a261; margin-top: 2px; }
#chat-aviso { margin: 0 14px 6px; font-size: 12px; color: #f4a261; }

#chat-form { display: flex; gap: 6px; padding: 10px; border-top: 1px solid #3a4160; }
#chat-texto {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 14px;
  color: var(--texto);
  background: var(--fundo);
  border: 1px solid #3a4160;
  border-radius: 8px;
  padding: 8px 10px;
}
#chat-texto:focus { outline: 2px solid var(--destaque); outline-offset: -1px; }
#chat-form button {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  border: 0;
  border-radius: 8px;
  padding: 8px 12px;
  background: var(--destaque);
  color: #10231d;
  cursor: pointer;
}
#chat-texto:disabled, #chat-form button:disabled { opacity: 0.5; cursor: not-allowed; }

@media (max-width: 700px) {
  :root { --largura-chat: 100%; }
  body.chat-aberto #jogo, body.chat-aberto #barra { right: 0; }
  body.chat-aberto #btn-chat { display: none; }
}

/* ---------- Status ---------- */
#hud #btn-status {
  pointer-events: auto;
  font: inherit;
  font-size: 14px;
  color: var(--texto);
  background: rgba(38, 43, 64, 0.9);
  border: 0;
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 260px;
}
#btn-status::before,
#menu-status i,
.status-ponto {
  content: '';
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--status, #06d6a0);
  display: inline-block;
}
#btn-status span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#menu-status {
  position: fixed;
  top: 48px;
  left: 12px;
  width: 260px;
  background: var(--painel);
  border: 1px solid #3a4160;
  border-radius: 10px;
  padding: 6px;
  display: grid;
  gap: 2px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  z-index: 7;
}
#menu-status button {
  font: inherit;
  font-size: 14px;
  color: var(--texto);
  background: none;
  border: 0;
  border-radius: 6px;
  padding: 7px 8px;
  cursor: pointer;
  text-align: left;
  display: grid;
  grid-template-columns: 14px 1fr;
  align-items: center;
  column-gap: 6px;
}
#menu-status button:hover { background: rgba(255, 255, 255, 0.06); }
#menu-status button[aria-checked='true'] { background: rgba(6, 214, 160, 0.12); }
#menu-status small { grid-column: 2; font-size: 11px; color: var(--suave); }
#menu-status label { display: grid; gap: 4px; font-size: 12px; color: var(--suave); padding: 6px 8px 4px; }
#menu-status input {
  font: inherit;
  font-size: 13px;
  color: var(--texto);
  background: var(--fundo);
  border: 1px solid #3a4160;
  border-radius: 6px;
  padding: 6px 8px;
}
.miniatura .status-ponto { background: var(--status, #06d6a0); }
.miniatura[data-status='ocupado'] .status-ponto { --status: #ffd166; }
.miniatura[data-status='naoPerturbe'] .status-ponto { --status: #ef476f; }
.pessoa { flex-wrap: wrap; }
.pessoa em { flex-basis: 100%; padding-left: 26px; font-size: 11px; color: var(--suave); }
.pessoa::before { display: none; }
.pessoa em { padding-left: 15px; }

/* ---------- Reações e mão levantada ---------- */
#btn-reagir, #btn-mao { background: var(--painel) !important; color: var(--texto) !important; }
#btn-mao.ligado { background: #ffd166 !important; color: #2b2100 !important; }
#painel-reacoes {
  position: fixed;
  bottom: calc(var(--altura-barra) + 6px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  background: var(--painel);
  border: 1px solid #3a4160;
  border-radius: 999px;
  padding: 6px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  z-index: 6;
}
#painel-reacoes button {
  font-size: 22px !important;
  background: none !important;
  padding: 4px 6px !important;
  border-radius: 50% !important;
  transition: transform 0.1s;
}
#painel-reacoes button:hover { transform: scale(1.25); background: rgba(255, 255, 255, 0.08) !important; }
.miniatura.com-mao { border-color: #ffd166; }
.miniatura.com-mao::before {
  content: '✋';
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 18px;
  z-index: 2;
  animation: balancar 1s ease-in-out infinite alternate;
}
body.videos-expandidos #videos:not(.com-destaque) .miniatura.com-mao { order: -1; }
.reacao-flutuante {
  position: absolute;
  left: 50%;
  bottom: 30%;
  font-size: 36px;
  pointer-events: none;
  animation: subir 3s ease-out forwards;
  z-index: 3;
}
@keyframes subir {
  from { transform: translate(-50%, 0) scale(0.6); opacity: 0; }
  15% { transform: translate(-50%, -10%) scale(1.1); opacity: 1; }
  to { transform: translate(-50%, -120%) scale(1); opacity: 0; }
}
@keyframes balancar {
  from { transform: rotate(-12deg); }
  to { transform: rotate(12deg); }
}
/* Botões só com ícone: o texto continua para leitores de tela */
#btn-reagir span, #btn-mao span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
#btn-reagir b, #btn-mao b { font-size: 16px; }

/* ---------- Avisos ---------- */
#hud #btn-avisos {
  pointer-events: auto;
  font-size: 14px;
  background: rgba(38, 43, 64, 0.9);
  border: 0;
  border-radius: 999px;
  padding: 6px 10px;
  cursor: pointer;
}
#hud #btn-avisos[aria-pressed='true'] { opacity: 0.7; }
#cartoes {
  position: fixed;
  left: 50%;
  bottom: calc(var(--altura-barra) + 56px);
  transform: translateX(-50%);
  display: grid;
  gap: 8px;
  width: min(360px, calc(100% - 32px));
  z-index: 8;
  pointer-events: none;
}
body.chat-aberto #cartoes { left: calc((100% - var(--largura-chat)) / 2); }
.cartao-aviso {
  pointer-events: auto;
  background: var(--painel);
  border: 1px solid #3a4160;
  border-left: 4px solid var(--destaque);
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  animation: aparecer 0.2s ease-out;
}
.cartao-aviso p { margin: 0; font-size: 14px; }
.cartao-aviso div { display: flex; gap: 8px; margin-top: 8px; justify-content: flex-end; }
.cartao-aviso button {
  font: inherit;
  font-size: 13px;
  border: 0;
  border-radius: 8px;
  padding: 6px 12px;
  background: var(--fundo);
  color: var(--texto);
  cursor: pointer;
}
.cartao-aviso button.principal { background: var(--destaque); color: #10231d; font-weight: 600; }
@keyframes aparecer {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

/* ---------- Pessoas: ir até e chamar ---------- */
.pessoa-linha { display: flex; align-items: flex-start; gap: 2px; }
.pessoa-linha .pessoa { flex: 1; min-width: 0; }
.pessoa-acao {
  flex: none;
  font-size: 14px;
  background: none;
  border: 0;
  border-radius: 6px;
  padding: 4px 6px;
  cursor: pointer;
  opacity: 0.55;
}
.pessoa-acao:hover, .pessoa-acao:focus-visible { opacity: 1; background: rgba(255, 255, 255, 0.08); }
@media (max-width: 700px) {
  body.chat-aberto #cartoes { left: 50%; }
}

/* ---------- Avatar: editor, cartão de perfil, miniaturas ---------- */
#entrada .secundario {
  background: var(--fundo);
  color: var(--texto);
  border: 1px solid #3a4160;
}
#hud #btn-avatar {
  pointer-events: auto;
  font-size: 14px;
  background: rgba(38, 43, 64, 0.9);
  border: 0;
  border-radius: 999px;
  padding: 6px 10px;
  cursor: pointer;
}
.avatar-miniatura { width: 64px; height: 64px; image-rendering: pixelated; }
body.videos-expandidos .avatar-miniatura { width: 128px; height: 128px; }

#editor-avatar {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 20, 0.7);
  display: grid;
  place-items: center;
  z-index: 20;
  padding: 16px;
}
.editor-caixa {
  width: min(640px, 100%);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: var(--painel);
  border-radius: 14px;
  padding: 20px;
  display: grid;
  gap: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.editor-caixa h2 { margin: 0; font-size: 20px; }
.editor-corpo { display: grid; grid-template-columns: 180px 1fr; gap: 18px; align-items: start; }
.editor-previa {
  display: grid;
  gap: 8px;
  justify-items: center;
  background: var(--fundo);
  border-radius: 12px;
  padding: 10px;
  position: sticky;
  top: 0;
}
#previa-avatar { width: 160px; height: 160px; image-rendering: pixelated; }
#editor-opcoes { display: grid; gap: 10px; }
#editor-opcoes fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 6px; }
#editor-opcoes legend { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--suave); margin-bottom: 4px; }
.fichas, .amostras { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fichas button, #previa-girar, .editor-acoes button {
  font: inherit;
  font-size: 13px;
  color: var(--texto);
  background: var(--fundo);
  border: 1px solid #3a4160;
  border-radius: 999px;
  padding: 5px 12px;
  cursor: pointer;
}
.fichas button[aria-pressed='true'] { background: var(--destaque); color: #10231d; border-color: var(--destaque); font-weight: 600; }
.amostras button {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  padding: 0;
}
.amostras button[aria-pressed='true'] { outline: 2px solid var(--destaque); outline-offset: 2px; }
.amostras input[type='color'] { width: 30px; height: 28px; padding: 0; border: 0; background: none; cursor: pointer; }
.editor-cargo { display: grid; gap: 6px; font-size: 13px; color: var(--suave); }
.editor-cargo input {
  font: inherit;
  color: var(--texto);
  background: var(--fundo);
  border: 1px solid #3a4160;
  border-radius: 8px;
  padding: 9px 10px;
}
.editor-acoes { display: flex; gap: 8px; align-items: center; }
.editor-acoes span { flex: 1; }
.editor-acoes button { border-radius: 8px; padding: 9px 14px; }
.editor-acoes .principal { background: var(--destaque); color: #10231d; border-color: var(--destaque); font-weight: 600; }
@media (max-width: 560px) {
  .editor-corpo { grid-template-columns: 1fr; }
  .editor-previa { position: static; }
}

#cartao-perfil {
  position: fixed;
  width: 280px;
  background: var(--painel);
  border: 1px solid #3a4160;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  z-index: 9;
  display: grid;
  gap: 10px;
}
.perfil-topo { display: flex; gap: 12px; align-items: center; }
.perfil-avatar { width: 80px; height: 80px; flex: none; image-rendering: pixelated; background: var(--fundo); border-radius: 10px; }
.perfil-topo h3 { margin: 0 0 2px; font-size: 16px; }
.perfil-topo p { margin: 2px 0; font-size: 12px; color: var(--suave); display: flex; gap: 6px; align-items: center; }
.perfil-topo .perfil-cargo { color: var(--texto); font-size: 13px; }
.perfil-botoes { display: flex; gap: 6px; flex-wrap: wrap; }
.perfil-botoes button {
  flex: 1;
  font: inherit;
  font-size: 13px;
  color: var(--texto);
  background: var(--fundo);
  border: 1px solid #3a4160;
  border-radius: 8px;
  padding: 7px 8px;
  cursor: pointer;
  white-space: nowrap;
}
.perfil-botoes .principal { background: var(--destaque); color: #10231d; border-color: var(--destaque); font-weight: 600; }

/* ---------- Espaços: bloqueio e atalho para o início ---------- */
#bloqueio {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(400px, calc(100% - 32px));
  background: var(--painel);
  padding: 24px;
  border-radius: 12px;
  display: grid;
  gap: 12px;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}
#bloqueio h1 { margin: 0; font-size: 22px; }
#bloqueio p { margin: 0; color: var(--suave); }
#bloqueio a, #entrada a { color: var(--destaque); }
#bloqueio a[hidden] { display: none; }
#hud #hud-inicio {
  pointer-events: auto;
  color: var(--texto);
  text-decoration: none;
  background: rgba(38, 43, 64, 0.9);
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 15px;
}
#entrada input[readonly] { opacity: 0.7; }

/* ---------- Moderação ---------- */
.perfil-moderacao { border-top: 1px solid #3a4160; padding-top: 10px; }
.perfil-moderacao button { color: #ff8fa3; }
.perfil-topo .perfil-papel { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; }
.perfil-papel.dono { color: #ffd166 !important; }
.perfil-papel.admin { color: var(--destaque) !important; }

/* ---------- Modo construção ---------- */
#hud #btn-construir {
  pointer-events: auto;
  font-size: 14px;
  background: rgba(38, 43, 64, 0.9);
  border: 0;
  border-radius: 999px;
  padding: 6px 10px;
  cursor: pointer;
}
#hud #btn-construir[aria-pressed='true'] { background: #ffd166; }
#construcao {
  position: fixed;
  top: 56px;
  left: 12px;
  width: 236px;
  max-height: calc(100vh - var(--altura-barra) - 72px);
  overflow-y: auto;
  background: var(--painel);
  border: 1px solid #3a4160;
  border-radius: 12px;
  padding: 10px;
  display: grid;
  gap: 10px;
  z-index: 6;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}
#construcao header { display: flex; align-items: center; justify-content: space-between; }
#construcao h2 { margin: 0; font-size: 15px; }
#construcao-fechar { font: inherit; font-size: 20px; line-height: 1; background: none; border: 0; color: var(--suave); cursor: pointer; }
#construcao-abas { display: flex; flex-wrap: wrap; gap: 4px; }
#construcao-abas button {
  font: inherit;
  font-size: 12px;
  border: 1px solid #3a4160;
  border-radius: 999px;
  padding: 4px 9px;
  background: var(--fundo);
  color: var(--suave);
  cursor: pointer;
}
#construcao-abas button[aria-selected='true'] { background: var(--texto); color: var(--fundo); }
#construcao-paleta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.item-paleta {
  font: inherit;
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 6px 2px;
  border: 1px solid #3a4160;
  border-radius: 8px;
  background: var(--fundo);
  color: var(--suave);
  cursor: pointer;
}
.item-paleta[aria-pressed='true'] { border-color: var(--destaque); color: var(--texto); box-shadow: 0 0 0 1px var(--destaque); }
.item-paleta small { font-size: 10px; text-align: center; line-height: 1.1; }
.amostra-tile {
  width: 40px;
  height: 40px;
  background-image: url('/assets/tileset.png');
  background-size: 320px 80px;
  image-rendering: pixelated;
  border-radius: 4px;
}
.amostra-tile.icone { background: none; display: grid; place-items: center; font-size: 24px; }
#construcao-opcoes { display: flex; gap: 6px; flex-wrap: wrap; }
#construcao-opcoes button {
  font: inherit;
  font-size: 12px;
  border: 1px solid #3a4160;
  border-radius: 8px;
  padding: 6px 10px;
  background: var(--fundo);
  color: var(--texto);
  cursor: pointer;
}
#construcao .dica { margin: 0; font-size: 11px; }
body.construindo #jogo canvas { cursor: crosshair; }

/* ---------- Quadro branco ---------- */
#quadro {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 20, 0.75);
  display: grid;
  place-items: center;
  z-index: 20;
  padding: 16px;
}
.quadro-caixa {
  width: min(1200px, 100%);
  height: min(820px, calc(100vh - 32px));
  background: var(--painel);
  border-radius: 14px;
  padding: 12px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 10px;
}
.quadro-caixa header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.quadro-caixa h2 { margin: 0; font-size: 16px; flex: 1; min-width: 120px; }
#quadro-cores { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
#quadro-cores button, #quadro-limpar {
  font: inherit;
  font-size: 13px;
  border: 1px solid #3a4160;
  border-radius: 8px;
  padding: 5px 10px;
  background: var(--fundo);
  color: var(--texto);
  cursor: pointer;
}
#quadro-cores button[aria-pressed='true'] { outline: 2px solid var(--destaque); outline-offset: 1px; }
#quadro-cores .quadro-cor { width: 26px; height: 26px; padding: 0; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.3); }
#quadro-fechar { font: inherit; font-size: 22px; background: none; border: 0; color: var(--suave); cursor: pointer; }
#quadro-area { min-height: 0; display: grid; place-items: center; }
#quadro-tela { background: #ffffff; border-radius: 8px; touch-action: none; cursor: crosshair; }

/* ---------- Mesa fixa ---------- */
#hud #btn-mesa {
  pointer-events: auto;
  font: inherit;
  font-size: 13px;
  color: var(--texto);
  background: rgba(38, 43, 64, 0.9);
  border: 0;
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
}
/* O topo quebra em duas linhas em telas estreitas, sem passar por baixo do botão do chat */
#hud { flex-wrap: wrap; max-width: calc(100% - 130px); }
body.chat-aberto #hud { max-width: calc(100% - var(--largura-chat) - 130px); }

/* ---------- Mini mapa ---------- */
#hud #btn-minimapa {
  pointer-events: auto;
  font-size: 14px;
  background: rgba(38, 43, 64, 0.9);
  border: 0;
  border-radius: 999px;
  padding: 6px 10px;
  cursor: pointer;
}
#hud #btn-minimapa[aria-pressed='false'] { opacity: 0.6; }
#minimapa {
  position: fixed;
  right: 12px;
  bottom: calc(var(--altura-barra) + 12px);
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  image-rendering: pixelated;
  cursor: pointer;
  z-index: 4;
  opacity: 0.92;
}
#minimapa:hover { opacity: 1; }
body.chat-aberto #minimapa { right: calc(var(--largura-chat) + 12px); }
body.com-minimapa #zoom { bottom: calc(var(--altura-barra) + 190px); }
body.videos-expandidos #minimapa, body.construindo #minimapa { display: none; }
@media (max-width: 600px) {
  #minimapa { display: none; }
}

/* ---------- Editor de avatar: abas e miniaturas ---------- */
#previa-avatar { height: 180px; }
.editor-abas { display: flex; gap: 2px; border-bottom: 1px solid #3a4160; margin-bottom: 2px; }
.editor-abas button {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--suave);
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 6px 12px;
  cursor: pointer;
}
.editor-abas button[aria-selected='true'] { color: var(--texto); border-bottom-color: var(--destaque); }
.grade-opcoes { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; max-height: 300px; overflow-y: auto; padding: 2px; }
.grade-opcoes button {
  font: inherit;
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 6px 2px 4px;
  background: var(--fundo);
  border: 1px solid #3a4160;
  border-radius: 10px;
  color: var(--suave);
  cursor: pointer;
}
.grade-opcoes button:hover { border-color: #5a6390; }
.grade-opcoes button[aria-pressed='true'] { border-color: var(--destaque); box-shadow: 0 0 0 1px var(--destaque); color: var(--texto); }
.miniatura-opcao { width: 50px; height: 65px; image-rendering: pixelated; }
.grade-opcoes small { font-size: 10px; text-align: center; line-height: 1.15; }
.avatar-miniatura { width: 60px; height: 78px; }
body.videos-expandidos .avatar-miniatura { width: 100px; height: 130px; }
.perfil-avatar { width: 80px; height: 104px; }

/* ---------- Assistir junto ---------- */
#btn-assistir { background: var(--painel) !important; color: var(--texto) !important; }
#assistir {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 20, 0.72);
  display: grid;
  place-items: center;
  z-index: 20;
  padding: 16px;
}
.assistir-caixa {
  width: min(720px, 100%);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: var(--painel);
  border-radius: 14px;
  padding: 20px;
  display: grid;
  gap: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.assistir-caixa header { display: flex; align-items: center; justify-content: space-between; }
.assistir-caixa h2 { margin: 0; font-size: 20px; }
.assistir-caixa h3 { margin: 0 0 8px; font-size: 14px; }
.assistir-caixa h3 small { font-weight: 400; color: var(--suave); margin-left: 6px; }
#assistir-fechar { font: inherit; font-size: 24px; line-height: 1; background: none; border: 0; color: var(--suave); cursor: pointer; }
.assistir-intro { margin: 0; color: var(--suave); line-height: 1.5; }
.assistir-intro strong { color: var(--texto); }
.assistir-passos { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: var(--suave); font-size: 13px; line-height: 1.45; }
.assistir-passos strong { color: var(--texto); }
.assistir-regras { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.assistir-regras li { font-size: 12px; background: var(--fundo); border: 1px solid #3a4160; border-radius: 999px; padding: 4px 10px; }
.assistir-servicos { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.servico {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  min-height: 64px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--cor), color-mix(in srgb, var(--cor) 55%, #000));
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: transform 0.12s;
}
a.servico:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35); }
.servico.em-breve { opacity: 0.55; }
.servico small { font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.85; }
.assistir-dica { margin: 0 0 8px; font-size: 12px; color: var(--suave); }
.assistir-instalar { background: var(--fundo); border-radius: 12px; padding: 14px; }
.assistir-baixar {
  display: inline-block;
  margin-bottom: 10px;
  font-weight: 600;
  text-decoration: none;
  background: var(--destaque);
  color: #10231d;
  border-radius: 8px;
  padding: 10px 14px;
}
.assistir-instalar code { background: var(--painel); border-radius: 4px; padding: 1px 5px; font-size: 12px; color: var(--texto); }
.assistir-instalar li button {
  font: inherit;
  font-size: 11px;
  border: 1px solid #3a4160;
  border-radius: 6px;
  padding: 1px 6px;
  background: var(--painel);
  color: var(--texto);
  cursor: pointer;
}
.assistir-aviso { margin: 12px 0 6px; font-size: 12px; color: #ffd166; background: rgba(255, 209, 102, 0.1); border-radius: 8px; padding: 8px 10px; }

/* ---------- Vídeo assistido junto ---------- */
#btn-assistir { position: relative; }
#btn-assistir.com-sessao::after {
  content: '';
  position: absolute;
  top: 4px;
  right: 4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ef476f;
  box-shadow: 0 0 0 2px var(--fundo);
  animation: pulsar 1.4s ease-in-out infinite;
}
@keyframes pulsar { 50% { transform: scale(1.35); } }
.assistir-andamento {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(239, 71, 111, 0.14);
  border: 1px solid rgba(239, 71, 111, 0.5);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
}
.assistir-andamento span { flex: 1; }
.assistir-andamento button, .assistir-form button {
  font: inherit;
  font-weight: 600;
  border: 0;
  border-radius: 8px;
  padding: 8px 14px;
  background: var(--destaque);
  color: #10231d;
  cursor: pointer;
}
button.servico { font: inherit; cursor: pointer; }
button.servico:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35); }
.assistir-form { margin-top: 10px; display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
.assistir-form label { display: grid; gap: 4px; font-size: 13px; color: var(--suave); }
.assistir-form input {
  font: inherit;
  color: var(--texto);
  background: var(--fundo);
  border: 1px solid #3a4160;
  border-radius: 8px;
  padding: 9px 10px;
}
.assistir-erro { grid-column: 1 / -1; margin: 0; font-size: 12px; color: #ff8fa3; }
.assistir-erro:empty { display: none; }

#cinema {
  position: fixed;
  top: 56px;
  left: 50%;
  transform: translateX(-50%);
  width: min(960px, calc(100vw - 32px));
  background: #0d0f17;
  border: 1px solid #3a4160;
  border-radius: 12px;
  overflow: hidden;
  z-index: 7;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
}
body.chat-aberto #cinema { left: calc((100% - var(--largura-chat)) / 2); width: min(960px, calc(100vw - var(--largura-chat) - 32px)); }
#cinema header { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--painel); flex-wrap: wrap; }
#cinema-titulo { font-size: 14px; }
#cinema-info { flex: 1; font-size: 12px; color: var(--suave); min-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#cinema header button {
  font: inherit;
  font-size: 12px;
  border: 1px solid #3a4160;
  border-radius: 8px;
  padding: 5px 10px;
  background: var(--fundo);
  color: var(--texto);
  cursor: pointer;
}
#cinema-propaganda.ativo { background: #ffd166; color: #2b2100; border-color: #ffd166; }
#cinema-sair { font-size: 16px !important; line-height: 1; }
#cinema-player { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; }
#cinema-player iframe, .cinema-preencher, .cinema-vimeo { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.cinema-vimeo > div { position: absolute !important; inset: 0; padding: 0 !important; height: 100%; }
#cinema-esperando { background: #ffd166; color: #2b2100; font-size: 13px; font-weight: 600; padding: 6px 10px; }
#cinema-aviso {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  background: rgba(13, 15, 23, 0.88);
  color: var(--texto);
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 999px;
  pointer-events: none;
}
#cinema.pequeno { top: auto; bottom: calc(var(--altura-barra) + 12px); left: 12px; transform: none; width: 360px; }
body.chat-aberto #cinema.pequeno { left: 12px; width: 360px; }
#cinema.pequeno #cinema-info, #cinema.pequeno #cinema-encerrar { display: none; }
@media (max-width: 600px) {
  #cinema.pequeno { width: calc(100vw - 24px); }
}

.assistir-endereco {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--painel);
  border: 1px dashed #5a6390;
  font-size: 13px;
  color: var(--suave);
}
.assistir-endereco code { font-size: 14px !important; color: var(--destaque) !important; }
.assistir-endereco button {
  font: inherit;
  font-size: 12px;
  border: 0;
  border-radius: 6px;
  padding: 4px 10px;
  background: var(--destaque);
  color: #10231d;
  font-weight: 600;
  cursor: pointer;
}

/* ---------- Convidar ---------- */
#hud #btn-convidar {
  pointer-events: auto;
  font: inherit;
  font-size: 13px;
  color: var(--texto);
  background: rgba(38, 43, 64, 0.9);
  border: 0;
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
}
#convidar {
  position: fixed;
  top: 56px;
  left: 12px;
  width: min(380px, calc(100vw - 24px));
  background: var(--painel);
  border: 1px solid #3a4160;
  border-radius: 12px;
  padding: 14px;
  display: grid;
  gap: 10px;
  z-index: 9;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
#convidar h3 { margin: 0; font-size: 15px; }
#convidar label { display: grid; gap: 4px; font-size: 12px; color: var(--suave); }
.convidar-linha { display: flex; gap: 6px; }
.convidar-linha input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 13px;
  color: var(--texto);
  background: var(--fundo);
  border: 1px solid #3a4160;
  border-radius: 8px;
  padding: 7px 9px;
}
.convidar-linha button {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  border: 0;
  border-radius: 8px;
  padding: 7px 12px;
  background: var(--destaque);
  color: #10231d;
  cursor: pointer;
}
.convidar-novo {
  justify-self: start;
  font: inherit;
  font-size: 12px;
  margin-top: 6px;
  border: 1px solid #3a4160;
  border-radius: 8px;
  padding: 5px 10px;
  background: var(--fundo);
  color: var(--texto);
  cursor: pointer;
}
#convidar p { margin: 0; font-size: 12px; color: var(--suave); line-height: 1.4; }
#convidar p:empty { display: none; }

/* ---------- Celular ---------- */
@media (max-width: 600px) {
  :root { --altura-barra: 56px; }
  /* A barra rola para o lado se não couber; os botões ficam do tamanho de um dedo */
  #barra { justify-content: flex-start; gap: 4px; padding: 0 8px; overflow-x: auto; scrollbar-width: none; }
  #barra::-webkit-scrollbar { display: none; }
  #barra > * { flex: none; }
  #barra button { padding: 10px 8px; min-height: 42px; }
  .grupo-botao .seta { padding: 10px 5px; }
  /* No topo, só os ícones de Convidar e Minha mesa */
  #btn-convidar span, #btn-mesa span { display: none; }
  #hud { top: 8px; left: 8px; gap: 6px; max-width: calc(100% - 100px); }
  #hud > div { padding: 5px 10px; font-size: 13px; }
  #btn-chat { top: 8px; right: 8px; }
  #painel-reacoes { max-width: calc(100% - 16px); flex-wrap: wrap; justify-content: center; border-radius: 16px; }
  #painel-reacoes button { min-width: 40px; min-height: 40px; }
}

/* ---------- Rabiscos na tela compartilhada ---------- */
.rabisco-camada { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.miniatura.rabiscando .rabisco-camada { pointer-events: auto; cursor: crosshair; touch-action: none; }
.rabisco-botoes {
  position: absolute;
  top: 6px;
  left: 6px;
  right: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  z-index: 2;
  pointer-events: none;
}
.rabisco-botoes button {
  pointer-events: auto;
  font: inherit;
  font-size: 14px;
  min-width: 30px;
  height: 30px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: rgba(27, 31, 46, 0.85);
  color: var(--texto);
  cursor: pointer;
}
.rabisco-botoes button:hover { background: rgba(27, 31, 46, 1); }
.rabisco-botoes .rabisco-cor { width: 26px; min-width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.35); }
.rabisco-botoes .rabisco-cor[aria-pressed='true'] { outline: 3px solid var(--destaque); outline-offset: 1px; }
.rabisco-botoes .rabisco-largura::after { content: ''; width: var(--ponto); height: var(--ponto); border-radius: 50%; background: currentColor; }
.rabisco-botoes .rabisco-largura[aria-pressed='true'] { outline: 2px solid var(--destaque); }
/* Nas miniaturas pequenas só o botão de começar; as ferramentas aparecem com a tela ampliada */
.miniatura:not(.fixada) .rabisco-botoes button:not(.rabisco-comecar) { display: none; }
.miniatura.minha-tela:not(.fixada) .rabisco-botoes { display: none; }
.miniatura.rabiscando { border-color: #ffd166; }

/* ---------- Câmera solta: botão para voltar ao avatar ---------- */
#btn-centralizar {
  position: fixed;
  left: 50%;
  bottom: calc(var(--altura-barra) + 56px);
  transform: translateX(-50%);
  z-index: 4;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--destaque);
  color: #10231d;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}
body.chat-aberto #btn-centralizar { left: calc((100% - var(--largura-chat)) / 2); }
body.videos-expandidos #btn-centralizar { display: none; }
