:root {
  --accent: #B8860B;
  --cream: #FBF7EC;
  --card-bg: #FFFDF7;
  --ink: #3A2E1F;
  --ink-soft: #5A4A33;
  --kicker: #8B5E1F;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
}

body {
  font-family: 'Nunito Sans', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.card {
  position: relative;
  max-width: 460px;
  margin: 0 auto;
  overflow: hidden;
  padding: 44px 18px 30px;
}

@media (min-width: 560px) {
  .card { margin: 28px auto; border-radius: 14px; padding: 56px 30px 40px; }
}

/* pétalos flotantes */
.petal {
  position: absolute;
  border-radius: 50% 0 50% 50%;
  animation-name: yf-float;
  animation-timing-function: ease-in;
  animation-iteration-count: infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes yf-float {
  0%   { transform: translateY(0) rotate(0deg); opacity: 0; }
  12%  { opacity: .8; }
  100% { transform: translateY(-480px) rotate(140deg); opacity: 0; }
}

.confetti {
  position: absolute;
  z-index: 0;
  pointer-events: none;
}

/* marco */
.frame {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  border-radius: 6px;
}
.frame-outer { inset: 14px; border: 1.5px solid var(--accent); opacity: .4; }
.frame-inner { inset: 20px; border: 1px solid var(--accent); opacity: .22; }

/* esquinas */
.corner { position: absolute; z-index: 0; }
.corner-bl { left: 20px; bottom: 20px; }
.corner-br { right: 20px; bottom: 20px; transform: scaleX(-1); }
.corner-tl { left: 20px; top: 20px; transform: scaleY(-1); }
.corner-tr { right: 20px; top: 20px; transform: scale(-1,-1); }

/* sello */
.seal {
  position: absolute;
  z-index: 3;
  top: 18px;
  right: 20px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px rgba(139,94,31,.35);
  border: 2px solid rgba(255,253,247,.55);
}
.seal svg { margin-bottom: 1px; }
.seal-day {
  font-family: 'Fraunces', serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--card-bg);
  line-height: 1;
}
.seal-month {
  font-size: 7px;
  letter-spacing: 1.5px;
  color: var(--card-bg);
  margin-top: 1px;
}

/* contenido */
.content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.kicker {
  margin: 0;
  padding-right: 58px;
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--kicker);
  font-weight: 600;
}

.title {
  margin: 10px 0 0;
  font-family: 'Fraunces', serif;
  font-size: 40px;
  font-weight: 600;
  color: var(--accent);
  line-height: 1.08;
}

.subtitle {
  margin: 8px 0 0;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 500;
  font-size: 14.5px;
  color: #6B5A3E;
  max-width: 280px;
}

/* el ramo es el detalle mas importante: grande, con brillo suave y un leve movimiento */
.bouquet-wrap {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

.bouquet-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 92%;
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(245,197,24,.35) 0%, rgba(245,197,24,0) 70%);
  filter: blur(6px);
  pointer-events: none;
}

.bouquet {
  position: relative;
  width: 100%;
  max-width: 400px;
  height: auto;
  animation: yf-sway 5s ease-in-out infinite alternate;
  transform-origin: 50% 92%;
}

@keyframes yf-sway {
  0%   { transform: rotate(-1.4deg); }
  100% { transform: rotate(1.4deg); }
}

.bouquet.bloom {
  animation: yf-sway 5s ease-in-out infinite alternate, yf-bloom .7s ease-out;
}

@keyframes yf-bloom {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.07); }
  65%  { transform: scale(0.98); }
  100% { transform: scale(1); }
}

.meaning {
  margin-top: 20px;
  width: 100%;
  background: var(--card-bg);
  border-radius: 14px;
  padding: 20px 18px;
  border: 1px solid var(--accent);
  text-align: left;
}

.meaning-label {
  margin: 0 0 8px;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 600;
  font-size: 15px;
  color: var(--accent);
}

.meaning-text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink-soft);
}

.open-wrap {
  position: relative;
  margin-top: 24px;
}

.burst-layer {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 2;
}

.burst-piece {
  position: absolute;
  left: 0;
  top: 0;
  border-radius: 50% 0 50% 50%;
  animation: yf-burst var(--dur, 900ms) cubic-bezier(.2,.7,.3,1) forwards;
}

@keyframes yf-burst {
  0%   { transform: translate(-50%, -50%) rotate(0deg) scale(0.4); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) rotate(var(--rot)) scale(1); opacity: 0; }
}

.open-btn {
  position: relative;
  z-index: 1;
  padding: 16px 34px;
  background: var(--accent);
  color: var(--card-bg);
  border: none;
  border-radius: 999px;
  font-family: 'Nunito Sans', system-ui, sans-serif;
  font-size: 16.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 0 0 0 rgba(184,134,11,.45);
  animation: yf-glow 2.4s ease-in-out infinite;
  transition: transform .15s ease, box-shadow .15s ease;
}
.open-btn:hover { transform: translateY(-2px) scale(1.03); }
.open-btn:active { transform: translateY(0) scale(0.98); }

@keyframes yf-glow {
  0%   { box-shadow: 0 0 0 0 rgba(184,134,11,.4); }
  70%  { box-shadow: 0 0 0 14px rgba(184,134,11,0); }
  100% { box-shadow: 0 0 0 0 rgba(184,134,11,0); }
}

.open-btn.tapped {
  animation: none;
}

.message-card {
  margin-top: 24px;
  width: 100%;
  background: var(--card-bg);
  border-radius: 18px;
  padding: 26px 22px;
  box-shadow: 0 14px 32px rgba(139,94,31,.18);
  text-align: left;
  opacity: 0;
  transform: scale(.82) translateY(10px);
  transition: opacity .5s cubic-bezier(.2,.9,.3,1.4), transform .5s cubic-bezier(.2,.9,.3,1.4);
}
.message-card.show { opacity: 1; transform: scale(1) translateY(0); }

.message-line1 {
  margin: 0 0 14px;
  font-family: 'Fraunces', serif;
  font-size: 17.5px;
  line-height: 1.55;
  color: var(--ink);
}
.message-line2 {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.message-signature {
  margin: 10px 0 0;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 500;
  font-size: 15.5px;
  color: var(--accent);
}

.divider {
  margin-top: 26px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.divider-line {
  width: 32px;
  height: 1px;
  background: var(--accent);
  opacity: .5;
}

.footer-text {
  margin: 8px 0 0;
  font-size: 10.5px;
  letter-spacing: 1.2px;
  color: #9C8867;
  text-transform: uppercase;
}

@media (min-width: 400px) {
  .title { font-size: 46px; }
  .meaning-text { font-size: 14.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .petal, .bouquet, .open-btn, .message-card, .burst-piece {
    animation: none !important;
    transition: opacity .2s ease !important;
  }
}
