/* Aspekta Variable — mesma fonte do luby.com.br (OFL 1.1) */
@font-face {
  font-family: 'Aspekta'; font-weight: 100 900; font-display: swap; font-style: normal;
  src: url('https://cdn.jsdelivr.net/gh/ivodolenc/aspekta@main/packages/fonts/variable/AspektaVF.woff2') format('woff2');
}

/* Tokens do design system Luby */
:root {
  --bg: hsl(220 20% 7%);
  --card: hsl(220 18% 11%);
  --panel: hsl(220 18% 11% / .88);
  --secondary: hsl(217 33% 17%);
  --line: hsl(217 25% 22%);
  --text: hsl(210 40% 98%);
  --muted: hsl(215 20% 78%);
  --electric: hsl(199 89% 48%);
  --electric-soft: hsl(199 89% 48% / .15);
  --builder: linear-gradient(135deg, hsl(262 100% 59%), hsl(285 100% 71%));
  --evolution: linear-gradient(135deg, hsl(216 100% 52%), hsl(191 100% 50%));
  --firepower: linear-gradient(135deg, hsl(0 100% 62%), hsl(16 100% 64%));
  --shadow-electric: 0 10px 40px -10px hsl(199 89% 48% / .4);
  --shadow-glow: 0 0 60px hsl(199 89% 48% / .3);
  --radius: .75rem;
  --ease: cubic-bezier(.4, 0, .2, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text);
  font: 14px/1.5 'Aspekta', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji';
  -webkit-font-smoothing: antialiased; }
::selection { background: hsl(199 89% 48% / .3); }
:focus-visible { outline: 2px solid hsl(199 89% 48% / .7); outline-offset: 2px; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: hsl(217 25% 25%); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: hsl(199 89% 48% / .5); }
#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
button, select, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.grad { background: var(--evolution); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Entrada ---------- */
#login { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px; z-index: 20; overflow-y: auto;
  background:
    radial-gradient(ellipse 60% 50% at 20% 10%, hsl(199 89% 48% / .22), transparent 70%),
    radial-gradient(ellipse 50% 50% at 90% 90%, hsl(262 100% 59% / .18), transparent 70%),
    hsl(220 20% 7% / .35);
  backdrop-filter: blur(1.5px); }
.card { width: min(760px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: calc(var(--radius) * 1.5);
  box-shadow: var(--shadow-electric); display: grid; grid-template-columns: 240px 1fr; overflow: hidden; }
.card .stage { position: relative; background: radial-gradient(circle at 50% 70%, hsl(199 89% 48% / .25), transparent 65%), hsl(220 20% 9%);
  border-right: 1px solid var(--line); display: grid; place-items: center; min-height: 360px; }
#preview { width: 240px; height: 340px; display: block; }
.stage .badge { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); font-size: 12px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; background: hsl(220 18% 11% / .8); white-space: nowrap; }
.form { padding: 26px; display: grid; gap: 14px; align-content: start; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 34px; width: auto; }
.brand span { color: var(--muted); font-size: 13px; border-left: 1px solid var(--line); padding-left: 10px; }
.form h1 { margin: 2px 0 0; font-size: 26px; line-height: 1.15; font-weight: 700; letter-spacing: -.02em; }
.sub { margin: -4px 0 2px; color: var(--muted); }
.form label.field { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
.form input { padding: 11px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--secondary); outline: none; transition: var(--ease) .2s; }
.form input:focus { border-color: var(--electric); box-shadow: 0 0 0 3px var(--electric-soft); }
.av-editor { display: grid; gap: 12px; }
.av-head { display: flex; align-items: center; gap: 8px; }
.av-tabs { display: flex; gap: 2px; flex: 1; padding: 3px; border-radius: 999px; background: var(--secondary); border: 1px solid var(--line); min-width: 0; overflow-x: auto; scrollbar-width: none; }
.av-tab { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px; border: 0; background: none; color: var(--muted);
  padding: 6px 10px; border-radius: 999px; cursor: pointer; font: inherit; font-size: 13px; white-space: nowrap; transition: var(--ease) .2s; }
