/* ========================================================
   MINIMALISM DARK RED - CHUNGDOI TEMPLATE STYLES
   Couple: Hậu Vi & Dung Nguyễn
   Colors: #fff7eb (Cream Parchment), #511419 (Dark Wine Red), #590310 (Bordeaux)
   ======================================================== */

:root {
  --theme-bg: #fff7eb;
  --theme-red: #511419;
  --theme-dark-red: #590310;
  --theme-deep-burgundy: #380a0e;
  --theme-cream: #ece4d8;
  --theme-cream-soft: rgba(236, 228, 216, 0.72);
  --theme-gold: #c9a24a;
  --font-serif: "Playfair Display", Georgia, serif;
  --font-display: "Great Vibes", cursive;
  --font-body: "Be Vietnam Pro", system-ui, sans-serif;
  --font-script: "Great Vibes", cursive;
  --font-sans: "Be Vietnam Pro", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--theme-bg);
  color: var(--theme-red);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.72;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.locked { overflow: hidden; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img { display: block; width: 100%; }
a { color: inherit; text-decoration: none; }

/* ========================================================
   KEYFRAME ANIMATIONS
   ======================================================== */
@keyframes ambient-fall {
  0% { transform: translateY(-8vh) translateX(0) rotate(0deg); opacity: 0; }
  10% { opacity: 0.55; }
  50% { transform: translateY(48vh) translateX(var(--sway, 20px)) rotate(180deg); opacity: 0.65; }
  92% { opacity: 0.45; }
  100% { transform: translateY(105vh) translateX(0) rotate(360deg); opacity: 0; }
}

@keyframes seal-pulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 4px 20px rgba(81, 20, 25, 0.55), inset 0 2px 4px rgba(255, 255, 255, 0.3);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.08);
    box-shadow: 0 8px 32px rgba(81, 20, 25, 0.8), inset 0 2px 4px rgba(255, 255, 255, 0.45);
  }
}

@keyframes seal-break {
  0% { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 1; filter: brightness(1); }
  30% { transform: translate(-50%, -50%) scale(1.2) rotate(5deg); opacity: 0.9; filter: brightness(1.3); }
  60% { transform: translate(-50%, -50%) scale(1.05) rotate(-4deg); opacity: 0.5; filter: brightness(1.6); }
  100% { transform: translate(-50%, -50%) scale(0) rotate(15deg); opacity: 0; filter: brightness(2); }
}

@keyframes envelope-away {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  15% { transform: translateY(12px) rotate(0.6deg); opacity: 1; }
  100% { transform: translateY(-120vh) rotate(-2.5deg); opacity: 0; }
}

@keyframes shine {
  0% { left: -100%; }
  50%, 100% { left: 100%; }
}

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

@keyframes sparkle {
  0%, 100% { opacity: 0.25; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.25); }
}

@keyframes recordSpin {
  to { transform: rotate(360deg); }
}

/* ========================================================
   GIAO DIỆN BÌA THIỆP MỞ (COVER ENVELOPE GATE)
   ======================================================== */
.gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 1.5rem 1rem;
  background: linear-gradient(to bottom right, #6e1a20, #511419, #380a0e);
  overflow: hidden;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.8s ease;
}

.gate.opening {
  pointer-events: none;
}

