:root {
  --bg: #0f0b1d;
  --bg2: #171230;
  --card: #1d1738;
  --card2: #251e47;
  --line: #342b5e;
  --text: #f1edff;
  --muted: #a49cc8;
  --pink: #ff3b8d;
  --pink2: #ff7ab3;
  --cyan: #2ee6d6;
  --ok: #3ddc84;
  --warn: #ffc847;
  --err: #ff5d6c;
  --radius: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: radial-gradient(1200px 600px at 10% -10%, #2a1660 0%, transparent 60%), var(--bg);
  color: var(--text); font: 14px/1.45 "Segoe UI", system-ui, sans-serif; min-height: 100vh;
}
button { font: inherit; color: inherit; cursor: pointer; }
input, select { font: inherit; color: var(--text); }
h1, h2, h3 { margin: 0; }

.top { padding: 22px 28px 8px; }
.version-bar { background: var(--warn); color: #241a00; padding: 10px 28px; font-weight: 600; text-align: center; }
.version-bar[hidden] { display: none; }
.brand { display: flex; gap: 14px; align-items: center; }
.logo { width: 44px; height: 44px; flex: none; }
.brand h1 { font-size: 22px; letter-spacing: .2px; }
.brand p { margin: 2px 0 0; color: var(--muted); }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; padding: 14px 28px 40px; align-items: start; }
@media (max-width: 1000px) { .layout { grid-template-columns: 1fr; padding: 12px 16px 40px; } .top { padding: 18px 16px 4px; } }
.col-side { position: sticky; top: 14px; display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 1000px) { .col-side { position: static; } }

/* upload */
.drop {
  display: block; border: 2px dashed #4b3f86; border-radius: var(--radius); padding: 26px 20px; text-align: center;
  background: #1a143366; cursor: pointer; transition: .15s;
}
.drop:hover, .drop.over { border-color: var(--pink); background: #ff3b8d12; }
.drop-icon { font-size: 26px; width: 52px; height: 52px; margin: 0 auto 8px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--pink), #8a4dff); }
.drop-title { font-weight: 600; font-size: 16px; }
.drop-sub { color: var(--muted); margin-top: 4px; }
.slots { display: flex; gap: 6px; justify-content: center; margin-top: 12px; }
.slots i { width: 22px; height: 6px; border-radius: 3px; background: #3a3168; }
.slots i.on { background: var(--pink); }

.empty { color: var(--muted); text-align: center; padding: 30px 0; }
.jobs { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }

/* card de vídeo */
.job { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.job-head { display: flex; align-items: center; gap: 12px; }
.badge { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 700; background: var(--card2); color: var(--pink2); }
.job-title { min-width: 0; flex: 1; }
.job-title b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 15px; }
.job-title span { color: var(--muted); font-size: 12.5px; }
.icon-btn { background: var(--card2); border: 1px solid var(--line); border-radius: 8px; width: 30px; height: 30px; display: grid; place-items: center; }
.icon-btn:hover { border-color: var(--pink); }
.icon-btn:disabled { opacity: .35; cursor: default; }

.status { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 13px; }
.chip { flex: none; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--card2); color: var(--muted); }
.chip.enviando { background: #2e86ff26; color: #79b4ff; }
.chip.aguardando { background: #ffc84722; color: var(--warn); }
.chip.analisando { background: #ff3b8d22; color: var(--pink2); }
.chip.pronto { background: #3ddc8422; color: var(--ok); }
.chip.erro { background: #ff5d6c22; color: var(--err); }
.status .txt { color: var(--muted); flex: 1; min-width: 0; }
.bar { height: 6px; background: #2c2453; border-radius: 3px; overflow: hidden; margin-top: 8px; }
.bar > div { height: 100%; background: linear-gradient(90deg, var(--pink), #8a4dff); transition: width .4s; }

/* linha do tempo do vídeo */
.tl-wrap { margin-top: 12px; }
.tl { position: relative; height: 34px; border-radius: 8px; background: #140f2b; border: 1px solid var(--line); overflow: hidden; }
.tl .done { position: absolute; inset: 0 auto 0 0; background: #ffffff0a; border-right: 2px solid var(--pink); }
.tl .done.full { border-right: 0; }
.tl .seg { position: absolute; top: 5px; bottom: 5px; min-width: 3px; border-radius: 3px; background: var(--pink); box-shadow: 0 0 8px #ff3b8d88; cursor: pointer; }
.tl .seg.off { background: #4b4372; box-shadow: none; }
.tl .seg:hover { background: var(--cyan); }
.tl-scale { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; margin-top: 3px; }

.job-stats { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.job-stats b { color: var(--text); }
.job-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* momentos */
.moments { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; margin-top: 12px; }
.mom { background: var(--card2); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; position: relative; }
.mom.off { opacity: .45; }
.mom .th { aspect-ratio: 9 / 16; background: #120e25 center / cover no-repeat; position: relative; cursor: pointer; display: block; width: 100%; border: 0; padding: 0; }
.mom .th img { width: 100%; height: 100%; object-fit: cover; object-position: center 58%; display: block; }
.mom .th::after { content: "▶"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 26px; opacity: 0; background: #0006; transition: .15s; }
.mom .th:hover::after { opacity: 1; }
.mom .gifts { position: absolute; top: 6px; left: 6px; background: #000a; border-radius: 99px; padding: 1px 7px; font-size: 11.5px; font-weight: 600; }
.mom .chk { position: absolute; top: 5px; right: 5px; width: 22px; height: 22px; accent-color: var(--pink); cursor: pointer; }
.mom .info { padding: 6px 8px; font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; }
.mom .info b { color: var(--text); font-weight: 600; }

/* botões */
.btn { border: 1px solid var(--line); background: var(--card2); border-radius: 10px; padding: 8px 14px; font-weight: 600; }
.btn:hover { border-color: var(--pink); }
.btn.primary { background: linear-gradient(135deg, var(--pink), #9b4dff); border: 0; padding: 12px 16px; font-size: 15px; box-shadow: 0 6px 22px #ff3b8d44; }
.btn.primary:disabled { opacity: .45; box-shadow: none; cursor: default; }
.btn.ghost { background: transparent; }
.btn.small { padding: 5px 10px; font-size: 12.5px; }
.btn.wide { width: 100%; margin-top: 10px; }
.link { background: none; border: 0; color: var(--pink2); padding: 0; font-weight: 600; }
.link:hover { text-decoration: underline; }

/* painel lateral */
.panel { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.panel h2 { font-size: 15px; margin-bottom: 12px; }
.panel h3 { font-size: 13px; color: var(--muted); font-weight: 600; margin: 14px 0 6px; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field { display: block; margin-top: 10px; }
.grid2 .field { margin-top: 0; }
.field > span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.field small { color: var(--muted); font-size: 11px; }
.field input[type=text], .field select { width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; }
.num { display: flex; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 8px; }
.num input { width: 100%; min-width: 0; background: none; border: 0; padding: 7px 9px; outline: none; }
.num em { font-style: normal; color: var(--muted); padding-right: 9px; font-size: 12px; }
.field input:focus, .num:focus-within, select:focus { outline: 2px solid #ff3b8d66; outline-offset: 0; }
.switch { display: flex; gap: 10px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px; cursor: pointer; font-size: 12.5px; color: var(--muted); }
.switch b { color: var(--text); }
.switch input { width: 18px; height: 18px; accent-color: var(--pink); flex: none; margin-top: 1px; }
input[type=range] { width: 100%; accent-color: var(--pink); }
.mom .big { position: absolute; bottom: 34px; left: 6px; background: linear-gradient(135deg, var(--pink), #9b4dff); border-radius: 99px; padding: 1px 7px; font-size: 11px; font-weight: 700; }
.tl .seg.small { top: 12px; bottom: 12px; background: #6b5fa3; box-shadow: none; }
.speed-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.speed-chips button { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 6px 0; font-weight: 600; font-size: 13px; }
.speed-chips button:hover { border-color: var(--pink2); }
.speed-chips button.on { background: linear-gradient(135deg, var(--pink), #9b4dff); border-color: transparent; }

/* conferir vídeo */
.scrub { margin-top: 16px; }
.scrub select { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px; max-width: 60%; }
.sc-body { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 18px; margin-top: 4px; }
@media (max-width: 640px) { .sc-body { grid-template-columns: 1fr; } }
.sc-video video { width: 100%; aspect-ratio: 9 / 20; object-fit: contain; max-height: 520px; border-radius: 10px; }
.sc-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.sc-time b { font-size: 34px; font-variant-numeric: tabular-nums; }
.sc-time span { color: var(--muted); margin-left: 6px; }
.sc-near { min-height: 20px; font-size: 13px; color: var(--muted); }
.sc-near b { color: var(--text); }
.sc-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.primary-sm { background: linear-gradient(135deg, var(--pink), #9b4dff); border: 0; }
.speeds span { color: var(--muted); font-size: 12.5px; }
.speeds button { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; font-weight: 600; }
.speeds button.on { border-color: var(--pink); color: var(--pink2); }
#scSound.on { border-color: var(--cyan); color: var(--cyan); }
.btn.mark { border-color: var(--cyan); color: var(--cyan); align-self: flex-start; }
.btn.mark:hover { background: #2ee6d61a; }
.sc-legend { margin-top: 0; }
.sc-track { position: relative; height: 56px; margin-top: 16px; border-radius: 10px; background: #140f2b; border: 1px solid var(--line); cursor: ew-resize; touch-action: none; user-select: none; }
.sc-track .mk { position: absolute; top: 10px; bottom: 10px; min-width: 3px; border-radius: 3px; pointer-events: none; }
.sc-track .mk.small { top: 22px; bottom: 22px; background: #6b5fa3; }
.sc-track .mk.big { background: var(--pink); box-shadow: 0 0 8px #ff3b8d99; }
.sc-track .mk.manual { background: #b026ff; box-shadow: 0 0 10px #b026ffcc; outline: 1px solid #ffffffaa; }
.sc-head { position: absolute; top: -4px; bottom: -4px; width: 3px; margin-left: -1px; background: #fff; border-radius: 2px; pointer-events: none; box-shadow: 0 0 6px #000; }
.sc-hover { position: absolute; top: -26px; transform: translateX(-50%); background: #000c; padding: 1px 7px; border-radius: 6px; font-size: 12px; pointer-events: none; white-space: nowrap; }
.mom .manual { position: absolute; bottom: 34px; left: 6px; background: #b026ff; color: #ffffff; border-radius: 99px; padding: 1px 7px; font-size: 11px; font-weight: 700; }
.mom .del { position: absolute; top: 32px; right: 5px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: #000b; font-size: 12px; }
.hint { color: var(--muted); font-size: 12.5px; margin: 8px 0 0; }
.hint:empty { display: none; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stats div { background: var(--card); border-radius: 10px; padding: 10px; text-align: center; }
.stats b { display: block; font-size: 20px; }
.stats span { color: var(--muted); font-size: 11.5px; }
.meter { margin-top: 14px; }
.meter-head { display: flex; justify-content: space-between; align-items: baseline; }
.meter-head b { font-size: 22px; }
.meter-bar { position: relative; height: 10px; border-radius: 5px; background: #2c2453; margin-top: 6px; }
.meter-bar > div { height: 100%; border-radius: 5px; background: var(--ok); transition: width .3s; max-width: 100%; }
.meter-bar.over > div { background: var(--warn); }
.meter-bar i { position: absolute; top: -4px; bottom: -4px; width: 2px; background: #fff; border-radius: 1px; }
.meter-foot { color: var(--muted); font-size: 12px; margin-top: 6px; }

.final-tl { display: flex; height: 26px; border-radius: 6px; overflow: hidden; background: #140f2b; border: 1px solid var(--line); gap: 1px; }
.final-tl span { height: 100%; cursor: pointer; min-width: 2px; }
.final-tl span:hover { filter: brightness(1.5); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font-size: 11.5px; color: var(--muted); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.row { display: flex; gap: 8px; margin-top: 10px; }

.renders { display: flex; flex-direction: column; gap: 10px; }
.render { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.render b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.render .meta { color: var(--muted); font-size: 12px; margin-top: 2px; }
.render .acts { display: flex; gap: 12px; margin-top: 6px; font-size: 13px; }
.render .acts a { color: var(--pink2); font-weight: 600; text-decoration: none; }
.render .acts a:hover { text-decoration: underline; }

/* player */
.modal { position: fixed; inset: 0; background: #05030dcc; display: grid; place-items: center; z-index: 10; padding: 16px; }
.modal[hidden] { display: none; }
.modal-box { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; width: min(440px, 100%); max-height: 100%; display: flex; flex-direction: column; }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.modal-head b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.x { background: none; border: 0; font-size: 18px; color: var(--muted); }
video { width: 100%; max-height: calc(100vh - 150px); background: #000; border-radius: 10px; }
.modal-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.modal-foot span { flex: 1; text-align: center; color: var(--muted); font-size: 12.5px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #2b2152; border: 1px solid var(--pink); padding: 10px 16px; border-radius: 10px; z-index: 20; max-width: calc(100% - 32px); }

/* ---------- licença ---------- */
.brand { flex-wrap: wrap; }
.lic-badge { margin-left: auto; background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 6px 14px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.lic-badge:hover { border-color: var(--pink); color: var(--text); }
.lic-badge.trial { border-color: var(--warn); color: var(--warn); }
.lic-badge.ok { border-color: #3ddc8466; color: var(--ok); }
.lic-gate { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(900px 500px at 50% 0%, #2a1660 0%, transparent 70%), #0b0817f2; }
.lic-gate[hidden] { display: none; }
.lic-box { width: min(420px, 100%); background: var(--bg2); border: 1px solid var(--line); border-radius: 18px; padding: 26px 24px; text-align: center; box-shadow: 0 20px 60px #0008; }
.lic-logo { width: 64px; height: 64px; display: block; margin: 0 auto; }
.lic-box h2 { font-size: 22px; margin: 6px 0 4px; }
.lic-msg { color: var(--muted); margin: 0 0 6px; min-height: 20px; }
.lic-msg.err { color: var(--err); }
.lic-box .field { text-align: left; }
.lic-box input { text-transform: uppercase; letter-spacing: 1px; font-family: Consolas, monospace; text-align: center; font-size: 15px; }
.lic-buy { display: block; margin-top: 12px; color: var(--pink2); font-weight: 600; text-decoration: none; }
.lic-buy:hover { text-decoration: underline; }
.lic-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 16px; color: var(--muted); font-size: 11.5px; }
.lic-buy[hidden] { display: none; }

/* ---------- áudio do vídeo final ---------- */
.audio-chips { grid-template-columns: repeat(2, 1fr); }
.music-box { margin-top: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.music-box[hidden] { display: none; }
.music-pick { display: flex; gap: 8px; align-items: center; }
.music-pick select { flex: 1; min-width: 0; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; }
.music-pick label.btn { cursor: pointer; flex: none; }
.music-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12.5px; }
.music-info { flex: 1; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#origVolField[hidden] { display: none; }

/* ---------- atualização automática ---------- */
.update-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px;
  padding: 10px 28px; background: linear-gradient(90deg, #2a1660, #3a1650); border-bottom: 1px solid var(--line); font-size: 13.5px; }
.update-bar[hidden] { display: none; }
.update-bar.mandatory { background: linear-gradient(90deg, #5a1020, #3a1650); border-bottom-color: var(--err); }
.upd-notes { color: var(--muted); }
.upd-err { color: var(--err); }
.upd-btn { background: linear-gradient(135deg, var(--pink), #9b4dff); border: 0; border-radius: 9px; padding: 7px 14px; font-weight: 700; }
.upd-btn:disabled { opacity: .5; }
.upd-link { background: none; border: 0; color: var(--muted); text-decoration: underline; }
.upd-bar { display: inline-block; width: 220px; height: 8px; border-radius: 4px; background: #ffffff22; overflow: hidden; vertical-align: middle; }
.upd-bar i { display: block; height: 100%; background: var(--ok); }

/* ---------- parar / limpar ---------- */
.batch-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 14px 0 0; }
.batch-actions[hidden] { display: none; }

/* ---------- possíveis presentes grandes (conferir) ---------- */
.tl .seg.maybe { background: repeating-linear-gradient(45deg, #ffc847 0 4px, #b08a1f 4px 8px); box-shadow: none; }
.sc-track .mk.maybe { background: #ffc847; opacity: .85; }
.maybe-chip { background: #ffc847 !important; color: #241a00 !important; }

/* versão do programa, ao lado do título */
.app-ver { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 6px; }

/* Telas largas: cada coluna rola sozinha (lista à esquerda, painel à direita) */
@media (min-width: 1001px) {
  body { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
  body > header.top { flex: none; }
  .layout { flex: 1; min-height: 0; height: auto; overflow: hidden; grid-template-rows: minmax(0, 1fr); align-items: stretch; }
  .col-main, .col-side { min-height: 0; height: 100%; overflow-y: auto; padding-right: 8px; }
  .col-side { position: static; }
}

/* prévia com transição (duas telas sobrepostas) */
.ds-box { width: min(400px, 100%); }
.ds-stage { position: relative; width: 100%; aspect-ratio: 9 / 16; max-height: 70vh; background: #000; border-radius: 10px; overflow: hidden; }
.ds-stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.ds-stage { cursor: pointer; }
.ds-white { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 5; }
/* escolha da transição: miniatura animada de cada uma */
.tr-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin: 10px 0 6px; }
.tr-types[hidden] { display: none; }
.tr-opt { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 6px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; font-size: 12px; font-weight: 600; color: var(--muted); }
.tr-opt:hover { border-color: var(--pink2); color: var(--text, #fff); }
.tr-opt.on { border-color: var(--pink); color: var(--pink2); background: #ff3b8d14; }
.tr-demo { position: relative; width: 36px; height: 54px; border-radius: 5px; overflow: hidden; background: #000; }
.tr-demo i { position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; font-size: 13px; font-weight: 800; color: #fff; }
.tr-demo .a { background: linear-gradient(160deg, #ff3b8d, #9b4dff); z-index: 2; }
.tr-demo .b { background: linear-gradient(160deg, #25f4ee, #1c6bff); z-index: 1; }
.tr-demo .w { background: #fff; opacity: 0; z-index: 3; }
.ds-ctrl { margin-top: 10px; }
.ds-bar { position: relative; height: 22px; }
.ds-bar input { position: absolute; inset: 0; margin: 0; width: 100%; height: 22px; cursor: pointer; }
.ds-marks { position: absolute; left: 7px; right: 7px; top: 3px; bottom: 3px; pointer-events: none; }
.ds-marks i { position: absolute; top: 0; bottom: 0; width: 1px; background: #ffffff40; }
.ds-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.ds-time { font-variant-numeric: tabular-nums; font-size: 13px; min-width: 88px; }
.ds-btns { flex: 1; display: flex; justify-content: center; gap: 6px; }
.ds-btns .icon-btn { width: 34px; height: 34px; }
.ds-btns .ds-play { width: 42px; height: 42px; border-radius: 50%; border-color: var(--pink); font-size: 16px; }
.ds-rate { min-width: 52px; padding: 6px 8px; }
.ds-info { color: var(--muted); font-size: 12px; text-align: center; margin-top: 6px; min-height: 16px; }

/* corte no quadro escolhido (início e fim) */
.sc-cut { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.sc-cut-info { color: var(--muted); font-size: 12.5px; }

/* desfoque de área (notificações etc.) */
.sc-video { position: relative; }
.sc-blur { position: absolute; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); background: rgba(0, 0, 0, .10); outline: 1px dashed #ffc847; pointer-events: none; }
.sc-blur[hidden], .sc-draw[hidden] { display: none; }
.sc-draw { position: absolute; inset: 0; cursor: crosshair; background: rgba(255, 200, 71, .10); z-index: 5; touch-action: none; }

/* ===== Edição Manual: layout em passos, com cores de cada tipo de marcação ===== */
.ed-intro { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.ed-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
@media (max-width: 1000px) { .ed-grid { grid-template-columns: 1fr; } }
.ed-box { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; }
.ed-step { font-weight: 700; color: var(--pink2); margin-bottom: 6px; }
.ed-help { color: var(--muted); font-size: 12.5px; margin: 6px 0; }
.ed-undo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ed-undo:disabled, #scUndo:disabled { opacity: .4; cursor: default; }
/* botões com a cor do que fazem */
.btn-ini { background: #3ddc8426; border-color: #3ddc84; color: #8cf0bb; }
.btn-fim { background: #b026ff26; border-color: #b026ff; color: #d9a6ff; }
.btn-exc { background: #ff5d6c26; border-color: #ff5d6c; color: #ff9aa4; }
.btn-mar { background: #2ea8ff26; border-color: #2ea8ff; color: #9fd4ff; }
.btn-blur { background: #ff8a3d26; border-color: #ff8a3d; color: #ffc08f; }
/* legenda */
.ed-legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 8px 16px; margin-top: 12px; padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; font-size: 13px; }
.ed-legend > b { grid-column: 1 / -1; }
.ed-legend .lg { display: flex; align-items: flex-start; gap: 4px; }
.sw { display: inline-block; flex: none; width: 14px; height: 14px; border-radius: 3px; margin: 2px 6px 0 0; }
.sw.small { background: #6b5fa3; }
.sw.big { background: var(--pink); }
.sw.maybe { background: #ffc847; }
.sw.manual { background: #b026ff; }
.sw.marcado { background: #2ea8ff; }
.sw.off { background: repeating-linear-gradient(45deg, #5a5a6e 0 4px, #33334a 4px 8px); }
.sw.blur { background: repeating-linear-gradient(45deg, #ff8a3d 0 4px, #b35a1f 4px 8px); }
/* faixas da linha do tempo */
.sc-track .mk.marcado { background: #2ea8ff; box-shadow: 0 0 8px #2ea8ffaa; }
.sc-track .mk.off { top: 14px; bottom: 14px; background: repeating-linear-gradient(45deg, #5a5a6e 0 4px, #33334a 4px 8px); box-shadow: none; }
.sc-band { position: absolute; top: 0; bottom: 0; pointer-events: none; }
.sc-band.cut { background: #ffffff2e; border-left: 1px solid #fff; border-right: 1px solid #fff; }
.sc-band.blur { background: repeating-linear-gradient(45deg, #ff8a3d66 0 6px, #ff8a3d22 6px 12px); }
.sc-line { position: absolute; top: -4px; bottom: -4px; width: 3px; border-radius: 2px; pointer-events: none; background: #3ddc84; box-shadow: 0 0 6px #3ddc84; }
.sc-line.in::before { content: 'INÍCIO'; position: absolute; top: -18px; left: -22px; font-size: 11px; color: #8cf0bb; font-weight: 700; }
.sc-track-wrap { margin-top: 14px; }

/* ===== tela da Edição Manual: celular ao lado dos botões, linha do tempo embaixo ===== */
.ed-grid { grid-template-columns: auto minmax(0, 1fr); gap: 16px; }
.ed-video { position: sticky; top: 8px; }
.ed-video .sc-video { width: auto; height: min(60vh, 580px); aspect-ratio: 9 / 19.5; margin: 0; max-height: none; border-radius: 14px; }
.ed-video .sc-video video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 1000px) {
  .ed-grid { grid-template-columns: 1fr; }
  .ed-video .sc-video { height: auto; width: 100%; max-width: 360px; margin: 0 auto; }
}
/* corte feito por você: roxo com tesoura */
.sc-track .mk.manual { display: flex; align-items: center; justify-content: center; font-size: 12px; color: #fff; font-weight: 700; overflow: visible; }
/* trecho excluído: grade quadriculada cinza */
.sc-track .mk.off { top: 10px; bottom: 10px; box-shadow: none; background-color: #2a2a3e; background-image: repeating-linear-gradient(0deg, #8a8aa6 0 1px, transparent 1px 6px), repeating-linear-gradient(90deg, #8a8aa6 0 1px, transparent 1px 6px); opacity: .85; }

/* ===== cores: rosa = presente grande automático · azul = presente marcado por você · roxo = trecho excluído ===== */
.modo-pres { background: #2ea8ff26; border-color: #2ea8ff; color: #9fd4ff; }
.modo-exc { background: #b026ff26; border-color: #b026ff; color: #d9a6ff; }
.modo-pres.on, .modo-exc.on { box-shadow: 0 0 0 2px #ffffffaa; }
.sw.manual { background: #2ea8ff; }
.sw.off { background-color: #2a1a3e; background-image: repeating-linear-gradient(0deg, #b026ff 0 1px, transparent 1px 5px), repeating-linear-gradient(90deg, #b026ff 0 1px, transparent 1px 5px); }
.sc-track .mk.manual { background: #2ea8ff; box-shadow: 0 0 8px #2ea8ffaa; }
.sc-track .mk.off { background-color: #2a1a3e; background-image: repeating-linear-gradient(0deg, #b026ff 0 1px, transparent 1px 5px), repeating-linear-gradient(90deg, #b026ff 0 1px, transparent 1px 5px); box-shadow: none; opacity: 1; }

/* caixa de marcar do player (assistir momento) */
.pl-check { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; border: 2px solid var(--line); background: transparent; }
.pl-check .box { width: 20px; height: 20px; border-radius: 5px; border: 2px solid currentColor; display: inline-grid; place-items: center; font-size: 14px; line-height: 1; }
.pl-check.on { background: var(--pink); border-color: var(--pink); color: #fff; }
.pl-check.on .box { background: #fff; color: var(--pink); border-color: #fff; }

/* ---------- tags por artista ---------- */
.mom .mtags { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; padding: 5px 6px 0; min-height: 25px; }
.mom .mtags i { width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 800; color: #10091f; }
.mom .tag-btn { margin-left: auto; background: transparent; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; line-height: 1; padding: 3px 5px; }
.mom .tag-btn:hover { border-color: var(--pink2); }
.tag-chip { --c: var(--pink); background: var(--card); border: 1px solid var(--line); border-left-width: 1px; border-radius: 99px; padding: 4px 10px; font-size: 12.5px; font-weight: 600; color: var(--text); display: inline-flex; align-items: center; gap: 4px; }
.tag-chip::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; }
.tag-chip:hover { border-color: var(--c); }
.tag-chip.on { background: color-mix(in srgb, var(--c) 22%, var(--card)); border-color: var(--c); }
.tag-chip small { color: var(--muted); font-weight: 500; }
.tag-menu { position: absolute; z-index: 60; width: 230px; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: flex; flex-wrap: wrap; gap: 6px; box-shadow: 0 10px 30px #0008; }
.tag-menu[hidden] { display: none; }
.tag-menu-h { width: 100%; font-weight: 700; font-size: 13px; margin-bottom: 2px; }
.tag-menu-dica { width: 100%; margin: 4px 0 0; color: var(--muted); font-size: 11.5px; }
.pl-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.pl-tags[hidden] { display: none; }
.pl-tags-lbl { color: var(--muted); font-size: 12.5px; margin-right: 2px; }
.tag-names { display: grid; gap: 6px; }
.tag-row { display: flex; align-items: center; gap: 8px; }
.tag-row i { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: 12.5px; color: #10091f; }
.tag-row input { flex: 1; min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px; }
.tag-row input:focus { outline: none; border-color: var(--pink2); }
.tag-count { flex: none; width: 76px; text-align: right; color: var(--muted); font-size: 12px; }
.tag-filter-box { margin-bottom: 12px; }
.tag-filter-box[hidden] { display: none; }
.tag-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-filter button { padding: 5px 10px; }
.tag-filter button.tag-chip.on { background: color-mix(in srgb, var(--c) 22%, var(--card)); border-color: var(--c); }
#renderTags { margin-top: 8px; }
#renderTags[hidden] { display: none; }

/* ---------- projetos ---------- */
.proj-btn { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; max-width: 320px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 7px 12px; color: var(--text); }
.proj-btn:hover { border-color: var(--pink); }
.proj-btn b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-lbl { color: var(--muted); font-size: 12px; }
.proj-caret { color: var(--muted); }
.proj-btn + .lic-badge { margin-left: 8px; }
.proj-box { width: min(620px, 100%); }
.proj-box .hint { margin: 4px 0 12px; }
.proj-list { display: grid; gap: 8px; overflow: auto; max-height: 55vh; }
.proj { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.proj.cur { border-color: var(--pink); }
.proj-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.proj-info b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-info span { color: var(--muted); font-size: 12px; }
.proj-new { display: flex; gap: 8px; margin-top: 12px; }
.proj-new input { flex: 1; min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.proj-new .btn.primary { padding: 8px 14px; font-size: 14px; }
/* a fileira de tags fica embaixo da miniatura: os selos sobem um pouco */
.mom .big, .mom .manual { bottom: 64px; }
/* player com a fileira de artistas: o vídeo cede espaço para ela caber */
#player video { max-height: calc(100vh - 230px); }
/* lista de projetos: no canto de cima, à esquerda, abre embaixo do botão */
.proj-anchor { position: relative; flex: none; margin-left: 18px; align-self: center; }
.proj-anchor .proj-btn { margin-left: 0; }
.proj-btn b.none { color: var(--muted); font-weight: 600; }
.proj-pop { position: absolute; top: calc(100% + 8px); left: 0; z-index: 50; width: min(600px, calc(100vw - 32px)); background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px 14px; box-shadow: 0 14px 40px #000a; }
.proj-pop[hidden] { display: none; }
.proj-pop-head { display: flex; align-items: center; justify-content: space-between; }
.proj-pop .hint { margin: 4px 0 10px; }
.proj .chip { flex: none; }
.no-project { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); padding: 22px; }
.no-project[hidden] { display: none; }
.no-project b { font-size: 17px; }
.no-project span { color: var(--muted); }
.drop[hidden], .batch-actions[hidden] { display: none; }
.title-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.title-row .proj-anchor { margin-left: 0; }

/* ---------- assinatura (Mercado Pago) na tela de licença ---------- */
.lic-box { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; }
.lic-box #licEmail { text-transform: none; letter-spacing: normal; font-family: inherit; text-align: left; }
.lic-sep { display: flex; align-items: center; gap: 10px; margin: 18px 0 10px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.lic-sep::before, .lic-sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.lic-plans[hidden], .lic-wait[hidden], .lic-subinfo[hidden], .lic-sep[hidden] { display: none; }
.lic-plan-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 10px; }
.lic-plan { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 8px; text-align: center; color: var(--text); }
.lic-plan:hover { border-color: var(--pink2); }
.lic-plan.on { border-color: var(--pink); background: #ff3b8d18; }
.lic-plan b { display: block; font-size: 13px; color: var(--muted); font-weight: 600; }
.lic-plan .preco { display: block; font-size: 19px; font-weight: 800; margin: 2px 0; }
.lic-plan small { color: var(--muted); font-size: 11.5px; }
.lic-plan .eco { position: absolute; top: -8px; right: 8px; background: var(--ok); color: #06210f; font-size: 10.5px; font-weight: 800; border-radius: 99px; padding: 1px 7px; }
.lic-fine { color: var(--muted); font-size: 11.5px; margin: 8px 0 0; }
.lic-wait { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-top: 10px; text-align: left; }
.lic-wait b::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--pink2); border-right-color: transparent; margin-right: 8px; animation: girar 1s linear infinite; vertical-align: -1px; }
@keyframes girar { to { transform: rotate(360deg); } }
.lic-wait p { color: var(--muted); font-size: 13px; margin: 6px 0 8px; }
.lic-wait-acts { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.lic-subinfo { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-top: 8px; text-align: left; font-size: 13.5px; }
.lic-subinfo .acts { display: flex; gap: 12px; margin-top: 6px; }
.lic-box #licEmail { width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; color: var(--text); }
.lic-box #licEmail:focus { outline: none; border-color: var(--pink2); }
.proj-rename { width: 100%; background: var(--card2); border: 1px solid var(--pink2); border-radius: 8px; padding: 5px 8px; color: var(--text); font-weight: 700; }
.proj-rename:focus { outline: none; }

/* cabeçalho na nuvem: logo, projeto e Sair alinhados numa linha só (o logo já traz o nome) */
header.top { display:flex; align-items:center; gap:14px; flex-wrap:wrap; }
header.top .brand { display:flex; align-items:center; gap:18px; flex:1; min-width:0; flex-wrap:wrap; }
header.top .brand > div { min-width:0; }
header.top .title-row { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
header.top .logo { height:48px; width:auto; display:block; }
header.top #contaSair { margin-left:auto; }

/* ---- celular (até 640 px): sem sobreposição, tudo cabe na largura da tela ---- */
html, body { max-width: 100%; overflow-x: hidden; }
img, video, canvas { max-width: 100%; }
@media (max-width: 640px) {
  header.top { padding: 12px 14px 6px; gap: 10px; }
  header.top .logo { height: 40px; }
  header.top .brand { gap: 10px; }
  header.top #contaSair { margin-left: 0; }
  .layout { padding: 10px 12px 40px; gap: 14px; }
  .top .title-row { gap: 8px; }
  .proj-pop { position: fixed; left: 10px; right: 10px; top: 120px; width: auto; max-width: none; max-height: 70vh; overflow: auto; }
  .panel { padding: 12px; }
  .job-head { flex-wrap: wrap; }
  .job-actions { display: flex; flex-wrap: wrap; gap: 6px; }
  .job-actions .btn { flex: 1 1 auto; }
  .tl-scale span:nth-child(2), .tl-scale span:nth-child(4) { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .ed-legend { grid-template-columns: 1fr; }
  .grid2 { grid-template-columns: 1fr; }
  .moments { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  .btn { padding: 8px 10px; }
}

/* presentes por miniatura (grupos de ícones iguais) */
.grupos { margin: 4px 0 12px; padding: 10px 12px; border: 1px solid var(--line, #2a2445); border-radius: 12px; background: var(--card2, #1b1733); }
.grupos-cab { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; margin-bottom: 8px; }
.grupos-lista { display: flex; flex-wrap: wrap; gap: 8px; }
.grupo { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 118px; padding: 6px; border-radius: 10px; border: 1px solid #3a3360; background: #14112b; color: inherit; cursor: pointer; font: inherit; font-size: 12px; }
.grupo img { width: 104px; height: 190px; object-fit: cover; border-radius: 8px; background: #0c0a1c; }
.grupo b { position: absolute; top: 4px; right: 6px; font-size: 13px; }
.grupo.todos { border-color: #ff3b8d; }
.grupo.alguns { border-color: #ffc847; }
.grupo.nenhum { opacity: .55; }
.grupos-aviso { margin: 4px 0 10px; }
