/* Minimalism - Nâu
   Layout is calibrated to the supplied Chung Đôi reference HTML.
   Original wedding photos and supplied theme artwork are kept at native resolution. */
:root {
  --mb-paper: #fff7f3;
  --mb-paper-deep: #f3e9df;
  --mb-ink: #7c6a60;
  --mb-muted: #918077;
  --mb-accent: #b49a78;
  --mb-line: rgba(124, 106, 96, .22);
  --a-paper: url('../assets/img/paper.webp');
}

html, body {
  min-height: 100%;
  background: #f5efe6 !important;
  color: var(--mb-ink) !important;
}
body {
  background-image: url('../assets/img/paper.webp') !important;
  background-size: 900px auto !important;
  background-position: center top !important;
  background-repeat: repeat-y !important;
}
body > div[data-testid="minimalism-darkred-template"] {
  width: 100% !important;
  justify-content: center !important;
  background: transparent !important;
}
[data-showcase-root] {
  width: 100% !important;
  max-width: 900px !important;
  margin-inline: auto !important;
  overflow: hidden !important;
  background-color: var(--mb-paper) !important;
  color: var(--mb-ink) !important;
}
[data-section] { color: var(--mb-ink) !important; }
[data-section] h1,
[data-section] h2,
[data-section] h3 {
  color: var(--mb-ink) !important;
}
[data-section] p,
[data-section] span,
[data-section] div { text-shadow: none; }

/* HERO — same proportions and layering as Chung Đôi's Minimalism - Nâu. */
[data-section="hero"] {
  position: relative !important;
  isolation: isolate !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  box-sizing: border-box !important;
  padding: 48px 16px 80px !important;
  overflow: visible !important;
  background: transparent !important;
  text-align: center !important;
}
[data-section="hero"]::before {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
  left: -12%;
  top: 4%;
  width: 37%;
  height: auto;
  aspect-ratio: 441 / 1254;
  background: url('../assets/img/leaf-background.webp') center / 100% 100% no-repeat;
  opacity: .14;
}
[data-section="hero"]::after {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
  left: 47%;
  top: 47%;
  width: 118%;
  height: auto;
  aspect-ratio: 1188 / 1171;
  transform: translateX(-50%);
  background: url('../assets/img/house-background.webp') center / 100% 100% no-repeat;
  mix-blend-mode: multiply;
  opacity: .11;
}
[data-section="hero"] > * { z-index: 1; }
[data-section="hero"] > img[data-a="castle_background"] { display: none !important; }
[data-section="hero"] [data-a="envelope_background"],
[data-section="hero"] [data-a="envelope_cover"] { display: none !important; }

[data-section="hero"] > p[data-f="texts.saveTheDate"] {
  order: 0 !important;
  position: relative !important;
  z-index: 3 !important;
  margin: 0 !important;
  color: #827771 !important;
  font-size: 13px !important;
  line-height: 1.4 !important;
  text-transform: uppercase !important;
}

/* Couple names: inline and centered above the photograph. */
[data-section="hero"] > div.relative.z-10:has(> p[data-f^="couple."]) {
  order: 1 !important;
  position: relative !important;
  z-index: 3 !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: baseline !important;
  justify-content: center !important;
  gap: 0 6px !important;
  width: 100% !important;
  margin: 12px auto 0 !important;
}
[data-section="hero"] > div.relative.z-10:has(> p[data-f^="couple."]) p[data-f^="couple."] {
  display: inline-block !important;
  margin: 0 !important;
  color: #827771 !important;
  font-size: 37px !important;
  line-height: 1.12 !important;
}
[data-section="hero"] > div.relative.z-10:has(> p[data-f^="couple."]) span[aria-hidden="true"] {
  position: static !important;
  display: inline-block !important;
  align-self: baseline !important;
  margin: 0 3px !important;
  color: #918077 !important;
  font-size: 40px !important;
  line-height: 0 !important;
  transform: none !important;
}

