/* Invitacion baby shower. Sin framework ni bibliotecas: el sobre se anima con transiciones CSS. */

@font-face { font-family: "Fraunces"; src: url("fuentes/Fraunces-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("fuentes/Fraunces-wght-italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Caveat"; src: url("fuentes/Caveat-wght-normal.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("fuentes/HankenGrotesk-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  /* config.js los sobrescribe; estos son los mismos valores por si falla */
  --papel: #f7f1e8; --tinta: #3d3833; --suave: #7a7068; --acento: #b98466; --salvia: #93a68c;
  --rubor: #ecc9bb; --sobre: #e9d6c4; --sobre-oscuro: #d9bfa8; --sello: #a8624a;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --mano: "Caveat", "Segoe Print", "Bradley Hand", cursive;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radio: 14px;
  --sombra: 0 1px 2px rgb(61 56 51 / .06), 0 8px 24px -8px rgb(61 56 51 / .18);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; background: var(--papel); color: var(--tinta);
  font: 400 1.0625rem/1.55 var(--sans);
  background-image:
    radial-gradient(1200px 600px at 10% -10%, color-mix(in srgb, var(--rubor) 45%, transparent), transparent 60%),
    radial-gradient(900px 600px at 110% 110%, color-mix(in srgb, var(--salvia) 30%, transparent), transparent 60%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.noscript { text-align: center; padding: 2rem 1rem; }

main { min-height: 100dvh; display: grid; place-items: center; padding: max(24px, env(safe-area-inset-top)) 16px max(32px, env(safe-area-inset-bottom)); }

/* ---------- botones ---------- */
.boton {
  -webkit-appearance: none; appearance: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: .75rem 1.5rem; border-radius: 999px;
  background: var(--tinta); color: var(--papel);
  font-weight: 600; letter-spacing: .01em; text-decoration: none;
  transition: transform .15s ease, background-color .2s ease, opacity .2s ease;
  touch-action: manipulation;
}
.boton:hover { background: color-mix(in srgb, var(--tinta) 88%, var(--acento)); }
.boton:active { transform: scale(.97); }
.boton:focus-visible, .opcion input:focus-visible + span, .contador-b:focus-visible, textarea:focus-visible, .contador input:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--acento) 70%, white); outline-offset: 3px;
}
.boton[disabled] { opacity: .45; cursor: default; transform: none; }
.boton-sec { background: transparent; color: var(--tinta); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--tinta) 35%, transparent); }
.boton-sec:hover { background: color-mix(in srgb, var(--tinta) 6%, transparent); }

/* ---------- 1. el sobre ---------- */
.escena-sobre { display: grid; justify-items: center; gap: 28px; width: 100%; padding-top: 12vh; }
.sobre {
  --ancho: min(86vw, 420px);
  position: relative; width: var(--ancho); aspect-ratio: 1.45; perspective: 1200px;
  filter: drop-shadow(0 18px 28px rgb(61 56 51 / .22));
}
.sobre > * { position: absolute; }
.sobre-fondo { inset: 0; border-radius: 8px; background: var(--sobre-oscuro); }
.carta {
  left: 6%; right: 6%; top: 6%; height: 88%; z-index: 2;
  border-radius: 6px; background: #fffdf9;
  box-shadow: 0 0 0 1px rgb(61 56 51 / .06);
  display: grid; align-content: start; justify-items: center; padding-top: 9%; gap: .1em;
  transition: transform .9s cubic-bezier(.2, .8, .2, 1);
}
.carta-ante { font: 600 clamp(1.1rem, 5vw, 1.5rem)/1 var(--mano); color: var(--acento); }
.carta-nombre { font: italic 400 clamp(2rem, 10vw, 3rem)/1.05 var(--serif); }
.sobre-bolsillo {
  inset: 0; z-index: 3; border-radius: 8px;
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--sobre) 92%, white), var(--sobre) 55%, color-mix(in srgb, var(--sobre) 90%, var(--sobre-oscuro)));
  clip-path: polygon(0 0, 50% 52%, 100% 0, 100% 100%, 0 100%);
}
.solapa {
  inset: 0 0 auto 0; height: 60%; z-index: 4;
  background: linear-gradient(180deg, color-mix(in srgb, var(--sobre) 85%, var(--sobre-oscuro)), var(--sobre));
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: 50% 0; transform: rotateX(0deg);
  transition: transform .75s cubic-bezier(.45, .05, .25, 1), z-index 0s linear .37s;
  backface-visibility: visible;
  border-radius: 8px 8px 0 0;
}
.sello {
  left: 50%; top: 60%; z-index: 5; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--sello) 70%, white), var(--sello) 55%, color-mix(in srgb, var(--sello) 80%, black));
  box-shadow: 0 2px 4px rgb(0 0 0 / .25), inset 0 0 0 4px rgb(255 255 255 / .12);
  display: grid; place-items: center; color: #fff6ee; font: italic 500 1.6rem/1 var(--serif);
  transition: transform .35s ease, opacity .35s ease;
}
.sobre-para {
  left: 8%; right: 8%; bottom: 7%; z-index: 5; margin: 0; text-align: center;
  font: 600 clamp(1.2rem, 5.4vw, 1.6rem)/1.15 var(--mano); color: color-mix(in srgb, var(--tinta) 85%, var(--sobre-oscuro));
  overflow-wrap: anywhere;
}
.sobre-para-et { font-weight: 400; color: var(--suave); }
.sobre-estado { margin: 0; min-height: 1.5em; color: var(--suave); font-size: .95rem; text-align: center; }
.estado-listo .sobre-estado { visibility: hidden; }

