/* The original illustrated friends lead the story; one conversation at a time. */
.illustrated-scene {
  display: block;
  background: #1b372d;
  padding: 0;
  min-height: 900px;
  min-height: 100svh;
}
.illustrated-scene .scene-art {
  z-index: -4;
}
.illustrated-scene .scene-art img {
  object-position: center;
  filter: saturate(1.08);
}
.story-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    #0b211acf,
    transparent 36%,
    transparent 67%,
    #0b211a
  );
}
.illustrated-scene .story-title {
  position: relative;
  top: auto;
  left: auto;
  width: auto;
  max-width: none;
  padding: 132px var(--gutter) 0;
  z-index: 5;
  pointer-events: none;
  text-align: center;
}
.illustrated-scene .story-title h1 {
  font-size: clamp(38px, 4vw, 62px);
  line-height: 1.1;
  letter-spacing: -0.025em;
}
.illustrated-scene .story-title h2 {
  font-size: clamp(29px, 3vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.dialogue-track {
  position: relative;
  z-index: 7;
  margin: 30px auto 0;
  width: min(560px, 82%);
  display: grid;
  gap: 18px;
}
.dialogue-beat {
  position: relative;
  border: 1px solid #dfc397;
  background: #fff3d9;
  color: #253d30;
  padding: 20px 29px 24px;
  border-radius: 22px 22px 22px 5px;
  box-shadow: 0 12px 32px #24150d35;
  font: 500 29px/1.26 var(--serif);
}
.dialogue-beat .speaker {
  font: 600 10px/1.5 var(--sans);
  display: block;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #6f7354;
  margin-bottom: 6px;
}
.dialogue-beat q {
  quotes: none;
}
.dialogue-beat q:before,
.dialogue-beat q:after {
  content: none;
}
.dialogue-beat:after {
  content: "";
  position: absolute;
  bottom: -15px;
  left: 24%;
  width: 24px;
  height: 25px;
  background: #fff3d9;
  clip-path: polygon(0 0, 100% 0, 0 100%);
}
.dialogue-beat[data-speaker="her"] {
  border-radius: 22px 22px 5px 22px;
  background: #ffe5df;
  border-color: #dab1a4;
}
.dialogue-beat[data-speaker="her"]:after {
  left: auto;
  right: 24%;
  background: #ffe5df;
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}
.dialogue-beat[data-speaker="her"] .speaker {
  color: #8a554f;
}
.story-cast {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}
.story-person {
  position: absolute;
  bottom: 17%;
  width: min(32vw, 355px, 43svh);
  aspect-ratio: 1;
  left: 34%;
  transform: translateX(-50%)
    translate3d(var(--person-x, 0px), var(--person-y, 0px), 0)
    scale(var(--person-scale, 1)) rotate(var(--person-tilt, 0deg));
  transform-origin: 50% 85%;
  opacity: var(--person-opacity, 1);
  filter: drop-shadow(0 15px 10px #25140550);
}
.story-person.woman {
  left: 65%;
}
.story-person i {
  display: block;
  width: 100%;
  height: 100%;
  background: url(assets/story/character.webp) left top/200% 200% no-repeat;
}
.story-person.woman i {
  background-image: url(assets/story/scroll/woman.webp);
}
.story-person.gift i {
  background-image: url(assets/story/scroll/invitation-poses.webp);
}
.story-person[data-pose="walk"] i {
  background-position: 100% 0;
}
.story-person[data-pose="pray"] i {
  background-position: 0 100%;
}
.story-person[data-pose="dance"] i {
  background-position: 100% 100%;
}
/* The opening's silk descent lives only in the first animated scene. */
.dupatta-descent { display: none; }
.cinematic .story-meet .story-person > i { opacity: var(--landed, 0); }
.cinematic .story-meet .dupatta-descent {
  display: block;
  position: absolute;
  inset: auto 0 0;
  aspect-ratio: 3 / 4;
  opacity: calc(1 - var(--landed, 0));
  transform: translateY(var(--descent-y, -125svh)) rotate(var(--descent-turn, 0deg));
  transform-origin: 54% 0;
  pointer-events: none;
}
.dupatta-descent img { display: block; width: 100%; height: 100%; }
.dupatta-silk {
  position: absolute;
  bottom: calc(100% - 2px);
  left: 54%;
  width: 7.5%;
  height: 150svh;
  transform: translateX(-50%);
  background: linear-gradient(90deg, #520c22, #a91537 22%, #d44357 30%, #6b0924 48%, #991131 76%, #e2b962 80%, #fff0ab 83%, #8b5624 88%, #d6aa54 94%, #631024);
  border-radius: 40% 10% 0 0;
}
.woman .dupatta-silk { left: 46%; }
.cinematic #beginning .story-title,
.cinematic #beginning .dialogue-track {
  opacity: calc(var(--copy-opacity, 1) * var(--arrival-copy, 0));
}
@media (prefers-reduced-motion: reduce) {
  .cinematic .story-meet .dupatta-descent { display: none; }
  .cinematic .story-meet .story-person > i { opacity: 1; }
}
.story-car {
  position: absolute;
  left: 50%;
  bottom: 15%;
  width: min(67vw, 900px);
  z-index: 5;
  pointer-events: none;
  transform: translateX(-50%) translate3d(var(--car-x, 0px), 0, 0);
}
.story-car img {
  width: 100%;
  filter: drop-shadow(0 15px 12px #111b);
}
.story-handover .story-person {
  width: min(23vw, 265px, 30svh);
  left: 23%;
}
.story-handover .woman {
  left: 77%;
}
.story-handover .hamper-area {
  top: auto;
  bottom: 16%;
  left: 0;
  width: 100%;
  transform: none;
  z-index: 5;
  pointer-events: none;
}
.story-handover .hamper {
  width: min(27vw, 310px, 38svh);
}
.story-invite {
  background: #102f28;
}
.story-invite .story-shade {
  background: linear-gradient(
    180deg,
    #061e1acc,
    #061e1a20 35%,
    #061e1a12 65%,
    #061e1ae6
  );
}
.story-boarding .story-person {
  left: 27%;
  bottom: 22%;
  --person-scale: 0.9;
}
.story-boarding .woman {
  left: 48%;
}
.story-boarding .story-car {
  bottom: 17%;
  z-index: 5;
}
.drive-cockpit {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  transform: scale(1.04);
}
.drive-cockpit img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* The road approaches the windscreen along its vanishing point. */
.cinematic .story-drive .scene-art img {
  transform: scale(var(--road-zoom, 1));
  transform-origin: 50% 53%;
}
.story-drive .story-title {
  z-index: 5;
}
.story-drive .story-shade {
  z-index: 4;
  background: linear-gradient(
    #0b211abb,
    transparent 30%,
    transparent 70%,
    #0b211a
  );
}
.story-arrival .scene-art img {
  object-position: center;
}
.story-arrival .story-car {
  bottom: 15%;
  width: min(62vw, 820px);
  z-index: 5;
}
.story-arrival .story-person {
  bottom: 20%;
  left: 42%;
  width: min(22vw, 260px, 32svh);
  z-index: 3;
}
.story-arrival .woman {
  left: 57%;
}
.together-art {
  position: absolute;
  bottom: 14%;
  left: 50%;
  height: min(40svh, 380px);
  width: auto;
  z-index: 4;
  transform: translateX(-50%) translate3d(0, var(--together-y, 0px), 0)
    scale(var(--together-scale, 1));
  transform-origin: 50% 95%;
  opacity: var(--together-opacity, 1);
  filter: drop-shadow(0 12px 12px #0005);
}
.story-arrival .together-art {
  bottom: 18%;
}
.story-stage .together-art {
  height: min(45svh, 400px);
  bottom: 12%;
}
.story-stage .scene-art img {
  object-position: 60% center;
}
.scene-actions {
  position: absolute;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: max-content;
  max-width: calc(100% - 40px);
}
.scene-actions .outline-button {
  margin: 0;
  background: #17372be6;
  font-size: 13px;
  white-space: nowrap;
}
.text-button {
  min-height: 44px;
  padding: 8px 0;
  background: transparent;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 5px;
}
.story-selfie .story-person {
  bottom: 21%;
  left: 42%;
  width: min(29vw, 320px, 37svh);
}
.story-selfie .woman {
  left: 60%;
}
.selfie-print {
  position: absolute;
  z-index: 6;
  bottom: 19%;
  left: 50%;
  width: min(34vw, 360px, 41svh);
  padding: 12px 12px 18px;
  background: #fff2d8;
  color: #5a392c;
  box-shadow: 0 18px 65px #0007;
  transform: translateX(-50%) rotate(-5deg) scale(var(--photo-scale, 0.8));
  opacity: var(--photo-opacity, 0);
  pointer-events: none;
}
.selfie-print img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}
.selfie-print figcaption {
  font: italic 23px/1.3 var(--serif);
  text-align: center;
  padding-top: 13px;
}
.story-selfie[data-photo="true"] .selfie-print {
  --photo-opacity: 1 !important;
  --photo-scale: 1 !important;
}
.story-selfie[data-photo="true"] .story-cast {
  opacity: 0;
}
.cinematic .story-selfie[data-photo="true"] .dialogue-track {
  opacity: 0;
}
.story-prayer {
  background: #242820;
}
.story-prayer .story-shade {
  background: linear-gradient(
    #0b211ac9,
    transparent 34%,
    transparent 65%,
    #0b211a
  );
}
.aarti-art {
  position: absolute;
  bottom: 15%;
  left: 66%;
  height: min(37svh, 320px);
  width: auto;
  z-index: 4;
  transform: translateX(-50%) rotate(var(--prayer-tilt, 0deg));
  transform-origin: 50% 85%;
  filter: drop-shadow(0 10px 12px #0007);
}
.story-prayer .dialogue-track {
  margin-left: 9%;
  max-width: 430px;
  width: 38%;
}
.story-dance .story-person {
  bottom: 20%;
  left: 40%;
  width: min(27vw, 310px, 36svh);
}
.story-dance .woman {
  left: 62%;
}
.story-dance .scene-art img {
  object-position: center;
}
.story-dance .story-title {
  color: #fff3d8;
}
/* The same cinematic controller now directs the cast as well as the scene dissolves. */
.cinematic .illustrated-scene {
  padding: 0;
}
.cinematic .illustrated-scene .story-title {
  position: absolute;
  inset: 115px 0 auto;
  padding: 0 24px;
  opacity: var(--copy-opacity, 1);
  transform: none;
}
.cinematic .illustrated-scene .dialogue-track {
  position: absolute;
  top: 26%;
  left: 50%;
  margin: 0;
  transform: translateX(-50%);
  width: min(520px, 74%);
  opacity: var(--copy-opacity, 1);
}
.cinematic .dialogue-beat:not(.is-speaking) {
  display: none;
}
.cinematic .dialogue-beat {
  min-height: 100px;
}
.cinematic .story-invite .dialogue-track {
  top: 22%;
  width: min(430px, 70%);
}
.cinematic .story-handover .dialogue-track {
  top: 23%;
  width: min(510px, 76%);
}
.cinematic .story-prayer .dialogue-track {
  left: 24%;
  top: 27%;
  width: 35%;
  max-width: 420px;
}
.cinematic .story-selfie[data-photo="true"] .dialogue-track {
  opacity: 0;
}
.cinematic .scene-actions {
  opacity: var(--copy-opacity, 1);
}
.cinematic .story-selfie.is-active .selfie-print {
  transition:
    opacity 0.35s,
    transform 0.35s;
}
.cinematic .story-arrival .story-person {
  opacity: var(--person-opacity, 0);
}
.cinematic .illustrated-scene.is-visible .story-person,
.cinematic .illustrated-scene.is-visible .story-car {
  will-change: transform;
}
.cinematic .story-dance.is-active .story-person i {
  animation: garba-sway 1.5s ease-in-out infinite;
  transform-origin: 50% 80%;
}
.cinematic .story-dance.is-active .woman i {
  animation-delay: -0.3s;
}
@keyframes garba-sway {
  0%,
  100% {
    transform: rotate(-3deg) translateY(0);
  }
  50% {
    transform: rotate(3deg) translateY(-5px);
  }
}
/* Reading/no-JavaScript layouts show the complete conversation, not hidden beats. */
html:not(.cinematic) .illustrated-scene {
  min-height: 1050px;
  padding-bottom: 570px;
}
html:not(.cinematic) .illustrated-scene .story-title {
  padding-top: 125px;
}
html:not(.cinematic) .dialogue-track {
  width: min(540px, 82%);
}
html:not(.cinematic) .dialogue-beat {
  font-size: 24px;
  padding: 16px 24px;
}
html:not(.cinematic) .story-person {
  bottom: 13%;
  width: 290px;
  max-width: 40vw;
}
html:not(.cinematic) .story-car {
  bottom: 11%;
}
html:not(.cinematic) .story-boarding .story-cast {
  z-index: 6;
}
html:not(.cinematic) .story-boarding .story-person {
  bottom: 20%;
  left: 25%;
}
html:not(.cinematic) .story-boarding .woman {
  left: 48%;
}
html:not(.cinematic) .story-arrival .story-cast,
html:not(.cinematic) .story-arrival .story-car {
  display: none;
}
html:not(.cinematic) .story-arrival .together-art {
  height: 350px;
  max-height: 35%;
  bottom: 12%;
}
html:not(.cinematic) .story-selfie .selfie-print {
  --photo-opacity: 1;
  --photo-scale: 1;
  bottom: 15%;
  width: 300px;
  max-width: 65vw;
}
html:not(.cinematic) .story-selfie .story-cast {
  display: none;
}
html:not(.cinematic) .story-prayer .dialogue-track {
  margin: 30px auto 0;
  max-width: 540px;
  width: 82%;
}
html:not(.cinematic) .scene-actions {
  bottom: 6%;
}
html:not(.cinematic) .story-handover .story-person {
  max-width: 25vw;
  left: 18%;
}
html:not(.cinematic) .story-handover .woman {
  left: 82%;
}
html:not(.cinematic) .story-handover .hamper-area {
  bottom: 13%;
}
html:not(.cinematic) .story-handover .hamper {
  width: min(31vw, 310px);
}
@media (max-width: 650px) {
  .illustrated-scene .story-title h1 {
    font-size: 37px;
  }
  .illustrated-scene .story-title h2 {
    font-size: 30px;
  }
  .cinematic .illustrated-scene .story-title {
    inset: 121px 12px auto;
  }
  .cinematic .illustrated-scene .dialogue-track {
    top: 26%;
    width: calc(100% - 48px);
    max-width: 370px;
    left: 50%;
  }
  .dialogue-beat {
    font-size: 25px;
    padding: 18px 23px 21px;
    line-height: 1.3;
  }
  .dialogue-beat .speaker {
    font-size: 10px;
  }
  .cinematic .dialogue-beat {
    min-height: 112px;
  }
  .story-person {
    width: min(56vw, 270px, 35svh);
    left: 28%;
    bottom: 23%;
  }
  .story-person.woman {
    left: 71%;
  }
  .story-shade {
    background: linear-gradient(
      #0b211add,
      transparent 40%,
      transparent 65%,
      #0b211a
    );
  }
  .story-handover .story-person {
    width: 45vw;
    left: 16%;
    bottom: 21%;
  }
  .story-handover .woman {
    left: 84%;
  }
  .story-handover .hamper-area {
    bottom: 20%;
  }
  .story-handover .hamper {
    width: min(44vw, 29svh);
  }
  .cinematic .story-handover .dialogue-track {
    top: 24%;
  }
  .cinematic .story-invite .dialogue-track {
    top: 23%;
  }
  .story-car {
    width: 96vw;
    bottom: 23%;
  }
  .story-boarding .story-car {
    bottom: 23%;
  }
  .story-boarding .story-person {
    width: 45vw;
    left: 23%;
    bottom: 24%;
  }
  .story-boarding .woman {
    left: 50%;
  }
  .drive-cockpit img {
    object-position: center;
  }
  .story-arrival .story-car {
    width: 97vw;
    bottom: 22%;
  }
  .story-arrival .story-person {
    width: 40vw;
    bottom: 25%;
    left: 37%;
  }
  .story-arrival .woman {
    left: 59%;
  }
  .story-arrival .together-art {
    height: 31svh;
    bottom: 23%;
  }
  .story-stage .together-art {
    height: 34svh;
    bottom: 22%;
  }
  .scene-actions {
    bottom: 15%;
    gap: 8px;
    flex-direction: column;
    width: calc(100% - 48px);
  }
  .scene-actions .outline-button {
    font-size: 12px;
    min-height: 44px;
    padding: 9px 18px;
  }
  .text-button {
    font-size: 11px;
    min-height: 38px;
  }
  .story-stage .scene-actions,
  .story-prayer .scene-actions {
    bottom: 15%;
  }
  .story-selfie .story-person {
    width: 50vw;
    left: 35%;
    bottom: 28%;
  }
  .story-selfie .woman {
    left: 64%;
  }
  .selfie-print {
    width: min(56vw, 30svh);
    bottom: 27%;
    padding: 9px 9px 14px;
  }
  .selfie-print figcaption {
    font-size: 19px;
    padding-top: 9px;
  }
  .story-selfie .scene-actions {
    bottom: 14%;
    gap: 0;
  }
  .cinematic .story-prayer .dialogue-track {
    top: 21%;
    left: 50%;
    width: calc(100% - 48px);
    max-width: 370px;
  }
  .aarti-art {
    left: 65%;
    height: 30svh;
    bottom: 22%;
  }
  .story-prayer .story-shade {
    background: linear-gradient(
      #0b211ae6,
      transparent 38%,
      transparent 62%,
      #0b211a
    );
  }
  .story-dance .story-person {
    width: 51vw;
    left: 32%;
    bottom: 28%;
  }
  .story-dance .woman {
    left: 69%;
  }
  .story-dance .scene-actions {
    bottom: 14%;
    gap: 0;
  }
  html:not(.cinematic) .illustrated-scene {
    min-height: 1000px;
    padding-bottom: 470px;
  }
  html:not(.cinematic) .dialogue-beat {
    font-size: 23px;
    padding: 16px 20px;
  }
  html:not(.cinematic) .story-handover .story-cast {
    display: none;
  }
  html:not(.cinematic) .story-handover .hamper {
    width: 52vw;
    max-width: 270px;
  }
  html:not(.cinematic) .story-person {
    width: 55vw;
    max-width: 55vw;
    bottom: 12%;
  }
  html:not(.cinematic) .aarti-art {
    height: 29%;
    bottom: 15%;
  }
  html:not(.cinematic) .story-selfie .selfie-print {
    bottom: 16%;
    max-width: 60vw;
  }
}
@media (max-height: 760px) and (max-width: 650px) {
  .cinematic .illustrated-scene .story-title {
    top: 108px;
  }
  .illustrated-scene .story-title h1 {
    font-size: 32px;
  }
  .illustrated-scene .story-title h2 {
    font-size: 26px;
  }
  .cinematic .illustrated-scene .dialogue-track {
    top: 25%;
    width: calc(100% - 48px);
  }
  .cinematic .story-prayer .dialogue-track {
    top: 21%;
  }
  .dialogue-beat {
    font-size: 23px;
    padding: 14px 20px 18px;
  }
  .cinematic .dialogue-beat {
    min-height: 98px;
  }
  .story-person {
    width: 47vw;
    bottom: 23%;
  }
  .story-handover .hamper {
    width: min(40vw, 26svh);
  }
  .story-selfie .selfie-print {
    width: 26svh;
    bottom: 28%;
  }
  .story-handover .story-person {
    width: 34vw;
    bottom: 23%;
  }
  .story-arrival .together-art {
    height: 27svh;
  }
  .story-stage .together-art {
    height: 29svh;
    bottom: 23%;
  }
  .aarti-art {
    height: 25svh;
  }
  .story-dance .story-person {
    width: 43vw;
    bottom: 28%;
  }
  .cinematic .journey-caption {
    bottom: 79px;
  }
  .scene-actions .outline-button {
    min-height: 44px;
  }
  .text-button {
    min-height: 30px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .story-person,
  .together-art,
  .aarti-art,
  .story-car {
    transform: none;
  }
  .story-person {
    translate: -50% 0;
  }
  .together-art,
  .aarti-art {
    translate: -50% 0;
  }
  .story-car {
    translate: -50% 0;
  }
  .dialogue-beat {
    transition: none;
  }
  .selfie-print {
    transition: none;
  }
  .story-dance .story-person i {
    animation: none !important;
  }
}
.cinematic .illustrated-scene .dialogue-track {
  opacity: calc(var(--copy-opacity, 1) * var(--dialogue-opacity, 1));
}
html:not(.cinematic) .story-selfie[data-photo="false"] .selfie-print {
  --photo-opacity: 0;
  --photo-scale: 0.85;
}
html:not(.cinematic) .story-selfie[data-photo="false"] .story-cast {
  display: block;
}

/* The physical box is the opening scene, before the illustrated friends. */
.opening-scene {
  padding: 0;
  min-height: 700px;
  min-height: 100svh;
}
.opening-layout {
  position: absolute;
  inset: 104px 0 108px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.opening-title {
  position: relative;
  text-align: center;
  max-width: none;
  padding: 0 24px;
}
.opening-title h1 {
  font-size: clamp(30px, 3.2vw, 46px);
}
.opening-scene .hamper-area {
  position: relative;
  inset: auto;
  width: 100%;
  transform: none;
  flex: 1;
  align-items: center;
  min-height: 0;
}
.opening-scene .hamper {
  width: min(88vw, calc((100svh - 350px) * 0.8138), 570px);
  flex: none;
}
.opening-scene .hamper-interior {
  inset: 0;
  padding: 0;
  border: 2px solid #b99862;
}
.opening-scene .hamper-interior > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08);
}
.opening-scene .hamper-seal {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}
.opening-scene .hamper-seal small {
  font: 600 clamp(7px, 0.7vw, 10px)/1.5 var(--sans);
  color: #e6c274;
}
.opening-scene .box-hit-area {
  z-index: 6;
  pointer-events: auto;
  background: transparent;
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  overflow: visible;
}
.opening-scene .box-hit-area[hidden] {
  display: none;
}
.box-hit-area:focus-visible {
  outline: 2px solid #ffe3a5;
  outline-offset: 6px;
}
.seal-prompt {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  width: max-content;
  color: #ffe8b8;
  font: 500 11px/1.4 var(--sans);
  letter-spacing: 0.02em;
  text-shadow: 0 1px 8px #071f19;
}
.seal-prompt > span {
  padding: 7px 12px;
  border: 1px solid #dfbd7866;
  border-radius: 20px;
  background: #0b281fee;
}
.seal-hand {
  width: 26px;
  height: 33px;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 3px #0008);
}
@media (hover: hover) and (pointer: fine) {
  .box-hit-area:hover .seal-prompt > span {
    background: #244b37;
    border-color: #ffe3a5;
  }
}
.opening-actions {
  text-align: center;
  z-index: 7;
}
.opening-actions .outline-button {
  margin: 0;
  min-height: 48px;
  background: #173c30cc;
  padding: 10px 24px;
}
.opening-hint {
  margin-top: 9px;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.cinematic .opening-fallback,
.read-mode .opening-fallback {
  display: none;
}
.cinematic .opening-title,
.cinematic .opening-actions {
  opacity: var(--copy-opacity, 1);
  transform: none;
}
html:not(.cinematic) .opening-scene {
  height: max(100svh, 700px);
}
html:not(.cinematic) .opening-scene .door {
  transition: transform 0.85s ease;
}
html:not(.cinematic) .opening-scene .hamper-seal {
  transition: opacity 0.3s ease;
}
@media (max-width: 650px) {
  .opening-layout {
    inset: 108px 0 142px;
    gap: 16px;
  }
  .opening-scene .hamper {
    width: min(88vw, calc((100svh - 350px) * 0.8138));
  }
  .opening-title h1 {
    font-size: 30px;
  }
}
@media (max-height: 760px) and (max-width: 650px) {
  .opening-layout {
    inset: 104px 0 125px;
    gap: 12px;
  }
  .opening-scene .hamper {
    width: min(86vw, calc((100svh - 350px) * 0.8138));
  }
  .opening-title h1 {
    font-size: 27px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html:not(.cinematic) .opening-scene .door,
  html:not(.cinematic) .opening-scene .hamper-seal {
    transition: none;
  }
}

/* Gujarati applies only to the characters' spoken dialogue. */
@font-face {
  font-family: "Noto Serif Gujarati";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/noto-serif-gujarati.woff2") format("woff2");
}
.dialogue-beat q[lang="gu"] {
  font-family: "Noto Serif Gujarati", serif;
  font-size: 0.9em;
}
.finale .gujarati {
  font-family: "Noto Serif Gujarati", serif;
}

/* Invitation typography: clear navigation and quiet gold chapter ornaments. */
.masthead {
  padding: 14px var(--gutter);
  align-items: center;
  background: linear-gradient(180deg, #0a241df5, #0a241de0);
  border-bottom: 1px solid #d4b67b30;
}
.wordmark {
  width: 80px;
}
.header-date {
  color: #dbc69d;
  font-size: 10px;
  letter-spacing: 0.22em;
}
.header-actions {
  gap: 22px;
}
.header-link {
  padding: 9px 17px;
  border: 1px solid #d4b67b70;
  font-size: 12px;
  background: #d4b67b0a;
}
#motion-toggle {
  border: 0;
  color: #d0d6c8;
  font-size: 12px;
}
.header-link:hover,
.header-link:focus-visible {
  background: #d4b67b20;
}
.opening-title h1 {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 13px;
  font-size: clamp(50px, 5vw, 64px);
  line-height: 1;
}
.heading-lead {
  font: 500 12px/1.5 var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: #eee2cb;
}
.opening-title h1 em,
.illustrated-scene .story-title h2 em {
  color: #edd09a;
  font-weight: 400;
}
.opening-title:after {
  content: "";
  display: block;
  width: 120px;
  height: 1px;
  margin: 13px auto 0;
  background: linear-gradient(90deg, transparent, #d4b67b, transparent);
}
.illustrated-scene .story-title h2 {
  position: relative;
  display: inline-block;
  max-width: 100%;
  padding: 7px 26px 14px;
  font-size: clamp(32px, 3.2vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: #fff5e2;
  text-wrap: balance;
  text-shadow: 0 2px 14px #061711;
  background: linear-gradient(
    90deg,
    transparent,
    #0a241dc9 20%,
    #0a241dc9 80%,
    transparent
  );
}
.illustrated-scene .story-title h2:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 15%;
  right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #d4b67bb3, transparent);
}
.illustrated-scene .story-title h2:before {
  content: "";
  position: absolute;
  bottom: -2px;
  left: calc(50% - 2px);
  width: 5px;
  height: 5px;
  background: #d4b67b;
  transform: rotate(45deg);
}
@media (max-width: 650px) {
  .masthead {
    padding: 8px 20px;
    gap: 12px;
  }
  .wordmark {
    width: 64px;
  }
  .header-actions {
    gap: 0;
  }
  .header-link {
    min-height: 40px;
    padding: 5px 12px;
    font-size: 11px;
  }
  #motion-toggle {
    min-height: 32px;
    font-size: 10px;
  }
  .opening-title h1 {
    font-size: 52px;
    gap: 10px;
  }
  .heading-lead {
    font-size: 10px;
  }
  .illustrated-scene .story-title h2 {
    padding: 5px 12px 10px;
    font-size: 29px;
    line-height: 1.12;
  }
}
@media (max-height: 760px) and (max-width: 650px) {
  .opening-title h1 {
    font-size: 44px;
  }
  .cinematic .illustrated-scene .story-title {
    top: 102px;
  }
  .illustrated-scene .story-title h2 {
    font-size: 24px;
    padding-top: 3px;
    padding-bottom: 8px;
  }
}
/* Scroll opens the doors, then carries the visitor through the courtyard. */
.cinematic .opening-scene .hamper {
  transform: scale(calc(1 + var(--enter, 0) * 3.5));
  transform-origin: center;
}
.cinematic .opening-scene.is-visible .hamper {
  will-change: transform;
}
.cinematic .opening-title,
.cinematic .opening-actions {
  opacity: calc(var(--copy-opacity, 1) * var(--entry-copy, 1));
}
.cinematic .opening-scene .hamper-interior {
  box-shadow: inset 0 0 30px #071f1966;
}
.cinematic .opening-scene .hamper-interior > img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100vw;
  height: 100svh;
  max-width: none;
  transform: translate(-50%, -50%) scale(var(--portal-inverse, 1.08));
}
html:not(.cinematic) .opening-scene .hamper {
  width: min(86vw, 420px);
}
@media (max-height: 760px) and (min-width: 651px) {
  .cinematic .illustrated-scene .story-title {
    top: 96px;
  }
  .illustrated-scene .story-title h2 {
    font-size: 32px;
    padding: 4px 18px 9px;
  }
  .opening-title h1 {
    font-size: 48px;
  }
}
@media (max-height: 680px) and (max-width: 650px) {
  .cinematic .illustrated-scene .story-title {
    top: 94px;
  }
  .cinematic .illustrated-scene .story-title h2 {
    font-size: 22px;
    padding: 2px 12px 6px;
  }
}

/* A quiet, separate choice for the one-shot box-opening effect. */
#opening-sound {
  padding: 8px 12px;
  min-height: 36px;
  margin-top: 2px;
  background: #0b281fdd;
  border: 1px solid #dfbd7844;
  border-radius: 20px;
  color: #e6d2aa;
  font: 500 10px/1.4 var(--sans);
}
#opening-sound {
  position: absolute;
  bottom: 100px;
  right: var(--gutter);
  z-index: 8;
  white-space: nowrap;
}
@media (max-width: 650px) {
  #opening-sound { bottom: 24px; right: 16px; }
}

/* The pass handoff is staged between the two friends; the elephant is transport only. */
.story-invite .invitation-handoff {
  position: relative;
  width: min(92%, 680px);
  margin: 42px auto 90px;
  z-index: 4;
  text-align: center;
}
.invitation-handoff img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 14px 12px #18291d66);
}
.invitation-handoff figcaption {
  font: 400 14px/1.5 "Noto Serif Gujarati", serif;
  color: #fff1ce;
  margin-top: 12px;
  text-shadow: 0 2px 8px #10251f;
}
.cinematic .story-invite .invitation-handoff {
  position: absolute;
  width: min(79vw, 650px, 54svh);
  left: 50%;
  bottom: 12%;
  margin: 0;
  transform: translateX(-50%);
}
@media (max-width: 650px) {
  .cinematic .story-invite .invitation-handoff {
    width: min(90vw, 52svh);
    bottom: 13%;
  }
  .invitation-handoff figcaption { font-size: 12px; }
  .cinematic .journey-stage:has(#the-invitation.is-active) .journey-caption,
  .cinematic .journey-stage:has(#a-memory.is-active) .journey-caption {
    opacity: 0;
  }
}

/* Separate arms and pass keep the reveal and transfer physically connected. */
.handoff-rig { display: none; }
.cinematic .handoff-still { display: none; }
.cinematic .handoff-rig {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 1100 / 917;
  isolation: isolate;
}
.handoff-rig img {
  position: absolute;
  display: block;
  height: auto;
  max-width: none;
  filter: none;
  pointer-events: none;
}
.handoff-rear, .handoff-front { position: absolute; inset: 0; }
.handoff-rear { opacity: var(--rear, 1); }
.handoff-front { opacity: var(--front, 0); }
.handoff-rig .handoff-man { width: 35%; left: 1.8182%; top: 1.0905%; }
.handoff-rig .handoff-woman { width: 49.6364%; left: 49.0909%; top: 6.5431%; }
.handoff-rig .handoff-man-arm {
  width: 19.0909%; left: 25.1364%; top: 31.4613%;
  transform-origin: 14.0476% 22.9167%;
  transform: rotate(var(--his-arm, 48deg));
}
.handoff-rig .handoff-woman-arm {
  width: 19.5455%; left: 50.3636%; top: 32.8244%;
  transform-origin: 83.7209% 25%;
  transform: rotate(var(--her-arm, -80deg));
}
.handoff-rig .handoff-pass {
  width: 24.5455%;
  left: 0;
  top: 0;
  transform-origin: 80% 97%;
  transform: translate(var(--pass-x, 240%), var(--pass-y, 110%)) rotate(var(--pass-turn, 18deg));
  opacity: var(--pass-visible, 0);
}
.handoff-shoulder { clip-path: inset(0 0 0 57%); }
.dialogue-beat q [lang="en"] { white-space: normal; }
@media (max-width: 650px) and (max-height: 700px) {
  .cinematic .story-invite .invitation-handoff { width: min(80vw, 40svh); }
}

/* Falling flowers sit behind the friends and all readable/interactive content. */
.flower-shower {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  pointer-events: none;
}
.cinematic .flower-shower { display: block; }
.flower-petal {
  position: absolute;
  left: var(--petal-left);
  top: -25px;
  width: var(--petal-size);
  height: calc(var(--petal-size) * 1.35);
  border-radius: 80% 25% 70% 35%;
  background: radial-gradient(ellipse at 30% 25%, #ffd86d, #ec982a 65%, #c9631e);
  box-shadow: inset 1px 1px 2px #fff5, 0 1px 2px #7d391a33;
  animation: aarti-flower-fall var(--petal-duration) linear var(--petal-delay) infinite paused;
}
.flower-petal.petal-1 {
  background: radial-gradient(ellipse at 30% 25%, #ffc1be, #d66f86 65%, #a84061);
  border-radius: 65% 80% 20% 80%;
}
.flower-petal.petal-2 {
  background: radial-gradient(ellipse at 30% 25%, #fffde8, #eadbb2 75%, #c5b583);
  width: calc(var(--petal-size) * .7);
}
.cinematic .story-prayer.is-visible .flower-petal { animation-play-state: running; }
.cinematic .flower-shower[data-paused="true"] .flower-petal { animation-play-state: paused; }
@keyframes aarti-flower-fall {
  0% { transform: translate3d(0, 0, 0) rotate(0deg) rotateY(0deg); opacity: 0; }
  8% { opacity: .85; }
  50% { transform: translate3d(var(--petal-drift), 55svh, 0) rotate(calc(var(--petal-turn) * .5)) rotateY(110deg); opacity: .75; }
  90% { opacity: .65; }
  100% { transform: translate3d(0, 110svh, 0) rotate(var(--petal-turn)) rotateY(230deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .flower-shower { display: none !important; }
  .flower-petal { animation: none; }
}

/* Opening is an explicit invitation: prompt motion runs only while waiting for a click. */
html.invitation-locked, html.invitation-locked body {
  /* JS already pins the sealed invitation at the top. Avoid root overflow locks:
     iOS Safari can fail to restore scrolling after overflow:hidden is removed. */
  overscroll-behavior: none;
}
.invitation-locked .scroll-cue { visibility: hidden; }
.cinematic.invitation-locked .seal-prompt {
  animation: invitation-click-hint 1.8s ease-in-out infinite;
}
@keyframes invitation-click-hint {
  0%, 100% { opacity: 1; transform: translate(-50%, 0); }
  50% { opacity: .45; transform: translate(-50%, -9px); }
}
@media (prefers-reduced-motion: reduce) {
  .seal-prompt { animation: none !important; }
}


/* Pass-envelope revision: responsive, fully visible, scan-first pass reveal. */
.envelope-still{
  display:block;
  width:clamp(260px,46vw,440px);
  aspect-ratio:1.55;
  margin:0 auto;
  filter:drop-shadow(0 16px 18px #10251f66);
}
.still-envelope,.handoff-envelope{
  position:relative;
  background:linear-gradient(145deg,#0d4e3b,#052b22);
  border:2px solid #dab978;
  border-radius:10px;
  box-shadow:inset 0 0 0 7px #dab97818,0 12px 24px #10251f55;
}
.still-envelope{
  width:100%;
  height:100%;
  display:grid;
  place-items:center;
}
.still-envelope:before,.handoff-envelope:before{
  content:"";
  position:absolute;
  inset:8px;
  border:1px solid #dab97855;
  border-radius:6px;
  pointer-events:none;
}
.still-envelope img{width:34%;height:auto;filter:none}
.handoff-rig{opacity:1}
.handoff-rig .handoff-envelope{
  position:absolute;
  width:24.5455%;
  aspect-ratio:1.55;
  left:0;
  top:0;
  transform-origin:80% 97%;
  transform:translate(var(--pass-x,240%),var(--pass-y,110%)) rotate(var(--pass-turn,12deg));
  opacity:calc(var(--pass-visible,0) * var(--handoff-fade,1));
  display:grid;
  place-items:center;
}
.handoff-rig .handoff-envelope-logo{
  position:relative;
  width:48%;
  height:auto;
  inset:auto;
  filter:none;
  max-width:100%;
}

/* The reveal stage owns its own responsive dimensions instead of inheriting the handoff art. */
.pass-reveal{
  --envelope-w:clamp(300px,46vw,520px);
  position:absolute;
  inset:0;
  z-index:12;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:visible;
  pointer-events:none;
  opacity:var(--reveal,0);
}
.pass-reveal-kicker{
  position:absolute;
  top:2%;
  left:50%;
  translate:-50% 0;
  margin:0;
  width:min(620px,92%);
  text-align:center;
  color:#fff1ce;
  font:500 clamp(14px,1.4vw,18px)/1.5 "Noto Serif Gujarati",serif;
  text-shadow:0 2px 8px #10251f;
}
.pass-envelope{
  position:relative;
  width:var(--envelope-w);
  aspect-ratio:1.48;
  margin-top:clamp(80px,10vh,130px);
  overflow:visible;
  isolation:isolate;
  filter:drop-shadow(0 22px 28px #10251f88);
  perspective:1200px;
}
.pass-envelope-back{
  position:absolute;
  inset:0;
  z-index:1;
  background:linear-gradient(145deg,#0c4c39,#04281f);
  border:2px solid #dab978;
  border-radius:12px;
  box-shadow:inset 0 0 0 8px #dab97812;
}
.pass-envelope-back:after{
  content:"";
  position:absolute;
  inset:10px;
  border:1px solid #dab97845;
  border-radius:8px;
}
.pass-envelope-pocket{
  position:absolute;
  inset:0;
  z-index:4;
  background:linear-gradient(155deg,#155943,#052b22);
  clip-path:polygon(0 22%,50% 62%,100% 22%,100% 100%,0 100%);
  border-radius:12px;
  box-shadow:inset 0 -12px 28px #011a1466;
}
.pass-envelope-flap{
  position:absolute;
  left:0;
  right:0;
  top:0;
  height:58%;
  z-index:7;
  background:linear-gradient(170deg,#1a664a,#07382b);
  clip-path:polygon(0 0,100% 0,50% 100%);
  transform-origin:50% 50%;
  transform:
    translateX(calc(var(--reveal,0) * 92%))
    translateY(calc(var(--reveal,0) * 18%))
    rotate(calc(var(--reveal,0) * 16deg));
  display:grid;
  place-items:start center;
  padding-top:10%;
  will-change:transform;
  box-shadow:0 10px 22px #001b1455;
}
.pass-envelope-flap img{
  width:24%;
  height:auto;
  filter:none;
  transform:translateY(-8%);
  opacity:calc(1 - var(--reveal,0) * .35);
}

/* The pass card is above the pocket once visible; opacity keeps it hidden before the flap opens. */
.pass-card{
  position:absolute;
  z-index:6;
  left:50%;
  top:14%;
  translate:-50% calc((1 - var(--qr-rise,0)) * 22% - var(--qr-rise,0) * 44%);
  width:78%;
  min-height:128%;
  padding:clamp(14px,2.2vw,22px);
  background:linear-gradient(180deg,#fffdf7,#f5ead5);
  border:2px solid #cba967;
  border-radius:12px;
  text-align:center;
  color:#15352b;
  opacity:var(--qr-opacity,0);
  box-shadow:0 14px 34px #0005;
  box-sizing:border-box;
  will-change:translate,opacity;
}
.pass-card:before{
  content:"";
  position:absolute;
  inset:7px;
  border:1px solid #cba96755;
  border-radius:8px;
  pointer-events:none;
}
.pass-card-logo{
  position:relative;
  width:clamp(62px,8vw,88px);
  height:auto;
  margin:0 auto 5px;
  filter:none;
  z-index:1;
}
.pass-card-eyebrow{
  position:relative;
  z-index:1;
  display:block;
  margin:2px 0 4px;
  font-size:clamp(7px,.75vw,10px);
  letter-spacing:.18em;
  color:#7b5b2b;
}
.pass-card strong{
  position:relative;
  z-index:1;
  display:block;
  font:600 clamp(15px,1.8vw,22px)/1.08 var(--serif);
  letter-spacing:.04em;
  color:#4c0e12;
  margin:0 0 5px;
}
.pass-card-instruction{
  position:relative;
  z-index:1;
  margin:0 auto 9px;
  max-width:290px;
  font-size:clamp(8px,.8vw,11px);
  line-height:1.35;
  color:#5c594c;
}
.qr-pass-code{
  position:relative;
  z-index:1;
  display:inline-grid;
  place-items:center;
  background:#fff;
  padding:clamp(9px,1.2vw,13px);
  border:2px solid #b58b49;
  border-radius:10px;
  box-shadow:0 8px 20px #0002;
  pointer-events:none;
}
.qr-pass-code img{
  display:block;
  width:clamp(132px,17vw,215px);
  max-width:100%;
  height:auto;
  filter:none;
  image-rendering:pixelated;
}
.pass-card small{
  position:relative;
  z-index:1;
  display:block;
  margin-top:8px;
  font-size:clamp(7px,.72vw,9px);
  letter-spacing:.15em;
  color:#73572f;
}
.pass-entry-disclaimer{
  margin:10px auto 0;
  font:500 12px/1.6 "Noto Serif Gujarati",serif;
  color:#fff8e5;
  background:#163b32ed;
  border:1px solid #d6b56c;
  border-radius:6px;
  padding:7px 10px;
  text-align:center;
}
.cinematic .pass-entry-disclaimer{
  position:absolute;
  top:100%;
  left:50%;
  transform:translateX(-50%);
  width:min(560px,calc(100vw - 28px));
  box-sizing:border-box;
}

@media(max-width:900px){
  .pass-reveal{--envelope-w:clamp(285px,62vw,430px)}
  .pass-envelope{margin-top:clamp(70px,9vh,105px)}
  .pass-card{width:80%;min-height:132%}
  .qr-pass-code img{width:clamp(135px,24vw,190px)}
}
@media(max-width:650px){
  .cinematic .story-invite .invitation-handoff{
    width:min(94vw,58svh);
    bottom:10%;
    overflow:visible;
  }
  .pass-reveal{
    --envelope-w:clamp(270px,82vw,350px);
    inset:-5% -5% -3%;
  }
  .pass-reveal-kicker{
    top:0;
    width:94%;
    font-size:13px;
  }
  .pass-envelope{
    margin-top:clamp(62px,8vh,82px);
  }
  .pass-card{
    width:82%;
    min-height:134%;
    padding:12px 11px 14px;
    border-radius:10px;
  }
  .pass-card-logo{width:58px;margin-bottom:3px}
  .pass-card-instruction{font-size:8px;line-height:1.3;margin-bottom:7px}
  .qr-pass-code{padding:9px}
  .qr-pass-code img{width:clamp(130px,42vw,165px)}
  .pass-card small{font-size:7px;margin-top:6px}
  .pass-entry-disclaimer{font-size:10px;line-height:1.45}
}
@media(max-width:380px){
  .pass-reveal{--envelope-w:min(88vw,320px)}
  .pass-envelope{margin-top:58px}
  .pass-card{width:84%;padding:10px 9px 12px}
  .qr-pass-code img{width:128px}
}
@media(max-height:700px) and (min-width:651px){
  .pass-reveal{--envelope-w:clamp(300px,38vw,390px)}
  .pass-envelope{margin-top:58px}
  .pass-card{min-height:122%;padding:12px}
  .qr-pass-code img{width:145px}
}


/* Invitation pass reveal visibility fix: hold a complete, unobstructed card on screen. */
.cinematic .journey-stage:has(#the-invitation.is-active) .stage-brands{
  opacity:0 !important;
  visibility:hidden;
  pointer-events:none;
}
.cinematic #the-invitation .pass-reveal{
  align-items:flex-start;
  padding-top:clamp(120px,17vh,170px);
}
.cinematic #the-invitation .pass-envelope{
  margin-top:0;
}
.cinematic #the-invitation .pass-card{
  top:8%;
  width:72%;
  min-height:0;
  height:auto;
  padding:clamp(12px,1.8vw,18px);
}
.cinematic #the-invitation .pass-card-logo{
  width:clamp(52px,6vw,72px);
}
.cinematic #the-invitation .pass-card-instruction{
  max-width:250px;
  margin-bottom:7px;
}
.cinematic #the-invitation .qr-pass-code img{
  width:clamp(120px,14vw,175px);
}
@media(max-width:650px){
  .cinematic #the-invitation .pass-reveal{
    padding-top:clamp(105px,15vh,135px);
  }
  .cinematic #the-invitation .pass-envelope{
    width:min(78vw,330px);
  }
  .cinematic #the-invitation .pass-card{
    width:78%;
    padding:10px;
  }
  .cinematic #the-invitation .pass-card-logo{width:50px}
  .cinematic #the-invitation .pass-card-instruction{
    font-size:7.5px;
    margin-bottom:6px;
  }
  .cinematic #the-invitation .qr-pass-code{
    padding:7px;
  }
  .cinematic #the-invitation .qr-pass-code img{
    width:clamp(112px,34vw,145px);
  }
}
@media(max-height:700px) and (min-width:651px){
  .cinematic #the-invitation .pass-reveal{padding-top:92px}
  .cinematic #the-invitation .pass-envelope{width:min(360px,38vw)}
  .cinematic #the-invitation .qr-pass-code img{width:125px}
}


/* Keep both characters present while only the handed envelope transitions into the reveal. */
.cinematic #the-invitation .handoff-man,
.cinematic #the-invitation .handoff-woman{
  opacity:1 !important;
  visibility:visible !important;
}
.cinematic #the-invitation .handoff-man-arm,
.cinematic #the-invitation .handoff-woman-arm{
  opacity:1;
}
.cinematic #the-invitation .pass-envelope-flap{
  overflow:visible;
}
.cinematic #the-invitation .pass-card{
  max-height:min(66svh,560px);
}
@media(max-width:650px){
  .cinematic #the-invitation .pass-reveal{
    padding-top:clamp(78px,11vh,105px);
  }
  .cinematic #the-invitation .pass-envelope{
    width:min(74vw,310px);
  }
  .cinematic #the-invitation .pass-card{
    top:4%;
    width:76%;
  }
  .cinematic #the-invitation .qr-pass-code img{
    width:clamp(105px,31vw,138px);
  }
}

