/*
 * Pimble — sistema visual.
 *
 * Conceito: a sala de controle de uma emissora de cortes. Cada Máquina é um
 * canal, com a luz vermelha de "no ar" (tally) quando está rodando; cortes
 * aparecem como quadros verticais 9:16; a nota é um medidor por critério;
 * tempos e números em fonte mono, como timecode.
 *
 * Escuro primeiro (é onde se edita vídeo), com tema claro completo.
 * Cor de ação: anil elétrico. Vermelho só para "no ar" e erro.
 */

/* Fonte das legendas (a mesma da gravação no servidor). */
@font-face { font-family: 'Montserrat'; font-weight: 500; font-display: swap; src: url('/fontes/Montserrat-Medium.ttf') format('truetype'); }
@font-face { font-family: 'Montserrat'; font-weight: 600; font-display: swap; src: url('/fontes/Montserrat-SemiBold.ttf') format('truetype'); }
@font-face { font-family: 'Montserrat'; font-weight: 700; font-display: swap; src: url('/fontes/Montserrat-Bold.ttf') format('truetype'); }
@font-face { font-family: 'Montserrat'; font-weight: 800; font-display: swap; src: url('/fontes/Montserrat-ExtraBold.ttf') format('truetype'); }
@font-face { font-family: 'Montserrat'; font-weight: 900; font-display: swap; src: url('/fontes/Montserrat-Black.ttf') format('truetype'); }

:root {
  /* escuro (padrão) */
  --fundo: #0D0F13;
  --painel: #14171D;
  --painel-2: #1A1E26;
  --painel-3: #222833;
  --linha: #262C37;
  --linha-forte: #353D4B;
  --texto: #ECEEF2;
  --texto-2: #A7AEBB;
  --texto-3: #6F7786;
  --acao: #8B9CFF;
  --acao-forte: #A9B5FF;
  --acao-fundo: rgba(139, 156, 255, 0.14);
  --sobre-acao: #0D0F13;
  --tally: #FF4D4D;
  --ok: #3DD68C;
  --ok-fundo: rgba(61, 214, 140, 0.13);
  --alerta: #F5B544;
  --alerta-fundo: rgba(245, 181, 68, 0.14);
  --erro: #FF6B6B;
  --erro-fundo: rgba(255, 107, 107, 0.13);
  --sombra: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 12px 32px rgba(0, 0, 0, 0.35);
  --sombra-leve: 0 6px 18px rgba(0, 0, 0, 0.28);
  --vidro: rgba(13, 15, 19, 0.72);

  --f-titulo: 'Bricolage Grotesque', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
  --f-texto: 'Instrument Sans', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --raio: 12px;
  --raio-p: 8px;
  --raio-g: 18px;
  --lateral: 248px;
  color-scheme: dark;
}

:root[data-theme="claro"] {
  --fundo: #F3F4F7;
  --painel: #FFFFFF;
  --painel-2: #F7F8FA;
  --painel-3: #EDEFF3;
  --linha: #E1E4EA;
  --linha-forte: #CDD2DB;
  --texto: #14171D;
  --texto-2: #4E5666;
  --texto-3: #7F8796;
  --acao: #4B5BD7;
  --acao-forte: #3A49C2;
  --acao-fundo: rgba(75, 91, 215, 0.10);
  --sobre-acao: #FFFFFF;
  --tally: #E5383B;
  --ok: #138A55;
  --ok-fundo: rgba(19, 138, 85, 0.10);
  --alerta: #A86A00;
  --alerta-fundo: rgba(201, 132, 0, 0.12);
  --erro: #C9302C;
  --erro-fundo: rgba(201, 48, 44, 0.09);
  --sombra: 0 1px 2px rgba(20, 23, 29, 0.06), 0 10px 28px rgba(20, 23, 29, 0.07);
  --sombra-leve: 0 4px 14px rgba(20, 23, 29, 0.08);
  --vidro: rgba(255, 255, 255, 0.78);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--fundo);
  color: var(--texto);
  font: 14px/1.5 var(--f-texto);
  -webkit-font-smoothing: antialiased;
}
img, video, canvas { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--acao); text-decoration: none; }
a:hover { text-decoration: underline; }
[hidden] { display: none !important; }
::selection { background: var(--acao-fundo); }
:focus-visible { outline: 2px solid var(--acao); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

h1, h2, h3, h4 { font-family: var(--f-titulo); margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: 30px; font-weight: 800; line-height: 1.1; }
h2 { font-size: 20px; font-weight: 650; }
h3 { font-size: 16px; font-weight: 650; }
p { margin: 0; }
.mono, .num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.rotulo { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--texto-3); }
.fraco { color: var(--texto-2); }
.mais-fraco { color: var(--texto-3); }
.quebra { overflow-wrap: anywhere; }

.carregando-tela { height: 100vh; display: grid; place-items: center; color: var(--texto-2); gap: 10px; grid-auto-flow: column; justify-content: center; align-items: center; }

/* ---------------------------------------------------------------- tally */
.tally { width: 9px; height: 9px; border-radius: 50%; background: var(--texto-3); display: inline-block; flex: none; }
.tally.no-ar { background: var(--tally); box-shadow: 0 0 0 3px rgba(255, 77, 77, 0.18), 0 0 14px rgba(255, 77, 77, 0.65); animation: pulsar 1.8s ease-in-out infinite; }
.tally.ok { background: var(--ok); }
.tally.alerta { background: var(--alerta); }
@keyframes pulsar { 50% { box-shadow: 0 0 0 5px rgba(255, 77, 77, 0.08), 0 0 22px rgba(255, 77, 77, 0.85); } }