.av-tab:hover { color: var(--text); }
.av-tab.on { background: var(--electric); color: #fff; box-shadow: 0 4px 14px -4px hsl(199 89% 48% / .7); }
.av-random { flex: none; border: 1px solid var(--line); background: var(--secondary); color: var(--text); border-radius: 999px; padding: 6px 12px; cursor: pointer; font: inherit; font-size: 13px; transition: var(--ease) .2s; }
.av-random:hover { border-color: var(--electric); transform: rotate(-3deg); }
.av-panels { min-height: 214px; }
.av-panel { display: grid; gap: 14px; animation: avIn .2s var(--ease); }
@keyframes avIn { from { opacity: 0; transform: translateY(4px); } }
.av-field { display: grid; gap: 7px; }
.av-label { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; }
.av-seg { display: flex; gap: 6px; flex-wrap: wrap; }
.av-seg button { border: 1px solid var(--line); background: var(--secondary); color: var(--text); border-radius: 999px; padding: 5px 12px; cursor: pointer; font: inherit; font-size: 13px; transition: var(--ease) .2s; }
.av-seg button:hover { border-color: hsl(199 89% 48% / .6); }
.av-seg button.on { background: var(--electric-soft); border-color: var(--electric); color: #fff; }
.av-color { display: grid; gap: 8px; }
.av-swatches { display: flex; gap: 7px; flex-wrap: wrap; }
.av-sw { position: relative; width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; background: var(--c);
  box-shadow: inset 0 0 0 2px rgba(0,0,0,.25); transition: transform .15s var(--ease); }
.av-sw:hover { transform: scale(1.08); }
.av-sw.on { border-color: var(--electric); transform: scale(1.12); box-shadow: 0 0 0 3px var(--electric-soft); }
.av-custom { background: conic-gradient(#ef4444, #facc15, #22c55e, #0ea5e9, #7c3aff, #ec4899, #ef4444); display: grid; place-items: center; }
.av-custom::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--c, transparent); box-shadow: 0 0 0 2px var(--card); }
.av-custom:not(.on)::after { content: "+"; width: auto; height: auto; background: none; box-shadow: none; color: #fff; font-weight: 700; font-size: 15px; line-height: 1; text-shadow: 0 1px 2px #000; }
.av-native { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; border: 0; padding: 0; }
.av-hexrow { display: inline-flex; align-items: center; gap: 8px; width: max-content; padding: 4px 10px 4px 6px; border-radius: 999px; background: var(--secondary); border: 1px solid var(--line); }
.av-hexrow:focus-within { border-color: var(--electric); box-shadow: 0 0 0 3px var(--electric-soft); }
.av-dot { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.form .av-hex { width: 76px; padding: 0; border: 0; background: none; box-shadow: none; font: 600 12px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--text); letter-spacing: .04em; }
.form .av-hex:focus { box-shadow: none; }
.av-rangewrap { display: flex; align-items: center; gap: 12px; }
.av-range { flex: 1; appearance: none; -webkit-appearance: none; height: 6px; border-radius: 999px; padding: 0 !important; border: 0 !important;
  background: linear-gradient(90deg, var(--electric) var(--p, 50%), var(--secondary) var(--p, 50%)) !important; cursor: pointer; }
.av-range::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--electric); box-shadow: 0 2px 8px rgba(0,0,0,.4); }
.av-range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--electric); box-shadow: 0 2px 8px rgba(0,0,0,.4); }
.av-out { min-width: 64px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.primary { padding: 13px; border: 0; border-radius: var(--radius); cursor: pointer; font-weight: 600; color: #fff;
  background: var(--electric); box-shadow: var(--shadow-electric); transition: var(--ease) .25s; }
.primary:hover { filter: brightness(1.1); box-shadow: var(--shadow-glow); transform: translateY(-1px); }
.hint { margin: 0; color: var(--muted); font-size: 12px; }
.hint b { color: var(--text); }

/* ---------- HUD ---------- */
.glass { background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(10px); }
#topbar { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; align-items: center;
  border-radius: calc(var(--radius) * 1.2); padding: 6px 6px 6px 12px; z-index: 5; max-width: calc(100% - 24px); flex-wrap: wrap; justify-content: center; }
