html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
:root{--navy:#071a2a;--panel:#0e273d;--gold:#e8bf69;--light:#f6f2e9;--muted:#b1c3d0;--border:#335069;--danger:#ffb89c;--green:#bcebbf}*{box-sizing:border-box}html{color-scheme:dark}body{margin:0;background:radial-gradient(ellipse at 86% 0,#24435c 0,transparent 48%),var(--navy);color:var(--light);font:16px/1.5 system-ui,-apple-system,"Segoe UI",Arial,sans-serif}.tricolor{display:flex;height:7px;overflow:hidden}.tricolor span:nth-child(1){background:#ffcf29;flex:2}.tricolor span:nth-child(2){background:#1a4ca0;flex:1}.tricolor span:nth-child(3){background:#c93643;flex:1}.shell{max-width:1120px;margin:auto;padding:30px 20px 50px}.intro{max-width:780px;margin-bottom:30px}.eyebrow{letter-spacing:.19em;color:var(--gold);font-size:12px;font-weight:800;margin:0 0 12px}.intro h1{font-family:Georgia,"Times New Roman",serif;font-size:clamp(30px,4.5vw,47px);font-weight:700;line-height:1.12;margin:0 0 12px}.intro p:last-child{color:var(--muted);margin:0}.layout{display:grid;grid-template-columns:minmax(310px,1fr) minmax(260px,.84fr);gap:22px;align-items:start}.editor,.preview-section{background:linear-gradient(145deg,#112b42,#0a2033);border:1px solid var(--border);border-radius:18px;padding:24px;box-shadow:0 15px 40px #0004}.editor h2,.preview-heading h2{font-size:20px;margin:0 0 22px}.editor label{display:block;font-size:14px;font-weight:650;margin-bottom:8px}.editor input{display:block;width:100%;padding:15px 13px;border-radius:10px;background:#071727;border:1px solid #7791a7;color:var(--light);outline-offset:2px;outline-color:var(--gold);font-size:17px}.editor input:focus{border-color:var(--gold)}.small{font-size:13px;color:var(--muted);margin:8px 0 22px}.validation{font-size:14px;border-radius:9px;padding:11px 12px;background:#112f37;color:var(--green);margin-bottom:18px}.validation[hidden]{display:none}.validation.warning{color:#ffda92;background:#3b3127}.validation.error{color:var(--danger);background:#38272a}.suggestion{background:#0b3440;border:1px solid #377889;border-radius:12px;padding:14px;margin-bottom:16px}.suggestion[hidden],.progress[hidden],.download[hidden]{display:none}.suggestion-head{color:#96e1e8;font-weight:700;font-size:13px}.suggestion p{margin:7px 0 12px;word-break:break-word;font-weight:700}.secondary{background:#1f4052;border:1px solid #6796a0;color:white;border-radius:8px;cursor:pointer;padding:9px 12px}.small-button{font-size:13px}.primary{margin-top:18px;display:flex;align-items:center;justify-content:center;gap:16px;background:linear-gradient(180deg,#f5d58f,#ca963f);color:#182434;font-size:16px;font-weight:800;border:0;border-radius:11px;min-height:54px;width:100%;padding:13px;cursor:pointer}.primary:disabled{cursor:not-allowed;opacity:.48}.privacy{display:flex;gap:8px;align-items:flex-start;color:var(--muted);font-size:12px;line-height:1.6;margin:20px 0 0}.privacy svg{flex:none;margin-top:1px}.preview-heading{display:flex;align-items:baseline;justify-content:space-between;gap:10px}.preview-heading h2{margin-bottom:16px}.video-wrap{position:relative;aspect-ratio:9 / 16;background:#000;overflow:hidden;border-radius:10px;max-width:390px;margin:auto;border:1px solid #ac8c57}.video-wrap video{width:100%;height:100%;display:block;object-fit:contain;background:#000}.overlay-preview{position:absolute;left:14.444444%;top:54.375%;width:71.111111%;height:3.75%;pointer-events:none;display:flex;align-items:center;justify-content:center}.ribbon-text{text-align:center;white-space:nowrap;overflow:visible;line-height:1;transform-origin:center;max-width:100%;color:#f7dc9f;font-family:Georgia,"Times New Roman",serif;font-weight:700;text-shadow:1px 2px 1px #08121b,-.5px -.5px 1px #000;letter-spacing:0}.progress{margin-top:18px}.progress-bg{background:#263d4b;height:9px;border-radius:20px;overflow:hidden}.progress-fill{height:100%;width:0%;background:linear-gradient(90deg,#d6a14c,#fee1a6);transition:width .35s}.progress p{font-size:13px;color:var(--muted)}.download{background:#102f2c;border:1px solid #528d69;border-radius:12px;padding:16px;margin-top:18px}.download strong{color:#ddf4dc}.download p{font-size:13px;margin:5px 0 14px}.download a{display:inline-block;background:#d1eccc;color:#0c332b;text-decoration:none;padding:12px 17px;border-radius:9px;font-weight:800}.offscreen{position:fixed;width:1px;height:1px;left:-2000px;top:-2000px;opacity:0;pointer-events:none}footer{display:flex;gap:12px;justify-content:space-between;font-size:11px;letter-spacing:.05em;color:#879eae;padding:25px 2px 0}@media(max-width:740px){.shell{padding:20px 14px 30px}.layout{grid-template-columns:1fr}.editor,.preview-section{padding:18px}.preview-section{max-width:470px;width:100%;margin:auto}.video-wrap{max-width:350px}.intro{margin-bottom:22px}footer{flex-direction:column;align-items:center;text-align:center}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}

/* V2.2: resultados DESPUÉS de la vista previa, también en móvil. */
.overlay-preview[hidden]{display:none}
.download h3{margin:0 0 6px;font-size:19px;color:#ddf4dc}
.download p{margin:7px 0 15px;line-height:1.5}
.result-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:stretch}
.result-actions>a,.result-actions>button{display:flex;justify-content:center;align-items:center;flex:1 1 145px;min-height:51px;padding:12px;border-radius:10px;font:700 15px/1.35 system-ui,-apple-system,"Segoe UI",Arial,sans-serif;cursor:pointer;text-align:center}
.result-actions>a{background:#d1eccc;color:#0c332b;text-decoration:none}
.result-actions>.share-button{background:linear-gradient(180deg,#ecd291,#c99b49);border:1px solid #ebca83;color:#102638}
.share-caption{margin:15px 0 8px!important;font-size:13px!important;color:#e5eced}
.share-caption span{display:block;margin-bottom:3px;font-size:12px;color:#a8c4c1}
.copy-message{cursor:pointer;border:1px solid #7197a1;color:#d9edf0;background:#123a3c;border-radius:8px;padding:9px 12px;font-size:13px}
.share-feedback{color:#dcefdc;background:#173d37;border-radius:8px;padding:10px;margin:12px 0 0!important}
.share-feedback[hidden]{display:none}
.preview-section .privacy{margin-top:24px}
@media(max-width:740px){.result-actions{flex-direction:column}.result-actions>a,.result-actions>button{flex:auto;width:100%}}

/* V2.3: el nombre de ejemplo es una sugerencia, no un valor ingresado. */
.editor input::placeholder{color:#a5b8c7;opacity:1}


/* V2.4 · Módulos de apoyo y promoción al final de la experiencia, antes del pie de página. */
.extras{max-width:850px;margin:48px auto 0;display:grid;gap:24px;text-align:center}
.extra-card{background:linear-gradient(160deg,#0e2941,#0b2237);border:1px solid #34516a;border-radius:24px;padding:29px 28px 27px;box-shadow:0 12px 40px rgba(0,0,0,.10)}
.extra-kicker{margin:0 0 12px;color:#f9c566;font-weight:800;letter-spacing:.16em;font-size:13px;line-height:1.35}
.extra-card h2{font-family:Georgia,"Times New Roman",serif;font-size:clamp(25px,3.3vw,34px);line-height:1.15;margin:0 0 17px;color:#fff}
.extra-description{font-size:clamp(16px,1.8vw,21px);line-height:1.55;color:#d6e6f2;margin:0 auto 23px;max-width:700px}
.extra-link{display:inline-flex;gap:9px;align-items:center;justify-content:center;min-height:64px;padding:14px 30px;text-decoration:none;font-weight:850;font-size:clamp(18px,2.1vw,23px);border-radius:18px;transition:transform .15s ease,background-color .15s ease,box-shadow .15s ease}
.extra-link:hover{transform:translateY(-2px)}.extra-link:focus-visible{outline:3px solid #f9ce7b;outline-offset:4px}
.coffee-link{color:#ffcb79;background:#1b3041;border:1px solid #b99950}.coffee-link:hover{background:#263c4c}
.extra-disclaimer{margin:19px 0 0;color:#b5c9d9;font-size:13px;line-height:1.6}
.sismo-card{background:linear-gradient(135deg,#122c49,#0d213c)}
.sismo-card .extra-kicker{font-size:clamp(14px,2vw,19px);margin-bottom:12px}
.sismo-link{color:#e8f2ff;background:#183e5d;border:1px solid #356487;border-radius:999px;min-height:56px;padding:12px 24px}
.sismo-link:hover{background:#24547b}.live-dot{width:14px;height:14px;border-radius:50%;background:#ff596a;box-shadow:0 0 0 6px rgba(255,89,106,.12);flex:none}
.sr-only{position:absolute;width:1px;height:1px;clip:rect(0,0,0,0);overflow:hidden;white-space:nowrap}
.site-footer{max-width:850px;margin:40px auto 0;padding:36px 10px 0;border-top:1px solid #284356;text-align:center;display:flex;flex-direction:column;gap:0;align-items:center;font-size:inherit;letter-spacing:normal;color:#dceaf3}
.footer-copyright{margin:0 0 16px;font-size:16px;line-height:1.6}
.footer-copyright a,.footer-legal a{color:#ffce6a;text-decoration:underline;text-underline-offset:4px}
.footer-legal{display:flex;gap:48px;justify-content:center;flex-wrap:wrap;margin:0 0 30px}.footer-legal a{font-size:16px}
.footer-brand{background:#0d283c;border:1px solid #2f5366;border-radius:18px;padding:23px 26px;width:100%;max-width:760px}
.footer-brand strong{color:#e9c572;font-size:18px}.footer-brand p{font-size:16px;line-height:1.6;margin:8px auto 0;max-width:650px}
.footer-privacy{margin:26px auto 22px;max-width:700px;font-size:13px;line-height:1.6;color:#a8c1d3}
.footer-tricolor{display:flex;width:150px;height:6px;overflow:hidden;border-radius:8px}
.footer-tricolor span:nth-child(1){flex:2;background:#ffcf29}.footer-tricolor span:nth-child(2){flex:1;background:#1a4ca0}.footer-tricolor span:nth-child(3){flex:1;background:#c93643}
@media(max-width:740px){.extras{margin-top:33px;gap:18px}.extra-card{border-radius:18px;padding:24px 18px}.extra-kicker{font-size:11px;letter-spacing:.11em}.extra-card h2{font-size:clamp(23px,6vw,30px)}.extra-description{font-size:16px}.desktop-only{display:none}.extra-link{min-height:54px;font-size:18px}.extra-disclaimer{font-size:12px}.site-footer{margin-top:30px;padding-top:28px}.footer-legal{gap:35px;margin-bottom:24px}.footer-brand{padding:20px 14px}.footer-brand p{font-size:14px}.footer-copyright{font-size:14px}}
@media(prefers-reduced-motion:reduce){.extra-link{transition:none!important}}

/* V2.7_VIDEO_UNA_COLUMNA_START */
/* Video siempre en composición vertical:
   editor arriba y vista previa debajo.
   No modifica JS, Canvas, MediaRecorder ni generación. */

.shell{
  max-width:860px;
  margin-left:auto;
  margin-right:auto;
}

.intro{
  max-width:100%;
  margin-bottom:28px;
}

.layout{
  display:grid !important;
  grid-template-columns:1fr !important;
  gap:28px !important;
  align-items:stretch !important;
}

.editor,
.preview-section{
  width:100%;
  max-width:100%;
  margin:0 auto;
}

.editor{
  padding:28px;
}

.preview-section{
  padding:28px;
}

.video-wrap{
  width:min(100%,560px);
  max-width:560px !important;
  margin-left:auto;
  margin-right:auto;
}

.preview-heading{
  width:min(100%,560px);
  margin-left:auto;
  margin-right:auto;
}

.preview-section .privacy-note,
.preview-section .privacy,
.preview-section .local-note{
  width:min(100%,560px);
  margin-left:auto;
  margin-right:auto;
}

@media (min-width:741px){

  .shell{
    max-width:860px !important;
    padding-left:24px;
    padding-right:24px;
  }

  .layout{
    grid-template-columns:1fr !important;
  }

  .editor{
    max-width:860px;
  }

  .preview-section{
    max-width:720px;
  }

  .video-wrap{
    max-width:460px !important;
  }

}

@media (max-width:740px){

  .shell{
    width:100%;
    padding-left:16px;
    padding-right:16px;
  }

  .layout{
    gap:20px !important;
  }

  .editor,
  .preview-section{
    padding:20px;
  }

  .video-wrap{
    width:100%;
    max-width:100% !important;
  }

}

/* V2.7_VIDEO_UNA_COLUMNA_END */

/* GENERATION_MASK_START
   Bloquea completamente la vista previa mientras se genera el MP4.
*/

.generation-mask{
  position:absolute;
  inset:0;
  z-index:100;

  display:flex;
  align-items:center;
  justify-content:center;

  padding:28px;

  background:
    radial-gradient(
      circle at 50% 38%,
      rgba(24,61,88,.98),
      rgba(5,20,33,.995) 72%
    );

  text-align:center;

  cursor:wait;

  user-select:none;
  -webkit-user-select:none;

  touch-action:none;
}

.generation-mask[hidden]{
  display:none;
}

.generation-mask-content{
  width:min(100%,350px);

  display:flex;
  flex-direction:column;
  align-items:center;

  gap:12px;
}

.generation-mask-content strong{
  color:#f2cf7a;

  font-family:
    Georgia,
    "Times New Roman",
    serif;

  font-size:clamp(25px,5vw,34px);
  line-height:1.15;
}

.generation-mask-content span{
  color:#f6f2e9;

  font-size:clamp(17px,3.8vw,21px);
  font-weight:600;
  line-height:1.45;
}

.generation-mask-content small{
  margin-top:3px;

  color:#acc4d5;

  font-size:13px;
  line-height:1.4;
}

.generation-spinner{
  width:50px;
  height:50px;

  margin-bottom:8px;

  border:
    4px solid
    rgba(255,255,255,.18);

  border-top-color:#e8bf69;

  border-radius:50%;

  animation:
    generation-spin
    .85s
    linear
    infinite;
}

@keyframes generation-spin{
  to{
    transform:rotate(360deg);
  }
}

@media(prefers-reduced-motion:reduce){

  .generation-spinner{
    animation:none;
    border-color:#e8bf69;
  }

}

/* GENERATION_MASK_END */

/* GENERATION_PROMO_START
   Mensaje estático alternado por generación. Sin enlaces, imágenes ni animación.
*/

.generation-promo{
  width:min(100%,320px);
  margin-top:14px;
  padding:14px 14px 13px;

  border:
    1px solid
    rgba(232,191,105,.30);

  border-radius:14px;

  background:
    rgba(7,26,42,.72);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.03);

  line-height:1.35;
}

.generation-promo-label{
  margin-bottom:7px;

  color:#e8bf69;

  font-size:10px;
  font-weight:900;
  letter-spacing:.14em;
}

.generation-promo-title{
  color:#f6f2e9;

  font-size:15px;
  font-weight:800;
}

.generation-promo-subtitle{
  margin-top:2px;

  color:#dce8ef;

  font-size:14px;
  font-weight:650;
}

.generation-promo-detail{
  margin-top:3px;

  color:#c6d7e2;

  font-size:13px;
}

.generation-promo-domain{
  margin-top:7px;

  color:#9fc2d6;

  font-size:11px;
  font-weight:700;
  letter-spacing:.01em;

  overflow-wrap:anywhere;
}

@media(max-width:740px){

  .generation-mask{
    padding:20px;
  }

  .generation-mask-content{
    gap:10px;
  }

  .generation-promo{
    margin-top:10px;
    padding:12px;
  }

}

/* GENERATION_PROMO_END */
