/* ───────────────────────── Tokens ───────────────────────── */
:root {
  --maroon: #6b1430;
  --maroon-deep: #3f0a1b;
  --gold: #d9a441;
  --gold-bright: #f5c96a;
  --gold-pale: #ffe7b5;
  --saffron: #f2801f;
  --haldi: #e9a400;
  --ink: #3b1020;
  --muted: #7a4b52;
  --paper-1: #fffdf7;
  --paper-2: #fff4e2;
  --paper-3: #fbe9cf;
  /* Laila forms Marathi conjuncts (स्म, त्र, र्व…) correctly, unlike Yatra One.
     Only its 600 weight is loaded, so headings set to 400 still render at 600. */
  --font-display: 'Laila', 'Tiro Devanagari Marathi', serif;
  --font-serif: 'Tiro Devanagari Marathi', Georgia, serif;
  --font-body: 'Mukta', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 20px;
  --shadow: 0 24px 70px rgba(40, 6, 16, 0.38);

  /* corner flourishes for the invitation cards */
  --corner: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 60'%3E%3Cg fill='none' stroke='%237a1730' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='M3 57V15Q3 3 15 3h42'/%3E%3Cpath d='M9 50V19q0-10 10-10h31' stroke='%23d9a441'/%3E%3Cpath d='M16 30c0-8 6-14 14-14' stroke='%23d9a441'/%3E%3C/g%3E%3Cpath d='M17 17c7 0 11 4 11 11-7 0-11-4-11-11z' fill='%23d9a441'/%3E%3Ccircle cx='15' cy='15' r='3' fill='%237a1730'/%3E%3Ccircle cx='38' cy='9' r='1.6' fill='%237a1730'/%3E%3Ccircle cx='9' cy='38' r='1.6' fill='%237a1730'/%3E%3C/svg%3E");
  /* carved lattice for the golden doors */
  --lattice: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%236b3f08' stroke-opacity='.55' stroke-width='2'%3E%3Cpath d='M40 4L76 40 40 76 4 40z'/%3E%3Ccircle cx='40' cy='40' r='11'/%3E%3C/g%3E%3Cg fill='%23fff1c4' fill-opacity='.35'%3E%3Cpath d='M40 30c3 4 3 6 0 10-3-4-3-6 0-10zM40 50c-3-4-3-6 0-10 3 4 3 6 0 10zM30 40c4-3 6-3 10 0-4 3-6 3-10 0zM50 40c-4 3-6 3-10 0 4-3 6-3 10 0z'/%3E%3C/g%3E%3Ccircle cx='40' cy='40' r='2.5' fill='%236b3f08' fill-opacity='.6'/%3E%3Ccircle cx='0' cy='0' r='4' fill='%236b3f08' fill-opacity='.4'/%3E%3Ccircle cx='80' cy='0' r='4' fill='%236b3f08' fill-opacity='.4'/%3E%3Ccircle cx='0' cy='80' r='4' fill='%236b3f08' fill-opacity='.4'/%3E%3Ccircle cx='80' cy='80' r='4' fill='%236b3f08' fill-opacity='.4'/%3E%3C/svg%3E");
}

/* ───────────────────────── Base ───────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: #2a0c18;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.is-loading,
body.is-locked {
  overflow: hidden;
}
:focus-visible {
  outline: 3px solid #ffb02e;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}

#scene {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 0;
}
@supports (height: 100lvh) {
  #scene {
    height: 100lvh;
  }
}
.sky-fallback {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: none;
  background: linear-gradient(180deg, #2b1b4a 0%, #7d3a6a 38%, #e07a5f 68%, #ffd8a0 100%);
}
body.no-webgl .sky-fallback {
  display: block;
}
body.no-webgl #scene {
  display: none;
}

main {
  position: relative;
  z-index: 2;
}

/* ───────────────────────── Sections ───────────────────────── */
.stop {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 104px clamp(16px, 6vw, 110px) 64px;
}
.stop[data-panel='left'] {
  justify-content: flex-start;
}
.stop[data-panel='right'] {
  justify-content: flex-end;
}
.stop[data-panel='center'] {
  justify-content: center;
}

