/* Base neutra. Verde restrito a acoes e estados importantes. */
:root {
  --fundo: #0d0e10;
  --painel: #17191d;
  --painel-2: #202328;
  --borda: #30343b;
  --caixa: #191c21;
  --caixa-borda: #373c44;
  --texto: #f3f4f6;
  --suave: #a9afb8;
  --apagado: #929aa6;
  --lima: #d2ff00;
  --lima-forte: #deff47;
  --lima-fundo: rgba(210,255,0,.055);
  color-scheme: dark;
}
body::before { display: none; }
header {
  width: 100%; max-width: 1240px; display: grid;
  grid-template-columns: auto 1fr auto; gap: 32px;
  align-items: center; padding: 22px 32px;
  border-bottom: 1px solid #292d33;
}
header .logo-imagem { width: 224px; }
.abas { justify-self: center; gap: 8px; padding: 0; border: 0; border-radius: 0; background: none; }
.aba { width: auto; min-width: 80px; padding: 13px 16px; border-radius: 7px; font-size: 14px; letter-spacing: 0; font-weight: 500; color: #a9afb8; }
.aba:hover { color: #f3f4f6; background: #1c1f24; }
.aba.sel { color: #f3f4f6; background: #25292f; box-shadow: inset 0 -2px 0 var(--lima); }
.conta-area { gap: 14px; justify-self: end; min-width: 0; }
.cota { border-radius: 8px; padding: 10px 12px; gap: 8px; }
.cota b { color: #e4e7eb; font-size: 13px; font-weight: 600; white-space: nowrap; }
.cota:hover { border-color: #69717d; }
.cota-ponto { width: 5px; height: 5px; background: #c3c9d2; box-shadow: none; }
.cota-teste b { color: #c4b5fd; }
.cota-teste .cota-ponto { background: #b5a0eb; box-shadow: none; }
.avatar { padding: 2px; }
.avatar span, .avatar.teste span { background: #272b32; color: #eef0f3; font-weight: 600; }
.avatar:hover span, .avatar.teste:hover span { background: #363c46; }
.menu-linha b { color: #e4e7eb; }
.menu-linha.menu-teste b { color: #c4b5fd; }
.btn-gerar { box-shadow: none; }
.campo-composer:focus-within { border-color: #87919f; box-shadow: 0 0 0 2px rgba(176,186,201,.08); }
.campo-composer textarea::placeholder { color: #929aa6; }
.campo-composer textarea { line-height: 1.65; }
.seta, .seta:hover { background: #202328; }
.estetica:hover, .formato:hover, .btn:hover { border-color: #666e7a; }
.est-pergunta label { color: #d7dce3; }
.picker-caixa { background: #17191d; }
#loja, #termos { background: rgba(7,8,10,.94); }
.picker-frames { background: rgba(7,8,10,.82); }

/* Criar: uma ideia, quatro etapas, uma acao principal. */
#telaCriar { max-width: 1040px; padding: 46px 32px 64px; }
#telaCriar > h1 { font-family: 'Bricolage Grotesque', 'Inter', sans-serif; font-size: 36px; font-weight: 700; line-height: 1.2; letter-spacing: -.5px; text-align: left; margin: 0; }
#telaCriar > .sub { text-align: left; max-width: 650px; margin: 14px 0 32px; font-size: 15px; line-height: 1.6; }
#telaCriar h2 { font-size: 15px; text-transform: none; letter-spacing: 0; color: #d7dce3; margin-bottom: 16px; }
#telaCriar .passos-nav { gap: 8px; margin: 0 0 32px; padding: 0 0 16px; border-bottom: 1px solid #2a2e35; }
#telaCriar .passo-aba { border: 1px solid transparent; border-radius: 8px; margin: 0; background: none; color: #a0a8b4; letter-spacing: 0; text-transform: none; font-size: 13px; font-weight: 500; padding: 12px 10px; }
#telaCriar .passo-aba:hover { border-color: #424955; background: #171a1f; }
#telaCriar .passo-aba.atual { background: #22262d; border-color: #424955; color: #f3f4f6; }
#telaCriar .passo-aba .passo-num { background: #303640; color: #c2c9d4; font-weight: 500; border-radius: 6px; width: 24px; height: 24px; margin-right: 6px; }
#telaCriar .passo-aba.atual .passo-num { background: #e0e5ed; color: #181b20; }
.bonus-tag, #telaCriar .bonus-tag {
  display: inline-flex; align-items: center; justify-content: center;
  position: absolute; top: 3px; right: 6px; flex-shrink: 0; margin: 0;
  padding: 0; border: 0; border-radius: 0;
  background: none; color: #c4a5ff; opacity: .5; pointer-events: none;
  font-size: 8px; font-weight: 400; line-height: 1.1; letter-spacing: .1px;
  text-transform: none;
}
.bloco-musica > .bonus-tag { position: absolute; top: 6px; right: 8px; }
.passo-aba.aba-bonus, #telaCriar .passo-aba.aba-bonus { position: relative; }
.passo-aba.aba-bonus:hover, .passo-aba.aba-bonus:focus-visible,
#telaCriar .passo-aba.aba-bonus:hover, #telaCriar .passo-aba.aba-bonus:focus-visible,
.bloco-musica:hover, .bloco-musica:focus-within { background: #30213f; border-color: #8558b4; }
.bloco-musica { transition: background .15s, border-color .15s; }
#telaCriar .campo-composer { border-radius: 12px; }
#telaCriar .campo-composer textarea { min-height: 170px; padding: 20px; }
#telaCriar .composer-esq { padding-top: 20px; }
#telaCriar .composer-esq .dropzone { border-radius: 8px; }
#telaCriar #btnIdeiaSeguir { min-width: 124px; padding: 14px 18px; border-radius: 8px; gap: 6px; }
#telaCriar #btnIdeiaSeguir .seta-btn { font-size: 14px; line-height: 1.3; font-weight: 600; margin: 0; }
#telaCriar #btnIdeiaSeguir .custo-linha { font-size: 11px; font-weight: 500; }
#telaCriar .estetica { border-radius: 10px; border-width: 1px; }
#telaCriar .estetica.sel { box-shadow: 0 0 0 1px var(--lima); }
#telaCriar .estetica .nome { font-size: 13px; letter-spacing: .25px; }
#telaCriar .estetica .desc { font-size: 12px; line-height: 1.55; }
#telaCriar .formato { border-radius: 10px; }
#telaCriar .formato.sel { box-shadow: none; }
#telaCriar .btn-continuar { border-radius: 8px; }
#telaCriar .est-pergunta { border-radius: 10px; }
@media (max-width: 1080px) {
  header { grid-template-columns: 1fr auto; gap: 18px; padding: 20px 24px 14px; }
  .abas { grid-column: 1 / -1; grid-row: 2; justify-self: start; width: auto; }
  .conta-area { grid-column: 2; grid-row: 1; }
}
@media (max-width: 700px) {
  header { gap: 16px 12px; padding: 18px 16px 10px; }
  header .logo-imagem { width: 165px; }
  .conta-area { gap: 8px; }
  .cota { padding: 8px; gap: 4px; }
  .cota b { font-size: 11px; }
  .cota-ponto { display: none; }
  .abas { width: 100%; gap: 4px; }
  .aba { min-width: 0; flex: 1; padding: 12px 8px; font-size: 13px; }
  #telaCriar { padding: 30px 18px 50px; }
  #telaCriar > h1 { font-size: 29px; letter-spacing: -.8px; }
  #telaCriar > .sub { margin-bottom: 24px; font-size: 14px; }
  #telaCriar .passos-nav { gap: 3px; margin-bottom: 26px; padding-bottom: 12px; }
  #telaCriar .passo-aba { flex-direction: column; gap: 7px; padding: 10px 2px; font-size: 11px; }
  #telaCriar .passo-aba .passo-num { margin: 0; }
  .bonus-tag, #telaCriar .bonus-tag { display: inline-flex; margin: 0; padding: 0; font-size: 8px; }
  #telaAnimar .passo-aba.aba-bonus { flex-wrap: wrap; }
  #telaCriar .campo-composer textarea { min-height: 155px; padding: 16px 12px; }
  #telaCriar #btnIdeiaSeguir { margin: 0 12px 12px; flex-direction: row-reverse; gap: 12px; }
}
@media (max-width: 390px) {
  header .logo-imagem { width: 136px; }
  .conta-area { gap: 6px; }
  .avatar { width: 32px; height: 32px; }
  header { padding-left: 12px; padding-right: 12px; }
}

/* Ritmo consistente entre as quatro areas de trabalho. */
#telaCriar, #telaAnimar, #telaEditor, #telaGaleria {
  max-width: 1240px; padding: 40px 32px 64px;
}
#telaCriar > h1, #telaAnimar > h1, #telaEditor > h1, #telaGaleria > h1 {
  font-family: 'Bricolage Grotesque', 'Inter', sans-serif;
  font-size: 36px; font-weight: 700; line-height: 1.2; letter-spacing: -.5px;
  text-align: left; margin: 0;
}
#telaCriar > .sub, #telaAnimar > .sub, #telaEditor > .sub, #telaGaleria > .sub {
  text-align: left; max-width: 720px; margin: 12px 0 30px;
  font-size: 15px; line-height: 1.6;
}
#telaAnimar h2, #telaEditor h2 {
  font-size: 15px; font-weight: 600; text-transform: none;
  letter-spacing: 0; color: #d7dce3; margin: 0 0 14px;
}
#telaAnimar .passos-nav { gap: 8px; margin-bottom: 30px; padding-bottom: 16px; border-bottom: 1px solid #2a2e35; }
#telaAnimar .passo-aba {
  border: 1px solid transparent; border-radius: 8px; margin: 0;
  background: none; color: #a0a8b4; letter-spacing: 0; text-transform: none;
  font-size: 13px; font-weight: 500; padding: 12px 10px; min-height: 50px;
}
#telaAnimar .passo-aba:hover { background: #171a1f; border-color: #424955; }
#telaAnimar .passo-aba.atual { background: #22262d; border-color: #424955; color: #f3f4f6; }
#telaAnimar .passo-num { background: #303640; color: #c2c9d4; border-radius: 6px; width: 24px; height: 24px; font-weight: 500; }
#telaAnimar .passo-aba.atual .passo-num { background: #e0e5ed; color: #181b20; }
#telaAnimar .passo-aba.aba-bonus:hover, #telaAnimar .passo-aba.aba-bonus:focus-visible { background: #30213f; border-color: #8558b4; }

/* Editor: biblioteca compacta, previa estavel e montagem sempre abaixo. */
#telaEditor .editor-topo, #telaEditor .editor-topo.exp-169, #telaEditor .editor-topo.exp-11 {
  grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: stretch; margin-bottom: 28px;
}
#telaEditor .painel-clipes { min-width: 0; height: 342px; max-height: 342px; padding: 20px; border-radius: 12px; }
#telaEditor .painel-clipes.minimizada { height: auto; }
#telaEditor .gal-cab { gap: 12px; align-items: flex-start; margin-bottom: 18px; }
#telaEditor .gal-cab h2 { margin: 0; }
.editor-ajuda { font-size: 13px; line-height: 1.5; color: var(--suave); margin: 6px 0 0; }
#telaEditor .clipes-grid { grid-template-columns: repeat(auto-fill, minmax(105px, 1fr)); gap: 10px; }
#telaEditor .clipe { border-radius: 8px; }
#telaEditor .clipe:hover { transform: none; border-color: #87919f; box-shadow: none; }
#telaEditor .clipe .mais { background: #e4e7eb; color: #17191d; width: 24px; height: 24px; line-height: 24px; font-weight: 500; }
#btnMinGal { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 7px; }
#telaEditor .sec-preview { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; order: 0; padding: 18px; border: 1px solid var(--borda); border-radius: 12px; background: #111316; min-width: 0; height: 342px; }
#telaEditor .sec-preview > h2 { align-self: flex-start; margin-bottom: 12px; }
#telaEditor .preview-caixa { flex: none; border-radius: 6px; box-shadow: none; margin: auto; }
#telaEditor .preview-caixa.fmt-916 { width: 147px; max-width: 100%; }
#telaEditor .preview-caixa.fmt-11 { width: 262px; max-width: 100%; }
#telaEditor .preview-caixa.fmt-169 { width: 302px; max-width: 100%; }
.preview-vazio { position: absolute; inset: 36px 10px 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; pointer-events: none; color: #b8bfca; font-size: 12px; line-height: 1.5; }
.preview-vazio small { font-size: 11px; color: #858e9c; }
#telaEditor:has(#tlTrack .bloco-clipe) .preview-vazio { display: none; }
#telaEditor:not(:has(#tlTrack .bloco-clipe)) .preview-video,
#telaEditor:not(:has(#tlTrack .bloco-clipe)) .preview-img { visibility: hidden; }
#fmtBtn { padding: 6px 10px; font-size: 12px; font-weight: 500; }
#fmtMenu { min-width: 100px; }
.editor-montagem-cab { margin-bottom: 14px; }
#telaEditor .editor-montagem-cab h2 { margin: 0; }
#telaEditor .tl-painel { border-radius: 12px; padding: 16px; margin-bottom: 24px; max-width: 100%; }
#telaEditor .tl-toolbar { padding: 0 0 12px; }
#telaEditor .tl-toolbar .btn-play { background: #e4e7eb; color: #17191d; }
#telaEditor .lane-tag { font-size: 10px; letter-spacing: .2px; font-weight: 500; }
#telaEditor .tl-vazio { font-size: 12px; padding: 35px 14px 12px; }
#telaEditor .bloco-musica { border-color: #3c3449; border-radius: 12px; padding: 20px; margin-bottom: 20px; }
#telaEditor .bloco-musica:hover, #telaEditor .bloco-musica:focus-within { background: #30213f; border-color: #8558b4; }
#telaEditor .bloco-musica .rotulo { display: block; color: #d7dce3; font-size: 15px; letter-spacing: 0; font-weight: 600; }
.editor-opcional { font-size: 12px; font-weight: 400; color: var(--suave); margin-left: 8px; }
#telaEditor select { border-radius: 8px; min-height: 44px; font-size: 14px; text-overflow: ellipsis; }
#btnExportar { display: block; width: auto; margin: 0 0 0 auto; border-radius: 8px; padding: 15px 26px; font-size: 14px; }
#telaGaleria .gal-aviso { padding: 12px 16px; background: #17191d; border: 1px solid #30343b; border-radius: 8px; line-height: 1.6; margin-bottom: 22px; }
button:focus-visible, select:focus-visible { outline: 2px solid #b9c2cf; outline-offset: 3px; }
@media (max-width: 900px) {
  #telaEditor .editor-topo, #telaEditor .editor-topo.exp-169, #telaEditor .editor-topo.exp-11 { grid-template-columns: minmax(0, 1fr) 280px; gap: 14px; }
}
@media (max-width: 700px) {
  #telaCriar, #telaAnimar, #telaEditor, #telaGaleria { padding: 28px 18px 48px; }
  #telaCriar > h1, #telaAnimar > h1, #telaEditor > h1, #telaGaleria > h1 { font-size: 29px; letter-spacing: -.8px; }
  #telaCriar > .sub, #telaAnimar > .sub, #telaEditor > .sub, #telaGaleria > .sub { margin: 10px 0 24px; font-size: 14px; }
  #telaAnimar .passo-aba { flex-direction: column; gap: 7px; font-size: 11px; padding: 12px 8px; }
  #telaAnimar .passo-num { margin: 0; }
  #telaEditor .editor-topo, #telaEditor .editor-topo.exp-169, #telaEditor .editor-topo.exp-11 { grid-template-columns: minmax(0, 1fr); }
  #telaEditor .painel-clipes { height: 250px; max-height: 250px; padding: 16px; }
  #telaEditor .clipes-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  #telaEditor .sec-preview { height: 290px; padding: 14px; }
  #telaEditor .preview-caixa.fmt-916 { width: 118px; }
  #telaEditor .preview-caixa.fmt-11 { width: 210px; }
  #telaEditor .tl-painel { padding: 10px; }
  #telaEditor .tl-toolbar { gap: 8px; }
  #telaEditor .tempo { font-size: 11px; letter-spacing: 0; }
  #telaEditor .tl-toolbar-dir { font-size: 11px; }
  #telaEditor .bloco-musica { padding: 16px; }
  #btnExportar { width: 100%; }
}

/* Evita deslocamento horizontal ao trocar de aba. */
html { scrollbar-gutter: stable; }

/* Titulos centralizados e fonte original preservada. */
#telaCriar > h1, #telaAnimar > h1, #telaEditor > h1, #telaGaleria > h1 {
  text-align: center; font-family: 'Bricolage Grotesque', 'Inter', sans-serif;
}
#telaCriar > .sub, #telaAnimar > .sub, #telaEditor > .sub, #telaGaleria > .sub {
  text-align: center; margin-left: auto; margin-right: auto;
}
/* A previa e a area principal; a biblioteca fica na lateral. */
#telaEditor .editor-topo, #telaEditor .editor-topo.exp-169, #telaEditor .editor-topo.exp-11 {
  grid-template-columns: 320px minmax(0, 1fr);
}
#telaEditor .painel-clipes { height: 640px; max-height: 640px; padding: 16px; }
#telaEditor .painel-clipes.minimizada { height: auto; }
#telaEditor .clipes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#telaEditor .sec-preview { height: 640px; padding: 20px; }
#telaEditor .preview-caixa.fmt-916 { width: 315px; }
#telaEditor .preview-caixa.fmt-11 { width: 560px; }
#telaEditor .preview-caixa.fmt-169 { width: 100%; max-width: 960px; }
.preview-vazio { font-size: 15px; }
.preview-vazio small { font-size: 13px; }
.preview-ampliar { position: absolute; right: 18px; top: 14px; border: 1px solid #3c414a; background: #202328; color: #dce1e9; border-radius: 7px; padding: 8px 12px; font: 12px 'Inter', sans-serif; cursor: pointer; }
.preview-ampliar:hover { background: #303640; }
#telaEditor .sec-preview:is(:fullscreen, .preview-expandida) { height: 100dvh; width: 100%; border: 0; border-radius: 0; padding: 24px; background: #090a0c; }
#telaEditor .sec-preview:is(:fullscreen, .preview-expandida) .preview-caixa.fmt-916 { width: min(calc((100dvh - 100px) * .5625), calc(100vw - 48px)); }
#telaEditor .sec-preview:is(:fullscreen, .preview-expandida) .preview-caixa.fmt-11 { width: min(calc(100dvh - 100px), calc(100vw - 48px)); }
#telaEditor .sec-preview:is(:fullscreen, .preview-expandida) .preview-caixa.fmt-169 { width: min(calc((100dvh - 100px) * 1.7777), calc(100vw - 48px)); max-width: none; }

/* Biblioteca de trilhas: busca, audicao e escolha independentes. */
#telaEditor .musica-nativo { display: none; }
#telaEditor .bloco-musica { background: #17191d; border-color: #38333f; }
#telaEditor .bloco-musica:hover, #telaEditor .bloco-musica:focus-within { background: #17191d; border-color: #554562; }
.musica-picker { border: 1px solid #383d46; border-radius: 9px; background: #111316; }
.musica-picker summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 18px; cursor: pointer; list-style: none; }
.musica-picker summary::-webkit-details-marker { display: none; }
.musica-picker summary:hover { background: #221c2c; border-radius: 9px; }
.musica-selecionada { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.musica-nome-atual { font-size: 15px; line-height: 1.5; color: #f0f2f5; overflow-wrap: anywhere; }
.musica-grupo-atual { color: #9ca5b3; font-size: 12px; }
.musica-trocar { color: #c4a5ff; font-size: 13px; white-space: nowrap; }
.musica-trocar > span { margin-left: 8px; }
.musica-biblioteca { padding: 18px; border-top: 1px solid #30343b; }
.musica-biblioteca > label { display: block; font-size: 13px; color: #d0d6df; margin-bottom: 10px; }
#buscaTrilha { display: block; width: 100%; min-height: 44px; padding: 12px 14px; color: #f3f4f6; background: #1b1e23; border: 1px solid #414854; border-radius: 7px; font: 14px 'Inter', sans-serif; }
#buscaTrilha:focus { outline: 2px solid #a38bbf; outline-offset: 2px; }
.musica-orientacao { color: #9ca5b3; font-size: 12px; margin: 12px 0; }
.musica-lista { max-height: 340px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #454b56 transparent; overscroll-behavior: contain; }
.musica-item { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 7px; border: 1px solid transparent; }
.musica-item + .musica-item { margin-top: 4px; }
.musica-item:hover { background: #211b2b; }
.musica-item.selecionada { background: #251e31; border-color: #514161; }
.musica-ouvir, .musica-sem { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #424753; background: #24282f; color: #e9e7ef; font-size: 13px; }
.musica-ouvir { cursor: pointer; }
.musica-ouvir:hover, .musica-ouvir.tocando { background: #493460; border-color: #9f7ccb; }
.musica-escolher { display: flex; flex: 1; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0; padding: 7px 6px; text-align: left; background: none; border: 0; color: #e3e6ec; font-family: 'Inter', sans-serif; cursor: pointer; }
.musica-escolher > span { font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.musica-escolher > small { font-size: 12px; color: #9ca5b3; }
.musica-item.selecionada .musica-escolher > span::after { content: ' ✓'; color: #c4a5ff; }
.musica-status { font-size: 12px; color: #b6a5cb; margin: 12px 0 0; }
.musica-status:empty { display: none; }
.musica-picker summary:focus-visible { outline: 2px solid #a38bbf; outline-offset: 3px; border-radius: 8px; }
@media (min-width: 701px) and (max-width: 1000px) {
  #telaEditor .editor-topo, #telaEditor .editor-topo.exp-169, #telaEditor .editor-topo.exp-11 { grid-template-columns: 240px minmax(0, 1fr); }
  #telaEditor .sec-preview, #telaEditor .painel-clipes { height: 560px; max-height: 560px; }
  #telaEditor .preview-caixa.fmt-916 { width: 268px; }
  #telaEditor .preview-caixa.fmt-11 { width: 476px; }
}
@media (max-width: 700px) {
  #telaEditor .editor-topo, #telaEditor .editor-topo.exp-169, #telaEditor .editor-topo.exp-11 { grid-template-columns: minmax(0, 1fr); }
  #telaEditor .painel-clipes { height: 250px; max-height: 250px; }
  #telaEditor .clipes-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #telaEditor .sec-preview { height: auto; min-height: 300px; padding: 18px 12px; gap: 18px; }
  #telaEditor .sec-preview > h2 { margin: 0; }
  #telaEditor .preview-caixa.fmt-916 { width: min(100%, 300px); }
  #telaEditor .preview-caixa.fmt-11, #telaEditor .preview-caixa.fmt-169 { width: 100%; }
  #telaEditor .sec-preview:is(:fullscreen, .preview-expandida) { height: 100dvh; }
  .preview-ampliar { top: 10px; right: 10px; }
  .musica-picker summary { padding: 14px 12px; gap: 10px; }
  .musica-nome-atual { font-size: 14px; }
  .musica-trocar { font-size: 12px; }
  .musica-biblioteca { padding: 14px 10px; }
  .musica-item { gap: 6px; padding: 6px 2px; }
  .musica-escolher > span { font-size: 13px; }
}

#telaEditor .sec-preview.preview-expandida { position: fixed; inset: 0; z-index: 10000; max-height: none; }

/* Mesa de edicao: biblioteca com abas, monitor e faixas de montagem. */
.editor-biblioteca { min-width: 0; height: 640px; display: flex; flex-direction: column; border: 1px solid #30343b; border-radius: 12px; background: #14161a; overflow: hidden; }
.biblioteca-abas { display: flex; flex: none; gap: 6px; padding: 10px; border-bottom: 1px solid #30343b; }
.biblioteca-abas > button { position: relative; flex: 1; padding: 12px 8px; color: #aab2bf; background: none; border: 1px solid transparent; border-radius: 7px; font: 13px 'Inter', sans-serif; cursor: pointer; }
.biblioteca-abas > button[aria-selected="true"] { color: #f0f2f6; background: #262b33; border-color: #414855; }
#tabTrilhas:hover { background: #30213f; border-color: #69478b; }
#telaEditor .editor-biblioteca .painel-clipes { height: auto; max-height: none; flex: 1; border: none; border-radius: 0; background: none; overflow-y: auto; padding: 14px; }
#telaEditor .editor-biblioteca .painel-clipes[hidden] { display: none; }
#telaEditor .editor-biblioteca .gal-cab h2, #telaEditor .editor-biblioteca #btnMinGal { display: none; }
#telaEditor .editor-biblioteca .gal-cab { margin-bottom: 14px; }
#telaEditor .editor-biblioteca .editor-ajuda { margin: 0; font-size: 12px; }
.biblioteca-musicas { min-height: 0; flex: 1; overflow-y: auto; scrollbar-width: thin; }
.biblioteca-musicas .musica-picker { border: none; border-radius: 0; background: none; }
.biblioteca-musicas .musica-picker > summary { display: none; }
.biblioteca-musicas .musica-biblioteca { border: none; padding: 14px 10px; }
.biblioteca-musicas .musica-biblioteca > label { display: none; }
.biblioteca-musicas #buscaTrilha { font-size: 12px; padding: 10px; }
.biblioteca-musicas .musica-lista { max-height: none; overflow: visible; }
.biblioteca-musicas .musica-item { padding: 8px 2px; gap: 6px; cursor: grab; }
.biblioteca-musicas .musica-escolher { cursor: grab; }
.biblioteca-musicas .musica-escolher > span { font-size: 12px; font-weight: 500; }
.biblioteca-musicas .musica-escolher > small { font-size: 10px; line-height: 1.5; }
.biblioteca-musicas .musica-ouvir, .biblioteca-musicas .musica-sem { flex-basis: 32px; width: 32px; height: 32px; font-size: 11px; }
#telaEditor .editor-montagem-cab { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
#telaEditor .editor-montagem-cab .editor-ajuda { margin: 0; font-size: 12px; }
#telaEditor .bloco-musica { display: none; padding: 14px 18px; }
#telaEditor .bloco-musica.tem-trilha { display: block; }
#telaEditor .bloco-musica > .bonus-tag, #telaEditor .bloco-musica > label { display: none; }
.trilha-atual { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 13px; color: #c5cbd4; }
#nomeTrilhaAtual { min-width: 0; overflow-wrap: anywhere; }
#removerTrilha { flex: none; border: 1px solid #424550; background: none; color: #b7bfcd; font: 12px 'Inter', sans-serif; border-radius: 6px; padding: 8px 10px; cursor: pointer; }
#removerTrilha:hover { color: #fff; border-color: #8a637c; }
.drop-ativo { outline: 2px solid #c4a5ff; outline-offset: -2px; background-color: #30233f !important; }
#telaEditor.arrastando-clipe .tl-track, #telaEditor.arrastando-clipe .tl-track2 { border: 1px dashed #a7adba; }
#telaEditor.arrastando-musica #tlMusicaRow { outline: 1px dashed #b897db; }
#telaEditor #tlMusicaRow { min-height: 46px; }
#telaEditor .faixa-musica { background-color: #31243e; border-color: #644a7e; }
#telaEditor .faixa-musica.sem { background: none; }
#telaEditor .faixa-musica.sem::after { content: ' · Arraste uma música para cá'; color: #929aa6; }
@media (min-width: 701px) and (max-width: 1000px) { .editor-biblioteca { height: 560px; } }
@media (max-width: 700px) {
  .editor-biblioteca { height: 320px; }
  #telaEditor .editor-montagem-cab { flex-direction: column; gap: 6px; }
  .biblioteca-musicas .musica-escolher > span { font-size: 13px; }
  .biblioteca-musicas .musica-escolher > small { font-size: 11px; }
  .trilha-atual { flex-wrap: wrap; gap: 8px; }
}

/* Um unico ambiente de edicao, com divisoes internas discretas. */
.editor-workspace { border: 1px solid #343942; border-radius: 14px; background: #14161a; overflow: hidden; }
#telaEditor .editor-workspace .editor-topo { gap: 0; margin: 0; }
#telaEditor .editor-workspace .editor-biblioteca { border: 0; border-right: 1px solid #30343b; border-radius: 0; }
#telaEditor .editor-workspace .sec-preview { border: 0; border-radius: 0; background: #0e1013; }
#telaEditor .editor-workspace .editor-montagem-cab { border-top: 1px solid #30343b; padding: 18px 20px 12px; margin: 0; }
#telaEditor .editor-workspace .tl-painel { border: 0; border-radius: 0; background: transparent; margin: 0; padding: 0 20px 18px; }
#telaEditor .editor-workspace .bloco-musica { border: 0; border-top: 1px solid #30343b; border-radius: 0; margin: 0; background: transparent; }
.editor-acoes { border-top: 1px solid #30343b; padding: 14px 20px; background: #171a1f; }
.editor-drag-ghost { position: fixed; z-index: 20000; pointer-events: none; border: 1px solid #9b87b7; border-radius: 8px; padding: 10px 14px; color: #f0e8ff; background: #30263e; box-shadow: 0 6px 24px #0008; font-size: 13px; }
.editor-biblioteca .clipe, .editor-biblioteca .musica-item { user-select: none; -webkit-user-select: none; }
@media (max-width: 700px) {
  #telaEditor .editor-workspace .editor-biblioteca { border-right: 0; border-bottom: 1px solid #30343b; }
  #telaEditor .editor-workspace .editor-montagem-cab { padding: 16px 12px 12px; }
  #telaEditor .editor-workspace .tl-painel { padding: 0 12px 14px; }
  .editor-acoes { padding: 14px 12px; }
}

/* Mesma fonte original, servida localmente para evitar a fonte substituta. */
@font-face {
  font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 700;
  font-display: swap; src: url('/bricolage-grotesque-700.woff2') format('woff2');
}
#telaCriar > h1, #telaAnimar > h1, #telaEditor > h1, #telaGaleria > h1 {
  font-family: 'Bricolage Grotesque', 'Inter', sans-serif; font-size: 36px;
  font-weight: 700; letter-spacing: -.5px; line-height: 1.2; text-align: center;
}
@media (max-width: 700px) {
  #telaCriar > h1, #telaAnimar > h1, #telaEditor > h1, #telaGaleria > h1 { font-size: 29px; }
}

/* Mantem o menu central em telas de notebook e no painel lateral. */
@media (min-width: 801px) and (max-width: 1080px) {
  header { grid-template-columns: auto 1fr auto; gap: 18px; padding: 22px 24px; }
  header .logo-imagem { width: 190px; }
  header .abas { grid-column: 2; grid-row: 1; justify-self: center; width: auto; gap: 4px; }
  header .aba { min-width: 64px; padding: 12px 10px; }
  header .conta-area { grid-column: 3; grid-row: 1; }
}
@media (max-width: 800px) { header .abas { justify-self: center; } }
