/* ───────────────────────────────────────────────
   Carlos & Laura — Reserva la fecha
   Palette: moody editorial — deep walnut bg,
   aged-cream paper, antique gold accents.
   ─────────────────────────────────────────────── */

:root {
  /* v4 — neutral stone backdrop, amber/yellow-orange envelope */
  --bg-0: #d8d2c8;          /* warm stone */
  --bg-1: #ece6dc;          /* light linen */
  --bg-2: #b8b0a3;          /* deeper stone */
  --paper: #8ea3b8;         /* muted blue-grey envelope face */
  --paper-edge: #6a8198;    /* deeper blue-grey edge */
  --paper-shadow: rgba(80, 50, 30, 0.28);
  --ink: #3d2820;           /* warm dark walnut */
  --ink-soft: #6b4a3a;
  --gold: #d4b06a;          /* warm gold (accent) */
  --gold-deep: #a8854a;     /* deeper gold */
  --gold-bright: #e8c989;   /* light gold */
  --wax: #d4b06a;           /* gold wax seal */
  --wax-hi: #ecd29a;
  --wax-lo: #8a6a36;
  --sage: #7d9474;
  --sage-deep: #4f6b48;
  --butter: #f0c75e;
  --rose: #d97a6a;

  --serif-display: "DM Serif Display", "Italiana", "Cormorant Garamond", serif;
  --serif: "Cormorant Garamond", "Cormorant", Georgia, serif;
  --script: "Caveat", "Homemade Apple", cursive;
  --sans: "Manrope", ui-sans-serif, system-ui, sans-serif;

  --tracked: 0.18em;
  --tracked-tight: 0.08em;

  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-soft: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-back: cubic-bezier(0.34, 1.2, 0.64, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--bg-0);
  color: var(--paper);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#root { width: 100%; height: 100%; }

/* ---------- aesthetic variants ---------- */
body[data-aesthetic="modern"]    { --serif-display: "Cormorant Garamond", serif; }
body[data-aesthetic="display"]   { --serif-display: "Playfair Display", serif; --serif: "Cormorant Garamond", serif; }
body[data-aesthetic="editorial"] { --serif-display: "Italiana", serif; }
body[data-aesthetic="classical"] { --serif-display: "Cormorant Garamond", serif; --serif: "Cormorant Garamond", serif; }

/* ───────────────────────────────────────────────
   STAGE
   ─────────────────────────────────────────────── */
.stage {
  position: fixed; inset: 0;
  display: grid; place-items: center;
  background:
    radial-gradient(ellipse at 30% 0%, #fff5e3 0%, #fbe1c4 25%, #f4c694 55%, #e9a777 90%);
  overflow: hidden;
}
/* v2: sunny rays from upper-left */
.stage::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 230, 170, 0.55), transparent 45%),
    radial-gradient(ellipse at center, transparent 60%, rgba(120, 60, 30, 0.18) 100%);
  pointer-events: none;
}
.stage::before {
  /* film grain */
  content: ""; position: absolute; inset: -4%;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.4'/></svg>");
  opacity: 0.18; pointer-events: none; mix-blend-mode: overlay;
}
.stage::after {
  /* vignette */
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 45%, rgba(0,0,0,0.55) 100%);
  pointer-events: none;
}

/* ───────────────────────────────────────────────
   PARTICLES
   ─────────────────────────────────────────────── */
.particles { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.particle {
  position: absolute; top: -20px; width: 3px; height: 3px;
  background: var(--gold-bright);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(184, 204, 224, 0.65);
  opacity: 0;
  animation: drift linear infinite;
}
@keyframes drift {
  0%   { transform: translate3d(0, 0, 0) scale(0.6); opacity: 0; }
  10%  { opacity: 0.6; }
  90%  { opacity: 0.4; }
  100% { transform: translate3d(var(--dx, 60px), 110vh, 0) scale(1); opacity: 0; }
}

/* ───────────────────────────────────────────────
   ENVELOPE
   ─────────────────────────────────────────────── */
.scene {
  position: relative;
  width: min(560px, 88vw);
  aspect-ratio: 5 / 3.4;
  perspective: 1600px;
  perspective-origin: 50% 30%;
  z-index: 5;
  transition: transform 1.1s var(--ease-out), opacity 0.6s var(--ease-out);
  transform-style: preserve-3d;
}
.scene.is-open {
  transform: translateY(-2vh) scale(0.92);
  opacity: 0;
  pointer-events: none;
  transition-delay: 0.6s, 1.0s;
}

.envelope {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  /* slight 3D tilt so the envelope reads as a real object on a surface,
     not a flat sticker */
  transform: rotateX(8deg) rotateZ(-0.6deg);
  transition: transform 0.6s var(--ease-out);
}
.scene:hover .envelope { transform: rotateX(6deg) rotateZ(-0.4deg) translateY(-2px); }

/* The body of the envelope (back panel) — paper rectangle the flap sits on.
   Subtle inner highlight + side-vignette gives it volume. */
.env-body {
  position: absolute; inset: 0;
  z-index: 1;
  background:
    /* warm rim light from upper-left */
    radial-gradient(ellipse at 25% 15%, rgba(255, 250, 240, 0.35), transparent 55%),
    /* slight vignette into corners */
    radial-gradient(ellipse at 50% 130%, rgba(28, 42, 62, 0.18), transparent 60%),
    linear-gradient(165deg, var(--paper) 0%, var(--paper-edge) 100%);
  border-radius: 4px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 -1px 0 rgba(28, 42, 62, 0.1) inset,
    1px 0 0 rgba(28, 42, 62, 0.08) inset,
    -1px 0 0 rgba(28, 42, 62, 0.08) inset,
    0 0 0 1px rgba(63, 90, 128, 0.18) inset,
    /* contact shadow under envelope (close, soft) */
    0 6px 10px -4px rgba(20, 30, 50, 0.45),
    /* ambient cast shadow */
    0 30px 60px -20px rgba(20, 30, 50, 0.7),
    0 18px 28px -14px rgba(20, 30, 50, 0.55);
}
.env-body::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='p'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/><feColorMatrix values='0 0 0 0 0.4  0 0 0 0 0.32  0 0 0 0 0.22  0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23p)' opacity='0.55'/></svg>");
  opacity: 0.32; mix-blend-mode: multiply; pointer-events: none;
}
.env-body::after {
  /* Bottom-flap fold seam — the horizontal crease where envelope back panel
     meets the bottom flap (visible on real envelopes). */
  content: ""; position: absolute; left: 0; right: 0; bottom: 26%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(80, 56, 30, 0.22) 12%, rgba(80, 56, 30, 0.28) 50%, rgba(80, 56, 30, 0.22) 88%, transparent);
  pointer-events: none;
}

/* Side fold seams on body — thin diagonals from top corners down to center,
   echoing the closed flap's edges. Subtle, sells the "folded paper" feel. */
.env-seams {
  position: absolute; inset: 0;
  z-index: 1;
  pointer-events: none;
  border-radius: 4px;
  overflow: hidden;
  mix-blend-mode: multiply;
  opacity: 0.55;
}
.env-seams::before, .env-seams::after {
  content: "";
  position: absolute;
  top: 0; bottom: 50%;
  width: 1px;
  background: linear-gradient(180deg, rgba(80, 56, 30, 0.0), rgba(80, 56, 30, 0.45));
  transform-origin: top;
}
.env-seams::before { left: 0; transform: rotate(-45deg) translateY(-1px); transform-origin: top left; }
.env-seams::after  { right: 0; transform: rotate(45deg) translateY(-1px); transform-origin: top right; }
.env-body::before {
  /* paper texture */
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='p'><feTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2'/><feColorMatrix values='0 0 0 0 0.4  0 0 0 0 0.32  0 0 0 0 0.22  0 0 0 0.5 0'/></filter><rect width='100%' height='100%' filter='url(%23p)' opacity='0.5'/></svg>");
  opacity: 0.28; mix-blend-mode: multiply; pointer-events: none;
}
.env-body::after {
  /* gold inner border */
  content: ""; position: absolute; inset: 14px; border-radius: 2px;
  border: 1px solid rgba(138, 106, 60, 0.35);
  pointer-events: none;
}

/* (envelope inner liner — only seen briefly while flap rotates back) */
.env-liner {
  position: absolute; inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, #c9b48a 0%, #a78d5e 100%);
  border-radius: 4px;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.35);
}

/* The card that slides up out of the envelope.
   Lives BEHIND .env-body (declared earlier in DOM) so it's hidden when closed.
   When opening, translates upward — its top half pokes above the envelope. */
.card-slot {
  position: absolute; inset: 0;
  z-index: 0;
  pointer-events: none;
  perspective: 1200px;
}
.card-mini {
  position: absolute;
  left: 8%; right: 8%;
  top: 10%;
  height: 80%;
  background:
    linear-gradient(180deg, #f6f8fb 0%, #e3e9f1 100%);
  border-radius: 3px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.6) inset,
    0 -10px 22px -10px rgba(0, 0, 0, 0.35),
    0 8px 18px rgba(0, 0, 0, 0.35);
  transform: translateY(0);
  transition: transform 1.2s var(--ease-out);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding: 14% 8% 0;
  overflow: hidden;
}
.card-mini-inner {
  font-family: var(--serif-display);
  color: var(--ink);
  font-size: clamp(10px, 1.3vw, 12px);
  letter-spacing: var(--tracked);
  text-transform: uppercase;
  text-align: center;
  opacity: 0.9;
  position: relative;
  z-index: 1;
  color: var(--gold-deep);
}
.card-mini-inner em {
  display: block;
  font-family: var(--serif-display);
  font-style: normal;
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: clamp(22px, 3.2vw, 32px);
  margin: 0.3em 0 0.2em;
  color: var(--ink);
}
.card-mini-date {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  text-transform: none;
  letter-spacing: 0.08em;
  font-size: clamp(11px, 1.4vw, 14px);
  color: var(--ink-soft);
  margin-top: 0.5em;
}
.scene.is-opening .card-mini { transform: translateY(-62%); transition-delay: 0.55s; }

