:root {
  --ink: #2a1c24;
  --muted: #74616b;
  --rose: #e11d63;
  --rose-deep: #9d174d;
  --blush: #ffd0e2;
  --card: rgba(255, 255, 255, 0.72);
  --line: rgba(225, 29, 99, 0.16);
  --shadow: 0 18px 50px rgba(157, 23, 77, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--ink);
  font-family: Outfit, sans-serif;
  background:
    radial-gradient(900px 520px at 50% -8%, #ffe4ef, transparent 62%),
    radial-gradient(700px 420px at 110% 18%, #fff0f6, transparent 55%),
    radial-gradient(640px 480px at -10% 80%, #ffe8f2, transparent 52%),
    #fff7fa;
}

body.locked {
  overflow: hidden;
  height: 100dvh;
}

body.has-dock {
  padding-bottom: 76px;
}

::selection {
  background: #fecdd3;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

[hidden] {
  display: none !important;
}

.sky {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.float-heart {
  position: absolute;
  bottom: -12vh;
  color: #f9a8d4;
  animation: rise linear infinite;
  user-select: none;
}

@keyframes rise {
  0% {
    transform: translate3d(0, 0, 0);
    opacity: 0;
  }
  12% {
    opacity: 0.75;
  }
  100% {
    transform: translate3d(18px, -120vh, 0);
    opacity: 0;
  }
}

#app {
  position: relative;
  z-index: 1;
}

.screen {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.2rem 1.4rem 4.5rem;
}

.intro {
  width: min(100%, 36rem);
}

.line {
  margin: 0 0 1.15rem;
  font-family: Fraunces, serif;
  font-weight: 560;
  font-size: clamp(1.7rem, 4.4vw, 2.45rem);
  line-height: 1.22;
  letter-spacing: -0.02em;
  animation: fadeup 0.8s ease both;
}

.line:nth-child(2) {
  animation-delay: 0.55s;
}

.line.soft {
  color: var(--muted);
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  animation-delay: 1.15s;
}

.actions {
  margin-top: 1.6rem;
  animation: fadeup 0.8s ease 1.7s both;
}

.btn svg {
  width: 16px;
  height: 16px;
  flex: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 0;
  cursor: pointer;
  color: white;
  background: linear-gradient(180deg, #e11d63 0%, #be185d 100%);
  border-radius: 999px;
  padding: 0.95rem 1.4rem;
  min-height: 52px;
  font-weight: 600;
  font-size: 1.05rem;
  box-shadow: 0 12px 30px rgba(190, 24, 93, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(190, 24, 93, 0.34);
}

.btn:focus-visible,
.icon-btn:focus-visible,
.seal-card:focus-visible,
.ghost:focus-visible {
  outline: 3px solid #fb7185;
  outline-offset: 3px;
}

.hint,
.skip {
  display: block;
  margin-top: 0.85rem;
  color: #9a8892;
  font-size: 0.82rem;
  letter-spacing: 0.01em;
}

.skip {
  position: fixed;
  right: 1.1rem;
  bottom: 1rem;
  z-index: 5;
  background: none;
  border: 0;
  padding: 0.4rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.has-dock .skip {
  bottom: 5.4rem;
}

.envelope-copy {
  text-align: center;
  width: min(100%, 28rem);
}

.envelope-copy h2 {
  margin: 0 0 0.4rem;
  font-family: Fraunces, serif;
  font-weight: 650;
  font-size: clamp(2rem, 6vw, 3rem);
  letter-spacing: -0.03em;
}

.envelope-copy .lead {
  margin-top: 0;
}

.seal-card {
  position: relative;
  width: min(86vw, 320px);
  height: 210px;
  margin: 1.4rem auto 0;
  border: 0;
  border-radius: 18px;
  cursor: pointer;
  background: linear-gradient(180deg, #fffdfd, #fff5f8);
  box-shadow:
    0 0 0 10px #ffd3e3,
    0 22px 44px rgba(157, 23, 77, 0.16);
  animation: bob 3.2s ease-in-out infinite;
}

.seal-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 92px;
  background: linear-gradient(180deg, #ff9ec4, #ff7eae);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  border-radius: 18px 18px 0 0;
}

.wax {
  position: absolute;
  left: 50%;
  top: 78px;
  width: 68px;
  height: 68px;
  transform: translateX(-50%);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  font-size: 1.45rem;
  background: radial-gradient(circle at 35% 30%, #fb7185, #9d174d 72%);
  box-shadow:
    inset 0 -6px 10px rgba(80, 0, 30, 0.25),
    0 8px 16px rgba(157, 23, 77, 0.28);
  z-index: 1;
}

.seal-card.open {
  animation: none;
}

.seal-card.open .wax {
  animation: pop 0.45s ease forwards;
}

.seal-card.open::before {
  transform-origin: top center;
  animation: flap 0.7s ease forwards;
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes pop {
  60% {
    transform: translateX(-50%) scale(1.15);
  }
  100% {
    transform: translateX(-50%) scale(0);
    opacity: 0;
  }
}

@keyframes flap {
  to {
    transform: rotateX(188deg);
    opacity: 0.2;
  }
}

@keyframes fadeup {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.site {
  padding: 8vh 0 5rem;
}

.wrap {
  width: min(720px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero {
  text-align: center;
  padding-bottom: 1rem;
}

.hero-heart {
  width: 54px;
  height: 54px;
  margin: 0 auto 0.6rem;
  color: #f43f7a;
  animation: heartbeat 1.8s ease-in-out infinite;
}

@keyframes heartbeat {
  0%,
  100% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.08);
  }
  60% {
    transform: scale(0.98);
  }
}

.hero h1 {
  margin: 0.2rem 0 0.9rem;
  font-family: Fraunces, serif;
  font-weight: 650;
  font-size: clamp(2.2rem, 9vw, 4.7rem);
  text-wrap: balance;
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.hero h1 em {
  display: block;
  margin-top: 0.15rem;
  font-style: italic;
  font-weight: 560;
  color: var(--rose-deep);
}

.since {
  color: var(--muted);
  font-size: 0.98rem;
}

.stat {
  margin: 1.5rem auto 0;
  width: min(100%, 240px);
  padding: 1.15rem 1rem 1rem;
  border-radius: 28px;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow);
}

.stat b {
  display: block;
  font-family: Fraunces, serif;
  font-weight: 650;
  font-size: 4.4rem;
  line-height: 0.9;
  color: var(--rose-deep);
  font-variant-numeric: tabular-nums;
}

.stat span {
  display: block;
  margin-top: 0.25rem;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  font-weight: 600;
  color: #c2416c;
}

.clock {
  display: inline-flex;
  gap: 0.4rem;
  margin-top: 1rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--rose-deep);
  font-weight: 600;
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 8px 24px rgba(157, 23, 77, 0.06);
}

.days-line {
  margin: 0.95rem 0 0;
  color: #5c4652;
  font-weight: 500;
}

.days-line i {
  color: #fb7185;
  font-style: normal;
}

.divider {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 2.6rem 0;
  color: #fb7185;
}

.divider span {
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, #fbcfe8, transparent);
}

.section h2,
.finale h2 {
  margin: 0;
  text-align: center;
  font-family: Fraunces, serif;
  font-weight: 650;
  font-size: clamp(2rem, 5vw, 3.15rem);
  letter-spacing: -0.03em;
}

.lead {
  margin: 0.45rem 0 1.5rem;
  text-align: center;
  color: var(--muted);
}

.letter {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 28px;
  padding: 1.7rem 1.35rem 1.3rem;
  box-shadow: var(--shadow);
}

.letter p {
  margin: 0 0 1rem;
  font-family: Fraunces, serif;
  font-style: italic;
  font-weight: 560;
  font-size: 1.22rem;
  line-height: 1.55;
  color: #3d2c36;
}

.letter p:first-child {
  font-size: 1.65rem;
  color: var(--rose-deep);
}

.letter p.sign {
  margin: 0.6rem 0 0;
  font-family: Caveat, cursive;
  font-size: 2.15rem;
  font-style: normal;
  font-weight: 700;
  color: var(--rose-deep);
  line-height: 1;
}

.grid {
  display: grid;
  gap: 0.8rem;
}

.motivo {
  background: var(--card);
  border-radius: 22px;
  padding: 1.1rem 1.1rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.motivo h3 {
  margin: 0 0 0.35rem;
  font-family: Fraunces, serif;
  font-size: 1.35rem;
}

.motivo p {
  margin: 0;
  color: #53424b;
  line-height: 1.45;
}

.timeline {
  position: relative;
  display: grid;
  gap: 0.9rem;
  padding-left: 0.2rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(#fecdd3, #fb7185);
}

.event {
  position: relative;
  padding-left: 3rem;
}

.dot {
  position: absolute;
  left: 4px;
  top: 1.15rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: white;
  border: 2px solid #fb7185;
  color: var(--rose);
  display: grid;
  place-items: center;
  font-size: 0.72rem;
}

.event article {
  background: var(--card);
  border-radius: 22px;
  padding: 1rem 1.05rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.event time {
  display: block;
  color: #db2777;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.event h3 {
  margin: 0.25rem 0 0.3rem;
  font-family: Fraunces, serif;
  font-size: 1.35rem;
}

.event p {
  margin: 0;
  color: #53424b;
  line-height: 1.45;
}

.stage {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background: #f3d5e1;
  box-shadow: var(--shadow);
}

.stage img {
  display: block;
  width: 100%;
  height: min(78vh, 760px);
  object-fit: cover;
  object-position: center;
  background: #f8d5e3;
  cursor: zoom-in;
}

.stage figcaption {
  margin: 0;
  padding: 0.85rem 1rem 1rem;
  text-align: center;
  font-family: Fraunces, serif;
  font-style: italic;
  font-size: 1.2rem;
}

.nav {
  position: absolute;
  top: 42%;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(20, 10, 16, 0.38);
  color: white;
  cursor: pointer;
  backdrop-filter: blur(6px);
}

.nav.prev {
  left: 0.7rem;
}

.nav.next {
  right: 0.7rem;
}

.thumbs {
  display: flex;
  gap: 0.55rem;
  justify-content: center;
  margin-top: 0.8rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
}

.thumbs button {
  width: 64px;
  height: 64px;
  padding: 0;
  border-radius: 14px;
  border: 2px solid transparent;
  overflow: hidden;
  cursor: pointer;
  background: none;
  opacity: 0.55;
}

.thumbs button.on {
  opacity: 1;
  border-color: #fb7185;
}

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

.counter-photos {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0.55rem 0 0;
}

.now-playing {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.15rem 1.25rem;
  border-radius: 24px;
  background: #1a1016;
  color: white;
  box-shadow: var(--shadow);
}

.now-playing strong {
  display: block;
  color: #fb7185;
  font-size: 1.05rem;
}

.now-playing span {
  color: #d6c4cc;
  font-size: 0.9rem;
}

#musica.paused .bars i {
  animation: none;
  height: 4px;
}

.song-line {
  margin: 1.15rem 0 0;
  text-align: center;
  font-family: Fraunces, serif;
  font-style: italic;
  font-weight: 560;
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  line-height: 1.4;
  color: var(--rose-deep);
}

.finale {
  text-align: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(255, 228, 239, 0.55));
  border-radius: 32px;
  padding: 2rem 1.2rem 1.7rem;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.finale p {
  font-family: Fraunces, serif;
  font-style: italic;
  font-size: 1.18rem;
  line-height: 1.5;
  color: #3d2c36;
}

.finale p.reply {
  min-height: 0;
  margin: 0.8rem 0 0;
  font-family: Caveat, cursive;
  font-style: normal;
  font-weight: 700;
  font-size: 2.15rem;
  line-height: 1.1;
  color: var(--rose-deep);
}

.finale p.reply:empty {
  display: none;
}

.share-row {
  display: flex;
  justify-content: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-top: 1.6rem;
}

.ghost {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  color: var(--rose-deep);
  border-radius: 999px;
  padding: 0.7rem 1rem;
  min-height: 44px;
  cursor: pointer;
  font-weight: 600;
}

.finale p.foot {
  margin: 1.4rem 0 0;
  text-align: center;
  color: #c08497;
  font-family: Caveat, cursive;
  font-style: normal;
  font-size: 1.7rem;
  font-weight: 700;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(32, 14, 22, 0.86);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
}

.lightbox img {
  max-width: min(100%, 920px);
  max-height: 86dvh;
  border-radius: 16px;
}

.lightbox .close-lite {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: white;
  cursor: pointer;
  font-size: 1.2rem;
}

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0 1rem;
  background: #1a1016;
  color: white;
}

.dock-meta {
  min-width: 0;
}

.dock-meta strong {
  display: block;
  color: #fb7185;
  font-weight: 600;
}

.dock-meta span {
  display: block;
  color: #d6c4cc;
  font-size: 0.8rem;
}

.bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 16px;
  margin-right: 0.45rem;
}

.bars i {
  width: 3px;
  height: 6px;
  background: #fb7185;
  display: block;
  animation: eq 0.8s ease-in-out infinite;
}

.bars i:nth-child(2) {
  animation-delay: 0.15s;
}

.bars i:nth-child(3) {
  animation-delay: 0.3s;
}

.dock.paused .bars i {
  animation: none;
  height: 4px;
}

@keyframes eq {
  0%,
  100% {
    height: 5px;
  }
  50% {
    height: 16px;
  }
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  background: #3a2430;
  color: white;
  cursor: pointer;
}

.burst {
  position: fixed;
  left: var(--x);
  top: var(--y);
  z-index: 25;
  color: #e11d63;
  pointer-events: none;
  animation: burst 0.9s ease-out forwards;
  font-size: 1.1rem;
}

@keyframes burst {
  to {
    transform: translate(var(--dx), var(--dy)) scale(0.4);
    opacity: 0;
  }
}

.reveal {
  animation: fadeup 0.8s ease both;
}

@media (min-width: 760px) {
  .grid {
    grid-template-columns: 1fr 1fr;
  }

  .letter {
    padding: 2.2rem 2.2rem 1.6rem;
  }

  .letter p {
    font-size: 1.32rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
