/* =========================================================
   1. KHAI BÁO FONT CHỮ TỪ THƯ MỤC assets/fonts/
   ========================================================= */
@font-face {
  font-family: 'KD Moon Light';
  src: url('assets/fonts/KD-Moon-Light.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Verdana Primer';
  src: url('assets/fonts/VerdanaPrimer.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Dancing Script';
  src: url('assets/fonts/DancingScript-VariableFont_wght.ttf') format('truetype');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('assets/fonts/CormorantGaramondGnosis-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('assets/fonts/CormorantGaramondGnosis-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('assets/fonts/CormorantGaramondGnosis-MediumItalic.ttf') format('truetype');
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('assets/fonts/CormorantGaramondGnosis-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('assets/fonts/CormorantGaramondGnosis-BoldItalic.ttf') format('truetype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('assets/fonts/CormorantGaramondGnosis-Variable-Roman.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('assets/fonts/Inter-Light.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('assets/fonts/Inter-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('assets/fonts/Inter-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('assets/fonts/Inter-SemiBold.otf') format('opentype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('assets/fonts/Inter-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('assets/fonts/Inter-Italic.otf') format('opentype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* =========================================================
   2. RESET & BỐ CỤC TỰ CO GIÃN CHUẨN FIGMA
   ========================================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  min-height: 100%;
  background-color: #FFF7EB;
  color: #0A1F0A;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.locked {
  overflow: hidden;
}

.viewport-wrapper {
  width: 100%;
  position: relative;
  overflow: hidden;
  background-color: #FFF7EB;
}

.invitation-canvas {
  width: 1280px;
  height: 7266px;
  position: relative;
  transform-origin: top left;
  background: #FFF7EB;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.28);
}

.el {
  position: absolute;
}

.bg-top-dark {
  position: absolute;
  width: 1280px;
  height: 1337px;
  left: 0;
  top: 0;
  background: #0A1F0A;
}

.bg-main-cream {
  position: absolute;
  width: 1280px;
  height: 5929px;
  left: 0;
  top: 1337px;
  background: #FFF7EB;
}

/* =========================================================
   3. MÀN HÌNH MỞ THIỆP (GROUP 53 + SONG HỶ BAY + OUTER GLOW + LIGHT SWEEP)
   ========================================================= */
.cover-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: radial-gradient(circle at center, #113016 0%, #071708 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  transition: opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1), transform 0.85s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.85s;
}

.cover-overlay.opened {
  opacity: 0;
  transform: scale(1.08);
  visibility: hidden;
  pointer-events: none;
}

#cover-songhy-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.cover-card {
  position: relative;
  z-index: 2;
  width: min(94vw, 860px);
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: coverFloat 4s ease-in-out infinite;
}

@keyframes coverFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
}

.cover-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.cover-content {
  position: relative;
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 2%;
}

.cover-songhy-wrap {
  width: clamp(34px, 4.6vw, 50px);
  height: clamp(34px, 4.6vw, 50px);
  border-radius: 50%;
  background: rgba(254, 233, 165, 0.14);
  border: 1.5px solid rgba(254, 233, 165, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: clamp(5px, 0.9vw, 11px);
  box-shadow: 0 0 16px rgba(254, 233, 165, 0.45), 0 0 32px rgba(254, 233, 165, 0.22);
  animation: songhyOuterGlow 2.4s ease-in-out infinite alternate;
}

@keyframes songhyOuterGlow {
  0% {
    box-shadow: 0 0 12px rgba(254, 233, 165, 0.35), 0 0 24px rgba(254, 233, 165, 0.14);
    transform: scale(0.98);
  }
  100% {
    box-shadow: 0 0 22px rgba(254, 233, 165, 0.8), 0 0 42px rgba(254, 233, 165, 0.38);
    transform: scale(1.03);
  }
}

.cover-songhy {
  width: 66%;
  height: 66%;
  object-fit: contain;
}

.cover-names {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: 'KD Moon Light', serif;
  font-weight: 400;
  font-size: clamp(24px, 4.6vw, 48px);
  line-height: 1.05;
  color: #FEE9A5;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.cover-amp {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(14px, 2vw, 22px);
  margin: 2px 0;
  color: #FEE9A5;
}

.cover-date {
  margin-top: clamp(6px, 1.2vw, 14px);
  font-family: 'Verdana Primer', sans-serif;
  font-size: clamp(10px, 1.4vw, 15px);
  letter-spacing: 3px;
  color: #FFFFFF;
}

.cover-invite-text {
  margin-top: clamp(4px, 0.9vw, 10px);
  font-family: 'Verdana Primer', sans-serif;
  font-size: clamp(11px, 1.5vw, 16px);
  color: #FFFFFF;
}

.cover-invite-text strong {
  color: #FEE9A5;
  font-weight: 600;
}

.cover-invite-label {
  margin-top: clamp(4px, 0.8vw, 10px);
  font-family: 'Verdana Primer', sans-serif;
  font-size: clamp(10px, 1.35vw, 15px);
  color: #FFFFFF;
  letter-spacing: 0.5px;
}

.cover-guest-script {
  margin-top: clamp(2px, 0.4vw, 6px);
  font-family: 'Dancing Script', cursive;
  font-weight: 700;
  font-size: clamp(19px, 3.2vw, 34px);
  line-height: 1.15;
  color: #FFFBF4;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.cover-open-btn {
  position: relative;
  overflow: hidden;
  margin-top: clamp(8px, 1.4vw, 16px);
  padding: clamp(6px, 1vw, 11px) clamp(22px, 3.4vw, 38px);
  background: #FEE9A5;
  color: #0A1F0A;
  border: none;
  border-radius: 999px;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(14px, 2vw, 22px);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(254, 233, 165, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.cover-open-btn::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -80%;
  width: 55%;
  height: 200%;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.85) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-22deg);
  animation: btnLightSweep 2.6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes btnLightSweep {
  0%, 40% { left: -80%; }
  100% { left: 145%; }
}

.cover-open-btn:hover {
  transform: scale(1.06);
  background: #FFF3C4;
  box-shadow: 0 6px 24px rgba(254, 233, 165, 0.65);
}

/* =========================================================
   4. HERO KHUNG VÒM (SONG HỶ -> ẢNH CÔ DÂU CHÚ RỂ + LIGHT SWEEP)
   ========================================================= */
.hero-arch-wrapper {
  border-top-left-radius: 226px;
  border-top-right-radius: 226px;
  border-bottom-right-radius: 5px;
  border-bottom-left-radius: 5px;
  border: 2px solid #FFFBF4;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  background: #0F2912;
}

.hero-arch-wrapper::after {
  content: "";
  position: absolute;
  top: -30%;
  left: -95%;
  width: 65%;
  height: 160%;
  background: linear-gradient(
    115deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(254, 233, 165, 0.24) 35%,
    rgba(255, 255, 255, 0.68) 50%,
    rgba(254, 233, 165, 0.24) 65%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-20deg);
  pointer-events: none;
  z-index: 4;
  opacity: 0;
}

.hero-arch-wrapper.sweep-active::after {
  opacity: 1;
  animation: photoLightSweep 1.65s cubic-bezier(0.25, 0.8, 0.25, 1) 0.35s forwards;
}

@keyframes photoLightSweep {
  0% { left: -95%; }
  100% { left: 145%; }
}

.hero-arch-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1.5s ease, transform 1.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-arch-photo.show-couple {
  opacity: 1;
  transform: scale(1);
}

.hero-arch-songhy-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #1B4222 0%, #0A1F0A 100%);
  opacity: 1;
  transform: scale(1);
  transition: opacity 1.3s ease, transform 1.3s ease;
  pointer-events: none;
}

.hero-arch-songhy-stage.fade-out {
  opacity: 0;
  transform: scale(0.88);
}

.hero-arch-songhy-img {
  width: 190px;
  height: 190px;
  object-fit: contain;
  filter: drop-shadow(0 0 26px rgba(254, 233, 165, 0.7));
  animation: songhyGlow 2s ease-in-out infinite alternate;
}

@keyframes songhyGlow {
  from { transform: scale(0.96); filter: drop-shadow(0 0 18px rgba(254, 233, 165, 0.55)); }
  to { transform: scale(1.04); filter: drop-shadow(0 0 32px rgba(254, 233, 165, 0.9)); }
}

.slider-stage {
  border-radius: 236px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1400px;
  user-select: none;
}

.coverflow-track {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
}

.coverflow-slide {
  position: absolute;
  width: 390px;
  height: 560px;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(10, 31, 10, 0.28);
  border: 3px solid #FFFFFF;
  background: #1F3A25;
  cursor: pointer;
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.65s ease, filter 0.65s ease;
}

.coverflow-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(31, 58, 37, 0.82);
  color: #FEE9A5;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}

.slider-nav:hover {
  background: #1F3A25;
  transform: translateY(-50%) scale(1.08);
}

.slider-nav.prev { left: 44px; }
.slider-nav.next { right: 44px; }

.slider-dots {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  gap: 10px;
}

.slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(31, 58, 37, 0.28);
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
}

.slider-dot.active {
  width: 26px;
  border-radius: 999px;
  background: #1F3A25;
}

/* =========================================================
   4B. TINH CHỈNH RIÊNG CHO BẢN ĐIỆN THOẠI (+30% ZOOM) ĐỂ KHÔNG BỊ CẮT VIỀN
   ========================================================= */
body.is-mobile .slider-nav.prev {
  left: 112px;
}

body.is-mobile .slider-nav.next {
  right: 112px;
}

body.is-mobile .crane-top-right {
  left: 905px !important;
  top: 1178px !important;
  width: 195px !important;
  height: 200px !important;
}

body.is-mobile .crane-bottom-left {
  left: 165px !important;
  top: 5685px !important;
  width: 168px !important;
  height: 173px !important;
  z-index: 5;
}

/* =========================================================
   4C. LỊCH TREO TƯỜNG LẮC LƯ NHẸ & THANH GỖ NẰM PHÍA TRƯỚC
   ========================================================= */
.calendar-rod {
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.28);
}

.calendar-cap {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.32);
}

.hanging-calendar {
  transform-origin: 50% 0px;
  animation: calendarSway 5.5s ease-in-out infinite;
  will-change: transform;
}

@keyframes calendarSway {
  0%, 100% { transform: rotate(-1.6deg); }
  50% { transform: rotate(1.6deg); }
}

/* =========================================================
   5. BẢN ĐỒ, GHIM TRÁI TIM NHẢY & NÚT HÀNH ĐỘNG
   ========================================================= */
.map-embed-box {
  border-radius: 14px;
  overflow: hidden;
  background: #EFE7D6;
}

.map-pin-overlay {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  pointer-events: none;
}

.map-pin-icon {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 36px;
  height: auto;
  transform: translate(-50%, 0);
  transform-origin: bottom center;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.28));
  animation: mapPinBounce 1.25s cubic-bezier(0.28, 0.84, 0.42, 1) infinite;
}

.map-pin-pulse {
  position: absolute;
  left: 0;
  top: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(235, 64, 52, 0.24);
  transform: translate(-50%, -50%) scale(0.5);
  animation: mapPinPulse 1.25s ease-out infinite;
}

@keyframes mapPinBounce {
  0%, 100% { transform: translate(-50%, 0px) scale(1, 1); }
  40% { transform: translate(-50%, -12px) scale(0.96, 1.04); }
  75% { transform: translate(-50%, 1px) scale(1.04, 0.96); }
}

@keyframes mapPinPulse {
  0% { transform: translate(-50%, -50%) scale(0.45); opacity: 0.85; }
  100% { transform: translate(-50%, -50%) scale(1.55); opacity: 0; }
}

.map-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 999px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.map-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(10, 31, 10, 0.18);
}