/* The pointed flap — covers the top half when closed (downward triangle),
   rotates back around its top edge when opened. Slightly darker than the
   body so the V-edges read clearly, with a drop-shadow that lands as the
   crease shadow on the body below. Lifted with translateZ so it sits on
   the body like a real folded flap. */
.env-flap {
  position: absolute; inset: 0;
  z-index: 2;
  transform-origin: top center;
  transform-style: preserve-3d;
  transition: transform 0.95s var(--ease-soft) 0.25s;
  transform: rotateX(0deg) translateZ(3px);
  pointer-events: none;
  filter:
    drop-shadow(0 4px 4px rgba(20, 30, 50, 0.32))
    drop-shadow(0 10px 14px rgba(20, 30, 50, 0.22));
}
.scene.is-opening .env-flap { transform: rotateX(-178deg) translateZ(0); }

.env-flap-face {
  position: absolute; inset: 0;
  /* Downward-pointing triangle: top-left, top-right, center-middle */
  clip-path: polygon(0% 0%, 100% 0%, 50% 50%);
  background:
    /* angled highlight from upper-left = ambient light cue */
    linear-gradient(155deg, #f3f7fc 0%, #e3eaf2 30%, #c9d4e2 75%, #b6c2d4 100%);
  backface-visibility: hidden;
}
.env-flap-face::before {
  /* fold crease running across the flap's bottom V edges — thin darker line */
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(135deg, transparent calc(50% - 0.5px), rgba(28, 42, 62, 0.18) 50%, transparent calc(50% + 0.5px)) right top / 50% 100% no-repeat,
    linear-gradient(225deg, transparent calc(50% - 0.5px), rgba(28, 42, 62, 0.18) 50%, transparent calc(50% + 0.5px)) left top / 50% 100% no-repeat;
  pointer-events: none;
}
.env-flap-face::after {
  /* top-edge highlight — the crisp folded edge */
  content: ""; position: absolute; left: 0; right: 0; top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.85), transparent);
}
.env-flap-back {
  position: absolute; inset: 0;
  clip-path: polygon(0% 0%, 100% 0%, 50% 50%);
  background: linear-gradient(180deg, #6e8aa8 0%, #3f5a80 100%);
  transform: rotateX(180deg);
  backface-visibility: hidden;
}

/* ───────────────────────────────────────────────
   WAX SEAL
   ─────────────────────────────────────────────── */
.seal-wrap {
  position: absolute;
  left: 50%; top: 50%;
  width: clamp(70px, 14%, 100px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%) translateZ(8px);
  z-index: 4;
  cursor: pointer;
  outline: none;
  border: 0; padding: 0; background: transparent;
  transition: transform 0.4s var(--ease-back);
  filter: drop-shadow(0 4px 6px rgba(20, 30, 50, 0.45)) drop-shadow(0 1px 2px rgba(20, 30, 50, 0.3));
}
.seal-wrap:hover { transform: translate(-50%, -50%) translateZ(12px) scale(1.05); }
.seal-wrap:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 8px; border-radius: 50%; }

/* Wax seal — photoreal image with cleaned alpha background */
.seal-img {
  position: absolute;
  inset: -22%;
  width: 144%;
  height: 144%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  filter:
    drop-shadow(0 8px 12px rgba(0, 0, 0, 0.45))
    drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}
.seal-svg {
  position: absolute;
  inset: -18%;
  width: 136%;
  height: 136%;
  overflow: visible;
  filter:
    drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45))
    drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
  pointer-events: none;
}
.seal-glyph {
  font-family: 'Pinyon Script', 'Allura', var(--script), cursive;
  font-size: 56px;
  fill: #4a2f10;
  paint-order: stroke fill;
  stroke: rgba(40, 24, 6, 0.5);
  stroke-width: 0.6;
}
.seal-glyph--c   { transform: rotate(-7deg); transform-origin: 68px 110px; }
.seal-glyph--amp { font-size: 36px; transform: rotate(4deg); transform-origin: 100px 110px; opacity: 0.92; }
.seal-glyph--l   { transform: rotate(8deg); transform-origin: 132px 110px; }
/* Seal break animation */
.scene.is-opening .seal-wrap {
  animation: sealBreak 0.5s var(--ease-out) forwards;
}
@keyframes sealBreak {
  0%   { transform: translate(-50%, -50%) translateZ(8px) scale(1); }
  35%  { transform: translate(-50%, -50%) translateZ(20px) scale(1.12) rotate(-4deg); }
  100% { transform: translate(-50%, -55%) translateZ(40px) scale(0.8) rotate(8deg); opacity: 0; }
}

/* The "Ábreme" tag with string */
.tag {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, calc(-50% + clamp(60px, 9vw, 80px)));
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(14px, 1.6vw, 17px);
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  background: var(--paper);
  padding: 6px 14px 6px 22px;
  border-radius: 2px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.5) inset,
    0 4px 10px rgba(0, 0, 0, 0.25);
  z-index: 4;
  pointer-events: none;
  white-space: nowrap;
  border: 0.5px solid rgba(138, 106, 60, 0.3);
  animation: tagFloat 3s ease-in-out infinite;
}
.tag::before {
  /* hole punch + string */
  content: "";
  position: absolute;
  left: 8px; top: 50%;
  width: 6px; height: 6px;
  background: var(--bg-1);
  border-radius: 50%;
  transform: translateY(-50%);
  box-shadow: 0 0 0 1px rgba(138, 106, 60, 0.5);
}
.tag::after {
  /* string going up to seal */
  content: "";
  position: absolute;
  left: 11px; top: -42px;
  width: 1px; height: 48px;
  background: linear-gradient(180deg, transparent 0%, var(--gold-deep) 30%, var(--gold-bright) 100%);
  transform: rotate(-8deg);
  transform-origin: bottom;
}
@keyframes tagFloat {
  0%, 100% { transform: translate(-50%, calc(-50% + clamp(60px, 9vw, 80px))) rotate(-2deg); }
  50%      { transform: translate(-50%, calc(-50% + clamp(64px, 9.5vw, 84px))) rotate(2deg); }
}
.scene.is-opening .tag { opacity: 0; transition: opacity 0.2s; }

.hint {
  position: absolute;
  bottom: clamp(24px, 5vh, 40px);
  left: 50%; transform: translateX(-50%);
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: rgba(239, 227, 200, 0.45);
  z-index: 6;
  pointer-events: none;
  animation: hintPulse 3s ease-in-out infinite;
}
@keyframes hintPulse {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 0.75; }
}
.scene.is-opening ~ .hint { opacity: 0; transition: opacity 0.4s; }

/* Monogram on envelope center (visible behind seal area on closed flap) */
.env-mono {
  position: absolute;
  bottom: 18%;
  left: 50%; transform: translateX(-50%);
  font-family: var(--serif-display);
  font-size: clamp(11px, 1.4vw, 14px);
  letter-spacing: var(--tracked);
  color: var(--gold-deep);
  text-transform: uppercase;
  z-index: 1;
  opacity: 0.55;
}

/* ───────────────────────────────────────────────
   PETALS / CONFETTI
   ─────────────────────────────────────────────── */