/* ---------------------------------------------------------------- casca */
.casca { display: grid; grid-template-columns: var(--lateral) minmax(0, 1fr); min-height: 100vh; }
.lateral {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px;
  padding: 18px 14px; border-right: 1px solid var(--linha); background: var(--painel);
}
.marca { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.marca-icone { width: 30px; height: 30px; border-radius: 9px; background: var(--painel-3); border: 1px solid var(--linha-forte); display: grid; place-items: center; }
.marca-nome { font-family: var(--f-titulo); font-weight: 800; font-size: 16px; line-height: 1.05; }
.marca-nome small { display: block; font-family: var(--f-texto); font-weight: 500; font-size: 11px; color: var(--texto-3); letter-spacing: 0.02em; }
.nav-grupo { margin: 14px 8px 4px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: var(--texto-2);
  font-weight: 500; cursor: pointer; border: 0; background: none; width: 100%; text-align: left; text-decoration: none !important;
}
.nav-item:hover { background: var(--painel-2); color: var(--texto); }
.nav-item.ativo { background: var(--acao-fundo); color: var(--texto); }
.nav-item.ativo svg { color: var(--acao); }
.nav-item .contador { margin-left: auto; font-family: var(--f-mono); font-size: 11px; background: var(--painel-3); color: var(--texto-2); padding: 1px 7px; border-radius: 99px; }
.nav-item.ativo .contador { background: var(--acao); color: var(--sobre-acao); }
.lateral-pe { margin-top: auto; display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--linha); }
.eu { display: flex; align-items: center; gap: 10px; padding: 6px 8px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12px; background: var(--painel-3); color: var(--texto-2); flex: none; }
.eu-nome { font-weight: 600; font-size: 13px; line-height: 1.2; }
.eu-papel { font-size: 11px; color: var(--texto-3); }

.principal { min-width: 0; display: flex; flex-direction: column; }
.topo {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 12px 28px;
  background: var(--vidro); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--linha);
}
.topo .titulo-tela { font-family: var(--f-titulo); font-weight: 650; font-size: 15px; }
.topo-status { margin-left: auto; display: flex; align-items: center; gap: 16px; color: var(--texto-2); font-size: 13px; }
.topo-status .item { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.conteudo { padding: 26px 28px 60px; display: grid; gap: 22px; align-content: start; max-width: 1480px; width: 100%; }
.menu-movel { display: none; }

@media (max-width: 960px) {
  .casca { grid-template-columns: 1fr; }
  .lateral { position: fixed; z-index: 50; width: 270px; transform: translateX(-102%); transition: transform 0.2s ease; box-shadow: var(--sombra); }
  .lateral.aberta { transform: none; }
  .menu-movel { display: inline-flex; }
  .topo { padding: 10px 16px; }
  .conteudo { padding: 18px 16px 60px; }
  .topo-status .item.esconder-movel { display: none; }
}

/* ------------------------------------------------------------ cabeçalho */
.cabecalho { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.cabecalho .textos { display: grid; gap: 6px; min-width: 0; flex: 1 1 320px; }
.cabecalho .acoes { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- botões */
.botao {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px;
  border-radius: 10px; border: 1px solid var(--linha-forte); background: var(--painel-2); color: var(--texto);
  font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; transition: background 0.12s, border-color 0.12s, transform 0.08s;
  text-decoration: none !important;
}
.botao:hover { background: var(--painel-3); }
.botao:active { transform: translateY(1px); }
.botao:disabled { opacity: 0.5; cursor: not-allowed; }
.botao.primario { background: var(--acao); border-color: var(--acao); color: var(--sobre-acao); }
.botao.primario:hover { background: var(--acao-forte); }
.botao.perigo { color: var(--erro); }
.botao.perigo:hover { background: var(--erro-fundo); border-color: var(--erro); }
.botao.fantasma { background: transparent; border-color: transparent; color: var(--texto-2); }
.botao.fantasma:hover { background: var(--painel-2); color: var(--texto); }
.botao.pequeno { height: 30px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.botao.grande { height: 44px; padding: 0 20px; font-size: 14px; border-radius: 12px; }
.botao.icone { width: 36px; padding: 0; }
.botao.icone.pequeno { width: 30px; }

/* Botão de ligar/pausar a Máquina: o maior gesto do produto. */
.botao-play {
  display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 16px 0 6px; border-radius: 99px; cursor: pointer;
  border: 1px solid var(--linha-forte); background: var(--painel-2); font-weight: 700; font-size: 13px; color: var(--texto);
}
.botao-play .circulo { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #06140D; }
.botao-play.rodando { border-color: rgba(255, 77, 77, 0.45); background: rgba(255, 77, 77, 0.08); }
.botao-play.rodando .circulo { background: var(--tally); color: #fff; }
.botao-play:hover { filter: brightness(1.08); }

/* ---------------------------------------------------------------- cartões */
.cartao { background: var(--painel); border: 1px solid var(--linha); border-radius: var(--raio-g); padding: 18px; min-width: 0; }
.cartao.sem-borda { border-color: transparent; }
.cartao-topo { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.cartao-topo h2, .cartao-topo h3 { margin-right: auto; }
.grade { display: grid; gap: 16px; }
.grade.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grade.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grade.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grade.lado { grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr); }
@media (max-width: 1180px) { .grade.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grade.lado { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .grade.c2, .grade.c3, .grade.c4 { grid-template-columns: 1fr; } }

/* indicador */
.indicador { display: grid; gap: 6px; }
.indicador .valor { font-family: var(--f-titulo); font-weight: 800; font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; }
.indicador .detalhe { font-size: 12px; color: var(--texto-3); }

/* ------------------------------------------------------------- pílulas */
.pilula {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 600;
  background: var(--painel-3); color: var(--texto-2); white-space: nowrap;
}
.pilula.ok { background: var(--ok-fundo); color: var(--ok); }
.pilula.alerta { background: var(--alerta-fundo); color: var(--alerta); }
.pilula.erro { background: var(--erro-fundo); color: var(--erro); }
.pilula.acao { background: var(--acao-fundo); color: var(--acao); }
.pilula.no-ar { background: rgba(255, 77, 77, 0.12); color: var(--tally); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  height: 32px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--linha-forte); background: transparent; color: var(--texto-2);
  font-weight: 600; font-size: 12.5px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px;
}
.chip:hover { color: var(--texto); background: var(--painel-2); }
.chip.ativo { background: var(--texto); color: var(--fundo); border-color: var(--texto); }
.chip .n { font-family: var(--f-mono); font-size: 11px; opacity: 0.75; }

/* ------------------------------------------------------------- formulário */
.campo { display: grid; gap: 6px; min-width: 0; }
.campo > label, .campo > .rotulo-campo { font-size: 12.5px; font-weight: 600; color: var(--texto-2); }
.campo .ajuda { font-size: 12px; color: var(--texto-3); }
.entrada, select.entrada, textarea.entrada {
  width: 100%; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--linha-forte); background: var(--painel-2);
  color: var(--texto); outline: none; transition: border-color 0.12s, box-shadow 0.12s;
}
textarea.entrada { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.45; }
.entrada:focus { border-color: var(--acao); box-shadow: 0 0 0 3px var(--acao-fundo); }
.entrada.grande { height: 52px; font-size: 15px; padding: 0 16px; border-radius: 14px; }
.linha-campos { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.alternar { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.alternar input { display: none; }
.alternar .trilho { width: 38px; height: 22px; border-radius: 99px; background: var(--painel-3); border: 1px solid var(--linha-forte); position: relative; transition: background 0.15s; flex: none; }
.alternar .trilho::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--texto-2); transition: transform 0.15s, background 0.15s; }
.alternar input:checked + .trilho { background: var(--acao); border-color: var(--acao); }
.alternar input:checked + .trilho::after { transform: translateX(16px); background: var(--sobre-acao); }
.segmentado { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--painel-3); gap: 2px; flex-wrap: wrap; }
.segmentado button { height: 30px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--texto-2); font-weight: 600; font-size: 12.5px; cursor: pointer; }
.segmentado button.ativo { background: var(--painel); color: var(--texto); box-shadow: var(--sombra-leve); }
.secao-form { display: grid; gap: 16px; padding: 20px 0; border-top: 1px solid var(--linha); }
.secao-form:first-child { border-top: 0; padding-top: 0; }
.secao-form > header { display: grid; gap: 4px; }
.secao-form > header p { color: var(--texto-3); font-size: 13px; max-width: 70ch; }

/* ------------------------------------------------------------- avisos */
.aviso { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--painel-2); border: 1px solid var(--linha); color: var(--texto-2); font-size: 13px; }
.aviso svg { flex: none; margin-top: 1px; }
.aviso.erro { background: var(--erro-fundo); border-color: transparent; color: var(--erro); }
.aviso.alerta { background: var(--alerta-fundo); border-color: transparent; color: var(--alerta); }
.aviso.ok { background: var(--ok-fundo); border-color: transparent; color: var(--ok); }
.aviso.acao { background: var(--acao-fundo); border-color: transparent; color: var(--texto); }
.aviso strong { color: inherit; }
.vazio { display: grid; place-items: center; text-align: center; gap: 10px; padding: 42px 20px; color: var(--texto-3); border: 1px dashed var(--linha-forte); border-radius: var(--raio-g); }
.vazio h3 { color: var(--texto); }
.vazio p { max-width: 52ch; }

/* ------------------------------------------------------------- tabela */
.tabela-caixa { overflow-x: auto; border: 1px solid var(--linha); border-radius: var(--raio); }
table.tabela { width: 100%; border-collapse: collapse; font-size: 13px; }
.tabela th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--texto-3); padding: 10px 14px; border-bottom: 1px solid var(--linha); background: var(--painel-2); white-space: nowrap; }
.tabela td { padding: 12px 14px; border-bottom: 1px solid var(--linha); vertical-align: middle; }
.tabela tr:last-child td { border-bottom: 0; }
.tabela tr.clicavel { cursor: pointer; }
.tabela tr.clicavel:hover td { background: var(--painel-2); }

