/* =====================================================================
   NovelaClip · Sistema de diseño
   Oscuro, sobrio y de estudio de cine. Un solo acento (degradado de marca).
   ===================================================================== */
:root {
  color-scheme: dark;
  /* Superficies */
  --bg: #07070b;
  --bg-2: #0b0b11;
  --surface: #101017;
  --surface-2: #16161f;
  --surface-3: #1e1e29;
  --surface-4: #262633;
  /* Texto */
  --text: #f4f4f7;
  --text-2: #c9c9d4;
  --muted: #9592a8;
  --faint: #8a8799;
  /* Bordes */
  --line: rgba(255, 255, 255, 0.075);
  --line-2: rgba(255, 255, 255, 0.12);
  --line-3: rgba(255, 255, 255, 0.2);
  /* Marca */
  --accent: #b4a5ff;
  --accent-2: #a78bfa;
  --violet: #8b5cf6;
  --gold: #f5b942;
  --grad: linear-gradient(135deg, #7457f2 0%, #5b3fe0 100%);
  --grad-soft: linear-gradient(135deg, rgba(124, 95, 245, 0.16), rgba(91, 63, 224, 0.1));
  --soft: rgba(124, 99, 255, 0.14);
  --ring: 0 0 0 1px rgba(160, 140, 255, 0.55), 0 0 0 4px rgba(140, 118, 255, 0.2);
  --ok: #34d399;
  --warn: #fbbf24;
  --err: #f87171;
  /* Forma */
  --r-xs: 8px;
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 18px;
  --r-xl: 24px;
  --radius: var(--r-lg);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 10px 30px -12px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, 0.75);
  /* Tipografía */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Plus Jakarta Sans", var(--font);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --side: 264px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  background: var(--bg);
  min-height: 100vh;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01";
}
[hidden] { display: none !important; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; word-spacing: 0.06em; line-height: 1.2; text-wrap: balance; }
p, li { text-wrap: pretty; }
p { line-height: 1.6; }
a { color: var(--accent-2); }
img, video { max-width: 100%; }
::selection { background: rgba(124, 95, 245, 0.35); }
.muted { color: var(--muted); }
.small { font-size: 0.86rem; }
.center { text-align: center; }
.error { color: var(--err); min-height: 1.2em; margin: 4px 0; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.88em; background: var(--surface-3); padding: 1px 6px; border-radius: 6px; }

.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.logo { width: 30px; height: 30px; flex: none; border-radius: 9px; box-shadow: 0 6px 18px -6px rgba(116, 87, 242, 0.7); }

/* Barras de desplazamiento discretas */
* { scrollbar-width: thin; scrollbar-color: var(--surface-4) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--surface-4); border-radius: 99px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* Foco visible accesible */
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
button:focus:not(:focus-visible) { outline: none; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: var(--r-sm); padding: 10px 16px;
  font: inherit; font-size: 0.92rem; font-weight: 600; letter-spacing: -0.005em; line-height: 1.2;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform 0.12s var(--ease), background 0.18s, border-color 0.18s, box-shadow 0.2s, opacity 0.2s, filter 0.2s;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn .ic { width: 17px; height: 17px; }
.btn.primary {
  background: var(--grad); color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 8px 24px -8px rgba(116, 87, 242, 0.65);
}
.btn.primary:hover:not(:disabled) { filter: brightness(1.08) saturate(1.05); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 12px 30px -8px rgba(116, 87, 242, 0.8); }
.btn.ghost { background: rgba(255, 255, 255, 0.04); color: var(--text); border-color: var(--line-2); }
.btn.ghost:hover:not(:disabled) { background: rgba(255, 255, 255, 0.08); border-color: var(--line-3); }
.btn.soft { background: var(--grad-soft); color: #cdc2ff; border-color: rgba(124, 95, 245, 0.22); }
.btn.soft:hover:not(:disabled) { border-color: rgba(124, 95, 245, 0.45); color: #fff; }
.btn.lg { padding: 14px 22px; font-size: 1rem; border-radius: var(--r); }
.btn.sm { padding: 7px 12px; font-size: 0.84rem; border-radius: var(--r-xs); }
.btn.block { width: 100%; }
.link { background: none; border: 0; color: var(--accent-2); font: inherit; font-weight: 600; cursor: pointer; padding: 4px; text-decoration: none; }
.link:hover { color: #c4b5fd; text-decoration: underline; text-underline-offset: 3px; }
.icon-link { display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r-xs); border: 0; background: none; color: var(--muted); cursor: pointer; }
.icon-link:hover { background: var(--surface-3); color: var(--text); }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.03); color: var(--text-2); border-radius: 999px;
  padding: 7px 14px; font: inherit; font-size: 0.86rem; font-weight: 500; cursor: pointer; transition: all 0.15s;
}
.chip:hover { border-color: var(--line-3); color: var(--text); background: rgba(255, 255, 255, 0.06); }
.chip.on { border-color: rgba(124, 95, 245, 0.6); background: var(--soft); color: #fff; }

/* ---------- Formularios ---------- */
textarea, input, select {
  width: 100%; font: inherit; font-size: 0.95rem; color: var(--text); background: var(--bg-2);
  border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 11px 13px; outline: none;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
textarea:hover, input:hover, select:hover { border-color: var(--line-3); }
textarea:focus, input:focus, select:focus { border-color: rgba(167, 139, 250, 0.7); background: var(--surface); box-shadow: 0 0 0 4px rgba(167, 139, 250, 0.14); }
::placeholder { color: var(--faint); }
select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238d8d9e' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center;
}
select option { background: var(--surface-2); color: var(--text); }
textarea { resize: vertical; line-height: 1.55; }
input[type="checkbox"] { width: auto; accent-color: var(--accent); }
select:disabled, input:disabled { opacity: 0.55; cursor: not-allowed; }
.label { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; font-weight: 600; font-size: 0.84rem; margin: 20px 0 8px; color: var(--text-2); }
.label small { font-weight: 400; }

/* ======================================================================
   PORTADA
   ====================================================================== */
#landing { position: relative; overflow-x: clip; }
/* La portada se ve sin esperar a app.js; con la marca de sesión (script del <head>) se oculta hasta que app.js decide. */
html.nc-session #landing { display: none; }
#landing::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1100px; pointer-events: none; z-index: 0;
  background:
    radial-gradient(800px 480px at 78% 4%, rgba(139, 92, 246, 0.2), transparent 65%),
    radial-gradient(680px 440px at 10% 0%, rgba(124, 95, 245, 0.13), transparent 65%);
}
#landing::after {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 900px; pointer-events: none; z-index: 0; opacity: 0.5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 20%, transparent 75%);
}
#landing > * { position: relative; z-index: 1; }
#landing > .topbar { position: sticky; top: 0; z-index: 40; }

.topbar {
  padding-top: env(safe-area-inset-top);
  background: rgba(7, 7, 11, 0.72); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.topbar-in { display: flex; align-items: center; gap: 28px; max-width: 1200px; margin: 0 auto; padding: 14px 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 1.08rem; letter-spacing: -0.02em; color: var(--text); text-decoration: none; }
.top-links { display: flex; gap: 4px; margin-right: auto; }
.top-links a { color: var(--muted); text-decoration: none; font-size: 0.9rem; font-weight: 500; padding: 8px 12px; border-radius: var(--r-xs); transition: color 0.15s, background 0.15s; }
.top-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.top-actions { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }
.top-actions .btn { white-space: nowrap; flex-shrink: 0; }

.section { max-width: 1200px; margin: 0 auto; padding: 96px 24px 0; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 44px; }
.section-head h2 { font-size: clamp(1.75rem, 3.6vw, 2.6rem); letter-spacing: -0.035em; line-height: 1.1; font-weight: 800; }
.section-head p { margin: 14px auto 0; font-size: 1.05rem; max-width: 560px; }
.kicker { display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }

/* Hero */
.hero {
  max-width: 1200px; margin: 0 auto; padding: 72px 24px 56px;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; font-size: 0.84rem; font-weight: 600; color: var(--text-2);
  padding: 6px 14px 6px 10px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.03);
}
.eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(124, 95, 245, 0.18); animation: livePulse 2s ease-in-out infinite; }
@keyframes livePulse { 50% { box-shadow: 0 0 0 7px rgba(124, 95, 245, 0.05); } }
.hero h1 { font-size: clamp(2.4rem, 5.4vw, 4.2rem); line-height: 1.02; margin: 22px 0 20px; font-weight: 800; letter-spacing: -0.045em; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 560px; margin: 0; line-height: 1.6; }
.hero-cta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.hero-trust { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 0; margin: 26px 0 0; color: var(--muted); font-size: 0.9rem; }
.hero-trust li { display: inline-flex; align-items: center; gap: 7px; }
.hero-trust .ic { width: 16px; height: 16px; color: var(--ok); stroke-width: 2.4; }

.hero-visual { position: relative; height: 560px; display: grid; place-items: center; }
.hv-phone {
  position: absolute; width: 230px; aspect-ratio: 9 / 16; border-radius: 30px; overflow: hidden; background: #000;
  border: 1px solid var(--line-2); box-shadow: var(--shadow-lg), 0 0 0 6px rgba(255, 255, 255, 0.025);
}
.hv-phone img, .hv-phone video { width: 100%; height: 100%; object-fit: cover; display: block; }
.hv-main { width: 268px; z-index: 2; box-shadow: 0 40px 100px -20px rgba(139, 92, 246, 0.55), 0 0 0 6px rgba(255, 255, 255, 0.04); }
.hv-left { transform: translateX(-58%) rotate(-7deg) scale(0.88); opacity: 0.7; }
.hv-right { transform: translateX(58%) rotate(7deg) scale(0.88); opacity: 0.7; }
.hv-left::after, .hv-right::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7, 7, 11, 0.1), rgba(7, 7, 11, 0.55)); }
.hv-badge {
  position: absolute; bottom: 14px; left: 14px; display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 999px; font-size: 0.74rem; font-weight: 600; color: #fff;
  background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, 0.15);
}
.hv-badge .ic { width: 13px; height: 13px; }
.hv-chip {
  position: absolute; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px;
  border-radius: var(--r); background: rgba(22, 22, 31, 0.82); border: 1px solid var(--line-2);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--shadow-lg);
  animation: floaty 6s ease-in-out infinite;
}
.hv-chip .ic { width: 34px; height: 34px; padding: 8px; border-radius: 10px; background: var(--grad); color: #fff; stroke-width: 2; }
.hv-chip div { display: flex; flex-direction: column; }
.hv-chip b { font-size: 0.85rem; }
.hv-chip small { font-size: 0.74rem; color: var(--muted); }
.hv-chip-a { left: 0; top: 22%; }
.hv-chip-b { right: 0; bottom: 18%; animation-delay: -3s; }
@keyframes floaty { 50% { transform: translateY(-8px); } }

/* Franja "todo en una herramienta" */
.pipeline { max-width: 1200px; margin: 0 auto; padding: 8px 24px 0; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.pipeline > span { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.pipeline ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.pipeline li { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); color: var(--text-2); font-size: 0.9rem; font-weight: 500; }
.pipeline li .ic { width: 16px; height: 16px; color: var(--accent-2); }

/* Ejemplos: serie destacada en horizontal (arriba de los verticales) */
.ep-feature {
  display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 28px; align-items: center; margin: 0 0 28px; padding: 18px;
  border-radius: var(--r-xl); border: 1px solid var(--line-2); background: linear-gradient(135deg, rgba(139, 92, 246, 0.12), rgba(255, 255, 255, 0.02));
}
.ep-player { position: relative; margin: 0; border-radius: var(--r-lg); overflow: hidden; background: #000; aspect-ratio: 16 / 9; border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.ep-player img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Serie vertical (9:16): el video más angosto y el texto al lado */
.ep-feature.ep-vertical { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); }
.ep-vertical .ep-player { aspect-ratio: 9 / 16; }
.ep-tag { position: absolute; left: 12px; top: 12px; padding: 6px 12px; border-radius: 999px; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); color: #fff; font-size: 0.78rem; font-weight: 600; }
.ep-copy .kicker { margin-bottom: 6px; }
.ep-copy h3 { margin: 0 0 10px; font-family: var(--font-display); font-size: 1.6rem; line-height: 1.2; }
.ep-copy p { margin: 0 0 14px; color: var(--text-2); line-height: 1.55; }
.ep-points { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 8px; }
.ep-points li { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 0.92rem; }
.ep-points .ic { width: 16px; height: 16px; flex: none; color: var(--accent-2); }
.ep-cta { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 900px) {
  .ep-feature { grid-template-columns: 1fr; gap: 16px; padding: 12px; }
  .ep-feature.ep-vertical { grid-template-columns: 1fr; }
  .ep-vertical .ep-player { width: 100%; max-width: 300px; margin: 0 auto; }
  .ep-cta .btn { flex: 1 1 200px; justify-content: center; }
}

/* Ejemplos */
.show-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.show-card {
  position: relative; margin: 0; border-radius: var(--r-lg); overflow: hidden; background: #000; cursor: pointer; aspect-ratio: 9 / 16;
  border: 1px solid var(--line-2); box-shadow: var(--shadow); transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}
.show-card:hover { transform: translateY(-4px); border-color: var(--line-3); box-shadow: 0 24px 60px -20px rgba(139, 92, 246, 0.45); }
.show-card video { width: 100%; height: 100%; object-fit: cover; display: block; }
.show-card figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 14px 14px; text-align: left; background: linear-gradient(transparent, rgba(0, 0, 0, 0.88)); }
.show-card figcaption b { display: block; font-size: 0.95rem; font-family: var(--font-display); }
.show-card figcaption small { color: rgba(255, 255, 255, 0.72); font-size: 0.76rem; line-height: 1.35; display: block; margin-top: 2px; }

/* Funciones (bento) */
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feat {
  position: relative; padding: 26px; border-radius: var(--r-lg); background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--line); overflow: hidden; transition: border-color 0.25s, transform 0.25s var(--ease);
}
.feat:hover { border-color: var(--line-2); transform: translateY(-2px); }
.feat-wide { grid-column: span 2; background: radial-gradient(500px 240px at 100% 0%, rgba(139, 92, 246, 0.14), transparent 70%), linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)); }
.feat-ico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--grad-soft); border: 1px solid rgba(124, 95, 245, 0.22); color: #cdc2ff; margin-bottom: 18px; }
.feat-ico .ic { width: 20px; height: 20px; }
.feat h3 { font-size: 1.08rem; margin-bottom: 8px; }
.feat p { margin: 0; color: var(--muted); font-size: 0.93rem; }

/* Pasos */
.steps-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; }
.strip-item { position: relative; padding: 28px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); }
.strip-item b { display: block; font-family: var(--font-display); font-size: 0.85rem; font-weight: 800; letter-spacing: 0.08em; margin-bottom: 18px; }
.strip-item b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.strip-item h4 { font-size: 1.12rem; margin-bottom: 8px; }
.strip-item p { margin: 0; color: var(--muted); font-size: 0.93rem; }

/* Precios */
.pricing { text-align: center; }
.pricing .packs.plans { max-width: 820px; margin-left: auto; margin-right: auto; }
.packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-top: 18px; text-align: left; }
.pack {
  position: relative; display: flex; flex-direction: column; gap: 6px; padding: 26px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); transition: border-color 0.2s, transform 0.2s var(--ease);
}
.pack:hover { border-color: var(--line-2); transform: translateY(-2px); }
.pack.featured {
  border: 1px solid transparent;
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.1), transparent 45%) padding-box, linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box;
  box-shadow: 0 24px 60px -24px rgba(116, 87, 242, 0.55);
}
.pack h4 { font-size: 1rem; color: var(--text-2); font-weight: 600; }
.pack .tag { position: absolute; top: -11px; right: 18px; background: var(--grad); color: #fff; font-size: 0.72rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; box-shadow: 0 6px 16px -4px rgba(116, 87, 242, 0.6); }
.pack .price { font-family: var(--font-display); font-size: 2.3rem; font-weight: 800; letter-spacing: -0.04em; margin-top: 4px; }
.pack .price small { font-size: 0.95rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.pack .get { font-size: 0.98rem; color: var(--text-2); }
.pack .get b { color: var(--text); font-size: 1.1rem; }
.pack .per { color: var(--muted); font-size: 0.84rem; margin-bottom: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.pack ul { list-style: none; padding: 0; margin: 4px 0 20px; color: var(--text-2); font-size: 0.9rem; flex: 1; display: grid; gap: 9px; align-content: start; }
.pack li { position: relative; padding-left: 24px; }
.pack li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: rgba(52, 211, 153, 0.14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2334d399' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 9px no-repeat;
}
.buy-title { margin: 34px 0 6px; font-size: 1.08rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.buy-title small { font-size: 0.86rem; font-weight: 400; font-family: var(--font); letter-spacing: 0; }
.pricing .buy-title { justify-content: center; }
.pricing .buy-title:first-of-type { margin-top: 0; }

/* Preguntas */
.faq-list { max-width: 780px; margin: 0 auto; display: grid; gap: 10px; }
.faq-list details { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); transition: border-color 0.2s, background 0.2s; }
.faq-list details[open] { border-color: var(--line-2); background: var(--surface-2); }
.faq-list summary { list-style: none; cursor: pointer; padding: 18px 22px; font-weight: 600; font-size: 1rem; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; font-size: 1.4rem; font-weight: 300; color: var(--muted); transition: transform 0.2s; line-height: 1; }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list p { margin: 0; padding: 0 22px 20px; color: var(--muted); }

/* Llamada final */
.final-cta { max-width: 1200px; margin: 0 auto; padding: 110px 24px 0; }
.final-in {
  position: relative; overflow: hidden; text-align: center; padding: 72px 24px; border-radius: var(--r-xl);
  border: 1px solid var(--line-2);
  background: radial-gradient(600px 300px at 50% 0%, rgba(124, 95, 245, 0.22), transparent 70%), radial-gradient(600px 300px at 50% 100%, rgba(109, 93, 252, 0.22), transparent 70%), var(--surface);
}
.final-in h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; letter-spacing: -0.04em; }
.final-in p { color: var(--muted); font-size: 1.08rem; margin: 12px 0 28px; }

/* Pie */
.foot { margin-top: 96px; border-top: 1px solid var(--line); }
.foot-in { max-width: 1200px; margin: 0 auto; padding: 48px 24px 32px; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 32px; }
.foot-brand p { margin: 12px 0 0; max-width: 300px; }
.foot-col { display: flex; flex-direction: column; gap: 0; font-size: 0.9rem; }
.foot-col b { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-2); margin-bottom: 4px; }
.foot-col a { display: block; padding: 9px 0; color: var(--muted); text-decoration: none; }
.foot-col a:hover { color: var(--text); }
.foot-bottom { max-width: 1200px; margin: 0 auto; padding: 20px 24px calc(28px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }

/* ======================================================================
   APP
   ====================================================================== */
#app { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; overflow-x: clip; max-width: 100vw; }
#app::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; background: radial-gradient(900px 500px at 90% -10%, rgba(139, 92, 246, 0.09), transparent 60%); }
.sidebar {
  position: sticky; top: 0; height: 100vh; z-index: 20; display: flex; flex-direction: column; gap: 22px;
  padding: 20px 14px 16px; background: var(--bg-2); border-right: 1px solid var(--line); overflow-y: auto;
}
.sidebar > .brand { padding: 4px 8px; }
.menu { display: flex; flex-direction: column; gap: 2px; }
.menu-label { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); padding: 16px 10px 6px; }
.menu-label:first-child { padding-top: 4px; }
.menu button {
  position: relative; display: flex; align-items: center; gap: 11px; padding: 9px 10px; border: 0; border-radius: var(--r-sm);
  background: none; font: inherit; font-size: 0.9rem; font-weight: 500; color: var(--muted); cursor: pointer; text-align: left; transition: background 0.15s, color 0.15s;
}
.menu button .ic { width: 18px; height: 18px; }
.menu button:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); }
.menu button.active { background: rgba(255, 255, 255, 0.07); color: var(--text); }
.menu button.active .ic { color: var(--accent); }
.menu button.active::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad); }
.qbadge { font-style: normal; background: var(--accent); color: #fff; font-size: 0.68rem; font-weight: 700; border-radius: 99px; padding: 1px 7px; margin-left: auto; }
.side-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
/* (2-dic-2026, auditoría UX n.º 36) En pantallas bajas (1366×768) el menú terminaba en «Tutorial»: Ajustes, el idioma y
   Salir quedaban fuera sin ninguna señal. El menú se compacta y el saldo, el idioma y Salir quedan siempre abajo; si aún
   no cabe, el menú se desplaza solo con una sombra que indica que hay más. */
@media (min-width: 901px) and (max-height: 900px) {
  .sidebar { gap: 10px; padding: 14px 12px 12px; overflow: hidden; }
  .sidebar > .menu { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
    -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(180deg, #000 calc(100% - 22px), transparent); padding-bottom: 14px; }
  /* (2-dic-2026, revisión de fix-ux-final) Con «#app»: workspace-premium.css fija 40 px por botón y 4 px de separación,
     y así el menú no cabía; Ajustes quedaba debajo del correo y Salir a 1366×768, y a 1280×720 el idioma tapaba
     «Invita y gana». Con 32 px por botón y los títulos de sección más bajos cabe entero hasta 720 px de alto. */
  #app .sidebar .menu { gap: 1px; }
  #app .sidebar .menu button { min-height: 32px; padding: 5px 10px; font-size: 0.86rem; }
  #app .sidebar .menu-label { padding: 6px 10px 1px; font-size: 0.64rem; }
  #app .sidebar .menu-label:first-child { padding-top: 2px; }
  #app .side-bottom .lang-pick { margin: 0; padding: 4px 8px; }
  .side-bottom { margin-top: 0; gap: 6px; flex: 0 0 auto; }
  .side-bottom .credit-card { flex-direction: row; align-items: center; gap: 8px; padding: 8px 10px; }
  .side-bottom .credit-card .cc-top .ic { display: none; }
  .side-bottom .credit-card strong { font-size: 1.15rem; margin: 0 auto 0 0; }
  .side-bottom .credit-card .btn { width: auto; }
}
.credit-card {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: var(--r);
  border: 1px solid var(--line-2); background: radial-gradient(240px 120px at 100% 0%, rgba(116, 87, 242, 0.2), transparent 70%), var(--surface-2);
}
.cc-top { display: flex; justify-content: space-between; align-items: center; }
.cc-top .ic { width: 16px; height: 16px; color: var(--accent-2); }
.credit-card strong { font-family: var(--font-display); font-size: 1.9rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 8px; }
.user-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 4px 0 8px; overflow: hidden; }
.user-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main { position: relative; z-index: 1; padding: 36px clamp(20px, 4vw, 56px) 64px; max-width: 1280px; width: 100%; min-width: 0; margin: 0 auto; }
.panel-head { margin-bottom: 26px; }
.panel-head h2 { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.035em; }
.panel-head p { margin: 8px 0 0; max-width: 720px; }
.banner { background: rgba(251, 191, 36, 0.08); border: 1px solid rgba(251, 191, 36, 0.3); color: #fcd34d; padding: 12px 16px; border-radius: var(--r-sm); margin-bottom: 20px; font-size: 0.9rem; }

.card { position: relative; min-width: 0; background: var(--surface); border-radius: var(--r-lg); padding: 24px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.card-step { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; margin-bottom: 6px; }
.card-step small { font-family: var(--font); font-weight: 400; }
.card-step b { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--grad); color: #fff; font-size: 0.8rem; box-shadow: 0 4px 12px -2px rgba(116, 87, 242, 0.5); }

/* Instalar app */
.install { position: relative; display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); padding: 12px 44px 12px 12px; margin-bottom: 20px; }
.install img { width: 42px; height: 42px; border-radius: 11px; }
.install div { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.x { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; display: grid; place-items: center; background: none; border: 0; border-radius: var(--r-xs); font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--muted); }
.x:hover { background: var(--surface-3); color: var(--text); }
.install .x { top: 50%; transform: translateY(-50%); right: 8px; }

/* ---------- Crear ---------- */
.clip-create { margin-bottom: 18px; }
.clip-create > summary { cursor: pointer; font-weight: 750; }
.clip-create > summary small { margin-inline-start: 8px; font-weight: 500; }
section[data-panel="create"]:has(> #createForm[hidden]) > .clip-create { display: none; }
body[data-tab="create"]:has(#clipCreate[open]:not([hidden])) .mgen { display: none; }
.clip-form { display: grid; gap: 16px; margin: 16px 0 0; padding: 0; border: 0; min-width: 0; }
.clip-form-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 8px 16px; }
.clip-form-options > p { grid-column: 1 / -1; margin: 0; }
.clip-form #clipReferencesHint, .clip-form-status { margin: 7px 0 0; }
.clip-preset-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.clip-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; justify-content: space-between; }
.clip-form-actions p { margin: 0; }
.clip-create-history { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.clip-result { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-top: 12px; }
.clip-result video { display: block; max-width: 100%; max-height: min(480px, 55vh); border-radius: var(--r-sm); background: var(--bg-2); }
.motion-opt .motion-model-name { color: var(--text); font-weight: 650; }
.create-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.create-grid > * { min-width: 0; }
.create-grid > .generate-card { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr); }
.create-summary { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.generate-card #generateBtn { grid-column: 1 / -1; grid-row: auto; min-width: 0; }
.create-summary > div { padding: 10px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface-2); }
.create-summary dt { font-size: .76rem; color: var(--text-2); }
.create-summary dd { margin: 2px 0 0; font-weight: 750; overflow-wrap: anywhere; }
.create-next { margin: 0; color: var(--text-2); }
.create-next strong { color: var(--text); margin-inline-end: 5px; }
.mgen-details { margin: 0 0 5px; text-align: center; color: var(--text-2); font-size: .76rem; line-height: 1.4; }
@media (min-width: 901px) { .mgen-details { display: none; } }

.tpl-wrap { margin-bottom: 22px; min-width: 0; }
.tpl-wrap.off { display: none !important; }
.tpl-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.tpl-head b { font-family: var(--font-display); font-size: 1rem; }
.tpl-strip { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 8px; -webkit-mask-image: linear-gradient(90deg, #000 90%, transparent); mask-image: linear-gradient(90deg, #000 90%, transparent); scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.tpl-card {
  flex: 0 0 168px; scroll-snap-align: start; text-align: left; display: flex; flex-direction: column; gap: 4px; padding: 14px;
  border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; cursor: pointer;
  transition: transform 0.15s var(--ease), border-color 0.15s, background 0.15s;
}
.tpl-card:hover { transform: translateY(-2px); border-color: var(--line-3); background: var(--surface-2); }
.tpl-card.on { border-color: rgba(124, 95, 245, 0.6); background: var(--soft); box-shadow: var(--ring); }
.tpl-card b { font-size: 0.9rem; font-weight: 600; }
.tpl-ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--surface-3); font-size: 18px; margin-bottom: 6px; }
.tpl-card small { color: var(--muted); font-size: 0.76rem; line-height: 1.35; }

/* Tarjetas de opción (formato / tipo de video) */
.format-opts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 14px 0 4px; }
.format-opt, .motion-opt {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; padding: 13px;
  border: 1px solid var(--line-2); border-radius: var(--r); background: var(--bg-2); color: var(--text); font: inherit; cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s, transform 0.15s var(--ease);
}
.format-opt:hover, .motion-opt:hover { border-color: var(--line-3); background: var(--surface-2); }
.format-opt.on, .motion-opt.on { border-color: rgba(124, 95, 245, 0.7); background: linear-gradient(180deg, rgba(124, 95, 245, 0.09), rgba(139, 92, 246, 0.05)); box-shadow: var(--ring); }
.format-opt > span, .motion-opt .m-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--surface-3); font-size: 1.1rem; margin-bottom: 6px; }
.format-opt.on > span, .motion-opt.on .m-ico { background: rgba(124, 95, 245, 0.16); }
.format-opt b, .motion-opt b { font-size: 0.9rem; font-weight: 600; }
.format-opt small, .motion-opt small { color: var(--muted); font-size: 0.76rem; line-height: 1.35; }

