:root {
  --ivory: #fff8e8;
  --red-deep: #620000;
  --red-mid: #a70905;
  --red-soft: #d82312;
  --gold: #d9ad47;
  --gold-light: #fff0a8;
  --ink: #3b1414;
  --muted: #7c4a32;
  --display: "Noto Serif Bengali", serif;
  --body: "Hind Siliguri", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  font-family: var(--body);
  color: var(--ink);
  background:
    radial-gradient(ellipse at 20% 15%, rgba(255, 232, 146, 0.2), transparent 55%),
    radial-gradient(ellipse at 85% 80%, rgba(114, 0, 0, 0.28), transparent 55%),
    linear-gradient(180deg, #5a0000 0%, #b60904 52%, #e03015 100%);
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("images/background.png");
  background-size: cover;
  background-position: center;
  opacity: 0.22;
  mix-blend-mode: screen;
  pointer-events: none;
}

.petals {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  overflow: hidden;
}

.petal {
  position: absolute;
  top: -42px;
  width: 18px;
  height: 18px;
  color: var(--gold-light);
  opacity: 0.62;
  animation-name: fall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  will-change: transform;
}

.petal svg {
  width: 100%;
  height: 100%;
  display: block;
}

.card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 560px;
  padding: 48px 44px 42px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(80, 0, 0, 0.1), rgba(78, 0, 0, 0.22)),
    url("images/subho-bibaho-bg.png");
  background-size: 100% 100%;
  background-position: center top;
  background-repeat: no-repeat;
  border: 1px solid rgba(255, 231, 155, 0.72);
  border-radius: 4px;
  box-shadow:
    0 34px 80px -22px rgba(40, 0, 0, 0.6),
    0 2px 0 rgba(255, 235, 166, 0.75) inset;
  overflow: visible;
  animation: riseIn 1.1s cubic-bezier(.19, 1, .22, 1) both;
}

.card::before,
.card::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.card::before {
  inset: 14px;
}

.card::after {
  inset: 22px;
}

.alpana {
  position: absolute;
  width: 96px;
  opacity: 0;
  filter: drop-shadow(0 4px 8px rgba(90, 0, 0, 0.14));
  z-index: 1;
  pointer-events: none;
}

.alpana-tl {
  top: 8px;
  left: 8px;
}

.alpana-tr {
  top: 8px;
  right: 8px;
}

.mandala-bg {
  position: absolute;
  top: 80px;
  left: 50%;
  width: 360px;
  transform: translateX(-50%);
  opacity: 0;
  z-index: 0;
  animation: slowSpin 42s linear infinite;
  pointer-events: none;
}

.ornament,
.eyebrow,
.script-title,
.couple-photos,
.names,
.name-intro-btn,
.details,
.divider,
.countdown,
.question,
.arena,
.no-caption {
  position: relative;
  z-index: 2;
}

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 18px;
  color: var(--gold-light);
}

.ornament .line {
  height: 1px;
  width: 62px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.heart,
.photo-heart {
  color: var(--red-light);
  text-shadow: 0 2px 8px rgba(72, 0, 0, 0.75);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--gold-light);
  -webkit-text-stroke: 0.5px red;
  text-shadow:
    0 0 5px red,
    0 0 10px red,
    0 2px 12px rgba(255, 0, 0, 0.8);
  font-size: 18px;
  font-weight: 1000;
  /* letter-spacing: 3px; */
  text-transform: uppercase;
}

.script-title {
  margin: 0 0 4px;
  font-family: var(--display);
  font-size: clamp(42px, 9vw, 64px);
  font-weight: 900;
  line-height: 1.06;
  color: #fffaf0;
  text-shadow:
    0 4px 14px rgba(70, 0, 0, 0.95),
    0 0 18px rgba(255, 218, 100, 0.34);
}

.couple-photos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin: 18px 0 12px;
}

.photo-frame {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--gold);
  box-shadow: 0 10px 22px -8px rgba(97, 0, 0, 0.45);
  background: var(--red-mid);
  flex-shrink: 0;
}

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

.photo-frame.groom {
  margin-right: 0;
  z-index: 1;
}

.photo-frame.bride {
  margin-left: 0;
  z-index: 2;
}