.gate.is-open {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Các hạt trái tim bay lượn */
.ambient-fall-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.ambient-heart {
  position: absolute;
  line-height: 1;
  opacity: 0;
  animation: ambient-fall ease-in-out infinite;
}

.ambient-heart.h-ivory { color: #ece4d8; }
.ambient-heart.h-darkred { color: #7a1f26; }
.ambient-heart.h-red { color: #a8323b; }
.ambient-heart.h-gold { color: #c9a24a; }

/* Khung phong bì chính */
.envelope-outer {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 340px;
  margin: auto;
  padding-top: 28px;
  transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.7s ease;
}

.envelope-outer.fly-away {
  animation: envelope-away 0.9s forwards cubic-bezier(0.25, 1, 0.5, 1);
}

/* Con dấu sáp đỏ 3D */
.top-seal {
  position: absolute;
  top: 50px;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #511419, rgb(51, 0, 0));
  box-shadow: 0 4px 20px rgba(81, 20, 25, 0.5), inset 0 2px 4px rgba(255, 255, 255, 0.3);
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  animation: seal-pulse 2s ease-in-out infinite;
  transition: transform 0.2s ease;
}

.top-seal.breaking {
  animation: seal-break 0.65s forwards ease-out !important;
}

.seal-icon {
  width: 28px;
  height: 28px;
  fill: #f3e8de;
}

/* Thẻ thiệp trên bìa phong bì */
.envelope-card-box {
  position: relative;
  border-radius: 10px;
  background: rgba(255, 250, 243, 0.96);
  border: 1px solid rgba(81, 20, 25, 0.15);
  box-shadow:
    0 25px 60px -12px rgba(0, 0, 0, 0.45),
    0 8px 24px rgba(0, 0, 0, 0.2),
    0 0 40px rgba(81, 20, 25, 0.15);
  overflow: hidden;
  cursor: pointer;
}

.card-decorations {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.card-peony {
  position: absolute;
  pointer-events: none;
  opacity: 0.82;
  width: 140px;
  height: auto;
}

.top-left-peony {
  top: -8px;
  left: -12px;
  transform: rotate(25deg);
}

.bottom-right-peony {
  bottom: -15px;
  right: -15px;
  transform: scaleX(-1) rotate(-25deg);
}

.envelope-card-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 6.5rem 1.4rem 2.8rem;
}

.envelope-couple-names {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: clamp(2.7rem, 8.5vw, 3.45rem);
  font-weight: 400;
  line-height: .98;
  color: var(--theme-red);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.envelope-couple-names .name-amp {
  font-family: var(--font-serif);
  font-size: 1rem;
  margin: 0.1rem 0;
  color: rgba(81, 20, 25, 0.7);
}

.envelope-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.8rem;
}

.envelope-divider .div-line {
  width: 40px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--theme-red), transparent);
}

.envelope-divider .div-symbol {
  color: var(--theme-red);
  font-size: 0.9rem;
  opacity: 0.7;
}

.envelope-date {
  margin: 0 0 1.2rem;
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: rgba(81, 20, 25, 0.72);
}

.envelope-invite-guest {
  margin-bottom: 1.8rem;
}

.invite-label {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  color: rgba(81, 20, 25, 0.72);
  font-weight: 300;
}

.guest-pill {
  display: inline-block;
  padding: 0.45rem 1.4rem;
  background-color: rgba(81, 20, 25, 0.06);
  border-radius: 999px;
  margin-bottom: 0.45rem;
}

.guest-name {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--theme-red);
}

.invite-sub {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(81, 20, 25, 0.7);
  font-weight: 300;
}

/* Nút Mở Thiệp đỏ rượu với dải sáng lướt qua (shine) */
.open-action-wrap {
  display: flex;
  justify-content: center;
}

.btn-open-invite {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 2.8rem;
  background-color: var(--theme-red);
  color: #f3e8de;
  border: 0;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(81, 20, 25, 0.35);
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s, background-color 0.25s;
}

.btn-open-invite:hover {
  transform: translateY(-2px);
  background-color: #63191f;
  box-shadow: 0 8px 24px rgba(81, 20, 25, 0.5);
}

.btn-open-invite:active {
  transform: translateY(0);
}

.btn-shine {
  position: absolute;
  top: 0;
  width: 35px;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  pointer-events: none;
  animation: shine 3s ease-in-out infinite;
}

/* ========================================================
   TRANG NỘI DUNG CHÍNH (MINIMALISM DARK RED)
   ======================================================== */
.minimalism-darkred-template {
  width: 100%;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  background-color: #fff;
  opacity: 1;
  transition: opacity 0.6s ease;
}

.template-container {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  background-color: var(--theme-bg);
  color: var(--theme-red);
  overflow: hidden;
  padding-bottom: 3rem;
}

@media (min-width: 768px) {
  .template-container {
    max-width: 820px;
    border-left: 1px solid rgba(81, 20, 25, 0.12);
    border-right: 1px solid rgba(81, 20, 25, 0.12);
    box-shadow: 0 0 60px rgba(81, 20, 25, 0.07);
  }
}

/* Lớp texture giấy cổ điển */
.paper-texture-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-size: 100% auto;
  background-position: top center;
  mix-blend-mode: multiply;
  opacity: 0.45;
  z-index: 1;
}

/* ========================================================
   01 · HERO HEADER: SAVE THE DATE & 3D ENVELOPE WITH POLAROID
   ======================================================== */
.hero-header {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3.5rem 1.5rem 3rem;
  overflow: hidden;
}

.castle-silhouette {
  position: absolute;
  pointer-events: none;
  opacity: 0.09 !important;
  left: 50%;
  top: 22%;
  width: 170%;
  transform: translateX(-50%) !important;
  object-fit: contain;
  z-index: 1;
}

.hero-eyebrow {
  position: relative;
  z-index: 10;
  margin: 0 0 2rem;
  font-family: var(--font-sans);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--theme-dark-red);
}

/* Khung phong bì 3D chứa ảnh Polaroid bồng bềnh */
.hero-envelope-frame {
  position: relative;
  z-index: 10;
  width: 84%;
  max-width: 320px;
  margin: 1.5rem auto 3rem;
}

@media (min-width: 768px) {
  .hero-envelope-frame { max-width: 400px; }
}

.envelope-aspect-box {
  position: relative;
  aspect-ratio: 333 / 384;
  width: 100%;
}

.envelope-layer {
  position: absolute;
  width: 100%;
  pointer-events: none;
}

.env-back {
  inset: 0;
  z-index: 10;
}

.env-front {
  bottom: 0;
  left: 0;
  z-index: 30;
}

/* Bức ảnh cưới Polaroid nghiêng 12 độ nổi bật */
.polaroid-wrapper {
  position: absolute;
  left: 33%;
  top: -2%;
  z-index: 20;
  width: 64%;
  animation: drFloat 6.5s ease-in-out infinite;
  animation-delay: 0.4s;
  will-change: transform;
}

.polaroid-card {
  aspect-ratio: 221 / 309;
  transform: rotate(12deg);
  border: 7px solid #fff;
  border-bottom: 22px solid #fff;
  background-color: #fff;
  border-radius: 4px;
  box-shadow: 2px 4px 12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.polaroid-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
}

