:root { --ink:#0f172a; --muted:#64748b; --line:#e2e8f0; --blue:#1d4ed8; --glass:rgba(248,250,252,.94); }
* { box-sizing:border-box; }
[hidden] { display:none !important; }
html,body { margin:0; height:100%; overflow:hidden; font-family:"DM Sans",system-ui,sans-serif; color:var(--ink); background:#bfe0a3; }
#cena { position:fixed; inset:0; width:100%; height:100%; touch-action:none; display:block; }
#etiquetas { position:fixed; inset:0; pointer-events:none; overflow:hidden; }
button,input,select,textarea { font:inherit; color:inherit; }
button { cursor:pointer; }
:focus-visible { outline:2px solid var(--blue); outline-offset:2px; }

.tag { position:absolute; left:0; top:0; display:flex; flex-direction:column; align-items:center; gap:5px; }
.label { display:flex; align-items:center; gap:6px; background:var(--ink); color:#fff; font-size:12px; font-weight:600; padding:4px 10px; border-radius:99px; white-space:nowrap; border:2px solid transparent; }
.tag.me .label span::after { content:' (você)'; font-weight:400; opacity:.7; }
.tag.speaking .label { border-color:#34d399; }
.label i { width:7px; height:7px; border-radius:50%; }
.label b { font-size:9px; background:var(--blue); padding:1px 4px; border-radius:4px; }
.bubble { background:#fff; font-size:13px; padding:7px 12px; border-radius:14px; box-shadow:0 4px 14px rgba(15,23,42,.18); max-width:220px; width:max-content; text-align:center; }

.panel { position:fixed; background:var(--glass); border:1px solid #fff; border-radius:20px; box-shadow:0 10px 30px rgba(15,23,42,.14); }
#equipe { top:16px; left:16px; width:292px; max-height:calc(100% - 100px); display:flex; flex-direction:column; padding:16px; }
#equipe header { display:flex; justify-content:space-between; align-items:flex-start; gap:8px; }
#equipe h2 { margin:0; font-size:25px; font-weight:500; line-height:1.15; overflow-wrap:anywhere; }
#equipe small { color:var(--muted); }
#equipe .corpo { overflow:auto; margin-top:10px; }
#equipe.fechado .corpo { display:none; }
#equipe.fechado #recolher { rotate:180deg; }
#lista { list-style:none; padding:0; margin:8px 0 0; }
#lista button { display:flex; align-items:center; gap:12px; width:100%; border:0; background:none; padding:7px 6px; border-radius:12px; text-align:left; }
#lista button:hover { background:#fff; }
#lista .foto { width:32px; height:32px; border-radius:50%; color:#fff; display:grid; place-items:center; font-size:13px; font-weight:600; flex:none; }
#lista strong { display:block; font-weight:500; font-size:14px; }
#lista small { font-size:12px; display:block; }
#lista .ponto { width:8px; height:8px; border-radius:50%; margin-left:auto; flex:none; }
select,input,textarea { border:1px solid var(--line); border-radius:12px; padding:9px 12px; background:#fff; width:100%; }

.round { width:40px; height:40px; border-radius:50%; border:0; background:#fff; box-shadow:0 2px 8px rgba(15,23,42,.14); font-size:18px; flex:none; }
.btn { border:0; background:#fff; border-radius:99px; padding:11px 18px; font-weight:500; box-shadow:0 3px 12px rgba(15,23,42,.14); white-space:nowrap; }
.btn.dark { background:var(--ink); color:#fff; }
.btn.off { background:#fee2e2; color:#991b1b; }
.btn.perigo { background:#dc2626; color:#fff; }
.btn:disabled { opacity:.6; cursor:wait; }
#barra { position:fixed; left:50%; bottom:max(18px,env(safe-area-inset-bottom)); translate:-50% 0; display:flex; gap:8px; max-width:calc(100% - 16px); overflow-x:auto; padding:4px; }
#zoom { position:fixed; right:18px; bottom:22px; display:flex; gap:10px; }
#dica { position:fixed; left:16px; bottom:22px; background:var(--glass); border-radius:12px; padding:9px 14px; font-size:13px; color:var(--muted); max-width:340px; }
kbd { background:#fff; border-radius:5px; padding:1px 6px; margin:0 1px; color:var(--ink); font:600 11px "DM Sans",sans-serif; }
@media (max-width:1500px) { #dica { display:none; } }
#naoLidas { background:#dc2626; color:#fff; border-radius:99px; font-size:11px; padding:1px 7px; }
#aviso { position:fixed; left:50%; bottom:90px; translate:-50% 0; background:var(--ink); color:#fff; padding:10px 18px; border-radius:14px; font-size:14px; max-width:calc(100% - 32px); text-align:center; z-index:20; }

#lateral { background:#fff; top:16px; right:16px; bottom:84px; width:340px; display:flex; flex-direction:column; overflow:hidden; z-index:5; }
#lateral nav { display:flex; gap:6px; padding:10px; border-bottom:1px solid var(--line); }
#lateral nav button { border:0; background:none; border-radius:99px; padding:7px 16px; }
#lateral nav button.on { background:var(--ink); color:#fff; }
#fechar { margin-left:auto; }
#lateral section { flex:1; min-height:0; display:flex; flex-direction:column; }
#mensagens { list-style:none; margin:0; padding:12px; overflow:auto; flex:1; }
#mensagens li { margin-bottom:10px; font-size:14px; overflow-wrap:anywhere; white-space:pre-wrap; }
#mensagens b { font-weight:600; margin-right:6px; }
#mensagens time { color:var(--muted); font-size:11px; }
#mensagens p { margin:2px 0 0; }
#enviar { display:flex; gap:8px; padding:10px; border-top:1px solid var(--line); }


#videos { position:fixed; top:16px; left:324px; right:372px; display:flex; flex-wrap:wrap; justify-content:center; gap:8px; pointer-events:none; }
#videos figure { margin:0; position:relative; width:190px; aspect-ratio:4/3; border-radius:14px; overflow:hidden; background:var(--ink); box-shadow:0 6px 18px rgba(15,23,42,.25); pointer-events:auto; cursor:zoom-in; }
#videos figure.screen { width:300px; aspect-ratio:16/9; }
#videos figure.screen video { object-fit:contain; }
#videos figure.big { position:fixed; inset:5% 5% 100px; width:auto; z-index:10; aspect-ratio:auto; cursor:zoom-out; }
#videos figure.big video { object-fit:contain; }
#videos figure.muted { display:none; }
#videos video { width:100%; height:100%; object-fit:cover; }
#videos .mirror video { transform:scaleX(-1); }
#videos figcaption { position:absolute; left:8px; bottom:8px; background:rgba(15,23,42,.75); color:#fff; font-size:12px; padding:2px 8px; border-radius:99px; }

.overlay { position:fixed; inset:0; display:grid; place-items:center; background:rgba(15,23,42,.35); padding:16px; overflow:auto; z-index:30; }
.card { background:#fff; border-radius:24px; padding:28px; width:min(380px,100%); display:grid; gap:14px; box-shadow:0 24px 60px rgba(15,23,42,.3); }
.card h1 { margin:0; font-weight:600; font-size:28px; } .card p { margin:0; color:var(--muted); }
.card label { display:grid; gap:6px; font-size:14px; font-weight:500; }
.erro { color:#b91c1c !important; font-size:13px; margin:0; }
.erro:empty { display:none; }

@media (max-width:760px) {
  #equipe { width:auto; max-width:calc(100% - 32px); max-height:55%; padding:10px 12px; }
  #equipe h2 { font-size:17px; }
  #lateral { left:8px; right:8px; width:auto; top:8px; bottom:78px; }
  #videos { top:auto; bottom:128px; left:8px; right:8px; flex-wrap:nowrap; overflow-x:auto; justify-content:flex-start; pointer-events:auto; }
  #videos figure { width:118px; flex:none; } #videos figure.screen { width:180px; }
  #barra { left:0; translate:none; max-width:100%; width:100%; padding:4px 8px; }
  #zoom { bottom:82px; right:10px; }
}


#entrada.overlay { background:radial-gradient(ellipse at top,#37265e 0%,#1c1533 58%,#120e20 100%); }
.entrada-card.card { width:min(860px,100%); padding:clamp(18px,4vw,32px); gap:22px; background:#faf8fd; box-shadow:0 22px 70px #09051877; }
.entrada-topo { display:grid; gap:6px; padding-bottom:15px; border-bottom:1px solid #ede5f5; }
.entrada-topo h1 { color:#271940; font-size:clamp(24px,4vw,34px); font-weight:700; }
.entrada-grade { display:grid; grid-template-columns:minmax(245px,.85fr) minmax(0,1.15fr); gap:clamp(16px,4vw,36px); }
.entrada-dados,.editor-avatar { display:grid; align-content:start; gap:15px; min-width:0; }
.entrada-dados { align-self:center; }
.entrada-dados h2,.editor-avatar h2 { font-size:17px; margin:0; color:#392451; }
#acessoSocial { display:grid; gap:10px; padding-bottom:14px; border-bottom:1px solid #ede5f5; }
#provedoresLogin { display:grid; gap:7px; }
.social-login { display:block; padding:8px 12px; text-align:center; color:#392451; text-decoration:none; font-size:14px; font-weight:700; background:#fff; border:1px solid #e1d5ef; border-radius:12px; }
.social-login:hover { background:#f2eafa; border-color:#a48bc9; }
.editor-avatar { padding:14px; background:#f2ebf8; border:1px solid #e9dff2; border-radius:18px; }
.avatar-palco { position:relative; overflow:hidden; min-height:160px; border-radius:13px; background:radial-gradient(ellipse at 50% 66%,#d7c6ee,#a68bc4); }
#avatarPreview { display:block; width:100%; height:clamp(170px,27vh,230px); }
#semPreview { position:absolute; inset:0; display:grid; place-items:center; padding:20px; margin:0; text-align:center; color:#251b3a; }
#avatarPreview[hidden] + #semPreview { position:static; min-height:160px; }
.avatar-controles { position:absolute; inset:auto 10px 10px; display:flex; justify-content:space-between; }
.avatar-opcoes { display:grid; gap:8px; }
.avatar-opcoes details { background:#fcfaff; padding:9px 11px; border:1px solid #e9dff2; border-radius:10px; }
.avatar-opcoes summary { cursor:pointer; color:#392451; font-size:14px; font-weight:700; }
.avatar-opcoes label { margin-top:8px; }
.avatar-cores { border:0; padding:0; margin:8px 0 0; display:flex; flex-wrap:wrap; gap:5px; }
.avatar-cores legend { margin-bottom:5px; color:#564364; font-size:12px; }
.avatar-cores input { appearance:none; cursor:pointer; margin:2px; width:24px; height:24px; border-radius:7px; background:var(--amostra); border:1px solid #35233d55; }
.avatar-cores input:checked { outline:2px solid #5b3b8f; outline-offset:2px; }
@media (max-width:650px) {
  #entrada.overlay { place-items:start center; }
  .entrada-grade { grid-template-columns:1fr; }
  .entrada-dados { display:contents; }
  .entrada-dados label { order:1; }
  .editor-avatar { order:2; }
  #erroEntrada { order:3; }
  #entrarEscritorio { order:4; }
}

/* ───── tela do cinema ───── */
#telaCinema { position:fixed; left:0; top:0; width:640px; height:360px; transform-origin:0 0; background:#000; pointer-events:none; }
#telaCinema iframe { width:100%; height:100%; border:0; display:block; }
#telaCinema.expandido { z-index:25; pointer-events:auto; left:50%; top:50%; translate:-50% -50%; width:min(94vw,calc((100dvh - 110px) * 16 / 9)); height:auto; aspect-ratio:16/9; border-radius:14px; overflow:hidden; box-shadow:0 30px 80px rgba(0,0,0,.6); }
#fundoCinema { position:fixed; inset:0; z-index:24; background:rgba(9,7,20,.92); display:flex; justify-content:center; align-items:flex-start; padding-top:10px; }
#linkCinema { border:0; border-radius:20px; padding:22px; width:min(460px,calc(100% - 32px)); box-shadow:0 20px 60px rgba(15,23,42,.35); }
#linkCinema::backdrop { background:rgba(15,23,42,.45); }
#linkCinema h3 { margin:0 0 6px; }
#linkCinema p { margin:0 0 12px; color:var(--muted); font-size:14px; }
#linkCinema label { display:grid; gap:6px; font-size:14px; font-weight:500; margin-bottom:8px; }
#linkCinema footer { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; margin-top:8px; }

/* evita que o zoom cubra a barra de botoes em telas medias */
@media (max-width:1200px) { #zoom { bottom:82px; right:10px; } }
