/*
 * Écran d'accueil scellé des invitations : tant que l'invitation n'est pas ouverte,
 * la couverture occupe tout l'écran, sans barre du haut ni défilement.
 * Ajouté à la publication par scripts/sync-static-demos.mjs (les sources demos/ restent intactes).
 */
[data-amorea-cover] {
  min-height: 100vh;
  min-height: 100svh;
  /* Sans ce plafond, la hauteur minimale élargit la couverture (aspect-ratio) au-delà de l'écran. */
  max-width: 100%;
}

/* La barre de défilement garde sa place : la couverture ne bouge pas d'un pixel à l'ouverture. */
html:has([data-amorea-cover]) {
  scrollbar-gutter: stable;
}

html.amorea-sealed,
html.amorea-sealed body {
  overflow: hidden;
  overscroll-behavior: none;
}

html.amorea-sealed body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  background: var(--amorea-sealed-backdrop, #f4ede3);
}

html.amorea-sealed [data-amorea-cover] {
  position: fixed;
  z-index: 2147483001;
  top: 0;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: min(100%, var(--amorea-cover-width, 565px), calc(100svh * 9 / 16));
  height: 100vh;
  height: 100svh;
  min-height: 0;
  aspect-ratio: auto;
}

/* Les commandes utiles pendant l'ouverture (musique) restent au-dessus. */
html.amorea-sealed [data-amorea-keep] {
  z-index: 2147483002;
}

/* Sur téléphone, la couverture prend toute la largeur. */
@media (max-width: 600px) {
  html.amorea-sealed [data-amorea-cover] {
    width: 100%;
  }
}