/* -------------------------------------------------------- cartão Máquina */
.maquinas-grade { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.maquina-cartao {
  position: relative; display: grid; gap: 14px; padding: 18px; border-radius: var(--raio-g); background: var(--painel);
  border: 1px solid var(--linha); overflow: hidden; min-width: 0;
}
.maquina-cartao::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--cor, var(--acao)); opacity: 0.9; }
.maquina-cartao .cabeca { display: flex; gap: 12px; align-items: flex-start; }
.maquina-selo { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--cor) 16%, transparent); color: var(--cor); border: 1px solid color-mix(in srgb, var(--cor) 40%, transparent); }
.maquina-cartao h3 { font-size: 17px; }
.maquina-cartao .nicho { color: var(--texto-3); font-size: 12.5px; }
.maquina-numeros { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 12px 0; border-block: 1px solid var(--linha); }
.maquina-numeros div { display: grid; gap: 2px; }
.maquina-numeros strong { font-family: var(--f-mono); font-size: 18px; font-variant-numeric: tabular-nums; }
.maquina-numeros span { font-size: 11px; color: var(--texto-3); }
.maquina-pe { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.maquina-pe .proxima { font-size: 12px; color: var(--texto-3); margin-right: auto; }
.maquina-nova { display: grid; place-items: center; gap: 8px; min-height: 230px; border: 1.5px dashed var(--linha-forte); border-radius: var(--raio-g); color: var(--texto-2); cursor: pointer; background: transparent; font-weight: 600; }
.maquina-nova:hover { border-color: var(--acao); color: var(--acao); background: var(--acao-fundo); }

/* ---------------------------------------------------------- cortes (9:16) */
.cortes-grade { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); }
.corte-cartao { display: grid; gap: 10px; cursor: pointer; min-width: 0; border: 0; background: none; padding: 0; text-align: left; }
.vertical {
  position: relative; aspect-ratio: 9 / 16; border-radius: 14px; overflow: hidden; background: var(--painel-3);
  border: 1px solid var(--linha); max-width: 100%;
}
.vertical img, .vertical video { width: 100%; height: 100%; object-fit: cover; }
.vertical .sobre { position: absolute; inset: auto 0 0 0; padding: 30px 10px 10px; background: linear-gradient(transparent, rgba(0, 0, 0, 0.78)); color: #fff; display: flex; align-items: center; gap: 6px; }
.vertical .topo-sel { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; gap: 6px; justify-content: space-between; align-items: center; }
.vertical .duracao { font-family: var(--f-mono); font-size: 11px; background: rgba(0, 0, 0, 0.6); color: #fff; padding: 2px 7px; border-radius: 6px; }
.vertical .nota-selo { font-family: var(--f-mono); font-weight: 700; font-size: 12px; padding: 3px 8px; border-radius: 8px; color: #0D0F13; }
.vertical .progresso-sobre { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 10px; background: rgba(13, 15, 19, 0.6); color: #fff; font-size: 12px; text-align: center; padding: 14px; }
.corte-cartao:hover .vertical { border-color: var(--acao); box-shadow: 0 0 0 3px var(--acao-fundo); }
.corte-cartao .titulo { font-weight: 600; font-size: 13.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.corte-cartao .meta { font-size: 12px; color: var(--texto-3); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.placeholder-vertical { position: absolute; inset: 0; display: grid; place-items: center; color: var(--texto-3); background:
  repeating-linear-gradient(135deg, transparent 0 10px, color-mix(in srgb, var(--linha) 60%, transparent) 10px 11px); }

/* medidor de nota */
.medidor { display: grid; gap: 7px; }
.medidor .linha-crit { display: grid; grid-template-columns: 128px minmax(0, 1fr) 26px; gap: 10px; align-items: center; font-size: 12.5px; }
.medidor .barra { height: 8px; border-radius: 99px; background: var(--painel-3); overflow: hidden; display: grid; grid-template-columns: repeat(10, 1fr); gap: 2px; }
.medidor .barra i { display: block; background: var(--painel-3); }
.medidor .barra i.cheio { background: var(--cor-medidor, var(--acao)); }
.nota-grande { display: flex; align-items: baseline; gap: 6px; }
.nota-grande strong { font-family: var(--f-titulo); font-weight: 800; font-size: 46px; line-height: 1; font-variant-numeric: tabular-nums; }

/* -------------------------------------------------- linha do processamento */
.etapas { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.etapa { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--texto-3); }
.etapa .ponto { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--linha-forte); display: grid; place-items: center; font-size: 10px; }
.etapa.feita { color: var(--texto-2); }
.etapa.feita .ponto { background: var(--ok); border-color: var(--ok); color: #06140D; }
.etapa.atual { color: var(--texto); font-weight: 600; }
.etapa.atual .ponto { border-color: var(--acao); box-shadow: 0 0 0 3px var(--acao-fundo); }
.etapa.atual .ponto::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--acao); animation: pulsar-acao 1.2s infinite; }
.etapa + .etapa::before { content: ''; width: 18px; height: 1.5px; background: var(--linha-forte); }
@keyframes pulsar-acao { 50% { opacity: 0.3; } }
.barra-progresso { height: 6px; border-radius: 99px; background: var(--painel-3); overflow: hidden; }
.barra-progresso i { display: block; height: 100%; background: var(--acao); border-radius: 99px; transition: width 0.4s ease; }
.barra-progresso.indeterminada i { width: 35% !important; animation: vai-e-vem 1.3s ease-in-out infinite; }
@keyframes vai-e-vem { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }

/* ------------------------------------------------------------- atividade */
.atividade { display: grid; gap: 2px; max-height: 520px; overflow-y: auto; margin: 0 -8px; padding: 0 8px; }
.evento { display: grid; grid-template-columns: 54px 14px minmax(0, 1fr); gap: 8px; padding: 7px 4px; font-size: 12.5px; border-radius: 8px; align-items: start; }
.evento:hover { background: var(--painel-2); }
.evento time { font-family: var(--f-mono); font-size: 11px; color: var(--texto-3); padding-top: 1px; }
.evento .marca-ev { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; background: var(--texto-3); }
.evento.sucesso .marca-ev { background: var(--ok); }
.evento.aviso .marca-ev { background: var(--alerta); }
.evento.erro .marca-ev { background: var(--erro); }
.evento.erro { color: var(--erro); }
.evento .msg { color: var(--texto-2); overflow-wrap: anywhere; }
.evento .maq { font-weight: 600; color: var(--texto); }

/* -------------------------------------------------------------- abas */
.abas { display: flex; gap: 4px; border-bottom: 1px solid var(--linha); overflow-x: auto; }
.aba { height: 40px; padding: 0 14px; border: 0; background: none; color: var(--texto-3); font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.aba:hover { color: var(--texto); }
.aba.ativa { color: var(--texto); border-color: var(--acao); }

/* -------------------------------------------------------------- modal */
.fundo-modal { position: fixed; inset: 0; z-index: 100; background: rgba(5, 6, 9, 0.62); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 16px; animation: aparecer 0.15s ease; }
.modal { width: min(640px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--painel); border: 1px solid var(--linha); border-radius: 20px; box-shadow: var(--sombra); display: grid; }
.modal.largo { width: min(980px, 100%); }
.modal-topo { display: flex; align-items: center; gap: 10px; padding: 18px 20px; border-bottom: 1px solid var(--linha); position: sticky; top: 0; background: var(--painel); z-index: 1; }
.modal-topo h2 { margin-right: auto; font-size: 18px; }
.modal-corpo { padding: 20px; display: grid; gap: 16px; }
.modal-pe { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--linha); position: sticky; bottom: 0; background: var(--painel); }
@keyframes aparecer { from { opacity: 0; } }

/* -------------------------------------------------------------- avisos flutuantes */
.toasts { position: fixed; z-index: 200; right: 18px; bottom: 18px; display: grid; gap: 8px; width: min(380px, calc(100vw - 36px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--painel-3); border: 1px solid var(--linha-forte); box-shadow: var(--sombra); font-size: 13px; animation: subir 0.2s ease; }
.toast.erro { border-color: var(--erro); }
.toast.ok svg { color: var(--ok); }
.toast.erro svg { color: var(--erro); }
@keyframes subir { from { transform: translateY(8px); opacity: 0; } }

/* ------------------------------------------------------------ plataformas */
.rede { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 6px; color: #fff; flex: none; }
.rede.youtube { background: #FF0033; }
.rede.tiktok { background: #111; box-shadow: inset 2px 0 0 #25F4EE, inset -2px 0 0 #FE2C55; }
.rede.instagram { background: linear-gradient(45deg, #F58529, #DD2A7B 55%, #8134AF); }
.rede.kwai { background: #FF7E00; }
.rede.x { background: #000; }
.rede.facebook { background: #1877F2; }
.rede.threads { background: #000; }
.rede.twitch { background: #9146FF; }
.rede.link, .rede.arquivo, .rede.vimeo { background: var(--painel-3); color: var(--texto-2); }

/* ------------------------------------------------------------- entrada nova */
.palco-novo { display: grid; gap: 16px; padding: 26px; border-radius: 22px; border: 1px solid var(--linha); background:
  radial-gradient(120% 140% at 100% 0%, var(--acao-fundo), transparent 55%), var(--painel); }
.palco-novo .barra-link { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.redes-aceitas { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; color: var(--texto-3); font-size: 12.5px; }
.soltar { display: grid; place-items: center; gap: 8px; text-align: center; padding: 26px; border: 1.5px dashed var(--linha-forte); border-radius: 16px; color: var(--texto-2); cursor: pointer; }
.soltar.sobre { border-color: var(--acao); background: var(--acao-fundo); color: var(--texto); }
.ou { display: flex; align-items: center; gap: 12px; color: var(--texto-3); font-size: 12px; }
.ou::before, .ou::after { content: ''; height: 1px; background: var(--linha); flex: 1; }

/* ------------------------------------------------------------- agenda */
.semana { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.dia { display: grid; gap: 8px; align-content: start; min-height: 300px; padding: 10px; border-radius: 14px; background: var(--painel); border: 1px solid var(--linha); }
.dia.hoje { border-color: var(--acao); box-shadow: 0 0 0 3px var(--acao-fundo); }
.dia-topo { display: flex; align-items: baseline; gap: 6px; padding: 2px 2px 6px; }
.dia-topo strong { font-family: var(--f-titulo); font-size: 22px; font-weight: 800; }
.post { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 8px; padding: 6px; border-radius: 10px; background: var(--painel-2); border: 1px solid var(--linha); border-left: 3px solid var(--cor, var(--acao)); cursor: pointer; text-align: left; color: inherit; }
.post:hover { border-color: var(--linha-forte); }
.post .capa { width: 34px; aspect-ratio: 9/16; border-radius: 6px; overflow: hidden; background: var(--painel-3); }
.post .capa img { width: 100%; height: 100%; object-fit: cover; }
.post .hora { font-family: var(--f-mono); font-size: 11px; color: var(--texto-3); display: flex; align-items: center; gap: 5px; }
.post .t { font-size: 12px; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post.publicada { opacity: 0.66; }
.post.erro { border-color: var(--erro); }

/* ------------------------------------------------------------ revisão do corte */
.revisao { display: grid; grid-template-columns: minmax(260px, 380px) minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 900px) { .revisao { grid-template-columns: 1fr; } }
.player-coluna { position: sticky; top: 76px; display: grid; gap: 12px; }
.player-coluna .vertical { border-radius: 20px; box-shadow: var(--sombra); }
.transcricao-trecho { max-height: 220px; overflow-y: auto; padding: 12px 14px; border-radius: 12px; background: var(--painel-2); border: 1px solid var(--linha); font-size: 13px; line-height: 1.7; color: var(--texto-2); }
.transcricao-trecho .dentro { color: var(--texto); background: var(--acao-fundo); border-radius: 4px; }
.ajuste-tempo { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ajuste-tempo .valor { font-family: var(--f-mono); min-width: 74px; text-align: center; padding: 6px 8px; border-radius: 8px; background: var(--painel-3); }

/* ------------------------------------------------------------- tela de entrada */
.entrar { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(360px, 520px); }
.entrar-arte { position: relative; overflow: hidden; background: #0A0B0E; display: grid; align-content: end; padding: 48px; color: #ECEEF2; }
.entrar-arte .mosaico { position: absolute; inset: -40px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; transform: rotate(-8deg) scale(1.15); opacity: 0.9; }
.entrar-arte .coluna { display: grid; gap: 14px; animation: rolar 38s linear infinite; }
.entrar-arte .coluna:nth-child(even) { animation-direction: reverse; animation-duration: 46s; }
.entrar-arte .q { aspect-ratio: 9/16; border-radius: 14px; background: var(--c); position: relative; overflow: hidden; }
.entrar-arte .q::after { content: ''; position: absolute; left: 12%; right: 12%; bottom: 18%; height: 7%; border-radius: 4px; background: rgba(255, 255, 255, 0.85); box-shadow: 0 -14px 0 -4px rgba(255, 255, 255, 0.4); }
.entrar-arte .q::before { content: ''; position: absolute; left: 30%; right: 30%; top: 24%; aspect-ratio: 1; border-radius: 50%; background: rgba(0, 0, 0, 0.18); }
@keyframes rolar { to { transform: translateY(-50%); } }
.entrar-arte .vinheta { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 11, 14, 0.15), rgba(10, 11, 14, 0.92) 78%); }
.entrar-arte .texto-arte { position: relative; display: grid; gap: 14px; max-width: 520px; }
.entrar-arte h1 { font-size: 44px; line-height: 1.02; font-weight: 800; }
.entrar-arte p { color: #A7AEBB; font-size: 15px; }
.entrar-form { display: grid; align-content: center; padding: 48px; gap: 22px; background: var(--painel); }
.entrar-form form { display: grid; gap: 14px; }
@media (max-width: 860px) { .entrar { grid-template-columns: 1fr; } .entrar-arte { min-height: 260px; padding: 28px 20px; } .entrar-arte h1 { font-size: 30px; } .entrar-form { padding: 28px 20px; } }

/* ------------------------------------------------------------ prévia de estilo */
.previa-estilo { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 18px; align-items: start; }
.previa-estilo canvas { width: 180px; aspect-ratio: 9/16; border-radius: 14px; border: 1px solid var(--linha); background: #222; }
@media (max-width: 640px) { .previa-estilo { grid-template-columns: 1fr; } }
.cores { display: flex; gap: 8px; flex-wrap: wrap; }
.cor-opcao { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--painel); box-shadow: 0 0 0 1px var(--linha-forte); cursor: pointer; background: var(--c); }
.cor-opcao.ativa { box-shadow: 0 0 0 2px var(--texto); }

/* ------------------------------------------------------------ editor embutido */
.editor-moldura { width: 100%; height: calc(100vh - 140px); min-height: 520px; border: 1px solid var(--linha); border-radius: 16px; background: #0a0a0a; }

/* ------------------------------------------------------------ utilidades */
.linha { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.linha.entre { justify-content: space-between; }
.coluna { display: grid; gap: 10px; min-width: 0; }
.coluna.g4 { gap: 4px; }
.coluna.g16 { gap: 16px; }
.empurra { margin-left: auto; }
.lista-simples { display: grid; gap: 2px; }
.item-lista { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 10px; min-width: 0; }
.item-lista:hover { background: var(--painel-2); }
.item-lista .t { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.miniatura-h { width: 72px; aspect-ratio: 16/9; border-radius: 8px; object-fit: cover; background: var(--painel-3); flex: none; }
.miniatura-v { width: 40px; aspect-ratio: 9/16; border-radius: 6px; object-fit: cover; background: var(--painel-3); flex: none; }
.separador { height: 1px; background: var(--linha); }
.codigo { font-family: var(--f-mono); font-size: 12px; padding: 2px 6px; border-radius: 6px; background: var(--painel-3); color: var(--texto-2); overflow-wrap: anywhere; }
.sparkline { display: flex; align-items: flex-end; gap: 4px; height: 64px; }
.sparkline i { flex: 1; border-radius: 4px 4px 2px 2px; background: var(--acao); opacity: 0.85; min-height: 3px; }
.sparkline i.zero { background: var(--painel-3); opacity: 1; }
.girar { animation: girar 0.9s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------- narração com IA */
.leitura-curta { max-width: 72ch; font-size: 13.5px; }
.narr-escolha { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.narr-escolha-item { display: grid; gap: 6px; text-align: left; padding: 8px; border: 1px solid var(--linha); border-radius: var(--raio); background: var(--painel-2); color: var(--texto); cursor: pointer; font: inherit; font-size: 12.5px; }
.narr-escolha-item:hover { border-color: var(--acao); }
.narr-escolha-item img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 8px; }
.narr-previas { display: grid; gap: 8px; }
.narr-previa { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--linha); border-radius: var(--raio-p); }
.narr-previa audio { grid-column: 1 / -1; width: 100%; height: 34px; }

.narr-gancho-grade { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 980px) { .narr-gancho-grade { grid-template-columns: 1fr; } }
.narr-hook { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--linha); border-radius: var(--raio); background: var(--painel-2); }
.narr-hook textarea { font-size: 15px; font-weight: 600; }
.narr-eventos { display: grid; gap: 6px; max-height: 320px; overflow: auto; }
.narr-evento { display: grid; grid-template-columns: 52px 1fr; gap: 8px; font-size: 13px; }
.narr-cenas { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.narr-cenas figure { margin: 0; display: grid; gap: 2px; }
.narr-cenas img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; }
.narr-cenas figcaption { font-size: 10.5px; color: var(--texto-3, var(--texto-2)); }

.narr-script { display: grid; grid-template-columns: 250px minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
@media (max-width: 1240px) { .narr-script { grid-template-columns: minmax(0, 1fr) 300px; } .narr-script > aside:first-child { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } }
@media (max-width: 860px) { .narr-script { grid-template-columns: 1fr; } }
.g8 { gap: 8px; }
.g12 { gap: 12px; }
.narr-indic { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.narr-indic > div { display: grid; gap: 2px; padding: 8px 10px; border-radius: var(--raio-p); background: var(--painel-2); }
.narr-indic strong { font-family: var(--f-mono); font-size: 18px; }
.narr-indic .mais-fraco { font-size: 11px; }

.narr-seg { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 12px; padding: 12px; border: 1px solid var(--linha); border-radius: var(--raio); background: var(--painel); align-items: start; }
.narr-seg.original { background: transparent; border-style: dashed; }
.narr-seg.marcado { border-color: var(--alerta); }
.narr-seg.ocupado { opacity: 0.7; }
.narr-seg-tempo { display: grid; gap: 4px; font-size: 12px; align-content: start; }
.narr-seg-tempo input[type="checkbox"] { width: 16px; height: 16px; }
.narr-ajuste { display: flex; gap: 2px; align-items: center; color: var(--texto-2); font-size: 11px; }
.narr-ajuste button { border: 1px solid var(--linha); background: var(--painel-2); color: var(--texto-2); border-radius: 5px; font-size: 9px; padding: 2px 4px; cursor: pointer; }
.narr-ajuste button:hover { color: var(--texto); border-color: var(--acao); }
.narr-seg-corpo { display: grid; gap: 8px; min-width: 0; }
.narr-texto { font-size: 15px; line-height: 1.5; resize: vertical; min-height: 58px; }
.narr-original { font-size: 13.5px; color: var(--texto-2); font-style: italic; }
.narr-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.narr-mini { height: 28px; border-radius: 7px; border: 1px solid var(--linha); background: var(--painel-2); color: var(--texto); font: inherit; font-size: 12px; padding: 0 6px; }
.narr-flags { margin: 0; padding-left: 18px; font-size: 12px; color: var(--alerta); display: grid; gap: 2px; }
.narr-audio { width: 100%; height: 34px; }
.narr-seg-acoes { display: grid; gap: 4px; justify-items: center; }
.narr-mais { position: relative; }
.narr-mais > summary { list-style: none; display: grid; place-items: center; cursor: pointer; }
.narr-mais > summary::-webkit-details-marker { display: none; }
.narr-menu { position: absolute; right: 0; top: 34px; z-index: 5; min-width: 230px; display: grid; padding: 6px; border: 1px solid var(--linha-forte); border-radius: var(--raio); background: var(--painel); box-shadow: var(--sombra-leve); }
.narr-menu button { text-align: left; border: 0; background: transparent; color: var(--texto); font: inherit; font-size: 13px; padding: 8px 10px; border-radius: 7px; cursor: pointer; }
.narr-menu button:hover { background: var(--painel-2); }
.narr-menu button.perigo { color: var(--erro); }
.narr-adicionar { border: 1px dashed var(--linha-forte); background: transparent; color: var(--texto-2); border-radius: var(--raio); padding: 12px; font: inherit; cursor: pointer; }
.narr-adicionar:hover { color: var(--texto); border-color: var(--acao); }

.narr-video { max-width: 240px; margin: 0 auto; }
.narr-slider { display: grid; grid-template-columns: 96px minmax(0, 1fr) 40px; gap: 8px; align-items: center; font-size: 12.5px; }
.narr-slider input { width: 100%; accent-color: var(--acao); }

.narr-tempo { display: grid; gap: 6px; }
.narr-faixa { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 8px; align-items: center; font: 600 10.5px var(--f-mono); text-transform: uppercase; color: var(--texto-2); }
.narr-trilho { position: relative; height: 20px; border-radius: 6px; background: var(--painel-2); overflow: hidden; }
.narr-trilho b { position: absolute; top: 3px; bottom: 3px; border-radius: 4px; background: var(--acao); }
.narr-trilho b.marcado { background: var(--alerta); }
.narr-trilho b.manual { background: var(--ok); }
.narr-trilho b.original { background: var(--texto-2); opacity: 0.6; }
.narr-trilho i { position: absolute; top: 12px; bottom: 3px; background: var(--erro-fundo); border-radius: 3px; }
.narr-regua { display: flex; justify-content: space-between; font-size: 10.5px; text-transform: none; }
.narr-script .cartao { align-content: start; }
.narr-script > aside { align-items: start; align-content: start; }

.marca-img { width: 34px; height: 34px; object-fit: contain; flex: none; }
.entrar-logo { width: 150px; height: auto; margin-bottom: 18px; }


/* ---- Campos: todo input, select e textarea de formulário segue o mesmo visual (.entrada) ---- */
:is(.campo, .hist-bloco, .hist-corpo, .modal) :is(input:not([type=checkbox], [type=radio], [type=file], [type=range]), select, textarea) {
  font: inherit; font-size: 14px; color: var(--texto); background-color: var(--painel-2);
  border: 1px solid var(--linha-forte); border-radius: 10px; outline: none; box-sizing: border-box;
  height: 40px; padding: 0 12px; width: 100%; transition: border-color 0.12s, box-shadow 0.12s;
}
:is(.campo, .hist-bloco, .hist-corpo, .modal) textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.45; }
:is(.campo, .hist-bloco, .hist-corpo, .modal) :is(input, select, textarea)::placeholder { color: var(--texto-3); }
:is(.campo, .hist-bloco, .hist-corpo, .modal) :is(input, select, textarea):hover:not(:disabled) { border-color: var(--texto-3); }
:is(.campo, .hist-bloco, .hist-corpo, .modal) :is(input, select, textarea):focus { border-color: var(--acao); box-shadow: 0 0 0 3px var(--acao-fundo); }
:is(.campo, .hist-bloco, .hist-corpo, .modal) :is(input, select, textarea):disabled { opacity: 0.6; cursor: not-allowed; }
/* Menu suspenso: seta própria no lugar da nativa */
select, select.entrada, :is(.campo, .hist-bloco, .hist-corpo, .modal) select {
  -webkit-appearance: none; appearance: none; cursor: pointer; padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238a93a6' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
:is(.hist-corpo) select { height: 34px; font-size: 13px; width: auto; min-width: 150px; }
.modal .campo select { min-width: 200px; }
.hist-corpo textarea { min-height: 64px; }
.hist-corpo .hist-prompt { min-height: 56px; }

/* ---- Histórias com IA ---- */
.hist-bloco { margin-bottom: 16px; }
.hist-bloco h3 { margin: 0 0 12px; }
.hist-cenas { display: grid; gap: 14px; }
.hist-cena { display: grid; grid-template-columns: 150px 1fr; gap: 14px; padding: 12px; border: 1px solid var(--linha); border-radius: var(--raio); background: var(--painel-2); }
.hist-previa { aspect-ratio: 9 / 16; background: var(--painel); border-radius: 8px; overflow: hidden; display: grid; place-items: center; text-align: center; padding: 6px; font-size: 12px; align-self: start; }
.hist-previa.larga { aspect-ratio: 16 / 9; }
.hist-previa img, .hist-previa video { width: 100%; height: 100%; object-fit: cover; display: block; }
.hist-cena:has(.hist-previa.larga) { grid-template-columns: 240px 1fr; }
.hist-corpo { display: grid; gap: 8px; min-width: 0; align-content: start; }
.hist-corpo textarea { width: 100%; resize: vertical; }
.hist-prompt { font-size: 12.5px; opacity: .85; }
.hist-numeros { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 14px; }
.hist-numeros > div { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--linha); border-radius: var(--raio); background: var(--painel-2); }
.hist-final { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 20px; margin-bottom: 18px; align-items: start; }
.hist-video { aspect-ratio: 9 / 16; background: #000; border-radius: var(--raio); overflow: hidden; }
.hist-video.larga { aspect-ratio: 16 / 9; }
.hist-final:has(.hist-video.larga) { grid-template-columns: minmax(300px, 560px) 1fr; }
.hist-video video { width: 100%; height: 100%; object-fit: contain; display: block; }
@media (max-width: 720px) { .hist-cena, .hist-cena:has(.hist-previa.larga), .hist-final, .hist-final:has(.hist-video.larga) { grid-template-columns: 1fr; } .hist-previa { max-width: 200px; } }

.narr-fala-previa { font-size: 12.5px; line-height: 1.4; color: var(--texto); background: var(--superficie-2, rgba(127,127,127,.12)); border-radius: 8px; padding: 6px 8px; margin: 0; }

.hist-secao { margin: 16px 0 2px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--acao); }
.hist-letra { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin: 6px 0; }
.hist-secao-letra { font-size: 13.5px; line-height: 1.5; padding: 8px 10px; border: 1px solid var(--borda, rgba(127,127,127,.25)); border-radius: 10px; }
.hist-secao-letra > span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.hist-musica { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 10px; }
.hist-musica audio { height: 36px; max-width: 100%; }

.hist-avisos { background: var(--alerta-fundo); color: var(--alerta); border-radius: 12px; padding: 10px 14px; margin: 0 0 12px; }
.hist-avisos-topo { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.hist-avisos ul { margin: 6px 0 0; padding-left: 18px; font-size: 13.5px; line-height: 1.45; }
.hist-avisos li { margin: 3px 0; }
.hist-avisos-mais { background: none; border: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; font-size: 13px; padding: 0; }

.hist-secao-letra { display: block; }
.hist-secao-letra textarea { width: 100%; box-sizing: border-box; resize: vertical; line-height: 1.5; font-size: 13.5px; margin-top: 2px; }

.hist-versoes { margin-top: 12px; border: 1px solid var(--linha); border-radius: 12px; padding: 8px 12px; }
.hist-versoes summary { cursor: pointer; font-weight: 600; font-size: 13.5px; }
.hist-versao { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 8px 0; border-top: 1px solid var(--linha); font-size: 13.5px; }
.hist-versao:first-of-type { border-top: 0; }
.hist-versao audio { height: 34px; max-width: 100%; }

/* ---------------------------------------------------------------- LoL Gameplay Editor */
.lol-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.lol-preset { text-align: left; display: grid; gap: 4px; padding: 12px 14px; border-radius: var(--raio); border: 1px solid var(--linha); background: var(--painel); color: var(--texto); cursor: pointer; font: inherit; }
.lol-preset span { font-size: 12.5px; color: var(--texto-2, var(--texto)); opacity: 0.72; line-height: 1.4; }
.lol-preset:hover { border-color: var(--linha-forte); }
.lol-preset.ativo { border-color: var(--acao); background: var(--acao-fundo); box-shadow: 0 0 0 1px var(--acao) inset; }
.lol-video { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--linha); border-radius: var(--raio); flex-wrap: wrap; }
.lol-plays { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.lol-play { border: 1px solid var(--linha); border-radius: var(--raio); overflow: hidden; background: var(--painel); min-width: 0; }
.lol-play.fora { opacity: 0.55; }
.lol-play-img { position: relative; aspect-ratio: 16 / 9; background: #000; }
.lol-play-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lol-nota { position: absolute; top: 8px; left: 8px; min-width: 30px; text-align: center; padding: 2px 7px; border-radius: 999px; font: 700 13px var(--f-mono); color: #0D0F13; }
.lol-no-video { position: absolute; bottom: 8px; left: 8px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--vidro); color: var(--texto); backdrop-filter: blur(6px); }
.lol-linha { position: relative; height: 30px; border-radius: var(--raio-p); background: var(--linha); overflow: hidden; }
.lol-seg { position: absolute; top: 0; bottom: 0; border-right: 2px solid var(--painel); display: flex; align-items: center; justify-content: center; gap: 2px; font-size: 11px; color: #0D0F13; opacity: 0.9; }
.lol-seg i { font-style: normal; }
.lol-bolinha { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.lol-hab { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lol-hab > input, .lol-hab > select { flex: 1 1 140px; width: auto; min-width: 0; }
.lol-hab > select { flex: 0 1 170px; }
.lol-tecla { width: 30px; height: 30px; display: grid; place-items: center; border-radius: var(--raio-p); background: var(--acao-fundo); color: var(--acao); font: 700 14px var(--f-mono); flex: none; }
.lol-momento { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--linha); border-radius: var(--raio); }
.botao.desligado { opacity: 0.6; pointer-events: none; }
@media (max-width: 640px) { .lol-plays { grid-template-columns: 1fr; } }