#topbar img { height: 20px; width: auto; }
#topbar button, #topbar select { background: var(--secondary); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 11px; cursor: pointer; transition: var(--ease) .2s; }
#topbar button:hover, #topbar select:hover { border-color: hsl(199 89% 48% / .6); }
#topbar button.live { background: var(--electric); border-color: var(--electric); box-shadow: var(--shadow-electric); }
#topbar option, #chatForm option { background: var(--card); }
#zoneName { font-weight: 600; padding: 0 10px; min-width: 130px; text-align: center; border-left: 1px solid var(--line); }

#minimap { position: fixed; top: 12px; right: 12px; width: 170px; height: 170px; border-radius: var(--radius); z-index: 4; }
#people { position: fixed; top: 192px; right: 12px; width: 270px; max-height: 50vh; overflow: auto; z-index: 6; border-radius: var(--radius); padding: 12px; }
#people h3 { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
#peopleList { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
#peopleList li { display: flex; align-items: center; gap: 8px; }
#peopleList .who { flex: 1; min-width: 0; }
#peopleList .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
#peopleList .who small { color: var(--muted); }
#peopleList button { background: var(--secondary); border: 1px solid var(--line); border-radius: 8px; padding: 3px 8px; cursor: pointer; }
#peopleList button:hover { border-color: var(--electric); }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.st-disponivel { background: #22c55e; box-shadow: 0 0 8px #22c55e; } .st-ocupado { background: #ef4444; box-shadow: 0 0 8px #ef4444; }
.st-reuniao { background: #a855f7; box-shadow: 0 0 8px #a855f7; } .st-ausente { background: #f59e0b; box-shadow: 0 0 8px #f59e0b; }

#emotes { position: fixed; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 4px; z-index: 5; border-radius: calc(var(--radius) * 1.2); padding: 5px; }
#emotes button { width: 38px; height: 38px; font-size: 20px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; transition: var(--ease) .15s; }
#emotes button:hover { background: var(--electric-soft); transform: translateY(-2px); }

#chat { position: fixed; left: 12px; bottom: 12px; width: min(380px, calc(100% - 24px)); z-index: 5; display: grid; gap: 6px; }
#chatLog { max-height: 34vh; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: var(--radius); font-size: 13px; }
#chatLog:empty { display: none; }
#chatLog .m b { font-weight: 600; }
#chatLog .m.hl { background: var(--electric-soft); border-left: 2px solid var(--electric); margin: 0 -6px; padding: 2px 6px; border-radius: 4px; }
#chatLog .tag { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; padding: 1px 6px; border-radius: 5px; background: var(--secondary); margin-right: 5px; color: var(--muted); }
#chatLog .tag.dm { background: hsl(262 100% 59% / .3); color: #e9d5ff; }
#chatLog .sys { color: var(--muted); font-style: italic; }
#chatForm { display: flex; gap: 6px; }
#chatForm select, #chatForm input { border-radius: var(--radius); padding: 9px 11px; outline: none; background: var(--panel); border: 1px solid var(--line); }
#chatForm select { max-width: 130px; }
#chatForm input { flex: 1; min-width: 0; }
#chatForm input:focus { border-color: var(--electric); box-shadow: 0 0 0 3px var(--electric-soft); }
#nearby { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; font-size: 12px; color: var(--muted); }
#nearby:empty { display: none; }
#nearby button { background: var(--panel); border: 1px solid; border-radius: 999px; padding: 2px 10px; cursor: pointer; font-size: 12px; }

#card { position: fixed; z-index: 9; width: 240px; border-radius: var(--radius); padding: 12px; display: grid; gap: 8px; box-shadow: var(--shadow-electric); }
#card .head { display: flex; align-items: center; gap: 8px; }
#card .head b { flex: 1; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#card small { color: var(--muted); margin-top: -4px; }
#card .x { background: none; border: 0; cursor: pointer; color: var(--muted); }
#card .acts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
#card .acts button { background: var(--secondary); border: 1px solid var(--line); border-radius: 9px; padding: 7px 4px; cursor: pointer; font-size: 13px; transition: var(--ease) .15s; }
#card .acts button:hover { border-color: var(--electric); background: var(--electric-soft); }

#interact { position: fixed; left: 50%; bottom: 72px; transform: translateX(-50%); z-index: 5; border-radius: var(--radius); padding: 7px 14px; pointer-events: none; }
#interact kbd { background: var(--electric); color: #fff; border-radius: 6px; padding: 1px 7px; font-weight: 700; margin-right: 8px; font-family: inherit; }

#toasts { position: fixed; top: 66px; left: 50%; transform: translateX(-50%); display: grid; gap: 6px; z-index: 8; pointer-events: none; justify-items: center; }
.toast { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--electric); border-radius: var(--radius); padding: 8px 14px; animation: toast 4s forwards; backdrop-filter: blur(10px); }
@keyframes toast { 0% { opacity: 0; transform: translateY(-8px); } 8%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* ---------- Rótulos 3D ---------- */
#labels { position: fixed; inset: 0; pointer-events: none; z-index: 2; overflow: hidden; }
.tag3d { position: absolute; left: 0; top: 0; will-change: transform; display: flex; flex-direction: column; align-items: center; }
.name { display: flex; align-items: center; gap: 5px; background: hsl(220 20% 7% / .8); border: 1px solid var(--line); padding: 2px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap; }
.name.me { border-color: var(--electric); box-shadow: 0 0 12px hsl(199 89% 48% / .45); }
.clickable .name { pointer-events: auto; cursor: pointer; }
.clickable .name:hover { border-color: var(--electric); }
.bubble { max-width: 230px; background: #fff; color: hsl(220 20% 7%); padding: 6px 11px; border-radius: 12px; margin-bottom: 6px; font-size: 13px;
  box-shadow: 0 6px 20px rgba(0,0,0,.35); position: relative; word-wrap: break-word; animation: pop .2s; }
.bubble::after { content: ""; position: absolute; left: 50%; bottom: -6px; margin-left: -6px; border: 6px solid transparent; border-bottom: 0; border-top-color: #fff; }
.emote { font-size: 34px; animation: rise 2.2s forwards; position: absolute; bottom: 30px; }
@keyframes rise { 0% { transform: translateY(10px) scale(.4); opacity: 0; } 15% { transform: none; opacity: 1; } 80% { opacity: 1; } 100% { transform: translateY(-40px); opacity: 0; } }
/* vídeo acima da cabeça */
.cam { width: 104px; height: 78px; border-radius: 14px; overflow: hidden; margin-bottom: 6px; background: #000;
  border: 2px solid var(--electric); box-shadow: 0 6px 22px rgba(0,0,0,.45), 0 0 18px hsl(199 89% 48% / .35);
  pointer-events: auto; cursor: zoom-in; transition: width .25s var(--ease), height .25s var(--ease); }
.cam video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam.self video { transform: scaleX(-1); }
.cam.big { width: 320px; height: 240px; cursor: zoom-out; }
.tag3d.camoff .cam, .tag3d.far .cam { display: none; }
/* galeria de vídeos */
#gallery { position: fixed; top: 112px; left: 50%; transform: translateX(-50%); display: none; gap: 8px; z-index: 4;
  max-width: calc(100% - 240px); overflow-x: auto; padding: 4px; }
body.gallery #gallery { display: flex; }
body.gallery .tag3d .cam { display: none; }
#gallery .tile { position: relative; flex: none; width: 168px; height: 126px; border-radius: var(--radius); overflow: hidden; background: #000;
  border: 2px solid var(--line); box-shadow: 0 8px 24px rgba(0,0,0,.4); cursor: zoom-in; transition: width .25s var(--ease), height .25s var(--ease); }
