.sl-main { max-width: 1280px; margin: 0 auto; padding: 14px 20px 40px; }
.hidden { display: none !important; }
.spacer { flex: 1; }
.err { color: #e5484d !important; }

/* Paso 1 */
.sl-start { max-width: 760px; margin: 18px auto 0; display: flex; flex-direction: column; gap: 12px; }
.sl-label { font-size: 13px; font-weight: 600; color: var(--muted); margin: 6px 0 0; }
.sl-start textarea { width: 100%; resize: vertical; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 12px; padding: 14px; font: 16px/1.5 var(--font); outline: none; }
.sl-start textarea:focus { border-color: var(--accent); }
.sl-row { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; font-size: 14px; color: var(--muted); }
.sl-row select, #sl-style, #sl-layout { margin-left: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 8px; padding: 6px 8px; font: inherit; }
.sl-check { display: flex; gap: 6px; align-items: center; }
.sl-styles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.sl-style { border: 2px solid transparent; background: none; padding: 0; cursor: pointer; border-radius: 14px; text-align: left; color: var(--text); transition: border-color .15s; }
.sl-style:hover { border-color: var(--accent); }
.sl-style.on { border-color: var(--accent); }
.sl-swatch { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.sl-swatch i { position: absolute; left: 10%; bottom: 18%; width: 30%; height: 6%; border-radius: 9px; }
.sl-swatch em { position: absolute; left: 10%; top: 22%; font-style: normal; font-size: 26px; font-weight: 800; }
.sl-style small { display: block; padding: 6px 4px 2px; font-size: 13px; font-weight: 600; }
.sl-go { align-self: flex-start; border: 0; background: var(--accent-primary, #7c5cff); color: #fff; border-radius: 10px; padding: 12px 22px; font: 600 15px var(--font); cursor: pointer; }
.sl-go:disabled { opacity: .5; cursor: progress; }
.sl-status { min-height: 40px; margin: 4px 0; padding: 8px 12px; border-radius: 10px; font-size: 14px; color: var(--muted); text-align: left; box-sizing: border-box; }
.sl-status:empty { min-height: 0; padding: 0; }
.sl-status.err, #sl-status.err, #sl-status2.err { background: rgba(229, 72, 77, .12); border: 1px solid rgba(229, 72, 77, .35); color: #e5484d; font-weight: 600; }
.ed-progress { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.ed-progress-bar { flex: 1; height: 4px; border-radius: 99px; background: var(--border); overflow: hidden; }
.ed-progress-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .6s ease; }

/* Paso 2 */
.sl-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 0 12px; border-bottom: 1px solid var(--border); }
.sl-bar b { font-size: 16px; font-weight: 600; outline: none; padding: 4px 6px; border-radius: 6px; }
.sl-bar b:focus { background: var(--surface); }
.sl-btn { border: 1px solid var(--border); background: transparent; color: var(--text); border-radius: 8px; padding: 7px 12px; font: 500 14px var(--font); cursor: pointer; }
.sl-btn:hover { border-color: var(--accent); }
.sl-primary { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 600; }
.sl-layout { display: grid; grid-template-columns: 170px 1fr; gap: 18px; margin-top: 14px; }
.sl-thumbs { display: flex; flex-direction: column; gap: 10px; max-height: calc(100vh - 170px); overflow-y: auto; padding-right: 4px; }
.sl-thumb { position: relative; border: 2px solid transparent; border-radius: 8px; padding: 0; background: none; cursor: pointer; }
.sl-thumb.on { border-color: var(--accent); }
.sl-thumb > span { position: absolute; left: 4px; bottom: 3px; font-size: 10px; color: #fff; background: rgba(0,0,0,.5); border-radius: 4px; padding: 0 4px; }
.sl-stage { min-width: 0; }
.sl-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 12px 0; }
.sl-notes-l { font-size: 12px; color: var(--muted); }
.sl-notes { width: 100%; margin-top: 4px; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 10px; padding: 10px; font: 14px/1.4 var(--font); resize: vertical; }
.sl-ask { display: flex; gap: 8px; margin-top: 10px; }
.sl-ask input { flex: 1; min-width: 0; border: 1px solid var(--border); background: transparent; color: var(--text); border-radius: 8px; padding: 9px 12px; font: inherit; outline: none; }

/* ===== Diapositiva (16:9). Las medidas van en cqw: se ve igual en grande, en miniatura y presentando ===== */
.sl-slide { container-type: inline-size; position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 10px; background: radial-gradient(120% 120% at 100% 0%, var(--bg2), var(--bg) 60%); color: var(--x); font-family: var(--f), system-ui, sans-serif; box-shadow: 0 10px 40px rgba(0,0,0,.35); }
.sl-slide::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1.1cqw; background: var(--a); }
.sl-slide h1, .sl-slide h2, .sl-slide h3, .sl-slide blockquote { font-family: var(--tf), var(--f), serif; color: var(--t); margin: 0; }
.sl-slide h2 { position: absolute; left: 5cqw; right: 5cqw; top: 5cqw; font-size: 3.6cqw; line-height: 1.15; font-weight: 800; }
.sl-slide ul { position: absolute; left: 6cqw; right: 6cqw; top: 15cqw; margin: 0; padding: 0; list-style: none; font-size: 2.1cqw; line-height: 1.45; }
.sl-slide li { position: relative; padding-left: 2.4cqw; margin-bottom: 1.3cqw; }
.sl-slide li::before { content: ''; position: absolute; left: 0; top: .7cqw; width: .9cqw; height: .9cqw; border-radius: 50%; background: var(--a); }
.sl-slide [contenteditable]:focus { outline: 2px dashed var(--a); outline-offset: 4px; border-radius: 4px; }
.sl-l-cover .sl-cover { position: absolute; left: 6cqw; top: 0; bottom: 0; width: 52cqw; display: flex; flex-direction: column; justify-content: center; border-left: .9cqw solid var(--a); padding-left: 3cqw; }
.sl-l-cover h1 { font-size: 5.2cqw; line-height: 1.08; font-weight: 800; }
.sl-l-cover p { margin: 2cqw 0 0; font-size: 2.2cqw; }
.sl-cover-img { position: absolute; right: 0; top: 0; bottom: 0; width: 40%; background: center / cover; -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%); mask-image: linear-gradient(90deg, transparent, #000 30%); }
.sl-l-section .sl-section { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 8cqw; }
.sl-l-section h2 { position: static; font-size: 5cqw; }
.sl-l-section p { margin: 2cqw 0 0; font-size: 2.2cqw; color: var(--a); }
.sl-two { position: absolute; left: 5cqw; right: 5cqw; top: 14cqw; display: grid; grid-template-columns: 1fr 1fr; gap: 4cqw; }
.sl-two h3 { font-size: 2.2cqw; color: var(--a); margin-bottom: 1.4cqw; }
.sl-two ul { position: static; font-size: 1.8cqw; }
.sl-quote { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; padding: 0 10cqw; }
.sl-quote blockquote { font-size: 3.6cqw; line-height: 1.3; font-style: italic; position: relative; }
.sl-quote blockquote::before { content: '“'; position: absolute; left: -5cqw; top: -4cqw; font-size: 10cqw; color: var(--a); font-style: normal; }
.sl-quote cite { margin-top: 2.5cqw; font-size: 2cqw; font-style: normal; }
.sl-stat { position: absolute; left: 5cqw; top: 15cqw; width: 42cqw; }
.sl-stat strong { display: block; font-family: var(--tf), sans-serif; font-size: 9cqw; line-height: 1; color: var(--a); }
.sl-stat span { display: block; margin-top: 1.5cqw; font-size: 2cqw; }
.sl-l-stat ul { left: 52cqw; top: 16cqw; font-size: 1.9cqw; }
.sl-img-wrap { position: absolute; inset: 0; display: grid; grid-template-columns: 48% 1fr; }
.sl-img { background: center / cover; display: grid; place-items: center; background-color: rgba(127,127,127,.15); }
.sl-img span { font-size: 1.6cqw; opacity: .6; }
.sl-img-text { position: relative; }
.sl-l-image h2 { left: 4cqw; right: 4cqw; top: 5cqw; font-size: 3.2cqw; }
.sl-l-image ul { left: 4cqw; right: 4cqw; top: 16cqw; font-size: 1.9cqw; }
.sl-mini { border-radius: 6px; box-shadow: none; pointer-events: none; }
.sl-canvas { width: 100%; }

/* Presentar */
.sl-show { position: fixed; inset: 0; z-index: 100; background: #000; display: grid; place-items: center; cursor: pointer; }
.sl-full { width: min(100vw, 177.78vh); border-radius: 0; box-shadow: none; animation: sl-in .35s ease; }
@keyframes sl-in { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: none; } }
.sl-count { position: fixed; right: 16px; bottom: 12px; color: rgba(255,255,255,.6); font: 13px var(--font); }
@media (max-width: 760px) { .sl-layout { grid-template-columns: 1fr; } .sl-thumbs { flex-direction: row; max-height: none; overflow-x: auto; } .sl-thumb { min-width: 120px; } .sl-styles { grid-template-columns: repeat(2, 1fr); } }
@media (prefers-reduced-motion: reduce) { .sl-full { animation: none; } }
.sl-thumb { text-align: left; }

/* ===== Formas decorativas y más estilo (tipo Canva/Gamma) ===== */
.sl-slide { background: linear-gradient(140deg, var(--bg) 55%, color-mix(in srgb, var(--bg2) 85%, var(--bg)) 100%); }
/* Burbuja de color suave arriba a la derecha */
.sl-slide[data-style="aurora"]::before, .sl-slide[data-style="bosque"]::before, .sl-slide[data-style="atardecer"]::before, .sl-slide[data-style="coral"]::before {
  content: ''; position: absolute; right: -14cqw; top: -18cqw; width: 48cqw; height: 48cqw; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--a), transparent 68%); opacity: .5; filter: blur(.4cqw); pointer-events: none;
}
.sl-slide[data-style="coral"]::before { right: auto; left: -16cqw; bottom: -18cqw; top: auto; background: radial-gradient(circle at 60% 40%, var(--a2), transparent 66%); }
/* Rejilla fina de fondo */
.sl-slide[data-style="neon"]::before, .sl-slide[data-style="pizarra"]::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(color-mix(in srgb, var(--x) 12%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--x) 12%, transparent) 1px, transparent 1px);
  background-size: 6cqw 6cqw; -webkit-mask-image: radial-gradient(120% 90% at 100% 0%, #000, transparent 75%); mask-image: radial-gradient(120% 90% at 100% 0%, #000, transparent 75%);
}
/* Punto/acento grande para neón */
.sl-slide[data-style="neon"] h2::after, .sl-slide[data-style="pizarra"] h2::after { content: '.'; color: var(--a); }
/* Línea editorial para minimal/elegante */
.sl-slide[data-style="minimal"] h2, .sl-slide[data-style="elegante"] h2 { padding-bottom: 2cqw; }
.sl-slide[data-style="minimal"] h2::after, .sl-slide[data-style="elegante"] h2::after { content: ''; position: absolute; left: 0; bottom: 0; width: 8cqw; height: .5cqw; background: var(--a); }
.sl-slide[data-style="minimal"] ::after { position: static; }

