/* =========================================================
   SOBRES Y SELLOS — pantalla de apertura de todas las plantillas
   Cada sobre se abre al recibir la clase "abierto" (la pone invitacion.js).
   Colores: --sobre, --sello, --acento, --principal, --fondo (y sus tonos claros/oscuros).
   ========================================================= */

/* ---------- Fondos de la escena ---------- */
.escena-destellos {
  background:
    radial-gradient(circle at 18% 22%, color-mix(in srgb, var(--acento) 40%, transparent) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 78% 14%, color-mix(in srgb, var(--acento) 35%, transparent) 0 1px, transparent 2px),
    radial-gradient(circle at 86% 70%, color-mix(in srgb, var(--acento) 40%, transparent) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 12% 82%, color-mix(in srgb, var(--acento) 30%, transparent) 0 1px, transparent 2px),
    radial-gradient(circle at 60% 92%, color-mix(in srgb, var(--acento) 30%, transparent) 0 1px, transparent 2px),
    radial-gradient(130% 90% at 50% 40%, var(--fondo) 0%, var(--fondo-2) 100%);
}
.escena-confeti {
  background:
    radial-gradient(circle at 12% 18%, #F2C14E 0 3px, transparent 3.5px),
    radial-gradient(circle at 84% 12%, #E86A92 0 2.5px, transparent 3px),
    radial-gradient(circle at 90% 62%, #4FB3BF 0 3px, transparent 3.5px),
    radial-gradient(circle at 8% 70%, #8BC34A 0 2.5px, transparent 3px),
    radial-gradient(circle at 70% 88%, #F2C14E 0 2px, transparent 2.5px),
    radial-gradient(circle at 26% 90%, #E86A92 0 2.5px, transparent 3px),
    radial-gradient(130% 90% at 50% 40%, var(--fondo) 0%, var(--fondo-2) 100%);
}
.escena-cielo { background: linear-gradient(180deg, var(--fondo) 0%, color-mix(in srgb, var(--sobre) 35%, var(--fondo)) 100%); overflow: hidden; }
.escena-noche {
  background:
    radial-gradient(circle at 15% 20%, color-mix(in srgb, var(--acento-clr) 80%, transparent) 0 1px, transparent 1.6px),
    radial-gradient(circle at 70% 10%, color-mix(in srgb, var(--acento-clr) 70%, transparent) 0 1.2px, transparent 1.8px),
    radial-gradient(circle at 88% 40%, color-mix(in srgb, var(--acento-clr) 60%, transparent) 0 1px, transparent 1.6px),
    radial-gradient(circle at 30% 75%, color-mix(in srgb, var(--acento-clr) 60%, transparent) 0 1px, transparent 1.6px),
    radial-gradient(circle at 80% 85%, color-mix(in srgb, var(--acento-clr) 70%, transparent) 0 1.2px, transparent 1.8px),
    radial-gradient(120% 90% at 50% 35%, var(--principal-clr) 0%, var(--principal-osc) 100%);
}
.escena-noche .escena-titulo, .escena-noche .escena-ayuda { color: color-mix(in srgb, var(--banda-texto) 80%, transparent); }
.escena-lino {
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .018) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .018) 0 1px, transparent 1px 3px),
    radial-gradient(130% 90% at 50% 40%, var(--fondo) 0%, var(--fondo-2) 100%);
}
.nube-fondo { position: absolute; color: #fff; opacity: .85; pointer-events: none; animation: deriva 14s ease-in-out infinite; }
.nube-fondo svg, .fe-nube svg { display: block; width: 100%; height: auto; }
.nube-fondo.n1 { width: 46vw; max-width: 240px; left: -8%; top: 9%; }
.nube-fondo.n2 { width: 38vw; max-width: 200px; right: -6%; top: 22%; opacity: .7; animation-duration: 18s; animation-direction: reverse; }
@keyframes deriva { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(14px); } }
.escena.abriendo .nube-fondo { transition: transform 1.6s var(--suave), opacity 1.2s ease; opacity: 0; }
.escena.abriendo .nube-fondo.n1 { transform: translateX(-60px); }
.escena.abriendo .nube-fondo.n2 { transform: translateX(60px); }

/* ---------- Texturas de superficie (opción "patron") ---------- */
.patron-puntos { --patron: radial-gradient(circle, rgba(255, 255, 255, .2) 0 1.3px, transparent 1.8px) 0 0 / 14px 14px; }
.patron-rayas { --patron: repeating-linear-gradient(45deg, rgba(255, 255, 255, .07) 0 6px, transparent 6px 12px); }
.patron-lino { --patron: repeating-linear-gradient(0deg, rgba(255, 255, 255, .06) 0 1px, transparent 1px 3px), repeating-linear-gradient(90deg, rgba(0, 0, 0, .05) 0 1px, transparent 1px 3px); }
.patron-damasco { --patron: radial-gradient(circle, rgba(255, 255, 255, .13) 0 3px, transparent 3.5px) 0 0 / 22px 22px, radial-gradient(circle, rgba(255, 255, 255, .09) 0 1.5px, transparent 2px) 11px 11px / 22px 22px; }
.patron-estrellas { --patron: radial-gradient(circle, color-mix(in srgb, var(--acento-clr) 70%, transparent) 0 1.2px, transparent 1.7px) 0 0 / 18px 18px, radial-gradient(circle, color-mix(in srgb, var(--acento-clr) 45%, transparent) 0 .8px, transparent 1.2px) 9px 9px / 18px 18px; }
.patron-terciopelo { --patron: radial-gradient(120% 80% at 30% 20%, rgba(255, 255, 255, .14), transparent 60%); }

/* =========================================================
   SELLOS
   ========================================================= */
.sello { position: relative; display: grid; place-items: center; width: var(--sello-tam, 4.4rem); aspect-ratio: 1; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .28)); }
.sello-fondo {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 34% 30%, var(--sello-clr) 0%, var(--sello) 45%, var(--sello-osc) 100%);
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
}
.sello-cera .sello-fondo { border-radius: 47% 53% 50% 50% / 52% 48% 52% 48%; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .25), inset 0 -3px 6px rgba(0, 0, 0, .25); }
.sello-medallon .sello-fondo { border-radius: 50%; box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--sello-clr) 70%, transparent), inset 0 -3px 6px rgba(0, 0, 0, .2); }
.sello-letras {
  position: relative; display: grid; place-items: center;
  font-family: var(--script); font-style: var(--n-estilo, normal); font-weight: var(--n-peso, 400);
  font-size: calc(var(--sello-tam, 4.4rem) * .27 * var(--esc, 1)); line-height: 1;
  color: var(--sello-texto); white-space: nowrap;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .35);
}
.sello-cera .sello-letras, .sello-medallon .sello-letras {
  width: 74%; height: 74%; border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--sello-texto) 40%, transparent);
}
.sello-corazon .sello-letras { margin-top: -10%; font-size: calc(var(--sello-tam, 4.4rem) * .22 * var(--esc, 1)); }
.sello-estrella .sello-letras { margin-top: 10%; font-size: calc(var(--sello-tam, 4.4rem) * .2 * var(--esc, 1)); }
.sello-dibujo { position: relative; width: 54%; height: 54%; color: var(--sello-texto); --hueco: var(--sello); }
.sello-corazon .sello-dibujo { margin-top: -8%; width: 44%; height: 44%; }
.sello-estrella .sello-dibujo { margin-top: 10%; width: 40%; height: 40%; }
.sello-lazo { width: calc(var(--sello-tam, 4.4rem) * 1.5); }
.sello-lazo svg, .sello-emblema svg { width: 100%; height: 100%; color: var(--sello); --hueco: var(--sobre); }
.sello-emblema { width: calc(var(--sello-tam, 4.4rem) * 1.15); }
.sello::after { /* brillo que pasa */
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .4) 50%, transparent 60%) -150% 0 / 250% 100% no-repeat;
  animation: brillo-sello 4.5s ease-in-out infinite 1.5s;
  pointer-events: none;
}
.sello-lazo::after, .sello-emblema::after { display: none; }
@keyframes brillo-sello { 0%, 30% { background-position: -150% 0; } 60%, 100% { background-position: 150% 0; } }

