/* Live greeting-card unwrap — lab v23 motion. */
body.fw-unwrap-page {
  --kb-background-url: url("/assets/site/img/celebration-bg.png");
  --kb-background-color: #EED6A8;
  --kb-envelope-background-color: #C41E3A;
  --kb-envelope-font-color: #FFFFFF;
  --kb-envelope-font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  --kb-envelope-font-size: 3.125rem;
  --kb-card-font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  --kb-card-font-size: 36px;
}

    * { box-sizing: border-box; }
    html, body.fw-unwrap-page { height: 100%; }
    body.fw-unwrap-page {
      margin: 0;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      background-image: var(--kb-background-url);
      background-color: var(--kb-background-color);
      background-size: cover;
      background-repeat: no-repeat;
      background-position: center;
      user-select: none;
    }
    body.fw-unwrap-page .hero-shell {
      display: none;
    }
    body.fw-unwrap-page .site-header {
      flex-shrink: 0;
      z-index: 50;
    }
    body.fw-unwrap-page .site-footer {
      flex-shrink: 0;
      z-index: 50;
    }
    body.fw-unwrap-page > main {
      flex: 1 1 auto;
      position: relative;
      display: flex;
      flex-direction: column;
      min-height: 0;
    }
    .fw-unwrap-logo {
      display: none;
    }
    .fw-unwrap-tuck {
      position: absolute;
      right: 20px;
      bottom: 16px;
      z-index: 24;
      width: min(280px, 42vw);
    }
    body.fw-unwrap-page .tuck {
      display: block;
      margin: 0;
    }
    body.fw-unwrap-page .flip-btn {
      position: relative;
      left: auto;
      bottom: auto;
      margin: 0;
      flex-shrink: 0;
    }
    #recipient-motion-wrapper {
      position: relative;
      flex: 1 1 auto;
      min-height: 0;
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      transform-origin: center;
      transform: scale(var(--editor-scale, 1));
      transform-style: preserve-3d;
      visibility: hidden;
    }
    #recipient-motion-wrapper.is-live { visibility: visible; }
    .flip-btn { visibility: hidden; }
    body.is-ready .flip-btn { visibility: visible; }
    #recipient-envelope-container {
      position: relative;
      width: 708px;
      height: 500px;
    }
    #base-envelope {
      position: relative;
      z-index: 1;
      width: 708px;
      height: 500px;
      perspective: 2000px;
      filter: none;
      will-change: transform;
      transform-style: preserve-3d;
    }
    #envelope-front-container {
      position: absolute;
      top: 0;
      left: 0;
      display: none;
      flex-direction: column;
      width: 708px;
      box-sizing: content-box;
      border: 2px solid transparent;
      border-radius: 8px;
      transform-style: preserve-3d;
      perspective: 1400px;
      will-change: transform;
      transform: translateY(-35%);
    }
    #envelope-tilt {
      position: relative;
      z-index: 1;
      display: flex;
      flex-direction: column;
      transform-style: preserve-3d;
      transform-origin: 50% 58%;
    }
    #card-stage {
      position: absolute;
      left: 0;
      top: 277px;
      width: 708px;
      z-index: 40;
      overflow: visible;
      pointer-events: none;
    }
    #card-stage #recipient-card-container,
    #card-stage #base-card {
      pointer-events: auto;
    }
    #flap-hinge {
      position: relative;
      width: 708px;
      height: 277px;
      flex-shrink: 0;
      overflow: visible;
      transform-style: preserve-3d;
      transform-origin: 50% 100%;
      z-index: 20;
    }
    #seal-top, #seal-front {
      position: absolute;
      left: 0;
      bottom: 0;
      -webkit-backface-visibility: hidden;
      backface-visibility: hidden;
    }
    #seal-front {
      transform: rotateX(180deg);
      overflow: visible;
    }
    #envelope-lining-bottom, #envelope-shadow { position: absolute; overflow: hidden; }
    #pocket-cover {
      position: absolute;
      left: 0;
      top: 0;
      z-index: 15;
      pointer-events: none;
    }
    #envelope-bottom { z-index: 10; overflow: hidden; }
    #pocket-clip {
      position: relative;
      display: flex;
      flex-direction: column;
      overflow: visible;
      height: 488px;
    }
    #recipient-card-container {
      position: absolute;
      left: 0;
      right: 0;
      display: flex;
      justify-content: center;
      z-index: 1;
      overflow: visible;
    }
    .base-card {
      aspect-ratio: 7 / 10;
      height: 650px;
      width: 455px;
      border-radius: 0;
      position: relative;
      flex-shrink: 0;
      cursor: pointer;
      filter: none;
      overflow: visible;
      will-change: transform;
    }
    #book {
      position: absolute;
      inset: 0;
      perspective: 1400px;
    }
    .pb-leaf {
      position: absolute;
      inset: 0;
      transform-origin: left center;
      overflow: hidden;
      border-radius: 0;
      backface-visibility: visible;
    }
    .pb-leaf-front {
      z-index: 2;
      background: none;
      box-shadow: 0 0 12px rgba(0, 0, 0, 0.06), 0 4px 8px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    }
    .pb-leaf-front .cover {
      width: 100%;
      height: 100%;
      aspect-ratio: auto;
      border-radius: 0;
      box-shadow: none;
      background: none;
      -webkit-backface-visibility: hidden;
      backface-visibility: hidden;
    }
    .pb-leaf-front .cover-art {
      width: 100%;
      height: 100%;
      object-fit: fill;
    }
    .pb-leaf-inner-a {
      z-index: 1;
      background: #fff;
    }
    .pb-mirror {
      width: 100%;
      height: 100%;
      display: block;
      object-fit: cover;
      transform: scaleX(-1);
    }
    .pb-leaf-inner-b {
      z-index: 0;
      transform-origin: bottom left;
      transform: skewY(-3deg) scaleX(0.93);
      display: flex;
      flex-direction: column;
      justify-content: center;
      padding: 36px 32px;
      text-align: center;
      background: #fff;
      box-shadow:
        0 -10px 8px rgba(0, 0, 0, 0.04),
        0 -1px 3px rgba(0, 0, 0, 0.1),
        inset 48px 0 80px 8px rgba(28, 16, 36, 0.03);
    }
    .pb-leaf-inner-b::before {
      content: "";
      position: absolute;
      inset: 0;
      z-index: 2;
      pointer-events: none;
      box-shadow: inset 52px 0 86px 10px rgba(28, 16, 36, 0.025);
      background: linear-gradient(
        90deg,
        rgba(28, 16, 36, 0.018) 0%,
        rgba(28, 16, 36, 0.008) 24%,
        rgba(28, 16, 36, 0.003) 52%,
        transparent 78%
      );
    }
    .pb-leaf-inner-b p {
      margin: 0;
      font-family: var(--kb-card-font-family);
      font-size: calc(var(--kb-card-font-size) / 1.3);
      font-weight: 400;
      color: #354358;
      line-height: 1.35;
      white-space: pre-wrap;
    }
    .base-card.is-open .pb-leaf-inner-a {
      box-shadow: 0 12px 22px rgba(28, 16, 36, 0.06);
    }
    #envelope-back {
      width: 708px;
      height: 500px;
      border-radius: 6px;
      background-color: var(--kb-envelope-background-color);
      color: var(--kb-envelope-font-color);
      font-size: var(--kb-envelope-font-size);
      font-family: var(--kb-envelope-font-family);
      display: grid;
      place-items: center;
      position: relative;
      backface-visibility: hidden;
      box-shadow: 0 8px 8px rgba(0, 0, 0, 0.25);
    }
    #front-ground {
      position: absolute;
      left: 0;
      top: 277px;
      width: 708px;
      height: 488px;
      border-radius: 0 0 8px 8px;
      box-shadow: 0 8px 8px rgba(0, 0, 0, 0.25);
      pointer-events: none;
      z-index: 0;
    }
    #flap-shadow {
      position: absolute;
      left: 0;
      top: 0;
      z-index: 12;
      overflow: visible;
      pointer-events: none;
    }
    .title-container {
      display: flex;
      align-items: center;
      justify-content: center;
      text-align: center;
      overflow: hidden;
      margin: auto;
      max-height: 360px;
      width: 96%;
      overflow-wrap: anywhere;
      font-weight: 300;
    }
    .stamp-wrap {
      position: absolute;
      right: 20px;
      top: 18px;
      width: 112px;
      height: 112px;
      pointer-events: none;
      color: #3a184f;
      filter: drop-shadow(0 1px 2px rgba(17, 35, 66, 0.2));
    }
    .stamp-wrap svg {
      display: block;
      width: 100%;
      height: 100%;
    }
    .stamp-mark {
      position: absolute;
      inset: 20%;
      width: 60%;
      height: 60%;
      object-fit: contain;
      pointer-events: none;
    }
    .flip-btn {
      position: fixed;
      left: 50%;
      bottom: 28px;
      z-index: 25;
      width: 44px;
      height: 44px;
      margin: 0 0 0 -22px;
      border: 0;
      border-radius: 999px;
      background: #fff;
      box-shadow: 0 2px 10px rgba(0,0,0,.16);
      cursor: pointer;
      display: grid;
      place-items: center;
    }
    #overlay-animation {
      position: fixed;
      inset: 0;
      width: 100%;
      height: 100%;
      pointer-events: none;
      z-index: 30;
    }
    #overlay-animation:not(.is-on) { visibility: hidden; }
    #overlay-animation .fw-celebrate-canvas,
    #overlay-animation .fw-celebrate-lottie {
      position: absolute;
      inset: 0;
      display: block;
      width: 100%;
      height: 100%;
    }
    #cover-lottie {
      width: 100%;
      height: 100%;
    }

    body.fw-group-unwrap .flip-btn {
      display: none;
    }
    body.fw-group-unwrap .site-header {
      view-transition-name: fw-site-header;
    }
    body.fw-group-unwrap .site-footer {
      view-transition-name: fw-site-footer;
    }
    body.fw-group-unwrap .fw-unwrap-hint {
      position: static;
      left: auto;
      bottom: auto;
      z-index: auto;
      margin: 0;
      padding: 10px 16px;
      border-radius: 999px;
      background: rgb(255 255 255 / 0.94);
      color: #2a103b;
      font: 700 15px/1.2 "Source Sans 3", system-ui, sans-serif;
      letter-spacing: 0.02em;
      text-decoration: none;
      box-shadow: 0 8px 24px rgb(42 16 59 / 0.14);
      transform: none;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.4s ease;
      white-space: nowrap;
    }
    body.fw-group-unwrap.is-ready .fw-unwrap-hint {
      opacity: 1;
      pointer-events: auto;
    }
    body.fw-group-unwrap .fw-unwrap-env[data-open-mode="board"] .pb-leaf-inner-a,
    body.fw-group-unwrap .fw-unwrap-env[data-open-mode="board"] .pb-leaf-inner-b {
      visibility: hidden;
    }
  
/* The looping example on the pricing page: no button, no page background. */
body.fw-unwrap-embed {
  background: transparent !important;
  overflow: hidden;
}
body.fw-unwrap-embed .flip-btn {
  display: none;
}
html:has(body.fw-unwrap-embed) {
  background: transparent !important;
}