.photo-heart {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  z-index: 3;
  margin: 0 4px;
  background: transparent;
  border: none;
  border-radius: 0;
  color: #def242;
  font-size: 32px;
  line-height: 1;
  flex-shrink: 0;
  text-shadow:
    0 2px 2px rgba(90, 0, 0, 0.45),
    0 0 4px #fff0a8,
    0 0 9px rgba(217, 173, 71, 0.9);
  filter: drop-shadow(0 3px 4px rgba(90, 0, 0, 0.35));
}

.names {
  margin: 6px 0 12px;
  color: #fffaf0;
  font-family: var(--display);
  font-size: clamp(25px, 5vw, 34px);
  font-weight: 800;
}

.name-intro-btn,
button.name-intro-btn,
.btn.name-intro-btn,
.btn.btn-intro.name-intro-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: fit-content !important;
  min-width: 0 !important;
  max-width: fit-content !important;
  flex: 0 0 auto !important;
  align-self: center !important;
  margin: -2px auto 14px !important;
  padding: 9px 22px !important;
  white-space: nowrap !important;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #7a0000, #d82312);
  box-shadow: 0 8px 18px -10px rgba(70, 0, 0, 0.75);
}

.details {
  max-width: 430px;
  margin: 0 auto 18px;
  color: var(--gold-light);
  font-size: 20px;
  line-height: 1.72;
}

.details p {
  margin: 0 0 6px;
}

.details strong {
  color: #ffffff;
  font-weight: 800;
}

.event-details {
  max-width: 450px;
  margin: 0 auto 18px;
}

.event-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 7px;
  text-align: left;
}

.event-item img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  flex-shrink: 0;
}

.event-item p {
  margin: 0;
  color: var(--gold-light);
  font-size: 16px;
  line-height: 1.5;
}

.event-item strong {
  color: #ffffff;
  font-weight: 800;
}

.location-item {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 6px 8px;
  align-items: center;
}

.location-item > img {
  grid-column: 1;
  grid-row: 1;
  width: 32px;
  height: 32px;
}

.location-item > p {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
}

