/* Keep the invitation title on one line; move only both envelope sheets by the original letter progress. */
.home-envelope__seal { display: none; }
@media (max-width: 767px) {
  .home-invitation__title {
    font-size: 28px !important;
    line-height: 29px !important;
    white-space: nowrap;
    letter-spacing: 0;
  }

  /* Move the envelope as one complete shell so its overlapping pieces never separate. */
  .home-envelope {
    transform: translate3d(0, var(--home-envelope-y, 0px), 0);
    will-change: transform;
  }

  /* 后层整体上移80px；前层与后层底边保持对齐，信纸持续位于两层之间。 */
  .home-envelope__back {
    top: -80px !important;
    width: 100%;
    height: 438px !important;
    object-fit: fill;
  }
  .home-envelope__front {
    /* 仅裁去透明画布后按原比例铺满，保留用户前层图案尺寸与比例。 */
    top: calc(387.47px - 70.623vw) !important;
    z-index: 3;
    width: 100%;
    height: auto !important;
    aspect-ratio: 1188 / 839 !important;
    object-fit: contain;
  }
  /* 钢印在当前基础上缩小20%，并向上微调5px；仍随信封整体移动并位于最上层。 */
  .home-envelope__seal {
    position: absolute;
    top: calc(382.47px - 40.623vw) !important;
    left: 50%;
    z-index: 4;
    width: 13.2%;
    height: auto;
    transform: translateX(-50%);
    pointer-events: none;
  }

  /* Cancel the shell movement for the letter: it keeps its original on-screen rise exactly. */
  .home-envelope__letter {
    transform: translate3d(0, calc(var(--home-letter-y, 209px) - var(--home-envelope-y, 0px)), 0);
    will-change: transform;
  }
}

/* Prevent Android/WebView text autosizing from changing only the invitation paper layout. */
.home-invitation,
.home-invitation__copy,
.home-invitation__copy * {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Homepage-only typography retained after restoring all later pages to checkpoint25. */
@media (max-width: 767px) {
  .home-hero__line {
    height: 66px;
  }

  .home-hero__line--first {
    height: 63px;
  }

  .home-hero__initial:not(.home-hero__initial--plain) {
    font-size: calc(1.22em - 7px);
  }
}
