/* Command Hub — Escritório virtual */
.bd.verde { background: var(--ok); }
.esc-palco { position: relative; flex: 1; min-height: 0; background: #17184a; overflow: hidden; }
#esc-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; outline: none; }
.esc-mob { position: absolute; top: 10px; left: 10px; z-index: 6; background: rgba(255,255,255,.9) !important; display: none; }
.esc-zona { position: absolute; top: 14px; left: 16px; z-index: 5; background: rgba(255,255,255,.94); color: var(--ink); border-radius: 10px; padding: 6px 12px; font-size: 13px; box-shadow: 0 4px 14px rgba(0,0,0,.18); display: flex; flex-direction: column; pointer-events: none; }
.esc-zona:empty { display: none; }
.esc-zona span { font-size: 11.5px; color: var(--mut); }
.esc-zoom { position: absolute; right: 14px; bottom: 90px; z-index: 5; display: flex; flex-direction: column; gap: 4px; }
.esc-zoom button { width: 34px; height: 34px; border-radius: 9px; background: rgba(255,255,255,.92); color: #14153a; display: grid; place-items: center; box-shadow: 0 3px 10px rgba(0,0,0,.2); }
.esc-zoom button:hover { background: #fff; }

.esc-barra { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 6; display: flex; align-items: center; gap: 8px; background: rgba(16,17,52,.92); padding: 8px 10px; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,.35); backdrop-filter: blur(6px); }
.esc-barra:empty { display: none; }
.esc-rd { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.12); color: #fff; transition: background .12s, transform .1s; }
.esc-rd:hover { background: rgba(255,255,255,.22); }
.esc-rd:active { transform: scale(.95); }
.esc-rd.off { background: #e0414f; }
.esc-rd.on { background: var(--ok); }
.esc-rd.sair { background: rgba(224,65,79,.18); color: #ff9aa4; }
.esc-rd.sair:hover { background: #e0414f; color: #fff; }
.esc-rd .i { width: 20px; height: 20px; }
.esc-rd.p { width: 34px; height: 34px; }
.esc-rd.p .i { width: 16px; height: 16px; }
.esc-sep { width: 1px; height: 26px; background: rgba(255,255,255,.18); margin: 0 2px; }

.esc-videos { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 5; display: flex; gap: 10px; max-width: calc(100% - 340px); overflow-x: auto; padding: 2px; }
.esc-vid { position: relative; width: 168px; height: 104px; border-radius: 12px; overflow: hidden; background: #262863; box-shadow: 0 6px 18px rgba(0,0,0,.3); flex: none; border: 2px solid transparent; transition: border-color .15s; }
.esc-vid.fala { border-color: #18c26b; }
.esc-vid.tela { width: 220px; cursor: zoom-in; background: #000; }
.esc-vid video { width: 100%; height: 100%; object-fit: cover; display: block; }
.esc-vid.tela video { object-fit: contain; }
.esc-vid.eu video { transform: scaleX(-1); }
.esc-vid.conectando { opacity: .7; }
.esc-vid-av { position: absolute; inset: 0; display: grid; place-items: center; }
.esc-vid-nm { position: absolute; left: 6px; bottom: 6px; right: 6px; font-size: 11.5px; font-weight: 700; color: #fff; display: flex; align-items: center; gap: 4px; text-shadow: 0 1px 3px rgba(0,0,0,.7); white-space: nowrap; overflow: hidden; }
.esc-vid-nm .mut { color: rgba(255,255,255,.75); font-weight: 500; }
.esc-mudo { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #e0414f; }
.esc-mudo .i { width: 11px; height: 11px; }
.esc-tela-grande { position: absolute; inset: 0; z-index: 8; background: rgba(8,9,28,.95); display: grid; place-items: center; padding: 50px 20px 20px; }
.esc-tela-grande video { max-width: 100%; max-height: 100%; border-radius: 8px; }
.esc-tela-grande .bt-ic { position: absolute; top: 12px; right: 12px; color: #fff; }

.esc-entrar { position: absolute; inset: 0; z-index: 7; display: grid; place-items: center; background: rgba(12,13,43,.45); backdrop-filter: blur(2px); padding: 20px; }
.esc-entrar-c { background: var(--bg); border-radius: 18px; padding: 26px; width: 440px; max-width: 100%; box-shadow: 0 30px 80px rgba(0,0,0,.4); text-align: center; }
.esc-entrar-c h2 { margin: 0 0 6px; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.esc-entrar-c p { margin: 0 0 16px; color: var(--ink2); font-size: 14px; }
.esc-previa { position: relative; height: 216px; border-radius: 14px; overflow: hidden; background: #262863; margin-bottom: 12px; }
.esc-previa video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.esc-previa-sem { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: rgba(255,255,255,.8); font-size: 13px; padding: 20px; }
.esc-previa-bts { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 10px; }
.esc-devs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.esc-devs .inp { height: 34px; font-size: 12.5px; padding: 0 8px; }
.esc-entrar-bt { width: 100%; height: 44px; font-size: 15px; }

.esc-status { margin: 0 12px 10px; padding: 12px; border-radius: 12px; background: rgba(255,255,255,.07); color: var(--side-ink); font-size: 13px; }
.esc-st-l { display: flex; align-items: center; gap: 7px; color: #fff; }
.esc-st-s { font-size: 12px; color: var(--side-mut); margin-top: 3px; }
.esc-perto { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #18c26b; box-shadow: 0 0 0 3px rgba(24,194,107,.25); flex: none; }
.esc-sala-t { font-size: 13.5px; }
.esc-sala.on > .esc-sala-t { color: #fff; font-weight: 700; }
.esc-p { padding-left: 30px; font-size: 13.5px; cursor: pointer; }
.esc-p .av { --pb: var(--side); }
.esc-ics { display: flex; gap: 5px; align-items: center; margin-left: auto; color: var(--side-mut); }
.esc-ics .i { width: 13px; height: 13px; }
.esc-chamar { margin-left: auto; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; color: var(--side-mut); opacity: 0; }
.esc-p:hover .esc-chamar { opacity: 1; }
.esc-chamar:hover { background: rgba(255,255,255,.14); color: #fff; }

.esc-mini { position: fixed; right: 18px; bottom: 18px; z-index: 90; display: flex; align-items: center; gap: 6px; background: #14153f; color: #fff; padding: 6px 8px 6px 6px; border-radius: 14px; box-shadow: 0 12px 30px rgba(0,0,0,.35); animation: sobe .2s; }
.esc-mini-v { display: flex; align-items: center; gap: 8px; text-align: left; color: #fff; padding: 4px 8px 4px 4px; border-radius: 10px; }
.esc-mini-v:hover { background: rgba(255,255,255,.1); }
.esc-mini-v small { display: block; font-size: 11.5px; color: #aeb1e0; }
.esc-mini-v b { font-size: 13px; }
.esc-mini-avs { display: flex; }
.esc-mini-avs .av { margin-left: -5px; box-shadow: 0 0 0 2px #14153f; }
.esc-mini-avs .av:first-child { margin-left: 0; }

@media (max-width: 820px) {
  .esc-mob { display: grid; }
  .esc-zona { top: 56px; }
  .esc-videos { top: auto; bottom: 86px; max-width: calc(100% - 20px); }
  .esc-vid { width: 120px; height: 76px; }
  .esc-barra { bottom: 70px; gap: 4px; padding: 6px; }
  .esc-rd { width: 38px; height: 38px; }
  .esc-sep { display: none; }
  .esc-mini { bottom: 70px; }
}

/* ---- v2: pixel art, interações, minimapa, quadro, personagem ---- */
#esc-canvas { image-rendering: pixelated; }
.esc-zona.entra { animation: zona-entra .35s ease-out; }
@keyframes zona-entra { from { transform: translateY(-8px); opacity: 0; } }
.esc-acao { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 6; display: flex; align-items: center; gap: 10px; background: #fff; color: #14153a; font-weight: 700; font-size: 14px; padding: 8px 16px 8px 8px; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.3); animation: sobe .18s ease-out; }
.esc-acao:hover { background: #fff8e1; }
.esc-acao kbd, .esc-dicas kbd { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 7px; background: #14153a; color: #ffd666; font: 800 13px Figtree, system-ui; box-shadow: inset 0 -2px 0 rgba(255,255,255,.15); }
.esc-minimapa { position: absolute; left: 14px; bottom: 18px; z-index: 5; width: 200px; border-radius: 10px; border: 2px solid rgba(255,255,255,.85); box-shadow: 0 6px 20px rgba(0,0,0,.35); cursor: crosshair; background: #16173f; }
.esc-zoom { bottom: 18px !important; right: 14px; }
.esc-entrar-top { display: flex; gap: 16px; align-items: center; text-align: left; margin-bottom: 14px; }
.esc-entrar-top canvas { image-rendering: pixelated; background: radial-gradient(circle at 50% 80%, #e9ebfb 0 55%, transparent 56%); border-radius: 14px; flex: none; }
.esc-entrar-top h2 { margin: 0 0 4px; }
.esc-entrar-top p { margin: 0 0 8px; font-size: 13.5px; }
.esc-dicas { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; margin-top: 12px; font-size: 12px; color: var(--mut); align-items: center; }
.esc-dicas span { display: inline-flex; align-items: center; gap: 3px; }
.esc-dicas kbd { min-width: 20px; height: 20px; font-size: 11px; border-radius: 5px; }
.esc-vid-av canvas { image-rendering: pixelated; }
.esc-side-boneco { width: 18px; height: 26px; image-rendering: pixelated; flex: none; margin: -4px 0; }
.esc-mini-boneco { image-rendering: pixelated; background: #eef0fb; border-radius: 8px; }
.modal.qb-modal { width: min(1280px, 96vw); }
.qb-cab { gap: 10px; flex-wrap: wrap; }
.qb-cab h2 { display: flex; align-items: center; gap: 8px; flex: none !important; margin-right: 8px !important; }
.qb-ferr { display: flex; align-items: center; gap: 6px; flex: 1; flex-wrap: wrap; }
.qb-ferr .esc-sep { background: var(--line); height: 22px; }
.qb-cor { width: 26px; height: 26px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 2px rgba(255,255,255,.4); }
.qb-cor.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--c); }
.qb-tam { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; }
.qb-tam i { background: var(--ink); border-radius: 50%; display: block; }
.qb-tam.on, .qb-ferr .bt-ic.on { background: var(--pri-soft); }
.qb-area { padding: 0 20px; }
.qb-area canvas { width: 100%; height: auto; aspect-ratio: 16/9; border: 1px solid var(--line2); border-radius: 12px; cursor: crosshair; touch-action: none; display: block; }
.qb-rod { padding: 10px 24px 18px; font-size: 12.5px; }
.modal.pb-modal { width: 760px; }
.pb-corpo { display: grid; grid-template-columns: 200px 1fr; gap: 22px; }
.pb-palco { display: flex; flex-direction: column; align-items: center; gap: 10px; background: linear-gradient(#eef0fb, #dfe3f7); border-radius: 16px; padding: 18px 10px; align-self: start; position: sticky; top: 0; }
.pb-palco canvas { image-rendering: pixelated; }
.pb-dirs { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink2); font-weight: 600; }
.pb-dirs button { width: 30px; height: 30px; border-radius: 50%; background: #fff; font-size: 18px; font-weight: 800; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.pb-ops { display: flex; flex-direction: column; gap: 14px; max-height: 62vh; overflow-y: auto; padding-right: 4px; }
.pb-t { font-size: 13px; font-weight: 800; margin-bottom: 7px; }
.pb-sw { display: flex; flex-wrap: wrap; gap: 7px; }
.pb-sw button { width: 30px; height: 30px; border-radius: 9px; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.pb-sw button.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--pri); }
.pb-est { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 7px; }
.pb-est button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; border-radius: 10px; border: 1.5px solid var(--line); font-size: 11.5px; font-weight: 600; color: var(--ink2); }
.pb-est button:hover { border-color: var(--line2); background: var(--bg2); }
.pb-est button.on { border-color: var(--pri); background: var(--pri-soft); color: var(--pri); }
.pb-est canvas { image-rendering: pixelated; }
@media (max-width: 820px) {
  .esc-minimapa { width: 120px; bottom: 140px; }
  .esc-acao { bottom: 128px; }
  .pb-corpo { grid-template-columns: 1fr; }
  .pb-palco { position: static; }
}

.esc-side-boneco { width: 20px !important; height: 27px !important; }
.pb-nada { display: grid; place-items: center; background: var(--bg2) !important; color: var(--mut); font-weight: 800; font-size: 13px; }

/* gaveta com chat/tarefas dentro do mapa */
.esc-gaveta { position: absolute; top: 0; right: 0; bottom: 0; z-index: 9; background: var(--bg); box-shadow: -10px 0 30px rgba(0,0,0,.35); display: flex; flex-direction: column; animation: gv-entra .18s ease-out; }
@keyframes gv-entra { from { transform: translateX(30px); opacity: 0; } }
.esc-gaveta iframe { flex: 1; border: 0; width: 100%; background: var(--bg); }
.esc-gaveta.arrastando { user-select: none; }
.gv-alca { position: absolute; left: -4px; top: 0; bottom: 0; width: 8px; cursor: ew-resize; z-index: 2; }
.gv-alca::after { content: ""; position: absolute; left: 3px; top: 50%; width: 3px; height: 44px; margin-top: -22px; border-radius: 2px; background: rgba(255,255,255,.5); }
.gv-top { display: flex; align-items: center; gap: 4px; padding: 6px 8px; background: var(--side); }
.gv-top > button:not(.bt-ic) { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 8px; color: var(--side-ink); font-weight: 700; font-size: 13px; position: relative; }
.gv-top > button.on { background: rgba(255,255,255,.14); color: #fff; }
.gv-top .bt-ic { color: var(--side-ink); width: 30px; height: 30px; }
.gv-top .bt-ic:hover { background: rgba(255,255,255,.12); color: #fff; }
.gv-top .bd { margin-left: 2px; }
.gv-esp { flex: 1; }
.esc-rd .bd { position: absolute; top: -3px; right: -3px; }
.esc-rd { position: relative; }
.esc-palco.com-gaveta .esc-barra, .esc-palco.com-gaveta .esc-videos, .esc-palco.com-gaveta .esc-acao { left: calc((100% - var(--gv)) / 2); }
.esc-palco.com-gaveta .esc-zoom { right: calc(var(--gv) + 14px); }
.esc-palco.com-gaveta .esc-videos { max-width: calc(100% - var(--gv) - 260px); }
/* página dentro da gaveta */
.embed .rail { display: none !important; }
.embed .app { padding-bottom: 0 !important; grid-template-columns: 268px 1fr; }
.embed .app.com-painel { grid-template-columns: 268px 1fr 360px; }
@media (max-width: 820px) { .embed .app, .embed .app.com-painel { grid-template-columns: 1fr; } }
@media (max-width: 820px) { .esc-gaveta { width: 100% !important; } }