/* Cành hoa mẫu đơn ở góc phong bì */
.envelope-flower-branch {
  position: absolute;
  left: -6%;
  top: -12%;
  z-index: 25;
  width: 44%;
  pointer-events: none;
}

.env-flower-img {
  width: 100%;
  transform: rotate(-17deg);
  filter: drop-shadow(3px 4px 6px rgba(0, 0, 0, 0.3));
  animation: drFloat 5s ease-in-out infinite;
}

/* Khối tên cô dâu chú rể */
.hero-names-block {
  position: relative;
  z-index: 10;
  margin-top: 1rem;
}

.hero-couple-title {
  margin: 0 0 0.8rem;
  font-family: var(--font-display);
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: clamp(3rem, 8vw, 4.15rem);
  font-weight: 400;
  line-height: .92;
  color: var(--theme-red);
}

.hero-amp {
  font-family: var(--font-serif);
  font-size: 1rem;
  margin: .25rem 0;
  color: var(--theme-dark-red);
}

.hero-quote {
  max-width: 380px;
  margin: 0 auto;
  font-size: 0.95rem;
  font-style: italic;
  color: rgba(81, 20, 25, 0.78);
  line-height: 1.6;
}

/* ========================================================
   SECTION CHUNG & DARK RED CARDS
   ======================================================== */
.section-wrapper {
  position: relative;
  z-index: 10;
  width: 90%;
  max-width: 440px;
  margin: 2.2rem auto;
}

@media (min-width: 768px) {
  .section-wrapper { max-width: 600px; }
}

.section-title-darkred {
  margin: 0 0 0.4rem;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-align: center;
  color: var(--theme-red);
}

.section-subtitle-darkred {
  margin: 0 0 1.6rem;
  font-size: 0.9rem;
  text-align: center;
  color: rgba(81, 20, 25, 0.75);
}

/* Thẻ màu đỏ rượu chuẩn Minimalism Dark Red */
.darkred-card {
  position: relative;
  background-color: var(--theme-red);
  color: var(--theme-cream);
  border-radius: 12px;
  padding: 2.4rem 1.6rem;
  box-shadow: 4px 6px 18px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  text-align: center;
}

.card-paper-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  mix-blend-mode: multiply;
  opacity: 0.4;
  border-radius: 12px;
}

.card-inner-content {
  position: relative;
  z-index: 10;
}

.card-heading {
  margin: 0 0 1.4rem;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--theme-cream);
}

/* Cành hoa nổi ở mép thẻ */
.section-floating-flower {
  position: absolute;
  z-index: 20;
  pointer-events: none;
  filter: drop-shadow(3px 4px 8px rgba(0, 0, 0, 0.35));
}

.flower-right {
  right: -14%;
  bottom: 25%;
  width: 32%;
  animation: drFloat 5.5s ease-in-out infinite;
}

.flower-left {
  left: -12%;
  top: 8%;
  width: 28%;
  animation: drFloat 6s ease-in-out infinite;
}

/* ========================================================
   02 · THÔNG TIN LỄ CƯỚI (CEREMONY INFO)
   ======================================================== */
.parents-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 1.8rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(236, 228, 216, 0.2);
}

.parent-side {
  flex: 1;
}

.parent-role {
  margin: 0 0 0.3rem;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--theme-gold);
  font-weight: 600;
}

.parent-lead {
  margin: 0;
  font-size: 0.82rem;
  color: var(--theme-cream-soft);
}

.parent-names {
  margin: 0.2rem 0 0.4rem;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--theme-cream);
}

.parent-loc {
  margin: 0;
  font-size: 0.78rem;
  color: var(--theme-cream-soft);
  line-height: 1.35;
}

.parent-sep {
  font-size: 1.1rem;
  color: var(--theme-gold);
  opacity: 0.85;
}

.announcement-msg {
  margin-bottom: 1.8rem;
}

.msg-lead {
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: var(--theme-gold);
  font-weight: 600;
}

.msg-sub {
  margin: 0.2rem 0 1rem;
  font-size: 0.95rem;
  color: var(--theme-cream);
}

.couple-highlight {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.person-box {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.person-fullname {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.person-tag {
  font-size: 0.82rem;
  color: var(--theme-gold);
  margin-top: 0.15rem;
}

.couple-and {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--theme-gold);
}

.ceremony-time-details {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 10px;
  padding: 1.2rem 1rem;
  border: 1px solid rgba(236, 228, 216, 0.12);
}

.ceremony-label {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: var(--theme-cream-soft);
}

.ceremony-badge-row {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--theme-gold);
  margin-bottom: 0.4rem;
}

.ceremony-date-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin: 0.4rem 0;
}

.date-num {
  font-family: var(--font-serif);
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
}

.date-sep-line {
  width: 1px;
  height: 38px;
  background-color: rgba(236, 228, 216, 0.4);
}

.date-m-y {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.date-month {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--theme-cream);
}

.date-year {
  font-size: 1.15rem;
  font-family: var(--font-serif);
  color: var(--theme-gold);
}

.lunar-calendar-text {
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  color: var(--theme-cream-soft);
  font-style: italic;
}

/* ========================================================
   03 · ALBUM ẢNH CƯỚI: 3D COVER-FLOW CAROUSEL
   ======================================================== */
.gallery-section {
  max-width: 600px;
}

