/* love2.us — shared recipient-card base (M1).
 * Theme variables are set per template in its own style.css.
 * No autoplay media, no data collection, honors prefers-reduced-motion.
 */
.card-page {
  min-height: 100dvh;
  background: var(--card-bg, linear-gradient(180deg, #ffeef4 0%, #f1ecff 48%, #fff9f0 100%));
  display: flex; flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
}
.card-topbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; }
.card-topbar .logo { font-size: 24px; }

/* ---- envelope stage ---- */
.envelope-stage { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; text-align: center; }
.envelope-stage h1 { font-family: var(--font-display); font-weight: 400; font-size: 36px; margin: 6px 0 4px; }
.envelope-stage p { color: var(--ink-soft); margin: 0 0 22px; }
.envelope {
  width: 260px; height: 170px; position: relative; cursor: pointer;
  background: #fff; border-radius: 10px; box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}
.envelope:active { transform: scale(0.97); }
.envelope .flap {
  position: absolute; inset: 0 0 auto 0; height: 90px;
  background: var(--card-envelope, var(--pink)); clip-path: polygon(0 0, 100% 0, 50% 100%);
  border-radius: 10px 10px 0 0; transform-origin: top;
  transition: transform 0.6s ease; z-index: 2;
}
.envelope.open .flap { transform: rotateX(180deg); }
.envelope .seal {
  position: absolute; left: 50%; top: 74px; transform: translateX(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--card-accent, var(--pink-ink)); color: #fff; font-size: 20px;
  display: flex; align-items: center; justify-content: center; z-index: 3;
}
.envelope .hint { position: absolute; left: 0; right: 0; bottom: 16px; font-size: 13px; color: var(--ink-soft); }

/* ---- revealed card ---- */
.card-reveal { display: none; flex: 1; padding: 8px 20px 24px; text-align: center; }
.card-reveal.show { display: block; }
.motif { font-size: 44px; letter-spacing: 4px; line-height: 1.1; margin: 0 0 4px; }
.motif-float span { display: inline-block; animation: floaty 3s ease-in-out infinite; }
.motif-float span:nth-child(2) { animation-delay: 0.5s; }
.motif-float span:nth-child(3) { animation-delay: 1s; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.motif-pulse span { display: inline-block; animation: pulsey 2.4s ease-in-out infinite; }
.motif-pulse span:nth-child(2) { animation-delay: 0.4s; }
.motif-pulse span:nth-child(3) { animation-delay: 0.8s; }
@keyframes pulsey { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }
.card-reveal h1 { font-family: var(--font-display); font-weight: 400; font-size: 40px; line-height: 1.2; margin: 8px 0; }
.card-reveal h1.serif-title { font-family: var(--font-serif); font-weight: 700; font-size: 34px; letter-spacing: 0.01em; }
.card-reveal .msg { font-family: var(--font-serif); font-size: 18px; max-width: 36ch; margin: 0 auto 20px; }
.card-reveal .msg.sans-msg { font-family: var(--font-body); }
.photo-frames { display: flex; gap: 12px; justify-content: center; margin: 0 0 20px; }
.frame {
  width: 96px; height: 120px; border-radius: 12px; background: #fff;
  box-shadow: var(--shadow); display: flex; align-items: center; justify-content: center;
  font-size: 34px; transform: rotate(-3deg);
}
.frame:nth-child(2) { transform: rotate(2deg); }
.frame:nth-child(3) { transform: rotate(-1deg); }
.frames-plain .frame { transform: none; border: 1.5px solid var(--card-frame-border, #e8e0da); box-shadow: none; }

/* gold double frame for Elegant / Romantic templates */
.frame-box {
  border: 2px solid var(--gold); outline: 1px solid var(--gold); outline-offset: 5px;
  border-radius: 8px; padding: 22px 16px; margin: 0 auto 20px; max-width: 520px;
  background: rgba(255, 255, 255, 0.55);
}
/* candy heart chips for the Cute love template */
.candy-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 0 0 12px; }
.candy { display: inline-block; padding: 8px 14px; border-radius: 999px; font-weight: 800; font-size: 14px; background: #fff; box-shadow: var(--shadow); transform: rotate(-2deg); }
.candy:nth-child(2) { transform: rotate(2deg); background: #ffeef4; }
.candy:nth-child(3) { transform: rotate(-1deg); background: #f1ecff; }
.rule { width: 64px; height: 2px; background: var(--gold); margin: 12px auto; }
/* milestone timeline for the Minimal anniversary template */
.timeline { display: flex; align-items: flex-start; justify-content: center; margin: 8px auto 20px; max-width: 420px; }
.timeline .t-step { flex: 1; text-align: center; position: relative; padding-top: 18px; }
.timeline .t-step::before {
  content: ""; position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
  width: 12px; height: 12px; border-radius: 50%; background: var(--gold);
  border: 2px solid #fff; box-shadow: 0 0 0 1.5px var(--gold);
}
.timeline .t-step::after {
  content: ""; position: absolute; top: 12px; left: calc(-50% + 6px); right: calc(50% + 6px);
  height: 2px; background: var(--gold); opacity: 0.5;
}
.timeline .t-step:first-child::after { display: none; }
.timeline .t-year { font-weight: 800; font-size: 15px; }
.timeline .t-label { font-size: 13px; color: var(--ink-soft); }
/* minimal line-art balloon for the Minimal birthday template */
.line-art { margin: 0 0 8px; }
.line-art .lb {
  display: block; width: 54px; height: 68px; margin: 0 auto;
  border: 2px solid var(--card-accent, var(--pink-ink));
  border-radius: 50% 50% 50% 50% / 55% 55% 45% 45%; position: relative;
}
.line-art .lb::after {
  content: ""; position: absolute; left: 50%; bottom: -26px;
  width: 2px; height: 26px; background: var(--card-accent, var(--pink-ink)); opacity: 0.6;
}
.signature { font-family: var(--font-display); font-size: 26px; color: var(--card-accent, var(--pink-ink)); margin: 0 0 24px; }

/* share */
.share-box { background: rgba(255, 255, 255, 0.75); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.share-box h3 { margin: 0 0 10px; font-size: 17px; }
.link-chip {
  display: inline-block; background: #fff; border: 1.5px dashed var(--gold);
  border-radius: 999px; padding: 8px 16px; font-weight: 700; margin-bottom: 14px;
}
.share-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.share-row .btn { min-width: 140px; }
.copied-msg { font-size: 14px; color: var(--sage-deep); font-weight: 700; min-height: 20px; margin: 10px 0 0; }

/* confetti pieces */
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 5; }
.confetti i {
  position: absolute; top: -16px; width: 10px; height: 14px; border-radius: 2px;
  animation: fall linear forwards;
}
@keyframes fall { to { transform: translateY(105vh) rotate(720deg); opacity: 0.2; } }

.card-footer { text-align: center; padding: 18px 20px calc(20px + env(safe-area-inset-bottom)); color: var(--ink-soft); font-size: 13px; }
.card-footer a { color: var(--pink-ink); font-weight: 700; text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
  .motif-float span, .motif-pulse span, .confetti i { animation: none !important; }
  .envelope .flap { transition: none; }
}
