/*
 * Polish of the opening screens (after invitation-decor.css, invitation-motion.css, invitation-styles-plus.css).
 *  - Reachable: a screen taller than the phone (a long name, a small phone, the keyboard…) scrolls instead of hiding its
 *    button; the content stays centred when it fits (`safe` centring keeps the top reachable when it does not).
 *  - Readable: names and dates written straight on a patterned background (slats, petals, tiles, curtain, doors…) get a soft halo
 *    of the opposite colour; light accents have dark text and a light halo (`invite-accent-light`, set by the page).
 *  - The wax seal casts its shadow after it cracks into two halves, not as a square patch clipped with them.
 *  - On a short portrait screen the tallest pictures (gift, candle) shrink a little so that the button is still in view.
 */
.invite-opening {
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  align-items: safe center;
}
.invite-opening::-webkit-scrollbar {
  display: none;
}
/* While it opens, nothing scrolls and nothing sticks out (a shutter rolling away, balloons flying off). */
.invite-opening.is-leaving {
  overflow: hidden;
}

.invitation {
  --op-halo: rgb(0 0 0 / 42%);
}
.invitation.invite-accent-light {
  --op-halo: rgb(255 255 255 / 58%);
}
.invitation .invite-opening-curtain,
.invitation .invite-opening-doors,
.invitation .invite-opening-blinds,
.invitation .invite-opening-blossom,
.invitation .invite-opening-tiles,
.invitation .invite-opening-roller,
.invitation .invite-opening-iris {
  --op-text-shadow: 0 0 6px var(--op-halo), 0 0 18px var(--op-halo);
}
:is(
    .invite-opening-curtain,
    .invite-opening-doors,
    .invite-opening-blinds,
    .invite-opening-blossom,
    .invite-opening-tiles,
    .invite-opening-roller,
    .invite-opening-iris
  )
  :is(h2, .invite-opening-date, p) {
  text-shadow: var(--op-text-shadow);
}

/* The wax seal: the shadow follows the two halves instead of being cut by their outline. */
.os-seal {
  filter: drop-shadow(0 6px 7px rgb(0 0 0 / 38%));
}
.os-half {
  box-shadow: none;
}

@media (max-height: 640px) and (orientation: portrait) {
  .invite-opening-gift .og-stage,
  .invite-opening-candle .oca-stage {
    zoom: 0.86;
  }
}
