/* ==========================================================================
   CHUNGDOI EXACT THEME: MINIMALISM DARK RED (TRUNG KIÊN & HOÀNG ANH)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400&family=Lora:ital,wght@0,400;0,500;0,600;1,400&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=The+Nautigal:wght@400;700&family=Viaoda+Libre&display=swap');

@font-face {
  font-family: 'Viaoda Libre';
  src: url('../fonts/ViaodaLibre-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: 'Lora';
  src: url('../fonts/Lora-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: 'Pattaya';
  src: url('../fonts/Pattaya-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
}

:root {
  --color-primary: #511419;
  --color-primary-dark: #380a0e;
  --color-gold: #c9a24a;
  --color-cream: #fff7eb;
  --color-cream-light: #fbf8f3;
  --color-text-dark: #511419;
  --color-text-gold: #ece4d8;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* RESET & STRICT CENTERED VIEWPORT */
html {
  width: 100% !important;
  max-width: 100vw !important;
  overflow-x: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

body {
  font-family: 'Lora', 'Times New Roman', serif;
  background-color: #fff7eb;
  color: #511419;
  width: 100% !important;
  max-width: 100vw !important;
  overflow-x: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  -webkit-font-smoothing: antialiased;
}

*, *::before, *::after {
  box-sizing: border-box !important;
}


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

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

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

@keyframes spin-cd {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes envelope-away {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  15% { transform: translateY(10px) rotate(0.5deg); opacity: 1; }
  100% { transform: translateY(-120vh) rotate(-2deg); opacity: 0; pointer-events: none; }
}

/* --------------------------------------------------------------------------
   LANDING ENVELOPE SCREEN
   -------------------------------------------------------------------------- */
#envelope-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to bottom right, #6e1a20, #511419, #380a0e);
  overflow: hidden;
  transition: opacity 0.18s ease-out;
  will-change: opacity;
}

#envelope-screen.opened {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.ambient-heart {
  position: absolute;
  top: -30px;
  pointer-events: none;
  animation: ambient-fall linear infinite;
}

.env-card {
  position: relative;
  width: 90%;
  max-width: 440px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
  padding: 40px 24px 34px;
  text-align: center;
  z-index: 10;
}

.env-seal-icon {
  width: 42px;
  height: 42px;
  margin: 0 auto 16px;
  background: #511419;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  box-shadow: 0 4px 10px rgba(81, 20, 25, 0.35);
}

.env-flower-left {
  position: absolute;
  left: -20px;
  top: 50%;
  transform: translateY(-50%);
  width: 80px;
  pointer-events: none;
}

.env-flower-right {
  position: absolute;
  right: -20px;
  top: 50%;
  transform: translateY(-50%) scaleX(-1);
  width: 80px;
  pointer-events: none;
}

.env-names-heading {
  font-family: 'Viaoda Libre', 'EB Garamond', serif;
  font-size: 2.1rem;
  line-height: 1.15;
  color: #511419;
}

.env-ampersand {
  font-family: 'Baskerville', 'Times New Roman', serif;
  font-size: 1.25rem;
  line-height: 1;
  display: block;
  margin: 2px 0;
  color: #511419;
}

.env-divider-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 10px 0;
}

