/* ==========================================================================
   CUSTOM TEMPLE TYPOGRAPHY: SACRIFICEDEMO & BALIVIA FONTS
   ========================================================================== */
/* The project ships exactly two typefaces; they are the only fonts the theme uses.
   Each file serves every weight so headings never get a synthetic "faux bold". */
@font-face {
  font-family: 'SacrificeDemo-Regular';
  /* The Latin letters of the face (43 KB); its 121 private-use ornaments, which no
     page uses, were 98% of the 2.1 MB original. The TTF stays as a fallback. */
  src: url('../font/SacrificeDemo-Regular.woff') format('woff'), url('../font/SacrificeDemo-Regular.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Balivia';
  src: url('../font/Balivia.woff') format('woff'), url('../font/Balivia.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Project fonts only (assets/font): Balivia for all text, SacrificeDemo for script accents */
  --font-balivia: 'Balivia', serif;
  --font-serif: var(--font-balivia);
  --font-sans: var(--font-balivia);
  --font-sacrifice: 'SacrificeDemo-Regular', cursive;
  
  /* Sacred Temple Colors */
  --sacred-gold: #EFBF04;
  --sacred-gold-light: #F5D968;
  --sacred-gold-dark: #B38F03;
  --sacred-bronze: #8c5d2b;
  --sacred-bg-dark: #0a0705;
  --sacred-border: rgba(239, 191, 4, 0.35);
  --sacred-border-soft: rgba(239, 191, 4, 0.18);
  --sacred-glow: rgba(239, 191, 4, 0.25);
  --sacred-diya-glow: rgba(255, 166, 43, 0.35);

  /* Text colour system — every text colour in the theme comes from here.
     Gold for headings/labels, warm white for the information guests read. */
  --text-gold-bright: #EFBF04;   /* headings, names, ceremony titles */
  --text-gold: #EFBF04;          /* eyebrows, labels, times, accents */
  --text-white: #fffaf0;         /* dates, venues, key details */
  --text-white-soft: #efe6d6;    /* descriptions, messages */
  --text-white-muted: #cdbfa8;   /* small meta text, placeholders */
}

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

html {
  /* single-style faces: show the real letterforms, never synthetic bold/italic */
  font-synthesis: none;
  background-color: var(--sacred-bg-dark);
  color: var(--text-white);
  font-family: var(--font-sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--sacred-bg-dark);
  overflow-x: hidden;
  width: 100%;
}

.font-serif { font-family: var(--font-serif); }
.font-sans { font-family: var(--font-sans); }

/* Pinned Master Stage */
.tirupati-stage {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 0; /* short landscape screens must fit too */
  overflow: hidden;
  background-color: #060403;
  user-select: none;
}

/* 3D Perspective Viewport */
.tirupati-viewport {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  perspective: 1200px;
  perspective-origin: 50% 50%;
  transform: translateZ(0);
}

/* Virtual Camera Rig (Controls forward zoom journey) */
.camera-rig {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform-origin: 50% 54%;
  will-change: transform;
  transform: translateZ(0);
}

/* Sanctum Background Layers (Full-bleed underneath, fixed image size, no zoom) */
.sanctum-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform-origin: 50% 50%;
  will-change: opacity;
  transform: translateZ(0);
}

.sanctum-layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

/* ==========================================================================
   DIVINE DARSHAN STAGE: GODDESS LAKSHMI & LORD VENKATESHA
   Revealed after Door 1 opens with authentic divine holding hands presence
   ========================================================================== */
.layer-divine-darshan {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform-origin: 50% 50%;
  will-change: opacity;
  transform: translateZ(0);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  pointer-events: none;
  z-index: 5;
}

.darshan-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  filter: brightness(0.72) contrast(1.08);
  transform: translateZ(0);
}

.darshan-vignette {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at 50% 50%, rgba(20, 14, 8, 0.1) 0%, rgba(10, 6, 3, 0.45) 65%, rgba(4, 2, 1, 0.85) 100%);
  pointer-events: none;
}

.darshan-light-spotlight {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse 65% 55% at 50% 45%, rgba(255, 218, 130, 0.32) 0%, rgba(239, 191, 4, 0.12) 45%, transparent 75%);
  pointer-events: none;
  mix-blend-mode: screen;
}

/* Deities Ensemble: Goddess Lakshmi & Lord Venkatesha Holding Hands */
.divine-scene-content {
  position: relative;
  width: 100%;
  max-width: 1440px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 8;
  padding: clamp(8px, 1.5vh, 20px) 1rem;
}

.divine-couple-container {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  position: relative;
  height: clamp(400px, 78vh, 760px);
  margin-top: 0;
  will-change: transform;
}

.divine-figure-box {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  will-change: transform, opacity;
  opacity: 0;
}

.divine-lakshmi-box {
  height: 86.2%; /* Proportional: 2119px vs 2461px */
  margin-right: -3.6vw; /* Brings their hands together in the center */
  z-index: 4;
  will-change: transform, opacity;
}

.divine-venkatesha-box {
  height: 100%;
  margin-left: 0;
  z-index: 3;
  will-change: transform, opacity;
}

.divine-figure-img {
  height: 100%;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 30px rgba(255, 215, 120, 0.45)) drop-shadow(0 15px 35px rgba(0, 0, 0, 0.85));
  user-select: none;
  pointer-events: none;
}

/* Script Typography: "Goddess Lakshmi" & "Lord Venkatesha" */
.divine-name-badge {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 14;
  pointer-events: none;
  will-change: transform, opacity;
  opacity: 0;
}

.divine-name-lakshmi {
  left: clamp(1.5rem, 6vw, 10vw);
  text-align: center;
}

.divine-name-venkatesha {
  right: clamp(1.5rem, 6vw, 10vw);
  text-align: center;
}

.divine-script-prefix {
  font-family: var(--font-sacrifice);
  font-size: clamp(1.8rem, 3.2vw, 3.2rem);
  line-height: 1.1;
  color: var(--text-white);
  letter-spacing: 0.04em;
  text-shadow: 0 0 20px rgba(255, 215, 120, 0.85), 0 2px 10px rgba(0, 0, 0, 0.95);
}

.divine-script-main {
  font-family: var(--font-sacrifice);
  font-size: clamp(2.5rem, 4.6vw, 4.6rem);
  line-height: 1.1;
  color: var(--text-gold-bright);
  letter-spacing: 0.03em;
  text-shadow: 0 0 28px rgba(255, 215, 120, 0.95), 0 3px 14px rgba(0, 0, 0, 0.95);
}

@media (max-width: 900px) {
  .divine-couple-container {
    height: clamp(320px, 68vh, 520px);
    margin-top: 0;
  }
  .divine-lakshmi-box {
    margin-right: -5vw;
  }
  .divine-name-lakshmi {
    left: clamp(0.5rem, 2vw, 1.5rem);
    top: 48%;
  }
  .divine-name-venkatesha {
    right: clamp(0.5rem, 2vw, 1.5rem);
    top: 48%;
  }
  .divine-script-prefix {
    font-size: clamp(1.3rem, 3.5vw, 1.9rem);
  }
  .divine-script-main {
    font-size: clamp(1.8rem, 4.8vw, 2.6rem);
  }
}

/* Sanctum Glow Beam through doorway */
.sanctum-glow-beam {
  position: absolute;
  top: 18%;
  left: 36%;
  width: 28%;
  height: 68%;
  background: radial-gradient(ellipse at 50% 50%, rgba(255, 220, 140, 0.55) 0%, rgba(239, 191, 4, 0.3) 45%, transparent 75%);
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  will-change: opacity;
}

/* Door 1 Portal Wrapper (Zoomed through into courtyard) */
.door-portal-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform-origin: 50% 54%;
  will-change: transform, opacity;
  transform: translateZ(0);
  z-index: 10;
}

/* Aspect-Ratio Matched Temple Plate (1672 x 940) */
.temple-scene-plate {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100vw;
  height: 56.22vw; /* 940 / 1672 = 0.5622 */
  min-height: 100vh;
  min-width: 177.87vh; /* 1672 / 940 = 1.7787 */
  pointer-events: none;
  transform-style: preserve-3d;
  /* The plate is zoomed up to 4.8x as the camera flies through the doorway. As
     its own GPU layer it is painted once and enlarged by the graphics card;
     otherwise every frame of the zoom repaints the door artwork at the new size
     and frames the browser cannot finish in time show without it (a blink). */
  will-change: transform;
}

/* Real Authentic 4-Stage Temple Door Layers */
.temple-door-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.temple-door-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  will-change: opacity, transform;
  transform: translateZ(0);
}

.temple-door-layer img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  pointer-events: none;
}

#door-frame-4 { z-index: 4; }
#door-frame-3 { z-index: 5; }
#door-frame-2 { z-index: 6; }
#door-frame-1 { z-index: 7; }



/* Subtle Temple Atmospheric Vignette */
.tirupati-atmosphere {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 40;
  background: radial-gradient(circle at 50% 48%, rgba(0, 0, 0, 0) 0%, rgba(10, 7, 4, 0.35) 65%, rgba(4, 2, 1, 0.82) 100%);
  transition: opacity 0.8s ease;
}

/* Door 1 darshan: the couple's names stand in this vignette's darker band, so it
   eases back while they show (doors-animation.js, tb-names-lit) */
.tb-names-lit .tirupati-atmosphere { opacity: 0.2; }

.tirupati-divine-beam {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 41;
  background: radial-gradient(ellipse 65% 55% at 50% 40%, rgba(245, 217, 104, 0.08) 0%, rgba(239, 191, 4, 0.03) 45%, transparent 75%);
  mix-blend-mode: screen;
  opacity: 0.9;
}

/* Floating Diya Gold Particles */
.tirupati-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 42;
  overflow: hidden;
}

.particle {
  position: absolute;
  background: radial-gradient(circle, #ffe494 20%, rgba(239, 191, 4, 0.8) 50%, transparent 70%);
  border-radius: 50%;
  filter: drop-shadow(0 0 5px rgba(255, 180, 50, 0.8));
  animation: floatUpward linear infinite;
}

@keyframes floatUpward {
  0% {
    transform: translateY(105vh) scale(0.5) translateX(0);
    opacity: 0;
  }
  20% { opacity: 0.85; }
  80% { opacity: 0.85; }
  100% {
    transform: translateY(-5vh) scale(1.2) translateX(35px);
    opacity: 0;
  }
}

/* Chapter Scenes Container (Removed - custom UI used) */
.chapter-scenes-wrapper,
.chapter-card-layer,
.door-content-card {
  display: none !important;
}

.door-content-card {
  max-width: 660px;
  width: 100%;
  text-align: center;
  position: relative;
  padding: 2.75rem 2.25rem;
  pointer-events: auto;
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(20, 14, 9, 0.88) 0%, rgba(12, 8, 5, 0.95) 100%);
  border: 1px solid var(--sacred-border);
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.9),
              0 0 40px -5px rgba(239, 191, 4, 0.15),
              inset 0 1px 0 rgba(245, 217, 104, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.door-content-card::before,
.door-content-card::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-color: var(--sacred-gold);
  opacity: 0.75;
  pointer-events: none;
}

.door-content-card::before {
  top: 8px;
  left: 8px;
  border-top: 1px solid var(--sacred-gold);
  border-left: 1px solid var(--sacred-gold);
}

.door-content-card::after {
  bottom: 8px;
  right: 8px;
  border-bottom: 1px solid var(--sacred-gold);
  border-right: 1px solid var(--sacred-gold);
}

.sacred-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.35rem 1rem;
  border: 1px solid var(--sacred-border-soft);
  background: rgba(239, 191, 4, 0.08);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sacred-gold-light);
  margin-bottom: 1.25rem;
}

.sacred-badge-dot {
  width: 6px;
  height: 6px;
  background-color: var(--sacred-gold);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--sacred-gold);
}

