/* =====================================================================
   PERSONAJES Y LUGARES (pestaña «elenco», 1-dic-2026). Un modo propio y destacado: tema oscuro con acentos crema
   (como la portada), retratos grandes 3:4, chips con desplazamiento y transiciones suaves. Teléfono primero.
   ===================================================================== */
:root {
  --el-cream: #c9bdff;
  --el-cream-2: #e4ddff;
  --el-cream-soft: rgba(124, 99, 255, .14);
  --el-line: rgba(160, 140, 255, .26);
  --el-ink: #160f33;
  --el-card: #15141e;
  --el-card-2: #1f1b26;
}

/* ---------- Insignia «Nuevo» y entradas del menú ---------- */
.nav-new {
  display: inline-flex; align-items: center; margin-left: auto; padding: 2px 7px; border-radius: 999px;
  background: linear-gradient(135deg, var(--el-cream-2), var(--el-cream)); color: var(--el-ink);
  font: 700 .64rem/1.3 var(--font); letter-spacing: .02em; text-transform: uppercase; font-style: normal; white-space: nowrap;
}
#app .menu button.menu-elenco { gap: 11px; white-space: nowrap; }
/* (Revisión) La insignia va en la esquina de ARRIBA, por fuera de la línea del texto (top negativo): antes, a 3 px del
   borde, se montaba sobre el final de «lugares». En línea no cabe: el menú tiene 212 px útiles y el texto ocupa casi todo. */
#app .menu button.menu-elenco { overflow: visible; }
#app .menu button.menu-elenco .nav-new { position: absolute; top: -6px; right: 4px; z-index: 1; padding: 1px 6px; font-size: .52rem; line-height: 1.25; letter-spacing: .04em; box-shadow: 0 0 0 2px var(--bg-2, #0d0c12); }
#app .menu button.menu-elenco .ic { color: var(--el-cream); }
#app .menu button.menu-elenco.active { background: var(--el-cream-soft); box-shadow: inset 0 0 0 1px var(--el-line); }
#app .menu button.menu-elenco.active::before { background: var(--el-cream); }
.sheet-box button.more-elenco { background: linear-gradient(120deg, rgba(160, 140, 255, .13), rgba(160, 140, 255, .03)); box-shadow: inset 0 0 0 1px var(--el-line); margin-bottom: 4px; }
.sheet-box button.more-elenco > span { background: var(--el-cream-soft); color: var(--el-cream); }
.sheet-box button.more-elenco b { display: inline-flex; align-items: center; gap: 8px; }
.sheet-box button.more-elenco .nav-new { margin-left: 0; }

/* ---------- Franja compacta en la primera pantalla de Inicio (solo teléfono y tableta) ---------- */
#app .home-elenco-strip { display: none; }
@media (max-width: 900px) {
  #app .home-elenco-strip {
    display: flex; align-items: center; gap: 12px; width: 100%; margin: 0 0 12px; padding: 10px 14px 10px 10px; min-height: 64px;
    border: 1px solid var(--el-line); border-radius: 18px; color: var(--text); font: inherit; text-align: left; cursor: pointer;
    background: radial-gradient(ellipse 80% 140% at 100% 0%, rgba(160, 140, 255, .2), transparent 60%), linear-gradient(140deg, #1f1a22, #14121a 75%);
    box-shadow: 0 14px 34px -22px rgba(0, 0, 0, .9); transition: border-color .2s, transform .2s;
  }
  #app .home-elenco-strip:active { transform: scale(.99); }
  #app .home-elenco-strip:focus-visible { outline: 2px solid var(--el-cream); outline-offset: 2px; }
  .hes-fan { position: relative; flex: none; width: 62px; height: 46px; }
  .hes-fan img { position: absolute; top: 0; width: 30px; height: 44px; object-fit: cover; border-radius: 7px; border: 1px solid rgba(255, 255, 255, .2); box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .9); }
  .hes-fan img:nth-child(1) { left: 0; transform: rotate(-8deg); }
  .hes-fan img:nth-child(2) { left: 16px; z-index: 2; }
  .hes-fan img:nth-child(3) { left: 32px; transform: rotate(8deg); }
  .hes-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
  .hes-text b { display: flex; align-items: center; gap: 7px; color: #fff7ee; font-size: .96rem; }
  .hes-text b .nav-new { margin-left: 0; }
  .hes-text small { color: var(--text-2); font-size: .8rem; line-height: 1.3; }
  #app .home-elenco-strip > .ic { flex: none; width: 18px; height: 18px; color: var(--el-cream); }
}