/* Portada con dos colores */
.sl-l-cover h1 { background: linear-gradient(100deg, var(--t), color-mix(in srgb, var(--a) 60%, var(--t))); -webkit-background-clip: text; background-clip: text; }
.sl-l-cover::after { background: linear-gradient(90deg, var(--a), var(--a2)); }
.sl-slide::after { background: linear-gradient(90deg, var(--a), var(--a2)); }

/* Sección con número grande de fondo */
.sl-l-section .sl-section h2 { position: relative; z-index: 1; }

/* Las viñetas aparecen escalonadas al presentar */
.sl-full li { animation: sl-li .5s ease backwards; }
.sl-full li:nth-child(1){animation-delay:.12s}.sl-full li:nth-child(2){animation-delay:.22s}.sl-full li:nth-child(3){animation-delay:.32s}.sl-full li:nth-child(4){animation-delay:.42s}.sl-full li:nth-child(5){animation-delay:.52s}.sl-full li:nth-child(6){animation-delay:.62s}
.sl-full h1, .sl-full h2, .sl-full blockquote, .sl-full .sl-stat strong { animation: sl-li .55s ease backwards; }
@keyframes sl-li { from { opacity: 0; transform: translateY(1.4cqw); } to { opacity: 1; transform: none; } }

/* Dato destacado más potente */
.sl-stat strong { background: linear-gradient(120deg, var(--a), var(--a2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
@media (prefers-reduced-motion: reduce) { .sl-full li, .sl-full h1, .sl-full h2, .sl-full blockquote, .sl-full .sl-stat strong { animation: none; } }

.sl-dl { position: relative; display: inline-block; }
.sl-dl-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; display: none; flex-direction: column; min-width: 170px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 28px rgba(0,0,0,.25); overflow: hidden; }
.sl-dl-menu.open { display: flex; }
.sl-dl-menu button { border: 0; background: transparent; color: var(--text); text-align: left; padding: 10px 14px; font: 14px var(--font); cursor: pointer; }
.sl-dl-menu button:hover { background: var(--accent-soft, rgba(124,92,255,.12)); }

.sl-styles { grid-template-columns: repeat(3, 1fr); gap: 14px; }
.sl-style .sl-mini { aspect-ratio: 16/9; width: 100%; }

/* ===== Zona de entrada elegante ===== */
.sl-start { max-width: 820px; margin: 36px auto 0; display: flex; flex-direction: column; gap: 14px; }
.sl-hero { font-family: var(--display, 'Inter'); font-size: 30px; font-weight: 700; letter-spacing: -.02em; text-align: center; margin: 0; }
.sl-hero-sub { text-align: center; color: var(--muted); margin: -4px 0 10px; font-size: 15px; }
.sl-compose { border: 1px solid var(--border); border-radius: 20px; background: var(--surface); padding: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.08); transition: border-color .2s, box-shadow .2s; }
.sl-compose:focus-within { border-color: var(--accent); box-shadow: 0 10px 44px rgba(124,92,255,.18); }
.sl-compose textarea { width: 100%; box-sizing: border-box; resize: none; border: 0; background: transparent; color: var(--text); padding: 16px 18px 6px; font: 16px/1.5 var(--font); outline: none; }
.sl-compose-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 10px 8px; }
.sl-count-wrap { display: flex; align-items: center; gap: 8px; margin-left: auto; font-size: 13px; color: var(--muted); }
.sl-seg { display: inline-flex; background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 3px; gap: 2px; }
.sl-seg button { border: 0; background: transparent; color: var(--muted); border-radius: 999px; padding: 6px 14px; font: 500 13px var(--font); cursor: pointer; transition: color .15s, background .15s; }
.sl-seg button:hover { color: var(--text); }
.sl-seg button.on { background: var(--text); color: var(--bg); font-weight: 600; }
.sl-seg-sm button { padding: 6px 10px; min-width: 30px; }
.sl-go { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--accent); color: #fff; cursor: pointer; transition: transform .15s, filter .15s; flex: none; }
.sl-go:disabled { opacity: .5; cursor: progress; transform: none; }
.sl-examples { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.sl-chip { border: 1px solid var(--border); background: transparent; color: var(--muted); border-radius: 999px; padding: 6px 14px; font: 13px var(--font); cursor: pointer; transition: border-color .15s, color .15s; }
.sl-chip:hover { border-color: var(--accent); color: var(--text); }
.sl-start .sl-label { text-align: center; margin-top: 16px; }
.sl-start .ed-progress { max-width: 520px; margin: 4px auto 0; }
.sl-status { text-align: left; }
@media (max-width: 560px) { .sl-compose-foot { gap: 8px; } .sl-count-wrap { margin-left: 0; width: 100%; } .sl-hero { font-size: 24px; } }

/* Nube animada arriba */
.sl-mascot { width: 92px; height: 70px; margin: 0 auto -6px; }
/* Botón de enviar: que no quede pegado ni tape las pastillas */
.sl-compose-foot { gap: 10px 12px; }
.sl-go { margin-left: 4px; box-shadow: none; }
.sl-count-wrap { margin-left: auto; }
/* Barra de tarea elegante (qué está haciendo) */
.sl-task { display: flex; align-items: center; gap: 12px; max-width: 560px; margin: 8px auto 0; padding: 12px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: 0 6px 24px rgba(0,0,0,.1); font-size: 14px; color: var(--text); }
.sl-task > span:nth-child(2) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sl-task .ed-progress-bar { flex: 1; height: 5px; }
.sl-task b { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; min-width: 34px; text-align: right; }
.sl-task-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex: none; animation: sl-pulse 1s ease-in-out infinite; }
@keyframes sl-pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(.7); } }
@media (prefers-reduced-motion: reduce) { .sl-task-dot { animation: none; } }

