/* Mesa virtual (VTT) · usa as cores de estilo.css (tema claro e escuro). */
html, body.vtt { height: 100%; }
body.vtt { margin: 0; padding: 0; overflow: hidden; background: var(--fundo); color: var(--texto); font: 15px/1.4 "Source Sans 3", system-ui, sans-serif; }
.vtt [hidden] { display: none !important; }
.vtt h1, .vtt h2, .vtt h3, .vtt h4 { margin: 0 0 .4em; font-family: "Newsreader", Georgia, serif; font-weight: 500; }
.vtt h3 { font-size: 1.15rem; margin-top: .9em; } .vtt h3:first-child { margin-top: 0; }
.vtt h4 { font-size: .8rem; font-family: inherit; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ouro); margin-top: 1.1em; }
.vtt p { margin: .4em 0; } .vtt a { color: var(--azul); }
.vtt code { background: var(--painel-2); padding: 0 .3em; border-radius: 4px; font-size: .9em; }
.vtt-nota { color: var(--fosco); font-size: .86rem; }
.vtt-erro { color: #ff9a8f; background: rgba(214, 80, 74, .14); border: 1px solid rgba(214, 80, 74, .5); padding: .5em .7em; border-radius: var(--raio-p); }

.vtt input, .vtt select, .vtt textarea { font: inherit; color: var(--texto); background: var(--fundo); border: 1px solid var(--linha-2); border-radius: 6px; padding: .3em .45em; min-width: 0; max-width: 100%; }
.vtt input:focus, .vtt select:focus, .vtt textarea:focus, .vtt button:focus-visible { outline: 2px solid var(--azul); outline-offset: 1px; }
.vtt textarea { width: 100%; resize: vertical; }
.vtt label { display: flex; flex-direction: column; gap: .15em; font-size: .82rem; color: var(--fosco); margin: .35em 0; }
.vtt label > input, .vtt label > select, .vtt label > textarea { font-size: .95rem; }
.vtt label.vtt-chk { flex-direction: row; align-items: center; gap: .4em; color: var(--texto); font-size: .9rem; }
.vtt input[type=checkbox], .vtt input[type=radio] { width: 1.05em; height: 1.05em; accent-color: var(--ouro); margin: 0; }
.vtt input[type=range] { padding: 0; accent-color: var(--ouro); }
.vtt input.vtt-n { width: 4.2em; text-align: center; }
.vtt-b { font: inherit; font-size: .88rem; font-weight: 600; color: var(--texto); background: var(--painel-2); border: 1px solid var(--linha-2); border-radius: 6px; padding: .32em .7em; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: .3em; white-space: nowrap; }
.vtt a.vtt-b { color: var(--texto); }
.vtt-b:hover { border-color: var(--azul); } .vtt-b:disabled { opacity: .45; cursor: not-allowed; }
.vtt-b-ouro, .vtt a.vtt-b-ouro { background: var(--ouro); border-color: var(--ouro); color: var(--sobre-ouro); }
.vtt-b-perigo { color: #ff9a8f; border-color: rgba(214, 80, 74, .6); }
.vtt-b-min { padding: .1em .45em; font-size: .8rem; background: transparent; }
.vtt-b.vtt-ativo { background: var(--azul); border-color: var(--azul); color: #0b131f; }
.vtt-linha { display: flex; flex-wrap: wrap; gap: .4em; align-items: flex-end; margin: .4em 0; }
.vtt-linha > label { margin: 0; }

/* entrada */
.vtt-lobby { height: 100%; overflow: auto; padding: 1.5rem clamp(1rem, 4vw, 3rem) 3rem; max-width: 62rem; margin: 0 auto; }
.vtt-lobby h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-top: .6em; }
.vtt-lede { color: var(--fosco); max-width: 46rem; font-size: 1.05rem; }
.vtt-voltar { color: var(--fosco) !important; text-decoration: none; }
.vtt-cartoes { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1rem; margin-top: 1.2rem; align-items: start; }
.vtt-cartao { background: var(--painel); border: 1px solid var(--linha); border-radius: var(--raio); padding: 1rem 1.1rem; }
.vtt-cartao label > input { width: 100%; }
.vtt-cartao .vtt-b-ouro { margin-top: .5em; }
.vtt-lista { list-style: none; margin: .5em 0; padding: 0; }
.vtt-lista li { display: flex; flex-wrap: wrap; align-items: center; gap: .4em .6em; padding: .5em 0; border-bottom: 1px solid var(--linha); }
.vtt-lista li span { margin-left: auto; display: flex; gap: .3em; flex-wrap: wrap; }

/* mesa */
.vtt-mesa { height: 100%; display: flex; flex-direction: column; }
.vtt-topo { display: flex; align-items: center; gap: .6rem; padding: .35rem .6rem; background: var(--barra-bg); border-bottom: 1px solid var(--linha); flex: none; overflow-x: auto; }
.vtt-topo .vtt-voltar { font-size: 1.3rem; padding: 0 .2em; }
.vtt-titulo { display: flex; flex-direction: column; line-height: 1.15; min-width: 6rem; max-width: 16rem; }
.vtt-titulo strong { font-family: "Newsreader", Georgia, serif; font-weight: 500; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vtt-titulo span { font-size: .76rem; color: var(--fosco); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vtt-ferr { display: flex; gap: .25rem; align-items: center; }
.vtt-zoom { display: flex; gap: .15rem; margin-left: .4rem; }
.vtt-online { margin-left: auto; display: flex; gap: .25rem; flex-wrap: nowrap; }
.vtt-on { font-size: .76rem; padding: .1em .55em; border-radius: 99px; background: var(--painel-2); border: 1px solid var(--linha-2); white-space: nowrap; }
.vtt-on::before { content: "● "; color: var(--verde); } .vtt-on-m { border-color: var(--ouro); }
.vtt-so-movel { display: none; }
.vtt-corpo { flex: 1; display: flex; min-height: 0; }
.vtt-mapa { flex: 1; position: relative; min-width: 0; overflow: hidden; background: #070b12; }
.vtt-mapa canvas { display: block; touch-action: none; }
.vtt-lado { width: 22.5rem; flex: none; display: flex; flex-direction: column; background: var(--painel); border-left: 1px solid var(--linha); min-height: 0; }
.vtt-abas { display: flex; flex-wrap: wrap; gap: 2px; padding: .3rem .3rem 0; background: var(--barra-bg); border-bottom: 1px solid var(--linha); flex: none; }
.vtt-abas button { font: inherit; font-size: .82rem; font-weight: 600; color: var(--fosco); background: transparent; border: 0; border-bottom: 2px solid transparent; padding: .35em .55em; cursor: pointer; }
.vtt-abas button.vtt-ativo { color: var(--ouro); border-bottom-color: var(--ouro); }
.vtt-painel { flex: 1; overflow-y: auto; padding: .7rem .8rem 1rem; min-height: 0; display: flex; flex-direction: column; }
.vtt-painel label > input:not(.vtt-n):not([type=checkbox]), .vtt-painel label > select { width: 100%; }
.vtt-painel input[type=search] { width: 100%; }
.vtt-yt { flex: none; border-top: 1px solid var(--linha); }

/* histórico e dados */
.vtt-log { flex: 1; overflow-y: auto; min-height: 8rem; display: flex; flex-direction: column; gap: .35rem; padding-right: .2rem; }
.vtt-l { background: var(--fundo); border: 1px solid var(--linha); border-left: 3px solid var(--linha-2); border-radius: 6px; padding: .35em .55em; font-size: .9rem; overflow-wrap: anywhere; }
.vtt-l-sis { border-left-color: var(--azul); color: var(--fosco); }
.vtt-l-rol { border-left-color: var(--azul); }
.vtt-det { display: block; color: var(--fosco); font-size: .8rem; }
.vtt-tot { display: inline-block; font-size: 1.25rem; font-weight: 700; min-width: 1.8em; text-align: center; background: var(--painel-2); border-radius: 6px; padding: 0 .35em; margin-top: .15em; }
.vtt-n20 { background: var(--verde); color: #0b131f; } .vtt-n1 { background: #d6504a; color: #fff; }
.vtt-res { display: inline-block; font-weight: 700; letter-spacing: .04em; margin-right: .5em; }
.vtt-r-crit { border-left-color: var(--ouro); } .vtt-r-crit .vtt-res { color: var(--ouro); }
.vtt-r-acerto { border-left-color: var(--verde); } .vtt-r-acerto .vtt-res { color: var(--verde); }
.vtt-r-erro .vtt-res { color: var(--fosco); } .vtt-r-falha { border-left-color: #d6504a; } .vtt-r-falha .vtt-res { color: #ff8a7f; }
.vtt-dados { flex: none; border-top: 1px solid var(--linha); padding-top: .5rem; margin-top: .5rem; }
.vtt-dbot { display: flex; gap: .25rem; flex-wrap: wrap; }
.vtt-dbot .vtt-b { flex: 1; justify-content: center; padding: .4em .2em; }
.vtt-dados form input { flex: 1; }

/* iniciativa, fichas, monstros, música */
.vtt-ini, .vtt-fichas, .vtt-best, .vtt-faixas, .vtt-ajuda { list-style: none; margin: .4em 0; padding: 0; }
.vtt-ajuda { list-style: disc; padding-left: 1.1em; color: var(--fosco); font-size: .86rem; }
.vtt-ini li { display: flex; align-items: center; gap: .5em; padding: .35em .5em; border: 1px solid var(--linha); border-radius: 6px; margin-bottom: .25rem; cursor: pointer; background: var(--fundo); }
.vtt-ini li.vtt-vez { border-color: var(--ouro); box-shadow: inset 3px 0 0 var(--ouro); background: var(--painel-2); }
.vtt-ini li.vtt-oc { opacity: .6; font-style: italic; }
.vtt-iv { font-weight: 700; min-width: 2em; text-align: center; } .vtt-in { flex: 1; } .vtt-in small { color: var(--fosco); display: block; } .vtt-ip { font-size: .8rem; color: var(--fosco); white-space: nowrap; }
.vtt-fichas li, .vtt-faixas li { border: 1px solid var(--linha); border-radius: 6px; padding: .45em .55em; margin-bottom: .3rem; background: var(--fundo); }
.vtt-fl { display: flex; flex-direction: column; } .vtt-fl small { color: var(--fosco); }
.vtt-faixas li { display: flex; align-items: center; gap: .4em; } .vtt-faixas li span { flex: 1; overflow-wrap: anywhere; } .vtt-faixas li.vtt-vez { border-color: var(--ouro); }
.vtt-best { max-height: 45vh; overflow-y: auto; border: 1px solid var(--linha); border-radius: 6px; }
.vtt-best li { padding: .35em .55em; border-bottom: 1px solid var(--linha); cursor: pointer; display: flex; flex-direction: column; }
.vtt-best li:hover { background: var(--painel-2); } .vtt-best small { color: var(--fosco); }
.vtt-grade2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 .6em; }
.vtt-tocando { background: var(--fundo); border: 1px solid var(--linha); border-radius: 6px; padding: .45em .6em; }

/* painéis sobre o mapa */
.vtt-tok { position: absolute; left: .6rem; bottom: .6rem; width: min(24rem, calc(100% - 1.2rem)); max-height: 70%; overflow-y: auto; background: color-mix(in srgb, var(--painel) 94%, transparent); border: 1px solid var(--linha-2); border-radius: var(--raio-p); padding: .55rem .7rem; box-shadow: 0 6px 24px rgba(0, 0, 0, .45); }
.vtt-tk-cab { display: flex; align-items: baseline; gap: .5em; } .vtt-tk-cab b { font-size: 1.05rem; } .vtt-tk-cab small { color: var(--fosco); flex: 1; }
.vtt-pv { margin: .35em 0; } .vtt-barra { height: 7px; background: var(--fundo); border-radius: 4px; overflow: hidden; margin-bottom: .25em; border: 1px solid var(--linha); }
.vtt-barra i { display: block; height: 100%; background: #5fbf6d; } .vtt-temp { color: var(--azul); }
.vtt-conds { display: flex; flex-wrap: wrap; gap: .25em; align-items: center; margin: .3em 0; }
.vtt-cond { font: inherit; font-size: .78rem; background: #5b2f85; color: #fff; border: 0; border-radius: 99px; padding: .1em .6em; cursor: pointer; }
.vtt-conds select { font-size: .8rem; padding: .1em .3em; }
.vtt-tok label > select, .vtt-tok label > input:not(.vtt-n) { width: 100%; }
.vtt-pend { position: absolute; left: 50%; top: .6rem; transform: translateX(-50%); max-width: calc(100% - 1.2rem); display: flex; flex-wrap: wrap; gap: .4em .6em; align-items: center; justify-content: center; background: color-mix(in srgb, var(--painel) 96%, transparent); border: 1px solid var(--ouro); border-radius: var(--raio-p); padding: .45rem .7rem; box-shadow: 0 6px 24px rgba(0, 0, 0, .5); }
.vtt-pend label { flex-direction: row; align-items: center; gap: .4em; margin: 0; color: var(--texto); } .vtt-crit { color: var(--ouro); }
.vtt-toast { position: absolute; left: 50%; top: 34%; transform: translate(-50%, -50%); text-align: center; pointer-events: none; background: rgba(8, 12, 20, .9); color: #edf2f8; border: 2px solid #8dc6ef; border-radius: 14px; padding: .7rem 1.4rem; display: flex; flex-direction: column; animation: vtt-pop .25s ease-out; z-index: 3; }
.vtt-toast b { font-size: clamp(1.6rem, 4vw, 2.6rem); font-family: "Newsreader", Georgia, serif; line-height: 1.1; } .vtt-toast small { color: #9cabbc; }
.vtt-toast.crit { border-color: #ffd76a; } .vtt-toast.crit b { color: #ffd76a; } .vtt-toast.acerto { border-color: #7fd08f; } .vtt-toast.acerto b { color: #7fd08f; }
.vtt-toast.falha, .vtt-toast.dano { border-color: #d6504a; } .vtt-toast.falha b, .vtt-toast.dano b { color: #ff8a7f; } .vtt-toast.erro b { color: #9cabbc; }
@keyframes vtt-pop { from { transform: translate(-50%, -50%) scale(.7); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .vtt-toast { animation: none; } }
.vtt-aviso { position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 50; background: #1d2b3d; color: #edf2f8; border: 1px solid #8dc6ef; border-radius: 8px; padding: .5rem .9rem; max-width: min(34rem, 92vw); box-shadow: 0 6px 24px rgba(0, 0, 0, .5); }

/* modais e ficha */
.vtt-fundo-modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); z-index: 20; display: flex; align-items: center; justify-content: center; padding: .6rem; }
.vtt-m, .vtt-f { background: var(--painel); border: 1px solid var(--linha-2); border-radius: var(--raio); box-shadow: 0 12px 40px rgba(0, 0, 0, .6); max-height: 100%; }
.vtt-m { width: min(34rem, 100%); overflow-y: auto; padding: 1rem 1.1rem; }
.vtt-m label > input:not(.vtt-n):not([type=color]):not([type=checkbox]), .vtt-m label > select { width: 100%; }
.vtt-f { width: min(52rem, 100%); display: flex; flex-direction: column; }
.vtt-f-cab { display: flex; gap: .8rem; align-items: flex-start; padding: .8rem 1rem .5rem; border-bottom: 1px solid var(--linha); background: var(--painel-2); border-radius: var(--raio) var(--raio) 0 0; }
.vtt-f-cab > div { flex: 1; min-width: 0; } .vtt-f-cab img { width: 4.5rem; height: 4.5rem; object-fit: cover; border-radius: 50%; border: 2px solid var(--ouro); }
.vtt-f-nome input { width: 100%; font-family: "Newsreader", Georgia, serif; font-size: 1.5rem; background: transparent; border-color: transparent; padding: 0 .2em; }
.vtt-f-nome input:hover { border-color: var(--linha-2); }
.vtt-f-cab label > input:not(.vtt-n) { width: 9rem; }
.vtt-f-corpo { overflow-y: auto; padding: .6rem 1rem 1rem; }
.vtt-f-comb { display: flex; flex-wrap: wrap; gap: .5em .7em; align-items: flex-end; background: var(--fundo); border: 1px solid var(--linha); border-radius: var(--raio-p); padding: .5em .7em; }
.vtt-f-comb label { margin: 0; }
.vtt-rolar { font: inherit; font-weight: 700; font-size: .88rem; color: var(--ouro); background: transparent; border: 1px solid var(--ouro); border-radius: 6px; padding: .12em .5em; cursor: pointer; min-width: 2.6em; }
.vtt-rolar:hover { background: var(--ouro); color: var(--sobre-ouro); }
.vtt-attrs { display: grid; grid-template-columns: repeat(auto-fit, minmax(7.2rem, 1fr)); gap: .5rem; }
.vtt-attr { display: flex; flex-direction: column; align-items: center; gap: .25em; background: var(--fundo); border: 1px solid var(--linha); border-radius: var(--raio-p); padding: .45em; }
.vtt-attr > span { font-weight: 700; letter-spacing: .08em; color: var(--ouro); font-size: .8rem; } .vtt-attr label { margin: 0; font-size: .78rem; }
.vtt-pers { columns: 2 15rem; column-gap: 1.2rem; }
.vtt-pers > div { display: flex; align-items: center; gap: .35em; padding: .12em 0; break-inside: avoid; } .vtt-pers span { flex: 1; } .vtt-pers small { color: var(--fosco); }
.vtt-atqs .vtt-linha { align-items: center; } .vtt-atqs label { flex-direction: row; align-items: center; gap: .3em; }
.vtt-slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: .25rem .9rem; }
.vtt-slots > div { display: flex; align-items: center; gap: .4em; } .vtt-slots > div.vtt-vazio { opacity: .55; }
.vtt-slots > div > span:first-child { font-weight: 700; width: 1.8em; } .vtt-pips { flex: 1; display: flex; gap: .25em; flex-wrap: wrap; } .vtt-slots small { color: var(--fosco); }
.vtt-slot { width: 1.15rem; height: 1.15rem; border-radius: 50%; border: 2px solid var(--azul); background: var(--azul); cursor: pointer; padding: 0; }
.vtt-slot.vtt-gasto { background: transparent; border-color: var(--linha-2); }
.vtt-slots input.vtt-n { width: 3.2em; padding: .1em; }

/* telas estreitas: o painel vira gaveta */
@media (max-width: 860px) {
  .vtt-so-movel { display: inline-flex; }
  .vtt-online { display: none; }
  .vtt-lado { position: absolute; right: 0; top: 0; bottom: 0; width: min(22.5rem, 92vw); transform: translateX(100%); transition: transform .2s; z-index: 10; box-shadow: -8px 0 30px rgba(0, 0, 0, .5); }
  .vtt-lado.vtt-aberto { transform: none; }
  .vtt-corpo { position: relative; }
  .vtt-titulo { max-width: 9rem; }
  .vtt-topo { flex-wrap: wrap; overflow: visible; gap: .3rem .4rem; }
  .vtt-ferr { flex-wrap: wrap; order: 5; width: 100%; }
  .vtt-topo #vtt-som { margin-left: auto; }
  .vtt-tok { max-height: 55%; }
}

/* seletor de cor (efeitos do cenário, cor do token) */
.vtt input[type=color] { width: 2.8rem; height: 2rem; padding: 2px; cursor: pointer; }

/* opções da ferramenta, testes em grupo, sussurros, morte, handout */
.vtt-topo { flex-wrap: wrap; row-gap: .3rem; overflow: visible; }
.vtt-ferr { flex-wrap: wrap; }
.vtt-opc { position: absolute; left: .6rem; top: .6rem; max-width: min(34rem, calc(100% - 1.2rem)); display: flex; flex-wrap: wrap; gap: .4em .7em; align-items: center; background: color-mix(in srgb, var(--painel) 95%, transparent); border: 1px solid var(--linha-2); border-radius: var(--raio-p); padding: .4rem .6rem; box-shadow: 0 6px 24px rgba(0, 0, 0, .45); z-index: 2; }
.vtt-opc label { flex-direction: row; align-items: center; gap: .4em; margin: 0; color: var(--texto); }
.vtt-opc .vtt-nota { flex-basis: 100%; }
.vtt-l-priv { border-left-color: #b06fd6; background: color-mix(in srgb, #b06fd6 10%, var(--fundo)); } .vtt-priv { color: #b06fd6; font-size: .8rem; }
.vtt-salv { list-style: none; margin: .3em 0 0; padding: 0; }
.vtt-salv li { display: flex; gap: .5em; align-items: baseline; padding: .12em 0; border-top: 1px solid var(--linha); font-size: .86rem; }
.vtt-salv li span { flex: 1; } .vtt-salv small { color: var(--fosco); } .vtt-salv em { font-style: normal; color: #ff8a7f; }
.vtt-salv .vtt-ok b { color: var(--verde); } .vtt-salv .vtt-nok b { color: #ff8a7f; }
.vtt-marcar { max-height: 38vh; overflow-y: auto; border: 1px solid var(--linha); border-radius: 6px; padding: .3em .6em; columns: 2 12rem; }
.vtt-marcar label { margin: .15em 0; break-inside: avoid; }
.vtt-f-desc { margin-top: .5rem; align-items: center; }
.vtt-morte { margin-top: .5rem; display: flex; flex-wrap: wrap; gap: .5em .8em; align-items: center; border: 1px solid #d6504a; background: rgba(214, 80, 74, .12); border-radius: var(--raio-p); padding: .5em .7em; }
.vtt-handout { display: block; max-width: 100%; max-height: 60vh; margin: .5em auto; border-radius: 8px; }
.vtt-handout-txt { font-family: "Newsreader", Georgia, serif; font-size: 1.1rem; line-height: 1.5; }
.vtt input.vtt-n-p { width: 3.3em; padding: .2em; }
/* as ferramentas ficam sempre numa linha própria, para o mapa não pular quando alguém entra na mesa */
.vtt-topo .vtt-ferr { order: 5; flex-basis: 100%; }
.vtt-topo .vtt-online { flex-wrap: wrap; justify-content: flex-end; }

/* camada do narrador, idiomas */
.vtt-b.vtt-camada-gm { background: #6b3fa0; border-color: #c084fc; color: #fff; }
.vtt-lingua { color: var(--ouro); font-size: .8rem; font-style: normal; font-weight: 600; }
.vtt-l-lingua { border-left-color: var(--ouro); }
.vtt-cifrado { font-family: "Newsreader", Georgia, serif; font-style: italic; letter-spacing: .03em; color: var(--fosco); }
.vtt-idiomas { display: flex; flex-wrap: wrap; gap: .15em 1em; }
.vtt-idiomas label { margin: .1em 0; }

/* prévia da imagem enviada nos formulários de token, pino e "mostrar a todos" */
.vtt-previa { height: 4.5rem; max-width: 9rem; object-fit: cover; border-radius: 8px; border: 1px solid var(--linha-2); }