.petals { position: absolute; inset: 0; pointer-events: none; z-index: 7; }
.petal {
  position: absolute;
  left: 50%; top: 50%;
  width: 14px; height: 22px;
  border-radius: 70% 30% 70% 30% / 50% 50% 50% 50%;
  transform-origin: center;
  opacity: 0;
  will-change: transform, opacity;
  --c: var(--gold-bright);
  background: radial-gradient(ellipse at 30% 30%, var(--c), color-mix(in oklab, var(--c) 60%, #6a4a2a) 90%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* ───────────────────────────────────────────────
   THE INSIDE CARD (revealed view)
   ─────────────────────────────────────────────── */
.card-stage {
  position: fixed; inset: 0;
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s var(--ease-out) 0.9s;
}
.card-stage.is-shown { opacity: 1; pointer-events: auto; }

.card {
  position: relative;
  width: 100vw;
  height: 100vh;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(220, 232, 246, 0.7), transparent 50%),
    radial-gradient(ellipse at 80% 90%, rgba(200, 218, 232, 0.5), transparent 60%),
    linear-gradient(180deg, #f8fafd 0%, #e6ecf3 100%);
  color: var(--ink);
  padding: clamp(28px, 4vw, 56px) clamp(20px, 4vw, 60px);
  text-align: center;
  transform: scale(1.02);
  transition: transform 0.9s var(--ease-out) 0.85s;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(63, 90, 128, 0.3) transparent;
}
.card-stage.is-shown .card { transform: scale(1); }
.card-inner {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: calc(100vh - clamp(56px, 8vw, 112px));
}
.card::after {
  /* subtle paper texture */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='p'><feTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2'/><feColorMatrix values='0 0 0 0 0.4  0 0 0 0 0.32  0 0 0 0 0.22  0 0 0 0.5 0'/></filter><rect width='100%' height='100%' filter='url(%23p)' opacity='0.4'/></svg>");
  opacity: 0.18; mix-blend-mode: multiply;
}

.eyebrow {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(13px, 1.5vw, 16px);
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin-bottom: clamp(10px, 1.5vw, 14px);
}
.eyebrow-line {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--gold-deep);
  font-family: var(--serif-display);
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: var(--tracked);
  font-size: 11px;
}
.eyebrow-line::before, .eyebrow-line::after {
  content: ""; width: 32px; height: 1px; background: currentColor; opacity: 0.5;
}

.names {
  font-family: var(--serif-display);
  font-size: clamp(48px, 9vw, 96px);
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--ink);
  margin: clamp(8px, 1vw, 14px) 0 clamp(16px, 2.5vw, 28px);
  font-weight: 400;
}
.names .amp {
  display: inline-block;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.7em;
  color: var(--gold-deep);
  margin: 0 0.1em;
  vertical-align: middle;
  transform: translateY(-0.05em);
}

/* Polaroid trio */
.polaroids {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(8px, 1.5vw, 18px);
  margin: clamp(18px, 3vw, 32px) 0 clamp(22px, 3vw, 32px);
  padding: 0 8px;
}
.polaroid {
  background: #ffffff;
  padding: 10px 10px 32px;
  width: clamp(130px, 18vw, 180px);
  flex-shrink: 1;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 6px 16px rgba(28, 42, 62, 0.22),
    0 1px 3px rgba(28, 42, 62, 0.15);
  position: relative;
  transition: transform 0.4s var(--ease-back);
}
.polaroid:hover { transform: rotate(0) translateY(-4px) scale(1.04) !important; z-index: 2; }
.polaroid:nth-child(1) { transform: rotate(-5deg) translateY(8px); z-index: 1; }
.polaroid:nth-child(2) { transform: rotate(2deg);             z-index: 2; }
.polaroid:nth-child(3) { transform: rotate(-2deg) translateY(6px); z-index: 1; }
.polaroid-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.polaroid-img {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  color: rgba(28, 42, 62, 0.45);
}
.polaroid:nth-child(1) .polaroid-img { background: linear-gradient(135deg, #d4e0ec 0%, #8fa9c4 100%); }
.polaroid:nth-child(2) .polaroid-img { background: linear-gradient(135deg, #e6dccd 0%, #b8a988 100%); }
.polaroid:nth-child(3) .polaroid-img { background: linear-gradient(135deg, #d6dfe8 0%, #6e8aa8 100%); }
.polaroid-img svg { width: 44%; height: 44%; opacity: 0.55; }
.polaroid-cap {
  position: absolute;
  bottom: 8px; left: 0; right: 0;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}
@media (max-width: 480px) {
  .polaroid { width: clamp(110px, 30vw, 140px); padding: 8px 8px 26px; }
  .polaroid-cap { font-size: 11px; bottom: 6px; }
}

.divider {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  color: var(--gold-deep);
  margin: clamp(14px, 2vw, 22px) 0;
}
.divider::before, .divider::after {
  content: ""; height: 1px; background: currentColor;
  flex: 0 0 clamp(40px, 8vw, 80px); opacity: 0.5;
}
.divider svg { width: 18px; height: 18px; }

.details {
  display: grid;
  gap: clamp(14px, 2vw, 20px);
  margin: clamp(8px, 1.5vw, 14px) 0 clamp(20px, 3vw, 28px);
}
.detail-row {
  display: grid; gap: 4px;
}
.detail-label {
  font-family: var(--serif-display);
  text-transform: uppercase;
  letter-spacing: var(--tracked);
  font-size: 11px;
  color: var(--gold-deep);
}
.detail-value {
  font-family: var(--serif);
  font-size: clamp(20px, 2.6vw, 26px);
  color: var(--ink);
  font-weight: 500;
}
.detail-value em {
  font-style: italic;
  color: var(--ink-soft);
  font-size: 0.9em;
  font-weight: 400;
  display: block;
  margin-top: 2px;
}

/* Countdown */
.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(8px, 1.5vw, 14px);
  margin: clamp(18px, 2.5vw, 26px) 0;
  padding: clamp(14px, 2vw, 20px) 0;
  border-top: 1px solid rgba(138, 106, 60, 0.25);
  border-bottom: 1px solid rgba(138, 106, 60, 0.25);
}
.cd-cell { text-align: center; }
.cd-num {
  font-family: var(--serif-display);
  font-size: clamp(28px, 4.6vw, 44px);
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  font-weight: 400;
}
.cd-lbl {
  font-family: var(--serif-display);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 9px;
  color: var(--ink-soft);
  margin-top: 6px;
}

/* Buttons */
.actions {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  margin-top: clamp(8px, 1vw, 12px);
}
.btn {
  appearance: none; border: 1px solid var(--gold-deep); background: transparent;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.04em;
  padding: 10px 18px;
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
  transition: background 0.25s, color 0.25s, transform 0.2s;
}
.btn:hover { background: var(--ink); color: var(--paper); transform: translateY(-1px); }
.btn svg { width: 14px; height: 14px; }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--gold-deep); border-color: var(--gold-deep); }

.footnote {
  margin-top: clamp(20px, 3vw, 30px);
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
  text-align: center;
}

/* FAQ */
.faq {
  margin: clamp(28px, 4vw, 44px) auto clamp(8px, 1vw, 12px);
  max-width: 560px;
  width: 100%;
  text-align: left;
}
.faq-title {
  font-family: var(--serif-display);
  text-transform: uppercase;
  letter-spacing: var(--tracked);
  font-size: 11px;
  color: var(--gold-deep);
  text-align: center;
  margin-bottom: clamp(14px, 2vw, 20px);
  display: flex; align-items: center; justify-content: center; gap: 14px;
}
.faq-title::before, .faq-title::after {
  content: ""; flex: 0 0 clamp(30px, 6vw, 60px); height: 1px;
  background: currentColor; opacity: 0.5;
}
.faq-list {
  display: grid; gap: 0;
}
.faq-item {
  padding: clamp(12px, 2vw, 18px) 4px;
  border-bottom: 1px solid rgba(63, 90, 128, 0.18);
  display: grid; grid-template-columns: 1fr auto; gap: 4px 16px;
  align-items: baseline;
}
.faq-item:last-child { border-bottom: 0; }
.faq-q {
  font-family: var(--serif);
  font-size: clamp(15px, 1.8vw, 18px);
  color: var(--ink);
  font-weight: 500;
}
.faq-a {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(14px, 1.6vw, 16px);
  color: var(--gold-deep);
  white-space: nowrap;
}
.faq-a em {
  font-style: italic;
  color: var(--ink-soft);
  font-weight: 400;
}
@media (max-width: 480px) {
  .faq-item { grid-template-columns: 1fr; }
  .faq-a { white-space: normal; }
}

.close-btn {
  position: fixed; top: 18px; right: 18px;
  background: rgba(255, 255, 255, 0.7);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(63, 90, 128, 0.2);
  color: var(--ink-soft);
  width: 38px; height: 38px; border-radius: 50%;
  cursor: pointer;
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 22px;
  z-index: 12;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.close-btn:hover { background: var(--ink); color: var(--paper); transform: rotate(90deg); }

/* ───────────────────────────────────────────────
   RESPONSIVE
   ─────────────────────────────────────────────── */
@media (max-width: 520px) {
  .scene { aspect-ratio: 5 / 3.6; }
  .countdown { grid-template-columns: repeat(4, 1fr); gap: 4px; }
  .cd-num { font-size: clamp(22px, 8vw, 34px); }
  .actions { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
}
@media (max-height: 640px) {
  .scene { width: min(440px, 80vw); }
}

/* ═════════════════════════════════════════════════════════════
   V2 — More personality & pop
   layered on top of the base sheet
   ═════════════════════════════════════════════════════════════ */

/* Card paper — warmer + a faint paper texture */
.card {
  background:
    radial-gradient(ellipse at 30% 10%, rgba(255, 240, 215, 0.7), transparent 55%),
    linear-gradient(165deg, var(--paper) 0%, var(--paper-edge) 100%);
}

/* Eyebrow — handwritten script for a personal feel */
.eyebrow .eyebrow-line {
  font-family: var(--script);
  font-size: clamp(22px, 3.4vw, 28px);
  letter-spacing: 0;
  font-weight: 600;
  text-transform: none;
  color: var(--gold-deep);
}
.eyebrow .eyebrow-line::before,
.eyebrow .eyebrow-line::after { display: none; }

/* Names — larger, italic display, with a hand-drawn underline */
.names {
  font-family: var(--serif-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(54px, 11vw, 96px);
  letter-spacing: -0.01em;
  line-height: 0.95;
  color: var(--ink);
  position: relative;
  padding: 0.05em 0.3em 0.18em;
  display: inline-block;
}
.names .amp {
  font-family: var(--script);
  font-style: normal;
  color: var(--gold-deep);
  font-size: 0.7em;
  margin: 0 0.05em;
  vertical-align: 0.05em;
  font-weight: 600;
}
.names::after {
  /* hand-drawn squiggle underline */
  content: "";
  position: absolute;
  left: 8%; right: 8%;
  bottom: -2px;
  height: 14px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 14' fill='none' stroke='%23c97352' stroke-width='2.4' stroke-linecap='round'><path d='M2 9 C 30 2, 60 12, 90 7 S 150 2, 180 8 S 230 12, 238 6'/></svg>");
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

/* Sparkles — scattered around the names */
.sparkle {
  position: absolute;
  width: 22px; height: 22px;
  color: var(--gold);
  pointer-events: none;
  animation: twinkle 2.6s ease-in-out infinite;
}
.sparkle svg { width: 100%; height: 100%; }
.sparkle.s-1 { top: -10px; left: 6%; transform: rotate(-12deg); animation-delay: 0s;    color: var(--gold-deep); }
.sparkle.s-2 { top: 8%;    right: 4%; transform: rotate(18deg); animation-delay: 0.6s;  color: var(--butter); width: 28px; height: 28px; }
.sparkle.s-3 { top: 38%;   left: -6px; transform: rotate(8deg); animation-delay: 1.2s;  color: var(--sage); width: 16px; height: 16px; }
.sparkle.s-4 { top: 30%;   right: -4px; transform: rotate(-22deg); animation-delay: 1.8s; color: var(--rose); width: 18px; height: 18px; }
@keyframes twinkle {
  0%, 100% { opacity: 0.35; transform: scale(0.85) rotate(var(--r, 0deg)); }
  50%      { opacity: 1;     transform: scale(1.15) rotate(var(--r, 0deg)); }
}

/* Wrapper to position sparkles relative to names */
.name-block {
  position: relative;
  display: inline-block;
  padding: 14px 28px 10px;
}

/* Divider — replace cross with hand-drawn squiggle wreath */
.divider {
  width: 60%;
  height: 28px;
  margin: 22px auto;
  color: var(--gold-deep);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 28' fill='none' stroke='%23a04a2a' stroke-width='1.8' stroke-linecap='round'><path d='M10 14 C 30 6, 50 22, 70 14 S 110 6, 130 14 S 170 22, 190 14'/><circle cx='100' cy='14' r='4' fill='%23c97352' stroke='none'/><path d='M88 14 L 96 14 M 104 14 L 112 14' stroke-width='1.3'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}
.divider svg { display: none; }

/* Detail labels — script accent */
.detail-label {
  font-family: var(--script);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--gold-deep);
}
.detail-row {
  border-color: var(--gold);
  border-style: dashed;
  border-width: 0 0 1px;
  padding-bottom: 14px;
}
.detail-row:last-child { border-bottom: 0; }
.detail-value em {
  color: var(--sage-deep);
  font-family: var(--script);
  font-size: 1.15em;
  font-style: normal;
}

/* Polaroids — bigger tilts + washi tape */
.polaroids { gap: 0; padding: 18px 6px 8px; }
.polaroid {
  background: #fffbf3;
  box-shadow: 0 8px 24px rgba(80, 50, 30, 0.22), 0 2px 4px rgba(80, 50, 30, 0.18);
  position: relative;
}
.polaroid:nth-child(1) { transform: rotate(-7deg) translate(8px, 12px); }
.polaroid:nth-child(2) { transform: rotate(3deg)  translate(0, -6px); z-index: 3; }
.polaroid:nth-child(3) { transform: rotate(-3deg) translate(-8px, 8px); }
.polaroid::before {
  /* washi tape strip */
  content: "";
  position: absolute;
  top: -10px; left: 50%;
  width: 56px; height: 18px;
  transform: translateX(-50%) rotate(-6deg);
  background:
    repeating-linear-gradient(45deg,
      rgba(125, 148, 116, 0.85) 0 6px,
      rgba(165, 188, 156, 0.85) 6px 12px);
  border-radius: 1px;
  box-shadow: 0 1px 2px rgba(80, 50, 30, 0.18);
  opacity: 0.92;
}
.polaroid:nth-child(1)::before {
  background: repeating-linear-gradient(45deg, rgba(201, 115, 82, 0.85) 0 6px, rgba(231, 145, 110, 0.85) 6px 12px);
}
.polaroid:nth-child(3)::before {
  background: repeating-linear-gradient(45deg, rgba(240, 199, 94, 0.85) 0 6px, rgba(252, 220, 130, 0.85) 6px 12px);
}

/* Buttons — pop with terracotta */
.btn-primary {
  background: var(--gold-deep);
  color: var(--paper);
  border: 0;
  box-shadow: 0 4px 0 rgba(80, 30, 10, 0.35), 0 6px 16px rgba(160, 74, 42, 0.4);
  transition: transform 0.18s var(--ease-back), box-shadow 0.18s, background 0.2s;
}
.btn-primary:hover {
  background: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 6px 0 rgba(80, 30, 10, 0.35), 0 10px 22px rgba(160, 74, 42, 0.5);
}
.btn:not(.btn-primary) {
  border: 1.5px solid var(--gold-deep);
  color: var(--gold-deep);
  transition: transform 0.18s, background 0.2s;
}
.btn:not(.btn-primary):hover { background: rgba(201, 115, 82, 0.12); transform: translateY(-2px); }

/* Countdown */
.cd-cell {
  background: rgba(255, 250, 235, 0.7);
  border: 1.5px dashed var(--gold);
  border-radius: 12px;
  padding: 10px 4px;
}
.cd-num { color: var(--gold-deep); font-weight: 500; }
.cd-lbl { color: var(--ink-soft); }

/* FAQ */
.faq {
  margin-top: 26px;
  padding: 18px 20px;
  background: rgba(125, 148, 116, 0.08);
  border-radius: 12px;
  border-left: 3px solid var(--sage);
}
.faq-title {
  font-family: var(--script);
  font-size: 24px;
  color: var(--sage-deep);
  margin-bottom: 8px;
}

/* Particles — keep them, but tint warm */
.particle {
  background: var(--gold-bright);
  box-shadow: 0 0 8px rgba(243, 185, 122, 0.85);
}

/* Confetti palette override for v2 */
body[data-aesthetic="editorial"] .petal,
body[data-aesthetic="display"] .petal,
body[data-aesthetic="classical"] .petal {
  /* will inherit --c set inline; we'll override the color array via JS-set CSS var */
}

/* Envelope body — soft blue-grey */
.env-mono { color: #f4f2ee !important; }
/* Handwritten "Toca el sello para abrir" inscribed on the envelope */
.env-handwriting {
  font-family: var(--script) !important;
  font-style: italic !important;
  font-weight: 400 !important;
  font-size: clamp(18px, 2.4vw, 26px) !important;
  letter-spacing: 0.01em !important;
  text-transform: none !important;
  color: rgba(244, 242, 238, 0.88) !important;
  bottom: 14% !important;
  transform: translateX(-50%) !important;
  text-shadow:
    0 1px 0 rgba(60, 76, 92, 0.35),
    0 0 1px rgba(244, 242, 238, 0.2) !important;
  opacity: 0.95 !important;
  white-space: nowrap !important;
}
.env-body {
  background:
    radial-gradient(ellipse at 25% 12%, rgba(150, 168, 184, 0.5), transparent 55%) ,
    radial-gradient(ellipse at 50% 130%, rgba(28, 42, 60, 0.55), transparent 60%) ,
    linear-gradient(165deg, #6e8398 0%, #4d6178 55%, #34465c 100%) !important;
  box-shadow:
    0 1px 0 rgba(180, 196, 212, 0.32) inset,
    0 -2px 4px rgba(20, 32, 48, 0.55) inset,
    0 0 0 1px rgba(20, 32, 48, 0.55) inset,
    0 6px 10px -4px rgba(20, 32, 48, 0.55),
    0 22px 38px -16px rgba(20, 32, 48, 0.55),
    0 36px 70px -22px rgba(20, 32, 48, 0.5) !important;
}
.envelope .env-flap-back { background: linear-gradient(180deg, #5d7388 0%, #2c3e54 100%) !important; }
.env-flap-face {
  background: linear-gradient(155deg, #8197ad 0%, #56697f 35%, #3a4d63 80%, #25364a 100%) !important;
}

/* Inside card — use the v1 cream paper + navy ink + dusty-blue accents */
.card-stage {
  --paper: #f4f7fc;
  --paper-edge: #dbe2ed;
  --paper-shadow: rgba(20, 30, 50, 0.45);
  --ink: #1c2a3e;
  --ink-soft: #4a5d78;
  --gold: #6e8aa8;
  --gold-deep: #3f5a80;
  --gold-bright: #c8dae8;
}
.card-stage .card {
  background:
    radial-gradient(ellipse at 30% 10%, rgba(255, 255, 255, 0.7), transparent 55%),
    linear-gradient(165deg, #f4f7fc 0%, #e6ecf4 100%) !important;
}
.card-stage .card,
.card-stage .card * { color: var(--ink); }
.card-stage .eyebrow,
.card-stage .eyebrow-line,
.card-stage .detail-label,
.card-stage .divider { color: var(--gold-deep); }
.card-stage .detail-value em,
.card-stage .footnote { color: var(--ink-soft); }
.card-stage .btn {
  border-color: var(--gold-deep) !important;
  background: transparent;
  color: var(--ink);
}
.card-stage .btn:hover { background: var(--ink); color: var(--paper); }
.card-stage .btn-primary { background: var(--ink); color: var(--paper); }
.card-stage .btn-primary:hover { background: var(--gold-deep); border-color: var(--gold-deep) !important; }

/* Stage — flat off-white */
.stage {
  background: #f4f2ee !important;
}
.stage::before, .stage::after { display: none !important; }

/* Paper Texture overlay — CSS+SVG fallback (the live paper.design shader was
   unavailable in this sandbox, so we approximate fiber + folds + crumples) */
.env-body, .env-flap { position: relative; }
.env-paper-fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: inherit;
  mix-blend-mode: multiply;
  opacity: 0.55;
  z-index: 1;
  background:
    /* fold creases — five soft diagonals */
    repeating-linear-gradient(118deg,
      transparent 0 86px,
      rgba(40, 56, 72, 0.18) 86px 88px,
      transparent 88px 92px,
      rgba(255, 255, 255, 0.12) 92px 94px,
      transparent 94px 200px),
    /* crumple cells */
    radial-gradient(120% 80% at 18% 22%, rgba(40, 56, 72, 0.16), transparent 55%),
    radial-gradient(110% 70% at 82% 78%, rgba(40, 56, 72, 0.14), transparent 55%),
    radial-gradient(80% 60% at 60% 40%, rgba(255, 255, 255, 0.08), transparent 60%),
    /* fiber grain via tiny noise dots */
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='5'/><feColorMatrix values='0 0 0 0 0.55  0 0 0 0 0.6  0 0 0 0 0.7  0 0 0 0.55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.55'/></svg>"),
    /* curly fiber */
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='320' height='320'><filter id='f'><feTurbulence type='fractalNoise' baseFrequency='0.012' numOctaves='2' seed='8'/><feColorMatrix values='0 0 0 0 0.4  0 0 0 0 0.46  0 0 0 0 0.55  0 0 0 0.7 0'/></filter><rect width='100%' height='100%' filter='url(%23f)'/></svg>");
  background-size: auto, auto, auto, auto, 220px 220px, 320px 320px;
  background-blend-mode: multiply, multiply, multiply, screen, multiply, multiply;
}
.env-paper-fx--flap { opacity: 0.5; }
.env-body > .env-handwriting,
.env-body > .env-mono { position: absolute; z-index: 2; }
.env-flap > .env-flap-face,
.env-flap > .env-flap-back { z-index: 2; }
/* v1 fonts inside the card */
.card-stage {
  --serif-display: "Italiana", "Cormorant Garamond", serif;
  --serif: "Cormorant Garamond", "Cormorant", Georgia, serif;
}

/* Polaroids inside the card — restore v1 layout (no washi tape, gentler tilts) */
.card-stage .polaroids { gap: 12px; padding: 0 8px; }
.card-stage .polaroid {
  background: #ffffff;
  padding: 10px 10px 32px;
  box-shadow: 0 8px 18px rgba(20, 32, 48, 0.22), 0 2px 4px rgba(20, 32, 48, 0.18);
}
.card-stage .polaroid:nth-child(1) { transform: rotate(-5deg) translateY(8px); }
.card-stage .polaroid:nth-child(2) { transform: rotate(2deg); }
.card-stage .polaroid:nth-child(3) { transform: rotate(-2deg) translateY(6px); }
.card-stage .polaroid::before { display: none; }

/* Tag — friendlier */
.tag {
  font-family: var(--script);
  font-size: 26px;
  background: var(--butter);
  color: var(--ink);
  border: 0;
  padding: 4px 18px;
  box-shadow: 0 4px 12px rgba(120, 80, 30, 0.3);
  transform: rotate(-4deg);
}
.tag::before { display: none; }

/* Hint */
.hint {
  font-family: var(--script);
  font-size: 22px;
  color: var(--paper);
  text-shadow: 0 2px 8px rgba(80, 40, 20, 0.4);
}

/* Scattered decorative confetti dots in the card background */
.card-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    radial-gradient(circle at 8% 12%, var(--butter) 2px, transparent 3px),
    radial-gradient(circle at 92% 18%, var(--sage) 2px, transparent 3px),
    radial-gradient(circle at 6% 78%, var(--rose) 2px, transparent 3px),
    radial-gradient(circle at 94% 70%, var(--gold) 2px, transparent 3px),
    radial-gradient(circle at 14% 45%, var(--sage-deep) 1.5px, transparent 2.5px),
    radial-gradient(circle at 88% 50%, var(--butter) 1.5px, transparent 2.5px);
  background-repeat: no-repeat;
  pointer-events: none;
  opacity: 0.55;
}
.card-inner { position: relative; }
.card-inner > * { position: relative; z-index: 1; }

/* Footnote */
.footnote {
  font-family: var(--script);
  font-size: 18px;
  color: var(--ink-soft);
}

/* ───────────────────────────────────────────────
   v4.1 — CREAM IVORY ENVELOPE (overrides v4 slate-blue)
   ─────────────────────────────────────────────── */
.scene {
  aspect-ratio: 5 / 3 !important;
  overflow: visible !important;
  width: min(600px, 90vw) !important;
  margin-bottom: clamp(56px, 8vh, 96px);
}
/* Restore absolute fill — an earlier override accidentally made these
   position:relative which collapsed them to content height. */
.env-body, .env-flap { position: absolute !important; inset: 0 !important; }
.env-body {
  background:
    radial-gradient(ellipse at 28% 8%, rgba(255, 248, 232, 0.7), transparent 55%),
    radial-gradient(ellipse at 50% 130%, rgba(120, 96, 60, 0.32), transparent 60%),
    linear-gradient(165deg, #f3e7cf 0%, #ead9bb 55%, #d9c39a 100%) !important;
  border-radius: 3px !important;
  box-shadow:
    0 1px 0 rgba(255, 250, 235, 0.85) inset,
    0 -2px 4px rgba(140, 110, 60, 0.18) inset,
    0 0 0 1px rgba(140, 110, 60, 0.22) inset,
    0 6px 10px -4px rgba(40, 30, 14, 0.35),
    0 22px 38px -16px rgba(40, 30, 14, 0.4),
    0 36px 70px -22px rgba(40, 30, 14, 0.35) !important;
}
.envelope .env-flap-face {
  background: linear-gradient(160deg, #f1e4ca 0%, #e8d6b6 38%, #dac49b 78%, #c9b083 100%) !important;
}
.envelope .env-flap-back {
  background: linear-gradient(180deg, #e3d0ac 0%, #c4ab7e 100%) !important;
}
.envelope .env-flap-face::before {
  background:
    linear-gradient(135deg, transparent calc(50% - 0.5px), rgba(120, 90, 50, 0.22) 50%, transparent calc(50% + 0.5px)) right top / 50% 100% no-repeat,
    linear-gradient(225deg, transparent calc(50% - 0.5px), rgba(120, 90, 50, 0.22) 50%, transparent calc(50% + 0.5px)) left top / 50% 100% no-repeat !important;
}
.envelope .env-flap-face::after {
  background: linear-gradient(90deg, transparent, rgba(255, 250, 235, 0.9), transparent) !important;
}
.env-body::after {
  background: linear-gradient(90deg, transparent, rgba(120, 90, 50, 0.22) 12%, rgba(120, 90, 50, 0.28) 50%, rgba(120, 90, 50, 0.22) 88%, transparent) !important;
  bottom: 28% !important;
}
.env-flap {
  filter:
    drop-shadow(0 4px 4px rgba(70, 50, 24, 0.22))
    drop-shadow(0 10px 14px rgba(70, 50, 24, 0.18)) !important;
}
.env-paper-fx {
  background:
    repeating-linear-gradient(118deg,
      transparent 0 110px,
      rgba(120, 90, 50, 0.10) 110px 112px,
      transparent 112px 118px,
      rgba(255, 250, 235, 0.10) 118px 120px,
      transparent 120px 240px),
    radial-gradient(120% 80% at 18% 22%, rgba(120, 90, 50, 0.10), transparent 55%),
    radial-gradient(110% 70% at 82% 78%, rgba(120, 90, 50, 0.10), transparent 55%),
    radial-gradient(80% 60% at 60% 40%, rgba(255, 250, 235, 0.10), transparent 60%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='5'/><feColorMatrix values='0 0 0 0 0.55  0 0 0 0 0.48  0 0 0 0 0.36  0 0 0 0.45 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.55'/></svg>") !important;
  background-size: auto, auto, auto, auto, 220px 220px !important;
  background-blend-mode: multiply, multiply, multiply, screen, multiply !important;
  opacity: 0.4 !important;
  mix-blend-mode: multiply !important;
}
.env-handwriting {
  color: rgba(110, 78, 38, 0.55) !important;
  text-shadow: none !important;
  bottom: 12% !important;
  font-size: clamp(14px, 1.9vw, 20px) !important;
}
.env-mono { color: rgba(110, 78, 38, 0.55) !important; }
.seal-wrap {
  width: clamp(78px, 15%, 108px) !important;
  filter:
    drop-shadow(0 6px 8px rgba(70, 48, 14, 0.45))
    drop-shadow(0 2px 3px rgba(70, 48, 14, 0.35)) !important;
}
.seal-img {
  filter:
    drop-shadow(0 8px 12px rgba(70, 48, 14, 0.4))
    drop-shadow(0 2px 4px rgba(70, 48, 14, 0.35)) !important;
}
.save-the-date {
  position: absolute;
  left: 50%;
  bottom: -8%;
  transform: translate(-50%, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  color: #b08a4c;
  z-index: 3;
  transition: opacity 0.5s var(--ease-out);
}
.scene.is-opening .save-the-date,
.scene.is-open .save-the-date { opacity: 0; }
.std-text {
  font-family: 'Cormorant Garamond', 'Italiana', serif;
  font-weight: 500;
  font-size: clamp(15px, 2vw, 20px);
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  text-transform: uppercase;
  color: #b08a4c;
  text-shadow: 0 1px 0 rgba(255, 250, 235, 0.4);
}
.std-sprig {
  width: clamp(48px, 6vw, 64px);
  height: auto;
  color: #b08a4c;
  opacity: 0.85;
}
.card-mini {
  background: linear-gradient(180deg, #fbf6ea 0%, #efe4cc 100%) !important;
}
@media (max-width: 520px) {
  .scene { margin-bottom: 80px; }
}

/* ───────────────────────────────────────────────
   v4.2 — DUSTY-BLUE STAGE + GOLDEN INSIDE CARD
   Outside: matches the reference photo background.
   Inside: warm ivory paper + gold accents, echoing
   the envelope so the open/closed states feel unified.
   ─────────────────────────────────────────────── */

/* Stage — soft dusty blue, matching reference. */
.stage {
  background:
    radial-gradient(ellipse at 50% 35%, #b4c8d6 0%, #97afc0 55%, #88a3b6 100%) !important;
}
/* Disable the warm overlay vignettes from earlier sections — they tint
   the blue toward green/grey. */
.stage::before, .stage::after { display: none !important; }
/* Particles — cooler so they read on the blue. */
.particle {
  background: #f3e3c0 !important;
  box-shadow: 0 0 8px rgba(243, 227, 192, 0.7) !important;
}
/* SAVE THE DATE caption — deep amber-gold for strong contrast on dusty blue. */
.std-text, .std-sprig { color: #7a5523 !important; }
.std-text {
  text-shadow: 0 1px 0 rgba(255, 248, 230, 0.35) !important;
  font-weight: 600 !important;
}

/* ── Inside card — golden palette ────────────────────────────────── */
/* Re-declare card-stage tokens (override the v4-blue version above). */
.card-stage {
  --paper: #f6ecd2 !important;
  --paper-edge: #e6d4a8 !important;
  --paper-shadow: rgba(80, 50, 18, 0.42) !important;
  --ink: #3d2820 !important;          /* warm walnut */
  --ink-soft: #7a5836 !important;     /* mid sepia */
  --gold: #c89a52 !important;
  --gold-deep: #9d7434 !important;
  --gold-bright: #ecd29a !important;
}

/* Card surface — warm cream gradient with a soft vignette + faint gold rim. */
.card-stage .card {
  background:
    radial-gradient(ellipse at 28% 8%, rgba(255, 248, 225, 0.85), transparent 55%),
    radial-gradient(ellipse at 80% 92%, rgba(232, 198, 130, 0.35), transparent 60%),
    linear-gradient(170deg, #f8eed3 0%, #efe0b9 55%, #e6d29c 100%) !important;
  box-shadow: inset 0 0 0 1px rgba(160, 120, 60, 0.12) !important;
  scrollbar-color: rgba(120, 88, 40, 0.4) transparent !important;
}
.card-stage .card,
.card-stage .card * { color: var(--ink) !important; }
.card-stage .eyebrow,
.card-stage .eyebrow-line,
.card-stage .detail-label,
.card-stage .divider,
.card-stage .h-display-amp,
.card-stage .footnote-label { color: var(--gold-deep) !important; }
.card-stage .detail-value em,
.card-stage .footnote { color: var(--ink-soft) !important; }

/* Buttons — gold-accented on warm cream. */
.card-stage .btn {
  border: 1px solid var(--gold-deep) !important;
  background: transparent;
  color: var(--ink) !important;
}
.card-stage .btn:hover { background: var(--ink) !important; color: #f6ecd2 !important; }
.card-stage .btn-primary {
  background: var(--gold-deep) !important;
  color: #f6ecd2 !important;
  border-color: var(--gold-deep) !important;
}
.card-stage .btn-primary:hover {
  background: var(--ink) !important;
  border-color: var(--ink) !important;
}

/* Polaroid frame edges — gentle warm shadow instead of cold navy. */
.card-stage .polaroid {
  box-shadow:
    0 8px 18px rgba(80, 50, 18, 0.22),
    0 2px 4px rgba(80, 50, 18, 0.18) !important;
}

/* Decorative dot field inside card — warm tones. */
.card-inner::before {
  background-image:
    radial-gradient(circle at 8% 12%, #d4b06a 2px, transparent 3px),
    radial-gradient(circle at 92% 18%, #b48a48 2px, transparent 3px),
    radial-gradient(circle at 6% 78%, #e8c989 2px, transparent 3px),
    radial-gradient(circle at 94% 70%, #a8854a 2px, transparent 3px),
    radial-gradient(circle at 14% 45%, #c89a52 1.5px, transparent 2.5px),
    radial-gradient(circle at 88% 50%, #ecd29a 1.5px, transparent 2.5px) !important;
  opacity: 0.45 !important;
}

/* Countdown cells — warm cream + gold dashed border. */
.card-stage .cd-cell {
  background: rgba(255, 248, 225, 0.55) !important;
  border: 1.5px dashed var(--gold) !important;
}
.card-stage .cd-num { color: var(--gold-deep) !important; }
.card-stage .cd-lbl { color: var(--ink-soft) !important; }

/* Detail rows — gold dashed dividers. */
.card-stage .detail-row {
  border-color: var(--gold) !important;
}

/* Close button — warm parchment chip. */
.card-stage .close-btn {
  background: rgba(255, 248, 225, 0.65) !important;
  border: 1px solid rgba(160, 120, 60, 0.3) !important;
  color: var(--ink-soft) !important;
}
.card-stage .close-btn:hover {
  background: var(--ink) !important;
  color: #f6ecd2 !important;
}

/* ───────────────────────────────────────────────
   v4.3 — Teammate review fixes
   • Eyebrow type: elegant copperplate script instead of casual brush
   • Polaroid trio: larger photos
   • Primary CTA: high-contrast walnut on cream
   ─────────────────────────────────────────────── */

/* "Reserva la fecha" — formal script, not the casual brush hand. */
.card-stage .eyebrow .eyebrow-line,
.card-stage .eyebrow-line {
  font-family: "Pinyon Script", "Allura", "Cormorant Garamond", serif !important;
  font-style: normal !important;
  font-weight: 400 !important;
  font-size: clamp(28px, 4.2vw, 42px) !important;
  letter-spacing: 0.01em !important;
  line-height: 1 !important;
  color: var(--gold-deep) !important;
  text-transform: none !important;
}

/* Polaroids — larger so the photos read at a glance. */
.card-stage .polaroid {
  width: clamp(170px, 24vw, 240px) !important;
  padding: 12px 12px 40px !important;
}
.card-stage .polaroid-cap {
  font-size: 14px !important;
  bottom: 12px !important;
}
@media (max-width: 520px) {
  .card-stage .polaroid {
    width: clamp(140px, 40vw, 180px) !important;
    padding: 10px 10px 32px !important;
  }
}

/* Primary CTA — medium amber base for a lighter, friendlier resting
   state (per Carlos's feedback) with crisp white text. On hover we
   deepen to walnut, dropping the warm text-shadow so white reads
   cleanly without a brown halo. */
.card-stage .btn-primary {
  background: #b08a4c !important;
  color: #ffffff !important;
  border-color: #97743b !important;
  text-shadow: 0 1px 0 rgba(80, 50, 18, 0.35);
  box-shadow:
    0 1px 0 rgba(255, 240, 210, 0.4) inset,
    0 -2px 0 rgba(80, 50, 18, 0.25) inset,
    0 4px 0 rgba(80, 50, 18, 0.3),
    0 8px 18px rgba(80, 50, 18, 0.28) !important;
}
.card-stage .btn-primary:hover {
  background: var(--ink) !important;
  border-color: var(--ink) !important;
  color: #ffffff !important;
  /* Strip warm text-shadow + warm inset highlight that fight against
     a dark backdrop and make the white text look fuzzy. */
  text-shadow: none !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.1) inset,
    0 4px 0 rgba(20, 12, 6, 0.4),
    0 8px 18px rgba(20, 12, 6, 0.4) !important;
}

/* ───────────────────────────────────────────────
   v4.4 — Teammate review fixes (round 2)
   • SAVE THE DATE moved onto the envelope (inside the body,
     below the seal — replacing the casual "toca el sello…")
   • Card typography: 4 elegant variants selectable via the
     existing "Tipografía" tweak — no more Caveat anywhere.
   • Primary CTA: larger, sentence case for readability.
   ─────────────────────────────────────────────── */

/* SAVE THE DATE — sits inside the envelope, below the seal, on top
   of the body but below the flap when closed. */
.envelope > .save-the-date {
  position: absolute !important;
  left: 50% !important;
  bottom: 11% !important;
  transform: translateX(-50%) translateZ(2px) !important;
  z-index: 3 !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  pointer-events: none;
}
.envelope > .save-the-date .std-text {
  font-family: "Cormorant Garamond", "Italiana", serif;
  font-weight: 600;
  font-size: clamp(13px, 1.7vw, 17px);
  letter-spacing: 0.46em;
  text-indent: 0.46em;
  text-transform: uppercase;
  color: #7a5523 !important;
  text-shadow: 0 1px 0 rgba(255, 248, 230, 0.4);
}
.envelope > .save-the-date .std-sprig {
  width: clamp(40px, 5vw, 52px);
  color: #7a5523 !important;
  opacity: 0.85;
}

/* "toca para abrir" — subtle invite on the flap, just above the seal.
   Sits in front of the flap so it disappears with it on open. */
.envelope > .tap-hint {
  position: absolute;
  left: 50%;
  top: 22%;
  transform: translate(-50%, 0) translateZ(4px);
  z-index: 3;
  pointer-events: none;
  font-family: "Cormorant Garamond", "Italiana", serif;
  font-style: italic;
  font-size: clamp(13px, 1.55vw, 17px);
  letter-spacing: 0.18em;
  color: rgba(110, 78, 38, 0.78);
  text-shadow: 0 1px 0 rgba(255, 248, 230, 0.5);
  animation: tapHintPulse 2.8s ease-in-out infinite;
}
@keyframes tapHintPulse {
  0%, 100% { opacity: 0.78; }
  50%      { opacity: 1; }
}
.scene.is-opening .tap-hint,
.scene.is-open .tap-hint { opacity: 0; transition: opacity 0.4s; }

/* ── Card typography variants ────────────────────────────────────
   Each option defines four card-scoped tokens:
     --tc-display  → names, big numerals
     --tc-body     → body copy, detail values
     --tc-label    → tracked-caps section labels (Cuándo, Dónde, FAQ)
     --tc-eyebrow  → "Reserva la fecha" hero line + the "&" ligature
   No --script (Caveat) is ever consulted inside the card. */
body[data-aesthetic="classical"] {
  --tc-display: "Cormorant Garamond", "Cormorant", Georgia, serif;
  --tc-body:    "Cormorant Garamond", "Cormorant", Georgia, serif;
  --tc-label:   "Cormorant Garamond", Georgia, serif;
  --tc-eyebrow: "Cormorant Garamond", Georgia, serif;
  --tc-eyebrow-style: italic;
  --tc-eyebrow-size:  clamp(20px, 2.8vw, 28px);
  --tc-eyebrow-tracking: 0.06em;
}
body[data-aesthetic="editorial"] {
  --tc-display: "Italiana", "Cormorant Garamond", serif;
  --tc-body:    "Cormorant Garamond", Georgia, serif;
  --tc-label:   "Italiana", serif;
  --tc-eyebrow: "Italiana", serif;
  --tc-eyebrow-style: normal;
  --tc-eyebrow-size:  clamp(16px, 2vw, 22px);
  --tc-eyebrow-tracking: 0.3em;
}
body[data-aesthetic="romantic"] {
  --tc-display: "Italiana", "Cormorant Garamond", serif;
  --tc-body:    "Cormorant Garamond", Georgia, serif;
  --tc-label:   "Italiana", serif;
  --tc-eyebrow: "Pinyon Script", "Allura", "Cormorant Garamond", serif;
  --tc-eyebrow-style: normal;
  --tc-eyebrow-size:  clamp(32px, 5vw, 52px);
  --tc-eyebrow-tracking: 0.01em;
}
body[data-aesthetic="modern"] {
  --tc-display: "DM Serif Display", "Cormorant Garamond", serif;
  --tc-body:    "Cormorant Garamond", Georgia, serif;
  --tc-label:   "Manrope", ui-sans-serif, sans-serif;
  --tc-eyebrow: "Manrope", ui-sans-serif, sans-serif;
  --tc-eyebrow-style: normal;
  --tc-eyebrow-size:  clamp(11px, 1.3vw, 14px);
  --tc-eyebrow-tracking: 0.36em;
}
/* Sensible default if no aesthetic attribute is set */
body { --tc-display: "Italiana", serif; --tc-body: "Cormorant Garamond", serif; --tc-label: "Italiana", serif; --tc-eyebrow: "Italiana", serif; --tc-eyebrow-style: normal; --tc-eyebrow-size: clamp(16px, 2vw, 22px); --tc-eyebrow-tracking: 0.3em; }

/* Card defaults — anchored to tokens above. Selective !important only
   where the v4 cascade had pre-baked Caveat. */
.card-stage {
  --serif-display: var(--tc-display) !important;
  --serif:         var(--tc-body)    !important;
}
.card-stage .eyebrow .eyebrow-line,
.card-stage .eyebrow-line {
  font-family: var(--tc-eyebrow) !important;
  font-style:  var(--tc-eyebrow-style) !important;
  font-weight: 400 !important;
  font-size:   var(--tc-eyebrow-size) !important;
  letter-spacing: var(--tc-eyebrow-tracking) !important;
  text-indent: 0 !important;
  text-transform: none !important;
  line-height: 1.1 !important;
  color: var(--gold-deep) !important;
}
/* In editorial/modern the eyebrow is upper-cased editorial caps */
body[data-aesthetic="editorial"] .card-stage .eyebrow-line,
body[data-aesthetic="modern"]    .card-stage .eyebrow-line {
  text-transform: uppercase !important;
}
/* The "&" between names — matches the eyebrow script in romantic,
   otherwise an italic in the body font. */
.card-stage .names .amp {
  font-family: var(--tc-eyebrow) !important;
  font-style: italic !important;
  color: var(--gold-deep) !important;
  font-size: 0.72em !important;
  margin: 0 0.08em !important;
}
body[data-aesthetic="romantic"] .card-stage .names .amp {
  font-style: normal !important;
  font-size: 0.85em !important;
}
body[data-aesthetic="modern"] .card-stage .names .amp {
  font-family: var(--tc-display) !important;
  font-style: italic !important;
}

/* Names — font-family AND font-style are intentionally controlled
   inline on the element so a teammate can pin a specific typeface
   (e.g. Segoe Script) and its natural style without the global
   typography variants overwriting them. */
.card-stage .names {
  font-weight: 400 !important;
  letter-spacing: -0.005em !important;
}
body[data-aesthetic="modern"] .card-stage .names {
  letter-spacing: -0.01em !important;
}

/* Section labels (Cuándo, Dónde) */
.card-stage .detail-label {
  font-family: var(--tc-label) !important;
  font-style: normal !important;
  font-weight: 400 !important;
  font-size: clamp(11px, 1.2vw, 13px) !important;
  letter-spacing: 0.28em !important;
  text-transform: uppercase !important;
  color: var(--gold-deep) !important;
}
body[data-aesthetic="modern"] .card-stage .detail-label {
  font-weight: 600 !important;
  letter-spacing: 0.2em !important;
}

/* Detail value emphasis */
.card-stage .detail-value {
  font-family: var(--tc-body) !important;
  font-weight: 400 !important;
  letter-spacing: 0.005em !important;
}
.card-stage .detail-value em {
  font-family: var(--tc-body) !important;
  font-style: italic !important;
  font-size: 0.78em !important;
  letter-spacing: 0.02em !important;
  color: var(--ink-soft) !important;
}

/* FAQ */
.card-stage .faq-title {
  font-family: var(--tc-label) !important;
  font-size: clamp(13px, 1.4vw, 15px) !important;
  letter-spacing: 0.28em !important;
  text-transform: uppercase !important;
  font-weight: 400 !important;
  color: var(--gold-deep) !important;
}
body[data-aesthetic="modern"] .card-stage .faq-title { font-weight: 600 !important; letter-spacing: 0.2em !important; }
.card-stage .faq-q {
  font-family: var(--tc-body) !important;
  font-weight: 500 !important;
}
.card-stage .faq-a,
.card-stage .faq-a em {
  font-family: var(--tc-body) !important;
  font-style: italic !important;
}

/* Footnote */
.card-stage .footnote {
  font-family: var(--tc-body) !important;
  font-style: italic !important;
  font-size: clamp(13px, 1.4vw, 15px) !important;
  letter-spacing: 0.04em !important;
  color: var(--ink-soft) !important;
}

/* Countdown numerals */
.card-stage .cd-num {
  font-family: var(--tc-display) !important;
  font-weight: 400 !important;
  font-variant-numeric: tabular-nums !important;
}
.card-stage .cd-lbl {
  font-family: var(--tc-label) !important;
  font-weight: 400 !important;
  letter-spacing: 0.22em !important;
  text-transform: uppercase !important;
}
body[data-aesthetic="modern"] .card-stage .cd-lbl { font-weight: 600 !important; letter-spacing: 0.18em !important; }

/* Polaroid captions */
.card-stage .polaroid-cap {
  font-family: var(--tc-body) !important;
  font-style: italic !important;
}

/* Buttons — readable: 16px sentence case, body serif (modern uses sans).
   This addresses Carlos's "cannot read the text here" comment. */
.card-stage .btn {
  font-family: var(--tc-body) !important;
  font-size: clamp(15px, 1.5vw, 17px) !important;
  font-weight: 500 !important;
  letter-spacing: 0.02em !important;
  text-transform: none !important;
  padding: 12px 22px !important;
  line-height: 1.2 !important;
}
body[data-aesthetic="modern"] .card-stage .btn {
  font-family: var(--tc-label) !important;
  font-weight: 600 !important;
  letter-spacing: 0.04em !important;
}
.card-stage .btn svg { width: 18px !important; height: 18px !important; }

/* Close button */
.card-stage .close-btn {
  font-family: var(--tc-body) !important;
}

/* ───────────────────────────────────────────────
   Mobile fixes
   ─────────────────────────────────────────────── */

/* Seal — scale down on narrow phones so it doesn't swamp the envelope */
@media (max-width: 520px) {
  .seal-wrap {
    width: clamp(58px, 10%, 78px) !important;
  }
}

/* Footnote — ensure it isn't clipped at the bottom of the scrollable card */
@media (max-width: 520px) {
  .card {
    padding-bottom: clamp(80px, 14vh, 120px) !important;
  }
}

/* ───────────────────────────────────────────────
   Inside card — dusty-blue palette
   Matches the stage background (#b4c8d6 → #88a3b6).
   Overrides the earlier warm-gold card palette.
   ─────────────────────────────────────────────── */
.card-stage {
  --paper:        #dce8f2 !important;   /* light blue-grey card surface    */
  --paper-edge:   #c0d4e4 !important;   /* slightly deeper at the edges     */
  --paper-shadow: rgba(20, 40, 60, 0.3) !important;
  --ink:          #1a2d3f !important;   /* dark navy — primary text         */
  --ink-soft:     #3d5a72 !important;   /* mid blue — secondary text        */
  --gold:         #6a8fa8 !important;   /* "accent" = mid blue              */
  --gold-deep:    #3f6278 !important;   /* deeper blue — labels, dividers   */
  --gold-bright:  #a8c4d8 !important;   /* light blue — highlights          */
}

/* Card surface — pale blue gradient echoing the stage */
.card-stage .card {
  background:
    radial-gradient(ellipse at 30% 8%,  rgba(220, 238, 252, 0.9), transparent 55%),
    radial-gradient(ellipse at 80% 92%, rgba(160, 196, 220, 0.4), transparent 60%),
    linear-gradient(170deg, #dce8f2 0%, #c9d9e8 55%, #baced8 100%) !important;
  box-shadow: inset 0 0 0 1px rgba(60, 100, 140, 0.12) !important;
  scrollbar-color: rgba(60, 100, 140, 0.3) transparent !important;
}

/* Buttons */
.card-stage .btn {
  border: 1px solid var(--gold-deep) !important;
  background: transparent !important;
  color: var(--ink) !important;
}
.card-stage .btn:hover {
  background: var(--ink) !important;
  color: #dce8f2 !important;
}
.card-stage .btn-primary {
  background: var(--ink) !important;
  color: #dce8f2 !important;
  border-color: var(--ink) !important;
  text-shadow: none !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.1) inset,
    0 4px 0 rgba(10, 20, 35, 0.35),
    0 8px 18px rgba(10, 20, 35, 0.25) !important;
}
.card-stage .btn-primary:hover {
  background: var(--gold-deep) !important;
  border-color: var(--gold-deep) !important;
  color: #fff !important;
}

/* Countdown cells */
.card-stage .cd-cell {
  background: rgba(200, 224, 240, 0.5) !important;
  border: 1.5px dashed var(--gold) !important;
}
.card-stage .cd-num  { color: var(--ink) !important; }
.card-stage .cd-lbl  { color: var(--ink-soft) !important; }

/* Detail row dividers */
.card-stage .detail-row { border-color: var(--gold) !important; }

/* Polaroid shadows — cool blue-grey instead of warm brown */
.card-stage .polaroid {
  box-shadow:
    0 8px 18px rgba(20, 40, 60, 0.2),
    0 2px 4px  rgba(20, 40, 60, 0.14) !important;
}

/* Decorative dot field — blue tones */
.card-inner::before {
  background-image:
    radial-gradient(circle at  8% 12%, #8ea3b8 2px,   transparent 3px),
    radial-gradient(circle at 92% 18%, #6a8fa8 2px,   transparent 3px),
    radial-gradient(circle at  6% 78%, #a8c4d8 2px,   transparent 3px),
    radial-gradient(circle at 94% 70%, #3f6278 2px,   transparent 3px),
    radial-gradient(circle at 14% 45%, #7a9db6 1.5px, transparent 2.5px),
    radial-gradient(circle at 88% 50%, #b4c8d6 1.5px, transparent 2.5px) !important;
  opacity: 0.4 !important;
}

/* Close button */
.card-stage .close-btn {
  background: rgba(220, 232, 242, 0.7) !important;
  border: 1px solid rgba(60, 100, 140, 0.25) !important;
  color: var(--ink-soft) !important;
}
.card-stage .close-btn:hover {
  background: var(--ink) !important;
  color: #dce8f2 !important;
}

/* ── Card-mini (peek card in the opening animation) — match full-screen card ── */
.card-mini {
  background:
    radial-gradient(ellipse at 30% 12%, rgba(220, 238, 252, 0.9), transparent 60%),
    linear-gradient(180deg, #dce8f2 0%, #c9d9e8 60%, #baced8 100%) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.5) inset,
    0 -10px 22px -10px rgba(20, 40, 60, 0.3),
    0 8px 18px rgba(20, 40, 60, 0.3) !important;
}

/* "Reserva la fecha" label — same as the full-screen eyebrow-line */
.card-mini-inner {
  font-family: var(--tc-eyebrow) !important;
  font-style: var(--tc-eyebrow-style) !important;
  font-size: clamp(9px, 1.1vw, 11px) !important;
  letter-spacing: var(--tc-eyebrow-tracking) !important;
  text-transform: uppercase !important;
  color: #3f6278 !important;
}

/* Primary button icon — force white so it reads against the dark navy fill.
   Needs to beat the blanket `.card-stage .card * { color: var(--ink) !important }` rule. */
.card-stage .btn-primary svg,
.card-stage .btn-primary svg *,
.card-stage .btn:hover svg,
.card-stage .btn:hover svg * {
  color: #ffffff !important;
  stroke: #ffffff !important;
}

/* "Carlos & Laura" name — matches the h1 inline Segoe Script style */
.card-mini-inner em {
  font-family: "Segoe Script", "Lucida Handwriting", "Allura", cursive !important;
  font-style: normal !important;
  font-size: clamp(18px, 2.6vw, 28px) !important;
  letter-spacing: 0.01em !important;
  color: #1a2d3f !important;
}

/* Date — matches the italic body serif on the full-screen card */
.card-mini-date {
  font-family: var(--tc-body) !important;
  font-style: italic !important;
  letter-spacing: 0.06em !important;
  color: #3d5a72 !important;
}

/* ── Detail rows — date and location use identical font treatment ── */
.card-stage .detail-value {
  font-family: var(--tc-body) !important;
  font-size: clamp(22px, 3.2vw, 30px) !important;
  font-weight: 600 !important;
  font-style: normal !important;
  letter-spacing: 0.01em !important;
  color: #1a2d3f !important;
}

/* "Ceremonia y celebración" sub-label */
.card-stage .details .detail-row:last-child .detail-value em {
  font-family: var(--tc-body) !important;
  font-size: 0.6em !important;
  font-weight: 400 !important;
  font-style: normal !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase !important;
  color: var(--gold-deep) !important;
  margin-top: 6px !important;
  display: block !important;
}

/* "boda de día" sub-label — same treatment as Ceremonia */
.card-stage .details .detail-row:first-child .detail-value em {
  font-family: var(--tc-body) !important;
  font-size: 0.6em !important;
  font-weight: 400 !important;
  font-style: normal !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase !important;
  color: var(--gold-deep) !important;
  margin-top: 6px !important;
  display: block !important;
}

/* ── FAQ — blue-theme background, replacing the greenish sage tint ── */
.card-stage .faq {
  background: rgba(220, 232, 242, 0.45) !important;
  border-left: 3px solid var(--gold-deep) !important;
  border-radius: 8px !important;
}
.card-stage .faq-item {
  border-bottom-color: rgba(60, 100, 140, 0.15) !important;
}

/* ── Mobile polaroid stack carousel ── */
.polaroid-stack-wrap {
  /* Break out of the card's horizontal padding, then add own inset */
  margin-left: calc(-1 * clamp(20px, 4vw, 60px));
  margin-right: calc(-1 * clamp(20px, 4vw, 60px));
  width: calc(100% + 2 * clamp(20px, 4vw, 60px));
  padding: 0 36px;
  box-sizing: border-box;
  margin-top: 20px;
  margin-bottom: 4px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  user-select: none;
  -webkit-user-select: none;
}

.polaroid-stack {
  position: relative;
  width: 85%;
  margin: 0 auto;
  /* 85% of current size: width = 0.85×(100vw−72px), height = width + 32px ≈ 85vw − 29px */
  height: calc(85vw - 29px);
}

.polaroid-stack .polaroid {
  width: 100% !important;
  height: 100% !important;
  /* Classic polaroid border: thin on top/sides, thick on bottom */
  padding: 8px 8px 40px !important;
  box-sizing: border-box !important;
  display: block !important;
  will-change: transform, opacity;
  transform-origin: center bottom;
  cursor: grab;
}

.polaroid-stack .polaroid:active { cursor: grabbing; }

/* Square image that fills the inner width */
.polaroid-stack .polaroid-img {
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  height: auto !important;
}

.polaroid-stack .polaroid-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Caption is empty — hide the strip */
.polaroid-stack .polaroid-cap {
  display: none !important;
}

/* dot indicators */
.stack-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 4px 0;
  margin-top: 22px;
}

.stack-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(63, 98, 120, 0.3);
  padding: 0;
  cursor: pointer;
  transition: background 0.25s, transform 0.25s;
}

.stack-dot.active {
  background: var(--gold-deep, #3f6278);
  transform: scale(1.3);
}

/* ── Mobile: keep "Carlos & Laura" on a single line ── */
@media (max-width: 520px) {
  .card-stage .names {
    font-size: 10vw !important;
    white-space: nowrap !important;
  }
}