/* Desplegables modernos */
.sl-row select, #sl-style, #sl-layout { -webkit-appearance: none; appearance: none; background: rgba(255,255,255,.05) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a78bfa' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 10px center / 16px no-repeat !important; padding-right: 34px !important; border-radius: 12px; border: 1px solid rgba(167,139,250,.25); color: inherit; }

/* Presentar con reveal.js */
.sl-show { cursor: default; display: block; }
.sl-show .reveal { width: 100vw; height: 100vh; }
.sl-show .reveal .slides { text-align: left; }
.sl-show .reveal .sl-slide.sl-full { width: 1280px; height: 720px; animation: none; }
.sl-show .reveal .slides section { padding: 0; }
.sl-show-x { position: fixed; top: 14px; right: 16px; z-index: 5; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 18px; cursor: pointer; opacity: .5; transition: opacity .2s; }
.sl-show-x:hover { opacity: 1; }
/* Fuentes y añadidos */
.sl-src-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 12px 0 4px; }
.sl-src-btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; border: 1px dashed var(--border, rgba(255,255,255,.2)); background: rgba(124,92,255,.10); color: inherit; font: inherit; font-size: 13.5px; cursor: pointer; transition: background .2s, transform .15s; }
.sl-src-btn:hover { background: rgba(124,92,255,.24); }
.sl-src-btn.solid { border-style: solid; }
#sl-src { display: contents; }
.sl-src-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 8px 7px 14px; border-radius: 999px; background: rgba(124,92,255,.22); font-size: 13px; max-width: 240px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: sl-in .25s ease; }
.sl-src-chip button { border: 0; background: rgba(255,255,255,.14); color: inherit; width: 20px; height: 20px; border-radius: 50%; cursor: pointer; line-height: 1; }
.sl-add-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; padding: 10px 12px; border-radius: 14px; background: rgba(124,92,255,.08); border: 1px solid rgba(124,92,255,.22); }
.sl-add-row > span { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .7; margin-right: 4px; }
.sl-add-row button[disabled] { opacity: .5; cursor: progress; }
.sl-add-row select { margin-left: auto; }
.sl-show { overflow: hidden; }
.sl-show .reveal { background: #000; }
