@font-face { font-family: "DM Sans"; src: url(fontes/dmsans-latin.woff2) format("woff2"); font-weight: 400 700; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "DM Sans"; src: url(fontes/dmsans-latin-ext.woff2) format("woff2"); font-weight: 400 700; font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* mesma família de cor do painel: azul-escuro de fundo, verde esmeralda de ação */
:root {
  --fundo: #0b1220; --surf: #121c2e; --surf2: #18253b; --borda: #24334d;
  --txt: #e7edf6; --txt2: #9fb0c7; --txt3: #6f819c;
  --em: #10b981; --em2: #34d399; --alerta: #f59e0b; --erro: #ef4444;
  --raio: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--fundo); color: var(--txt); font: 14px/1.45 "DM Sans", system-ui, sans-serif; overflow: hidden; }
button, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.tela { position: fixed; inset: 0; display: grid; place-items: center;
  background: radial-gradient(1200px 600px at 50% -10%, #12324a 0%, var(--fundo) 60%); }
.cartao { background: var(--surf); border: 1px solid var(--borda); border-radius: 20px; padding: 32px; max-width: 420px; text-align: center;
  box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.cartao h1 { margin: 0 0 6px; font-size: 22px; }
.cartao p { color: var(--txt2); margin: 0 0 20px; }
.pulso { width: 44px; height: 44px; border-radius: 12px; background: var(--em); animation: pulso 1.2s ease-in-out infinite; }
#carregando p { color: var(--txt2); margin-top: 16px; }
@keyframes pulso { 50% { transform: scale(.82) rotate(45deg); opacity: .6; } }

.bt { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--borda); background: var(--surf2);
  border-radius: 10px; padding: 10px 18px; cursor: pointer; text-decoration: none; color: var(--txt); font-weight: 600; }
.bt.prim { background: var(--em); border-color: var(--em); color: #04231a; }
.bt.prim:hover { background: var(--em2); }
.bt:disabled { opacity: .5; cursor: default; }

/* ---------- lobby */
.cartao.lobby { display: grid; grid-template-columns: 420px 300px; gap: 28px; max-width: none; text-align: left; align-items: center; }
.previa { position: relative; aspect-ratio: 4/3; border-radius: 16px; overflow: hidden; background: #070c16; }
.previa video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.semCam { position: absolute; inset: 0; display: grid; place-items: center; color: var(--txt3); }
.medidor { position: absolute; left: 14px; top: 14px; width: 6px; height: 60px; border-radius: 3px; background: rgba(255,255,255,.12); overflow: hidden; }
.medidor i { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: var(--em2); transition: height .08s; }
.previaBts { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; gap: 10px; justify-content: center; }
.lado label { display: block; color: var(--txt2); font-size: 12px; font-weight: 600; margin-bottom: 12px; }
.lado select { display: block; width: 100%; margin-top: 4px; padding: 8px 10px; border-radius: 9px; border: 1px solid var(--borda); background: var(--surf2); }
.lado .sub { color: var(--txt2); margin: 0 0 18px; }
.lado .bt { width: 100%; margin-top: 8px; }
.aviso { color: var(--alerta); font-size: 13px; }

/* ---------- botões redondos (ícones em máscara SVG, sem arquivo de imagem) */
.redondo { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--borda); background: var(--surf2); cursor: pointer;
  display: inline-grid; place-items: center; position: relative; flex: none; }
.redondo::before { content: ""; width: 20px; height: 20px; background: var(--txt); -webkit-mask: var(--ico) center/contain no-repeat; mask: var(--ico) center/contain no-repeat; }
.redondo:hover { border-color: var(--txt3); }
.redondo.desl { background: #3a1620; border-color: #5c2030; }
.redondo.desl::before { background: #ff8a99; }
.redondo.ativo { background: var(--em); border-color: var(--em); }
.redondo.ativo::before { background: #04231a; }
#lbMic, #btMic { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Crect x='9' y='3' width='6' height='11' rx='3'/%3E%3Cpath d='M5 11a7 7 0 0 0 14 0M12 18v3'/%3E%3C/svg%3E"); }
#lbMic.desl, #btMic.desl { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Crect x='9' y='3' width='6' height='11' rx='3'/%3E%3Cpath d='M5 11a7 7 0 0 0 14 0M12 18v3M3 3l18 18'/%3E%3C/svg%3E"); }
#lbCam, #btCam { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='round'%3E%3Crect x='2' y='6' width='14' height='12' rx='2'/%3E%3Cpath d='m16 10 6-3v10l-6-3z'/%3E%3C/svg%3E"); }
#lbCam.desl, #btCam.desl { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='round' stroke-linecap='round'%3E%3Crect x='2' y='6' width='14' height='12' rx='2'/%3E%3Cpath d='m16 10 6-3v10l-6-3zM2 2l20 20'/%3E%3C/svg%3E"); }
#btTela { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='13' rx='2'/%3E%3Cpath d='M8 21h8M12 17v4M9 10l3-3 3 3M12 7v7'/%3E%3C/svg%3E"); }
#btVisual { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M8 3 3 6l2 5 3-1v11h8V10l3 1 2-5-5-3a4 4 0 0 1-8 0z'/%3E%3C/svg%3E"); }
#btPessoas { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='9' cy='8' r='4'/%3E%3Cpath d='M2 21c0-4 3-6 7-6s7 2 7 6M16 4a4 4 0 0 1 0 8M19 15c2 1 3 3 3 6'/%3E%3C/svg%3E"); }
#btConfig { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 6h10M18 6h2M4 12h4M12 12h8M4 18h12M20 18h0'/%3E%3Ccircle cx='16' cy='6' r='2'/%3E%3Ccircle cx='10' cy='12' r='2'/%3E%3Ccircle cx='18' cy='18' r='2'/%3E%3C/svg%3E"); }
.sair { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4M16 17l5-5-5-5M21 12H9'/%3E%3C/svg%3E"); background: #3a1620; border-color: #5c2030; }
.sair::before { background: #ff8a99; }

/* ---------- jogo */
#jogo { position: fixed; inset: 0; }
#palco { position: absolute; inset: 0; }
#palco canvas { display: block; image-rendering: pixelated; }

#barra { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 999px; background: rgba(18,28,46,.88); border: 1px solid var(--borda); backdrop-filter: blur(10px); }
.sep { width: 1px; height: 26px; background: var(--borda); margin: 0 2px; }
.emojis { display: flex; gap: 2px; }
.emojis button { width: 34px; height: 34px; border: 0; border-radius: 8px; background: none; font-size: 19px; cursor: pointer; }
.emojis button:hover { background: var(--surf2); }

#ajuda { position: absolute; left: 16px; bottom: 22px; color: var(--txt3); font-size: 12px; pointer-events: none; }

/* faixa de vídeo: quem está perto, no alto e no meio, como numa conversa */
#faixa { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; pointer-events: none; }
.vid { position: relative; width: 176px; aspect-ratio: 4/3; border-radius: 14px; overflow: hidden; background: #070c16;
  border: 2px solid transparent; box-shadow: 0 10px 30px rgba(0,0,0,.4); pointer-events: auto; transition: border-color .15s, opacity .3s; }
.vid.falando { border-color: var(--em2); }
.vid video { width: 100%; height: 100%; object-fit: cover; }
.vid.eu video { transform: scaleX(-1); }
.vid.tela { width: 300px; aspect-ratio: 16/10; cursor: zoom-in; }
.vid.tela video { object-fit: contain; background: #000; }
.vid .nome { position: absolute; left: 8px; bottom: 6px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: rgba(0,0,0,.55); }
.vid .mudo { position: absolute; right: 8px; bottom: 6px; width: 20px; height: 20px; border-radius: 50%; background: var(--erro);
  -webkit-mask: none; display: none; }
.vid.semMic .mudo { display: block; }
.vid .inicial { position: absolute; inset: 0; display: none; place-items: center; font-size: 34px; font-weight: 700; color: #fff; }
.vid.semCam .inicial { display: grid; }
.vid.semCam video { visibility: hidden; }
.vid.longe { opacity: .55; }

.local { position: absolute; right: 16px; bottom: 16px; }

#pessoas { position: absolute; right: 16px; top: 16px; width: 230px; max-height: calc(100% - 110px); overflow: auto; padding: 14px;
  border-radius: var(--raio); background: rgba(18,28,46,.9); border: 1px solid var(--borda); backdrop-filter: blur(10px); }
#pessoas h2 { margin: 0 0 10px; font-size: 13px; color: var(--txt2); font-weight: 600; display: flex; justify-content: space-between; }
#pessoas h2 b { color: var(--em2); }
#lista { list-style: none; margin: 0; padding: 0; }
#lista li { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 8px; cursor: pointer; }
#lista li:hover { background: var(--surf2); }
#lista .bolinha { width: 28px; height: 28px; border-radius: 8px; flex: none; image-rendering: pixelated; }
#lista .onde { display: block; font-size: 11px; color: var(--txt3); }
#lista .perto { color: var(--em2); }

.toast { position: absolute; left: 50%; top: 50%; transform: translate(-50%, 120px); padding: 8px 16px; border-radius: 999px;
  background: rgba(18,28,46,.92); border: 1px solid var(--borda); color: var(--txt); font-weight: 600; pointer-events: none;
  animation: surge .25s ease-out; }
@keyframes surge { from { opacity: 0; transform: translate(-50%, 130px); } }

#ampliado { position: fixed; inset: 0; background: rgba(5,8,14,.92); display: grid; place-items: center; z-index: 10; }
#ampliado video { max-width: 94vw; max-height: 90vh; border-radius: 10px; }
#ampliado .fechar { position: absolute; top: 16px; right: 20px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--borda);
  background: var(--surf2); font-size: 22px; cursor: pointer; }

dialog#cfg { border: 1px solid var(--borda); border-radius: 16px; background: var(--surf); color: var(--txt); padding: 22px; width: 340px; }
dialog#cfg::backdrop { background: rgba(5,8,14,.6); }

/* ---------- boneco no lobby */
.lbBoneco { display: flex; align-items: center; gap: 14px; padding: 10px 12px; margin: 0 0 16px; border: 1px solid var(--borda);
  border-radius: 12px; background: var(--surf2); }
.lbBoneco canvas { image-rendering: pixelated; background: #0e1626; border-radius: 10px; }
.lbBoneco b { display: block; margin-bottom: 6px; }
.lado .lbBoneco .bt { width: auto; margin: 0; padding: 6px 12px; font-size: 13px; }

/* ---------- personalizar */
dialog#personalizar { border: 1px solid var(--borda); border-radius: 18px; background: var(--surf); color: var(--txt); padding: 0;
  width: min(860px, 94vw); max-height: 90vh; overflow: hidden; }
dialog#personalizar[open] { display: grid; grid-template-columns: 230px 1fr; }
dialog#personalizar::backdrop { background: rgba(5,8,14,.65); }
.psPrevia { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 24px 18px;
  background: radial-gradient(220px 220px at 50% 40%, #1c3350, #0e1626); border-right: 1px solid var(--borda); }
.psPrevia canvas { image-rendering: pixelated; }
.psPrevia p { margin: 0; color: var(--txt2); font-weight: 600; }
.psBts { margin-top: auto; display: flex; gap: 8px; width: 100%; }
.psBts .bt { flex: 1; padding: 9px 10px; }
.psOpcoes { padding: 20px 22px; overflow: auto; max-height: 90vh; }
.psOpcoes h3 { font-size: 13px; color: var(--txt2); margin: 18px 0 8px; text-transform: uppercase; letter-spacing: .06em; }
.psAbas { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.psAba { border: 1px solid var(--borda); background: var(--surf2); border-radius: 999px; padding: 6px 14px; cursor: pointer; font-weight: 600; font-size: 13px; }
.psAba.sel { background: var(--em); border-color: var(--em); color: #04231a; }
.psTrajes { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.psTraje { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border: 2px solid var(--borda);
  border-radius: 12px; background: #0e1626; cursor: pointer; }
.psTraje canvas { image-rendering: pixelated; }
.psTraje span { font-size: 11px; color: var(--txt2); text-align: center; line-height: 1.2; }
.psTraje.sel { border-color: var(--em2); }
.psTraje:hover { border-color: var(--txt3); }
.psLinha { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0; }
.psLinha b { width: 104px; font-size: 12px; color: var(--txt2); font-weight: 600; }
.psCor { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--surf); background: var(--c); cursor: pointer;
  box-shadow: 0 0 0 1px var(--borda); }
.psCor.sel { box-shadow: 0 0 0 2px var(--em2); }
.psOpc { border: 1px solid var(--borda); background: var(--surf2); border-radius: 8px; padding: 4px 10px; cursor: pointer; font-size: 12px; }
.psOpc.sel { border-color: var(--em2); color: var(--em2); }

.linkEquipe { display: block; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--borda); color: var(--txt2); font-size: 12px; text-decoration: none; }
.linkEquipe:hover { color: var(--em2); }

/* ---------- páginas de conta (entrar, criar senha, equipe) */
.tela.conta { overflow: auto; padding: 24px 16px; }
.conta .cartao { width: 100%; max-width: 400px; text-align: left; }
.conta .cartao.largo { max-width: 760px; }
.conta .form { display: grid; gap: 12px; margin: 4px 0 0; }
.conta .form label { display: grid; gap: 4px; color: var(--txt2); font-size: 12px; font-weight: 600; }
.conta input[type=email], .conta input[type=password], .conta input[type=text], .conta .form input:not([type]) {
  width: 100%; padding: 10px 12px; border-radius: 9px; border: 1px solid var(--borda); background: var(--surf2); color: var(--txt); font: inherit; }
.conta input:focus { outline: 2px solid var(--em); outline-offset: 1px; }
.conta .form .bt { margin-top: 4px; }
.conta .dica, .conta .rodape { color: var(--txt3); font-size: 12px; margin: 0; }
.conta .rodape { margin-top: 18px; }
.conta .msg { padding: 9px 12px; border-radius: 9px; font-size: 13px; margin: 0 0 14px; }
.conta .msg.erro { background: #3a1620; color: #ffb3bd; }
.conta .msg.ok { background: #0f3a2c; color: #a7f3d0; }
.conta .topo { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.conta .topo h1 { margin: 0; }
.conta h2 { font-size: 15px; margin: 26px 0 10px; }
.conta table.equipe { width: 100%; border-collapse: collapse; font-size: 13px; }
.conta table.equipe th { text-align: left; color: var(--txt3); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; padding: 6px 8px; }
.conta table.equipe td { padding: 10px 8px; border-top: 1px solid var(--borda); vertical-align: middle; }
.conta table.equipe .sub { color: var(--txt3); font-size: 12px; }
.conta .selo { font-size: 10px; font-weight: 700; color: var(--em2); border: 1px solid var(--em); border-radius: 999px; padding: 1px 6px; margin-left: 4px; }
.conta .acoes { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.conta .acoes .bt { padding: 6px 10px; font-size: 12px; }
.bt.perigo { color: #ff8a99; border-color: #5c2030; background: #2a1219; }
.conta .form.linha { grid-template-columns: 1fr 1fr auto auto; align-items: end; }
.conta label.check { display: flex; align-items: center; gap: 6px; padding-bottom: 10px; }
.conta .link { background: var(--surf2); border: 1px solid var(--em); border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; }
.conta .link p { margin: 0 0 8px; color: var(--txt); font-size: 13px; }
.conta .link input { font-family: ui-monospace, monospace; font-size: 12px; }
@media (max-width: 640px) { .conta .form.linha { grid-template-columns: 1fr; } }