.sacred-subtitle {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-gold);
  margin-bottom: 0.75rem;
}

.sacred-heading {
  font-size: clamp(2.1rem, 5.2vw, 3.5rem);
  font-weight: 400;
  line-height: 1.16;
  color: var(--text-gold-bright);
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.85);
}

.sacred-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 1.25rem auto;
  width: 180px;
}

.sacred-divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--sacred-gold), transparent);
}

.sacred-divider-diamond {
  width: 6px;
  height: 6px;
  background-color: var(--sacred-gold);
  transform: rotate(45deg);
}

.sacred-description {
  font-size: clamp(0.95rem, 1.6vw, 1.12rem);
  line-height: 1.68;
  color: var(--text-white-soft);
  font-weight: 300;
  max-width: 530px;
  margin: 0 auto 1.75rem auto;
}

.sacred-date-venue {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem 1.5rem;
  font-size: 0.88rem;
  color: var(--text-gold);
  letter-spacing: 0.06em;
  padding-top: 1rem;
  border-top: 1px solid rgba(239, 191, 4, 0.15);
  margin-top: 1.25rem;
}

.sacred-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.85rem 2.2rem;
  background: linear-gradient(135deg, rgba(239, 191, 4, 0.15) 0%, rgba(179, 143, 3, 0.25) 100%);
  border: 1px solid var(--sacred-gold);
  color: var(--text-white);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.sacred-cta-btn:hover {
  background: var(--sacred-gold);
  color: #120c06;
  box-shadow: 0 6px 25px rgba(239, 191, 4, 0.45);
  transform: translateY(-2px);
}

.sacred-cta-btn svg {
  transition: transform 0.3s ease;
}

.sacred-cta-btn:hover svg {
  transform: translateX(4px);
}

/* Fixed HUD */
.tirupati-hud {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 80;
}

.tirupati-header {
  display: none !important;
}

.sacred-emblem {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.sacred-namam-icon {
  width: 28px;
  height: 28px;
  fill: var(--sacred-gold);
  filter: drop-shadow(0 0 8px rgba(239, 191, 4, 0.5));
}

.sacred-emblem-text {
  display: flex;
  flex-direction: column;
}

.emblem-title {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-white);
}

.emblem-sub {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-gold);
}

.hud-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hud-pill-btn {
  background: rgba(18, 12, 7, 0.75);
  border: 1px solid var(--sacred-border-soft);
  color: var(--text-white-soft);
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.25s ease;
  backdrop-filter: blur(8px);
}

.hud-pill-btn:hover {
  border-color: var(--sacred-gold);
  color: var(--text-white);
  background: rgba(30, 20, 12, 0.9);
}

.hud-pill-btn.active {
  border-color: var(--sacred-gold);
  color: var(--text-gold-bright);
  background: rgba(239, 191, 4, 0.18);
}

.tirupati-progress-rail {
  position: absolute;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  pointer-events: auto;
}

.progress-track {
  width: 2px;
  height: 180px;
  background: rgba(239, 191, 4, 0.2);
  position: relative;
  border-radius: 2px;
}

.progress-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, var(--sacred-gold-light), var(--sacred-gold-dark));
  box-shadow: 0 0 10px var(--sacred-gold);
  border-radius: 2px;
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform 0.05s linear;
}

.door-steps-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.door-step-item {
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.step-node {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(239, 191, 4, 0.35);
  border: 1px solid rgba(239, 191, 4, 0.5);
  transition: all 0.3s ease;
}

.door-step-item:hover .step-node,
.door-step-item.active .step-node {
  background: var(--sacred-gold);
  transform: scale(1.6);
  box-shadow: 0 0 12px var(--sacred-gold);
}

.step-tooltip {
  position: absolute;
  right: calc(100% + 14px);
  white-space: nowrap;
  background: rgba(14, 9, 5, 0.92);
  border: 1px solid var(--sacred-border);
  padding: 0.35rem 0.75rem;
  border-radius: 3px;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-gold);
  opacity: 0;
  pointer-events: none;
  transform: translateX(6px);
  transition: all 0.25s ease;
}

.door-step-item:hover .step-tooltip {
  opacity: 1;
  transform: translateX(0);
}

.tirupati-bottom-guide {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  pointer-events: auto;
  cursor: pointer;
  transition: opacity 0.4s ease;
}

.scroll-indicator-text {
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-gold);
}

.scroll-mouse-icon {
  width: 20px;
  height: 32px;
  border: 1.5px solid var(--sacred-gold);
  border-radius: 12px;
  position: relative;
  display: flex;
  justify-content: center;
}

.scroll-wheel {
  width: 3px;
  height: 6px;
  background-color: var(--sacred-gold);
  border-radius: 2px;
  position: absolute;
  top: 5px;
  animation: scrollWheelPulse 1.8s infinite;
}

@keyframes scrollWheelPulse {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(14px); }
}

.tirupati-door-counter {
  position: absolute;
  bottom: 2rem;
  left: 2rem;
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-white-muted);
}

.counter-current {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--text-gold-bright);
  font-family: var(--font-serif);
}

.counter-total { opacity: 0.6; }

.counter-name {
  margin-left: 0.75rem;
  font-size: 0.78rem;
  color: var(--text-white-soft);
  border-left: 1px solid rgba(239, 191, 4, 0.3);
  padding-left: 0.75rem;
}

/* Builder Drawer */
.builder-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  max-width: 90vw;
  height: 100vh;
  background: rgba(14, 10, 7, 0.96);
  border-left: 1px solid var(--sacred-border);
  box-shadow: -15px 0 40px rgba(0, 0, 0, 0.85);
  z-index: 100;
  padding: 2rem 1.75rem;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.builder-panel.open { transform: translateX(0); }

.builder-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(239, 191, 4, 0.2);
  margin-bottom: 1.5rem;
}

.builder-panel-title {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-gold-bright);
}

.builder-close-btn {
  background: none;
  border: none;
  color: var(--text-white-muted);
  cursor: pointer;
  padding: 6px;
  font-size: 1.2rem;
  transition: color 0.2s;
}

.builder-close-btn:hover { color: var(--text-white); }

.builder-field-group { margin-bottom: 1.35rem; }

.builder-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-gold);
  margin-bottom: 0.45rem;
}

.builder-input,
.builder-textarea,
.builder-select {
  width: 100%;
  background: rgba(25, 17, 11, 0.8);
  border: 1px solid rgba(239, 191, 4, 0.25);
  padding: 0.65rem 0.85rem;
  border-radius: 4px;
  color: var(--text-white);
  font-family: inherit;
  font-size: 0.88rem;
  transition: border-color 0.2s;
}

.builder-input:focus,
.builder-textarea:focus,
.builder-select:focus {
  outline: none;
  border-color: var(--sacred-gold);
  box-shadow: 0 0 10px rgba(239, 191, 4, 0.2);
}

.builder-actions-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.builder-btn-primary {
  flex: 1;
  background: var(--sacred-gold);
  color: #120b05;
  font-weight: 600;
  border: none;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.builder-btn-secondary {
  flex: 1;
  background: transparent;
  color: var(--text-white-soft);
  border: 1px solid rgba(239, 191, 4, 0.35);
  padding: 0.75rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}




/* ==========================================================================
   DOOR 2: BANGARU VAKILI & SACRED SANCTUM (PANEL 5 REFERENCE)
   ========================================================================== */

/* Door 2 Portal Wrapper */
.door2-portal-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform-origin: 50% 54%;
  will-change: transform, opacity;
  transform: translateZ(0);
  z-index: 14;
}

/* Door 2 Glow Beam */
.door2-glow-beam {
  position: absolute;
  top: 18%;
  left: 36%;
  width: 28%;
  height: 68%;
  background: radial-gradient(ellipse at 50% 50%, rgba(255, 220, 140, 0.55) 0%, rgba(239, 191, 4, 0.3) 45%, transparent 75%);
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 13;
  opacity: 0;
  will-change: opacity;
}

/* Door 2 Sanctum Atmosphere Layer (Underneath Door 2 portal - fixed image size) */
.layer-door2-darshan {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform-origin: 50% 54%;
  will-change: opacity;
  transform: translateZ(0);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  pointer-events: none;
  z-index: 10;
}

.door2-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 50%;
  filter: brightness(0.68) contrast(1.1);
  transform: translateZ(0);
}

.door2-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(20, 14, 8, 0.15) 0%, rgba(10, 6, 3, 0.6) 65%, rgba(4, 2, 1, 0.94) 100%);
  pointer-events: none;
}

.door2-light-spotlight {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 40%, rgba(255, 218, 130, 0.28) 0%, rgba(239, 191, 4, 0.12) 45%, transparent 75%);
  pointer-events: none;
  mix-blend-mode: screen;
}

/* Door 2 Sanctum Content (Panel 5 Reference) */
.door2-sanctum-content {
  position: relative;
  z-index: 12;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  max-width: 900px;
  padding: 0 1.5rem;
}

/* Sacred Holy Triad Symbols: Chakra, Tilak, Shankha */
.door2-symbols-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 3.5vw, 48px);
  margin-bottom: clamp(16px, 2.8vh, 36px);
  will-change: transform, opacity;
}

.door2-symbol-box {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.door2-tilak-box {
  width: clamp(170px, 22vw, 300px);
  height: auto;
  filter: drop-shadow(0 0 30px rgba(245, 217, 104, 0.6)) drop-shadow(0 0 60px rgba(239, 191, 4, 0.4));
  will-change: transform, opacity;
}

.door2-chakra-box,
.door2-shankha-box {
  width: clamp(85px, 11vw, 150px);
  height: auto;
  filter: drop-shadow(0 0 20px rgba(245, 217, 104, 0.5));
  will-change: transform, opacity;
}

.door2-symbol-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

/* Sacred Wedding Announcement Card */
.door2-announcement-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  max-width: 820px;
  will-change: transform, opacity;
}

.door2-announcement-rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 2.5vw, 24px);
  width: 100%;
  max-width: 520px;
  margin-bottom: clamp(8px, 1.4vh, 16px);
}

.door2-announcement-rule--venue {
  margin-top: clamp(18px, 2.8vh, 32px);
  margin-bottom: clamp(8px, 1.4vh, 16px);
}

.door2-rule-line {
  height: 2px;
  flex: 1;
  max-width: clamp(60px, 10vw, 120px);
  background: linear-gradient(90deg, transparent, #ffe066, transparent);
  box-shadow: 0 0 10px rgba(255, 224, 102, 0.6);
}

.door2-announcement-tag {
  font-family: var(--font-balivia);
  font-size: clamp(26px, 3.4vw, 42px);
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0.04em;
  color: var(--text-gold-bright);
  text-shadow: 0 0 18px rgba(255, 220, 80, 0.85), 0 2px 10px rgba(0, 0, 0, 0.95);
  line-height: 1.1;
}

.door2-announcement-date {
  font-family: var(--font-balivia);
  font-size: clamp(22px, 2.8vw, 36px);
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--text-white);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.95), 0 0 22px rgba(255, 235, 170, 0.55);
  line-height: 1.35;
  margin-top: 4px;
}

.door2-announcement-venue {
  font-family: var(--font-balivia);
  font-size: clamp(20px, 2.5vw, 32px);
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--text-white);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.95), 0 0 20px rgba(255, 235, 170, 0.45);
  line-height: 1.35;
  max-width: 760px;
  margin-top: 4px;
}

@media (max-width: 1024px) {
  .door-content-card { padding: 2.25rem 1.75rem; }
}