#gallery .tile.big { width: 400px; height: 300px; cursor: zoom-out; border-color: var(--electric); }
#gallery video { width: 100%; height: 100%; object-fit: cover; display: block; }
#gallery .tile.self video { transform: scaleX(-1); }
#gallery span { position: absolute; left: 6px; bottom: 6px; font-size: 11px; font-weight: 600; background: hsl(220 20% 7% / .75); padding: 1px 8px; border-radius: 999px; }
@media (max-width: 720px) { #gallery { max-width: calc(100% - 16px); top: 120px; } #gallery .tile { width: 120px; height: 90px; } }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }

@media (max-width: 720px) {
  .card { grid-template-columns: 1fr; }
  .card .stage { border-right: 0; border-bottom: 1px solid var(--line); min-height: 220px; }
  #preview { height: 220px; }
  #minimap { width: 112px; height: 112px; top: auto; bottom: 64px; right: 8px; }
  #people { top: 110px; right: 8px; }
  #chatLog { max-height: 22vh; }
  #chat { bottom: 64px; width: calc(100% - 164px); }
  #emotes { bottom: 8px; }
  #zoneName { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------- Compartilhamento de tela ---------- */
#screenDock { position: fixed; right: 12px; bottom: 12px; width: 360px; z-index: 6; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-electric); transition: width .25s var(--ease); }
#screenDock .bar { display: flex; align-items: center; gap: 4px; padding: 6px 6px 6px 10px; font-size: 12px; font-weight: 600; }
#screenDock .ttl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#screenDock .ttl::before { content: "● "; color: #ef4444; }
#screenDock button { background: var(--secondary); border: 1px solid var(--line); border-radius: 7px; padding: 2px 8px; cursor: pointer; }
#screenDock button:hover { border-color: var(--electric); }
#screenDock .vid { position: relative; background: #000; aspect-ratio: 16 / 9; }
#screenDock video { width: 100%; height: 100%; object-fit: contain; display: block; cursor: zoom-in; }
#screenDock .wait { position: absolute; inset: 0; display: none; place-items: center; color: var(--muted); font-size: 13px; }
#screenDock.waiting .wait { display: grid; }
/* ampliado: lightbox grande centralizado na tela, com fundo escurecido */
#screenBackdrop { position: fixed; inset: 0; z-index: 11; background: hsl(220 20% 4% / .75); backdrop-filter: blur(4px); cursor: zoom-out; animation: pop .2s; }
#screenDock.big { top: 50%; left: 50%; right: auto; bottom: auto; transform: translate(-50%, -50%); width: min(1600px, calc(100vw - 48px)); z-index: 12; box-shadow: var(--shadow-glow); }
#screenDock.big .vid { aspect-ratio: auto; height: min(calc(min(1600px, 100vw - 48px) * 9 / 16), calc(100vh - 96px)); }
#screenDock.big video { cursor: zoom-out; }
@media (max-width: 720px) { #screenDock.big { width: 100vw; border-radius: 0; } #screenDock.big .vid { height: min(calc(100vw * 9 / 16), calc(100vh - 48px)); } }

/* ---------- Luby OS ---------- */
#osBtn { position: fixed; left: 50%; bottom: 112px; transform: translateX(-50%); z-index: 5; border-radius: var(--radius); padding: 8px 16px;
  cursor: pointer; font-weight: 600; border-color: var(--electric); box-shadow: var(--shadow-electric); }
#osBtn:hover { background: var(--electric); }
#osBox { position: fixed; inset: 0; z-index: 15; display: grid; place-items: center; padding: 24px; background: hsl(220 20% 4% / .7); backdrop-filter: blur(4px); animation: pop .2s; }
#osBox .win { width: min(1400px, 100%); height: min(900px, 100%); border-radius: calc(var(--radius) * 1.2); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-glow); }
#osBox .bar { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; border-bottom: 1px solid var(--line); }
#osBox .bar b { flex: 1; }
#osBox .bar a { color: var(--muted); font-size: 12px; text-decoration: none; }
#osBox .bar a:hover { color: var(--text); }
#osBox .x { background: var(--secondary); border: 1px solid var(--line); border-radius: 8px; padding: 3px 10px; cursor: pointer; }
#osBox .x:hover { border-color: var(--electric); }
#osBox iframe { flex: 1; min-height: 0; width: 100%; border: 0; background: #fff; }
@media (max-width: 720px) { #screenDock { width: calc(100% - 16px); right: 8px; top: 110px; bottom: auto; } #osBox { padding: 0; } #osBox .win { border-radius: 0; } }

/* ---------- NPC ---------- */
.tag3d.npc .name { border-color: #a78bfa; box-shadow: 0 0 12px hsl(262 100% 70% / .45); }
#npcDlg { position: fixed; left: 50%; bottom: 120px; transform: translateX(-50%); z-index: 9; width: min(380px, calc(100% - 24px));
  border-radius: var(--radius); padding: 14px; display: grid; gap: 8px; box-shadow: var(--shadow-electric); animation: pop .2s; }
#npcDlg .head { display: flex; align-items: center; gap: 8px; }
#npcDlg .head b { flex: 1; }
#npcDlg .ava { font-size: 26px; }
#npcDlg p { margin: 0; }
#npcDlg .msg { font-size: 15px; font-weight: 600; }
#npcDlg .url { color: var(--electric); word-break: break-all; font-weight: 600; }
#npcDlg .x { background: none; border: 0; cursor: pointer; color: var(--muted); }
#npcDlg .acts { display: flex; gap: 8px; margin-top: 4px; }
#npcDlg .acts .primary { flex: 1; padding: 9px; }
#npcDlg .copy { background: var(--secondary); border: 1px solid var(--line); border-radius: var(--radius); padding: 9px 12px; cursor: pointer; }
#npcDlg .copy:hover { border-color: var(--electric); }

/* ---------- Estante de ebooks (BatCaverna) ---------- */
#libDlg { position: fixed; left: 50%; bottom: 120px; transform: translateX(-50%); z-index: 9; width: min(420px, calc(100% - 24px));
  max-height: min(60vh, 520px); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 10px;
  box-shadow: 0 0 24px hsl(48 96% 53% / .25); animation: pop .2s; }
#libDlg .head { display: flex; align-items: center; gap: 8px; }
#libDlg .head b { flex: 1; }
#libDlg .ava { font-size: 24px; }
#libDlg .x { background: none; border: 0; cursor: pointer; color: var(--muted); }
#libDlg .list { display: grid; gap: 6px; overflow: auto; }
#libDlg .book { display: flex; align-items: center; gap: 10px; text-align: left; padding: 9px 12px; cursor: pointer;
  background: var(--secondary); border: 1px solid var(--line); border-radius: var(--radius); color: inherit; font: inherit; }
#libDlg .book:hover { border-color: #facc15; }
#libDlg .book b { font-weight: 600; }

/* ---------- Google Calendar / ata ---------- */
.muted { color: var(--muted); font-size: 12px; }
#topbar button#recBtn.rec { background: #b91c1c; border-color: #ef4444; animation: recPulse 1.6s infinite; }
@keyframes recPulse { 50% { box-shadow: 0 0 0 6px hsl(0 84% 60% / .25); } }
#recBanner { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 7; padding: 6px 14px; border-radius: 999px;
  background: hsl(0 72% 40% / .92); color: #fff; font-size: 12px; font-weight: 600; pointer-events: none; max-width: calc(100% - 24px); text-align: center; }
.tag3d.recording .name::after { content: " 🔴"; }
#agenda { position: fixed; top: 64px; right: 12px; z-index: 8; width: min(380px, calc(100% - 24px)); max-height: calc(100% - 90px); overflow: auto;
  border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow-electric); animation: pop .2s; }
