@charset "UTF-8";

:root {
  color-scheme: light;
  --paper: #faf7f2;
  --ink: #40252d;
  --muted: #79646a;
  --cherry: #b62d51;
  --cherry-dark: #94213f;
  --rose: #f0c1cd;
  --line: #e8deda;
  --sans: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
}

* { box-sizing: border-box; }
html { min-width: 280px; background: var(--paper); }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(#b78a9621 .7px, transparent .7px);
  background-size: 18px 18px;
  overflow-x: clip;
}
button { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: wait; }
button:focus-visible { outline: 3px solid var(--cherry); outline-offset: 7px; }
h1:focus, h2:focus { outline: none; }
svg { display: block; width: 24px; height: 24px; }
[hidden] { display: none !important; }
::selection { color: var(--ink); background: #f4c6d2; }
.svg-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.page-shell {
  max-width: 1336px;
  min-height: 100svh;
  margin: 0 auto;
  padding: 0 clamp(24px, 5.8vw, 80px);
  display: flex;
  flex-direction: column;
}
.site-header { display: flex; justify-content: space-between; align-items: center; min-height: 112px; gap: 20px; border-bottom: 1px solid var(--line); }
.wordmark { display: flex; align-items: center; gap: 11px; font-size: 25px; font-weight: 650; letter-spacing: -1px; white-space: nowrap; }
.wordmark i { font-style: normal; font-weight: 350; color: var(--cherry); }
.wordmark-dot { color: var(--cherry); }
.brand-icon { display: grid; place-items: center; height: 34px; width: 34px; border: 1px solid #d7a9b6; border-radius: 10px; background: #f6e1e7; transform: rotate(-7deg); }
.brand-icon svg { width: 17px; height: 17px; color: var(--cherry); }
.occasion { display: flex; gap: 10px; align-items: center; font-size: .75rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 600; color: var(--muted); }
.occasion-line { width: 23px; height: 1px; background: #bb7689; }
main { flex: 1; display: grid; align-items: center; }
.welcome { display: grid; grid-template-columns: minmax(0, .96fr) minmax(0, 1fr); align-items: center; gap: clamp(55px, 7.5vw, 106px); padding: 74px 10px 80px; }
.photo-scene { width: 100%; max-width: 420px; margin: 0 auto; position: relative; isolation: isolate; }
.photo-backing { position: absolute; inset: 3% 0 0 1%; z-index: -1; border-radius: 5px; transform: rotate(3deg); background: #ead6d1; border: 1px solid #dec8c4; }
.photo-card { background: #fffdfb; border: 1px solid #ece3db; border-radius: 5px; padding: 15px 15px 0; margin: 0; transform: rotate(-3deg); box-shadow: 0 16px 40px #6b314211, 0 3px 6px #6b314208; }
.photo-window { width: 100%; aspect-ratio: 1 / 1.08; overflow: hidden; position: relative; border-radius: 2px; background: #f5e7e5; }
.photo-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 27px; text-align: center; background: radial-gradient(ellipse at 20% 10%, #fae8e3, transparent 60%), linear-gradient(140deg, #f0d4d6, #efdde1 55%, #ecd4d9); }
.placeholder-border { position: absolute; inset: 17px; border: 1px dashed #b5748860; border-radius: 50% 50% 2px 2px; }
.placeholder-emblem { position: relative; color: #ae5a73; margin: 2px 0 22px; }
.placeholder-emblem svg { width: 58px; height: 58px; stroke-width: 1; transform: rotate(-9deg); }
.placeholder-emblem span { position: absolute; right: -13px; top: -11px; font-size: 25px; font-weight: 300; }
.photo-placeholder p { margin: 0 0 10px; color: #784255; font-family: var(--serif); font-size: clamp(1.3rem, 2.3vw, 1.6rem); font-style: italic; }
.photo-placeholder > span:not(.placeholder-coordinate) { color: #885c6b; font-size: .8125rem; line-height: 1.5; }
.placeholder-coordinate { position: absolute; bottom: 35px; color: #855868; font-size: .75rem; letter-spacing: .14em; }
.couple-photo { width: 100%; height: 100%; display: block; object-fit: contain; object-position: 50% 50%; }
.photo-card figcaption { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 72px; padding: 13px 4px; text-align: center; color: #785660; font-family: var(--serif); font-style: italic; font-size: .9375rem; line-height: 1.5; }
.photo-card figcaption svg { width: 19px; height: 19px; color: var(--cherry); flex-shrink: 0; transform: rotate(10deg); }
.photo-tag { position: absolute; display: flex; align-items: center; gap: 8px; bottom: -27px; left: 26px; transform: rotate(-5deg); padding: 10px 15px; background: #f5dce4; border: 1px solid #d9a1b2; border-radius: 4px; color: #92455b; font: 600 .75rem/1.1 var(--sans); letter-spacing: .09em; box-shadow: 0 3px 0 #e8d7d1; }
.photo-tag svg { height: 11px; width: 11px; }
.photo-orbit { position: absolute; color: var(--cherry); }
.orbit-one { top: -29px; right: -28px; transform: rotate(9deg); }
.orbit-one svg { width: 39px; height: 39px; }
.orbit-two { bottom: 39px; left: -38px; color: #c89154; }
.orbit-two svg { width: 23px; height: 23px; }
.orbit-three { top: 25px; right: -44px; color: #be7c8b; font-size: 25px; font-weight: 300; }
.welcome-copy { padding: 3px 0 0; }
.eyebrow { margin: 0 0 13px; font-size: .75rem; line-height: 1.6; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.couple-names { display: flex; flex-wrap: wrap; align-items: baseline; gap: 9px; margin: 0 0 26px; font-size: .9375rem; font-weight: 600; overflow-wrap: anywhere; }
.names-plus { color: var(--cherry); padding: 0 1px; font-size: 1.1rem; font-weight: 400; }
h1 { margin: 0; font-family: var(--serif); font-size: clamp(2.65rem, 4.85vw, 4.15rem); font-weight: 400; line-height: 1.075; letter-spacing: -.055em; overflow-wrap: anywhere; text-wrap: balance; }
h1 em { display: block; color: var(--cherry); font-weight: 400; letter-spacing: -.06em; }
.welcome-message { margin: 25px 0 31px; color: var(--muted); font-size: 1.0625rem; line-height: 1.85; max-width: 360px; text-wrap: pretty; }
.button-wrap { position: relative; display: inline-block; max-width: 100%; }
.primary-button { position: relative; display: flex; justify-content: center; align-items: center; gap: 23px; min-height: 62px; width: 100%; border-radius: 12px; border: 1px solid var(--cherry-dark); background: var(--cherry); box-shadow: 0 5px 0 #7e2740, 0 8px 18px #b62d5112; color: #fff9f4; padding: 17px 23px; font-weight: 600; font-size: .9375rem; line-height: 1.5; transition: background .18s ease, transform .18s ease, box-shadow .18s ease; }
.button-arrow { font-size: 1.25rem; line-height: 1; font-weight: 400; }
.button-arrow { width: 20px; height: 20px; flex-shrink: 0; }
.inline-icon { display: inline-block; width: 1.1em; height: 1.1em; vertical-align: -.18em; flex-shrink: 0; }
.icon-button { display: inline-flex; gap: 9px; justify-content: center; align-items: center; }
.icon-button svg { width: 19px; height: 19px; flex-shrink: 0; }
@media (hover: hover) {
  .primary-button:hover:not(:disabled) { background: var(--cherry-dark); transform: translateY(-2px); box-shadow: 0 7px 0 #7e2740, 0 10px 20px #b62d5120; }
  .secondary-button:hover { background: #f4e7e9; }
}
.primary-button:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 #7e2740; }
.start-note { margin: 21px 0 0; display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .75rem; letter-spacing: .02em; }
.start-note svg { width: 13px; height: 13px; color: #ad7e4d; }
.heart-particles { position: absolute; inset: 0; pointer-events: none; }
.heart-particle { position: absolute; bottom: 55%; left: 50%; width: 15px; height: 15px; color: var(--particle-color); animation: heart-burst 730ms cubic-bezier(.2,.7,.3,1) both; }
.heart-particle svg { width: 100%; height: 100%; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 26px; border-top: 1px solid var(--line); min-height: 91px; padding: 24px 0; color: var(--muted); }
.made-with-love { display: flex; align-items: center; gap: 9px; font-size: .75rem; }
.made-with-love svg { width: 14px; height: 14px; color: #ab697d; }
.journey-progress { display: flex; align-items: center; gap: 19px; }
#progress-label { font-size: .75rem; white-space: nowrap; }
.progress-steps { display: flex; align-items: center; list-style: none; margin: 0; padding: 0; gap: 7px; }
.progress-step { width: 7px; height: 7px; border-radius: 50%; background: #e1d1d4; position: relative; }
.progress-step[aria-current="step"] { width: 23px; height: 7px; border-radius: 10px; background: var(--cherry); }
.progress-step.completed { background: #c27c90; }
.next-part { text-align: center; padding: 95px 10px; max-width: 600px; margin: 0 auto; }
.next-emblem { margin: 0 auto 26px; color: var(--cherry); width: 42px; height: 42px; }
.next-part h2 { font: italic 400 clamp(2.5rem, 6vw, 4rem)/1.1 var(--serif); color: var(--cherry); letter-spacing: -.045em; overflow-wrap: anywhere; }
.next-part p { color: var(--muted); line-height: 1.7; }
.secondary-button { min-height: 46px; margin-top: 16px; padding: 12px 20px; background: transparent; border: 1px solid #caa5b0; border-radius: 9px; color: var(--ink); font-size: .875rem; }
.noscript-message { font-size: 1rem; text-align: center; padding: 18px; background: #f6e1e7; border-radius: 8px; }
.entrance { animation: reveal 750ms cubic-bezier(.18,.65,.25,1) both; animation-delay: var(--delay, 0ms); }
.welcome.revisited .entrance { animation: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@keyframes reveal { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
@keyframes heart-burst {
  0% { opacity: 0; transform: translate(-50%, 0) scale(.4) rotate(0); }
  15% { opacity: 1; }
  70% { opacity: .85; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--x)), var(--y)) scale(var(--scale)) rotate(var(--rotation)); }
}

@media (min-width: 1440px) { .welcome { padding-top: 94px; padding-bottom: 104px; } }
@media (max-width: 960px) and (min-width: 721px) {
  .page-shell { padding: 0 38px; }
  .welcome { gap: 48px; padding-left: 0; padding-right: 0; }
  .couple-names { font-size: .875rem; gap: 7px; }
  .primary-button { gap: 10px; padding: 16px; }
  .button-arrow { display: none; }
  .photo-card figcaption { font-size: .8125rem; }
}
@media (max-width: 720px) {
  .page-shell { padding: 0 25px; }
  .site-header { min-height: 79px; }
  .wordmark { font-size: 23px; gap: 9px; }
  .occasion { font-size: .75rem; letter-spacing: .07em; gap: 7px; }
  .occasion-line { width: 15px; }
  .welcome { grid-template-columns: minmax(0, 1fr); gap: 52px; padding: 44px 0 39px; }
  .photo-scene { width: min(78%, 330px); }
  .photo-card { padding: 10px 10px 0; }
  .photo-window { aspect-ratio: 1.14 / 1; }
  .photo-card figcaption { min-height: 59px; font-size: .8125rem; padding: 12px 3px; gap: 7px; }
  .photo-card figcaption svg { width: 15px; height: 15px; }
  .placeholder-border { inset: 12px; }
  .placeholder-emblem { margin: 5px 0 15px; }
  .placeholder-emblem svg { width: 42px; height: 42px; }
  .photo-placeholder { padding: 23px 17px 29px; }
  .photo-placeholder p { font-size: 1.25rem; margin-bottom: 6px; }
  .photo-placeholder > span:not(.placeholder-coordinate) { font-size: .75rem; }
  .placeholder-coordinate { display: none; }
  .photo-tag { left: 15px; bottom: -21px; font-size: .75rem; padding: 8px 11px; letter-spacing: .05em; }
  .orbit-one { right: -27px; top: -21px; }
  .orbit-one svg { width: 30px; height: 30px; }
  .orbit-two { left: -28px; bottom: 34px; }
  .orbit-two svg { width: 18px; height: 18px; }
  .orbit-three { right: -32px; top: 21px; font-size: 21px; }
  .welcome-copy { text-align: center; padding: 0; }
  .eyebrow { margin-bottom: 9px; font-size: .75rem; letter-spacing: .1em; }
  .couple-names { justify-content: center; margin-bottom: 22px; font-size: .875rem; gap: 8px; }
  h1 { max-width: 440px; margin: 0 auto; font-size: clamp(2.55rem, 8.8vw, 3.8rem); line-height: 1.1; letter-spacing: -.052em; }
  .welcome-message { margin: 20px auto 26px; font-size: 1rem; line-height: 1.75; max-width: 330px; }
  .button-wrap { width: min(100%, 366px); }
  .primary-button { padding: 17px 15px; min-height: 60px; gap: 13px; font-size: .9375rem; }
  .start-note { justify-content: center; margin-top: 18px; font-size: .75rem; }
  .site-footer { flex-direction: column-reverse; justify-content: center; gap: 18px; padding: 25px 0; }
  .journey-progress { gap: 16px; }
  .made-with-love { font-size: .75rem; }
  .next-part { padding: 90px 0; }
}
@media (max-width: 360px) {
  .page-shell { padding: 0 20px; }
  .occasion-line { display: none; }
  .photo-scene { width: 82%; }
  .photo-placeholder p { font-size: 1.1rem; }
  .placeholder-emblem { margin-bottom: 10px; }
  .photo-card figcaption { font-size: .75rem; }
  .primary-button { gap: 6px; font-size: .875rem; padding-inline: 10px; }
  .button-arrow { display: none; }
  h1 { font-size: 2.45rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .heart-particles { display: none; }
  .primary-button:hover:not(:disabled), .primary-button:active:not(:disabled) { transform: none; }
}

/* Parte 2: un recuerdo escondido dentro de un calendario de papel. */
.memory-part { width: 100%; padding: 48px 0 38px; text-align: center; }
.memory-header { max-width: 620px; margin: 0 auto 38px; }
.memory-step { color: var(--cherry); font-size: .75rem; text-transform: uppercase; letter-spacing: .14em; margin: 0 0 17px; font-weight: 600; }
.memory-header h2 { margin: 0; font: 400 clamp(2.25rem, 4.5vw, 3.7rem)/1.13 var(--serif); letter-spacing: -.05em; text-wrap: balance; }
.memory-introduction { color: var(--muted); margin: 17px 0 0; line-height: 1.75; font-size: 1rem; text-wrap: pretty; }
.calendar-experience { width: min(100%, 376px); margin: 0 auto; }
.calendar-card { position: relative; padding: 7px; border: 1px solid #d8b9c0; border-radius: 13px; background: #f3e3e6; box-shadow: 0 6px 0 #e5d4d8, 0 16px 34px #6b314211; }
.calendar-ring { position: absolute; z-index: 3; top: -13px; width: 12px; height: 31px; border: 3px solid #8e586b; border-radius: 8px; background: var(--paper); pointer-events: none; box-shadow: 1px 1px 0 #fff7; }
.ring-left { left: 24%; }
.ring-right { right: 24%; }
.calendar-surface { position: relative; border-radius: 7px; overflow: hidden; }
.calendar-sheet { padding: 28px 20px 18px; background: #fffcf8; }
.calendar-month { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; color: var(--cherry-dark); font: 400 2.2rem/1.2 var(--serif); }
.calendar-month > span:first-child { text-transform: capitalize; }
.calendar-year { font-family: var(--sans); font-size: .875rem; font-weight: 500; letter-spacing: .08em; }
.calendar-subtitle { text-align: left; margin: 8px 0 20px; font-size: .75rem; color: var(--muted); letter-spacing: .055em; }
.calendar-grid { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: .9375rem; font-variant-numeric: tabular-nums; }
.calendar-grid th { padding-bottom: 12px; height: 31px; font-weight: 500; color: var(--muted); font-size: .75rem; border-bottom: 1px solid #ecdde1; }
.calendar-grid td { height: 40px; padding: 0; text-align: center; color: #694a56; }
.calendar-grid .our-day { color: #fff; }
.date-heart { position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; }
.date-heart svg { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--cherry); }
.date-heart time { position: relative; padding-bottom: 2px; font-size: .875rem; font-weight: 650; }
.calendar-dedication { border-top: 1px solid #ecdde1; padding-top: 14px; margin: 5px 0 0; font: italic .875rem/1.5 var(--serif); color: #855162; overflow-wrap: anywhere; }
.scratch-layer { position: absolute; inset: 0; border-radius: inherit; }
.scratch-canvas { display: block; width: 100%; height: 100%; touch-action: none; user-select: none; -webkit-user-select: none; cursor: crosshair; }
.canvas-unavailable { background: #ecc5d1; }
.scratch-cover-copy { position: absolute; inset: 19px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px 12px; pointer-events: none; border: 1px dashed #94536980; border-radius: 5px; color: #79384e; transition: opacity 160ms ease; }
.scratch-emblem { margin-bottom: 24px; }
.scratch-emblem svg { width: 48px; height: 48px; transform: rotate(-7deg); }
.scratch-cover-title { margin: 0 0 10px; font: italic 1.75rem/1.3 var(--serif); text-wrap: balance; }
.scratch-cover-message { margin: 0; font-size: .875rem; line-height: 1.7; }
.scratch-cover-names { margin-top: 38px; font-size: .75rem; letter-spacing: .06em; max-width: 100%; overflow-wrap: anywhere; }
.is-scratching .scratch-cover-copy { opacity: 0; }
.calendar-celebration { z-index: 4; overflow: visible; }
.scratch-controls { padding-top: 25px; }
.scratch-instruction { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 0; color: #77535f; font-size: .875rem; line-height: 1.6; }
.scratch-instruction svg { width: 22px; height: 22px; color: var(--cherry); flex-shrink: 0; }
.scratch-mouse-hint { margin: 5px 0 15px; font-size: .75rem; line-height: 1.6; color: var(--muted); }
.reveal-button { background: #fffcf8; border: 1px solid #bc8999; border-radius: 9px; color: var(--cherry-dark); min-height: 46px; padding: 11px 19px; font-size: .875rem; }
.reveal-button:hover { background: #f6e1e7; }
.revealed-badge { display: flex; justify-content: center; align-items: center; gap: 7px; margin: 27px 0 0; font-size: .8125rem; color: var(--cherry-dark); }
.revealed-badge svg { height: 15px; width: 15px; }
.memory-reward { max-width: 560px; margin: 27px auto 0; }
.revealed-date { margin: 0 auto 30px; color: var(--ink); font: 400 1.55rem/1.5 var(--serif); max-width: 490px; text-wrap: pretty; }
.revealed-date .inline-icon { color: var(--cherry); width: .85em; height: .85em; }
.revealed-date:focus { outline: none; }
.memory-photo-card { padding: 11px 11px 0; background: #fffdfb; border: 1px solid #ece3db; border-radius: 5px; margin: 0 auto; max-width: 376px; box-shadow: 0 8px 24px #6b31420d; }
.memory-photo-window { position: relative; width: 100%; aspect-ratio: 4 / 3; background: #f5e7e5; overflow: hidden; border-radius: 2px; }
.memory-photo { display: block; width: 100%; height: 100%; object-fit: contain; }
.memory-photo-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 25px; background: #f0d9df; color: #794958; }
.memory-photo-placeholder svg { width: 38px; height: 38px; }
.memory-photo-placeholder p { margin: 8px 0; font: italic 1.3rem/1.4 var(--serif); }
.memory-phrase { margin: 0; padding: 19px 13px 22px; font: italic 1.05rem/1.65 var(--serif); color: #795060; text-wrap: pretty; }
.memory-continue { margin: 31px auto 0; max-width: 376px; gap: 18px; font-size: 1rem; }
.memory-continue:disabled { opacity: .65; }
.memory-back { margin-top: 31px; }
.text-button { min-height: 44px; border: none; padding: 10px 8px; background: transparent; color: #795361; font-size: .8125rem; }
.text-button:hover { color: var(--cherry-dark); text-decoration: underline; text-underline-offset: 4px; }
.date-celebrate .date-heart { animation: date-pop 550ms cubic-bezier(.2,.7,.3,1) both; }
@keyframes date-pop { 0%, 100% { transform: scale(1); } 45% { transform: scale(1.18) rotate(-7deg); } 70% { transform: scale(.98) rotate(3deg); } }
@media (max-width: 720px) {
  .memory-part { padding: 32px 0 22px; }
  .memory-header { margin-bottom: 32px; }
  .memory-step { margin-bottom: 13px; }
  .memory-header h2 { font-size: clamp(2.15rem, 8vw, 3rem); }
  .memory-introduction { font-size: 1rem; margin-top: 14px; }
  .calendar-sheet { padding: 25px 16px 16px; }
  .calendar-month { font-size: 2rem; }
  .calendar-grid td { height: 36px; }
  .calendar-subtitle { margin-bottom: 16px; }
  .scratch-cover-title { font-size: 1.6rem; }
  .scratch-cover-copy { inset: 15px; padding-inline: 9px; }
  .scratch-controls { padding-top: 23px; }
  .revealed-date { font-size: 1.4rem; }
  .memory-photo-card { padding: 9px 9px 0; }
  .memory-phrase { padding: 16px 10px 19px; }
}
@media (max-width: 360px) {
  .calendar-sheet { padding-inline: 12px; }
  .scratch-instruction { font-size: .8125rem; gap: 6px; }
  .scratch-cover-title { font-size: 1.4rem; }
  .scratch-cover-message { font-size: .8125rem; }
  .scratch-cover-copy { inset: 12px; }
  .date-heart { width: 32px; height: 34px; }
}

/* Parte 3: fotografías guardadas como recuerdos de papel. */
.gallery-part { width: 100%; padding: 48px 0 32px; }
.gallery-header { max-width: 680px; margin: 0 auto 34px; text-align: center; }
.gallery-header h2 { margin: 0; font: 400 clamp(2.3rem, 4.8vw, 3.7rem)/1.1 var(--serif); letter-spacing: -.05em; text-wrap: balance; }
.gallery-introduction { margin: 18px auto 0; color: var(--muted); font-size: 1rem; line-height: 1.75; max-width: 500px; text-wrap: pretty; }
.gallery-progress { margin: 25px auto 0; width: fit-content; max-width: 100%; }
#gallery-counter { margin: 0 0 12px; color: #85445b; font-size: .875rem; line-height: 1.5; }
.discovery-meter { display: block; width: 100%; height: 5px; border: none; border-radius: 6px; background: #eadcde; color: var(--cherry); accent-color: var(--cherry); overflow: hidden; }
.discovery-meter::-webkit-progress-bar { background: #eadcde; border-radius: 6px; }
.discovery-meter::-webkit-progress-value { background: var(--cherry); border-radius: 6px; }
.discovery-meter::-moz-progress-bar { background: var(--cherry); border-radius: 6px; }
.keepsake-box { border: 1px solid #e3d2ce; border-radius: 12px; padding: 24px 27px 33px; background: #f2e9e330; box-shadow: inset 0 0 0 6px #f4ece633; }
.box-label { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin: 0 0 28px; color: #8d616c; font-size: .75rem; line-height: 1.5; }
.box-label > span:first-child { display: inline-flex; gap: 8px; align-items: center; letter-spacing: .1em; text-transform: uppercase; }
.box-label svg { width: 15px; height: 15px; }
.box-couple { font: italic .9375rem/1.5 var(--serif); overflow-wrap: anywhere; }
.gallery-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 29px 24px; list-style: none; margin: 0; padding: 0; }
.gallery-item { min-width: 0; animation: keepsake-arrive 500ms cubic-bezier(.2,.7,.3,1) both; animation-delay: var(--card-delay); }
.gallery-revisited .gallery-item { animation: none; }
.keepsake { background: #fffdfb; padding: 8px; border: 1px solid #e1cfd0; border-radius: 4px; transform: rotate(var(--card-angle)); box-shadow: 0 4px 0 #e8dcd5, 0 9px 19px #6b31420b; transition: transform 200ms ease, box-shadow 200ms ease; }
.keepsake.is-open { transform: rotate(0); box-shadow: 0 4px 0 #e8dcd5, 0 11px 23px #6b31420e; }
.keepsake-toggle { position: relative; display: flex; flex-direction: column; align-items: center; width: 100%; min-height: 352px; padding: 22px 18px; border: none; border-radius: 2px; background: #f3e1e5; color: #7a3d51; text-align: center; }
.gallery-item:nth-child(2n) .keepsake-toggle { background: #eee1d9; color: #79513e; }
.gallery-item:nth-child(3n) .keepsake-toggle { background: #eee3e8; color: #775366; }
.keepsake-toggle::after { content: ""; position: absolute; inset: 10px; border: 1px dashed #b7879860; border-radius: 2px; pointer-events: none; }
.keepsake-topline { display: flex; justify-content: space-between; align-items: center; align-self: stretch; gap: 9px; }
.keepsake-number { display: inline-flex; align-items: center; justify-content: center; min-width: 29px; min-height: 29px; border: 1px solid #a7748866; border-radius: 50%; font-size: .75rem; font-variant-numeric: tabular-nums; color: #89576a; flex-shrink: 0; }
.keepsake-status { display: inline-flex; align-items: center; gap: 4px; font-size: .75rem; line-height: 1.5; color: #805166; }
.keepsake-status svg { width: 13px; height: 13px; }
.keepsake-symbol { width: 30px; height: 30px; margin: 37px 0 22px; color: #a5637c; flex-shrink: 0; }
.gallery-item:nth-child(2n) .keepsake-symbol { color: #ae855d; }
.keepsake-clue { display: block; max-width: 100%; font: italic 400 clamp(1.4rem, 2.15vw, 1.8rem)/1.25 var(--serif); letter-spacing: -.025em; overflow-wrap: anywhere; text-wrap: balance; }
.keepsake-prompt { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: .75rem; line-height: 1.5; margin-top: auto; padding-top: 28px; color: #815669; }
.keepsake-prompt svg { width: 16px; height: 16px; flex-shrink: 0; }
.keepsake.is-open .keepsake-toggle { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; min-height: 60px; padding: 9px 4px 14px; gap: 9px; background: transparent; text-align: left; }
.keepsake.is-open .keepsake-toggle::after { display: none; }
.keepsake.is-open .keepsake-topline { display: contents; }
.keepsake.is-open .keepsake-symbol, .keepsake.is-open .keepsake-status { display: none; }
.keepsake.is-open .keepsake-clue { font: 500 .875rem/1.45 var(--sans); letter-spacing: 0; color: #76525f; text-wrap: pretty; }
.keepsake.is-open .keepsake-prompt { padding: 0; margin: 0; }
.keepsake.is-open .keepsake-prompt > span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.keepsake.is-open .keepsake-prompt svg { transform: rotate(180deg); }
.keepsake-figure { margin: 0; }
.keepsake-photo-window { position: relative; width: 100%; aspect-ratio: 4 / 3; background: #f3e8e5; overflow: hidden; border-radius: 2px; }
.keepsake-photo { display: block; width: 100%; height: 100%; object-fit: contain; }
.keepsake-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 13px; padding: 22px; color: #87586a; text-align: center; background: #f2e3e7; }
.keepsake-placeholder svg { width: 33px; height: 33px; color: #af7c8d; }
.keepsake-placeholder p { margin: 0; font: italic 1.25rem/1.3 var(--serif); }
.keepsake-placeholder > span { font-size: .75rem; line-height: 1.5; }
.keepsake-figure figcaption { padding: 17px 9px 15px; text-align: center; }
.keepsake-phrase { margin: 0; color: #76505e; font: italic 1.05rem/1.6 var(--serif); overflow-wrap: anywhere; text-wrap: pretty; }
.keepsake-details { margin: 13px 0 0; color: var(--muted); font-size: .75rem; line-height: 1.6; overflow-wrap: anywhere; }
.gallery-complete { position: relative; max-width: 550px; padding: 30px 0 0; margin: 25px auto 0; text-align: center; }
.gallery-celebration { bottom: auto; height: 70px; }
.collection-seal { display: grid; place-items: center; width: 42px; height: 42px; margin: 0 auto 18px; border: 1px solid #ddafbd; border-radius: 50%; background: #f5e1e7; color: var(--cherry); }
.collection-seal svg { width: 19px; height: 19px; }
.gallery-complete h3 { margin: 0 auto 12px; font: 400 1.9rem/1.3 var(--serif); letter-spacing: -.035em; text-wrap: balance; }
.gallery-complete > p { margin: 0 0 24px; color: var(--muted); font-size: .9375rem; line-height: 1.7; }
.gallery-next { width: min(100%, 330px); margin: 0 auto; }
.gallery-back { margin: 32px auto 0; text-align: center; }
@media (hover: hover) { .keepsake:not(.is-open):hover { transform: translateY(-3px) rotate(0); box-shadow: 0 5px 0 #e8dcd5, 0 13px 23px #6b314214; } }
@keyframes keepsake-arrive { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 1040px) {
  .gallery-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
  .keepsake-clue { font-size: 1.65rem; }
}
@media (max-width: 720px) {
  .gallery-part { padding: 32px 0 24px; }
  .gallery-header { margin-bottom: 28px; }
  .gallery-header h2 { font-size: clamp(2.1rem, 7.8vw, 3rem); }
  .gallery-introduction { margin-top: 15px; }
  .gallery-progress { margin-top: 21px; }
  .keepsake-box { padding: 20px 18px 25px; }
  .box-label { margin-bottom: 24px; gap: 9px; }
  .box-couple { font-size: .8125rem; }
  .gallery-list { gap: 25px; }
  .keepsake-toggle { min-height: 325px; }
  .keepsake-clue { font-size: 1.6rem; }
}
@media (max-width: 600px) {
  .keepsake-box { border: none; padding: 0 3px; background: none; box-shadow: none; }
  .box-label { justify-content: center; margin-bottom: 23px; }
  .box-couple { display: none; }
  .gallery-list { grid-template-columns: minmax(0, 1fr); gap: 29px; }
  .keepsake { padding: 9px; }
  .keepsake-toggle { min-height: 330px; padding: 23px 20px; }
  .keepsake-symbol { margin: 30px 0 20px; }
  .keepsake-clue { font-size: 1.8rem; }
  .keepsake.is-open .keepsake-toggle { min-height: 56px; padding-bottom: 12px; }
  .keepsake-photo-window { aspect-ratio: 4 / 3; }
  .keepsake-figure figcaption { padding: 18px 12px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .keepsake:not(.is-open):hover { transform: rotate(var(--card-angle)); }
}

/* Parte 5 · un regalo de papel, cinta de cereza y un cupón para guardar. */
.prize-part { width: 100%; padding: 42px 0 48px; }
.prize-header { max-width: 680px; margin: 0 auto; text-align: center; }
.prize-header h2 { margin: 13px 0 17px; font: 400 clamp(2.4rem, 4.6vw, 3.65rem)/1.1 var(--serif); letter-spacing: -.045em; color: var(--cherry); text-wrap: balance; overflow-wrap: anywhere; }
.prize-introduction { max-width: 430px; margin: 0 auto; color: var(--muted); font-size: 1rem; line-height: 1.8; text-wrap: pretty; }
.prize-arrival { min-height: 42px; width: fit-content; max-width: 100%; margin: 20px auto 8px; padding: 9px 14px; border: 1px solid #dcb9c4; border-radius: 6px; display: flex; justify-content: center; align-items: center; gap: 9px; color: var(--cherry-dark); background: #f9e9ee; font-size: .75rem; font-weight: 600; text-align: center; visibility: hidden; }
.prize-arrival.is-visible { visibility: visible; }
.prize-arrival svg { width: 14px; height: 14px; flex-shrink: 0; }
.prize-layout { max-width: 890px; margin: 0 auto; }
.gift-column { width: min(100%, 355px); margin: 0 auto; text-align: center; }
.gift-stage { position: relative; }
.gift-button { position: relative; display: flex; flex-direction: column; align-items: center; width: 100%; padding: 0 18px 8px; color: var(--ink); background: transparent; border: 0; border-radius: 20px; }
.gift-art { width: min(100%, 300px); height: auto; overflow: visible; }
.gift-lid { transform-origin: 160px 130px; }
.gift-tag { margin: -12px 0 0; padding: 9px 24px; max-width: 100%; background: #fffcf7; border: 1px solid #d7b6bf; border-radius: 3px; box-shadow: 2px 3px 0 #e8dcd5; color: var(--cherry-dark); font: italic 1.2rem/1.5 var(--serif); transform: rotate(-4deg); overflow-wrap: anywhere; }
.gift-action { display: inline-flex; gap: 8px; align-items: center; justify-content: center; margin-top: 26px; font-size: .875rem; font-weight: 600; color: var(--cherry-dark); }
.gift-action svg { width: 16px; height: 16px; flex-shrink: 0; }
.gift-hint { margin: 4px 0 20px; color: var(--muted); font-size: .8125rem; line-height: 1.6; }
.prize-scores { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 280px; margin: 0 auto; padding: 14px 0; border-top: 1px solid var(--line); }
.prize-scores > div + div { border-left: 1px solid var(--line); }
.prize-scores dt { font-size: .6875rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); }
.prize-scores dd { margin: 6px 8px 0; font: 400 1.4rem/1.3 var(--serif); color: var(--cherry-dark); overflow-wrap: anywhere; }
.prize-is-open .prize-layout { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 52px; align-items: center; padding-top: 10px; }
.prize-is-open .gift-lid { transform: translate(-12px, -40px) rotate(-8deg); }
.prize-is-open .gift-art { max-width: 260px; }
.prize-is-open .gift-tag { font-size: 1.0625rem; }
.prize-is-open .gift-action { margin-top: 22px; }
.prize-celebration { inset: 15% 0 0; }
.prize-reveal { min-width: 0; }
.reward-coupon, .reward-message-card { position: relative; padding: clamp(25px, 3.2vw, 40px) 30px 25px; border: 1px solid #d8b7c1; border-radius: 6px; background: #fffaf4; box-shadow: 0 5px 0 #e7d7d2, 0 13px 32px #6b31420b; text-align: center; }
.reward-coupon::before, .reward-coupon::after { content: ""; position: absolute; width: 16px; height: 28px; top: 64%; background: var(--paper); border: 1px solid #d8b7c1; }
.reward-coupon::before { left: -1px; border-left: 0; border-radius: 0 20px 20px 0; }
.reward-coupon::after { right: -1px; border-right: 0; border-radius: 20px 0 0 20px; }
.reward-label { display: flex; flex-direction: column; align-items: center; gap: 13px; margin: 0 0 22px; color: #8a5264; font-size: .6875rem; line-height: 1.6; letter-spacing: .12em; text-transform: uppercase; }
.reward-label svg { width: 26px; height: 26px; color: var(--cherry); }
.reward-content h3:not(.sr-only) { margin: 0; color: var(--cherry-dark); font: italic 400 clamp(1.55rem, 2.4vw, 1.95rem)/1.35 var(--serif); letter-spacing: -.025em; text-wrap: pretty; overflow-wrap: anywhere; }
#prize-reward-title:focus { outline: none; }
#prize-reward-title:focus-visible { outline: 2px solid #bc7f91; outline-offset: 8px; border-radius: 2px; }
.coupon-footer { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 25px 0 0; padding-top: 18px; border-top: 1px dashed #d6abb8; color: var(--muted); font-size: .75rem; line-height: 1.6; }
.coupon-footer svg { width: 13px; height: 13px; color: var(--cherry); }
.prize-personal-note { padding: 24px 10px 25px; text-align: center; }
.prize-personal-note p { margin: 0 0 12px; color: var(--muted); font-size: .875rem; line-height: 1.8; overflow-wrap: anywhere; }
.prize-personal-note > span { color: var(--cherry-dark); font: italic 1.125rem/1.5 var(--serif); overflow-wrap: anywhere; }
.prize-actions { display: flex; flex-direction: column; align-items: center; gap: 15px; }
.prize-letter { max-width: 360px; }
.prize-replay { min-height: 46px; padding: 10px 18px; }
.reward-photo-card { padding: 12px 12px 0; border: 1px solid var(--line); border-radius: 4px; background: #fffdfb; box-shadow: 0 5px 0 #e7d7d2, 0 13px 32px #6b31420b; }
.reward-photo-frame { position: relative; width: 100%; aspect-ratio: 4 / 3; background: #f2e3e7; overflow: hidden; }
.reward-photo-frame img { width: 100%; height: 100%; }
.reward-photo-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 28px; text-align: center; color: #87586a; font: italic 1.3rem/1.4 var(--serif); }
.reward-photo-placeholder svg { width: 34px; height: 34px; flex-shrink: 0; }
.reward-photo-caption { margin: 0; padding: 19px 9px; text-align: center; color: #76505e; font: italic 1.05rem/1.6 var(--serif); overflow-wrap: anywhere; }
@media (hover: hover) {
  .gift-button:hover .gift-tag { background: #fff4ef; border-color: #b58091; }
  .gift-button:hover .gift-action { text-decoration: underline; text-underline-offset: 4px; }
}
@media (max-width: 720px) {
  .prize-part { padding: 31px 0 30px; }
  .prize-header h2 { font-size: clamp(2.1rem, 8.5vw, 3rem); margin-top: 11px; }
  .prize-introduction { font-size: .9375rem; line-height: 1.75; }
  .prize-arrival { margin-top: 18px; margin-bottom: 0; padding: 8px 10px; font-size: .6875rem; }
  .gift-art { max-width: 254px; }
  .gift-action { margin-top: 22px; }
  .prize-is-open .prize-layout { grid-template-columns: minmax(0, 1fr); gap: 23px; padding-top: 0; }
  .prize-is-open .gift-art { max-width: 170px; }
  .prize-is-open .gift-tag { margin-top: -5px; padding: 5px 20px; }
  .prize-is-open .gift-action { margin-top: 17px; font-size: .8125rem; }
  .prize-is-open .gift-hint { margin: 3px 0 14px; }
  .prize-scores { padding: 11px 0 0; }
  .prize-scores dd { font-size: 1.2rem; }
  .reward-coupon, .reward-message-card { padding: 28px 25px 23px; }
  .reward-content h3:not(.sr-only) { font-size: clamp(1.55rem, 6.3vw, 1.9rem); }
  .reward-label { margin-bottom: 20px; }
  .reward-photo-card { padding: 9px 9px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .prize-part *, .prize-part *::before, .prize-part *::after { animation: none !important; transition: none !important; }
}

/* Parte 3 · Memorama: cartas de papel que se voltean para encontrar pares. */
.memorama-moves { margin: 10px 0 0; color: var(--muted); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.memorama-board { --memo-columns: 5; display: flex; flex-wrap: wrap; justify-content: center; gap: 20px 18px; list-style: none; margin: 0; padding: 0; }
.memo-slot { flex: 0 0 calc((100% - (var(--memo-columns) - 1) * 18px) / var(--memo-columns)); max-width: 200px; min-width: 0; animation: keepsake-arrive 500ms cubic-bezier(.2,.7,.3,1) both; animation-delay: var(--card-delay); }
.gallery-revisited .memo-slot { animation: none; }
.memo-card { display: block; width: 100%; aspect-ratio: 3 / 4; padding: 0; border: none; background: none; color: inherit; perspective: 900px; transform: rotate(var(--card-angle)); transition: transform 200ms ease; }
.memo-card:focus-visible { outline-offset: 5px; }
.memorama-board.is-locked .memo-card, .memo-card.is-matched { cursor: default; }
.memo-inner { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 460ms cubic-bezier(.2,.7,.3,1); }
.memo-card.is-flipped .memo-inner { transform: rotateY(180deg); }
.memo-back, .memo-face { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; backface-visibility: hidden; -webkit-backface-visibility: hidden; border: 1px solid #e1cfd0; border-radius: 4px; background: #fffdfb; padding: 7px; box-shadow: 0 4px 0 #e8dcd5, 0 9px 19px #6b31420b; }
.memo-back { justify-content: center; gap: 10px; background: #f3e1e5 padding-box; color: #a5637c; }
.memo-card[data-back="1"] .memo-back { background-color: #eee1d9; color: #ae855d; }
.memo-card[data-back="2"] .memo-back { background-color: #eee3e8; color: #775366; }
.memo-back::after { content: ""; position: absolute; inset: 8px; border: 1px dashed #b7879860; border-radius: 2px; pointer-events: none; }
.memo-back-heart { width: 30%; max-width: 34px; height: auto; aspect-ratio: 1; }
.memo-face { transform: rotateY(180deg); gap: 7px; }
.memo-photo-window { position: relative; display: block; width: 100%; flex: 1; min-height: 0; overflow: hidden; border-radius: 2px; background: #f3e8e5; }
.memo-photo { position: absolute; inset: 0; width: 100%; height: 100%; }
.memo-placeholder { position: absolute; inset: 0; display: grid; place-items: center; background: #f2e3e7; color: #af7c8d; }
.memo-card[data-tone="1"] .memo-placeholder { background: #efe3da; color: #ae855d; }
.memo-card[data-tone="2"] .memo-placeholder { background: #eee3e8; color: #775366; }
.memo-placeholder svg { width: 38%; max-width: 44px; height: auto; aspect-ratio: 1; }
.memo-clue { display: block; width: 100%; padding: 0 3px 3px; font: italic 400 clamp(.8rem, 1.3vw, .98rem)/1.25 var(--serif); color: #76525f; text-align: center; overflow-wrap: anywhere; text-wrap: balance; }
.memo-card.is-matched .memo-face { border-color: #d9a3b3; box-shadow: 0 4px 0 #efd3db, 0 9px 19px #b62d5114; }
.memo-card.is-matched .memo-clue { color: var(--cherry-dark); }
.memo-card.is-matched { transform: rotate(0); }
.memorama-found { margin: 42px 0 0; }
.memorama-found > h3 { margin: 0 0 24px; text-align: center; color: #8d616c; font: 600 .75rem/1.5 var(--sans); letter-spacing: .1em; text-transform: uppercase; }
.memo-found-clue { display: flex; align-items: center; gap: 8px; margin: 4px 4px 12px; color: #76525f; font-size: .875rem; font-weight: 500; }
.memo-found-clue svg { width: 15px; height: 15px; color: var(--cherry); flex-shrink: 0; }
@media (hover: hover) { .memo-card:not(.is-flipped):hover { transform: translateY(-3px) rotate(0); } .memorama-board.is-locked .memo-card:hover { transform: rotate(var(--card-angle)); } }
@media (max-width: 1040px) { .memorama-board { gap: 16px 14px; } .memo-slot { flex-basis: calc((100% - 3 * 14px) / 4); } }
@media (max-width: 720px) { .memorama-board { gap: 12px 10px; } .memo-slot { flex-basis: calc((100% - 2 * 10px) / 3); } }
@media (max-width: 360px) { .memo-clue { font-size: .75rem; } }
/* Animación de par encontrado. */
.memo-slot { position: relative; }
.memo-card.just-matched .memo-inner { animation: memo-match 820ms cubic-bezier(.2,.7,.3,1) both; }
.memo-card.just-matched .memo-face { animation: memo-glow 820ms ease-out both; }
.memo-burst { position: absolute; left: 50%; top: 45%; width: 0; height: 0; pointer-events: none; z-index: 2; }
.memo-burst-heart { position: absolute; left: -8px; top: -8px; width: 16px; height: 16px; color: var(--color); animation: memo-burst 900ms cubic-bezier(.2,.7,.3,1) both; }
@keyframes memo-match {
  0% { transform: rotateY(180deg) scale(1); }
  30% { transform: rotateY(180deg) translateY(-12px) scale(1.12); }
  55% { transform: rotateY(180deg) translateY(0) scale(.96); }
  75% { transform: rotateY(180deg) scale(1.04); }
  100% { transform: rotateY(180deg) scale(1); }
}
@keyframes memo-glow {
  0% { box-shadow: 0 0 0 0 #b62d5166, 0 4px 0 #efd3db; }
  50% { box-shadow: 0 0 0 10px #b62d5122, 0 0 26px 6px #f0c1cd, 0 4px 0 #efd3db; }
  100% { box-shadow: 0 0 0 16px #b62d5100, 0 4px 0 #efd3db, 0 9px 19px #b62d5114; }
}
@keyframes memo-burst {
  0% { opacity: 0; transform: translate(0, 0) scale(.3); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--x), var(--y)) scale(1.1) rotate(20deg); }
}

/* Animación de victoria: ola de cartas, lluvia de corazones y mensaje grande. */
.memorama-board.is-won .memo-card { animation: memo-wave 900ms cubic-bezier(.2,.7,.3,1) var(--wave-delay) both; }
@keyframes memo-wave {
  0%, 100% { transform: translateY(0) rotate(0); }
  35% { transform: translateY(-22px) rotate(-4deg) scale(1.06); }
  65% { transform: translateY(4px) rotate(2deg); }
}
.memo-win { position: fixed; inset: 0; z-index: 50; pointer-events: none; overflow: hidden; display: grid; place-items: center; animation: memo-win-fade 4200ms ease both; }
.memo-win::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, #fffdfbee 0, #faf7f2aa 38%, transparent 70%); }
.memo-rain { position: absolute; top: -50px; left: var(--left); width: var(--size); height: var(--size); color: var(--color); animation: memo-rain var(--duration) cubic-bezier(.3,.1,.6,1) var(--delay) both; }
@keyframes memo-rain {
  0% { opacity: 0; transform: translate(0, 0) rotate(0); }
  10% { opacity: 1; }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--drift), 110vh) rotate(var(--spin)); }
}
.memo-win-banner { position: relative; text-align: center; padding: 30px 36px 28px; border: 1px solid #ddafbd; border-radius: 14px; background: #fffdfb; box-shadow: 0 5px 0 #efd3db, 0 24px 60px #6b314226; animation: memo-banner 4200ms cubic-bezier(.2,.7,.3,1) both; }
.memo-win-heart { width: 54px; height: 54px; margin: 0 auto 12px; color: var(--cherry); animation: memo-beat 900ms ease-in-out 400ms 3; }
.memo-win-title { margin: 0; font: italic 400 clamp(2.4rem, 8vw, 4rem)/1.05 var(--serif); letter-spacing: -.04em; color: var(--cherry-dark); }
.memo-win-detail { margin: 12px 0 0; color: var(--muted); font-size: .875rem; letter-spacing: .06em; }
@keyframes memo-banner {
  0% { opacity: 0; transform: scale(.4) rotate(-8deg); }
  12% { opacity: 1; transform: scale(1.12) rotate(2deg); }
  20% { transform: scale(.96) rotate(-1deg); }
  28%, 82% { opacity: 1; transform: scale(1) rotate(0); }
  100% { opacity: 0; transform: scale(.9) translateY(-20px); }
}
@keyframes memo-beat { 0%, 100% { transform: scale(1); } 30% { transform: scale(1.25); } 60% { transform: scale(.95); } }
@keyframes memo-win-fade { 0%, 85% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .memo-inner { transition: none; }
  .memo-card.just-matched .memo-inner, .memo-card.just-matched .memo-face, .memorama-board.is-won .memo-card { animation: none; }
  .memo-burst, .memo-win { display: none; }
  .memo-slot { animation: none; }
  .memo-card:not(.is-flipped):hover { transform: rotate(var(--card-angle)); }
}

/* Botón de sonido del encabezado. */
.header-actions { display: flex; align-items: center; gap: 16px; }
.sound-toggle { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid #e3cdd3; border-radius: 50%; background: #fffdfb; color: #9a5c70; transition: background-color 160ms ease, color 160ms ease, transform 160ms ease; }
.sound-toggle svg { width: 18px; height: 18px; }
.sound-toggle[aria-pressed="false"] { color: #b3a0a6; background: transparent; }
.sound-toggle:focus-visible { outline-offset: 3px; }
@media (hover: hover) { .sound-toggle:hover { background: #f6e1e7; color: var(--cherry); } }
.sound-toggle:active { transform: scale(.94); }
@media (max-width: 720px) { .header-actions { gap: 10px; } .sound-toggle { width: 34px; height: 34px; } }

/* Premio del memorama: sobre y carta sobre recuerdos. */
.letter-prize { margin: 6px auto 28px; }
.gallery-complete > .letter-prize-label { margin: 0 0 12px; color: #8d616c; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; }
.letter-envelope { display: inline-flex; flex-direction: column; align-items: center; gap: 12px; padding: 0; border: none; background: none; color: var(--cherry-dark); }
.envelope-art { position: relative; display: block; width: 190px; height: 124px; border: 1px solid #d6a3b3; border-radius: 6px; background: linear-gradient(160deg, #fbe8ee, #f3d3dc); box-shadow: 0 5px 0 #e8cfd6, 0 16px 30px #6b314214; overflow: hidden; transition: transform 200ms ease; }
.envelope-art::before, .envelope-art::after { content: ""; position: absolute; bottom: 0; width: 60%; height: 70%; background: #f6dde4; border-top: 1px solid #e0b3c1; }
.envelope-art::before { left: 0; transform-origin: bottom left; transform: skewY(-33deg); }
.envelope-art::after { right: 0; transform-origin: bottom right; transform: skewY(33deg); }
.envelope-flap { position: absolute; top: 0; left: 50%; z-index: 1; width: 135px; height: 135px; background: #f0c5d1; border: 1px solid #d6a3b3; transform: translate(-50%, -68%) rotate(45deg); transition: transform 400ms ease; }
.envelope-seal { position: absolute; top: 42px; left: 50%; z-index: 2; display: grid; place-items: center; width: 34px; height: 34px; margin-left: -17px; border-radius: 50%; background: var(--cherry); color: #ffe9ed; box-shadow: 0 2px 0 #7d1f38; animation: envelope-beat 1.6s ease-in-out infinite; }
.envelope-seal svg { width: 16px; height: 16px; }
.envelope-text { display: inline-flex; align-items: center; gap: 6px; padding: 8px 18px; border: 1px solid #d6a3b3; border-radius: 999px; background: #fffdfb; font-weight: 600; font-size: .9375rem; }
@media (hover: hover) { .letter-envelope:hover .envelope-art { transform: translateY(-4px) rotate(-1.5deg); } }
.letter-envelope.is-open .envelope-flap { transform: translate(-50%, -68%) rotate(45deg) scaleY(-1); }
@keyframes envelope-beat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
.memory-letter { position: relative; max-width: 520px; margin: 0 auto; padding: 34px 32px 30px; border: 1px solid #e3cfcf; border-radius: 4px; background: #fffdfb repeating-linear-gradient(180deg, transparent 0 29px, #f1e3e3 29px 30px); background-position: 0 58px; text-align: left; box-shadow: 0 5px 0 #eadcd5, 0 22px 45px #6b314214; transform: rotate(-.6deg); }
.memory-letter::before { content: ""; position: absolute; top: -10px; left: 50%; width: 90px; height: 22px; margin-left: -45px; background: #f3c9d5cc; transform: rotate(-3deg); }
.memory-letter h4 { margin: 0 0 18px; color: var(--cherry); font: italic 400 1.6rem/1.2 var(--serif); letter-spacing: -.03em; text-align: center; outline: none; }
.gallery-complete .memory-letter-greeting { margin: 0 0 10px; color: var(--cherry-dark); font: italic 1.15rem/1.8 var(--serif); }
.memory-letter-body p { margin: 0 0 12px; color: #5a3a44; font: 1.02rem/1.85 var(--serif); text-wrap: pretty; }
.gallery-complete .memory-letter-signature { margin: 18px 0 0; color: var(--cherry-dark); font: italic 1.1rem/1.6 var(--serif); text-align: right; }
@media (max-width: 720px) { .memory-letter { padding: 28px 20px 24px; } .envelope-art { width: 170px; height: 112px; } }
@media (prefers-reduced-motion: reduce) { .envelope-seal { animation: none; } .envelope-flap, .envelope-art { transition: none; } }

/* Opciones al ganar el memorama: ver fotos o leer la carta. */
.gallery-part .gallery-complete { max-width: none; }
.gallery-complete > :not(.memorama-found):not(.heart-particles) { max-width: 550px; margin-left: auto; margin-right: auto; }
.reward-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 28px; }
.reward-choice { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 14px 18px; border: 1px solid #d9b3c0; border-radius: 14px; background: #fffaf5; color: var(--cherry-dark); box-shadow: 0 5px 0 #eadcd5, 0 12px 26px #6b31420d; transition: transform 180ms ease, box-shadow 180ms ease; }
.reward-choice-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 4px; border-radius: 50%; background: #f6e1e7; color: var(--cherry); }
.reward-choice-icon svg { width: 22px; height: 22px; }
.reward-choice strong { font: italic 400 1.3rem/1.2 var(--serif); }
.reward-choice small { color: var(--muted); font-size: .75rem; }
@media (hover: hover) { .reward-choice:hover { transform: translateY(-3px); box-shadow: 0 7px 0 #eadcd5, 0 16px 30px #6b314214; } }
.reward-view { margin-bottom: 28px; scroll-margin-top: 20px; }
.reward-back { display: inline-flex; margin: 0 auto 18px; }
.memorama-found.reward-view { margin-top: 0; }
@media (max-width: 480px) { .reward-choices { grid-template-columns: 1fr; } }

/* Al terminar: los puntos del progreso sirven para saltar a cualquier parte. */
.progress-step.is-jump { position: relative; }
.progress-jump { position: absolute; inset: -8px; padding: 0; border: none; border-radius: 50%; background: transparent; }
.progress-jump:focus-visible { outline: 2px solid var(--cherry); outline-offset: 0; }
@media (hover: hover) { .progress-step.is-jump:hover { transform: scale(1.4); } }

/* Botón para mandar un premio por WhatsApp. */
.whatsapp-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; margin: 18px auto 0; padding: 10px 18px; border: 1px solid #b9d7c1; border-radius: 999px; background: #eef8f0; color: #1f6b3a; font-size: .875rem; font-weight: 650; text-decoration: none; box-shadow: 0 3px 0 #d3e8d9; }
.whatsapp-button svg { width: 20px; height: 20px; flex-shrink: 0; }
.whatsapp-button:hover { background: #e1f2e5; }
.whatsapp-button:focus-visible { outline: 3px solid #1f6b3a; outline-offset: 3px; }
.memory-letter .whatsapp-button { display: flex; width: fit-content; }
.prize-actions .whatsapp-button { margin: 0 0 6px; }
