/* The 20/10 card (card_art.js): its own page (card.html, body.lc-page: an envelope that opens, then the card) and the
   preview inside the app (card2010.js). Everything moves only when motion is allowed. */

/* ---------- The card ---------- */
.lc-card {
  --lc-teal: #149B9B; --lc-navy: #2C5885; --lc-gold: #F5A623; --lc-mint: #D4F0EC; --lc-ink: #2b3a46; --lc-muted: #5f6f7a;
  position: relative; box-sizing: border-box; width: 100%; max-width: 420px; margin: 0 auto; padding: 22px 26px 20px;
  border-radius: 28px; text-align: center; color: var(--lc-ink); overflow: hidden;
  background:
    radial-gradient(120% 60% at 50% -5%, rgba(255, 255, 255, 1) 50%, rgba(255, 255, 255, 0) 100%),
    radial-gradient(90% 50% at 50% 105%, #fdeee9 0%, rgba(253, 238, 233, 0) 70%),
    linear-gradient(180deg, #fffdf9 0%, #fff7ec 100%);
  box-shadow: 0 30px 70px rgba(44, 88, 133, .20), 0 8px 18px rgba(44, 88, 133, .08), 0 1px 0 rgba(255, 255, 255, .9) inset;
  font-family: "Montserrat", system-ui, sans-serif;
}
/* a gold-foil frame inside the card, its shine slowly travelling round */
.lc-card::before {
  content: ""; position: absolute; inset: 9px; border-radius: 21px; padding: 1.6px; pointer-events: none;
  background: linear-gradient(115deg, #c9892a 0%, #f6d28b 18%, #fff4cf 30%, #e2a641 46%, #f6d28b 62%, #c9892a 80%, #f6d28b 100%);
  background-size: 300% 300%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
  animation: lc-foil 7s linear infinite;
}
/* a sweep of light across the card as it arrives, then now and then */
.lc-card::after {
  content: ""; position: absolute; inset: -20%; pointer-events: none; opacity: 0;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .85) 49%, rgba(255, 236, 190, .5) 53%, transparent 64%);
  transform: translateX(-70%);
}
.lc-shine::after { animation: lc-sheen 9s ease-in-out .5s infinite; }
.lc-art { position: relative; margin: -6px auto 0; width: 84%; }
.lc-art::before {   /* a soft golden glow behind the bouquet */
  content: ""; position: absolute; left: 12%; right: 12%; top: 8%; bottom: 18%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(245, 166, 35, .22), rgba(245, 166, 35, 0)); filter: blur(6px);
}
.lc-svg { position: relative; display: block; width: 100%; height: auto; overflow: visible; }
.lc-kicker {
  margin: 0; font-family: "Young Serif", "Lora", serif; font-size: 44px; line-height: 1.05; letter-spacing: 1px;
  background: linear-gradient(110deg, #c27f1c 0%, #f5a623 22%, #ffe7a8 38%, #f5a623 52%, #c27f1c 72%, #f5c26b 100%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: lc-foil-text 5s linear infinite; filter: drop-shadow(0 2px 0 rgba(194, 127, 28, .15));
}
.lc-title { text-wrap: balance; margin: 4px 0 14px; font-family: "Lora", "Young Serif", serif; font-weight: 600; font-size: 24px; line-height: 1.22; color: var(--lc-navy); }
.lc-dear { margin: 0 0 8px; font-family: "Lora", serif; font-style: italic; font-size: 20px; color: var(--lc-teal); }
.lc-body { margin: 0 auto 10px; max-width: 34ch; font-size: 14.5px; line-height: 1.62; color: var(--lc-ink); }
.lc-wish { margin: 0 auto 16px; max-width: 30ch; font-family: "Lora", serif; font-size: 16px; line-height: 1.45; color: var(--lc-navy); }
.lc-sign { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 0 10px; }
.lc-logo { width: 46px; height: 46px; border-radius: 50%; background: #fff; box-shadow: 0 3px 10px rgba(44, 88, 133, .16); }
.lc-sign p { margin: 0; text-align: left; font-size: 12.5px; line-height: 1.4; color: var(--lc-muted); }
.lc-sign p span { display: block; }
.lc-sign p b { color: var(--lc-navy); font-weight: 600; }
.lc-mark { display: block; width: 104px; height: auto; margin: 4px auto 0; padding-top: 10px; border-top: 1px dashed rgba(20, 155, 155, .3); opacity: .85; }

/* ---------- Blooming in ---------- */
.lc-svg .lc-bloom, .lc-svg .lc-leaf, .lc-svg .lc-bud, .lc-svg .lc-spark, .lc-svg .lc-sway { transform-box: fill-box; transform-origin: center; }
.lc-svg .lc-sway { transform-origin: 50% 100%; }
.lc-anim .lc-stem { stroke-dasharray: 100; stroke-dashoffset: 100; animation: lc-draw 1.1s ease-out forwards; }
.lc-anim .lc-leaf { opacity: 0; transform: scale(.4); animation: lc-pop .55s ease-out forwards; }
.lc-anim .lc-bloom { transform: scale(0) rotate(-40deg); animation: lc-bloom .8s cubic-bezier(.2, 1.5, .4, 1) forwards; }
.lc-anim .lc-bud { transform: scale(0); animation: lc-pop .4s ease-out forwards; }
.lc-anim .lc-wrap, .lc-anim .lc-ribbon { opacity: 0; animation: lc-pop .5s ease-out .1s forwards; }
.lc-anim .lc-kicker, .lc-anim .lc-title, .lc-anim .lc-dear, .lc-anim .lc-body, .lc-anim .lc-wish, .lc-anim .lc-sign, .lc-anim .lc-mark {
  opacity: 0; transform: translateY(10px); filter: blur(3px); animation: lc-up .7s ease-out forwards;
}
.lc-anim .lc-kicker { animation: lc-up .7s ease-out 1.5s forwards, lc-foil-text 5s linear 2.2s infinite; }
.lc-stem.s1 { animation-delay: .2s; } .lc-stem.s2 { animation-delay: .3s; } .lc-stem.s3 { animation-delay: .35s; } .lc-stem.s4 { animation-delay: .45s; }
.lc-stem.s5 { animation-delay: .5s; } .lc-stem.s6 { animation-delay: .4s; } .lc-stem.s7 { animation-delay: .42s; }
.lc-leaf.l1, .lc-leaf.l2 { animation-delay: .7s; } .lc-leaf.l3, .lc-leaf.l4 { animation-delay: .85s; } .lc-leaf.l5, .lc-leaf.l6 { animation-delay: .6s; } .lc-leaf.l7, .lc-leaf.l8 { animation-delay: .75s; }
.lc-bloom.f1 { animation-delay: 1.15s; } .lc-bloom.f2 { animation-delay: 1.0s; } .lc-bloom.f3 { animation-delay: 1.05s; }
.lc-bloom.f4 { animation-delay: 1.3s; } .lc-bloom.f5 { animation-delay: 1.35s; } .lc-bloom.f6 { animation-delay: 1.2s; } .lc-bloom.f7 { animation-delay: 1.25s; }
.lc-bud { animation-delay: 1.45s; }
.lc-anim .lc-title { animation-delay: 1.65s; } .lc-anim .lc-dear { animation-delay: 1.85s; } .lc-anim .lc-body { animation-delay: 2.0s; }
.lc-anim .lc-wish { animation-delay: 2.2s; } .lc-anim .lc-sign { animation-delay: 2.35s; } .lc-anim .lc-mark { animation-delay: 2.55s; }
/* after blooming, each flower sways on its own breeze */
.lc-sway { animation: lc-sway 5.5s ease-in-out infinite; }
.lc-sway.w1 { animation-duration: 6.2s; animation-delay: 2.2s; } .lc-sway.w2 { animation-duration: 5.1s; animation-delay: 2.0s; }
.lc-sway.w3 { animation-duration: 5.7s; animation-delay: 2.4s; } .lc-sway.w4 { animation-duration: 4.8s; animation-delay: 2.1s; }
.lc-sway.w5 { animation-duration: 5.3s; animation-delay: 2.6s; } .lc-sway.w6 { animation-duration: 6.6s; animation-delay: 2.3s; }
.lc-sway.w7 { animation-duration: 4.6s; animation-delay: 2.5s; }
.lc-spark { animation: lc-twinkle 2.6s ease-in-out infinite; }
.lc-spark.k2 { animation-delay: .7s; } .lc-spark.k3 { animation-delay: 1.4s; } .lc-spark.k4 { animation-delay: 2s; } .lc-spark.k5 { animation-delay: 1.1s; }

@keyframes lc-draw { to { stroke-dashoffset: 0; } }
@keyframes lc-pop { to { opacity: 1; transform: scale(1); } }
@keyframes lc-bloom { to { transform: scale(1) rotate(0deg); } }
@keyframes lc-up { to { opacity: 1; transform: none; filter: none; } }
@keyframes lc-sway { 0%, 100% { transform: rotate(-2.5deg); } 50% { transform: rotate(2.5deg); } }
@keyframes lc-twinkle { 0%, 100% { opacity: .25; transform: scale(.7) rotate(0deg); } 50% { opacity: 1; transform: scale(1.15) rotate(25deg); } }
@keyframes lc-foil { 0% { background-position: 0% 50%; } 100% { background-position: 300% 50%; } }
@keyframes lc-foil-text { 0% { background-position: 0% 50%; } 100% { background-position: 250% 50%; } }
@keyframes lc-sheen { 0% { opacity: 0; transform: translateX(-70%); } 4% { opacity: 1; } 18% { opacity: 1; transform: translateX(70%); } 20%, 100% { opacity: 0; transform: translateX(70%); } }

/* ---------- The card's own page ---------- */
body.lc-page {
  margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 22px 16px 34px; box-sizing: border-box; overflow-x: hidden;
  background: radial-gradient(120% 80% at 50% 0%, #eef9f6 0%, #fdf6ec 55%, #fbe6e3 100%);
  font-family: "Montserrat", system-ui, sans-serif;
}
.lc-stage { position: relative; z-index: 2; width: 100%; max-width: 420px; }
.lc-bar { display: flex; justify-content: flex-end; gap: 8px; margin: 0 0 12px; }
.lc-toggle {
  padding: 7px 14px; border: 1px solid rgba(44, 88, 133, .22); border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, .75); color: #2C5885; font: 600 12.5px "Montserrat", sans-serif;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: 0 2px 8px rgba(44, 88, 133, .08);
}
.lc-toggle:focus-visible, .lc-seal:focus-visible { outline: 2px solid #149B9B; outline-offset: 3px; }
.lc-foot { position: relative; z-index: 2; margin: 18px 0 0; font-size: 11.5px; letter-spacing: .4px; color: #5f6f7a; text-align: center; }

/* soft lights drifting behind, and petals falling */
.lc-bokeh, .lc-petals { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.lc-bokeh i { position: absolute; border-radius: 50%; filter: blur(22px); opacity: .45; animation: lc-drift 16s ease-in-out infinite alternate; }
.lc-bokeh i:nth-child(1) { width: 180px; height: 180px; left: -40px; top: 8%; background: #F5C26B; }
.lc-bokeh i:nth-child(2) { width: 220px; height: 220px; right: -60px; top: 30%; background: #9ED9CF; animation-duration: 20s; }
.lc-bokeh i:nth-child(3) { width: 150px; height: 150px; left: 20%; bottom: 6%; background: #F49AA7; animation-duration: 18s; }
.lc-bokeh i:nth-child(4) { width: 90px; height: 90px; right: 18%; top: 6%; background: #FBD38D; animation-duration: 14s; }
.lc-bokeh i:nth-child(5) { width: 120px; height: 120px; left: 55%; bottom: 25%; background: #D4F0EC; animation-duration: 22s; }
.lc-bokeh i:nth-child(6) { width: 70px; height: 70px; left: 8%; top: 55%; background: #F7B7A3; animation-duration: 12s; }
@keyframes lc-drift { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(30px, -40px) scale(1.15); } }
.lc-petals i { position: absolute; top: -24px; width: 12px; height: 16px; border-radius: 60% 40% 60% 40%; background: #F49AA7; opacity: .6; animation: lc-fall 12s linear infinite; }
.lc-petals i:nth-child(2n) { background: #F5A623; width: 9px; height: 12px; animation-duration: 14s; }
.lc-petals i:nth-child(3n) { background: #fff; animation-duration: 16s; }
.lc-petals i:nth-child(1) { left: 6%; } .lc-petals i:nth-child(2) { left: 18%; animation-delay: 3s; } .lc-petals i:nth-child(3) { left: 31%; animation-delay: 6s; }
.lc-petals i:nth-child(4) { left: 46%; animation-delay: 1.5s; } .lc-petals i:nth-child(5) { left: 61%; animation-delay: 4.5s; } .lc-petals i:nth-child(6) { left: 74%; animation-delay: 7.5s; }
.lc-petals i:nth-child(7) { left: 86%; animation-delay: 2.2s; } .lc-petals i:nth-child(8) { left: 95%; animation-delay: 5.8s; }
@keyframes lc-fall { 0% { transform: translate(0, -24px) rotate(0deg); } 50% { transform: translate(24px, 55vh) rotate(270deg); } 100% { transform: translate(-10px, 112vh) rotate(540deg); } }

/* the envelope: tap the seal, the flap lifts, the letter rises */
.lc-env-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 64vh; perspective: 1100px; transition: opacity .55s ease, transform .6s ease; }
.lc-env-wrap.lc-gone { position: absolute; left: 0; right: 0; top: 44px; opacity: 0; transform: translateY(50px) scale(.94); pointer-events: none; }
.lc-env { position: relative; width: min(330px, 86vw); aspect-ratio: 1.42; cursor: pointer; transform-style: preserve-3d; animation: lc-float 4.5s ease-in-out infinite; filter: drop-shadow(0 22px 34px rgba(44, 88, 133, .25)); }
.lc-env-back { position: absolute; inset: 0; border-radius: 16px; background: linear-gradient(160deg, #f4e6cb, #ead6ae); }
.lc-env-paper {
  position: absolute; left: 7%; right: 7%; top: 7%; bottom: 9%; border-radius: 10px; padding: 14% 12% 0; box-sizing: border-box;
  background: linear-gradient(180deg, #fffdf8, #fff6ea); box-shadow: 0 3px 10px rgba(0, 0, 0, .08);
  transition: transform .75s cubic-bezier(.2, .8, .2, 1) .75s;
}
.lc-env-paper span { display: block; height: 7px; margin: 0 auto 9px; border-radius: 4px; background: rgba(245, 166, 35, .35); }
.lc-env-paper span:nth-child(2) { width: 80%; background: rgba(20, 155, 155, .25); } .lc-env-paper span:nth-child(3) { width: 60%; background: rgba(244, 154, 167, .35); }
.lc-env-front {
  position: absolute; inset: 0; z-index: 2; border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 6.5%;
  background: linear-gradient(175deg, #fbf2e1 0%, #f2dfbc 100%);
  clip-path: polygon(0 0, 50% 54%, 100% 0, 100% 100%, 0 100%);
}
.lc-env-to { margin: 0; max-width: 78%; text-align: center; line-height: 1.15; font-family: "Lora", serif; font-style: italic; font-size: 21px; color: #2C5885; overflow-wrap: anywhere; }
.lc-env-from { margin: 4px 0 0; font-size: 9.5px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase; color: #149B9B; }
.lc-env-flap {
  position: absolute; left: 0; right: 0; top: 0; height: 60%; z-index: 3; transform-origin: top center; backface-visibility: hidden;
  background: linear-gradient(180deg, #ecd8b1 0%, #e2c793 100%); clip-path: polygon(0 0, 100% 0, 50% 100%); border-radius: 16px 16px 0 0;
  transition: transform .75s cubic-bezier(.4, 0, .2, 1) .3s, z-index 0s .65s;
}
.lc-seal {
  position: absolute; left: 50%; top: 52%; z-index: 4; width: 62px; height: 62px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; transform: translate(-50%, -50%);
  background: radial-gradient(circle at 34% 28%, #4fc3bd 0%, #149B9B 45%, #0d6f70 100%);
  box-shadow: 0 6px 14px rgba(13, 80, 82, .35), inset 0 -4px 8px rgba(0, 0, 0, .25), inset 0 3px 6px rgba(255, 255, 255, .35);
  animation: lc-pulse 2.2s ease-in-out infinite; transition: transform .4s ease, opacity .4s ease;
}
.lc-seal svg { width: 70%; height: 70%; display: block; margin: auto; animation: lc-spin 18s linear infinite; }
.lc-seal::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid rgba(20, 155, 155, .35); animation: lc-ring 2.2s ease-out infinite; }
.lc-tap { margin: 22px 0 0; font-size: 13px; font-weight: 500; letter-spacing: .3px; color: #2C5885; opacity: .85; animation: lc-blink 2.4s ease-in-out infinite; }
.lc-opening { animation: none; }
.lc-opening .lc-seal { transform: translate(-50%, -50%) scale(1.5); opacity: 0; animation: none; }
.lc-opening .lc-seal::after { display: none; }
.lc-opening .lc-env-flap { transform: rotateX(180deg); z-index: 1; }
.lc-opening .lc-env-paper { transform: translateY(-58%); }
@keyframes lc-float { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-8px) rotate(1deg); } }
@keyframes lc-pulse { 0%, 100% { transform: translate(-50%, -50%) scale(1); } 50% { transform: translate(-50%, -50%) scale(1.06); } }
@keyframes lc-ring { 0% { transform: scale(.85); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }
@keyframes lc-spin { to { transform: rotate(360deg); } }
@keyframes lc-blink { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }

/* the card rising out of the envelope, then tilting a little with her finger */
.lc-tilt { perspective: 1200px; }
.lc-tilt > #lc-card { transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .3s ease-out; transform-style: preserve-3d; }
.lc-reveal { animation: lc-rise 1s cubic-bezier(.18, .9, .25, 1.08) both; }
@keyframes lc-rise { 0% { opacity: 0; transform: translateY(70px) scale(.86) rotateX(18deg); } 100% { opacity: 1; transform: none; } }

/* petals thrown out as the card arrives (card_page.js makes them) */
.lc-burst { position: fixed; left: 50%; top: 42%; width: 0; height: 0; pointer-events: none; z-index: 5; }
.lc-burst i { position: absolute; width: 11px; height: 15px; margin: -7px 0 0 -5px; border-radius: 60% 40% 60% 40%; background: var(--c); opacity: 0; animation: lc-throw 2s cubic-bezier(.15, .7, .3, 1) var(--d) forwards; }
@keyframes lc-throw {
  0% { opacity: 1; transform: translate(0, 0) rotate(0deg) scale(.5); }
  60% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), calc(var(--dy) + 260px)) rotate(var(--r)) scale(1); }
}

@media (max-width: 380px) { .lc-card { padding: 18px 18px; } .lc-title { font-size: 21px; } .lc-body { font-size: 14px; } .lc-kicker { font-size: 38px; } }
@media (prefers-reduced-motion: reduce) {
  .lc-card *, .lc-card, .lc-card::before, .lc-card::after, .lc-env, .lc-seal, .lc-seal svg, .lc-tap { animation: none !important; transition: none !important; }
  .lc-anim .lc-stem { stroke-dashoffset: 0; }
  .lc-anim .lc-bloom, .lc-anim .lc-bud, .lc-anim .lc-leaf, .lc-anim .lc-wrap, .lc-anim .lc-ribbon, .lc-anim .lc-kicker, .lc-anim .lc-title, .lc-anim .lc-dear,
  .lc-anim .lc-body, .lc-anim .lc-wish, .lc-anim .lc-sign, .lc-anim .lc-mark { opacity: 1; transform: none; filter: none; }
  .lc-petals, .lc-bokeh, .lc-burst { display: none; }
}

/* ---------- In the app: the preview and the send sheet (card2010.js) ---------- */
.c2-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.c2-preview .lc-card { max-width: 300px; padding: 16px 18px; border-radius: 22px; }
.c2-preview .lc-card::before { inset: 7px; border-radius: 16px; }
.c2-preview .lc-kicker { font-size: 32px; } .c2-preview .lc-title { font-size: 18px; margin-bottom: 10px; } .c2-preview .lc-dear { font-size: 15px; }
.c2-preview .lc-body { font-size: 11.5px; } .c2-preview .lc-wish { font-size: 12.5px; }
.c2-preview .lc-logo { width: 34px; height: 34px; } .c2-preview .lc-sign p { font-size: 10.5px; } .c2-preview .lc-mark { width: 80px; }
@media (max-width: 720px) {
  .c2-grid { grid-template-columns: 1fr; }
  .c2-preview { order: -1; }
  .c2-preview .lc-card { max-width: 260px; transform-origin: top center; }
}
.card2010-btn { background: linear-gradient(135deg, #fde8e6, #fff4dc); border-color: #F49AA7; color: #2C5885; font-weight: 600; }

/* the how-to pop-up for the Vietnam team */
.c2-intro { text-align: center; }
.c2-intro .c2-art { width: 180px; margin: -6px auto 4px; }
.c2-intro h3 { margin: 4px 0 6px; font-family: "Young Serif", serif; font-size: 22px; color: #2C5885; }
.c2-intro > p { margin: 0 auto 14px; max-width: 46ch; color: var(--muted, #5f6f7a); font-size: 14px; line-height: 1.55; }
.c2-steps { list-style: none; margin: 0 auto 14px; padding: 0; max-width: 440px; display: grid; gap: 10px; text-align: left; counter-reset: c2; }
.c2-steps li { position: relative; padding: 12px 14px 12px 50px; border-radius: 14px; background: linear-gradient(135deg, #f4fbfa, #fff8ef); font-size: 14px; line-height: 1.45; color: var(--ink, #2b3a46); }
.c2-steps li::before {
  counter-increment: c2; content: counter(c2); position: absolute; left: 14px; top: 11px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; background: #F5A623; color: #fff; font: 700 13px "Montserrat", sans-serif;
}
.c2-intro .c2-mark { display: block; width: 96px; margin: 2px auto 0; opacity: .8; }