@media (max-width: 768px) {
  .tirupati-progress-rail { display: none; }
  .door-content-card { padding: 1.75rem 1.25rem; margin: 0 0.5rem; }
  .sacred-heading { font-size: 1.85rem; }
  .sacred-description { font-size: 0.92rem; margin-bottom: 1.25rem; }
  .tirupati-door-counter { left: 1rem; bottom: 1.25rem; font-size: 0.75rem; }
  .counter-current { font-size: 1.3rem; }
  .counter-name { display: none; }
  .tirupati-bottom-guide { bottom: 1.25rem; }

  /* Mobile scaling for Door 2 Sanctum */
  .door2-symbols-row { gap: clamp(10px, 2.5vw, 20px); margin-bottom: 0.85rem; }
  .door2-tilak-box { width: clamp(130px, 32vw, 175px); }
  .door2-chakra-box, .door2-shankha-box { width: clamp(60px, 15vw, 85px); }
  .door2-announcement-tag { font-size: clamp(22px, 5.5vw, 28px); }
  .door2-announcement-date { font-size: clamp(17px, 4.2vw, 22px); }
  .door2-announcement-venue { font-size: clamp(16px, 3.8vw, 20px); }
}

/* ==========================================================================
   DOOR 3: GARUDA MANDAPAM DWARA & SACRED CEREMONIES / WEDDING EVENTS
   ========================================================================== */

/* Door 3 Portal Wrapper */
.door3-portal-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform-origin: 50% 54%;
  will-change: transform, opacity;
  transform: translateZ(0);
  z-index: 15;
}

/* Door 3 Glow Beam (Through cracked opening) */
.door3-glow-beam {
  position: absolute;
  top: 18%;
  left: 36%;
  width: 28%;
  height: 68%;
  background: radial-gradient(ellipse at 50% 50%, rgba(255, 225, 140, 0.6) 0%, rgba(239, 191, 4, 0.3) 45%, transparent 75%);
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 14;
  opacity: 0;
  will-change: opacity;
}

/* Door 3 Sanctum Layer (Events Section) */
.layer-door3-darshan {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform-origin: 50% 50%;
  will-change: opacity;
  transform: translateZ(0);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  pointer-events: auto;
  z-index: 13;
}

/* Original Sanctum Background Image */
.door3-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 50%;
  filter: brightness(0.68) contrast(1.15);
  transform: translateZ(0);
}

/* Subtle Vignette for Seamless Temple Blending */
.door3-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(20, 14, 8, 0.15) 0%, rgba(10, 6, 3, 0.65) 70%, rgba(4, 2, 1, 0.95) 100%);
  pointer-events: none;
}

/* Door 3 Events Content Container */
.door3-events-content {
  position: relative;
  z-index: 20;
  width: 100%;
  max-width: 1560px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(10px, 2vh, 24px) clamp(12px, 2.5vw, 36px);
  will-change: transform, opacity;
}

/* --------------------------------------------------------------------------
   CEREMONIAL MANDAPA JOURNEY (scroll-driven ceremony frames)
   -------------------------------------------------------------------------- */
.mj-root {
  --mj-gold: var(--text-gold);
  --mj-gold-light: var(--text-gold-bright);
  --mj-ink: var(--text-white);
  --mj-ink-soft: var(--text-white-soft);
  --mj-ink-muted: var(--text-white-muted);
  position: absolute;
  inset: 0;
  max-width: none;
  padding: 0;
  display: block;
  overflow: hidden;
  contain: layout paint;
}

.mj-viewport {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transform-style: preserve-3d;
  perspective-origin: 50% 50%;
}

.mj-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

/* CSS-3D fallback frames (no WebGL / low power / reduced motion) */
.mj-dom-frame {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--mj-frame-w);
  height: var(--mj-frame-h);
  visibility: hidden;
  will-change: transform, opacity;
  backface-visibility: hidden;
  filter: none;
}

.mj-dom-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: fill;
  user-select: none;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 8px 18px rgba(0, 0, 0, 0.5);
}

.mj-dom-shade {
  position: absolute;
  inset: 0;
  background: #070402;
  opacity: 0;
  pointer-events: none;
}

/* Section heading — quiet, above the corridor */
.mj-header {
  position: absolute;
  top: max(clamp(14px, 3.4vh, 34px), env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  width: min(92vw, 640px);
  text-align: center;
  z-index: 3;
  pointer-events: none;
  will-change: transform, opacity;
}

.mj-header-badge {
  display: inline-block;
  color: var(--mj-gold);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

/* Drawn gold diamond ornaments either side of the badge (Balivia has no ✦) */
.mj-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.9em;
}

.mj-gem {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--mj-gold);
  transform: rotate(45deg);
  box-shadow: 0 0 6px rgba(239, 191, 4, 0.6);
}

.mj-header-title {
  margin: 4px 0 0;
  font-family: var(--font-balivia);
  font-size: clamp(22px, 2.6vw, 34px);
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.1;
  color: var(--text-gold-bright);
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.95);
}

/* Active ceremony details — only the arriving ceremony is described */
.mj-info {
  position: absolute;
  left: 50%;
  top: calc(var(--mj-frame-bottom) + clamp(12px, 2.4vh, 28px));
  transform: translateX(-50%);
  width: min(88vw, 620px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  z-index: 3;
  pointer-events: none;
}

/* Soft dark scrim so details stay readable over the warm temple light */
.mj-info::before {
  content: "";
  position: absolute;
  inset: -18% -14% -22%;
  background: radial-gradient(ellipse at 50% 45%, rgba(8, 5, 3, 0.78) 0%, rgba(8, 5, 3, 0.5) 45%, rgba(8, 5, 3, 0) 72%);
  z-index: -1;
}

.mj-info > * {
  opacity: 0;
  will-change: transform, opacity;
}

.mj-info-tag {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--mj-gold);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

.mj-info-title {
  margin: 6px 0 0;
  font-family: var(--font-balivia);
  font-size: clamp(28px, 3.3vw, 46px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: 0.03em;
  color: var(--text-gold-bright);
  text-shadow: 0 3px 20px rgba(0, 0, 0, 0.95);
  text-wrap: balance;
}

.mj-info-rule {
  display: block;
  width: 64px;
  height: 1px;
  margin: clamp(8px, 1.4vh, 14px) 0;
  background: linear-gradient(90deg, transparent, var(--mj-gold), transparent);
  transform-origin: 50% 50%;
}

.mj-info-when {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 10px;
  font-family: var(--font-serif);
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.45;
  color: var(--text-white);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95);
}

.mj-info-sep { color: var(--mj-gold); }

.mj-info-venue {
  margin-top: 4px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(14px, 1.1vw, 16px);
  line-height: 1.45;
  color: var(--text-white-soft);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95);
}

.mj-info-desc {
  margin-top: 8px;
  max-width: 52ch;
  font-family: var(--font-serif);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-white-soft);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95);
}

/* Full ceremony list for assistive technology (the visual is decorative) */
.mj-sr-list {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Side composition for short landscape screens */
.mj--side .mj-header { display: none; }

.mj--side .mj-info {
  left: 54%;
  top: var(--mj-frame-center, 50%);
  transform: translateY(-50%);
  width: min(42vw, 420px);
  align-items: flex-start;
  text-align: left;
}

.mj--side .mj-info-when { justify-content: flex-start; flex-direction: column; gap: 0; }
.mj--side .mj-info-sep { display: none !important; }
.mj--side .mj-info-title { font-size: clamp(22px, 3.4vw, 32px); }

@media (max-width: 768px) {
  .mj-header-badge { font-size: 10px; letter-spacing: 0.26em; }
  .mj-header-title { font-size: 22px; }
  .mj-info { width: calc(100vw - 32px); }
  .mj-info-title { font-size: clamp(25px, 7.4vw, 32px); }
  .mj-info-when { font-size: 15px; flex-direction: column; gap: 0; }
  .mj-info-sep { display: none !important; }
  .mj-info-venue { font-size: 14px; }
  .mj-info-desc { display: none !important; }
}

@media (max-height: 640px) and (min-width: 769px) {
  .mj-info-desc { display: none !important; }
}

/* ==========================================================================
   DOOR 4: KANKANADI DWARA & AUSPICIOUS DAY COUNTDOWN
   ========================================================================== */

/* Door 4 Portal Stage (Sits in front of Sanctum 4) */
.door4-portal-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform-origin: 50% 54%;
  will-change: transform, opacity;
  transform: translateZ(0);
  pointer-events: none;
}

/* Door 4 Divine Golden Beam */
.door4-glow-beam {
  position: absolute;
  top: 18%;
  left: 35%;
  width: 30%;
  height: 68%;
  background: radial-gradient(ellipse at 50% 50%, rgba(255, 230, 160, 0.75) 0%, rgba(239, 191, 4, 0.35) 45%, transparent 75%);
  mix-blend-mode: screen;
  pointer-events: none;
  opacity: 0;
  will-change: opacity;
}

/* Door 4 Sanctum Layer — THE SACRED TIME CHAMBER */
.layer-door4-darshan {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform-origin: 50% 54%;
  will-change: transform, opacity;
  transform: translateZ(0);
  pointer-events: none;
  overflow: hidden;
  --tc-ink: #6c1a10;
  --tc-ink-soft: #7b5a36;
  --tc-gold: var(--text-gold);
  --tc-cream: var(--text-white);
}

.tc-scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  contain: layout paint;
}

/* LAYER 01 — distant hall */
.tc-hall {
  position: absolute;
  inset: 0;
  transform-origin: 50% 50%;
  will-change: transform;
}

.tc-hall-img,
.tc-hall-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.tc-hall-img { filter: brightness(0.72) saturate(0.95); }
.tc-hall-overlay { mix-blend-mode: multiply; opacity: 0.65; }

/* LAYER 03 — Vaikuntha Dwara, dissolving into the chamber at its edges */
.tc-doorway {
  position: absolute;
  inset: 0;
  transform-origin: 50% 50%;
  will-change: transform, opacity;
  -webkit-mask-image: radial-gradient(ellipse 44% 52% at 50% 46%, #000 58%, transparent 100%);
  mask-image: radial-gradient(ellipse 44% 52% at 50% 46%, #000 58%, transparent 100%);
}

.tc-doorway-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.tc-doorway-shade {
  position: absolute;
  inset: 0;
  background: #0b0704;
  opacity: 0.6;
}

.tc-chamber-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 62% at 50% 52%, rgba(10, 6, 3, 0) 0%, rgba(10, 6, 3, 0.35) 62%, rgba(5, 3, 2, 0.88) 100%),
    linear-gradient(180deg, rgba(5, 3, 2, 0.45) 0%, rgba(5, 3, 2, 0) 26%, rgba(5, 3, 2, 0) 74%, rgba(5, 3, 2, 0.55) 100%);
}

/* LAYER 06 — a few warm specks of temple dust */
.tc-dust {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.tc-dust i {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 228, 176, 0.85);
  box-shadow: 0 0 4px rgba(255, 196, 120, 0.45);
  opacity: 0.32;
  animation: tcDustDrift 24s ease-in-out infinite alternate;
  animation-play-state: paused;
  will-change: transform;
}

.tc--live .tc-dust i { animation-play-state: running; }

@keyframes tcDustDrift {
  0% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(10px, -22px, 0); }
  100% { transform: translate3d(-6px, -46px, 0); }
}

/* LAYERS 04–05 — heading and the carved countdown object */
.tc-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(64px, 9vh, 96px) 16px clamp(56px, 8vh, 84px);
  text-align: center;
  perspective: 1100px;
  perspective-origin: 50% 62%;
}

.tc-head {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tc-head > * { will-change: transform, opacity; }

.tc-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--tc-gold);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

.tc-eyebrow::before,
.tc-eyebrow::after {
  content: "";
  width: 34px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(239, 191, 4, 0.85));
}

.tc-eyebrow::after { background: linear-gradient(90deg, rgba(239, 191, 4, 0.85), transparent); }

.tc-title {
  margin: 10px 0 0;
  font-family: var(--font-balivia);
  font-size: clamp(34px, 3.7vw, 56px);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: 0.025em;
  color: var(--text-gold-bright);
  text-shadow: 0 3px 22px rgba(0, 0, 0, 0.95);
}