/* apertura */
.abriendo .sello { transform: scale(.6); opacity: 0; }
.abriendo .solapa { transform: rotateX(180deg); z-index: 1; }
.abriendo .carta { transform: translateY(-58%); transition-delay: .55s; }
.abriendo .boton-abrir { opacity: 0; pointer-events: none; }
.saliendo .escena-sobre { opacity: 0; transform: translateY(12px) scale(.98); transition: opacity .45s ease, transform .45s ease; }

/* espera suave mientras carga */
.estado-cargando .sobre { animation: respira 2.4s ease-in-out infinite; }
@keyframes respira { 50% { transform: translateY(-4px); } }

/* ---------- 2. aviso ---------- */
.aviso { width: min(100%, 480px); }
.aviso-carta { background: #fffdf9; border-radius: var(--radio); padding: 32px 24px; box-shadow: var(--sombra); text-align: center; }
.aviso-ante { margin: 0 0 .25rem; font: 600 1.4rem/1 var(--mano); color: var(--acento); }
.aviso-titulo { margin: 0 0 .75rem; font: italic 400 clamp(1.6rem, 6vw, 2rem)/1.15 var(--serif); text-wrap: balance; }
.aviso-carta p:last-child { margin: 0; color: var(--suave); text-wrap: pretty; }

/* ---------- 3. invitacion ---------- */
.invitacion {
  width: min(100%, 560px); background: #fffdf9; border-radius: 18px; box-shadow: var(--sombra);
  padding: 40px 22px 28px; text-align: center; position: relative;
  animation: aparece .7s cubic-bezier(.2, .8, .2, 1) both;
}
.invitacion::before { /* marco fino */
  content: ""; position: absolute; inset: 10px; border-radius: 12px; pointer-events: none;
  border: 1px solid color-mix(in srgb, var(--acento) 35%, transparent);
}
@keyframes aparece { from { opacity: 0; transform: translateY(18px); } }
.inv-ante { margin: 0; font: 600 clamp(1.5rem, 6vw, 1.9rem)/1 var(--mano); color: var(--acento); }
.inv-titulo { margin: .1em 0 .2em; font: italic 350 clamp(3rem, 15vw, 5rem)/1 var(--serif); letter-spacing: -.01em; outline: none; overflow-wrap: anywhere; }
.inv-frase { margin: 0 auto; max-width: 30ch; color: var(--suave); text-wrap: pretty; }

.inv-ilustracion { margin: 24px auto 8px; width: min(78%, 300px); }
.inv-ilustracion img, .inv-ilustracion svg { display: block; width: 100%; height: auto; }

.inv-datos { display: grid; gap: 14px; margin: 24px 0 0; padding: 20px 0; border-block: 1px solid color-mix(in srgb, var(--tinta) 12%, transparent); }
.inv-datos div { display: grid; gap: 2px; }
.inv-datos dt { font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--suave); }
.inv-datos dd { margin: 0; font: 500 1.2rem/1.35 var(--serif); text-wrap: balance; overflow-wrap: anywhere; }
.inv-dir { font: 400 1rem/1.4 var(--sans); color: var(--suave); }
.inv-mapa { margin: 16px 0 0; }
.inv-nota { margin: 18px auto 0; max-width: 34ch; font-size: .95rem; color: var(--suave); text-wrap: pretty; }
.inv-nota:empty { display: none; }
.inv-pie { margin-top: 28px; font: 600 1.4rem/1.2 var(--mano); color: var(--acento); }
.inv-pie p { margin: 0; }