.env-divider-line {
  width: 40px;
  height: 1px;
  background: linear-gradient(to right, transparent, #511419);
}

.env-divider-line.right {
  background: linear-gradient(to left, transparent, #511419);
}

.env-date-text {
  font-family: 'Lora', 'Times New Roman', serif;
  color: rgba(81, 20, 25, 0.75);
  font-size: 16px;
  margin-bottom: 14px;
}

.env-greeting-text {
  font-family: 'Lora', 'Times New Roman', serif;
  color: rgba(81, 20, 25, 0.75);
  font-size: 16px;
  margin-bottom: 22px;
  line-height: 1.4;
}

.btn-open-env {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #511419;
  color: #f3e8de;
  font-family: 'Lora', 'Times New Roman', serif;
  font-size: 16px;
  font-weight: 600;
  padding: 10px 34px;
  border-radius: 9999px;
  box-shadow: 0 4px 14px rgba(81, 20, 25, 0.35);
  border: none;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-open-env:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 18px rgba(81, 20, 25, 0.5);
}

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

/* --------------------------------------------------------------------------
   MAIN SHOWCASE CONTAINER
   -------------------------------------------------------------------------- */
.main-wrapper {
  width: 100% !important;
  max-width: 480px;
  margin-left: auto !important;
  margin-right: auto !important;
  background: #fff7eb !important;
  position: relative !important;
  overflow-x: clip !important;
  overflow-y: visible !important;
  box-shadow: 0 0 35px rgba(0, 0, 0, 0.08);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

@supports not (overflow-x: clip) {
  .main-wrapper {
    overflow-x: hidden !important;
  }
}

@supports not (overflow-x: clip) {
  .main-wrapper {
    overflow-x: hidden !important;
  }
}

.paper-texture-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url('../images/paper.webp');
  background-size: 100% auto;
  background-position: top center;
  mix-blend-mode: multiply;
  opacity: 0.45;
  z-index: 1;
}

/* --------------------------------------------------------------------------
   HEADER & HERO
   -------------------------------------------------------------------------- */
.hero-header {
  position: relative !important;
  z-index: 10 !important;
  padding: 50px 20px 40px !important;
  text-align: center !important;
  width: 100% !important;
  overflow: hidden !important;
}

.hero-castle-bg {
  position: absolute;
  left: 50%;
  top: 22%;
  width: 160%;
  transform: translateX(-50%);
  object-contain: contain;
  opacity: 0.09;
  pointer-events: none;
}

.hero-save-date {
  font-family: 'Cormorant Garamond', 'Times New Roman', serif;
  font-size: 15px;
  font-weight: 600;
  color: #590310;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-envelope-stage {
  position: relative;
  width: 82%;
  max-width: 310px;
  margin: 32px auto 0;
  aspect-ratio: 333 / 384;
}

.hero-envelope-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  z-index: 10;
}

.hero-polaroid-wrap {
  position: absolute;
  left: 33%;
  top: -2%;
  width: 64%;
  z-index: 20;
  animation: drFloat 6.5s ease-in-out infinite;
  animation-delay: 0.4s;
}

.hero-polaroid-inner {
  aspect-ratio: 221 / 309;
  transform: rotate(12deg);
  border: 6px solid #ffffff;
  background: #ffffff;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.hero-polaroid-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-floating-flower {
  position: absolute;
  left: -4%;
  top: -12%;
  width: 44%;
  z-index: 25;
  animation: drFloat 5s ease-in-out infinite;
  pointer-events: none;
}

.hero-floating-flower img {
  width: 100%;
  transform: rotate(-17deg);
  filter: drop-shadow(3px 4px 4px rgba(0,0,0,0.3));
}

.hero-envelope-cover {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 30;
  pointer-events: none;
}

.hero-names-wrap {
  position: relative;
  z-index: 10;
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.hero-name-item {
  font-family: 'Viaoda Libre', 'The Nautigal', cursive;
  font-size: 42px;
  line-height: 1;
  color: #511419;
}

.hero-giant-amp {
  position: absolute;
  top: 36%;
  transform: translateY(-50%);
  font-family: 'The Nautigal', cursive;
  font-size: 105px;
  line-height: 1;
  color: rgba(81, 20, 25, 0.14);
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   DARK WINE CARDS ("THÔNG TIN BUỔI LỄ" & "TIỆC BÁO HỶ")
   -------------------------------------------------------------------------- */
.wine-card-section {
  position: relative;
  z-index: 10;
  width: 88%;
  max-width: 420px;
  margin: 0 auto 30px;
}

.wine-card-box {
  position: relative;
  background-color: #511419;
  color: #ece4d8;
  border-radius: 14px;
  padding: 34px 20px 30px;
  text-align: center;
  box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.wine-card-texture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: multiply;
  opacity: 0.35;
  pointer-events: none;
}

.wine-card-title {
  font-family: 'Times New Roman', serif;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  color: #ece4d8;
  margin-bottom: 22px;
}

.wine-card-flower-right {
  position: absolute;
  right: -24%;
  bottom: 22%;
  width: 44%;
  z-index: 20;
  pointer-events: none;
  animation: drFloat 5.5s ease-in-out infinite;
}

.wine-card-flower-right img {
  width: 100%;
  filter: drop-shadow(3px 4px 4px rgba(0,0,0,0.3));
}

.wine-card-flower-left {
  position: absolute;
  left: -24%;
  top: 18%;
  width: 44%;
  z-index: 20;
  pointer-events: none;
  animation: drFloat 6s ease-in-out infinite;
}

.wine-card-flower-left img {
  width: 100%;
  transform: scaleX(-1);
  filter: drop-shadow(3px 4px 4px rgba(0,0,0,0.3));
}

.parents-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  font-family: 'Baskerville', 'Times New Roman', serif;
  margin-bottom: 22px;
}

.parents-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.parents-tag {
  font-size: 11px;
  color: rgba(236, 228, 216, 0.7);
}

.parents-name {
  font-size: 12px;
  font-weight: 600;
  color: #ece4d8;
}

.parents-address {
  font-size: 9.5px;
  line-height: 1.25;
  color: rgba(236, 228, 216, 0.7);
  margin-top: 4px;
}

.parents-divider-line {
  width: 1px;
  height: 52px;
  background-color: rgba(236, 228, 216, 0.35);
}

.ceremony-announcement {
  font-family: 'Baskerville', 'Times New Roman', serif;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: rgba(236, 228, 216, 0.8);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.couple-names-block {
  margin: 14px 0;
}

.couple-name-big {
  font-family: 'Viaoda Libre', serif;
  font-size: clamp(23px, 6.5vw, 36px);
  font-weight: 600;
  color: #ece4d8;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.couple-role-tag {
  font-family: 'Times New Roman', serif;
  font-size: 9.5px;
  color: rgba(236, 228, 216, 0.65);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin: 4px 0;
}

.ceremony-meta-block {
  border-top: 1px solid rgba(236, 228, 216, 0.2);
  padding-top: 14px;
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ceremony-meta-time {
  font-size: 12px;
  color: rgba(236, 228, 216, 0.85);
  letter-spacing: 0.08em;
}

.big-day-display {
  font-family: 'Times New Roman', serif;
  font-size: 42px;
  font-weight: 700;
  color: #ece4d8;
  line-height: 1;
  margin: 4px 0;
}

.big-month-display {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: rgba(236, 228, 216, 0.8);
  text-transform: uppercase;
}

.big-lunar-display {
  font-size: 10px;
  color: rgba(236, 228, 216, 0.65);
  font-style: italic;
  margin-top: 4px;
}

/* --------------------------------------------------------------------------
   CALENDAR & COUNTDOWN BLOCK (INSIDE CARD 3)
   -------------------------------------------------------------------------- */
.countdown-clock-text {
  font-family: 'Baskerville', 'Times New Roman', serif;
  font-size: 14px;
  color: #ece4d8;
  margin: 10px 0 16px;
}

.calendar-sheet {
  background-color: #ece4d8;
  color: #511419;
  border-radius: 10px;
  padding: 10px 14px 14px;
  max-width: 290px;
  margin: 0 auto;
}

.calendar-header-title {
  font-family: 'The Nautigal', cursive;
  font-size: 26px;
  text-align: center;
  border-bottom: 1px solid rgba(81, 20, 25, 0.25);
  padding-bottom: 4px;
  margin-bottom: 8px;
}

.calendar-days-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-bottom: 2px solid #511419;
  padding-bottom: 4px;
  font-size: 10px;
  font-weight: 600;
  opacity: 0.7;
}

.calendar-grid-cells {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  padding-top: 6px;
  font-size: 11px;
}

.cal-cell {
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.cal-cell.wedding-target {
  font-weight: 700;
}

.cal-cell.wedding-target .heart-circle {
  position: absolute;
  inset: 1px;
  border: 1.5px solid #511419;
  border-radius: 50%;
  pointer-events: none;
}

.btn-add-calendar-link {
  display: inline-block;
  color: #ece4d8;
  font-size: 12px;
  text-decoration: underline;
  margin: 18px 0 12px;
  cursor: pointer;
  background: none;
  border: none;
}

.btn-open-rsvp {
  display: inline-block;
  border: 1px solid rgba(236, 228, 216, 0.4);
  color: #ece4d8;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 9px 24px;
  border-radius: 20px;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-open-rsvp:hover {
  background: #ece4d8;
  color: #511419;
}

/* --------------------------------------------------------------------------
   3D COVERFLOW GALLERY ("ALBUM ẢNH")
   -------------------------------------------------------------------------- */
.gallery-section {
  position: relative !important;
  z-index: 10 !important;
  padding: 10px 0 30px !important;
  text-align: center !important;
  width: 100% !important;
  overflow: hidden !important;
}

.section-head-title {
  font-family: 'Times New Roman', serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #511419;
  margin-bottom: 18px;
}

.coverflow-viewport {
  position: relative;
  width: 100%;
  height: 410px;
  perspective: 1100px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  user-select: none;
  cursor: grab;
}

.coverflow-viewport:active {
  cursor: grabbing;
}

.coverflow-track {
  position: relative;
  width: 220px;
  height: 330px;
  transform-style: preserve-3d;
}

.coverflow-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
  transition: transform 0.85s cubic-bezier(0.18, 0.9, 0.25, 1),
              opacity 0.85s cubic-bezier(0.18, 0.9, 0.25, 1),
              filter 0.85s cubic-bezier(0.18, 0.9, 0.25, 1),
              box-shadow 0.85s cubic-bezier(0.18, 0.9, 0.25, 1);
  cursor: pointer;
  will-change: transform, opacity, filter;
  backface-visibility: hidden;
}

.coverflow-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  pointer-events: none;
  transition: opacity 0.8s ease;
  background: linear-gradient(to bottom, transparent 60%, rgba(0, 0, 0, 0.35) 100%);
  opacity: 0;
}

.coverflow-slide.active-slide {
  box-shadow: 0 25px 50px -10px rgba(81, 20, 25, 0.38),
              0 12px 24px -5px rgba(0, 0, 0, 0.25),
              0 0 0 2px rgba(255, 255, 255, 0.65);
}

.coverflow-slide.active-slide::after {
  opacity: 1;
}

.coverflow-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

/* Pagination indicator dots */
.coverflow-dots-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}

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

.cf-dot.active {
  width: 20px;
  border-radius: 10px;
  background: #511419;
}

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

.cf-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: none;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 50;
  transition: background 0.2s;
}

.cf-nav-btn:hover {
  background: rgba(0, 0, 0, 0.85);
}

.cf-nav-btn.prev {
  left: 50%;
  margin-left: -128px;
}
.cf-nav-btn.next {
  left: 50%;
  margin-left: 98px;
}

.coverflow-counter {
  font-family: 'Baskerville', 'Times New Roman', serif;
  font-size: 13px;
  color: rgba(81, 20, 25, 0.65);
  margin-top: 10px;
}

/* --------------------------------------------------------------------------
   MAP & LOCATION SECTION
   -------------------------------------------------------------------------- */
.map-section {
  position: relative;
  z-index: 10;
  padding: 10px 20px 26px;
  text-align: center;
}

.map-venue-title {
  font-family: 'Times New Roman', serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #511419;
  margin-bottom: 2px;
}

.map-venue-sub {
  font-size: 11px;
  color: #777;
  margin-bottom: 14px;
}

.map-iframe-box {
  width: 100%;
  max-width: 420px;
  height: 240px;
  border-radius: 12px;
  overflow: hidden;
  margin: 0 auto 14px;
  border: 1px solid rgba(81, 20, 25, 0.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.btn-directions-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #511419;
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
}

/* --------------------------------------------------------------------------
   TIMELINE SECTION ("LỊCH TRÌNH TIỆC BÁO HỶ")
   -------------------------------------------------------------------------- */
.timeline-card-box {
  position: relative;
  background-color: #511419;
  color: #ece4d8;
  border-radius: 14px;
  padding: 30px 20px 26px;
  box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  margin: 0 auto;
  max-width: 420px;
}

.timeline-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.timeline-row:last-child {
  margin-bottom: 0;
}

.timeline-icon-wrap {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.timeline-time-val {
  font-family: 'Times New Roman', serif;
  font-size: 15px;
  font-weight: 600;
  color: #ece4d8;
  min-width: 48px;
}

.timeline-dot-pin {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ece4d8;
}

.timeline-event-name {
  font-size: 14px;
  color: #ece4d8;
}

/* --------------------------------------------------------------------------
   GUESTBOOK SECTION ("SỔ LƯU BÚT") - PERFECTLY CENTERED
   -------------------------------------------------------------------------- */
.guestbook-wrapper-center {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 440px;
  margin: 20px auto 30px;
  padding: 0 16px;
}

.guestbook-card-container {
  position: relative;
  background: #fbf8f3;
  border: 1px solid rgba(81, 20, 25, 0.12);
  border-radius: 14px;
  padding: 30px 20px 24px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  text-align: center;
}

.guestbook-flower-corner {
    left: -60px !important;
    bottom: 10px !important;
    top: auto !important;
    width: 105px !important;
  }

.guestbook-flower-corner img {
  width: 100%;
  filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.25));
}

.guestbook-input-control {
  width: 100%;
  background: transparent;
  border: 1px solid #511419;
  border-radius: 8px;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 13px;
  color: #511419;
  outline: none;
  margin-bottom: 12px;
}

.guestbook-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.btn-magic-ai {
  background: rgba(81, 20, 25, 0.08);
  color: #511419;
  border: none;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 20px;
  cursor: pointer;
  transition: transform 0.2s;
}

.btn-magic-ai:hover {
  transform: scale(1.1);
}

.btn-submit-wish {
  background: #511419;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 8px 24px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-submit-wish:hover {
  opacity: 0.9;
}

.wishes-rendered-list {
  margin-top: 24px;
  max-height: 280px;
  overflow-y: auto;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wish-single-row {
  border-bottom: 1px dashed rgba(81, 20, 25, 0.15);
  padding-bottom: 8px;
}

.wish-sender-title {
  font-weight: 700;
  color: #511419;
  font-size: 12px;
}

.wish-message-.wish-message-body {
  font-size: 12px;
  color: #555;
  margin-top: 2px;
  line-height: 1.4;
}

.wish-date-small {
  font-size: 10px;
  color: #999;
  float: right;
}

/* --------------------------------------------------------------------------
   GIFT SECTION ("HỘP QUÀ MỪNG") - PERFECTLY CENTERED
   -------------------------------------------------------------------------- */
.gift-wrapper-center {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 440px;
  margin: 10px auto 40px;
  text-align: center;
  padding: 0 16px;
}

.gift-button-trigger {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 250px;
  height: 350px;
  margin: 0 auto;
  background: transparent;
  border: none;
  cursor: pointer;
  outline: none;
}

.gift-sparkle {
  position: absolute;
  color: #b58b2f;
  pointer-events: none;
  font-size: 18px;
}

.gift-sparkle.s1 { top: 6%; left: 12%; font-size: 21px; }
.gift-sparkle.s2 { top: 14%; right: 8%; font-size: 16px; }
.gift-sparkle.s3 { top: 34%; left: 3%; font-size: 14px; }
.gift-sparkle.s4 { top: 24%; right: 3%; font-size: 14px; }

.gift-envelopes-box {
  position: relative;
  width: 190px;
  height: 275px;
}

.gift-env-back {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  transform: translateX(18%) translateY(-10%) scale(-0.85, 0.85) rotate(-15deg);
  filter: drop-shadow(0 8px 14px rgba(0,0,0,0.18));
}

.gift-env-front {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  transform: rotate(-10deg);
  filter: drop-shadow(0 10px 18px rgba(0,0,0,0.22));
}

.gift-pill-hint {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 247, 235, 0.95);
  border: 1px solid rgba(81, 20, 25, 0.25);
  color: #511419;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 18px;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(81, 20, 25, 0.1);
  white-space: nowrap;
  transition: all 0.2s;
}

.gift-button-trigger:hover .gift-pill-hint {
  background: #511419;
  color: #fff;
  transform: translateX(-50%) scale(1.05);
}

.gift-foot-sub {
  font-size: 11px;
  color: rgba(81, 20, 25, 0.6);
  margin-top: 14px;
}

.gift-brand-credit {
  font-size: 10px;
  color: rgba(81, 20, 25, 0.35);
  margin-top: 6px;
}

/* --------------------------------------------------------------------------
   FLOATING MUSIC BUTTON
   -------------------------------------------------------------------------- */
.floating-music-btn {
  position: fixed;
  bottom: 22px;
  right: 22px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #511419;
  border: 2px solid #ffffff;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  z-index: 999;
  transition: transform 0.2s;
}

.floating-music-btn.playing i {
  animation: spin-cd 3.5s linear infinite;
}

/* --------------------------------------------------------------------------
   MODALS (GIFT MODAL, RSVP MODAL, AI WISH MODAL)
   -------------------------------------------------------------------------- */
.app-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.app-modal-backdrop.active {
  display: flex;
}

.app-modal-card {
  background: #fff7eb;
  border-radius: 16px;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  position: relative;
}

.modal-head-wine {
  background: #511419;
  color: #fff;
  padding: 16px 20px;
  text-align: center;
  position: relative;
}

.modal-close-icon {
  position: absolute;
  right: 14px;
  top: 14px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.85);
  font-size: 22px;
  cursor: pointer;
}