.motion-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.motion-opt { padding: 14px; }
.motion-opt .m-badge { position: absolute; top: 12px; right: 12px; background: var(--grad); color: #fff; font-size: 0.62rem; font-weight: 700; padding: 3px 7px; border-radius: 6px; letter-spacing: 0.06em; }
.motion-opt .m-badge.hd { background: linear-gradient(120deg, #0ea5e9, #6366f1); }
.motion-opt .m-badge.save { background: linear-gradient(120deg, #16a34a, #22c55e); }
.motion-opt .m-badge.cine { background: linear-gradient(120deg, #f59e0b, #ef4444); }
.motion-opt .m-price { font-style: normal; font-weight: 600; font-size: 0.78rem; color: #cdc2ff; margin-top: 6px; }
.motion-opt[data-m="cine"] { background: linear-gradient(135deg, rgba(245, 185, 66, 0.07), rgba(239, 68, 68, 0.05)), var(--bg-2); }
.motion-opt[data-m="cine"].on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 0 4px rgba(245, 185, 66, 0.12); }

/* Chips de opción (género, estilo) */
.options { display: flex; flex-wrap: wrap; gap: 8px; }
.opt {
  position: relative; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text-2); border-radius: var(--r-sm);
  padding: 8px 13px; font: inherit; font-weight: 500; font-size: 0.87rem; cursor: pointer; transition: all 0.15s;
}
.opt:hover { border-color: var(--line-3); color: var(--text); }
.opt.on { border-color: rgba(124, 95, 245, 0.7); background: var(--soft); color: #fff; }
.options.styles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.style-opt { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 7px; font-size: 0.8rem; }
.style-opt .sw { width: 100%; aspect-ratio: 9 / 12; border-radius: 7px; }

/* Selector segmentado */
.seg { display: flex; background: var(--bg-2); border: 1px solid var(--line); padding: 4px; border-radius: var(--r-sm); gap: 4px; }
.seg button {
  position: relative; flex: 1; min-width: 0; border: 0; background: none; padding: 8px 6px; border-radius: 7px; font: inherit; font-size: 0.88rem; font-weight: 600;
  cursor: pointer; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 1px; transition: background 0.15s, color 0.15s;
}
.seg button:hover { color: var(--text); }
.seg button small { font-weight: 500; font-size: 0.7rem; color: var(--faint); }
.seg button.on { background: var(--surface-4); color: var(--text); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 2px 8px rgba(0, 0, 0, 0.35); }
.seg button.on small { color: var(--muted); }
.seg.dur button { padding: 8px 2px; }
.seg.dur button small { color: #cdc2ff; font-weight: 600; }
.long-note { margin: 6px 2px 0; font-size: 0.78rem; }
.format-help { margin: 8px 2px 2px; font-size: 0.84rem; line-height: 1.4; color: var(--muted); }
#editBox .seg button small { color: var(--muted); }

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.narrator-picker {
  margin-top: 16px; border: 1px solid var(--line-2); border-radius: var(--r);
  background: var(--surface-2);
}
.narrator-picker > summary {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 9px;
  min-height: 48px; padding: 10px 12px; cursor: pointer; list-style: none;
}
.narrator-picker > summary::-webkit-details-marker { display: none; }
.narrator-picker > summary::after { content: ""; width: 7px; height: 7px; margin-inline: 4px; border: solid var(--accent-2); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.narrator-picker[open] > summary::after { transform: rotate(225deg); }
.narrator-picker > summary .ic { color: var(--accent-2); }
.narrator-picker > summary small { color: var(--text-2); font-size: .76rem; }
.narrator-body { padding: 0 12px 12px; border-top: 1px solid var(--line-2); }
.narrator-styles { display: flex; flex-wrap: wrap; gap: 6px; }
.narrator-styles button, .narrator-voice button { min-height: 38px; font: inherit; cursor: pointer; }
.narrator-styles button {
  padding: 6px 11px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--text-2); background: var(--surface); font-size: .8rem;
}
.narrator-styles button[aria-pressed="true"] { border-color: var(--accent-2); color: var(--text); background: var(--grad-soft); }
.narrator-voices { display: grid; gap: 7px; margin-top: 9px; }
.narrator-voice {
  min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px;
  padding: 3px 7px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface);
}
.narrator-voice:has(.narrator-choose[aria-pressed="true"]) { border-color: var(--accent-2); background: var(--grad-soft), var(--surface); }
.narrator-voice button { border: 0; border-radius: var(--r-xs); background: transparent; }
.narrator-choose { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; padding: 5px; text-align: left; color: var(--text); }
.narrator-choose small { color: var(--text-2); font-size: .76rem; }
.narrator-choose:disabled { cursor: default; }
.narrator-choose[aria-pressed="true"]::after { content: "✓"; color: var(--text); }
.narrator-voice .narrator-listen { display: flex; align-items: center; gap: 5px; padding: 5px 7px; color: #c3b5fb; font-size: .8rem; font-weight: 650; white-space: nowrap; }
.narrator-voice .narrator-listen:hover { background: var(--surface-3); color: var(--text); }
.narrator-listen .ic { width: 14px; height: 14px; }
.narrator-body p { margin: 8px 0 0; }
@media (max-width: 520px) { .narrator-styles button, .narrator-voice button { min-height: 44px; } }
.idea-tools { display: flex; align-items: center; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.voice-note, .plan-note, .script-info {
  margin: 12px 0 0; font-size: 0.84rem; color: var(--muted); background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px;
}
.plan-note { grid-column: 1; margin: 4px 0; }
.plan-note .link { padding: 0; font-size: inherit; }
.script-info { color: var(--text-2); background: var(--soft); border-color: rgba(124, 95, 245, 0.2); }
.admin-estimate { grid-column: 1; margin: 4px 0; font-size: 0.84rem; color: #fcd34d; background: rgba(251, 191, 36, 0.06); border: 1px solid rgba(251, 191, 36, 0.25); border-radius: var(--r-sm); padding: 8px 10px; }
.lipsync-row { margin-top: 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); padding: 4px 12px 12px; }
.lipsync-row .label { margin-top: 10px; }

.more-opts { margin-top: 18px; border: 1px solid var(--line); border-radius: var(--r); padding: 0 14px; background: rgba(255, 255, 255, 0.015); }
.more-opts[open] { padding-bottom: 14px; }
.more-opts > summary { cursor: pointer; font-weight: 600; font-size: 0.92rem; list-style: none; display: flex; gap: 8px; align-items: baseline; padding: 14px 0; }
.more-opts > summary small { font-weight: 400; }
.more-opts > summary::-webkit-details-marker { display: none; }
.more-opts > summary::after { content: ""; margin-left: auto; align-self: center; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translateY(-3px); transition: transform 0.2s; }
.more-opts[open] > summary::after { transform: rotate(-135deg) translateY(-1px); }
.more-opts[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 4px; }

.upload-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 10px; padding: 20px; border: 1.5px dashed var(--line-3); border-radius: var(--r); background: var(--bg-2); cursor: pointer; font-weight: 600; text-align: center; transition: border-color 0.15s; }
.upload-drop small { color: var(--muted); font-weight: 400; }
.upload-drop:hover { border-color: var(--accent); }
.edit-check { margin-top: 14px; }

.generate-card {
  grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px 24px;
  background: radial-gradient(600px 200px at 100% 50%, rgba(116, 87, 242, 0.12), transparent 70%), var(--surface);
}
.generate-card .card-step { margin: 0; }
.generate-card p { margin: 0; grid-column: 1; }
.generate-card .btn.lg { grid-column: 2; grid-row: 1 / span 3; width: auto; min-width: 300px; padding: 16px 26px; }
.generate-card .link { grid-column: 1; justify-self: start; }

/* Interruptor */
.switch-row { position: relative; grid-column: 1; display: flex; align-items: center; gap: 12px; cursor: pointer; margin: 8px 0; }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; left: 0; top: 0; width: 1px; height: 1px; }
.switch-row .switch { flex: 0 0 auto; width: 40px; height: 24px; border-radius: 99px; background: var(--surface-4); position: relative; transition: background 0.2s; }
.switch-row .switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: transform 0.2s var(--ease); }
.switch-row input:checked + .switch { background: var(--accent); }
.switch-row input:checked + .switch::after { transform: translateX(16px); }
.switch-row input:focus-visible + .switch { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.switch-row b { font-weight: 600; font-size: 0.92rem; }
.switch-row small { display: block; color: var(--muted); font-size: 0.8rem; }
.mini-check { display: flex; align-items: center; gap: 8px; font-size: 0.87rem; font-weight: 500; white-space: nowrap; cursor: pointer; }
.mini-check input { width: auto; accent-color: var(--accent); }
label.mini-check.two-opt { white-space: normal; align-items: flex-start; margin-top: 10px; font-weight: 400; color: var(--text-2); line-height: 1.35; }
label.mini-check.two-opt input { margin-top: 3px; flex: 0 0 auto; }
.shot-tags .two-tag { color: var(--accent); }
.shot-tags .warn { color: #e0a23a; }

/* Bloqueado en plan gratis */
.locked { position: relative; opacity: 0.5; }
.locked::after { content: "🔒"; position: absolute; top: 6px; left: 8px; font-size: 0.72rem; }
.seg button.locked::after { top: 2px; left: 4px; font-size: 0.6rem; }
.locked-note { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.locked-note .link { font-size: 12px; }

/* Estilos de subtítulos */
.sub-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(86px, 1fr)); gap: 8px; margin: 6px 0 10px; }
.sub-opt { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 7px 7px 9px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--bg-2); color: inherit; cursor: pointer; font: inherit; transition: border-color 0.15s; }
.sub-opt:hover { border-color: var(--line-3); }
.sub-opt.on { border-color: rgba(124, 95, 245, 0.7); box-shadow: var(--ring); }
.sub-opt small { font-size: 0.74rem; color: var(--text-2); text-align: center; }
.sub-prev { display: flex; align-items: center; justify-content: center; width: 100%; height: 46px; border-radius: 6px; background: linear-gradient(160deg, #3a3550, #12121a); font-family: Anton, Impact, sans-serif; font-size: 0.9rem; color: #fff; letter-spacing: 0.5px; text-shadow: 0 0 3px #000, 0 2px 2px #000; }
.sub-prev i { font-style: normal; color: #ffe800; }
.sp-palabra { font-size: 1.35rem; }
.sp-neon { text-shadow: 0 0 6px #ff3cb4, 0 0 2px #ff3cb4; }
.sp-neon i { color: #00ffff; }
.sp-caja { font-family: Arial, sans-serif; font-weight: 800; font-size: 0.74rem; text-shadow: none; }
.sp-caja b { background: rgba(0, 0, 0, 0.85); padding: 4px 7px; border-radius: 4px; }
.sp-clasico { font-family: Arial, sans-serif; font-weight: 800; font-size: 0.74rem; }
.sp-clasico i { color: #fff; }

/* ---------- Progreso / resultado ---------- */
.job { margin-top: 4px; }
.job-card { padding: 32px; }
.bar { height: 8px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--grad); border-radius: 99px; transition: width 0.6s var(--ease); }
.job-steps { list-style: none; padding: 0; margin: 20px 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.job-steps li { padding: 11px 12px; border-radius: var(--r-sm); background: var(--bg-2); border: 1px solid var(--line); color: var(--muted); font-weight: 500; font-size: 0.86rem; text-align: center; transition: all 0.3s; }
.job-steps li.active { background: var(--soft); border-color: rgba(124, 95, 245, 0.4); color: #fff; animation: pulse 1.6s ease-in-out infinite; }
.job-steps li.done { background: rgba(52, 211, 153, 0.07); border-color: rgba(52, 211, 153, 0.25); color: var(--ok); }
@keyframes pulse { 50% { opacity: 0.65; } }
#newWhile { margin-top: 6px; }

.gen-stage { display: grid; grid-template-columns: 210px 1fr; gap: 36px; align-items: center; margin-bottom: 22px; }
.gen-phone { width: 210px; aspect-ratio: 9 / 16; border-radius: 30px; padding: 7px; background: linear-gradient(160deg, #26263a, #0b0b12); box-shadow: 0 30px 60px -10px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.07) inset, 0 0 80px rgba(116, 87, 242, 0.2); }
.gen-screen { position: relative; width: 100%; height: 100%; border-radius: 24px; overflow: hidden; background: radial-gradient(120% 80% at 30% 20%, #34184a 0%, #110d1c 60%, #07070b 100%); }
.gen-screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s ease; }
.gen-screen img.on { opacity: 1; animation: genKen 6s ease-in-out forwards; }
@keyframes genKen { from { transform: scale(1.02); } to { transform: scale(1.14) translateY(-2%); } }
.gen-glow { position: absolute; inset: -40%; background: conic-gradient(from 0deg, transparent, rgba(124, 95, 245, 0.35), transparent 30%, rgba(139, 92, 246, 0.35), transparent 60%); animation: genSpin 6s linear infinite; mix-blend-mode: screen; opacity: 0.55; }
.gen-screen.has-img .gen-glow { opacity: 0.18; }
@keyframes genSpin { to { transform: rotate(360deg); } }
.gen-scan { position: absolute; left: 0; right: 0; height: 30%; background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.12), transparent); animation: genScan 2.6s ease-in-out infinite; }
@keyframes genScan { from { top: -30%; } to { top: 100%; } }
.gen-icon { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 50px; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.5)); animation: genFloat 2.4s ease-in-out infinite; }
.gen-screen.has-img .gen-icon { top: auto; bottom: 14px; left: 14px; transform: none; font-size: 24px; animation: none; }
@keyframes genFloat { 50% { transform: translate(-50%, -58%); } }
.gen-count { position: absolute; right: 10px; bottom: 12px; font-size: 11px; font-weight: 600; padding: 4px 8px; border-radius: 99px; background: rgba(0, 0, 0, 0.55); color: #fff; }
.gen-count:empty { display: none; }
.gen-info h3 { font-size: 1.35rem; margin-bottom: 14px; }
.gen-ring { position: relative; width: 112px; height: 112px; margin: 4px 0 12px; }
.gen-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gen-ring circle { fill: none; stroke-width: 8; }
.gen-ring-bg { stroke: var(--surface-3); }
.gen-ring-fg { stroke: url(#genGrad); stroke-linecap: round; stroke-dasharray: 326.7; stroke-dashoffset: 326.7; transition: stroke-dashoffset 0.8s ease; }
.gen-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-size: 24px; font-weight: 800; }
.gen-step { font-size: 1.08rem; font-weight: 600; margin: 0 0 6px; }
.gen-detail { font-size: .92rem; font-weight: 600; color: var(--accent, #b4a5ff); margin: 0 0 8px; min-height: 1.2em; font-variant-numeric: tabular-nums; }
.gen-tip { color: var(--muted); font-size: 0.92rem; min-height: 2.6em; transition: opacity 0.4s; margin: 0; }
.gen-tip.fade { opacity: 0; }

.job-card:has(> .job-result:not([hidden])) { container: episode-result / inline-size; }
.job-result { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 32px; }
@container episode-result (max-width: 45rem) {
  .job-result { grid-template-columns: minmax(0, 1fr); }
  .job-result:not(.wide-video) video { max-width: min(100%, 320px); justify-self: center; }
}
.job-result video { width: 100%; aspect-ratio: 9 / 16; border-radius: var(--r-lg); background: #000; border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); }
.result-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; overflow-wrap: anywhere; }
.result-side h3 { font-size: 1.45rem; letter-spacing: -0.03em; }
.result-side .label { margin-top: 8px; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.result-actions .btn { flex: 1 1 9rem; min-width: 0; white-space: normal; padding-left: 10px; padding-right: 10px; }
.wm-note { background: var(--soft); border: 1px solid rgba(124, 95, 245, 0.2); color: var(--text-2); border-radius: var(--r-sm); padding: 10px 12px; font-size: 0.86rem; margin: 0; }
.wm-note .link { padding: 0; }
.ref-nudge { display: flex; gap: 10px; align-items: center; width: 100%; margin-top: 8px; padding: 12px 14px; border-radius: var(--r-sm); border: 1px dashed rgba(124, 95, 245, 0.45); background: rgba(124, 95, 245, 0.05); color: var(--text-2); font: inherit; font-size: 0.88rem; text-align: left; cursor: pointer; transition: background 0.15s; }
.ref-nudge:hover { background: rgba(124, 95, 245, 0.1); }
.job-error { text-align: center; padding: 28px; }
.job-error h3 { font-size: 1.3rem; }
.job-error-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 14px; }

/* Editor de escenas */
.review-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.review-head h3 { font-size: 1.3rem; }
.review-head p { margin: 4px 0 0; }
.review-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.chip-info { flex: 0 0 auto; background: var(--surface-3); border: 1px solid var(--line); border-radius: 99px; padding: 5px 12px; font-size: 0.8rem; font-weight: 500; color: var(--text-2); }
.critic-chip { color: var(--gold); background: rgba(245, 185, 66, 0.1); border-color: rgba(245, 185, 66, 0.25); cursor: help; }
.scenes { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 12px; }
.scene { display: grid; grid-template-columns: 108px 1fr; gap: 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; transition: border-color 0.15s; }
.scene:hover { border-color: var(--line-2); }
.scene-img { position: relative; aspect-ratio: 9 / 16; border-radius: var(--r-xs); overflow: hidden; background: var(--surface-3); }
.scene-img img { width: 100%; height: 100%; object-fit: cover; }
.scene-num { position: absolute; top: 6px; left: 6px; background: rgba(0, 0, 0, 0.6); color: #fff; font-weight: 700; font-size: 0.72rem; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; }
.scene-loading { position: absolute; inset: 0; background: rgba(12, 10, 20, 0.7); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; font-size: 0.74rem; font-weight: 500; text-align: center; padding: 6px; }
.scene-loading i { width: 24px; height: 24px; border: 3px solid rgba(255, 255, 255, 0.25); border-top-color: #fff; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.scene-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.scene-row { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.scene-row select { padding: 7px 30px 7px 10px; font-size: 0.84rem; border-radius: var(--r-xs); width: auto; flex: 1; min-width: 0; background-position: right 9px center; }
.scene-body textarea { padding: 9px 11px; font-size: 0.9rem; line-height: 1.45; }
.scene-tools { display: flex; gap: 4px; }
.icon-btn { width: 32px; height: 32px; border-radius: var(--r-xs); border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); cursor: pointer; font-size: 0.88rem; transition: border-color 0.15s, background 0.15s; }
.icon-btn:hover:not(:disabled) { background: var(--surface-3); border-color: var(--line-3); }
.icon-btn:disabled { opacity: 0.35; cursor: default; }
.icon-btn.danger:hover { border-color: var(--err); }
.regen { display: flex; gap: 6px; }
.regen input { padding: 7px 10px; font-size: 0.82rem; border-radius: var(--r-xs); min-width: 0; }
.regen .btn { white-space: nowrap; }
.scene-photo-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.take-direction { border: 1px solid var(--line, #393544); border-radius: .6rem; padding: .65rem; }
.take-direction summary { cursor: pointer; font-weight: 600; }
.take-direction .label, .take-direction .scene-photo-actions { margin-block-start: .6rem; }
.take-review-dialog { width: min(94vw, 40rem); padding: 1rem; }
.take-review-dialog video { display: block; width: 100%; max-height: 55vh; background: #08070b; border-radius: .5rem; margin-block: .7rem; }
.take-review-dialog select { margin-block: .4rem; }
.take-review-dialog p { margin-block: .55rem; }
#requireTakesLabel[hidden] { display: none; }
.storyboard-photo { width: min(92vw, 32rem); padding: 1rem; }
.storyboard-photo label { display: block; margin-block: .75rem .35rem; }
.storyboard-photo input { max-width: 100%; }
.storyboard-photo img:not([hidden]) { width: min(100%, 16rem, 29vh); aspect-ratio: 9 / 16; object-fit: cover; margin-block: .75rem; border-radius: .5rem; }
.storyboard-photo.wide img:not([hidden]) { width: min(100%, 26rem); aspect-ratio: 16 / 9; }
.storyboard-photo img[hidden] { display: none; }
#scenesList.locked { opacity: 1; }
#scenesList.locked::after { display: none; }
#scenesList.locked .scene-tools { display: none; }
/* Ficha de la serie (reparto y lugares fijos) */
.bible { background: var(--grad-soft); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 16px; margin-bottom: 18px; }
.bible-head h4 { margin: 0; font-size: 1.05rem; }
.bible-head p { margin: 4px 0 6px; max-width: 70ch; }
.bible .label { margin-top: 12px; }
.bible-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.bible-item { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); padding: 8px; display: flex; flex-direction: column; gap: 8px; }
.bible-img { aspect-ratio: 3 / 4; border-radius: var(--r-xs); overflow: hidden; background: var(--surface-3); display: grid; place-items: center; font-size: 1.6rem; }
.bible-img img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.bible-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bible-info b { font-size: 0.92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bible-info .btn { align-self: flex-start; }
.bible-edit { display: flex; flex-direction: column; gap: 6px; }
.bible-edit input { padding: 7px 10px; font-size: 0.82rem; border-radius: var(--r-xs); }
.scenes-head { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 10px; }
.scenes-head .label { margin: 0; }
/* Etiquetas de cada toma: dónde pasa, qué plano es y quién sale */
.shot-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.shot-tags span { background: var(--surface-2); border: 1px solid var(--line); border-radius: 99px; padding: 2px 8px; font-size: 0.72rem; color: var(--text-2); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.shot-tags span.ok { color: var(--ok); border-color: rgba(52, 211, 153, 0.3); background: rgba(52, 211, 153, 0.08); }
.cost-note { margin: 8px 0 0; line-height: 1.4; }
/* Ajustar toma / añadir toma */
.shot-adjust { border: 1px solid var(--line); border-radius: var(--r-xs); padding: 6px 10px; background: var(--surface); }
.shot-adjust summary { cursor: pointer; font-size: 0.82rem; font-weight: 600; color: var(--text-2); list-style: none; }
.shot-adjust summary::-webkit-details-marker { display: none; }
.shot-adjust[open] { display: flex; flex-direction: column; gap: 8px; padding-bottom: 10px; }
.shot-adjust select { padding: 7px 30px 7px 10px; font-size: 0.84rem; border-radius: var(--r-xs); }
.adj-cast { display: flex; flex-wrap: wrap; gap: 10px; }
.insert-box { display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1px dashed var(--line-2); border-radius: var(--r-xs); }
.insert-box input { padding: 7px 10px; font-size: 0.84rem; border-radius: var(--r-xs); }
/* Toma de acción (sin diálogo) */
.silent-tag { flex: 1; min-width: 0; font-size: 0.84rem; font-weight: 600; color: var(--accent-2); }
.silent-note { margin: 0; padding: 9px 11px; border: 1px dashed var(--line-2); border-radius: var(--r-xs); font-size: 0.86rem; line-height: 1.45; color: var(--text-2); background: var(--surface); }
/* Avance de un cambio de la ficha */
.busy-bar { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--r); padding: 12px 14px; margin-bottom: 14px; font-size: 0.88rem; }
.busy-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.busy-top .muted { margin-left: auto; }
.busy-track { height: 6px; background: var(--surface-4); border-radius: 99px; overflow: hidden; margin-top: 10px; }
.busy-track i { display: block; height: 100%; background: var(--grad); border-radius: 99px; transition: width 0.4s ease; }
.spin { width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, 0.25); border-top-color: #fff; border-radius: 50%; animation: spin 0.8s linear infinite; display: inline-block; flex: 0 0 auto; }
#scenesList.busy { opacity: 0.6; pointer-events: none; }
.bible-img { position: relative; }
.bible-kind { position: absolute; top: 6px; left: 6px; background: rgba(0, 0, 0, 0.62); color: #fff; font-size: 0.68rem; font-weight: 600; padding: 2px 7px; border-radius: 99px; }
#cancelReview { color: var(--muted); }
#cancelReview:hover { color: var(--err); border-color: var(--err); }
.fx-panel { margin-top: 22px; padding-top: 4px; border-top: 1px solid var(--line); }
.fx-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.fx { border: 1px solid var(--line-2); background: var(--bg-2); color: var(--muted); border-radius: 99px; padding: 7px 13px; font: inherit; font-size: 0.84rem; font-weight: 500; cursor: pointer; transition: all 0.15s; }
.fx:hover { color: var(--text); }
.fx.on { border-color: rgba(124, 95, 245, 0.6); background: var(--soft); color: #fff; }
.history { margin-bottom: 14px; display: flex; flex-direction: column; gap: 6px; max-height: 340px; overflow-y: auto; }
.ver { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding: 8px 0; }
.ver div { display: flex; flex-direction: column; min-width: 0; }
.ver small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wm-field { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; max-width: 520px; }
.wm-field .label { margin-bottom: 2px; }
.wm-field input:disabled { opacity: 0.6; }
.review-bar { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 20px; padding: 16px 0 4px; background: linear-gradient(transparent, var(--surface) 35%); }

/* ---------- Biblioteca ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.library-sections { display: grid; gap: 22px; }
.library-section h3, .library-series h4 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.library-section h3 small, .library-series h4 small { border-radius: 999px; padding: 3px 8px; color: var(--text-2); background: var(--surface-3); font: 600 .76rem var(--font); }
.library-series { padding: 12px; margin-bottom: 10px; border: 1px solid var(--line-2); border-radius: var(--r); }
#libraryGrid .vthumb { width: 100%; border: 0; padding: 0; }
#libraryGrid .vactions { flex-wrap: wrap; }
.vcard { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform 0.2s var(--ease), border-color 0.2s; }
.vcard:hover { transform: translateY(-3px); border-color: var(--line-2); }
.vthumb { position: relative; aspect-ratio: 9 / 14; background: linear-gradient(160deg, #1d1640, #3b2b80); display: grid; place-items: center; color: #fff; cursor: pointer; overflow: hidden; }
.vthumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s var(--ease); }
.vcard:hover .vthumb img { transform: scale(1.04); }
.vthumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 55%, rgba(0, 0, 0, 0.45)); pointer-events: none; }
.vthumb .play { position: absolute; z-index: 1; width: 46px; height: 46px; border-radius: 50%; background: rgba(0, 0, 0, 0.45); border: 1px solid rgba(255, 255, 255, 0.2); display: grid; place-items: center; font-size: 1rem; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: transform 0.2s var(--ease), background 0.2s; }
.vcard:hover .vthumb .play { transform: scale(1.08); background: rgba(124, 95, 245, 0.8); }
.vthumb .ep { position: absolute; z-index: 1; top: 10px; left: 10px; background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); color: #fff; font-size: 0.7rem; font-weight: 600; padding: 3px 8px; border-radius: 6px; }
.vbody { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.vbody h4 { font-family: var(--font); font-size: 0.92rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -0.01em; }
.vactions { display: flex; gap: 6px; }
.vactions .btn { flex: 1; padding: 7px; font-size: 0.8rem; }
.status { font-size: 0.78rem; font-weight: 600; }
.status.failed { color: var(--err); }
.status.working, .status.queued { color: var(--accent-2); }
.status.review { color: #cdc2ff; }
.empty { text-align: center; padding: 72px 20px; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--r-lg); }
.empty-ico { font-size: 2.6rem; margin-bottom: 4px; }

/* ---------- Guionista ---------- */
.chat { display: flex; flex-direction: column; gap: 12px; padding: 18px; max-width: 900px; }
.chat-log { display: flex; flex-direction: column; gap: 10px; min-height: 340px; max-height: 58vh; overflow-y: auto; padding: 4px; }
.msg { max-width: 82%; padding: 11px 15px; border-radius: 16px; line-height: 1.55; font-size: 0.94rem; overflow-wrap: anywhere; }
.msg.ai { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.msg.me { align-self: flex-end; background: var(--grad); color: #fff; border-bottom-right-radius: 5px; }
.msg.typing { display: flex; gap: 5px; }
.msg.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.msg.typing i:nth-child(2) { animation-delay: 0.2s; }
.msg.typing i:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }
.chat-suggest { display: flex; flex-wrap: wrap; gap: 8px; }
.chat-input { display: flex; gap: 8px; align-items: flex-end; }
.chat-input textarea { resize: none; max-height: 140px; }
.chat-input .btn { height: 46px; width: 50px; padding: 0; font-size: 1.05rem; }
.chat-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-top: 4px; border-top: 1px solid var(--line); }

/* ---------- Estudio de series ---------- */
.studio-form { display: flex; flex-direction: column; gap: 2px; max-width: 780px; }
.studio-form .label:first-child { margin-top: 0; }
.studio-form .btn { margin-top: 20px; }
.studio-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.studio-list-title { margin: 32px 0 12px; font-size: 1.1rem; }
.project-list { display: grid; gap: 10px; max-width: 780px; }
.project-card { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.project-card:hover { border-color: var(--line-3); background: var(--surface-2); }
.pc-info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.pc-info b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-go { font-size: 1.5rem; color: var(--muted); }
.score-badge { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 76px; height: 76px; border-radius: var(--r-lg); background: var(--surface-2); color: var(--muted); font-weight: 800; font-family: var(--font-display); }
.score-badge strong { font-size: 1.7rem; line-height: 1; }
.score-badge small { font-size: 0.7rem; font-weight: 500; font-family: var(--font); }
.score-badge.sm { min-width: 46px; height: 46px; border-radius: 12px; font-size: 1rem; }
.score-badge.great { background: rgba(52, 211, 153, 0.12); color: #34d399; }
.score-badge.good { background: rgba(56, 189, 248, 0.12); color: #38bdf8; }
.score-badge.ok { background: rgba(251, 191, 36, 0.12); color: #fbbf24; }
.score-badge.low { background: rgba(248, 113, 113, 0.12); color: #f87171; }
#projectBack { margin-bottom: 6px; }
.project-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin: 10px 0 14px; }
.project-head h3 { font-size: 1.5rem; letter-spacing: -0.03em; }
.project-head p { margin: 6px 0; }
.pv-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.pv-meta span { background: var(--surface-3); border-radius: 6px; padding: 4px 10px; font-size: 0.78rem; font-weight: 500; color: var(--text-2); }
#pvProgress { margin-bottom: 14px; display: flex; flex-direction: column; gap: 10px; }
.pv-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.pilot-box { display: flex; gap: 8px; flex-wrap: wrap; }
.pilot-box select { width: auto; padding-top: 9px; padding-bottom: 9px; }
.pv-tabs { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.pv-body h4 { margin: 20px 0 6px; }
.pv-body h4:first-child { margin-top: 0; }
.pv-body p { margin: 6px 0; line-height: 1.6; color: var(--text-2); }
.chars { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.char { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.char small { display: block; color: var(--muted); margin-bottom: 4px; }
.char p { font-size: 0.86rem; margin: 4px 0; }
.ep { border-top: 1px solid var(--line); padding: 12px 2px; }
.ep summary { cursor: pointer; font-size: 0.94rem; }
.ep.paywall summary { color: #cdc2ff; }
.ep .pw { background: var(--soft); color: #cdc2ff; font-size: 0.7rem; font-weight: 600; padding: 2px 8px; border-radius: 6px; margin-left: 6px; }
.ep .script { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; margin-top: 10px; font-family: ui-monospace, "SF Mono", Menlo, "Courier New", monospace; font-size: 0.83rem; }
.sc { margin-bottom: 10px; }
.sc b:first-child { display: block; }
.sc i { display: block; color: var(--muted); margin: 2px 0 4px; }
.rev { display: flex; gap: 12px; align-items: flex-start; border-top: 1px solid var(--line); padding: 12px 0; }
.good-txt { color: var(--ok); font-size: 0.86rem; }
.portraits { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 12px; }
.portrait { display: flex; flex-direction: column; align-items: center; gap: 4px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; text-align: center; }
.portrait img, .portrait .ph { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--r-xs); background: var(--surface-3); display: grid; place-items: center; font-size: 2.4rem; }
.portrait small { color: var(--muted); font-size: 0.76rem; }

/* ---------- Agente ---------- */
.agent-card { margin-bottom: 16px; max-width: 900px; display: flex; flex-direction: column; gap: 12px; }
.agent-card > .btn { align-self: flex-start; }
.agent-suggest { display: flex; flex-wrap: wrap; gap: 8px; }
.ajob { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg-2); cursor: pointer; margin-bottom: 8px; transition: border-color 0.15s; }
.ajob:hover { border-color: var(--line-3); }
.ajob input { width: auto; margin-top: 4px; accent-color: var(--accent); }
.ajob div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ajob small { font-size: 0.8rem; }
.ajob-cr { font-weight: 700; color: #cdc2ff; white-space: nowrap; }
.agent-run { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 6px; }
.qrow { display: grid; grid-template-columns: 1fr 140px 60px; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); font-size: 0.9rem; }
.qrow span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qrow.done { grid-template-columns: 1fr auto; }
.qrow .bar { height: 6px; }

/* ---------- Invita ---------- */
.invite-card { max-width: 680px; display: flex; flex-direction: column; gap: 12px; }
.invite-card .label { margin-top: 0; }
.invite-link { display: flex; gap: 8px; }
.invite-link input { font-weight: 600; color: var(--accent-2); }
.invite-stats { grid-template-columns: repeat(3, 1fr) !important; margin: 4px 0 !important; }
.invite-stats .stat strong { font-size: 1.4rem; }

/* ---------- Ajustes ---------- */
.settings-card { margin-bottom: 16px; max-width: 900px; }
.settings-card .card-step { margin-bottom: 14px; }
.settings-card h4 { margin: 18px 0 8px; font-size: 0.95rem; }
.set-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-bottom: 14px; }
.set-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 0.84rem; font-weight: 500; color: var(--text-2); }
.set-check { align-self: end; padding-bottom: 12px; color: var(--text); }
label.mini-check.set-check { flex-direction: row !important; align-items: center; justify-content: flex-start; text-align: left; white-space: normal; gap: 10px; padding: 6px 0; }
label.mini-check.set-check input { width: 18px !important; height: 18px; flex: 0 0 auto; margin: 0; }
.set-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.acct-head { display: flex; align-items: center; gap: 14px; margin: 4px 0 16px; min-width: 0; }
.acct-head > div:last-child { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.acct-avatar { flex: none; width: 48px; height: 48px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; font-weight: 700; font-size: 20px; color: #fff; font-family: var(--font-display); }
.acct-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.acct-stats > div { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px; text-align: center; }
.acct-stats strong { display: block; font-family: var(--font-display); font-size: 1.4rem; font-weight: 800; }
.acct-stats span { font-size: 0.76rem; color: var(--muted); }
.acct-plan { background: var(--soft); border: 1px solid rgba(124, 95, 245, 0.2); border-radius: var(--r-sm); padding: 10px 12px; margin: 0 0 14px; font-size: 0.9rem; }
.danger-text { color: var(--err) !important; }
.danger-text:hover { border-color: rgba(248, 113, 113, 0.5) !important; }

/* ---------- Créditos ---------- */
.balance { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; background: radial-gradient(500px 200px at 0% 0%, rgba(116, 87, 242, 0.16), transparent 70%), var(--surface); }
.balance > div:first-child { display: flex; flex-direction: column; }
.balance strong { font-family: var(--font-display); font-size: 2.8rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1.1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.balance-eq { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 0.9rem; }
.perks { margin: 0 0 8px; }
.perks.is-pro { border-color: rgba(245, 185, 66, 0.4); }
.perks-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; margin: 14px 0 10px; }
.perk { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: var(--r-sm); background: var(--bg-2); border: 1px solid var(--line); min-width: 0; }
.perk > span { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 9px; background: var(--surface-3); font-size: 17px; }
.perk b { display: block; font-size: 0.88rem; font-weight: 600; }
.perk small { display: block; color: var(--muted); font-size: 0.78rem; line-height: 1.4; }
.sub-box { display: grid; gap: 6px; margin-bottom: 12px; border-color: rgba(52, 211, 153, 0.35); }
.sub-box .btn { justify-self: start; }
.purchases { margin-top: 18px; }
.prow { display: flex; justify-content: space-between; gap: 10px; padding: 10px 2px; border-top: 1px solid var(--line); font-size: 0.9rem; }
.moves-list { list-style: none; margin: 6px 0 8px; padding: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.mrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 2px; border-top: 1px solid var(--line); font-size: 0.9rem; }
.mrow .mwhy { overflow-wrap: anywhere; }
.mrow .mdelta { text-align: right; font-variant-numeric: tabular-nums; }
.mrow.is-in .mdelta { color: var(--ok); }
.mrow .mwhen, .mrow .mbal { font-size: 0.8rem; color: var(--muted); }
.mrow .mbal { text-align: right; font-variant-numeric: tabular-nums; }
.buy-done .buy-ico { font-size: 3rem; }
.buy-done .buy-amount { font-family: var(--font-display); font-size: 2.6rem; font-weight: 800; letter-spacing: -0.04em; margin: 4px 0 10px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.buy-done .btn { margin-top: 10px; }

/* ---------- Tutorial ---------- */
.tutorial { display: grid; gap: 12px; margin-bottom: 20px; max-width: 900px; }
.tut-step { display: flex; gap: 18px; align-items: flex-start; }
.tut-step .num { display: grid; place-items: center; min-width: 38px; height: 38px; border-radius: 11px; background: var(--grad); color: #fff; font-weight: 700; font-family: var(--font-display); }
.tut-step h4 { font-size: 1.05rem; }
.tut-step p { margin: 6px 0 0; color: var(--muted); }
.tut-step p b { color: var(--text-2); }
.tut-tips h4 { font-size: 1.05rem; }
.tut-tips ul { margin: 10px 0 0; padding-left: 20px; color: var(--muted); line-height: 1.8; }

/* ---------- Administrador ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stats.mini { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-bottom: 4px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.stat span { color: var(--muted); font-size: 0.82rem; font-weight: 500; }
.stat strong { font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; letter-spacing: -0.03em; }
.stat small { color: var(--muted); font-size: 0.76rem; }
.admin-feats, .admin-costs { margin-bottom: 18px; }
.admin-feats .switch-row { margin: 10px 0; }
.admin-costs h4, .admin-feats h4 { margin: 20px 0 8px; font-size: 0.95rem; }
.admin-search { display: flex; gap: 8px; margin-bottom: 12px; }
.urow { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 12px 4px; border-top: 1px solid var(--line); }
.uinfo { display: flex; flex-direction: column; min-width: 0; }
.uinfo b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ucredits { display: flex; flex-direction: column; align-items: center; min-width: 64px; }
.ucredits strong { font-size: 1.3rem; }
.ucredits small { color: var(--muted); font-size: 0.72rem; }
.uactions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.urow .umsg { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 8px; }
.urow .umsg[hidden] { display: none; }
.urow .umsg textarea { width: 100%; resize: vertical; }
.urow .umsg button { align-self: flex-end; }
.team-news h3 { display: flex; align-items: center; gap: 8px; padding-right: 32px; }
.team-news-text { line-height: 1.55; margin: 12px 0 18px; }
.msg-reply .msg-news { display: block; margin-top: 6px; font-weight: 600; }
.choice-box h3 { padding-right: 32px; }
.choice-box .choice-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.sub-bonus { margin: 6px 0 10px; }
/* Recarga a tu medida (24-nov-2026): la única tarjeta de pago único, centrada y con botones rápidos que dicen cuántos
   créditos dan. */
.packs.solo { grid-template-columns: minmax(0, 560px); justify-content: center; }
.topup-card .topup-chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 14px 0 12px; }
.topup-chip { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 13px 4px 10px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.04); color: var(--text); font: inherit; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.topup-chip b { font-size: 1.15rem; font-weight: 800; }
.topup-chip small { font-size: 0.74rem; color: var(--muted); white-space: nowrap; }
.topup-chip em { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 0.7rem; font-weight: 700; white-space: nowrap; padding: 2px 8px; border-radius: 999px; background: var(--grad); color: #2a1608; }
.topup-chip:hover { border-color: var(--accent); }
.topup-chip.on { border-color: var(--accent); background: rgba(124, 95, 245, 0.12); box-shadow: inset 0 0 0 1px var(--accent); }
.topup-card .topup-input { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.topup-card .topup-other { font-size: 0.9rem; font-weight: 600; color: var(--text-2); }
.topup-card .topup-field { display: flex; align-items: center; gap: 6px; flex: 1; max-width: 230px; font-size: 1.5rem; font-weight: 800; }
.topup-card .topup-field input { width: 100%; font-size: 1.4rem; font-weight: 800; padding: 6px 10px; }
.pack.topup-card ul.topup-eq { margin: 4px 0 12px; }
.topup-card .topup-hint { margin: 0 0 10px; padding: 8px 10px; border-radius: 10px; background: rgba(245, 185, 66, 0.1); color: var(--text-2); }
.topup-card .topup-hint:empty { display: none; }
.topup-card .btn[disabled] { opacity: 0.6; cursor: not-allowed; }
.topup-card .topup-note { margin: 8px 0 0; }
.topup-steps { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.pack .topup-steps ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; flex: none; }
.pack .topup-steps li { padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); font-size: 0.78rem; color: var(--text-2); }
.pack .topup-steps li::before { content: none; }
.topup-steps li span { color: var(--muted); }
.pack .topup-steps li.on { border-color: var(--accent); color: var(--text); background: rgba(124, 95, 245, 0.1); }
@media (max-width: 420px) {
  .topup-card .topup-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 14px; }
}
.aff-credits { display: flex; flex-direction: column; gap: 6px; margin: 10px 0 14px; }
.uamount { width: 76px; padding: 7px 8px; }
.model-list { margin: 0; padding-left: 18px; color: var(--muted); line-height: 1.8; font-size: 0.9rem; }
.model-list b { color: var(--text); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-sm); }
.tbl { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.tbl th, .tbl td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th { background: var(--surface-2); color: var(--muted); font-weight: 600; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.05em; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: rgba(255, 255, 255, 0.02); }
.margin { font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.margin.great { background: rgba(52, 211, 153, 0.12); color: #34d399; }
.margin.ok { background: rgba(251, 191, 36, 0.12); color: #fbbf24; }
.margin.low { background: rgba(248, 113, 113, 0.12); color: #f87171; }
.admin-fails { margin: 16px 0; padding: 14px 16px; border: 1px solid rgba(248, 113, 113, 0.25); border-radius: var(--r); background: rgba(248, 113, 113, 0.04); }
.admin-fails h3 { margin: 0 0 8px; font-size: 15px; }
.admin-fails ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.admin-fails li { font-size: 13px; line-height: 1.4; padding-bottom: 8px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.admin-fails small { opacity: 0.65; }
.disk-bar { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin: 6px 0; }
.disk-bar i { display: block; height: 100%; background: var(--ok); }
.disk-bar.bad i { background: var(--err); }

/* ---------- Modales, tour, toast ---------- */
.modal, .tour { position: fixed; inset: 0; background: rgba(3, 3, 6, 0.7); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: grid; place-items: center; padding: 16px; z-index: 70; animation: fadeIn 0.18s ease-out; }
@keyframes fadeIn { from { opacity: 0; } }
.modal-box, .tour-box { position: relative; width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-xl); padding: 32px; box-shadow: var(--shadow-lg); animation: popIn 0.22s var(--ease); }
@keyframes popIn { from { opacity: 0; transform: translateY(8px) scale(0.98); } }
.auth-dialog {
  width: min(438px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 0;
  border-radius: var(--r-xl);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);
}
.auth-dialog::backdrop { background: rgba(3, 3, 6, 0.7); backdrop-filter: blur(8px); }
.auth-dialog .modal-box { max-width: none; box-shadow: none; }
.auth-dialog #authClose { min-width: 44px; min-height: 44px; }
.auth-dialog #authTitle { padding-right: 44px; }
@media (max-width: 720px) {
  .auth-dialog {
    inset: auto 0 0;
    width: 100%;
    max-width: none;
    max-height: calc(100dvh - 12px);
    margin: 0;
    border-radius: 24px 24px 0 0;
  }
  .auth-dialog .modal-box { border-radius: inherit; }
}
.modal-box h3 { font-size: 1.5rem; letter-spacing: -0.03em; padding-right: 30px; }
.modal-box > p { margin: 6px 0 0; }
.modal-box form { display: flex; flex-direction: column; gap: 14px; margin-top: 20px; }
.modal-box label { display: flex; flex-direction: column; gap: 6px; font-weight: 500; font-size: 0.86rem; color: var(--text-2); }
.google-btn { margin-top: 20px; gap: 10px; padding: 12px 16px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 0.8rem; margin: 18px 0 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
#forgotBtn { align-self: center; }
.legal-note { margin-top: 12px; }
.legal-note a, .foot-bottom a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.tour-box { text-align: center; max-width: 440px; }
.tour-art { font-size: 3rem; margin-bottom: 12px; }
.tour-box h3 { font-size: 1.35rem; }
.tour-dots { display: flex; justify-content: center; gap: 6px; margin: 18px 0; }
.tour-dots i { width: 7px; height: 7px; border-radius: 99px; background: var(--surface-4); transition: all 0.2s; }
.tour-dots i.on { width: 22px; background: var(--grad); }
.tour-actions { display: flex; justify-content: space-between; align-items: center; }
.toast { position: fixed; bottom: calc(28px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); background: var(--surface-3); border: 1px solid var(--line-2); color: #fff; padding: 12px 18px; border-radius: var(--r-sm); font-weight: 500; font-size: 0.92rem; z-index: 69; box-shadow: var(--shadow-lg); max-width: calc(100% - 32px); animation: toastIn 0.25s var(--ease); }
/* (1-dic-2026, revisión visual) El aviso va por encima del panel de la toma (65) y por debajo de las ventanas (.modal y
   .tour, 70). Con una ventana, Clip, el tutorial o el panel de la toma abiertos sube arriba de la pantalla y por encima de
   ellos: abajo tapaba el campo «Cuéntanos qué pasó…», las preguntas de Clip y los avisos de «Editar toma» quedaban
   escondidos. (bottom con !important: las reglas de Crear, con #createForm, también fijan bottom y lo estiraban.) */
body:has(.modal:not([hidden]), .bot-panel:not([hidden]), .tour:not([hidden]), .take-panel:not([hidden])) .toast { top: calc(14px + env(safe-area-inset-top)); bottom: auto !important; z-index: 75; }
@media (max-width: 900px) {
  /* En Crear, por encima de la barra fija «Revisar ajustes y precio» (antes quedaba encima de su línea de resumen). */
  body[data-tab="create"] .toast { bottom: calc(196px + env(safe-area-inset-bottom)); }
}
/* (1-dic-2026, revisión visual) Toques de al menos 44 px en el teléfono para los botones sueltos (tutorial, «Pegar desde una
   IA», barra del proyecto, Clip, muestra de calidad). Los enlaces dentro de un párrafo no cambian. */
@media (max-width: 700px) {
  :is(#tourSkip, #importCopy, #importChooseFile, #draftBack, #draftImportBtn, #draftDelete, #botClose, .btn.sm) { min-height: 44px; padding-block: 10px; }
  #botClose { min-width: 44px; }
  button.link.danger-link { min-height: 44px; }
}
/* «plan Élite : tu logo…»: el relleno del botón-enlace dejaba un espacio antes de los dos puntos. */
:is(#logoHelp, #voiceHelp) .link { padding: 0; }
/* «· miembro desde…» empezaba con un separador suelto: ahora va en su propia línea, bajo el correo. */
#setSince { display: block; }
/* Pie de las tarjetas de plan con candado: se parte en dos líneas en vez de llegar al borde. */
.btn.lock-btn { white-space: normal; text-align: center; line-height: 1.3; padding-inline: 14px; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 8px); } }

/* Menú inferior y hoja "Más" solo en teléfono */
.mnav, .mgen, .sheet { display: none; }

/* ======================================================================
   RESPONSIVE
   ====================================================================== */
@media (max-width: 1100px) {
  .feat-grid { grid-template-columns: repeat(2, 1fr); }
  .feat-wide:last-child { grid-column: auto; }
  .show-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .show-row .show-card:nth-child(n + 4) { display: none; }
}
@media (max-width: 1100px) and (min-width: 901px) {
  .format-opts { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1180px) and (min-width: 901px) {
  .create-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  body { font-size: 15px; }
  html { scroll-padding-top: 70px; }
  textarea, input, select { font-size: 16px; } /* evita el zoom automático en iPhone */

  /* Portada */
  .top-links { display: none; }
  .topbar-in { padding: 12px 16px; justify-content: space-between; }
  .hero { grid-template-columns: 1fr; text-align: center; padding: 48px 16px 40px; gap: 40px; }
  .hero-text { display: flex; flex-direction: column; align-items: center; }
  .lead { margin: 0 auto; font-size: 1.05rem; }
  .hero-cta { justify-content: center; }
  .hero-trust { justify-content: center; }
  .hero-visual { height: 440px; width: 100%; }
  .hv-phone { width: 180px; }
  .hv-main { width: 214px; }
  .hv-chip-a { left: 0; top: 12%; }
  .hv-chip-b { right: 0; bottom: 10%; }
  .section { padding: 72px 16px 0; }
  .section-head { margin-bottom: 32px; }
  .steps-strip { grid-template-columns: 1fr; }
  .final-cta { padding: 80px 16px 0; }
  .foot-in { grid-template-columns: 1fr 1fr; padding: 40px 16px 24px; }
  .foot-brand { grid-column: 1 / -1; }
  .foot-bottom { padding-left: 16px; padding-right: 16px; }

  /* App: barra superior + menú inferior como app nativa */
  #app { grid-template-columns: 1fr; }
  #app::before { display: none; }
  .sidebar {
    position: sticky; top: 0; z-index: 30; height: auto; flex-direction: row; align-items: center; overflow: visible;
    padding: calc(10px + env(safe-area-inset-top)) 14px 10px; gap: 10px;
    background: rgba(7, 7, 11, 0.94); border-right: 0; border-bottom: 1px solid var(--line);
  }
  .sidebar > .brand { padding: 0; font-size: 1rem; }
  .sidebar .logo { width: 28px; height: 28px; }
  .sidebar .menu, .user-row { display: none; }
  .side-bottom { margin: 0 0 0 auto; flex-direction: row; align-items: center; gap: 8px; }
  .credit-card { flex-direction: row; align-items: center; gap: 8px; padding: 4px 4px 4px 12px; border-radius: 999px; cursor: pointer; background: var(--surface-2); }
  .cc-top .muted { display: none; }
  .cc-top .ic { width: 15px; height: 15px; }
  .credit-card strong { font-size: 1rem; margin: 0; }
  .credit-card .btn { width: auto; border-radius: 999px; padding: 6px 12px; font-size: 0.8rem; }

  .mnav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: rgba(10, 10, 15, 0.96); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .mnav button { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; background: none; border: 0; color: var(--muted); font: inherit; font-size: 0.68rem; font-weight: 600; padding: 6px 0 4px; border-radius: 12px; cursor: pointer; }
  .mnav button { min-height: 44px; touch-action: manipulation; }
  .mnav button .ic { width: 22px; height: 22px; }
  .mnav button.active { color: var(--text); }
  .mnav button.active .ic { color: var(--accent); }
  .mnav button.active::before { content: ""; position: absolute; top: -7px; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--grad); }

  .sheet { display: block; position: fixed; inset: 0; z-index: 60; background: rgba(3, 3, 6, 0.6); animation: fadeIn 0.15s; }
  .sheet[hidden] { display: none; }
  .sheet-box { position: absolute; left: 0; right: 0; bottom: 0; background: var(--surface); border-radius: 22px 22px 0 0; border-top: 1px solid var(--line-2); padding: 8px 10px calc(16px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 2px; animation: up 0.22s var(--ease); }
  @keyframes up { from { transform: translateY(40px); opacity: 0; } }
  .sheet-grip { width: 38px; height: 4px; border-radius: 4px; background: var(--surface-4); margin: 4px auto 10px; }
  .sheet-box button { display: flex; align-items: center; gap: 14px; text-align: left; background: none; border: 0; color: var(--text); font: inherit; padding: 11px 12px; border-radius: var(--r); cursor: pointer; }
  .sheet-box button:active { background: var(--surface-2); }
  .sheet-box button > span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: var(--surface-3); color: var(--accent-2); flex: none; }
  .sheet-box button > span .ic { width: 20px; height: 20px; }
  .sheet-box button div { display: flex; flex-direction: column; }
  .sheet-box b { font-weight: 600; font-size: 0.95rem; }
  .sheet-box small { color: var(--muted); font-size: 0.8rem; }

  /* Barra fija "Generar" encima del menú (solo en Crear con el formulario visible) */
  body[data-tab="create"] .mgen { display: block; position: fixed; left: 0; right: 0; bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 35; padding: 14px 14px 10px; background: linear-gradient(rgba(7, 7, 11, 0), rgba(7, 7, 11, 0.97) 12px); box-sizing: border-box; }
  body[data-tab="create"]:has(#createForm[hidden]) .mgen { display: none; }
  .generate-card #generateBtn { display: none; }

  .main { padding: 18px 14px calc(150px + env(safe-area-inset-bottom)); }
  .panel-head { margin-bottom: 16px; }
  .panel-head h2 { font-size: 1.4rem; }
  .panel-head p { font-size: 0.9rem; }
  .card { padding: 18px; border-radius: var(--r); }
  .create-grid { grid-template-columns: 1fr; gap: 12px; }
  .generate-card { grid-template-columns: 1fr; }
  .generate-card .btn { grid-column: 1; grid-row: auto; min-width: 0; width: 100%; }
  .format-opts { grid-template-columns: 1fr 1fr; }
  .label { margin: 16px 0 7px; }
  .options { gap: 6px; }
  .opt { padding: 8px 11px; font-size: 0.85rem; }
  .style-opt { padding: 5px; font-size: 0.7rem; }
  .style-opt .sw { aspect-ratio: 3 / 4; }
  .seg button { padding: 8px 4px; font-size: 0.84rem; }
  .seg.dur button { font-size: 0.8rem; }
  .job-card { padding: 20px; }
  .job-steps { grid-template-columns: 1fr 1fr; }
  .job-result { grid-template-columns: 1fr; }
  .job-result video { max-width: 320px; margin: 0 auto; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .toast { bottom: calc(140px + env(safe-area-inset-bottom)); }
  .review-bar { bottom: calc(64px + env(safe-area-inset-bottom)); }
  .modal { align-items: end; padding: 0; }
  .modal-box { border-radius: 24px 24px 0 0; padding: 28px 22px calc(28px + env(safe-area-inset-bottom)); max-width: none; animation: up 0.25s var(--ease); }
  .qbadge { position: absolute; top: 2px; left: 50%; margin: 0 0 0 6px; }
  .qrow { grid-template-columns: 1fr 80px 44px; }
}

@media (max-width: 700px) {
  .show-row { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; margin: 0 -16px; padding: 0 16px 8px; scrollbar-width: none; }
  .show-row::-webkit-scrollbar { display: none; }
  .show-row .show-card:nth-child(n + 4) { display: block; }
  .show-card { flex: 0 0 64%; scroll-snap-align: center; }
  .feat-grid { grid-template-columns: 1fr; }
  .feat-wide { grid-column: auto; }
  .motion-opts { grid-template-columns: 1fr 1fr; gap: 8px; }
  .motion-opt { padding: 11px; }
  .motion-opt small { font-size: 0.72rem; }
  .motion-opt .m-badge { top: 9px; right: 9px; font-size: 0.56rem; }
  .urow { grid-template-columns: 1fr auto; }
  .uactions { grid-column: 1 / -1; flex-wrap: wrap; }
}

@media (max-width: 640px) {
  .gen-stage { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 18px; }
  .gen-phone { width: 168px; }
  .gen-ring { margin: 4px auto 10px; }
  .stats, .stats.mini { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stat { padding: 12px; }
  .stat strong { font-size: 1.25rem; overflow-wrap: anywhere; }
  .stat span { font-size: 0.75rem; }
  .stat small { font-size: 0.7rem; }
  .card-step { flex-wrap: wrap; row-gap: 2px; }
  .card-step small { flex-basis: 100%; }
  /* Tablas → tarjetas apiladas */
  .table-wrap { border: 0; overflow: visible; }
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tr { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 12px; margin-bottom: 8px; background: var(--surface); }
  .tbl td { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 3px 0 !important; border: 0 !important; text-align: right; font-size: 13px; overflow-wrap: anywhere; white-space: normal; }
  .tbl td::before { content: attr(data-label); color: var(--muted); text-align: left; flex: 0 0 auto; font-size: 12px; }
  .tbl td:first-child { font-weight: 600; text-align: left; justify-content: flex-start; font-size: 14px; }
  .tbl td:first-child::before, .tbl td[colspan]::before { display: none; }
  .tbl td[colspan] { justify-content: center; }
  .urow { flex-wrap: wrap; gap: 8px; }
  .uactions { flex-wrap: wrap; width: 100%; }
}

@media (max-width: 600px) {
  .studio-row { grid-template-columns: 1fr; }
  .project-head { flex-direction: column-reverse; }
  .pv-actions .btn, .pilot-box, .pilot-box .btn { width: 100%; }
  .pilot-box select { flex: 1; }
  .perks-grid { grid-template-columns: 1fr; gap: 6px; }
  .perk { padding: 10px; }
}

@media (max-width: 520px) {
  .top-actions { gap: 6px; }
  .top-actions .btn { padding: 8px 12px; font-size: 0.85rem; }
  .topbar .brand span { font-size: 0.98rem; }
  .hero h1 { font-size: 2.3rem; }
  .hero-cta { flex-direction: column; width: 100%; }
  .hero-cta .btn { width: 100%; }
  .hero-visual { height: 380px; }
  .hv-phone { width: 150px; }
  .hv-main { width: 190px; }
  .hv-left { transform: translateX(-52%) rotate(-7deg) scale(0.86); }
  .hv-right { transform: translateX(52%) rotate(7deg) scale(0.86); }
  .hv-chip { padding: 8px 10px 8px 8px; }
  .hv-chip .ic { width: 28px; height: 28px; padding: 6px; }
  .hv-chip small { display: none; }
  .pipeline li { padding: 7px 12px; font-size: 0.84rem; }
  .final-in { padding: 52px 20px; }
  .options.styles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .row2 { grid-template-columns: 1fr; }
  .msg { max-width: 92%; }
  .chat-log { max-height: 55vh; }
  .scenes { grid-template-columns: 1fr; }
  .scene { grid-template-columns: 92px 1fr; }
  .regen { flex-direction: column; }
  .review-head { flex-direction: column; }
  .review-bar { padding: 10px 0 6px; }
  .review-bar .btn { flex: 1; white-space: nowrap; padding: 13px 16px; font-size: 1rem; }
  .review-bar #saveState { display: none; }
  .bible { padding: 12px; }
  .bible-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scene-row { flex-wrap: wrap; }
  .scene-row select.sp { flex-basis: 100%; }
  .scene-tools { margin-left: auto; }
  .invite-stats .stat { padding: 10px; }
  .invite-stats .stat span { font-size: 0.72rem; }
  .acct-stats strong { font-size: 1.15rem; }
}
@media (max-width: 380px) {
  .options.styles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hv-left, .hv-right { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* Administradores */
.admin-list { margin-bottom: 18px; }
.admin-list > p { margin: 12px 0 0; }
.arow { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-top: 1px solid var(--line); }
.arow .uinfo { flex: 1; }
.acct-avatar.sm { width: 36px; height: 36px; font-size: 15px; }
.tag-admin { flex: none; display: inline-block; vertical-align: middle; font-family: var(--font); font-size: 0.64rem; font-weight: 700; letter-spacing: 0.06em; padding: 3px 7px; border-radius: 6px; color: var(--gold); background: rgba(245, 185, 66, 0.12); border: 1px solid rgba(245, 185, 66, 0.3); }
.tag-you { display: inline-block; vertical-align: middle; font-size: 0.66rem; font-weight: 600; padding: 2px 7px; border-radius: 6px; color: var(--accent-2); background: rgba(167, 139, 250, 0.12); margin-left: 4px; }

/* Tus personajes */
.cast-box { margin-top: 4px; }
.cast-row { display: flex; flex-wrap: wrap; gap: 8px; }
.cast-chip, .cast-add {
  position: relative; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 4px 12px 4px 4px;
  border-radius: 999px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text-2);
  font: inherit; font-size: 0.88rem; font-weight: 500; cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.cast-chip img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.cast-chip:hover, .cast-add:hover { border-color: var(--line-3); color: var(--text); }
.cast-chip.on { border-color: rgba(124, 95, 245, 0.7); background: var(--soft); color: #fff; box-shadow: var(--ring); }
.cast-chip.on img { box-shadow: 0 0 0 2px var(--accent); }
.cast-del { display: grid; place-items: center; width: 18px; height: 18px; margin-left: 2px; border-radius: 50%; font-style: normal; font-size: 0.85rem; line-height: 1; color: var(--muted); background: var(--surface-3); }
.cast-del:hover { color: #fff; background: var(--err); }
.cast-add { padding: 4px 16px 4px 4px; border-style: dashed; color: var(--muted); }
.cast-add span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--surface-3); font-size: 1.2rem; color: var(--accent-2); }
.cast-hint { margin: 8px 0 0; }
.cast-drop { display: grid !important; place-items: center; height: 220px; border: 1.5px dashed var(--line-3); border-radius: var(--r); background: var(--bg-2); cursor: pointer; overflow: hidden; }
.cast-drop:hover { border-color: var(--accent); }
.cast-drop img { width: 100%; height: 100%; object-fit: contain; }
.cast-drop span { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; color: var(--text); }
.cast-drop small { color: var(--muted); font-weight: 400; }
label.mini-check.cast-consent { flex-direction: row; align-items: flex-start; white-space: normal; gap: 10px; color: var(--text-2); font-weight: 400; font-size: 0.84rem; }
label.mini-check.cast-consent input { margin-top: 3px; flex: none; }

/* Tour: primer paso con video real */
.tour-art.has-video { width: 168px; aspect-ratio: 9 / 16; margin: 0 auto 16px; border-radius: 18px; overflow: hidden; border: 1px solid var(--line-2); box-shadow: 0 20px 50px -12px rgba(139, 92, 246, 0.5); font-size: 0; }
.tour-art.has-video video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Ayuda */
.help-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 45; display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 16px 11px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(22, 22, 31, 0.92);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: var(--text); font: inherit; font-size: 0.88rem; font-weight: 600;
  cursor: pointer; box-shadow: var(--shadow-lg); transition: border-color 0.15s, transform 0.15s var(--ease);
}
.help-fab:hover { border-color: var(--line-3); transform: translateY(-1px); }
/* En el storyboard el botón de ayuda sube para no tapar “Aprobar y animar”. */
body:has(.job-review:not([hidden])) .help-fab { bottom: 98px; }
/* (1-dic-2026, revisión visual) En Anuncios y edición y en Crear el botón «Ayuda» tapaba «Escribir el texto con IA» y la
   nota de la columna de revisión: ahí queda solo el icono y el final de la página deja sitio para él. */
@media (min-width: 901px) {
  #app .main { padding-bottom: 96px; }
  /* (2-dic-2026) También en Voz y doblaje: el botón entero tapaba los «Abrir» de «Tus trabajos de voz». */
  body:is([data-tab="subs"], [data-tab="create"], [data-tab="voz"]) .help-fab { width: 46px; height: 46px; padding: 0; justify-content: center; }
  body:is([data-tab="subs"], [data-tab="create"], [data-tab="voz"]) .help-fab > span { display: none; }
}
.help-fab .ic { width: 20px; height: 20px; color: var(--accent-2); }
.help-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.help-quick .chip { font-size: 0.8rem; padding: 6px 11px; }
#helpForm { margin-top: 14px; }
@media (max-width: 900px) {
  .help-fab { display: none; }
}

/* Panel: gráfico diario */
.admin-chart { margin-bottom: 18px; }
.chart-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.chart-head .card-step { margin: 0; }
.chart-seg button { padding: 6px 12px; font-size: 0.82rem; }
.chart-total { margin: 14px 0 10px; font-size: 0.95rem; }
.chart-total b { font-family: var(--font-display); font-size: 1.5rem; margin-right: 4px; }
.chart { display: flex; align-items: flex-end; gap: 4px; height: 170px; padding-top: 6px; border-bottom: 1px solid var(--line-2); }
.bar-col { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.bar-col i { display: block; width: 100%; max-width: 22px; border-radius: 4px 4px 0 0; background: var(--grad); opacity: 0.85; transition: opacity 0.15s; }
.bar-col:hover i { opacity: 1; }
.bar-col small { font-size: 0.62rem; color: var(--faint); }
@media (max-width: 640px) {
  .bar-col small { display: none; }
  .bar-col:nth-child(5n + 1) small { display: block; }
  .chart { gap: 2px; height: 140px; }
}

/* Conservación (plan gratis) */
.keep-note { margin: -8px 0 18px; padding: 10px 14px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); font-size: 0.88rem; }
.keep-note .link { padding: 0; }
.expiry { font-size: 0.74rem; color: var(--muted); }
.expiry.soon { color: var(--warn); font-weight: 600; }

/* Calendario de publicación (Agente) */
.agent-cal .label { margin-top: 4px; }
.publish-at { font-size: 0.74rem; color: var(--accent-2); font-weight: 500; }

/* Resultado en el teléfono: video más bajo para ver Descargar/Compartir sin bajar tanto */
@media (max-width: 900px) {
  .job-result video { max-height: 58vh; width: auto; max-width: 100%; display: block; }
  .job-result { gap: 18px; }
}

/* Confirmaciones */
#askModal { z-index: 90; }
.ask-box { max-width: 400px; max-height: calc(100dvh - 1.5rem); overflow-y: auto; overscroll-behavior: contain; }
.ask-box h3 { padding-right: 0; font-size: 1.25rem; }
.ask-box p { margin: 10px 0 0; line-height: 1.55; }
.ask-box input { margin-top: 14px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.ask-reference-photos { display: flex; flex-wrap: wrap; gap: .65rem; margin-block: 1rem; }
.ask-reference-photos figure { width: 5rem; margin: 0; }
.ask-reference-photos img { display: block; width: 100%; height: 5.5rem; object-fit: contain; border-radius: .4rem; background: var(--surface-2); }
.ask-reference-photos figcaption { font-size: .75rem; overflow-wrap: anywhere; }
.ask-acknowledgement { display: flex; align-items: flex-start; gap: .6rem; margin-block: .85rem; cursor: pointer; }
/* (2-dic-2026) En fila: «.modal-box label» (más específica) la ponía en columna y la casilla quedaba encima del texto (se
   veía en la casilla legal de «Doblar a otro idioma»). */
.ask-box .ask-acknowledgement { flex-direction: row; }
.ask-box .ask-acknowledgement input { flex: none; margin: .2rem 0 0; }
.ask-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.btn.danger { background: #dc2626; color: #fff; box-shadow: 0 8px 24px -10px rgba(220, 38, 38, 0.7); }
.btn.danger:hover:not(:disabled) { background: #ef4444; }
@media (max-width: 900px) {
  .ask-actions { flex-direction: column-reverse; }
  .ask-actions .btn { width: 100%; padding: 13px; }
}

/* Editor: la etiqueta larga baja de línea en vez de salirse de la pantalla */
.review-tools .chip-info { white-space: normal; flex: 0 1 auto; min-width: 0; max-width: 100%; line-height: 1.4; }
.panel-head p:empty { display: none; }
@media (max-width: 900px) {
  .review-tools { justify-content: flex-start; width: 100%; }
}

/* Funciones: etiqueta "Nuevo" */
.feat-new { border-color: rgba(124, 95, 245, 0.3); background: radial-gradient(320px 180px at 100% 0%, rgba(124, 95, 245, 0.12), transparent 70%), linear-gradient(180deg, rgba(124, 95, 245, 0.05), rgba(255, 255, 255, 0.01)); }
.feat-badge { position: absolute; top: 18px; right: 18px; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; color: #fff; background: var(--grad); }

/* Plan Productora */
.pack.premium { border: 1px solid rgba(245, 185, 66, 0.55); background: radial-gradient(420px 220px at 100% 0%, rgba(245, 185, 66, 0.12), transparent 70%), var(--surface); box-shadow: 0 24px 60px -24px rgba(245, 185, 66, 0.35); }
.pack.premium .tag { background: linear-gradient(120deg, #f5b942, #f97316); }
.pack li.perk-plus { color: var(--text); font-weight: 500; }
.pack li.perk-plus::before { background: rgba(245, 185, 66, 0.16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23f5b942'%3E%3Cpath d='m12 2 3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z'/%3E%3C/svg%3E") center / 10px no-repeat; }
.pricing .packs.plans { max-width: 1100px; }

/* Agente: cada video del plan se puede ajustar */
.ajob { cursor: default; align-items: start; }
.ajob.off { opacity: 0.5; }
.ajob > input { margin-top: 5px; cursor: pointer; }
.ajob-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ajob-main small.muted { overflow-wrap: anywhere; }
.ajob-opts { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 6px; }
.ajob-opts label { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--muted); }
.ajob-opts select { width: auto; padding: 6px 30px 6px 10px; font-size: 0.84rem; border-radius: var(--r-xs); background-position: right 9px center; }
@media (max-width: 520px) {
  .ajob-opts { flex-direction: column; align-items: stretch; }
  .ajob-opts label { justify-content: space-between; }
  .ajob-opts select { flex: 1; max-width: 62%; }
}

/* Plan Élite: logo */
.logo-box { display: flex; gap: 16px; align-items: center; margin: 4px 0 16px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-2); }
.logo-prev { flex: none; width: 96px; height: 96px; border-radius: var(--r-sm); display: grid; place-items: center; overflow: hidden;
  background: repeating-conic-gradient(#2a2a35 0% 25%, #1c1c25 0% 50%) 50% / 16px 16px; color: var(--faint); font-size: 0.75rem; }
.logo-prev img { max-width: 86%; max-height: 86%; object-fit: contain; }
.logo-info { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.logo-info .set-actions { margin-top: 4px; }
.logo-box.locked-elite .logo-prev { opacity: 0.5; }
.tag-elite { display: inline-block; vertical-align: middle; font-size: 0.64rem; font-weight: 700; letter-spacing: 0.05em; padding: 2px 7px; border-radius: 6px; color: #1a1205; background: linear-gradient(120deg, #f5b942, #f97316); margin-left: 4px; }

/* Voz clonada */
.voice-prev { background: var(--grad-soft); color: #cdc2ff; border: 1px solid rgba(124, 95, 245, 0.25); }
.voice-prev .ic { width: 34px; height: 34px; }
.voice-box audio { width: 100%; max-width: 360px; height: 36px; margin-top: 4px; }
.voice-box.locked-elite .voice-prev { opacity: 0.5; }
.btn.busy { opacity: 0.7; pointer-events: none; }
.myvoice-row select { max-width: 320px; }

/* Minutos destacados en cada plan */
.pack .mins { display: inline-flex; align-self: flex-start; gap: 4px; margin: 2px 0 2px; padding: 4px 10px; border-radius: 999px; font-size: 0.82rem; color: var(--text-2); background: rgba(52, 211, 153, 0.1); border: 1px solid rgba(52, 211, 153, 0.25); }
.pack .mins b { color: #6ee7b7; }

/* Modo: tengo mi guion / solo tengo una idea */
.mode-seg { margin: 14px 0 4px; }
.mode-seg button { padding: 9px 6px; }
.mode-seg button small { font-weight: 500; }

/* ===== Portada: probar con una idea, prueba social y selector de precios ===== */
.hero-try { margin-top: 30px; width: 100%; max-width: 580px; }
.ht-formats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.ht-formats button {
  font: inherit; font-size: 0.86rem; font-weight: 600; padding: 7px 13px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.03); color: var(--text-2); transition: 0.15s;
}
.ht-formats button.on { border-color: var(--accent); color: #fff; background: rgba(124, 95, 245, 0.14); }
.ht-box {
  display: flex; gap: 8px; padding: 6px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--surface);
  box-shadow: 0 20px 60px -24px rgba(139, 92, 246, 0.5);
}
.ht-box:focus-within { border-color: var(--accent); }
.ht-box input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 1rem; padding: 10px 12px; }
.ht-box .btn { white-space: nowrap; }
.hero-try small { display: block; margin-top: 9px; font-size: 0.84rem; }
.hero-try + .hero-cta { margin-top: 18px; }
.proof {
  max-width: 760px; margin: 34px auto 0; padding: 18px 22px; border-radius: var(--r-lg); border: 1px solid var(--line-2);
  background: var(--surface); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.proof p { margin: 0; color: var(--text-2); flex: 1 1 320px; }
.price-switch { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 8px 0 28px; }
.price-switch .seg { display: inline-flex; padding: 4px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); }
.price-switch .seg button {
  font: inherit; font-weight: 700; padding: 9px 20px; border-radius: 999px; border: 0; cursor: pointer; background: transparent; color: var(--muted);
}
.price-switch .seg button.on { background: var(--grad); color: #fff; }
.price-switch .seg small { font-weight: 600; opacity: 0.85; margin-left: 4px; }
.price-switch .seg button { white-space: nowrap; }
.price-switch p { margin: 0; }

@media (max-width: 900px) {
  /* En móvil: un video ya en la primera pantalla, justo después del título. */
  .hero { display: flex; flex-direction: column; align-items: center; gap: 0; padding-top: 30px; }
  .hero-text { display: contents; }
  .hero .eyebrow { order: 1; }
  .hero h1 { order: 2; margin: 16px 0 14px; }
  .hero-visual { order: 3; height: 340px; margin: 0 0 18px; }
  .hv-phone { width: 140px; }
  .hv-main { width: 176px; }
  .lead { order: 4; }
  .hero-try { order: 5; }
  .hero-cta { order: 6; }
  .hero-trust { order: 7; }
  .ht-formats { justify-content: center; }
}
@media (max-width: 520px) {
  .hero h1 { font-size: 2.1rem; }
  .hero-visual { height: 300px; }
  .hv-main { width: 160px; }
  .hv-phone { width: 128px; }
  .hero .lead { display: none; }
  .ht-formats { gap: 6px; flex-wrap: nowrap; }
  .ht-formats button { font-size: 0.78rem; padding: 6px 10px; }
  .hv-badge { display: none; }
  .hero-visual { height: 290px; margin-bottom: 8px; }
  .ht-box { flex-direction: column; }
  .ht-box .btn { width: 100%; }
  .ht-box input { text-align: center; }
  .proof { text-align: center; justify-content: center; }
  .proof .btn { width: 100%; }
  .price-switch .seg button { padding: 9px 16px; }
  .price-switch .seg small { display: none; }
}

/* ===== Dame ideas ===== */
.chip-ideas { border-color: var(--accent); color: #fff; background: rgba(124, 95, 245, 0.12); }
.ideas-box { max-width: 560px; width: 100%; max-height: 88vh; overflow-y: auto; }
.ideas-filter { display: flex; gap: 8px; margin: 14px 0; flex-wrap: wrap; }
.ideas-filter select, .ideas-filter input {
  flex: 1 1 160px; min-width: 0; background: var(--surface-2); color: var(--text); border: 1px solid var(--line-2);
  border-radius: var(--r-sm); padding: 10px 12px; font: inherit;
}
.ideas-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.idea-card {
  text-align: left; font: inherit; color: var(--text); cursor: pointer; display: flex; flex-direction: column; gap: 5px;
  padding: 14px 16px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--surface-2); transition: 0.15s;
}
.idea-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.idea-card b { font-size: 1.02rem; }
.idea-card em { color: var(--accent); font-style: normal; font-size: 0.9rem; }
.idea-card p { margin: 0; color: var(--text-2); font-size: 0.9rem; line-height: 1.45; }
.idea-genre { font-size: 0.74rem; color: var(--muted); }
.idea-use { font-size: 0.82rem; font-weight: 700; color: var(--accent); margin-top: 2px; }
.idea-card.skeleton { height: 112px; cursor: default; background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: ideasShimmer 1.2s linear infinite; }
@keyframes ideasShimmer { to { background-position: -200% 0; } }

/* ===== Alargar con IA ===== */
.extend-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; font-size: 0.86rem; color: var(--text-2); }
.extend-row .chip { padding: 5px 11px; font-size: 0.82rem; }
.extend-row .chip:disabled { opacity: 0.6; cursor: wait; }

/* ===== Avisos del administrador ===== */
.admin-alerts .card-step { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-alerts .card-step .btn { margin-left: auto; }
.alert-row { display: flex; gap: 10px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); }
.alert-row:first-child { border-top: 0; }
.alert-row > div { flex: 1; min-width: 0; }
.alert-row pre { white-space: pre-wrap; word-break: break-word; font: inherit; font-size: 0.84rem; color: var(--text-2); margin: 6px 0 0; }
.alert-row.seen { opacity: 0.5; }
.alert-row.lvl-error:not(.seen) b { color: #ff7a8a; }
.alert-ico { font-size: 0.9rem; line-height: 1.6; }
.alert-badge {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px; border-radius: 999px;
  background: #ef4444; color: #fff; font-size: 0.7rem; font-weight: 800; vertical-align: middle;
}
.btn.sm { padding: 6px 12px; font-size: 0.8rem; }

/* ===== Película: modo Short o Película ===== */
.cine-row { margin-top: 14px; }
.cine-row .seg button small { display: block; font-size: 0.72rem; opacity: 0.8; }
.cine-row p { margin: 8px 0 0; }

/* Panel admin: dinero real */
.admin-money { border-color: rgba(52, 211, 153, 0.3); }
.money-stats { margin: 10px 0 8px; }
.money-stats .stat b { font-size: 1.35rem; }
.money-list { max-height: 260px; overflow-y: auto; }
.money-list .prow { flex-wrap: wrap; }
.warn-note { color: var(--warn); }

/* YouTube: conectar canal y publicar */
.yt-acct { margin: 0 0 10px; }
.yt-card .set-check { align-self: start; padding-bottom: 6px; display: flex; gap: 8px; align-items: flex-start; }
.yt-box { margin: 12px 0; padding: 12px; border: 1px solid var(--line, rgba(255,255,255,.12)); border-radius: 14px; }
.yt-row { display: flex; flex-wrap: wrap; gap: 8px; }
.yt-row select { flex: 1 1 110px; min-width: 0; }
#ytWhen { flex: 2 1 170px; }
.yt-btn { flex: 1 1 100%; background: #e11d2e; color: #fff; border: 0; }
.yt-btn:hover { background: #c8102e; }
.yt-btn[disabled] { opacity: .6; }
.yt-state { margin: 8px 0 0; }
.yt-state a { font-weight: 600; }


/* ===== Pulido visual (nov 2026) ===== */
/* Íconos de línea en las tarjetas de formato y tipo de video */
.format-opt > span .ic, .motion-opt .m-ico .ic { width: 18px; height: 18px; color: var(--text-2); }
.format-opt.on > span .ic, .motion-opt.on .m-ico .ic { color: #bcb0ff; }
.format-opt > span, .motion-opt .m-ico { border: 1px solid var(--line); }
.format-opt.on > span, .motion-opt.on .m-ico { border-color: rgba(124, 95, 245, 0.35); }

/* Ejemplos: 6 tarjetas en una fila (antes la 6.ª quedaba sola) */
.show-row { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }

/* Funciones: la tarjeta principal ocupa todo el ancho (sin hueco vacío al lado) */
.feat-grid > .feat-new:first-child { grid-column: 1 / -1; }
.feat-new p { max-width: 760px; }

/* Selector Mensual / Pago único: el "más barato" se lee */
.price-switch .seg button.on small { color: #fff; opacity: 0.9; }
.price-switch .seg button small { color: var(--ok, #34d399); opacity: 1; }

/* Planes: ventajas extra plegadas y botón siempre abajo */
.pack { display: flex; flex-direction: column; }
.pack ul { flex: 1 1 auto; }
.pack:not(.show-all) .perk-extra { display: none; }
.pack .perk-more { list-style: none; padding-left: 0; }
.pack .perk-more::before { display: none; }
.pack .perk-more .link { font-size: 0.86rem; font-weight: 600; color: var(--accent-2, #c084fc); padding: 2px 0; }

/* Formulario en computadora: la columna de tipo y duración acompaña al bajar */
@media (min-width: 1181px) {
  .create-grid > .card:nth-child(2) { position: sticky; top: 20px; }
  /* Si la columna es más alta que la ventana, no acompaña: su parte de abajo (Formato, Más opciones) quedaba
     escondida detrás de «¡Genera!» y no se podía alcanzar (app.js le pone .no-stick). */
  .create-grid > .card:nth-child(2).no-stick { position: static; }
}

/* "Más opciones": en el teléfono no se parte en dos líneas */
.more-opts > summary { flex-wrap: wrap; row-gap: 2px; }
.more-opts > summary small { color: var(--muted); }
@media (max-width: 560px) {
  .more-opts > summary small { display: none; }
}

/* Tarjetas de la biblioteca un poco más pulidas */
.vcard { transition: transform 0.18s, border-color 0.18s; }
.vcard:hover { transform: translateY(-2px); }

@media (max-width: 1100px) {
  .show-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .show-row .show-card:nth-child(n + 4) { display: block; }
}

/* Ventajas PRO: íconos de línea y lista plegada (los planes se ven sin bajar tanto) */
.perk > span { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 10px; background: var(--grad-soft); border: 1px solid rgba(124, 95, 245, 0.22); }
.perk > span .ic { width: 17px; height: 17px; color: #cdc2ff; }
.perks-grid:not(.open) .perk:nth-child(n + 7) { display: none; }
.perks-more { display: block; margin: 0 0 10px; font-weight: 600; color: var(--accent-2, #c084fc); }
@media (max-width: 700px) {
  .perks-grid:not(.open) .perk:nth-child(n + 4) { display: none; }
}

/* Mis videos: tarjeta "Crear video nuevo" */
.vcard.vnew { align-items: center; justify-content: center; gap: 8px; min-height: 260px; border: 1.5px dashed var(--line-2); background: rgba(255, 255, 255, 0.015); box-shadow: none; color: var(--text); cursor: pointer; font: inherit; text-align: center; padding: 20px; }
.vcard.vnew:hover { border-color: rgba(124, 95, 245, 0.6); background: rgba(124, 95, 245, 0.05); }
.vnew-ico { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--grad); color: #fff; box-shadow: 0 10px 24px -8px rgba(116, 87, 242, 0.6); }
.vnew-ico .ic { width: 24px; height: 24px; stroke-width: 2.2; }

/* ===== Pantalla "creando tu video": línea de pasos ===== */
.job-steps { display: flex; gap: 0; margin: 24px 0 20px; padding: 0; list-style: none; }
.job-steps li { flex: 1 1 0; position: relative; padding: 32px 6px 0; background: none; border: 0; border-radius: 0; text-align: center; font-size: 0.8rem; font-weight: 500; color: var(--faint, #6b6b7b); animation: none; min-width: 0; }
.job-steps li[hidden] { display: none; }
.job-steps li::before { content: ""; position: absolute; top: 0; left: calc(50% - 12px); width: 24px; height: 24px; box-sizing: border-box; border-radius: 50%; border: 2px solid var(--line-2); background: var(--bg-2); z-index: 1; display: grid; place-items: center; font-size: 0.72rem; font-weight: 800; color: #06281d; }
.job-steps li::after { content: ""; position: absolute; top: 11px; left: calc(50% + 15px); right: calc(-50% + 15px); height: 2px; border-radius: 2px; background: var(--line-2); }
.job-steps li:last-child::after { display: none; }
.job-steps li.done { background: none; border: 0; color: var(--text-2); }
.job-steps li.done::before { content: "✓"; background: var(--ok, #34d399); border-color: var(--ok, #34d399); }
.job-steps li.done::after { background: var(--ok, #34d399); opacity: 0.6; }
.job-steps li.active { background: none; border: 0; color: #fff; font-weight: 600; animation: none; }
.job-steps li.active::before { border-color: rgba(124, 95, 245, 0.25); border-top-color: var(--accent, #b4a5ff); border-right-color: var(--accent, #b4a5ff); animation: spin 0.9s linear infinite; box-shadow: 0 0 0 4px rgba(124, 95, 245, 0.12); }
@media (max-width: 700px) {
  .job-steps { flex-direction: column; gap: 16px; margin: 20px 0 16px; }
  .job-steps li { padding: 2px 0 0 36px; text-align: left; font-size: 0.9rem; min-height: 24px; }
  .job-steps li::before { left: 0; }
  .job-steps li::after { top: 26px; left: 11px; right: auto; bottom: -14px; width: 2px; height: auto; }
}

/* ===== Storyboard en el teléfono: imagen y datos arriba, edición a todo el ancho ===== */
@media (max-width: 700px) {
  .scene { grid-template-columns: 88px minmax(0, 1fr); column-gap: 10px; row-gap: 8px; padding: 10px; }
  .scene-img { grid-row: 1 / span 2; align-self: start; }
  .scene-body { display: contents; }
  .scene-body > * { grid-column: 1 / -1; }
  .scene-body > .scene-row:first-child { grid-column: 2; flex-wrap: wrap; align-self: start; }
  .scene-body > .shot-tags { grid-column: 2; align-self: start; }
  .scene-row select.sp { flex: 1 1 100%; }
  .scene-tools { margin-left: 0; gap: 6px; }
  .icon-btn { width: 34px; height: 34px; }
  .silent-tag { flex: 1 1 100%; font-size: 0.82rem; line-height: 1.3; }
  .shot-tags span { font-size: 0.72rem; }
  .regen { flex-direction: row; }
  .regen .btn { flex: none; }
}

/* Entrada "Instalar la app" del menú */
.menu .install-entry { color: var(--accent-2, #a78bfa); }
.menu .install-entry .ic { color: var(--accent-2, #a78bfa); }

/* Aviso de guion pulido por la IA */
.polish-chip { color: #c4b5fd; background: rgba(139, 92, 246, 0.1); border-color: rgba(139, 92, 246, 0.28); cursor: help; }

/* Calidad (resolución) con su precio */
.res-row { margin-top: 14px; }
.res-seg button small { display: block; font-size: 0.72rem; opacity: 0.85; }
.res-row p { margin: 8px 0 0; }
.motion-opts > .motion-opt:last-child:nth-child(odd) { grid-column: 1 / -1; }


/* Formato vertical / horizontal */
.aspect-seg button { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.aspect-seg button small { display: block; font-size: 0.72rem; opacity: 0.85; }
.ar-ico { display: inline-block; border: 2px solid currentColor; border-radius: 3px; opacity: 0.8; margin-bottom: 2px; }
.ar-v { width: 11px; height: 18px; }
.ar-h { width: 22px; height: 12px; margin-top: 3px; margin-bottom: 5px; }
#aspectWrap { margin-top: 14px; }
/* Videos horizontales: reproductor y tomas del storyboard en 16:9 */
.wide-video #jobVideo { aspect-ratio: 16 / 9; width: 100%; height: auto; max-height: none; }
.board-wide .scene { grid-template-columns: 200px 1fr; }
.board-wide .scene-img { aspect-ratio: 16 / 9; }
@media (max-width: 700px) { .board-wide .scene { grid-template-columns: 140px minmax(0, 1fr); } }

.job-result.wide-video { grid-template-columns: 1fr; }
.job-result.wide-video video { max-width: 960px; max-height: none; width: 100%; margin: 0 auto; }
#scenesList.board-wide .scene { grid-template-columns: 200px 1fr; }
#scenesList.board-wide .scene-img { aspect-ratio: 16 / 9; }
@media (max-width: 700px) { #scenesList.board-wide .scene { grid-template-columns: 140px minmax(0, 1fr); } }

/* Doblaje a otro idioma */
.dub-box { margin: 12px 0; padding: 12px; border: 1px solid var(--line, rgba(255,255,255,.12)); border-radius: 14px; }
.dub-box .label { margin-top: 0; }
.dub-box .yt-row select { flex: 2 1 160px; }
.dub-box .yt-row .btn { flex: 1 1 120px; }
/* (2-dic-2026, auditoría UX n.º 24) A 390 px «Doblar a otro idioma» se cortaba por los dos lados: botón a todo el ancho. */
@media (max-width: 430px) { .dub-box .yt-row select, .dub-box .yt-row .btn { flex-basis: 100%; } .dub-box .yt-row .btn { white-space: normal; height: auto; min-height: 44px; } }
.dub-box p { margin: 8px 0 0; }

.dub-lip { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; font-size: 0.86rem; }
.up-box .btn { margin-top: 4px; }

/* Botón de notificaciones en la pantalla de espera */
.push-ask { margin: 10px auto 0; display: inline-flex; }

.cf-box:empty { display: none; }
.cf-box { margin: 6px 0; display: flex; justify-content: center; }

/* "Crear Parte N": lo siguiente en una serie; va arriba del todo, con una línea que explica qué se conserva. */
.btn.next-ep { flex-direction: column; gap: 2px; padding-block: 12px; font-size: 1.02rem; }
.btn.next-ep small { display: block; font-size: 0.74rem; font-weight: 500; opacity: 0.75; }


/* ======================================================================
   ÍCONOS Y ACABADO (nov 2026)
   Un solo estilo de íconos (SVG de línea) en toda la interfaz, en lugar de emojis:
   se ven igual en cualquier teléfono o PC.
   ====================================================================== */
/* El ícono sigue el tamaño del texto que acompaña y no estorba al pulsar el botón que lo contiene. */
.ic { width: clamp(14px, 1.15em, 22px); height: clamp(14px, 1.15em, 22px); vertical-align: -0.2em; pointer-events: none; }
.ic.turn { animation: spin 1.1s linear infinite; }
/* En filas alineadas por la línea base del texto, el ícono va centrado con la línea. */
.label > .ic, summary > .ic, .buy-title > .ic, .tpl-head > .ic, .card-step > .ic { align-self: center; }
.label > .ic, .buy-title > .ic, h3 > .ic, h4 > .ic, summary > .ic { color: var(--accent-2); }
h3 > .ic, h4 > .ic { width: 1em; height: 1em; vertical-align: -0.12em; margin-right: 3px; }

/* Título de cada pantalla */
.panel-head h2 .ic { width: 0.86em; height: 0.86em; margin-right: 6px; vertical-align: -0.07em; color: var(--accent); stroke-width: 2; }
.panel-head h2 .ic:has(use[href="#i-ok"]) { color: var(--ok); }

/* Botón de cerrar */
.x .ic { width: 18px; height: 18px; }
.tpl-ico .ic { width: 18px; height: 18px; color: #cdc2ff; }
.tpl-card.on .tpl-ico { background: rgba(124, 95, 245, 0.16); }
.vcard .play .ic { width: 18px; height: 18px; }
.portrait .ph .ic { width: 28px; height: 28px; color: var(--faint); }
.ok-txt { color: var(--ok); font-weight: 600; }
.balance-eq span { display: flex; align-items: center; gap: 8px; }
.balance-eq .ic { color: var(--accent-2); }
.good-txt .ic { color: var(--ok); }

/* Avisos de administración: el color dice la gravedad */
.alert-ico { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; flex: none; background: rgba(251, 191, 36, 0.12); color: var(--warn); }
.alert-ico .ic { width: 15px; height: 15px; }
.lvl-error .alert-ico { background: rgba(248, 113, 113, 0.12); color: var(--err); }
.lvl-info .alert-ico { background: rgba(52, 211, 153, 0.12); color: var(--ok); }

/* Íconos grandes: una insignia con el ícono (progreso, pantallas vacías, compra, tutorial) */
.gen-icon { display: grid; place-items: center; width: 78px; height: 78px; border-radius: 24px; font-size: 0; color: #fff; background: rgba(255, 255, 255, 0.09); border: 1px solid rgba(255, 255, 255, 0.18); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); filter: none; box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.7); }
.gen-icon .ic { width: 34px; height: 34px; stroke-width: 1.6; }
.gen-screen.has-img .gen-icon { width: 36px; height: 36px; border-radius: 12px; background: rgba(0, 0, 0, 0.5); }
.gen-screen.has-img .gen-icon .ic { width: 18px; height: 18px; stroke-width: 1.9; }
.empty-ico, .buy-done .buy-ico, .tour-art:not(.has-video) { display: grid; place-items: center; width: 68px; height: 68px; margin: 0 auto 16px; border-radius: 22px; font-size: 0; color: #cdc2ff; background: var(--grad-soft); border: 1px solid rgba(116, 87, 242, 0.32); box-shadow: 0 16px 36px -16px rgba(116, 87, 242, 0.7); }
.empty-ico .ic, .buy-done .buy-ico .ic, .tour-art:not(.has-video) .ic { width: 30px; height: 30px; stroke-width: 1.7; }
.buy-done .buy-ico { color: var(--ok); background: rgba(52, 211, 153, 0.1); border-color: rgba(52, 211, 153, 0.35); box-shadow: 0 16px 36px -16px rgba(52, 211, 153, 0.6); }
.tour-art:empty { display: none; }

/* Avisos breves: ícono según el tipo (listo, atención, información) */
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px 12px 13px; border-radius: var(--r); text-align: left; line-height: 1.4; background: rgba(24, 24, 34, 0.96); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); width: max-content; }
.toast .ic { width: 19px; height: 19px; margin-top: 1px; color: var(--accent-2); }
.toast.ok { border-color: rgba(52, 211, 153, 0.4); }
.toast.ok .ic { color: var(--ok); }
.toast.warn { border-color: rgba(251, 191, 36, 0.45); }
.toast.warn .ic { color: var(--warn); }

/* ---------- Precios: 6 planes sin apretar (3 por fila desde el 24-nov-2026, con el plan Agencia) ---------- */
.packs.plans { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pricing .packs.plans { max-width: 1120px; }
.pricing .packs:not(.plans) { max-width: 1240px; margin-left: auto; margin-right: auto; }
.pack { padding: 24px 22px; }
.pack .price { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; line-height: 1.12; white-space: nowrap; font-size: clamp(1.7rem, 2.3vw, 2.1rem); }
.pack .price small { line-height: 1.2; }
.pack .mins { display: block; align-self: flex-start; max-width: 100%; border-radius: 10px; line-height: 1.35; }
.pack .plan-film-mins { padding-inline: 8px; font-size: 0.78rem; }
.pack .tag { white-space: nowrap; }
@media (max-width: 1180px) {
  .packs.plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pricing .packs.plans { max-width: 760px; }
}
@media (max-width: 640px) {
  .packs.plans { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 1101px) {
  .perks-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Garantías debajo de los precios */
.trust-row { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 14px; padding: 0; margin: 30px auto 0; max-width: 760px; }
.trust-row li { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font-size: 0.88rem; font-weight: 500; }
.trust-row .ic { width: 16px; height: 16px; color: var(--ok); }

/* Pie de página */
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 20px; }
/* (1-dic-2026) El botón flotante del asistente («¿Dudas? Pregúntame») tapaba la última línea del pie («Pagos con
   tarjeta procesados por Stripe»), en el móvil y en la computadora: el pie deja debajo el alto del botón y su margen,
   así que al final de la página el texto queda por encima. */
.foot-bottom { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
.foot-pay { display: inline-flex; align-items: center; gap: 7px; }
.foot-pay .ic { width: 15px; height: 15px; color: var(--ok); }

/* ---------- Crear: tarjetas de formato en 2 × 2 (ícono a la izquierda) ---------- */
@media (min-width: 901px) {
  .format-opts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .format-opt { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; row-gap: 1px; align-items: center; padding: 12px 14px; }
  .format-opt > span { grid-row: 1 / span 2; width: 38px; height: 38px; margin: 0; }
  .format-opt b { align-self: end; }
  .format-opt small { align-self: start; }

  /* Si el botón Generar queda fuera de la pantalla, una barra flotante lo mantiene a la mano. */
  body[data-tab="create"].gen-away .mgen { display: flex; justify-content: center; position: fixed; left: var(--side); right: 0; bottom: 0; z-index: 35; padding: 34px 24px 18px; background: linear-gradient(transparent, rgba(7, 7, 11, 0.96) 62%); pointer-events: none; animation: fadeIn 0.2s; }
  body[data-tab="create"].gen-away .mgen .btn { pointer-events: auto; width: auto; min-width: 340px; padding: 14px 26px; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 14px 36px -10px rgba(116, 87, 242, 0.85); }
  body[data-tab="create"]:has(#createForm[hidden]) .mgen { display: none; }
  body[data-tab="create"].gen-away:not(:has(#createForm[hidden])) .help-fab { bottom: 84px; }
}
.pack.plan .price { font-size: clamp(1.55rem, 2vw, 1.85rem); }
@media (min-width: 901px) {
  /* El aviso sube para no tapar la barra flotante de Generar. */
  body[data-tab="create"].gen-away:not(:has(#createForm[hidden])) .toast { bottom: 92px; }
}

/* Títulos de tarjeta con ícono: insignia a juego con los pasos numerados */
.card-step > .ic { width: 28px; height: 28px; padding: 6px; border-radius: 8px; color: #cdc2ff; background: var(--grad-soft); border: 1px solid rgba(116, 87, 242, 0.3); }

/* Ajustes: casillas en columna y aire entre bloques */
.set-checks { display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; }
.set-checks .set-check { align-self: stretch; padding: 5px 0; }
.settings-card > .set-actions { margin-top: 10px; }
.settings-card .set-grid + .btn, #pwBox > .btn { margin-top: 2px; }
/* Con ícono, el título no baja a otra línea en el teléfono: el texto se acomoda al lado de la insignia. */
.card-step:has(> .ic) { flex-wrap: nowrap; }
.admin-alerts .card-step:has(> .ic) { flex-wrap: wrap; }
.empty h3 { color: var(--text); font-size: 1.15rem; margin-bottom: 6px; }
.empty p { max-width: 420px; margin: 0 auto 18px; }
.status.cancelled { color: var(--muted); }

/* ---------- Guía de guion: cómo escribir los detalles de rodaje ---------- */
.script-guide { margin-top: 12px; border: 1px solid var(--line); border-radius: var(--r); background: rgba(167, 139, 250, 0.05); }
.script-guide[open] { border-color: rgba(167, 139, 250, 0.3); }
.script-guide > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; padding: 11px 14px; font-weight: 600; font-size: 0.88rem; color: var(--text-2); }
.script-guide > summary:hover { color: var(--text); }
.script-guide > summary::-webkit-details-marker { display: none; }
.script-guide > summary::after { content: ""; margin-left: auto; flex: none; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translateY(-2px); transition: transform 0.2s; }
.script-guide[open] > summary::after { transform: rotate(-135deg); }
.guide-body { padding: 2px 14px 14px; font-size: 0.86rem; color: var(--text-2); }
.guide-body p { margin: 0 0 10px; line-height: 1.5; }
/* Guía de guion (25-nov-2026): a la vista, 3 pasos y el botón de copiar; el formato, plegado. */
.guide-steps { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 6px; font-size: 0.88rem; line-height: 1.45; color: var(--text-2); }
.guide-steps b { color: var(--text); }
.guide-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.guide-format { border-top: 1px solid var(--line); padding-top: 10px; }
.guide-format > summary { cursor: pointer; font-size: 0.86rem; font-weight: 600; color: var(--text-2); margin-bottom: 10px; }
.dr-ai-tip .btn { margin-top: 6px; }
.guide-list { margin: 0 0 12px; display: grid; gap: 8px; }
.guide-list > div { padding: 9px 11px; border-radius: var(--r-sm); background: var(--bg-2); border: 1px solid var(--line); }
.guide-list dt { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.78rem; color: #e9d5ff; line-height: 1.45; overflow-wrap: anywhere; }
.guide-list dd { margin: 4px 0 0; color: var(--muted); font-size: 0.8rem; line-height: 1.4; }
.guide-body .guide-rule { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-sm); background: rgba(52, 211, 153, 0.07); border: 1px solid rgba(52, 211, 153, 0.22); }
.guide-rule .ic { color: var(--ok); margin-top: 2px; flex: none; }
.guide-body .guide-sample { padding: 10px 12px; border-left: 3px solid var(--accent-2); background: var(--bg-2); border-radius: 0 var(--r-sm) var(--r-sm) 0; font-style: italic; color: var(--text); }

/* ---------- Marca de agua: texto + estilo ---------- */
.wm-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: 8px; }
.wm-box .wm-row { margin: 4px 0 10px; }
@media (max-width: 520px) { .wm-row { grid-template-columns: 1fr; } }

/* ---------- Voz de cada personaje (ficha de la serie) ---------- */
.bible-voice { display: flex; flex-direction: column; gap: 5px; margin-top: 4px; padding-top: 7px; border-top: 1px solid var(--line); width: 100%; }
.bible-voice .voice-now { display: flex; align-items: flex-start; gap: 5px; font-size: 0.76rem; line-height: 1.25; color: var(--muted); }
.bible-voice .voice-now .ic { flex: none; width: 13px; height: 13px; margin-top: 1px; }
.bible-voice .voice-row { display: flex; gap: 6px; align-items: center; }
.bible-voice .voice-pick { flex: 1 1 auto; min-width: 0; padding: 7px 9px; font-size: 0.8rem; border-radius: var(--r-xs); }
.bible-voice .voice-play { flex: none; align-self: auto; padding: 7px 9px; }
.bible-voice .voice-play.busy .ic { animation: spin 1s linear infinite; }
.bible-voice-note { display: flex; align-items: center; gap: 5px; margin-top: 4px; font-size: 0.76rem; }
.bible-voice-note .ic { width: 13px; height: 13px; }

/* ---------- Aviso: caras en Escenas vivas ---------- */
.vivas-note { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 0; padding: 9px 11px; border-radius: var(--r-sm); background: rgba(251, 191, 36, 0.07); border: 1px solid rgba(251, 191, 36, 0.24); line-height: 1.4; }
.vivas-note .ic { flex: none; margin-top: 2px; color: #fbbf24; }
.vivas-note[hidden] { display: none; }

/* Sin el formato Edit quedan 3 tipos en la rejilla de 2 columnas: el último ocupa todo el ancho (sin hueco). */
.format-opts.no-edit .format-opt[data-f="historia"] { grid-column: 1 / -1; }

/* Oferta de primera recarga: regalo en cada paquete y aviso arriba de los precios. */
.pack .gift { align-self: flex-start; margin: 4px 0 2px; padding: 4px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; color: #fbbf24; background: rgba(245, 185, 66, 0.12); border: 1px solid rgba(245, 185, 66, 0.4); }
.pack .get small { font-size: 0.8rem; }
.first-offer { margin: 10px auto 0; max-width: 640px; padding: 10px 14px; border-radius: 12px; font-size: 0.9rem; line-height: 1.45; color: var(--text-2); background: rgba(245, 185, 66, 0.1); border: 1px solid rgba(245, 185, 66, 0.35); }
.first-offer b { color: var(--text); }
.first-offer .link { font-weight: 600; color: #fbbf24; white-space: nowrap; }
.first-offer[hidden] { display: none; }
#appFirstOffer { margin: 0 0 16px; max-width: none; }
/* Oferta al terminar el primer video gratis (renderFirstVideoOffer en app.js) */
.fv-offer { margin: 12px 0; padding: 14px 16px; border-radius: var(--r); background: linear-gradient(135deg, rgba(245, 185, 66, 0.12), rgba(52, 211, 153, 0.08)); border: 1px solid rgba(245, 185, 66, 0.4); display: flex; flex-direction: column; gap: 6px; }
.fv-offer[hidden] { display: none; }
.fv-offer-top { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 0.78rem; font-weight: 700; }
.fv-offer-tag { color: #fbbf24; }
.fv-offer-gift { padding: 2px 8px; border-radius: 999px; background: rgba(52, 211, 153, 0.18); color: var(--ok); }
.fv-offer h4 { margin: 2px 0 0; font-size: 1.05rem; line-height: 1.3; }
.fv-offer p { margin: 0; color: var(--text-2); font-size: 0.9rem; }
.fv-offer-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.fv-offer-actions .link { color: #fbbf24; font-weight: 600; }

/* Admin → usuarios: qué hizo cada uno dentro de la web. */
.urow .usteps { display: block; margin-top: 4px; font-size: 0.78rem; line-height: 1.45; color: var(--text-2); }

/* Portada → precios: qué se hace gratis y qué con cualquier paquete. */
.free-vs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 860px; margin: 0 auto 22px; }
.free-vs .fv-col { text-align: left; padding: 16px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.free-vs .fv-col.pro { border-color: rgba(245, 185, 66, 0.4); background: radial-gradient(360px 160px at 100% 0%, rgba(245, 185, 66, 0.08), transparent 70%), var(--surface); }
.free-vs h4 { margin: 0 0 8px; font-size: 1rem; }
.free-vs ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; color: var(--text-2); font-size: 0.9rem; line-height: 1.45; }
.free-vs b { color: var(--text); }
@media (max-width: 640px) { .free-vs { grid-template-columns: 1fr; } }

/* Video gratis con movimiento: sus textos se ocultan si el administrador lo apaga (body.no-free-motion). */
body.no-free-motion .fm-only { display: none !important; }
body:not(.no-free-motion) .fm-off { display: none !important; }
.switch-row .fm-stats { display: block; margin-top: 4px; color: #fbbf24; }

/* Registro dentro de la app de TikTok / Instagram / Facebook: aviso de que Google no funciona ahí. */
.inapp-note { margin: 8px 0 12px; padding: 10px 12px; border-radius: 12px; font-size: 0.86rem; line-height: 1.45; color: var(--text-2); background: rgba(245, 185, 66, 0.1); border: 1px solid rgba(245, 185, 66, 0.35); }
.inapp-note b { color: var(--text); }
.inapp-note .link { font-weight: 600; color: #fbbf24; }
.inapp-note[hidden] { display: none; }

/* Galería "Hecho con NovelaClip" (videos reales con "Hacer uno así") y ayuda con respuestas rápidas. */
.tpl-card.has-media { flex: 0 0 132px; padding: 0; gap: 0; overflow: hidden; }
.tpl-media { position: relative; display: block; aspect-ratio: 9 / 14; background: var(--surface-3); overflow: hidden; }
.tpl-media video, .tpl-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; display: block; }
.tpl-card:not(.has-media) .tpl-media { aspect-ratio: auto; background: none; }
.tpl-tag { position: absolute; left: 6px; bottom: 6px; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.02em; padding: 2px 6px; border-radius: 6px; background: rgba(0, 0, 0, 0.6); color: #fff; }
.tpl-body { display: flex; flex-direction: column; gap: 2px; padding: 8px 9px 10px; }
.tpl-card.has-media small { font-size: 0.72rem; }
.tpl-go { margin-top: 4px; font-size: 0.74rem; font-weight: 700; color: #bcb0ff; }
.style-opt .sw { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
.help-faq { display: grid; gap: 6px; margin: 14px 0 8px; }
.help-faq details { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; background: var(--surface-2); }
.help-faq summary { cursor: pointer; font-weight: 600; font-size: 0.9rem; }
.help-faq p { margin: 8px 0 2px; font-size: 0.86rem; line-height: 1.5; color: var(--text-2); }

/* Receta de cada ejemplo ("Hacer uno así" deja todo igual que el ejemplo) y "Comprar y seguir". */
.tpl-recipe { display: block; margin-top: 3px; font-size: 0.66rem; font-weight: 600; letter-spacing: 0.01em; color: var(--accent-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recipe-note { margin: 4px 0 14px; padding: 14px 14px 12px; border-radius: var(--r); background: var(--grad-soft); border: 1px solid rgba(116, 87, 242, 0.35); box-shadow: 0 10px 30px -18px rgba(116, 87, 242, 0.7); animation: popIn 0.22s var(--ease); }
.rn-head { display: flex; align-items: flex-start; gap: 10px; }
.rn-head > div { flex: 1; min-width: 0; }
.rn-head b { font-size: 0.92rem; }
.rn-ico { flex: 0 0 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--grad); color: #fff; }
.rn-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.rn-chip { font-size: 0.72rem; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line-2); color: var(--text); }
.rn-x { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 8px; border: 0; background: transparent; color: var(--muted); font-size: 1.2rem; line-height: 1; cursor: pointer; }
.rn-x:hover { background: rgba(255, 255, 255, 0.08); color: var(--text); }
.rn-msg { margin: 10px 0 0; font-size: 0.84rem; line-height: 1.5; color: var(--text-2); }
.rn-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.need-box { max-width: 440px; text-align: center; }
.need-box h3 { padding-right: 0; }
.need-packs { display: grid; gap: 8px; margin: 18px 0 10px; text-align: left; }
.need-pack { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 13px 14px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); cursor: pointer; transition: border-color 0.15s, transform 0.15s; font: inherit; }
.need-pack:hover { border-color: var(--accent); transform: translateY(-1px); }
.need-pack.best { border-color: rgba(124, 95, 245, 0.6); box-shadow: var(--ring); }
.np-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.np-name small { color: var(--muted); font-size: 0.76rem; }
.np-price { display: flex; flex-direction: column; align-items: flex-end; font-weight: 800; font-size: 1.05rem; }
.np-price em { font-style: normal; font-size: 0.64rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.04em; }
.need-all { display: block; margin: 4px auto 0; }
.need-foot { display: flex; gap: 6px; align-items: flex-start; text-align: left; margin-top: 8px; }
.need-foot .ic { flex: 0 0 auto; color: var(--ok); margin-top: 2px; }

/* Panel de administrador en pestañas + bandeja de mensajes de ayuda + "Tus mensajes" en Ayuda. */
.admin-head { margin-bottom: 14px; }
.admin-nav { position: sticky; top: 0; z-index: 5; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -4px 18px; padding: 8px 4px; background: linear-gradient(var(--bg) 70%, transparent); }
.admin-nav::-webkit-scrollbar { display: none; }
.admin-nav button { position: relative; flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); font: inherit; font-size: 0.86rem; font-weight: 600; cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s; }
.admin-nav button:hover { color: var(--text); border-color: var(--line-3); }
.admin-nav button.on { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 8px 22px -10px rgba(116, 87, 242, 0.8); }
.an-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--err); color: #fff; font-size: 0.68rem; font-weight: 800; display: inline-grid; place-items: center; }
.admin-nav button.on .an-badge { background: #fff; color: var(--accent); }
.admin-pane { display: grid; gap: 16px; animation: popIn 0.18s var(--ease); }
/* Admin → Guía IA: el texto para pegar en otra IA. */
.admin-guide .set-actions { margin: 12px 0 6px; }
.ai-guide-view summary { cursor: pointer; font-weight: 600; margin-top: 8px; }
.ai-guide-pre { max-height: 60vh; overflow: auto; white-space: pre-wrap; word-break: break-word; font-size: 12.5px; line-height: 1.5; padding: 12px; margin-top: 8px; border-radius: 10px; background: rgba(0, 0, 0, 0.25); border: 1px solid var(--line, rgba(255, 255, 255, 0.12)); }
.admin-pane > .stats { margin: 0; }
.inbox-seg { margin: 12px 0 14px; max-width: 360px; }
.msg { border: 1px solid var(--line-2); border-radius: var(--r); padding: 14px; background: var(--surface-2); margin-bottom: 12px; }
.msg.unread { border-color: rgba(124, 95, 245, 0.55); box-shadow: var(--ring); }
.msg.done { opacity: 0.82; }
.msg-head { display: flex; align-items: flex-start; gap: 10px; }
.msg-who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.msg-who b { word-break: break-all; }
.msg-tag { align-self: flex-start; font-size: 0.66rem; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: var(--surface-4); color: var(--text-2); }
.msg-tag.paid { background: rgba(245, 185, 66, 0.16); color: var(--gold); }
.msg-state { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; font-size: 0.74rem; font-weight: 700; color: var(--warn); }
.msg-state.ok { color: var(--ok); }
.msg-body { margin: 12px 0 8px; white-space: normal; line-height: 1.55; font-size: 0.92rem; }
.msg-steps { margin: 6px 0; font-size: 0.8rem; color: var(--muted); }
.msg-steps summary { cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.msg-steps small { display: block; margin-top: 6px; line-height: 1.5; }
.msg-reply { margin: 10px 0; padding: 10px 12px; border-left: 3px solid var(--ok); background: rgba(52, 211, 153, 0.07); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.msg-reply p { margin: 4px 0 0; font-size: 0.88rem; line-height: 1.5; }
.msg-actions { display: grid; gap: 8px; margin-top: 10px; }
.msg-input { width: 100%; resize: vertical; }
.msg-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.msg-gift { display: inline-flex; gap: 6px; align-items: center; margin-left: auto; }
.msg-credits { width: 64px; }
.inbox-empty { display: flex; gap: 8px; align-items: center; padding: 18px 4px; }
.help-thread { margin: 12px 0 4px; display: grid; gap: 8px; max-height: 260px; overflow-y: auto; }
.ht-head { display: flex; gap: 6px; align-items: center; font-weight: 700; font-size: 0.86rem; color: var(--text-2); }
.ht-item { border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 10px 12px; background: var(--surface-2); }
.ht-item.new { border-color: rgba(52, 211, 153, 0.6); }
.ht-q { margin: 0; font-size: 0.84rem; line-height: 1.45; color: var(--text-2); }
.ht-q small { display: block; margin-bottom: 2px; }
.ht-a { margin-top: 8px; font-size: 0.86rem; }
.ht-a b { display: inline-flex; gap: 5px; align-items: center; color: var(--ok); font-size: 0.8rem; }
.ht-a p { margin: 4px 0 0; line-height: 1.5; }
.ht-new { font-size: 0.62rem; padding: 1px 6px; border-radius: 999px; background: var(--ok); color: #04130d; }
.ht-wait { margin: 6px 0 0; display: flex; gap: 6px; align-items: center; font-size: 0.78rem; color: var(--muted); }
.has-dot { position: relative; }
.has-dot::after { content: ""; position: absolute; top: 6px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 2px var(--bg); }
@media (max-width: 640px) {
  .msg-gift { margin-left: 0; }
  .msg-head { flex-wrap: wrap; }
}

/* ---------- INICIO (lo primero que se ve al entrar) ---------- */
.home-hero { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: 28px; border: 1px solid rgba(116, 87, 242, 0.28); background: radial-gradient(120% 140% at 0% 0%, rgba(124, 95, 245, 0.18), transparent 55%), radial-gradient(120% 140% at 100% 0%, rgba(109, 93, 252, 0.2), transparent 55%), var(--surface); box-shadow: 0 30px 80px -40px rgba(116, 87, 242, 0.55), var(--shadow); }
.hh-glow { position: absolute; inset: -40% -10% auto auto; width: 420px; height: 420px; border-radius: 50%; background: conic-gradient(from 180deg, rgba(124, 95, 245, 0.22), rgba(109, 93, 252, 0.22), rgba(124, 95, 245, 0.22)); filter: blur(60px); animation: hhSpin 18s linear infinite; pointer-events: none; }
@keyframes hhSpin { to { transform: rotate(360deg); } }
.hh-top { position: relative; display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.hh-hi { margin: 0 0 4px; font-weight: 600; color: var(--text-2); }
.hh-title { margin: 0; font-family: var(--font-display); font-size: clamp(1.6rem, 3.4vw, 2.3rem); letter-spacing: -0.035em; line-height: 1.1; }
.hh-sub { margin: 8px 0 0; color: var(--text-2); max-width: 560px; line-height: 1.5; }
.hh-credits { flex: 0 0 auto; display: grid; justify-items: end; gap: 4px; padding: 12px 14px; border-radius: var(--r); background: rgba(0, 0, 0, 0.25); border: 1px solid var(--line-2); backdrop-filter: blur(8px); }
.hh-credits small { color: var(--muted); font-size: 0.72rem; }
.hh-credits b { font-size: 1.6rem; line-height: 1; font-family: var(--font-display); }
.hh-form { position: relative; margin-top: 20px; display: grid; gap: 12px; }
.hh-formats { display: flex; gap: 8px; flex-wrap: wrap; }
.hh-formats button { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.04); color: var(--text-2); font: inherit; font-weight: 600; font-size: 0.88rem; cursor: pointer; transition: all 0.15s; }
.hh-formats button:hover { color: var(--text); border-color: var(--line-3); }
.hh-formats button.on { background: #fff; color: #111; border-color: #fff; }
.hh-input { display: flex; gap: 10px; align-items: stretch; padding: 8px; border-radius: var(--r-lg); background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line-2); box-shadow: 0 0 0 4px rgba(124, 95, 245, 0.06); transition: border-color 0.15s, box-shadow 0.15s; }
.hh-input:focus-within { border-color: rgba(124, 95, 245, 0.6); box-shadow: var(--ring); }
.hh-input textarea { flex: 1; min-width: 0; resize: none; border: 0 !important; background: transparent !important; box-shadow: none !important; font-size: 1rem; line-height: 1.45; padding: 8px 10px; }
.hh-input .btn { flex: 0 0 auto; align-self: stretch; }
.hh-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.hh-chips .chip { max-width: 100%; text-align: left; white-space: normal; }
.hh-gift { position: relative; display: flex; gap: 8px; align-items: center; margin: 16px 0 0; padding: 10px 12px; border-radius: var(--r); background: rgba(52, 211, 153, 0.1); border: 1px solid rgba(52, 211, 153, 0.35); color: var(--text); font-size: 0.9rem; }
.hh-gift .ic { color: var(--ok); flex: 0 0 auto; }
.home-block { margin-top: 28px; }
/* (2-dic-2026, auditoría UX n.º 29) Franja «N videos se borran pronto» arriba de Mis videos y de Inicio. */
.expiry-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 14px 0; padding: 12px 14px; border-radius: var(--r); border: 1px solid rgba(251, 191, 36, 0.35); background: rgba(251, 191, 36, 0.08); color: var(--text); }
.expiry-banner > .ic { color: var(--warn); flex: 0 0 auto; }
.expiry-banner > span { flex: 1 1 200px; min-width: 0; }
#homeExpiry { margin-top: 22px; }
.hb-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.hb-head h3 { margin: 0; font-family: var(--font-display); font-size: 1.15rem; letter-spacing: -0.02em; }
.hb-head .link { margin-left: auto; }
.home-recent { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.hr-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--surface); color: var(--text); text-align: left; font: inherit; cursor: pointer; transition: border-color 0.15s, transform 0.15s; }
.hr-item:hover { border-color: var(--line-3); transform: translateY(-1px); }
.hr-thumb { flex: 0 0 52px; height: 72px; border-radius: 10px; overflow: hidden; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); }
.hr-thumb.wide { flex-basis: 96px; height: 54px; }
.hr-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hr-info { flex: 1; min-width: 0; display: grid; gap: 4px; }
.hr-info b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hr-st { display: inline-flex; gap: 5px; align-items: center; font-size: 0.78rem; color: var(--muted); }
.hr-st.st-done { color: var(--ok); }
.hr-st.st-review { color: var(--accent-2); }
.hr-st.st-failed { color: var(--err); }
.hr-st.st-working, .hr-st.st-queued { color: var(--warn); }
.hr-go { color: var(--muted); }
.home-tpl { margin: 0 -4px; padding: 4px; }
.home-tips { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.tip { position: relative; padding: 16px 16px 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.tip b { display: block; margin: 8px 0 4px; }
.tip p { margin: 0; color: var(--text-2); font-size: 0.86rem; line-height: 1.5; }
.tip-n { width: 26px; height: 26px; border-radius: 8px; display: inline-grid; place-items: center; font-weight: 800; font-size: 0.8rem; background: var(--grad); color: #fff; }

/* ---------- Modo fácil / avanzado del formulario de crear ---------- */
.mode-switch { display: inline-flex; gap: 4px; padding: 4px; margin: 0 0 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-2); }
.mode-switch button { display: grid; grid-template-columns: auto auto; column-gap: 7px; align-items: center; padding: 8px 14px; border-radius: 10px; border: 0; background: transparent; color: var(--text-2); font: inherit; font-weight: 700; font-size: 0.86rem; cursor: pointer; text-align: left; }
.mode-switch button small { grid-column: 2; font-weight: 500; font-size: 0.7rem; color: var(--muted); }
.mode-switch button .ic { grid-row: span 2; }
.mode-switch button.on { background: var(--grad-soft); color: var(--text); box-shadow: inset 0 0 0 1px rgba(124, 95, 245, 0.35); }
body.easy-mode .adv { display: none !important; }
section[data-panel="create"]:has(#jobView:not([hidden])) #modeSwitch { display: none; }
#generateBtn.pulse { animation: genPulse 0.9s var(--ease) 3; }
@keyframes genPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(124, 95, 245, 0.6); } 50% { box-shadow: 0 0 0 12px rgba(124, 95, 245, 0); } }
@media (max-width: 640px) {
  .home-hero { padding: 20px 16px; }
  .hh-top { flex-direction: column; }
  .hh-credits { display: none; } /* (el celular ya muestra los créditos arriba) */
  .hh-input { flex-direction: column; }
  .hh-input .btn { width: 100%; }
  .mode-switch { display: flex; width: 100%; }
  .mode-switch button { flex: 1; }
}

/* Elegir el gancho (primeros 3 segundos) y asistente del storyboard. */
.chip-hook { border-color: rgba(245, 185, 66, 0.45) !important; color: var(--gold) !important; }
.hook-box { margin: 10px 0 4px; }
.hook-help { display: flex; gap: 6px; align-items: center; margin: 0 0 8px; font-size: 0.84rem; color: var(--text-2); }
.hook-help .ic { color: var(--gold); }
.hook-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.hook-card { display: flex; flex-direction: column; gap: 5px; text-align: left; padding: 12px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); font: inherit; cursor: pointer; transition: border-color 0.15s, transform 0.15s; }
.hook-card:hover { border-color: var(--gold); transform: translateY(-1px); }
.hook-card b { font-size: 0.95rem; line-height: 1.3; }
.hook-card p { margin: 0; font-size: 0.82rem; line-height: 1.45; color: var(--text-2); }
.hook-card small { display: flex; gap: 5px; align-items: flex-start; font-size: 0.74rem; color: var(--muted); line-height: 1.4; }
.hook-card small .ic { flex: 0 0 auto; margin-top: 1px; }
.hk-style { align-self: flex-start; font-size: 0.64rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; background: rgba(245, 185, 66, 0.14); color: var(--gold); }
.hk-use { margin-top: auto; padding-top: 4px; font-size: 0.76rem; font-weight: 700; color: var(--gold); }
.hook-card.skeleton { min-height: 120px; cursor: default; background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.hook-chosen { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: var(--r); border: 1px solid rgba(245, 185, 66, 0.5); background: rgba(245, 185, 66, 0.07); }
.hook-chosen > div { flex: 1; min-width: 0; }
.hook-chosen small { color: var(--gold); font-weight: 700; font-size: 0.72rem; }
.hook-chosen b { display: block; margin: 2px 0; }
.hook-chosen p { margin: 0; font-size: 0.84rem; color: var(--text-2); }
.hk-ico { flex: 0 0 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: rgba(245, 185, 66, 0.18); color: var(--gold); }
.sb-assist { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0; padding: 12px; border-radius: var(--r); background: var(--grad-soft); border: 1px solid rgba(116, 87, 242, 0.3); }
.sa-label { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 0.88rem; }
.sa-label small { font-weight: 500; color: var(--muted); font-size: 0.74rem; }
.sa-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.sa-btns button { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: inherit; font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: border-color 0.15s; }
.sa-btns button:hover:not(:disabled) { border-color: var(--accent); }
.sa-btns button:disabled { opacity: 0.55; cursor: wait; }
.sa-btns button.busy { opacity: 1; border-color: var(--accent); background: var(--soft); }
.sa-btns .sa-undo { display: inline-flex; gap: 5px; align-items: center; color: var(--warn); }

/* Director Pro (OpenAI revisa cada toma). */
.pro-row { display: block; margin: 4px 0 10px; cursor: pointer; }
.pro-row input { position: absolute; opacity: 0; pointer-events: none; }
.pro-card { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r); border: 1px solid rgba(245, 185, 66, 0.35); background: linear-gradient(120deg, rgba(245, 185, 66, 0.08), rgba(116, 87, 242, 0.08)); transition: border-color 0.15s, box-shadow 0.15s; }
.pro-row:hover .pro-card { border-color: rgba(245, 185, 66, 0.7); }
.pro-row.on .pro-card { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 12px 30px -16px rgba(245, 185, 66, 0.8); }
.pro-ico { flex: 0 0 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, #f7c35a, #e9a234); color: #1a1205; }
.pro-txt { flex: 1; min-width: 0; display: grid; gap: 3px; }
.pro-txt b { font-size: 0.95rem; }
.pro-txt b em { font-style: normal; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.05em; padding: 2px 6px; margin-left: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); color: var(--text-2); vertical-align: middle; }
.pro-txt small { color: var(--text-2); font-size: 0.78rem; line-height: 1.45; }
.pro-price { flex: 0 0 auto; font-weight: 800; font-size: 0.82rem; color: var(--gold); white-space: nowrap; }
.pro-card::after { content: ""; position: absolute; top: 10px; right: 10px; width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid var(--line-3); }
.pro-row.on .pro-card::after { background: var(--gold); border-color: var(--gold); box-shadow: inset 0 0 0 3px #1a1205; }
.pro-row .pro-price { margin-right: 22px; }
.pro-row.locked .pro-card { opacity: 0.75; }
/* Escena completa: lo que dura el capítulo y lo que cuesta (o por qué no se puede). */
.escena-quote { display: block; margin-top: 6px; font-weight: 700; color: var(--text); }
.escena-quote:empty { display: none; }
.escena-quote.bad { color: var(--danger, #e5484d); }
.escena-warnings { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: rgba(251, 191, 36, 0.08); border: 1px solid rgba(251, 191, 36, 0.35); }
.escena-warnings ul { margin: 6px 0 0; padding-left: 18px; }
.escena-warnings li { margin: 3px 0; }
.escena-warnings p { margin: 0; }
.pro-note { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0; padding: 10px 12px; border-radius: var(--r-sm); background: rgba(245, 185, 66, 0.08); border: 1px solid rgba(245, 185, 66, 0.35); font-size: 0.86rem; line-height: 1.45; }
.pro-note .ic { color: var(--gold); flex: 0 0 auto; margin-top: 2px; }
@media (max-width: 640px) { .pro-card { flex-wrap: wrap; } .pro-price { margin-left: 50px; } }
/* Revisión segundo a segundo (misma tarjeta, en azul; "incluida" cuando va con Director Pro). */
.sec-row .pro-card { border-color: rgba(77, 182, 255, 0.35); background: linear-gradient(120deg, rgba(77, 182, 255, 0.08), rgba(124, 92, 255, 0.08)); }
.sec-row:hover .pro-card { border-color: rgba(77, 182, 255, 0.7); }
.sec-row.on .pro-card { border-color: #4db6ff; box-shadow: 0 0 0 1px #4db6ff, 0 12px 30px -16px rgba(77, 182, 255, 0.8); }
.sec-row .pro-ico { background: linear-gradient(135deg, #4db6ff, #7c5cff); color: #fff; }
.sec-row .pro-price { color: #4db6ff; }
.sec-row.on .pro-card::after { background: #4db6ff; border-color: #4db6ff; box-shadow: inset 0 0 0 3px #071a2b; }
.sec-row.included { cursor: default; }
.sec-row.included .pro-card { opacity: 0.85; }

/* "Lo mismo, pero contigo" (tendencias con tu foto) y aviso de con qué caras sale el video. */
.trend-strip { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 10px; margin: 0 -4px; scrollbar-width: thin; }
.trend-card { flex: 0 0 168px; scroll-snap-align: start; display: flex; flex-direction: column; padding: 0; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--surface); color: var(--text); text-align: left; font: inherit; cursor: pointer; overflow: hidden; transition: border-color 0.15s, transform 0.15s; }
.trend-card:hover { border-color: var(--accent-2); transform: translateY(-2px); }
.tr-img { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--surface-3); }
.tr-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.tr-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 55%, rgba(0, 0, 0, 0.55)); }
.tr-you { position: absolute; z-index: 1; left: 8px; bottom: 8px; display: inline-flex; gap: 4px; align-items: center; font-size: 0.68rem; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: var(--grad); color: #fff; }
.tr-body { display: grid; gap: 2px; padding: 9px 10px 11px; }
.tr-body small { color: var(--muted); font-size: 0.74rem; }
.tr-go { margin-top: 4px; font-size: 0.75rem; font-weight: 700; color: var(--accent-2); }
.trend-box { max-width: 440px; }
.trend-hero { height: 150px; margin: -32px -32px 16px; border-radius: var(--r-xl) var(--r-xl) 0 0; background: var(--surface-3) center 25% / cover no-repeat; position: relative; }
.trend-hero::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(transparent 40%, var(--surface)); }
.trend-cast { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; margin: 14px 0; }
.trend-cast:empty { display: none; }
.trend-pick { display: grid; gap: 4px; padding: 6px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); font: inherit; font-size: 0.78rem; cursor: pointer; }
.trend-pick:hover { border-color: var(--accent); }
.trend-pick img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.trend-foot { margin-top: 10px; text-align: center; }
.cast-mini { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line-2); font-size: 0.82rem; }
.cast-mini img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 2px solid var(--surface); margin-right: -14px; }
.cast-mini img:last-of-type { margin-right: 4px; }
.cast-mini span { flex: 1; min-width: 0; }
@media (max-width: 640px) { .trend-hero { margin: -24px -20px 14px; } }

/* ---------- CAPA PREMIUM (15-nov-2026): más profundidad, brillo y movimiento suave en toda la app ---------- */
/* Fondo con luz de ambiente detrás del contenido (no se mueve al hacer scroll). */
#app::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; background: radial-gradient(900px 520px at 78% -8%, rgba(109, 93, 252, 0.13), transparent 60%), radial-gradient(700px 480px at 30% -12%, rgba(124, 95, 245, 0.1), transparent 60%); }
/* (Aquí había ".sidebar { position: relative }": pisaba el position: sticky y el menú se iba con el scroll.) */
/* Títulos de cada sección con degradado sutil. */
.panel-head h2 { background: linear-gradient(180deg, #ffffff 30%, #d9cff7); -webkit-background-clip: text; background-clip: text; color: transparent; }
.panel-head h2 .ic { -webkit-text-fill-color: initial; }
/* Tarjetas: borde con brillo arriba (como vidrio) y sombra más profunda. */
.card { background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0) 120px), var(--surface); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 18px 40px -24px rgba(0, 0, 0, 0.85); }
/* Las secciones aparecen con un fundido suave al cambiar de pestaña. */
[data-panel]:not([hidden]) { animation: panelIn 0.28s var(--ease); }
@keyframes panelIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
/* Botón principal con destello al pasar el ratón. */
.btn.primary { position: relative; overflow: hidden; }
.btn.primary::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.28), transparent); transform: skewX(-18deg); transition: left 0.6s var(--ease); pointer-events: none; }
.btn.primary:hover:not(:disabled)::after { left: 120%; }
/* Menú lateral: el elegido brilla un poco. */
.menu button.active { background: linear-gradient(90deg, rgba(124, 95, 245, 0.12), rgba(109, 93, 252, 0.06)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05); }
/* Barra del celular: vidrio y la pestaña elegida resaltada. */
.mnav { backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); }
.mnav button.active { color: var(--text); }
.mnav button.active .ic { color: var(--accent); filter: drop-shadow(0 0 8px rgba(124, 95, 245, 0.6)); }
/* Tarjetas de la galería y de videos: elevación al pasar el ratón. */
.tpl-card, .vcard, .hr-item, .trend-card, .tip { will-change: transform; }
.tpl-card:hover { box-shadow: 0 18px 40px -22px rgba(116, 87, 242, 0.55); }
.tip { transition: border-color 0.15s, transform 0.15s; }
.tip:hover { border-color: var(--line-2); transform: translateY(-2px); }
/* Barras de desplazamiento finas y oscuras. */
* { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.14) transparent; }
::-webkit-scrollbar { width: 10px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, 0.22); }
/* Foco visible y bonito para teclado. */
:focus-visible { outline: none; box-shadow: var(--ring) !important; border-radius: 10px; }
/* Selección de texto con el color de la marca. */
::selection { background: rgba(124, 95, 245, 0.35); color: #fff; }
@media (prefers-reduced-motion: reduce) {
  [data-panel]:not([hidden]), .hh-glow { animation: none !important; }
  .btn.primary::after { display: none; }
}

/* Avance en vivo: tira con las escenas ya hechas. */
.gen-strip { margin: 14px 0 4px; }
.gen-strip small { display: block; margin-bottom: 6px; color: var(--muted); font-size: 0.74rem; font-weight: 600; }
.gs-row { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.gs-row img { flex: 0 0 auto; width: 44px; height: 78px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line-2); animation: gsIn 0.4s var(--ease); }
@keyframes gsIn { from { opacity: 0; transform: scale(0.85); } to { opacity: 1; transform: none; } }

.pro-rec { display: inline-flex; gap: 4px; align-items: center; margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: linear-gradient(135deg, #f7c35a, #e9a234); color: #1a1205; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; vertical-align: middle; box-shadow: 0 4px 14px -6px rgba(245, 185, 66, 0.9); }
.pro-rec .ic { width: 11px; height: 11px; }

/* Varios idiomas (i18n.js): la página se oculta un instante mientras llega la traducción; selector de idioma. */
html.i18n-wait body { visibility: hidden; }
.lang-pick { background: transparent; color: inherit; border: 1px solid rgba(255,255,255,.15); border-radius: 10px; padding: 6px 8px; font: inherit; font-size: 13px; cursor: pointer; max-width: 150px; }
.lang-pick option { color: #111; }
#app .lang-pick { width: 100%; max-width: none; margin: 8px 0; }
@media (max-width: 640px) { .topbar .lang-pick { max-width: 92px; padding: 5px 4px; font-size: 12px; } }

/* Piloto automático (pestaña Agente) */
.autopilot .ap-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.autopilot h3 { margin: 0 0 4px; }
.autopilot .ap-head .switch-row { margin: 0; flex: 0 0 auto; }
.autopilot .ap-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 14px 0 6px; }
.autopilot .ap-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; color: var(--muted); }
.autopilot .ap-grid .ap-full { grid-column: 1 / -1; }
.autopilot .ap-grid input, .autopilot .ap-grid select { background: var(--surface-2, #15151c); color: inherit; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 10px; font: inherit; }
.autopilot .ap-actions { display: flex; justify-content: flex-end; }
.autopilot .ap-cost { margin: 4px 0 8px; color: var(--text-2); }
.autopilot .ap-cost.warn { color: var(--warn); }
@media (max-width: 640px) { .autopilot .ap-grid { grid-template-columns: 1fr 1fr; } .autopilot .ap-head { flex-direction: column; } }

/* Subtítulos automáticos */
.subs-card { display: flex; flex-direction: column; gap: 12px; }
.subs-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 16px; border: 2px dashed rgba(255,255,255,.18); border-radius: 16px; cursor: pointer; text-align: center; transition: border-color .2s, background .2s; }
.subs-drop:hover { border-color: var(--accent, #ffd400); background: rgba(255,255,255,.03); }
.subs-drop .ic { width: 30px; height: 30px; }
.subs-card .ap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.subs-card .ap-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; color: var(--muted); }
.subs-card .ap-grid .ap-full { grid-column: 1 / -1; }
.subs-card select { background: var(--surface-2, #15151c); color: inherit; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 10px; font: inherit; }
.subs-progress .bar { height: 8px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; margin-bottom: 6px; }
.subs-progress .bar span { display: block; height: 100%; width: 0; background: var(--accent, #ffd400); transition: width .4s; }
#subsList { display: grid; gap: 12px; margin-top: 14px; }
.subs-item { display: flex; gap: 14px; align-items: flex-start; }
.subs-item video { width: 160px; max-height: 284px; border-radius: 12px; background: #000; flex: 0 0 auto; }
.subs-meta { display: flex; flex-direction: column; gap: 8px; min-width: 0; word-break: break-word; }
.subs-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.subs-item.failed { border-color: rgba(255,90,90,.35); }
@media (max-width: 640px) { .subs-item { flex-direction: column; } .subs-item video { width: 100%; max-height: 420px; } }
.autopilot .ap-yt { margin: 4px 0 2px; gap: 10px; align-items: center; }
.pro-model { display: flex; flex-direction: column; gap: 6px; margin: -4px 0 14px 54px; font-size: 0.85rem; color: var(--muted); }
.pro-model select { max-width: 320px; background: var(--surface-2, #15151c); color: inherit; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 9px 10px; font: inherit; }

/* Herramientas: voz en off, doblaje y miniaturas */
.tool-tabs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin: 0 0 20px; }
.tool-tab { display: flex; align-items: center; gap: 11px; min-width: 0; min-height: 72px; padding: 12px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); color: var(--text); font: inherit; text-align: start; cursor: pointer; touch-action: manipulation; }
.tool-tab .ic { width: 22px; height: 22px; flex: none; color: var(--accent); }
.tool-tab b, .tool-tab small { display: block; }
.tool-tab small { margin-block-start: 3px; color: var(--text-2); font-size: .76rem; line-height: 1.25; }
.tool-tab.on { background: var(--surface-2); border-color: var(--accent); }
.tool-section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-block: 0 8px; }
.tool-section-head .btn { min-height: 44px; }
.tool-results { margin-block-start: 24px; }
.tool-results h3 { scroll-margin-top: 12px; }
#toolList[hidden] { display: none; }
@media (max-width: 600px) {
  .tool-tabs { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
  .tool-tab { padding: 9px; gap: 7px; min-height: 68px; }
  .tool-tab .ic { width: 18px; height: 18px; }
}
.tool-lbl { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; color: var(--muted); }
.tool-lbl textarea, .tool-lbl input { background: var(--surface-2, #15151c); color: var(--text, #fff); border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 10px; font: inherit; resize: vertical; }
#toolProgress { margin-top: 12px; }
#toolList { display: grid; gap: 12px; margin-top: 14px; }
.thumb-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.thumb-grid a { position: relative; display: block; border-radius: 10px; overflow: hidden; }
.thumb-grid img { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.thumb-grid span { position: absolute; right: 6px; bottom: 6px; font-size: .75rem; background: rgba(0,0,0,.65); padding: 3px 8px; border-radius: 8px; color: #fff; display: inline-flex; gap: 4px; align-items: center; }
/* (2-dic-2026, auditoría UX n.º 54) «Descargar» tapaba el título de la miniatura 2: va debajo de la imagen. */
.thumb-grid a { display: flex; flex-direction: column; gap: 6px; overflow: visible; }
.thumb-grid a img { border-radius: 10px; }
.thumb-grid span { position: static; align-self: flex-start; }
.subs-item.thumbs { display: block; }
@media (max-width: 640px) { .thumb-grid { grid-template-columns: 1fr; } }

/* Programa de afiliados: 20 % en dinero (src/referrals.js) */
.aff-hero { max-width: 680px; margin: 0 0 14px; padding: 22px 22px 20px; border-radius: var(--r-xl); background: radial-gradient(120% 140% at 0% 0%, rgba(52, 211, 153, 0.22), transparent 55%), var(--grad-soft); border: 1px solid rgba(52, 211, 153, 0.35); }
.aff-hero h2 { font-size: clamp(1.5rem, 4.6vw, 2.2rem); line-height: 1.12; margin: 10px 0 8px; }
.aff-hero p { color: var(--text-2); margin: 0; }
.aff-tag { display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.02em; padding: 5px 10px; border-radius: 999px; background: rgba(52, 211, 153, 0.15); color: var(--ok); }
.aff-pct { background: linear-gradient(120deg, #34d399, #f5b942); -webkit-background-clip: text; background-clip: text; color: transparent; white-space: nowrap; }
.aff-balance { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.aff-balance > div { padding: 14px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.aff-balance small { color: var(--muted); }
.aff-balance strong { font-size: 1.8rem; color: var(--ok); }
.aff-progress .bar { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin-bottom: 6px; }
.aff-progress .bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #34d399, #f5b942); transition: width 0.4s; }
.aff-share { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.aff-share .btn { justify-content: center; text-decoration: none; }
.aff-wa { background: #25d366; color: #05210f; }
.aff-fb { background: #1877f2; color: #fff; }
.aff-x { background: #000; color: #fff; border: 1px solid var(--line-3); }
.aff-paypal { margin-top: 2px; }
.aff-rules { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.aff-chip { margin-left: 6px; font-size: 0.7rem; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: rgba(52, 211, 153, 0.18); color: var(--ok); }
.aff-banner { display: flex; align-items: center; gap: 12px; width: 100%; margin: 0 0 14px; padding: 12px 16px; border-radius: var(--r); border: 1px solid rgba(52, 211, 153, 0.4); background: linear-gradient(120deg, rgba(52, 211, 153, 0.14), rgba(245, 185, 66, 0.1)); color: var(--text-2); font: inherit; font-size: 0.92rem; text-align: left; cursor: pointer; }
.aff-banner:hover { border-color: var(--ok); }
.aff-banner-ico { font-size: 1.5rem; }
.aff-banner-go { margin-left: auto; color: var(--ok); font-weight: 700; white-space: nowrap; }
.aff-landing .aff-hero { margin: 0 auto; max-width: 820px; text-align: center; }
.aff-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 18px 0; }
.aff-steps div { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px; border-radius: var(--r); background: rgba(0, 0, 0, 0.25); font-size: 0.9rem; color: var(--text-2); }
.aff-steps b { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #05210f; }
.comm-due { color: var(--ok); }
/* Simulador de ganancias (renderAffSim en app.js) */
.aff-sim { margin-top: 14px; }
.aff-sim:empty { display: none; }
.aff-sim-landing { max-width: 820px; margin: 14px auto 0; padding: 18px 20px; border-radius: var(--r-xl); background: var(--surface-2); border: 1px solid var(--line); text-align: left; }
.aff-sim-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.aff-sim-head h3 { margin: 0; font-size: 1.1rem; }
.aff-sim-calc { display: grid; grid-template-columns: 1fr auto; gap: 10px 14px; align-items: center; margin-top: 12px; }
.aff-sim-calc label { display: block; font-size: 0.92rem; color: var(--text-2); }
.aff-sim-calc label .aff-sim-range { display: block; margin-top: 10px; }
.aff-sim-calc output { font-weight: 700; color: var(--text); }
.aff-sim-range { width: 100%; accent-color: #34d399; }
.aff-sim-prod { grid-column: 1; max-width: 100%; }
.aff-sim-out { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-direction: column; align-items: flex-end; text-align: right; padding: 12px 16px; border-radius: var(--r); background: rgba(52, 211, 153, 0.1); border: 1px solid rgba(52, 211, 153, 0.3); min-width: 170px; }
.aff-sim-out small { color: var(--muted); font-size: 0.78rem; }
.aff-sim-total { font-size: 1.9rem; color: var(--ok); line-height: 1.15; }
.aff-sim-list { margin-top: 10px; }
.aff-sim-list summary { cursor: pointer; color: var(--muted); font-size: 0.88rem; }
.aff-sim-list table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 0.88rem; }
.aff-sim-list th, .aff-sim-list td { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: right; }
.aff-sim-list th:first-child, .aff-sim-list td:first-child { text-align: left; }
.aff-sim-list th { color: var(--muted); font-weight: 600; }
.aff-sim-list td b { color: var(--ok); }
.aff-sim-tag { font-size: 0.68rem; padding: 1px 6px; border-radius: 999px; background: var(--surface-3); color: var(--muted); }
.aff-sim-note { margin: 10px 0 0; }
.profit-table td small { display: block; color: var(--muted); font-size: 0.75rem; }
.profit-table td:first-child, .profit-table th:first-child { text-align: left; white-space: normal; }
.profit-pos { color: var(--ok); }
.profit-neg { color: #f87171; }
.profit-calc { margin: 14px 0 8px; }
@media (max-width: 640px) {
  .aff-sim-calc { grid-template-columns: 1fr; }
  .aff-sim-out { grid-column: 1; grid-row: auto; align-items: flex-start; text-align: left; }
}
@media (max-width: 640px) {
  .aff-share { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aff-steps { grid-template-columns: 1fr; }
  .aff-banner-go { display: none; }
}

.comm-detail { grid-column: 1 / -1; margin: -4px 0 8px; }
.comm-detail summary { cursor: pointer; color: var(--muted); }
.comm-item { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 6px 0; border-top: 1px solid rgba(255,255,255,.07); }

/* Admin: tabla de ventas por origen */
.src-table { overflow-x: auto; }
.src-table table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.src-table th, .src-table td { padding: 6px 8px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.src-table th:first-child, .src-table td:first-child { text-align: left; }
.src-table th { color: var(--text-2); font-weight: 600; }

/* Celular: en la barra de la portada no cabían el nombre, el idioma, "Entrar" y "Empezar gratis" (el botón se salía
   de la pantalla). Se deja el logo solo y el idioma solo con el globo. */
@media (max-width: 480px) {
  .topbar .brand span { display: none; }
  .topbar .lang-pick { width: 38px; max-width: 38px; height: 34px; padding: 0; overflow: hidden; color: transparent; appearance: none; -webkit-appearance: none; background: center / 18px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e5e7eb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M2 12h20M12 2a15 15 0 0 1 0 20M12 2a15 15 0 0 0 0 20'/%3E%3C/svg%3E"); }
  .topbar-in { gap: 8px; }
}

/* Portada: ideas listas para tocar debajo del cuadro de la idea */
.ht-ideas { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.ht-ideas > span { font-size: 0.84rem; width: 100%; }
.ht-ideas .chip { border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.04); color: var(--text); border-radius: 999px; padding: 7px 12px; font: inherit; font-size: 0.86rem; cursor: pointer; text-align: left; }
.ht-ideas .chip:hover { border-color: var(--accent); background: rgba(124, 95, 245, 0.12); }

/* Celular: la portada medía ~18 pantallas (13 funciones y 4 precios uno debajo del otro). Funciones y precios pasan a
   tarjetas que se deslizan de lado, como los ejemplos. */
@media (max-width: 700px) {
  #landing .feat-grid, #landing .pricing .packs {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; max-width: none;
    margin-left: -16px; margin-right: -16px; padding: 4px 16px 10px; scrollbar-width: none;
  }
  #landing .feat-grid::-webkit-scrollbar, #landing .pricing .packs::-webkit-scrollbar { display: none; }
  #landing .pricing .packs[hidden] { display: none; }
  #landing .feat-grid > .feat, #landing .pricing .packs > .pack { flex: 0 0 84%; min-width: 0; scroll-snap-align: center; }
  #funciones .section-head::after, #pricing .price-switch::after {
    content: "Desliza para ver más →"; display: block; margin-top: 8px; font-size: 0.8rem; color: var(--text-2); opacity: 0.8;
  }
  /* La recarga a tu medida es una sola tarjeta: ancho completo y sin "Desliza". */
  #landing .pricing .packs.solo > .pack { flex: 0 0 100%; }
  #pricing .price-switch.no-swipe::after { content: none; }
}

/* Carpetas de Mis videos (18-nov-2026) */
.lib-folders{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:4px 0 16px}
.fchip{display:inline-flex;align-items:center;gap:6px;padding:8px 14px;border-radius:999px;border:1px solid rgba(255,255,255,.12);background:var(--surface-2);color:var(--text-2);font:600 .88rem/1 inherit;cursor:pointer}
.fchip .ic{width:15px;height:15px}
.fchip small{color:var(--muted);font-weight:600}
.fchip:hover{color:var(--text);border-color:rgba(255,255,255,.22)}
.fchip.on{color:#fff;border-color:rgba(124, 95, 245, .6);background:rgba(124, 95, 245, .12)}
.fchip.on small{color:#cdc2ff}
.fchip.add{border-style:dashed;background:transparent}
.fdel{margin-left:4px;color:var(--muted)}
.folder-menu{position:fixed;z-index:80;min-width:210px;max-width:min(300px,calc(100vw - 16px));max-height:60vh;overflow:auto;padding:8px;border-radius:14px;background:var(--surface-3);border:1px solid rgba(255,255,255,.12);box-shadow:0 18px 40px -10px rgba(0,0,0,.7);display:flex;flex-direction:column;gap:2px}
.folder-menu b{font-size:.75rem;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);padding:6px 10px 4px}
.folder-menu button{display:flex;align-items:center;gap:8px;text-align:left;padding:10px;border-radius:9px;border:0;background:transparent;color:var(--text);font:500 .92rem/1.2 inherit;cursor:pointer}
.folder-menu button .ic{width:16px;height:16px;flex:none}
.folder-menu .fm-series{display:flex;align-items:center;gap:8px;padding:8px 10px;margin-bottom:4px;border-radius:9px;background:rgba(255,255,255,.05);font-size:.88rem;cursor:pointer}
.folder-menu button:hover:not(:disabled){background:rgba(255,255,255,.07)}
.folder-menu button:disabled{color:var(--muted);cursor:default}
.folder-empty{grid-column:1/-1;padding:18px 4px}
.folder-empty .ic{width:15px;height:15px;vertical-align:-2px}

/* Clips de un video largo (Herramientas) */
.clip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 8px; }
.clip-grid > div { display: flex; flex-direction: column; gap: 6px; }
.clip-grid video { width: 100%; aspect-ratio: 9 / 16; background: #000; border-radius: 10px; object-fit: cover; }
.trial-note { margin: 6px 0 0; padding: 8px 12px; border-radius: 10px; background: rgba(52, 211, 153, .1); color: #6ee7b7; }
/* (1-dic-2026) Voz en off y doblaje con solo los créditos de regalo: el aviso va arriba, antes de rellenar nada. */
.tool-lock { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 12px; padding: 9px 11px; border-radius: var(--r-sm); background: rgba(251, 191, 36, 0.07); border: 1px solid rgba(251, 191, 36, 0.24); line-height: 1.4; }
.tool-lock .ic { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--warn); }
.tool-lock[hidden] { display: none; }

/* ---------- Asistente "Clip" (burbuja y panel) ---------- */
.bot-fab {
  position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 46; display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 16px 11px 13px; border-radius: 999px; border: 1px solid rgba(139, 92, 246, 0.45);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.95), rgba(79, 70, 229, 0.95)); color: #fff; font: inherit; font-size: 0.88rem; font-weight: 600;
  cursor: pointer; box-shadow: 0 10px 30px rgba(76, 29, 149, 0.45); transition: transform 0.15s var(--ease), box-shadow 0.15s;
}
.bot-fab:hover { transform: translateY(-1px); box-shadow: 0 14px 34px rgba(76, 29, 149, 0.55); }
.bot-fab .ic { width: 19px; height: 19px; }
.bot-fab[hidden], .bot-fab.open { display: none; }
/* (1-dic-2026, revisión visual) Solo el icono, en todos los tamaños: con el texto «¿Dudas? Pregúntame» (194×42) tapaba
   títulos y frases de la portada en la primera pantalla y las últimas líneas del FAQ. El nombre lo da aria-label. */
.bot-fab { width: 52px; height: 52px; padding: 0; justify-content: center; }
.bot-fab > span { display: none; }
.bot-fab .ic { width: 22px; height: 22px; }
.bot-panel {
  position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 70; width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100vh - 110px));
  display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; background: var(--surface, #12121a); border: 1px solid var(--line-2);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55); animation: botIn 0.18s var(--ease);
}
.bot-panel[hidden] { display: none; }
@keyframes botIn { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }
.bot-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.bot-head > div { display: flex; flex-direction: column; line-height: 1.2; flex: 1; min-width: 0; }
.bot-head small { color: var(--muted); font-size: 0.74rem; }
.bot-head .x { position: static; }
.bot-ava { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; background: linear-gradient(135deg, #7c3aed, #4f46e5); color: #fff; }
.bot-ava .ic { width: 18px; height: 18px; }
.bot-msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.bot-msg { max-width: 88%; padding: 9px 12px; border-radius: 14px; font-size: 0.9rem; line-height: 1.45; overflow-wrap: anywhere; }
.bot-msg p { margin: 0; }
.bot-msg p + p, .bot-msg p + ul, .bot-msg ul + p { margin-top: 6px; }
.bot-msg ul { margin: 4px 0 0; padding-left: 18px; }
.bot-msg a { color: #a78bfa; }
.bot-a { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 4px; color: var(--text-2); }
.bot-a b { color: var(--text); }
.bot-u { align-self: flex-end; background: linear-gradient(135deg, #7c3aed, #4f46e5); color: #fff; border-bottom-right-radius: 4px; }
.bot-typing { display: flex; gap: 4px; padding: 12px 14px; }
.bot-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: botDot 1s infinite ease-in-out; }
.bot-typing span:nth-child(2) { animation-delay: 0.15s; }
.bot-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes botDot { 0%, 80%, 100% { opacity: 0.3; transform: none; } 40% { opacity: 1; transform: translateY(-3px); } }
.bot-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; }
.bot-chips[hidden] { display: none; }
.bot-chips .chip { font-size: 0.8rem; padding: 6px 11px; cursor: pointer; }
.bot-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }
.bot-form input { flex: 1; min-width: 0; font-size: 16px; }
.bot-form .btn { padding: 0 14px; }
.bot-foot { display: flex; align-items: center; gap: 8px; padding: 0 14px 12px; font-size: 0.8rem; flex-wrap: wrap; }
.bot-foot .link { font-weight: 600; }
.bot-foot .bot-team-link { margin-inline-start: auto; }
@media (max-width: 640px) {
  .bot-fab { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); width: 48px; height: 48px; padding: 0; }
  .bot-panel { right: 0; left: 0; bottom: 0; width: 100%; height: min(78vh, 600px); border-radius: 18px 18px 0 0; padding-bottom: env(safe-area-inset-bottom); }
}
.bot-log { border-top: 1px solid var(--line); padding: 8px 0; }
.bot-log summary { cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.bot-log summary span { font-weight: 600; }
.bot-log > div { margin-top: 6px; color: var(--text-2); }
.bot-log ul { margin: 4px 0; padding-left: 18px; }

/* ---------- Con o sin subtítulos (video terminado) ---------- */
.subs-seg { margin: 12px 0 4px; }
.subs-seg button { flex: 1; }

/* ---------- Borradores de serie ---------- */
.dr-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.dr-head .btn { flex: 0 0 auto; }
.dr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.dr-item { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px; text-align: left; color: var(--text); font: inherit; cursor: pointer; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); transition: border-color 0.15s, transform 0.15s; }
.dr-item:hover { border-color: var(--line-3); transform: translateY(-1px); }
.dr-item.skeleton { height: 96px; cursor: default; background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
.dr-cover { flex: 0 0 72px; height: 72px; border-radius: var(--r); overflow: hidden; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); }
.dr-cover img { width: 100%; height: 100%; object-fit: cover; }
.dr-cover .ic { width: 26px; height: 26px; }
.dr-item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.dr-item-body b { font-family: var(--font-display); font-size: 1.02rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dr-item-body small { font-size: 0.8rem; color: var(--text-2); }
.dr-item-body small.muted { color: var(--muted); }
.dr-go { flex: 0 0 auto; color: var(--muted); }

.dr-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.dr-bar .link .ic { transform: rotate(180deg); }
.dr-save { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--muted); }
.dr-save.saved { color: var(--ok); }
.dr-save.error { color: var(--warn); }
.dr-title { width: 100%; font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; letter-spacing: -0.03em; background: transparent; border: 1px solid transparent; padding: 6px 10px; margin: 0 -10px 14px; }
.dr-title:hover { border-color: var(--line-2); }
.dr-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 18px; padding-bottom: 2px; border-bottom: 1px solid var(--line); }
.dr-tabs::-webkit-scrollbar { display: none; }
.dr-tabs button { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px; font: inherit; font-weight: 600; font-size: 0.9rem; color: var(--muted); background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -3px; cursor: pointer; }
.dr-tabs button:hover { color: var(--text); }
.dr-tabs button.on { color: var(--text); border-bottom-color: var(--accent); }
.dr-tabs small { min-width: 18px; padding: 1px 6px; border-radius: 99px; background: var(--surface-3); color: var(--text-2); font-size: 0.72rem; }
.dr-tabs small:empty { display: none; }

.dr-setup { margin-bottom: 16px; }
.dr-setup .label:first-child { margin-top: 0; }
.dr-setup-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dr-chapters { display: flex; flex-direction: column; gap: 14px; }
.dr-chapter-nav { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 145px), 1fr)); gap: 8px; margin: 0 0 1rem; }
.dr-chapter-nav:empty { display: none; }
.dr-chapter-link { display: grid; align-content: start; justify-items: start; gap: 4px; min-width: 0; min-height: 74px; padding: 9px 11px; text-align: left; border: 1px solid var(--line-2); border-radius: var(--r-sm); color: inherit; background: var(--surface); font: inherit; cursor: pointer; }
.dr-chapter-link:hover { border-color: var(--line-3); }
.dr-chapter-link[aria-current="true"] { border-color: var(--accent-2); background: var(--grad-soft), var(--surface); }
.dr-chapter-link strong { font-size: .83rem; }
.dr-part-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); font-size: .81rem; }
.dr-chapter-link .dr-chip { align-self: end; margin-top: 2px; padding: 2px 7px; font-size: .7rem; }
.dr-ch { padding: 18px 20px; }
.dr-ch .label { margin: 14px 0 6px; }
.dr-ch-head { display: flex; align-items: center; gap: 10px; }
.dr-num { flex: 0 0 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--grad); color: #fff; font-weight: 800; font-size: 0.85rem; }
.dr-ch-title { flex: 1; min-width: 0; font-weight: 700; font-size: 1.02rem; background: transparent; border-color: transparent; padding: 6px 8px; }
.dr-ch-title:hover { border-color: var(--line-2); }
.dr-chip { display: inline-flex; padding: 3px 10px; border-radius: 99px; font-size: 0.74rem; font-weight: 600; white-space: nowrap; border: 1px solid var(--line-2); color: var(--text-2); }
.dr-chip.ok { color: var(--ok); border-color: rgba(52, 211, 153, 0.35); background: rgba(52, 211, 153, 0.08); }
.dr-chip.warn { color: var(--warn); border-color: rgba(251, 191, 36, 0.35); background: rgba(251, 191, 36, 0.08); }
.dr-chip.bad { color: var(--err); border-color: rgba(248, 113, 113, 0.35); }
.dr-chip.run { color: var(--accent-2); border-color: rgba(167, 139, 250, 0.35); }
.dr-chip.review { color: #9dddeb; border-color: rgba(103, 217, 239, 0.36); background: rgba(103, 217, 239, 0.08); }
.dr-ch-start { display: flex; margin: 12px 0; }
.dr-ch-start .btn { min-height: 40px; }
.dr-project-help { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 12px 0; }
.dr-item-body .dr-project-type { color: var(--accent-2); font-weight: 700; }
.dr-project-settings { margin-top: 14px; }
.dr-project-settings > summary { cursor: pointer; color: var(--text-2); font-weight: 650; }
.dr-project-settings > summary .ic { width: 16px; color: var(--accent-2); vertical-align: middle; }
#draftBack { white-space: nowrap; }
.dr-project-dialog { width: min(460px, calc(100vw - 28px)); padding: 18px; }
.dr-project-dialog h3 { font-size: 1.2rem; }
.dr-project-options { display: grid; gap: 8px; min-width: 0; margin: 14px 0; padding: 0; border: 0; }
.dr-project-options legend { padding: 0 0 8px; color: var(--text-2); font-size: .85rem; font-weight: 700; }
.dr-project-options label { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); cursor: pointer; }
.dr-project-options label:has(input:checked) { border-color: var(--accent-2); background: var(--grad-soft), var(--surface); }
.dr-project-options input { width: auto; accent-color: var(--violet); }
.dr-project-options b, .dr-project-options small { display: block; }
.dr-project-options small { color: var(--text-2); }
.dr-project-dialog .btn { width: 100%; }
.dr-project-error { margin: 0 0 10px; color: var(--err); }
.dr-ch-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.dr-ch-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dr-board-entry { flex: 1 0 100%; display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.dr-board-entry p { margin: 0; }
.dr-board-entry > .link { justify-self: start; }
.dr-add-wide { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 14px; padding: 16px; font: inherit; font-weight: 600; color: var(--text-2); background: transparent; border: 1px dashed var(--line-2); border-radius: var(--r-lg); cursor: pointer; }
.dr-add-wide:hover { color: var(--text); border-color: var(--line-3); background: var(--surface); }

.dr-help { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 16px; padding: 12px 14px; font-size: 0.86rem; line-height: 1.5; color: var(--text-2); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.dr-help > .ic { flex: 0 0 auto; margin-top: 2px; color: var(--accent-2); }
.dr-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 14px; }
.dr-card { display: flex; gap: 14px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.dr-card.busy { opacity: 0.6; pointer-events: none; }
.dr-card.busy .dr-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent); background-size: 200% 100%; animation: shimmer 1s linear infinite; }
.dr-photo { position: relative; flex: 0 0 120px; height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; overflow: hidden; padding: 0; font: inherit; color: var(--muted); background: var(--surface-2); border: 1px dashed var(--line-3); border-radius: var(--r); cursor: pointer; }
.dr-photo:hover { color: var(--text); border-color: var(--accent); }
.dr-photo .ic { width: 24px; height: 24px; }
.dr-photo small { font-size: 0.76rem; font-weight: 600; }
.dr-photo.has { border-style: solid; border-color: var(--line-2); }
.dr-photo img { width: 100%; height: 100%; object-fit: cover; }
.dr-photo-edit { position: absolute; right: 6px; bottom: 6px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(0, 0, 0, 0.65); color: #fff; opacity: 0; transition: opacity 0.15s; }
.dr-photo-edit .ic { width: 15px; height: 15px; }
.dr-photo:hover .dr-photo-edit, .dr-photo:focus-visible .dr-photo-edit { opacity: 1; }
.dr-fields { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.dr-fields input { font-weight: 700; }
.dr-fields textarea { flex: 1; min-height: 84px; font-size: 0.9rem; }
.dr-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dr-card-foot select { width: auto; max-width: 60%; padding: 6px 10px; font-size: 0.82rem; }
.dr-card.shot .dr-photo { flex-basis: 160px; height: 130px; }
.dr-spot { display: flex; flex-direction: column; gap: 4px; font-size: 0.8rem; color: var(--muted); }
.dr-spot select { width: 100%; padding: 7px 10px; font-size: 0.84rem; }
.dr-spot-info { font-size: 0.76rem; line-height: 1.4; }
/* Plano, ángulo y cámara de la toma, en una fila (25-nov-2026). */
.dr-camrow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.dr-camrow select { width: 100%; }
@media (max-width: 640px) { .dr-camrow { grid-template-columns: minmax(0, 1fr); } }
/* Ambiente del escenario: gente de fondo, quiénes y sonido del lugar (25-nov-2026). */
.dr-amb { display: flex; flex-direction: column; gap: 6px; }
.dr-fields .dr-amb input { font-weight: 400; font-size: 0.84rem; }
.dr-voice { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
.dr-voice-play { padding: 7px 12px; font-size: 0.82rem; white-space: nowrap; }
.dr-voice-used { font-size: 0.74rem; color: var(--warn, #f5b942); }
.dr-cast { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.dr-cast-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border: 1px solid var(--line-3); border-radius: 999px; background: none; color: inherit; font-size: 0.8rem; cursor: pointer; }
.dr-cast-chip:not(:has(img)) { padding-left: 10px; }
.dr-cast-chip img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.dr-cast-chip.on { border-color: var(--accent, #a855f7); background: color-mix(in srgb, var(--accent, #a855f7) 18%, transparent); }
.dr-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 178px; font: inherit; color: var(--text-2); background: transparent; border: 1px dashed var(--line-2); border-radius: var(--r-lg); cursor: pointer; }
.dr-add:hover { color: var(--text); border-color: var(--accent); background: var(--surface); }
.dr-add .ic { width: 26px; height: 26px; color: var(--accent); }
.dr-add small { color: var(--muted); font-size: 0.8rem; }
.dr-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; margin-bottom: 14px; padding: 26px 16px; font: inherit; color: var(--text-2); background: var(--surface); border: 1px dashed var(--line-3); border-radius: var(--r-lg); cursor: pointer; }
.dr-drop:hover, .dr-drop.over { color: var(--text); border-color: var(--accent); background: var(--soft); }
.dr-drop.busy { pointer-events: none; opacity: 0.75; }
.dr-drop .ic { width: 28px; height: 28px; color: var(--accent); }
.dr-drop small { color: var(--muted); font-size: 0.8rem; }
.dr-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); }
.danger-link { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 0.82rem; }
.danger-link:hover { color: var(--err); }
.danger-link .ic { width: 14px; height: 14px; }

/* Capítulo de un borrador preparado en Crear */
.dr-link { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding: 12px 14px; background: var(--soft); border: 1px solid rgba(124, 95, 245, 0.3); border-radius: var(--r); }
.dr-link-ico { flex: 0 0 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: var(--grad); color: #fff; }
.dr-link > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dr-link small { color: var(--text-2); font-size: 0.8rem; }

@media (max-width: 640px) {
  .dr-setup-row { grid-template-columns: 1fr; }
  .dr-card { flex-direction: column; }
  .dr-photo, .dr-card.shot .dr-photo { flex-basis: auto; width: 100%; height: 220px; }
  .dr-title { font-size: 1.3rem; }
  .dr-ch { padding: 14px; }
  .dr-ch-actions { width: 100%; }
  .dr-ch-actions .btn { flex: 1; }
  .dr-grid { grid-template-columns: 1fr; }
}

/* Pegar desde una IA */
.dr-head-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.dr-empty-ai { margin-top: 14px; }
.dr-bar-right { display: inline-flex; align-items: center; gap: 14px; }
.dr-bar-right .link { display: inline-flex; align-items: center; gap: 6px; }
.modal-box.dr-import { max-width: 640px; max-height: calc(100vh - 32px); overflow-y: auto; padding: 28px; }
.dr-ask { margin: 16px 0 4px; padding: 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); }
.dr-ask p { margin: 8px 0 10px; color: var(--text-2); line-height: 1.5; }
.dr-ask-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dr-import textarea { width: 100%; font: 0.84rem/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.dr-import-source { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; margin: 16px 0 8px; }
.dr-import-source .label { margin: 0; }
.dr-sum { margin-top: 14px; padding: 14px 16px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--r); font-size: 0.9rem; overflow-wrap: anywhere; }
.dr-sum ul { margin: 8px 0; padding-left: 18px; display: grid; gap: 4px; }
.dr-sum-warn { display: flex; align-items: center; gap: 6px; margin: 8px 0; color: var(--warn); font-size: 0.86rem; }
.dr-import-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
@media (max-width: 640px) {
  .dr-head-actions { width: 100%; }
  .dr-head-actions .btn { flex: 1; }
  .dr-bar-right .link span, .dr-bar-right #draftImportBtn { font-size: 0.8rem; }
  .modal-box.dr-import { padding: 22px 16px; }
}

/* Borradores: consejo de usar una IA con las instrucciones */
.dr-ai-tip { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 0; max-width: 720px; color: var(--text-2); line-height: 1.5; }
.dr-ai-tip > .ic { flex: 0 0 auto; margin-top: 2px; color: var(--accent-2); }

/* Revisar guion */
.dr-lint:empty { display: none; }
.dr-lint { margin-top: 10px; padding: 10px 12px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); font-size: 0.85rem; line-height: 1.5; }
.dr-lint ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 5px; }
.dr-lint .lint-head { display: flex; align-items: center; gap: 6px; color: var(--warn); }
.dr-lint .lint-head.bad { color: var(--err); }
.dr-lint .lint-error { color: #fecaca; }
.dr-lint .lint-warn { color: #fde68a; }
.dr-lint .lint-info { color: var(--text-2); }
.dr-lint .lint-n { font-size: 0.75rem; color: var(--muted); }
.dr-lint .lint-ok { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--ok); }
.lint-look { display: flex; gap: 6px; align-items: flex-start; color: var(--warn); font-size: 0.78rem; line-height: 1.4; }
.lint-look[hidden] { display: none; }
/* El mismo color identifica la escena en el guion, el storyboard y sus fotos. */
[data-scene-tone="0"] { --scene-accent: #c0a7ff; }
[data-scene-tone="1"] { --scene-accent: #67d9ef; }
[data-scene-tone="2"] { --scene-accent: #f2c878; }
[data-scene-tone="3"] { --scene-accent: #80dfb2; }
[data-scene-tone="4"] { --scene-accent: #f5a7c5; }
[data-scene-tone="5"] { --scene-accent: #93b9ff; }
.scene-index { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.scene-index, .dr-scene-head, .dr-take-head, .eb-top h4 { scroll-margin-block-start: 10px; }
.dr-ch > .scene-index { margin: 16px 0 10px; }
.scene-index button {
  min-height: 38px; padding: 7px 13px; border-radius: 999px; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--scene-accent) 34%, var(--line-2));
  background: color-mix(in srgb, var(--scene-accent) 10%, var(--surface));
  color: var(--scene-accent); font: inherit; font-size: .82rem; font-weight: 700;
}
.scene-index button:hover { border-color: var(--scene-accent); background: color-mix(in srgb, var(--scene-accent) 18%, var(--surface)); }
.scene-header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; min-width: 0; }
.scene-number {
  display: grid; justify-items: center; align-content: center; gap: 1px; min-width: 57px; min-height: 53px; padding: 5px 8px;
  border: 1px solid color-mix(in srgb, var(--scene-accent) 35%, transparent); border-radius: var(--r-sm);
  color: var(--scene-accent); background: color-mix(in srgb, var(--scene-accent) 13%, var(--surface)); line-height: 1.1;
}
.scene-number small { font-size: .66rem; font-weight: 700; }
.scene-number b { font-family: var(--font-display); font-size: 1.45rem; font-variant-numeric: tabular-nums; }
.scene-heading { display: grid; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.scene-heading > :is(strong, h4) { color: var(--text); font-size: 1rem; font-weight: 750; line-height: 1.28; text-wrap: wrap; }
.scene-meta { color: var(--text-2); font-size: .78rem; line-height: 1.4; }
.scene-chevron { width: 8px; height: 8px; margin-inline: 5px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; color: var(--scene-accent); transform: rotate(45deg); }
details[open] > summary > .scene-chevron { transform: rotate(225deg); }
.scene-index button:focus-visible, .scene-header:focus-visible, .dr-take-head:focus-visible, .eb-top h4:focus-visible { outline: 2px solid var(--scene-accent); outline-offset: 3px; }
.scene-take-number {
  display: inline-block; padding: 3px 7px; border-radius: 6px;
  background: color-mix(in srgb, var(--scene-accent, var(--muted)) 13%, var(--surface));
  color: var(--scene-accent, var(--text-2)); font-size: .75rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.dr-scene-list { display: grid; gap: 12px; margin: 12px 0; }
.dr-scene-list:empty { display: none; }
.dr-scene, .eb-scene { min-width: 0; border: 1px solid var(--line-2); border-inline-start: 3px solid var(--scene-accent); border-radius: var(--r); background: var(--surface); }
.dr-scene-head {
  padding: 12px; border-radius: 0 calc(var(--r) - 1px) calc(var(--r) - 1px) 0; list-style: none; cursor: pointer;
  background: linear-gradient(90deg, color-mix(in srgb, var(--scene-accent) 10%, var(--surface)), var(--surface) 78%);
}
.dr-scene-head::-webkit-details-marker, .dr-take-head::-webkit-details-marker { display: none; }
.dr-scene-head:hover { background: color-mix(in srgb, var(--scene-accent) 9%, var(--surface)); }
.dr-scene[open] > .dr-scene-head { border-bottom: 1px solid var(--line-2); border-end-end-radius: 0; }
.dr-scene-body { padding: 14px; }
.dr-scene-body .label { display: block; margin-block: .75rem; }
.dr-scene-body input, .dr-scene-body textarea { display: block; width: 100%; margin-top: .25rem; }
.dr-scene-thumb { display: block; width: 100px; margin-top: .75rem; border-radius: .5rem; }
.shot .scene-take-number { align-self: flex-start; max-width: 100%; white-space: normal; }
.dr-photo-viewer { box-sizing: border-box; max-width: min(92vw, 900px); max-height: 90vh; padding: .75rem; border: 1px solid #585366; border-radius: .75rem; background: #18151f; color: #fff; }
.dr-photo-viewer::backdrop { background: rgb(0 0 0 / 75%); }
.dr-photo-viewer-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .5rem; }
.dr-photo-viewer-head h3 { margin: 0; font-size: 1rem; }
.dr-photo-viewer img { display: block; max-width: 100%; max-height: 75vh; margin-inline: auto; object-fit: contain; }
.dr-take { padding: .55rem .75rem; margin-block: .65rem; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--bg-2); }
.dr-take-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 8px; min-height: 36px; color: var(--text); list-style: none; cursor: pointer; }
.dr-take-head strong { font-size: .88rem; overflow-wrap: anywhere; }
.dr-take-head .scene-chevron { grid-column: 4; }
.dr-take[open] > .dr-take-head { margin-bottom: .75rem; padding-bottom: .55rem; border-bottom: 1px solid var(--line); }
.dr-take-row { display: grid; grid-template-columns: 1fr 150px 150px; gap: 10px; }
@media (max-width: 560px) { .dr-take-row { grid-template-columns: 1fr; } }
.dr-paste { margin-top: .75rem; }
.dr-paste summary { cursor: pointer; font-size: .85rem; }
.dr-paste textarea { display: block; width: 100%; margin: .5rem 0; }

/* Paquetes grandes con candado (se desbloquean 24 h después de la primera compra). */
.pack .pack-lock { display: block; text-align: center; margin-top: 6px; font-size: 12px; }
.pack.big .price { letter-spacing: -0.5px; }

/* Historial de modelos del video (solo admin). */
.model-log { margin: 12px 0; border: 1px solid var(--line, rgba(255,255,255,.12)); border-radius: 12px; padding: 8px 12px; font-size: 13px; }
.model-log summary { cursor: pointer; font-weight: 600; }
.model-log-body .ml-group { margin-top: 8px; }
.model-log-body ul { margin: 4px 0 0; padding-left: 18px; }
.model-log-body li { margin: 2px 0; overflow-wrap: anywhere; }
.model-log-body code { font-size: 12px; }
.model-log-body .warn-txt { color: #f5b942; }

/* ---------- Planes mensuales en una fila que se desliza de lado (25-nov-2026, pedido del dueño) ----------
   Primero va la recarga de créditos y debajo los planes, uno al lado del otro: con el dedo en el celular y con
   flechas en la computadora (antes iban 3 por fila y, en el celular, uno debajo del otro). */
.plans-rail { position: relative; max-width: 1180px; margin: 0 auto; }
.plans-rail[hidden] { display: none; }
.plans-rail .packs.plans, .pricing .plans-rail .packs.plans {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 16px; max-width: none; margin-top: 4px;
  padding: 16px 4px 12px; scrollbar-width: none; overscroll-behavior-x: contain; scroll-behavior: smooth;
}
.plans-rail .packs.plans::-webkit-scrollbar { display: none; }
.plans-rail .packs.plans > .pack { flex: 0 0 290px; min-width: 0; scroll-snap-align: start; }
.rail-btn {
  position: absolute; top: calc(50% - 10px); transform: translateY(-50%); z-index: 3; width: 42px; height: 42px;
  border-radius: 50%; border: 1px solid var(--line-2); background: rgba(16, 16, 23, 0.94); color: var(--text);
  display: grid; place-items: center; cursor: pointer; box-shadow: 0 10px 26px -10px rgba(0, 0, 0, 0.7);
}
.rail-btn:hover { border-color: var(--accent); }
.rail-btn .ic { width: 18px; height: 18px; }
.rail-btn.prev { left: -8px; }
.rail-btn.prev .ic { transform: rotate(180deg); }
.rail-btn.next { right: -8px; }
.rail-btn[disabled] { opacity: 0; pointer-events: none; }
.rail-hint { margin: 0; text-align: center; }
@media (min-width: 701px) { .rail-hint { display: none; } }
@media (max-width: 700px) {
  .plans-rail .packs.plans { margin-left: -16px; margin-right: -16px; padding: 16px 16px 10px; gap: 12px; }
  .plans-rail .packs.plans > .pack { flex: 0 0 84%; scroll-snap-align: center; }
  .rail-btn { display: none; }
}

/* ---------- Planes para estudios, productoras y agencias (25-nov-2026, pedido del dueño) ----------
   Los planes grandes van aparte, en un panel sobrio con borde dorado: a la vista quedan los 4 primeros. */
.studio-plans { max-width: 1180px; margin: 26px auto 0; padding: 22px 22px 8px; border-radius: 20px; text-align: left;
  border: 1px solid rgba(245, 185, 66, 0.35);
  background: radial-gradient(700px 260px at 0% 0%, rgba(245, 185, 66, 0.10), transparent 70%), linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0)); }
.studio-plans[hidden] { display: none; }
.studio-head { max-width: 760px; }
.studio-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 0.74rem; font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase; color: #fbbf24; background: rgba(245, 185, 66, 0.12); border: 1px solid rgba(245, 185, 66, 0.4); }
.studio-tag .ic { width: 14px; height: 14px; }
.studio-head h3 { margin: 10px 0 6px; font-family: var(--font-display); font-size: clamp(1.25rem, 2.4vw, 1.6rem); letter-spacing: -0.02em; color: var(--text); }
.studio-head p { margin: 0; color: var(--text-2); font-size: 0.92rem; line-height: 1.5; }
.studio-head > [data-studio-inquiry] { margin-top: .75rem; min-height: 44px; }
.studio-plans .plans-rail .packs.plans > .pack { flex: 0 0 340px; }
@media (max-width: 700px) {
  .studio-plans { padding: 18px 16px 4px; border-radius: 16px; }
  .studio-plans .plans-rail .packs.plans > .pack { flex: 0 0 84%; }
}

/* ---------- Avisos al celular (25-nov-2026): tarjeta visible en la pantalla de espera y en Mis videos ---------- */
.push-card { display: flex; align-items: center; gap: 12px; margin: 14px auto 0; max-width: 520px; padding: 12px 14px; text-align: left;
  border-radius: 14px; border: 1px solid rgba(124, 95, 245, 0.35); background: rgba(124, 95, 245, 0.08); }
.push-card[hidden] { display: none; }
.push-card .push-ico { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(124, 95, 245, 0.16); color: var(--accent); }
.push-card .push-ico .ic { width: 19px; height: 19px; }
.push-card .push-txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.push-card .push-txt b { color: var(--text); font-size: 0.95rem; }
.push-card .push-txt small { color: var(--text-2); font-size: 0.82rem; line-height: 1.4; }
.push-card .btn { flex: none; }
.push-card.lib-push { max-width: none; margin: 0 0 14px; }
@media (max-width: 520px) { .push-card { flex-wrap: wrap; } .push-card .btn { width: 100%; } }

/* Sistema: videos creándose ahora */
.admin-busy { margin: 10px 0 12px; }
.admin-busy .busy-title { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; }
.admin-busy .busy-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
.admin-busy .busy-list li { padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); font-size: 0.86rem; overflow-wrap: anywhere; }
.admin-busy .busy-list small { display: block; margin-top: 2px; }

/* ---------- Escena por escena: tablero de escenas (26-nov-2026) ---------- */
.escena-board { display: grid; gap: 14px; text-align: left; }
.escena-board[hidden] { display: none; }
.eb-head h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 1.1rem; color: var(--text); }
.eb-head p { margin: 4px 0; }
.eb-guide { display: grid; gap: 5px; margin: 10px 0 12px; padding-inline-start: 22px; color: var(--text-2); }
.eb-head .eb-summary { margin-top: 10px; }
.eb-busy { display: flex; align-items: center; gap: 6px; color: var(--text); font-weight: 600; }
.eb-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 14px; align-items: start; }
.eb-recovery { display: grid; gap: 7px; padding: 12px; border: 1px solid #976544; border-radius: var(--r); background: var(--surface-2); }
.eb-recovery h4 { display: flex; align-items: center; gap: 8px; }
.eb-recovery p { margin: 0; }
.eb-recovery ul { display: grid; gap: 8px; list-style: none; padding: 0; margin: 3px 0 0; }
.eb-recovery li { display: grid; justify-items: start; gap: 5px; padding: 9px; border-radius: var(--r-sm); background: var(--surface); overflow-wrap: anywhere; }
.eb-recovery li > .link { padding: 0; }
.eb-refunded { display: flex; align-items: center; gap: 5px; color: var(--ok); }
.eb-preflight { min-width: 0; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface-2); }
.eb-preflight > summary { padding: 12px; cursor: pointer; scroll-margin-block-start: 10px; }
.eb-preflight > summary span { display: inline-block; margin-inline-start: 8px; color: var(--text-2); font-size: .82rem; }
.eb-preflight-body { display: grid; gap: 10px; border-top: 1px solid var(--line); padding: 12px; }
.eb-preflight-body p { margin: 0; }
.eb-preflight-warnings, .eb-preflight-scenes { display: grid; gap: 6px; list-style: none; margin: 0; padding: 0; }
.eb-preflight-warnings { max-height: 260px; overflow-y: auto; }
.eb-preflight-warnings li, .eb-preflight-scenes li { min-width: 0; padding: 7px 9px; border-radius: var(--r-xs); background: var(--surface); overflow-wrap: anywhere; }
.eb-preflight-warnings li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; border-inline-start: 2px solid var(--warn); font-size: .84rem; }
.eb-preflight-warnings li .link { padding: 0; }
.eb-preflight-scenes li { display: grid; grid-template-columns: 1fr auto; gap: 3px 6px; border-inline-start: 2px solid var(--scene-accent); }
.eb-preflight-scenes .link { justify-self: start; color: var(--scene-accent); padding: 0; }
.eb-preflight-scenes small { grid-column: 1 / -1; color: var(--text-2); }
.eb-trial { display: grid; gap: 8px; min-width: 0; padding: 14px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface-2); }
.eb-trial h4, .eb-trial p { margin: 0; }
.eb-trial-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.eb-trial-actions label { font-size: .85rem; }
.eb-trial-actions select { flex: 1 1 190px; min-width: 0; max-width: 100%; }
.eb-scene { display: grid; gap: 10px; align-content: start; padding: 12px; }
.eb-top { grid-template-columns: auto minmax(0, 1fr); gap: 6px 10px; padding: 9px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--scene-accent) 8%, var(--surface)); }
.eb-top .scene-number { grid-row: span 2; align-self: start; }
.eb-top .eb-chip { grid-column: 2; justify-self: start; margin: 0; }
.eb-photos { font-size: 0.85rem; }
.eb-photos summary { min-height: 36px; padding: 8px 0; cursor: pointer; color: var(--scene-accent); font-weight: 650; }
.eb-takes { display: grid; gap: 10px; margin-top: 8px; }
.eb-take { display: grid; gap: 6px; padding: 10px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--bg-2); min-width: 0; overflow-wrap: anywhere; }
.eb-take-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.eb-take p { margin: 0; }
.eb-take-photo { display: grid; justify-self: start; gap: 4px; padding: 0; color: var(--accent-2); background: transparent; border: 0; cursor: pointer; text-align: start; }
.eb-take-photo img { max-width: 100%; max-height: 160px; border-radius: 8px; object-fit: contain; }
.eb-line { display: grid; gap: 4px; border-inline-start: 2px solid var(--line-2); padding-inline-start: 8px; }
.eb-line button { justify-self: start; }
.ad-review { max-width: min(560px, calc(100vw - 24px)); max-height: 90dvh; overflow-y: auto; }
.ad-review #adReviewPhoto { max-height: 150px; max-width: 100%; object-fit: contain; margin: 0 auto 8px; }
.ad-review .tool-lbl { margin: 8px 0; }
.eb-quality { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0 2px; }
.eb-q { padding: 3px 10px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.14); background: transparent; color: var(--text-2); font-size: 0.78rem; font-weight: 600; cursor: pointer; }
.eb-q.on { border-color: var(--accent, #a78bfa); color: var(--text); background: rgba(167, 139, 250, 0.16); }
.eb-q:disabled { opacity: 0.5; cursor: default; }
.eb-chip { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 0.76rem; font-weight: 700; color: var(--text-2); background: rgba(255, 255, 255, 0.06); }
.eb-chip .ic { width: 13px; height: 13px; }
.eb-chip.ok { color: #6ee7b7; background: rgba(52, 211, 153, 0.12); }
.eb-chip.run { color: #fbbf24; background: rgba(245, 185, 66, 0.12); }
.eb-chip.wait { color: var(--text); }
.eb-chip.bad { color: #fca5a5; background: rgba(248, 113, 113, 0.12); }
.eb-chip.edit { color: #93c5fd; background: rgba(96, 165, 250, 0.12); }
/* Borradores → Escenarios: los de otros capítulos, plegados al final. */
.dr-other-places { grid-column: 1 / -1; margin-top: 6px; border: 1px dashed var(--line); border-radius: 14px; padding: 10px 14px; }
.dr-other-places > summary { cursor: pointer; display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--text-2); }
.dr-other-places[open] > summary { margin-bottom: 12px; }
/* Oferta por tiempo (Black Friday): ventana con cuenta atrás. */
.promo-box { max-width: 440px; text-align: left; border-color: rgba(255, 122, 69, 0.45); background: linear-gradient(160deg, rgba(255, 122, 69, 0.12), transparent 55%), var(--surface); }
.promo-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.02em; text-transform: uppercase; color: #ffb38a; background: rgba(255, 122, 69, 0.16); }
.promo-box h3 { margin: 12px 0 6px; }
.promo-list { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 8px; color: var(--text-2); }
.promo-list b { color: var(--text); }
.promo-clock { margin: 16px 0 12px; font-size: 1rem; color: var(--text-2); }
.promo-clock b { color: #ffb38a; font-variant-numeric: tabular-nums; }
.promo-fine { display: block; margin-top: 10px; }
.eb-warn { display: flex; align-items: flex-start; gap: 6px; color: #fbbf24; }
/* Recomendación de ahorro («Acción sin diálogo»). */
.eb-tip { display: flex; align-items: flex-start; gap: 6px; padding: 6px 10px; border-radius: 10px; background: rgba(52, 211, 153, 0.08); border: 1px solid rgba(52, 211, 153, 0.3); }
.eb-tip .btn, .eb-tip .link { margin-left: 4px; }
.eb-warn .ic { flex: 0 0 auto; margin-top: 2px; }
.eb-prev { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.eb-prev .link { display: inline-flex; align-items: center; gap: 4px; }
.eb-scene.peek .eb-video { outline: 2px dashed rgba(245, 185, 66, 0.6); outline-offset: 2px; }
.eb-video { width: 100%; max-height: 420px; border-radius: 10px; background: #000; }
.eb-err { color: #fca5a5; margin: 0; }
.eb-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.eb-actions:empty { display: none; }
.eb-actions .eb-swap { display: inline-flex; align-items: center; gap: 4px; }
/* «Usar una escena ya filmada»: lista con su video para mirarla antes de elegir. */
dialog.eb-swap-box { position: fixed; inset: 0; margin: auto; width: min(640px, calc(100% - 24px)); max-width: none; max-height: min(90dvh, 760px); padding: 18px; overflow-y: auto; color: var(--text); }
dialog.eb-swap-box::backdrop { background: rgb(0 0 0 / 70%); }
.eb-swap-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 8px; margin-block: 12px 6px; }
.eb-swap-filters label { min-width: 0; }
.eb-swap-list, .eb-swap-group { display: grid; gap: 8px; margin-block: 8px; }
.eb-swap-group h4 { margin-block: 5px 0; color: var(--text-2); font-size: .88rem; }
.eb-swap-item { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border: 1px solid var(--line, rgba(255, 255, 255, 0.12)); border-radius: 12px; }
.eb-swap-item video { width: 110px; max-height: 196px; border-radius: 8px; background: #000; flex: 0 0 auto; }
.eb-swap-info { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.eb-swap-info small { display: block; }
.eb-swap-info .btn { min-height: 44px; align-self: flex-start; }
.eb-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.eb-foot p { width: 100%; margin: 0; }
.eb-mobile-bar { display: none; }
@media (max-width: 900px) {
  body[data-tab="create"]:has(#jobView:not([hidden]) #escenaBoard:not([hidden]) .eb-mobile-bar) .main {
    padding-bottom: calc(190px + env(safe-area-inset-bottom));
  }
  .eb-mobile-bar {
    position: fixed; z-index: 35; inset-inline: 0; bottom: calc(57px + env(safe-area-inset-bottom));
    display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 12px;
    padding: 8px 14px; background: var(--surface); border-top: 1px solid var(--line-2);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, .2);
  }
  .eb-mobile-progress { flex: 1 0 140px; display: grid; gap: 3px; font-size: .82rem; }
  .eb-mobile-progress small { color: var(--text-2); }
  .eb-mobile-progress progress { width: 100%; height: 4px; accent-color: var(--accent); }
  .eb-mobile-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
  .eb-mobile-actions .btn { min-height: 44px; padding-inline: 9px; touch-action: manipulation; }
  .eb-mobile-status { display: inline-flex; align-items: center; gap: 5px; color: var(--text-2); font-size: .82rem; }
  .eb-mobile-bar + .eb-foot > .btn { display: none; }
}
.escena-mode { margin-top: 10px; }
.escena-mode[hidden] { display: none; }
.escena-mode-seg button small { display: block; font-weight: 500; opacity: 0.8; white-space: normal; }
@media (max-width: 520px) {
  .scene-index button { min-height: 44px; }
  .dr-board-entry .dr-ch-actions .btn { flex: 1 0 100%; min-height: 44px; }
  .eb-list { grid-template-columns: 1fr; }
  .eb-foot .btn { width: 100%; }
  .dr-ch-start .btn { width: 100%; min-height: 44px; }
  .dr-bar-right { gap: 6px; }
  .create-summary { grid-template-columns: 1fr 1fr; }
  .create-summary > :last-child { grid-column: 1 / -1; }
  body[data-tab="create"] .main { padding-bottom: calc(178px + env(safe-area-inset-bottom)); }
}

/* Flujo de producción */
:is([data-panel="drafts"], [data-panel="subs"], .escena-board) {
  --work-padding: clamp(14px, 2.2vw, 26px);
  --work-gap: clamp(12px, 1.6vw, 18px);
  --work-border: #30303e;
  --work-panel: linear-gradient(150deg, #191924, #111117 72%);
  --work-highlight: #c9b7ff;
}

/* Mis proyectos */
[data-panel="drafts"] .dr-head {
  align-items: center;
  padding: var(--work-padding);
  border: 1px solid var(--work-border);
  border-radius: var(--r-xl);
  background: radial-gradient(ellipse at 95% -60%, #9a73ff26, transparent 70%), var(--work-panel);
}
.dr-head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
[data-panel="drafts"] .dr-head h2,
[data-panel="subs"] > .panel-head h2 {
  font-size: clamp(1.65rem, 3vw, 2.25rem);
}
[data-panel="drafts"] .dr-head p { max-width: 58ch; color: var(--text-2); }
.dr-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
  gap: var(--work-gap);
}
.dr-item {
  gap: 15px;
  padding: clamp(12px, 1.8vw, 17px);
  background: var(--work-panel);
  border-color: var(--work-border);
}
.dr-item:hover, .dr-item:focus-visible { border-color: var(--accent-2); }
.dr-cover {
  flex-basis: clamp(62px, 8vw, 82px);
  height: clamp(76px, 9vw, 100px);
  border: 1px solid var(--line-2);
  background: var(--grad-soft), var(--surface-3);
  color: var(--work-highlight);
}
.dr-item-body { gap: 5px; }
.dr-item-body b {
  font-size: 1.06rem;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.28;
}
.dr-item-body .dr-project-type { font-size: .72rem; letter-spacing: .035em; }
.dr-item:hover .dr-go, .dr-item:focus-visible .dr-go { color: var(--work-highlight); }
.dr-project-help { gap: 8px 16px; }
.dr-project-help .link { min-height: 36px; }
#draftEditor > .dr-title {
  margin: 0 0 var(--work-gap);
  padding: 9px 10px;
  border-radius: var(--r-sm);
  font-size: clamp(1.35rem, 2.7vw, 1.95rem);
}
.dr-chapter-nav { gap: 9px; margin-bottom: var(--work-gap); }
.dr-chapter-link {
  gap: 5px;
  min-height: 80px;
  padding: 11px 12px;
  border-color: var(--work-border);
  border-radius: var(--r);
}
.dr-chapter-link[aria-current="true"] {
  border-color: var(--accent-2);
  background: var(--grad-soft), var(--surface-2);
  box-shadow: inset 3px 0 var(--accent-2);
}
.dr-tabs {
  gap: 5px;
  padding: 4px;
  border: 1px solid var(--work-border);
  border-radius: var(--r);
  background: var(--bg-2);
}
.dr-tabs button {
  min-height: 44px;
  margin: 0;
  padding-inline: 12px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
}
.dr-tabs button.on { border-color: var(--work-border); background: var(--surface-3); }
.dr-ch { padding: var(--work-padding); border-color: var(--work-border); }
.dr-ch-head { flex-wrap: wrap; }
.dr-ch-title { min-width: min(100%, 104px); }
.dr-ch-start .btn { min-height: 44px; }
.dr-board-entry {
  gap: 12px;
  padding: var(--work-padding);
  border-color: var(--work-border);
  background: var(--work-panel);
}
.dr-ch .dr-lint { padding: 12px 14px; }
.dr-lint li > button { margin-block: 4px; white-space: normal; text-align: start; }
#askText { white-space: pre-line; }

/* Herramientas */
[data-panel="subs"] .tool-tabs { gap: var(--work-gap); }
[data-panel="subs"] .tool-tab {
  min-height: 92px;
  padding: clamp(10px, 1.8vw, 17px);
  border: 1px solid var(--work-border);
  border-radius: var(--r-lg);
  background: var(--work-panel);
}
[data-panel="subs"] .tool-tab:hover { border-color: var(--line-3); }
[data-panel="subs"] .tool-tab.on {
  border-color: var(--accent-2);
  background: var(--grad-soft), var(--surface-2);
  box-shadow: inset 0 2px var(--accent-2);
}
[data-panel="subs"] .tool-tab .ic {
  width: 38px;
  height: 38px;
  padding: 9px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--surface-3);
  color: var(--work-highlight);
}
[data-panel="subs"] .tool-tab small { font-size: .79rem; }
[data-panel="subs"] .tool-section-head,
[data-panel="subs"] .tool-results {
  border-top: 1px solid var(--work-border);
  padding-top: var(--work-gap);
}
[data-panel="subs"] .subs-card { border-color: var(--work-border); padding: var(--work-padding); }
[data-panel="subs"] .subs-drop {
  border-color: var(--accent-2);
  background: var(--grad-soft), var(--bg-2);
}

/* Storyboard y revisión */
.escena-board { gap: var(--work-gap); }
.escena-board .eb-head {
  min-width: 0;
  padding: var(--work-padding);
  border: 1px solid var(--work-border);
  border-radius: var(--r-lg);
  background: radial-gradient(ellipse at 100% -80%, #9a73ff2b, transparent 73%), var(--work-panel);
}
.escena-board .eb-head h3 { font-size: clamp(1.15rem, 2vw, 1.65rem); line-height: 1.3; }
.escena-board .eb-head h3 .ic { color: var(--work-highlight); }
.escena-board .eb-guide { gap: 7px; margin-block: 14px; }
.escena-board .eb-head .eb-summary { margin-top: 12px; }
.escena-board .eb-list { gap: var(--work-gap); }
.escena-board .eb-preflight {
  border-color: var(--work-border);
  border-radius: var(--r-lg);
  background: var(--bg-2);
}
.escena-board .eb-preflight > summary {
  padding: 14px var(--work-padding);
  border-radius: inherit;
  background: var(--work-panel);
}
.escena-board .eb-preflight[open] > summary {
  border-end-start-radius: 0;
  border-end-end-radius: 0;
}
.escena-board .eb-preflight-body { padding: var(--work-padding); }
.escena-board .eb-preflight-warnings { max-height: min(50vh, 400px); gap: 8px; }
.escena-board .eb-preflight-warnings li {
  gap: 6px 10px;
  align-content: start;
  padding: 9px 10px;
  background: #241e13;
}
.escena-board .eb-preflight-warnings li > span { flex: 1 1 100%; }
.escena-board .eb-preflight-warnings li :is(button, .btn) { min-height: 36px; }
.escena-board .eb-trial { border-color: var(--work-border); background: var(--work-panel); }
.escena-board .eb-scene { padding: clamp(12px, 1.4vw, 17px); }
.escena-board .eb-top { padding: 11px; }
.escena-board .eb-take { padding: 12px; }
.escena-board .eb-scene .eb-warn {
  min-width: 0;
  margin: 0;
  padding: 9px 10px;
  border: 1px solid #64502b;
  border-radius: var(--r-sm);
  background: #241e13;
  color: #f6d493;
  overflow-wrap: anywhere;
}
.escena-board .eb-warn p { margin: 0; }
.escena-board .eb-warn p + p { margin-top: 8px; }
.escena-board .eb-warn .btn { margin-block-start: 4px; white-space: normal; text-align: start; }

@media (max-width: 600px) {
  [data-panel="subs"] .tool-tabs { gap: 8px; }
  [data-panel="subs"] .tool-tab { min-height: 80px; gap: 7px; }
  [data-panel="subs"] .tool-tab .ic { width: 28px; height: 28px; padding: 5px; }
  [data-panel="subs"] .tool-tab small { font-size: .73rem; }
  .dr-head-actions > .btn { min-height: 44px; white-space: normal; }
  .escena-board .eb-preflight-warnings li :is(button, .btn) { min-height: 44px; }
}
@media (max-width: 360px) {
  [data-panel="subs"] .tool-tab { flex-direction: column; align-items: flex-start; }
  #draftEditor .dr-tabs button { padding-inline: 8px; }
}

/* ---------- Publicar gratis (1-dic-2026): YouTube, TikTok, Instagram u otra app, en la vista del video terminado ---------- */
.pub-box {
  container: pub-box / inline-size;
  position: relative; margin: 6px 0 4px; padding: 16px; border-radius: var(--r-lg);
  background: linear-gradient(160deg, rgba(52, 211, 153, 0.07), rgba(109, 93, 252, 0.07) 60%, rgba(124, 95, 245, 0.06)), var(--surface);
  border: 1px solid rgba(52, 211, 153, 0.32); box-shadow: var(--shadow);
}
.pub-box[hidden] { display: none; }
.pub-head { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; }
.pub-head h4 { font-size: 1.18rem; letter-spacing: -0.02em; }
.pub-free { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; color: #6ff0bf; background: rgba(52, 211, 153, 0.14); border: 1px solid rgba(52, 211, 153, 0.4); white-space: nowrap; }
.pub-free::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.22); }
.pub-sub { margin: 6px 0 12px; color: var(--text-2); font-size: 0.9rem; }
.pub-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@container pub-box (min-width: 560px) { .pub-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pub-btn {
  --pub-c: 167, 139, 250;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 8px; min-height: 100px; padding: 12px; min-width: 0;
  border-radius: var(--r); border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text);
  font: inherit; text-align: start; cursor: pointer;
  transition: border-color 0.18s, background 0.18s, transform 0.12s var(--ease), box-shadow 0.2s;
}
.pub-btn[data-pub="youtube"] { --pub-c: 255, 40, 51; }
.pub-btn[data-pub="tiktok"] { --pub-c: 40, 231, 226; }
.pub-btn[data-pub="instagram"] { --pub-c: 226, 51, 127; }
.pub-btn:hover:not(:disabled) { border-color: rgba(var(--pub-c), 0.7); background: linear-gradient(160deg, rgba(var(--pub-c), 0.12), transparent 70%), var(--surface-3); box-shadow: 0 10px 26px -14px rgba(var(--pub-c), 0.8); }
.pub-btn:active:not(:disabled) { transform: translateY(1px) scale(0.99); }
.pub-btn:focus-visible { outline: 2px solid rgb(var(--pub-c)); outline-offset: 2px; box-shadow: 0 0 0 5px rgba(var(--pub-c), 0.2) !important; border-radius: var(--r); }
.pub-btn:disabled { opacity: 0.55; cursor: progress; }
.pub-btn[aria-busy="true"] { opacity: 1; border-color: rgba(var(--pub-c), 0.7); }
.pub-btn[aria-busy="true"] .pub-logo { animation: pubPulse 1s ease-in-out infinite; }
.pub-logo { width: 40px; height: 40px; flex: none; border-radius: 10px; }
.pub-btn-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pub-btn-text b { font-family: var(--font-display); font-size: 1rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
.pub-btn-text small { color: var(--muted); font-size: 0.76rem; line-height: 1.3; }
.pub-btn[data-direct="1"] small { color: #ff9aa0; font-weight: 600; }
@keyframes pubPulse { 50% { transform: scale(0.9); opacity: 0.7; } }
.pub-box .yt-box { margin: 12px 0 0; background: rgba(255, 40, 51, 0.06); border-color: rgba(255, 40, 51, 0.28); }
.pub-box .yt-box .label { margin-top: 0; }
.pub-guide { margin-top: 12px; padding: 14px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line-2); }
.pub-guide[hidden] { display: none; }
.pub-guide:focus { outline: none; }
.pub-guide:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.pub-guide h5 { margin: 0 0 10px; font-family: var(--font-display); font-size: 1rem; letter-spacing: -0.01em; }
.pub-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: pub; }
.pub-steps li { counter-increment: pub; display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 10px; align-items: start; }
.pub-steps li::before { content: counter(pub); grid-row: span 2; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 0.86rem; color: #fff; background: var(--grad); }
.pub-steps b { font-size: 0.92rem; line-height: 1.35; padding-top: 3px; }
.pub-steps span { color: var(--text-2); font-size: 0.86rem; line-height: 1.45; }
.pub-guide-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pub-guide-actions .btn { flex: 1 1 12rem; white-space: normal; min-height: 40px; }
.pub-guide-actions .btn[hidden] { display: none; }
/* Confirmación dentro de la guía (antes iba en el aviso flotante, que tapaba estos botones). */
.pub-guide-ok { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 12px; padding: 9px 12px; border-radius: var(--r-sm); font-size: 0.88rem; font-weight: 600; line-height: 1.4; color: #6ff0bf; background: rgba(52, 211, 153, 0.12); border: 1px solid rgba(52, 211, 153, 0.4); animation: pubIn 0.25s var(--ease); }
.pub-guide-ok[hidden] { display: none; }
.pub-guide-ok .ic { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--ok); }
.pub-guide-ok.warn { color: #ffd98a; background: rgba(251, 191, 36, 0.1); border-color: rgba(251, 191, 36, 0.45); }
.pub-guide-ok.warn .ic { color: var(--warn); }
/* Navegador dentro de TikTok, Instagram o Facebook: ahí la descarga suele fallar. */
.pub-inapp { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 12px; padding: 10px 12px; border-radius: var(--r-sm); font-size: 0.86rem; line-height: 1.45; color: var(--text-2); background: rgba(251, 191, 36, 0.1); border: 1px solid rgba(251, 191, 36, 0.45); }
.pub-inapp[hidden] { display: none; }
.pub-inapp .ic { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--warn); }
.pub-inapp b { color: var(--text); }
.pub-inapp .link { font-weight: 700; }
.pub-note { margin: 10px 0 0; color: var(--muted); font-size: 0.8rem; line-height: 1.45; }
.pub-ready {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; padding: 12px 12px 12px 14px;
  border-radius: var(--r); border: 1px solid rgba(52, 211, 153, 0.45);
  background: linear-gradient(120deg, rgba(52, 211, 153, 0.14), rgba(109, 93, 252, 0.1)), var(--surface);
  animation: pubIn 0.3s var(--ease);
}
@keyframes pubIn { from { opacity: 0; transform: translateY(-6px); } }
.pub-ready[hidden] { display: none; }
.pub-ready > .ic { width: 22px; height: 22px; color: var(--ok); flex: none; }
.pub-ready p { margin: 0; flex: 1 1 14rem; font-size: 0.92rem; color: var(--text-2); }
.pub-ready p b { color: var(--text); }
.pub-ready .btn { flex: none; }
.pub-ready-x { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.pub-ready-x:hover { background: rgba(255, 255, 255, 0.07); color: var(--text); }
.pub-ready-x .ic { width: 18px; height: 18px; }
@media (max-width: 600px) {
  .pub-box { padding: 14px 12px; }
  .pub-btn { padding: 11px 12px; gap: 7px; min-height: 94px; }
  .pub-logo { width: 34px; height: 34px; }
  .pub-ready .btn { flex: 1 1 auto; min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .pub-btn, .pub-ready, .pub-guide-ok { transition: none; animation: none; }
  .pub-btn[aria-busy="true"] .pub-logo { animation: none; }
}

/* ---------- Voz y doblaje (1-dic-2026): SOLO las entradas que se ven al abrir la web (menú, «Más», Inicio, Crear, la fila del
   video terminado y el enlace de vuelta en Herramientas). La pestaña entera va en public/voz.css, que se carga al abrirla. ---------- */
:root {
  --vz-a: #bcb0ff;
  --vz-a2: #ddd6ff;
  --vz-soft: rgba(124, 99, 255, 0.14);
  --vz-line: rgba(160, 140, 255, 0.32);
  --vz-ink: #160f33;
}
#app .menu button.menu-voz .ic { color: var(--vz-a); }
#app .menu button.menu-voz .nav-new,
.sheet-box button.more-voz .nav-new,
.voz .nav-new { background: linear-gradient(135deg, var(--vz-a2), var(--vz-a)); color: var(--vz-ink); }
#app .menu button.menu-voz .nav-new { padding: 1px 6px; font-size: 0.56rem; letter-spacing: 0.04em; }
#app .menu button.menu-voz.active { background: var(--vz-soft); box-shadow: inset 0 0 0 1px var(--vz-line); }
#app .menu button.menu-voz.active::before { background: var(--vz-a); }
#app .menu button.menu-voz.active .ic { color: var(--vz-a); }
.sheet-box button.more-voz { background: linear-gradient(120deg, rgba(150, 128, 255, 0.12), rgba(150, 128, 255, 0.02)); box-shadow: inset 0 0 0 1px var(--vz-line); margin-bottom: 4px; }
.sheet-box button.more-voz > span { background: var(--vz-soft); color: var(--vz-a); }
.sheet-box button.more-voz b { display: inline-flex; align-items: center; gap: 8px; }
.sheet-box button.more-voz .nav-new { margin-left: 0; }
/* Punto de novedad en «Más» (teléfono) hasta que abre «Más» o la pestaña. Clase propia: «has-dot» es el de la Ayuda. */
.mnav-new { display: none; }
.mnav [data-more].has-new .mnav-new { display: block; position: absolute; top: 5px; left: calc(50% + 7px); width: 9px; height: 9px; border-radius: 50%; background: var(--vz-a); box-shadow: 0 0 0 2px var(--bg); }

/* Tarjeta grande en Inicio */
#app .home-voz {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 20px; align-items: center;
  margin: 18px 0 4px; padding: clamp(20px, 3vw, 32px); border: 1px solid var(--vz-line); border-radius: 24px; overflow: hidden;
  background:
    radial-gradient(ellipse 70% 90% at 95% 5%, rgba(150, 128, 255, 0.18), transparent 62%),
    radial-gradient(ellipse 60% 80% at 0% 100%, rgba(109, 93, 252, 0.13), transparent 60%),
    linear-gradient(150deg, #111d20, #0f1118 72%);
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.8);
}
.home-voz-kicker { display: inline-flex; align-items: center; gap: 8px; color: var(--vz-a); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.home-voz-kicker .ic { width: 17px; height: 17px; }
#app .home-voz h3 { margin: 10px 0 8px; font-size: clamp(1.5rem, 3.1vw, 2.2rem); letter-spacing: -0.03em; color: #f3f0ff; }
#app .home-voz p { margin: 0 0 14px; color: var(--text-2); max-width: 50ch; }
.home-voz-points { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 7px; color: var(--text-2); font-size: 0.9rem; }
.home-voz-points li { display: flex; align-items: center; gap: 9px; }
.home-voz-points .ic { width: 16px; height: 16px; color: var(--vz-a); flex: none; }
.home-voz-actions { display: flex; flex-wrap: wrap; gap: 10px; }
#app .home-voz .home-voz-go {
  min-height: 46px; padding-inline: 20px; background: linear-gradient(135deg, var(--vz-a2), var(--vz-a)); color: var(--vz-ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.45) inset, 0 10px 26px -12px rgba(150, 128, 255, 0.7);
}
#app .home-voz .home-voz-sample { min-height: 46px; }
#app .home-voz :focus-visible { outline: 2px solid var(--vz-a); outline-offset: 2px; }
.home-voz-art { position: relative; display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 250px; }
.hvz-phone { position: relative; margin: 0; width: min(38%, 150px); aspect-ratio: 9 / 16; border-radius: 18px; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.16); background: #1a1f24; box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.95); }
.hvz-phone img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hvz-a { transform: rotate(-4deg); }
.hvz-b { transform: rotate(4deg); border-color: var(--vz-line); }
.hvz-phone figcaption { position: absolute; left: 8px; top: 8px; padding: 3px 9px; border-radius: 999px; background: rgba(8, 10, 14, 0.76); backdrop-filter: blur(6px); color: #fff; font-size: 0.7rem; font-weight: 700; }
.hvz-b figcaption { background: linear-gradient(135deg, var(--vz-a2), var(--vz-a)); color: var(--vz-ink); }
.hvz-arrow { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--vz-soft); border: 1px solid var(--vz-line); color: var(--vz-a); flex: none; }
.hvz-wave { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; align-items: flex-end; gap: 3px; height: 26px; padding: 5px 9px; border-radius: 999px; background: rgba(8, 10, 14, 0.7); }
.hvz-wave i { width: 3px; border-radius: 2px; background: var(--vz-a); animation: hvzWave 1.1s ease-in-out infinite; }
.hvz-wave i:nth-child(1) { height: 40%; animation-delay: -0.2s; }
.hvz-wave i:nth-child(2) { height: 90%; animation-delay: -0.5s; }
.hvz-wave i:nth-child(3) { height: 60%; animation-delay: -0.1s; }
.hvz-wave i:nth-child(4) { height: 100%; animation-delay: -0.7s; }
.hvz-wave i:nth-child(5) { height: 50%; animation-delay: -0.3s; }
@keyframes hvzWave { 50% { transform: scaleY(0.45); } }
@media (max-width: 900px) {
  #app .home-voz { grid-template-columns: 1fr; gap: 8px; margin-top: 14px; padding: 20px 18px; }
  .home-voz-art { order: -1; min-height: 0; padding: 4px 0 10px; }
  .hvz-phone { width: min(34%, 118px); border-radius: 14px; }
  .home-voz-actions .btn { flex: 1 1 10rem; }
}
@media (prefers-reduced-motion: reduce) { .hvz-wave i { animation: none; } }

/* Crear: «¿Ya tienes un video? Dóblalo con tu voz» (en el teléfono ocupa todo el ancho, con su texto) */
.creator-production-action.creator-voz { border-color: var(--vz-line); background: linear-gradient(120deg, rgba(150, 128, 255, 0.08), transparent 70%), var(--surface); }
.creator-production-action.creator-voz .creator-production-icon { color: var(--vz-a); background: var(--vz-soft); }
.creator-production-action.creator-voz > .ic { color: var(--vz-a); }
.creator-production-action.creator-voz:hover { border-color: var(--vz-a); }
@media (max-width: 640px) {
  .creator-production .creator-production-action.creator-voz { grid-column: 1 / -1; grid-template-columns: auto minmax(0, 1fr) auto; min-height: 56px; padding: 9px 11px; font-size: 0.86rem; }
  .creator-production .creator-production-action.creator-voz small,
  .creator-production .creator-production-action.creator-voz > .ic { display: block; }
}

/* Pestaña: la cabecera fija (lo de dentro lo pinta public/voz.js con public/voz.css) */
.voz-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 18px; flex-wrap: wrap; }
.voz-head > div { min-width: min(100%, 260px); flex: 1 1 22rem; }
.voz-head .voz-sample { flex: none; }
.voz-loading { padding: 18px 2px; }

/* Herramientas: «← Voz y doblaje» cuando se llega desde la pestaña */
.voz-back-link { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; margin: 0 0 12px; padding: 6px 14px; border: 1px solid var(--vz-line); border-radius: 999px; background: var(--vz-soft); color: var(--vz-a2); font: inherit; font-size: 0.88rem; font-weight: 650; cursor: pointer; }
.voz-back-link:hover { border-color: var(--vz-a); color: #fff; }
.voz-back-link:focus-visible { outline: 2px solid var(--vz-a); outline-offset: 2px; }

/* Video terminado: «Ponle voz, música o efectos», debajo de «Publicar gratis» */
.voz-row { margin: 10px 0 4px; padding: 12px 14px; border-radius: var(--r-lg); border: 1px solid var(--vz-line); background: linear-gradient(140deg, rgba(150, 128, 255, 0.08), transparent 65%), var(--surface); }
.voz-row[hidden] { display: none; }
.voz-row h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 1rem; letter-spacing: -0.01em; }
.voz-row h4 .ic { color: var(--vz-a); }
.voz-row-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.voz-row-btns .btn { flex: 1 1 8.5rem; min-height: 40px; }
.voz-row-btns .btn .ic { color: var(--vz-a); }

/* Doblaje de Herramientas: prueba gratis y casilla obligatoria de Doblaje Pro */
.dub-trial { display: flex; align-items: flex-start; gap: 8px; }
.dub-trial[hidden] { display: none; }
.dub-trial .ic { flex: none; margin-top: 2px; width: 16px; height: 16px; }
label.mini-check.dub-consent { margin: 12px 0; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface-2); }
label.mini-check.dub-consent[hidden] { display: none; }
label.mini-check.dub-consent b { color: var(--text); font-weight: 600; }
/* (2-dic-2026) Sin el relleno de los campos de texto: con él, al enfocarla la casilla se veía como una barra alta. */
label.mini-check.dub-consent input { width: 18px; height: 18px; padding: 0; flex: none; }
label.mini-check.dub-consent input:focus { box-shadow: none; }
label.mini-check.dub-consent input:focus-visible { outline: 2px solid rgba(167, 139, 250, 0.8); outline-offset: 2px; }
.dub-price { margin: 6px 0 0; color: var(--text); font-weight: 600; }
.dub-price[hidden] { display: none; }
.tool-why { display: block; margin-top: 4px; font-weight: 600; color: var(--text); }
.tool-why[hidden] { display: none; }
/* (2-dic-2026, revisión de pantalla) Herramientas abierta desde Voz y doblaje: sin la cuadrícula de 6 herramientas ni el
   subtítulo de «Anuncios y edición» (el título dice «Voz y doblaje · Doblar mi video»): el formulario queda arriba. */
[data-panel="subs"].from-voz .tool-tabs, [data-panel="subs"].from-voz .panel-head p { display: none; }
/* Fila de Mis videos: lo que se activa con una recarga lo dice en el botón */
.voz-row-btns .voz-row-lock { font-weight: 500; color: var(--muted); }
.voz-row-btns .btn.is-locked .ic { color: var(--muted); }
/* Mis videos → «Doblar a otro idioma»: quien no pagó lo ve antes de tocar */
.dub-lock-note { margin: 8px 0 0; display: flex; align-items: flex-start; gap: 8px; }
.dub-lock-note[hidden] { display: none; }
.dub-lock-note .ic { flex: none; margin-top: 2px; width: 16px; height: 16px; }
/* (2-dic-2026, auditoría 23) «Abrir storyboard · Gratis» y «Estudio del episodio» de un capítulo se cortaban en el teléfono
   («…Grati», «rir storyboard»): por debajo de 520 px cada botón ocupa una fila y el texto puede partirse en dos líneas. */
@media (max-width: 520px) {
  .dr-ch-start.dr-ch-actions { flex-wrap: wrap; }
  .dr-ch-start.dr-ch-actions .btn { flex: 1 0 100%; width: 100%; white-space: normal; text-align: center; }
}

/* (2-dic-2026, auditoría UX n.º 40) El aviso flotante tapaba «Quitar» del actor, la barra del reproductor del anuncio,
   «Descargar» de los clips y las tarjetas de Crear (abajo, en el centro). Ahora sale arriba, debajo de la barra, y los toques
   lo atraviesan: nunca bloquea un botón. (Con una ventana abierta sigue arriba del todo, como antes.) */
.toast { pointer-events: none; top: calc(76px + env(safe-area-inset-top)); bottom: auto !important; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -8px); } }

.account-team { display: grid; gap: .75rem; margin: 1rem 0; overflow-wrap: anywhere; }
.account-team[hidden] { display: none; }
.account-team h3, .account-team p { margin: 0; }
.account-team form, .account-team .team-row { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; }
.account-team label { display: grid; gap: .25rem; min-width: 0; }
.account-team input { max-width: 100%; min-width: 0; }
.account-team input[type=number] { width: 7rem; }
.account-team .team-row { padding-top: .75rem; border-top: 1px solid var(--line, #5555); }
.account-team .team-row > b, .account-team .team-row > p { flex-basis: 100%; }