/* Sello con la fecha del evento */
.sello-fecha {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 74%; height: 74%; border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--sello-texto) 40%, transparent);
  color: var(--sello-texto); line-height: 1;
  font-family: var(--serif);
}
.sb-sello .sello-con-fecha { --sello-tam: 5.2rem; }
.sb-estuche .sello-con-fecha, .sb-globos .sello-con-fecha { --sello-tam: 4.2rem; }
.sello-corazon .sello-fecha, .sello-estrella .sello-fecha, .sello-flor .sello-fecha { border: 0; }
.sello-corazon .sello-fecha { margin-top: -10%; }
.sello-estrella .sello-fecha { margin-top: 12%; transform: scale(.82); }
.sf-dia { font-weight: 700; font-size: calc(var(--sello-tam, 4.4rem) * .34); letter-spacing: -.02em; }
.sb .sello-fecha small, .sello-fecha small { color: inherit; font-style: normal; margin: 0; font-family: var(--serif); }
.sello-fecha .sf-mes, .sello-fecha .sf-sem, .sello-fecha .sf-inic { font-size: calc(var(--sello-tam, 4.4rem) * .115); letter-spacing: .1em; font-weight: 700; }
.sello-fecha .sf-sem { margin-bottom: .12em; opacity: .85; }
.sello-fecha .sf-mes { margin-top: .18em; }
.sello-fecha .sf-inic { font-family: var(--script); font-style: var(--n-estilo, normal); font-weight: var(--n-peso, 400); letter-spacing: 0; font-size: calc(var(--sello-tam, 4.4rem) * .15 * var(--esc, 1)); margin-bottom: .05em; }
/* Matasellos postal: tinta sobre el papel */
.sello-matasellos { width: calc(var(--sello-tam, 4.4rem) * 1.75); aspect-ratio: 16 / 10; filter: none; color: var(--sobre-texto); opacity: .9; rotate: -9deg; }
.sello-matasellos::after { display: none; }
.matasellos-svg { width: 100%; height: 100%; overflow: visible; transform: translateX(19%); }
.matasellos-svg text { fill: currentColor; font-family: var(--serif); }
.ms-anillo { font-size: 7.4px; font-weight: 600; letter-spacing: .5px; }
.ms-dia { font-size: 21px; font-weight: 600; }
.ms-mes { font-size: 7px; font-weight: 600; letter-spacing: 1.2px; }
.escena-noche .sello-matasellos, .sb-estuche .sello-matasellos, .sb-cortina .sello-matasellos { mix-blend-mode: normal; color: var(--acento-clr); }
.sb.abierto .sello-matasellos { opacity: 0; }
/* En la funda con faja el matasellos va sobre el papel (no sobre la faja) */
.sb-vertical .sb-sello:has(.sello-matasellos) { top: 28%; }
.sb-pergamino .sello-matasellos, .sb-globos .sello-matasellos, .sb-regalo .sello-matasellos { mix-blend-mode: normal; color: var(--principal);
  background: radial-gradient(circle at 31% 50%, #FFF8E6 0 33%, transparent 34%); }

/* ---------- Base de todos los sobres ---------- */
.sb { position: relative; padding: 0; border: 0; background: none; cursor: pointer; font: inherit; color: inherit; }
.sb > span { position: absolute; }
.sb-sello { z-index: 8; left: 50%; top: 58%; translate: -50% -50%; transition: transform .7s cubic-bezier(.5, 0, .2, 1), opacity .5s ease .15s; animation: latido 2.6s ease-in-out infinite; }
@keyframes latido { 0%, 100% { scale: 1; } 50% { scale: 1.05; } }
.sb.abierto .sb-sello { animation: none; transform: translateY(-34px) rotate(-12deg) scale(1.1); opacity: 0; }
.sb .destinatario {
  z-index: 8; left: 8%; right: 8%; bottom: 9%;
  font-family: var(--script); font-style: var(--n-estilo, normal); font-weight: var(--n-peso, 400);
  font-size: calc(clamp(1.25rem, 5.8vw, 1.7rem) * var(--esc, 1)); line-height: 1.12;
  color: var(--sobre-texto); text-wrap: balance;
  transition: opacity .5s ease .1s;
}
.sb.abierto .destinatario { opacity: 0; }
.sb .emblema, .sb svg[class$="-emblema"] { display: block; }
/* Nombres que aparecen dentro de cada sobre al abrirlo */
.sl-nombres, .pu-nombres, .es-nombres, .pg-nombres, .ct-nombres, .lb-nombres, .vt-nombres, .fe-nombres, .rg-nombres, .gl-nombres {
  display: flex; flex-direction: column; align-items: center;
  font-family: var(--script); font-style: var(--n-estilo, normal); font-weight: var(--n-peso, 400);
  font-size: calc(clamp(1.5rem, 7vw, 2rem) * var(--esc, 1)); line-height: 1.05; color: var(--principal);
}
.sb small { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: .5em; color: var(--acento); margin: .15em 0; }

/* =========================================================
   1. SOLAPA — sobre clásico
   ========================================================= */
.sb-solapa { width: min(84vw, 380px); aspect-ratio: 7 / 5; }
.sb-solapa::before { content: ""; position: absolute; left: 8%; right: 8%; bottom: -8%; height: 14%; background: radial-gradient(closest-side, rgba(0, 0, 0, .22), transparent); filter: blur(4px); }
.sl-fondo { inset: 0; background: var(--sobre-osc); border-radius: 6px; }
.sl-carta {
  left: 6%; right: 6%; top: 7%; height: 86%; z-index: 2;
  display: grid; place-items: start center; padding-top: 11%;
  background: var(--fondo); border-radius: 3px;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acento) 40%, transparent), inset 0 0 0 7px var(--fondo), inset 0 0 0 8px color-mix(in srgb, var(--acento) 40%, transparent);
  transition: transform 1.25s cubic-bezier(.3, .9, .25, 1) .7s;
}
.sl-frente {
  inset: 0; z-index: 3; border-radius: 6px;
  background: var(--patron, none), linear-gradient(200deg, color-mix(in srgb, #fff 8%, transparent), transparent 50%), linear-gradient(165deg, var(--sobre-clr) 0%, var(--sobre) 60%, var(--sobre-osc) 130%);
  clip-path: polygon(0 0, 50% 54%, 100% 0, 100% 100%, 0 100%);
}
.sl-solapa {
  left: 0; right: 0; top: 0; height: 58%; z-index: 4;
  background: var(--patron, none), linear-gradient(180deg, var(--sobre-clr), var(--sobre));
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  border-radius: 6px 6px 0 0; transform-origin: 50% 0;
  transition: transform 1s cubic-bezier(.55, 0, .25, 1) .25s, z-index 0s linear .7s;
}
.sl-forro { position: absolute; inset: 0; opacity: 0; background: var(--sobre-interior); transition: opacity 0s linear .68s; }
.forro-puntos .sl-forro { background: radial-gradient(circle, color-mix(in srgb, var(--acento) 55%, transparent) 0 1.5px, transparent 2px) 0 0 / 12px 12px, var(--fondo); }
.forro-rayas .sl-forro { background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--acento) 35%, var(--fondo)) 0 6px, var(--fondo) 6px 12px); }
.forro-floral .sl-forro { background: radial-gradient(circle at 25% 25%, color-mix(in srgb, var(--sello) 45%, transparent) 0 3px, transparent 3.5px) 0 0 / 20px 20px, radial-gradient(circle at 75% 75%, color-mix(in srgb, var(--sobre) 45%, transparent) 0 2px, transparent 2.5px) 0 0 / 20px 20px, var(--fondo); }
.forro-oro .sl-forro { background: linear-gradient(135deg, var(--acento-clr), var(--acento) 50%, var(--acento-osc)); }
/* Formas de la solapa */
.forma-curva .sl-solapa { clip-path: polygon(0 0, 100% 0, 100% 6%, 80% 50%, 66% 80%, 58% 95%, 50% 100%, 42% 95%, 34% 80%, 20% 50%, 0 6%); }
.forma-curva .sl-frente { clip-path: polygon(0 0, 20% 28%, 34% 44%, 42% 51%, 50% 54%, 58% 51%, 66% 44%, 80% 28%, 100% 0, 100% 100%, 0 100%); }
.forma-recta .sl-solapa { height: 44%; clip-path: inset(0 round 6px 6px 0 0); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .12); }
.forma-recta .sl-frente { clip-path: inset(40% 0 0 0 round 0 0 6px 6px); }
.forma-recta .sb-sello { top: 44%; }
.sb-solapa.abierto .sl-solapa { transform: rotateX(180deg); z-index: 1; }
.sb-solapa.abierto .sl-forro { opacity: 1; }
.sb-solapa.abierto .sl-carta { transform: translateY(-58%); }
.sb-solapa .sl-fondo, .sb-solapa .sl-frente, .sb-solapa .sl-solapa, .sb-solapa .sl-carta { animation: flotar 5s ease-in-out infinite; }
@keyframes flotar { 0%, 100% { translate: 0 0; } 50% { translate: 0 -5px; } }
.sb-solapa.abierto > span { animation-play-state: paused; }

