:root { --creme: #e5dac1; --grafite: #3a3a37; --preto: #1c1c19; --verm: #c0533a; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--preto); color: var(--creme); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; padding-bottom: env(safe-area-inset-bottom); }
header { position: sticky; top: 0; display: flex; align-items: center; gap: .25rem; padding: .75rem 1rem; padding-top: max(.75rem, env(safe-area-inset-top)); background: var(--preto); border-bottom: 1px solid var(--grafite); z-index: 2; }
h1 { flex: 1; margin: 0; font-size: 1.15rem; letter-spacing: .08em; text-transform: uppercase; }
h3 { margin: .25rem 0 .5rem; font-size: .9rem; opacity: .75; }
a { color: var(--creme); }
main { max-width: 760px; margin: 0 auto; padding: 1rem; }
button, select, input, textarea, .botao { font: inherit; color: var(--creme); background: var(--grafite); border: 1px solid #55554f; border-radius: 10px; padding: .7rem .9rem; }
button, .botao { cursor: pointer; text-align: center; text-decoration: none; display: inline-block; }
button:disabled { opacity: .45; cursor: default; }
.primario { background: var(--creme); color: var(--preto); border-color: var(--creme); font-weight: 600; }
.perigo { background: none; color: var(--verm); border-color: var(--verm); margin-top: 2rem; width: 100%; display: block; }
button.icone { background: none; border: none; font-size: 1.45rem; padding: .2rem .55rem; }
button.pequeno { padding: .25rem .6rem; font-size: .8rem; margin-left: .4rem; }
textarea, input, select { width: 100%; margin-bottom: .5rem; }
textarea { resize: vertical; line-height: 1.55; }
input.titulo { font-weight: 600; }
pre { white-space: pre-wrap; font: inherit; margin: 0; background: var(--grafite); padding: .9rem; border-radius: 10px; }
.gravador { display: grid; gap: .75rem; text-align: center; margin-bottom: 1.5rem; }
.gravar { font-size: 1.3rem; padding: 1.5rem; border-radius: 999px; background: var(--creme); color: var(--preto); font-weight: 700; }
.gravar.ativo { background: var(--verm); color: #fff; animation: pulso 1.2s infinite; }
@keyframes pulso { 50% { opacity: .75; } }
.tempo { font-variant-numeric: tabular-nums; min-height: 1.5em; font-size: 1.2rem; }
.ficheiro { font-size: .9rem; opacity: .75; }
.ficheiro input { display: block; margin-top: .4rem; }
.aviso { font-size: .88rem; color: #f0c27a; margin: 0; }
#lista { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
#lista li { background: var(--grafite); border-radius: 12px; padding: .8rem 1rem; cursor: pointer; }
#lista .t { font-weight: 600; }
#lista .m { font-size: .8rem; opacity: .7; }
.vazio { opacity: .6; font-size: .9rem; list-style: none; cursor: default !important; background: none !important; }
.estado { font-size: .85rem; opacity: .8; margin-top: 0; }
.abas { display: flex; gap: .4rem; margin-bottom: .75rem; overflow-x: auto; }
.abas button { flex: 1; padding: .5rem; }
.abas button.ativa { background: var(--creme); color: var(--preto); }
.linha { display: flex; gap: .5rem; margin-top: .25rem; flex-wrap: wrap; }
.linha > * { flex: 1; }
.bloco { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--grafite); }
.reescrever { display: grid; gap: .25rem; }
.sugestoes, .publicado { margin: 0 0 .75rem; padding-left: 1.1rem; font-size: .92rem; }
.sugestoes li { margin-bottom: .45rem; }
#imgNota { max-width: 100%; max-height: 320px; border-radius: 10px; display: block; margin-bottom: .5rem; }
details summary { cursor: pointer; opacity: .8; margin-top: .5rem; }
.versao { margin: .6rem 0; }
.versao small { opacity: .7; }
.comparar { display: grid; gap: .75rem; }
.comparar select { width: auto; padding: .1rem .3rem; margin: 0; }
@media (min-width: 700px) { .comparar { grid-template-columns: 1fr 1fr; } }
audio { width: 100%; margin-bottom: .6rem; }
#vEntrar { text-align: center; padding-top: 3rem; display: grid; gap: 1rem; }
#vEntrar[hidden] { display: none; }
#toast { position: fixed; left: 50%; bottom: calc(1.5rem + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--creme); color: var(--preto); padding: .6rem 1rem; border-radius: 10px; font-weight: 600; max-width: 92vw; z-index: 5; }
.principal { display: flex; gap: .4rem; margin-bottom: 1rem; }
.principal button { flex: 1; }
.principal button.ativa { background: var(--creme); color: var(--preto); font-weight: 600; }
#listaVideos, .cortes, .exportados { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
#listaVideos li { background: var(--grafite); border-radius: 12px; padding: .8rem 1rem; cursor: pointer; }
#listaVideos .t, .exportados .t { font-weight: 600; }
#listaVideos .m, .corte .m { font-size: .8rem; opacity: .7; margin-bottom: .4rem; }
#novoVideo { display: grid; gap: .4rem; margin: 0 0 1rem; padding: 0; border: none; }
#novoVideo summary { margin: 0 0 .5rem; font-weight: 600; opacity: 1; }
progress { width: 100%; height: 1rem; }
#pPlayer { width: 100%; max-height: 60vh; background: #000; border-radius: 10px; margin-bottom: .5rem; }
.corte { background: var(--grafite); border-radius: 12px; padding: .8rem; border-left: 4px solid #55554f; }
.corte.aprovado { border-left-color: #7fb36a; }
.corte.rejeitado { border-left-color: var(--verm); opacity: .65; }
.corte input.titulo { background: var(--preto); }
.tempos { display: grid; grid-template-columns: 1fr auto 1fr auto; gap: .3rem; align-items: end; font-size: .8rem; }
.tempos input { margin: 0; background: var(--preto); padding: .45rem .6rem; font-variant-numeric: tabular-nums; }
.tempos button.pequeno { margin: 0 0 .1rem; }
.check { display: flex; align-items: center; gap: .5rem; font-size: .9rem; margin: .5rem 0; }
.check input { width: auto; margin: 0; }
.exportados li { background: var(--grafite); border-radius: 12px; padding: .8rem; }
.exportados pre { margin-top: .5rem; background: var(--preto); font-size: .9rem; }
#pRegisto { font-size: .75rem; max-height: 260px; overflow: auto; }
.largo { display: block; width: 100%; margin: .25rem 0 .75rem; }


/* ---------- editor de vídeo (telemóvel) ---------- */
.editor .ed-topo input.titulo { font-size: 1.1rem; margin-bottom: .2rem; background: none; border-color: transparent; padding-left: 0; }
.editor .ed-topo input.titulo:focus { border-color: #55554f; padding-left: .9rem; }
.ed-palco { display: flex; flex-direction: column; align-items: center; margin: .25rem 0 .4rem; }
#tela { height: min(56vh, 620px); max-width: 100%; border-radius: 14px; background: #000; touch-action: pan-y; box-shadow: 0 8px 30px rgba(0,0,0,.45); }
.ed-aviso-tela { color: #f0c27a; font-size: .8rem; margin: .35rem 0 0; min-height: 1em; text-align: center; }
.ed-transporte { display: flex; align-items: center; justify-content: center; gap: .35rem; flex-wrap: wrap; margin-bottom: .6rem; }
.ed-transporte .icone { font-size: 1rem; background: var(--grafite); border: 1px solid #55554f; padding: .55rem .7rem; }
.ed-tempo { font-size: .8rem; opacity: .75; font-variant-numeric: tabular-nums; width: 100%; text-align: center; }
.ed-geral { display: block; width: 100%; height: 22px; border-radius: 6px; touch-action: none; cursor: pointer; }
.ed-detalhe { position: relative; margin-top: .35rem; background: #262623; border-radius: 10px; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.ed-regua { position: relative; height: 18px; border-bottom: 1px solid #3a3a37; }
.ed-regua span { position: absolute; top: 2px; font-size: 10px; opacity: .55; transform: translateX(-50%); font-variant-numeric: tabular-nums; }
.ed-pista { position: relative; height: 46px; }
.ed-pista.falas { height: 34px; border-top: 1px solid #3a3a37; }
.ed-seg { position: absolute; top: 5px; height: 36px; background: var(--creme); color: var(--preto); border-radius: 8px; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; overflow: visible; box-sizing: border-box; }
.ed-seg.aprovado { background: #9fcf87; }
.ed-seg.rejeitado { background: #c98a7c; }
.ed-seg .alca { position: absolute; top: -4px; bottom: -4px; width: 24px; }
.ed-seg .alca::after { content: ""; position: absolute; top: 8px; bottom: 8px; left: 9px; width: 6px; border-radius: 3px; background: var(--preto); opacity: .55; }
.ed-seg .alca.e { left: -12px; }
.ed-seg .alca.d { right: -12px; }
.ed-fantasma { position: absolute; top: 11px; height: 24px; background: #3a3a37; border: 1px dashed #6a6a63; border-radius: 6px; font-size: 11px; line-height: 22px; padding: 0 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; box-sizing: border-box; cursor: pointer; }
.ed-fantasma.aprovado { border-color: #7fb36a; }
.ed-fala { position: absolute; top: 4px; height: 26px; background: #31312d; border-radius: 4px; font-size: 10px; line-height: 13px; padding: 0 3px; overflow: hidden; color: #b9b2a2; box-sizing: border-box; }
.ed-fala.dentro { background: #4a463c; color: var(--creme); }
.ed-cabeca { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--verm); pointer-events: none; }
.ed-zoom { display: flex; align-items: center; gap: .3rem; margin: .35rem 0 .9rem; flex-wrap: wrap; }
.ed-zoom button.pequeno { margin: 0; }
.ed-gravado { margin-left: auto; font-size: .78rem; opacity: .7; }
.ed-filtros { margin-bottom: .5rem; }
.ed-cortes { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .4rem; scroll-snap-type: x proximity; margin-bottom: .6rem; }
.ed-corte { flex: 0 0 auto; width: 46vw; max-width: 220px; text-align: left; border-left: 4px solid #8a7a5a; scroll-snap-align: center; padding: .55rem .7rem; }
.ed-corte.aprovado { border-left-color: #7fb36a; }
.ed-corte.rejeitado { border-left-color: var(--verm); opacity: .7; }
.ed-corte b { display: block; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-corte small { font-size: .74rem; opacity: .75; }
.ed-corte.sel { background: var(--creme); color: var(--preto); opacity: 1; }
.ed-acoes { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; margin-bottom: 1rem; }
.ed-acoes button { padding: .65rem .2rem; font-size: .84rem; }
.ed-acoes #edAprovar { grid-column: span 2; }
.ed-acoes #edRejeitar { grid-column: span 2; }
.ed-abas { position: sticky; top: calc(54px + env(safe-area-inset-top)); z-index: 1; background: var(--preto); padding: .4rem 0; margin: 0; }
.ed-abas button { white-space: nowrap; flex: 0 0 auto; padding: .5rem .8rem; }
.ed-ferr { padding: .25rem 0 .5rem; }
.ed-ferr label { display: block; font-size: .84rem; opacity: .8; margin: .6rem 0 .25rem; }
.ed-ferr label small { opacity: .7; }
.ed-ferr h3 { margin-top: 1rem; }
.ed-ferr input[type=range] { padding: 0; height: 32px; background: none; border: none; accent-color: var(--creme); }
.ed-ferr input[type=color] { height: 44px; padding: 3px; }
.ed-grelha { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: .5rem; }
.ed-grelha label { margin-top: .3rem; }
.ed-linha { display: flex; gap: .4rem; align-items: center; }
.ed-linha input { margin: 0; flex: 1; }
.ed-linha .icone { background: var(--grafite); border: 1px solid #55554f; padding: .55rem .7rem; font-size: 1.1rem; }
.ed-falas { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
.ed-falas li { display: flex; gap: .3rem; align-items: stretch; }
.ed-falas .t { flex: 1; text-align: left; padding: .5rem .7rem; font-size: .9rem; }
.ed-falas .t small { opacity: .6; font-variant-numeric: tabular-nums; }
.ed-falas .icone { background: var(--grafite); border: 1px solid #55554f; font-size: 1rem; }
.ed-cortes { position: relative; }

.abas, .ed-cortes { scrollbar-width: none; }
.abas::-webkit-scrollbar, .ed-cortes::-webkit-scrollbar { display: none; }

[hidden] { display: none !important; }