.gallery-showcase-container {
  position: relative;
  width: 100%;
  margin: 0 auto;
}

.coverflow-stage {
  position: relative;
  width: 100%;
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1000px;
  overflow: hidden;
  touch-action: pan-y;
}

@media (min-width: 768px) {
  .coverflow-stage { height: 480px; }
}

.coverflow-item {
  position: absolute;
  height: 88%;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  transition: all 0.75s cubic-bezier(0.25, 1, 0.5, 1);
  background-color: #dcd1be;
}

.coverflow-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 10%;
  pointer-events: none;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: var(--theme-red);
  border: 1px solid rgba(81, 20, 25, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.2s;
}

.carousel-arrow:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.1);
}

.arrow-prev { left: 8px; }
.arrow-next { right: 8px; }

.carousel-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.dot-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(81, 20, 25, 0.25);
  cursor: pointer;
  transition: all 0.25s ease;
}

.dot-indicator.active {
  width: 24px;
  border-radius: 999px;
  background: var(--theme-red);
}

/* ========================================================
   04 · RECEPTION INFO & COUNTDOWN
   ======================================================== */
.reception-inv-line {
  margin: 0 0 0.8rem;
  font-size: 0.95rem;
  color: var(--theme-cream-soft);
}

.reception-timing-row {
  display: flex;
  justify-content: center;
  gap: 1.4rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--theme-gold);
  margin-bottom: 0.4rem;
}

.reception-main-date {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 0.6rem 0 1.2rem;
}

.date-large {
  font-family: var(--font-serif);
  font-size: 3.2rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
}

.date-sep-vert {
  width: 1px;
  height: 44px;
  background-color: rgba(236, 228, 216, 0.4);
}

.date-info-side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.date-mo-txt {
  font-size: 1rem;
  font-weight: 600;
  color: var(--theme-cream);
}

.date-yr-txt {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--theme-gold);
}

.dual-milestone-badges {
  display: flex;
  justify-content: center;
  gap: 2.2rem;
  margin-bottom: 1.8rem;
  padding: 0.8rem 1rem;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 8px;
}

.milestone-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.m-label {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--theme-cream-soft);
}

.m-val {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--theme-gold);
  margin-top: 0.1rem;
}

/* Countdown Clock */
.countdown-block {
  margin-bottom: 1.8rem;
}

.countdown-heading {
  margin: 0 0 0.8rem;
  font-size: 0.88rem;
  letter-spacing: 0.1em;
  color: var(--theme-cream-soft);
}

.countdown-timer {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.75rem 1.2rem;
  border-radius: 10px;
  border: 1px solid rgba(236, 228, 216, 0.15);
}

.cd-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 44px;
}

.cd-val {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
}

.cd-lbl {
  font-size: 0.7rem;
  color: var(--theme-cream-soft);
  margin-top: 0.2rem;
}

.cd-sep {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--theme-gold);
  margin-bottom: 0.4rem;
}

/* Mini Calendar Widget */
.mini-calendar-wrapper {
  margin-bottom: 1.4rem;
}

.mini-calendar-card {
  max-width: 310px;
  margin: 0 auto;
  background-color: var(--theme-cream);
  color: var(--theme-red);
  border-radius: 10px;
  padding: 0.8rem 1rem 1rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.mini-cal-header {
  font-family: var(--font-script);
  font-size: 1.65rem;
  line-height: 1;
  text-align: center;
  margin-bottom: 0.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(81, 20, 25, 0.2);
}

.mini-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  opacity: 0.7;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid rgba(81, 20, 25, 0.2);
}

.mini-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  gap: 2px;
  padding-top: 0.4rem;
  font-size: 0.82rem;
}

.mini-cal-grid span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 28px;
}

.mini-cal-grid .target-day {
  background-color: var(--theme-red);
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(81, 20, 25, 0.4);
}

.mini-cal-grid .invite-day {
  border: 1px solid var(--theme-red);
  border-radius: 50%;
  color: var(--theme-red);
  font-weight: 700;
}

.btn-darkred-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 2.2rem;
  background: transparent;
  color: var(--theme-cream);
  border: 1px solid var(--theme-cream);
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-darkred-action:hover {
  background-color: var(--theme-cream);
  color: var(--theme-red);
}

/* ========================================================
   05 · DRESS CODE
   ======================================================== */
.dress-code-swatches {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.7rem, 2.5vw, 1.4rem);
  margin: 1.5rem auto 1.2rem;
}

.swatch-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.swatch-circle {
  width: clamp(38px, 10vw, 48px);
  height: clamp(38px, 10vw, 48px);
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(81, 20, 25, 0.15);
  margin-bottom: 0.4rem;
}

.swatch-name {
  font-size: 0.76rem;
  color: rgba(81, 20, 25, 0.8);
}

.dress-code-note {
  text-align: center;
  font-size: 0.9rem;
  color: rgba(81, 20, 25, 0.85);
  font-style: italic;
  margin: 0;
}

/* ========================================================
   06 · SCHEDULE TIMELINE
   ======================================================== */
.schedule-timeline-list {
  list-style: none;
  padding: 0;
  margin: 1.2rem auto 0;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.timeline-entry {
  display: grid;
  grid-template-columns: 80px 24px 1fr;
  align-items: center;
  gap: 0.8rem;
  text-align: left;
}

.time-cell {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  text-align: right;
}

.time-val {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--theme-cream);
}