/* =========================================================
   2. PUERTAS — portal que se abre
   ========================================================= */
.sb-puertas { width: min(64vw, 270px); aspect-ratio: 3 / 4.25; perspective: 1100px; filter: drop-shadow(0 18px 26px rgba(40, 20, 30, .25)); }
.pu-fondo {
  inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem;
  border-radius: 50% 50% 10px 10px / 32% 32% 10px 10px;
  background: radial-gradient(circle at 50% 42%, var(--fondo) 0%, var(--fondo-2) 100%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acento) 60%, transparent), inset 0 0 0 7px var(--fondo), inset 0 0 0 8px color-mix(in srgb, var(--acento) 40%, transparent);
}
.pu-nombres, .pu-interior { opacity: 0; transform: translateY(10px); transition: opacity .9s ease 1s, transform 1s var(--suave) 1s; }
.pu-interior { font-family: var(--serif); font-style: italic; font-size: 1.3rem; letter-spacing: .25em; color: var(--acento); transition-delay: 1.25s; }
.pu-puerta {
  top: 0; bottom: 0; width: 50%;
  background: var(--patron, none), linear-gradient(160deg, var(--sobre-clr) 0%, var(--sobre) 55%, var(--sobre-osc) 120%);
  transition: transform 1.35s cubic-bezier(.6, .05, .25, 1) .45s;
}
.pu-puerta::before { content: ""; position: absolute; inset: 9px; border: 1px solid color-mix(in srgb, var(--acento) 75%, transparent); border-radius: inherit; }
.pu-puerta::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .26) 50%, transparent 65%) -200% 0 / 200% 100% no-repeat;
  animation: reflejo 5s ease-in-out infinite 1.5s;
}
@keyframes reflejo { 0%, 55% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
.pu-puerta.izq { left: 0; transform-origin: left center; border-radius: 100% 0 0 10px / 32% 0 0 10px; box-shadow: inset -1px 0 0 rgba(0, 0, 0, .18); }
.pu-puerta.der { right: 0; transform-origin: right center; border-radius: 0 100% 10px 0 / 0 32% 10px 0; box-shadow: inset 1px 0 0 rgba(255, 255, 255, .15); }
.pu-puerta.der::after { animation-delay: 1.8s; }
.forma-recta.sb-puertas { aspect-ratio: 3 / 4; }
.forma-recta .pu-fondo { border-radius: 8px; }
.forma-recta .pu-puerta.izq { border-radius: 8px 0 0 8px; }
.forma-recta .pu-puerta.der { border-radius: 0 8px 8px 0; }
.pu-emblema { left: 50%; top: 14%; z-index: 3; width: 34%; aspect-ratio: 1; translate: -50% 0; color: var(--sello); --hueco: var(--sobre); filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .25)); transition: transform .8s var(--suave), opacity .6s ease; }
.pu-emblema svg { width: 100%; height: 100%; }
.sb-puertas .sb-sello { top: 52%; }
.sb-puertas .destinatario { bottom: 10%; }
.sb-puertas.abierto .pu-emblema { transform: translateY(-46px) scale(.9); opacity: 0; }
.sb-puertas.abierto .pu-puerta.izq { transform: rotateY(-112deg); }
.sb-puertas.abierto .pu-puerta.der { transform: rotateY(112deg); }
.sb-puertas.abierto .pu-nombres, .sb-puertas.abierto .pu-interior { opacity: 1; transform: none; }

