/* ==========================================================================
   Wedding Invitation — Cinematic 3D Velvet Opening + Bold Mobile Editorial
   ========================================================================== */

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

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  background-color: var(--color-canvas-outer);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

/* Outer stage */
.stage {
  position: relative;
  width: 100%;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.6), transparent 52%),
    radial-gradient(circle at 82% 88%, rgba(182, 147, 90, 0.16), transparent 50%),
    radial-gradient(circle at 12% 82%, rgba(107, 29, 47, 0.06), transparent 45%),
    var(--color-canvas-outer);
}

/* The 9:16 Card Shell */
.card-shell {
  position: relative;
  width: 100%;
  height: 100dvh;
  background: var(--grad-paper);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

@media (min-width: 520px) {
  .card-shell {
    width: min(430px, 92vw);
    height: min(860px, 92dvh);
    aspect-ratio: 9 / 16;
    border-radius: 18px;
    border: 1px solid rgba(182, 147, 90, 0.25);
    box-shadow:
      0 28px 64px -18px rgba(36, 30, 28, 0.22),
      0 6px 20px -4px rgba(107, 29, 47, 0.08);
  }
}

/* ==========================================================================
   Atmosphere: Paper Grain, Sunlight Gobo, Soft Bokeh & Dust Motes
   ========================================================================== */
.paper-atmosphere {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.paper-grain {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.paper-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 42% at 50% 0%, rgba(222, 200, 158, 0.22), transparent 72%),
    radial-gradient(ellipse 85% 48% at 25% 88%, rgba(182, 147, 90, 0.14), transparent 72%),
    radial-gradient(ellipse 65% 38% at 85% 95%, rgba(107, 29, 47, 0.06), transparent 70%);
}

.sunlight-gobo {
  position: absolute;
  inset: -20%;
  background:
    linear-gradient(
      128deg,
      rgba(255, 255, 255, 0.44) 0%,
      rgba(255, 255, 255, 0.44) 14%,
      rgba(36, 30, 28, 0.028) 15%,
      rgba(36, 30, 28, 0.028) 27%,
      rgba(255, 255, 255, 0.34) 28%,
      rgba(255, 255, 255, 0.34) 42%,
      rgba(36, 30, 28, 0.024) 43%,
      rgba(36, 30, 28, 0.024) 58%,
      rgba(255, 255, 255, 0.24) 59%,
      transparent 78%
    );
  filter: blur(18px);
  opacity: 0.82;
  will-change: transform, opacity;
}

.bokeh-layer {
  position: absolute;
  inset: 0;
}

.bokeh {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.72) 0%, rgba(222, 200, 158, 0.18) 55%, transparent 72%);
  filter: blur(2px);
}

.bokeh--1 { width: 96px; height: 96px; top: 18%; left: 10%; opacity: 0.45; }
.bokeh--2 { width: 64px; height: 64px; top: 34%; right: 8%; opacity: 0.4; }
.bokeh--3 { width: 120px; height: 120px; bottom: 26%; left: 6%; opacity: 0.5; }
.bokeh--4 { width: 52px; height: 52px; bottom: 18%; right: 28%; opacity: 0.35; }

.ambient-motes {
  position: absolute;
  inset: 0;
  z-index: 4;
}

.mote {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(182, 138, 66, 0.96) 0%, rgba(182, 147, 90, 0.6) 48%, rgba(182, 147, 90, 0) 80%);
  box-shadow: 0 0 8px rgba(182, 147, 90, 0.5);
  opacity: 0;
  will-change: transform, opacity;
}

