/* =====================================================================
   COCUYO APP — «Crear» (clon visual de Runway)
   Negro puro, píldoras grises, tarjetas grandes con la etiqueta del
   modelo y el botón azul de Generar. Colores en base.css (--rw-*).
   ===================================================================== */

/* ---------- Inicio de Crear ---------- */
.rw-tab { background: var(--rw-fondo); }
.rw-top { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 6px;
  padding: calc(var(--seg-arriba) + 8px) 8px 8px; background: var(--rw-fondo); }
/* Vídeo · Imagen · Audio: en idiomas largos («Изображение») encoge los botones
   y, si aun así no cabe, se desliza de lado; el avatar no se sale nunca. */
.rw-top .rw-seg { justify-self: center; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.rw-top .rw-seg::-webkit-scrollbar { display: none; }
.rw-top .rw-seg button { flex: none; white-space: nowrap; padding: 0 clamp(9px, 3.4vw, 15px); }
.rw-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; }
.rw-seg button { height: 34px; padding: 0 15px; border-radius: 999px; font-size: 15px; font-weight: 500; color: var(--rw-texto3); }
.rw-seg button[aria-selected="true"] { background: var(--rw-sup3); color: #fff; }
.rw-seg.ancho { display: flex; width: calc(100% - 32px); margin: 4px 16px 8px; background: var(--rw-sup); }
.rw-seg.ancho button { flex: 1; }
.rw-avatar { justify-self: end; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--rw-sup3); font-weight: 700; }
.rw-avatar .ic { width: 20px; height: 20px; }
.rw-accesos { display: flex; gap: 8px; padding: 0 12px 10px; overflow-x: auto; scrollbar-width: none; }
.rw-accesos::-webkit-scrollbar { display: none; }
.rw-accesos a { flex: none; display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px; background: var(--rw-sup); font-size: 13px; color: var(--rw-texto2); }
.rw-accesos .ic { width: 16px; height: 16px; color: #fff; }
.rw-lista { display: flex; flex-direction: column; gap: 10px; padding: 0 12px 110px; }
.rw-card { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 14px; background: var(--rw-sup); }
.rw-card img, .rw-card video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rw-card-chip { position: absolute; inset-inline-start: 12px; bottom: 12px; padding: 4px 9px; border-radius: 6px; background: rgba(0, 0, 0, .6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-size: 14px; font-weight: 500; }
.rw-card.sin-muestra { background: radial-gradient(110% 90% at 85% 0%, rgba(175, 243, 62, .16), transparent 60%), var(--rw-sup); aspect-ratio: 16 / 7; }
.rw-card-texto { position: absolute; inset: 16px; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; }
.rw-card-texto b { font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.rw-card-texto small { color: var(--rw-texto2); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rw-vacio { padding: 40px 16px; text-align: center; color: var(--rw-texto3); }
.rw-compositor { position: fixed; z-index: 30; left: 0; right: 0; bottom: calc(var(--nav-alto) + var(--seg-abajo) + 10px); width: calc(100% - 24px); max-width: calc(var(--ancho) - 24px); margin: 0 auto;
  display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 8px; border-radius: 16px; background: var(--rw-sup2); border: 1px solid var(--rw-linea); color: var(--rw-texto3); font-size: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .7); }
.tab[hidden] .rw-compositor { display: none; }
.rw-comp-mas { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: var(--rw-sup3); color: #fff; }
.rw-comp-mas .ic { width: 20px; height: 20px; }

/* ---------- Capas en Crear ---------- */
.capa.rw .capa-caja { background: var(--rw-sup); }
.rw-modelos { padding: 0 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.rw-modelos button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--rw-linea); text-align: start; }
.rw-modelos button[aria-pressed="true"] { background: var(--rw-sup3); }
.rw-modelos button:disabled { opacity: .4; }
.rw-modelos span { flex: 1; min-width: 0; }
.rw-modelos b { display: block; font-size: 16px; font-weight: 500; }
.rw-modelos small { display: block; margin-top: 2px; color: var(--rw-texto3); font-size: 13px; line-height: 1.35; }
.rw-modelos .ic { width: 18px; height: 18px; visibility: hidden; }
.rw-modelos [aria-pressed="true"] .ic { visibility: visible; }
.rw-origenes { padding: 0 8px 8px; }
.rw-origenes label, .rw-origenes button { width: 100%; display: flex; align-items: center; gap: 14px; min-height: 54px; padding: 0 14px; border-radius: 10px; font-size: 15px; cursor: pointer; }
.rw-origenes .ic { color: var(--rw-texto2); }
.rw-rejilla-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 0 8px 8px; }
.rw-rejilla-mini img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }
/* Menú lateral (en RTL entra por la derecha: ver el final) */
.capa.lateral .capa-caja { position: absolute; top: 0; bottom: 0; inset-inline-start: max(0px, calc((100vw - var(--ancho)) / 2)); width: min(82vw, 330px); background: var(--rw-sup);
  transform: translateX(-100%); transition: transform .24s ease-out; overflow-y: auto; }
.capa.lateral.abierta .capa-caja { transform: none; }
.rw-lateral { display: flex; flex-direction: column; gap: 2px; padding: calc(var(--seg-arriba) + 16px) 10px 24px; }
.rw-lat-marca { display: flex; align-items: center; gap: 10px; padding: 0 8px 14px; font-size: 18px; }
.rw-lateral a { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 10px; border-radius: 10px; font-size: 15px; }
.rw-lateral a .ic { width: 20px; height: 20px; color: var(--rw-texto2); }
.rw-lateral a em { margin-inline-start: auto; font-style: normal; color: var(--rw-texto3); font-size: 13px; }
.rw-lat-nuevo { background: var(--rw-sup3); margin-bottom: 8px; }
.rw-lateral h4 { padding: 18px 10px 6px; font-size: 12px; font-weight: 600; color: var(--rw-texto3); }
.rw-lat-rec span { min-width: 0; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rw-lat-rec small { display: block; color: var(--rw-texto3); font-size: 11px; }
.rw-lat-vacio { padding: 0 10px; color: var(--rw-texto3); font-size: 13px; }

/* Visor */
.rw-visor { display: flex; flex-direction: column; height: 100%; }
.rw-visor header { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; padding: var(--seg-arriba) 4px 0; min-height: calc(50px + var(--seg-arriba)); }
.rw-visor header span { text-align: center; font-size: 14px; color: var(--rw-texto2); }
.rw-visor-media { flex: 1; min-height: 0; display: grid; place-items: center; padding: 0 8px; }
.rw-visor-media img, .rw-visor-media video { max-width: 100%; max-height: 100%; border-radius: 8px; object-fit: contain; }
.rw-visor-audio { display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 300px; text-align: center; }
.rw-visor-audio > .ic { width: 64px; height: 64px; color: var(--rw-acento); }
.rw-visor-audio small { color: var(--rw-texto3); }
.rw-visor-prompt { padding: 10px 16px 4px; color: var(--rw-texto2); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rw-visor-acciones { display: flex; justify-content: space-around; padding: 10px 6px calc(12px + var(--seg-abajo)); }
.rw-visor-acciones button { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11.5px; color: var(--rw-texto2); }
.rw-visor-acciones .ic { width: 24px; height: 24px; color: #fff; }
.rw-visor-acciones [aria-pressed="true"] .ic { fill: #ffd60a; stroke: #ffd60a; }
.rw-detalles { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; padding: 4px 18px 12px; font-size: 14px; }
.rw-detalles dt { color: var(--rw-texto3); }

/* ---------- Editor ---------- */
.rw-ed-top { position: sticky; top: 0; z-index: 10; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; padding: calc(var(--seg-arriba) + 6px) 8px 6px; background: var(--rw-fondo); }
.rw-pill { justify-self: end; height: 32px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 999px; background: var(--rw-sup3); font-size: 13px; font-weight: 500; white-space: nowrap; }
.rw-pill .ic { width: 15px; height: 15px; margin-inline-end: 4px; }
.rw-pill.chico { height: 28px; font-size: 12px; margin-inline-end: 8px; }
.rw-panel { margin: 6px 12px; padding: 12px; border-radius: 16px; background: var(--rw-sup); }
.rw-modelo-chip { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 10px; border-radius: 8px; background: var(--rw-sup3); font-size: 14px; font-weight: 500; }
.rw-modelo-chip .ic { width: 16px; height: 16px; color: var(--rw-texto2); }
.rw-refs { margin: 12px 0 6px; }
.rw-refs-fila, .rw-marcos { display: flex; gap: 8px; overflow-x: auto; }
.rw-marcos .rw-ref { flex: 1; aspect-ratio: 16 / 10; }
.rw-ref { position: relative; flex: none; width: 88px; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; border-radius: 10px; background: var(--rw-sup2); }
.rw-ref.vacia { border: 1px dashed rgba(255, 255, 255, .22); background: transparent; color: var(--rw-texto3); align-content: center; gap: 4px; }
.rw-ref.vacia .ic { width: 22px; height: 22px; }
.rw-ref img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rw-ref small { position: relative; font-size: 11px; text-align: center; padding: 0 4px; }
.rw-ref:not(.vacia) small { position: absolute; inset-inline-start: 4px; bottom: 4px; padding: 1px 5px; border-radius: 4px; background: rgba(0, 0, 0, .6); color: #fff; }
.rw-ref button { position: absolute; top: 4px; inset-inline-end: 4px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: rgba(0, 0, 0, .65); }
.rw-ref button .ic { width: 12px; height: 12px; }
.rw-ref-nota { margin-top: 6px; color: var(--rw-texto3); font-size: 12px; }
.rw-panel textarea { width: 100%; min-height: 120px; margin-top: 6px; border: 0; outline: 0; resize: none; background: transparent; color: #fff; font-size: 17px; line-height: 1.45; }
.rw-panel textarea::placeholder { color: var(--rw-texto3); }
.rw-panel-pie { display: flex; align-items: center; justify-content: space-between; }
.rw-mejorar { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 999px; background: var(--rw-sup2); font-size: 12.5px; color: var(--rw-texto2); }
.rw-mejorar .ic { width: 15px; height: 15px; }
.rw-contador { color: var(--rw-texto3); font-size: 12px; }
.rw-ajustes { display: flex; gap: 8px; padding: 4px 12px 10px; overflow-x: auto; scrollbar-width: none; }
.rw-ajustes::-webkit-scrollbar { display: none; }
.rw-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 999px; background: var(--rw-sup); font-size: 14px; }
.rw-chip .ic { width: 16px; height: 16px; color: var(--rw-texto2); }
.rw-chip .ic:last-child { width: 14px; height: 14px; }
.rw-ed-pie { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px calc(12px + var(--seg-abajo)); background: linear-gradient(transparent, #000 30%); }
.rw-ed-nota { flex: 1; color: var(--rw-texto3); font-size: 12px; }
.rw-ed-nota a { color: var(--lima); }
.rw-generar { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 46px; padding: 0 24px; border-radius: 999px; background: var(--rw-acento); color: var(--sobre-acento); font-size: 16px; font-weight: 600; white-space: nowrap; box-shadow: var(--glow); }
.rw-generar .ic { width: 16px; height: 16px; }
.rw-generar:disabled { opacity: .35; }
.rw-generar.ancho { width: 100%; }
.rw-generar.chico { height: 34px; padding: 0 16px; font-size: 14px; }

/* ---------- Generaciones ---------- */
.rw-filtros { display: flex; gap: 8px; padding: 2px 12px 8px; overflow-x: auto; }
.rw-filtros button { flex: none; height: 32px; padding: 0 14px; border-radius: 999px; background: var(--rw-sup); color: var(--rw-texto2); font-size: 13px; }
.rw-filtros [aria-pressed="true"] { background: var(--lima); color: var(--sobre-acento); font-weight: 600; }
.rw-fecha { padding: 12px 14px 8px; font-size: 13px; font-weight: 600; color: var(--rw-texto3); }
.rw-gens { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0 12px; }
.rw-gen { min-width: 0; display: flex; flex-direction: column; gap: 6px; text-align: start; }
.rw-gen-media { position: relative; display: grid; place-items: center; aspect-ratio: 1; overflow: hidden; border-radius: 12px; background: var(--rw-sup); }
.rw-gen.video .rw-gen-media { aspect-ratio: 16 / 10; }
.rw-gen-media img, .rw-gen-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.rw-gen-tipo { position: absolute; inset-inline-end: 6px; bottom: 6px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: rgba(0, 0, 0, .6); }
.rw-gen-tipo .ic { width: 12px; height: 12px; fill: #fff; stroke: none; margin-left: 1px; }   /* play: físico */
.rw-gen-audio .ic { width: 36px; height: 36px; color: var(--rw-acento); }
.rw-gen-estado { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px; text-align: center; color: var(--rw-texto2); font-size: 12px; }
.rw-anillo { --p: 0; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%;
  background: conic-gradient(var(--rw-acento) calc(var(--p) * 1%), var(--rw-sup3) 0); position: relative; }
.rw-anillo::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--rw-sup); }
.rw-anillo b { position: relative; font-size: 12px; color: #fff; }
.rw-gen.pendiente .rw-gen-media { background: linear-gradient(110deg, var(--rw-sup) 30%, var(--rw-sup2) 50%, var(--rw-sup) 70%); background-size: 200% 100%; animation: brillo 1.6s linear infinite; }
@keyframes brillo { to { background-position: -200% 0; } }
.rw-gen-info b { display: block; font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rw-gen-info small { color: var(--rw-texto3); font-size: 11.5px; }

/* ---------- Biblioteca ---------- */
.rw-tabs { display: flex; gap: 20px; padding: 4px 16px 12px; border-bottom: 1px solid var(--rw-linea); }
.rw-tabs button { position: relative; padding-bottom: 8px; color: var(--rw-texto3); font-size: 15px; }
.rw-tabs [aria-selected="true"] { color: #fff; font-weight: 600; }
.rw-tabs [aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -13px; height: 2px; background: var(--lima); }
.rw-rejilla { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; padding: 10px 2px; }
.rw-recurso { position: relative; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; background: var(--rw-sup); }
.rw-recurso img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rw-fav { position: absolute; top: 4px; inset-inline-start: 4px; }
.rw-fav .ic { width: 16px; height: 16px; fill: #ffd60a; stroke: #ffd60a; }
.rw-nuevo-proyecto { display: flex; align-items: center; gap: 10px; width: calc(100% - 24px); margin: 12px; padding: 14px; border-radius: 12px; border: 1px dashed rgba(255, 255, 255, .2); color: var(--rw-texto2); }
.rw-proyectos { padding: 0 12px; }
.rw-proyectos li { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--rw-linea); }
.rw-proyectos .ic { color: var(--rw-texto2); }
.rw-proyectos b { display: block; font-size: 15px; font-weight: 500; }
.rw-proyectos small { color: var(--rw-texto3); font-size: 12px; }
.rw-input { width: 100%; height: 44px; margin-top: 14px; padding: 0 12px; border: 1px solid var(--rw-linea); border-radius: 10px; background: var(--rw-sup); color: #fff; outline: 0; }

/* ---------- Apps ---------- */
.rw-intro { padding: 0 16px 8px; color: var(--rw-texto2); font-size: 14px; }
.rw-apps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 10px; padding: 4px 12px; }
.rw-app { display: flex; flex-direction: column; gap: 4px; }
.rw-app-img { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 12px; background: var(--rw-sup); }
.rw-app-img > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Antes a la izquierda también en RTL, como el comparador. La miniatura no lleva dir="ltr": lo pone
   direction aquí, para que la img (200 % de ancho) se alinee por la izquierda y case con la de después. */
.rw-app-antes { position: absolute; inset: 0 50% 0 0; overflow: hidden; border-right: 2px solid #fff; direction: ltr; }
.rw-app-antes img { width: 200%; max-width: none; height: 100%; object-fit: cover; }
.rw-app-pronto { position: absolute; top: 8px; inset-inline-end: 8px; padding: 2px 8px; border-radius: 999px; background: rgba(0, 0, 0, .7); font-size: 11px; }
.rw-app b { margin-top: 4px; font-size: 14px; font-weight: 600; }
.rw-app small { color: var(--rw-texto3); font-size: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* El comparador va con dir="ltr" (crear-app.js): antes a la izquierda y el deslizador sin voltear. */
.rw-comparador { --corte: 50%; position: relative; margin: 4px 12px; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 14px; background: var(--rw-sup); }
.rw-comparador > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rw-comp-antes { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--corte)) 0 0); }
.rw-comp-antes img { width: 100%; height: 100%; object-fit: cover; }
.rw-comp-linea { position: absolute; top: 0; bottom: 0; left: var(--corte); width: 2px; margin-left: -1px; background: #fff; pointer-events: none; }
.rw-comp-linea i { position: absolute; top: 50%; left: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: #fff; color: #000; }
.rw-comp-linea .ic { width: 12px; height: 12px; stroke-width: 3; }
.rw-comp-et { position: absolute; top: 10px; padding: 2px 8px; border-radius: 6px; background: rgba(0, 0, 0, .55); font-size: 12px; pointer-events: none; }
.rw-comp-et.izq { left: 10px; } .rw-comp-et.der { right: 10px; }
.rw-comparador input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; }
.rw-app-desc { padding: 12px 16px 4px; color: var(--rw-texto2); }
.rw-form { display: flex; flex-direction: column; gap: 16px; padding: 12px 16px; }
.rw-campo { display: flex; flex-direction: column; gap: 8px; }
.rw-campo > span { font-size: 14px; font-weight: 500; }
.rw-campo em { color: var(--rw-texto3); font-style: normal; font-weight: 400; }
.rw-campo textarea { width: 100%; padding: 12px; border: 1px solid var(--rw-linea); border-radius: 12px; background: var(--rw-sup); color: #fff; resize: none; outline: 0; font-size: 15px; }
.rw-opciones { display: flex; flex-wrap: wrap; gap: 8px; }
.rw-opciones button { height: 34px; padding: 0 14px; border-radius: 999px; background: var(--rw-sup); font-size: 13px; color: var(--rw-texto2); }
.rw-opciones [aria-pressed="true"] { background: var(--lima); color: var(--sobre-acento); font-weight: 600; }
.rw-subir { position: relative; height: 120px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; overflow: hidden; border-radius: 12px; border: 1px dashed rgba(255, 255, 255, .22); color: var(--rw-texto3); }
.rw-subir.lleno { border-style: solid; color: #fff; }
.rw-subir img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rw-form-pie { position: sticky; bottom: 0; padding: 12px 16px calc(12px + var(--seg-abajo)); background: linear-gradient(transparent, #000 30%); }

/* ---------- Chat ---------- */
.rw-chat-pagina { display: flex; flex-direction: column; overflow: hidden !important; }
.rw-chat-top { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; padding: var(--seg-arriba) 4px 0; min-height: calc(50px + var(--seg-arriba)); }
.rw-chat-top h1 { text-align: center; font-size: 16px; font-weight: 600; }
.rw-beta { margin-inline-start: 4px; padding: 1px 5px; border: 1px solid var(--rw-texto3); border-radius: 4px; font-size: 9px; color: var(--rw-texto2); vertical-align: middle; }
.rw-chat { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 12px; }
.rw-chat-vacio { margin: auto 0; text-align: center; padding: 20px 8px; }
.rw-chat-vacio h2 { font-size: 30px; font-weight: 500; line-height: 1.15; letter-spacing: -.02em; }
.rw-chat-vacio p { margin-top: 10px; color: var(--rw-texto2); }
.rw-habilidades { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 22px; }
.rw-habilidades button { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px; background: var(--rw-sup); font-size: 13px; color: var(--rw-texto2); }
.rw-habilidades .ic { width: 14px; height: 14px; }
.rw-msg { max-width: 88%; }
.rw-msg.yo { align-self: flex-end; }
.rw-msg.yo p { padding: 10px 14px; border-radius: 18px; border-end-end-radius: 4px; background: var(--rw-sup3); }
.rw-msg-adj { display: flex; gap: 4px; justify-content: flex-end; margin-bottom: 4px; }
.rw-msg-adj img { width: 60px; height: 60px; border-radius: 8px; object-fit: cover; }
.rw-msg.ia { align-self: flex-start; }
.rw-msg.ia > p { line-height: 1.5; }
.rw-puntos { display: inline-flex; gap: 4px; padding: 8px 0; }
.rw-puntos i { width: 7px; height: 7px; border-radius: 50%; background: var(--rw-texto3); animation: latido 1s infinite; }
.rw-puntos i:nth-child(2) { animation-delay: .15s; } .rw-puntos i:nth-child(3) { animation-delay: .3s; }
@keyframes latido { 50% { opacity: .3; transform: translateY(-2px); } }
.rw-propuesta { margin-top: 10px; padding: 12px; border-radius: 14px; background: var(--rw-sup); border: 1px solid var(--rw-linea); }
.rw-prop-modelo { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 6px; background: var(--rw-sup3); font-size: 12px; }
.rw-prop-modelo .ic { width: 14px; height: 14px; }
.rw-propuesta p { margin: 8px 0 12px; color: var(--rw-texto2); font-size: 14px; }
.rw-prop-botones { display: flex; justify-content: flex-end; gap: 8px; }
.rw-compositor-chat { margin: 8px 10px calc(10px + var(--seg-abajo)); padding: 10px; border-radius: 20px; background: var(--rw-sup2); }
.rw-compositor-chat textarea { width: 100%; border: 0; outline: 0; resize: none; background: transparent; color: #fff; font-size: 16px; }
.rw-compositor-chat textarea::placeholder { color: var(--rw-texto3); }
.rw-adjuntos { display: flex; gap: 6px; margin-bottom: 8px; }
.rw-adj { position: relative; width: 56px; height: 56px; }
.rw-adj img { width: 100%; height: 100%; border-radius: 10px; object-fit: cover; }
.rw-adj button { position: absolute; top: -5px; inset-inline-end: -5px; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: #444; }
.rw-adj .ic { width: 11px; height: 11px; }
.rw-comp-fila { display: flex; align-items: center; gap: 6px; }
.rw-comp-fila span { flex: 1; }
.rw-comp-btn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--rw-sup3); }
.rw-comp-btn .ic { width: 18px; height: 18px; }
.rw-enviar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--rw-acento); color: var(--sobre-acento); box-shadow: var(--glow); }
.rw-enviar .ic { width: 20px; height: 20px; stroke-width: 2.4; }

/* ---------- Planes ---------- */
.rw-planes-saldo { display: flex; align-items: center; gap: 8px; margin: 0 16px 8px; padding: 12px 14px; border-radius: 12px; background: var(--rw-sup); color: var(--rw-texto2); font-size: 13px; }
.rw-planes-saldo b { color: #fff; font-size: 18px; }
.rw-planes-saldo .ic { width: 18px; height: 18px; color: #fff; }
.rw-aviso { display: flex; align-items: center; gap: 8px; margin: 8px 16px; padding: 10px 12px; border-radius: 10px; background: rgba(175, 243, 62, .1); color: var(--lima-clara); font-size: 12.5px; }
.rw-aviso .ic { width: 18px; height: 18px; }
.rw-planes { display: flex; flex-direction: column; gap: 12px; padding: 8px 16px; }
.rw-plan { position: relative; padding: 18px 16px 16px; border-radius: 16px; background: var(--rw-sup); border: 1px solid var(--rw-linea); }
.rw-plan.destacado { border-color: var(--rw-acento); background: linear-gradient(170deg, rgba(175, 243, 62, .14), var(--rw-sup) 55%); }
.rw-plan-etq { position: absolute; top: 14px; inset-inline-end: 14px; padding: 2px 8px; border-radius: 999px; background: var(--rw-acento); color: var(--sobre-acento); font-size: 11px; font-weight: 600; }
.rw-plan h3 { font-size: 18px; }
.rw-plan-precio { margin: 4px 0 12px; font-size: 20px; font-weight: 600; }
.rw-plan-precio small { color: var(--rw-texto3); font-size: 13px; font-weight: 400; }
.rw-plan ul { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.rw-plan li { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; color: var(--rw-texto2); }
.rw-plan li .ic { width: 16px; height: 16px; margin-top: 2px; color: #fff; stroke-width: 2.4; }
.btn-borde.ancho { width: 100%; }
.rw-sub { padding: 18px 16px 8px; font-size: 13px; font-weight: 600; color: var(--rw-texto3); }
.rw-paquetes { margin: 0 16px; border-radius: 14px; background: var(--rw-sup); overflow: hidden; }
.rw-paquetes li + li { border-top: 1px solid var(--rw-linea); }
.rw-paquetes button { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 14px; }
.rw-paquetes span { flex: 1; }
.rw-paquetes b { display: block; font-size: 15px; font-weight: 500; }
.rw-paquetes small { color: var(--lima); font-size: 12px; }
.rw-paquetes em { font-style: normal; color: var(--rw-texto3); font-size: 13px; }
.rw-uso { display: flex; align-items: center; gap: 6px; margin: 16px auto; color: var(--rw-texto2); font-size: 13px; }
.rw-uso .ic { width: 16px; height: 16px; }
.rw-uso-texto { padding: 0 18px; color: var(--rw-texto2); font-size: 14px; }
.rw-uso-lista { padding: 12px 18px; display: flex; flex-direction: column; gap: 10px; }
.rw-uso-lista li { display: flex; align-items: center; gap: 10px; }
.rw-uso-lista span { flex: 1; }
.rw-uso-lista em { font-style: normal; color: var(--rw-texto3); font-size: 13px; }

/* ---------- Anuncio (DramaBox) ---------- */
.db-desb-anuncio { width: 100%; display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 10px; background: var(--acento-suave); border: 1px solid rgba(175, 243, 62, .45); text-align: start; }
.db-desb-anuncio .ic { width: 26px; height: 26px; padding: 5px; border-radius: 50%; background: var(--db-grad); fill: var(--sobre-acento); stroke: none; }
.db-desb-anuncio b { display: block; font-size: 14px; }
.db-desb-anuncio small { color: var(--db-texto2); font-size: 12px; }
.db-desb-anuncio:disabled { opacity: .5; }
.db-anuncio { position: relative; height: 100%; display: grid; place-items: center; background: linear-gradient(160deg, #1b1b1f, #000); }
.db-anuncio-marca { position: absolute; top: calc(var(--seg-arriba) + 14px); inset-inline-start: 14px; padding: 2px 8px; border-radius: 4px; background: #ffd60a; color: #000; font-size: 11px; font-weight: 700; }
.db-anuncio-cuerpo { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px; text-align: center; }
.db-anuncio-cuerpo p { color: rgba(255, 255, 255, .6); max-width: 260px; }
.db-anuncio-cerrar { position: absolute; top: calc(var(--seg-arriba) + 10px); inset-inline-end: 12px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .15); font-weight: 700; }
.db-anuncio-cerrar .ic { width: 18px; height: 18px; }

/* ---------- Toques Cocuyo ---------- */
.rw-chat-vacio h2, .db-vip-cab h2, .db-login h2, .db-ficha-pronto-info h2, .sin-servicio h1, .splash b {
  font-family: "Fraunces", Georgia, serif; font-weight: 600; letter-spacing: -.02em;
}
.rw-chat-vacio h2 em, .db-login h2 em { font-style: italic; color: var(--lima); }
/* Botón Generar con una luz que recorre el borde (inspirado en «Shimmer Button» de 21st.dev) */
.rw-generar:not(:disabled) { position: relative; isolation: isolate; overflow: hidden; }
.rw-generar:not(:disabled)::after {
  content: ""; position: absolute; inset: -40% -10%; z-index: -1;
  background: linear-gradient(100deg, transparent 35%, rgba(255, 255, 255, .55) 50%, transparent 65%);
  transform: translateX(-60%); animation: destello 2.8s ease-in-out infinite;
}
@keyframes destello { 60%, 100% { transform: translateX(60%); } }
/* Estado «generando» (parpadeo suave, inspirado en «Animated Generate Button») */
.rw-gen.pendiente .rw-anillo { box-shadow: 0 0 18px rgba(175, 243, 62, .35); }
/* Marca con las dos O encendidas */
.marca-cocuyo { font-weight: 800; letter-spacing: .06em; }
.marca-cocuyo i { font-style: normal; color: var(--lima); text-shadow: 0 0 10px rgba(175, 243, 62, .8); }
/* Pantalla de arranque */
.splash { position: fixed; inset: 0; z-index: 500; display: grid; place-content: center; justify-items: center; gap: 14px; background: var(--negro); transition: opacity .35s; }
.splash img { width: 86px; height: 86px; filter: drop-shadow(0 0 22px rgba(175, 243, 62, .55)); animation: latidoLuz 1.6s ease-in-out infinite; }
.splash b { font-size: 26px; }
.splash small { color: #94a3b8; }
.splash.fuera { opacity: 0; pointer-events: none; }
@keyframes latidoLuz { 50% { filter: drop-shadow(0 0 34px rgba(175, 243, 62, .85)); } }

/* ---------- Imágenes propias (GPT Image 2.5 Flare, generadas en el Estudio) ---------- */
.estado-vacio-img { display: block; width: 148px; height: 148px; margin: 0 auto 18px; border-radius: 28px; object-fit: cover;
  box-shadow: 0 0 0 1px var(--escarcha-borde), 0 18px 48px rgba(175, 243, 62, .12); }
.estado-vacio { padding-top: 48px; }
.db-login-hero { position: relative; width: calc(100% + 48px); margin: -12px -24px 4px; aspect-ratio: 16 / 10; overflow: hidden; }
.db-login-hero img { width: 100%; height: 100%; object-fit: cover; object-position: center 45%; display: block; }
.db-login-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5,5,5,0) 40%, var(--fondo) 100%); }
.db-vip-arte { display: block; width: 100%; height: auto; max-width: 420px; margin: 0 auto -8px; aspect-ratio: 16 / 9; object-fit: cover;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 55%, transparent 100%); mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 55%, transparent 100%); }

/* ---------- Bienvenida (primera vez) ---------- */
.capa.bienvenida .capa-caja { background: var(--negro); display: flex; flex-direction: column; }
.bv-pista { flex: 1; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; }
.bv-pista::-webkit-scrollbar { display: none; }
.bv-paso { position: relative; flex: 0 0 100%; min-width: 0; scroll-snap-align: start; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; }
.bv-paso > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bv-paso::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5,5,5,.15) 0%, rgba(5,5,5,0) 35%, rgba(5,5,5,.85) 72%, var(--negro) 100%); pointer-events: none; }
.bv-texto { position: relative; z-index: 1; padding: 0 28px 150px; }
.bv-texto h2 { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 32px; line-height: 1.08; letter-spacing: -.02em; }
.bv-texto h2 em { font-style: italic; color: var(--lima); }
.bv-texto p { margin-top: 10px; color: var(--texto2); font-size: 15px; line-height: 1.45; }
.bv-gustos { justify-content: flex-start; padding-top: calc(env(safe-area-inset-top) + 72px); }
.bv-gustos::after { display: none; }
.bv-gustos .bv-texto { padding-bottom: 20px; }
.bv-chips { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 10px; padding: 0 28px 150px; overflow-y: auto; }
.bv-chip { display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: 999px; background: var(--escarcha); border: 1px solid var(--escarcha-borde); color: var(--texto); font-size: 14px; }
.bv-chip svg { width: 16px; height: 16px; display: none; }
.bv-chip.activo { background: var(--lima); border-color: var(--lima); color: var(--sobre-acento); font-weight: 600; }
.bv-chip.activo svg { display: block; }
.bv-cargando { color: var(--texto3); font-size: 14px; }
.bv-saltar { position: absolute; top: calc(env(safe-area-inset-top) + 14px); inset-inline-end: 16px; z-index: 2; padding: 8px 14px; border-radius: 999px; background: rgba(5,5,5,.45); color: var(--texto); font-size: 14px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.bv-pie { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 0 24px calc(env(safe-area-inset-bottom) + 24px); }
.bv-puntos { display: flex; justify-content: center; gap: 6px; margin-bottom: 18px; }
.bv-puntos i { width: 6px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.3); transition: width .25s, background .25s; }
.bv-puntos i.activo { width: 22px; background: var(--lima); }

/* ---------- Modelos aún sin conectar en la app ---------- */
.rw-card.pronto { cursor: default; }
.rw-card.pronto > img, .rw-card.pronto > video { filter: grayscale(.85) brightness(.55); }
.rw-card-pronto { position: absolute; top: 10px; inset-inline-end: 10px; padding: 4px 10px; border-radius: 999px; background: rgba(5,5,5,.7);
  border: 1px solid var(--escarcha-borde); color: var(--texto2); font-size: 11px; font-weight: 600; letter-spacing: .02em; }
.rw-pronto { font-style: normal; color: var(--lima); }
.rw-modelos button:disabled { opacity: .55; }

/* ---------- Modos de PixVerse (24-sep-2026) ----------
   Herramientas en fichas de color con icono (como las de PixVerse), en
   tonos propios de Cocuyo. Efectos de un toque en rejilla. */
.tono-aurora { --t1: #4f7cff; --t2: #a855f7; --t3: #ec4899; }
.tono-oceano { --t1: #0ea5e9; --t2: #2563eb; --t3: #312e81; }
.tono-lima { --t1: #aff33e; --t2: #22c55e; --t3: #0f766e; }
.tono-violeta { --t1: #8b5cf6; --t2: #c026d3; --t3: #581c87; }
.tono-fiesta { --t1: #f97316; --t2: #ec4899; --t3: #7c3aed; }
.tono-atardecer { --t1: #fbbf24; --t2: #f97316; --t3: #be123c; }
.tono-noche { --t1: #334155; --t2: #1e3a8a; --t3: #0f172a; }
.tono-tormenta { --t1: #64748b; --t2: #1d4ed8; --t3: #111827; }
.tono-hielo { --t1: #e0f2fe; --t2: #38bdf8; --t3: #1e40af; }
.tono-halloween { --t1: #fb923c; --t2: #c2410c; --t3: #4c1d95; }
[class*="tono-"] { background: linear-gradient(135deg, var(--t1), var(--t2) 55%, var(--t3)); }

.rw-sec { padding: 6px 16px 8px; font-size: 15px; font-weight: 600; color: var(--rw-texto2); }
.rw-herrs { display: grid; grid-auto-flow: column; grid-template-rows: repeat(2, auto); grid-auto-columns: 96px; gap: 8px;
  padding: 0 12px 14px; overflow-x: auto; scrollbar-width: none; }
.rw-herrs::-webkit-scrollbar { display: none; }
.rw-herr { position: relative; display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 12px 6px 10px; border-radius: 16px;
  text-align: center; color: #fff; min-height: 96px; }
.rw-herr b { max-width: 100%; font-size: 12px; font-weight: 600; line-height: 1.2; text-shadow: 0 1px 6px rgba(0, 0, 0, .35); overflow-wrap: anywhere; }
.rw-herr-ic { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: rgba(255, 255, 255, .18); }
.rw-herr-ic .ic { width: 22px; height: 22px; }
.rw-herr em { position: absolute; top: 5px; inset-inline-end: 5px; padding: 1px 6px; border-radius: 999px; font-size: 9px; font-style: normal; font-weight: 700; background: rgba(0, 0, 0, .55); }
.rw-herr .rw-herr-nuevo { background: var(--lima); color: #0a0a0a; }
.rw-herr.pronto { background: var(--rw-sup); color: var(--rw-texto3); }
.rw-herr.pronto .rw-herr-ic { background: var(--rw-sup3); }
.rw-herr.pronto em { position: static; background: none; padding: 0; color: var(--rw-texto3); font-weight: 500; }

/* Modos dentro del editor: Texto · Imagen a video · Transición · Referencias */
.rw-herr-tabs { display: flex; gap: 6px; padding: 2px 12px 4px; overflow-x: auto; scrollbar-width: none; }
.rw-herr-tabs::-webkit-scrollbar { display: none; }
.rw-herr-tabs button { flex: none; height: 32px; padding: 0 14px; border-radius: 999px; background: var(--rw-sup); color: var(--rw-texto2); font-size: 13px; font-weight: 500; }
.rw-herr-tabs button[aria-pressed="true"] { background: #fff; color: #0a0a0a; }
.rw-marcos { align-items: center; }
.rw-marcos.uno .rw-ref { aspect-ratio: 16 / 9; }
.rw-marcos-flecha { flex: none; color: var(--rw-texto3); }
.rw-marcos-flecha .ic { width: 18px; height: 18px; }
.rw-ref-icono { display: grid; place-items: center; color: var(--rw-texto2); }
.rw-ref-icono .ic { width: 26px; height: 26px; }
.rw-ref-tipo { position: absolute; inset-inline-start: 4px; top: 4px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: rgba(0, 0, 0, .6); }
.rw-ref-tipo .ic { width: 12px; height: 12px; }
.rw-rejilla-mini button { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 6px; background: var(--rw-sup2); display: grid; place-items: center; }
.rw-rejilla-mini button img { position: absolute; inset: 0; }
.rw-origen-nota { padding: 0 20px 14px; color: var(--rw-texto3); font-size: 12px; }

/* Declaración de derechos antes de subir una foto */
.rw-derechos { display: flex; flex-direction: column; gap: 12px; padding: 0 18px 18px; }
.rw-derechos label { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.4; }
.rw-derechos input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--lima); flex: none; }
.rw-derechos p { color: var(--rw-texto3); font-size: 12px; }
.rw-derechos-botones { display: flex; gap: 10px; justify-content: flex-end; }

/* Efectos de un toque */
.rw-efectos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 4px 12px 24px; }
.rw-efecto { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; aspect-ratio: 3 / 4; padding: 12px; overflow: hidden; border-radius: 16px; color: #fff; }
.rw-efecto::after { content: ''; position: absolute; inset: 40% 0 0; background: linear-gradient(transparent, rgba(0, 0, 0, .55)); }
.rw-efecto > * { position: relative; z-index: 1; }
.rw-efecto b { font-size: 16px; font-weight: 700; }
.rw-efecto small { font-size: 12px; opacity: .85; line-height: 1.3; }
.rw-efecto-ic { position: absolute !important; top: 14px; inset-inline-start: 14px; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: rgba(255, 255, 255, .2); }
.rw-efecto-ic .ic { width: 26px; height: 26px; }
.rw-efecto .rw-app-pronto { position: absolute; top: 10px; inset-inline-end: 10px; }
.rw-efecto-cab { position: relative; height: 180px; margin: 4px 12px 0; border-radius: 18px; display: grid; place-items: center; }
.rw-efecto-cab .rw-efecto-ic { position: static !important; width: 76px; height: 76px; border-radius: 22px; }
.rw-efecto-cab .rw-efecto-ic .ic { width: 40px; height: 40px; }
.rw-subir > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rw-subir.lleno small { position: absolute; inset-inline-start: 8px; bottom: 8px; padding: 2px 6px; border-radius: 4px; background: rgba(0, 0, 0, .6); }
.rw-form-pie .rw-ed-nota { margin-bottom: 8px; }

/* ---------- Derecha a izquierda (ar, he, fa, ur) ---------- */
/* El menú lateral sale del lado derecho. */
[dir="rtl"] .capa.lateral:not(.abierta) .capa-caja { transform: translateX(100%); }

/* Duración segundo a segundo (crear-editor.js, elegirSegundos). */
.rw-segundos { display: grid; gap: 14px; padding: 4px 20px 20px; }
.rw-segundos b { font-size: 28px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.rw-segundos input[type="range"] { width: 100%; accent-color: var(--acento); height: 32px; }
.rw-segundos-extremos { display: flex; justify-content: space-between; margin-top: -8px; font-size: 12px; color: var(--texto3); }