/* =========================================================
   3. ESTUCHE — la tapa se levanta
   ========================================================= */
.sb-estuche { width: min(62vw, 250px); aspect-ratio: 1 / 1.02; perspective: 900px; filter: drop-shadow(0 16px 22px rgba(0, 0, 0, .28)); }
.es-base {
  left: 0; right: 0; bottom: 0; height: 52%; z-index: 3; border-radius: 6px 6px 14px 14px;
  background: var(--patron, none), linear-gradient(175deg, var(--sobre-clr), var(--sobre) 50%, var(--sobre-osc));
  box-shadow: inset 0 3px 0 color-mix(in srgb, var(--acento) 80%, transparent), inset 0 -6px 12px rgba(0, 0, 0, .25);
}
.es-interior {
  left: 5%; right: 5%; top: 6%; height: 46%; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem;
  border-radius: 10px 10px 0 0;
  background: radial-gradient(80% 90% at 50% 70%, var(--fondo) 0%, var(--fondo-2) 70%, color-mix(in srgb, var(--sobre) 30%, var(--fondo-2)) 100%);
  box-shadow: inset 0 8px 14px rgba(0, 0, 0, .18);
}
.es-cojin { width: 42%; aspect-ratio: 1; display: block; color: var(--acento); --hueco: var(--fondo); filter: drop-shadow(0 0 0 transparent); transition: filter 1s ease 1s, transform 1s var(--suave) 1s; transform: translateY(14px) scale(.8); }
.es-cojin svg { width: 100%; height: 100%; }
.es-nombres { font-size: calc(clamp(1.1rem, 5vw, 1.4rem) * var(--esc, 1)); opacity: 0; transition: opacity .8s ease 1.3s; }
.es-tapa {
  left: 0; right: 0; top: 0; height: 50%; z-index: 4;
  transform-origin: 50% 0; transform-style: preserve-3d;
  transition: transform 1.2s cubic-bezier(.5, -.1, .25, 1) .45s;
}
.es-tapa-frente, .es-tapa-dentro { position: absolute; inset: 0; border-radius: 14px 14px 6px 6px; backface-visibility: hidden; }
.es-tapa-frente {
  background: var(--patron, none), linear-gradient(180deg, var(--sobre-clr), var(--sobre) 70%);
  box-shadow: inset 0 -3px 0 color-mix(in srgb, var(--acento) 80%, transparent), inset 0 6px 12px rgba(255, 255, 255, .12);
}
.es-tapa-dentro { transform: rotateX(180deg); background: radial-gradient(90% 80% at 50% 40%, var(--fondo), var(--fondo-2)); box-shadow: inset 0 0 0 4px var(--sobre-osc); }
.sb-estuche .sb-sello { top: 50%; --sello-tam: 3.4rem; }
.sb-estuche .destinatario { bottom: 13%; color: var(--acento-clr); }
.sb-estuche.abierto .es-tapa { transform: translateY(-4%) rotateX(-112deg); }
.sb-estuche.abierto .es-cojin { transform: none; filter: drop-shadow(0 0 10px color-mix(in srgb, var(--acento-clr) 90%, transparent)); }
.sb-estuche.abierto .es-nombres { opacity: 1; }

/* =========================================================
   4. PERGAMINO — se desenrolla
   ========================================================= */