/* ───────────────────────── Invitation card ───────────────────────── */
.panel {
  position: relative;
  width: min(100%, 500px);
  padding: 38px 36px 32px;
  border-radius: var(--radius);
  color: var(--ink);
  /* top-left flourish here; the other three corners are pseudo-elements */
  background:
    var(--corner) top 10px left 10px / 50px no-repeat,
    radial-gradient(130% 90% at 50% 0%, var(--paper-1) 0%, var(--paper-2) 62%, var(--paper-3) 100%);
  box-shadow:
    var(--shadow),
    inset 0 0 0 1px rgba(217, 164, 65, 0.75),
    inset 0 0 0 6px var(--paper-2),
    inset 0 0 0 7px rgba(217, 164, 65, 0.55);
  opacity: 0;
  transform: translateY(34px) scale(0.985);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
/* mirrored corner flourishes */
.panel::before,
.panel::after {
  content: '';
  position: absolute;
  width: 50px;
  height: 50px;
  background: var(--corner) center / contain no-repeat;
  pointer-events: none;
}
.panel::before {
  top: 10px;
  right: 10px;
  transform: scaleX(-1);
}
.panel::after {
  bottom: 10px;
  right: 10px;
  transform: scale(-1, -1);
}
.panel > .panel__head::before {
  content: '';
  position: absolute;
  bottom: 10px;
  left: 10px;
  width: 50px;
  height: 50px;
  background: var(--corner) center / contain no-repeat;
  transform: scaleY(-1);
  pointer-events: none;
}
.stop.is-in .panel {
  opacity: 1;
  transform: none;
}

.panel__head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 0 16px;
}
.panel__head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(27px, 3.1vw, 34px);
  line-height: 1.2;
  color: var(--maroon);
  text-align: center;
}
.orn {
  color: var(--gold);
  font-size: 16px;
}
.sub {
  text-align: center;
  color: var(--muted);
  margin: -6px 0 16px;
}
.lead {
  text-align: center;
  margin: 0 0 16px;
}
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--gold);
  margin: 16px 0;
}
.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* invite */
.couplet {
  text-align: center;
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.9;
  color: var(--maroon);
  margin: 0;
}
.salutation {
  text-align: center;
  font-size: 18px;
  margin: 0 0 6px;
}
.salutation strong {
  color: var(--maroon);
  font-weight: 700;
}

/* ───────────────────────── Hero ───────────────────────── */
.stop--hero {
  align-items: flex-start;
  padding-top: max(92px, 11vh);
  text-align: center;
}
.hero {
  max-width: 920px;
  color: #fff;
}
.hero__invocations {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 22px;
  margin: 0;
  font-family: var(--font-serif);
  font-size: 15px;
  color: #fff3d6;
  text-shadow: 0 1px 10px rgba(60, 10, 20, 0.75);
}
.hero__kicker {
  margin: 16px 0 0;
  font-family: var(--font-display);
  font-size: clamp(20px, 2.3vw, 28px);
  color: #fff0c9;
  text-shadow: 0 2px 14px rgba(80, 10, 30, 0.7);
}
.hero__names {
  margin: 2px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0 0.22em;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(56px, 9.5vw, 128px);
  line-height: 1.12;
  background: linear-gradient(180deg, #fffaf0 0%, #ffe09a 50%, #f0a93e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 16px rgba(70, 8, 26, 0.65));
}
.hero__heart {
  font-size: 0.42em;
  -webkit-text-fill-color: #ff4f72;
  color: #ff4f72;
  animation: beat 1.6s ease-in-out infinite;
}
.hero__date {
  margin: 4px 0 0;
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 600;
  text-shadow: 0 2px 12px rgba(60, 10, 20, 0.8);
}
.hero__place {
  margin: 2px 0 0;
  font-size: 16px;
  color: #fff0c9;
  text-shadow: 0 2px 10px rgba(60, 10, 20, 0.8);
}
/* Laila's Latin letters are wider than its Devanagari, so the English names
   need a smaller size to stay on one line. */
html[lang='en'] .hero__names {
  font-size: clamp(38px, 7.4vw, 104px); /* one line down to ~360px-wide phones */
}
html[lang='en'] .hero__place {
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-size: 14px;
}
.scroll-cue {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  text-shadow: 0 2px 10px rgba(60, 10, 20, 0.8);
}
.scroll-cue i {
  position: relative;
  width: 24px;
  height: 38px;
  border: 2px solid currentColor;
  border-radius: 14px;
}
.scroll-cue i::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 7px;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: currentColor;
  animation: wheel 1.8s ease-in-out infinite;
}