/* Delicate 4-point antique-gold star sparkles in corners & edges */
.mote--star {
  border-radius: 0;
  background: radial-gradient(circle, #E5C17A 0%, #A97E3E 75%, rgba(169, 126, 62, 0) 100%);
  box-shadow: 0 0 6px rgba(182, 147, 90, 0.45);
  clip-path: polygon(50% 0%, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0% 50%, 40% 40%);
}

/* Top Botanical & Crystal Garland */
.top-garland {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  z-index: 4;
  pointer-events: none;
}

/* Symmetrical 4-sided Inner Hairline Frame */
.card-frame {
  position: absolute;
  inset: 14px;
  border: 1px solid var(--color-border-gold);
  border-radius: 10px;
  pointer-events: none;
  z-index: 3;
}

.card-frame::after {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(182, 147, 90, 0.18);
  border-radius: 7px;
}

.frame-corner {
  position: absolute;
  width: 10px;
  height: 10px;
  border: 1.5px solid var(--color-gold);
  opacity: 0.72;
}

.frame-corner--tr { top: -1px; right: -1px; border-bottom: none; border-left: none; border-top-right-radius: 10px; }
.frame-corner--tl { top: -1px; left: -1px; border-bottom: none; border-right: none; border-top-left-radius: 10px; }
.frame-corner--br { bottom: -1px; right: -1px; border-top: none; border-left: none; border-bottom-right-radius: 10px; }
.frame-corner--bl { bottom: -1px; left: -1px; border-top: none; border-right: none; border-bottom-left-radius: 10px; }

/* Subtle Mute/Unmute Sound Toggle */
.sound-toggle {
  position: absolute;
  top: 72px;
  left: 22px;
  z-index: 40;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(182, 147, 90, 0.45);
  background: rgba(253, 251, 247, 0.85);
  color: var(--color-burgundy);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: transform var(--duration-fast) var(--ease-out), background-color var(--duration-fast) var(--ease-out);
}

.sound-toggle:active {
  transform: scale(0.92);
}

.sound-toggle:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

.sound-icon {
  width: 15px;
  height: 15px;
}

.sound-icon--off {
  display: none;
}

.sound-toggle.is-muted .sound-icon--on {
  display: none;
}

.sound-toggle.is-muted .sound-icon--off {
  display: block;
}

/* ==========================================================================
   Physical 3-Layer Envelope Architecture
   Layer 1 (z:1): #env-back
   Layer 2 (z:5): #card-sheet (THE ONLY REAL PAPER SHEET)
   Layer 3 (z:15): #seal-cover (.env-pocket + .env-flap + wax seal)
   ========================================================================== */
.env-back {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, #320912 0%, #4A111E 45%, #3B0C17 100%);
  will-change: transform, opacity;
}

.card-sheet {
  position: relative;
  z-index: 5;
  width: 100%;
  height: 100%;
  background: var(--grad-paper);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.28);
  will-change: transform, opacity;
}

.seal-cover {
  position: absolute;
  inset: 0;
  z-index: 15;
  overflow: hidden;
}

.seal-cover.is-done {
  pointer-events: none;
  visibility: hidden;
}

/* Front velvet pocket */
.env-pocket {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 70%;
  filter: drop-shadow(0 -6px 16px rgba(0, 0, 0, 0.28));
  z-index: 16;
  will-change: transform, opacity;
}

.env-pocket__svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Top Hinged Flap (3D Fold Upward) */
.env-flap-scene {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 55%;
  z-index: 18;
  perspective: 1200px;
  perspective-origin: center top;
  pointer-events: none;
  will-change: transform, opacity;
}

.env-flap {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  transform-origin: center top;
  will-change: transform;
}

.env-flap__face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.env-flap__back {
  transform: rotateX(180deg);
}

.env-flap__svg {
  width: 100%;
  height: 100%;
  display: block;
}

.seal-cover__content {
  position: absolute;
  inset: 0;
  z-index: 20;
  padding: 64px 32px 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  will-change: transform, opacity;
}

.seal-cover__kicker {
  font-family: var(--font-editorial);
  font-size: 0.96rem;
  font-weight: 500;
  color: rgba(232, 213, 178, 0.92);
  margin-bottom: 8px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.seal-cover__names {
  font-family: var(--font-display-modern);
  font-size: 2.05rem;
  font-weight: 700;
  color: #FDFBF7;
  line-height: 1.4;
  margin-bottom: 52px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.32);
}

.wax-seal-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
}

.wax-seal-ring {
  position: absolute;
  width: 124px;
  height: 124px;
  border-radius: 50%;
  border: 1.5px solid rgba(232, 213, 178, 0.6);
  pointer-events: none;
  will-change: transform, opacity;
}

.seal-sparks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.spark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: radial-gradient(circle, #FFF8E8 0%, #DEC89E 60%, transparent 100%);
  opacity: 0;
  will-change: transform, opacity;
}

.wax-seal-btn {
  position: relative;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  border: none;
  background: var(--grad-gold);
  color: var(--color-burgundy-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.45),
    0 0 0 3px rgba(75, 17, 30, 0.55),
    inset 0 2px 5px rgba(255, 255, 255, 0.55),
    inset 0 -4px 8px rgba(105, 76, 30, 0.45);
  transition: transform var(--duration-fast) var(--ease-out);
  will-change: transform, opacity;
}