.sb-pergamino { width: min(70vw, 280px); height: min(98vw, 400px); }
.pg-hoja {
  left: 6%; right: 6%; top: 7%; bottom: 7%; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem; padding: 1rem;
  background:
    radial-gradient(120% 80% at 50% 50%, transparent 60%, rgba(120, 80, 30, .12) 100%),
    linear-gradient(180deg, color-mix(in srgb, var(--fondo) 85%, #E9D9B0), color-mix(in srgb, var(--fondo) 70%, #E2CC98));
  box-shadow: inset 0 0 0 1px rgba(120, 80, 30, .12);
  clip-path: inset(46% 0 46% 0);
  transition: clip-path 1.4s cubic-bezier(.6, 0, .25, 1) .55s;
}
.pg-emblema { width: 26%; aspect-ratio: 1; color: var(--acento); --hueco: var(--fondo); }
.pg-rollo {
  left: 0; right: 0; height: 9%; z-index: 3; border-radius: 999px;
  background: linear-gradient(180deg, color-mix(in srgb, #E9D9B0 70%, var(--fondo)) 0%, #fff8e6 35%, color-mix(in srgb, #C9A86A 80%, var(--fondo)) 80%, #9C7A3E 100%);
  box-shadow: 0 4px 8px rgba(80, 50, 10, .25);
  transition: top 1.4s cubic-bezier(.6, 0, .25, 1) .55s, bottom 1.4s cubic-bezier(.6, 0, .25, 1) .55s;
}
.pg-rollo::before, .pg-rollo::after { content: ""; position: absolute; top: 15%; bottom: 15%; width: 5%; border-radius: 3px; background: linear-gradient(180deg, var(--acento-clr), var(--acento-osc)); }
.pg-rollo::before { left: -2%; } .pg-rollo::after { right: -2%; }
.pg-rollo.arriba { top: calc(50% - 9%); }
.pg-rollo.abajo { bottom: calc(50% - 9%); }
.pg-cinta { left: 50%; top: 32%; bottom: 32%; width: 12%; z-index: 4; translate: -50% 0; background: linear-gradient(90deg, var(--sobre-osc), var(--sobre), var(--sobre-osc)); transition: opacity .4s ease .3s, transform .6s ease .3s; }
.sb-pergamino .sb-sello { top: 50%; }
.sb-pergamino .destinatario { bottom: 6%; color: var(--principal); }
.sb-pergamino.abierto .pg-cinta { opacity: 0; transform: scaleY(1.3); }
.sb-pergamino.abierto .pg-rollo.arriba { top: 0; }
.sb-pergamino.abierto .pg-rollo.abajo { bottom: 0; }
.sb-pergamino.abierto .pg-hoja { clip-path: inset(0 0 0 0); }

/* =========================================================
   5. CORTINA — telón que se corre
   ========================================================= */
.sb-cortina { width: min(80vw, 320px); aspect-ratio: 4 / 5; overflow: hidden; border-radius: 10px 10px 4px 4px; box-shadow: 0 16px 28px rgba(0, 0, 0, .3), inset 0 0 0 6px var(--acento-osc); }
.ct-escenario {
  inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem;
  background: radial-gradient(70% 60% at 50% 55%, var(--fondo) 0%, var(--fondo-2) 70%, color-mix(in srgb, var(--principal) 25%, var(--fondo-2)) 100%);
}
.ct-emblema { width: 26%; aspect-ratio: 1; color: var(--acento); --hueco: var(--fondo); opacity: 0; transition: opacity .8s ease 1.2s; }
.ct-nombres { opacity: 0; transform: scale(.9); transition: opacity .9s ease 1.1s, transform 1s var(--suave) 1.1s; }
.ct-tela {
  top: 0; bottom: 0; width: 52%; z-index: 3;
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .28) 0, rgba(255, 255, 255, .06) 7%, rgba(0, 0, 0, .28) 14%),
    linear-gradient(180deg, var(--sobre-clr), var(--sobre) 50%, var(--sobre-osc));
  transition: transform 1.6s cubic-bezier(.6, 0, .25, 1) .45s;
}
.ct-tela::after { /* flecos dorados */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 12px;
  background: repeating-linear-gradient(90deg, var(--acento) 0 2px, transparent 2px 5px), linear-gradient(var(--acento-clr), var(--acento-clr)) top / 100% 3px no-repeat;
}
.ct-tela.izq { left: 0; transform-origin: left center; border-radius: 0 0 40% 0 / 0 0 8% 0; }
.ct-tela.der { right: 0; transform-origin: right center; border-radius: 0 0 0 40% / 0 0 0 8%; }
.ct-cenefa {
  left: -2%; right: -2%; top: 0; height: 16%; z-index: 5;
  background: var(--patron, none), linear-gradient(180deg, var(--sobre-osc), var(--sobre));
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - 12px) no-repeat, radial-gradient(14px at 50% 0, #000 97%, #0000) bottom / 28px 12px repeat-x;
          mask: linear-gradient(#000 0 0) top / 100% calc(100% - 12px) no-repeat, radial-gradient(14px at 50% 0, #000 97%, #0000) bottom / 28px 12px repeat-x;
  box-shadow: inset 0 -3px 0 var(--acento);
}
.sb-cortina .sb-sello { top: 54%; }
.sb-cortina .destinatario { bottom: 12%; color: var(--acento-clr); }
.sb-cortina.abierto .ct-tela.izq { transform: translateX(-62%) scaleX(.42); }
.sb-cortina.abierto .ct-tela.der { transform: translateX(62%) scaleX(.42); }
.sb-cortina.abierto .ct-nombres, .sb-cortina.abierto .ct-emblema { opacity: 1; transform: none; }

/* =========================================================
   6. LIBRO — tarjeta que se abre
   ========================================================= */
.sb-libro { width: min(58vw, 240px); aspect-ratio: 5 / 7; perspective: 1400px; transition: transform 1.3s cubic-bezier(.5, 0, .25, 1) .4s; }
.lb-pagina {
  inset: 0; display: grid; place-items: center; padding: 1rem;
  background: var(--fondo); border-radius: 2px 8px 8px 2px;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acento) 45%, transparent), inset 0 0 0 7px var(--fondo), inset 0 0 0 8px color-mix(in srgb, var(--acento) 30%, transparent), 0 14px 24px rgba(0, 0, 0, .2);
}
.lb-nombres { opacity: 0; transition: opacity .8s ease 1.2s; }
.lb-tapa { inset: 0; z-index: 4; transform-origin: left center; transform-style: preserve-3d; transition: transform 1.4s cubic-bezier(.5, 0, .25, 1) .45s; }
.lb-frente, .lb-dorso { position: absolute; inset: 0; border-radius: 2px 8px 8px 2px; backface-visibility: hidden; }
.lb-frente {
  display: grid; place-items: start center; padding-top: 11%;
  background: var(--patron, none), linear-gradient(160deg, var(--sobre-clr), var(--sobre) 60%, var(--sobre-osc));
  box-shadow: inset 0 0 0 8px transparent, inset 0 0 0 9px color-mix(in srgb, var(--acento) 70%, transparent), 0 14px 24px rgba(0, 0, 0, .25);
}
.lb-frente::before { /* lomo */ content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: linear-gradient(90deg, rgba(0, 0, 0, .25), transparent); }
.lb-emblema { width: 30%; aspect-ratio: 1; color: var(--sello); --hueco: var(--sobre); filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .2)); }
.lb-dorso { transform: rotateY(180deg); background: linear-gradient(90deg, var(--fondo-2), var(--fondo)); box-shadow: inset 0 0 0 7px var(--fondo), inset 0 0 0 8px color-mix(in srgb, var(--acento) 30%, transparent); }
.sb-libro .sb-sello { top: 48%; --sello-tam: 3.7rem; }
.sb-libro .destinatario { bottom: 8%; }
.sb-libro.abierto { transform: translateX(50%); }
.sb-libro.abierto .lb-tapa { transform: rotateY(-170deg); }
.sb-libro.abierto .lb-nombres { opacity: 1; }

