@import url("https://fonts.googleapis.com/css2?family=Great+Vibes&family=Lobster&family=Lovers+Quarrel&family=Parisienne&family=Pinyon+Script&family=Tangerine:wght@700&display=swap");

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    :root {
      --phone-width: min(100vw, 430px);
      --phone-side: max(0px, calc((100vw - var(--phone-width)) / 2));
      --bg: #fff8f4;
      --paper: #fffdfb;
      --paper-soft: #fff0ea;
      --ink: #4d3130;
      --muted: #80615d;
      --brand: #934847;
      --brand-dark: #743534;
      --line: #f0d5ce;
      --shadow: 0 16px 42px rgba(106, 54, 49, 0.14);
      --radius: 22px;
    }

    html {
      scroll-behavior: smooth;
      background: #251b1a;
      -webkit-text-size-adjust: 100%;
      text-size-adjust: 100%;
    }

    body {
      width: 100%;
      min-height: 100dvh;
      margin: 0;
      font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
      color: var(--ink);
      overflow-x: hidden;
    }

    html.scroll-locked,
    body.scroll-locked {
      overflow: hidden;
      overscroll-behavior: none;
      touch-action: none;
    }

    body.scroll-locked {
      position: fixed;
      top: 0;
      left: 50%;
      height: 100svh;
      transform: translateX(-50%);
    }

    body::before {
      content: "";
      position: fixed;
      top: 0;
      left: 0;
      z-index: 90;
      width: 100%;
      height: env(safe-area-inset-top);
      background: #251b1a;
      pointer-events: none;
    }

    img {
      max-width: 100%;
      display: block;
    }

    a {
      color: inherit;
    }

    .hero {
      min-height: 100dvh;
      display: flex;
      align-items: stretch;
      width: var(--phone-width);
      max-width: 430px;
      margin: 0 auto;
    }

    .invite {
      width: 100%;
      min-height: 100svh;
      position: relative;
      overflow: hidden;
      padding: 0;
      animation: cardIn 0.8s ease both;
    }

    @keyframes cardIn {
      from { opacity: 0; transform: translateY(20px) scale(0.98); }
      to { opacity: 1; transform: translateY(0) scale(1); }
    }

    @keyframes inviteFloat {
      0%, 100% { translate: 0 0; }
      50% { translate: 0 -9px; }
    }

    @keyframes musicSpin {
      to { transform: rotate(360deg); }
    }

    @keyframes envelopeFloat {
      0%, 100% {
        transform: translateY(0);
      }
      50% {
        transform: translateY(-28px);
      }
    }

    @keyframes envelopeShadow {
      0%, 100% {
        opacity: 0.58;
        transform: translateX(-50%) scaleX(1.22) scaleY(1);
        filter: blur(10px);
      }
      50% {
        opacity: 0.28;
        transform: translateX(-50%) scaleX(0.82) scaleY(0.72);
        filter: blur(7px);
      }
    }

    @keyframes heartRise {
      0% {
        opacity: 0;
        transform: translate(-50%, 0) scale(0.45) rotate(0deg);
      }
      12% {
        opacity: 1;
        transform: translate(calc(-50% + var(--heart-mid)), -105px) scale(0.9) rotate(calc(var(--heart-rotate) / 2));
      }
      62% {
        opacity: 0.95;
        transform: translate(calc(-50% + var(--heart-wide)), -360px) scale(1.26) rotate(var(--heart-rotate));
      }
      100% {
        opacity: 0;
        transform: translate(calc(-50% + var(--heart-drift)), -650px) scale(1.42) rotate(calc(var(--heart-rotate) * 1.35));
      }
    }

    .cover-kicker {
      text-align: center;
      letter-spacing: 9px;
      text-transform: uppercase;
      color: #8e3434;
      font-size: 14px;
      line-height: 1.35;
      padding-left: 9px;
    }

    .cover-title {
      margin-top: 17px;
      text-align: center;
      letter-spacing: 6px;
      text-transform: uppercase;
      color: #8f3c39;
      font-size: 22px;
      font-weight: 500;
      line-height: 1.35;
    }

    .stamp {
      position: absolute;
      top: 14px;
      right: 13px;
      width: 38px;
      height: 38px;
      border: 3px solid #ee9b9d;
      border-radius: 50%;
      opacity: 0.8;
    }

    .stamp::before,
    .stamp::after {
      content: "";
      position: absolute;
      inset: 5px;
      border: 1px solid #ee9b9d;
      border-radius: 50%;
    }

    .stamp::after {
      inset: 13px;
      background: #ee9b9d;
    }

    .couple-line {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
      align-items: center;
      gap: 8px;
      margin-top: 34px;
      color: #111;
    }

    .couple-name {
      font-family: "Pinyon Script", "Great Vibes", "Parisienne", "Lovers Quarrel", "Times New Roman", Georgia, serif;
      min-width: 0;
      text-align: center;
      font-size: 7vw;
      line-height: 1;
      letter-spacing: 0;
      color: #111;
      transform: scaleX(0.84);
      overflow-wrap: anywhere;
    }

    .amp {
      font-family: "Parisienne", Georgia, "Times New Roman", serif;
      font-size: 28px;
      line-height: 1.1;
      color: #a44d46;
    }

    .double-happiness {
      width: 60px;
      height: 60px;
      margin: 24px auto 0;
      display: grid;
      place-items: center;
      border: 3px dotted #ef8f91;
      border-radius: 50%;
      background: #fff1ed;
      color: #de3833;
      font-size: 24px;
      font-weight: 800;
      box-shadow: inset 0 0 0 3px #ffd8d0;
    }

    .envelope-stage {
      position: relative;
      width: 100%;
      height: clamp(212px, 57vw, 246px);
      margin: 62px auto 0;
      overflow: visible;
    }

    .envelope-shadow {
      position: absolute;
      left: 50%;
      bottom: -80px;
      z-index: 0;
      width: 92%;
      height: 34px;
      border-radius: 50%;
      background: radial-gradient(ellipse at center, rgba(49, 34, 31, 0.72) 0%, rgba(49, 34, 31, 0.34) 48%, transparent 76%);
      animation: envelopeShadow 2.5s ease-in-out infinite;
      pointer-events: none;
    }

    .envelope {
      position: relative;
      z-index: 1;
      display: block;
      width: 100%;
      height: 100%;
      border-radius: 2px 2px 5px 5px;
      background: #a83c3c;
      box-shadow: 0 12px 18px rgba(73, 42, 37, 0.12);
      overflow: visible;
      animation: envelopeFloat 2.5s ease-in-out infinite;
      cursor: pointer;
      perspective: 900px;
      isolation: isolate;
    }

    .envelope::before {
      content: "";
      position: absolute;
      inset: 0;
      z-index: 4;
      background: #aa3f3f;
      clip-path: polygon(0 0, 52% 50.8%, 0 100%);
      border-radius: 2px 0 0 5px;
    }

    .envelope::after {
      content: "";
      position: absolute;
      inset: 0;
      z-index: 4;
      background: #ad4242;
      clip-path: polygon(100% 0, 100% 100%, 48% 50.8%);
      border-radius: 0 2px 5px 0;
    }

    .couple-photo {
      position: absolute;
      left: 50%;
      bottom: 12px;
      z-index: 2;
      width: 84%;
      max-width: 340px;
      aspect-ratio: 1.62;
      overflow: hidden;
      border-radius: 8px;
      background: #f7d8d2;
      box-shadow: 0 18px 34px rgba(62, 31, 27, 0.22);
      transform: translate(-50%, 0) scale(0.92);
      opacity: 0.98;
      transition:
        transform 1.55s cubic-bezier(0.18, 0.74, 0.18, 1),
        box-shadow 1.55s ease;
      pointer-events: none;
    }

    .couple-photo img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .envelope.open .couple-photo {
      transform: translate(-50%, -138px) scale(1);
      box-shadow: 0 24px 44px rgba(62, 31, 27, 0.28);
      transition-delay: 0.72s;
    }

    .heart-burst {
      position: absolute;
      left: 50%;
      bottom: 124px;
      z-index: 8;
      pointer-events: none;
    }

    .heart-burst span {
      position: absolute;
      left: 0;
      bottom: 0;
      color: #d30707;
      font-size: 48px;
      line-height: 1;
      opacity: 0;
      text-shadow: 0 7px 18px rgba(126, 24, 46, 0.56);
    }

    .envelope.open .heart-burst span {
      animation: heartRise 3.4s cubic-bezier(0.18, 0.64, 0.16, 1) both;
      animation-delay: calc(2.28s + var(--heart-delay));
    }

    .heart-burst span:nth-child(1) {
      --heart-mid: -28px;
      --heart-wide: -126px;
      --heart-drift: -178px;
      --heart-rotate: -34deg;
      --heart-delay: 0s;
    }

    .heart-burst span:nth-child(2) {
      --heart-mid: 18px;
      --heart-wide: -72px;
      --heart-drift: -112px;
      --heart-rotate: 26deg;
      --heart-delay: 0.22s;
      font-size: 40px;
    }

    .heart-burst span:nth-child(3) {
      --heart-mid: -8px;
      --heart-wide: 18px;
      --heart-drift: 24px;
      --heart-rotate: -18deg;
      --heart-delay: 0.34s;
      font-size: 54px;
    }

    .heart-burst span:nth-child(4) {
      --heart-mid: 34px;
      --heart-wide: 98px;
      --heart-drift: 152px;
      --heart-rotate: 38deg;
      --heart-delay: 0.12s;
      font-size: 42px;
    }

    .heart-burst span:nth-child(5) {
      --heart-mid: -18px;
      --heart-wide: 146px;
      --heart-drift: 208px;
      --heart-rotate: -30deg;
      --heart-delay: 0.28s;
      font-size: 48px;
    }

    .envelope-flap {
      position: absolute;
      left: 0;
      right: 0;
      top: 0;
      height: 54%;
      z-index: 6;
      background: #8f2929;
      clip-path: polygon(-1% 0, 101% 0, 50% 103%);
      transform-origin: 50% 0;
      transition:
        transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) 1.18s,
        z-index 0s linear 1.18s;
      pointer-events: none;
    }

    .envelope.open .envelope-flap {
      z-index: 1;
      transform: rotateX(172deg);
      transition:
        transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) 0s,
        z-index 0s linear 0.62s;
    }

    .envelope-bottom {
      position: absolute;
      inset: 0;
      z-index: 5;
      background: #b44848;
      clip-path: polygon(-1% 101%, 50% 49%, 101% 101%);
      border-radius: 0 0 5px 5px;
      pointer-events: none;
    }

    .seal {
      position: absolute;
      z-index: 7;
      left: 50%;
      top: 50%;
      width: 40px;
      height: 40px;
      transform: translate(-50%, -50%);
      border-radius: 50%;
      background:
        radial-gradient(circle at 35% 28%, rgba(255, 224, 167, 0.55), transparent 28%),
        linear-gradient(145deg, #9a6a42, #6f482f);
      border: 2px solid #b98557;
      box-shadow: 0 4px 8px rgba(45, 22, 18, 0.28);
      transition:
        transform 0.5s ease 1.55s,
        opacity 0.42s ease 1.55s;
      pointer-events: none;
    }

    .envelope.open .seal {
      opacity: 0;
      transform: translate(-50%, -50%) scale(0.65);
      transition:
        transform 0.5s ease 0s,
        opacity 0.42s ease 0s;
    }

    .seal::after {
      content: "?";
      position: absolute;
      inset: 0;
      display: grid;
      place-items: center;
      color: rgba(244, 198, 133, 0.75);
      font-size: 14px;
    }

    .open-hint {
      position: relative;
      width: max-content;
      max-width: 100%;
      margin-top: 40px;
      margin-left: auto;
      margin-right: auto;
      text-align: center;
      font-family: "Segoe Script", "Brush Script MT", "Lucida Handwriting", cursive;
      color: #a74b49;
      font-size: 18px;
      line-height: 1;
    }

    .opening-screen {
      position: relative;
      width: 100%;
      max-width: 100%;
      min-height: 100dvh;
      display: grid;
      place-items: center;
      align-items: center;
      justify-items: center;
      padding: 8px 14px;
      overflow: hidden;
      background:
        radial-gradient(circle at 50% 38%, rgba(128, 22, 16, 0.76), transparent 46%),
        linear-gradient(180deg, #5b1212 0%, #3b0808 100%);
      color: #f7d98a;
    }

    body.invitation-opened .opening-screen {
      display: none;
    }

    .opening-screen::before {
      content: "";
      position: absolute;
      inset: 0;
      z-index: 0;
      background:
        radial-gradient(circle at 50% 52%, rgba(0, 0, 0, 0.08), transparent 30%),
        linear-gradient(90deg, rgba(18, 0, 0, 0.38), transparent 32%, transparent 68%, rgba(18, 0, 0, 0.28));
      pointer-events: none;
    }

    .falling-happiness {
      position: absolute;
      inset: 0;
      z-index: 1;
      overflow: hidden;
      font-family: "Times New Roman", Cambria, Georgia, serif;
      font-weight: 800;
      pointer-events: none;
    }

    .falling-happiness span {
      position: absolute;
      bottom: -12%;
      color: var(--happiness-color, rgba(234, 161, 40, 0.54));
      font-size: var(--happiness-size, 22px);
      line-height: 1;
      opacity: 0;
      text-shadow: 0 0 14px rgba(255, 190, 71, 0.22);
      animation: happinessRise var(--happiness-duration, 22s) cubic-bezier(0.42, 0, 0.58, 1) infinite;
    }
    .falling-happiness span:nth-child(1) {
      left: 6%;
      --happiness-size: 22px;
      --happiness-color: rgba(238, 146, 32, 0.52);
      --happiness-duration: 24s;
      animation-delay: -1.5s;
    }

    .falling-happiness span:nth-child(2) {
      left: 20%;
      --happiness-size: 15px;
      --happiness-color: rgba(255, 199, 76, 0.42);
      --happiness-duration: 27s;
      animation-delay: -7s;
    }

    .falling-happiness span:nth-child(3) {
      left: 44%;
      --happiness-size: 28px;
      --happiness-color: rgba(221, 92, 27, 0.46);
      --happiness-duration: 29s;
      animation-delay: -4.4s;
    }

    .falling-happiness span:nth-child(4) {
      left: 64%;
      --happiness-size: 18px;
      --happiness-color: rgba(255, 180, 50, 0.5);
      --happiness-duration: 23s;
      animation-delay: -9s;
    }

    .falling-happiness span:nth-child(5) {
      left: 78%;
      --happiness-size: 24px;
      --happiness-color: rgba(235, 111, 26, 0.44);
      --happiness-duration: 26s;
      animation-delay: -5.8s;
    }

    .falling-happiness span:nth-child(6) {
      left: 91%;
      --happiness-size: 13px;
      --happiness-color: rgba(255, 207, 85, 0.48);
      --happiness-duration: 30s;
      animation-delay: -11s;
    }

    @keyframes happinessRise {
      0% {
        opacity: 0;
        transform: translate3d(0, 8svh, 0) scale(0.92);
      }
      14% {
        opacity: 0.62;
      }
      50% {
        transform: translate3d(5px, -44svh, 0) scale(1.03);
      }
      84% {
        opacity: 0.56;
      }
      100% {
        opacity: 0;
        transform: translate3d(-4px, -106svh, 0) scale(1.08);
      }
    }

    .opening-burst-layer {
      position: absolute;
      inset: 0;
      z-index: 5;
      overflow: visible;
      pointer-events: none;
    }

    .opening-card {
      position: relative;
      z-index: 2;
      --dragon-left-x: -37%;
      --dragon-left-y: -4%;
      --phoenix-right-x: -23%;
      --phoenix-right-y: -5%;
      justify-self: center;
      width: calc(100% - 58px);
      max-width: 365px;
      min-height: 70dvh;
      display: grid;
      place-items: center;
      overflow: hidden;
      border-radius: 8px;
      border: 1px solid rgba(249, 166, 92, 0.34);
      background:
        radial-gradient(circle at 50% 97%, rgba(246, 174, 82, 0.16), transparent 13%),
        linear-gradient(135deg, #c31e17 0%, #ad170f 52%, #b71b13 100%);
      box-shadow: 0 18px 44px rgba(17, 0, 0, 0.38);
      isolation: isolate;
    }

    .opening-card::before,
    .opening-card::after {
      content: "";
      position: absolute;
      inset: 0;
      z-index: -1;
      pointer-events: none;
    }

    .opening-card::before {
      background:
        radial-gradient(circle at 7% 93%, transparent 0 18px, rgba(230, 119, 44, 0.34) 19px 20px, transparent 21px),
        radial-gradient(circle at 91% 9%, transparent 0 20px, rgba(230, 119, 44, 0.32) 21px 22px, transparent 23px),
        linear-gradient(135deg, rgba(239, 129, 50, 0.17), transparent 32%, transparent 68%, rgba(239, 129, 50, 0.12));
    }

    .opening-card::after {
      background:
        radial-gradient(circle at 50% 95%, rgba(250, 188, 86, 0.2), transparent 7%),
        linear-gradient(90deg, rgba(122, 7, 4, 0.24), transparent 21%, transparent 79%, rgba(122, 7, 4, 0.18));
      mix-blend-mode: multiply;
    }

    .opening-emblem {
      position: absolute;
      top: 19px;
      left: 50%;
      z-index: 2;
      width: 58px;
      height: 58px;
      display: grid;
      place-items: center;
      border-radius: 50%;
      transform: translateX(-50%);
      background:
        radial-gradient(circle at 35% 30%, #fff1bd, #d4b16c 70%);
      color: rgba(119, 78, 44, 0.76);
      border: 2px solid rgba(255, 230, 174, 0.65);
      box-shadow: 0 0 25px rgba(255, 216, 136, 0.48);
      font-family: "Times New Roman", Cambria, Georgia, serif;
      font-size: 25px;
      font-weight: 800;
    }

    .opening-emblem::before,
    .opening-emblem::after {
      content: "";
      position: absolute;
      inset: -8px;
      border-radius: 50%;
      border: 2px solid rgba(255, 229, 148, 0.72);
      opacity: 0;
      pointer-events: none;
    }

    .opening-emblem::after {
      inset: -16px;
      border-color: rgba(255, 185, 70, 0.42);
    }

    body.opening-animating .opening-emblem {
      animation: emblemPulse 1.15s ease-out both;
    }

    body.opening-animating .opening-emblem::before {
      animation: emblemRing 1.15s ease-out both;
    }

    body.opening-animating .opening-emblem::after {
      animation: emblemRing 1.15s ease-out 0.12s both;
    }

    .opening-creature {
      position: absolute;
      z-index: 1;
      height: auto;
      opacity: 0.34;
      filter: hue-rotate(28deg) saturate(1.35) brightness(1.35);
      mix-blend-mode: screen;
      pointer-events: none;
      user-select: none;
    }

    .opening-dragon {
      width: 96%;
      max-width: 360px;
    }

    .dragon-left {
      left: var(--dragon-left-x);
      top: var(--dragon-left-y);
      transform: rotate(20deg) scaleX(1.08);
    }

    .phoenix-right {
      right: var(--phoenix-right-x);
      bottom: var(--phoenix-right-y);
      transform: rotate(0deg);
    }

    .opening-phoenix {
      width: 102%;
      max-width: 380px;
      opacity: 0.32;
    }

    .opening-cloud {
      position: absolute;
      width: 82px;
      height: 33px;
      border-radius: 999px;
      border: 2px solid rgba(222, 112, 42, 0.42);
      opacity: 0.72;
    }

    .opening-cloud::before,
    .opening-cloud::after {
      content: "";
      position: absolute;
      border: 2px solid rgba(222, 112, 42, 0.42);
      border-radius: 50%;
    }

    .opening-cloud::before {
      width: 31px;
      height: 31px;
      left: 12px;
      top: -15px;
    }

    .opening-cloud::after {
      width: 23px;
      height: 23px;
      right: 13px;
      top: -10px;
    }

    .cloud-top {
      right: 18px;
      top: 34px;
      transform: scale(0.72);
    }

    .cloud-bottom {
      left: 14px;
      bottom: 13px;
      transform: scale(0.62);
    }

    .opening-content {
      position: relative;
      z-index: 3;
      width: 88%;
      max-width: 330px;
      padding-top: 62px;
      text-align: center;
      text-shadow: 0 2px 0 rgba(101, 23, 10, 0.18);
    }

    .opening-content h1 {
      color: #ffe39c;
      font-family: "Times New Roman", Cambria, Georgia, serif;
      font-size: clamp(28px, calc(var(--phone-width) * 0.08), 34px);
      font-weight: 800;
      line-height: 0.98;
      text-transform: uppercase;
      letter-spacing: 0;
    }

    .opening-content h1 span {
      display: inline-block;
      margin: 0 0 15px;
      font-size: 15px;
      line-height: 1;
    }

    .opening-divider {
      position: relative;
      width: 88px;
      margin: 18px auto 16px;
      display: grid;
      grid-template-columns: 1fr auto 1fr;
      align-items: center;
      gap: 10px;
      color: #ffe39c;
      font-family: "Times New Roman", Cambria, Georgia, serif;
      font-size: 13px;
    }

    .divider-symbol {
      position: relative;
      z-index: 2;
    }

    .opening-burst-layer {
      position: absolute;
      inset: 0;
      z-index: 5;
      pointer-events: none;
    }

    .opening-burst-layer i {
      position: absolute;
      left: var(--burst-origin-x, 50%);
      top: var(--burst-origin-y, 50%);
      width: 10px;
      height: 10px;
      opacity: 0;
      transform: translate(-50%, -50%) rotate(45deg) scale(0.3);
      color: var(--heart-color, #ff3b3b);
      background:
        radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.82), transparent 0 18%, transparent 26%),
        var(--heart-color, #ff3b3b);
      filter:
        drop-shadow(0 0 5px rgba(255, 230, 150, 0.42))
        drop-shadow(0 4px 8px rgba(100, 0, 0, 0.25));
    }

    .opening-burst-layer i::before,
    .opening-burst-layer i::after {
      content: "";
      position: absolute;
      width: 10px;
      height: 10px;
      border-radius: 50%;
      background: var(--heart-color, #ff3b3b);
    }

    .opening-burst-layer i::before {
      left: -5px;
      top: 0;
    }

    .opening-burst-layer i::after {
      left: 0;
      top: -5px;
    }

    .opening-burst-layer .burst-spark,
    .opening-burst-layer .burst-snow,
    .opening-burst-layer .burst-happiness {
      width: auto;
      height: auto;
      display: grid;
      place-items: center;
      background: transparent;
      color: var(--heart-color, #ffd766);
      font-family: "Times New Roman", Cambria, Georgia, serif;
      font-size: 16px;
      font-weight: 800;
      text-shadow:
        0 0 5px rgba(255, 235, 160, 0.7),
        0 0 13px rgba(255, 190, 60, 0.36);
    }

    .opening-burst-layer .burst-spark::before,
    .opening-burst-layer .burst-spark::after,
    .opening-burst-layer .burst-snow::before,
    .opening-burst-layer .burst-snow::after,
    .opening-burst-layer .burst-happiness::before,
    .opening-burst-layer .burst-happiness::after {
      content: none;
    }

    .opening-burst-layer .burst-happiness {
      font-size: 15px;
      color: var(--heart-color, #ffca4b);
    }

    .opening-burst-layer i:nth-child(1) { --heart-x: -96px; --heart-y: -62px; --heart-color: #ff3434; --heart-rot: -30deg; }
    .opening-burst-layer i:nth-child(2) { --heart-x: -58px; --heart-y: -92px; --heart-color: #ffca4b; --heart-rot: 24deg; }
    .opening-burst-layer i:nth-child(3) { --heart-x: 6px; --heart-y: -110px; --heart-color: #ff6f9b; --heart-rot: -18deg; }
    .opening-burst-layer i:nth-child(4) { --heart-x: 66px; --heart-y: -84px; --heart-color: #ef1f2f; --heart-rot: 35deg; }
    .opening-burst-layer i:nth-child(5) { --heart-x: 102px; --heart-y: -36px; --heart-color: #ffc64d; --heart-rot: -42deg; }
    .opening-burst-layer i:nth-child(6) { --heart-x: 92px; --heart-y: 42px; --heart-color: #ff4f7a; --heart-rot: 18deg; }
    .opening-burst-layer i:nth-child(7) { --heart-x: 36px; --heart-y: 88px; --heart-color: #ff2c2c; --heart-rot: -24deg; }
    .opening-burst-layer i:nth-child(8) { --heart-x: -28px; --heart-y: 98px; --heart-color: #ffd55d; --heart-rot: 40deg; }
    .opening-burst-layer i:nth-child(9) { --heart-x: -88px; --heart-y: 52px; --heart-color: #ff7aa7; --heart-rot: -12deg; }
    .opening-burst-layer i:nth-child(10) { --heart-x: -114px; --heart-y: 4px; --heart-color: #e91c28; --heart-rot: 30deg; }
    .opening-burst-layer i:nth-child(11) { --heart-x: 124px; --heart-y: 8px; --heart-color: #ffb72f; --heart-rot: -32deg; }
    .opening-burst-layer i:nth-child(12) { --heart-x: 0; --heart-y: -76px; --heart-color: #ff3f65; --heart-rot: 12deg; }
    .opening-burst-layer i:nth-child(13) { --heart-x: -142px; --heart-y: -74px; --heart-color: #ffcf58; --heart-rot: -55deg; --heart-size: .75; }
    .opening-burst-layer i:nth-child(14) { --heart-x: -126px; --heart-y: 88px; --heart-color: #ff2d4e; --heart-rot: 48deg; --heart-size: .9; }
    .opening-burst-layer i:nth-child(15) { --heart-x: -74px; --heart-y: 128px; --heart-color: #ff8ab0; --heart-rot: -18deg; --heart-size: .7; }
    .opening-burst-layer i:nth-child(16) { --heart-x: 74px; --heart-y: 126px; --heart-color: #ffd766; --heart-rot: 22deg; --heart-size: .82; }
    .opening-burst-layer i:nth-child(17) { --heart-x: 146px; --heart-y: 76px; --heart-color: #ff425c; --heart-rot: -42deg; --heart-size: .72; }
    .opening-burst-layer i:nth-child(18) { --heart-x: 150px; --heart-y: -70px; --heart-color: #ffbb38; --heart-rot: 38deg; --heart-size: .95; }
    .opening-burst-layer i:nth-child(19) { --heart-x: 88px; --heart-y: -134px; --heart-color: #ff6b96; --heart-rot: -20deg; --heart-size: .68; }
    .opening-burst-layer i:nth-child(20) { --heart-x: -82px; --heart-y: -138px; --heart-color: #e91d28; --heart-rot: 28deg; --heart-size: .86; }
    .opening-burst-layer i:nth-child(21) { --heart-x: -168px; --heart-y: -10px; --heart-color: #ffc84d; --heart-rot: -8deg; --heart-size: .62; }
    .opening-burst-layer i:nth-child(22) { --heart-x: 170px; --heart-y: -2px; --heart-color: #ff5d83; --heart-rot: 12deg; --heart-size: .66; }
    .opening-burst-layer i:nth-child(23) { --heart-x: -16px; --heart-y: 148px; --heart-color: #ff302f; --heart-rot: -44deg; --heart-size: .76; }
    .opening-burst-layer i:nth-child(24) { --heart-x: 18px; --heart-y: -154px; --heart-color: #ffe070; --heart-rot: 50deg; --heart-size: .7; }
    .opening-burst-layer i:nth-child(25) { --heart-x: -48px; --heart-y: -54px; --heart-color: #ff739e; --heart-rot: 30deg; --heart-size: .58; }
    .opening-burst-layer i:nth-child(26) { --heart-x: 42px; --heart-y: -48px; --heart-color: #ffb936; --heart-rot: -28deg; --heart-size: .58; }
    .opening-burst-layer i:nth-child(27) { --heart-x: 54px; --heart-y: 58px; --heart-color: #ff2645; --heart-rot: 44deg; --heart-size: .6; }
    .opening-burst-layer i:nth-child(28) { --heart-x: -52px; --heart-y: 62px; --heart-color: #ffd45d; --heart-rot: -36deg; --heart-size: .6; }

    body.opening-animating .opening-burst-layer i {
      animation: heartBurst 1.55s cubic-bezier(0.12, 0.78, 0.22, 1) both;
      animation-delay: var(--heart-delay, 0s);
    }

    body.opening-animating .opening-burst-layer i:nth-child(1) { --heart-index: 0; }
    body.opening-animating .opening-burst-layer i:nth-child(2) { --heart-index: 1; }
    body.opening-animating .opening-burst-layer i:nth-child(3) { --heart-index: 2; }
    body.opening-animating .opening-burst-layer i:nth-child(4) { --heart-index: 3; }
    body.opening-animating .opening-burst-layer i:nth-child(5) { --heart-index: 4; }
    body.opening-animating .opening-burst-layer i:nth-child(6) { --heart-index: 5; }
    body.opening-animating .opening-burst-layer i:nth-child(7) { --heart-index: 6; }
    body.opening-animating .opening-burst-layer i:nth-child(8) { --heart-index: 7; }
    body.opening-animating .opening-burst-layer i:nth-child(9) { --heart-index: 8; }
    body.opening-animating .opening-burst-layer i:nth-child(10) { --heart-index: 9; }
    body.opening-animating .opening-burst-layer i:nth-child(11) { --heart-index: 10; }
    body.opening-animating .opening-burst-layer i:nth-child(12) { --heart-index: 11; }
    body.opening-animating .opening-burst-layer i:nth-child(13) { --heart-index: 12; }
    body.opening-animating .opening-burst-layer i:nth-child(14) { --heart-index: 13; }
    body.opening-animating .opening-burst-layer i:nth-child(15) { --heart-index: 14; }
    body.opening-animating .opening-burst-layer i:nth-child(16) { --heart-index: 15; }
    body.opening-animating .opening-burst-layer i:nth-child(17) { --heart-index: 16; }
    body.opening-animating .opening-burst-layer i:nth-child(18) { --heart-index: 17; }
    body.opening-animating .opening-burst-layer i:nth-child(19) { --heart-index: 18; }
    body.opening-animating .opening-burst-layer i:nth-child(20) { --heart-index: 19; }
    body.opening-animating .opening-burst-layer i:nth-child(21) { --heart-index: 20; }
    body.opening-animating .opening-burst-layer i:nth-child(22) { --heart-index: 21; }
    body.opening-animating .opening-burst-layer i:nth-child(23) { --heart-index: 22; }
    body.opening-animating .opening-burst-layer i:nth-child(24) { --heart-index: 23; }
    body.opening-animating .opening-burst-layer i:nth-child(25) { --heart-index: 24; }
    body.opening-animating .opening-burst-layer i:nth-child(26) { --heart-index: 25; }
    body.opening-animating .opening-burst-layer i:nth-child(27) { --heart-index: 26; }
    body.opening-animating .opening-burst-layer i:nth-child(28) { --heart-index: 27; }

    .opening-divider::before,
    .opening-divider::after {
      content: "";
      height: 1px;
      background: linear-gradient(90deg, transparent, rgba(255, 217, 133, 0.78));
    }

    .opening-divider::after {
      background: linear-gradient(90deg, rgba(255, 217, 133, 0.78), transparent);
    }

    .opening-date,
    .opening-invite,
    .opening-note {
      color: #ffe39c;
      font-family: "Times New Roman", Cambria, Georgia, serif;
      font-size: 15px;
      font-weight: 700;
      line-height: 1.35;
    }

    .opening-invite {
      margin-top: 15px;
      font-size: 17px;
      text-decoration: underline;
      text-underline-offset: 3px;
      font-weight: 400;
    }

    .opening-guest {
      width: max-content;
      max-width: 100%;
      margin: 8px auto 12px;
      padding: 7px 15px 8px;
      border-radius: 12px;
      background: rgba(135, 20, 11, 0.72);
      color: #ffe39c;
      font-family: "Times New Roman", Cambria, Georgia, serif;
      font-size: 16px;
      font-weight: 800;
      line-height: 1;
    }

    .opening-note {
      display: block;
      width: calc(100% - 20px);
      max-width: 305px;
      margin-left: auto;
      margin-right: auto;
      font-size: 15px;
      font-weight: 500;
      line-height: 1.42;
      white-space: normal;
      overflow-wrap: normal;
      word-break: normal;
    }

    .opening-button {
      min-width: 134px;
      min-height: 43px;
      margin-top: 18px;
      padding: 9px 24px 10px;
      border-radius: 999px;
      background: linear-gradient(180deg, #ffe5a2 0%, #f2c66d 100%);
      color: #5d241b;
      box-shadow: 0 13px 24px rgba(87, 9, 4, 0.34);
      font-family: "Times New Roman", Cambria, Georgia, serif;
      font-size: 18px;
      font-weight: 800;
    }

    .opening-button.open {
      transform: translateY(1px) scale(0.98);
    }

    .cinematic-opening {
      width: 100%;
      max-width: 100%;
      min-height: 100dvh;
      display: block;
      padding: 0;
      overflow: hidden;
      background: #322422;
      color: #fff;
      isolation: isolate;
    }

    .cinematic-opening::before {
      content: "";
      position: absolute;
      inset: 0;
      z-index: 2;
      background:
        linear-gradient(180deg, rgba(45, 32, 31, 0.08) 0%, rgba(45, 32, 31, 0.28) 42%, rgba(45, 32, 31, 0.66) 100%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.32), transparent 46%, rgba(0, 0, 0, 0.18)),
        rgba(45, 32, 31, 0.22);
      pointer-events: none;
    }

    .cinematic-opening::after {
      content: "";
      position: absolute;
      left: -78%;
      top: -28%;
      z-index: 7;
      width: 64%;
      height: 156%;
      background:
        linear-gradient(
          105deg,
          transparent 0%,
          rgba(255, 207, 99, 0.06) 18%,
          rgba(255, 217, 126, 0.28) 32%,
          rgba(255, 248, 220, 0.96) 47%,
          rgba(255, 255, 255, 0.98) 50%,
          rgba(255, 232, 153, 0.56) 57%,
          rgba(255, 190, 64, 0.16) 70%,
          transparent 86%
        );
      filter: blur(0.45px) drop-shadow(0 0 22px rgba(255, 218, 126, 0.55)) drop-shadow(0 0 44px rgba(255, 183, 67, 0.24));
      opacity: 0;
      transform: skewX(-18deg) translate3d(0, 0, 0);
      pointer-events: none;
    }

    body.opening-animating .cinematic-opening::after {
      animation: cinematicLightSweep 1.9s cubic-bezier(0.18, 0.72, 0.22, 1) both;
    }

    .cinematic-sweep-sparks {
      position: absolute;
      inset: 0;
      z-index: 8;
      overflow: hidden;
      pointer-events: none;
    }

    .cinematic-sweep-sparks span {
      position: absolute;
      left: -18%;
      top: var(--spark-y, 50%);
      width: var(--spark-size, 7px);
      height: var(--spark-size, 7px);
      border-radius: 50%;
      background:
        radial-gradient(circle, rgba(255, 255, 232, 0.98) 0 18%, rgba(255, 228, 126, 0.82) 34%, rgba(202, 236, 76, 0.32) 56%, transparent 74%);
      box-shadow:
        0 0 10px rgba(255, 243, 176, 0.88),
        0 0 26px rgba(255, 201, 78, 0.48);
      opacity: 0;
      transform: translate3d(0, 0, 0) scale(0.55);
    }

    .cinematic-sweep-sparks span:nth-child(1) { --spark-y: 22%; --spark-size: 5px; --spark-drift: 18px; --spark-delay: 0.1s; }
    .cinematic-sweep-sparks span:nth-child(2) { --spark-y: 35%; --spark-size: 8px; --spark-drift: -22px; --spark-delay: 0.22s; }
    .cinematic-sweep-sparks span:nth-child(3) { --spark-y: 48%; --spark-size: 4px; --spark-drift: 31px; --spark-delay: 0.32s; }
    .cinematic-sweep-sparks span:nth-child(4) { --spark-y: 58%; --spark-size: 10px; --spark-drift: -12px; --spark-delay: 0.44s; }
    .cinematic-sweep-sparks span:nth-child(5) { --spark-y: 68%; --spark-size: 6px; --spark-drift: 26px; --spark-delay: 0.54s; }
    .cinematic-sweep-sparks span:nth-child(6) { --spark-y: 76%; --spark-size: 4px; --spark-drift: -28px; --spark-delay: 0.66s; }
    .cinematic-sweep-sparks span:nth-child(7) { --spark-y: 42%; --spark-size: 6px; --spark-drift: 44px; --spark-delay: 0.76s; }
    .cinematic-sweep-sparks span:nth-child(8) { --spark-y: 30%; --spark-size: 3px; --spark-drift: -40px; --spark-delay: 0.86s; }
    .cinematic-sweep-sparks span:nth-child(9) { --spark-y: 18%; --spark-size: 3px; --spark-drift: 34px; --spark-delay: 0.18s; }
    .cinematic-sweep-sparks span:nth-child(10) { --spark-y: 26%; --spark-size: 6px; --spark-drift: -16px; --spark-delay: 0.36s; }
    .cinematic-sweep-sparks span:nth-child(11) { --spark-y: 39%; --spark-size: 3px; --spark-drift: 12px; --spark-delay: 0.5s; }
    .cinematic-sweep-sparks span:nth-child(12) { --spark-y: 52%; --spark-size: 5px; --spark-drift: -36px; --spark-delay: 0.62s; }
    .cinematic-sweep-sparks span:nth-child(13) { --spark-y: 63%; --spark-size: 3px; --spark-drift: 38px; --spark-delay: 0.72s; }
    .cinematic-sweep-sparks span:nth-child(14) { --spark-y: 82%; --spark-size: 7px; --spark-drift: -18px; --spark-delay: 0.84s; }
    .cinematic-sweep-sparks span:nth-child(15) { --spark-y: 15%; --spark-size: 5px; --spark-drift: -30px; --spark-delay: 0.46s; }
    .cinematic-sweep-sparks span:nth-child(16) { --spark-y: 72%; --spark-size: 3px; --spark-drift: 52px; --spark-delay: 0.28s; }
    .cinematic-sweep-sparks span:nth-child(17) { --spark-y: 46%; --spark-size: 9px; --spark-drift: -8px; --spark-delay: 0.94s; }
    .cinematic-sweep-sparks span:nth-child(18) { --spark-y: 57%; --spark-size: 4px; --spark-drift: 21px; --spark-delay: 1.04s; }
    .cinematic-sweep-sparks span:nth-child(19) { --spark-y: 88%; --spark-size: 4px; --spark-drift: -42px; --spark-delay: 0.58s; }
    .cinematic-sweep-sparks span:nth-child(20) { --spark-y: 33%; --spark-size: 5px; --spark-drift: 48px; --spark-delay: 1.12s; }

    body.opening-animating .cinematic-sweep-sparks span {
      animation: cinematicSparkSweep 1.55s cubic-bezier(0.18, 0.72, 0.22, 1) var(--spark-delay, 0s) both;
    }

    .cinematic-slides,
    .cinematic-slide {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
    }

    .cinematic-slides {
      z-index: 1;
      background: #2f2525;
    }

    .cinematic-slides::after {
      content: "";
      position: absolute;
      inset: 0;
      z-index: 2;
      background:
        radial-gradient(circle at 50% 45%, rgba(255, 249, 222, 0.72) 0 12%, rgba(255, 226, 151, 0.28) 23%, transparent 43%),
        radial-gradient(circle at 50% 45%, transparent 0 35%, rgba(0, 0, 0, 0.36) 76%, rgba(0, 0, 0, 0.58) 100%);
      filter: blur(0.2px);
      opacity: 0;
      transform: scale(0.74);
      pointer-events: none;
    }

    .cinematic-slide {
      object-fit: cover;
      object-position: center;
      opacity: 0;
      transform: scale(1.08);
      transition: opacity 1.05s ease, transform 4.2s ease;
      will-change: opacity, transform;
    }

    .cinematic-slide:nth-child(1) {
      object-position: center 22%;
    }

    .cinematic-slide:nth-child(2) {
      object-position: center 34%;
    }

    .cinematic-slide:nth-child(3) {
      object-position: center 26%;
    }

    .cinematic-slide.is-active {
      opacity: 1;
      transform: scale(1);
    }

    body.cinematic-photo-cued .cinematic-slide.is-active {
      animation: cinematicPhotoSpotlightImage 3.7s cubic-bezier(0.18, 0.72, 0.22, 1) both;
    }

    body.cinematic-photo-cued .cinematic-slides::after {
      animation: cinematicPhotoSpotlight 3.15s cubic-bezier(0.16, 0.76, 0.2, 1) both;
    }

    .cinematic-skip {
      position: absolute;
      top: max(28px, env(safe-area-inset-top));
      right: clamp(30px, 9vw, 46px);
      z-index: 8;
      max-width: calc(100% - 60px);
      min-width: 118px;
      min-height: 54px;
      margin: 0;
      padding: 0 23px;
      gap: 17px;
      border: 0;
      border-radius: 999px;
      background: rgba(48, 35, 32, 0.88);
      color: #fff;
      box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
      font-family: Arial, "Helvetica Neue", sans-serif;
      font-size: 18px;
      font-weight: 900;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      backdrop-filter: blur(8px);
    }

    .cinematic-button-text {
      white-space: nowrap;
    }

    body.cinematic-started .cinematic-skip {
      min-width: 126px;
    }

    .skip-arrow {
      position: relative;
      display: block;
      width: 34px;
      height: 18px;
      flex: 0 0 auto;
    }

    .skip-arrow::before,
    .skip-arrow::after {
      content: "";
      position: absolute;
      right: 0;
      top: 50%;
      background: #fff;
      transform-origin: right center;
    }

    .skip-arrow::before {
      left: 0;
      height: 2px;
      transform: translateY(-50%);
    }

    .skip-arrow::after {
      width: 14px;
      height: 2px;
      transform: translateY(-50%) rotate(45deg);
    }

    .cinematic-copy {
      position: absolute;
      left: clamp(28px, 10vw, 46px);
      right: clamp(28px, 10vw, 46px);
      bottom: max(54px, calc(env(safe-area-inset-bottom) + 42px));
      z-index: 5;
      color: #fff;
      text-transform: uppercase;
      text-shadow: 0 9px 26px rgba(0, 0, 0, 0.32);
    }

    .cinematic-title {
      min-height: 176px;
      margin: 0;
      font-family: Georgia, "Times New Roman", serif;
      font-size: clamp(58px, calc(var(--phone-width) * 0.18), 86px);
      font-weight: 700;
      line-height: 0.86;
      letter-spacing: 0;
      opacity: 1;
      transform: translateY(0);
      transition: opacity 0.35s ease, transform 0.35s ease, font-size 0.35s ease, line-height 0.35s ease;
    }

    body.cinematic-started .cinematic-title {
      display: flex;
      max-width: min(92%, 380px);
      min-height: 176px;
      flex-direction: column;
      justify-content: flex-end;
      gap: 3px;
      color: rgba(255, 255, 255, 0.96);
      font-family: "Lobster", "Segoe Script", "Brush Script MT", cursive;
      font-size: clamp(12px, calc(var(--phone-width) * 0.03), 16px);
      font-weight: 400;
      line-height: 1.2;
      letter-spacing: 0;
      text-transform: none;
      text-wrap: balance;
      white-space: pre-line;
    }

    .subtitle-line {
      display: block;
      min-height: 1.2em;
    }

    .subtitle-male {
      color: #ffffff;
      text-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
    }

    .subtitle-female {
      color: #f2c766;
      text-shadow: 0 6px 20px rgba(66, 38, 6, 0.46);
    }

    .cinematic-title.is-switching {
      opacity: 0;
      transform: translateY(10px);
    }

    .cinematic-meta {
      display: grid;
      grid-template-columns: auto minmax(80px, 1fr) auto;
      align-items: center;
      gap: 20px;
      max-width: 320px;
      margin-top: 34px;
      font-family: Arial, "Helvetica Neue", sans-serif;
      font-size: 14px;
      font-weight: 900;
      letter-spacing: 0.22em;
      transition: opacity 0.28s ease, transform 0.28s ease;
    }

    .cinematic-line {
      height: 2px;
      background: rgba(255, 255, 255, 0.9);
    }

    body.cinematic-started .cinematic-meta {
      opacity: 0;
      transform: translateY(8px);
      pointer-events: none;
    }

    @media (orientation: landscape) and (max-height: 520px) {
      .cinematic-copy {
        left: 24px;
        right: 150px;
        bottom: 24px;
      }

      .cinematic-title {
        min-height: 112px;
        font-size: clamp(44px, 12vh, 62px);
      }

      body.cinematic-started .cinematic-title {
        max-width: 300px;
        min-height: 104px;
        font-size: clamp(10px, 3.2vh, 13px);
        line-height: 1.12;
        gap: 1px;
      }
    }

    body.opening-animating .cinematic-opening {
      animation: cinematicExit 1.9s ease both;
    }

    body.opening-animating .cinematic-slide.is-active {
      transform: scale(1.045);
      filter: blur(2px) brightness(1.08);
    }

    @keyframes cinematicPhotoSpotlightImage {
      0% {
        transform: scale(1);
        filter: brightness(0.94) saturate(0.98);
      }
      24% {
        transform: scale(1.022);
        filter: brightness(1.13) saturate(1.06);
      }
      58% {
        transform: scale(1.04);
        filter: brightness(1.06) saturate(1.04);
      }
      100% {
        transform: scale(1.052);
        filter: brightness(1) saturate(1);
      }
    }

    @keyframes cinematicPhotoSpotlight {
      0% {
        opacity: 0;
        transform: scale(0.62);
      }
      16% {
        opacity: 1;
        transform: scale(0.72);
      }
      52% {
        opacity: 0.82;
        transform: scale(1.08);
      }
      100% {
        opacity: 0;
        transform: scale(1.55);
      }
    }

    @keyframes cinematicExit {
      to {
        opacity: 0;
        transform: scale(1.025);
      }
    }

    @keyframes cinematicLightSweep {
      0% {
        opacity: 0;
        transform: skewX(-18deg) translate3d(0, 0, 0);
      }
      18% {
        opacity: 0.9;
      }
      62% {
        opacity: 1;
      }
      100% {
        opacity: 0;
        transform: skewX(-18deg) translate3d(360%, 0, 0);
      }
    }

    @keyframes cinematicSparkSweep {
      0% {
        opacity: 0;
        transform: translate3d(0, 0, 0) scale(0.45);
      }
      18% {
        opacity: 0.98;
      }
      56% {
        opacity: 0.86;
        transform: translate3d(62vw, calc(var(--spark-drift, 0px) * 0.52), 0) scale(1);
      }
      100% {
        opacity: 0;
        transform: translate3d(128vw, var(--spark-drift, 0px), 0) scale(0.42);
      }
    }

    @keyframes emblemPulse {
      0% {
        transform: translateX(-50%) scale(1);
        box-shadow: 0 0 25px rgba(255, 216, 136, 0.48);
      }
      35% {
        transform: translateX(-50%) scale(1.16);
        box-shadow: 0 0 38px rgba(255, 230, 158, 0.95), 0 0 80px rgba(255, 170, 42, 0.42);
      }
      100% {
        transform: translateX(-50%) scale(1);
        box-shadow: 0 0 25px rgba(255, 216, 136, 0.48);
      }
    }

    @keyframes emblemRing {
      0% {
        opacity: 0.85;
        transform: scale(0.55);
      }
      100% {
        opacity: 0;
        transform: scale(2.35);
      }
    }

    @keyframes heartBurst {
      0% {
        opacity: 0;
        transform: translate(-50%, -50%) rotate(45deg) scale(calc(var(--heart-size, 1) * 0.25));
      }
      12% {
        opacity: 1;
      }
      72% {
        opacity: 0.95;
        transform: translate(calc(-50% + var(--heart-x)), calc(-50% + var(--heart-y))) rotate(calc(45deg + var(--heart-rot))) scale(var(--heart-size, 1));
      }
      100% {
        opacity: 0;
        transform: translate(calc(-50% + var(--heart-x) * 1.18), calc(-50% + var(--heart-y) * 1.18)) rotate(calc(45deg + var(--heart-rot) * 1.5)) scale(calc(var(--heart-size, 1) * 0.35));
      }
    }

    button,
    .button {
      min-height: 48px;
      border: 0;
      border-radius: 999px;
      padding: 13px 18px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: var(--brand);
      color: white;
      font: inherit;
      font-size: 15px;
      font-weight: 800;
      text-decoration: none;
      box-shadow: 0 10px 24px rgba(147, 72, 71, 0.22);
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
    }

    button:active,
    .button:active {
      transform: translateY(1px);
      background: var(--brand-dark);
    }

    .button.secondary {
      background: #fffdfb;
      color: var(--brand);
      border: 1px solid var(--line);
      box-shadow: none;
    }

    .invitation-preview-section {
      width: 100%;
      max-width: 430px;
      margin: 0 auto;
      padding: 0;
      background: transparent;
      box-shadow: 0 0 70px rgba(0, 0, 0, 0.2);
    }

    body:not(.invitation-opened) .invitation-preview-section {
      display: none;
    }


    body.invitation-entering .invitation-preview-section {
      animation: invitationSoftEnter 1.55s cubic-bezier(0.16, 0.84, 0.24, 1) both;
      transform-origin: center top;
    }

    body.invitation-entering .invitation-preview {
      animation: invitationSoftGlow 1.55s ease-out both;
    }

    @keyframes invitationSoftEnter {
      0% {
        opacity: 0;
        transform: translateY(28px) scale(0.965);
        filter: blur(8px) brightness(1.08);
      }
      58% {
        opacity: 1;
        transform: translateY(-3px) scale(1.006);
        filter: blur(0) brightness(1.04);
      }
      100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0) brightness(1);
      }
    }

    @keyframes invitationSoftGlow {
      0% {
        box-shadow: 0 0 0 rgba(255, 220, 150, 0), 0 18px 42px rgba(46, 38, 36, 0.18);
      }
      42% {
        box-shadow: 0 0 48px rgba(255, 217, 130, 0.42), 0 18px 42px rgba(46, 38, 36, 0.18);
      }
      100% {
        box-shadow: 0 18px 42px rgba(46, 38, 36, 0.18);
      }
    }

    .invitation-preview {
      position: relative;
      overflow: hidden;
      width: 100%;
      margin-left: 0;
      margin-right: 0;
      background: linear-gradient(180deg, #fbf3f1 0%, #f8eeec 72%, #fbf4f2 100%);
      box-shadow: 0 18px 42px rgba(46, 38, 36, 0.18);
    }

    .wedding-profile-intro.invitation-cover {
      height: 100svh;
      min-height: 100svh;
      background: #f3ece7;
      color: #8d3b20;
      text-align: left;
    }

    .invitation-cover .cover-photo {
      position: relative;
      width: 100%;
      height: 100%;
      overflow: hidden;
      background: #5a463c;
    }

    .invitation-cover .cover-photo::after {
      content: "";
      position: absolute;
      inset: 0;
      z-index: 1;
      background:
        linear-gradient(180deg, rgba(23, 14, 12, 0.05) 0%, rgba(23, 14, 12, 0.08) 48%, rgba(23, 14, 12, 0.34) 100%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.28), transparent 42%, rgba(0, 0, 0, 0.08));
      pointer-events: none;
    }

    .invitation-cover .cover-photo > img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: center top;
    }

    .invitation-cover .cover-title {
      position: absolute;
      left: 28px;
      right: 5px;
      bottom: 68px;
      z-index: 3;
      color: #efd892;
      font-family: Georgia, "Times New Roman", serif;
      line-height: 0.82;
      letter-spacing: 0;
      text-align: right;
      text-transform: none;
      text-shadow: 0 8px 28px rgba(41, 24, 8, 0.24);
      pointer-events: none;
    }

    .invitation-cover .cover-title-row {
      display: flex;
      justify-content: flex-end;
      align-items: flex-start;
      gap: 20px;
    }

    .invitation-cover .cover-title-bottom {
      margin-top: 20px;
    }

    .invitation-cover .cover-script {
      z-index: 2;
      display: inline-block;
      color: #f8e5a7;
      font-family: "Great Vibes", "Pinyon Script", cursive;
      font-size: 59px;
      font-weight: 400;
      letter-spacing: 0;
      text-transform: none;
      transform: translateY(16px);
    }

    .invitation-cover .cover-main {
      display: inline-block;
      font-size: 78px;
      font-weight: 800;
      letter-spacing: -0.03em;
      text-transform: none;
    }

    .invitation-cover .cover-main.lower {
      display: block;
      margin-top: 0;
      font-size: 85px;
    }

    .invitation-cover .cover-date {
      position: absolute;
      left: 36px;
      right: 36px;
      bottom: 18px;
      z-index: 4;
      display: grid;
      grid-template-columns: auto auto 1fr auto;
      gap: 10px;
      align-items: center;
      color: #f8e2a4;
      font-family: Georgia, "Times New Roman", serif;
      font-size: 22px;
      line-height: 1;
    }

    .invitation-cover .cover-heart {
      color: #f9e7a8;
      font-size: 18px;
    }

    .invitation-letter {
      padding: 50px 42px 50px;
      background: #f3ece7;
      color: #15110f;
      text-align: center;
      font-family: "Times New Roman", Times, serif;
      font-kerning: normal;
      letter-spacing: 0;
      word-spacing: 0;
    }

    .invitation-letter p,
    .invitation-letter h2 {
      margin: 0;
    }

    .invitation-letter-kicker {
      color: #a65a17;
      font-family: "Times New Roman", Times, serif;
      font-size: 16px;
      line-height: 1;
      text-transform: uppercase;
    }

    .invitation-letter h2 {
      margin-top: 34px;
      color: #a65a17;
      font-family: "Times New Roman", Times, serif;
      font-size: 16px;
      font-weight: 400;
      line-height: 1.25;
      text-transform: uppercase;
    }

    .invitation-letter-copy {
      max-width: 315px;
      margin: 30px auto 0;
      font-size: 14px;
      line-height: 1.55;
    }

    .invitation-letter-copy p + p {
      margin-top: 6px;
    }

    .invitation-flourish {
      position: relative;
      width: 310px;
      max-width: 90%;
      height: 98px;
      margin: 18px auto 0;
      background-image: url("data:image/svg+xml,%3Csvg width='310' height='98' viewBox='0 0 310 98' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14 58C44 95 107 83 139 43C158 19 168 9 184 16C200 23 188 49 168 58C135 73 105 64 93 51' stroke='%2314100E' stroke-width='1.45' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M186 42C206 58 229 29 211 22C194 15 195 48 223 42C241 38 255 32 296 33' stroke='%2314100E' stroke-width='1.45' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: center;
      background-size: contain;
    }

    .invitation-flourish span {
      display: none;
    }

    .family-introduction {
      padding: 6px 28px 34px;
      background: #f3ece7;
      color: #120d0c;
      font-family: "Times New Roman", Times, serif;
      text-align: center;
      font-kerning: normal;
      letter-spacing: 0;
      word-spacing: 0;
    }

    .family-columns {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 24px;
      align-items: start;
    }

    .family-side h2 {
      min-height: 24px;
      font-size: 18px;
      font-weight: 800;
      line-height: 1.1;
      text-transform: uppercase;
    }

    .family-parents {
      margin-top: 8px;
      font-size: 13px;
      line-height: 1.22;
      text-transform: uppercase;
    }

    .family-parents strong {
      display: block;
      font-weight: 800;
      letter-spacing: 0;
    }

    .family-address {
      margin-top: 8px;
      font-size: 15px;
      font-weight: 400;
      line-height: 1.25;
      text-transform: none;
    }

    .family-portraits {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 26px;
      margin-top: 26px;
    }

    .family-portrait {
      overflow: hidden;
      height: 268px;
      border-radius: 10px;
      background: #d8c9bd;
      box-shadow: 0 8px 20px rgba(35, 25, 20, 0.22);
    }

    .family-portrait img {
      display: block;
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .family-portrait.groom img {
      object-position: center 18%;
    }

    .family-portrait.bride img {
      object-position: 67% center;
      transform: scale(1.08);
    }

    .family-signatures {
      display: grid;
      grid-template-columns: 1fr auto 1fr;
      gap: 14px;
      align-items: center;
      margin-top: 14px;
      color: #a65a17;
      font-family: "Great Vibes", "Pinyon Script", cursive;
      font-size: 41px;
      line-height: 1;
    }

    .family-signatures span:first-child {
      text-align: left;
    }

    .family-signatures span:last-child {
      text-align: right;
    }

    .family-signatures img {
      display: block;
      width: 30px;
      height: 30px;
      object-fit: contain;
      filter: drop-shadow(0 3px 4px rgba(93, 66, 35, 0.16));
    }

    .interview-story {
      padding: 34px 28px 50px;
      background: #f3ece7;
      color: #15110f;
      text-align: center;
      font-family: "Times New Roman", Times, serif;
      font-kerning: normal;
      letter-spacing: 0;
      word-spacing: 0;
    }

    .interview-story h2,
    .interview-story p,
    .interview-photo {
      margin: 0;
    }

    .interview-story h2 {
      color: #a65a17;
      font-family: "Great Vibes", "Pinyon Script", cursive;
      font-size: 58px;
      font-weight: 400;
      line-height: 0.95;
    }

    .interview-kicker {
      margin-top: 12px !important;
      color: #a65a17;
      font-size: 16px;
      line-height: 1.25;
    }

    .interview-copy {
      margin-top: 18px !important;
      font-size: 16px;
      line-height: 1.35;
      letter-spacing: 0;
      word-spacing: 0;
    }

    .interview-photo {
      width: 100%;
      margin-top: 30px;
      overflow: hidden;
      background: #d9cfc8;
    }

    .interview-photo img {
      display: block;
      width: 100%;
      aspect-ratio: 4 / 5;
      object-fit: cover;
      object-position: center top;
    }

    .wedding-gallery {
      padding: 30px 12px 42px;
      background: #f3ece7;
      color: #a65a17;
      text-align: center;
      font-family: "Times New Roman", Times, serif;
    }

    .wedding-gallery h2,
    .wedding-gallery figure {
      margin: 0;
    }

    .wedding-gallery h2 {
      margin-bottom: 20px;
      font-size: 23px;
      font-weight: 400;
      line-height: 1;
      letter-spacing: 6px;
      text-transform: uppercase;
    }

    .gallery-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 10px;
    }

    .gallery-item {
      overflow: hidden;
      border-radius: 9px;
      background: #d8c9bd;
      box-shadow: 0 4px 13px rgba(35, 25, 20, 0.2);
    }

    .gallery-wide {
      grid-column: 1 / -1;
    }

    .gallery-item img {
      display: block;
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .gallery-wide img {
      aspect-ratio: 2.2 / 1;
      object-position: center center;
    }

    .gallery-item:not(.gallery-wide) img {
      aspect-ratio: 0.72 / 1;
      object-position: center center;
    }

    .save-date-card {
      padding: 34px 20px 42px;
      background: #f3ece7;
      color: #1a1110;
      text-align: center;
      font-family: "Times New Roman", Times, serif;
      font-kerning: normal;
      letter-spacing: 0;
      word-spacing: 0;
    }

    .save-date-card h2,
    .save-date-card p {
      margin: 0;
    }

    .save-date-card h2 {
      display: grid;
      grid-template-columns: 1fr auto 1fr;
      align-items: center;
      column-gap: 6px;
      max-width: 310px;
      margin: 0 auto 30px;
      color: #a65a17;
      font-family: "Great Vibes", "Pinyon Script", cursive;
      font-size: 58px;
      font-weight: 400;
      line-height: 0.86;
    }

    .save-date-card h2 span:first-child {
      text-align: left;
      transform: translateY(-14px);
    }

    .save-date-card h2 span:last-child {
      text-align: right;
      transform: translateY(18px);
    }

    .save-date-card h2 em {
      color: #2c1c1a;
      font-size: 26px;
      font-style: normal;
      transform: translateY(10px);
    }

    .save-date-time {
      font-family: "Times New Roman", Times, serif;
      font-size: 21px;
      font-weight: 700;
      line-height: 1.25;
      letter-spacing: 0;
      word-spacing: 0;
      text-transform: uppercase;
    }

    .save-date-day {
      margin-top: 8px !important;
      color: #8b4514;
      font-family: "Times New Roman", Times, serif;
      font-size: 42px;
      font-weight: 800;
      line-height: 1;
      letter-spacing: 0;
      word-spacing: 0;
    }

    .save-date-lunar {
      margin-top: 8px !important;
      color: #5f3021;
      font-family: "Times New Roman", Times, serif;
      font-size: 14px;
      line-height: 1.25;
      letter-spacing: 0;
      word-spacing: 0;
    }

    .save-calendar {
      margin-top: 12px;
      border: 1px solid #b56b1c;
      background: rgba(255, 249, 245, 0.34);
    }

    .save-calendar-weekdays,
    .save-calendar-grid {
      display: grid;
      grid-template-columns: repeat(7, minmax(0, 1fr));
      align-items: center;
      justify-items: center;
    }

    .save-calendar-weekdays {
      min-height: 29px;
      background: #ead28e;
      color: #2d241d;
      font-family: "Times New Roman", Times, serif;
      font-size: 16px;
      line-height: 1;
      letter-spacing: 0;
    }

    .save-calendar-grid {
      grid-auto-rows: 51px;
      padding: 8px 8px 12px;
      color: #34251f;
      font-family: "Times New Roman", Times, serif;
      font-size: 13px;
      letter-spacing: 0;
    }

    .save-calendar-grid span {
      position: relative;
      z-index: 1;
      display: grid;
      width: 32px;
      height: 32px;
      place-items: center;
    }

    .save-calendar-grid .wedding-day {
      color: #fff;
      font-weight: 700;
      text-shadow: 0 1px 2px rgba(126, 28, 36, 0.35);
    }

    .save-calendar-grid .wedding-day::before {
      content: "";
      position: absolute;
      z-index: -1;
      left: 50%;
      top: 50%;
      width: 54px;
      height: 42px;
      background:
        radial-gradient(circle at 31% 24%, rgba(255, 197, 201, 0.8) 0 9%, transparent 10%),
        linear-gradient(145deg, #ff9fa5 0%, #e9525d 50%, #c93d49 100%);
      clip-path: polygon(48% 96%, 37% 84%, 25% 76%, 13% 63%, 6% 49%, 5% 33%, 12% 18%, 25% 9%, 39% 13%, 49% 26%, 58% 13%, 72% 7%, 87% 14%, 96% 29%, 94% 47%, 84% 62%, 70% 75%, 58% 86%);
      filter: drop-shadow(2px 5px 5px rgba(152, 50, 58, 0.28));
      transform: translate(-50%, -48%) rotate(-10deg);
    }

    .save-calendar-grid .wedding-day::after {
      content: "· ·";
      position: absolute;
      left: 50%;
      top: -13px;
      color: #e85059;
      font-size: 14px;
      font-weight: 700;
      letter-spacing: 2px;
      transform: translateX(-50%) rotate(-11deg);
    }

    .location-card {
      padding: 32px 12px 42px;
      background: #f3ece7;
      color: #1a1110;
      text-align: center;
      font-family: "Times New Roman", Times, serif;
      font-kerning: normal;
      letter-spacing: 0;
      word-spacing: 0;
    }

    .location-card h2,
    .location-card p {
      margin: 0;
    }

    .location-card h2 {
      color: #a65a17;
      font-size: 23px;
      font-weight: 400;
      line-height: 1;
      letter-spacing: 6px;
      text-transform: uppercase;
    }

    .location-type {
      margin-top: 18px !important;
      font-size: 16px;
      line-height: 1.25;
      text-transform: uppercase;
    }

    .location-name {
      margin-top: 14px !important;
      color: #a65a17;
      font-family: "Great Vibes", "Pinyon Script", cursive;
      font-size: 62px;
      line-height: 0.95;
    }

    .location-address {
      margin-top: 10px !important;
      color: #7a3f1d;
      font-size: 15px;
      line-height: 1.3;
    }

    .location-map {
      display: block;
      width: calc(100% + 24px);
      height: 250px;
      margin: 24px -12px 0;
      border: 0;
      filter: saturate(0.82) contrast(0.9);
    }

    .location-countdown {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 22px;
      padding: 40px 42px 0;
    }

    .location-timebox {
      min-height: 58px;
      display: grid;
      place-items: center;
      padding: 7px 4px;
      border-radius: 4px;
      background: #ead28e;
      color: #2a1e18;
      line-height: 1.1;
    }

    .location-timebox strong {
      display: block;
      font-size: 18px;
      font-weight: 400;
    }

    .location-timebox span {
      display: block;
      margin-top: 5px;
      font-size: 16px;
    }

    .invitation-cover .sparkle-field {
      position: absolute;
      inset: 0;
      z-index: 2;
      overflow: hidden;
      pointer-events: none;
    }

    .invitation-cover .sparkle-canvas {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      display: block;
    }

    .wedding-profile-intro {
      position: relative;
      overflow: hidden;
      background: #ebdbd0;
      color: #241513;
      text-align: center;
      font-family: Arial, "Helvetica Neue", sans-serif;
    }

    .profile-pattern {
      background-color: #641210;
      background-image:
        linear-gradient(180deg, rgba(42, 3, 3, 0.48), rgba(42, 3, 3, 0.48)),
        url("assets/images/dragon02.jpg");
      background-repeat: repeat;
      background-size: 520px auto;
    }

    .profile-pattern.top {
      height: 77px;
      background-position: center 18%;
    }

    .profile-title-band {
      display: grid;
      place-items: center;
      height: 66px;
      background: #eadbd2;
    }

    .profile-title-band h2,
    .profile-album-band h3 {
      margin: 0;
      color: #982823;
      font-family: "Lobster", "Segoe Script", "Brush Script MT", cursive;
      font-size: 23px;
      font-weight: 800;
      line-height: 1;
      text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
    }
    .profile-pattern.portraits {
      display: grid;
      grid-template-columns: 1fr 1fr;
      align-items: center;
      gap: 22px;
      height: 166px;
      background-position: center 42%;
    }

    .profile-portrait {
      width: auto;
      height: 95%;
      aspect-ratio: 1 / 1;
      margin: 0 auto;
      overflow: hidden;
      border-radius: 50%;
      box-shadow: 0 8px 16px rgba(75, 15, 13, 0.22);
    }

    .profile-portrait img {
      display: block;
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .profile-info-band {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 22px;
      padding: 9px 28px 38px;
      background: #eadbd2;
    }

    .profile-column {
      display: flex;
      flex-direction: column;
      align-items: center;
    }

    .profile-role {
      margin: 0 0 12px;
      color: #1f1514;
      font-family: Arial, "Helvetica Neue", sans-serif;
      font-size: 15px;
      line-height: 1.2;
    }

    .profile-column h3 {
      margin: 0 0 18px;
      color: #982823;
      font-family: "Lobster", "Segoe Script", "Brush Script MT", cursive;
      font-size: 22px;
      font-weight: 800;
      line-height: 1.1;
    }
    .profile-parents {
      margin: 0 0 24px;
      color: #161010;
      font-family: Arial, "Helvetica Neue", sans-serif;
      font-size: 15px;
      line-height: 1.18;
    }

    .profile-parents strong {
      display: inline-block;
      margin-top: 4px;
      font-family: "Lobster", "Segoe Script", "Brush Script MT", cursive;
      font-size: 15px;
      font-weight: 800;
      line-height: 1.08;
    }

    .profile-address {
      margin: auto 0 0;
      color: #342927;
      font-family: Arial, "Helvetica Neue", sans-serif;
      font-size: 12px;
      line-height: 1.35;
    }

    .profile-album-band {
      display: grid;
      place-items: center;
      height: 83px;
      background: #eadbd2;
    }

    .profile-album-band h3 {
      font-size: 18px;
    }
    .wedding-album {
      overflow: hidden;
      padding: 12px 12px 15px;
      background: #5b0d0b;
    }

    .album-stage {
      position: relative;
      display: grid;
      grid-template-columns: 88px minmax(0, 1fr) 88px;
      align-items: center;
      height: 313px;
      overflow: hidden;
      border-radius: 18px;
      background: #f6f7f8;
    }

    .album-main {
      width: 100%;
      height: 100%;
      margin: 0;
      overflow: hidden;
      background: #090605;
    }

    .album-main img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: center;
      transition: opacity 0.16s ease;
      transform: translateZ(0);
      will-change: opacity;
    }

    .album-main img.is-switching {
      opacity: 0.72;
    }

    .album-nav,
    .album-expand,
    .album-thumb {
      border: 0;
      cursor: pointer;
      font-family: Arial, "Helvetica Neue", sans-serif;
      -webkit-tap-highlight-color: transparent;
    }

    .album-nav {
      position: relative;
      z-index: 2;
      width: 50px;
      height: 50px;
      min-width: 50px;
      min-height: 50px;
      margin: 0 auto;
      padding: 0 0 4px;
      border-radius: 50%;
      background: #ffffff;
      color: #203040;
      box-shadow: 0 7px 18px rgba(21, 23, 27, 0.12);
      font-size: 40px;
      font-weight: 300;
      line-height: 1;
      transform: translateZ(0);
      touch-action: manipulation;
      backface-visibility: hidden;
      will-change: transform;
    }

    .album-nav:active {
      transform: translateZ(0);
    }

    .album-expand {
      position: absolute;
      top: 17px;
      right: 13px;
      z-index: 3;
      width: 38px;
      height: 38px;
      min-width: 38px;
      min-height: 38px;
      padding: 0;
      border-radius: 50%;
      background: #ffffff;
      color: #22313d;
      box-shadow: 0 6px 16px rgba(21, 23, 27, 0.12);
      font-size: 20px;
      line-height: 1;
      transform: translateZ(0);
      touch-action: manipulation;
      backface-visibility: hidden;
      will-change: transform;
    }


    
    .album-expand:active {
      transform: translateZ(0);
    }
.album-lightbox {
      position: fixed;
      inset-block: 0;
      left: var(--phone-side);
      z-index: 120;
      display: grid;
      grid-template-rows: 42px minmax(0, 1fr) 106px;
      align-items: stretch;
      justify-items: center;
      gap: 10px;
      width: var(--phone-width);
      height: 100dvh;
      box-sizing: border-box;
      padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
      overflow: hidden;
      background: rgba(0, 0, 0, 0.78);
      color: #fff;
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transition: opacity 0.28s ease, visibility 0.28s ease;
    }

    .album-lightbox *,
    .album-lightbox *::before,
    .album-lightbox *::after {
      box-sizing: border-box;
    }

    .album-lightbox.is-open {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
    }

    .album-lightbox-bar,
    .album-lightbox-body,
    .album-lightbox-footer {
      width: min(100%, 390px);
      max-width: calc(var(--phone-width) - 24px);
    }

    .album-lightbox-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      min-width: 0;
      gap: 8px;
    }

    .album-lightbox-bar h2 {
      min-width: 0;
      margin: 0;
      overflow: hidden;
      font-family: Arial, "Helvetica Neue", sans-serif;
      font-size: 20px;
      font-weight: 800;
      letter-spacing: 0.5px;
      line-height: 1;
      white-space: nowrap;
      text-overflow: ellipsis;
    }

    .album-lightbox-close {
      flex: 0 0 auto;
      min-width: 0;
      min-height: 0;
      height: 36px;
      padding: 0 12px;
      border: 0;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.18);
      color: #fff;
      box-shadow: none;
      font-family: Arial, "Helvetica Neue", sans-serif;
      font-size: 18px;
      font-weight: 800;
      white-space: nowrap;
      touch-action: manipulation;
    }

    .album-lightbox-body {
      position: relative;
      display: grid;
      place-items: center;
      height: 100%;
      min-height: 0;
      overflow: hidden;
    }

    .album-lightbox-body img {
      display: block;
      width: auto;
      max-width: calc(var(--phone-width) - 70px);
      max-height: 100%;
      margin: auto;
      border-radius: 2px;
      object-fit: contain;
      box-shadow: 0 18px 46px rgba(0, 0, 0, 0.42);
      transition: opacity 0.16s ease;
      transform: translateZ(0);
      will-change: opacity;
    }

    .album-lightbox-body img.is-switching {
      opacity: 0.72;
    }

    .album-lightbox-nav {
      position: absolute;
      top: 50%;
      z-index: 2;
      width: 48px;
      height: 48px;
      min-width: 48px;
      min-height: 48px;
      padding: 0 0 5px;
      border: 0;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.24);
      color: #fff;
      box-shadow: none;
      font-size: 44px;
      font-weight: 300;
      line-height: 1;
      transform: translateY(-50%) translateZ(0);
      touch-action: manipulation;
      backface-visibility: hidden;
      will-change: transform;
    }

    
    .album-lightbox-nav:active {
      transform: translateY(-50%) translateZ(0);
    }
.album-lightbox-nav.prev {
      left: 2px;
    }

    .album-lightbox-nav.next {
      right: 2px;
    }

    .album-lightbox-footer {
      min-height: 0;
      align-self: end;
      overflow: hidden;
    }

    .album-lightbox-count {
      margin: 0 0 8px;
      font-family: Arial, "Helvetica Neue", sans-serif;
      font-size: 18px;
      font-weight: 800;
      line-height: 1;
    }

    .album-lightbox-thumbs {
      display: grid;
      grid-auto-flow: column;
      grid-auto-columns: 64px;
      gap: 10px;
      height: 68px;
      overflow-x: auto;
      overflow-y: hidden;
      padding-bottom: 4px;
      scrollbar-width: none;
    }

    .album-lightbox-thumbs::-webkit-scrollbar {
      display: none;
    }

    .album-lightbox-thumb {
      width: 64px;
      height: 64px;
      min-width: 64px;
      min-height: 64px;
      overflow: hidden;
      padding: 0;
      border: 2px solid transparent;
      border-radius: 6px;
      background: rgba(255, 255, 255, 0.12);
      box-shadow: none;
      touch-action: manipulation;
    }

    .album-lightbox-thumb.is-active {
      border-color: #fff;
    }

    .album-lightbox-thumb img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    html.lightbox-open,
    body.lightbox-open {
      overflow: hidden;
    }

    @media (min-width: 431px) {
      .album-lightbox {
        left: var(--phone-side);
        width: var(--phone-width);
      }
    }
    .album-thumbs {
      max-width: 100%;
      display: grid;
      grid-auto-flow: column;
      grid-auto-columns: 78px;
      gap: 12px;
      margin-top: 15px;
      overflow-x: auto;
      overflow-y: hidden;
      padding-bottom: 1px;
      scrollbar-width: none;
    }

    .album-thumbs::-webkit-scrollbar {
      display: none;
    }

    .album-thumb {
      width: 78px;
      height: 78px;
      min-width: 78px;
      min-height: 78px;
      overflow: hidden;
      padding: 0;
      border: 2px solid transparent;
      border-radius: 7px;
      background: #470807;
      box-shadow: none;
    }

    .album-thumb.is-active {
      border-color: #f3f5ff;
      box-shadow: 0 0 0 1px rgba(70, 116, 255, 0.9);
    }

    .album-thumb img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: center;
    }
    .preview-top {
      position: relative;
      display: grid;
      place-items: center;
      min-height: 86px;
      padding: 18px 66px 18px 24px;
      background: linear-gradient(180deg, #fffdfb, #fff6f3);
    }

    .preview-top::after {
      content: "";
      position: absolute;
      left: 50%;
      bottom: 17px;
      width: 72%;
      height: 18px;
      border-radius: 999px;
      background: radial-gradient(ellipse at center, rgba(57, 49, 46, 0.33), rgba(57, 49, 46, 0.12) 54%, transparent 78%);
      filter: blur(7px);
      transform: translateX(-50%);
    }

    .preview-open-text {
      position: relative;
      z-index: 1;
      font-family: "Segoe Script", "Brush Script MT", "Lucida Handwriting", cursive;
      color: #a74b49;
      font-size: 18px;
      line-height: 1;
      text-shadow: 0 1px 0 #fff;
    }

    .preview-disc {
      position: absolute;
      right: 13px;
      top: 14px;
      z-index: 2;
      display: grid;
      place-items: center;
      width: 42px;
      height: 42px;
      border-radius: 50%;
      color: #fff;
      background: #ef9da1;
      box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.6), 0 8px 18px rgba(158, 63, 70, 0.2);
      font-size: 18px;
    }

    .preview-photo {
      position: relative;
      min-height: 590px;
      display: flex;
      flex-direction: column;
      justify-content: flex-end;
      padding: 286px 26px 28px;
      background:
        linear-gradient(180deg, rgba(255, 228, 222, 0.08), rgba(255, 228, 222, 0.14)),
        url("assets/images/couple03.webp") center top / cover;
    }

    .preview-countdown {
      position: relative;
      z-index: 2;
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 13px;
      width: calc(100% - 44px);
      max-width: 286px;
      margin: 0 auto -32px;
    }

    .preview-countdown .timebox {
      min-height: 58px;
      padding: 9px 6px;
      border: 0;
      border-radius: 5px;
      color: #fff;
      background: #a93d3c;
      box-shadow: 0 8px 18px rgba(79, 34, 32, 0.2);
    }

    .preview-countdown .timebox strong {
      color: #fff;
      font-size: 15px;
      line-height: 1.1;
    }

    .preview-countdown .timebox span {
      margin-top: 5px;
      color: #fff;
      font-size: 12px;
      font-weight: 700;
      text-transform: lowercase;
    }

    .preview-message {
      position: relative;
      z-index: 1;
      padding: 60px 28px 26px;
      text-align: center;
      background: rgba(255, 249, 246, 0.50);
      backdrop-filter: blur(2px);
    }

    .preview-message h2 {
      margin-bottom: 20px;
      color: #8f3c39;
      font-family: "Segoe UI", system-ui, sans-serif;
      font-size: 24px;
      font-weight: 400;
      letter-spacing: 12px;
      padding-left: 12px;
      text-align: center;
    }

    .preview-message p {
      color: #9a4c48;
      font-size: 12px;
      line-height: 1.65;
    }

    .reveal-up {
      opacity: 0;
      transform: translateY(var(--reveal-distance, 80px));
      will-change: transform, opacity;
    }

    .reveal-left {
      opacity: 0;
      transform: translateX(var(--reveal-distance, 80px));
      will-change: transform, opacity;
    }

    .reveal-right {
      opacity: 0;
      transform: translateX(calc(var(--reveal-distance, 80px) * -1));
      will-change: transform, opacity;
    }

    .reveal-up.is-visible {
      animation: revealUp var(--reveal-duration, 2s)
        cubic-bezier(0.16, 0.84, 0.24, 1)
        var(--reveal-delay, 0s)
        forwards;
    }

    .reveal-left.is-visible {
      animation: revealLeft var(--reveal-duration, 2s)
        cubic-bezier(0.16, 0.84, 0.24, 1)
        var(--reveal-delay, 0s)
        forwards;
    }

    .reveal-right.is-visible {
      animation: revealRight var(--reveal-duration, 2s)
        cubic-bezier(0.16, 0.84, 0.24, 1)
        var(--reveal-delay, 0s)
        forwards;
    }

    @keyframes revealUp {
      from {
        opacity: 0;
        transform: translateY(var(--reveal-distance, 80px));
      }
      55% {
        opacity: 0.72;
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    @keyframes revealLeft {
      from {
        opacity: 0;
        transform: translateX(var(--reveal-distance, 80px));
      }
      55% {
        opacity: 0.72;
      }
      to {
        opacity: 1;
        transform: translateX(0);
      }
    }

    @keyframes revealRight {
      from {
        opacity: 0;
        transform: translateX(calc(var(--reveal-distance, 80px) * -1));
      }
      55% {
        opacity: 0.72;
      }
      to {
        opacity: 1;
        transform: translateX(0);
      }
    }

    @media (max-width: 380px) {
      .profile-pattern.top {
        height: 74px;
      }

      .profile-title-band {
        height: 62px;
      }

      .profile-pattern.portraits {
        height: 154px;
        gap: 16px;
        padding: 0 22px;
      }


      .profile-info-band {
        gap: 16px;
        padding: 9px 18px 34px;
      }
      .wedding-album {
        padding-inline: 10px;
      }

      .album-stage {
        grid-template-columns: 58px minmax(0, 1fr) 58px;
        height: 292px;
        border-radius: 15px;
      }

      .album-nav {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
        font-size: 36px;
      }

      .album-thumbs {
        grid-auto-columns: 70px;
        gap: 10px;
      }

      .album-thumb {
        width: 70px;
        height: 70px;
        min-width: 70px;
        min-height: 70px;
      }

      .profile-column h3 {
        font-size: 20px;
      }

      .profile-parents,
      .profile-parents strong {
        font-size: 14px;
      }
    }
    @media (max-width: 420px) {
      .preview-photo {
        min-height: 590px;
        padding: 286px 18px 28px;
      }

      .preview-countdown {
        gap: 9px;
        width: 100%;
        max-width: 276px;
      }

      .preview-countdown .timebox {
        min-height: 56px;
        padding: 8px 5px;
      }

      .preview-message {
        padding: 76px 18px 24px;
      }

      .preview-message h2 {
        margin-bottom: 22px;
        font-size: 23px;
        letter-spacing: 9px;
        padding-left: 9px;
      }
    }

    @media (max-width: 360px) {
      .preview-photo {
        padding-top: 278px;
      }

      .preview-countdown {
        gap: 7px;
        width: 100%;
        max-width: 260px;
      }

      .preview-countdown .timebox strong {
        font-size: 14px;
      }

      .preview-countdown .timebox span {
        font-size: 11px;
      }

      .preview-message {
        padding-top: 76px;
      }

      .preview-message h2 {
        font-size: 18px;
        letter-spacing: 7px;
        padding-left: 7px;
      }
    }

    .wedding-details-card {
      padding: 52px 34px 24px;
      background: #eadbd2;
      color: #131111;
      text-align: center;
      font-family: Arial, "Helvetica Neue", sans-serif;
    }

    .wedding-details-card p,
    .wedding-details-card h2 {
      margin: 0;
    }
    .details-group.time {
      margin-bottom: 34px;
    }

    .details-group.place {
      margin-bottom: 30px;
    }

    .details-script,
    .details-note {
      color: #982823;
      font-family: "Lobster", "Segoe Script", "Brush Script MT", cursive;
      font-weight: 800;
      line-height: 1.35;
    }

    .details-script {
      margin-bottom: 14px;
      font-size: 17px;
    }

    .details-time {
      margin-bottom: 10px;
      font-size: 16px;
      font-weight: 800;
      line-height: 1.35;
    }

    .details-date {
      margin-bottom: 14px;
      color: #982823;
      font-size: 18px;
      font-weight: 800;
      line-height: 1.35;
    }

    .details-lunar {
      margin-bottom: 0;
      font-size: 14px;
      font-weight: 800;
      line-height: 1.45;
    }

    .details-place-type {
      margin: 12px 0 16px;
      font-size: 17px;
      font-weight: 800;
      line-height: 1.35;
    }

    .wedding-details-card h2 {
      margin-bottom: 0;
      color: #9a2c27;
      font-family: Arial, "Helvetica Neue", sans-serif;
      font-size: 25px;
      font-weight: 800;
      letter-spacing: 0;
      line-height: 1.15;
    }

    .details-map {
      display: block;
      width: 100%;
      height: 218px;
      margin: 0 auto 42px;
      border: 0;
      background: #d6d6d6;
    }

    .details-note {
      font-size: 17px;
    }

    @media (max-width: 380px) {
      .wedding-details-card {
        padding: 42px 22px 20px;
      }

      .details-script,
      .details-note {
        font-size: 16px;
      }

      .details-time,
      .details-place-type {
        font-size: 16px;
      }

      .details-date {
        font-size: 20px;
      }

      .details-map {
        height: 206px;
      }
    }

    .closing-credit-section {
      position: relative;
      aspect-ratio: 16 / 9;
      min-height: 0;
      overflow: hidden;
      background: #f3ece7;
      color: #fff;
      text-align: center;
      font-family: Arial, "Helvetica Neue", sans-serif;
    }

    .closing-credit-section::before {
      content: "";
      position: absolute;
      inset: 0;
      z-index: 1;
      background:
        linear-gradient(90deg, rgba(255, 255, 255, 0) 0 45%, rgba(45, 42, 35, 0.36) 68%, rgba(45, 42, 35, 0.55) 100%),
        linear-gradient(180deg, rgba(243, 236, 231, 0.96) 0%, rgba(243, 236, 231, 0) 24%, rgba(243, 236, 231, 0) 76%, rgba(243, 236, 231, 0.98) 100%);
      pointer-events: none;
    }

    .closing-credit-section img {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: center;
    }

    .closing-credit-section p {
      position: relative;
      z-index: 2;
      width: 50%;
      min-width: 160px;
      margin: 0 18px 0 auto;
      padding-top: 66px;
      font-size: 10px;
      font-weight: 500;
      line-height: 1.58;
      text-shadow: 0 1px 8px rgba(44, 39, 34, 0.35);
    }

    @media (max-width: 380px) {
      .closing-credit-section p {
        margin-right: 14px;
        padding-top: 50px;
        font-size: 12px;
      }
    }
    .music {
      position: fixed;
      right: 8px;
      top: max(5px, env(safe-area-inset-top));
      z-index: 30;
      width: 42px;
      height: 42px;
      min-width: 42px;
      min-height: 42px;
      aspect-ratio: 1;
      padding: 0;
      border-radius: 50%;
      border: 3px solid #111;
      background: rgba(255, 255, 255, 0.88);
      color: #111;
      font-size: 18px;
      box-shadow: 0 2px 9px rgba(0, 0, 0, 0.22);
      transform-origin: center;
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transition: opacity 0.35s ease, visibility 0.35s ease;
    }

    body.invitation-opened .music {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
    }

    .music::before {
      content: "";
      position: absolute;
      inset: 4px;
      border: 1px solid #111;
      border-radius: 50%;
    }

    .music.playing {
      animation: musicSpin 3s linear infinite;
    }

    @media (min-width: 431px) {
      .invitation-preview-section {
        border-inline: 1px solid rgba(255, 255, 255, 0.08);
      }
    }

    @media (min-width: 521px) {
      html,
      body {
        background: #eef1f5;
      }

      .hero {
        width: var(--phone-width);
        max-width: 430px;
        margin: 0 auto;
        box-shadow: 0 0 70px rgba(0, 0, 0, 0.18);
      }

      .opening-screen {
        width: 100%;
        max-width: 100%;
        min-height: 100svh;
      }

      .opening-card {
        width: calc(100% - 58px);
        max-width: 365px;
        min-height: min(70svh, 560px);
      }

      .music {
        right: calc(var(--phone-side) + 8px);
      }

    }

    @media (max-width: 360px) {
      .hero {
        padding-inline: 0;
      }

      .invite {
        padding: 0;
        border-radius: 0;
      }

      .invitation-preview {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
      }

      h1 {
        font-size: 45px;
      }

      .section-title {
        font-size: 30px;
      }

    }

    @media (max-width: 430px) {
      .invitation-preview-section {
        max-width: 100%;
        box-shadow: none;
      }

      .cinematic-skip {
        top: max(18px, env(safe-area-inset-top));
        right: clamp(30px, 9vw, 46px);
        max-width: calc(100% - 28px);
        min-width: 108px;
        min-height: 48px;
        padding: 0 16px;
        gap: 10px;
        font-size: 14px;
        letter-spacing: 0.08em;
      }

      body.cinematic-started .cinematic-skip {
        min-width: 116px;
      }

      .skip-arrow {
        width: 24px;
      }

      .cinematic-copy {
        left: 24px;
        right: 24px;
        bottom: max(42px, calc(env(safe-area-inset-bottom) + 30px));
      }

      .cinematic-title {
        min-height: 154px;
        font-size: 66px;
      }

      body.cinematic-started .cinematic-title {
        max-width: 100%;
        min-height: 154px;
        font-size: 12px;
        line-height: 1.18;
      }

      .cinematic-meta {
        grid-template-columns: auto minmax(24px, 1fr) auto;
        gap: 8px;
        max-width: 320px;
        margin-top: 24px;
        font-size: 10px;
        letter-spacing: 0.12em;
      }

      .invitation-cover .cover-title {
        left: 16px;
        right: 10px;
        bottom: 64px;
      }

      .invitation-cover .cover-title-row {
        gap: 10px;
        align-items: baseline;
      }

      .invitation-cover .cover-title-bottom {
        margin-top: 8px;
      }

      .invitation-cover .cover-script {
        font-size: 54px;
        transform: translateY(8px);
      }

      .invitation-cover .cover-main {
        font-size: 72px;
      }

      .invitation-cover .cover-main.lower {
        font-size: 78px;
      }

      .invitation-cover .cover-date {
        left: 24px;
        right: 24px;
        gap: 8px;
        font-size: 19px;
      }

      .invitation-letter {
        padding: 46px 26px 44px;
      }

      .invitation-letter-copy {
        max-width: 100%;
        font-size: 14px;
        line-height: 1.5;
      }

      .family-introduction {
        padding: 4px 20px 32px;
      }

      .family-columns {
        gap: 14px;
      }

      .family-side h2 {
        font-size: 17px;
      }

      .family-parents {
        font-size: 12.5px;
      }

      .family-address {
        font-size: 14px;
      }

      .family-portraits {
        gap: 16px;
      }

      .family-portrait {
        height: 62vw;
        max-height: 268px;
      }

      .family-signatures {
        gap: 8px;
        font-size: 34px;
      }

      .interview-story {
        padding: 34px 22px 46px;
      }

      .interview-story h2 {
        font-size: 52px;
      }

      .interview-copy {
        font-size: 15px;
        line-height: 1.32;
      }

      .wedding-gallery {
        padding: 30px 10px 40px;
      }

      .gallery-grid {
        gap: 8px;
      }

      .save-date-card {
        padding: 32px 12px 40px;
      }

      .save-date-card h2 {
        max-width: 290px;
        font-size: 52px;
      }

      .save-date-time {
        font-size: 19px;
      }

      .save-date-day {
        font-size: 38px;
      }

      .save-calendar-weekdays {
        font-size: 14px;
      }

      .save-calendar-grid {
        grid-auto-rows: 47px;
        padding: 8px 4px 10px;
      }

      .location-countdown {
        gap: 10px;
        padding: 32px 18px 0;
      }

      .location-timebox {
        min-height: 54px;
      }

      .location-timebox strong {
        font-size: 17px;
      }

      .location-timebox span {
        font-size: 14px;
      }

      .closing-credit-section p {
        width: 54%;
        min-width: 0;
        margin-right: 12px;
        padding-top: 44px;
        font-size: 9.5px;
        line-height: 1.45;
      }
    }

    @media (max-width: 360px) {
      .cinematic-copy {
        left: 20px;
        right: 20px;
      }

      .cinematic-title {
        min-height: 140px;
        font-size: 58px;
      }

      body.cinematic-started .cinematic-title {
        min-height: 140px;
        font-size: 11px;
      }

      .cinematic-meta {
        gap: 7px;
        max-width: 280px;
        font-size: 9px;
        letter-spacing: 0.1em;
      }

      .invitation-cover .cover-title {
        left: 12px;
        right: 8px;
        bottom: 58px;
      }

      .invitation-cover .cover-title-row {
        gap: 7px;
      }

      .invitation-cover .cover-script {
        font-size: 46px;
        transform: translateY(7px);
      }

      .invitation-cover .cover-main {
        font-size: 60px;
      }

      .invitation-cover .cover-main.lower {
        font-size: 68px;
      }

      .invitation-cover .cover-date {
        left: 20px;
        right: 20px;
        font-size: 17px;
      }

      .invitation-letter {
        padding-inline: 20px;
      }

      .family-introduction {
        padding-inline: 16px;
      }

      .family-columns {
        gap: 10px;
      }

      .family-side h2 {
        font-size: 16px;
      }

      .family-parents {
        font-size: 11.5px;
      }

      .family-portrait {
        height: 60vw;
      }

      .family-signatures {
        font-size: 30px;
      }

      .interview-story {
        padding-inline: 18px;
      }

      .interview-story h2 {
        font-size: 48px;
      }

      .wedding-gallery h2,
      .location-card h2 {
        letter-spacing: 4px;
      }

      .save-date-card h2 {
        max-width: 260px;
        font-size: 46px;
      }

      .save-date-time {
        font-size: 17px;
      }

      .save-date-day {
        font-size: 34px;
      }

      .save-calendar-grid {
        grid-auto-rows: 42px;
        font-size: 12px;
      }

      .save-calendar-grid span {
        width: 28px;
        height: 28px;
      }

      .save-calendar-grid .wedding-day::before {
        width: 48px;
        height: 38px;
      }

      .location-name {
        font-size: 54px;
      }

      .location-countdown {
        gap: 6px;
        padding: 28px 8px 0;
      }

      .location-timebox {
        min-height: 50px;
        padding-inline: 2px;
      }

      .location-timebox strong {
        font-size: 16px;
      }

      .location-timebox span {
        font-size: 12px;
      }

      .closing-credit-section p {
        width: 56%;
        margin-right: 10px;
        padding-top: 36px;
        font-size: 9px;
        line-height: 1.38;
      }
    }

    @media (max-height: 640px) and (orientation: portrait) {
      .cinematic-copy {
        bottom: max(30px, calc(env(safe-area-inset-bottom) + 22px));
      }

      .cinematic-title {
        min-height: 128px;
      }

      .cinematic-meta {
        margin-top: 18px;
      }

      .invitation-cover .cover-title {
        bottom: 56px;
      }

      .invitation-cover .cover-date {
        bottom: 14px;
      }
    }

    @media (prefers-reduced-motion: reduce) {
      html {
        scroll-behavior: auto;
      }

      *,
      *::before,
      *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
      }
    }