#agenda .head, #minutes .head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
#agenda .head b { flex: 1; }
#agenda .x, #minutes .x { background: none; border: 0; cursor: pointer; color: var(--muted); font-size: 15px; }
#agenda ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
#agenda li { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--secondary); }
#agenda li.live { border-color: var(--electric); box-shadow: 0 0 0 1px var(--electric) inset; }
#agenda li.past { opacity: .55; }
#agenda li .t { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12px; grid-row: span 3; padding-top: 1px; }
#agenda li b { font-weight: 600; overflow-wrap: anywhere; }
#agenda li .acts { display: flex; gap: 10px; font-size: 12px; }
#agenda li a { color: var(--electric); text-decoration: none; }
#agenda li .go { justify-self: start; background: none; border: 1px solid var(--line); border-radius: 999px; padding: 0 8px; font-size: 12px; color: var(--text); cursor: pointer; }
#agenda li .go:hover { border-color: var(--electric); }
#agenda .body > .primary { width: 100%; margin-top: 8px; }
#agenda .foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
#agenda .foot button { background: none; border: 1px solid var(--line); border-radius: 8px; padding: 3px 10px; color: var(--muted); cursor: pointer; }
#minutes { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; background: hsl(220 20% 4% / .6); padding: 16px; }
#minutes[hidden] { display: none; }
#minutes .win { width: min(820px, 100%); height: min(720px, 100%); display: flex; flex-direction: column; border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow-electric); }
#minutes .head b { margin-right: 4px; }
#minutes .head .muted { flex: 1; }
#minutes textarea { flex: 1; resize: none; width: 100%; background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 12px;
  font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; }