/* =========================================================
   7. VERTICAL — funda con faja
   ========================================================= */
.sb-vertical { width: min(56vw, 230px); aspect-ratio: 5 / 7.4; }
.vt-tarjeta {
  left: 7%; right: 7%; top: -4%; height: 92%; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem;
  background: var(--fondo); border-radius: 4px;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acento) 45%, transparent), inset 0 0 0 6px var(--fondo), inset 0 0 0 7px color-mix(in srgb, var(--acento) 30%, transparent), 0 2px 8px rgba(0, 0, 0, .12);
  transition: transform 1.2s cubic-bezier(.3, .9, .25, 1) .8s;
}
.vt-emblema { width: 30%; aspect-ratio: 1; color: var(--acento); --hueco: var(--fondo); }
.vt-funda {
  left: 0; right: 0; top: 10%; bottom: 0; z-index: 2; border-radius: 6px;
  background: var(--patron, none), linear-gradient(165deg, var(--sobre-clr), var(--sobre) 60%, var(--sobre-osc));
  box-shadow: 0 16px 26px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: transform 1.1s cubic-bezier(.5, 0, .25, 1) .6s, opacity .8s ease 1.1s;
}
.vt-funda::before { /* muesca para sacar la tarjeta */ content: ""; position: absolute; left: 50%; top: -1px; width: 26%; height: 9%; translate: -50% 0; border-radius: 0 0 999px 999px; background: var(--fondo-2); box-shadow: inset 0 -2px 3px rgba(0, 0, 0, .15); }
.vt-faja {
  left: -2%; right: -2%; top: 46%; height: 15%; z-index: 3;
  background: linear-gradient(180deg, var(--sello-clr), var(--sello) 40%, var(--sello-osc));
  box-shadow: 0 3px 6px rgba(0, 0, 0, .2);
  transition: transform .7s cubic-bezier(.5, 0, .3, 1) .3s, opacity .5s ease .5s;
}
.sb-vertical .sb-sello { top: 53.5%; }
.sb-vertical .sello { --sello-tam: 3.9rem; }
.sb-vertical .destinatario { bottom: 13%; }
.sb-vertical.abierto .vt-faja { transform: translateY(260%); opacity: 0; }
.sb-vertical.abierto .vt-funda { transform: translateY(42%); opacity: 0; }
.sb-vertical.abierto .vt-tarjeta { transform: translateY(6%); }

/* =========================================================
   8. FESTONEADO — sobre pastel entre nubes
   ========================================================= */
