*, *::before, *::after {
  margin: 0; padding: 0; box-sizing: border-box;
}

:root {
  --pink-light: #fce8f0;
  --pink-mid: #f4c0d1;
  --pink-strong: #d4537e;
  --pink-dark: #72243e;
  --purple-light: #eeedfe;
  --purple-mid: #afa9ec;
  --purple-strong: #534ab7;
  --purple-dark: #26215c;
  --cream: #fdf9f6;
  --text-main: #2a1a22;
  --text-muted: #8a6070;
}

html, body {
  height: 100%;
}

body {
  font-family: 'Noto Sans Lao', sans-serif;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow: hidden;
  position: relative;
}

/* Decorative background petals */
.bg-deco {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.petal {
  position: absolute;
  border-radius: 50% 0 50% 0;
  opacity: 0.12;
}
.petal-1 { width: 320px; height: 320px; background: var(--pink-strong); top: -80px; left: -80px; transform: rotate(20deg); }
.petal-2 { width: 240px; height: 240px; background: var(--purple-strong); bottom: -60px; right: -60px; transform: rotate(-30deg); }
.petal-3 { width: 160px; height: 160px; background: var(--pink-mid); top: 40%; right: 8%; transform: rotate(45deg); opacity: 0.2; }
.petal-4 { width: 100px; height: 100px; background: var(--purple-mid); bottom: 20%; left: 6%; transform: rotate(-15deg); opacity: 0.18; }

/* Floating hearts */
.hearts-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.heart {
  position: absolute;
  width: 10px; height: 10px;
  background: var(--pink-mid);
  transform: rotate(-45deg);
  opacity: 0;
  animation: floatUp var(--dur, 8s) ease-in var(--delay, 0s) infinite;
}
.heart::before, .heart::after {
  content: '';
  position: absolute;
  width: 10px; height: 10px;
  background: inherit;
  border-radius: 50%;
}
.heart::before { top: -5px; left: 0; }
.heart::after { top: 0; left: 5px; }

@keyframes floatUp {
  0% { opacity: 0; transform: rotate(-45deg) translateY(0) scale(0.5); }
  10% { opacity: 0.5; }
  80% { opacity: 0.3; }
  100% { opacity: 0; transform: rotate(-45deg) translateY(-80vh) scale(1.2); }
}

/* === CARD === */
.wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  padding: 1.5rem;
}

.card {
  background: white;
  border-radius: 28px;
  box-shadow: 0 8px 48px rgba(180, 80, 120, 0.12), 0 2px 8px rgba(0,0,0,0.06);
  overflow: hidden;
  animation: cardIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(40px) scale(0.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Card header band */
.card-header {
  background: linear-gradient(135deg, #fce8f0 0%, #eeedfe 100%);
  padding: 2.5rem 2rem 2rem;
  text-align: center;
  border-bottom: 1px solid rgba(244, 192, 209, 0.4);
  position: relative;
}

.card-header::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 32px;
  background: white;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

.icon-wrap {
  width: 72px; height: 72px;
  background: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.25rem;
  box-shadow: 0 4px 24px rgba(212, 83, 126, 0.2);
  font-size: 32px;
  animation: iconPulse 3s ease-in-out infinite;
}

@keyframes iconPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.card-header h1 {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 26px;
  color: var(--pink-dark);
  margin-bottom: 0.4rem;
}

.card-header .sub {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 300;
}

/* Card body */
.card-body {
  padding: 2rem 2rem 1.5rem;
}

/* Tag */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--purple-light);
  color: var(--purple-dark);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
}

.tag::before {
  content: '✦';
  font-size: 8px;
}

/* Hint text */
.hint {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

/* Hidden message box */
.message-box {
  display: none;
  background: linear-gradient(135deg, #fef6f9, #f8f6ff);
  border: 1px solid var(--pink-mid);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  animation: msgReveal 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes msgReveal {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.message-box .greeting {
  font-size: 13px;
  color: var(--pink-strong);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.message-box p {
  font-size: 15px;
  color: var(--text-main);
  line-height: 1.85;
  font-weight: 300;
}

.message-box .closing {
  margin-top: 1rem;
  font-size: 13px;
  color: var(--purple-strong);
  font-weight: 500;
  text-align: right;
}

/* Divider */
.divider {
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--pink-mid), transparent);
  margin: 0 0 1.5rem;
}

/* Button */
.btn {
  width: 100%;
  padding: 14px 24px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--pink-strong), var(--purple-strong));
  color: white;
  font-family: 'Noto Sans Lao', sans-serif;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
  box-shadow: 0 4px 20px rgba(212, 83, 126, 0.35);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: white;
  opacity: 0;
  transition: opacity 0.2s;
}

.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(212, 83, 126, 0.45); filter: brightness(1.05); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn:hover::before { opacity: 0.06; }

.btn.open {
  background: linear-gradient(135deg, #f0f0f0, #e8e8f0);
  color: var(--text-muted);
  box-shadow: none;
}

.btn .btn-icon { margin-right: 8px; font-size: 16px; }

/* Footer */
.card-footer {
  padding: 0 2rem 1.5rem;
  text-align: center;
}

.footer-line {
  font-size: 11px;
  color: #c0a0b0;
  letter-spacing: 0.03em;
}

/* Responsive */
@media (max-width: 500px) {
  .wrapper { padding: 1rem; }
  .card-header { padding: 2rem 1.5rem 1.5rem; }
  .card-body { padding: 1.5rem 1.5rem 1rem; }
}