.modal-body-pad {
  padding: 24px 20px;
}

.rsvp-option-btn {
  width: 100%;
  border: 1.5px solid #ddd;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #444;
  transition: all 0.2s;
}

.rsvp-option-btn.selected.yes {
  border-color: #16a34a;
  color: #16a34a;
  background: rgba(22, 163, 74, 0.05);
}

.rsvp-option-btn.selected.no {
  border-color: #dc2626;
  color: #dc2626;
  background: rgba(220, 38, 38, 0.05);
}

.stepper-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #ccc;
  background: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-modal-submit {
  width: 100%;
  background: #511419;
  color: #fff;
  border: none;
  border-radius: 25px;
  padding: 12px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  margin-top: 14px;
}



/* ==========================================================================
   MASTER RESPONSIVE SYSTEM (CHUNGDOI LAPTOP & MOBILE 100% REPLICA)
   ========================================================================== */

/* 1. ALBUM 3D TRACK & SLIDES BASE CONFIGURATION */
#chungdoi-album-track {
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  perspective: 1000px !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

#chungdoi-album-track > div {
  position: absolute !important;
  height: 92% !important;
  aspect-ratio: 0.6666666666666666 !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25) !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
  outline: 2px solid rgba(255, 255, 255, 0.3) !important;
  transition: all 1100ms cubic-bezier(0.4, 0, 0.2, 1) !important;
  -webkit-transition: all 1100ms cubic-bezier(0.4, 0, 0.2, 1) !important;
  will-change: transform, opacity !important;
}