.sb-festoneado { width: min(80vw, 340px); aspect-ratio: 7 / 5; perspective: 1100px; filter: drop-shadow(0 16px 24px rgba(40, 70, 100, .18)); }
.fe-cuerpo { inset: 0; border-radius: 12px; background: var(--sobre-osc); }
.fe-carta {
  left: 7%; right: 7%; top: 8%; height: 84%; z-index: 2;
  display: grid; place-items: start center; padding-top: 12%; border-radius: 6px; background: var(--fondo);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acento) 45%, transparent), inset 0 0 0 6px var(--fondo), inset 0 0 0 7px color-mix(in srgb, var(--acento) 35%, transparent);
  transition: transform 1.2s cubic-bezier(.3, .9, .25, 1) .75s;
}
.fe-frente {
  left: 0; right: 0; bottom: 0; height: 66%; z-index: 3; border-radius: 0 0 12px 12px;
  background: var(--patron, radial-gradient(circle, color-mix(in srgb, #fff 55%, transparent) 0 1.2px, transparent 1.6px) 0 0 / 16px 16px), linear-gradient(170deg, color-mix(in srgb, var(--sobre) 55%, #fff), color-mix(in srgb, var(--sobre) 80%, #fff) 80%);
}
.fe-solapa, .fe-sombra {
  left: 0; right: 0; top: 0; height: 50%; z-index: 5; border-radius: 12px 12px 0 0;
  background: linear-gradient(180deg, var(--sobre), color-mix(in srgb, var(--sobre) 88%, #000));
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - 10px) no-repeat, radial-gradient(10px at 50% 0, #000 97%, #0000) bottom / 20px 10px repeat-x;
          mask: linear-gradient(#000 0 0) top / 100% calc(100% - 10px) no-repeat, radial-gradient(10px at 50% 0, #000 97%, #0000) bottom / 20px 10px repeat-x;
  transform-origin: 50% 0;
  transition: transform 1s cubic-bezier(.55, 0, .25, 1) .25s, z-index 0s linear .7s;
}
.fe-sombra { z-index: 4; top: 3px; background: rgba(30, 60, 90, .16); transition: opacity .3s ease .25s; }
.sb-festoneado .sb-sello { top: 50%; }
.sb-festoneado .destinatario { bottom: 12%; left: 14%; right: 14%; color: var(--principal); }
.fe-nube { z-index: 9; color: #fff; pointer-events: none; transition: transform 1.4s var(--suave) .2s, opacity 1s ease .4s; }
.fe-nube svg { filter: drop-shadow(0 4px 6px rgba(40, 70, 100, .12)); }
.fe-nube.izq { width: 40%; left: -17%; bottom: -19%; }
.fe-nube.der { width: 34%; right: -14%; bottom: -15%; transform: scaleX(-1); }
.sb-festoneado.abierto .fe-nube.izq { transform: translate(-60%, 30%); opacity: 0; }
.sb-festoneado.abierto .fe-nube.der { transform: translate(60%, 30%) scaleX(-1); opacity: 0; }
.sb-festoneado.abierto .fe-sombra { opacity: 0; }
.sb-festoneado.abierto .fe-solapa { transform: rotateX(180deg); z-index: 1; }
.sb-festoneado.abierto .fe-carta { transform: translateY(-56%); }

/* =========================================================
   9. REGALO — caja con moño
   ========================================================= */
.sb-regalo { width: min(58vw, 236px); aspect-ratio: 1 / 1.08; animation: menear 4s ease-in-out infinite 1.6s; }
@keyframes menear { 0%, 82%, 100% { rotate: 0deg; } 85% { rotate: -3deg; } 88% { rotate: 3deg; } 91% { rotate: -2deg; } 94% { rotate: 1deg; } }
.sb-regalo::after { content: ""; position: absolute; left: 4%; right: 4%; bottom: -7%; height: 10%; background: radial-gradient(closest-side, rgba(0, 0, 0, .2), transparent); }
.rg-caja {
  left: 6%; right: 6%; bottom: 0; height: 64%; z-index: 2; border-radius: 4px 4px 8px 8px;
  background:
    linear-gradient(90deg, transparent 42%, var(--sello) 42%, var(--sello) 58%, transparent 58%),
    var(--patron, radial-gradient(circle, color-mix(in srgb, #fff 22%, transparent) 0 2.5px, transparent 3px) 0 0 / 22px 22px),
    linear-gradient(170deg, var(--sobre-clr), var(--sobre) 60%, var(--sobre-osc));
  box-shadow: inset 0 10px 14px -8px rgba(0, 0, 0, .35);
}
.rg-tapa {
  left: 0; right: 0; top: 24%; height: 17%; z-index: 3; border-radius: 6px;
  background: linear-gradient(90deg, transparent 43%, var(--sello) 43%, var(--sello) 57%, transparent 57%), linear-gradient(180deg, var(--sobre-clr), var(--sobre));
  box-shadow: 0 6px 10px -4px rgba(0, 0, 0, .35);
  transition: transform .95s cubic-bezier(.3, 1.35, .5, 1) .3s, opacity .4s ease .95s;
}
.rg-mono { left: 50%; top: -6%; z-index: 4; width: 64%; aspect-ratio: 1; translate: -50% 0; color: var(--sello); filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .25)); transition: transform .55s var(--suave), opacity .45s ease; }
.rg-mono svg { width: 100%; height: 100%; }
.rg-etiqueta {
  right: -16%; top: 38%; z-index: 5; display: grid; text-align: left; min-width: 46%; max-width: 72%;
  padding: .45rem .8rem .5rem 1.35rem; background: var(--fondo); color: var(--principal);
  clip-path: polygon(16% 0, 100% 0, 100% 100%, 16% 100%, 0 50%);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .18); rotate: 9deg; transform-origin: 0 50%;
  transition: transform .6s var(--suave), opacity .5s ease;
}
.rg-etiqueta::before { content: ""; position: absolute; left: .55rem; top: 50%; width: .4rem; height: .4rem; margin-top: -.2rem; border-radius: 50%; background: color-mix(in srgb, var(--principal) 25%, transparent); }
.rg-etiqueta small { font-family: var(--serif); font-size: .75rem; font-style: normal; color: var(--tinta-suave); margin: 0; }
.sb-regalo .rg-etiqueta .destinatario { position: static; font-size: calc(1.05rem * var(--esc, 1)); color: var(--principal); }
.rg-tarjeta {
  left: 16%; right: 16%; bottom: 14%; height: 56%; z-index: 1; display: grid; place-items: center; padding: .6rem;
  border-radius: 4px; background: var(--fondo);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--acento) 50%, transparent), 0 4px 12px rgba(0, 0, 0, .15);
  transition: transform 1s cubic-bezier(.3, 1.2, .5, 1) .75s;
}
.rg-nombres { font-size: calc(clamp(1.2rem, 5.5vw, 1.6rem) * var(--esc, 1)); }
.sb-regalo.abierto { animation: none; }
.sb-regalo.abierto .rg-mono { transform: scale(1.5) rotate(-14deg); opacity: 0; }
.sb-regalo.abierto .rg-etiqueta { transform: translateY(70px) rotate(35deg); opacity: 0; }
.sb-regalo.abierto .rg-tapa { transform: translate(-38%, -260%) rotate(-32deg); opacity: 0; }
.sb-regalo.abierto .rg-tarjeta { transform: translateY(-78%); }

/* =========================================================
   10. GLOBOS — tarjeta colgada que se suelta
   ========================================================= */
.sb-globos { width: min(66vw, 260px); aspect-ratio: 1 / 1.45; perspective: 1000px; }
.gl-racimo { left: 0; right: 0; top: 0; height: 52%; z-index: 3; transition: transform 1.6s cubic-bezier(.5, 0, .7, .4) .2s, opacity 1s ease .9s; }
.gl-globo { position: absolute; width: 30%; animation: flotar-globo 3.6s ease-in-out infinite; }
.gl-globo svg { display: block; width: 100%; height: auto; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .15)); }
.gl-globo.g1 { left: 3%; top: 16%; color: var(--sobre); animation-delay: -.6s; }
.gl-globo.g2 { left: 22%; top: 0; color: var(--sello); animation-delay: -1.4s; }
.gl-globo.g3 { left: 40%; top: 10%; color: var(--principal); animation-delay: -.2s; width: 32%; }
.gl-globo.g4 { left: 58%; top: -2%; color: var(--acento); animation-delay: -2s; }
.gl-globo.g5 { left: 70%; top: 18%; color: var(--sobre-clr); animation-delay: -1s; }
@keyframes flotar-globo { 0%, 100% { translate: 0 0; rotate: -2deg; } 50% { translate: 0 -7px; rotate: 2deg; } }
.gl-hilos { left: 10%; right: 10%; top: 30%; height: 28%; z-index: 2; color: color-mix(in srgb, var(--principal) 50%, transparent); transition: opacity .5s ease .3s; }
.gl-hilos svg { width: 100%; height: 100%; }
.gl-tarjeta { left: 10%; right: 10%; bottom: 0; height: 46%; z-index: 4; transform-style: preserve-3d; transition: transform 1.2s cubic-bezier(.5, 0, .25, 1) .9s; animation: mecer 3.6s ease-in-out infinite; transform-origin: 50% 0; }
@keyframes mecer { 0%, 100% { rotate: -1.5deg; } 50% { rotate: 1.5deg; } }
.gl-frente, .gl-dorso { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; border-radius: 8px; backface-visibility: hidden; padding: .8rem; }
.gl-frente {
  background: var(--patron, none), linear-gradient(165deg, var(--fondo), var(--fondo-2));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acento) 50%, transparent), inset 0 0 0 6px var(--fondo), inset 0 0 0 7px color-mix(in srgb, var(--acento) 30%, transparent), 0 10px 18px rgba(0, 0, 0, .15);
}
.gl-dorso { transform: rotateY(180deg); background: var(--fondo); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acento) 50%, transparent), 0 10px 18px rgba(0, 0, 0, .15); }
.gl-emblema { width: 28%; aspect-ratio: 1; color: var(--acento); --hueco: var(--fondo); }
.sb-globos .gl-frente .destinatario { position: static; color: var(--principal); }
.sb-globos .sb-sello { top: 54%; --sello-tam: 3rem; }
.sb-globos.abierto .gl-racimo { transform: translateY(-160%); opacity: 0; }
.sb-globos.abierto .gl-hilos { opacity: 0; }
.sb-globos.abierto .gl-tarjeta { animation: none; transform: translateY(-40%) rotateY(180deg) scale(1.08); }
.sb-globos.abierto .destinatario { opacity: 1; }