/* Photo holder follows the reference 1094:1554 ratio exactly. */
[data-section="hero"] > div.relative.z-10:has([data-a="cover-seal"]) {
  order: 2 !important;
  position: relative !important;
  z-index: 2 !important;
  width: 88% !important;
  max-width: 400px !important;
  height: auto !important;
  aspect-ratio: 1094 / 1554 !important;
  margin: 24px auto 0 !important;
}
[data-section="hero"] > div.relative.z-10:has([data-a="cover-seal"]) > .relative.aspect-\[333\/384\] {
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: unset !important;
  overflow: visible !important;
}
/* The image is rotated inside the frame, not the frame itself. */
[data-section="hero"] .relative.aspect-\[333\/384\] > div.absolute:has([data-a="cover-seal"]) {
  position: absolute !important;
  left: 11.7% !important;
  top: 7% !important;
  z-index: 10 !important;
  width: 72.2% !important;
  height: 78.1% !important;
  margin: 0 !important;
  overflow: hidden !important;
  background: #fff !important;
  transform: rotate(-4.76deg) !important;
  animation: none !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .08) !important;
}
[data-section="hero"] .relative.aspect-\[333\/384\] > div.absolute:has([data-a="cover-seal"]) > div {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: unset !important;
  box-sizing: border-box !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
  rotate: none !important;
  overflow: hidden !important;
}
[data-section="hero"] [data-a="cover-seal"] {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover !important;
  object-position: center 42% !important;
  image-rendering: auto !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  z-index: 1 !important;
}
/* Original transparent Polaroid overlay contains the tape and gold wax seal. */
[data-section="hero"] .relative.aspect-\[333\/384\]::after {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 20 !important;
  pointer-events: none !important;
  background: url('../assets/img/frame-avatar.webp') center / 100% 100% no-repeat !important;
  filter: drop-shadow(4px 4px 4px rgba(0, 0, 0, .2));
}
/* Dried flowers overlap the lower-left edge, as in the reference. */
[data-section="hero"] .relative.aspect-\[333\/384\] > span:has([data-a="flower2_decoration"]) {
  position: absolute !important;
  left: -3% !important;
  bottom: -9% !important;
  top: auto !important;
  z-index: 30 !important;
  width: 36% !important;
  max-width: none !important;
  opacity: 1 !important;
  transform: rotate(0deg) !important;
}
[data-section="hero"] [data-a="flower2_decoration"] {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-width: none !important;
  object-fit: contain !important;
  filter: none !important;
  image-rendering: auto !important;
  rotate: 4deg !important;
}

/* Other sections: warm paper cards and brown typography. */
[data-section="family"] > div.relative.overflow-hidden,
[data-section="reception"] > div.relative.overflow-hidden,
[data-section="map"] > div.relative.overflow-hidden,
[data-section="schedule"] > div.relative.overflow-hidden,
[data-section="dresscode"] > div.relative.overflow-hidden,
[data-section="guestbook"] > div.relative.overflow-hidden,
[data-section="gift"] > div.relative.overflow-hidden {
  background: rgba(255, 253, 249, .72) !important;
  border: 1px solid var(--mb-line) !important;
  border-radius: 3px !important;
  box-shadow: 0 5px 18px rgba(89, 69, 53, .08) !important;
}
[data-section="family"] [style*="background-color: rgb(81, 20, 25)"],
[data-section="reception"] [style*="background-color: rgb(81, 20, 25)"],
[data-section="map"] [style*="background-color: rgb(81, 20, 25)"],
[data-section="schedule"] [style*="background-color: rgb(81, 20, 25)"],
[data-section="dresscode"] [style*="background-color: rgb(81, 20, 25)"],
[data-section="guestbook"] [style*="background-color: rgb(81, 20, 25)"],
[data-section="gift"] [style*="background-color: rgb(81, 20, 25)"] {
  background-color: transparent !important;
}
[data-section] [style*="color: rgb(236, 228, 216)"],
[data-section] [style*="color: rgba(236, 228, 216"],
[data-section] [style*="color: rgb(81, 20, 25)"],
[data-section] [style*="color: rgb(89, 3, 16)"] {
  color: var(--mb-ink) !important;
}
[data-section] [data-a="paper"] {
  opacity: .2 !important;
  mix-blend-mode: multiply !important;
}
[data-section] button { accent-color: var(--mb-accent); }
[data-section] input,
[data-section] textarea,
[data-section] select {
  background: #fffdf9 !important;
  color: var(--mb-ink) !important;
  border-color: var(--mb-line) !important;
}
[data-section] a { color: #8b725c !important; }
[data-section="album"] img {
  max-width: 100%;
  height: auto;
  border-radius: 2px !important;
  box-shadow: 0 5px 14px rgba(70, 53, 40, .13) !important;
  image-rendering: auto !important;
}
[data-section="map"] iframe { filter: sepia(.12) saturate(.82); }
#gift-modal .card {
  background: #fff7f3 !important;
  color: var(--mb-ink) !important;
  border: 1px solid var(--mb-line) !important;
}
#gift-modal .acc { border-color: #b49a78 !important; }
.wedding-music__toggle {
  background: #827771 !important;
  color: #fffaf6 !important;
  border-color: #b49a78 !important;
}