/* ───────────────────────── Couple ───────────────────────── */
.panel--couple {
  width: min(100%, 640px);
}
.couple {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: start;
  text-align: center;
}
.person__label {
  margin: 0;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.08em;
  color: #b07a1f;
}
.person__name {
  margin: 2px 0 8px;
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--maroon);
  font-size: clamp(36px, 4vw, 48px);
  line-height: 1.1;
}
.person__name small {
  display: block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  color: var(--muted);
}
.person__lines {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--muted);
}
.couple__emblem {
  padding-top: 34px;
}
.couple__emblem svg {
  width: 58px;
  height: 58px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 2.4;
}
.couple__emblem .fill,
.fill {
  fill: var(--gold);
  stroke: none;
}
.couple__title {
  margin: 18px 0 0;
  padding-top: 12px;
  border-top: 1px solid rgba(217, 164, 65, 0.5);
  text-align: center;
  font-family: var(--font-display);
  font-size: 25px;
  color: var(--maroon);
}
.couple__title span {
  color: var(--gold);
  font-size: 0.7em;
}

/* ───────────────────────── Events ───────────────────────── */
.event {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: grid;
  gap: 12px;
}
.event li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 17.5px;
}
.event strong {
  color: var(--maroon);
}
.event svg,
.venue__address svg,
.venue__when svg {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 3px;
  fill: none;
  stroke: var(--maroon);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.panel--haldi {
  --haldi-tint: rgba(246, 185, 22, 0.16);
}
.panel--haldi .panel__head h2 {
  color: #9a5b00;
}
.panel--haldi .event {
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--haldi-tint);
  box-shadow: inset 0 0 0 1px rgba(233, 164, 0, 0.45);
}
.panel--haldi .event svg {
  stroke: #9a5b00;
}

