/* =====================================================================
   Invitación Ammy & Richard
   ===================================================================== */
:root {
  /* Layout: una columna de teléfono (máx. 460px) centrada sobre la acuarela.
     Cada bloque es una pieza de papelería: sobre con lacre, tarjeta con borde de encaje, banda azul empolvado. */
  --azul: #9cadc4;
  --azul-claro: #c3cfde;
  --azul-hondo: #8193ad;
  --banda: #98a8be;
  --papel: #f3efe8;
  --marfil: #fdfbf6;
  --tinta: #5c5145;
  --taupe: #8b7a67;
  --oro: #a58d6b;
  --linea: #e1d8c8;
  --blanco: #ffffff;
  --sombra: 52 64 88;

  --f-script: "Pinyon Script", "Snell Roundhand", "Apple Chancery", cursive;
  --f-caps: "Cinzel", "Trajan Pro", "Times New Roman", serif;
  --f-texto: "Lora", Georgia, "Times New Roman", serif;

  --columna: 460px;
  --gutter-l: max(22px, env(safe-area-inset-left, 0px));
  --gutter-r: max(22px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--papel); }
body {
  margin: 0;
  background: var(--papel);
  color: var(--tinta);
  font: 400 15px/1.65 var(--f-texto);
  -webkit-font-smoothing: antialiased;
}
body.con-portada, body.con-hoja { overflow: hidden; }
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url("../assets/fondo.jpg") center / cover no-repeat;
  opacity: .6;
}
img { max-width: 100%; display: block; }
p, h1, h2, h3 { margin: 0; }
a { color: inherit; }
.defs-svg { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Tipografía ---------- */
.titulo {
  font: 400 clamp(42px, 12vw, 52px)/1.1 var(--f-script);
  color: var(--taupe);
  text-wrap: balance;
}
.caps {
  font-family: var(--f-caps);
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--taupe);
}
.texto { max-width: 34ch; text-wrap: pretty; }
.texto-suave { color: var(--taupe); }