.tc-when {
  margin-top: clamp(8px, 1.2vh, 12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.tc-when-date {
  font-family: var(--font-serif);
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.4;
  color: var(--text-white);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95);
}

.tc-when-time {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--tc-gold);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95);
}

/* The carved ceremonial object */
.tc-frame {
  position: relative;
  width: min(760px, 56vw);
  aspect-ratio: 1600 / 655;
  margin-top: clamp(18px, 3.6vh, 38px);
  transform-origin: 50% 70%;
  filter: drop-shadow(0 26px 36px rgba(0, 0, 0, 0.72)) drop-shadow(0 6px 10px rgba(0, 0, 0, 0.55));
  container-type: inline-size;
  container-name: tcframe;
  will-change: transform, opacity;
}

/* Warm ivory ceremonial surface, recessed into the carving */
.tc-surface {
  position: absolute;
  left: 6.2%;
  right: 6.2%;
  top: 11.6%;
  bottom: 11.6%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.42 0 0 0 0 0.28 0 0 0 0 0.12 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.16'/%3E%3C/svg%3E"),
    radial-gradient(ellipse 70% 80% at 50% 42%, #fbf4e4 0%, #f3e6cb 55%, #e2cda4 100%);
  box-shadow: inset 0 0 28px rgba(92, 58, 20, 0.42), inset 0 3px 8px rgba(70, 40, 12, 0.35);
}

.tc-frame-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  user-select: none;
}

/* Four divisions carved into one object */
.tc-units {
  position: absolute;
  left: 14%;
  right: 14%;
  top: 17%;
  bottom: 17%;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
}

.tc-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  will-change: transform, opacity;
}

.tc-num {
  display: inline-flex;
  font-family: var(--font-serif);
  font-optical-sizing: auto;
  font-weight: 600;
  font-size: 10.6cqw;
  line-height: 1;
  color: var(--tc-ink);
  font-variant-numeric: tabular-nums lining-nums;
  text-shadow: 0 1px 0 rgba(255, 251, 240, 0.85), 0 -1px 0 rgba(70, 30, 10, 0.14);
}

/* Each digit sits in an engraved window; changes move vertically within it */
.tc-slot {
  position: relative;
  display: inline-block;
  width: 0.6em;
  height: 1.16em;
  line-height: 1.16em;
  overflow: hidden;
  text-align: center;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 14%, #000 86%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 14%, #000 86%, transparent 100%);
}

.tc-glyph { display: block; }

.tc-glyph--leaving {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
}

.tc-label {
  margin-top: 0.7cqw;
  padding-left: 0.28em;
  font-family: var(--font-sans);
  font-size: clamp(9.5px, 1.45cqw, 12px);
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--tc-ink-soft);
}

.tc-label-short { display: none; }

.tc--wide-days .tc-num { font-size: 8.6cqw; }
.tc--wide-days .tc-units { grid-template-columns: 1.3fr auto 1fr auto 1fr auto 1fr; }

/* Engraved separators with a small carved diamond */
.tc-sep {
  position: relative;
  width: 1px;
  height: 64%;
  align-self: center;
  background: linear-gradient(180deg, transparent 0%, rgba(110, 72, 34, 0.5) 20%, rgba(110, 72, 34, 0.5) 80%, transparent 100%);
  box-shadow: 1px 0 0 rgba(255, 251, 240, 0.75);
}

.tc-sep i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: #b9925a;
  box-shadow: 0 0 0 2.5px #f3e6cb;
  transform: translate(-50%, -50%) rotate(45deg);
}

/* Wedding day reached / passed */
.tc-message {
  position: absolute;
  left: 14%;
  right: 14%;
  top: 17%;
  bottom: 17%;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.4cqw;
  text-align: center;
}

.tc--message .tc-units { display: none; }
.tc--message .tc-message { display: flex; }

.tc-message-title {
  font-family: var(--font-balivia);
  font-size: clamp(20px, 5cqw, 40px);
  line-height: 1.1;
  color: var(--tc-ink);
  text-shadow: 0 1px 0 rgba(255, 251, 240, 0.85);
}

.tc-message-sub {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(13px, 2cqw, 17px);
  color: var(--tc-ink-soft);
}

.tc-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.tc--reduced .tc-dust { display: none; }

/* Narrow frame: quieter, shorter labels so numerals stay the hero */
@container tcframe (max-width: 440px) {
  .tc-units, .tc-message { left: 11.5%; right: 11.5%; }
  .tc-num { font-size: 11.4cqw; }
  .tc--wide-days .tc-num { font-size: 9.2cqw; }
  .tc-label { font-size: 10px; letter-spacing: 0.2em; padding-left: 0.2em; }
  .tc-label-full { display: none; }
  .tc-label-short { display: inline; }
  .tc-sep i { width: 4px; height: 4px; box-shadow: 0 0 0 2px #f3e6cb; }
}

@media (max-width: 1100px) and (min-width: 769px) {
  .tc-frame { width: min(680px, 70vw); }
}

/* Dedicated phone composition: heading block, then a full-width carved object */
@media (max-width: 768px) {
  .tc-content { padding: 72px 10px 76px; }
  .tc-eyebrow { font-size: 10px; letter-spacing: 0.26em; gap: 10px; }
  .tc-eyebrow::before, .tc-eyebrow::after { width: 20px; }
  .tc-title { font-size: clamp(30px, 8.6vw, 38px); }
  .tc-when-date { font-size: 16px; }
  .tc-frame { width: min(560px, calc(100vw - 20px)); margin-top: 26px; }
  .tc-doorway {
    -webkit-mask-image: radial-gradient(ellipse 60% 46% at 50% 47%, #000 55%, transparent 100%);
    mask-image: radial-gradient(ellipse 60% 46% at 50% 47%, #000 55%, transparent 100%);
  }
}

@media (max-height: 560px) and (min-width: 560px) {
  .tc-content { padding-top: 56px; padding-bottom: 40px; }
  .tc-title { font-size: 30px; }
  .tc-frame { width: min(560px, 64vw); margin-top: 14px; }
}

/* ==========================================================================
   DOOR 05: VAIKUNTA DWARA & SACRED VENUE (MAP & ROYAL ELEPHANTS)
   ========================================================================== */

/* Door 5 Physical Opening Portal Stage */
.door5-portal-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
  will-change: transform, opacity;
  transform: translateZ(0);
}

/* Door 5 Golden Divine Light Beam */
.door5-glow-beam {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 90vh;
  background: radial-gradient(ellipse at center, rgba(255, 235, 175, 0.95) 0%, rgba(239, 191, 4, 0.7) 35%, rgba(179, 143, 3, 0.25) 65%, transparent 80%);
  filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  z-index: 9;
  will-change: transform, opacity;
}

/* Door 5 Sanctum & Venue Darshan Layer */
.layer-door5-darshan {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 9;
  opacity: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  will-change: opacity;
}

/* Sanctum Background Plate */
.door5-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  pointer-events: none;
  z-index: 1;
}

/* Atmospheric Overlay */
.door5-overlay-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  pointer-events: none;
  z-index: 2;
  mix-blend-mode: screen;
  opacity: 0.35;
}

.door5-vignette {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: radial-gradient(ellipse at 50% 50%, rgba(10, 7, 5, 0.05) 0%, rgba(10, 7, 5, 0.45) 60%, rgba(5, 3, 2, 0.88) 100%);
  pointer-events: none;
}

/* Left Royal Decorated Temple Elephant - Anchored to Left Screen Edge & Grounded */
.door5-elephant-left {
  position: absolute;
  bottom: clamp(20px, 5vh, 65px);
  left: 0;
  height: clamp(260px, 54vh, 620px);
  width: auto;
  aspect-ratio: 1097 / 879;
  z-index: 8;
  pointer-events: none;
  filter: drop-shadow(0 16px 45px rgba(0, 0, 0, 0.95));
  will-change: transform, opacity;
}

.door5-elephant-left img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transform: translateX(-38%);
  transform-origin: left center;
}

/* Right Royal Decorated Temple Elephant - Anchored to Right Screen Edge & Grounded */
.door5-elephant-right {
  position: absolute;
  bottom: clamp(20px, 5vh, 65px);
  right: 0;
  height: clamp(260px, 54vh, 620px);
  width: auto;
  aspect-ratio: 1097 / 879;
  z-index: 8;
  pointer-events: none;
  filter: drop-shadow(0 16px 45px rgba(0, 0, 0, 0.95));
  will-change: transform, opacity;
}

.door5-elephant-right img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transform: translateX(38%);
  transform-origin: right center;
}

/* Door 5 Venue Content Container (Center Map & Venue Details) */
.door5-venue-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  max-width: 100vw;
  padding: 0 clamp(16px, 3vw, 40px);
  pointer-events: auto;
}

/* Center White Rounded Map Card - Prominent, Expansive, Grand */
.door5-map-card {
  position: relative;
  z-index: 12;
  width: clamp(340px, 38vw, 660px);
  height: clamp(300px, 46vh, 520px);
  background: #ffffff;
  border: clamp(10px, 1.3vw, 18px) solid #ffffff;
  border-radius: clamp(26px, 2.8vw, 38px);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.94), 0 0 50px rgba(239, 191, 4, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  will-change: transform, opacity;
}

/* Google Map Embed Iframe - 100% visible, completely clean, zero overlap from elephants */
.door5-map-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: clamp(16px, 1.8vw, 24px);
  display: block;
  pointer-events: auto;
}

/* Floating Action Badge on Map */
.door5-map-action-badge {
  position: absolute;
  bottom: clamp(10px, 1.6vh, 16px);
  right: clamp(10px, 1.6vw, 16px);
  background: rgba(14, 10, 7, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text-white);
  font-family: var(--font-balivia);
  font-size: clamp(12px, 1.1vw, 15px);
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 9999px;
  border: 1px solid rgba(239, 191, 4, 0.5);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.65);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: all 0.25s ease;
  z-index: 5;
}

.door5-map-action-badge:hover {
  background: rgba(239, 191, 4, 0.98);
  color: #0e0a07;
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(239, 191, 4, 0.6);
}

/* Venue Typography Details */
.door5-venue-details {
  margin-top: clamp(20px, 3vh, 36px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  will-change: transform, opacity;
  z-index: 12;
}

.door5-venue-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 2vw, 26px);
}

.door5-venue-line {
  width: clamp(50px, 7vw, 110px);
  height: 2px;
  background: linear-gradient(to right, transparent, #EFBF04, transparent);
  opacity: 0.95;
}

.door5-venue-label {
  font-family: var(--font-balivia);
  font-size: clamp(22px, 2.5vw, 36px);
  color: var(--text-gold-bright);
  font-weight: 600;
  letter-spacing: 0.05em;
  margin: 0;
  line-height: 1;
  text-shadow: 0 0 18px rgba(239, 191, 4, 0.45), 0 2px 8px rgba(0, 0, 0, 0.9);
}

.door5-venue-name {
  font-family: var(--font-balivia);
  font-size: clamp(18px, 2.2vw, 30px);
  color: var(--text-white);
  font-weight: 400;
  letter-spacing: 0.025em;
  margin: clamp(8px, 1.2vh, 14px) 0 0 0;
  line-height: 1.35;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.95), 0 0 24px rgba(239, 191, 4, 0.25);
}

/* Grand 'Get Directions' Button */
.door5-directions-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: clamp(14px, 2vh, 22px);
  background: linear-gradient(135deg, #EFBF04 0%, #B38F03 100%);
  color: #0e0a07;
  font-family: var(--font-balivia);
  font-size: clamp(15px, 1.5vw, 18px);
  font-weight: 600;
  padding: clamp(9px, 1.3vh, 13px) clamp(24px, 2.8vw, 40px);
  border-radius: 9999px;
  text-decoration: none;
  box-shadow: 0 8px 28px rgba(179, 143, 3, 0.45);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.door5-directions-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 12px 34px rgba(239, 191, 4, 0.6);
}