#chungdoi-album-track img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  pointer-events: none !important;
}

.album-nav-arrow {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  z-index: 200 !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  background: rgba(0, 0, 0, 0.6) !important;
  color: #fff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  border: none !important;
  outline: none !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3) !important;
  transition: background 0.2s, transform 0.2s !important;
}

.album-nav-arrow:hover {
  background: rgba(0, 0, 0, 0.9) !important;
  transform: translateY(-50%) scale(1.08) !important;
}

/* 2. LAPTOP / DESKTOP STYLES (MIN-WIDTH: 768px) */
@media (min-width: 768px) {
  /* Expand container to 900px on laptop as in ChungDoi */
  .main-wrapper {
    max-width: 900px !important;
    border-left: 1px solid rgba(81, 20, 25, 0.12) !important;
    border-right: 1px solid rgba(81, 20, 25, 0.12) !important;
    box-shadow: 0 10px 45px rgba(0, 0, 0, 0.12) !important;
  }

  .hero-header {
    padding: 65px 36px 50px !important;
  }

  .hero-save-date {
    font-size: 18px !important;
  }

  .hero-envelope-stage {
    max-width: 420px !important;
    margin-top: 40px !important;
  }

  .hero-name-item {
    font-size: 58px !important;
  }

  .hero-giant-amp {
    font-size: 140px !important;
  }

  .wine-card-section {
    max-width: 460px !important;
    margin-bottom: 40px !important;
  }

  .wine-card-box {
    padding: 38px 30px 34px !important;
    border-radius: 16px !important;
  }

  .wine-card-title {
    font-size: 22px !important;
  }

  .couple-name-big {
    font-size: 42px !important;
  }

  .wine-card-flower-right {
    right: -80px !important;
    width: 145px !important;
    top: 0% !important;
  }

  .wine-card-flower-left {
    left: -36px !important;
    width: 145px !important;
    top: 18% !important;
  }

  /* Album on Laptop: 600px wide x 520px high with working < > buttons */
  .album-viewport-container {
    width: 100% !important;
    max-width: 600px !important;
    margin: 22px auto 0 !important;
    padding: 0 !important;
  }

  .album-stage-height {
    height: 520px !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .album-nav-arrow {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .album-nav-arrow.prev {
    left: -12px !important;
  }

  .album-nav-arrow.next {
    right: -12px !important;
  }

  /* Map, Timeline, Guestbook on Laptop */
  .map-section {
    max-width: 560px !important;
  }

  .map-iframe-box {
    max-width: 560px !important;
    height: 300px !important;
  }

  .timeline-card-box {
    max-width: 560px !important;
    padding: 36px 30px 30px !important;
  }

  .guestbook-wrapper-center,
  .gift-wrapper-center {
    max-width: 460px !important;
  }

  .guestbook-card-container {
    padding: 36px 30px 30px !important;
  }

  .guestbook-flower-corner {
    left: -60px !important;
    bottom: 10px !important;
    top: auto !important;
    width: 105px !important;
  }
}

/* 3. MOBILE STYLES (MAX-WIDTH: 767px) */
@media (max-width: 767px) {
  .main-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 auto !important;
  }

  /* Ẩn hoàn toàn 2 nút mũi tên (< >) trên điện thoại theo yêu cầu */
  #album-prev-btn,
  #album-next-btn,
  .album-nav-arrow,
  button[aria-label="Previous photo"],
  button[aria-label="Next photo"] {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  .wine-card-section {
    width: 90% !important;
    max-width: 390px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .wine-card-flower-right {
    right: -22px !important;
    width: 82px !important;
    top: 38% !important;
  }

  .wine-card-flower-left {
    left: 0px !important;
    width: 82px !important;
    top: 62% !important;
  }

  .couple-name-big {
    font-size: clamp(21px, 6.2vw, 28px) !important;
    line-height: 1.25 !important;
    white-space: nowrap !important;
  }

  .album-viewport-container {
    width: 100% !important;
    max-width: 380px !important;
    padding: 0 4px !important;
    margin: 16px auto 0 !important;
  }

  .album-stage-height {
    height: 340px !important;
    width: 100% !important;
  }

  .guestbook-wrapper-center,
  .gift-wrapper-center {
    width: 90% !important;
    max-width: 390px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .guestbook-flower-corner {
    left: -60px !important;
    bottom: 10px !important;
    top: auto !important;
    width: 105px !important;
  }

  #admin-open-btn {
    top: 12px !important;
    right: 12px !important;
    padding: 7px 11px !important;
    font-size: 10px !important;
  }

  .floating-music-btn {
    bottom: 14px !important;
    right: 14px !important;
    width: 38px !important;
    height: 38px !important;
    font-size: 14px !important;
  }
}

.cms-dashboard { display:flex; flex-direction:column; gap:12px; color:#382629; }
.cms-note { padding:10px 12px; border-radius:8px; background:#fff7e8; color:#6d4d1e; line-height:1.5; }
.cms-section { padding:13px; background:#fff; border:1px solid rgba(81,20,25,.14); border-radius:10px; }
.cms-section h4 { margin:0 0 10px; color:#511419; font-size:13px; font-weight:700; }
.cms-section h4 small { color:#967f72; font-weight:500; }
.cms-grid { display:grid; grid-template-columns:1fr 1fr; gap:9px; }
.cms-field { display:flex; flex-direction:column; gap:4px; min-width:0; }
.cms-field span { color:#655257; font-size:11px; font-weight:600; }
.cms-field input,.cms-field textarea,.cms-link-row input,#adm-link-result-val { width:100%; min-width:0; padding:8px 9px; border:1px solid #dfd4d1; border-radius:7px; background:#fffdfa; color:#33282a; font:inherit; }
.cms-field textarea { resize:vertical; }
.cms-field:has(textarea) { grid-column:1/-1; }
.cms-link-row { display:flex; gap:7px; }
.cms-link-row button,.cms-actions button,.cms-actions label,.cms-link-row button,#adm-btn-copy-link { border:0; border-radius:7px; padding:8px 11px; background:#511419; color:#fff; font:inherit; cursor:pointer; white-space:nowrap; }
#adm-link-result-box { display:flex; gap:7px; margin-top:8px; }
.cms-actions { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.cms-import { position:relative; overflow:hidden; cursor:pointer; }
.cms-import input { position:absolute; inset:0; opacity:0; cursor:pointer; }
.cms-list { display:flex; flex-direction:column; gap:7px; max-height:220px; overflow:auto; }
.cms-entry { display:flex; justify-content:space-between; align-items:flex-start; gap:8px; padding:9px; border:1px solid #eee5e2; border-radius:8px; }
.cms-entry b { display:block; }
.cms-entry small { color:#897a7d; }
.cms-entry p { margin:4px 0 0; line-height:1.4; white-space:pre-wrap; }
.cms-entry button { border:0; border-radius:6px; padding:5px 8px; background:#f8e9e8; color:#8a2f34; cursor:pointer; }
.cms-empty,.cms-status { margin:0; color:#827476; }
.cms-status { text-align:center; font-size:11px; }
@media (max-width:540px) { .cms-grid { grid-template-columns:1fr; } .cms-field:has(textarea) { grid-column:auto; } }


/* STANDALONE WISH BOXES OUTSIDE THE CARD (MATCHES IMAGE 2) */
.wishes-rendered-list {
  margin-top: 22px !important;
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  max-height: 420px !important;
  overflow-y: auto !important;
  text-align: left !important;
}

.wish-single-box {
  background: rgba(255, 255, 255, 0.72) !important;
  border: 1px solid rgba(81, 20, 25, 0.22) !important;
  border-radius: 12px !important;
  padding: 14px 18px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02) !important;
  backdrop-filter: blur(4px) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.wish-box-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-bottom: 5px !important;
}

.wish-box-sender {
  font-family: 'Times New Roman', serif !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  color: #111111 !important;
}

.wish-box-time {
  font-size: 11px !important;
  color: #777777 !important;
}

.wish-box-content {
  font-family: 'Lora', 'Times New Roman', serif !important;
  font-size: 12.5px !important;
  color: #333333 !important;
  line-height: 1.5 !important;
  margin: 0 !important;
}