.tithi {
  margin: 0;
  text-align: center;
  font-family: var(--font-serif);
  color: var(--muted);
}
.muhurat__day {
  margin: 6px 0 0;
  text-align: center;
  font-weight: 700;
  font-size: 19px;
}
.muhurat__time {
  margin: 0 0 10px;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(25px, 2.9vw, 32px);
  color: var(--maroon);
}
.countdown {
  padding: 14px 12px 12px;
  border-radius: 16px;
  text-align: center;
  color: var(--gold-pale);
  background: linear-gradient(180deg, #74183a, #45091f);
  box-shadow: inset 0 0 0 1px rgba(245, 201, 106, 0.55), 0 10px 24px rgba(60, 8, 24, 0.3);
}
.countdown__title {
  margin: 0 0 6px;
  font-size: 14px;
  letter-spacing: 0.04em;
  opacity: 0.9;
}
.countdown__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.countdown__cell b {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.15;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.countdown__cell span {
  font-size: 12.5px;
  opacity: 0.85;
}
.countdown__done {
  margin: 4px 0;
  font-family: var(--font-display);
  font-size: 26px;
}

.cal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}
.cal__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}
.cal__label svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}
.chip {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid rgba(107, 20, 48, 0.35);
  background: #fff;
  color: var(--maroon);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.chip:hover {
  background: var(--maroon);
  color: #fff;
}

/* ───────────────────────── Buttons ───────────────────────── */
.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s;
}
.btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn--gold {
  color: #3b0a17;
  background: linear-gradient(180deg, #ffe39a, #f2b53e 55%, #d58f1d);
  box-shadow: 0 6px 18px rgba(213, 143, 29, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.btn--ghost {
  color: var(--maroon);
  background: rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 0 0 1.5px rgba(107, 20, 48, 0.4);
}
.btn--whatsapp {
  width: 100%;
  color: #fff;
  background: linear-gradient(180deg, #31d46d, #1a9f4c);
  box-shadow: 0 8px 22px rgba(26, 159, 76, 0.35);
}
.btn--whatsapp svg .fill {
  fill: currentColor;
  stroke: none;
}
.btn--share {
  width: 100%;
  margin-top: 10px;
}

/* ───────────────────────── Venue ───────────────────────── */
.venue__name {
  margin: 0;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(32px, 3.6vw, 42px);
  color: var(--maroon);
  line-height: 1.2;
}
.venue__address,
.venue__when {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 4px 0 0;
  color: var(--muted);
  text-align: center;
}
.venue__address svg,
.venue__when svg {
  margin-top: 0;
  width: 19px;
  height: 19px;
}
.map {
  margin: 16px 0;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;
  background: #f3e3cc;
  box-shadow: 0 0 0 2px var(--gold), 0 10px 24px rgba(60, 10, 20, 0.2);
}
.map iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ───────────────────────── Gallery ───────────────────────── */
.panel--gallery {
  width: min(100%, 560px);
}
.frames {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.frame {
  position: relative;
  aspect-ratio: 3 / 4;
  padding: 0;
  border: 0;
  overflow: hidden;
  border-radius: 999px 999px 14px 14px;
  background: linear-gradient(180deg, #7a1730, #45091f);
  cursor: pointer;
}
.frame::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 3px var(--gold), inset 0 0 0 6px rgba(63, 10, 27, 0.9), inset 0 0 0 7px rgba(245, 201, 106, 0.7);
  pointer-events: none;
}
.frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.frame:hover img {
  transform: scale(1.06);
}
.frame--empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: default;
  color: var(--gold-bright);
}
.frame__motif {
  font-size: 32px;
  line-height: 1;
}
.frame__soon {
  font-size: 12px;
  color: var(--gold-pale);
  opacity: 0.8;
  text-align: center;
  padding: 0 6px;
}

/* ───────────────────────── Family ───────────────────────── */
.panel--family {
  width: min(100%, 1000px);
}
.verse {
  max-width: 660px;
  margin: 0 auto 24px;
  padding: 16px 20px;
  border-radius: 14px;
  text-align: center;
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.95;
  color: var(--maroon);
  background: rgba(217, 164, 65, 0.12);
  border: 1px dashed rgba(217, 164, 65, 0.75);
}
.fam-grid {
  display: grid;
  gap: 28px;
}
.fam h3 {
  margin: 0 0 8px;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
  color: var(--maroon);
}
/* Every family list: two balanced columns, centred as one block under its
   heading, filled top-to-bottom (--rows is set per list in ui.js). */
.names {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 15.5px;
  line-height: 1.8;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, max-content));
  grid-template-rows: repeat(var(--rows, 1), auto);
  grid-auto-flow: column;
  justify-content: center;
  column-gap: 64px;
}
.names li {
  position: relative;
  padding-left: 18px;
}
.names li::before {
  content: '✿';
  position: absolute;
  left: 0;
  top: 0.15em;
  font-size: 11px;
  color: var(--gold);
}
.fam--inviters .names {
  grid-template-columns: minmax(0, max-content);
  grid-template-rows: none;
  grid-auto-flow: row;
  text-align: center;
  font-weight: 600;
  font-size: 17px;
}
.fam--inviters .names li {
  padding-left: 0;
}
.fam--inviters .names li::before {
  content: none;
}
.fam--memory .names li::before {
  content: '❁';
}
.fam--kids p {
  margin: 0;
  text-align: center;
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--maroon);
}

/* ───────────────────────── RSVP ───────────────────────── */
.panel--rsvp {
  width: min(100%, 470px);
}
.rsvp {
  display: grid;
  gap: 14px;
}
.field {
  display: grid;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.field > span,
.field legend {
  padding: 0;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--muted);
}
.field legend {
  margin-bottom: 4px;
}
.rsvp input[type='text'],
.rsvp textarea,
.stepper input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid rgba(107, 20, 48, 0.25);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}
.rsvp textarea {
  resize: vertical;
}
.rsvp input:focus,
.rsvp textarea:focus {
  outline: none;
  border-color: var(--saffron);
  box-shadow: 0 0 0 3px rgba(242, 128, 31, 0.25);
}
.stepper {
  display: flex;
  align-items: center;
  gap: 8px;
  width: max-content;
}
.stepper button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid rgba(107, 20, 48, 0.35);
  background: #fff;
  color: var(--maroon);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.stepper input {
  width: 74px;
  text-align: center;
  -moz-appearance: textfield;
  appearance: textfield;
}
.stepper input::-webkit-inner-spin-button,
.stepper input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 3px 0;
  font-size: 16px;
  cursor: pointer;
}
.check input {
  width: 20px;
  height: 20px;
  accent-color: var(--maroon);
}
.form-error {
  min-height: 1.2em;
  margin: -4px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: #b3261e;
}
.closing {
  margin-top: 18px;
  text-align: center;
}
.closing__samast {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
  color: #b07a1f;
}
.closing__family {
  margin: 0;
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.3;
  color: var(--maroon);
}
.closing__names {
  margin: 8px 0 0;
  font-family: var(--font-display);
  color: var(--muted);
}
.closing__names span {
  color: #e0365a;
}