.direction-row {
  grid-column: 1 / -1;
  grid-row: 2;
  display: grid;
  grid-template-columns: 32px auto auto;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.direction-row img {
  width: 32px;
  height: 32px;
}

.direction-text {
  margin: 0;
}

.location-map-btn {
  flex-shrink: 0;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  color: #fff4c2;
  background: linear-gradient(135deg, #8f170d, #c52b16);
  border: 1px solid #d9ad47;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  box-shadow:
    0 2px 6px rgba(60, 0, 0, 0.45),
    0 0 8px rgba(217, 173, 71, 0.25);
}

.location-map-btn:hover {
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow:
    0 3px 10px rgba(60, 0, 0, 0.5),
    0 0 12px rgba(255, 215, 80, 0.45);
}

.divider {
  display: block;
  width: min(310px, 80%);
  margin: 16px auto;
  filter: drop-shadow(0 1px 0 rgba(105, 0, 0, 0.1));
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  max-width: 430px;
  margin: 0 auto 22px;
}

.countdown div {
  min-width: 0;
  padding: 9px 5px 8px;
  background: rgba(114, 0, 0, 0.92);
  border: 1px solid rgba(217, 173, 71, 0.72);
  color: var(--gold-light);
}

.countdown strong {
  display: block;
  color: #fff;
  font-size: clamp(20px, 4.5vw, 27px);
  line-height: 1;
}

.countdown span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 700;
}

.question {
  margin: 0 0 24px;
  color: #fffaf0;
  font-family: var(--display);
  font-size: clamp(19px, 4vw, 24px);
  font-weight: 700;
}

.arena {
  position: relative;
  min-height: 132px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: 14px 24px;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.btn-yes {
  position: relative;
  z-index: 3;
  color: #fff;
  background: linear-gradient(135deg, var(--red-deep), var(--red-soft));
  box-shadow: 0 10px 24px -8px rgba(98, 0, 0, 0.65);
  transform: scale(var(--yes-scale, 1));
}

.btn-yes:hover {
  transform: scale(calc(var(--yes-scale, 1) * 1.05));
}

.name-intro-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: max-content;
  margin: -4px auto 14px;
  padding: 9px 22px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #7a0000, #d82312);
  box-shadow: 0 8px 18px -10px rgba(70, 0, 0, 0.75);
}

.family-icon {
  font-family:
    "Apple Color Emoji",
    "Segoe UI Emoji",
    "Noto Color Emoji",
    sans-serif;

  font-size: 1.15em;
  line-height: 1;
  display: inline-block;
  vertical-align: middle;
}

.btn-no {
  position: relative;
  z-index: 3;
  color: var(--gold-light);
  background: #2a0808;
  border: 1.5px solid #2a0808;
  box-shadow: 0 10px 22px -10px rgba(0, 0, 0, 0.55);
}

.btn-no:hover {
  background: #1d0505;
}


.btn-no.roaming {
  position: fixed;
  z-index: 50;
  transition:
    top 0.28s cubic-bezier(.34, 1.56, .64, 1),
    left 0.28s cubic-bezier(.34, 1.56, .64, 1);
}

.btn-music,
.btn-map {
  color: var(--red-deep);
  background: linear-gradient(180deg, #fff4bd, #d9ad47);
  box-shadow: 0 9px 20px -12px rgba(70, 0, 0, 0.55);
}

.no-caption {
  height: 16px;
  margin: 10px 0 0;
  color: var(--gold-light);
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.no-caption.show {
  opacity: 0.82;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(45, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.overlay-card {
  position: relative;
  z-index: 2;
  width: min(560px, 90vw);
  max-width: 560px;
  padding: 45px 40px 40px;
  text-align: center;
  color: var(--ink);
  background: linear-gradient(180deg, var(--ivory), #ffd978);
  border: 1px solid rgba(217, 173, 71, 0.7);
  border-radius: 4px;
  box-shadow: 0 40px 90px -20px rgba(0, 0, 0, 0.42);
  transform: scale(0.85) translateY(10px);
  transition: transform 0.45s cubic-bezier(.34, 1.56, .64, 1);
}

.overlay.show .overlay-card {
  transform: scale(1) translateY(0);
}

.overlay-card .script-title {
  font-size: clamp(48px, 9vw, 64px);
  margin-bottom: 10px;
  display: inline-block;

  /* মূল লেখার রং */
  color: #a70905;

  /* পরিষ্কার সাদা/ক্রিম outline */
  -webkit-text-stroke: 2px #fff8df;
  paint-order: stroke fill;

  /* বাইরে golden glow */
  text-shadow:
    0 3px 2px rgba(70, 0, 0, 0.85),
    0 0 5px #fff8df,
    0 0 10px #d9ad47,
    0 0 18px rgba(217, 173, 71, 0.8);

  animation: thankYouPulse 1.8s ease-in-out infinite;
}

@keyframes thankYouPulse {

  0% {
    transform: scale(1) rotate(0deg);

    text-shadow:
      0 3px 2px rgba(70, 0, 0, 0.85),
      0 0 5px #fff8df,
      0 0 10px #d9ad47;
  }

  50% {
    transform: scale(1.08) rotate(-2deg);

    text-shadow:
      0 3px 2px rgba(70, 0, 0, 0.85),
      0 0 5px #fff8df,
      0 0 12px #fff0a8,
      0 0 24px #d9ad47,
      0 0 35px rgba(217, 173, 71, 0.8);
  }

  100% {
    transform: scale(1) rotate(0deg);

    text-shadow:
      0 3px 2px rgba(70, 0, 0, 0.85),
      0 0 5px #fff8df,
      0 0 10px #d9ad47;
  }
}

.overlay-card p {
  margin: 0;
  color: #6f3028;
  line-height: 1.7;

  font-size: 20px;
  font-weight: 600;

  opacity: 0;
  transform: translateY(25px);
}

.overlay.show .overlay-card p {
  animation: messageFadeUp 1.4s ease-out 0.35s forwards;
}

@keyframes messageFadeUp {
  from {
    opacity: 0;
    transform: translateY(15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bouquet {
  width: 160px;
  height: auto;
  display: block;
  margin: 0 auto 16px;

  border-radius: 8px;

  animation: photoFloat 2.5s ease-in-out infinite;
}

@keyframes photoFloat {
  0%, 100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

.close-popup {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--red-mid);
  cursor: pointer;
  font-size: 22px;
  line-height: 34px;
}

.confetti-piece {
  position: fixed;
  top: -20px;
  z-index: 10001;
  pointer-events: none;
  will-change: transform;
  animation-name: confetti-fall;
  animation-timing-function: ease-out(.4, 0, .6, 1);
  animation-fill-mode: forwards;
}

.flower-shot {
  position: fixed;
  bottom: 18px;
  z-index: 100000;
  pointer-events: none;
  font-size: 22px;
  line-height: 1;
  animation-duration: 1.8s;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
}

.flower-shot.left {
  left: 20px;
  animation-name: flower-shot-left;
}

.flower-shot.right {
  right: 20px;
  animation-name: flower-shot-right;
}

/* =========================================================
   FLOWER SHOOT
========================================================= */

.flower-shot {
  position: fixed;
  top: 50%;
  z-index: 10000;
  pointer-events: none;

  font-size: 28px;
  line-height: 1;

  opacity: 0;

  will-change: transform, opacity;
}

/* LEFT SIDE */

.flower-shot.left {
  left: -40px;

  animation-name: shootFlowerLeft;
  animation-duration: 2.6s;
  animation-timing-function: cubic-bezier(0.15, 0.75, 0.35, 1);
  animation-fill-mode: forwards;
}


/* RIGHT SIDE */

.flower-shot.right {
  right: -40px;

  animation-name: shootFlowerRight;
  animation-duration: 2.6s;
  animation-timing-function: cubic-bezier(0.15, 0.75, 0.35, 1);
  animation-fill-mode: forwards;
}


/* LEFT ANIMATION */

@keyframes shootFlowerLeft {

  0% {
    opacity: 0;
    transform:
      translate(0, 0)
      scale(0.2)
      rotate(0deg);
  }

  10% {
    opacity: 1;
  }

  70% {
    opacity: 1;
  }

  100% {
    opacity: 0;

    transform:
      translate(
        calc(50vw + 80px),
        var(--y)
      )
      scale(1.15)
      rotate(540deg);
  }
}


/* RIGHT ANIMATION */

@keyframes shootFlowerRight {

  0% {
    opacity: 0;
    transform:
      translate(0, 0)
      scale(0.2)
      rotate(0deg);
  }

  10% {
    opacity: 1;
  }

  70% {
    opacity: 1;
  }

  100% {
    opacity: 0;

    transform:
      translate(
        calc(-50vw - 80px),
        var(--y)
      )
      scale(1.15)
      rotate(-540deg);
  }
}
.family-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 14px;
  overflow: hidden;
  background: rgba(40, 10, 2, 0.88);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9999;
}

.family-overlay.show {
  display: flex;
}

/* =========================================
   FAMILY PAGE FALLING HEARTS
========================================= */

.family-heart {
  position: fixed;
  top: -40px;
  z-index: 10000;
  pointer-events: none;

  font-size: 22px;
  line-height: 1;

  text-shadow:
    0 0 5px #fff0a8,
    0 0 10px rgba(255, 60, 80, 0.8);

  animation-name: familyHeartFall;
  animation-timing-function: linear;
  animation-fill-mode: forwards;

  will-change: transform, opacity;
}

@keyframes familyHeartFall {

  0% {
    opacity: 0;
    transform:
      translateY(-30px)
      translateX(0)
      rotate(-20deg)
      scale(0.6);
  }

  10% {
    opacity: 1;
  }

  50% {
    transform:
      translateY(50vh)
      translateX(35px)
      rotate(180deg)
      scale(1);
  }

  100% {
    opacity: 0;
    transform:
      translateY(110vh)
      translateX(-35px)
      rotate(360deg)
      scale(0.8);
  }
}

.family-modal {
  position: relative;
  width: min(1120px, 92vw);
  height: min(900px, 94vh);
  max-height: 94vh;
  padding: 0;
  overflow: hidden;
  box-sizing: border-box;
  background-image: url("images/family-background.png");
  background-size: 100% 100%;
  background-position: center center;
  background-repeat: no-repeat;
  border: none;
  border-radius: 24px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.55);
}

.family-modal::before,
.family-modal::after {
  display: none;
}

.family-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 99999;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 2px solid #f4d88f;
  border-radius: 50%;
  background: #6b2c10;
  color: #ffe6a7;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 5px 15px rgba(50, 10, 0, 0.45);
}

.family-close:hover {
  transform: scale(1.05);
  background: #7f3513;
}

.family-title-plaque,
.family-bottom,
.family-grid::before,
.family-grid::after,
.family-medallion,
.family-card::before,
.family-card::after {
  display: none !important;
}

.family-grid {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 22px;
  padding: 145px 65px 105px;
  box-sizing: border-box;
  margin: 0;
  z-index: 5;
}

.family-card {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 0;
  padding: 18px;
  box-sizing: border-box;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(93, 43, 15, 0.97), rgba(77, 32, 10, 0.97));
  border: 3px solid #dcb765;
  border-radius: 48% 48% 8px 8px / 35% 35% 8px 8px;
  box-shadow:
    0 8px 20px rgba(60, 20, 0, 0.40),
    inset 0 0 20px rgba(0, 0, 0, 0.20);
}

.family-card-content {
  position: relative;
  z-index: 5;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 16px;
  box-sizing: border-box;
  flex-direction: row !important;
}

.family-card-content.photo-left {
  flex-direction: row-reverse !important;
}

.family-details {
  flex: 1 1 48%;
  width: auto;
  min-width: 0;
  text-align: center;
  align-self: center;
}

.family-label {
  margin-bottom: 3px;
  color: #f5dba0;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 800;
  text-align: center;
}

.family-details h3 {
  margin: 3px 0 8px;
  color: #f7dfa5;
  font-family: var(--display);
  font-size: 23px;
  line-height: 1.25;
  font-weight: 900;
  text-align: center;
}

.small-ornament {
  margin-bottom: 5px;
  color: #e6c47d;
  font-size: 12px;
}

.family-details p {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 8px;
  width: 100%;
  max-width: 290px;
  margin: 0 auto;
  padding: 4px 0;
  border-bottom: 1px dashed rgba(235, 204, 135, 0.28);
  color: #f3dfb2;
  font-size: 12px;
  line-height: 1.4;
  text-align: left;
}

.family-details strong {
  color: #f2d18a;
}

.family-photo-frame {
  position: relative;
  flex: 0 0 52%;
  width: 52%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: none;
  padding: 0;
  margin: 0;
  overflow: hidden;
  box-sizing: border-box;
  background: #54250d;
  border: 3px solid #e4c16c;
  border-radius: 48% 48% 0 0 / 35% 35% 0 0;
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.35);
}

.family-photo-frame img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  padding: 0;
  margin: 0;
  object-fit: cover;
  object-position: center center;
  border: none;
  box-sizing: border-box;
  border-radius: 48% 48% 0 0 / 35% 35% 0 0;
}

.family-photo-frame::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(255, 232, 169, 0.85);
  border-radius: 46% 46% 0 0 / 32% 32% 0 0;
  pointer-events: none;
  z-index: 2;
}

.family-card:has(.family-photo-frame):not(:has(.family-details .family-label, .family-details h3, .family-details p)) .family-card-content,
.family-card-content:has(.family-photo-frame):not(:has(.family-details .family-label, .family-details h3, .family-details p)) {
  display: block !important;
}

.family-card:has(.family-photo-frame):not(:has(.family-details .family-label, .family-details h3, .family-details p)) .family-details,
.family-card-content:has(.family-photo-frame):not(:has(.family-details .family-label, .family-details h3, .family-details p)) .family-details {
  display: none !important;
}

.family-card:has(.family-photo-frame):not(:has(.family-details .family-label, .family-details h3, .family-details p)) .family-photo-frame,
.family-card-content:has(.family-photo-frame):not(:has(.family-details .family-label, .family-details h3, .family-details p)) .family-photo-frame {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  flex: none !important;
}

@media (min-width: 801px) {
  .family-card:has(.family-photo-frame):not(:has(.family-details .family-label, .family-details h3, .family-details p)) .family-card-content,
  .family-card-content:has(.family-photo-frame):not(:has(.family-details .family-label, .family-details h3, .family-details p)) {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .family-card:has(.family-photo-frame):not(:has(.family-details .family-label, .family-details h3, .family-details p)) .family-photo-frame,
  .family-card-content:has(.family-photo-frame):not(:has(.family-details .family-label, .family-details h3, .family-details p)) .family-photo-frame {
    width: min(84%, 430px) !important;
    height: 100% !important;
    flex: 0 0 min(84%, 430px) !important;
  }

  .family-card:has(.family-photo-frame):not(:has(.family-details .family-label, .family-details h3, .family-details p)) .family-photo-frame img,
  .family-card-content:has(.family-photo-frame):not(:has(.family-details .family-label, .family-details h3, .family-details p)) .family-photo-frame img {
    object-fit: cover !important;
    object-position: center 28% !important;
  }
}

@keyframes fall {
  0% {
    transform: translateY(-5vh) translateX(0) rotate(0deg);
  }

  50% {
    transform: translateY(52vh) translateX(30px) rotate(180deg);
  }

  100% {
    transform: translateY(110vh) translateX(-20px) rotate(360deg);
  }
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes slowSpin {
  from {
    transform: translateX(-50%) rotate(0deg);
  }

  to {
    transform: translateX(-50%) rotate(360deg);
  }
}

@keyframes confetti-fall {
  to {
    transform: translateY(110vh) rotate(720deg);
    opacity: 0.2;
  }
}

@media (max-width: 800px) {
  /* MARK: Mobile family popup row height fixed here */
  .family-overlay {
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow: auto;
  }

  .family-modal {
    width: 96vw;
    height: 10vh;
    max-height: 10vh;
    border-radius: 14px;
  }

  .family-grid {
    width: 100%;
    height: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: 1fr 1fr;
    gap: 16px;
    padding: 13% 5% 9%;
  }

  .family-card {
    height: 100%;
    padding: 5px;
    border-width: 2px;
  }

  .family-card-content,
  .family-card-content.photo-left,
  .family-card-content.photo-right {
    flex-direction: row !important;
    align-items: stretch !important;
    gap: 5px;
  }

  .family-details {
    flex: 1 1 50%;
    min-width: 0;
    overflow: hidden;
  }

  .family-photo-frame {
    flex: 0 0 50%;
    width: 50%;
    height: 100%;
    min-height: 0;
    min-width: 0;
    max-width: none;
    border-width: 2px;
    border-radius: 48% 48% 4px 4px / 30% 30% 4px 4px;
  }

  .family-photo-frame::before {
    display: none !important;
  }

  .family-photo-frame img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center top !important;
    background: #5b260d;
  }

  .family-card:has(.family-photo-frame):not(:has(.family-details .family-label, .family-details h3, .family-details p)) .family-photo-frame,
  .family-card-content:has(.family-photo-frame):not(:has(.family-details .family-label, .family-details h3, .family-details p)) .family-photo-frame {
    width: 100% !important;
    height: 100% !important;
    flex-basis: auto !important;
  }

  .family-details h3 {
    font-size: 12px;
    line-height: 1.15;
    margin: 2px 0 5px;
  }

  .family-label {
    font-size: 12px;
    line-height: 1.1;
  }

  .small-ornament {
    font-size: 8px;
    margin-bottom: 3px;
  }


@media (max-width: 800px) {
  .family-details p {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 4px;
    max-width: 100%;
    padding: 3px 0;
    font-size: 11px;
    line-height: 1.15;
    white-space: nowrap;
  }
}




  .family-close {
    width: 10px;
    height: 10px;
    top: 8px;
    right: 8px;
    font-size: 24px;
  }
}

@media (max-width: 520px) {
  /* MARK: Mobile bottom space slightly increased here */
  body {
    align-items: flex-start;
    padding: 10px 14px 8px;
    overflow-y: auto;
  }

  .card {
    padding: 22px 20px 12px;
    border-radius: 10px;
    margin-bottom: 0;
  }

  .alpana {
    width: 76px;
  }

  .eyebrow {
   font-size: 14px;
    letter-spacing: 1px;
    font-weight: 900;
  }
  .eyebrow1 {
   font-size: 5px;
    letter-spacing: 1px;
    font-weight: 900;
  }

  .script-title {
    font-size: clamp(42px, 14vw, 58px);
    line-height: 0.95;
    margin-bottom: 6px;
  }

  .couple-photos {
    margin: 6px 0 6px;
  }

  .photo-frame {
    width: 74px;
    height: 74px;
    border-width: 2px;
  }

  .photo-frame.groom {
    margin-right: -14px;
  }

  .photo-frame.bride {
    margin-left: -14px;
  }

  .photo-heart {
    width: 24px;
    height: 24px;
    font-size: 13px;
  }

  .names {
    margin: 2px 0 8px;
    font-size: clamp(28px, 9vw, 42px);
    line-height: 1;
  }

  .name-intro-btn,
  button.name-intro-btn,
  .btn.name-intro-btn,
  .btn.btn-intro.name-intro-btn {
    padding: 7px 16px !important;
    font-size: 13px !important;
    margin: -6px auto 10px !important;
  }

  .details,
  .event-details {
    max-width: 100%;
    margin-bottom: 8px;
    font-size: 13.5px;
    line-height: 1.35;
  }

  .details p {
    margin-bottom: 3px;
  }

  .event-item {
    gap: 8px;
    margin-bottom: 6px;
  }

  .location-item {
  grid-template-columns: 32px 1fr;
  gap: 6px 8px;
}

.direction-row {
  grid-template-columns: 32px auto auto;
  gap: 8px;
}

/* .location-map-btn {
  margin-left: 0;
  min-width: 92px;
} */
  .event-item p,
  .location-item > p,
  .direction-text {
    font-size: 14px;
    line-height: 1.35;
  }

  .event-item p strong,
  .location-item strong,
  .direction-text strong {
    font-size: 14px;
  }
  .location-map-btn {
    margin-left: auto;
    min-width: 92px;
    padding: 5px 7px;
    font-size: 11px;
  }

  .divider {
    width: min(230px, 64%);
    margin: 8px auto;
  }

  .countdown {
    gap: 6px;
    margin-bottom: 10px;
  }

  .countdown div {
    padding: 6px 4px 5px;
  }

  .countdown strong {
    font-size: clamp(20px, 7vw, 30px);
  }

  .countdown span {
    margin-top: 2px;
    font-size: 10px;
  }

  .question {
    margin-bottom: 10px;
    font-size: clamp(22px, 7vw, 32px);
    line-height: 1.15;
  }

  .arena {
    min-height: 48px;
    gap: 8px;
    margin-bottom: 0;
  }

  .btn {
    padding: 12px 18px;
    font-size: 13.5px;
    line-height: 1;
  }

  .no-caption {
    display: none;
    height: 0;
    margin: 0;
  }

  .overlay-card {
  width: min(94vw, 480px);
  padding: 38px 24px 32px;
}

.bouquet {
  width: 135px;
  margin-bottom: 14px;
}

.overlay-card .script-title {
  font-size: clamp(44px, 12vw, 58px);
}

.overlay-card p {
  font-size: 18px;
  line-height: 1.65;
}

  .family-overlay {
    padding: 0;
  }

  .family-modal {
    /* width: 96vw; */
    height: 50vh;
    max-height: 50vh;
    /* border-radius: 16px; */
  }

  .family-grid {
    grid-template-rows: 1.fr 1.fr;
    gap: 3px;
    padding: 13% 4.5% 8%;
  }

  .family-card {
    padding: 5px;
  }

  .family-photo-frame {
    height: 100%;
    min-height: 0;
    flex-basis: 50%;
    width: 50%;
  }
}

@media (max-width: 360px) {
  .photo-frame {
    width: 62px;
    height: 62px;
  }

  .btn {
    padding: 11px 15px;
    font-size: 13px;
  }

  .family-grid {
    gap: 6px;
    padding: 12% 4% 8%;
  }

  .family-card {
    padding: 5px;
  }

  .family-card-content,
  .family-card-content.photo-left {
    gap: 4px;
  }

  .family-details h3 {
    font-size: 11px;
  }

  .family-label {
    font-size: 10px;
  }

  .family-details p {
    grid-template-columns: 21px minmax(0, 1fr);
    font-size: 6.2px;
  }

  .family-photo-frame {
    height: 100%;
    min-height: 0;
    border-width: 1.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .petal,
  .card,
  .mandala-bg,
  .confetti-piece {
    animation: none;
  }

  .btn-no.roaming {
    transition: none;
  }
/* =========================================================
   FIX: FAMILY MODAL MUST STAY HIDDEN ON MAIN SCREEN
   ========================================================= */

.family-modal {
  display: none !important;
}

/* Only show Family modal when Family overlay is opened */
.family-overlay.show .family-modal {
  display: block !important;
}

}
