@font-face { font-family: "Inter"; font-weight: 500; src: url(../vendor/fonts/inter-latin-500-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Inter"; font-weight: 700; src: url(../vendor/fonts/inter-latin-700-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Inter"; font-weight: 800; src: url(../vendor/fonts/inter-latin-800-normal.woff2) format("woff2"); font-display: swap; }
:root {
  --bg: #0a0b0f; --s1: #111318; --s2: #171a21; --s3: #1f232c; --s4: #282d38; --line: #22262f; --line2: #30353f;
  --txt: #eef0f4; --mut: #979dad; --dim: #646a79;
  --acc: #ff5d73; --acc2: #ffc65c; --ok: #45d08c; --grad: linear-gradient(135deg, #ff5d73 0%, #ff8f5c 55%, #ffc65c 100%);
  --r: 16px; --r2: 11px;
  /* velhos nomes, ainda usados por partes desenhadas pelo código */
  --panel: var(--s1); --panel2: var(--s2);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--txt); font: 500 14px/1.5 "Inter", system-ui, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
body { overflow: hidden; }
::selection { background: #ff5d7366; }
* { scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; } ::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 8px; } ::-webkit-scrollbar-track { background: transparent; }
h2 { font-size: 15px; font-weight: 800; letter-spacing: -.01em; margin: 0 0 4px; }
h3 { font-size: 17px; font-weight: 800; letter-spacing: -.01em; margin: 0 0 12px; }
.ic { flex: none; display: block; }

/* ---------- a tela do editor: tudo cabe na janela, cada parte rola por dentro ---------- */
.app { height: 100vh; height: 100dvh; display: grid; grid-template-columns: 76px 340px minmax(0, 1fr) 330px; grid-template-rows: 56px minmax(0, 1fr) auto;
  grid-template-areas: "top top top top" "rail panel stage props" "rail dock dock dock"; }

/* barra de cima */
.top { grid-area: top; display: flex; align-items: center; gap: 14px; padding: 0 14px 0 18px; border-bottom: 1px solid var(--line); background: var(--bg); min-width: 0; }
.brand { display: flex; align-items: center; gap: 9px; font-size: 17px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.brand b span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mark { display: inline-flex; gap: 3px; align-items: flex-end; height: 20px; }
.mark i { width: 5px; border-radius: 3px; background: var(--grad); }
.mark i:nth-child(1) { height: 11px; } .mark i:nth-child(2) { height: 20px; } .mark i:nth-child(3) { height: 15px; }
.ptitle { flex: 1; min-width: 0; text-align: center; font-weight: 700; font-size: 13.5px; color: var(--mut); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.unl { font-size: 11.5px; font-weight: 700; color: var(--acc2); background: #ffc65c12; border: 1px solid #ffc65c33; border-radius: 999px; padding: 4px 11px; white-space: nowrap; }
.top-right { display: flex; gap: 8px; align-items: center; }
#btnExport { padding: 9px 16px; }

/* ferramentas (coluna de ícones) */
.rail { grid-area: rail; display: flex; flex-direction: column; align-items: stretch; gap: 2px; padding: 10px 6px; border-right: 1px solid var(--line); background: var(--bg); overflow-y: auto; }
.rail button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 9px 2px 8px; border: 0; border-radius: 12px; background: transparent; color: var(--mut); font: 700 10.5px/1.15 "Inter", sans-serif; cursor: pointer; text-align: center; transition: background .12s, color .12s; }
.rail button:hover { color: var(--txt); background: var(--s2); }
.rail button.on { color: var(--txt); background: var(--s3); }
.rail button.on::before { content: ""; position: absolute; left: -6px; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad); }
.rail button.hot .ic { color: var(--acc); }
.rail button.hot.on .ic { color: var(--acc2); }

/* painel da ferramenta */
.panel { grid-area: panel; display: flex; flex-direction: column; min-height: 0; background: var(--s1); border-right: 1px solid var(--line); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px 10px; }
.panel-head b { font-size: 16px; font-weight: 800; letter-spacing: -.015em; }
.pclose { display: none; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--s3); color: var(--txt); cursor: pointer; align-items: center; justify-content: center; }
.panel-body { flex: 1; min-height: 0; overflow-y: auto; padding: 2px 18px 22px; }
.tool { display: none; flex-direction: column; }
.tool.on { display: flex; }
.tool > .lbl:first-child, .tool > .row2:first-child .lbl { margin-top: 2px; }

/* centro: o vídeo */
.stage { grid-area: stage; display: flex; flex-direction: column; align-items: center; min-height: 0; min-width: 0; padding: 18px 18px 10px; gap: 10px;
  background: radial-gradient(700px 420px at 50% 35%, #ffffff07, transparent 70%); }
.phonebox { flex: 1; min-height: 0; width: 100%; display: grid; place-items: center; container-type: size; }
.phone { position: relative; height: min(100cqh, calc(100cqw * var(--arh, 1.7778))); aspect-ratio: var(--ar, 9 / 16); border-radius: 22px; overflow: hidden; background: #000;
  box-shadow: 0 0 0 1px #ffffff14, 0 30px 80px #000c; }
.phone canvas { width: 100%; height: 100%; display: block; }
.veil { position: absolute; inset: 0; background: #0a0b0feb; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 20px; backdrop-filter: blur(6px); }
.veil.on { display: flex; }
.veil-sub { margin: 0; min-height: 1.4em; max-width: 36ch; font-size: 12.5px; line-height: 1.4; color: #9aa3b2; }
.spin { width: 36px; height: 36px; border-radius: 50%; border: 3px solid #ffffff1f; border-top-color: var(--acc2); animation: sp .9s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }
.bar { width: 62%; height: 5px; background: #ffffff1c; border-radius: 3px; overflow: hidden; } .bar i { display: block; height: 100%; width: 0; background: var(--grad); transition: width .2s; }
.bar.big { width: 100%; height: 8px; border-radius: 5px; margin: 6px 0 4px; }
.emptymsg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 30px; color: var(--mut); font-size: 15px; line-height: 1.5; background: radial-gradient(420px 300px at 50% 30%, #2a1f4a66, transparent 70%), linear-gradient(160deg, #171a27, #0e1017); }
.transport { display: flex; align-items: center; gap: 12px; width: min(100%, 540px); flex: none; }
.playbtn { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--txt); color: #0b0c12; cursor: pointer; display: grid; place-items: center; flex: none; transition: transform .1s, background .12s; }
.playbtn:hover { background: #fff; } .playbtn:active { transform: scale(.95); }
.time { font-variant-numeric: tabular-nums; font-size: 12px; font-weight: 700; color: var(--mut); white-space: nowrap; }
#scrub { flex: 1; }

/* à direita: propriedades do que está escolhido */
.props { grid-area: props; display: flex; flex-direction: column; min-height: 0; background: var(--s1); border-left: 1px solid var(--line); }
.props .insp { flex: 1; min-height: 0; position: relative; padding: 0; background: none; border: 0; border-radius: 0; }
.props .insp > .in { position: absolute; inset: 0; overflow-y: auto; padding: 0 18px 20px; }
.projinfo { flex: 1; min-height: 0; overflow-y: auto; padding: 0 18px 20px; }
.props:has(#tlInsp:not([hidden])) .projinfo { display: none; }
.pi-row { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.pi-row span { color: var(--mut); } .pi-row b { font-weight: 700; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pi-add { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 16px 0 6px; }
.pi-add button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border-radius: 12px; border: 1px solid var(--line); background: var(--s2); color: var(--txt); font: 700 12px "Inter", sans-serif; cursor: pointer; }
.pi-add button:hover { border-color: var(--line2); background: var(--s3); }

/* embaixo: a linha do tempo */
.dock { grid-area: dock; min-width: 0; border-top: 1px solid var(--line); background: var(--s1); }

/* ---------- campos ---------- */
.lbl { display: block; font-size: 12px; font-weight: 700; color: var(--mut); margin: 16px 0 7px; }
.lbl b { color: var(--txt); }
.hint { font-size: 12px; color: var(--mut); margin: 8px 0 0; line-height: 1.5; }
.hint.lead { margin: 0 0 12px; font-size: 13px; }
.hint.ok { color: var(--ok); }
.hint.note { background: #ffc65c0d; border: 1px solid #ffc65c2b; border-radius: 10px; padding: 9px 11px; color: #d9c79a; }
textarea, input[type=text], input[type=password], input[type=number], select { width: 100%; background: var(--s2); color: var(--txt); border: 1px solid var(--line); border-radius: var(--r2); padding: 10px 12px; font: inherit; outline: none; transition: border-color .15s, box-shadow .15s; }
textarea { resize: vertical; min-height: 46px; line-height: 1.45; }
textarea::placeholder, input::placeholder { color: var(--dim); }
textarea:focus, input[type=text]:focus, input[type=password]:focus, input[type=number]:focus, select:focus { border-color: #ffc65c99; box-shadow: 0 0 0 3px #ffc65c1a; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23979dad' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
input[type=range] { width: 100%; accent-color: var(--acc); height: 22px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rowbtn { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.rowbtn.end { justify-content: flex-end; }
.check { display: flex; align-items: center; gap: 9px; margin-top: 14px; font-size: 13px; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--acc); }

/* botões */
.btn { appearance: none; border: 1px solid var(--line2); background: var(--s2); color: var(--txt); font: inherit; font-weight: 700; padding: 10px 16px; border-radius: var(--r2); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 7px; justify-content: center; transition: border-color .15s, background .15s, transform .08s, box-shadow .15s, filter .15s; }
.btn:hover { border-color: #4a5060; background: var(--s3); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .4; cursor: default; }
.btn.primary { background: var(--grad); border-color: transparent; color: #230b10; box-shadow: 0 8px 24px #ff5d7330; }
.btn.primary:hover { filter: brightness(1.06); box-shadow: 0 10px 30px #ff5d7348; }
.btn.primary:disabled { box-shadow: none; filter: grayscale(.5); }
.btn.ok { background: var(--ok); border-color: transparent; color: #06220f; box-shadow: 0 8px 24px #45d08c33; }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--mut); } .btn.ghost:hover { color: var(--txt); background: var(--s2); }
.btn.small { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn.big { padding: 13px 22px; font-size: 15px; border-radius: 13px; }
.btn.wide { width: 100%; margin-top: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { border: 1px solid var(--line); background: var(--s2); color: var(--mut); font: inherit; font-weight: 700; font-size: 13px; padding: 6px 12px; border-radius: 999px; cursor: pointer; transition: all .15s; }
.chips button:hover { color: var(--txt); border-color: var(--line2); }
.chips button.on { background: var(--txt); color: #0b0c12; border-color: transparent; }
.seg { display: inline-flex; gap: 2px; border: 1px solid var(--line); border-radius: var(--r2); padding: 3px; background: var(--s2); }
.seg button { border: 0; border-radius: 8px; background: transparent; color: var(--mut); font: inherit; font-weight: 700; font-size: 12.5px; padding: 6px 10px; cursor: pointer; white-space: nowrap; transition: all .15s; }
.seg button:hover { color: var(--txt); }
.seg button.on { background: var(--s4); color: var(--txt); box-shadow: 0 1px 0 #ffffff14 inset; }
.seg.wide { display: flex; flex-wrap: wrap; } .seg.wide button { flex: 1 1 auto; padding: 7px 6px; }
.seg.mini button { padding: 4px 8px; font-size: 11.5px; }
.seg.path { margin-bottom: 4px; } .seg.path button { padding: 9px 6px; font-size: 13px; }
details.more { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
details.more > summary, dialog details > summary { cursor: pointer; font-weight: 700; font-size: 13px; color: var(--mut); list-style: none; display: flex; align-items: center; gap: 8px; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--mut); border-bottom: 2px solid var(--mut); transform: rotate(-45deg); transition: transform .15s; flex: none; }
details.more[open] > summary::before { transform: rotate(45deg); }
dialog details { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.warns { list-style: none; margin: 10px 0 0; padding: 0; font-size: 12px; color: var(--acc2); }
.conta-dlg { max-width: 420px; } .conta-dlg .conta-botao { display: flex; justify-content: center; min-height: 48px; margin: 14px 0 6px; } .conta-dlg .conta-aviso { min-height: 1.2em; text-align: center; } .conta-dlg .small { font-size: 11px; opacity: .8; }
.warns li { padding: 4px 0 4px 18px; position: relative; } .warn-acao { font: inherit; font-weight: 700; color: inherit; background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; } .warns li::before { content: "!"; position: absolute; left: 4px; font-weight: 800; }

/* criar: os dois caminhos e os dois passos da IA */
.grp { display: none; flex-direction: column; }
#tab-create[data-path="idea"] .grp[data-path="idea"], #tab-create[data-path="rec"] .grp[data-path="rec"] { display: flex; }
.drop { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 12px; padding: 20px 14px; border: 1.5px dashed var(--line2); border-radius: 14px; background: var(--s2); cursor: pointer; text-align: center; transition: border-color .15s; }
.fotos { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; } .fotos:empty { display: none; }
.foto { position: relative; width: 78px; display: flex; flex-direction: column; gap: 4px; }
.foto img { width: 78px; height: 78px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line2); }
.foto input { width: 78px; font-size: 12px; padding: 4px 6px; border-radius: 8px; }
.foto .n { position: absolute; left: 4px; top: 4px; min-width: 20px; height: 20px; border-radius: 10px; background: #000a; color: #fff; font-size: 12px; text-align: center; line-height: 20px; }
.foto .x { position: absolute; right: 2px; top: 2px; width: 22px; height: 22px; border-radius: 11px; border: 0; background: #000a; color: #fff; font-size: 14px; line-height: 20px; cursor: pointer; }
.fotos-add { margin-top: 2px; }
/* Antes de criar: o botão Automático, primeiro da lista de visuais */
.pre-auto { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.pre-auto-ico { font-size: 30px; line-height: 1; display: grid; place-items: center; width: 54px; height: 72px; border-radius: 10px; background: linear-gradient(160deg, #6d5dfc, #f15bb5); }
/* link de canal do YouTube: a lista dos últimos vídeos; link de página com fotos: o botão das fotos do artigo */
.canal-escolha { width: 100%; margin-top: 6px; }
.fotos-artigo { margin-top: 6px; width: 100%; }
.drop:hover { border-color: var(--acc2); } .drop b { font-size: 14px; } .drop .hint { margin: 0; }
/* site em nuvem (sem o servidor local): avisos próprios; some o que ainda depende do servidor */
.cloudonly { display: none; } .app.cloud .cloudonly { display: block; } .app.inapp .notapp { display: none; } a.btn.busy { opacity: .5; pointer-events: none; } .app.cloud #btnGen, .app.cloud #btnAi { display: none; }
/* gravar agora com a câmera da frente: só em aparelho de toque */
.drop.camnow { width: 100%; font: inherit; color: var(--txt); border-style: solid; border-color: #ff5d7366; background: linear-gradient(160deg, #ff5d7318, #ffc65c10); }
.drop.camnow .ic { color: var(--acc); }

.ai-step { margin-top: 18px; padding-top: 6px; border-top: 1px solid var(--line); display: flex; flex-direction: column; }
.stephead { display: flex; align-items: center; gap: 9px; margin: 14px 0 0; font-size: 13px; font-weight: 800; }
.stephead .num { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: var(--s4); color: var(--acc2); flex: none; }
.stephead + .btn.wide { margin-top: 10px; } .stephead + textarea { margin-top: 10px; }
.optnote { margin: 12px 0 0; font-weight: 700; color: var(--txt); } #tab-create[data-path="idea"] .optnote { display: none; }
#tab-create[data-path="rec"] #btnMake { background: var(--s3); color: var(--txt); box-shadow: none; border: 1px solid var(--line2); font-size: 14px; padding: 11px 16px; }

/* ferramentas: botões grandes de pôr coisa */
.bigadd { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; text-align: left; width: 100%; margin-top: 12px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--s2); color: var(--txt); font: inherit; cursor: pointer; transition: border-color .15s, background .15s; }
.bigadd:hover { border-color: var(--line2); background: var(--s3); }
.bigadd .ic { grid-row: 1 / span 2; color: var(--acc2); }
.bigadd b { font-size: 14px; } .bigadd span { font-size: 12px; color: var(--mut); line-height: 1.4; }
.tool > .bigadd:first-child { margin-top: 2px; }
/* texto: um cartão por estilo, já no jeito em que vai aparecer */
.tpresets { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tp { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(160deg, #3a4a6b, #22283a 60%, #1a1d29); cursor: pointer; overflow: hidden; display: grid; place-items: center; padding: 10px; color: #fff; transition: transform .12s, border-color .15s; }
.tp:hover { transform: translateY(-2px); border-color: var(--acc2); }
.tp small { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 6px; font: 700 11px "Inter", sans-serif; color: #fff; background: linear-gradient(180deg, transparent, #000a); }
.tp .s { line-height: 1.05; text-align: center; transform: translateY(-6px); }
.tp-bold .s { font: 900 19px "Montserrat", "Inter", sans-serif; -webkit-text-stroke: 4px #0d0f18; paint-order: stroke fill; }
.tp-box .s { font: 800 17px "Inter", sans-serif; background: #ffd166; color: #0d0f18; padding: 7px 11px; border-radius: 9px; }
.tp-neon .s { font: 700 22px "Space Grotesk", "Inter", sans-serif; color: #fff; text-shadow: 0 0 8px #4fc3f7, 0 0 18px #4fc3f7, 0 0 30px #4fc3f7; }
.tp-tag .s { text-align: left; font: 800 15px "Inter", sans-serif; background: #0d0f18e6; padding: 6px 12px 6px 14px; border-radius: 8px; border-left: 4px solid #ffd166; } .tp-tag .s em { display: block; font-style: normal; font-size: 11px; color: #ffd166; }
.tp-serif .s { font: 400 25px "DM Serif Display", Georgia, serif; text-shadow: 0 2px 8px #0009; }
.tp-hand .s { font: 700 30px "Caveat", cursive; color: #ffe81f; text-shadow: 0 2px 6px #0009; }

/* modelos, marca, estilos, elenco */
.tpllist { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; } .tpllist .btn { text-align: left; justify-content: flex-start; white-space: normal; line-height: 1.3; padding: 10px 14px; }
.brandkit { flex-wrap: wrap; margin-top: 0; } .brandkit input[type=color] { width: 42px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 9px; background: none; cursor: pointer; }
.styles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.styles .grp { display: block; grid-column: 1 / -1; margin: 12px 0 0; font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--dim); }
.styles .grp:first-child { margin-top: 0; }
.styles button { position: relative; border: 0; background: var(--s2); border-radius: 12px; padding: 0; cursor: pointer; color: #fff; font: inherit; overflow: hidden; outline: 2px solid transparent; outline-offset: 2px; transition: outline-color .15s, transform .12s; }
.styles button:hover { transform: translateY(-2px); }
.styles button.on { outline-color: var(--acc2); }
.styles canvas { width: 100%; aspect-ratio: var(--ar, 9 / 16); display: block; background: #0d0f17; }
.styles button span { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 6px 6px; font-size: 11.5px; font-weight: 800; text-align: center; background: linear-gradient(180deg, transparent, #000c 62%); text-shadow: 0 1px 2px #000; }
.castlist { display: flex; flex-direction: column; gap: 6px; }
.castlist .it { display: flex; align-items: center; gap: 10px; background: var(--s2); border: 1px solid var(--line); border-radius: var(--r2); padding: 8px 10px 8px 14px; }
.castlist .it span { flex: 1; font-weight: 700; text-transform: capitalize; }
.camctl .lbl { color: var(--acc2); }

/* janelas */
dialog { background: var(--s1); color: var(--txt); border: 1px solid var(--line2); border-radius: 22px; padding: 24px; width: min(94vw, 660px); max-height: 92vh; box-shadow: 0 40px 120px #000c; }
dialog::backdrop { background: #05060acc; backdrop-filter: blur(4px); }
#dlgExport { width: min(94vw, 460px); }
#dlgExport .post { margin-top: 6px; } #dlgExport .post .lbl { margin-top: 18px; }
.charwrap { display: grid; grid-template-columns: 220px 1fr; gap: 18px; }
.charwrap canvas { width: 220px; height: 318px; border-radius: 14px; background: #e9e4d6; }
.charform { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; align-content: start; }
.sw { display: flex; flex-wrap: wrap; gap: 5px; }
.sw button { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #0006; cursor: pointer; padding: 0; }
.sw button.on { outline: 2px solid var(--acc2); outline-offset: 2px; }
.full { grid-column: 1 / -1; }

/* editor do roteiro */
.ed-scene { border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 12px; background: #0e1015; }
.ed-head { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin-bottom: 8px; }
.ed-head b { grid-column: 1 / -1; font-size: 11px; color: var(--acc2); letter-spacing: .09em; text-transform: uppercase; }
.ed-beat { border: 1px solid var(--line); border-radius: var(--r2); padding: 10px; margin-bottom: 8px; background: var(--s1); transition: border-color .15s; }
.ed-beat.cur { border-color: var(--acc2); box-shadow: 0 0 0 3px #ffc65c14; }
.ed-beat .n { font-size: 11px; font-weight: 800; color: var(--mut); cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.ed-beat .n span:first-child { color: var(--acc2); }
.ed-beat textarea, .ed-beat input, .ed-beat select, .ed-head select { padding: 7px 9px; font-size: 13px; margin-top: 6px; border-radius: 9px; }
.ed-beat select, .ed-head select { padding-right: 28px; background-position: right 9px center; }
.ed-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ed-row3 { display: grid; grid-template-columns: 62px 1fr 1fr 1.1fr; gap: 5px; align-items: center; }
.ed-row3 small { color: var(--mut); font-weight: 700; text-transform: capitalize; overflow: hidden; text-overflow: ellipsis; }
.ed-tools { display: flex; gap: 4px; }
.ed-tools button { border: 1px solid var(--line); background: transparent; color: var(--mut); border-radius: 7px; font-size: 11px; padding: 3px 7px; cursor: pointer; }
.ed-tools button:hover { color: var(--txt); border-color: var(--line2); }
.ed-side { font-size: 11px; font-weight: 800; color: var(--mut); margin: 8px 0 0; }
.ed-media { margin-top: 7px; flex-wrap: wrap; align-items: center; }
.ed-media .btn.small { padding: 4px 10px; font-size: 11.5px; border-style: dashed; }
.ed-media small { color: var(--dim); font-size: 11px; flex-basis: 100%; }
.ed-media .ed-start { font-size: 11.5px; color: var(--mut); font-weight: 700; padding: 0 2px; }
#editor > .hint.note { margin: 0 0 12px; }

/* ---------- linha do tempo com faixas ---------- */
.tlwrap { width: 100%; user-select: none; -webkit-user-select: none; }
.tl-tools { display: flex; align-items: center; gap: 2px; padding: 5px 10px; border-bottom: 1px solid var(--line); }
.tl-tools .sep { width: 1px; height: 18px; background: var(--line2); margin: 0 6px; }
.tl-tools .grow { flex: 1; }
.tl-tools .savemsg { margin: 0 8px 0 0; font-size: 11.5px; color: var(--dim); white-space: nowrap; }
.tb { appearance: none; border: 1px solid transparent; background: transparent; color: var(--mut); font: inherit; font-weight: 700; font-size: 13px; min-width: 32px; height: 32px; padding: 0 8px; border-radius: 9px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background .12s, color .12s; }
.tb:hover:not(:disabled) { background: var(--s3); color: var(--txt); }
.tb:disabled { opacity: .35; cursor: default; }
.tb.txt { color: var(--txt); font-size: 12.5px; } .tb.txt .ic { color: var(--acc2); }
.tb.on { color: var(--acc2); }
.tl-zoom { display: flex; align-items: center; gap: 2px; } .tl-zoom input { width: 92px; height: 18px; }
.tl-body { position: relative; display: grid; grid-template-columns: 112px 1fr; max-height: 240px; overflow-y: auto; background: #0c0d11; }
.tl-heads { border-right: 1px solid var(--line); background: var(--s1); }
.tl-heads .head { display: flex; align-items: center; gap: 7px; padding: 0 6px 0 10px; border-bottom: 1px solid #ffffff08; font-size: 11px; font-weight: 800; color: var(--mut); }
.tl-heads .head .ic { color: var(--dim); }
.tl-heads .head .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-heads .head .add { border: 1px solid var(--line2); background: transparent; color: var(--mut); width: 22px; height: 22px; border-radius: 7px; font: 800 14px/1 Inter, sans-serif; cursor: pointer; padding: 0; flex: none; } .tl-heads .head .add:hover { color: var(--acc2); border-color: var(--acc2); }
.tl-scroll { overflow-x: auto; overflow-y: hidden; touch-action: pan-y; position: relative; }
.tl-content { position: relative; min-width: 100%; }
.tl-content .row { position: relative; border-bottom: 1px solid #ffffff08; }
.tl-content .r-ruler { background: var(--s1); cursor: text; }
.tl-content .r-scenes { background: #ffffff04; }
.ruler-c, .wave-c { position: sticky; left: 0; display: block; pointer-events: none; }
.tl-content .el { position: absolute; border-radius: 7px; overflow: hidden; white-space: nowrap; font-size: 11px; font-weight: 700; color: #fff; cursor: grab; box-sizing: border-box; border: 1px solid #00000066; }
.tl-content .el .lb { position: relative; display: block; padding: 0 8px; line-height: 1.2; top: 50%; transform: translateY(-50%); pointer-events: none; text-shadow: 0 1px 2px #000c; overflow: hidden; text-overflow: ellipsis; }
.tl-content .el.sel { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #ffc65c99; z-index: 2; }
.tl-content .el.drag { opacity: .4; } .tl-content .el.grab { cursor: grabbing; opacity: .9; }
.tl-content .el .hl, .tl-content .el .hr { position: absolute; top: 0; bottom: 0; width: 9px; cursor: ew-resize; z-index: 1; }
.tl-content .el .hl { left: 0; } .tl-content .el .hr { right: 0; }
.tl-content .el.sel .hl, .tl-content .el.sel .hr, .tl-content .el:hover .hl, .tl-content .el:hover .hr { background: #ffffffd0; }
.tl-content .el.sel .hl::after, .tl-content .el.sel .hr::after { content: ""; position: absolute; left: 3.5px; top: 35%; bottom: 35%; width: 2px; border-radius: 1px; background: #0b0c12; }
.tl-content .k-text { background: linear-gradient(180deg, color-mix(in srgb, var(--c, #ffd166) 70%, #1a1d2a), color-mix(in srgb, var(--c, #ffd166) 45%, #12141c)); }
.tl-content .k-media { background: #2e3d6b center/auto 100% repeat-x; }
.tl-content .k-media::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, #0000 40%, #000a); pointer-events: none; }
.tl-content .k-audio { background: linear-gradient(180deg, #1f8f6c, #136a4f); } .tl-content .k-audio .cw { position: absolute; left: 0; top: 4px; width: 100%; height: calc(100% - 8px); pointer-events: none; }
.tl-content .beat { background: #1c2236 left center/auto 100% repeat-x; border-top: 3px solid #4f7cf6; }
.tl-content .beat::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, #0000 30%, #000b); pointer-events: none; }
.tl-content .beat .lb { top: auto; transform: none; position: absolute; left: 0; right: 0; bottom: 4px; }
.tl-content .beat.k-text { border-top-color: #ef9a3c; } .tl-content .beat.k-photo { border-top-color: #25b383; } .tl-content .beat.k-cam { border-top-color: #b860e0; } .tl-content .beat.k-map { border-top-color: #2bb0c9; } .tl-content .beat.k-outro { border-top-color: #6b7088; cursor: default; filter: saturate(.5); }
.tl-content .trm { position: absolute; top: 50%; width: 11px; height: 11px; margin: -5px 0 0 -6px; background: #fff; border: 2px solid #0b0c12; transform: rotate(45deg); border-radius: 2px; z-index: 3; pointer-events: none; box-shadow: 0 0 0 1px #ffffff40; }
.tl-content .scmark { position: absolute; top: 0; height: 3px; background: #ffffff30; } .tl-content .scmark.odd { background: #ffffff16; }
.tl-content .cam { background: linear-gradient(180deg, #8d4fc9, #6d34a6); cursor: default; } .tl-content .cam .cut { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #ffffff70; }
.tl-content .endm { position: absolute; top: 0; bottom: 0; width: 1px; background: #ffffff26; pointer-events: none; }
.tl-content .ph, .tl-body > .phc { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px #0008; pointer-events: none; z-index: 5; }
.tl-content .ph i, .tl-body > .phc i { position: absolute; top: 0; left: -6px; width: 14px; height: 14px; background: #fff; clip-path: polygon(0 0, 100% 0, 100% 55%, 50% 100%, 0 55%); }
.tl-content .snapl { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #ff5dcf; box-shadow: 0 0 8px #ff5dcf; pointer-events: none; z-index: 4; }
.tl-content .ins { position: absolute; top: 0; bottom: 0; width: 4px; margin-left: -2px; background: var(--acc2); pointer-events: none; z-index: 4; }
.tlwrap.empty .tl-body { min-height: 60px; }

/* propriedades da camada ou do trecho escolhido */
.insp .ih { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 2px; }
.insp .ih > b { font-size: 13.5px; margin-right: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.insp .itime { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--mut); font-weight: 700; }
.insp .itime input { width: 64px; padding: 6px 7px; font-size: 12.5px; }
.insp textarea { margin-top: 12px; font-size: 15px; font-weight: 700; }
.insp .igrid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.insp .if .lbl { margin: 14px 0 7px; }
.insp .if input[type=range] + b { font-size: 11.5px; color: var(--mut); }
.insp .sw { align-items: center; gap: 7px; } .insp .sw button { width: 26px; height: 26px; } .insp .sw input[type=color] { width: 32px; height: 28px; padding: 0; border: 1px solid var(--line); border-radius: 7px; background: none; cursor: pointer; }
.insp .in > .hint { margin-top: 14px; }

/* ---------- telas médias: colunas mais estreitas ---------- */
@media (max-width: 1360px) { .app { grid-template-columns: 72px 300px minmax(0, 1fr) 290px; } .unl { display: none; } }
@media (max-width: 1100px) { .app { grid-template-columns: 70px 280px minmax(0, 1fr) 260px; } .tb.txt span { display: none; } .tl-zoom input { width: 60px; } }

/* ---------- celular (e tablet em pé): prévia em cima, linha do tempo, barra de ferramentas embaixo;
   tocar numa ferramenta sobe um painel no lugar da linha do tempo, com a prévia ainda à vista ---------- */
@media (max-width: 899px) {
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: 50px minmax(0, 1fr) auto 64px; grid-template-areas: "top" "stage" "dock" "rail"; }
  .top { gap: 10px; padding: 0 10px 0 14px; padding-top: env(safe-area-inset-top); }
  .brand b { display: none; } .ptitle { text-align: left; font-size: 13px; color: var(--txt); }
  .unl, #btnAi span, #uiLang { display: none; }
  #btnAi { padding: 7px 9px; } #btnExport { padding: 8px 13px; font-size: 13.5px; }
  .rail { flex-direction: row; gap: 0; padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
  .rail::-webkit-scrollbar { display: none; }
  .rail button { flex: 0 0 auto; min-width: 66px; padding: 7px 4px 5px; font-size: 10.5px; }
  .rail button.on::before { left: 18px; right: 18px; top: -4px; bottom: auto; width: auto; height: 3px; border-radius: 0 0 3px 3px; }
  .panel, .props { display: none; }
  .app.sheet, .app.msel { grid-template-rows: 50px minmax(0, 1fr) min(52dvh, 470px); grid-template-areas: "top" "stage" "sheet"; }
  .app.sheet .dock, .app.sheet .rail, .app.msel .dock, .app.msel .rail { display: none; }
  .app.sheet .panel { display: flex; grid-area: sheet; border: 0; border-top: 1px solid var(--line2); border-radius: 20px 20px 0 0; box-shadow: 0 -18px 40px #0009; animation: up .18s ease-out; }
  .app.msel:not(.sheet) .props { display: flex; grid-area: sheet; border: 0; border-top: 1px solid var(--line2); border-radius: 20px 20px 0 0; box-shadow: 0 -18px 40px #0009; animation: up .18s ease-out; }
  .pclose { display: flex; }
  .panel-head { padding: 12px 14px 8px 18px; }
  .panel-body { padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
  .stage { padding: 10px 10px 6px; gap: 8px; background: none; }
  .phone { border-radius: 16px; }
  .transport { gap: 10px; } .playbtn { width: 38px; height: 38px; }
  .tl-tools { padding: 3px 6px; } .tl-tools .sep { margin: 0 3px; }
  .hide-m, .tl-zoom input, .tl-tools .savemsg { display: none; }
  .tl-body { grid-template-columns: 38px 1fr; max-height: 34dvh; }
  .tl-heads .head { padding: 0; justify-content: center; } .tl-heads .head .nm, .tl-heads .head .add { display: none; }
  .tl-scroll { touch-action: pan-x; }
  .tl-content .el.sel { touch-action: none; }
  .tl-content .el .hl, .tl-content .el .hr { width: 16px; }
  .styles { grid-template-columns: repeat(4, 1fr); }
  .tpresets { grid-template-columns: repeat(3, 1fr); }
  .charwrap { grid-template-columns: 1fr; } .charwrap canvas { margin: 0 auto; }
  dialog { padding: 20px; border-radius: 20px; }
}
@media (max-width: 420px) { .styles { grid-template-columns: repeat(3, 1fr); } .tpresets { grid-template-columns: 1fr 1fr; } .row2 { gap: 8px; } }
@media (min-width: 900px) and (max-height: 820px) { .tl-body { max-height: 190px; } .stage { padding-top: 12px; } }
@keyframes up { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }

/* figurinhas animadas: grade de ícones no painel da camada */
.stk { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 4px; margin: 2px 0 8px; }
.stk button { font-size: 22px; line-height: 1; padding: 6px 0; border-radius: 10px; border: 1px solid transparent; background: var(--s2, rgba(255,255,255,.05)); cursor: pointer; }
.stk button.on { border-color: var(--acc, #8b7bff); background: var(--s3, rgba(255,255,255,.12)); }

/* misturar estilos: uma cena em cada */
.mixrow { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 10px; }

/* Meu avatar: tela de personagem de videogame (palco grande, abas, peças em miniatura, espaços salvos) */
dialog.avatar { width: min(1060px, 96vw); max-height: 94vh; padding: 0; border: 1px solid #3a3f5a; border-radius: 22px; background: radial-gradient(120% 90% at 30% 0%, #23284a 0%, #0d0f1c 70%); color: #eef0ff; box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(255,93,115,.15); overflow: hidden; }
dialog.avatar::backdrop { background: rgba(5,6,14,.72); backdrop-filter: blur(3px); }
.av-top { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid #2a2f48; }
.av-title { font: 800 18px/1 'Baloo 2', 'Inter', sans-serif; letter-spacing: .5px; white-space: nowrap; }
.av-name { flex: 1; min-width: 0; background: #151933; border: 1px solid #343a5c; color: #fff; border-radius: 10px; padding: 8px 10px; font: 700 15px 'Inter', sans-serif; }
.av-x { background: none; border: 0; color: #aab; font-size: 20px; cursor: pointer; }
.av-main { display: grid; grid-template-columns: minmax(0, 42%) 1fr; gap: 14px; padding: 12px 16px; }
.av-stage { display: flex; flex-direction: column; gap: 8px; }
.av-cv { width: auto; max-width: 100%; height: min(54vh, 560px); aspect-ratio: 3 / 4; align-self: center; border-radius: 18px; background: #12152a; box-shadow: inset 0 0 0 2px #2c3150, 0 0 30px rgba(120,140,255,.15); }
.av-prev { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.av-prev .lbl { font-size: 12px; opacity: .7; margin-right: 2px; }
.av-prev button, .av-tabs button { border: 1px solid #343a5c; background: #171b35; color: #dfe2ff; border-radius: 999px; padding: 5px 10px; font: 700 12px 'Inter', sans-serif; cursor: pointer; }
.av-prev button.on, .av-tabs button.on { background: linear-gradient(135deg, #ff5d73, #ff8f5c); border-color: transparent; color: #fff; box-shadow: 0 0 14px rgba(255,93,115,.45); }
.av-dice { display: flex; gap: 6px; }
.av-side { display: flex; flex-direction: column; min-height: 0; }
.av-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.av-tabs button { font-size: 14px; padding: 8px 14px; }
.av-opts { overflow: auto; max-height: 52vh; padding-right: 4px; }
.av-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; margin-bottom: 12px; }
.av-tile { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 4px; border-radius: 14px; border: 2px solid #2a2f4c; background: #141832; color: #cfd3f5; cursor: pointer; transition: transform .12s, border-color .12s; font: 700 11px 'Inter', sans-serif; }
.av-tile canvas { width: 72px; height: 72px; border-radius: 10px; }
.av-tile:hover { transform: translateY(-2px) scale(1.03); border-color: #4b5385; }
.av-tile.on { border-color: #ffc65c; box-shadow: 0 0 16px rgba(255,198,92,.35); color: #fff; }
.av-sw { margin-bottom: 10px; } .av-sw .lbl { display: block; font-size: 12px; opacity: .75; margin-bottom: 4px; }
.av-sw > div { display: flex; flex-wrap: wrap; gap: 6px; }
.av-dot { width: 30px; height: 30px; border-radius: 50%; border: 2px solid rgba(255,255,255,.18); cursor: pointer; }
.av-dot.on { border-color: #fff; box-shadow: 0 0 0 3px #ff5d73; }
.av-chk { display: flex; gap: 8px; align-items: center; margin: 4px 0 8px; font-weight: 700; }
.av-slots { display: flex; gap: 8px; overflow-x: auto; padding: 4px 16px 8px; align-items: center; }
.av-slot { flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; width: 80px; padding: 5px; border-radius: 12px; border: 2px solid #2a2f4c; background: #12162d; color: #ccd; font: 700 11px 'Inter', sans-serif; cursor: pointer; }
.av-slot canvas { width: 58px; height: 58px; border-radius: 8px; }
.av-slot span { max-width: 74px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.av-slot.on { border-color: #ffc65c; } .av-slot.lock { box-shadow: 0 0 0 2px #45d08c inset; }
.av-new { height: 84px; justify-content: center; font-size: 14px; border-style: dashed; }
.av-bot { display: flex; gap: 10px; align-items: center; padding: 10px 16px 14px; border-top: 1px solid #2a2f48; flex-wrap: wrap; }
.av-desc { flex: 1; min-width: 180px; background: #151933; border: 1px solid #343a5c; color: #fff; border-radius: 10px; padding: 9px 10px; font: 600 13px 'Inter', sans-serif; }
.av-lock { display: flex; gap: 6px; align-items: center; font-weight: 800; cursor: pointer; }
.avbtn b { font-size: 16px; }
@media (max-width: 760px) {
  dialog.avatar { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; display: none; }
  dialog.avatar[open] { display: flex; flex-direction: column; }
  .av-main { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; padding: 8px 12px; gap: 8px; }
  .av-stage { flex: none; gap: 6px; }
  .av-cv { width: auto; height: 25dvh; align-self: center; }
  .av-prev { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; } .av-prev button { flex: none; }
  .av-side { flex: 1; min-height: 0; }
  .av-tabs { flex-wrap: nowrap; overflow-x: auto; margin-bottom: 6px; } .av-tabs button { flex: none; padding: 7px 12px; }
  .av-opts { flex: 1; min-height: 0; overflow: auto; max-height: none; }
  .av-grid { grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 6px; } .av-tile canvas { width: 60px; height: 60px; }
  .av-slots { padding: 4px 12px 6px; } .av-slot { width: 66px; } .av-slot canvas { width: 46px; height: 46px; } .av-new { height: 70px; }
  .av-bot { padding: 8px 12px 12px; } .av-desc { min-width: 0; flex-basis: 100%; }
}

.av-dot.none { background: repeating-linear-gradient(45deg, #2a2f4c 0 4px, #141832 4px 8px) !important; }
.av-num { width: 70px; background: #151933; border: 1px solid #343a5c; color: #fff; border-radius: 8px; padding: 6px; font: 800 15px 'Inter', sans-serif; }

/* aviso fixo da transcrição no aparelho: aparece por cima de tudo, também no celular */
.ouvindo { position: fixed; left: 50%; top: max(10px, env(safe-area-inset-top)); transform: translateX(-50%); z-index: 9999; max-width: min(560px, 92vw); padding: 10px 16px; border-radius: 14px; background: rgba(17,19,24,.94); color: #fff; font: 700 14px/1.35 'Inter', sans-serif; box-shadow: 0 10px 30px rgba(0,0,0,.45); border: 1px solid #30353f; text-align: center; }
.ouvindo[hidden] { display: none; }

/* teleprompter com gravação (js/prompter.js): câmera em tela cheia, texto perto da lente, gravar embaixo */
.prompter { position: fixed; inset: 0; z-index: 9000; background: #000; display: flex; justify-content: center; color: #fff; }
.prompter[hidden] { display: none; }
.pr { position: relative; width: 100%; max-width: 480px; height: 100%; overflow: hidden; background: #07080b; font-family: "Inter", system-ui, sans-serif; }
.pr-cam { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #07080b; }
.pr-cam.mirror, .pr-pane video.mirror { transform: scaleX(-1); }
.pr-voice { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; padding-top: 30vh; background: radial-gradient(90% 60% at 50% 70%, #2a1620 0%, #07080b 70%); }
.prompter[data-mode="voice"] .pr-voice { display: flex; } .prompter[data-mode="voice"] .pr-cam { display: none; }
.pr-meter { width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #230b10; box-shadow: 0 0 0 calc((var(--lv, 1) - 1) * 60px) #ff5d7333; transform: scale(var(--lv, 1)); transition: transform .06s linear, box-shadow .06s linear; }
.pr-top { position: absolute; z-index: 3; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: calc(10px + env(safe-area-inset-top)) 12px 10px; }
.pr-ib { width: 42px; height: 42px; flex: none; border: 0; border-radius: 50%; display: grid; place-items: center; background: #0009; color: #fff; cursor: pointer; }
.pr-seg { display: flex; padding: 3px; border-radius: 999px; background: #0009; }
.pr-seg button { display: flex; align-items: center; gap: 6px; border: 0; border-radius: 999px; padding: 8px 13px; background: none; color: #d6d9e0; font: 700 13px "Inter", sans-serif; cursor: pointer; }
.pr-seg button.on { background: #fff; color: #111; }
.pr-clock { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: #0009; font: 800 15px "Inter", sans-serif; font-variant-numeric: tabular-nums; }
.pr-clock[hidden] { display: none; }
.pr-clock i { width: 10px; height: 10px; border-radius: 50%; background: #ff3b4f; animation: prblink 1s steps(2) infinite; }
.prompter.paused .pr-clock i { animation: none; background: #ffc65c; }
@keyframes prblink { 50% { opacity: .25; } }
.pr-box { position: absolute; z-index: 2; left: 10px; right: 10px; top: calc(64px + env(safe-area-inset-top)); height: 40%; border-radius: 18px; overflow: hidden; background: #08090cb0; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; -webkit-mask-image: linear-gradient(#0003 0, #000 16%); mask-image: linear-gradient(#0003 0, #000 16%); }
.pr-text { padding-left: 20px; padding-right: 20px; font-weight: 800; line-height: 1.32; white-space: pre-wrap; overflow-wrap: anywhere; color: #fff; text-shadow: 0 1px 3px #000; will-change: transform; }
.pr-text.empty { color: #c9cdd6; font-weight: 700; }
.pr-mark { position: absolute; width: 0; height: 0; border: 7px solid transparent; transform: translateY(-50%); }
.pr-mark.l { left: 3px; border-left-color: #ff5d73; } .pr-mark.r { right: 3px; border-right-color: #ff5d73; }
.pr-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: #ffffff1f; } .pr-bar i { display: block; height: 100%; width: 0; background: var(--grad); }
.pr-tip { position: absolute; z-index: 2; left: 16px; right: 16px; top: calc(64px + env(safe-area-inset-top) + 40% + 8px); margin: 0; text-align: center; font: 600 12.5px/1.35 "Inter", sans-serif; color: #e7e9ee; text-shadow: 0 1px 4px #000; }
.pr-count { position: absolute; z-index: 4; inset: 0; display: none; place-items: center; font: 800 150px "Inter", sans-serif; color: #fff; text-shadow: 0 6px 40px #000c; pointer-events: none; }
.pr-count.on { display: grid; }
.pr-bottom { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 30px 12px calc(18px + env(safe-area-inset-bottom)); background: linear-gradient(#0000, #000b 45%); }
.pr-adj { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.pr-chip { display: flex; align-items: center; gap: 2px; padding: 3px; border: 0; border-radius: 999px; background: #000b; color: #fff; font: 700 13px "Inter", sans-serif; }
.pr-chip button { width: 38px; height: 38px; border: 0; border-radius: 50%; display: grid; place-items: center; background: none; color: #fff; cursor: pointer; font: 800 15px "Inter", sans-serif; }
.pr-chip button small { font-size: 12px; } .pr-chip button b { font-size: 19px; }
.pr-chip > span { display: flex; flex-direction: column; align-items: center; line-height: 1.05; min-width: 64px; }
.pr-chip > span b { font-size: 16px; font-variant-numeric: tabular-nums; } .pr-chip > span small { font-size: 10px; font-weight: 600; color: #c9cdd6; }
.pr-edit-btn { gap: 6px; padding: 10px 14px; cursor: pointer; }
.prompter.recording .pr-edit-btn { display: none; }
.pr-recrow { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; width: 100%; }
.pr-est { font: 700 13px "Inter", sans-serif; color: #d6d9e0; text-align: center; font-variant-numeric: tabular-nums; }
.pr-rec { width: 78px; height: 78px; border-radius: 50%; border: 4px solid #fff; background: none; padding: 0; display: grid; place-items: center; cursor: pointer; }
.pr-rec::after { content: ""; width: 60px; height: 60px; border-radius: 50%; background: #ff3b4f; transition: width .18s, height .18s, border-radius .18s; }
.pr-rec.on::after { width: 30px; height: 30px; border-radius: 8px; }
.pr-pane { position: absolute; z-index: 6; inset: 0; display: flex; flex-direction: column; gap: 12px; padding: calc(18px + env(safe-area-inset-top)) 16px calc(18px + env(safe-area-inset-bottom)); background: #0b0c10f5; }
.pr-pane[hidden] { display: none; }
.pr-h { font-size: 18px; font-weight: 800; }
.pr-pane textarea { flex: 1; min-height: 0; resize: none; padding: 14px; border-radius: 14px; border: 1px solid var(--line2); background: var(--s2); color: var(--txt); font: 600 16px/1.45 "Inter", sans-serif; }
.pr-pane video { flex: 1; min-height: 0; width: 100%; object-fit: contain; border-radius: 14px; background: #000; }
.pr-info { margin: 0; color: var(--mut); font-size: 13.5px; line-height: 1.45; }
.pr-btns { display: flex; gap: 10px; } .pr-btns .btn { flex: 1; padding: 14px 12px; font-size: 15px; } .pr-btns.col { flex-direction: column; }
#prErr .pr-info { flex: 0; } #prErr { justify-content: center; }
/* sem texto ainda: a escolha (Colar, Escrever, Roteiro do vídeo, Sem texto) fica no lugar da faixa do texto */
.prompter.vazio .pr-box, .prompter.vazio .pr-tip { display: none; }
.pr-start { position: absolute; z-index: 3; left: 10px; right: 10px; top: calc(64px + env(safe-area-inset-top)); display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 18px; background: #08090ce8; }
.pr-start[hidden] { display: none; }
.pr-start-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pr-sb { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; min-height: 86px; padding: 10px; border: 1px solid #ffffff2b; border-radius: 14px; background: #ffffff14; color: #fff; font: 700 14.5px "Inter", sans-serif; cursor: pointer; }
.pr-sb[hidden] { display: none; }
.pr-sb:active { background: #ffffff2b; }
.pr-notext { position: absolute; z-index: 3; left: 50%; transform: translateX(-50%); top: calc(66px + env(safe-area-inset-top)); display: flex; align-items: center; gap: 8px; padding: 10px 16px; border: 0; border-radius: 999px; background: #000c; color: #fff; font: 700 13.5px "Inter", sans-serif; white-space: nowrap; cursor: pointer; }
.pr-notext[hidden] { display: none; }
.pr-notext b { color: #ffd34d; }
.pr-ehead { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pr-ehead .btn { padding: 11px 24px; font-size: 15px; }
.pr-tools { display: flex; gap: 8px; }
.pr-tools .btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 11px 6px; font-size: 14px; }
.pr-tools .btn[hidden], .pr-info[hidden] { display: none; }
/* tour guiado (js/tour.js): o resto da tela escurece pela sombra do recorte; o balão fica perto do que está aceso */
.tour { position: fixed; inset: 0; z-index: 8500; }
.tour[hidden] { display: none; }
.tour-hole { position: fixed; border-radius: 14px; box-shadow: 0 0 0 200vmax #04050ac2; outline: 2px solid #ffc65c; outline-offset: 2px; pointer-events: none; transition: left .28s ease, top .28s ease, width .28s ease, height .28s ease; }
.tour.nohole .tour-hole { outline: none; }
.tour-tip { position: fixed; padding: 16px 16px 14px; border-radius: 18px; background: var(--s1); border: 1px solid var(--line2); box-shadow: 0 24px 70px #000c; color: var(--txt); transition: left .28s ease, top .28s ease; }
.tour-n { font-size: 11.5px; font-weight: 700; color: var(--acc2); letter-spacing: .02em; margin-bottom: 4px; }
.tour-h { display: block; font-size: 17px; font-weight: 800; letter-spacing: -.01em; margin-bottom: 6px; }
.tour-p { margin: 0 0 12px; font-size: 14px; line-height: 1.5; color: #c8ccd6; }
.tour-dots { display: flex; gap: 6px; margin-bottom: 12px; } .tour-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line2); } .tour-dots i.on { width: 20px; border-radius: 4px; background: var(--grad); }
.tour-btns { display: flex; align-items: center; gap: 8px; } .tour-btns > span { flex: 1; }
#btnTour { width: 36px; height: 36px; padding: 0; justify-content: center; font-weight: 800; font-size: 16px; border-radius: 50%; }
/* objetos da cena na linha do tempo (faixas abertas pelo ▸ da faixa Cenas) */
.tl-heads .head.canopen { cursor: pointer; } .tl-heads .head.canopen:hover { color: var(--txt); }
.tl-heads .head .tog { border: 0; background: none; color: var(--acc2); font: 800 12px/1 Inter, sans-serif; padding: 2px 4px; cursor: pointer; flex: none; }
.tl-heads .head .ab { display: none; }
.tl-content .r-obj { background: #ffffff03; }
.tl-content .el.obj { cursor: pointer; border-radius: 6px; font-size: 10.5px; }
.tl-content .el.obj.mv { cursor: grab; }
.tl-content .o-bg { background: linear-gradient(180deg, #3b4a2a, #2b3820); }
.tl-content .o-actor { background: linear-gradient(180deg, #4d3b78, #3a2c5c); }
.tl-content .o-icon { background: linear-gradient(180deg, #7a5a1c, #5c4314); }
.tl-content .o-word { background: linear-gradient(180deg, #7a3348, #5c2536); }
.tl-content .o-cam { background: linear-gradient(180deg, #24566b, #1a4252); }
.tl-content .el.obj.off { background: repeating-linear-gradient(45deg, #ffffff10 0 6px, #0000 6px 12px); border: 1px dashed #ffffff40; color: #ffffff80; }@media (max-width: 899px) { .tl-heads .head.has-ab .ic { display: none; } .tl-heads .head .ab { display: block; font-size: 10px; font-weight: 800; color: var(--txt); } .tl-heads .head .tog { padding: 0 2px; } }
/* Pacote de criação (rodada 30): cartão no topo do Criar e a porcentagem na barra de cima enquanto baixa */
.pk-card { margin: 0 0 12px; padding: 12px; border: 1px solid var(--line2); border-radius: var(--r); background: var(--s3); display: grid; gap: 8px; font-size: 13px; line-height: 1.4; }
.pk-card[hidden] { display: none; }
.pk-card b { font-size: 14px; }
.pk-card p { margin: 0; color: var(--mut); }
.pk-card small { color: var(--mut); }
.pk-row { display: flex; gap: 8px; flex-wrap: wrap; }
.pk-bar { height: 6px; border-radius: 3px; background: var(--s4); overflow: hidden; }
.pk-bar i { display: block; height: 100%; background: var(--grad); transition: width .4s; }
.pk-chip { font-variant-numeric: tabular-nums; }
.pk-chip[hidden] { display: none; }
/* Antes de criar (rodada 26): visual e tomada escolhidos antes do vídeo existir */
.pre { margin: 0 0 12px; padding: 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--s2); }
.pre-t { margin: 0 0 8px; font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--dim); }
.pre-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pre-chip { display: flex; align-items: center; gap: 7px; min-width: 0; padding: 5px; border: 1px solid var(--line2); border-radius: var(--r2); background: var(--s3); color: var(--txt); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s; }
.pre-chip:hover, .pre-chip.open { border-color: var(--acc2); }
.pre-chip canvas { width: 27px; height: 48px; border-radius: 5px; background: #0d0f17; flex: none; }
.pre-chip span { display: flex; flex-direction: column; min-width: 0; }
.pre-chip small { font-size: 10.5px; font-weight: 800; color: var(--mut); text-transform: uppercase; letter-spacing: .06em; }
.pre-chip b { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pre-box { margin-top: 10px; }
.pre-styles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; max-height: 300px; overflow-y: auto; padding: 2px; }
.pre-styles .grp { grid-column: 1 / -1; margin: 8px 0 0; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.pre-styles .grp:first-child { margin-top: 0; }
.pre-styles button { position: relative; padding: 0; border: 0; border-radius: 9px; overflow: hidden; background: var(--s3); color: #fff; font: inherit; cursor: pointer; outline: 2px solid transparent; outline-offset: 1px; }
.pre-styles button.on { outline-color: var(--acc2); }
.pre-styles canvas { width: 100%; aspect-ratio: var(--ar, 9 / 16); display: block; background: #0d0f17; }
.pre-styles button span { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 3px 4px; font-size: 10px; font-weight: 800; text-align: center; background: linear-gradient(180deg, transparent, #000c 62%); }
.pre-takes { display: grid; gap: 6px; }
.pre-takes button { display: grid; grid-template-columns: 1fr; gap: 3px; padding: 8px 10px; border: 1px solid var(--line2); border-radius: var(--r2); background: var(--s3); color: var(--txt); font: inherit; text-align: left; cursor: pointer; }
.pre-takes button.on { border-color: var(--acc2); box-shadow: 0 0 0 1px var(--acc2) inset; }
.pre-takes canvas.bar { width: 100%; height: 11px; border-radius: 3px; background: #0d0f17; }
.pre-takes b { font-size: 13.5px; }
.pre-takes .hint { margin: 0; font-size: 12px; line-height: 1.35; }
@media (max-width: 899px) { .pre-styles { grid-template-columns: repeat(4, 1fr); max-height: 240px; } }
.pre-leg { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 0 0 8px; font-size: 11.5px; color: var(--mut); }
.pre-leg span { display: inline-flex; align-items: center; gap: 4px; }
.pre-leg i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }

/* Seletor de ações (rodada 28): a biblioteca de animações escolhida como golpes de jogo (js/acoes.js) */
dialog.acoes { width: min(1000px, 96vw); height: min(720px, 92vh); padding: 0; display: flex; flex-direction: column; overflow: hidden; }
dialog.acoes:not([open]) { display: none; }
/* objetos da cena: busca, abas e a grade das figuras; o pé com o nome e o Usar fica sempre à vista */
.ob-corpo { display: flex; flex-direction: column; gap: 10px; padding: 12px 16px 14px; min-height: 0; flex: 1; }
.ob-grade { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; align-content: start; }
.ob-item { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 6px; border: 1px solid var(--line2); border-radius: var(--r2); background: var(--s2); color: var(--txt); font: inherit; font-size: 12px; cursor: pointer; }
.ob-item img { width: 76px; height: 76px; object-fit: contain; }
.ob-item span { text-align: center; line-height: 1.2; }
.ob-item.on { border-color: var(--acc, #4cc9f0); box-shadow: 0 0 0 2px var(--acc, #4cc9f0) inset; }
.ob-pe { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ac-topo { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.ac-topo h3 { margin: 0; font-size: 17px; }
.ac-corpo { flex: 1; min-height: 0; display: grid; grid-template-columns: 300px minmax(0, 1fr); }
.ac-previa { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px; border-right: 1px solid var(--line); background: var(--s2); }
.ac-cv { width: 250px; aspect-ratio: 9 / 16; height: auto; border-radius: 14px; background: #0d0f17; }
.ac-nome { font-size: 15px; text-align: center; min-height: 20px; }
.ac-previa .rowbtn { justify-content: center; flex-wrap: wrap; }
.ac-escolha { display: flex; flex-direction: column; min-height: 0; padding: 12px 14px; gap: 8px; }
.ac-busca { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--line2); border-radius: var(--r2); background: var(--s2); color: var(--txt); font: inherit; font-size: 14px; }
.ac-escolha, .ac-abas, .ac-lista { min-width: 0; }
.ac-abas { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.ac-abas button { white-space: nowrap; }
.ac-conta { font-size: 12px; }
.ac-lista { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px; align-content: start; padding-right: 4px; }
.ac-item { display: flex; justify-content: space-between; align-items: center; gap: 8px; text-align: left; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--r2); background: var(--s2); color: var(--txt); font: inherit; font-size: 13px; cursor: pointer; }
.ac-item:hover { border-color: var(--line2); }
.ac-item.on { border-color: var(--acc2); box-shadow: 0 0 0 1px var(--acc2) inset; }
.ac-item i { font-style: normal; font-size: 11px; color: var(--dim); flex: none; }
@media (max-width: 899px) {
  dialog.acoes { width: 100vw; height: 100dvh; max-width: 100vw; max-height: 100dvh; border-radius: 0; margin: 0; }
  .ac-corpo { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .ac-previa { flex-direction: row; flex-wrap: wrap; justify-content: center; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px; }
  .ac-cv { width: 96px; border-radius: 10px; }
  .ac-nome { flex: 1; min-width: 120px; text-align: left; }
  .ac-lista { grid-template-columns: 1fr; }
}

/* Antes de criar: o personagem (palito, desenhado, ilustrado ou o do estilo), em qualquer pintura */
.pre-chars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.pre-chars button { position: relative; padding: 0; border: 0; border-radius: 9px; overflow: hidden; background: var(--s3); color: #fff; font: inherit; cursor: pointer; outline: 2px solid transparent; outline-offset: 1px; }
.pre-chars button.on { outline-color: var(--acc2); }
.pre-chars canvas { width: 100%; aspect-ratio: var(--ar, 9 / 16); display: block; background: #0d0f17; }
.pre-chars button span { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 3px 4px; font-size: 10.5px; font-weight: 800; text-align: center; background: linear-gradient(180deg, transparent, #000c 62%); }
@media (max-width: 899px) { .pre-chip canvas { width: 22px; height: 39px; } .pre-chip small { font-size: 9.5px; } }