/* Opening envelope — warm paper instead of the old burgundy gradient. */
[data-cover] {
  background-color: #f8f3eb !important;
  background-image: linear-gradient(rgba(248, 243, 235, .24), rgba(248, 243, 235, .24)), url('../assets/img/paper.webp') !important;
  background-size: auto, 560px auto !important;
  background-repeat: repeat !important;
  color: #806e64 !important;
}
[data-cover]::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: url('../assets/img/leaf-background.webp') left 4% center / auto 92% no-repeat;
  opacity: .15;
}
[data-cover]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 34%;
  z-index: 0;
  pointer-events: none;
  background: url('../assets/img/house-background.webp') center bottom / auto 100% no-repeat;
  opacity: .09;
}
[data-cover] > div.relative { position: relative !important; z-index: 2 !important; }
[data-cover] .relative.rounded-lg {
  border-radius: 4px !important;
  box-shadow: 0 14px 36px rgba(91, 72, 54, .16), 0 2px 8px rgba(91, 72, 54, .08) !important;
}
[data-cover] .relative.rounded-lg > div.absolute.inset-0 {
  background: rgba(255, 250, 243, .94) !important;
  border: 1px solid rgba(128, 110, 100, .22) !important;
}
[data-cover] [data-cover-seal] {
  background: radial-gradient(circle at 32% 28%, #e8d7b4, #b99b68 68%, #92754c) !important;
  --shadow-color: rgba(153, 125, 79, .25) !important;
  box-shadow: 0 4px 18px rgba(112, 88, 52, .24), inset 0 2px 4px rgba(255, 255, 255, .48) !important;
}
[data-cover] [data-cover-seal] svg { fill: #fff9ed !important; }
[data-cover] h1 {
  color: #806e64 !important;
}
[data-cover] h1 span { color: #806e64 !important; }
[data-cover] [data-f="view.cover.date"],
[data-cover] [data-f="texts.coverInvite"] { color: #927f73 !important; }
[data-cover] #openBtn {
  background: #827771 !important;
  color: #fffaf4 !important;
  box-shadow: 0 4px 14px rgba(104, 83, 68, .22) !important;
  border: 1px solid rgba(180, 154, 120, .48) !important;
}
[data-cover] #openBtn > div { opacity: .22 !important; }
[data-cover] > div:first-child > div { color: rgba(180, 154, 120, .42) !important; }

@media (min-width: 768px) {
  [data-section="hero"] { padding-bottom: 128px !important; }
  [data-section="hero"] > p[data-f="texts.saveTheDate"] { font-size: 16px !important; }
  [data-section="hero"] > div.relative.z-10:has(> p[data-f^="couple."]) p[data-f^="couple."] { font-size: 46px !important; }
  [data-section="hero"] > div.relative.z-10:has(> p[data-f^="couple."]) span[aria-hidden="true"] { font-size: 46px !important; }
  [data-section="hero"] > div.relative.z-10:has([data-a="cover-seal"]) {
    max-width: 520px !important;
    margin-top: 32px !important;
  }
}
@media (max-width: 767px) {
  [data-section="hero"] { padding: 42px 14px 80px !important; }
  [data-section="hero"]::before { left: -9%; width: 42%; opacity: .16; }
  [data-section="hero"]::after { top: 47%; width: 135%; opacity: .15; }
  [data-section="hero"] > div.relative.z-10:has([data-a="cover-seal"]) {
    width: 88% !important;
    max-width: 400px !important;
    margin-top: 24px !important;
  }
  [data-section="hero"] > div.relative.z-10:has(> p[data-f^="couple."]) { gap: 0 5px !important; }
  [data-section="hero"] .relative.aspect-\[333\/384\] > span:has([data-a="flower2_decoration"]) {
    left: -3% !important;
    bottom: -9% !important;
    width: 36% !important;
  }
  [data-cover]::before { background-position: left center; background-size: auto 82%; opacity: .12; }
  [data-cover]::after { height: 26%; opacity: .07; }
}
@media (prefers-reduced-motion: reduce) {
  [data-section="hero"] *, [data-cover] * { animation: none !important; }
}

/* ---- Khớp ảnh mẫu: hàng giờ/ngày, đếm ngược, lịch nâu, thẻ be ---- */
[data-section="family"] > div.relative.overflow-hidden,
[data-section="reception"] > div.relative.overflow-hidden {
  background: #ede3d6 !important;
  border: 0 !important;
  border-radius: 4px !important;
  box-shadow: 0 6px 16px rgba(89, 69, 53, .22) !important;
}
.mb-lead, .mb-time, .mb-daterow, .mb-year, .mb-countdown { color: var(--mb-ink); text-align: center; }
.mb-lead { font-size: 14px; letter-spacing: .1em; text-transform: uppercase; }
.mb-time { font: 400 23px/1.2 Baskerville, 'Times New Roman', serif; letter-spacing: .05em; margin-top: -6px; }
.mb-daterow { display: flex; align-items: center; justify-content: center; gap: 14px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; margin-top: 8px; }
.mb-day { font: 400 34px/1 Baskerville, 'Times New Roman', serif; letter-spacing: 0; }
.mb-sep { display: block; width: 1px; height: 24px; background: rgba(124, 106, 96, .4); }
.mb-year { font: 400 20px/1.2 Baskerville, 'Times New Roman', serif; letter-spacing: .06em; margin-top: 4px; }
.mb-countdown { font-size: 13px; line-height: 1.8; margin-top: 8px; }
.mb-countdown[hidden], [data-welcome-row][hidden] { display: none !important; }
.mb-countdown-v { font-size: 14px; }

[data-section="reception"] .w-fit:has(> [data-showcase-keep]) { background: transparent !important; padding: 0 !important; }
[data-section="reception"] [data-showcase-keep] {
  background: #7d6a5f !important;
  border-radius: 6px !important;
  padding: 4px 10px 12px !important;
}
[data-section="reception"] [data-showcase-keep],
[data-section="reception"] [data-showcase-keep] * { color: #f6efe6 !important; border-color: rgba(246, 239, 230, .55) !important; }
[data-section="reception"] [data-showcase-keep] svg { fill: #fff !important; }
[data-section="reception"] [data-showcase-keep] svg ~ span { color: #7d6a5f !important; }
@media (min-width: 768px) {
  .mb-time { font-size: 26px; }
  .mb-day { font-size: 40px; }
  .mb-daterow { font-size: 14px; }
}

/* Chữ "Nhấn để mở": dùng cùng bộ font với các tiêu đề (Times New Roman -> EB Garamond có đủ dấu tiếng Việt). */
.ienv-hint, .ienv-hint * {
}

/* Lá xanh trang trí (như bản gốc): thẻ "Thông tin lễ cưới" bên trái, thẻ "Thông tin tiệc cưới" bên phải. */
[data-section="family"]::before,
[data-section="reception"]::after {
  content: "";
  position: absolute;
  z-index: 20;
  pointer-events: none;
  aspect-ratio: 441 / 1254;
  background: url('../assets/img/leaf-background.webp') center / 100% 100% no-repeat;
  filter: drop-shadow(3px 4px 3px rgba(0, 0, 0, .28));
}
[data-section="family"]::before { left: -13%; top: 35%; width: 24%; transform: rotate(14deg); animation: drFloat 6s ease-in-out infinite; }
[data-section="reception"]::after { right: -11%; top: 15%; width: 27%; transform: scaleX(-1) rotate(14deg); }
@media (prefers-reduced-motion: reduce) { [data-section="family"]::before { animation: none; } }

/* Hoa khô thẻ "Thông tin lễ cưới": nằm góc dưới bên phải, thò ra ngoài thẻ như bản gốc. */
[data-section="family"] > span:has([data-a="flower2_decoration"]) {
  right: -16% !important;
  top: 65% !important;
  bottom: auto !important;
  width: 31% !important;
  transform: none !important;
}

/* Hoa khô thẻ "Thông tin tiệc cưới": góc dưới bên trái, thò ra ngoài thẻ như bản gốc. */
[data-section="reception"] > span:has([data-a="flower2_decoration"]):not([class*="-right-"]) {
  left: -20% !important;
  top: 69% !important;
  bottom: auto !important;
  width: 30% !important;
  transform: none !important;
}