/* ---------- Efecto por delante del sobre (confeti que sale de la caja) ---------- */
#efecto.delante { z-index: 120; }

/* ---------- Índice: emblema de la plantilla y forma de la tarjeta ---------- */
.indice-emblema { display: block; width: 3.4rem; height: 3.4rem; margin: 0 auto .4rem; color: var(--acento-clr); --hueco: var(--principal); }
.indice-emblema svg { width: 100%; height: 100%; }
.indice-tarjeta.forma-redonda { border-radius: 24px; padding-top: 1.6rem; clip-path: inset(100% -12px -12px -12px round 24px); }
.indice.abierto .indice-tarjeta.forma-redonda { clip-path: inset(-12px -12px -12px -12px round 24px); }
.indice-tarjeta.forma-recta { border-radius: 2px; padding-top: 1.6rem; clip-path: inset(100% -12px -12px -12px); }
.indice.abierto .indice-tarjeta.forma-recta { clip-path: inset(-12px -12px -12px -12px); }

@media (prefers-reduced-motion: reduce) {
  .sb, .sb * { animation: none !important; }
}

/* ---------- Sobre libro y funda con foto en la tapa ---------- */
.lb-frente.con-foto { padding: 0; overflow: hidden; display: block; }
.lb-foto, .vt-foto { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lb-frente.con-foto::after {   /* filete dorado y sombra para leer el nombre */
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(180deg, rgba(0, 0, 0, .35) 0%, transparent 32%, transparent 55%, rgba(0, 0, 0, .62) 100%);
  box-shadow: inset 0 0 0 8px transparent, inset 0 0 0 9px color-mix(in srgb, var(--acento-clr) 80%, transparent);
}
.lb-frente.con-foto::before { z-index: 2; }
.lb-nombres-tapa {
  position: absolute; left: 8%; right: 8%; top: 7%; z-index: 2; display: flex; flex-direction: column; align-items: center;
  font-family: var(--script); font-style: var(--n-estilo, normal); font-weight: var(--n-peso, 400);
  font-size: calc(clamp(1.3rem, 5.6vw, 1.7rem) * var(--esc, 1)); line-height: 1.05; color: #fff; text-shadow: 0 2px 8px rgba(0, 0, 0, .45);
}
.lb-nombres-tapa small { color: var(--acento-clr) !important; }
.foto-si .destinatario { color: #fff; text-shadow: 0 2px 8px rgba(0, 0, 0, .5); z-index: 9; }
.foto-si.sb-libro .sb-sello { top: 56%; }
.vt-funda.con-foto { overflow: hidden; }
.vt-funda.con-foto::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, .55)); }
.sb-vertical:has(.vt-funda.con-foto) .destinatario { color: #fff; text-shadow: 0 2px 8px rgba(0, 0, 0, .5); }