.cinematic #the-invitation .pass-envelope-flap{
  z-index:5;
}
.cinematic #the-invitation .pass-card{
  z-index:8;
}
@media(max-width:650px){
  .cinematic #the-invitation .pass-envelope-flap{
    transform:
      translateX(calc(var(--reveal,0) * 76%))
      translateY(calc(var(--reveal,0) * 25%))
      rotate(calc(var(--reveal,0) * 13deg));
  }
}


/* Open-pass cleanup: remove dialogue clutter and preserve QR pixels exactly. */
.cinematic #the-invitation.pass-open .dialogue-track{
  opacity:0 !important;
  visibility:hidden !important;
  pointer-events:none !important;
}
.cinematic #the-invitation.pass-open .story-title{
  opacity:.2;
}
.cinematic #the-invitation .qr-pass-code{
  overflow:visible;
  line-height:0;
}
.cinematic #the-invitation .qr-pass-code img{
  display:block;
  object-fit:contain;
  image-rendering:auto;
  background:#fff;
}


/* QR v2: preserve the verified square image without cropping, masks or transforms. */
.cinematic #the-invitation .qr-pass-code{
  width:max-content;
  height:max-content;
  overflow:visible !important;
  clip-path:none !important;
  transform:none !important;
  border-radius:8px;
  background:#fff;
}
.cinematic #the-invitation .qr-pass-code img{
  aspect-ratio:1 / 1;
  object-fit:contain !important;
  object-position:center;
  clip-path:none !important;
  transform:none !important;
  mask:none !important;
  -webkit-mask:none !important;
  border-radius:0 !important;
}