.timeline-date {
  display: block;
  color: var(--theme-gold);
  font-size: .7rem;
  letter-spacing: .08em;
}

.desc-text small {
  display: inline-block;
  margin-top: .35rem;
  color: rgba(236, 228, 216, .62);
  font-size: .74rem;
}

.icon-bubble {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-bubble img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.node-cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.node-bullet {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: var(--theme-gold);
  box-shadow: 0 0 0 3px rgba(201, 162, 74, 0.25);
  z-index: 2;
}

.desc-cell {
  color: var(--theme-cream-soft);
  font-size: 0.9rem;
}

/* ========================================================
   07 · VENUE & MAP
   ======================================================== */
.venue-name-lead {
  text-align: center;
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0.4rem 0 0.2rem;
  color: var(--theme-red);
}

.venue-address-lead {
  text-align: center;
  font-size: 0.9rem;
  color: rgba(81, 20, 25, 0.75);
  margin: 0 0 1.4rem;
}

.map-frame-box {
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(81, 20, 25, 0.12);
  border: 1px solid rgba(81, 20, 25, 0.15);
}

.venue-action-row {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.btn-directions-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.8rem;
  border: 1px solid var(--theme-red);
  border-radius: 999px;
  color: var(--theme-red);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.25s ease;
}

.btn-directions-link:hover {
  background-color: var(--theme-red);
  color: #fff;
}

/* ========================================================
   08 · SỔ LƯU BÚT (GUESTBOOK)
   ======================================================== */
.papernote-card {
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  padding: 2.5rem 1.6rem;
  box-shadow: 0 8px 24px rgba(81, 20, 25, 0.08);
  border: 1px solid rgba(81, 20, 25, 0.15);
}

.minimal-guestbook-form {
  max-width: 440px;
  margin: 1.5rem auto;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(81, 20, 25, 0.35);
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.85);
  color: var(--theme-red);
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s, background-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--theme-red);
  background-color: #fff;
}

.attendance-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.attendance-fieldset legend {
  width: 100%;
  margin-bottom: .65rem;
  color: var(--theme-red);
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
}

.attendance-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .65rem;
}

.attendance-option { position: relative; cursor: pointer; }
.attendance-option input { position: absolute; opacity: 0; pointer-events: none; }
.attendance-card {
  display: flex;
  height: 96px;
  flex-direction: column;
  justify-content: center;
  padding: .8rem;
  border: 1px solid rgba(81,20,25,.23);
  border-radius: 10px;
  background: rgba(255,255,255,.62);
  text-align: center;
  transition: border-color .2s, background .2s, box-shadow .2s, transform .2s;
}
.attendance-card b { display: flex; min-height: 2.8em; align-items: center; justify-content: center; color: var(--theme-red); font-size: .82rem; font-weight: 600; line-height: 1.4; }
.attendance-card small { display: flex; min-height: 2.9em; align-items: center; justify-content: center; margin-top: .2rem; color: rgba(56,10,14,.62); font-size: .68rem; line-height: 1.4; }
.attendance-option input:checked + .attendance-card { border-color: var(--theme-red); color: #fff; background: var(--theme-red); box-shadow: 0 7px 18px rgba(81,20,25,.28); transform: translateY(-2px); }
.attendance-option input:checked + .attendance-card b { color: #fff; }
.attendance-option input:checked + .attendance-card small { color: rgba(255,255,255,.76); }
.attendance-option input:focus-visible + .attendance-card { outline: 2px solid var(--theme-gold); outline-offset: 2px; }

.form-btn-wrap {
  display: flex;
  justify-content: center;
}

.btn-send-wish {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 2.4rem;
  background-color: var(--theme-red);
  color: #fff;
  border: 0;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(81, 20, 25, 0.3);
  transition: all 0.25s ease;
}

.btn-send-wish svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-send-wish:disabled { cursor: wait; opacity: .65; transform: none; }

.rsvp-status { min-height: 1.3em; margin: 0; color: rgba(81,20,25,.72); font-size: .74rem; text-align: center; }

.btn-send-wish:hover {
  background-color: #6a1a20;
  transform: translateY(-2px);
}

.wishes-display-area {
  max-width: 440px;
  margin: 1.5rem auto 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.wish-item {
  background: rgba(255, 255, 255, 0.7);
  padding: 0.8rem 1.1rem;
  border-radius: 8px;
  border-left: 3px solid var(--theme-red);
  text-align: left;
}

.wish-author {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--theme-red);
  margin: 0 0 0.2rem;
}

.wish-body {
  margin: 0;
  font-size: 0.85rem;
  color: #380a0e;
}

.wish-attendance { display: inline-block; margin-top: .45rem; padding: .15rem .5rem; border-radius: 999px; color: #fff; background: var(--theme-red); font-size: .68rem; }

@media (max-width: 480px) {
  .attendance-options { grid-template-columns: 1fr; }
  .attendance-card { height: 82px; }
}

.wishes-empty-note {
  text-align: center;
  font-size: 0.86rem;
  font-style: italic;
  color: rgba(81, 20, 25, 0.6);
  margin: 0;
}

/* ========================================================
   09 · HỘP QUÀ MỪNG CƯỚI (GIFT BOX INTERACTIVE)
   ======================================================== */
.giftbox-interactive-wrap {
  display: flex;
  justify-content: center;
  margin: 1.5rem auto 0;
}

.btn-giftbox-trigger {
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  outline: none;
}

.giftbox-img-stage {
  position: relative;
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.btn-giftbox-trigger:hover .giftbox-img-stage {
  transform: scale(1.05);
}

.giftbox-main-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 14px 28px rgba(81, 20, 25, 0.2));
}

.sparkle {
  position: absolute;
  color: #c9a24a;
  pointer-events: none;
  animation: sparkle 2.2s infinite ease-in-out;
}

.sp-1 { top: 10%; left: 14%; font-size: 20px; animation-delay: 0s; }
.sp-2 { top: 16%; right: 12%; font-size: 16px; animation-delay: 0.5s; }
.sp-3 { bottom: 22%; left: 8%; font-size: 14px; animation-delay: 1s; }
.sp-4 { top: 30%; right: 6%; font-size: 14px; animation-delay: 1.5s; }

.giftbox-prompt-pill {
  display: inline-block;
  margin-top: 0.8rem;
  padding: 0.45rem 1.4rem;
  border-radius: 999px;
  border: 1px solid var(--theme-red);
  color: var(--theme-red);
  font-size: 0.86rem;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-giftbox-trigger:hover .giftbox-prompt-pill {
  background-color: var(--theme-red);
  color: #fff;
}

.modal-qr-box {
  max-width: 200px;
  margin: 0 auto 1rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(81, 20, 25, 0.1);
  background: #fff;
}

.modal-qr-box img {
  width: 100%;
  display: block;
}

/* ========================================================
   10 · FOOTER
   ======================================================== */
.template-footer {
  text-align: center;
  padding: 2.5rem 1.5rem 1rem;
  border-top: 1px solid rgba(81, 20, 25, 0.12);
  margin-top: 2rem;
}

.footer-presence-msg {
  max-width: 440px;
  margin: 0 auto 0.8rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--theme-red);
  line-height: 1.6;
}

.footer-sign-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--theme-dark-red);
}