.wax-seal-btn::before {
  content: '';
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  border: 1px solid rgba(75, 17, 30, 0.38);
}

.wax-seal-btn:active {
  transform: scale(0.93);
}

.wax-seal-btn:focus-visible {
  outline: 2px solid var(--color-gold-light);
  outline-offset: 6px;
}

.wax-seal__monogram {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  direction: ltr;
  user-select: none;
}

.seal-cover__hint {
  margin-top: 26px;
  font-size: 0.88rem;
  font-weight: 500;
  color: rgba(232, 213, 178, 0.88);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

/* ==========================================================================
   Magazine Editorial Card Content
   ========================================================================== */
.card-content {
  position: relative;
  z-index: 6;
  flex: 1;
  height: 100%;
  padding: clamp(54px, 7.8dvh, 74px) 22px 14px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: hidden;
}

/* Upper Typography Zone */
.card-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(8px, 1.7dvh, 16px);
  flex-shrink: 0;
}

/* Quranic Verse Calligraphy Slot */
.ayah-slot {
  width: 100%;
  max-width: 296px;
  margin: 0 auto 2px;
  padding-bottom: clamp(8px, 1.4dvh, 14px);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.ayah-divider {
  position: absolute;
  bottom: 0;
  left: 18%;
  right: 18%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(182, 147, 90, 0.5) 50%, transparent 100%);
  transform-origin: center center;
}

.ayah-calligraphy-img {
  max-width: 100%;
  max-height: clamp(102px, 16.8dvh, 150px);
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Modern Editorial Invitation Copy */
.invite-subtitle {
  font-family: var(--font-editorial);
  font-size: clamp(0.98rem, 3.8vw, 1.12rem);
  font-weight: 600;
  color: var(--color-ink);
  letter-spacing: 0.01em;
}

.occasion-title {
  font-family: var(--font-editorial);
  font-size: clamp(0.86rem, 3.2vw, 0.98rem);
  font-weight: 600;
  color: var(--color-burgundy);
  margin-top: -4px;
}

.couple-lockup {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: center;
  gap: clamp(12px, 3.6vw, 18px);
  margin: 4px 0 2px;
}

.couple-name {
  font-family: var(--font-display-modern);
  font-size: clamp(2.2rem, 8.6vw, 2.95rem);
  font-weight: 700;
  line-height: 1.22;
  white-space: nowrap;
  background: linear-gradient(135deg, #4B111E 0%, #6B1D2F 45%, #B6935A 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.couple-amp {
  font-family: var(--font-display-modern);
  font-size: clamp(1.6rem, 5vw, 1.95rem);
  font-weight: 700;
  color: var(--color-gold-dark);
  line-height: 1;
}

/* ==========================================================================
   Lower Asymmetrical Stage: High-Contrast Details (Right) + Hero Couple (Left)
   ========================================================================== */
.lower-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  margin-top: 6px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-bottom: 6px;
}

.details-column {
  position: relative;
  z-index: 7;
  width: clamp(144px, 43.5%, 182px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: right;
  gap: clamp(11px, 1.7dvh, 16px);
  padding: 6px 12px 6px 2px;
  border-right: 1.5px solid rgba(182, 147, 90, 0.48);
}

.detail-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
}

.detail-heading {
  display: flex;
  align-items: center;
  gap: 6px;
}

.detail-icon {
  width: 17px;
  height: 17px;
  color: var(--color-burgundy);
  flex-shrink: 0;
}

.detail-label {
  font-size: clamp(0.8rem, 2.4vw, 0.92rem);
  font-weight: 600;
  color: var(--color-ink-secondary);
}

.detail-value {
  font-size: clamp(1.02rem, 3.15vw, 1.2rem);
  font-weight: 700;
  color: var(--color-ink);
  line-height: 1.3;
}

.detail-sub {
  font-size: clamp(0.8rem, 2.4vw, 0.92rem);
  font-weight: 600;
  color: var(--color-burgundy);
}

.detail-divider {
  width: 88%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(182, 147, 90, 0.45) 100%);
}

/* Full-Width Bottom Action Dock — Balanced Touch Targets (42–45px+) */
.card-actions {
  position: relative;
  z-index: 12;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 100%;
  margin-top: 2px;
  margin-bottom: calc(4px + env(safe-area-inset-bottom, 0px));
  padding: 8px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(253, 251, 247, 0.78) 0%, rgba(247, 243, 236, 0.94) 100%);
  border: 1px solid rgba(182, 147, 90, 0.36);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px -10px rgba(36, 30, 28, 0.16);
}