/* ───────────────────────── Top bar & dots ───────────────────────── */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px clamp(14px, 3vw, 28px);
  padding-top: max(14px, env(safe-area-inset-top));
  pointer-events: none;
}
.topbar > * {
  pointer-events: auto;
}
.monogram,
.pill,
.icon-btn {
  color: var(--gold-pale);
  background: rgba(63, 10, 27, 0.58);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 0 0 1px rgba(245, 201, 106, 0.6), 0 6px 18px rgba(30, 4, 12, 0.25);
}
.monogram {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 15px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 19px;
  text-decoration: none;
}
.monogram i {
  margin: 0 5px;
  font-style: normal;
  font-size: 13px;
  color: #ff6b88;
}
.topbar__actions {
  display: flex;
  gap: 10px;
}
.pill {
  height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.icon-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}
.icon-btn svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}
.icon-btn .icon-off,
.icon-btn:not(.is-on) .icon-on {
  display: none;
}
.icon-btn:not(.is-on) .icon-off {
  display: block;
}
.icon-btn.is-on {
  animation: pulse 2.4s ease-in-out infinite;
}

.dots {
  position: fixed;
  right: 18px;
  top: 50%;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 13px;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 0.6s;
}
body.is-open .dots {
  opacity: 1;
}
.dots a {
  position: relative;
  display: block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(255, 231, 181, 0.3);
  box-shadow: inset 0 0 0 1.5px rgba(245, 201, 106, 0.95), 0 0 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.25s, background 0.25s;
}
.dots a.is-active {
  background: var(--gold-bright);
  transform: scale(1.4);
}
.dots a span {
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 13px;
  color: #fff;
  background: rgba(63, 10, 27, 0.8);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.dots a:hover span,
.dots a:focus-visible span {
  opacity: 1;
}

/* ───────────────────────── Loader ───────────────────────── */
.loader {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--gold-pale);
  background: radial-gradient(circle at 50% 42%, #6b1430 0%, #3f0a1b 55%, #22050f 100%);
  transition: opacity 0.8s ease, visibility 0.8s;
}
.loader.is-done {
  opacity: 0;
  visibility: hidden;
}
.loader__diya {
  position: relative;
  width: 96px;
  height: 92px;
}
.loader__flame {
  position: absolute;
  left: 50%;
  bottom: 34px;
  width: 22px;
  height: 42px;
  margin-left: -11px;
  border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  background: radial-gradient(ellipse at 50% 72%, #fff8d6 0%, #ffd15c 34%, #ff8a1c 70%, rgba(255, 90, 0, 0) 100%);
  filter: drop-shadow(0 0 18px #ffb347);
  transform-origin: 50% 100%;
  animation: flicker 1.1s ease-in-out infinite alternate;
}
.loader__bowl {
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 84px;
  height: 30px;
  margin-left: -42px;
  border-radius: 0 0 42px 42px / 0 0 30px 30px;
  background: linear-gradient(180deg, #d0743a, #7a3214);
  box-shadow: inset 0 4px 0 #e89a5e;
}
.loader__invocation {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-size: 24px;
}
.loader__text {
  margin: 0;
  font-size: 15px;
  opacity: 0.8;
}
.loader__bar {
  width: 180px;
  height: 3px;
  margin-top: 12px;
  border-radius: 3px;
  overflow: hidden;
  background: rgba(255, 231, 181, 0.2);
}
.loader__bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #f5c96a, #ff8a1c);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}

/* ───────────────────────── Golden temple doors ───────────────────────── */
.doors {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1800px;
  padding: 16px;
}
.doors__panel {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50.2%;
  background:
    var(--lattice) center / 76px 76px,
    linear-gradient(115deg, #7a4a0c 0%, #c98d2a 22%, #f3cf7a 42%, #d39a35 58%, #a46a16 78%, #6e4108 100%);
  transition: transform 1.9s cubic-bezier(0.55, 0.05, 0.25, 1), filter 1.9s;
  backface-visibility: hidden;
}
.doors__panel--left {
  left: 0;
  transform-origin: left center;
  box-shadow: inset -3px 0 0 #5c3606, inset -9px 0 0 rgba(255, 230, 160, 0.35), inset 0 0 120px rgba(60, 30, 0, 0.55);
}
.doors__panel--right {
  right: 0;
  transform-origin: right center;
  box-shadow: inset 3px 0 0 #5c3606, inset 9px 0 0 rgba(255, 230, 160, 0.35), inset 0 0 120px rgba(60, 30, 0, 0.55);
}
.doors__carving {
  position: absolute;
  inset: 5% 9%;
  border-radius: 10px;
  box-shadow:
    inset 0 0 0 3px rgba(92, 54, 6, 0.75),
    inset 0 0 0 10px rgba(255, 232, 170, 0.22),
    inset 0 0 0 12px rgba(92, 54, 6, 0.55),
    0 0 0 2px rgba(255, 232, 170, 0.3);
}
.doors__panel--left::after,
.doors__panel--right::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 30px;
  height: 30px;
  margin-top: 120px;
  border-radius: 50%;
  border: 4px solid #5c3606;
  box-shadow: 0 0 0 2px rgba(255, 232, 170, 0.5), inset 0 0 0 2px rgba(255, 232, 170, 0.4);
}
.doors__panel--left::after {
  right: 26px;
}
.doors__panel--right::after {
  left: 26px;
}
.doors.is-opening .doors__panel--left {
  transform: rotateY(-102deg);
  filter: brightness(0.6);
}
.doors.is-opening .doors__panel--right {
  transform: rotateY(102deg);
  filter: brightness(0.6);
}
.doors__content {
  position: relative;
  z-index: 2;
  width: min(100%, 440px);
  padding: 64px 28px 30px;
  border-radius: 230px 230px 24px 24px;
  text-align: center;
  color: var(--gold-pale);
  background: radial-gradient(circle at 50% 28%, #7d1a3c 0%, #4a0d21 70%);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    inset 0 0 0 2px var(--gold),
    inset 0 0 0 9px #4a0d21,
    inset 0 0 0 10px rgba(245, 201, 106, 0.6);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.doors.is-opening .doors__content {
  opacity: 0;
  transform: scale(0.94);
}
.doors__invocation {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 15px;
  opacity: 0.9;
}
.doors__kicker {
  margin: 10px 0 0;
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--gold-bright);
}
.doors__names {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 4px 0;
  font-family: var(--font-display);
  font-size: clamp(40px, 9vw, 56px);
  line-height: 1.1;
  color: #fff3d6;
}
.doors__names i {
  font-style: normal;
  font-size: 0.45em;
  margin: 0.1em 0 0.4em; /* clear of the tall ि matra in हितेश */
  color: #ff6b88;
  animation: beat 1.6s ease-in-out infinite;
}
.doors__date {
  margin: 2px 0 0;
  font-weight: 600;
}
.doors__guest {
  margin: 12px 0 0;
  font-size: 18px;
}
.doors__guest strong {
  color: var(--gold-bright);
}
.btn--open {
  margin-top: 20px;
  padding: 14px 30px;
  font-size: 18px;
  animation: glow 2.6s ease-in-out infinite;
}
.doors__hint {
  margin: 12px 0 0;
  font-size: 12.5px;
  opacity: 0.7;
}

/* ───────────────────────── Toast & lightbox ───────────────────────── */
.toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 70;
  max-width: 90vw;
  padding: 10px 18px;
  border-radius: 999px;
  text-align: center;
  color: var(--gold-pale);
  background: rgba(40, 6, 16, 0.92);
  box-shadow: inset 0 0 0 1px rgba(245, 201, 106, 0.5);
  opacity: 0;
  transform: translate(-50%, 20px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}
.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(20, 4, 10, 0.92);
}
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 12px;
  box-shadow: 0 0 0 3px var(--gold);
}
.lightbox__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
  color: var(--gold-pale);
  background: rgba(63, 10, 27, 0.8);
  cursor: pointer;
}

.noscript {
  position: relative;
  z-index: 5;
  max-width: 600px;
  margin: 15vh auto;
  padding: 24px;
  color: #fff;
  text-align: center;
}

/* ───────────────────────── Animations ───────────────────────── */
@keyframes beat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.18); }
  30% { transform: scale(1); }
  45% { transform: scale(1.12); }
}
@keyframes wheel {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(12px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}
@keyframes flicker {
  0% { transform: scale(1, 1) rotate(-2deg); }
  50% { transform: scale(0.93, 1.07) rotate(2deg); }
  100% { transform: scale(1.04, 0.95) rotate(-1deg); }
}
@keyframes glow {
  0%, 100% { box-shadow: 0 6px 18px rgba(213, 143, 29, 0.45), 0 0 0 0 rgba(245, 201, 106, 0.55); }
  50% { box-shadow: 0 6px 18px rgba(213, 143, 29, 0.45), 0 0 0 12px rgba(245, 201, 106, 0); }
}
@keyframes pulse {
  0%, 100% { box-shadow: inset 0 0 0 1px rgba(245, 201, 106, 0.6), 0 0 0 0 rgba(245, 201, 106, 0.45); }
  50% { box-shadow: inset 0 0 0 1px rgba(245, 201, 106, 0.6), 0 0 0 8px rgba(245, 201, 106, 0); }
}

/* ───────────────────────── Small screens ───────────────────────── */
@media (max-width: 760px) {
  body {
    font-size: 16px;
  }
  .stop,
  .stop[data-panel] {
    justify-content: center;
    align-items: flex-end;
    padding: 84px 12px max(20px, env(safe-area-inset-bottom));
  }
  .stop.stop--hero {
    align-items: flex-end;
    padding-bottom: 9vh;
  }
  .hero__invocations {
    font-size: 12.5px;
    gap: 2px 12px;
  }
  .panel {
    padding: 30px 20px 24px;
  }
  .panel::before,
  .panel::after,
  .panel > .panel__head::before {
    width: 40px;
    height: 40px;
  }
  .panel {
    background-size: 40px, auto;
  }
  .couple {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .couple__emblem {
    padding: 0;
  }
  .couple__emblem svg {
    width: 44px;
    height: 44px;
  }
  .fam-grid {
    gap: 22px;
  }
  .names {
    grid-template-columns: minmax(0, max-content);
    grid-template-rows: none;
    grid-auto-flow: row;
  }
  .frames {
    grid-template-columns: repeat(2, 1fr);
  }
  .dots {
    display: none;
  }
  .monogram {
    font-size: 17px;
    height: 40px;
    padding: 0 12px;
  }
  .pill {
    height: 40px;
    padding: 0 14px;
  }
  .icon-btn {
    width: 40px;
    height: 40px;
  }
  .doors__panel::after {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