/* Final pass-card polish: keep the verified QR visually integrated with the paper. */
.cinematic #the-invitation .pass-card{
  top:6%;
  width:68%;
  min-height:auto;
  height:auto;
  padding:14px 12px 16px;
  border-radius:12px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  gap:6px;
  box-sizing:border-box;
}

.cinematic #the-invitation .pass-card-logo{
  width:54px;
  margin:0 auto 2px;
}

.cinematic #the-invitation .pass-card-eyebrow{
  margin:0;
  font-size:8px;
  letter-spacing:.16em;
}

.cinematic #the-invitation .pass-card strong{
  margin:0;
  font-size:18px;
  line-height:1.05;
  text-align:center;
}

.cinematic #the-invitation .pass-card-instruction{
  margin:0 0 4px;
  max-width:220px;
  font-size:10px;
  line-height:1.25;
  text-align:center;
}

.cinematic #the-invitation .qr-pass-code{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  max-width:168px;
  margin:2px auto 0;
  padding:8px;
  background:#fff;
  border:2px solid #c49a55;
  border-radius:10px;
  box-sizing:border-box;
  box-shadow:none;
}

.cinematic #the-invitation .qr-pass-code img{
  width:150px;
  height:150px;
  aspect-ratio:1 / 1;
  display:block;
  object-fit:contain;
}