.btn-directions {
  background: #0F3526;
  color: #FFFFFF;
  border: none;
}

.btn-copy-addr {
  background: #FFFFFF;
  color: #0A1F0A;
  border: 1.5px solid #ECCCB7;
}

/* =========================================================
   6. FORM RSVP & SỔ LƯU BÚT
   ========================================================= */
.rsvp-input {
  background: #FFFFFF;
  border-radius: 18px;
  border: 1px solid #ECCCB7;
  padding: 0 22px;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: #0A1F0A;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.rsvp-input:focus, .rsvp-textarea:focus {
  border-color: #1F3A25;
  box-shadow: 0 0 0 3px rgba(31, 58, 37, 0.12);
}

.rsvp-input::placeholder, .rsvp-textarea::placeholder {
  color: #B99763;
  font-style: italic;
}

.attend-btn {
  background: #FFFFFF;
  border-radius: 18px;
  border: 1px solid #ECCCB7;
  color: #A57832;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.attend-btn.active {
  background: #1F3A25;
  color: #FEE9A5;
  border-color: #1F3A25;
  box-shadow: 0 4px 12px rgba(31, 58, 37, 0.25);
}

.wish-chip {
  background: #FFFFFF;
  border-radius: 20px;
  border: 1px solid #ECCCB7;
  color: #A57832;
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  cursor: pointer;
  padding: 0 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.2s ease;
}