/* Responsive Scaling for All Screen Sizes */
@media (max-width: 1200px) {
  .door5-elephant-left,
  .door5-elephant-right {
    height: clamp(240px, 50vh, 480px);
    bottom: clamp(16px, 4vh, 50px);
  }
  .door5-elephant-left img {
    transform: translateX(-42%);
  }
  .door5-elephant-right img {
    transform: translateX(42%);
  }
  .door5-map-card {
    width: clamp(340px, 44vw, 560px);
    height: clamp(280px, 42vh, 440px);
  }
}

@media (max-width: 900px) {
  .door5-elephant-left,
  .door5-elephant-right {
    height: clamp(200px, 42vh, 340px);
    bottom: clamp(14px, 3vh, 36px);
    z-index: 5;
  }
  .door5-elephant-left img {
    transform: translateX(-46%);
  }
  .door5-elephant-right img {
    transform: translateX(46%);
  }
  .door5-map-card {
    width: min(440px, 80vw);
    height: clamp(260px, 36vh, 340px);
    z-index: 10;
  }
}

@media (max-width: 640px) {
  .door5-venue-content {
    padding: 0 14px;
  }
  .door5-elephant-left,
  .door5-elephant-right {
    height: clamp(150px, 30vh, 230px);
    bottom: 12px;
    opacity: 0.88;
    z-index: 4;
  }
  .door5-elephant-left img {
    transform: translateX(-52%);
  }
  .door5-elephant-right img {
    transform: translateX(52%);
  }
  .door5-map-card {
    width: min(340px, 88vw);
    height: 250px;
    border-width: 8px;
    border-radius: 22px;
    z-index: 10;
  }
  .door5-venue-details {
    margin-top: 14px;
    z-index: 10;
  }
  .door5-venue-label {
    font-size: 20px;
  }
  .door5-venue-name {
    font-size: 15px;
    max-width: 92vw;
  }
  .door5-directions-btn {
    padding: 8px 22px;
    font-size: 13px;
    margin-top: 10px;
  }
}

/* ==========================================================================
   DOOR 06: KULASEKHARA PADI DWARA & SACRED 3D MEMORY CORRIDOR GALLERY
   ========================================================================== */

/* Door 6 Portal Stage (Sits in front of Sanctum 6) */
.door6-portal-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform-origin: 50% 54%;
  will-change: transform, opacity;
  transform: translateZ(0);
  pointer-events: none;
  z-index: 6;
}

/* Door 6 Divine Beam of Light */
.door6-glow-beam {
  position: absolute;
  top: 18%;
  left: 36%;
  width: 28%;
  height: 68%;
  background: radial-gradient(ellipse at 50% 50%, rgba(255, 225, 140, 0.7) 0%, rgba(239, 191, 4, 0.35) 45%, transparent 75%);
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 5;
  opacity: 0;
  will-change: opacity;
}

/* Door 6 Sanctum Darshan Layer (Three.js 3D Photo Corridor Gallery) */
.layer-door6-darshan {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform-origin: 50% 50%;
  will-change: opacity;
  transform: translateZ(0);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  pointer-events: auto;
  z-index: 4;
}

.door6-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 50%;
  filter: brightness(0.72) contrast(1.12);
  transform: translateZ(0);
}

.door6-overlay-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 50%;
  mix-blend-mode: screen;
  opacity: 0.35;
  pointer-events: none;
}

.door6-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 48%, rgba(20, 14, 8, 0.1) 0%, rgba(10, 6, 3, 0.55) 65%, rgba(4, 2, 1, 0.94) 100%);
  pointer-events: none;
}

/* Door 6 Minimal Elegant Typography Header */
.door6-corridor-typography {
  position: absolute;
  top: clamp(20px, 4.5vh, 48px);
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 25;
  pointer-events: none;
  width: 90%;
  max-width: 600px;
}

.door6-corridor-title {
  font-family: var(--font-balivia);
  font-size: clamp(26px, 4.0vw, 46px);
  font-weight: 400;
  color: var(--text-gold-bright);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0;
  text-shadow: 0 3px 20px rgba(0, 0, 0, 0.95), 0 0 32px rgba(255, 220, 80, 0.85);
}

.door6-corridor-subtitle {
  font-family: var(--font-balivia);
  font-size: clamp(14px, 1.6vw, 18px);
  color: var(--text-white-soft);
  letter-spacing: 0.08em;
  margin-top: 6px;
  font-weight: 400;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9), 0 0 16px rgba(255, 220, 80, 0.4);
}

/* Door 6 Three.js 3D Sacred Gallery Stage Container */
.door6-three-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 10;
  pointer-events: auto;
}

.door6-three-canvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* Door 6 Scroll Indicator at Bottom */
.door6-corridor-scroll-indicator {
  position: absolute;
  bottom: clamp(18px, 4vh, 42px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  z-index: 25;
  pointer-events: none;
}

@media (max-width: 768px) {
  .door6-corridor-typography {
    top: clamp(14px, 3vh, 30px);
  }
  .door6-corridor-title {
    font-size: clamp(20px, 5.2vw, 28px);
    letter-spacing: 0.16em;
  }
  .door6-corridor-subtitle {
    font-size: 11px;
    letter-spacing: 0.08em;
  }
  .door6-corridor-scroll-indicator {
    bottom: clamp(14px, 3vh, 26px);
  }
}

/* ==========================================================================
   DOOR 7: ANANDA NILAYAM GARBHAGRIHA — SACRED SANCTUM & PRESENCE CONFIRMATION
   Authentic 4-Stage Door Opening + RSVP Presence Form + All Gods Blessing + Final Sanctum
   ========================================================================== */
.door7-portal-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform-origin: 50% 50%;
  will-change: transform, opacity;
  transform: translateZ(0);
  pointer-events: none;
  z-index: 3;
}

/* Door 7 Divine Beam of Light */
.door7-glow-beam {
  position: absolute;
  top: 15%;
  left: 35%;
  width: 30%;
  height: 70%;
  background: radial-gradient(ellipse at 50% 50%, rgba(255, 230, 150, 0.85) 0%, rgba(239, 191, 4, 0.45) 45%, transparent 75%);
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  will-change: opacity, transform;
}

/* Door 7 Sanctum Darshan Layer */
.layer-door7-darshan {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform-origin: 50% 50%;
  will-change: opacity, transform;
  transform: translateZ(0);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  pointer-events: auto;
  z-index: 1;
}

.door7-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 50%;
  filter: brightness(0.72) contrast(1.1);
  transform: translateZ(0);
}

.door7-overlay-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 50%;
  mix-blend-mode: screen;
  opacity: 0.4;
  pointer-events: none;
}

.door7-final-sanctum-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 50%;
  transform: translateZ(0);
  opacity: 0;
  z-index: 10;
  pointer-events: none;
}

.door7-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(14, 10, 7, 0.15) 0%, rgba(10, 6, 3, 0.6) 65%, rgba(4, 2, 1, 0.94) 100%);
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   DOOR 7 STEP 1: SACRED PRESENCE / RSVP CONFIRMATION CARD
   -------------------------------------------------------------------------- */














/* Form Fields */
















/* Guests Count Selector Pills */








/* Ceremony Checkbox Pills */








/* Submit Button */






/* Success Card */








/* --------------------------------------------------------------------------
   DOOR 7 STEP 2: ALL GODS DIVINE BLESSING BANNER
   -------------------------------------------------------------------------- */
.door7-all-gods-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 960px;
  z-index: 22;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  opacity: 0;
  will-change: opacity, transform;
  pointer-events: none;
}

.door7-all-gods-img {
  width: 100%;
  max-height: clamp(260px, 52vh, 520px);
  object-fit: contain;
  filter: drop-shadow(0 10px 40px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 45px rgba(255, 215, 100, 0.45));
  border-radius: 12px;
  transform: translateZ(0);
}

/* Full darshan composition: the provided deity artwork leads, with the blessing below. */
.door7-all-gods-container { transform: none; }
.door7-all-gods-container { width: min(96vw, 1560px); max-width: none; }
.door7-all-gods-img { max-height: min(66vh, 620px); filter: drop-shadow(0 14px 34px rgba(0, 0, 0, .9)) drop-shadow(0 0 34px rgba(255, 193, 72, .3)); }
.door7-all-gods-message { margin-top: clamp(-4px, -0.4vh, -2px); display:flex; flex-direction:column; align-items:center; color:var(--text-white); font-family:var(--font-balivia); text-shadow:0 3px 16px rgba(0,0,0,.95), 0 0 18px rgba(239, 191, 4,.28); line-height:1.05; }
.door7-all-gods-message span { font-size:clamp(22px, 2.4vw, 36px); }
.door7-all-gods-message strong { color:var(--text-gold-bright); margin-top:2px; font-size:clamp(25px, 2.8vw, 42px); font-weight:400; }



/* RSVP refinement: a temple offering card rather than a generic UI panel. */


































@media (max-width: 768px) {
  
  
  
  
  
  
  
  
  .door7-all-gods-img {
    max-height: 42vh;
  }
  .door7-all-gods-container { width:94%; }
  .door7-all-gods-img { max-height:54vh; }
  .door7-all-gods-message span { font-size:19px; }
  .door7-all-gods-message strong { font-size:23px; }

}

/* ==========================================================================
   DOOR 7: FINAL BLESSING — closing words over the darshan, set over the dark
   temple floor so Lord Venkatesha stays clear. Above the passing flowers so the
   text is never crossed. Balivia only; ornaments are drawn, not glyphs.
   ========================================================================== */
.door7-blessing {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 31;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18vh 1.5rem clamp(30px, 6.5vh, 64px);
  text-align: center;
  font-family: var(--font-balivia);
  pointer-events: none;
  background: linear-gradient(to top, rgba(10, 7, 5, 0.88) 0%, rgba(10, 7, 5, 0.6) 45%, rgba(10, 7, 5, 0) 100%);
}

.door7-blessing-rule {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.2vw, 18px);
}

.door7-blessing-line {
  width: clamp(36px, 6vw, 90px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--text-gold));
}

.door7-blessing-line:last-child {
  background: linear-gradient(90deg, var(--text-gold), transparent);
}

.door7-blessing-eyebrow {
  font-size: clamp(13px, 1vw, 15px);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--text-gold);
}

.door7-blessing-names {
  margin-top: clamp(6px, 1vh, 12px);
  font-family: var(--font-balivia);
  font-weight: 400;
  font-size: clamp(38px, 4.4vw, 68px);
  line-height: 1.1;
  color: var(--text-gold-bright);
  text-shadow: 0 0 26px rgba(239, 191, 4, 0.45), 0 3px 14px rgba(0, 0, 0, 0.95);
}

.door7-blessing-thanks {
  margin-top: clamp(6px, 1.1vh, 12px);
  font-size: clamp(16px, 1.35vw, 20px);
  line-height: 1.5;
  color: var(--text-white);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95);
}

@media (max-width: 768px) {
  .door7-blessing { padding: 14vh 1.25rem 84px; }
  .door7-blessing-eyebrow { font-size: 12px; letter-spacing: 0.24em; }
  .door7-blessing-names { font-size: clamp(34px, 9.5vw, 42px); }
  .door7-blessing-thanks { font-size: 15.5px; max-width: 300px; }
}

/* ==========================================================================
   FLOWER SHOWERS (Door 2 Pushpa Vrishti, Door 3 corridor burst)
   Same three flower assets as Door 7. Two depths: 'front' sits above the
   sanctum content (kept to the edges by its paths), 'back' drifts behind the
   content, smaller and softened for distance.
   ========================================================================== */