.cinematic #the-invitation .pass-card small{
  margin-top:4px;
  font-size:9px;
  letter-spacing:.12em;
  text-align:center;
}

@media(max-width:650px){
  .cinematic #the-invitation .pass-card{
    width:70%;
    top:5%;
    padding:12px 10px 14px;
    gap:5px;
  }

  .cinematic #the-invitation .pass-card-logo{
    width:48px;
  }

  .cinematic #the-invitation .pass-card strong{
    font-size:16px;
  }

  .cinematic #the-invitation .pass-card-instruction{
    font-size:9px;
    max-width:190px;
  }

  .cinematic #the-invitation .qr-pass-code{
    max-width:148px;
    padding:7px;
  }

  .cinematic #the-invitation .qr-pass-code img{
    width:132px;
    height:132px;
  }

  .cinematic #the-invitation .pass-card small{
    font-size:8px;
  }
}


/* iOS Safari must remain natively scrollable after the opening gate. */
@supports (-webkit-touch-callout: none) {
  html, body {
    -webkit-overflow-scrolling: touch;
  }
  html.invitation-locked,
  html.invitation-locked body {
    overflow-y: auto !important;
    touch-action: pan-y;
  }
}


/* iOS performance mode: avoid expensive drop-shadow filters on large moving art. */
html.ios-webkit .story-person,
html.ios-webkit .aarti-art,
html.ios-webkit .journey-elephant .elephant-art,
html.ios-webkit .journey-elephant .elephant-riders,
html.ios-webkit .together-art,
html.ios-webkit .hamper {
  filter: none !important;
}