.wish-chip:hover, .wish-chip.selected {
  background: #FAEFDD;
  border-color: #A57832;
  color: #0A1F0A;
}

.rsvp-textarea {
  background: #FFFFFF;
  border-radius: 10px;
  border: 1px solid #ECCCB7;
  padding: 14px 18px 30px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #0A1F0A;
  resize: none;
  outline: none;
}

.rsvp-submit-btn {
  background: #1F3A25;
  color: #FFFFFF;
  border-radius: 29.5px;
  border: 1px solid #ECCCB7;
  font-family: 'Inter', sans-serif;
  font-size: 22px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.rsvp-submit-btn:hover {
  background: #142818;
  transform: translateY(-2px);
}

.wishes-grid {
  display: grid;
  grid-template-columns: repeat(3, 233px);
  gap: 16px 14px;
  overflow: visible;
}

.wish-card {
  width: 233px;
  height: 96px;
  background: #FFFFFF;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
  border-radius: 8px;
  padding: 10px 14px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  animation: fadeInWish 0.4s ease;
}

@keyframes fadeInWish {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.wish-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wish-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #004599;
  color: #FFFFFF;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wish-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.wish-author {
  color: #0A1F0A;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
}

.wish-time {
  color: #A57832;
  font-family: 'Inter', sans-serif;
  font-size: 9px;
}

.wish-text {
  color: #0A1F0A;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 500;
  font-size: 12.5px;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wish-date {
  align-self: flex-end;
  color: #0A1F0A;
  font-family: 'Inter', sans-serif;
  font-size: 9px;
}

.toggle-wishes-btn {
  background: #FFFFFF;
  border-radius: 14.5px;
  border: 1px solid #A57832;
  color: #6F4E1B;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.toggle-wishes-btn:hover {
  background: #FAEFDD;
}

/* =========================================================
   7. PHONG BAO MỪNG CƯỚI & POPUP (GROUP 54)
   ========================================================= */
.envelope-group {
  cursor: pointer;
}

.env-left, .env-right {
  cursor: pointer;
  will-change: transform, filter;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), filter 0.3s ease;
}

.env-attract-left {
  animation: envLeftSway 2.8s ease-in-out infinite;
}

.env-attract-right {
  animation: envRightSway 2.8s ease-in-out infinite;
}

@keyframes envLeftSway {
  0%, 100% {
    transform: rotate(-12deg);
    filter: drop-shadow(0 6px 12px rgba(10, 31, 10, 0.16));
  }
  25% {
    transform: rotate(-15deg);
    filter: drop-shadow(0 8px 14px rgba(10, 31, 10, 0.2));
  }
  50% {
    transform: rotate(-10.5deg);
    filter: drop-shadow(0 6px 12px rgba(10, 31, 10, 0.16));
  }
  75% {
    transform: rotate(-14.5deg);
    filter: drop-shadow(0 8px 14px rgba(10, 31, 10, 0.2));
  }
}

@keyframes envRightSway {
  0%, 100% {
    transform: rotate(17deg);
    filter: drop-shadow(0 6px 12px rgba(10, 31, 10, 0.16));
  }
  25% {
    transform: rotate(14.5deg);
    filter: drop-shadow(0 6px 12px rgba(10, 31, 10, 0.16));
  }
  50% {
    transform: rotate(20.5deg);
    filter: drop-shadow(0 8px 14px rgba(10, 31, 10, 0.2));
  }
  75% {
    transform: rotate(15.5deg);
    filter: drop-shadow(0 6px 12px rgba(10, 31, 10, 0.16));
  }
}

.envelope-group:hover .env-left {
  animation: none;
  transform: rotate(-16deg) translateY(-8px) scale(1.07);
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.26));
}