/* ========================================================
   POPUP / MODAL MỪNG CƯỚI
   ======================================================== */
.gift-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.gift-modal.show {
  opacity: 1;
  visibility: visible;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(56, 10, 14, 0.65);
  backdrop-filter: blur(4px);
}

.modal-card {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 380px;
  background-color: #fffdf9;
  border-radius: 16px;
  padding: 2rem 1.5rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(81, 20, 25, 0.2);
  text-align: center;
}

.modal-close-btn {
  position: absolute;
  top: 12px;
  right: 14px;
  background: transparent;
  border: 0;
  font-size: 1.6rem;
  color: var(--theme-red);
  cursor: pointer;
  line-height: 1;
}

.modal-headline {
  margin: 0 0 0.3rem;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--theme-red);
}

.modal-subline {
  margin: 0 0 1.2rem;
  font-size: 0.85rem;
  color: rgba(81, 20, 25, 0.7);
}

.modal-tabs-header {
  display: flex;
  border-bottom: 1px solid rgba(81, 20, 25, 0.15);
  margin-bottom: 1.2rem;
}

.tab-button {
  flex: 1;
  padding: 0.6rem;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  font-weight: 600;
  font-size: 0.88rem;
  color: rgba(81, 20, 25, 0.6);
  cursor: pointer;
}

.tab-button.active {
  color: var(--theme-red);
  border-bottom-color: var(--theme-red);
}

.modal-tab-body {
  display: none;
}

.modal-tab-body.active {
  display: block;
}

.bank-institution {
  margin: 0;
  font-size: 0.86rem;
  color: rgba(81, 20, 25, 0.7);
}

.account-number {
  margin: 0.3rem 0;
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--theme-red);
}

.account-holder {
  margin: 0 0 1.2rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #432b14;
}

.btn-copy-account {
  display: inline-block;
  padding: 0.65rem 1.8rem;
  background-color: var(--theme-red);
  color: #fff;
  border: 0;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.86rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-copy-account:hover {
  background-color: #63191f;
}

/* ========================================================
   REVEAL & SCROLL ANIMATIONS (MƯỢT MÀ, NHẸ NHÀNG, SANG TRỌNG)
   ======================================================== */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(32px);
  filter: blur(3px);
  transition: 
    opacity 0.95s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.95s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.95s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform, filter;
}

