/* =====================================================================
   Temas de la invitación (Jardín, Editorial, Gala, Moderno, Mexicana y
   las paletas de Clásico). Clásico + Marfil conserva el diseño original.
   Todos los colores salen de cuatro valores por paleta (fondo, tinta,
   acento, detalle) que temas.js convierte en tokens con contraste seguro.
   ===================================================================== */
.portada-retrato,.tema-abrir-texto{display:none}
body[data-tema]:not([data-paleta="marfil"]){
  --marfil:var(--tema-fondo);
  --marfil-2:color-mix(in oklab,var(--tema-fondo) 92%,var(--tema-mezcla));
  --papel:color-mix(in oklab,var(--tema-fondo) 60%,#fff);
  --oro:var(--tema-acento);
  --oro-oscuro:var(--tema-acento-texto);
  --oro-claro:color-mix(in oklab,var(--tema-acento) 55%,var(--tema-fondo));
  --tinta:var(--tema-tinta);
  --tinta-2:color-mix(in oklab,var(--tema-tinta) 76%,var(--tema-fondo));
  --linea:color-mix(in oklab,var(--tema-acento) 38%,transparent);
  --marco:linear-gradient(135deg,var(--tema-acento),var(--oro-claro),var(--tema-acento));
  --sombra-tema:color-mix(in oklab,color-mix(in oklab,var(--tema-tinta) 40%,#000) 40%,transparent);
  background:var(--marfil);color:var(--tinta);
}
body[data-modo="oscuro"]:not([data-paleta="marfil"]){
  --marfil-2:color-mix(in oklab,var(--tema-fondo) 90%,#fff);
  --papel:color-mix(in oklab,var(--tema-fondo) 86%,#fff);
  --oro-claro:color-mix(in oklab,var(--tema-acento) 70%,#fff);
  --sombra-tema:rgba(0,0,0,.5);
}
body[data-tema]:not([data-paleta="marfil"]) .portada{
  background:radial-gradient(ellipse at 70% 18%,var(--papel),transparent 62%),var(--marfil);
}
body[data-tema]:not([data-paleta="marfil"]) .nombres .n{background:none;color:var(--tinta)}

body:is([data-tema="jardin"],[data-tema="gala"]) .portada-texto{max-width:42rem;margin:auto;text-align:center;padding:0}
body:is([data-tema="jardin"],[data-tema="gala"]) .portada :is(.firma,.datos){margin-inline:auto}
body:is([data-tema="jardin"],[data-tema="gala"]) .nombres :is(.y,.n2){justify-content:center;padding:0;margin-inline:0}
body:is([data-tema="jardin"],[data-tema="gala"]) .nombres .y::after{display:none}
body:is([data-tema="jardin"],[data-tema="gala"]) .pie-portada{justify-content:center}
body[data-tema="jardin"] .portada .rama{opacity:.38}
body[data-tema="jardin"] .portada::before,
body[data-tema="gala"] .portada::before{
  content:"";position:absolute;inset:clamp(12px,4vw,44px);border:1px solid var(--linea);pointer-events:none;
}
body[data-tema="gala"]{--papel:color-mix(in srgb,var(--tema-fondo) 94%,white)}
body[data-tema="gala"] .portada::before{border:4px double var(--tema-acento)}
body:is([data-tema="editorial"],[data-tema="gala"],[data-tema="moderno"]) .portada .rama{display:none}
body[data-tema="editorial"] .portada>.contenedor{display:grid;grid-template-columns:1fr .85fr;gap:clamp(24px,6vw,84px);align-items:center}
body[data-tema="editorial"] .portada-texto{max-width:none;padding:0}
body[data-tema="editorial"] .nombres{font-style:italic}
body[data-tema="editorial"] .portada-retrato[src]{
  display:block;width:100%;aspect-ratio:4/5;object-fit:cover;border:8px solid var(--papel);
  outline:1px solid var(--linea);box-shadow:0 20px 42px #241c201b;
}
body[data-tema="editorial"] .portada>.contenedor:not(:has(.portada-retrato[src])){grid-template-columns:1fr}
body[data-tema="moderno"]{--display:var(--texto);--script:var(--texto)}
body[data-tema="moderno"] .portada{align-items:flex-end}
body[data-tema="moderno"] .portada-texto{max-width:48rem;padding:0}
body[data-tema="moderno"] .nombres .n2{padding:0}
body[data-tema="moderno"] .nombres .y::after{display:none}
body[data-tema="moderno"] .portada:has(.portada-retrato[src]) .portada-texto{
  padding:clamp(18px,4vw,42px);background:var(--papel);
}
body[data-tema="moderno"] .portada-retrato[src]{
  display:block;position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:1;
}
@media(max-width:640px){
  body[data-tema]:not([data-tema="clasico"]) .portada{min-height:85svh}
  body[data-tema]:not([data-tema="clasico"]) .portada>.contenedor{padding-top:84px;padding-bottom:44px}
  body:is([data-tema="jardin"],[data-tema="gala"]) .portada{align-items:center}
  body[data-tema="editorial"] .portada>.contenedor{grid-template-columns:1fr}
  body[data-tema="editorial"] .portada-retrato[src]{max-height:50svh}
  body[data-tema="moderno"] .portada:has(.portada-retrato[src])>.contenedor{padding-top:45svh}
}
body[data-tema="moderno"] .portada:has(.portada-retrato[src])>.contenedor{position:static}
body[data-tema="moderno"] .portada-texto{position:relative;z-index:2}
body[data-tema="gala"] :is(.buscar input,.campo textarea){color:var(--tinta);border-color:var(--linea)}

/* El lenguaje visual de cada invitación continúa después de la portada. */
/* Textos de acento: usan el tono legible calculado para cada paleta. */
body[data-tema]:not([data-paleta="marfil"]) :is(.unidad .nombre,.orden time){color:var(--oro-oscuro)}
body[data-tema]:not([data-tema="clasico"]) .seccion{scroll-margin-top:64px}
body[data-tema="jardin"] .portada .rama{opacity:.82;right:0;height:min(88svh,850px)}
body[data-tema="jardin"] .portada::before{border-radius:48% 48% 6px 6px / 18% 18% 6px 6px}
body[data-tema="jardin"] .seccion.alterna{background:var(--marfil-2)}
body[data-tema="jardin"] .nosotros{width:min(480px,86vw);aspect-ratio:4/3;border-radius:50% 50% 12px 12px / 28% 28% 12px 12px}
body[data-tema="jardin"] .nosotros::after{border-radius:inherit}
body[data-tema="jardin"] :is(.tarjeta,.lugar-cuerpo){border-radius:24px;box-shadow:none;border:1px solid var(--linea)}
body[data-tema="jardin"] .unidad .pista{fill:var(--papel)}
body[data-tema="jardin"] .unidad .arco{stroke:var(--tema-acento)}
body[data-tema="jardin"] .compartir{background:var(--marfil-2)}

body:is([data-tema="editorial"],[data-tema="gala"],[data-tema="moderno"]) .seccion .adorno,
body:is([data-tema="editorial"],[data-tema="gala"],[data-tema="moderno"]) .rama-dia>svg,
body:is([data-tema="editorial"],[data-tema="gala"],[data-tema="moderno"]) .ramilletes,
body:is([data-tema="editorial"],[data-tema="gala"],[data-tema="moderno"]) .orden li::after,
body:is([data-tema="editorial"],[data-tema="gala"],[data-tema="moderno"]) .unidad svg,
body:is([data-tema="editorial"],[data-tema="gala"],[data-tema="moderno"]) .vestir-marco{display:none}
body:is([data-tema="editorial"],[data-tema="gala"],[data-tema="moderno"]) .orden li{
  width:auto;margin:0;padding:18px 0;text-align:left;transform:none;
}
body:is([data-tema="editorial"],[data-tema="gala"],[data-tema="moderno"]) .orden li time{
  transform:none;clip-path:none;font:600 .85rem/1.4 var(--texto);letter-spacing:.08em;
}
body:is([data-tema="editorial"],[data-tema="gala"],[data-tema="moderno"]) .orden li .detalle{margin-left:0}
body:is([data-tema="editorial"],[data-tema="gala"],[data-tema="moderno"]) .unidad{aspect-ratio:auto;min-height:76px;padding-block:12px}
body:is([data-tema="editorial"],[data-tema="gala"],[data-tema="moderno"]) .nosotros{border-radius:0}
body:is([data-tema="editorial"],[data-tema="gala"],[data-tema="moderno"]) .nosotros::after{border-radius:0}

body[data-tema="editorial"] .encabezado{text-align:left;border-top:1px solid var(--linea);padding-top:14px}
body[data-tema="editorial"] .seccion .h2{font-style:italic}
body[data-tema="editorial"] #invitacion>.contenedor{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.25fr);gap:clamp(16px,4vw,64px);align-items:center}
body[data-tema="editorial"] #invitacion :is(.encabezado,.padres){grid-column:1/-1}
body[data-tema="editorial"] #invitacion .nosotros{width:100%;aspect-ratio:4/5;margin:0}
body[data-tema="editorial"] .carta{text-align:left;margin:0}
body[data-tema="editorial"] .reloj{max-width:none;gap:0;border-block:1px solid var(--linea)}
body[data-tema="editorial"] .unidad+.unidad{border-left:1px solid var(--linea)}
body[data-tema="editorial"] .orden li{display:grid;grid-template-columns:minmax(70px,.3fr) 1fr;gap:8px 20px;border-bottom:1px solid var(--linea)}
body[data-tema="editorial"] .orden .detalle{grid-column:2}
body[data-tema="editorial"] .galeria-escena{border-radius:0}
body[data-tema="editorial"] .tarjeta{max-width:unset;border-block:3px double var(--tema-acento);box-shadow:none}
body[data-tema="editorial"] :is(.boton,.buscar input){border-radius:0}

body[data-tema="gala"] .seccion{border-top:1px solid var(--linea)}
body[data-tema="gala"] .seccion .h2{letter-spacing:.035em}
body[data-tema="gala"] .seccion .encabezado::after{content:"";display:block;width:64px;border-top:4px double var(--tema-acento);margin:14px auto}
body[data-tema="gala"] .reloj{gap:8px}
body[data-tema="gala"] .unidad{border:3px double var(--linea);background:var(--papel)}
body[data-tema="gala"] .orden{max-width:640px;margin:auto}
body[data-tema="gala"] .orden li{text-align:center;border-block-end:1px solid var(--linea)}
body[data-tema="gala"] .orden li .detalle{margin-inline:auto}
body[data-tema="gala"] :is(.tarjeta,.tarjeta-vestir,.lugar-cuerpo){border:4px double var(--tema-acento);box-shadow:none}
body[data-tema="gala"] .tarjeta::before,body[data-tema="gala"] .tarjeta::after{display:none}
body[data-tema="gala"] .cifras{color:var(--tinta)}

body[data-tema="moderno"] .seccion{padding-block:clamp(45px,8vw,96px)}
body[data-tema="moderno"] .encabezado{text-align:left}
body[data-tema="moderno"] .seccion .h2{font-weight:650;letter-spacing:-.045em}
body[data-tema="moderno"] .seccion .h2 i{font-style:normal}
body[data-tema="moderno"] .nosotros{width:min(780px,100%);aspect-ratio:16/9;border-radius:18px;box-shadow:none}
body[data-tema="moderno"] .nosotros::after{display:none}
body[data-tema="moderno"] .reloj{max-width:none;gap:8px}
body[data-tema="moderno"] .unidad{border-radius:14px;background:var(--marfil-2)}
body[data-tema="moderno"] .orden{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr));gap:12px}
body[data-tema="moderno"] .orden li{border:1px solid var(--linea);border-radius:14px;padding:22px;background:var(--papel)}
body[data-tema="moderno"] :is(.lugar-cuerpo,.tarjeta,.tarjeta-vestir){max-width:none;border-radius:20px;box-shadow:none;border:1px solid var(--linea)}
body[data-tema="moderno"] .tarjeta::before,body[data-tema="moderno"] .tarjeta::after{display:none}
body[data-tema="moderno"] .compartir{text-align:left;background:var(--marfil-2)}
body[data-tema="moderno"] .compartir .intro{margin-inline:0;text-align:left}
@media(max-width:640px){
  body[data-tema="editorial"] #invitacion>.contenedor{grid-template-columns:1fr}
  body[data-tema="editorial"] #invitacion .nosotros{max-height:55svh}
  body[data-tema="jardin"] .portada .rama{right:-10vw;opacity:.45}
}

/* Paletas con una superficie distinta a la mezcla general. */
body[data-paleta="hielo"],body[data-paleta="mandarina"]{
  --papel:color-mix(in oklab,var(--tema-fondo) 90%,var(--tema-detalle));
}
body[data-paleta="mandarina"] :is(.buscar input,.campo textarea){color:var(--tinta)}
body[data-paleta="prado"]{--papel:var(--tema-detalle)}

/* ---------------------------- Mexicana ---------------------------- */
body[data-tema="mexicana"]{
  --papel:#fffdf6;
  --marfil-2:color-mix(in oklab,var(--tema-fondo) 80%,#f0c58b);
  --franja:url(/assets/talavera-franja.svg);
}
body[data-tema="mexicana"] .portada{
  background:
    var(--franja) 0 0/auto 26px repeat-x,
    var(--franja) 0 100%/auto 26px repeat-x,
    radial-gradient(ellipse at 70% 18%,var(--papel),transparent 62%),var(--marfil);
  align-items:center;
}
body[data-tema="mexicana"] .portada-texto{max-width:42rem;margin:auto;padding:0;text-align:center}
body[data-tema="mexicana"] .portada :is(.firma,.datos){margin-inline:auto}
body[data-tema="mexicana"] .nombres :is(.y,.n2){justify-content:center;padding:0;margin-inline:0}
body[data-tema="mexicana"] .nombres .y::after{display:none}
body[data-tema="mexicana"] .pie-portada{justify-content:center}
body[data-tema="mexicana"] .portada .rama{visibility:hidden}
body[data-tema="mexicana"] .portada::before{
  content:"";position:absolute;z-index:1;pointer-events:none;width:min(34vw,300px);aspect-ratio:260/230;
  bottom:26px;left:0;background:url(/assets/bugambilia.svg) left bottom/contain no-repeat;
  transform-origin:bottom left;animation:bugambilia 4s ease-in-out infinite alternate;
}
@keyframes bugambilia{from{transform:rotate(-3deg)}to{transform:rotate(4deg)}}
body[data-tema="mexicana"] #itinerario .encabezado::after{
  content:"";display:block;height:20px;margin:14px auto 0;max-width:420px;
  background:radial-gradient(circle at 50% 0,transparent 5px,var(--tema-acento) 6px) 0 0/30px 100%;
  border-bottom:4px dotted var(--tema-detalle);
}
body[data-tema="mexicana"] :is(.tarjeta,.lugar-cuerpo){border-top:8px solid var(--tema-tinta)}
body[data-tema="mexicana"] .boton:not(.fino){background:var(--tema-tinta);color:#fffdf6}
body[data-tema="mexicana"] .pie{border-top:5px solid var(--tema-detalle)}
@media(prefers-reduced-motion:reduce){body[data-tema="mexicana"] .portada::before{animation:none}}

/* Superficies que en el diseño original usan marfil fijo. */
body[data-tema]:not([data-paleta="marfil"]) :is(#itinerario,.cuenta,.confirmar,.seccion.alterna){
  background:var(--marfil-2);color:var(--tinta);
}
body[data-tema]:not([data-paleta="marfil"]) .nav{
  background:color-mix(in oklab,var(--marfil) 92%,transparent);color:var(--tinta);
}
body[data-tema]:not([data-paleta="marfil"]) .nav a{color:var(--tinta)}
body:is([data-tema="jardin"],[data-tema="moderno"]) #invitacion .nosotros{aspect-ratio:3/4}
body[data-tema] .nosotros img{object-position:50% 26%}
body[data-tema="moderno"] .portada:has(.portada-retrato[src]){align-items:center}
body[data-tema="moderno"] .portada:has(.portada-retrato[src])>.contenedor{
  position:relative;display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:clamp(18px,4vw,54px);
  padding-block:clamp(54px,8vh,96px)
}
body[data-tema="moderno"] .portada .portada-retrato[src]{
  position:static;grid-column:2;grid-row:1;height:auto;max-height:75svh;object-fit:contain
}
body[data-tema="moderno"] .portada:has(.portada-retrato[src]) .portada-texto{
  grid-column:1;grid-row:1;background:transparent;padding:0
}
@media(max-width:640px){
  body[data-tema="moderno"] .portada:has(.portada-retrato[src])>.contenedor{grid-template-columns:1fr;padding-block:50px}
  body[data-tema="moderno"] .portada .portada-retrato[src]{grid-column:1;grid-row:1;max-height:46svh}
  body[data-tema="moderno"] .portada:has(.portada-retrato[src]) .portada-texto{grid-row:2;text-align:center}
}
.portada-texto{min-width:0}
.nombres .n{overflow-wrap:anywhere}

/* Papel de la paleta repetido en las esquinas de algunas secciones. */
body[data-paleta]:not([data-paleta="marfil"]) :is(#invitacion,#itinerario,#confirmar){position:relative;isolation:isolate}
body[data-paleta]:not([data-paleta="marfil"]) :is(#invitacion,#itinerario,#confirmar)::before,
body[data-paleta]:not([data-paleta="marfil"]) :is(#invitacion,#itinerario,#confirmar)::after{
  content:"";position:absolute;z-index:-1;pointer-events:none;width:min(22vw,310px);aspect-ratio:1;
  background:var(--papeleria) top left/230%;opacity:.62;
  mask-image:radial-gradient(ellipse at top left,#000 16%,transparent 69%);
}
body[data-modo="oscuro"][data-paleta] :is(#invitacion,#itinerario,#confirmar)::before,
body[data-modo="oscuro"][data-paleta] :is(#invitacion,#itinerario,#confirmar)::after{opacity:.4}
body[data-paleta]:not([data-paleta="marfil"]) :is(#invitacion,#itinerario,#confirmar)::before{inset:0 auto auto 0}
body[data-paleta]:not([data-paleta="marfil"]) :is(#invitacion,#itinerario,#confirmar)::after{
  inset:auto 0 0 auto;background-position:bottom right;
  mask-image:radial-gradient(ellipse at bottom right,#000 16%,transparent 69%);
}
@media(max-width:640px){
  body[data-paleta]:not([data-paleta="marfil"]) :is(#invitacion,#itinerario,#confirmar)::before,
  body[data-paleta]:not([data-paleta="marfil"]) :is(#invitacion,#itinerario,#confirmar)::after{width:34vw;opacity:.42}
}
body[data-tema] .seccion .encabezado{border-color:var(--tema-acento)}
body[data-tema]:not([data-paleta="marfil"]) #confirmar .tarjeta{
  border:1px solid var(--linea);border-top:8px solid transparent;border-image:none;
  background:linear-gradient(var(--papel),var(--papel)) padding-box,var(--papeleria) center top/cover border-box;
}
body[data-tema]:not([data-paleta="marfil"]) #invitacion .nosotros{outline:1px solid var(--linea);outline-offset:5px}

/* Cifras y detalles que el diseño original fija en café. */
body[data-tema]:not([data-paleta="marfil"]) :is(.cifras,.pase-cifra,.pase-chip b){color:var(--oro-oscuro)}
body[data-modo="oscuro"]:not([data-paleta="marfil"]) :is(.cifras,.pase-cifra,.pase-chip b){color:var(--tinta)}

/* =====================================================================
   REFINADO — cada diseño con su propia composición, fondo y tipografía.
   Se quitan los adornos de relleno (parches de papel en las esquinas,
   pluma de apertura, flores animadas, papel picado) y se añade textura
   fina y luz suave. Clásico + Marfil conserva el diseño original.
   ===================================================================== */
body[data-tema]:not([data-paleta="marfil"]){
  --grano:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --luz:color-mix(in oklab,var(--tema-acento) 16%,transparent);
  --velo:color-mix(in oklab,var(--tema-acento) 9%,var(--tema-fondo));
  --fino:color-mix(in oklab,var(--tema-tinta) 14%,transparent);
}
body[data-tema]:not([data-paleta="marfil"])::after{
  content:"";position:fixed;inset:0;z-index:30;pointer-events:none;
  background:var(--grano);opacity:.045;mix-blend-mode:multiply;
}
body[data-modo="oscuro"]:not([data-paleta="marfil"])::after{filter:invert(1);opacity:.05;mix-blend-mode:screen}

/* --- limpieza: lo que sobraba --- */
body[data-tema]:not([data-paleta="marfil"]) :is(#invitacion,#itinerario,#confirmar)::before,
body[data-tema]:not([data-paleta="marfil"]) :is(#invitacion,#itinerario,#confirmar)::after{display:none}
body[data-tema]:not([data-paleta="marfil"]) #sobre .pluma-apertura{display:none!important}
body[data-tema]:not([data-paleta="marfil"]) .portada .rama{display:none}
body[data-tema="jardin"]:not([data-paleta="marfil"]) .portada .rama{display:block}
body[data-tema="mexicana"]:not([data-paleta="marfil"]) .portada::before{display:none}
body[data-tema="mexicana"]:not([data-paleta="marfil"]) #itinerario .encabezado::after{
  height:auto;border:0;background:var(--franja) 50% 0/auto 18px repeat-x;width:min(300px,70%);aspect-ratio:auto;padding-top:18px;margin:16px auto 0;
}

/* --- tipografía propia de cada diseño --- */
body[data-tema="jardin"]:not([data-paleta="marfil"]){--display:"Cormorant Garamond","Cormorant",Garamond,Georgia,serif}
body[data-tema="editorial"]:not([data-paleta="marfil"]){--display:"Playfair Display","Cormorant Garamond",Georgia,serif;--script:"Playfair Display",Georgia,serif}
body[data-tema="gala"]:not([data-paleta="marfil"]){--display:"Cinzel","Cormorant Garamond",Georgia,serif}
body[data-tema="moderno"]:not([data-paleta="marfil"]){--display:"Manrope","Jost",system-ui,sans-serif;--texto:"Manrope","Jost",system-ui,sans-serif;--script:"Manrope",system-ui,sans-serif}
body[data-tema="mexicana"]:not([data-paleta="marfil"]){--display:"DM Serif Display","Cormorant Garamond",Georgia,serif;--script:"DM Serif Display",Georgia,serif}

/* ============================ Jardín ============================ */
body[data-tema="jardin"]:not([data-paleta="marfil"]) .portada{
  background:
    radial-gradient(42% 36% at 10% 16%,color-mix(in oklab,var(--tema-acento) 16%,transparent),transparent 72%),
    radial-gradient(46% 40% at 92% 88%,color-mix(in oklab,var(--tema-detalle) 42%,transparent),transparent 72%),
    radial-gradient(ellipse at 70% 18%,var(--papel),transparent 62%),var(--marfil);
}
body[data-tema="jardin"]:not([data-paleta="marfil"]) .portada::before{border-color:color-mix(in oklab,var(--tema-acento) 55%,transparent);outline:1px solid var(--linea);outline-offset:9px}
body[data-tema="jardin"]:not([data-paleta="marfil"]) .nombres{font-style:italic;font-weight:400;letter-spacing:.005em;line-height:.98}
body[data-tema="jardin"]:not([data-paleta="marfil"]) .nombres .y{font-size:.3em;letter-spacing:.3em;text-transform:uppercase;font-style:normal;font-family:var(--texto);font-weight:400;margin:.9em 0}
body[data-tema="jardin"]:not([data-paleta="marfil"]) .portada .fecha{letter-spacing:.14em;text-transform:uppercase;font-size:.82rem;font-family:var(--texto);font-weight:500}
body[data-tema="jardin"]:not([data-paleta="marfil"]) .seccion.alterna{background:linear-gradient(180deg,var(--marfil-2),color-mix(in oklab,var(--marfil-2) 70%,var(--papel)))}
body[data-tema="jardin"]:not([data-paleta="marfil"]) .seccion .h2{font-style:italic;font-weight:400}
body[data-tema="jardin"]:not([data-paleta="marfil"]) .nosotros{box-shadow:0 0 0 1px var(--linea),0 0 0 9px var(--marfil),0 0 0 10px var(--linea),0 34px 60px -40px var(--sombra-tema)}

/* ============================ Editorial ============================ */
body[data-tema="editorial"]:not([data-paleta="marfil"]) .portada{
  background:
    linear-gradient(90deg,transparent 0 56%,var(--velo) 56% 100%),
    radial-gradient(60% 50% at 80% 30%,var(--luz),transparent 70%),var(--marfil);
}
body[data-tema="editorial"]:not([data-paleta="marfil"]) .portada::before{
  content:"";position:absolute;z-index:1;pointer-events:none;top:0;bottom:0;left:56%;width:1px;background:var(--linea);
}
body[data-tema="editorial"]:not([data-paleta="marfil"]) .nombres{font-style:italic;font-weight:400;letter-spacing:-.025em;line-height:.9}
body[data-tema="editorial"]:not([data-paleta="marfil"]) .nombres .y{font-size:.3em;font-style:normal;letter-spacing:.32em;text-transform:uppercase;font-family:var(--texto);margin:1.1em 0 .8em;color:var(--tema-acento-texto)}
body[data-tema="editorial"]:not([data-paleta="marfil"]) .nombres .y::after{display:block;width:clamp(40px,8vw,96px)}
body[data-tema="editorial"]:not([data-paleta="marfil"]) .portada .datos{border-top:2px solid var(--tinta);padding-top:16px}
body[data-tema="editorial"]:not([data-paleta="marfil"]) .portada .fecha{font:500 .78rem/1.5 var(--texto);letter-spacing:.24em;text-transform:uppercase}
body[data-tema="editorial"]:not([data-paleta="marfil"]) .portada .sede{font-style:italic;font-family:var(--display)}
body[data-tema="editorial"]:not([data-paleta="marfil"]) .encabezado{border-top:2px solid var(--tinta)}
body[data-tema="editorial"]:not([data-paleta="marfil"]) .seccion .h2{font-weight:400}
body[data-tema="editorial"]:not([data-paleta="marfil"]) .nosotros{box-shadow:14px 14px 0 -1px var(--velo),14px 14px 0 0 var(--linea)}
body[data-tema="editorial"]:not([data-paleta="marfil"]) .nav a{letter-spacing:.14em;text-transform:uppercase;font-size:.72rem}
@media(max-width:640px){
  body[data-tema="editorial"]:not([data-paleta="marfil"]) .portada{background:linear-gradient(180deg,transparent 0 46%,var(--velo) 46% 100%),var(--marfil)}
  body[data-tema="editorial"]:not([data-paleta="marfil"]) .portada::before{display:none}
}

/* ============================ Gala ============================ */
body[data-tema="gala"]:not([data-paleta="marfil"]) .portada{
  background:
    radial-gradient(70% 55% at 50% -6%,var(--luz),transparent 72%),
    radial-gradient(90% 60% at 50% 112%,color-mix(in oklab,var(--tema-acento) 12%,transparent),transparent 70%),
    linear-gradient(180deg,color-mix(in oklab,var(--tema-fondo) 88%,var(--tema-acento)),var(--tema-fondo) 42%,color-mix(in oklab,var(--tema-fondo) 90%,var(--tema-acento)));
}
body[data-tema="gala"]:not([data-paleta="marfil"]) .portada::before{
  border:1px solid var(--tema-acento);outline:1px solid color-mix(in oklab,var(--tema-acento) 45%,transparent);outline-offset:-8px;
  inset:clamp(14px,3.6vw,38px);
}
body[data-tema="gala"]:not([data-paleta="marfil"]) .nombres{font-family:var(--display);font-weight:500;text-transform:uppercase;letter-spacing:.14em;line-height:1.2;font-size:clamp(2.1rem,1rem + 6vw,5.4rem)}
body[data-tema="gala"]:not([data-paleta="marfil"]) .nombres::before{
  content:"";display:block;width:9px;height:9px;margin:0 auto 26px;border:1px solid var(--tema-acento);transform:rotate(45deg);
}
body[data-tema="gala"]:not([data-paleta="marfil"]) .nombres .y{font:italic 400 .4em/1 "Cormorant Garamond",Georgia,serif;letter-spacing:0;text-transform:none;color:var(--tema-acento-texto);margin:.7em 0}
body[data-tema="gala"]:not([data-paleta="marfil"]) .portada .datos{border-top:1px solid var(--linea);max-width:26rem;margin-inline:auto}
body[data-tema="gala"]:not([data-paleta="marfil"]) .portada .fecha{font:italic 500 clamp(1.2rem,1rem + .8vw,1.6rem)/1.3 "Cormorant Garamond",Georgia,serif;letter-spacing:.04em}
body[data-tema="gala"]:not([data-paleta="marfil"]) .portada .sede{letter-spacing:.24em;text-transform:uppercase;font-size:.68rem}
body[data-tema="gala"]:not([data-paleta="marfil"]) .seccion{border-top:0;background:
    radial-gradient(50% 40% at 50% 0%,color-mix(in oklab,var(--tema-acento) 9%,transparent),transparent 72%)}
body[data-tema="gala"]:not([data-paleta="marfil"]) .seccion .h2{font-size:clamp(1.5rem,1.1rem + 1.6vw,2.4rem);text-transform:uppercase;letter-spacing:.16em;font-weight:500}
body[data-tema="gala"]:not([data-paleta="marfil"]) .seccion .encabezado::after{border-top:1px solid var(--tema-acento);width:48px;margin:18px auto 0;height:0}
body[data-tema="gala"]:not([data-paleta="marfil"]) :is(.tarjeta,.tarjeta-vestir,.lugar-cuerpo){border:1px solid var(--tema-acento);outline:1px solid var(--linea);outline-offset:-9px}
body[data-tema="gala"]:not([data-paleta="marfil"]) .unidad{border:1px solid var(--linea)}
body[data-tema="gala"]:not([data-paleta="marfil"]) .nosotros{box-shadow:0 0 0 1px var(--tema-acento),0 0 0 8px var(--tema-fondo),0 0 0 9px var(--linea)}
body[data-tema="gala"]:not([data-paleta="marfil"]) .nav{letter-spacing:.12em}
body[data-tema="gala"]:not([data-paleta="marfil"]) .nav a{text-transform:uppercase;font-size:.7rem;letter-spacing:.16em}

/* ============================ Moderno ============================ */
body[data-tema="moderno"]:not([data-paleta="marfil"]) .portada{
  background:
    linear-gradient(var(--fino) 1px,transparent 1px) 0 0/100% 96px,
    linear-gradient(90deg,var(--fino) 1px,transparent 1px) 0 0/96px 100%,
    radial-gradient(50% 44% at 86% 10%,var(--luz),transparent 70%),var(--marfil);
}
body[data-tema="moderno"]:not([data-paleta="marfil"]) .portada::before{
  content:"";position:absolute;z-index:1;pointer-events:none;left:0;top:0;width:clamp(56px,9vw,120px);height:8px;background:var(--tema-acento);
}
body[data-tema="moderno"]:not([data-paleta="marfil"]) .nombres{font-weight:300;letter-spacing:-.055em;line-height:.88;font-size:clamp(3.4rem,1.2rem + 9vw,9.4rem)}
body[data-tema="moderno"]:not([data-paleta="marfil"]) .nombres .n2{font-weight:700}
body[data-tema="moderno"]:not([data-paleta="marfil"]) .nombres .y{font-size:.2em;font-weight:600;letter-spacing:.2em;text-transform:uppercase;margin:1.6em 0 1.2em;color:var(--tema-acento-texto)}
body[data-tema="moderno"]:not([data-paleta="marfil"]) .portada .datos{border-top:2px solid var(--tinta)}
body[data-tema="moderno"]:not([data-paleta="marfil"]) .portada .fecha{font:600 .85rem/1.5 var(--texto);letter-spacing:.16em;text-transform:uppercase}
body[data-tema="moderno"]:not([data-paleta="marfil"]) .seccion .h2{font-weight:300;letter-spacing:-.05em}
body[data-tema="moderno"]:not([data-paleta="marfil"]) .encabezado{border-top:0;padding-top:0}
body[data-tema="moderno"]:not([data-paleta="marfil"]) .encabezado::before{content:"";display:block;width:40px;height:4px;background:var(--tema-acento);margin-bottom:18px}
body[data-tema="moderno"]:not([data-paleta="marfil"]) .nav a{font-weight:500;letter-spacing:.02em}

/* ============================ Mexicana ============================ */
body[data-tema="mexicana"]:not([data-paleta="marfil"]) .portada{
  background:
    var(--franja) 0 0/auto 26px repeat-x,
    var(--franja) 0 100%/auto 26px repeat-x,
    radial-gradient(50% 42% at 50% 0%,color-mix(in oklab,var(--tema-detalle) 70%,transparent),transparent 72%),
    radial-gradient(ellipse at 70% 18%,var(--papel),transparent 62%),var(--marfil);
}
body[data-tema="mexicana"]:not([data-paleta="marfil"]) .nombres{font-weight:400;letter-spacing:-.005em;line-height:.96}
body[data-tema="mexicana"]:not([data-paleta="marfil"]) .nombres .y{font-style:italic;font-size:.34em;margin:.6em 0;color:var(--tema-detalle-texto)}
body[data-tema="mexicana"]:not([data-paleta="marfil"]) .portada .fecha{letter-spacing:.12em;text-transform:uppercase;font:500 .86rem/1.5 var(--texto)}
body[data-tema="mexicana"]:not([data-paleta="marfil"]) .seccion .h2{font-weight:400}
body[data-tema="mexicana"]:not([data-paleta="marfil"]) .seccion .encabezado::after{
  content:"";display:block;width:min(260px,60%);height:18px;margin:16px auto 0;background:var(--franja) 50% 0/auto 18px repeat-x;
}
body[data-tema="mexicana"]:not([data-paleta="marfil"]) :is(.tarjeta,.lugar-cuerpo){border-top:0;border:1px solid var(--linea);outline:1px solid color-mix(in oklab,var(--tema-tinta) 55%,transparent);outline-offset:-8px}
body[data-tema="mexicana"]:not([data-paleta="marfil"]) .nosotros{box-shadow:0 0 0 1px var(--tema-tinta),0 0 0 7px var(--papel),0 0 0 8px var(--tema-detalle)}

/* ---------- Clásico (paletas distintas a Marfil): sobrio y luminoso ---------- */
body[data-tema="clasico"]:not([data-paleta="marfil"]) .portada{
  background:
    radial-gradient(46% 40% at 88% 12%,var(--luz),transparent 72%),
    radial-gradient(ellipse at 70% 18%,var(--papel),transparent 62%),var(--marfil);
}
body[data-tema="clasico"]:not([data-paleta="marfil"]) .nombres{font-weight:400}
@media(prefers-reduced-motion:reduce){body[data-tema]:not([data-paleta="marfil"])::after{display:none}}
body[data-tema="mexicana"]:not([data-paleta="marfil"]) .seccion .adorno{display:none}
body:not([data-tema]) #sobre{opacity:0}

/* =====================================================================
   APERTURA — sobre de papelería (todos los diseños salvo Clásico + Marfil)
   Un juego de papelería: el sobre es del mismo papel que la carta
   (papeleria.css: --sobre, --sobre-2, --filo), el forro es la propia
   carta y el fondo es el color de la invitación. Línea de tiempo
   (sitio.html): rompe 0 · abre 250 · sale 1200 · centra 2000 ·
   escribiendo 2650 · fin 4700.
   ===================================================================== */
body[data-tema]:not([data-paleta="marfil"]){
  --W:min(86vw,560px,66svh);
  --filo-oro:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 1000' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' x2='1'%3E%3Cstop offset='0' stop-color='%239a7434'/%3E%3Cstop offset='.28' stop-color='%23ecd59c'/%3E%3Cstop offset='.5' stop-color='%23b48a45'/%3E%3Cstop offset='.72' stop-color='%23f3e2b4'/%3E%3Cstop offset='1' stop-color='%239a7434'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M1 0 L8 18 L14 47 L23 91 L29 121 L36 136 L45 150 L55 165 L67 180 L76 195 L163 320 L259 453 L290 490 L316 526 L340 563 L368 600 L436 699 L495 773 L559 689 L625 600 L651 563 L680 526 L708 490 L736 453 L851 313 L936 192 L949 168 L962 143 L972 121 L979 91 L983 47 L989 18 L998 0' fill='none' stroke='url%28%23g%29' stroke-width='2.4' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
  --filo-plata:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 1000' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' x2='1'%3E%3Cstop offset='0' stop-color='%238d949c'/%3E%3Cstop offset='.28' stop-color='%23f4f6f8'/%3E%3Cstop offset='.5' stop-color='%23a9b0b8'/%3E%3Cstop offset='.72' stop-color='%23ffffff'/%3E%3Cstop offset='1' stop-color='%238d949c'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M1 0 L8 18 L14 47 L23 91 L29 121 L36 136 L45 150 L55 165 L67 180 L76 195 L163 320 L259 453 L290 490 L316 526 L340 563 L368 600 L436 699 L495 773 L559 689 L625 600 L651 563 L680 526 L708 490 L736 453 L851 313 L936 192 L949 168 L962 143 L972 121 L979 91 L983 47 L989 18 L998 0' fill='none' stroke='url%28%23g%29' stroke-width='2.2' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
}
body[data-tema]:not([data-paleta="marfil"]) #sobre{
  --pliegues:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 639' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='b' x1='0' y1='1' x2='0' y2='0'%3E%3Cstop offset='0' stop-color='%23fff' stop-opacity='.22'/%3E%3Cstop offset='1' stop-color='%23fff' stop-opacity='.04'/%3E%3C/linearGradient%3E%3ClinearGradient id='i' x1='0' x2='1'%3E%3Cstop offset='0' stop-color='%23fff' stop-opacity='.10'/%3E%3Cstop offset='1' stop-color='%23000' stop-opacity='.03'/%3E%3C/linearGradient%3E%3ClinearGradient id='d' x1='1' x2='0'%3E%3Cstop offset='0' stop-color='%23000' stop-opacity='.07'/%3E%3Cstop offset='1' stop-color='%23000' stop-opacity='.015'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M0 0 L520 372 L0 639Z' fill='url%28%23i%29'/%3E%3Cpath d='M1000 0 L480 372 L1000 639Z' fill='url%28%23d%29'/%3E%3Cpath d='M0 639 L500 300 L1000 639Z' fill='url%28%23b%29'/%3E%3Cpath d='M0 639 L500 300 L1000 639' fill='none' stroke='%23000' stroke-opacity='.10' stroke-width='1.2' vector-effect='non-scaling-stroke'/%3E%3Cpath d='M0 639 L500 300 L1000 639' fill='none' stroke='%23fff' stroke-opacity='.35' stroke-width='1' vector-effect='non-scaling-stroke' transform='translate%280 2%29'/%3E%3C/svg%3E");
  background:
    radial-gradient(64% 44% at 50% 42%,color-mix(in oklab,var(--tema-fondo) 70%,#fff) 0%,transparent 70%),
    radial-gradient(140% 100% at 50% 40%,var(--tema-fondo) 52%,color-mix(in oklab,var(--tema-fondo) 86%,#000) 100%);
  padding:12px;overflow:hidden;transition:opacity .8s ease,visibility 0s linear .8s;
}
body[data-modo="oscuro"]:not([data-paleta="marfil"]) #sobre{
  background:
    radial-gradient(64% 44% at 50% 42%,color-mix(in oklab,var(--tema-fondo) 82%,#fff) 0%,transparent 70%),
    radial-gradient(140% 100% at 50% 40%,var(--tema-fondo) 50%,color-mix(in oklab,var(--tema-fondo) 70%,#000) 100%);
}
/* el adorno fotográfico del diseño original no aplica aquí; cada diseño pone el suyo abajo */
body[data-tema]:not([data-paleta="marfil"]) #sobre::before,
body[data-tema]:not([data-paleta="marfil"]) #sobre::after{
  content:none;display:block;inset:auto;width:auto;height:auto;aspect-ratio:auto;background:none;border:0;outline:0;opacity:1;animation:none;transform:none;
}
body[data-tema]:not([data-paleta="marfil"]) #sobre .arte-apertura,
body[data-tema]:not([data-paleta="marfil"]) #sobre .pluma-apertura{display:none!important}
body[data-tema]:not([data-paleta="marfil"]) #sobre .escena{width:var(--W);gap:clamp(16px,3.2svh,30px)}
body[data-tema]:not([data-paleta="marfil"]) #sobre :is(.env-para,.tocar){color:var(--tema-tinta)}
body[data-tema]:not([data-paleta="marfil"]) #sobre .env-para b{color:var(--tema-acento-texto)}
body[data-tema]:not([data-paleta="marfil"]) #sobre .tocar{color:var(--tinta-2);letter-spacing:.04em}
body[data-tema]:not([data-paleta="marfil"]) #sobre .tocar::before,
body[data-tema]:not([data-paleta="marfil"]) #sobre .tocar::after{background:var(--tema-acento);opacity:.7}

/* ---- el sobre ---- */
body[data-tema]:not([data-paleta="marfil"]) #sobre .env{
  width:100%;aspect-ratio:1.5649;perspective:1600px;
  filter:drop-shadow(0 22px 26px var(--sombra-tema)) drop-shadow(0 2px 4px color-mix(in oklab,var(--sombra-tema) 70%,transparent));
}
/* interior: el forro (la misma papelería de la carta, en penumbra) */
body[data-tema]:not([data-paleta="marfil"]) #sobre .env-fondo{
  border-radius:3px;
  background:linear-gradient(180deg,rgba(0,0,0,.32),rgba(0,0,0,.12) 55%,rgba(0,0,0,.04)),var(--papeleria) center/cover no-repeat,var(--sobre-2);
}
/* bolsillo: papel liso con sus tres pliegues */
body[data-tema]:not([data-paleta="marfil"]) #sobre .env-frente{
  border-radius:0 0 3px 3px;
  background:var(--pliegues) 0 0/100% 100% no-repeat,var(--grano) 0 0/180px 180px,var(--sobre-2);
  background-blend-mode:normal,soft-light,normal;
}
/* solapa: cara exterior con filo metálico; cara interior forrada */
body[data-tema]:not([data-paleta="marfil"]) #sobre .env-solapa{
  z-index:3;transform-origin:50% 0;transform-style:preserve-3d;transition:transform 1s cubic-bezier(.45,.05,.35,1);
  filter:drop-shadow(0 3px 2px rgba(0,0,0,.14)) drop-shadow(0 8px 10px rgba(0,0,0,.10));
}
body[data-tema]:not([data-paleta="marfil"]) #sobre .env-solapa::before{
  background:var(--filo) 0 0/100% 100% no-repeat,
    linear-gradient(180deg,rgba(255,255,255,.18),rgba(255,255,255,0) 45%,rgba(0,0,0,.06)),
    var(--grano) 0 0/180px 180px,var(--sobre);
  background-blend-mode:normal,normal,soft-light,normal;
}
body[data-tema]:not([data-paleta="marfil"]) #sobre .env-solapa::after{
  background:linear-gradient(0deg,rgba(0,0,0,.18),rgba(0,0,0,.02)),var(--papeleria) center/cover no-repeat,var(--sobre-2);
}
body[data-tema]:not([data-paleta="marfil"]) #sobre .env-carta::before,
body[data-tema]:not([data-paleta="marfil"]) #sobre .env-carta::after{content:none}

/* ---- la carta: dentro del sobre, sale, se centra y se escribe ---- */
body[data-tema]:not([data-paleta="marfil"]) #sobre .env .env-carta{
  inset:auto;left:50%;top:50%;width:86%;aspect-ratio:1;z-index:1;display:grid;place-items:center;
  background:var(--papeleria) center/cover no-repeat,var(--sobre-2);border-radius:2px;
  box-shadow:0 1px 0 rgba(255,255,255,.35) inset,0 14px 30px -12px var(--sombra-tema),0 2px 6px -2px var(--sombra-tema);
  transform:translate(-50%,-46.6%) scale(.6);transition:none;will-change:transform;
}
body[data-tema]:not([data-paleta="marfil"]) #sobre.sale .env-solapa{z-index:0}
body[data-tema]:not([data-paleta="marfil"]) #sobre.sale .env .env-carta{
  transform:translate(-50%,-90.9%) scale(.6);z-index:6;
  transition:transform .85s cubic-bezier(.3,.7,.2,1),z-index 0s linear .8s;
}
body[data-tema]:not([data-paleta="marfil"]) #sobre.centra .env .env-carta{
  z-index:6;transform:translate(-50%,-50%) scale(1.14);
  transition:transform .8s cubic-bezier(.32,.72,.22,1) .1s,z-index 0s;
}
/* el sobre se retira entero, sin piezas sueltas */
body[data-tema]:not([data-paleta="marfil"]) #sobre :is(.env-fondo,.env-frente,.env-solapa){transition:transform 1s cubic-bezier(.45,.05,.35,1),opacity .45s ease,translate .6s ease-in}
body[data-tema]:not([data-paleta="marfil"]) #sobre.centra :is(.env-fondo,.env-frente,.env-solapa){opacity:0;translate:0 12%}
/* el interior se apaga primero: así nunca se ve el forro a través del papel */
body[data-tema]:not([data-paleta="marfil"]) #sobre.centra .env-fondo{transition:opacity .12s linear,translate .6s ease-in}
body[data-tema]:not([data-paleta="marfil"]) #sobre.centra .env{filter:none;transition:filter .45s ease}

/* nombres: apilados como en la carta impresa (nombre · conector · nombre) */
body[data-tema]:not([data-paleta="marfil"]) #sobre .env-carta>div{position:relative;z-index:1;display:block;width:78%;max-width:78%;margin:0;padding:0;text-align:center}
body[data-tema]:not([data-paleta="marfil"]) #sobre:not(.escribiendo) .env-carta>div{visibility:hidden}
body[data-tema]:not([data-paleta="marfil"]) #sobre #c-nombres{
  display:block;margin:0;color:var(--grabado);overflow-wrap:anywhere;
  font:400 calc(var(--W) * .1)/1.08 "Pinyon Script",Georgia,cursive;
}
body[data-tema]:not([data-paleta="marfil"]) #sobre #c-nombres .cn{display:block}
body[data-tema]:not([data-paleta="marfil"]) #sobre #c-nombres i{display:block;margin:.12em 0 .08em;font:italic 400 .42em/1 "Cormorant Garamond",Georgia,serif;color:inherit;opacity:.8}
body[data-tema]:not([data-paleta="marfil"]) #sobre #c-fecha{
  display:block;margin-top:1.1em;color:var(--grabado);opacity:.88;
  font:500 max(11px,calc(var(--W) * .026))/1.4 "Cormorant Garamond",Georgia,serif;letter-spacing:.2em;text-transform:uppercase;
}
body[data-tema]:not([data-paleta="marfil"]) #sobre #c-fecha::before{content:"";display:block;width:34%;height:1px;margin:0 auto 1em;background:currentColor;opacity:.45}

/* ---- el sello ---- */
body[data-tema]:not([data-paleta="marfil"]) #sobre .env>.sello{inset:auto;left:49.76%;top:67.04%;width:22%;height:auto;transform:translate(-50%,-50%);z-index:5}
body[data-tema]:not([data-paleta="marfil"]) #sobre #abrir .sello-ini{display:block;position:relative;width:100%;height:auto}
body[data-tema]:not([data-paleta="marfil"]) #sobre #abrir .sello-ini img{filter:var(--sello-filtro,none)}
body[data-tema]:not([data-paleta="marfil"]) #sobre #abrir .sello-ini b{color:var(--sello-letra,#553317);text-shadow:var(--sello-brillo,0 1px 0 #f9d99a,0 -.5px 0 #744c26)}
body[data-tema]:not([data-paleta="marfil"]) #sobre #abrir .tema-abrir-texto{display:none}
body[data-tema]:not([data-paleta="marfil"]) #sobre #abrir:focus-visible{outline:2px solid var(--tema-acento);outline-offset:6px}
body[data-tema]:not([data-paleta="marfil"]) #sobre.rompe .env>.sello{animation:sello-rompe .6s ease-in forwards;pointer-events:none}
@keyframes sello-rompe{
  0%{transform:translate(-50%,-50%) scale(1);opacity:1}
  25%{transform:translate(-50%,-50%) scale(.92)}
  55%{transform:translate(-50%,-52%) scale(1.08) rotate(-4deg);opacity:1}
  100%{transform:translate(-46%,-20%) scale(.9) rotate(14deg);opacity:0}
}
body[data-tema]:not([data-paleta="marfil"]) #sobre.abre .env-solapa{transform:rotateX(180deg)}

/* ---- el escenario de cada diseño (igual que su portada) ---- */
body[data-tema="jardin"]:not([data-paleta="marfil"]) #sobre::before,
body[data-tema="jardin"]:not([data-paleta="marfil"]) #sobre::after{
  content:"";display:block;position:absolute;bottom:-4svh;height:50svh;width:auto;aspect-ratio:772/1800;
  background:url(/assets/rama-cel.webp) center bottom/contain no-repeat;pointer-events:none;opacity:.34;
  transform-origin:50% 100%;animation:viento 9s ease-in-out infinite alternate;
}
body[data-tema="jardin"]:not([data-paleta="marfil"]) #sobre::before{right:-8vw}
body[data-tema="jardin"]:not([data-paleta="marfil"]) #sobre::after{left:-8vw;scale:-1 1;animation-delay:-4s}
body[data-tema="jardin"]:not([data-paleta="marfil"]) #sobre .env .env-carta{border-radius:50% 50% 3px 3px / 20% 20% 3px 3px}
body[data-tema="gala"]:not([data-paleta="marfil"]) #sobre::before{
  content:"";position:absolute;inset:clamp(14px,3.6vw,38px);pointer-events:none;
  border:1px solid var(--tema-acento);outline:1px solid color-mix(in oklab,var(--tema-acento) 45%,transparent);outline-offset:-8px;opacity:.85;
}
body[data-tema="editorial"]:not([data-paleta="marfil"]) #sobre::before{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(90deg,transparent 0 56%,color-mix(in oklab,var(--tema-acento) 9%,transparent) 56% 100%);
  border-left:0;
}
@media(max-width:640px){body[data-tema="editorial"]:not([data-paleta="marfil"]) #sobre::before{background:linear-gradient(180deg,transparent 0 46%,color-mix(in oklab,var(--tema-acento) 9%,transparent) 46% 100%)}}
body[data-tema="editorial"]:not([data-paleta="marfil"]) #sobre .env{rotate:-1.6deg;transition:rotate .9s cubic-bezier(.32,.72,.22,1),filter .45s ease}
body[data-tema="editorial"]:not([data-paleta="marfil"]) #sobre.abre .env{rotate:0deg}
body[data-tema="moderno"]:not([data-paleta="marfil"]) #sobre::before{
  content:"";position:absolute;inset:0;pointer-events:none;opacity:.5;
  background:linear-gradient(var(--fino) 1px,transparent 1px) 0 0/100% 96px,linear-gradient(90deg,var(--fino) 1px,transparent 1px) 0 0/96px 100%;
}
body[data-tema="moderno"]:not([data-paleta="marfil"]) #sobre::after{content:"";position:absolute;left:0;top:0;width:clamp(56px,9vw,120px);height:8px;background:var(--tema-acento)}
body[data-tema="moderno"]:not([data-paleta="marfil"]) #sobre .env .env-carta{border-radius:6px}
body[data-tema="mexicana"]:not([data-paleta="marfil"]) #sobre::before,
body[data-tema="mexicana"]:not([data-paleta="marfil"]) #sobre::after{content:"";position:absolute;left:0;right:0;height:26px;pointer-events:none;background:var(--franja) 0 0/auto 26px repeat-x}
body[data-tema="mexicana"]:not([data-paleta="marfil"]) #sobre::before{top:0}
body[data-tema="mexicana"]:not([data-paleta="marfil"]) #sobre::after{bottom:0}

/* ---- tipografía de la carta según el diseño ---- */
body[data-tema="editorial"]:not([data-paleta="marfil"]) #sobre #c-nombres{font:italic 400 calc(var(--W) * .078)/1.08 "Playfair Display",Georgia,serif;letter-spacing:-.01em}
body[data-tema="gala"]:not([data-paleta="marfil"]) #sobre #c-nombres{font:500 calc(var(--W) * .062)/1.25 "Cinzel",Georgia,serif;letter-spacing:.14em;text-transform:uppercase}
body[data-tema="gala"]:not([data-paleta="marfil"]) #sobre #c-nombres i{font-size:.62em;letter-spacing:0;text-transform:none;margin:.3em 0}
body[data-tema="moderno"]:not([data-paleta="marfil"]) #sobre #c-nombres{font:300 calc(var(--W) * .078)/1.02 "Manrope",system-ui,sans-serif;letter-spacing:-.04em}
body[data-tema="moderno"]:not([data-paleta="marfil"]) #sobre #c-nombres .cn:last-child{font-weight:700}
body[data-tema="moderno"]:not([data-paleta="marfil"]) #sobre #c-nombres i{font:600 .24em/1 "Manrope",system-ui,sans-serif;letter-spacing:.24em;text-transform:uppercase;margin:.9em 0 .7em}
body[data-tema="moderno"]:not([data-paleta="marfil"]) #sobre #c-fecha{font-family:"Manrope",system-ui,sans-serif;font-weight:600;letter-spacing:.18em}
body[data-tema="mexicana"]:not([data-paleta="marfil"]) #sobre #c-nombres{font:400 calc(var(--W) * .078)/1.05 "DM Serif Display",Georgia,serif}
body[data-tema="mexicana"]:not([data-paleta="marfil"]) #sobre #c-nombres i{font-family:"DM Serif Display",Georgia,serif}

/* ---- cómo aparecen los nombres en cada diseño ---- */
@keyframes fecha-apertura{from{opacity:0;transform:translateY(4px)}to{opacity:.88;transform:none}}
@keyframes ap-tinta{from{-webkit-mask-position:100% 0;mask-position:100% 0}to{-webkit-mask-position:0 0;mask-position:0 0}}
@keyframes ap-flor{from{opacity:0;filter:blur(8px);transform:scale(.96)}to{opacity:1;filter:blur(0);transform:none}}
@keyframes ap-linea{from{clip-path:inset(-5% -5% 105% -5%);transform:translateY(.6em)}to{clip-path:inset(-5% -5% -5% -5%);transform:none}}
@keyframes ap-gala{from{opacity:0;letter-spacing:.42em;filter:blur(4px)}to{opacity:1;letter-spacing:.14em;filter:blur(0)}}
@keyframes ap-brillo{from{transform:translateX(-120%)}to{transform:translateX(120%)}}
@keyframes ap-izq{from{opacity:0;transform:translateX(-.8em)}to{opacity:1;transform:none}}
@keyframes ap-der{from{opacity:0;transform:translateX(.8em)}to{opacity:1;transform:none}}
@keyframes ap-rebote{0%{opacity:0;transform:scale(.6) translateY(.4em)}60%{opacity:1;transform:scale(1.08)}80%{transform:scale(.98)}100%{opacity:1;transform:none}}
@media(prefers-reduced-motion:no-preference){
  body[data-tema]:not([data-paleta="marfil"]) #sobre.escribiendo #c-fecha{animation:fecha-apertura .7s 1.3s ease both}
  /* Clásico: tinta que se revela */
  body[data-tema="clasico"]:not([data-paleta="marfil"]) #sobre.escribiendo #c-nombres{
    -webkit-mask-image:linear-gradient(180deg,#000 33%,transparent 41%);mask-image:linear-gradient(180deg,#000 33%,transparent 41%);
    -webkit-mask-size:100% 300%;mask-size:100% 300%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;
    animation:ap-tinta-v 1.9s cubic-bezier(.45,.05,.3,1) both;
  }
  @keyframes ap-tinta-v{from{-webkit-mask-position:0 100%;mask-position:0 100%}to{-webkit-mask-position:0 0;mask-position:0 0}}
  /* Jardín: floración */
  body[data-tema="jardin"]:not([data-paleta="marfil"]) #sobre.escribiendo #c-nombres{animation:ap-flor 1.8s cubic-bezier(.2,.7,.2,1) both}
  /* Editorial: líneas que suben */
  body[data-tema="editorial"]:not([data-paleta="marfil"]) #sobre.escribiendo #c-nombres :is(.cn,i){animation:ap-linea 1s cubic-bezier(.2,.8,.2,1) both}
  body[data-tema="editorial"]:not([data-paleta="marfil"]) #sobre.escribiendo #c-nombres i{animation-delay:.2s}
  body[data-tema="editorial"]:not([data-paleta="marfil"]) #sobre.escribiendo #c-nombres .cn:last-child{animation-delay:.35s}
  /* Gala: destello dorado */
  body[data-tema="gala"]:not([data-paleta="marfil"]) #sobre.escribiendo #c-nombres{animation:ap-gala 1.9s cubic-bezier(.2,.6,.2,1) both}
  body[data-tema="gala"]:not([data-paleta="marfil"]) #sobre .env .env-carta{overflow:hidden}
  body[data-tema="gala"]:not([data-paleta="marfil"]) #sobre .env .env-carta::after{
    content:"";position:absolute;inset:0;pointer-events:none;mix-blend-mode:soft-light;transform:translateX(-120%);
    background:linear-gradient(112deg,transparent 36%,color-mix(in oklab,var(--tema-acento) 60%,#fff) 50%,transparent 64%);
  }
  body[data-tema="gala"]:not([data-paleta="marfil"]) #sobre.escribiendo .env .env-carta::after{animation:ap-brillo 1.6s .35s ease-in-out both}
  /* Moderno: deslizamiento seco */
  body[data-tema="moderno"]:not([data-paleta="marfil"]) #sobre.escribiendo #c-nombres .cn:first-child{animation:ap-izq .7s cubic-bezier(.7,0,.2,1) both}
  body[data-tema="moderno"]:not([data-paleta="marfil"]) #sobre.escribiendo #c-nombres .cn:last-child{animation:ap-der .7s .12s cubic-bezier(.7,0,.2,1) both}
  body[data-tema="moderno"]:not([data-paleta="marfil"]) #sobre.escribiendo #c-nombres i{animation:fecha-apertura .4s .35s ease both}
  /* Mexicana: rebote */
  body[data-tema="mexicana"]:not([data-paleta="marfil"]) #sobre.escribiendo #c-nombres .cn{animation:ap-rebote .9s cubic-bezier(.3,1.4,.5,1) both}
  body[data-tema="mexicana"]:not([data-paleta="marfil"]) #sobre.escribiendo #c-nombres .cn:last-child{animation-delay:.2s}
  body[data-tema="mexicana"]:not([data-paleta="marfil"]) #sobre.escribiendo #c-nombres i{animation:fecha-apertura .5s .35s ease both}
}
@media(prefers-reduced-motion:reduce){
  body[data-tema]:not([data-paleta="marfil"]) #sobre::before,body[data-tema]:not([data-paleta="marfil"]) #sobre::after{animation:none}
  body[data-tema]:not([data-paleta="marfil"]) #sobre :is(.env-carta,.env-solapa,.env-fondo,.env-frente){transition:none}
}

/* =====================================================================
   ITINERARIO — el tallo, los nudos y los ramilletes salen de la carta
   de cada paleta (rosas, olivo, laurel plateado, talavera y bugambilia).
   El JS marca .rama-dia[data-flor] y usa assets/itin/temas/.
   ===================================================================== */
.rama-dia[data-flor] #gTalloDia stop:nth-child(1){stop-color:var(--tallo-1)}
.rama-dia[data-flor] #gTalloDia stop:nth-child(2){stop-color:var(--tallo-2)}
.rama-dia[data-flor] #gTalloDia stop:nth-child(3){stop-color:var(--tallo-3)}
.rama-dia[data-flor] .tallo-luz-dia{stroke:var(--tallo-luz,#fff);opacity:.55}
.rama-dia[data-flor] .nudo circle:nth-child(2){fill:var(--nudo)}
.rama-dia[data-flor] .nudo circle:nth-child(3){fill:var(--nudo-luz,#fff);opacity:.8}
.rama-dia[data-flor] .nudo .halo{stroke:var(--nudo)}
.rama-dia[data-flor] .pieza img{filter:drop-shadow(0 6px 8px color-mix(in oklab,var(--nudo) 14%,transparent))}
.rama-dia[data-flor="vino"]{--tallo-1:#dcc0b0;--tallo-2:#a9706d;--tallo-3:#6f3442;--nudo:#9c3c55;--nudo-luz:#f6d9df}
.rama-dia[data-flor="durazno"]{--tallo-1:#ecd1b8;--tallo-2:#c99276;--tallo-3:#7f6a47;--nudo:#cf8565;--nudo-luz:#fde7d8}
.rama-dia[data-flor="lila"]{--tallo-1:#ddd0ea;--tallo-2:#9f89c6;--tallo-3:#5b468e;--nudo:#7458a8;--nudo-luz:#efe6fb}
.rama-dia[data-flor="olivo"]{--tallo-1:#ddd6a6;--tallo-2:#9a9c62;--tallo-3:#59663a;--nudo:#7d8446;--nudo-luz:#f1efd2}
.rama-dia[data-flor="laurel"]{--tallo-1:#f1f3f6;--tallo-2:#aab3bd;--tallo-3:#6b7682;--nudo:#8f99a5;--nudo-luz:#ffffff}
.rama-dia[data-flor="talavera"]{--tallo-1:#c7d4ef;--tallo-2:#3f67b4;--tallo-3:#143d83;--nudo:#b82068;--nudo-luz:#ffe0ee}
/* la pieza brota del nudo: escala suave y un giro corto, sin el abanico de hojas */
.ramillete.tema .pieza img{transform:rotate(var(--r0,-18deg)) scale(.55);transition:opacity 1.1s ease var(--d,0s),transform 1.6s cubic-bezier(.16,.84,.3,1) var(--d,0s)}
.ramillete.tema.visto .pieza img{transform:none}

/* =====================================================================
   ITINERARIO de Gala, Editorial y Moderno — cada uno con su propio
   lenguaje (programa impreso, revista y línea de tiempo).
   ===================================================================== */
.orden time small{font-size:inherit;letter-spacing:inherit}

/* ---- Gala: el programa impreso en la misma papelería de la carta ---- */
body[data-tema="gala"]:not([data-paleta="marfil"]) #itinerario .rama-dia{max-width:680px}
body[data-tema="gala"]:not([data-paleta="marfil"]) .orden{
  position:relative;max-width:600px;margin:6px auto 0;
  padding:clamp(112px,14vw,128px) clamp(24px,6vw,64px);
  /* el papel liso de la carta, con su grano y doble filete; los remates salen de la carta */
  background:var(--grano) 0 0/180px 180px,linear-gradient(180deg,rgba(255,255,255,.05),rgba(0,0,0,.06)),var(--sobre-2);
  background-blend-mode:soft-light,normal,normal;color:var(--grabado);
  box-shadow:
    inset 0 0 0 13px var(--sobre-2),inset 0 0 0 14px color-mix(in oklab,var(--tema-acento) 75%,transparent),
    inset 0 0 0 18px var(--sobre-2),inset 0 0 0 19px color-mix(in oklab,var(--tema-acento) 40%,transparent),
    0 34px 70px -34px rgba(0,0,0,.55),0 3px 10px -4px rgba(0,0,0,.25);
}
body[data-tema="gala"]:not([data-paleta="marfil"]) .orden::before,
body[data-tema="gala"]:not([data-paleta="marfil"]) .orden::after{
  content:"";position:absolute;left:50%;width:min(42%,200px);aspect-ratio:var(--remate-ar,405/138);
  background:var(--remate) center/contain no-repeat;translate:-50% 0;pointer-events:none;
}
body[data-tema="gala"]:not([data-paleta="marfil"]) .orden::before{top:clamp(34px,5vw,42px)}
body[data-tema="gala"]:not([data-paleta="marfil"]) .orden::after{bottom:clamp(34px,5vw,42px);scale:1 -1}
body[data-tema="gala"]:not([data-paleta="marfil"]) .orden li{width:auto;margin:0;padding:0;border:0;text-align:center;transform:none}
body[data-tema="gala"]:not([data-paleta="marfil"]) .orden li+li{margin-top:24px}
body[data-tema="gala"]:not([data-paleta="marfil"]) .orden li+li::before{
  content:"\25C6";display:block;width:132px;height:10px;margin:0 auto 22px;opacity:.85;
  font:7px/10px Georgia,serif;text-align:center;color:var(--tema-acento);
  background:
    linear-gradient(var(--tema-acento),var(--tema-acento)) 0 50%/54px 1px no-repeat,
    linear-gradient(var(--tema-acento),var(--tema-acento)) 100% 50%/54px 1px no-repeat;
}
body[data-tema="gala"]:not([data-paleta="marfil"]) .orden li time{
  display:block;font:500 .95rem/1.4 "Cinzel",Georgia,serif;letter-spacing:.3em;text-transform:uppercase;color:var(--tema-acento);
  padding-left:.32em;
}
body[data-tema="gala"]:not([data-paleta="marfil"]) .orden li time small{font-size:.82em}
body[data-tema="gala"]:not([data-paleta="marfil"]) .orden h3{
  top:0;margin-top:8px;font:italic 400 clamp(1.55rem,1.1rem + 1.3vw,2.2rem)/1.15 "Cormorant Garamond",Georgia,serif;letter-spacing:.01em;text-transform:none;color:var(--grabado);
}
body[data-tema="gala"]:not([data-paleta="marfil"]) .orden .detalle{margin:8px auto 0;color:var(--grabado);opacity:.75;font-size:.92rem}
body[data-tema="gala"]:not([data-paleta="marfil"]) .orden li.ahora h3::after{color:var(--tema-acento)}
body[data-paleta="vino-oro"],body[data-paleta="vino"],body[data-paleta="hielo"]{--remate:url(/assets/itin/temas/remate-vino.webp)}
body[data-paleta="esmeralda"]{--remate:url(/assets/itin/temas/remate-esmeralda.webp)}
body[data-paleta="noche"]{--remate:url(/assets/itin/temas/remate-anillos.webp);--remate-ar:768/117}
body[data-paleta="noche"]:not([data-evento="boda"]):not([data-evento="aniversario"]){--remate:url(/assets/itin/temas/remate-laurel.webp)}
body[data-paleta="borgona-rosa"]{--remate:url(/assets/itin/temas/vino-b.webp);--remate-ar:594/456}
body[data-paleta="borgona-rosa"] .orden::before,body[data-paleta="borgona-rosa"] .orden::after{width:min(20%,88px)!important}
body[data-paleta="borgona-rosa"] .orden::after{scale:-1 1!important}
@media(max-width:640px){
  body[data-tema="gala"]:not([data-paleta="marfil"]) .orden{margin-inline:-6px}
}

/* ---- Editorial: programa de revista, con cifras grandes en cursiva ---- */
body[data-tema="editorial"]:not([data-paleta="marfil"]) .orden{max-width:880px;border-top:2px solid var(--tinta);counter-reset:paso}
body[data-tema="editorial"]:not([data-paleta="marfil"]) .orden li{
  display:grid;grid-template-columns:minmax(128px,.44fr) 1fr;column-gap:clamp(20px,5vw,64px);align-items:baseline;
  width:auto;margin:0;padding:clamp(22px,3vw,32px) 0;border-bottom:1px solid var(--linea);text-align:left;counter-increment:paso;
}
body[data-tema="editorial"]:not([data-paleta="marfil"]) .orden li time{
  grid-row:1 / span 2;font:italic 400 clamp(2.1rem,1.4rem + 2.2vw,3.4rem)/1 "Playfair Display",Georgia,serif;letter-spacing:-.025em;color:var(--oro-oscuro);white-space:nowrap;
}
body[data-tema="editorial"]:not([data-paleta="marfil"]) .orden li time small{
  font:600 .24em/1 var(--texto);font-style:normal;letter-spacing:.22em;text-transform:uppercase;margin-left:.5em;vertical-align:.9em;color:var(--tinta-2);
}
body[data-tema="editorial"]:not([data-paleta="marfil"]) .orden h3{
  top:0;margin:0;font:italic 400 clamp(1.4rem,1.1rem + 1vw,2rem)/1.2 "Playfair Display",Georgia,serif;letter-spacing:-.01em;
}
body[data-tema="editorial"]:not([data-paleta="marfil"]) .orden h3::before{
  content:"N.º " counter(paso,decimal-leading-zero);display:block;margin-bottom:8px;
  font:600 .64rem/1 var(--texto);font-style:normal;letter-spacing:.3em;text-transform:uppercase;color:var(--tema-acento-texto);
}
body[data-tema="editorial"]:not([data-paleta="marfil"]) .orden .detalle{grid-column:2;margin:8px 0 0;max-width:30rem}
@media(max-width:560px){
  body[data-tema="editorial"]:not([data-paleta="marfil"]) .orden li{grid-template-columns:1fr}
  body[data-tema="editorial"]:not([data-paleta="marfil"]) .orden li time{grid-row:auto;margin-bottom:12px}
  body[data-tema="editorial"]:not([data-paleta="marfil"]) .orden .detalle{grid-column:1}
}

/* ---- Moderno: línea de tiempo horizontal, limpia y ordenada ---- */
body[data-tema="moderno"]:not([data-paleta="marfil"]) .orden{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:0;max-width:none;border-top:1px solid var(--linea);
}
body[data-tema="moderno"]:not([data-paleta="marfil"]) .orden li{
  width:auto;margin:0;padding:30px 22px 6px 0;border:0;border-radius:0;background:none;text-align:left;
}
body[data-tema="moderno"]:not([data-paleta="marfil"]) .orden li::before{content:"";display:block;width:28px;height:4px;margin:-32px 0 28px;background:var(--tema-acento)}
body[data-tema="moderno"]:not([data-paleta="marfil"]) .orden li time{
  display:block;font:300 clamp(2rem,1.4rem + 1.5vw,2.9rem)/1 "Manrope",system-ui,sans-serif;letter-spacing:-.045em;color:var(--tinta);white-space:nowrap;
}
body[data-tema="moderno"]:not([data-paleta="marfil"]) .orden li time small{font:700 .3em/1 "Manrope",system-ui,sans-serif;letter-spacing:.16em;margin-left:.35em;vertical-align:.95em;color:var(--tema-acento-texto)}
body[data-tema="moderno"]:not([data-paleta="marfil"]) .orden h3{top:0;margin-top:14px;font:600 1.06rem/1.3 "Manrope",system-ui,sans-serif;letter-spacing:-.01em}
body[data-tema="moderno"]:not([data-paleta="marfil"]) .orden .detalle{margin:6px 0 0;font-size:.9rem}
@media(max-width:640px){
  body[data-tema="moderno"]:not([data-paleta="marfil"]) .orden{grid-template-columns:1fr;border-top:0;border-left:1px solid var(--linea);margin-left:4px}
  body[data-tema="moderno"]:not([data-paleta="marfil"]) .orden li{padding:6px 0 26px 24px}
  body[data-tema="moderno"]:not([data-paleta="marfil"]) .orden li::before{position:absolute;left:-2px;top:12px;width:4px;height:22px;margin:0}
}