.card-actions__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  width: 100%;
}

.card-actions__row .btn {
  min-width: 0;
  min-height: clamp(39px, 5dvh, 43px);
  padding: 7px 6px;
  font-size: clamp(0.8rem, 2.35vw, 0.88rem);
  gap: 6px;
}

.card-actions__row--top .btn {
  min-height: clamp(40px, 5.2dvh, 45px);
  font-size: clamp(0.83rem, 2.45vw, 0.92rem);
}

.card-actions__row .btn svg {
  width: 15px;
  height: 15px;
}

/* Reserved Custom App-Chooser Share Sheet (saved for later use)
.share-sheet-backdrop {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(36, 30, 28, 0.42);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms var(--ease-out);
}

.share-sheet-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.share-sheet {
  width: 100%;
  background: var(--grad-paper);
  border-top: 1px solid rgba(182, 147, 90, 0.45);
  border-radius: 20px 20px 0 0;
  padding: 16px 18px calc(20px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -12px 32px rgba(36, 30, 28, 0.22);
  transform: translateY(24px);
  transition: transform 240ms var(--ease-out);
}

.share-sheet-backdrop.is-open .share-sheet {
  transform: translateY(0);
}

.share-sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.share-sheet__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-burgundy-dark);
}

.share-sheet__close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(182, 147, 90, 0.4);
  background: #FDFBF7;
  color: var(--color-ink);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.share-sheet__preview {
  font-size: 0.78rem;
  color: var(--color-ink-secondary);
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(182, 147, 90, 0.28);
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 12px;
  line-height: 1.5;
  white-space: pre-line;
  max-height: 82px;
  overflow: hidden;
}

.share-sheet__apps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.share-app-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 64px;
  padding: 8px 4px;
  border-radius: 12px;
  border: 1px solid rgba(182, 147, 90, 0.4);
  background: #FDFBF7;
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.share-app-btn__icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(182, 147, 90, 0.14);
  color: var(--color-burgundy);
}

.share-app-btn__icon svg {
  width: 18px;
  height: 18px;
}

.share-app-btn--wa .share-app-btn__icon {
  background: rgba(37, 211, 102, 0.14);
  color: #168542;
}

.share-app-btn--tg .share-app-btn__icon {
  background: rgba(34, 158, 217, 0.14);
  color: #137BB0;
}
*/

/* Subtle Share Confirmation Toast */
.share-toast {
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  z-index: 60;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--color-burgundy);
  color: #FDFBF7;
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 8px 20px -4px rgba(36, 30, 28, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out);
}

.share-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-height: clamp(40px, 5.2dvh, 45px);
  padding: 8px 12px;
  border-radius: 11px;
  font-family: var(--font-sans);
  font-size: clamp(0.84rem, 2.5vw, 0.94rem);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition:
    transform var(--duration-fast) var(--ease-out),
    background-color var(--duration-fast) var(--ease-out);
}

.btn:active {
  transform: scale(0.97);
}

.btn:focus-visible {
  outline: 2px solid var(--color-burgundy);
  outline-offset: 2px;
}

.btn--primary {
  background: var(--grad-burgundy);
  color: #FFFFFF;
  box-shadow:
    0 5px 14px -4px rgba(107, 29, 47, 0.45),
    inset 0 1px 0 rgba(232, 213, 178, 0.28);
}

.btn--secondary {
  background: rgba(255, 255, 255, 0.88);
  color: var(--color-burgundy-dark);
  border-color: rgba(182, 147, 90, 0.48);
}

.btn--secondary:hover {
  background: #FFFFFF;
}