.envelope-group:hover .env-right {
  animation: none;
  transform: rotate(21deg) translateY(-8px) scale(1.07);
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.26));
}

.env-hint {
  cursor: pointer;
  transition: transform 0.25s ease, color 0.25s ease;
}

.envelope-group:hover .env-hint {
  transform: scale(1.06);
  color: #1F3A25;
}

.gift-modal {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.gift-modal.hidden {
  opacity: 0;
  pointer-events: none;
}

.gift-card {
  position: relative;
  width: min(92vw, 430px);
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  animation: modalPop 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.9) translateY(16px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.gift-close-btn {
  position: absolute;
  top: 10px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(10, 31, 10, 0.08);
  color: #0A1F0A;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
}

.gift-header {
  background: #FFF7EB;
  padding: 24px 20px 20px;
  text-align: center;
}

.gift-header h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(22px, 5vw, 30px);
  font-weight: 700;
  color: #0A1F0A;
  letter-spacing: 1px;
}

.gift-body {
  background: #1F3A25;
  padding: 22px 24px 30px;
  text-align: center;
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gift-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 3px;
  margin-bottom: 18px;
}

.gift-qr-box {
  width: 230px;
  height: 230px;
  background: #FFFFFF;
  border-radius: 26px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.gift-qr-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 16px;
}

.qr-placeholder {
  width: 100%;
  height: 100%;
  border: 2px dashed #C7B28E;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6F4E1B;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

.gift-bank-name {
  margin-top: 20px;
  font-family: 'Inter', sans-serif;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.gift-acc-row {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.gift-acc-number {
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 1px;
}

.gift-copy-btn {
  background: #FFF7EB;
  color: #0A1F0A;
  border: none;
  border-radius: 999px;
  padding: 5px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.gift-copy-btn:hover {
  background: #FEE9A5;
  transform: scale(1.05);
}

.gift-acc-holder {
  margin-top: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
}

/* =========================================================
   8. HIỆU ỨNG PHÁO HOA, CÁNH HOA, HIỆN DẦN KHI CUỘN & NÚT NHẠC
   ========================================================= */
#fireworks-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9000;
}

#petals-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 8000;
}

.music-btn {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 8500;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #1F3A25;
  color: #FEE9A5;
  border: 2px solid #FEE9A5;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.music-btn.hidden {
  display: none;
}

.music-btn.playing .music-icon {
  animation: spinDisk 4s linear infinite;
}

@keyframes spinDisk {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.toast {
  position: fixed;
  bottom: 76px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 10000;
  background: #1F3A25;
  color: #FEE9A5;
  border: 1px solid #FEE9A5;
  padding: 10px 22px;
  border-radius: 999px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1), transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.float-slow {
  animation: floatCrane 5s ease-in-out infinite;
}

@keyframes floatCrane {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.hidden {
  display: none !important;
}