.flower-shower {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.flower-shower--back { z-index: 6; }
.flower-shower--front { z-index: 30; }

.shower-flower {
  position: absolute;
  left: 0;
  top: 0;
  height: auto;
  opacity: 0;
  transform-origin: 50% 50%;
  will-change: transform, opacity;
  user-select: none;
  -webkit-user-drag: none;
}

.shower-flower--white { width: clamp(70px, 6.6vw, 120px); }
.shower-flower--yellow { width: clamp(58px, 5.4vw, 100px); }
.shower-flower--red { width: clamp(46px, 4.2vw, 78px); }

.flower-shower--back .shower-flower { filter: blur(1.2px) brightness(0.88); }

@media (max-width: 768px) {
  .shower-flower--white { width: 52px; }
  .shower-flower--yellow { width: 44px; }
  .shower-flower--red { width: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  .flower-shower { display: none; }
}

/* ==========================================================================
   DOOR 7 STEP 1: THE SACRED INVITATION (RSVP)
   A carved temple window (the same frame that holds every ceremony in the
   Events journey) opens onto the sanctum; the response sits beside it.
   Project fonts only (assets/font): Balivia throughout.
   Antique brass is an accent, never a fill.
   ========================================================================== */

/* While the invitation is on screen, only Door 7's layer takes pointer input
   (earlier doors' layers are transparent here but stacked above it) */
.tirupati-stage--rsvp #camera-rig > :not(#layer-door7-darshan),
.tirupati-stage--rsvp #camera-rig > :not(#layer-door7-darshan) * { pointer-events: none !important; }

.rsvp {
  --rv-ivory: var(--text-white);
  --rv-beige: var(--text-white-soft);
  --rv-muted: var(--text-white-muted);
  --rv-brown: #6f513a;
  --rv-line: rgba(176, 134, 92, 0.42);
  --rv-line-soft: rgba(176, 134, 92, 0.22);
  --rv-line-field: rgba(205, 187, 158, 0.4);
  --rv-surface: rgba(111, 81, 58, 0.12);
  --rv-surface-warm: rgba(150, 104, 60, 0.2);
  --rv-accent: var(--text-gold);
  --rv-error: #eda78d;
  --rv-ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  /* Protected zone for the journey indicator (07 / 07 …) at the bottom-left */
  --rv-hud-zone: 96px;
  position: absolute;
  inset: 0;
  z-index: 20;
  overflow: hidden;
  background: linear-gradient(100deg, rgba(14, 9, 6, 0.8) 0%, rgba(14, 9, 6, 0.9) 42%, rgba(11, 7, 4, 0.96) 100%);
  color: var(--rv-ivory);
  font-family: var(--font-sans);
  text-align: left;
  pointer-events: auto;
  will-change: opacity, transform;
}

.rsvp [data-reveal] { opacity: 0; }

.rsvp-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.rsvp-scroll {
  position: absolute;
  inset: 0 0 var(--rv-hud-zone) 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(176, 134, 92, 0.5) transparent;
}

/* When it scrolls, content softly fades before the indicator's zone */
.rsvp--scrolls .rsvp-scroll {
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 28px), transparent 100%);
  mask-image: linear-gradient(180deg, #000 calc(100% - 28px), transparent 100%);
}

.rsvp-inner {
  position: relative;
  min-height: 100%;
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 4.4fr) minmax(0, 5.6fr);
  gap: clamp(48px, 6vw, 112px);
  align-items: center;
  padding: clamp(36px, 6vh, 72px) clamp(72px, 7vw, 112px) 16px clamp(56px, 6vw, 104px);
}

/* ---------------- The invitation: a carved window onto the sanctum ---------------- */
.rsvp-invite {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.rsvp-shrine {
  position: relative;
  margin: 0;
  height: min(44vh, 420px);
  aspect-ratio: 900 / 1216;
  will-change: opacity, transform;
}

/* The sanctum seen through the window opening */
.rsvp-shrine-view {
  position: absolute;
  left: 12.2%;
  right: 12.2%;
  top: 11.8%;
  bottom: 9.3%;
  background: url('../images/Door 07_05.webp') 50% 40% / cover no-repeat;
  filter: brightness(0.92) saturate(0.92);
  box-shadow: inset 0 0 34px rgba(0, 0, 0, 0.65);
}

.rsvp-shrine-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.6)) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.45));
  user-select: none;
}

.rsvp-invite-copy {
  margin-top: clamp(18px, 3vh, 30px);
  max-width: 440px;
}

.rsvp-eyebrow,
.rsvp-kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--rv-accent);
}

/* Engraved rule ending in a small carved diamond (the countdown's separator motif) */
.rsvp-diamond-rule {
  position: relative;
  width: 26px;
  height: 1px;
  background: var(--rv-line);
}

.rsvp-diamond-rule::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 4px;
  height: 4px;
  background: var(--rv-line);
  transform: translateY(-50%) rotate(45deg);
}

.rsvp-diamond-rule:first-child::after { right: -2px; }
.rsvp-diamond-rule:last-child::after { left: -2px; }

.rsvp-names {
  margin: 14px 0 0;
  font-family: var(--font-balivia);
  font-weight: normal;
  font-size: clamp(38px, 3.6vw, 58px);
  line-height: 1.1;
  letter-spacing: 0.02em;
  color: var(--text-gold-bright);
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.75);
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.rsvp-amp {
  margin: 0 0.22em;
  font-size: 0.72em;
  color: var(--text-gold);
}

/* Long names: one name per line, with the & between, so nothing clips */
.rsvp-names--long { font-size: clamp(28px, 2.5vw, 40px); }
.rsvp-names--long .rsvp-name { display: block; }
.rsvp-names--long .rsvp-amp { display: block; margin: 0.08em 0; font-size: 0.7em; }

.rsvp-message {
  margin: 14px auto 0;
  max-width: 32ch;
  font-family: var(--font-serif);
  font-size: clamp(16px, 1.25vw, 18px);
  line-height: 1.6;
  color: var(--rv-beige);
}

.rsvp-details {
  margin: 18px auto 0;
  padding-top: 14px;
  max-width: 34ch;
  border-top: 1px solid var(--rv-line-soft);
  font-family: var(--font-serif);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--rv-muted);
}

.rsvp-details span { display: block; }
.rsvp-details span + span { font-style: italic; }

/* ---------------- The response ---------------- */
.rsvp-panel {
  position: relative;
  width: 100%;
  max-width: 560px;
}

.rsvp-form > * + * { margin-top: clamp(20px, 3vh, 28px); }
.rsvp-form[hidden], .rsvp-thanks[hidden] { display: none; }

.rsvp-choice,
.rsvp-ceremonies {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.rsvp-question {
  padding: 0;
  margin: 0 0 16px;
  font-family: var(--font-balivia);
  font-weight: normal;
  font-size: clamp(30px, 2.6vw, 40px);
  line-height: 1.12;
  letter-spacing: 0.02em;
  color: var(--text-gold-bright);
}

.rsvp-head + .rsvp-choice { margin-top: 10px; }

.rsvp-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.rsvp-option {
  position: relative;
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 12px;
  align-items: start;
  padding: 15px 16px 14px;
  border: 1px solid var(--rv-line-soft);
  background: var(--rv-surface);
  cursor: pointer;
  transition: background-color 0.35s var(--rv-ease), border-color 0.35s var(--rv-ease);
}

/* A thin accent line, like the inlay of a carved door panel */
.rsvp-option::before {
  content: "";
  position: absolute;
  left: -1px;
  top: -1px;
  bottom: -1px;
  width: 2px;
  background: var(--rv-accent);
  transform: scaleY(0);
  transform-origin: 50% 0;
  transition: transform 0.4s var(--rv-ease);
}

.rsvp-option input,
.rsvp-ceremony input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.rsvp-option:hover { border-color: var(--rv-line); }
.rsvp-option:has(input:checked) { background: var(--rv-surface-warm); border-color: var(--rv-line); }
.rsvp-option:has(input:checked)::before { transform: scaleY(1); }
.rsvp-option:has(input:focus-visible),
.rsvp-ceremony:has(input:focus-visible) { outline: 1px solid var(--rv-accent); outline-offset: 3px; }

.rsvp-option-text strong,
.rsvp-option-text small { display: block; }

.rsvp-option-text strong {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rv-ivory);
}

.rsvp-option-text small {
  margin-top: 5px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  line-height: 1.35;
  color: var(--rv-beige);
}

/* Selection indicator: the carved diamond, filled with a small check when chosen */
.rsvp-diamond {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-top: 1px;
}

.rsvp-diamond::before {
  content: "";
  position: absolute;
  inset: 2.5px;
  border: 1px solid rgba(205, 187, 158, 0.55);
  transform: rotate(45deg);
  transition: background-color 0.3s var(--rv-ease), border-color 0.3s var(--rv-ease);
}

.rsvp-diamond svg {
  position: relative;
  width: 11px;
  height: 11px;
  fill: none;
  stroke: #1c120a;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 12;
  stroke-dashoffset: 12;
  transition: stroke-dashoffset 0.35s var(--rv-ease) 0.05s;
}

:checked ~ .rsvp-diamond::before { background: var(--rv-accent); border-color: var(--rv-accent); }
:checked ~ .rsvp-diamond svg { stroke-dashoffset: 0; }

/* Fields: a label, a single hairline, an accent line on focus */
.rsvp-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.rsvp-field { position: relative; min-width: 0; }

.rsvp-label {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--rv-muted);
  transition: color 0.3s var(--rv-ease);
}

.rsvp-optional {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 12.5px;
  letter-spacing: 0;
  text-transform: none;
}

.rsvp-field:focus-within .rsvp-label { color: var(--rv-ivory); }

.rsvp-control { position: relative; display: block; }

.rsvp-input {
  display: block;
  width: 100%;
  min-height: 46px;
  margin: 0;
  padding: 10px 0 9px;
  appearance: none;
  border: 0;
  border-bottom: 1px solid var(--rv-line-field);
  border-radius: 0;
  background: transparent;
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.4;
  color: var(--rv-ivory);
  caret-color: var(--rv-accent);
  outline: none;
}

.rsvp-input::placeholder {
  font-style: italic;
  color: rgba(205, 191, 168, 0.75);
}

.rsvp-line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5px;
  background: var(--rv-accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.45s var(--rv-ease), background-color 0.3s;
  pointer-events: none;
}

.rsvp-control:focus-within .rsvp-line { transform: scaleX(1); }

.rsvp-field.is-invalid .rsvp-label { color: var(--rv-error); }
.rsvp-field.is-invalid .rsvp-input { border-bottom-color: var(--rv-error); }
.rsvp-field.is-invalid .rsvp-line { background: var(--rv-error); transform: scaleX(1); }

.rsvp-note {
  min-height: 72px;
  resize: vertical;
  line-height: 1.55;
  font-size: 17px;
}

.rsvp-error,
.rsvp-form-error {
  margin: 7px 0 0;
  font-family: var(--font-serif);
  font-size: 14px;
  line-height: 1.45;
  color: var(--rv-error);
}

.rsvp-error:empty,
.rsvp-form-error:empty { display: none; }

/* Guests: a compact stepper between two engraved rules */
.rsvp-attending-only > * + * { margin-top: clamp(18px, 2.6vh, 26px); }
.rsvp-attending-only[hidden] { display: none; }

.rsvp-guests {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid var(--rv-line-soft);
  border-bottom: 1px solid var(--rv-line-soft);
}

.rsvp-stepper {
  display: flex;
  align-items: center;
  gap: 4px;
}

.rsvp-step {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--rv-line);
  border-radius: 50%;
  background: transparent;
  color: var(--rv-ivory);
  cursor: pointer;
  transition: border-color 0.3s var(--rv-ease), background-color 0.3s var(--rv-ease), opacity 0.3s;
}

.rsvp-step svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
}

.rsvp-step:hover:not(:disabled) { background: var(--rv-surface-warm); border-color: var(--rv-accent); }
.rsvp-step:disabled { opacity: 0.3; cursor: default; }
.rsvp-step:focus-visible { outline: 1px solid var(--rv-accent); outline-offset: 3px; }

.rsvp-count {
  min-width: 104px;
  text-align: center;
  white-space: nowrap;
}