.reveal-on-scroll.is-revealed {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* Biến thể trượt từ bên trái nhẹ nhàng */
.reveal-from-left {
  opacity: 0;
  transform: translateX(-36px);
  filter: blur(3px);
  transition: 
    opacity 0.95s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.95s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.95s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform, filter;
}

.reveal-from-left.is-revealed {
  opacity: 1;
  transform: translateX(0);
  filter: blur(0);
}

/* Biến thể trượt từ bên phải nhẹ nhàng */
.reveal-from-right {
  opacity: 0;
  transform: translateX(36px);
  filter: blur(3px);
  transition: 
    opacity 0.95s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.95s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.95s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform, filter;
}

.reveal-from-right.is-revealed {
  opacity: 1;
  transform: translateX(0);
  filter: blur(0);
}

/* Biến thể scale nhẹ nhàng cho ảnh / card / hộp quà */
.reveal-scale-up {
  opacity: 0;
  transform: scale(0.93) translateY(24px);
  filter: blur(3px);
  transition: 
    opacity 1.05s cubic-bezier(0.16, 1, 0.3, 1),
    transform 1.05s cubic-bezier(0.16, 1, 0.3, 1),
    filter 1.05s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform, filter;
}

.reveal-scale-up.is-revealed {
  opacity: 1;
  transform: scale(1) translateY(0);
  filter: blur(0);
}

/* Hiệu ứng trượt chữ nhẹ nhàng */
.reveal-text {
  opacity: 0;
  transform: translateY(18px);
  letter-spacing: 0.05em;
  transition: 
    opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.85s cubic-bezier(0.16, 1, 0.3, 1),
    letter-spacing 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-text.is-revealed {
  opacity: 1;
  transform: translateY(0);
  letter-spacing: normal;
}

/* Stagger Delays (độ trễ nhịp nhàng từng phần tử) */
.delay-100 { transition-delay: 0.1s !important; }
.delay-150 { transition-delay: 0.15s !important; }
.delay-200 { transition-delay: 0.2s !important; }
.delay-250 { transition-delay: 0.25s !important; }
.delay-300 { transition-delay: 0.3s !important; }
.delay-350 { transition-delay: 0.35s !important; }
.delay-400 { transition-delay: 0.4s !important; }
.delay-500 { transition-delay: 0.5s !important; }

@media (prefers-reduced-motion: reduce) {
  .reveal-on-scroll,
  .reveal-from-left,
  .reveal-from-right,
  .reveal-scale-up,
  .reveal-text {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }
}

/* ========================================================
   LUXURY MUSIC PLAYER WIDGET (PLAYLIST 3 BÀI HÁT)
   ======================================================== */
.music-player-widget {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 120;
  font-family: var(--font-sans);
}

.music-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.55rem 0.35rem 0.4rem;
  background: rgba(255, 250, 243, 0.95);
  border: 1px solid rgba(81, 20, 25, 0.22);
  border-radius: 999px;
  color: var(--theme-red);
  box-shadow: 0 8px 24px rgba(81, 20, 25, 0.18), 0 2px 6px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.music-pill:hover {
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(81, 20, 25, 0.25);
  transform: translateY(-2px);
}

/* Nút đĩa xoay */
.music-disc-btn {
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
}

.music-disc {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle at center, #300a0d 0%, var(--theme-red) 70%, #200406 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  box-shadow: 0 2px 8px rgba(81, 20, 25, 0.35);
  animation: recordSpin 4s linear infinite;
  transition: all 0.3s ease;
}

.music-player-widget.is-paused .music-disc {
  animation-play-state: paused;
  filter: grayscale(0.5);
  opacity: 0.75;
}

/* Thông tin bài hát đang phát */
.music-info-pill {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(81, 20, 25, 0.05);
  cursor: pointer;
  transition: background 0.2s ease;
  max-width: 175px;
}

.music-info-pill:hover {
  background: rgba(81, 20, 25, 0.1);
}

.music-meta-scroller {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  overflow: hidden;
  white-space: nowrap;
}

.music-now-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--theme-red);
}

.music-dot-sep {
  opacity: 0.5;
  font-size: 0.75rem;
}

.music-now-artist {
  font-size: 0.76rem;
  opacity: 0.75;
}

/* Cột sóng equalizer */
.music-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
  padding-left: 2px;
}

.music-bars i {
  display: block;
  width: 2px;
  height: 100%;
  background: var(--theme-red);
  border-radius: 1px;
  animation: musicBar 0.9s ease-in-out infinite alternate;
}

.music-bars i:nth-child(2) { animation-delay: 0.2s; }
.music-bars i:nth-child(3) { animation-delay: 0.4s; }

.music-player-widget.is-paused .music-bars i {
  animation: none;
  height: 3px;
  background: #9b8c87;
}

/* Các nút điều khiển nhạc */
.music-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.btn-music-ctrl {
  background: transparent;
  border: 0;
  color: var(--theme-red);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.btn-music-ctrl:hover {
  background: rgba(81, 20, 25, 0.12);
  transform: scale(1.08);
}

.btn-music-ctrl:active {
  transform: scale(0.95);
}

.btn-play-pause .icon-pause {
  display: block;
}

.btn-play-pause .icon-play {
  display: none;
}

.music-player-widget.is-paused .btn-play-pause .icon-pause {
  display: none;
}

.music-player-widget.is-paused .btn-play-pause .icon-play {
  display: block;
}

/* Dropup menu danh sách bài hát */
.music-playlist-dropup {
  position: absolute;
  bottom: calc(100% + 12px);
  right: 0;
  width: 285px;
  background: rgba(255, 252, 247, 0.98);
  border: 1px solid rgba(81, 20, 25, 0.2);
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(81, 20, 25, 0.22), 0 4px 12px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 0.9rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(0.96);
  transform-origin: bottom right;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.music-playlist-dropup.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.dropup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(81, 20, 25, 0.12);
  margin-bottom: 0.5rem;
}

.dropup-header-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--theme-red);
}

.btn-dropup-close {
  background: transparent;
  border: 0;
  font-size: 1.3rem;
  line-height: 1;
  color: rgba(81, 20, 25, 0.6);
  cursor: pointer;
  padding: 0 0.2rem;
  border-radius: 4px;
}

