* { box-sizing: border-box; }
[hidden] { display: none !important; }
:root { --bg: #000000; --panel: #111111; --panel2: #1c1c1c; --line: #2a2a2a; --text: #ffffff; --muted: #a3a3a3; --accent: #7CFF4F; --accent-ink: #0b0d0a; --red: #e74c3c; --green: #7CFF4F; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: "DM Sans", system-ui, "Segoe UI", sans-serif; overflow: hidden; }
button, .btn { font: inherit; padding: 8px 12px; border: 0; border-radius: 10px; background: var(--panel2); color: var(--text); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
button:hover, .btn:hover { filter: brightness(1.2); }
button.primary { background: var(--accent); font-weight: 600; padding: 12px; width: 100%; justify-content: center; }
button.off { background: var(--red); }
button.on { background: var(--accent); }
input, select, textarea { width: 100%; padding: 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); font: inherit; }
.muted { color: var(--muted); }

/* Entrada */
#lobby { position: fixed; inset: 0; display: grid; place-items: center; background: radial-gradient(circle at 85% 95%, #2f6b1f 0%, #0a1407 35%, #000 70%); padding: 16px; }
.card { background: var(--panel); padding: 28px; border-radius: 18px; width: min(460px, 100%); box-shadow: 0 20px 60px #0008; }
.card h1 { margin: 0; }
.card p { margin: 4px 0 18px; }
.lobby-grid { display: grid; grid-template-columns: 96px 1fr; gap: 16px; margin-bottom: 18px; }
#preview { background: #1f1f1f; border-radius: 12px; image-rendering: pixelated; }
.pick { margin-top: 10px; }
.pick label { font-size: 12px; color: var(--muted); }
.pick > div { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.sw { width: 26px; height: 26px; border-radius: 50%; cursor: pointer; border: 3px solid transparent; }
.sw.sel, .chip.sel { border-color: #fff; }
.chip { padding: 4px 10px; border-radius: 14px; background: var(--panel2); cursor: pointer; font-size: 13px; border: 2px solid transparent; }

/* Jogo */
#game { display: block; image-rendering: pixelated; cursor: crosshair; }
#videos { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 5; flex-wrap: wrap; justify-content: center; max-width: 70vw; }
#videos .v { position: relative; width: 176px; height: 118px; border-radius: 12px; overflow: hidden; background: #000; border: 2px solid var(--accent); cursor: zoom-in; transition: border-color .2s; }
#videos .v.speaking { border-color: var(--green); }
#videos .v.screen { border-color: #ffffff; }
#videos video { width: 100%; height: 100%; object-fit: cover; }
#videos .v.screen video { object-fit: contain; }
#videos .v span { position: absolute; bottom: 4px; left: 6px; font-size: 12px; background: #000a; padding: 2px 6px; border-radius: 6px; }
#videos:has(.v:nth-child(5)) .v:not(.big) { width: 128px; height: 86px; }
#videos .v.big { position: fixed; inset: 60px 280px 80px 60px; width: auto; height: auto; z-index: 20; cursor: zoom-out; }
#zone { position: fixed; top: 12px; left: 12px; z-index: 6; background: #000a; padding: 5px 14px; border-radius: 20px; font-size: 13px; pointer-events: none; }
#zone:empty { display: none; }
#recBadge { position: fixed; top: 46px; left: 12px; z-index: 6; background: #c0392bdd; padding: 5px 14px; border-radius: 20px; font-size: 13px; }
#captions { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%); max-width: 640px; width: 90%; pointer-events: none; }
#captions div { background: #000c; margin-top: 4px; padding: 6px 12px; border-radius: 8px; font-size: 15px; }
#captions b { color: #ffe066; }
#toasts { position: fixed; top: 16px; right: 16px; z-index: 40; display: flex; flex-direction: column; gap: 6px; }
#toasts div { background: var(--panel); border-left: 4px solid var(--accent); padding: 10px 14px; border-radius: 8px; box-shadow: 0 6px 20px #0006; max-width: 300px; animation: in .2s; }
@keyframes in { from { transform: translateX(30px); opacity: 0; } }
#minimap { position: fixed; left: 12px; bottom: 76px; border: 2px solid var(--line); border-radius: 8px; background: #000; cursor: pointer; image-rendering: pixelated; }

.panel { position: fixed; top: 0; bottom: 64px; width: 270px; background: #111111f2; display: flex; flex-direction: column; z-index: 10; border-color: var(--line); }
.panel.left { left: 0; border-right: 1px solid var(--line); padding: 12px; overflow-y: auto; }
.panel.right { right: 0; border-left: 1px solid var(--line); }
.panel h3 { margin: 0 0 10px; }
.person { padding: 8px; border-radius: 10px; background: var(--panel2); margin-bottom: 6px; }
.person .top { display: flex; align-items: center; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.person small { color: var(--muted); display: block; margin-top: 2px; }
.person .acts { display: flex; gap: 4px; margin-top: 6px; }
.person .acts button { padding: 4px 8px; font-size: 12px; }
.tabs { display: flex; gap: 4px; padding: 8px; }
.tabs button { flex: 1; justify-content: center; padding: 6px; font-size: 13px; }
#dmTo { margin: 0 8px 4px; width: auto; }
#messages { flex: 1; overflow-y: auto; padding: 10px; font-size: 14px; }
#messages > div { margin-bottom: 6px; word-wrap: break-word; }
#messages b { color: #b6ff9a; }
#messages .tag { font-size: 11px; color: var(--muted); }
#chat input { border-radius: 0; border-width: 1px 0 0; }

#emojiBar, #statusMenu { position: fixed; bottom: 70px; left: 50%; transform: translateX(-50%); background: var(--panel); padding: 8px; border-radius: 14px; display: flex; gap: 4px; z-index: 30; box-shadow: 0 6px 30px #0008; }
#emojiBar button { font-size: 22px; padding: 6px 8px; background: none; }
#statusMenu { flex-direction: column; width: 260px; }

#bar { position: fixed; bottom: 0; left: 0; right: 0; height: 64px; background: #000000; display: flex; align-items: center; justify-content: center; gap: 20px; padding: 0 12px; z-index: 15; }
#bar .group { display: flex; gap: 6px; }
#bar button, #bar .btn { font-size: 18px; padding: 9px 12px; }
#myStatusDot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); }
#unread { background: var(--red); border-radius: 10px; font-size: 11px; padding: 1px 6px; }
#btnStatus { font-size: 14px !important; }

#modal { position: fixed; inset: 0; background: #0009; display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal-box { background: var(--panel); border-radius: 16px; width: min(960px, 100%); max-height: 92vh; overflow: auto; }
.modal-box header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.modal-box header h3 { margin: 0; }
#modalBody { padding: 16px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.wb canvas { width: 100%; background: #fff; border-radius: 10px; touch-action: none; cursor: crosshair; }
.notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-top: 12px; }
.note { color: #222; padding: 12px; border-radius: 4px; min-height: 110px; position: relative; box-shadow: 2px 3px 8px #0005; white-space: pre-wrap; }
.note small { display: block; margin-top: 8px; color: #555; }
.note button { position: absolute; top: 4px; right: 4px; background: none; color: #333; padding: 2px 6px; }
.ttt { display: grid; grid-template-columns: repeat(3, 90px); gap: 6px; margin: 14px auto; width: max-content; }
.ttt button { width: 90px; height: 90px; font-size: 44px; justify-content: center; }
table.rank { width: 100%; border-collapse: collapse; }
table.rank td { padding: 6px; border-bottom: 1px solid var(--line); }
.help { columns: 2; font-size: 14px; }
.help div { margin-bottom: 6px; break-inside: avoid; }
kbd { background: var(--panel2); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; font-size: 12px; }

@media (max-width: 800px) {
  .panel { width: 100%; }
  #minimap { display: none; }
  #bar { gap: 6px; justify-content: flex-start; overflow-x: auto; }
  #videos .v { width: 120px; height: 80px; }
  #videos:has(.v:nth-child(5)) .v:not(.big) { width: 128px; height: 86px; }
#videos .v.big { inset: 60px 10px 80px 10px; }
}

/* ===== Barra estilo Meet (ícones Lucide + rótulo) ===== */
#bar { height: 72px; justify-content: space-between; gap: 12px; padding: 0 14px; background: #000000; border-top: 1px solid #1f1f1f; }
.bar-side { display: flex; gap: 4px; align-items: center; flex: 1; }
.bar-side.right { justify-content: flex-end; }
.bar-center { display: flex; gap: 6px; align-items: center; }
.tool { flex-direction: column; gap: 3px; min-width: 64px; padding: 8px 8px 6px !important; background: transparent; border-radius: 12px; font-size: 11px !important; color: #e5e5e5; position: relative; justify-content: center; }
.tool svg { width: 22px; height: 22px; stroke-width: 2; }
.tool span { font-size: 11px; line-height: 1; white-space: nowrap; }
.tool:hover { background: #ffffff12; filter: none; }
.bar-center .tool svg { padding: 9px; width: 42px; height: 42px; background: #262626; border-radius: 50%; box-sizing: border-box; }
.bar-center .tool.off svg { background: #ea4335; color: #fff; }
.bar-center .tool.on svg { background: #7CFF4F; color: #000000; }
.bar-center .tool.off, .bar-center .tool.on { background: transparent; }
.bar-center .tool.leave svg { background: #ea4335; color: #fff; width: 56px; border-radius: 22px; }
.bar-side .tool.on { background: #ffffff14; color: #fff; }
#unread { position: absolute; top: 2px; right: 10px; background: #ea4335; color: #fff; border-radius: 10px; font-size: 10px; padding: 1px 5px; }
.me-chip { background: #141414; border-radius: 26px; padding: 6px 12px 6px 10px !important; gap: 10px; font-size: 14px !important; max-width: 240px; }
.me-chip .me-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; overflow: hidden; }
.me-chip b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.me-chip small { color: var(--muted); font-size: 11px; }
.me-chip svg { width: 16px; height: 16px; color: var(--muted); }
#myStatusDot { width: 12px; height: 12px; flex: none; }
.popover { position: fixed; bottom: 82px; background: #141414; border: 1px solid #2a2a2a; border-radius: 14px; box-shadow: 0 12px 40px #000a; z-index: 30; padding: 8px; }
#emojiBar { left: 50%; transform: translateX(-50%); display: flex; flex-wrap: wrap; gap: 2px; max-width: 520px; justify-content: center; }
#emojiBar button.emo { font-size: 24px; padding: 6px 8px; background: none; }
#emojiBar button.act { font-size: 13px; padding: 6px 10px; }
.menu { left: 14px; width: 290px; display: flex; flex-direction: column; gap: 2px; }
.menu button { background: none; justify-content: flex-start; padding: 9px 10px; border-radius: 8px; font-size: 14px; width: 100%; }
.menu button:hover { background: #ffffff10; filter: none; }
.menu button svg { width: 18px; height: 18px; color: var(--muted); }
.menu button small { color: var(--muted); font-size: 11px; }
.menu .danger, .menu .danger svg { color: #ff8a80; }
.menu hr { border: 0; border-top: 1px solid #2a2a2a; margin: 6px 0; width: 100%; }
.menu-label { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); padding: 4px 10px; }
.menu input { margin: 4px 0; }
.icon-btn { background: none; padding: 6px !important; border-radius: 50%; }
.icon-btn svg { width: 20px; height: 20px; }
.panel { bottom: 72px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 4px 8px 8px; }
.panel.right .panel-head { padding: 12px 8px 0 14px; }
.panel-head h3 { margin: 0; }
#minimap { bottom: 84px; }
#captions { bottom: 92px; }

/* ===== Quadros de vídeo ===== */
#videos .v .ph { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; background: #262626; }
#videos .v .ph b { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; color: #0b0d0a; background: #7CFF4F; }
#videos .v.cam-off .ph { display: flex; }
#videos .v.cam-off video { opacity: 0; }
#videos .v .mic-off { position: absolute; top: 6px; right: 6px; background: #ea4335; border-radius: 50%; padding: 4px; display: none; }
#videos .v .mic-off svg { width: 14px; height: 14px; color: #fff; display: block; }
#videos .v.muted .mic-off { display: block; }
#videos .v .hint { position: absolute; top: 6px; left: 6px; font-size: 11px; background: #000a; padding: 2px 6px; border-radius: 6px; display: none; }
#videos .v.alone .hint { display: block; }
#recBadge { display: flex; align-items: center; gap: 8px; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #fff; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.leave-opts { display: grid; gap: 10px; }
.leave-opts button { justify-content: flex-start; padding: 14px; font-size: 15px; }
.leave-opts button small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
@media (max-width: 1100px) { .tool span { display: none; } .tool { min-width: 44px; } .me-chip .me-text { display: none; } }
@media (max-width: 800px) { #bar { overflow-x: auto; justify-content: flex-start; } .bar-side { flex: none; } }
a.tool { display: inline-flex; align-items: center; text-decoration: none; }
.leave-opts button { align-items: center; gap: 14px; text-align: left; }
.leave-opts button svg { width: 22px; height: 22px; flex: none; }
.leave-opts button span { display: flex; flex-direction: column; align-items: flex-start; }

.lobby-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; justify-content: center; }
.lobby-links .btn { font-size: 14px; padding: 9px 12px; }
.lobby-links svg { width: 16px; height: 16px; }

/* ===== Tela de reunião (estilo Gather): grade grande ao entrar numa sala ===== */
body.in-meeting #videos { position: fixed; inset: 64px 16px 84px 16px; transform: none; left: 16px; max-width: none; display: grid; grid-template-columns: repeat(var(--cols, 2), 1fr); grid-auto-rows: 1fr; gap: 10px; padding: 10px; background: #050505f2; border-radius: 18px; z-index: 12; }
body.in-meeting.panel-left #videos { left: 286px; }
body.in-meeting.panel-right #videos { right: 286px; }
body.in-meeting #videos .v { width: auto; height: auto; min-height: 0; border-radius: 14px; border-width: 2px; cursor: default; }
body.in-meeting #videos .v .lbl { font-size: 14px; padding: 4px 10px; bottom: 10px; left: 10px; }
body.in-meeting #videos .v .ph b { width: 96px; height: 96px; font-size: 36px; }
body.in-meeting #videos.presenting { grid-template-columns: 3fr 1fr; grid-template-rows: repeat(var(--rows, 3), minmax(0, 1fr)); grid-auto-rows: unset; }
body.in-meeting #videos.presenting .v.screen { grid-column: 1; grid-row: 1 / -1; }
body.in-meeting #videos.presenting .v:not(.screen) { grid-column: 2; }
body.in-meeting #minimap, body.in-meeting #zone { display: none; }
#meetingHead { position: fixed; top: 12px; left: 16px; right: 16px; height: 44px; display: flex; align-items: center; justify-content: space-between; z-index: 13; pointer-events: none; }
#meetingHead > * { pointer-events: auto; }
#meetingHead .mt-title { background: #050505e6; padding: 8px 16px; border-radius: 22px; display: flex; gap: 10px; align-items: center; }
#meetingHead .mt-title small { color: var(--muted); }
#meetingHead svg { width: 18px; height: 18px; }
#mtOpen { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 13; background: var(--accent); font-weight: 700; box-shadow: 0 6px 24px #0008; }
#mtOpen svg, #mtMin svg { width: 18px; height: 18px; }
.lema-chip { font-size: 12px; color: #7CFF4F; letter-spacing: .3px; }
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-top: 10px; }
.theme-card { background: var(--panel2); border: 2px solid transparent; border-radius: 14px; padding: 10px; cursor: pointer; text-align: left; display: block; }
.theme-card.sel { border-color: var(--accent); }
.theme-card canvas { width: 100%; border-radius: 8px; image-rendering: pixelated; display: block; margin-bottom: 8px; }
.theme-card b { display: block; }
.theme-card small { color: var(--muted); }

/* ===== Cor da marca 4MED (verde-limão sobre preto): texto escuro em cima do verde ===== */
button.primary, button.on, #mtOpen, .bar-center .tool.on svg, .me-chip:hover { color: var(--accent-ink); }
button.primary:hover, button.on:hover { filter: brightness(1.05); }
.bar-center .tool.on svg { background: var(--accent); }
#videos .v { border-color: #2f3a2a; }
#videos .v.speaking { border-color: var(--accent); box-shadow: 0 0 0 2px #7cff4f55; }
.badge, .b-admin { background: #7cff4f22 !important; color: #b6ff9a !important; }
#messages b { color: #b6ff9a; }
.tabs button.on { color: var(--accent-ink); }
.theme-card.sel, .item.sel { border-color: var(--accent) !important; }

.bar-center .tool.on, .bar-center .tool.on span { color: #e5e5e5; }
.bar-center .tool.on svg { color: var(--accent-ink); }
/* na tela de reunião os quadros sempre ocupam a célula inteira da grade */
body.in-meeting #videos .v, body.in-meeting #videos:has(.v:nth-child(5)) .v:not(.big) { width: auto !important; height: auto !important; }

/* ===== Tela antes de entrar (como no Gather) ===== */
.card { width: min(560px, 100%); }
.prejoin { position: relative; aspect-ratio: 16 / 9; background: #1a1a1a; border-radius: 16px; overflow: hidden; margin: 6px 0 18px; }
.prejoin video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.pj-off { position: absolute; inset: 0; display: grid; place-items: center; color: #d4d4d4; font-size: 15px; background: #1a1a1a; }
.pj-ctrl { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; gap: 8px; }
.pj-btn { width: 44px; height: 44px; border-radius: 50% !important; padding: 0 !important; justify-content: center; background: #2a2a2a; }
.pj-btn.off { background: #ea4335; }
.pj-btn svg { width: 20px; height: 20px; }
.dot.ring { background: transparent !important; border: 2px solid #a3a3a3; width: 10px; height: 10px; }
/* ===== Cartão da pessoa (clique no boneco) ===== */
#personCard { width: 290px; padding: 14px; }
#personCard .pc-top { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
#personCard .pc-top b { font-size: 16px; display: block; }
#personCard small { color: var(--muted); }
#personCard .pc-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; }
#personCard .pc-acts button { justify-content: center; font-size: 13px; padding: 8px; }
#personCard .pc-acts button svg { width: 15px; height: 15px; }
/* ===== Busca Ctrl+K ===== */
#searchList { margin-top: 8px; max-height: 50vh; overflow-y: auto; }
#searchList button { width: 100%; justify-content: flex-start; background: none; padding: 10px; border-radius: 8px; gap: 10px; }
#searchList button.sel, #searchList button:hover { background: #ffffff12; }
#searchList small { color: var(--muted); margin-left: auto; }
#searchList svg { width: 16px; height: 16px; color: var(--muted); }
.tour-step { font-size: 16px; line-height: 1.6; }
.tour-step .tour-n { color: var(--accent); font-weight: 700; font-size: 13px; letter-spacing: .4px; }

/* ===== Conversa de corredor (pílula no topo) ===== */
#convHead { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 13; background: #0b0d0ae6; border: 1px solid #2a2a2a; padding: 6px 8px 6px 10px; border-radius: 24px; display: flex; align-items: center; gap: 10px; font-size: 14px; }
#convHead .ch-av { display: flex; }
#convHead .ch-av span { width: 22px; height: 22px; border-radius: 50%; background: #7CFF4F; color: #0b0d0a; font-size: 11px; font-weight: 800; display: grid; place-items: center; margin-left: -6px; border: 2px solid #0b0d0a; }
#convHead .ch-av span:first-child { margin-left: 0; }
#convHead .icon-btn.on { background: #e74c3c !important; }
body.in-meeting #convHead { display: none; }
#videos { top: 56px; }
/* ===== Painel da reunião ===== */
#meetPanel { position: fixed; top: 64px; right: 16px; bottom: 84px; width: 350px; background: #111; border: 1px solid #2a2a2a; border-radius: 16px; z-index: 14; display: flex; flex-direction: column; overflow: hidden; }
body:not(.in-meeting) #meetPanel { display: none; }
body.in-meeting.meet-panel #videos { right: 380px; }
.mp-tabs { display: flex; gap: 4px; padding: 8px; border-bottom: 1px solid #2a2a2a; align-items: center; }
.mp-tabs button:not(.icon-btn) { flex: 1; font-size: 13px; padding: 7px 6px; justify-content: center; }
.mp-body { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; }
#mpLines .ln { margin-bottom: 10px; font-size: 14px; line-height: 1.45; }
#mpLines .ln b { color: #b6ff9a; }
#mpLines .ln time, #mpMsgs time { color: #737373; font-size: 11px; margin-left: 6px; }
#mpChat #mpMsgs { flex: 1; overflow-y: auto; }
#mpMsgs div { margin-bottom: 8px; font-size: 14px; }
#mpMsgs b { color: #b6ff9a; }
#mpInput { margin-top: 8px; }
#mpPeople .pp { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; background: #1c1c1c; margin-bottom: 6px; }
#mpPeople .pp .ini { width: 30px; height: 30px; border-radius: 50%; background: #7CFF4F; color: #0b0d0a; display: grid; place-items: center; font-weight: 800; font-size: 12px; }
#mpPeople .pp .ic { margin-left: auto; display: flex; gap: 6px; color: #a3a3a3; }
#mpPeople .pp .ic svg { width: 16px; height: 16px; }
#mpPeople .pp .ic .off { color: #ea4335; }
/* ===== Cartão da sala ===== */
#roomCard { width: 300px; padding: 14px; }
#roomCard h4 { margin: 0 0 2px; font-size: 16px; }
#roomCard .rc-who { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
#roomCard .rc-who span { background: #1c1c1c; border-radius: 12px; padding: 3px 9px; font-size: 12px; }
#roomCard .row button { flex: 1; justify-content: center; }

/* ===== Zoom e dicas no mapa ===== */
#zoomCtl { position: fixed; right: 14px; bottom: 86px; display: flex; flex-direction: column; gap: 4px; z-index: 6; background: #0b0d0acc; border: 1px solid #2a2a2a; border-radius: 12px; padding: 4px; }
#zoomCtl button { padding: 7px !important; background: none; border-radius: 8px; }
#zoomCtl button:hover { background: #ffffff14; }
#zoomCtl svg { width: 18px; height: 18px; }
body.in-meeting #zoomCtl { display: none; }
#hoverTip { position: fixed; z-index: 20; pointer-events: none; background: #0b0d0af0; border: 1px solid #2f2f2f; color: #e5e5e5; padding: 6px 10px; border-radius: 8px; font-size: 12px; max-width: 260px; }
#hoverTip b { color: #fff; }
#hoverTip small { color: #a3a3a3; display: block; }
.ch-btn { font-size: 12px !important; padding: 5px 10px !important; background: #1c1c1c; border-radius: 14px; }
.ch-btn svg { width: 14px; height: 14px; }

/* ======================================================================
   Estrutura igual ao Gather: barra de ícones + painel lateral + mapa em cartão + pílula
   ====================================================================== */
body { --left: 350px; background: #000; }
body:not(.side-open) { --left: 64px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#rail { position: fixed; left: 0; top: 0; bottom: 0; width: 64px; background: #050505; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 0; z-index: 16; border-right: 1px solid #161616; }
.rail-logo { width: 40px; height: 40px; border-radius: 12px !important; background: var(--accent) !important; color: #0b0d0a !important; font-weight: 800; font-size: 18px; justify-content: center; padding: 0 !important; margin-bottom: 6px; }
.rail-btn { width: 44px; height: 44px; border-radius: 12px !important; background: transparent; justify-content: center; padding: 0 !important; color: #cfcfcf; position: relative; text-decoration: none; display: inline-flex; align-items: center; }
.rail-btn:hover { background: #ffffff12; filter: none; }
.rail-btn.on { background: #1f1f1f; color: #fff; box-shadow: inset 0 0 0 1px #2f2f2f; }
.rail-btn svg { width: 21px; height: 21px; }
.rail-btn.leave { color: #ff8a80; }
.rail-kbd { font-size: 9px; color: #6b6b6b; margin-top: -4px; }
.rail-hr { width: 28px; height: 1px; background: #222; margin: 4px 0; }
.rail-sp { flex: 1; }
.rail-badge { position: absolute; top: 4px; right: 4px; background: #ea4335; color: #fff; font-size: 10px; border-radius: 10px; padding: 0 5px; line-height: 16px; min-width: 16px; text-align: center; }
#side { position: fixed; left: 64px; top: 0; bottom: 0; width: 286px; background: #0b0b0b; border-right: 1px solid #161616; z-index: 15; overflow-y: auto; }
body:not(.side-open) #side { display: none; }
.side-view { display: flex; flex-direction: column; min-height: 100%; padding: 14px 14px 20px; }
#chat.side-view { height: 100%; }
.side-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.side-head h2 { margin: 0; font-size: 19px; letter-spacing: .3px; }
.floor-sel { width: 100%; justify-content: flex-start; background: #141414; border: 1px solid #222; font-size: 13px; margin-bottom: 12px; }
.floor-sel svg { width: 15px; height: 15px; color: #a3a3a3; }
.floor-sel span { flex: 1; text-align: left; }
.invite-card { background: #0f1a0b; border: 1px solid #24461d; border-radius: 14px; padding: 12px; margin-bottom: 12px; display: grid; gap: 6px; }
.invite-card small { color: #a3a3a3; }
.invite-card .btn { font-size: 13px; padding: 8px 12px; }
.invite-card .btn.on { flex: 1; justify-content: center; background: var(--accent); color: #0b0d0a; font-weight: 700; }
.invite-card svg { width: 15px; height: 15px; }
#peopleSearch { background: #141414; border-color: #222; font-size: 13px; margin-bottom: 8px; }
.side-sec h4 { font-size: 12px; color: #a3a3a3; font-weight: 600; margin: 14px 0 6px; display: flex; align-items: center; gap: 6px; }
.mini-sel { width: auto !important; margin-left: auto; padding: 2px 6px !important; font-size: 11px !important; background: #141414 !important; }
.conv-card { background: #1a1f16; border: 1px solid #2a3a22; border-radius: 12px; padding: 10px; margin-bottom: 6px; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.conv-card:hover { border-color: #7CFF4F88; }
.conv-card .stack { display: flex; }
.conv-card .stack span, .prow .av { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #0b0d0a; border: 2px solid #0b0b0b; flex: none; }
.conv-card .stack span + span { margin-left: -8px; }
.conv-card small { color: #a3a3a3; font-size: 12px; }
.prow { display: flex; align-items: center; gap: 10px; padding: 7px 6px; border-radius: 10px; cursor: pointer; position: relative; }
.prow:hover { background: #ffffff0c; }
.prow .av { width: 32px; height: 32px; font-size: 13px; position: relative; }
.prow .av i.sd { position: absolute; right: -2px; bottom: -2px; width: 11px; height: 11px; border-radius: 50%; border: 2px solid #0b0b0b; }
.prow .nm { display: flex; flex-direction: column; min-width: 0; }
.prow .nm b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow .nm small { font-size: 12px; color: #a3a3a3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow .tag { font-size: 10px; border: 1px solid #333; border-radius: 8px; padding: 1px 6px; color: #a3a3a3; margin-left: auto; }
#messages { flex: 1; }
#chat .tabs { padding: 0 0 8px; }
#chat input { border-radius: 10px; border-width: 1px; }
/* mapa em cartão */
#game { position: fixed; top: 8px; right: 8px; bottom: 8px; left: calc(var(--left) + 8px); width: auto !important; height: auto !important; border-radius: 16px; }
#videos { left: calc(var(--left) + (100vw - var(--left)) / 2) !important; top: 18px; }
#zone { left: calc(var(--left) + 22px); top: 20px; }
#recBadge { left: calc(var(--left) + 22px); top: 54px; }
#minimap { left: calc(var(--left) + 22px); bottom: 22px; }
#zoomCtl { right: 22px; bottom: 22px; }
#captions { left: calc(var(--left) + (100vw - var(--left)) / 2); bottom: 96px; }
#convHead { left: calc(var(--left) + (100vw - var(--left)) / 2); top: 18px; }
#meetingHead { left: calc(var(--left) + 22px); right: 22px; top: 18px; }
#mtOpen { left: calc(var(--left) + (100vw - var(--left)) / 2); }
body.in-meeting #videos { inset: 68px 16px 92px calc(var(--left) + 16px) !important; transform: none; }
body.in-meeting.meet-panel #videos { right: 380px !important; }
#meetPanel { top: 68px; bottom: 92px; }
/* pílula flutuante */
#bar { position: fixed; left: calc(var(--left) + (100vw - var(--left)) / 2); right: auto; bottom: 18px; top: auto; height: 58px; transform: translateX(-50%); width: auto; background: #111111f2; border: 1px solid #2a2a2a; border-radius: 30px; padding: 0 10px; gap: 4px; justify-content: center; box-shadow: 0 10px 40px #000a; z-index: 15; }
#bar .tool { min-width: 0; width: 42px; height: 42px; padding: 0 !important; border-radius: 50% !important; background: transparent; }
#bar .tool svg { width: 20px; height: 20px; padding: 0; background: none !important; border-radius: 0; }
#bar .tool:hover { background: #ffffff14; }
#bar .tool.off { background: #ea43352e; color: #ff6b5e; }
#bar .tool.on { background: var(--accent); color: #0b0d0a; }
#bar .tool.on svg { color: #0b0d0a; }
#bar .tool.leave { color: #ff6b5e; }
#bar .dev { display: flex; align-items: center; background: #1c1c1c; border-radius: 22px; }
#bar .dev .tool { width: 38px; }
#bar .caret { width: 22px; height: 38px; padding: 0 !important; background: none; justify-content: center; border-radius: 0 20px 20px 0 !important; }
#bar .caret svg { width: 14px; height: 14px; }
.pill-me { width: 42px; height: 42px; border-radius: 50% !important; padding: 0 !important; justify-content: center; background: var(--accent) !important; color: #0b0d0a !important; font-weight: 800; position: relative; }
.pill-me #myStatusDot { position: absolute; right: 0; bottom: 0; width: 12px; height: 12px; border: 2px solid #111; border-radius: 50%; }
.pill-sep { width: 1px; height: 26px; background: #2a2a2a; margin: 0 4px; }
.popover { bottom: 88px; }
#meMenu, #devMenu, #nearBox, #emojiBar { left: calc(var(--left) + (100vw - var(--left)) / 2) !important; transform: translateX(-50%); }
#mainMenu, #notifBox { left: 72px !important; top: 12px; bottom: auto; width: 300px; transform: none; }
#notifBox { max-height: 70vh; overflow-y: auto; }
.notif { padding: 10px; border-radius: 10px; font-size: 13px; display: flex; gap: 10px; cursor: pointer; }
.notif:hover { background: #ffffff0c; }
.notif small { color: #737373; display: block; margin-top: 2px; }
#nearBox { width: 420px; padding: 10px 12px; display: grid; gap: 6px; }
#nearBox .nb-h { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 700; }
.dev-item.sel { color: var(--accent); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; font-size: 14px; }
@media (max-width: 900px) { body { --left: 64px; } #side { box-shadow: 10px 0 40px #000; } #game { left: 72px; } }

body.conv-on:not(.in-meeting) #videos { top: 66px !important; }

/* ===== Tela de entrada: duas colunas (câmera | personagem e entrar) como no Gather, e rola em telas pequenas ===== */
#lobby { overflow-y: auto; place-items: start center; padding: 24px 16px; }
#lobby .card { margin: auto; width: min(1040px, 100%); display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); column-gap: 28px; align-items: start; }
#lobby .card > * { grid-column: 2; }
#lobby .card > .prejoin { grid-column: 1; grid-row: 1 / span 7; margin: 0; align-self: center; }
#lobby .card h1 { font-size: 26px; }
#lobby .lobby-grid { margin-bottom: 14px; }
#lobby .pick { margin-top: 6px; }
@media (max-width: 860px) { #lobby .card { grid-template-columns: 1fr; } #lobby .card > *, #lobby .card > .prejoin { grid-column: 1; grid-row: auto; } #lobby .card > .prejoin { margin: 6px 0 14px; } }

/* ===== Celular: barra inferior cabe na tela e rola para o lado ===== */
@media (max-width: 700px) {
  #bar { left: calc(var(--left) + 6px); right: 6px; transform: none; max-width: none; overflow-x: auto; overflow-y: hidden; justify-content: flex-start; scrollbar-width: none; }
  #bar::-webkit-scrollbar { display: none; }
  #bar > * { flex: none; }
}

/* ===== Rádio da Vila (Spotify) ===== */
#musicBox { position: fixed; left: calc(var(--left) + 12px); bottom: 90px; width: 360px; max-width: calc(100vw - var(--left) - 24px); padding: 12px; display: grid; gap: 8px; z-index: 40; }
#musicBox .nb-h { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 700; }
#musicPlayer iframe { width: 100%; height: 152px; border: 0; border-radius: 12px; display: block; }
#musicBox .music-row { display: flex; gap: 6px; }
#musicBox .music-row input { flex: 1; min-width: 0; }
#btnMusic.playing { color: #7CFF4F; }

/* ===== Vídeos como no Gather: faixa compacta no topo (não cobre o mapa) e reunião em 16:9 ===== */
body:not(.in-meeting) #videos { flex-wrap: nowrap; width: max-content; max-width: calc(100vw - var(--left) - 40px); overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
body:not(.in-meeting) #videos .v:not(.big) { width: 160px; height: 90px; flex: none; }
body.in-meeting #videos:not(.presenting) { grid-auto-rows: auto; align-content: center; }
body.in-meeting #videos:not(.presenting) .v { aspect-ratio: 16 / 9; max-height: calc((100vh - 200px) / var(--grows, 1)); max-width: calc((100vh - 200px) / var(--grows, 1) * 16 / 9); justify-self: center; width: 100% !important; }
body.in-meeting #videos { background: #0b0b0b !important; }
#mtOpen { top: 120px; } /* logo abaixo da faixa de vídeos */