.rsvp-count-num {
  display: inline-block;
  font-family: var(--font-balivia);
  font-size: 26px;
  color: var(--rv-ivory);
}

.rsvp-count-unit {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  color: var(--rv-beige);
}

/* Ceremonies: a ceremonial itinerary fed by the Events data */
.rsvp-ceremonies { position: relative; }
.rsvp-ceremonies legend { padding: 0; margin-bottom: 10px; }

.rsvp-toggle-all {
  position: absolute;
  z-index: 1;
  /* a fieldset's positioned children start below its legend: lift onto the legend line */
  top: -31px;
  right: 0;
  padding: 8px 0;
  line-height: 1;
  border: 0;
  background: none;
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rv-beige);
  text-decoration: underline;
  text-decoration-color: var(--rv-line);
  text-underline-offset: 5px;
  cursor: pointer;
}

.rsvp-toggle-all:hover { color: var(--rv-ivory); }
.rsvp-toggle-all:focus-visible { outline: 1px solid var(--rv-accent); outline-offset: 2px; }

.rsvp-ceremony-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  column-gap: 28px;
  border-top: 1px solid var(--rv-line-soft);
}

.rsvp-ceremony-list--cols { grid-template-columns: 1fr 1fr; }
.rsvp-ceremony-list li { border-bottom: 1px solid var(--rv-line-soft); }

.rsvp-ceremony {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 8px 2px;
  cursor: pointer;
  transition: background-color 0.3s var(--rv-ease);
}

.rsvp-ceremony:hover { background: var(--rv-surface); }
.rsvp-ceremony-text { min-width: 0; }

.rsvp-ceremony-name {
  display: block;
  font-family: var(--font-balivia);
  font-size: 17.5px;
  line-height: 1.25;
  letter-spacing: 0.01em;
  color: var(--rv-muted);
  transition: color 0.3s var(--rv-ease);
}

.rsvp-ceremony-date {
  display: block;
  margin-top: 3px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rv-muted);
}

.rsvp-ceremony:has(input:checked) .rsvp-ceremony-name { color: var(--rv-ivory); }
.rsvp-ceremony .rsvp-diamond { margin-top: 0; }

/* The response itself: dark surface, thin brass edge, ivory type */
.rsvp-actions { padding-top: 4px; }
.rsvp-form-error { margin: 0 0 14px; }

.rsvp-submit {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  min-height: 54px;
  padding: 16px 28px;
  border: 1px solid rgba(195, 154, 92, 0.6);
  border-radius: 0;
  background: rgba(18, 12, 8, 0.6);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--rv-ivory);
  cursor: pointer;
  transition: background-color 0.35s var(--rv-ease), border-color 0.35s var(--rv-ease);
}

.rsvp-submit-arrow {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.4s var(--rv-ease);
}

.rsvp-submit:hover:not(:disabled) { background: var(--rv-surface-warm); border-color: var(--rv-accent); }
.rsvp-submit:hover:not(:disabled) .rsvp-submit-arrow { transform: translateX(5px); }
.rsvp-submit:focus-visible { outline: 1px solid var(--rv-accent); outline-offset: 4px; }
.rsvp-submit.is-sending { cursor: progress; opacity: 0.75; }
.rsvp-submit.is-sending .rsvp-submit-arrow { animation: rsvpSending 1.2s var(--rv-ease) infinite; }

@keyframes rsvpSending {
  0%, 100% { transform: translateX(0); opacity: 1; }
  50% { transform: translateX(6px); opacity: 0.4; }
}

/* ---------------- Acknowledgement ---------------- */
.rsvp-thanks { outline: none; text-align: center; }

.rsvp-thanks-title {
  margin: 18px auto 0;
  max-width: 16ch;
  font-family: var(--font-balivia);
  font-weight: normal;
  font-size: clamp(32px, 3vw, 46px);
  line-height: 1.15;
  letter-spacing: 0.015em;
  color: var(--text-gold-bright);
  text-wrap: balance;
}

.rsvp-thanks-names {
  margin: 28px 0 0;
  font-family: var(--font-balivia);
  font-size: 24px;
  color: var(--text-gold);
}

.rsvp-thanks-closing {
  margin: 6px 0 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 17px;
  line-height: 1.6;
  color: var(--rv-beige);
}

.rsvp-thanks-summary {
  margin: 26px auto 0;
  padding-top: 14px;
  max-width: 44ch;
  border-top: 1px solid var(--rv-line-soft);
  font-family: var(--font-serif);
  font-size: 14px;
  line-height: 1.6;
  color: var(--rv-muted);
}

.rsvp-thanks-summary:empty { display: none; }

.rsvp-edit {
  margin-top: 14px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rv-beige);
  text-decoration: underline;
  text-decoration-color: var(--rv-line);
  text-underline-offset: 5px;
  cursor: pointer;
}

.rsvp-edit:hover { color: var(--rv-ivory); }
.rsvp-edit:focus-visible { outline: 1px solid var(--rv-accent); outline-offset: 3px; }

/* Jasmine petals (the reunion's petals), once, after a response */
.rsvp-petals {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.rsvp-petal {
  position: absolute;
  top: 0;
  opacity: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
  will-change: transform, opacity;
}

/* ---------------- Tablet (two columns, smaller window) ---------------- */
@media (max-width: 1100px) and (min-width: 861px) {
  .rsvp-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 44px; padding-left: 40px; padding-right: 72px; }
  .rsvp-shrine { height: min(36vh, 320px); }
  .rsvp-ceremony-list--cols { grid-template-columns: 1fr; }
  .rsvp-options { grid-template-columns: 1fr; }
}

/* Typical laptop heights: tighter rhythm so the response fits one screen */
@media (max-height: 940px) and (min-width: 861px) {
  .rsvp-inner { padding-top: 32px; }
  .rsvp-form > * + * { margin-top: 20px; }
  .rsvp-question { margin-bottom: 12px; }
  .rsvp-ceremony { min-height: 48px; padding: 6px 2px; }
  .rsvp-note { min-height: 60px; }
  .rsvp-shrine { height: min(40vh, 380px); }
}

@media (max-height: 800px) and (min-width: 861px) {
  .rsvp { --rv-hud-zone: 84px; }
  .rsvp-inner { padding-top: 24px; }
  .rsvp-form > * + * { margin-top: 16px; }
  .rsvp-option { padding: 11px 14px; }
  .rsvp-question { font-size: 30px; }
  .rsvp-shrine { height: min(36vh, 300px); }
  .rsvp-message { margin-top: 10px; }
}

/* ---------------- Phones: one column, the window above the response ---------------- */
@media (max-width: 860px) {
  .rsvp { --rv-hud-zone: 60px; }
  .rsvp-inner {
    grid-template-columns: 1fr;
    gap: 36px;
    align-items: start;
    padding: 48px 20px 28px;
  }
  .rsvp-shrine { height: min(34vh, 300px); }
  .rsvp-names { font-size: clamp(34px, 9.6vw, 46px); }
  .rsvp-names--long { font-size: clamp(28px, 7.6vw, 36px); }
  .rsvp-panel { max-width: 560px; margin: 0 auto; }
  .rsvp-row { grid-template-columns: 1fr; gap: 22px; }
  .rsvp-question { font-size: 32px; }
}

@media (max-width: 560px) {
  .rsvp-options { grid-template-columns: 1fr; }
  .rsvp-ceremony-list--cols { grid-template-columns: 1fr; }
  .rsvp-submit { width: 100%; justify-content: center; }
  .rsvp-guests { flex-wrap: wrap; }
}

@media (max-width: 360px) {
  .rsvp-inner { padding-left: 16px; padding-right: 16px; }
  .rsvp-eyebrow, .rsvp-kicker { letter-spacing: 0.22em; gap: 8px; }
  .rsvp-diamond-rule { width: 16px; }
  .rsvp-submit { padding-left: 16px; padding-right: 16px; letter-spacing: 0.18em; }
}

@media (prefers-reduced-motion: reduce) {
  .rsvp *,
  .rsvp *::before,
  .rsvp *::after { transition-duration: 0.01ms !important; animation: none !important; }
}

/* ==========================================================================
   PROJECT-FONT LEGIBILITY
   Balivia (the theme's own face) has a small x-height (0.45em) and a closed
   "3" that reads as "8" at small sizes. Labels that were sized for a sans
   face get sensible minimums here; anything showing dates/times stays >= 15px.
   ========================================================================== */
.emblem-sub { font-size: 0.75rem; }
.hud-pill-btn,
.step-tooltip { font-size: 0.8rem; }
.scroll-indicator-text { font-size: 0.78rem; }
.counter-name { font-size: 0.82rem; }
.counter-total { font-size: 0.9rem; }

/* Events */
.mj-header-badge,
.mj-info-tag { font-size: 12.5px; letter-spacing: 0.24em; }
.mj-info-when { font-size: clamp(16px, 1.3vw, 19px); }
.mj-info-venue { font-size: clamp(15px, 1.15vw, 17px); }

/* Countdown */
.tc-eyebrow { font-size: 12.5px; letter-spacing: 0.26em; }
.tc-when-date { font-size: clamp(17px, 1.35vw, 20px); }
.tc-when-time { font-size: 14px; letter-spacing: 0.2em; }
.tc-label { font-size: clamp(11.5px, 1.6cqw, 13.5px); letter-spacing: 0.22em; }

/* RSVP */
.rsvp-eyebrow,
.rsvp-kicker { font-size: 12px; letter-spacing: 0.24em; }
.rsvp-label { font-size: 12px; letter-spacing: 0.18em; }
.rsvp-optional { font-size: 13px; }
.rsvp-option-text strong { font-size: 13px; letter-spacing: 0.12em; }
.rsvp-option-text small { font-size: 15.5px; }
.rsvp-toggle-all,
.rsvp-edit { font-size: 12px; letter-spacing: 0.16em; }
.rsvp-ceremony-date { font-size: 14px; font-weight: normal; letter-spacing: 0.03em; text-transform: none; }
.rsvp-details { font-size: 15.5px; }
.rsvp-submit { font-size: 13px; letter-spacing: 0.2em; }
.rsvp-error, .rsvp-form-error { font-size: 15px; }

@media (max-width: 768px) {
  .tirupati-door-counter { font-size: 0.8rem; }
  .mj-header-badge { font-size: 11.5px; letter-spacing: 0.2em; }
  .tc-eyebrow { font-size: 11.5px; letter-spacing: 0.2em; }
  .door6-corridor-subtitle { font-size: 13.5px; }
}

@container tcframe (max-width: 440px) {
  .tc-label { font-size: 11px; letter-spacing: 0.14em; }
}


/* ==========================================================================
   RESPONSIVE SCALE — every screen from small phones to 4K
   --ui-scale is set by doors-animation.js: 1 for phones, tablets and laptops,
   up to 1.9 on large monitors, down to 0.58 on landscape phones. It is applied
   with `zoom` to in-flow content blocks only (never full-screen backgrounds or
   absolutely offset boxes), so artwork keeps filling the screen while text,
   cards and frames keep their designed proportions.
   ========================================================================== */
:root { --ui-scale: 1; }

/* Door 1 — deities grow with tall screens instead of stopping at 760px.
   The figures are sized by height (--divine-h), so the overlap that brings their
   hands together is a share of that height too: when the glide ends, Lakshmi's
   hand rests inside Venkatesha's hands (10.5%, fitted to the approved artwork),
   on wide laptops, phones and 4K alike. The deities stand tall and low in the
   frame (90% of the screen height), as in the approved Door 1 artwork. Set on the
   scene so the couple's names can be placed from the same measure. */
.divine-scene-content { --divine-h: clamp(400px, 90vh, 1500px); }
.divine-couple-container { height: var(--divine-h); }
.divine-lakshmi-box { margin-right: calc(var(--divine-h) * -0.105); }

