/* ═══════════════════════════════════════
   Wilep — Editor del video (2026-10-28, mockups mockups/videos-portada.html y mockups/videos-editor-sonido.html)
   El editor (js/editor-video.js + js/editor-sonido.js) va a pantalla completa y oscuro, como el feed, con las secciones
   Portada · Texto · Sonido · Voz abajo. Un solo acento en la interfaz; los colores de la paleta son del texto de la
   persona, no de la app. También: "Volver a editar" en la hoja de detalles de crear.js.
   ═══════════════════════════════════════ */
body.pv-abierto { overflow: hidden; }
.pv {
  position: fixed; inset: 0; z-index: 1600; background: #0E0D0B; color: #fff;
  display: grid; grid-template-rows: auto 1fr auto auto auto; grid-template-columns: minmax(0, 1fr);
  padding: env(safe-area-inset-top, 0) 0 calc(10px + env(safe-area-inset-bottom, 0));
  font-family: inherit; user-select: none; -webkit-user-select: none;
}
.pv button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
.pv [hidden] { display: none !important; }
.pv-top { display: flex; align-items: center; justify-content: space-between; min-height: 58px; padding: 0 14px; font-size: 15px; }
.pv-top b { font-weight: 500; }
.pv-txt { color: rgba(255,255,255,.78) !important; min-height: 44px; padding: 0 6px; }
.pv-listo { min-height: 38px; padding: 0 18px; border-radius: 999px; background: var(--acc) !important; color: var(--acc-ink, #fff) !important; font-weight: 500; }
.pv-listo:disabled { opacity: .55; }

.pv-escenario { position: relative; display: grid; place-items: center; min-height: 0; overflow: hidden; }
.pv-marco { position: relative; border-radius: 16px; overflow: hidden; background: #14130F; }
.pv-lienzo { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.pv-guia { position: absolute; pointer-events: none; }
.pv-guia.v { top: 0; bottom: 0; left: 50%; border-left: 1.5px solid var(--acc); }
.pv-guia.h { left: 0; right: 0; top: 50%; border-top: 1.5px solid var(--acc); }
.pv-pista { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); margin: 0; background: rgba(0,0,0,.6); color: #fff;
  font-size: 13px; padding: 8px 12px; border-radius: 12px; white-space: nowrap; pointer-events: none; }

.pv-seg { width: max-content; margin: 0 auto 12px; display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(255,255,255,.1); font-size: 14px; }
.pv-seg button { min-height: 36px; padding: 0 16px; border-radius: 999px; color: rgba(255,255,255,.75) !important; white-space: nowrap; }
.pv-seg button[aria-selected="true"] { background: #fff; color: var(--ink, #1F1D1A) !important; font-weight: 500; }

/* El reproductor de Sonido y Voz ocupa el mismo marco que la portada */
.pv-reproductor { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #14130F; cursor: pointer; }
.pv-play { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50% !important;
  background: rgba(0,0,0,.45) !important; display: grid; place-items: center; }
.pv-play svg { width: 26px; height: 26px; fill: #fff; stroke: none; }
.pv-linea { position: absolute; left: 10px; right: 10px; bottom: 10px; height: 3px; border-radius: 2px; background: rgba(255,255,255,.3); pointer-events: none; }
.pv-linea b { display: block; height: 100%; width: 0; background: #fff; border-radius: 2px; }
.pv-rec { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); display: flex; gap: 6px; align-items: center; white-space: nowrap;
  background: rgba(0,0,0,.6); padding: 6px 10px; border-radius: 999px; font-size: 12px; font-variant-numeric: tabular-nums; }
.pv-rec i { width: 8px; height: 8px; border-radius: 50%; background: var(--acc); }
.pv-rec b { font-weight: 500; }
.pv-cronom { margin: 6px 0 0; text-align: center; font-size: 12px; color: rgba(255,255,255,.7); font-variant-numeric: tabular-nums; }

.pv-panel { padding: 10px 16px 6px; min-height: 200px; max-height: 42vh; overflow-y: auto; }
.pv-tira-w { position: relative; touch-action: none; cursor: pointer; }
.pv-tira { display: flex; height: 56px; border-radius: 10px; overflow: hidden; background: rgba(255,255,255,.06); }
.pv-tira canvas { flex: 1 1 0; min-width: 0; width: 0; height: 56px; object-fit: cover; opacity: .72; }
.pv-ventana { position: absolute; left: 0; top: -6px; width: 40px; height: 68px; border-radius: 10px; border: 3px solid #fff;
  box-shadow: 0 0 0 3px rgba(0,0,0,.35), 0 8px 18px rgba(0,0,0,.5); pointer-events: none; }
.pv.ancho .pv-ventana { width: 76px; }
.pv-tiempo { display: flex; justify-content: space-between; margin-top: 10px; font-size: 12px; color: rgba(255,255,255,.65); font-variant-numeric: tabular-nums; }
.pv-tiempo b { color: #fff; font-weight: 500; }
.pv-fila { display: flex !important; align-items: center; gap: 14px; width: 100%; min-height: 60px; padding: 8px 14px !important; border-radius: var(--r-sm, 18px);
  background: rgba(255,255,255,.1) !important; text-align: left; }
.pv-fila .ico { width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.14); display: grid; place-items: center; flex: none; }
.pv-fila b { display: block; font-weight: 500; font-size: 15px; }
.pv-fila small { display: block; color: rgba(255,255,255,.65); font-size: 13px; }

.pv-fila .ico.acc { background: var(--acc); color: var(--acc-ink, #fff); font-weight: 600; }
.pv-texto-herr { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.pv-texto-herr .pv-redondo { flex: none; }
.pv-letras.chicas { padding: 0; flex: 1; min-width: 0; }
.pv-letras.chicas button { min-height: 38px; font-size: 15px; }
[data-seccion-panel="texto"] .pv-colores { padding: 10px 2px 2px; }

/* Las secciones (Portada · Texto · Sonido · Voz) */
.pv-secciones { display: flex; justify-content: space-around; padding: 8px 6px 0; border-top: 1px solid rgba(255,255,255,.08); }
.pv-secciones button { position: relative; display: grid; justify-items: center; gap: 4px; width: 72px; font-size: 12px; color: rgba(255,255,255,.62) !important; }
.pv-secciones .c { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 16px; font-weight: 600; }
.pv-secciones .c svg { width: 22px; height: 22px; }
.pv-secciones button[aria-selected="true"] { color: #fff !important; }
.pv-secciones button[aria-selected="true"] .c { background: #fff; color: var(--ink, #1F1D1A); }
.pv-secciones .punto { position: absolute; top: 0; right: 14px; width: 8px; height: 8px; border-radius: 50%; background: var(--acc); }
.pv.grabando .pv-secciones, .pv.grabando .pv-top button { opacity: .4; pointer-events: none; }

.pv-basura { position: absolute; left: 50%; bottom: calc(300px + env(safe-area-inset-bottom, 0)); transform: translateX(-50%) scale(.9); width: 56px; height: 56px;
  border-radius: 50%; background: rgba(255,255,255,.16); display: grid; place-items: center; opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; }
.pv-basura.visible { opacity: 1; transform: translateX(-50%) scale(1); }
.pv-basura.encima { background: #fff; color: var(--ink, #1F1D1A); transform: translateX(-50%) scale(1.15); }
.pv-basura svg { width: 24px; height: 24px; }

/* Escribir: velo sobre el lienzo, herramientas arriba, letras y colores abajo (encima del teclado) */
.pv-escribir { position: absolute; left: 0; right: 0; top: 0; height: 100%; z-index: 2; background: rgba(0,0,0,.62);
  display: grid; grid-template-rows: auto 1fr auto auto; padding: env(safe-area-inset-top, 0) 0 10px; }
.pv-escribir[hidden] { display: none; }
.pv-esc-top { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 0 14px; }
.pv-esc-top span { flex: 1; }
.pv-redondo { width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.16) !important; display: grid; place-items: center; }
.pv-redondo svg { width: 22px; height: 22px; }
.pv-redondo b { font-size: 15px; font-weight: 600; line-height: 1; padding: 2px 5px; border-radius: 4px; }
.pv-redondo[data-modelo="contorno"] b { -webkit-text-stroke: 1.5px #fff; color: transparent; }
.pv-redondo[data-modelo="caja"] b { background: #fff; color: var(--ink, #1F1D1A); }
.pv-redondo[data-modelo="sombra"] b { text-shadow: 0 2px 4px rgba(0,0,0,.9), 0 0 8px rgba(255,255,255,.4); }
.pv-esc-centro { display: grid; place-items: center; padding: 0 20px; min-height: 0; }
.pv-esc-centro textarea {
  width: 100%; max-width: 420px; border: 0; outline: none; resize: none; overflow: hidden; background: transparent;
  font-size: 32px; line-height: 1.2; color: var(--pv-color, #fff); caret-color: var(--acc); padding: 6px 10px; border-radius: 12px;
}
/* Donde se puede, el cuadro mide lo que el texto (así la caja de color abraza las letras, como en la portada). */
@supports (field-sizing: content) { .pv-esc-centro textarea { field-sizing: content; width: auto; min-width: 80px; } }
.pv-esc-centro textarea::placeholder { color: rgba(255,255,255,.5); }
.pv-esc-centro textarea[data-modelo="caja"] { background: var(--pv-fondo); }
.pv-esc-centro textarea[data-modelo="contorno"] { -webkit-text-stroke: 5px var(--pv-borde); paint-order: stroke fill; }
.pv-esc-centro textarea[data-modelo="sombra"] { text-shadow: 0 2px 10px rgba(0,0,0,.75); }
.pv-letras { display: flex; gap: 8px; overflow-x: auto; padding: 4px 14px 8px; scrollbar-width: none; }
.pv-letras::-webkit-scrollbar { display: none; }
.pv-letras button { flex: none; min-height: 40px; padding: 0 14px; border-radius: 999px; background: rgba(255,255,255,.14) !important; font-size: 17px; white-space: nowrap; }
.pv-letras button[aria-pressed="true"] { background: #fff !important; color: var(--ink, #1F1D1A) !important; }
.pv-colores { display: flex; gap: 12px; padding: 4px 16px 6px; overflow-x: auto; scrollbar-width: none; }
.pv-colores button { width: 32px; height: 32px; flex: none; border-radius: 50%; border: 2px solid rgba(255,255,255,.85) !important; }
.pv-colores button[aria-pressed="true"] { box-shadow: 0 0 0 3px #0E0D0B, 0 0 0 5px #fff; }

/* ── Sonido y Voz (js/editor-sonido.js) ── */
.ed-h4 { font-weight: 500; font-size: 14px; color: rgba(255,255,255,.85); margin: 0 0 8px; }
.ed-fila { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 12px !important; margin: 0 0 8px; border-radius: 14px;
  background: rgba(255,255,255,.08) !important; text-align: left; cursor: default; }
.ed-fila.boton { cursor: pointer; }
.ed-fila .ico { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.14); display: grid; place-items: center; flex: none; }
.ed-fila .ico.acc { background: var(--acc); color: var(--acc-ink, #fff); }
.ed-fila b { display: block; font-weight: 500; font-size: 14px; }
.ed-fila small { display: block; color: rgba(255,255,255,.62); font-size: 12px; line-height: 1.35; }
.ed-fila .der { margin-left: auto; font-size: 13px; color: rgba(255,255,255,.78); font-variant-numeric: tabular-nums; min-width: 42px; text-align: right; }
.ed-nombre { flex: 1; min-width: 0; }
.ed-nombre b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-x { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.ed-rango { flex: 1; min-width: 0; accent-color: #fff; height: 28px; }
.ed-sw { appearance: none; -webkit-appearance: none; margin: 0 0 0 auto; width: 42px; height: 26px; border-radius: 999px; background: rgba(255,255,255,.25);
  position: relative; flex: none; cursor: pointer; }
.ed-sw::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .15s; }
.ed-sw:checked { background: var(--acc); }
.ed-sw:checked::after { left: 19px; }
.ed-onda { position: relative; height: 54px; border-radius: 10px; background: rgba(255,255,255,.06); overflow: hidden; margin: 2px 0 6px; touch-action: none; cursor: grab; }
.ed-onda .barras { position: absolute; inset: 6px 8px; display: flex; align-items: center; gap: 2px; pointer-events: none; }
.ed-onda .barras i { flex: 1; background: rgba(255,255,255,.4); border-radius: 2px; }
.ed-onda .ventana { position: absolute; top: 0; bottom: 0; border: 2.5px solid #fff; border-radius: 10px; box-shadow: 0 0 0 2000px rgba(0,0,0,.28); pointer-events: none; }
.ed-tiempos { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: rgba(255,255,255,.6); font-variant-numeric: tabular-nums; }
.ed-vol { display: flex; align-items: center; gap: 12px; padding: 6px 2px 2px; font-size: 13px; color: rgba(255,255,255,.82); }
.ed-vol > span:first-child { width: 52px; flex: none; }
.ed-vol .n { width: 42px; text-align: right; flex: none; font-variant-numeric: tabular-nums; }
.ed-aviso { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0 0; font-size: 12px; line-height: 1.4; color: rgba(255,255,255,.6); }
.ed-aviso svg { width: 16px; height: 16px; margin-top: 1px; flex: none; }
.ed-pista { position: relative; height: 40px; border-radius: 10px; background: rgba(255,255,255,.06); margin: 4px 0 6px; touch-action: none; cursor: pointer; }
.ed-pista .tramo { position: absolute; top: 8px; bottom: 8px; border-radius: 6px; background: var(--acc); opacity: .85; pointer-events: none; }
.ed-pista .tramo.vivo { opacity: .55; }
.ed-pista .cab { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: #fff; pointer-events: none; }
.ed-grabar { display: flex; align-items: center; justify-content: center; gap: 22px; margin-top: 6px; }
.ed-grabar .boton { width: 66px; height: 66px; border-radius: 50% !important; border: 4px solid #fff !important; display: grid; place-items: center; }
.ed-grabar .boton i { width: 46px; height: 46px; border-radius: 50%; background: var(--acc); transition: all .15s; }
.grabando .ed-grabar .boton i { width: 26px; height: 26px; border-radius: 7px; }
.ed-grabar .chico { display: grid; justify-items: center; gap: 4px; width: 84px; font-size: 12px; color: rgba(255,255,255,.78) !important; cursor: pointer; }
.ed-grabar .chico > span { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.12); display: grid; place-items: center; }
.ed-grabar .chico .ed-sw { margin: 8px 0; }
.ed-grabar .chico:disabled { opacity: .4; cursor: default; }
.ed-permiso { margin-top: 8px; }
.ed-blanco { width: 100%; min-height: 44px; border-radius: 999px !important; background: #fff !important; color: var(--ink, #1F1D1A) !important; font-weight: 500; }

/* ── En la hoja de detalles (crear.js) ── */
.cr-vista img.cr-portada-img { width: 72px; height: 110px; border-radius: 12px; object-fit: cover; background: #14130F; flex: none; display: block; }
.cr-vista img.cr-portada-img.ancha { object-fit: contain; }
.cr-portada-fila { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.cr-portada { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border: 0; border-radius: 999px;
  background: var(--field); color: var(--ink); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.cr-portada svg { width: 16px; height: 16px; }
.cr-portada.quitar { background: none; color: var(--muted); font-weight: 400; padding: 0 8px; }
.cr-portada[hidden] { display: none; }

/* ── Donde se ve: el feed muestra la portada (poster) hasta que arranca el video, sin el monograma encima ── */
.vd-item.con-portada .vd-mono { display: none; }
.cr-vista small.cr-sonido:not([hidden]) { display: block; margin-top: 2px; }