/* ---------- Botones ---------- */
.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 22px;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: var(--taupe);
  font: 500 13px/1 var(--f-texto);
  letter-spacing: .06em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, color .2s;
}
.boton:hover { background: rgb(139 122 103 / .08); }
.boton:focus-visible, .boton-musica:focus-visible, .sobre-boton:focus-visible, .copiar:focus-visible {
  outline: 2px solid var(--azul-hondo);
  outline-offset: 3px;
}
.boton-lleno {
  width: 100%;
  min-height: 50px;
  border-color: transparent;
  background: var(--azul-hondo);
  color: var(--blanco);
  font-size: 15px;
}
.boton-lleno:hover { background: #73859f; }

/* =====================================================================
   Sobre (portada, programa)
   ===================================================================== */
.sobre {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  perspective: 1100px;
}
.sobre-interior {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 4px;
  background: linear-gradient(#c7d2e0, #b2c0d3);
  box-shadow: 0 24px 34px -18px rgb(var(--sombra) / .6), 0 2px 5px rgb(var(--sombra) / .18);
}
.sobre-carta {
  position: absolute;
  left: 6%;
  right: 6%;
  top: 5%;
  height: 88%;
  z-index: 3;
  display: grid;
  place-items: start center;
  padding-top: 9%;
  border-radius: 2px;
  background: var(--marfil);
  box-shadow: 0 1px 4px rgb(var(--sombra) / .22);
  font: 400 30px/1 var(--f-script);
  color: var(--taupe);
}
.sobre-frente-sombra {
  position: absolute;
  inset: 0;
  z-index: 4;
  filter: drop-shadow(0 -1px 1.5px rgb(var(--sombra) / .28));
}
.sobre-frente {
  position: absolute;
  inset: 0;
  border-radius: 4px;
  clip-path: polygon(0 0, 50% 54%, 100% 0, 100% 100%, 0 100%);
  background: linear-gradient(172deg, #abbacf, #95a7bf);
}
.sobre-pliegues {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: rgb(255 255 255 / .22);
  stroke-width: 1;
}
.sobre-solapa {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 58%;
  z-index: 5;
  transform-origin: 50% 0;
  filter: drop-shadow(0 3px 3px rgb(var(--sombra) / .3));
}
.sobre-solapa-papel {
  position: absolute;
  inset: 0;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  background: linear-gradient(#a4b4ca, #99aac1);
}
.sobre-lacre {
  position: absolute;
  left: 50%;
  top: 58%;
  width: 25%;
  z-index: 6;
  transform: translate(-50%, -50%);
}
.sobre-cta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12%;
  z-index: 6;
  color: var(--blanco);
  font: 500 12px/1 var(--f-texto);
  letter-spacing: .12em;
  text-transform: uppercase;
  text-align: center;
}

/* Encaje: bordes del sobre */
.encaje {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: none;
  stroke-linejoin: round;
}
.encaje-banda { stroke: #8698b3; stroke-width: 9; opacity: .5; }
.encaje-malla { stroke: rgb(255 255 255 / .22); stroke-width: 7; stroke-dasharray: 1 2.4; }
.encaje-ondas { stroke: #8a9bb5; stroke-width: 5.5; stroke-dasharray: 0 7; stroke-linecap: round; opacity: .9; }
.encaje-ojales { stroke: rgb(255 255 255 / .7); stroke-width: 1.6; stroke-dasharray: 0 5; stroke-linecap: round; }

/* Lacre */
.lacre { display: block; overflow: visible; }
.lacre-letras {
  font: 500 17px var(--f-caps);
  fill: #b3a081;
  text-anchor: middle;
  dominant-baseline: central;
}
.lacre-brillo { fill: rgb(255 255 255 / .85); }

/* =====================================================================
   Portada
   ===================================================================== */
.portada {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: max(24px, env(safe-area-inset-top, 0px)) var(--gutter-r) max(24px, env(safe-area-inset-bottom, 0px)) var(--gutter-l);
  background: var(--papel) url("../assets/fondo.jpg") center / cover no-repeat;
  text-align: center;
  transition: opacity .9s ease;
}
.portada-eyebrow {
  font: 400 clamp(22px, 6.6vw, 30px)/1.2 var(--f-caps);
  letter-spacing: .03em;
  color: #95836b;
  text-shadow: 0 0 22px rgb(255 255 255 / .95);
}
.portada-para {
  margin-bottom: 18px;
  font: 400 clamp(38px, 10.5vw, 48px)/1.15 var(--f-script);
  color: var(--taupe);
  text-wrap: balance;
  text-shadow: 0 0 22px rgb(255 255 255 / .95);
}
.portada-pases {
  margin-top: 22px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgb(253 251 246 / .78);
  font: italic 400 14px/1.4 var(--f-texto);
  color: var(--tinta);
}
.sobre-boton {
  display: block;
  width: min(84vw, 340px);
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.sobre-boton:hover .sobre-lacre { transform: translate(-50%, -50%) scale(1.04); transition: transform .3s; }

.portada.abriendo .sobre-lacre { animation: lacre-fuera .5s ease forwards; }
.portada.abriendo .sobre-cta { opacity: 0; transition: opacity .3s; }
.portada.abriendo .portada-eyebrow,
.portada.abriendo .portada-para,
.portada.abriendo .portada-pases { opacity: 0; transform: translateY(-12px); transition: opacity .5s ease, transform .5s ease; }
.portada.abriendo .sobre-solapa { animation: abrir-solapa .8s cubic-bezier(.45, 0, .2, 1) .35s forwards; }
.portada.abriendo .sobre-carta { animation: sacar-carta 1s cubic-bezier(.2, .7, .2, 1) 1.05s forwards; }
.portada.saliendo { opacity: 0; pointer-events: none; }

@keyframes lacre-fuera {
  to { opacity: 0; transform: translate(-50%, -50%) scale(1.3) rotate(-6deg); }
}
@keyframes abrir-solapa {
  0% { transform: rotateX(0); z-index: 5; }
  49% { z-index: 5; }
  50% { transform: rotateX(90deg); z-index: 2; }
  100% { transform: rotateX(180deg); z-index: 2; }
}
@keyframes sacar-carta {
  to { transform: translateY(-60%); }
}

/* =====================================================================
   Columna de la invitación
   ===================================================================== */
.invitacion {
  position: relative;
  max-width: var(--columna);
  margin-inline: auto;
  overflow: clip;
  background: var(--papel);
  box-shadow: 0 0 70px rgb(var(--sombra) / .16);
}
.seccion {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding-block: 52px;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
  text-align: center;
}

/* Sobre abierto con foto o tarjeta (hero, confirmación) */
.sf {
  position: relative;
  width: min(100%, 340px);
  aspect-ratio: 360 / 330;
}
.sf-solapa {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 62%;
  height: 34%;
  z-index: 1;
}
.sf-solapa-papel {
  position: absolute;
  inset: 0;
  clip-path: polygon(0 100%, 50% 0, 100% 100%);
  background: linear-gradient(to top, #b4c2d5, #c8d3e1);
}
.sf-atras {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 62%;
  z-index: 1;
  border-radius: 3px;
  background: linear-gradient(#bac7d9, #a9b8cc);
}
.sf-contenido {
  position: absolute;
  left: 15%;
  right: 15%;
  top: 13%;
  bottom: 17%;
  z-index: 2;
  transform: rotate(-1.4deg);
  background: var(--blanco);
  padding: 7px;
  box-shadow: 0 6px 16px -6px rgb(var(--sombra) / .45);
}
.sf-contenido img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.sf-frente-sombra {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 62%;
  z-index: 3;
  filter: drop-shadow(0 -2px 3px rgb(var(--sombra) / .3)) drop-shadow(0 18px 22px rgb(var(--sombra) / .28));
}
.sf-frente {
  position: absolute;
  inset: 0;
  border-radius: 3px;
  clip-path: polygon(0 0, 50% 45%, 100% 0, 100% 100%, 0 100%);
  background: linear-gradient(170deg, #a9b8cd, #93a5bd);
}
.sf-lacre {
  position: absolute;
  left: 50%;
  top: 66%;
  width: 24%;
  z-index: 4;
  transform: translate(-50%, -50%);
}
.ramo {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  filter: drop-shadow(0 8px 10px rgb(var(--sombra) / .22));
}
.ramo-der { right: -17%; top: 10%; width: 46%; }
.ramo-izq { left: -12%; top: 34%; width: 27%; transform: scaleX(-1) rotate(10deg); }

/* Tarjeta con borde de encaje */
.tarjeta-encaje {
  position: relative;
  z-index: 4;
  width: min(100%, 340px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 26px 18px 30px;
  border: 16px solid transparent;
  border-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Cg fill='%23fdfbf6' stroke='%23e6ddcd' stroke-width='.8'%3E%3Ccircle cx='8' cy='8' r='7.6'/%3E%3Ccircle cx='24' cy='8' r='7.6'/%3E%3Ccircle cx='40' cy='8' r='7.6'/%3E%3Ccircle cx='8' cy='24' r='7.6'/%3E%3Ccircle cx='40' cy='24' r='7.6'/%3E%3Ccircle cx='8' cy='40' r='7.6'/%3E%3Ccircle cx='24' cy='40' r='7.6'/%3E%3Ccircle cx='40' cy='40' r='7.6'/%3E%3C/g%3E%3Crect x='8' y='8' width='32' height='32' fill='%23fdfbf6'/%3E%3Cg fill='%23e3d9c7'%3E%3Ccircle cx='24' cy='5.5' r='1.4'/%3E%3Ccircle cx='24' cy='42.5' r='1.4'/%3E%3Ccircle cx='5.5' cy='24' r='1.4'/%3E%3Ccircle cx='42.5' cy='24' r='1.4'/%3E%3Ccircle cx='5.5' cy='5.5' r='1.4'/%3E%3Ccircle cx='42.5' cy='5.5' r='1.4'/%3E%3Ccircle cx='5.5' cy='42.5' r='1.4'/%3E%3Ccircle cx='42.5' cy='42.5' r='1.4'/%3E%3C/g%3E%3Crect x='14.5' y='14.5' width='19' height='19' fill='none' stroke='%23e3d9c7'/%3E%3C/svg%3E") 16 fill round;
  filter: drop-shadow(0 10px 14px rgb(var(--sombra) / .16));
}

/* Tarjeta con doble filete (eventos) */
.tarjeta-fina {
  width: min(100%, 340px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 30px 26px 32px;
  background: var(--marfil);
  color: var(--tinta);
  box-shadow:
    inset 0 0 0 7px var(--marfil),
    inset 0 0 0 8px var(--linea),
    inset 0 0 0 11px var(--marfil),
    inset 0 0 0 12px #ece5d8,
    0 16px 28px -16px rgb(var(--sombra) / .55);
}

/* ---------- Hero ---------- */
.hero {
  padding-top: 44px;
  gap: 34px;
  background:
    linear-gradient(to bottom, rgb(243 239 232 / .2), var(--papel) 78%),
    url("../assets/fondo.jpg") center top / cover no-repeat;
}
.nombres {
  display: flex;
  flex-direction: column;
  align-items: center;
  font: 400 clamp(46px, 13vw, 56px)/1 var(--f-script);
  color: var(--taupe);
}
.nombres .amp { font: italic 400 .6em/1.35 var(--f-texto); }
.fecha-corta {
  font: 400 22px/1 var(--f-caps);
  letter-spacing: .2em;
  color: var(--taupe);
  font-variant-numeric: lining-nums;
}

/* ---------- Banda azul ---------- */
.banda {
  background:
    radial-gradient(120% 60% at 50% 0%, rgb(255 255 255 / .16), transparent 70%),
    var(--banda);
  color: var(--blanco);
  gap: 22px;
}
.banda .caps { color: var(--blanco); }
.ovalo {
  position: relative;
  width: min(70%, 250px);
  aspect-ratio: 4 / 5;
  padding: 13px;
  border-radius: 50%;
  background: radial-gradient(ellipse at 30% 20%, #e1e7f0, #aebcd0 72%);
  box-shadow: 0 16px 30px -14px rgb(var(--sombra) / .6), inset 0 0 0 1px rgb(255 255 255 / .6);
}
.ovalo::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 2.5px dotted rgb(255 255 255 / .9);
  border-radius: 50%;
}
.ovalo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  border-radius: 50%;
  box-shadow: 0 0 0 3px #cbd5e2, 0 0 0 4px rgb(255 255 255 / .7);
}
.adorno { width: 170px; height: 16px; color: rgb(255 255 255 / .85); }
.familia { display: flex; flex-direction: column; gap: 20px; }
.familia h3 { font: 400 34px/1.15 var(--f-script); }
.familia p { font-size: 15px; line-height: 1.6; text-wrap: balance; }
.eventos { display: flex; flex-direction: column; align-items: center; gap: 22px; width: 100%; margin-top: 12px; }
.evento-icono { width: 38px; height: 38px; color: var(--oro); }
.evento-tipo { font: 400 42px/1.1 var(--f-script); color: var(--taupe); }
.evento-hora { font-weight: 500; }
.evento-lugar { font-style: italic; }
.evento-direccion { color: var(--taupe); font-size: 14px; }
.tarjeta-fina .boton { margin-top: 10px; }
.nota {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  font-style: italic;
  max-width: 32ch;
}
.nota svg { width: 18px; height: 18px; fill: var(--blanco); }

/* ---------- Vestimenta ---------- */
.vestimenta { background: var(--papel); }
.vestimenta-estilo { font: 500 15px/1.3 var(--f-caps); letter-spacing: .2em; color: var(--tinta); }
.colores-titulo { font-weight: 600; color: var(--taupe); font-size: 14px; }
.etiqueta { margin-top: 8px; font-size: 12px; letter-spacing: .18em; }
.paleta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 6px;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}
.paleta li { width: 60px; display: flex; flex-direction: column; align-items: center; gap: 7px; }
.muestra {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / .07), 0 0 0 3px var(--marfil), 0 2px 6px 3px rgb(var(--sombra) / .12);
}
.muestra svg { width: 16px; height: 16px; fill: none; stroke: var(--blanco); stroke-width: 1.5; stroke-linecap: round; }
.muestra.clara svg { stroke: var(--tinta); }
.muestra-nombre {
  font: 400 10.5px/1.3 var(--f-caps);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--taupe);
  text-align: center;
}
.looks { display: flex; flex-direction: column; gap: 20px; width: min(100%, 360px); }
.look { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.look img { width: 100%; border-radius: 12px; box-shadow: 0 12px 24px -14px rgb(var(--sombra) / .5); }
.look figcaption { font-size: 12px; letter-spacing: .22em; }
.evitar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: min(100%, 360px);
  margin-top: 10px;
  padding: 18px 10px 20px;
  border: 1px solid var(--linea);
  border-radius: 16px;
  background: rgb(253 251 246 / .7);
}
.evitar > .caps { font-size: 12px; letter-spacing: .12em; }
.paleta-evitar li { width: 64px; }
.paleta-evitar .muestra { width: 36px; height: 36px; }
.reservado { max-width: 32ch; font-style: italic; font-size: 14px; color: var(--taupe); text-wrap: balance; }

/* ---------- Programa ---------- */
.programa { background: var(--papel); padding-top: 24px; }
.programa-sobre { position: relative; width: min(100%, 340px); display: flex; flex-direction: column; align-items: center; }
.programa-sobre .sobre { perspective: none; }
.programa-sobre .tarjeta-encaje { width: 90%; margin-top: -26%; padding-top: 46px; }
.programa-lista {
  position: relative;
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-align: left;
  width: 100%;
}
.programa-lista::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 57px;
  width: 1px;
  background: var(--linea);
}
.programa-lista li {
  display: grid;
  grid-template-columns: 40px 34px minmax(0, 1fr);
  align-items: center;
}
.programa-lista .icono { width: 34px; height: 34px; color: var(--oro); }
.programa-lista .punto {
  justify-self: center;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--marfil);
  box-shadow: 0 0 0 1px var(--oro);
  position: relative;
}
.programa-hora { font: 600 14px/1.3 var(--f-texto); color: var(--tinta); font-variant-numeric: tabular-nums; }
.programa-actividad { font-size: 14px; line-height: 1.35; color: var(--taupe); }

/* ---------- Cuenta regresiva ---------- */
.cuenta { display: flex; align-items: flex-start; justify-content: center; gap: 4px; }
.cuenta-bloque { display: flex; flex-direction: column; align-items: center; min-width: clamp(44px, 14vw, 58px); }
.cuenta-num {
  font: 400 clamp(30px, 9.5vw, 40px)/1.1 var(--f-caps);
  color: var(--oro);
  font-variant-numeric: tabular-nums lining-nums;
}
.cuenta-sep { font: 400 34px/1.15 var(--f-caps); color: var(--oro); }
.cuenta-lbl { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--taupe); }
.fecha-larga { color: var(--taupe); font-style: italic; }

/* ---------- Regalos ---------- */
.regalo-icono { width: 46px; height: 46px; color: var(--oro); }
.cuentas { display: flex; flex-direction: column; gap: 14px; width: min(100%, 340px); }
.cuenta-banco {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 18px 16px;
  border: 1px solid var(--linea);
  border-radius: 14px;
  background: rgb(253 251 246 / .75);
  font-size: 14px;
  line-height: 1.5;
}
.cuenta-banco strong { font: 600 italic 15px/1.4 var(--f-texto); color: var(--tinta); }
.cuenta-banco .dato { color: var(--taupe); }
.cuenta-numero {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--tinta);
}
.copiar {
  padding: 4px 12px;
  border: 1px solid var(--linea);
  border-radius: 999px;
  background: var(--marfil);
  color: var(--taupe);
  font: 500 12px/1.4 var(--f-texto);
  cursor: pointer;
}

/* ---------- Confirmación ---------- */
.confirmar { padding-bottom: 40px; }
.sf-tarjeta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 26px 14px 0;
  transform: none;
  background: var(--marfil);
  box-shadow:
    inset 0 0 0 6px var(--marfil),
    inset 0 0 0 7px var(--linea),
    0 6px 16px -6px rgb(var(--sombra) / .45);
}
.sf-tarjeta .caps { font-size: clamp(17px, 5vw, 20px); letter-spacing: .08em; line-height: 1.25; color: var(--taupe); }
.limite { font-size: 14px; color: var(--taupe); max-width: 30ch; }

/* ---------- Detalles y despedida ---------- */
.detalles { background: var(--papel); padding-top: 28px; }
.despedida {
  background:
    linear-gradient(to top, rgb(243 239 232 / .15), var(--papel) 80%),
    url("../assets/fondo.jpg") center bottom / cover no-repeat;
  padding-bottom: 96px;
  gap: 6px;
}
.despedida .nombres { font-size: 44px; }

/* ---------- Botón de música ---------- */
.boton-musica {
  position: fixed;
  top: calc(14px + env(safe-area-inset-top, 0px));
  right: max(14px, calc(env(safe-area-inset-right, 0px) + 14px), calc((100vw - var(--columna)) / 2 + 14px));
  z-index: 40;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: rgb(129 147 173 / .82);
  color: var(--blanco);
  cursor: pointer;
  box-shadow: 0 6px 16px -6px rgb(var(--sombra) / .5);
}
.boton-musica svg { width: 24px; height: 24px; }
.boton-musica .tachado { display: none; }
.boton-musica.pausado .tachado { display: block; }

/* =====================================================================
   Hojas (confirmación y detalles)
   ===================================================================== */
.hoja {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.hoja-fondo { position: absolute; inset: 0; background: rgb(var(--sombra) / .45); }
.hoja-panel {
  position: relative;
  width: min(100%, var(--columna));
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 30px var(--gutter-r) max(28px, env(safe-area-inset-bottom, 0px)) var(--gutter-l);
  border-radius: 20px 20px 0 0;
  background: var(--marfil);
  box-shadow: 0 -10px 40px rgb(var(--sombra) / .25);
  animation: subir .35s cubic-bezier(.2, .7, .2, 1);
}
.hoja-panel .titulo { font-size: 36px; text-align: center; padding-inline: 34px; }
.hoja-panel > .texto { align-self: center; text-align: center; text-wrap: balance; color: var(--taupe); }
.hoja-cerrar {
  position: absolute;
  top: 12px;
  right: max(12px, env(safe-area-inset-right, 0px));
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--taupe);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
@keyframes subir { from { transform: translateY(40px); opacity: 0; } }

.formulario { display: flex; flex-direction: column; gap: 16px; }
.campo { display: flex; flex-direction: column; gap: 6px; border: 0; margin: 0; padding: 0; }
.campo > label, .campo > legend {
  padding: 0;
  font: 500 12px/1.3 var(--f-caps);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--taupe);
}
.campo input[type="text"], .campo select, .campo textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d9cfbf;
  border-radius: 12px;
  background: var(--blanco);
  color: var(--tinta);
  font: 400 16px/1.4 var(--f-texto);
}
.campo textarea { resize: vertical; min-height: 84px; }
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: 2px solid var(--azul); outline-offset: 1px; }
.opciones { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.opcion {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid #d9cfbf;
  border-radius: 12px;
  background: var(--blanco);
  text-align: center;
  font-size: 14px;
  line-height: 1.3;
  cursor: pointer;
}
.opcion input { position: absolute; opacity: 0; pointer-events: none; }
.opcion:has(input:checked) { border-color: var(--azul-hondo); background: #eef2f7; color: var(--tinta); box-shadow: inset 0 0 0 1px var(--azul-hondo); }
.opcion:has(input:focus-visible) { outline: 2px solid var(--azul-hondo); outline-offset: 2px; }
.ayuda { font-size: 13px; color: var(--taupe); }
.texto-centro { text-align: center; }
.estado { min-height: 1.4em; font-size: 14px; text-align: center; color: var(--tinta); }
.estado.error { color: #9a4b3c; }

.detalles-lista { display: flex; flex-direction: column; gap: 14px; }
.detalle { padding: 16px; border: 1px solid var(--linea); border-radius: 14px; background: var(--blanco); }
.detalle h3 { font: 500 14px/1.3 var(--f-caps); letter-spacing: .08em; color: var(--taupe); margin-bottom: 6px; }
.detalle p { font-size: 14px; }

/* =====================================================================
   Aparición suave al hacer scroll
   ===================================================================== */
.anim .revelar { opacity: 0; transform: translateY(18px); transition: opacity .9s ease, transform .9s ease; }
.anim .revelar.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .portada, .portada *, .hoja-panel { animation-duration: .01s !important; animation-delay: 0s !important; transition-duration: .01s !important; }
  .anim .revelar { opacity: 1; transform: none; transition: none; }
}