.por-definir { background: color-mix(in srgb, var(--rubor) 45%, transparent); border-radius: 4px; padding: 0 .2em; box-decoration-break: clone; -webkit-box-decoration-break: clone; font-style: normal; }

/* ---------- respuesta ---------- */
.rsvp { margin-top: 28px; padding: 24px 18px; border-radius: var(--radio); background: color-mix(in srgb, var(--salvia) 12%, #fffdf9); text-align: left; }
.rsvp-titulo { margin: 0; text-align: center; font: italic 400 1.75rem/1.15 var(--serif); }
.rsvp-sub { margin: .35rem 0 1.25rem; text-align: center; color: var(--suave); font-size: .95rem; display: grid; gap: 2px; }
.rsvp-sub #rsvp-nucleo { font-weight: 600; color: var(--tinta); overflow-wrap: anywhere; }
.rsvp-antes:empty { display: none; }

.campo { border: 0; margin: 0 0 18px; padding: 0; min-width: 0; }
.campo > label, .campo legend { display: block; padding: 0; margin-bottom: 8px; font-weight: 600; }
.opc { font-weight: 400; color: var(--suave); }
.opciones { display: grid; gap: 10px; }
@media (min-width: 420px) { .opciones { grid-template-columns: 1fr 1fr; } }
.opcion { position: relative; cursor: pointer; }
.opcion input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.opcion span {
  display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 10px 14px; border-radius: 12px; text-align: center;
  background: #fffdf9; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--tinta) 18%, transparent);
  transition: background-color .15s ease, box-shadow .15s ease;
}
.opcion:hover span { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--tinta) 40%, transparent); }
.opcion input:checked + span { background: var(--tinta); color: var(--papel); box-shadow: none; font-weight: 600; }

.contador { display: flex; align-items: center; gap: 10px; }
.contador-b {
  width: 48px; height: 48px; flex: none; border-radius: 50%; border: 0; cursor: pointer;
  background: #fffdf9; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--tinta) 25%, transparent);
  font-size: 1.5rem; line-height: 1; touch-action: manipulation;
}
.contador-b:disabled { opacity: .35; cursor: default; }
.contador input {
  width: 4.5rem; height: 48px; text-align: center; border: 0; border-radius: 12px; background: #fffdf9;
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--tinta) 18%, transparent);
  font: 600 1.25rem/1 var(--sans); -moz-appearance: textfield; appearance: textfield;
}
.contador input::-webkit-inner-spin-button, .contador input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.ayuda { margin: 8px 0 0; font-size: .9rem; color: var(--suave); }