/* ---------- Tarjeta grande en Inicio ---------- */
#app .home-elenco {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 20px; align-items: center;
  margin: 18px 0 4px; padding: clamp(20px, 3vw, 34px); border: 1px solid var(--el-line); border-radius: 24px; overflow: hidden;
  background:
    radial-gradient(ellipse 70% 90% at 92% 10%, rgba(160, 140, 255, .2), transparent 62%),
    radial-gradient(ellipse 60% 80% at 0% 100%, rgba(167, 139, 250, .12), transparent 60%),
    linear-gradient(150deg, #1d1820, #121018 70%);
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, .8);
}
.home-elenco-kicker { display: inline-flex; align-items: center; gap: 8px; color: var(--el-cream); font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.home-elenco-kicker .ic { width: 17px; height: 17px; }
.home-elenco-kicker .nav-new { margin-left: 2px; }
#app .home-elenco h3 { margin: 10px 0 8px; font-size: clamp(1.55rem, 3.2vw, 2.25rem); letter-spacing: -.03em; color: #fff7ee; }
#app .home-elenco p { margin: 0 0 14px; color: var(--text-2); max-width: 46ch; }
.home-elenco-points { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 7px; color: var(--text-2); font-size: .9rem; }
.home-elenco-points li { display: flex; align-items: center; gap: 9px; }
.home-elenco-points .ic { width: 16px; height: 16px; color: var(--el-cream); flex: none; }
#app .home-elenco .home-elenco-go, .elenco .btn.primary, .el-dialog .btn.primary {
  background: linear-gradient(135deg, var(--el-cream-2), var(--el-cream)); color: var(--el-ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .45) inset, 0 10px 26px -12px rgba(160, 140, 255, .7);
}
#app .home-elenco .home-elenco-go { min-height: 46px; padding-inline: 20px; }
/* Portada: la misma escena en 4 estilos, como cartas en abanico (cada una deja ver su nombre). */
.home-elenco-art { position: relative; width: 100%; max-width: 440px; height: 290px; margin-inline: auto; }
.el-fan { position: absolute; top: 50%; width: 34%; aspect-ratio: 3 / 4.3; margin: 0; border-radius: 16px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .16); box-shadow: 0 18px 40px -14px rgba(0, 0, 0, .95); transition: transform .5s var(--ease); background: #222; }
.el-fan img { width: 100%; height: 100%; object-fit: cover; display: block; }
.el-fan figcaption { position: absolute; left: 7px; bottom: 7px; padding: 3px 8px; border-radius: 999px; background: rgba(10, 9, 14, .74); backdrop-filter: blur(6px); color: #fff; font-size: .68rem; font-weight: 650; white-space: nowrap; }
.el-fan-1 { left: 0; transform: translateY(-47%) rotate(-7deg); z-index: 1; }
.el-fan-2 { left: 22%; transform: translateY(-52%) rotate(-2.5deg); z-index: 2; }
.el-fan-3 { left: 44%; transform: translateY(-52%) rotate(2.5deg); z-index: 3; }
.el-fan-4 { left: 66%; transform: translateY(-47%) rotate(7deg); z-index: 4; }
#app .home-elenco:hover .el-fan-1 { transform: translateY(-49%) translateX(-6%) rotate(-9deg); }
#app .home-elenco:hover .el-fan-4 { transform: translateY(-49%) translateX(6%) rotate(9deg); }
@media (max-width: 900px) {
  #app .home-elenco { grid-template-columns: 1fr; gap: 6px; margin-top: 14px; padding: 20px 18px; }
  .home-elenco-art { order: -1; height: 205px; max-width: 340px; }
  .el-fan { border-radius: 13px; }
  .el-fan figcaption { font-size: .62rem; padding: 2px 7px; left: 5px; bottom: 5px; }
  #app .home-elenco .home-elenco-go { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .el-fan { transition: none; } }

/* ---------- Pestaña ---------- */
.elenco { --sec-gap: 22px; }
.el-hero {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center;
  padding: clamp(18px, 3vw, 30px); border: 1px solid var(--el-line); border-radius: 24px; overflow: hidden;
  background:
    radial-gradient(ellipse 60% 120% at 100% 0%, rgba(160, 140, 255, .22), transparent 60%),
    linear-gradient(160deg, #1d1820, #121018 75%);
}
.el-kicker { display: inline-flex; align-items: center; gap: 7px; color: var(--el-cream); font-size: .74rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.el-kicker .ic { width: 16px; height: 16px; }
.el-hero h2 { margin: 8px 0 6px; font-size: clamp(1.5rem, 3.4vw, 2.3rem); letter-spacing: -.03em; color: #fff7ee; }
.el-hero-text { margin: 0 0 16px; color: var(--text-2); max-width: 52ch; font-size: .95rem; }
.el-kind { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(0, 0, 0, .35); border: 1px solid var(--line-2); }
.el-kind button { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: none; color: var(--text-2); font: 600 .9rem var(--font); cursor: pointer; transition: background .2s, color .2s; }
.el-kind button .ic { width: 16px; height: 16px; }
.el-kind button[aria-selected="true"] { background: linear-gradient(135deg, var(--el-cream-2), var(--el-cream)); color: var(--el-ink); }
.el-kind.small { margin: 2px 0 12px; }
.el-kind.small button { min-height: 36px; font-size: .84rem; padding: 0 13px; }
.el-hero-art { position: relative; width: 300px; height: 190px; }
.el-hero-img { position: absolute; top: 50%; width: 104px; height: auto; aspect-ratio: 3 / 4.4; object-fit: cover; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .15); box-shadow: 0 16px 34px -14px rgba(0, 0, 0, .9); }
.el-hero-img-1 { left: 0; transform: translateY(-50%) rotate(-8deg); }
.el-hero-img-2 { left: 96px; transform: translateY(-54%); z-index: 2; }
.el-hero-img-3 { left: 192px; transform: translateY(-50%) rotate(8deg); }
.elenco[data-kind="lugar"] .el-hero-img { filter: saturate(.9); }

.el-views { display: flex; gap: 6px; margin: 16px 0 6px; padding: 2px 0 8px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.el-views::-webkit-scrollbar { display: none; }
.el-views button { position: relative; display: inline-flex; align-items: center; gap: 7px; flex: none; min-height: 42px; padding: 0 14px; border: 1px solid transparent; border-radius: 12px; background: none; color: var(--muted); font: 600 .9rem var(--font); cursor: pointer; transition: color .2s, background .2s; }
.el-views button .ic { width: 16px; height: 16px; }
.el-views button:hover { color: var(--text); }
.el-views button[aria-selected="true"] { color: #fff7ee; background: var(--el-cream-soft); border-color: var(--el-line); }
.el-views button[aria-selected="true"] .ic { color: var(--el-cream); }
.el-v-short { display: none; }
/* (Revisión) En el teléfono las pestañas caben enteras: reparten el ancho, sin ícono, y con 3 o más van con su nombre
   corto («Míos», «Catálogo», «Crear», «Generar»). Antes se cortaba «Crear co…» sin aviso de que se podía deslizar. */
@media (max-width: 600px) {
  .el-views { gap: 4px; }
  .el-views button { flex: 1 1 0; min-width: 0; justify-content: center; padding: 0 8px; font-size: .86rem; }
  .el-views button .ic { display: none; }
  .elenco:is([data-tabs="3"], [data-tabs="4"]) .el-v-long { display: none; }
  .elenco:is([data-tabs="3"], [data-tabs="4"]) .el-v-short { display: inline; }
}
.elenco :focus-visible, .el-dialog :focus-visible { outline: 2px solid var(--el-cream); outline-offset: 2px; }

.el-body { padding-top: 14px; min-height: 320px; outline: none; }
.el-body.el-in { animation: elIn .32s var(--ease); }
@keyframes elIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .el-body.el-in { animation: none; } }

/* ---------- Botones grandes ---------- */
.el-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-bottom: 16px; }
.el-action { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--el-card); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: border-color .2s, transform .2s, background .2s; }
.el-action:hover { border-color: var(--el-line); background: var(--el-card-2); }
.el-action > .ic { flex: none; width: 40px; height: 40px; padding: 10px; border-radius: 12px; background: var(--el-cream-soft); color: var(--el-cream); }
.el-action span { display: flex; flex-direction: column; min-width: 0; }
.el-action b { font-size: .95rem; }
.el-action small { color: var(--muted); font-size: .8rem; line-height: 1.35; }
.el-action.primary { border-color: var(--el-line); background: linear-gradient(130deg, rgba(160, 140, 255, .16), rgba(160, 140, 255, .04)); }
.el-action.soon { cursor: default; opacity: .9; border-style: dashed; }
.el-action.soon > .ic { background: rgba(255, 255, 255, .05); color: var(--muted); }

/* ---------- Chips ---------- */
.el-chips { display: flex; gap: 7px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; scroll-snap-type: x proximity; }
.el-chips::-webkit-scrollbar { display: none; }
.el-chips.wrap { flex-wrap: wrap; overflow: visible; }
.el-chip { display: inline-flex; align-items: center; gap: 7px; flex: none; min-height: 38px; padding: 0 13px 0 8px; border: 1px solid var(--line-2); border-radius: 999px; background: rgba(255, 255, 255, .03); color: var(--text-2); font: 600 .84rem var(--font); cursor: pointer; scroll-snap-align: start; transition: background .18s, border-color .18s, color .18s; white-space: nowrap; }
.el-chip:not(:has(img)):not(:has(.ic)) { padding-left: 13px; }
.el-chip img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.el-chip .ic { width: 15px; height: 15px; }
.el-chip:hover { border-color: var(--line-3); color: var(--text); }
.el-chip.on { background: var(--el-cream-soft); border-color: var(--el-cream); color: #fff7ee; }
.el-chip.static { cursor: default; }
.el-chip.static:not(.on) { opacity: .62; }
.el-chip-n { padding: 1px 7px; border-radius: 999px; background: rgba(255, 255, 255, .08); color: var(--text-2); font-size: .74rem; font-variant-numeric: tabular-nums; }
.el-chip.on .el-chip-n { background: rgba(160, 140, 255, .25); color: #fff7ee; }

/* ---------- Secciones ---------- */
.el-sec-block { margin-top: var(--sec-gap); }
.el-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.el-sec-head h3 { display: flex; align-items: center; gap: 8px; font-size: 1.08rem; }
.el-count { padding: 2px 9px; border-radius: 999px; background: rgba(255, 255, 255, .06); color: var(--text-2); font: 600 .78rem var(--font); font-variant-numeric: tabular-nums; }
.el-meter { position: relative; height: 6px; flex: 0 1 140px; border-radius: 6px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.el-meter i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: linear-gradient(90deg, var(--el-cream), var(--el-cream-2)); transition: width .5s var(--ease); }
.el-meter.big { height: 10px; margin: 10px 0; }
.el-help { margin: 0 0 10px; color: var(--muted); font-size: .86rem; line-height: 1.5; }
.el-help .ic { width: 14px; height: 14px; vertical-align: -2px; }
.el-empty-line { color: var(--muted); font-size: .88rem; margin: 4px 0; }

/* ---------- Cuadrícula de retratos ---------- */
.el-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; }
.el-card { position: relative; min-width: 0; }
.el-card-main { display: flex; flex-direction: column; gap: 8px; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.el-thumb { position: relative; display: block; width: 100%; aspect-ratio: 3 / 4; border-radius: 16px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .08); background: var(--el-card-2); transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .25s; }
.el-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
img[data-el-preview] {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}
.el-card-main:hover .el-thumb { transform: translateY(-3px); border-color: var(--el-line); box-shadow: 0 18px 36px -20px rgba(0, 0, 0, .9); }
.el-card-main:focus-visible { outline: none; }
.el-card-main:focus-visible .el-thumb { outline: 2px solid var(--el-cream); outline-offset: 2px; }
.el-card-meta { display: flex; flex-direction: column; gap: 1px; padding: 0 2px; min-width: 0; }
.el-card-meta b { font-size: .93rem; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.el-card-meta small { color: var(--muted); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.el-badges { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; gap: 5px; justify-content: space-between; pointer-events: none; }
.el-badge, .el-ia, .el-lead, .el-rev, .el-pend, .el-flag, .el-ext { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; font: 700 .66rem/1.2 var(--font); font-style: normal; letter-spacing: .01em; backdrop-filter: blur(8px); white-space: nowrap; }
.el-badge { background: rgba(12, 10, 16, .72); color: #fff; border: 1px solid rgba(255, 255, 255, .14); overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.el-ia { background: rgba(160, 140, 255, .9); color: var(--el-ink); flex: none; }
.el-lead { position: absolute; left: 8px; bottom: 8px; background: rgba(12, 10, 16, .72); color: var(--el-cream-2); border: 1px solid var(--el-line); }
.el-lead .ic { width: 11px; height: 11px; }
.el-rev { position: absolute; right: 8px; bottom: 8px; background: rgba(167, 139, 250, .9); color: #140f22; }
.el-ficha-badges .el-rev, .el-ficha-badges .el-lead { position: static; }
.el-pend { background: rgba(255, 255, 255, .08); color: var(--text-2); border: 1px solid var(--line-2); }
.el-pend .ic { width: 12px; height: 12px; }
.el-flag { position: absolute; left: 8px; right: 8px; bottom: 8px; justify-content: center; background: rgba(251, 191, 36, .92); color: #241800; white-space: normal; }
.el-flag .ic { width: 12px; height: 12px; }

/* Fichas «en preparación»: el marco definitivo, con la silueta o el ícono del tipo (nunca un hueco vacío). */
.el-tint-cinematic { background: radial-gradient(ellipse 90% 70% at 50% 18%, rgba(160, 140, 255, .3), transparent 70%), linear-gradient(170deg, #2a2129, #16131b); }
.el-tint-3d { background: radial-gradient(ellipse 90% 70% at 50% 18%, rgba(103, 196, 233, .3), transparent 70%), linear-gradient(170deg, #1b2630, #131620); }
.el-tint-cartoon { background: radial-gradient(ellipse 90% 70% at 50% 18%, rgba(250, 204, 21, .26), transparent 70%), linear-gradient(170deg, #2a2418, #16141b); }
.el-tint-anime { background: radial-gradient(ellipse 90% 70% at 50% 18%, rgba(244, 114, 182, .28), transparent 70%), linear-gradient(170deg, #2a1a28, #16131c); }
.el-tint-foto { background: linear-gradient(170deg, #22202a, #15131b); }
.el-ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 8px; padding: 0 10px 12px; overflow: hidden; }
.el-ph::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .06) 50%, transparent 65%); background-size: 250% 100%; animation: elShine 3.2s ease-in-out infinite; }
@keyframes elShine { from { background-position: 120% 0; } to { background-position: -120% 0; } }
@media (prefers-reduced-motion: reduce) { .el-ph::after { animation: none; } }
.el-ph-sil { position: absolute; left: 50%; bottom: 0; width: 78%; height: 82%; transform: translateX(-50%); fill: #fff7ee; opacity: .12; }
.el-ph-icon { position: absolute; left: 50%; top: 42%; width: 34%; height: 34%; transform: translate(-50%, -50%); color: rgba(255, 247, 238, .34); }
.el-ph small { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px; background: rgba(10, 9, 14, .6); border: 1px solid rgba(255, 255, 255, .09); color: var(--text-2); font-size: .68rem; font-weight: 600; white-space: nowrap; backdrop-filter: blur(6px); }
.el-ph small .ic { width: 12px; height: 12px; }
.el-ph.big .el-ph-sil { width: 70%; height: 78%; }
.el-ph.big small { font-size: .8rem; padding: 6px 12px; margin-bottom: 6px; }
.el-cat.pending .el-card-meta b { color: var(--text-2); }
.el-card.just-ready .el-thumb img { animation: elReady .7s var(--ease); }
@keyframes elReady { from { opacity: 0; transform: scale(1.04); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

/* Estrella de guardar */
.el-star { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 50%; background: rgba(12, 10, 16, .66); color: #fff; cursor: pointer; backdrop-filter: blur(8px); transition: transform .2s, background .2s; }
.el-star .ic { width: 17px; height: 17px; }
.el-star.on { background: var(--el-cream); color: var(--el-ink); border-color: transparent; }
.el-star.on .ic { fill: currentColor; }
.el-star:hover { transform: scale(1.06); }
.el-lib:has(.el-star) .el-badges { right: 52px; }

/* Vacío, error, esqueleto */
.el-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px 16px; border: 1px dashed var(--line-2); border-radius: 18px; text-align: center; color: var(--muted); }
.el-empty p { margin: 0; max-width: 40ch; }
.el-empty-art { width: 70px; height: 84px; fill: rgba(160, 140, 255, .3); color: rgba(160, 140, 255, .45); }
.el-error { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 14px; border: 1px solid rgba(248, 113, 113, .35); border-radius: 14px; background: rgba(248, 113, 113, .07); color: var(--text-2); }
.el-skel .el-thumb { background: linear-gradient(100deg, #1a1820 30%, #23202b 50%, #1a1820 70%); background-size: 300% 100%; animation: elShine 1.4s linear infinite; }
.el-skel .el-card-meta b, .el-skel .el-card-meta small { display: block; height: 10px; width: 70%; border-radius: 5px; background: #201d27; }
.el-skel .el-card-meta small { width: 45%; margin-top: 4px; }

.el-trash, .el-how { margin-top: var(--sec-gap); border: 1px solid var(--line); border-radius: 14px; padding: 4px 14px; background: rgba(255, 255, 255, .015); }
.el-trash summary, .el-how summary { display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; font-weight: 600; color: var(--text-2); }
.el-trash summary .ic, .el-how summary .ic { width: 16px; height: 16px; }
.el-trash-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.el-trash-list li { display: flex; align-items: center; gap: 10px; }
.el-trash-list img { width: 42px; height: 56px; object-fit: cover; border-radius: 8px; flex: none; }
.el-trash-list span { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.el-trash-list small { color: var(--muted); }
.el-how ol { margin: 0 0 12px; padding-left: 20px; color: var(--text-2); font-size: .9rem; display: grid; gap: 6px; }

/* ---------- Catálogo ---------- */
.el-cat-top { margin: 0 0 12px; }
/* En computadora el buscador y los chips quedan fijos arriba al bajar por la cuadrícula (en el teléfono, no: ocuparían media pantalla). */
@media (min-width: 901px) {
  .el-cat-top { position: sticky; top: 0; z-index: 4; margin: -6px -8px 12px; padding: 8px 8px 6px; background: var(--workspace-canvas, #0d0d16); border-bottom: 1px solid var(--line); }
}
.el-search { display: flex; align-items: center; gap: 9px; min-height: 48px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--el-card); }
.el-search:focus-within { border-color: var(--el-cream); }
.el-search .ic { width: 18px; height: 18px; color: var(--muted); flex: none; }
.el-search input { flex: 1; min-width: 0; height: 46px; border: 0; background: none; color: var(--text); font: inherit; font-size: 16px; outline: none; }
.el-cat-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; min-width: 0; }
.el-cat-row .el-chips { flex: 1; min-width: 0; padding-bottom: 2px; }
.el-collection .ic { color: var(--el-cream); }
.el-filter-btn { display: inline-flex; align-items: center; gap: 7px; flex: none; min-height: 38px; padding: 0 13px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--el-card); color: var(--text); font: 600 .84rem var(--font); cursor: pointer; }
.el-filter-btn .ic { width: 15px; height: 15px; }
.el-filter-btn.on { border-color: var(--el-cream); color: #fff7ee; }
.el-active { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.el-active .el-chip { min-height: 32px; font-size: .78rem; }
.el-total { margin: 8px 2px 0; color: var(--muted); font-size: .8rem; min-height: 1em; }
.el-sec { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 10px 0 -2px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 1.05rem; color: #fff7ee; }
.el-sec:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.el-sec small { color: var(--muted); font: 500 .78rem var(--font); }
.el-more { display: flex; justify-content: center; padding: 18px 0 6px; }
.el-ai-note { margin: 16px 0 0; color: var(--muted); font-size: .8rem; line-height: 1.5; }
.el-ai-note .ic { width: 14px; height: 14px; vertical-align: -2px; }
.el-ai-note .link { font-size: .8rem; padding: 0; color: var(--el-cream); }
.el-admin-note, .el-prep-note { display: flex; align-items: flex-start; gap: 9px; margin: 0 0 12px; padding: 10px 13px; border-radius: 12px; font-size: .84rem; color: var(--text-2); }
.el-admin-note { background: rgba(167, 139, 250, .08); border: 1px solid rgba(167, 139, 250, .22); }
.el-prep-note { background: var(--el-cream-soft); border: 1px solid var(--el-line); }
.el-admin-note .ic, .el-prep-note .ic { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--el-cream); }
.el-preparing { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 26px 16px 34px; border: 1px solid var(--el-line); border-radius: 22px; background: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(160, 140, 255, .14), transparent 70%), var(--el-card); }
.el-preparing h3 { font-size: 1.3rem; color: #fff7ee; }
.el-preparing p { margin: 0; max-width: 44ch; color: var(--text-2); }
.el-prep-art { display: flex; gap: 8px; margin-bottom: 6px; }
.el-prep-art .el-thumb { width: 64px; border-radius: 12px; }
.el-prep-art .el-thumb:nth-child(odd) { transform: translateY(6px); }

/* ---------- Diálogos (ficha, hojas) ---------- */
.el-dialog { width: min(920px, calc(100vw - 32px)); max-height: min(88vh, 860px); padding: 0; border: 1px solid var(--el-line); border-radius: 22px; background: #121017; color: var(--text); box-shadow: 0 40px 120px -30px rgba(0, 0, 0, .95); overflow: hidden; }
.el-dialog-small { width: min(520px, calc(100vw - 32px)); }
.el-dialog::backdrop { background: rgba(4, 3, 7, .72); backdrop-filter: blur(4px); }
.el-dialog[open] { animation: elPop .26s var(--ease); }
@keyframes elPop { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
/* (Sin position en la caja: la «×» queda fija en la esquina de la hoja aunque se baje por la ficha.) */
.el-dialog-box { max-height: inherit; overflow: auto; padding: 22px; overscroll-behavior: contain; }
.el-dialog h3 { font-size: 1.25rem; padding-right: 44px; }
.el-dialog h4 { margin: 6px 0 10px; font-size: 1rem; }
.el-x { position: absolute; top: 12px; right: 12px; z-index: 3; display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line-2); border-radius: 50%; background: rgba(12, 10, 16, .8); color: var(--text); cursor: pointer; }
.el-x .ic { width: 18px; height: 18px; }
@media (max-width: 700px) {
  .el-dialog, .el-dialog-small { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 22px 22px 0 0; border-bottom: 0; }
  .el-dialog[open] { animation: elUp .3s var(--ease); }
  .el-dialog-box { padding: 18px 16px calc(20px + env(safe-area-inset-bottom)); }
  .el-dialog-box::before { content: ""; display: block; width: 40px; height: 4px; margin: -6px auto 12px; border-radius: 4px; background: var(--surface-4); }
}
@keyframes elUp { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }

.el-ficha { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 24px; align-items: start; }
.el-ficha.loading { display: block; }
.el-ficha-img { position: relative; aspect-ratio: 3 / 4; border-radius: 18px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .1); }
.el-ficha-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.el-ficha-info { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.el-ficha-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-right: 44px; }
.el-ficha-badges .el-badge { background: rgba(255, 255, 255, .07); }
.el-origin { color: var(--muted); font-size: .8rem; }
.el-ficha-name { font-size: clamp(1.4rem, 3vw, 1.9rem) !important; color: #fff7ee; padding-right: 0 !important; }
.el-ficha-desc { margin: 0; color: var(--text-2); }
.el-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin: 0; }
.el-facts div { padding: 9px 11px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .02); }
.el-facts dt { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
.el-facts dd { margin: 2px 0 0; font-weight: 600; font-size: .9rem; display: flex; align-items: center; gap: 6px; }
.el-voice { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .02); }
.el-voice > span { color: var(--muted); font-size: .8rem; }
.el-voice b { flex: 1; min-width: 0; }
.el-voice .voice-launch { flex: 1; min-width: 0; }
.el-play { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 12px; border: 1px solid var(--el-line); border-radius: 999px; background: var(--el-cream-soft); color: #fff7ee; font: 600 .82rem var(--font); cursor: pointer; }
.el-play .ic { width: 14px; height: 14px; }
.el-play.playing { background: var(--el-cream); color: var(--el-ink); }
.el-styles-av > span { display: block; margin-bottom: 6px; color: var(--muted); font-size: .8rem; }
.el-styles-av .el-chips { flex-wrap: wrap; overflow: visible; }
.el-styles-av .el-help { margin: 4px 0 0; }
.el-saved { display: flex; align-items: center; gap: 7px; margin: 0; color: var(--ok); font-weight: 600; font-size: .9rem; }
.el-saved .ic { width: 16px; height: 16px; }
.el-name-field, .el-form label { display: flex; flex-direction: column; gap: 5px; color: var(--text-2); font-size: .84rem; font-weight: 600; }
.el-name-field input, .el-form input:not([type="checkbox"]):not([type="file"]), .el-form textarea, .el-gen-form select, .el-gen-form input[type="number"], .el-gen-models select {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--el-card); color: var(--text); font: inherit; font-size: 16px; font-weight: 400;
}
.el-form textarea { resize: vertical; min-height: 72px; }
.el-form { display: flex; flex-direction: column; gap: 12px; }
.el-ficha-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.el-history-links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 8px 0; }
.el-selections { list-style: none; margin: 0 0 12px; padding: 0; }
.el-selections li { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.el-ficha-actions .btn { flex: 1 1 180px; min-height: 46px; }
.el-choice { margin-top: 12px; }
.el-choice .btn { min-height: 44px; }
.el-choice .el-help { margin: 0 0 5px; }
.el-original { margin: 12px 0; }
.el-original .btn { min-height: 44px; }
.el-original .el-help { margin: 5px 0 0; }
.el-original .el-help:empty { margin: 0; }
.el-pending-note { display: flex; align-items: center; gap: 7px; margin: 0; padding: 9px 12px; border-radius: 12px; background: rgba(255, 255, 255, .04); color: var(--text-2); font-size: .86rem; }
.el-pending-note .ic { width: 15px; height: 15px; color: var(--el-cream); }
.el-ficha-more { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.el-variant { flex: 1 1 100%; border: 1px solid var(--line); border-radius: 12px; padding: 2px 12px; }
.el-variant summary { display: flex; align-items: center; gap: 7px; min-height: 42px; cursor: pointer; font-weight: 600; font-size: .9rem; }
.el-variant summary .ic { width: 15px; height: 15px; }
.el-del { align-self: flex-start; min-height: 40px; }

.el-drop { position: relative; display: grid; place-items: center; min-height: 150px; border: 1px dashed var(--line-3); border-radius: 14px; background: var(--el-card); cursor: pointer; overflow: hidden; }
.el-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.el-drop span { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--text-2); pointer-events: none; }
.el-drop span .ic { width: 26px; height: 26px; color: var(--el-cream); }
.el-drop img { width: 100%; max-height: 220px; object-fit: cover; }

/* «Usar en…» */
.el-use-who { display: flex; align-items: center; gap: 12px; margin: 12px 0 14px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; }
.el-use-who img { width: 48px; height: 64px; object-fit: cover; border-radius: 10px; }
.el-use-who span { display: flex; flex-direction: column; }
.el-use-who small, .el-proj small { color: var(--muted); font-size: .8rem; }
.el-use-list, .el-proj-list { display: grid; gap: 8px; }
.el-use, .el-proj { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--el-card); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: border-color .2s, background .2s; }
.el-use:hover, .el-proj:hover { border-color: var(--el-line); background: var(--el-card-2); }
.el-use > .ic:first-child { width: 36px; height: 36px; padding: 9px; border-radius: 10px; background: var(--el-cream-soft); color: var(--el-cream); flex: none; }
.el-use > .ic:last-child, .el-proj > .ic:last-child { width: 16px; height: 16px; color: var(--muted); flex: none; margin-left: auto; }
.el-use span, .el-proj span { display: flex; flex-direction: column; min-width: 0; }
.el-proj img, .el-proj-ph { width: 40px; height: 52px; border-radius: 9px; object-fit: cover; flex: none; }
.el-proj-ph { display: grid; place-items: center; background: var(--surface-3); color: var(--muted); }
.el-proj-ph .ic { width: 18px; height: 18px; }
.el-proj b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.el-back { display: inline-flex; align-items: center; gap: 6px; margin: 4px 0; color: var(--el-cream); }
.el-back .ic { width: 14px; height: 14px; }
.el-sub { margin: 16px 0 8px; color: var(--muted); font-size: .84rem; font-weight: 600; }

/* Mensaje dentro de una hoja abierta y confirmación encima */
.el-msg { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 8px; margin: 14px 0 0; padding: 11px 14px; border: 1px solid rgba(52, 211, 153, .35); border-radius: 12px; background: #13231d; color: var(--text); font-size: .88rem; animation: elIn .25s var(--ease); }
.el-msg.warn { border-color: rgba(251, 191, 36, .4); background: #2a2213; }
.el-msg .ic { width: 16px; height: 16px; flex: none; }
.el-confirm .el-dialog-box::before { display: none; }
.el-confirm-text { color: var(--text-2); margin: 10px 0 0; }
.el-filter-foot.static { position: static; margin: 18px 0 0; padding: 0; border: 0; background: none; }
.el-confirm .btn.primary.danger { background: #dc2626; color: #fff; box-shadow: none; }

/* Filtros */
.el-filters { display: grid; gap: 4px; margin-top: 8px; }
.el-fgroup { margin: 0; padding: 10px 0; border: 0; border-bottom: 1px solid var(--line); min-width: 0; }
.el-fgroup legend { padding: 0; margin-bottom: 8px; font-weight: 650; font-size: .9rem; color: var(--text); }
.el-swatch { width: 40px; height: 40px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .14); background: var(--sw); cursor: pointer; transition: transform .15s; }
.el-swatch.on { border-color: var(--el-cream); box-shadow: 0 0 0 3px rgba(160, 140, 255, .3); transform: scale(1.06); }
.el-swatch.mini { display: inline-block; width: 14px; height: 14px; border-width: 1px; cursor: default; }
.el-filter-foot { position: sticky; bottom: -22px; display: flex; gap: 8px; margin: 12px -22px -22px; padding: 12px 22px; background: #121017; border-top: 1px solid var(--line); }
.el-filter-foot .btn { flex: 1; min-height: 46px; }
@media (max-width: 700px) { .el-filter-foot { bottom: calc(-20px - env(safe-area-inset-bottom)); margin: 12px -16px calc(-20px - env(safe-area-inset-bottom)); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); } }

/* Hoja «Elegir personaje / lugar» */
.el-pick-body .el-search { margin-bottom: 10px; }
.el-pick-grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px; margin-top: 6px; }
.el-pick-foot { display: flex; justify-content: center; margin-top: 14px; }

/* ---------- Creador ---------- */
.el-creator { max-width: 980px; }
.el-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.el-steps button { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 6px 8px; border: 0; border-radius: 12px; background: none; color: var(--muted); font: 600 .82rem/1.2 var(--font); text-align: left; cursor: pointer; }
.el-steps button:disabled { cursor: default; opacity: .6; }
.el-steps span { display: grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 50%; border: 1px solid var(--line-2); font-size: .78rem; }
.el-steps li.on button { color: #fff7ee; }
.el-steps li.on span { background: var(--el-cream); border-color: var(--el-cream); color: var(--el-ink); }
.el-steps li.done span { background: var(--el-cream-soft); border-color: var(--el-line); color: var(--el-cream); }
.el-progress { height: 4px; margin: 6px 0 18px; border-radius: 4px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.el-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--el-cream), var(--el-cream-2)); transition: width .45s var(--ease); }
.el-step-title { margin-bottom: 14px; font-size: 1.2rem; color: #fff7ee; }
.el-base-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.el-base { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-height: 120px; padding: 16px; border: 1px solid var(--line-2); border-radius: 18px; background: var(--el-card); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: border-color .2s, transform .2s; }
.el-base:hover { border-color: var(--el-line); transform: translateY(-2px); }
.el-base.on { border-color: var(--el-cream); background: linear-gradient(130deg, rgba(160, 140, 255, .14), rgba(160, 140, 255, .03)); }
.el-base .ic { width: 38px; height: 38px; padding: 9px; border-radius: 12px; background: var(--el-cream-soft); color: var(--el-cream); }
.el-base small { color: var(--muted); font-size: .82rem; }
.el-base-chosen { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 8px 12px; border: 1px solid var(--el-line); border-radius: 14px; }
.el-base-chosen img { width: 40px; height: 52px; object-fit: cover; border-radius: 9px; }
.el-style-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.el-style-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 0 0 10px; border: 2px solid transparent; border-radius: 18px; background: var(--el-card); color: var(--text); font: inherit; cursor: pointer; overflow: hidden; transition: border-color .2s, transform .2s; }
.el-style-card img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.el-style-card.on { border-color: var(--el-cream); }
.el-style-card:hover { transform: translateY(-2px); }
.el-adjust { display: grid; gap: 2px; }
.el-adjust .el-chips.wrap + .el-chips.wrap { margin-top: 6px; }
.el-price { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 12px 14px; border: 1px solid var(--el-line); border-radius: 14px; background: var(--el-cream-soft); color: var(--text-2); font-size: .88rem; }
.el-price > .ic { width: 16px; height: 16px; color: var(--el-cream); flex: none; }
.el-price > span { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.el-alta { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: var(--text); cursor: pointer; }
.el-alta input { width: 18px; height: 18px; accent-color: var(--el-cream); }
.el-creator-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; }
.el-creator-nav .btn { min-height: 46px; }
.el-creator-nav.wrap { flex-wrap: wrap; justify-content: flex-start; }
.el-preview-wait { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 34px 16px; border: 1px dashed var(--el-line); border-radius: 18px; text-align: center; color: var(--text-2); }
.el-spinner { width: 42px; height: 42px; border-radius: 50%; border: 3px solid rgba(160, 140, 255, .2); border-top-color: var(--el-cream); animation: elSpin 1s linear infinite; }
@keyframes elSpin { to { transform: rotate(360deg); } }
.el-options { display: grid; grid-template-columns: repeat(2, minmax(0, 260px)); gap: 14px; }
.el-option { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 0 0 8px; border: 2px solid var(--line-2); border-radius: 18px; background: var(--el-card); color: var(--text); font: 600 .86rem var(--font); cursor: pointer; overflow: hidden; }
.el-option img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.el-option.on { border-color: var(--el-cream); }
.el-cr-save { max-width: 460px; margin-top: 16px; }

/* ---------- Generador (administrador) ---------- */
.el-gen { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 14px; align-items: start; }
.el-gen-card { min-width: 0; padding: 18px; border: 1px solid var(--line-2); border-radius: 18px; background: var(--el-card); }
.el-gen-card h3 { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; font-size: 1.02rem; }
.el-gen-card h3 .ic { width: 17px; height: 17px; color: var(--el-cream); }
.el-gen-card:nth-child(n+3) { grid-column: 1 / -1; }
.el-budget { background: radial-gradient(ellipse 80% 90% at 100% 0%, rgba(160, 140, 255, .14), transparent 65%), var(--el-card); }
.el-big { margin: 0; font: 800 2rem var(--font-display); color: #fff7ee; }
.el-big small { font: 500 .84rem var(--font); color: var(--muted); }
.el-gen-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.el-gen-actions .btn { min-height: 44px; flex-direction: column; gap: 2px; }
.el-gen-actions .btn small { font-size: .72rem; font-weight: 500; opacity: .8; }
.el-gen-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; align-items: end; padding-top: 10px; border-top: 1px solid var(--line); }
.el-gen-form label, .el-gen-models label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: .78rem; font-weight: 600; }
.el-check { flex-direction: row !important; align-items: center; min-height: 44px; color: var(--text-2) !important; }
.el-check input { width: 18px; height: 18px; accent-color: var(--el-cream); }
.el-gen-form .btn { min-height: 44px; }
.el-gen-models { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-bottom: 10px; }
.el-table-wrap { overflow-x: auto; }
.el-table { width: 100%; border-collapse: collapse; font-size: .86rem; font-variant-numeric: tabular-nums; }
.el-table th, .el-table td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.el-table th:first-child { text-align: left; }
.el-table thead th { color: var(--muted); font-weight: 600; font-size: .76rem; }
.el-batches { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.el-batch { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; }
.el-batch .el-meter { flex: none; width: 100%; }
.el-batch-top { display: flex; justify-content: space-between; gap: 8px; }
.el-status { font-size: .76rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: rgba(255, 255, 255, .07); }
.el-batch.running .el-status { background: rgba(52, 211, 153, .15); color: var(--ok); }
.el-batch.paused .el-status { background: rgba(251, 191, 36, .14); color: var(--warn); }
.el-batch small { color: var(--muted); }
.el-note { display: block; color: var(--warn) !important; font-size: .78rem; }
.el-batch-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.el-rev-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-top: 10px; }
.el-rev-card.discard .el-thumb { opacity: .35; outline: 2px solid var(--err); outline-offset: -2px; }
.el-rev-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.el-rev-actions .btn { padding: 5px 9px; font-size: .74rem; min-height: 34px; }
.el-rev-foot { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.el-pilot { display: grid; gap: 12px; margin-top: 12px; }
.el-pilot-row b small { color: var(--muted); font-weight: 500; }
.el-pilot-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 160px)); gap: 10px; margin-top: 6px; }
.el-pilot-pair figure { margin: 0; }
.el-pilot-pair img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 12px; }
.el-pilot-pair figcaption { font-size: .74rem; color: var(--muted); }
/* Subir imágenes hechas con otra IA (1-dic-2026): recuadro para soltar archivos o carpetas, plan, progreso y resumen. */
.el-drop { display: grid; justify-items: center; gap: 8px; padding: 18px 14px; border: 1.5px dashed var(--el-line); border-radius: 16px; background: rgba(160, 140, 255, .035); text-align: center; transition: border-color .2s, background .2s; }
.el-drop.drag { border-color: var(--el-cream); background: var(--el-cream-soft); }
.el-drop[hidden] { display: none; }
.el-drop .el-drop-ic { width: 26px; height: 26px; color: var(--el-cream); }
.el-drop-text { display: grid; gap: 2px; margin: 0; font-size: .92rem; }
.el-drop-text span { color: var(--muted); font-size: .84rem; }
.el-drop-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.el-drop-actions .btn { min-height: 44px; }
.el-up-plan, .el-up-progress, .el-up-done { margin-top: 12px; padding: 14px; border: 1px solid var(--line-2); border-radius: 14px; background: rgba(255, 255, 255, .02); }
.el-up-plan h4 { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; font-size: .95rem; }
.el-up-plan h4 small { color: var(--muted); font-weight: 500; }
.el-up-sum { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.el-up-sum > li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; align-items: start; font-size: .88rem; line-height: 1.45; }
.el-up-sum > li > .ic { width: 16px; height: 16px; margin-top: 2px; }
.el-up-sum > li > div { min-width: 0; }
.el-up-sum .ok > .ic { color: var(--ok); }
.el-up-sum .warn > .ic { color: var(--warn); }
.el-up-sum .bad > .ic { color: var(--err); }
.el-up-sum .muted { color: var(--text-2); }
.el-up-sum .muted > .ic { color: var(--muted); }
.el-up-names { list-style: none; margin: 6px 0 0; padding: 6px 9px; max-height: 136px; overflow: auto; border-radius: 10px; background: rgba(0, 0, 0, .22); color: var(--muted); font: 500 .76rem/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.el-up-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.el-up-actions .btn { min-height: 44px; }
.el-up-line { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 10px; margin: 0; }
.el-up-line .el-help { margin: 0; }
.el-up-progress .el-meter { flex: none; width: 100%; }
.el-up-title { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; font-size: .98rem; }
.el-up-title .ic { width: 18px; height: 18px; color: var(--ok); }
.el-up-done.has-bad .el-up-title .ic { color: var(--warn); }
.el-up-errs { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; max-height: 260px; overflow: auto; }
.el-up-errs li { display: grid; gap: 2px; padding: 8px 10px; border-radius: 10px; background: rgba(248, 113, 113, .08); font-size: .82rem; line-height: 1.45; overflow-wrap: anywhere; }
.el-up-errs b { font-weight: 650; }
.el-up-errs span { color: var(--text-2); }
.el-up-csv { margin: 12px 0 0; }
/* (Revisión del 2-dic-2026) Casillas del plan (reemplazar, publicadas, copias), nota de espera y lista de subidas por día. */
.el-up-sum .el-up-opt { display: flex; gap: 8px; width: fit-content; max-width: 100%; margin-top: 4px; min-height: 40px; font-size: .86rem; font-weight: 600; line-height: 1.35; }
.el-up-sum .el-up-opt input { flex: none; }
.el-up-wait { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; color: var(--warn); }
.el-up-wait[hidden] { display: none; }
.el-up-wait .ic { width: 15px; height: 15px; flex: none; }
.el-sub-h { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 16px 0 8px; font-size: .9rem; }
.el-sub-h .ic { width: 15px; height: 15px; color: var(--el-cream); }
.el-sub-h small { color: var(--muted); font-weight: 500; }
/* «Las protagonistas realistas las hago con otra IA» (Lanzar una tanda). */
.el-otra-ia { margin: 10px 0 2px; padding: 4px 12px 10px; border: 1px solid var(--line); border-radius: 14px; }
.el-otra-ia.on { border-color: var(--el-line); background: var(--el-cream-soft); }
.el-otra-ia .el-check { display: flex; gap: 8px; font-weight: 650; color: var(--text) !important; }
.el-otra-ia .el-help { margin: 0; }
.el-batch.subida .el-batch-top b { display: inline-flex; align-items: center; gap: 6px; }
.el-batch.subida .el-batch-top .ic { width: 15px; height: 15px; color: var(--el-cream); }
.el-ext { background: rgba(125, 211, 252, .92); color: #06202b; flex: none; }
.el-ext .ic { width: 11px; height: 11px; }
.el-avisos { margin-top: 4px; line-height: 1.4; }
.el-rev-actions .btn .ic { width: 13px; height: 13px; flex: none; }
/* «Copiar indicación» puede ir en dos líneas (en el teléfono la tarjeta de revisión mide ~110 px). */
.el-rev-actions [data-copy-prompt] { white-space: normal; text-align: center; max-width: 100%; }

/* ---------- Crear y Mis proyectos ---------- */
.cast-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 10px; }
.cast-action { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 999px; background: rgba(255, 255, 255, .03); color: var(--text); font: 600 .84rem var(--font); cursor: pointer; }
.cast-action .ic { width: 16px; height: 16px; color: var(--el-cream); }
.cast-action:hover { border-color: var(--el-line); background: var(--el-cream-soft); }
.dr-lib { display: flex; flex-wrap: wrap; gap: 6px; }
.dr-lib-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 11px; border: 1px solid var(--line-2); border-radius: 999px; background: rgba(255, 255, 255, .03); color: var(--text-2); font: 600 .78rem var(--font); cursor: pointer; }
.dr-lib-btn .ic { width: 14px; height: 14px; color: var(--el-cream); }
.dr-lib-btn:hover { color: var(--text); border-color: var(--el-line); }

/* ---------- Tamaños ---------- */
@media (min-width: 1500px) { .el-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); } }
@media (max-width: 900px) {
  .el-hero { grid-template-columns: minmax(0, 1fr) 118px; gap: 10px; padding: 18px 16px; border-radius: 20px; }
  .el-hero-art { width: 118px; height: 150px; }
  .el-hero-img { width: 64px; border-radius: 11px; }
  .el-hero-img-2 { left: 30px; }
  .el-hero-img-3 { left: 56px; }
  .el-hero-text { font-size: .88rem; margin-bottom: 12px; }
  .el-hero .el-kind { grid-column: 1 / -1; }
  .el-ficha { grid-template-columns: 1fr; gap: 16px; }
  .el-ficha-img { max-width: min(100%, 300px); width: 100%; margin: 0 auto; }
  .el-style-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .el-steps button { font-size: 0; gap: 0; justify-content: center; }
  .el-steps span { font-size: .78rem; }
  .el-steps li.on button { font-size: .78rem; gap: 6px; justify-content: flex-start; }
  .el-steps { grid-template-columns: auto auto auto auto; justify-content: start; }
}
@media (max-width: 600px) {
  /* En el teléfono la portada se queda en el título, el texto y el selector (las cartas grandes están en Inicio). */
  .el-hero { grid-template-columns: 1fr; }
  .el-hero-art { display: none; }
  .el-hero h2 { margin: 6px 0 4px; }
  .el-hero .el-kind { display: flex; }
  .el-hero .el-kind button { flex: 1; justify-content: center; }
  .el-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .el-pick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .el-actions { grid-template-columns: 1fr; }
  .el-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .el-gen-card { padding: 14px; }
  .el-gen-models { grid-template-columns: 1fr; }
  .el-gen-actions { display: grid; grid-template-columns: 1fr; }
  .el-rev-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .el-rev-grid .el-card-meta small { display: none; }
  .el-rev-actions .btn { flex: 1 1 auto; padding: 4px 6px; }
  .el-drop { padding: 14px 10px; }
  .el-drop-actions, .el-up-actions { display: grid; grid-template-columns: 1fr; width: 100%; }
  /* En la tarjeta estrecha, «Otra IA» queda en su ícono (el nombre va en el título y en la etiqueta de la tarjeta). */
  .el-rev-grid .el-ext { padding: 3px 6px; }
  .el-rev-grid .el-ext span { display: none; }
  .el-rev-actions [data-copy-prompt] { flex-basis: 100%; gap: 4px; }
  /* La marca de la foto, en 2 líneas como mucho: no tapa la cara (la lista entera va en el título y en «Avisos»). */
  .el-rev-grid .el-flag { padding: 3px 6px; border-radius: 10px; }
  .el-rev-grid .el-flag span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; min-width: 0; }
  .el-base { min-height: 0; }
  .el-base-grid { grid-template-columns: 1fr 1fr; }
}
/* (Revisión) En Catálogo, Crear y Generador del teléfono la cabecera queda compacta: una línea con el título y el selector
   Personajes/Lugares, sin el párrafo, para que los retratos se vean en la primera pantalla. Completa solo en «Mis…». */
@media (max-width: 600px) {
  .elenco:not([data-view="mios"]) .el-hero { padding: 10px 12px; border-radius: 16px; }
  .elenco:not([data-view="mios"]) .el-hero-copy { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; }
  .elenco:not([data-view="mios"]) .el-kicker, .elenco:not([data-view="mios"]) .el-hero-text { display: none; }
  .elenco:not([data-view="mios"]) .el-hero h2 { margin: 0; font-size: 1rem; letter-spacing: -.01em; white-space: nowrap; }
  .elenco:not([data-view="mios"]) .el-hero .el-kind { display: inline-flex; flex: 0 1 auto; padding: 3px; margin-left: auto; }
  .elenco:not([data-view="mios"]) .el-hero .el-kind button { flex: 0 0 auto; min-height: 34px; padding: 0 11px; font-size: .8rem; }
  .elenco:not([data-view="mios"]) .el-hero .el-kind .ic { display: none; }
  .elenco:not([data-view="mios"]) .el-views { margin-top: 10px; }
}
/* El creador sube a su principio al cambiar de paso (la cabecera fija de la página no lo tapa). */
.el-creator { scroll-margin-top: 8px; }
.el-step-title:focus { outline: none; }
.el-step-title:focus-visible { outline: 2px solid var(--el-cream); outline-offset: 4px; border-radius: 6px; }
.el-sec.pend span { color: var(--text-2); }
@media (max-width: 380px) {
  .el-grid { gap: 10px; }
  .el-badge { max-width: 64%; }
  .el-base-grid { grid-template-columns: 1fr; }
}