.btn--gold {
  background: linear-gradient(135deg, rgba(222, 200, 158, 0.36) 0%, rgba(253, 251, 247, 0.95) 100%);
  color: var(--color-burgundy-dark);
  border-color: rgba(182, 147, 90, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.btn--gold:hover {
  background: linear-gradient(135deg, rgba(222, 200, 158, 0.48) 0%, #FFFFFF 100%);
}

.btn svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

/* Hero-Scale Integrated Couple — fills lower stage beside borderless info & fades cleanly into bottom dock */
.couple-hero {
  position: absolute;
  bottom: -14px;
  left: clamp(-24px, -5.5vw, -16px);
  height: min(106%, 465px);
  width: 64%;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  pointer-events: none;
  z-index: 9;
  will-change: transform, opacity;
}

.couple-arch-backdrop {
  position: absolute;
  bottom: -10px;
  left: -10px;
  width: 215px;
  height: 98%;
  border-radius: 50% 50% 0 0;
  background: radial-gradient(ellipse at 45% 58%, rgba(222, 200, 158, 0.24) 0%, rgba(253, 251, 247, 0.36) 45%, transparent 74%);
  filter: blur(10px);
}

.couple-halo {
  position: absolute;
  bottom: 45px;
  left: 14px;
  width: 195px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.72) 0%, rgba(222, 200, 158, 0.18) 55%, transparent 74%);
  filter: blur(12px);
}

.couple-media-wrap {
  position: relative;
  z-index: 2;
  width: 100%;
  max-height: 100%;
  max-width: 100%;
  aspect-ratio: 720 / 938;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
}

.couple-media-wrap .couple-illustration {
  width: 100%;
  height: 100%;
}

.couple-illustration {
  position: relative;
  z-index: 2;
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: left bottom;
  transition: opacity 280ms ease;
  filter: drop-shadow(0 4px 14px rgba(36, 30, 28, 0.09));
  -webkit-mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 80%,
    rgba(0, 0, 0, 0.72) 87%,
    rgba(0, 0, 0, 0.32) 93%,
    rgba(0, 0, 0, 0.06) 97%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 80%,
    rgba(0, 0, 0, 0.72) 87%,
    rgba(0, 0, 0, 0.32) 93%,
    rgba(0, 0, 0, 0.06) 97%,
    transparent 100%
  );
}

.couple-illustration.is-hidden {
  opacity: 0;
}

.couple-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  opacity: 0;
  pointer-events: none;
}

.couple-canvas.is-active {
  opacity: 1;
}

/* ==========================================================================
   Static / Image-Ready Card Mode (card.html — No Action Buttons)
   ========================================================================== */
.lower-stage--static {
  align-items: flex-end;
  padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
}

.lower-stage--static .couple-hero {
  bottom: -6px;
  height: min(100%, 465px);
}