#minutes textarea:focus { outline: none; border-color: var(--electric); }
#minutes .acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
#minutes .acts .sp { flex: 1; }
#minutes .acts button:not(.primary), #minutes select { background: var(--secondary); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 7px 11px; cursor: pointer; }
#minutes select { max-width: 260px; }
#minutes .acts .primary { padding: 8px 14px; }
#minutes label { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 4px; }

/* ---------- Quadro branco (sala VIP) ---------- */
#boardBox { position: fixed; inset: 0; z-index: 16; display: grid; place-items: center; padding: 24px; background: hsl(220 20% 4% / .7); backdrop-filter: blur(4px); animation: pop .2s; }
#boardBox .win { width: min(1300px, 100%); max-height: 100%; border-radius: calc(var(--radius) * 1.2); overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 0 32px hsl(40 90% 55% / .3); }
#boardBox .bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px 8px 14px; border-bottom: 1px solid var(--line); }
#boardBox .bar b { margin-right: auto; }
#boardBox .bar button, #boardBox .bar select, #boardBox .bar input { background: var(--secondary); border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; cursor: pointer; color: inherit; }
#boardBox .bar input { cursor: text; width: 220px; }
#boardBox .bar button:hover, #boardBox .bar button.on { border-color: #f5b942; }
#boardBox .sw { display: flex; gap: 4px; }
#boardBox .sw button { width: 22px; height: 22px; padding: 0; border-radius: 50%; }
#boardBox .sw button.on { outline: 2px solid #fff; outline-offset: 1px; }
#boardBox .cvwrap { min-height: 0; overflow: auto; background: #fff; }
#boardBox canvas { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(100vh - 130px); margin: 0 auto; touch-action: none; background: #fff; }
@media (max-width: 720px) { #boardBox { padding: 0; } #boardBox .win { border-radius: 0; } }

/* ---------- Mural de links úteis (hall) ---------- */
#linksDlg { position: fixed; left: 50%; bottom: 120px; transform: translateX(-50%); z-index: 9; width: min(380px, calc(100% - 24px));
  border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 10px;
  box-shadow: 0 0 24px hsl(199 89% 48% / .25); animation: pop .2s; }
#linksDlg[hidden] { display: none; }
#linksDlg .head { display: flex; align-items: center; gap: 8px; }
#linksDlg .head b { flex: 1; }
#linksDlg .ava { font-size: 24px; }
#linksDlg .x { background: none; border: 0; cursor: pointer; color: var(--muted); }
#linksDlg .list { display: grid; gap: 6px; }
#linksDlg .book { display: flex; align-items: center; gap: 10px; padding: 10px 12px; text-decoration: none; background: var(--secondary);
  border: 1px solid var(--line); border-radius: var(--radius); color: inherit; font-weight: 600; }
#linksDlg .book:hover { border-color: var(--electric); }