textarea {
  display: block; width: 100%; min-height: 96px; padding: 12px 14px; border: 0; border-radius: 12px; resize: vertical;
  background: #fffdf9; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--tinta) 18%, transparent);
  font-size: 1rem; /* 16px: iOS no hace zoom al enfocar */
}
.error { margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; background: #f7e1dc; color: #7a2d1f; font-size: .95rem; }
.rsvp-form .boton[type=submit] { width: 100%; }
.enviando .boton[type=submit] { opacity: .6; pointer-events: none; }

.rsvp-hecho { text-align: center; }
.rsvp-hecho-texto { margin: 0 0 .5rem; font: 500 1.2rem/1.4 var(--serif); text-wrap: balance; }
.rsvp-hecho-mensaje { margin: 0 auto 1rem; max-width: 34ch; font-style: italic; color: var(--suave); overflow-wrap: anywhere; white-space: pre-line; }
.rsvp-hecho .boton { margin-top: .5rem; }
.rsvp-hecho.recien { animation: aparece .5s ease both; }

@media (min-width: 640px) {
  .invitacion { padding: 56px 48px 40px; }
  .rsvp { padding: 28px; }
}

/* ---------- temas (temas.js pone data-tema en <html>) ---------- */
.adornos { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
main { position: relative; z-index: 1; }
.adorno { position: absolute; }
.sello-dibujo { font-size: 0; }

/* OLIMPO: lila y dorado, laurel, nombre en capitales romanas */
:root[data-tema="olimpo"] {
  --papel: #f8f5fc; --tinta: #3f2b57; --suave: #7d6f8f; --acento: #a8843a; --salvia: #9a86b8;
  --rubor: #e8def4; --sobre: #efe7f8; --sobre-oscuro: #d8c9ec; --sello: #6e4c96;
}
[data-tema="olimpo"] body {
  background-image:
    radial-gradient(900px 520px at 50% -8%, #e6dbf5, transparent 65%),
    radial-gradient(700px 500px at 100% 100%, #efe6d2, transparent 60%);
}
[data-tema="olimpo"] .adorno-izq, [data-tema="olimpo"] .adorno-der { top: 50%; width: min(16vw, 150px); transform: translateY(-50%); opacity: .55; }
[data-tema="olimpo"] .adorno-izq { left: 0; }
[data-tema="olimpo"] .adorno-der { right: 0; }
@media (max-width: 640px) { [data-tema="olimpo"] .adorno-izq, [data-tema="olimpo"] .adorno-der { opacity: .28; width: 22vw; } }
[data-tema="olimpo"] .inv-titulo, [data-tema="olimpo"] .carta-nombre {
  font-style: normal; font-weight: 450; text-transform: uppercase; letter-spacing: .05em;
  color: var(--tinta); font-size: clamp(2.6rem, 12.5vw, 4.4rem);
}
[data-tema="olimpo"] .carta-nombre { font-size: clamp(1.5rem, 7.5vw, 2.3rem); }
[data-tema="olimpo"] .inv-ante, [data-tema="olimpo"] .carta-ante, [data-tema="olimpo"] .aviso-ante {
  font: 500 .8rem/1.2 var(--serif); letter-spacing: .32em; text-transform: uppercase; color: var(--acento);
}
[data-tema="olimpo"] .inv-cabecera::after { /* filete dorado con rombo, como bajo el nombre de la camiseta */
  content: ""; display: block; width: min(70%, 280px); height: 12px; margin: 16px auto 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 280 12' preserveAspectRatio='none'%3E%3Cpath d='M0 6H126M154 6H280' stroke='%23a8843a' stroke-width='1'/%3E%3Cpath d='M140 0L146 6L140 12L134 6Z' fill='%23a8843a'/%3E%3Ccircle cx='127' cy='6' r='1.6' fill='%23a8843a'/%3E%3Ccircle cx='153' cy='6' r='1.6' fill='%23a8843a'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
[data-tema="olimpo"] .solapa { background: linear-gradient(180deg, #dccdef, var(--sobre)); }
[data-tema="olimpo"] .sobre-bolsillo { background: linear-gradient(160deg, #f6f1fb, var(--sobre) 55%, #e6daf3); }
[data-tema="olimpo"] .invitacion::before { border-color: color-mix(in srgb, var(--acento) 55%, transparent); inset: 9px; }
[data-tema="olimpo"] .invitacion::after { content: ""; position: absolute; inset: 14px; border-radius: 9px; pointer-events: none; border: 1px solid color-mix(in srgb, var(--salvia) 35%, transparent); }
[data-tema="olimpo"] .rsvp { background: color-mix(in srgb, var(--rubor) 45%, #fffdfb); }
[data-tema="olimpo"] .inv-pie { font: italic 400 1.15rem/1.3 var(--serif); }
[data-tema="olimpo"] .sello { background: radial-gradient(circle at 35% 30%, #e6c97e, #b08a3e 55%, #7d5f22); color: #fffaf0; font-style: normal; }
[data-tema="olimpo"] .boton:not(.boton-sec) { background: var(--tinta); }

/* ROSAS: acuarela rosa, ramos en las esquinas, sello de corazon */
:root[data-tema="rosas"] {
  --papel: #fdf4f4; --tinta: #5b3a42; --suave: #9b7b82; --acento: #cf5d78; --salvia: #b6c2ad;
  --rubor: #f7d5d9; --sobre: #f6d7da; --sobre-oscuro: #ecbfc4; --sello: #d9465f;
}
[data-tema="rosas"] body {
  background-image:
    radial-gradient(420px 300px at 12% 22%, rgb(246 200 207 / .55), transparent 70%),
    radial-gradient(380px 280px at 88% 64%, rgb(246 200 207 / .45), transparent 70%),
    radial-gradient(500px 340px at 40% 96%, rgb(240 214 196 / .4), transparent 70%);
}
[data-tema="rosas"] .adorno-sup { top: 0; left: 0; width: 100%; height: min(26vw, 170px); }
[data-tema="rosas"] .adorno-inf { bottom: 0; left: 0; width: 100%; height: min(22vw, 140px); }
[data-tema="rosas"] .sello { background: none; box-shadow: none; width: 64px; height: 64px; margin: -32px 0 0 -32px; }
[data-tema="rosas"] .sello svg { width: 64px; height: 64px; filter: drop-shadow(0 2px 3px rgb(150 40 60 / .3)); }
[data-tema="rosas"] .sello svg path { fill: var(--sello); }
[data-tema="rosas"] .inv-titulo { color: var(--tinta); }
[data-tema="rosas"] .invitacion::before { border-color: color-mix(in srgb, var(--acento) 30%, transparent); }
[data-tema="rosas"] .rsvp { background: color-mix(in srgb, var(--rubor) 40%, #fffdfd); }
[data-tema="rosas"] .boton:not(.boton-sec) { background: var(--acento); }
[data-tema="rosas"] .boton:not(.boton-sec):hover { background: color-mix(in srgb, var(--acento) 85%, black); }
[data-tema="rosas"] .opcion input:checked + span { background: var(--acento); }
[data-tema="rosas"] .escena-sobre { padding-top: 16vh; }

/* ================= VERSION 2 (Omar, 2026-11-25): sobre vivo, carta de papel, respuesta con botones ================= */

/* nubes y columnas pueden asomar fuera de la carta, pero nunca crear scroll horizontal en el movil */
html { overflow-x: hidden; }
main { overflow-x: clip; }

/* --- escena del sobre a pantalla completa, con detalles alrededor --- */
.escena-sobre { position: relative; min-height: calc(100dvh - 56px); align-content: center; padding-top: 0; }
.escena-sobre > :not(.destellos) { position: relative; z-index: 1; }
.destellos { position: absolute; inset: -24px -16px; pointer-events: none; z-index: 0; overflow: hidden; }
.d { position: absolute; display: block; }
.d svg { display: block; width: 100%; height: auto; }
.d-brillo { animation: centellea 2.8s ease-in-out infinite; }
.d-corona { animation: flota-suave 6s ease-in-out infinite; filter: drop-shadow(0 3px 4px rgb(120 90 30 / .18)); }
.d-fugaz { opacity: 0; transform-origin: 0 50%; animation: fugaz 9s ease-in infinite; }
@keyframes fugaz { 0%, 70% { opacity: 0; transform: translate(0, 0) rotate(22deg); } 74% { opacity: .85; } 84%, 100% { opacity: 0; transform: translate(70px, 28px) rotate(22deg); } }
.d-petalo { animation: cae 11s linear infinite; opacity: 0; }
@keyframes centellea { 0%, 100% { transform: scale(.55) rotate(0deg); opacity: .25; } 50% { transform: scale(1) rotate(25deg); opacity: 1; } }
@keyframes flota-suave { 0%, 100% { transform: translateY(0) rotate(-5deg); } 50% { transform: translateY(-10px) rotate(5deg); } }
@keyframes cae {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
  8% { opacity: .9; }
  50% { transform: translate(28px, 48vh) rotate(160deg); }
  92% { opacity: .8; }
  100% { transform: translate(-12px, 100vh) rotate(320deg); opacity: 0; }
}
.abriendo .destellos, .saliendo .destellos { opacity: 0; transition: opacity .6s ease; }

/* --- animacion previa a la apertura: llega, flota y "llama" de vez en cuando --- */
.sobre-mueve { animation: llega 1s cubic-bezier(.2, .9, .25, 1.15) both, flota 5s ease-in-out 1s infinite; }
@keyframes llega { from { opacity: 0; transform: translateY(-40px) rotate(-6deg) scale(.94); } }
@keyframes flota { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.estado-listo:not(.abriendo) .sobre { animation: llama 5s ease-in-out 1.6s infinite; transform-origin: 50% 80%; }
@keyframes llama { 0%, 82%, 100% { transform: rotate(0); } 85% { transform: rotate(-2.2deg); } 89% { transform: rotate(2deg); } 93% { transform: rotate(-1.2deg); } 96% { transform: rotate(.6deg); } }
.abriendo .sobre-mueve { animation: none; }
.sello { overflow: hidden; }
.sello::after { /* brillo que recorre el sello */
  content: ""; position: absolute; inset: -20%; pointer-events: none;
  background: linear-gradient(115deg, transparent 38%, rgb(255 255 255 / .75) 50%, transparent 62%);
  transform: translateX(-120%); animation: destello-sello 4s ease-in-out 1.2s infinite;
}
@keyframes destello-sello { 0%, 60% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }
/* el sello ES el boton: al tocarlo se abre la carta */
button.sello { border: 0; padding: 0; cursor: pointer; -webkit-appearance: none; appearance: none; touch-action: manipulation; }
button.sello:disabled { cursor: progress; }
button.sello svg { position: relative; z-index: 1; width: 74%; height: auto; filter: drop-shadow(0 1px 0 rgb(90 60 10 / .45)); }
.estado-listo .sobre { cursor: pointer; }
.estado-listo:not(.abriendo) button.sello:hover { transform: scale(1.06); }
button.sello:focus-visible { outline: 3px solid #fffaf0; outline-offset: 3px; box-shadow: 0 0 0 6px color-mix(in srgb, var(--acento) 70%, transparent); }
[data-tema="olimpo"] .sello { width: 70px; height: 70px; margin: -35px 0 0 -35px; }
.sobre-anillo { position: absolute; left: 50%; top: 60%; z-index: 4; width: 70px; height: 70px; margin: -35px 0 0 -35px; border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--acento) 55%, transparent); }
.estado-listo:not(.abriendo) .sobre-anillo { animation: late 2.4s ease-out 1.2s infinite; }
@keyframes late { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--acento) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 18px transparent; } }
.sobre-pista { margin: 0; font-size: 1.35rem; color: #6a5490; opacity: 0; transition: opacity .6s ease; text-align: center; }
.estado-listo .sobre-pista { opacity: .9; animation: aparece .7s ease 1s both; }
.abriendo .sobre-pista { opacity: 0; transition-duration: .2s; }

/* --- carta de papel con partes a mano --- */
.papel {
  background-color: #fffcf4;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .38 0 0 0 0 .3 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E"),
    radial-gradient(120% 90% at 50% 40%, transparent 60%, rgb(176 138 62 / .10) 100%);
  box-shadow: 0 1px 2px rgb(61 40 80 / .08), 0 18px 40px -14px rgb(61 40 80 / .28), inset 0 0 0 1px rgb(176 138 62 / .12);
}
.mano { font-family: var(--mano); font-weight: 500; color: #4b3a6e; }
.mano-para { margin: 0 0 6px; text-align: left; font-size: 1.45rem; line-height: 1.1; transform: rotate(-2deg); transform-origin: left; padding-left: 4px; overflow-wrap: anywhere; }
.invitacion .inv-frase.mano { margin: 18px auto 0; max-width: 24ch; font-size: clamp(1.45rem, 6vw, 1.7rem); line-height: 1.25; color: #4b3a6e; }
.inv-nota { display: grid; gap: 2px; margin: 22px auto 0; max-width: 30ch; padding: 12px 16px; border-radius: 12px; border: 1px dashed color-mix(in srgb, var(--acento) 55%, transparent); color: var(--tinta); font-size: 1rem; }
.inv-nota-et { font: 600 .72rem/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--acento); }
.inv-firma { margin: 26px auto 4px; font-size: clamp(1.55rem, 6.4vw, 1.85rem); line-height: 1.15; transform: rotate(-1.5deg); }

/* --- respuesta con botones --- */
.rsvp { text-align: center; }
.rsvp-antes { margin: .35rem 0 1.25rem; color: var(--suave); font-size: .95rem; }
.rsvp-botones { display: grid; gap: 10px; }
.boton-ancho { width: 100%; }
.enlace { background: none; border: 0; padding: 10px 6px; margin-top: 6px; color: var(--suave); font: inherit; font-size: .95rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 44px; }
.enlace:hover { color: var(--tinta); }
.enlace:focus-visible { outline: 3px solid color-mix(in srgb, var(--acento) 70%, white); outline-offset: 2px; border-radius: 6px; }

/* --- ventana desde abajo --- */
.hoja-fondo { position: fixed; inset: 0; z-index: 20; background: rgb(40 24 60 / .38); opacity: 0; transition: opacity .3s ease; }
.hoja {
  position: fixed; z-index: 21; left: 50%; bottom: 0; width: min(100%, 520px);
  transform: translate(-50%, 104%); transition: transform .32s cubic-bezier(.2, .8, .2, 1);
  background: #fffcf4; border-radius: 22px 22px 0 0; box-shadow: 0 -12px 40px rgb(40 24 60 / .25);
  padding: 10px 20px max(22px, env(safe-area-inset-bottom)); text-align: center;
}
.hoja-abierta .hoja { transform: translate(-50%, 0); }
.hoja-abierta .hoja-fondo { opacity: 1; }
.con-hoja { overflow: hidden; }
.hoja-asa { width: 44px; height: 5px; border-radius: 3px; margin: 0 auto 16px; background: color-mix(in srgb, var(--tinta) 22%, transparent); }
.hoja-titulo { margin: 0 0 4px; font: italic 400 1.5rem/1.2 var(--serif); color: var(--tinta); }
.hoja-sub { margin: 0 0 18px; color: var(--suave); font-size: .95rem; }
.cantidades { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 18px; }
.cantidad {
  width: 60px; height: 60px; border-radius: 16px; border: 0; cursor: pointer; touch-action: manipulation;
  background: #fff; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--tinta) 20%, transparent);
  font: 600 1.35rem/1 var(--serif); color: var(--tinta); transition: background-color .15s ease, transform .15s ease;
}
.cantidad:hover { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--tinta) 45%, transparent); }
.cantidad:active { transform: scale(.95); }
.cantidad[aria-checked="true"] { background: var(--tinta); color: #fffaf0; box-shadow: 0 0 0 3px color-mix(in srgb, var(--acento) 55%, transparent); }
.cantidad:focus-visible { outline: 3px solid color-mix(in srgb, var(--acento) 70%, white); outline-offset: 3px; }
.hoja .error { text-align: left; }
.boton.enviando { opacity: .7; pointer-events: none; }

/* --- confirmacion --- */
.rsvp-hecho { outline: none; }
.rsvp-hecho.recien { animation: aparece .55s ease both; }
.hecho-icono { width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 50%; position: relative;
  background: radial-gradient(circle at 35% 30%, #ecd38f, #b08a3e 60%, #8a6a26); box-shadow: 0 6px 14px rgb(138 106 38 / .3); }
.hecho-icono::after { content: ""; position: absolute; left: 23px; top: 15px; width: 14px; height: 26px; border: solid #fffaf0; border-width: 0 4px 4px 0; transform: rotate(45deg); }
.es-no .hecho-icono { background: radial-gradient(circle at 35% 30%, #d9cbec, #9a86b8 60%, #6e4c96); }
.es-no .hecho-icono::after { left: 16px; top: 30px; width: 32px; height: 0; border-width: 0 0 4px 0; transform: none; }
.hecho-titulo { margin: 0; font: italic 400 1.75rem/1.2 var(--serif); color: var(--tinta); }
.hecho-texto { margin: .4rem 0 1.1rem; font: 500 1.1rem/1.4 var(--serif); color: var(--tinta); text-wrap: balance; }
.recordatorio { margin: 0 auto 8px; max-width: 30ch; padding: 14px 16px 12px; border-radius: 14px; background: #fffcf4; border: 1px solid color-mix(in srgb, var(--acento) 45%, transparent); box-shadow: 0 6px 16px -10px rgb(61 40 80 / .3); }
.recordatorio-et { margin: 0; font: 600 .72rem/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--acento); }
.recordatorio-texto { margin: 4px 0 6px; font-size: 1.6rem; line-height: 1.15; }
.recordatorio-cuando { margin: 0; color: var(--suave); font-size: .9rem; }

/* lugar y direccion como hipervinculo a Google Maps */
.enlace-mapa { color: inherit; text-decoration: none; border-radius: 8px; display: inline-block; padding: 2px 6px; }
.enlace-mapa .inv-dir { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--acento) 60%, transparent); text-underline-offset: 3px; }
.enlace-mapa-ver { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font: 600 .78rem/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--acento); }
.enlace-mapa-ver::before { content: ""; width: 10px; height: 14px; background: var(--acento);
  clip-path: path("M5 0C2.2 0 0 2.2 0 5c0 3.7 5 9 5 9s5-5.3 5-9C10 2.2 7.8 0 5 0Zm0 7a2 2 0 1 1 0-4 2 2 0 0 1 0 4Z"); }
.enlace-mapa:hover .enlace-mapa-ver { text-decoration: underline; }
.enlace-mapa:focus-visible { outline: 3px solid color-mix(in srgb, var(--acento) 70%, white); outline-offset: 2px; }

/* ---------- movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
}