.static-right-stack {
  position: relative;
  z-index: 7;
  width: clamp(144px, 44%, 182px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(14px, 2dvh, 22px);
}

.details-column--static {
  width: 100%;
  padding: 6px 12px 6px 2px;
  gap: clamp(11px, 1.8dvh, 16px);
}

.details-column--static .detail-icon {
  width: 17px;
  height: 17px;
}

.details-column--static .detail-label {
  font-size: clamp(0.8rem, 2.4vw, 0.92rem);
}

.details-column--static .detail-value {
  font-size: clamp(1.02rem, 3.15vw, 1.18rem);
}

.details-column--static .detail-sub {
  font-size: clamp(0.8rem, 2.4vw, 0.92rem);
}

.static-seal-emblem {
  position: relative;
  width: clamp(50px, 7.6dvh, 68px);
  height: clamp(50px, 7.6dvh, 68px);
  border-radius: 50%;
  background: var(--grad-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 8px 20px -4px rgba(105, 76, 30, 0.42),
    inset 0 2px 4px rgba(255, 255, 255, 0.52),
    inset 0 -3px 6px rgba(105, 76, 30, 0.38);
}

.static-seal-emblem::before {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  border: 1px solid rgba(75, 17, 30, 0.35);
}

.static-seal-emblem__text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(0.84rem, 2.2dvh, 1.15rem);
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  letter-spacing: 0.04em;
  direction: ltr;
  color: var(--color-burgundy-dark);
}

/* Full-Bleed High-Res Export Mode (?full=1 on 540x960 / 1080x1920) */
body.export-full {
  padding: 0;
}

body.export-full .card-shell {
  width: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  aspect-ratio: auto;
  border-radius: 0;
  border: none;
  box-shadow: none;
}

body.export-full .corner-ornament {
  width: 112px;
  height: 82px;
}

body.export-full .card-content {
  padding: 66px 32px 24px;
}

body.export-full .card-header {
  gap: 14px;
}

body.export-full .ayah-slot {
  max-width: 410px;
  padding-bottom: 18px;
}

body.export-full .ayah-calligraphy-img {
  max-height: 196px;
}

body.export-full .invite-subtitle {
  font-size: 1.54rem;
}

body.export-full .occasion-title {
  font-size: 1.32rem;
  margin-top: -2px;
}

body.export-full .couple-lockup {
  gap: 18px;
  margin-top: 4px;
}

body.export-full .couple-name {
  font-size: 3.7rem;
}

body.export-full .couple-amp {
  font-size: 2.1rem;
}

body.export-full .lower-stage--static {
  align-items: flex-end;
  padding-bottom: 24px;
}

body.export-full .couple-hero {
  width: 66%;
  height: min(100%, 545px);
  left: -26px;
  bottom: -10px;
}

body.export-full .static-right-stack {
  width: 45%;
  max-width: 234px;
  gap: 18px;
  margin-bottom: 10px;
}

body.export-full .details-column--static {
  padding: 8px 16px 8px 4px;
  gap: 16px;
  border-right-width: 2px;
}

body.export-full .details-column--static .detail-icon {
  width: 21px;
  height: 21px;
}

body.export-full .details-column--static .detail-label {
  font-size: 1.12rem;
}

body.export-full .details-column--static .detail-value {
  font-size: 1.42rem;
}

body.export-full .details-column--static .detail-sub {
  font-size: 1.12rem;
}

body.export-full .static-seal-emblem {
  width: 78px;
  height: 78px;
}

body.export-full .static-seal-emblem__text {
  font-size: 1.3rem;
}

/* Portrait (Waist-Up Close-Up) Variant Overrides */
body.portrait-mode .card-header {
  gap: clamp(10px, 2.1dvh, 19px);
  margin-top: clamp(4px, 1.2dvh, 12px);
}

body.portrait-mode .couple-hero {
  width: 68%;
  left: clamp(-18px, -4vw, -10px);
  bottom: -14px;
  height: min(108%, 490px);
}

body.portrait-mode .details-column:not(.details-column--static) {
  width: clamp(138px, 41.5%, 172px);
  padding: 6px 10px 6px 0;
}

body.portrait-mode .detail-label {
  font-size: clamp(0.78rem, 2.3vw, 0.9rem);
}

body.portrait-mode .detail-value {
  font-size: clamp(0.98rem, 3vw, 1.16rem);
  white-space: nowrap;
}

body.portrait-mode .detail-sub {
  font-size: clamp(0.75rem, 2.2vw, 0.86rem);
  white-space: nowrap;
}

body.portrait-mode .couple-illustration {
  -webkit-mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 90%,
    rgba(0, 0, 0, 0.72) 95%,
    rgba(0, 0, 0, 0.28) 98%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 90%,
    rgba(0, 0, 0, 0.72) 95%,
    rgba(0, 0, 0, 0.28) 98%,
    transparent 100%
  );
}

body.portrait-mode .lower-stage--static {
  align-items: center;
  padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
}

body.portrait-mode .lower-stage--static .couple-hero {
  width: 70%;
  left: clamp(-20px, -4.5vw, -12px);
  height: min(106%, 480px);
  bottom: -6px;
}

body.portrait-mode .lower-stage--static .couple-illustration {
  -webkit-mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 90%,
    rgba(0, 0, 0, 0.72) 95%,
    rgba(0, 0, 0, 0.28) 98%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 90%,
    rgba(0, 0, 0, 0.72) 95%,
    rgba(0, 0, 0, 0.28) 98%,
    transparent 100%
  );
}

body.portrait-mode .lower-stage--static .details-column--static {
  gap: clamp(14px, 2.4dvh, 22px);
}

body.portrait-mode.export-full .card-header {
  gap: 16px;
  margin-top: 6px;
}

body.portrait-mode.export-full .lower-stage--static {
  align-items: center;
  padding-bottom: 20px;
}

body.portrait-mode.export-full .couple-hero {
  width: 78%;
  height: min(108%, 560px);
  left: -56px;
  bottom: -10px;
}

body.portrait-mode.export-full .static-right-stack {
  width: 44.5%;
  max-width: 228px;
  margin-bottom: 6px;
}

body.portrait-mode.export-full .details-column--static {
  gap: 20px;
}

body.portrait-mode.export-full .details-column--static .detail-label {
  font-size: 1.14rem;
}

body.portrait-mode.export-full .details-column--static .detail-value {
  font-size: 1.4rem;
  white-space: nowrap;
}

body.portrait-mode.export-full .details-column--static .detail-sub {
  font-size: 1.04rem;
  white-space: nowrap;
}