/* Door 1 — the couple's names beside the deities are white; the gold glow stays */
.divine-name-badge .divine-script-main { color: #ffffff; }

/* Door 1 — the names stand just beside the deities, not out at the screen edges:
   placed from the centre by the deities' own size (half their width plus a small
   gap), so they stay close on a laptop, a 2K screen or an ultra-wide alike. A long
   name wraps within the space beside the figures instead of running off screen. */
@media (min-width: 901px) and (min-height: 501px) {
  .divine-couple-container { top: 4vh; }
  .divine-name-lakshmi,
  .divine-name-venkatesha {
    max-width: calc(50% - var(--divine-h) * 0.34 - 1.5rem);
    overflow-wrap: anywhere;
  }
  .divine-name-lakshmi { left: auto; right: calc(50% + var(--divine-h) * 0.34); }
  .divine-name-venkatesha { right: auto; left: calc(50% + var(--divine-h) * 0.34); }
  .divine-name-badge .divine-script-main { font-size: clamp(2.5rem, calc(var(--divine-h) * 0.1), 6rem); }
}

/* Door 2 — sacred triad + announcement */
.door2-sanctum-content { zoom: var(--ui-scale); }

/* Door 3 — ceremonies header and details */
.mj-header { width: min(92vw, calc(640px * var(--ui-scale))); }
.mj-info { width: min(88vw, calc(620px * var(--ui-scale))); }
.mj-header > *,
.mj-info > * { zoom: var(--ui-scale); }

/* Door 4 — countdown */
.tc-head,
.tc-frame { zoom: var(--ui-scale); }

/* Door 5 — venue map and details */
.door5-venue-content { zoom: var(--ui-scale); }
@media (min-width: 1441px) {
  .door5-elephant-left,
  .door5-elephant-right { height: clamp(260px, 54vh, 1100px); }
}

/* Elephants guard the bottom corners and never sit behind the venue text */
@media (max-width: 1200px) {
  .door5-elephant-left,
  .door5-elephant-right { height: min(40vh, 30vw); bottom: 0; }
  .door5-elephant-left { left: -3vw; }
  .door5-elephant-right { right: -3vw; }
}

@media (orientation: portrait) and (max-width: 1024px) {
  .door5-elephant-left,
  .door5-elephant-right { height: min(24vh, 46vw); bottom: 0; }
  .door5-elephant-left { left: -8vw; }
  .door5-elephant-right { right: -8vw; }
  .door5-venue-content { margin-bottom: 16vh; }
}

/* Door 6 — gallery heading */
.door6-corridor-typography { max-width: calc(600px * var(--ui-scale)); }
.door6-corridor-typography > * { zoom: var(--ui-scale); }

/* Door 7 — RSVP, all-gods blessing, final blessing */
.rsvp-inner { zoom: var(--ui-scale); }
.door7-all-gods-img { max-height: min(66vh, calc(620px * var(--ui-scale))); }
.door7-all-gods-message,
.door7-blessing > * { zoom: var(--ui-scale); }
.door7-blessing { padding-top: calc(18vh * var(--ui-scale)); }

/* Phones held upright: deities sized to the screen, names set below their
   feet so "Goddess Lakshmi" / "Lord Venkatesha" never cover the figures */
@media (max-width: 600px) and (orientation: portrait) {
  .divine-scene-content { --divine-h: min(60vh, 120vw); }
  .divine-name-lakshmi,
  .divine-name-venkatesha { top: auto; bottom: 12vh; }
  .divine-name-lakshmi { left: 5vw; }
  .divine-name-venkatesha { right: 5vw; }

  /* the all-gods artwork is wide: let it use the full width on phones */
  .door7-all-gods-container { width: 100vw; }
}

/* Landscape phones: deity names sit at the edges, clear of the figures */
@media (orientation: landscape) and (max-height: 500px) {
  .divine-scene-content { --divine-h: 72vh; }
  .divine-name-lakshmi { left: 3vw; }
  .divine-name-venkatesha { right: 9vw; }
  .door7-all-gods-img { max-height: 52vh; }
  .door7-blessing { padding-bottom: 58px; }
  .door5-elephant-left,
  .door5-elephant-right { height: 46vh; }
  /* keep the journey indicator compact so it never meets centred text */
  .counter-name { display: none; }
  .divine-script-prefix { font-size: 1.1rem; }
  .divine-script-main { font-size: 1.6rem; }
}

/* Short portrait phones (e.g. 360x640): names sit lower, under the feet */
@media (max-width: 600px) and (orientation: portrait) and (max-height: 700px) {
  .divine-scene-content { --divine-h: min(56vh, 110vw); }
  .divine-name-lakshmi,
  .divine-name-venkatesha { bottom: 9vh; }
}

/* ==========================================================================
   SUPRABHATAM SOUND CONTROL: gold round button, top-right. Four bars rest
   low when paused and rise like a lamp flame while the chant plays.
   ========================================================================== */
.hud-sound-btn {
  position: absolute;
  top: max(18px, env(safe-area-inset-top));
  right: max(1.25rem, env(safe-area-inset-right));
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  pointer-events: auto;
  font-family: var(--font-balivia);
  -webkit-tap-highlight-color: transparent;
}

.hud-sound-bars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--sacred-border);
  background: rgba(10, 7, 5, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: border-color 0.3s ease, box-shadow 0.4s ease, background 0.3s ease;
}

.hud-sound-bars i {
  display: block;
  width: 2px;
  height: 14px;
  border-radius: 1px;
  background: var(--text-gold);
  transform: scaleY(0.28);
  transition: transform 0.4s ease;
}

.hud-sound-btn:hover .hud-sound-bars,
.hud-sound-btn:focus-visible .hud-sound-bars {
  border-color: var(--text-gold);
  background: rgba(20, 14, 9, 0.75);
}

.hud-sound-btn:focus-visible { outline: none; }
.hud-sound-btn:focus-visible .hud-sound-bars { box-shadow: 0 0 0 3px rgba(239, 191, 4, 0.35); }

.hud-sound-btn.is-playing .hud-sound-bars {
  border-color: rgba(239, 191, 4, 0.7);
  box-shadow: 0 0 18px rgba(239, 191, 4, 0.28);
}

.hud-sound-btn.is-playing .hud-sound-bars i { animation: hud-sound-flame 1.1s ease-in-out infinite alternate; }
.hud-sound-btn.is-playing .hud-sound-bars i:nth-child(2) { animation-duration: 0.8s; animation-delay: -0.3s; }
.hud-sound-btn.is-playing .hud-sound-bars i:nth-child(3) { animation-duration: 1.3s; animation-delay: -0.6s; }
.hud-sound-btn.is-playing .hud-sound-bars i:nth-child(4) { animation-duration: 0.95s; animation-delay: -0.2s; }

@keyframes hud-sound-flame {
  from { transform: scaleY(0.3); }
  to { transform: scaleY(1); }
}

.hud-sound-hint {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--sacred-border-soft);
  background: rgba(10, 7, 5, 0.6);
  color: var(--text-gold);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(8px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  pointer-events: none;
}

.hud-sound-btn.show-hint .hud-sound-hint { opacity: 1; transform: none; }

@media (max-width: 768px) {
  .hud-sound-btn { top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); }
  .hud-sound-bars { width: 40px; height: 40px; }
  .hud-sound-hint { font-size: 11px; letter-spacing: 0.14em; padding: 6px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .hud-sound-btn.is-playing .hud-sound-bars i { animation: none; transform: scaleY(0.8); }
}

/* ==========================================================================
   ONLY THE DOOR ON SCREEN IS DRAWN
   A layer the journey has faded to nothing leaves the frame (doors-animation.js
   cullLayers): nothing behind the door on screen is painted, composited or
   animated, the way the Maharashtra Wada opening keeps its camera smooth.
   ========================================================================== */
.tb-culled { visibility: hidden !important; }

/* ==========================================================================
   JOURNEY MOMENTS (doors-animation.js addJourneyMoments) — light only
   ========================================================================== */

/* Door 1: warm light behind the deities, pulsed once as their hands meet (sacred-journey.js) */
.darshan-aarti-glow {
  position: absolute;
  left: 50%;
  top: 54%;
  width: min(90vh, 110vw);
  height: min(90vh, 110vw);
  margin: calc(min(90vh, 110vw) / -2) 0 0 calc(min(90vh, 110vw) / -2);
  background: radial-gradient(circle at 50% 50%, rgba(255, 214, 128, 0.7) 0%, rgba(255, 200, 90, 0.3) 30%, rgba(239, 191, 4, 0.1) 50%, transparent 68%);
  mix-blend-mode: screen;
  pointer-events: none;
  opacity: 0;
  will-change: transform, opacity;
}

/* Each closed door: light along the line where its halves meet, and a faint
   spill on the floor in front of it, before the door begins to open */
.door-threshold-light {
  position: absolute;
  /* sized by the screen's height, as the door artwork is, so the light matches
     the door on a phone held upright as well as on a wide screen */
  left: calc(50% - 32vh);
  width: 64vh;
  top: 18%;
  height: 74%;
  z-index: 30;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0;
  background:
    radial-gradient(ellipse 7% 46% at 50% 46%, rgba(255, 222, 150, 0.85) 0%, rgba(255, 200, 100, 0.32) 40%, transparent 75%),
    radial-gradient(ellipse 26% 52% at 50% 46%, rgba(255, 200, 100, 0.16) 0%, transparent 70%),
    radial-gradient(ellipse 46% 7% at 50% 96%, rgba(255, 210, 130, 0.42) 0%, rgba(255, 190, 90, 0.12) 50%, transparent 78%);
  will-change: opacity;
}

/* ==========================================================================
   THE SACRED JOURNEY (sacred-journey.js) — the shared spatial language
   ========================================================================== */

/* Door 1: the aarti light only ever pulses once, as the deities' hands meet */
.darshan-aarti-glow { transform-origin: 50% 50%; }

/* Door 7: the all-gods darshan assembles — the outer deities, softly masked,
   drift in onto the picture beneath (hidden unless the journey moves them) */
.door7-gods-frame { position: relative; width: 100%; }
.door7-gods-frame .door7-all-gods-img { display: block; margin: 0 auto; }
.door7-gods-part {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
  user-select: none;
  will-change: transform, opacity;
}
.door7-gods-part--left {
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 24%, transparent 42%);
  mask-image: linear-gradient(90deg, #000 0%, #000 24%, transparent 42%);
}
.door7-gods-part--right {
  -webkit-mask-image: linear-gradient(270deg, #000 0%, #000 24%, transparent 42%);
  mask-image: linear-gradient(270deg, #000 0%, #000 24%, transparent 42%);
}

/* Door 7: warmer air for a moment as the final darshan completes — a soft
   wash, not a flash: no white, no ring, no flare */
.door7-arrival-glow {
  position: absolute;
  inset: 0;
  z-index: 11;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: soft-light;
  background: radial-gradient(ellipse 60% 70% at 50% 46%, rgba(255, 196, 110, 0.55) 0%, rgba(255, 170, 70, 0.22) 45%, transparent 80%);
  will-change: opacity;
}

/* Door 7: the breeze passes over the final darshan and under the blessing */
.door7-breeze { position: absolute; inset: 0; z-index: 12; pointer-events: none; }
.door7-breeze .flower-shower--back { z-index: 1; }
.door7-breeze .flower-shower--front { z-index: 2; }

/* Desktop mouse depth: background layers are a hair larger so the 2px of
   movement never shows an edge */
.tb-depth .darshan-bg-img,
.tb-depth .door2-bg-img,
.tb-depth .door3-bg-img,
.tb-depth .door5-bg-img,
.tb-depth .door6-bg-img,
.tb-depth .door7-bg-img,
.tb-depth .door7-final-sanctum-img { scale: 1.004; }

@media (prefers-reduced-motion: reduce) {
  .door7-gods-part,
  .door7-arrival-glow { display: none; }
}