.btn-dropup-close:hover {
  color: var(--theme-red);
}

.playlist-items {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.playlist-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.7rem;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(81, 20, 25, 0.03);
  border: 1px solid transparent;
}

.playlist-item:hover {
  background: rgba(81, 20, 25, 0.08);
}

.playlist-item.active {
  background: var(--theme-red);
  color: #fff;
  border-color: rgba(81, 20, 25, 0.3);
  box-shadow: 0 4px 12px rgba(81, 20, 25, 0.25);
}

.playlist-item-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  overflow: hidden;
}

.playlist-num {
  font-size: 0.75rem;
  font-weight: 700;
  opacity: 0.6;
  width: 18px;
}

.playlist-item.active .playlist-num {
  color: #fff;
  opacity: 0.85;
}

.playlist-track-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.playlist-track-title {
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.playlist-track-artist {
  font-size: 0.74rem;
  opacity: 0.7;
}

.playlist-item.active .playlist-track-artist {
  opacity: 0.85;
  color: #f7e6e8;
}

.playlist-status-icon {
  font-size: 0.75rem;
  margin-left: 0.5rem;
}

.playlist-item.active .playlist-status-icon {
  color: #ffd7dc;
}

@keyframes musicBar {
  from { height: 20%; }
  to { height: 100%; }
}

/* ========================================================
   TOAST NOTIFICATION
   ======================================================== */
.toast-notification {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  z-index: 200;
  padding: 0.75rem 1.6rem;
  background: rgba(56, 10, 14, 0.94);
  color: #fff;
  border-radius: 999px;
  font-size: 0.9rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}

.toast-notification.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ========================================================
   FULLSCREEN PHOTO LIGHTBOX (XEM ẢNH TOÀN MÀN HÌNH)
   ======================================================== */
.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s;
  user-select: none;
}

.photo-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 3, 5, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.lightbox-header {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  color: #fff;
}

.lightbox-counter {
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: rgba(255, 255, 255, 0.12);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.lightbox-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--theme-cream);
  letter-spacing: 0.05em;
  display: none;
}

@media (min-width: 600px) {
  .lightbox-title { display: block; }
}

.btn-lightbox-close {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-lightbox-close:hover {
  background: var(--theme-red);
  transform: scale(1.08);
}

.lightbox-main {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  max-height: calc(100vh - 160px);
  flex: 1;
  padding: 0.5rem;
}

.lightbox-img-wrapper {
  position: relative;
  max-width: 94vw;
  max-height: calc(100vh - 180px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img {
  max-width: 92vw;
  max-height: calc(100vh - 190px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transform: scale(0.96);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}

.photo-lightbox.is-open .lightbox-img {
  transform: scale(1);
  opacity: 1;
}

.lightbox-caption {
  position: relative;
  z-index: 2;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.88rem;
  text-align: center;
  margin: 0.6rem 0 0;
  max-width: 650px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  font-style: italic;
}

/* Nút điều hướng trước/sau */
.btn-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}

.btn-lightbox-prev {
  left: 1rem;
}

.btn-lightbox-next {
  right: 1rem;
}

.btn-lightbox-nav:hover {
  background: var(--theme-red);
  transform: translateY(-50%) scale(1.1);
}

.btn-lightbox-nav:active {
  transform: translateY(-50%) scale(0.95);
}

/* Dải thumbnail */
.lightbox-thumbnails {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
}

.lightbox-thumb {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.5;
  border: 2px solid transparent;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

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

.lightbox-thumb:hover {
  opacity: 0.85;
}

.lightbox-thumb.active {
  opacity: 1;
  border-color: #ffadb6;
  box-shadow: 0 0 12px rgba(255, 173, 182, 0.5);
  transform: scale(1.08);
}

/* Nút phóng to góc ảnh coverflow và polaroid */
.btn-expand-photo {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 32px;
  height: 32px;
  background: rgba(20, 4, 7, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: all 0.2s ease;
  z-index: 5;
  opacity: 0.85;
}

.btn-expand-photo:hover {
  background: var(--theme-red);
  transform: scale(1.12);
  opacity: 1;
}

.polaroid-card {
  cursor: pointer;
  position: relative;
}

.polaroid-expand-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 28px;
  height: 28px;
  background: rgba(46, 9, 12, 0.8);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: all 0.2s ease;
}

.polaroid-card:hover .polaroid-expand-badge {
  opacity: 1;
  background: var(--theme-red);
  transform: scale(1.1);
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .btn-lightbox-nav {
    width: 38px;
    height: 38px;
  }
  .btn-lightbox-prev { left: 0.4rem; }
  .btn-lightbox-next { right: 0.4rem; }
  .lightbox-thumb {
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 480px) {
  .envelope-card-content { padding: 5.5rem 1.2rem 2.4rem; }
  .parents-grid { flex-direction: column; gap: 1rem; }
  .parent-sep { display: none; }
  
  .music-player-widget {
    right: 0.75rem;
    bottom: 0.75rem;
  }
  .music-info-pill {
    max-width: 105px;
  }
  .music-now-artist,
  .music-dot-sep {
    display: none;
  }
  .music-playlist-dropup {
    width: calc(100vw - 1.5rem);
    right: 0;
  }
  .coverflow-stage { height: 340px; }
}
