@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);
      --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;
    }

    body {
      width: 100%;
      min-height: 100dvh;
      margin: 0;
      font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
      background: #3b0808;
      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: #3b0808;
      pointer-events: none;
    }

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

    a {
      color: inherit;
    }

    .hero {
      min-height: 100dvh;
      display: flex;
      align-items: stretch;
    }

    .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: 8px;
      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: 100vw;
      max-width: 100vw;
      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(100vw - 58px);
      max-width: calc(100vw - 58px);
      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: 8px;
      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, 8vw, 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);
    }

    @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));
      }
    }

    body::after {
      --v-a: "\004d\0061";
      --v-b: "\0064\0065\0020";
      --v-c: "\0077\0069\0074\0068\0020";
      --v-d: "\0044\0051\0079\0068";
      content: var(--v-a) var(--v-b) var(--v-c) var(--v-d);
      position: fixed;
      right: 9px;
      bottom: 60px;
      z-index: 40;
      writing-mode: vertical-rl;
      transform: rotate(180deg);
      color: #2f2828;
      font-size: 12px;
      font-weight: 600;
      letter-spacing: 0.2px;
    }

    .source-signature {
      position: fixed;
      left: 0;
      bottom: 0;
      width: 1px;
      height: 1px;
      overflow: hidden;
      opacity: 0.01;
      pointer-events: none;
      user-select: none;
    }

    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 {
      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/template/dragon02.webp");
      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: 0;
      z-index: 120;
      display: grid;
      grid-template-rows: 42px minmax(0, 1fr) 106px;
      align-items: stretch;
      justify-items: center;
      gap: 10px;
      width: 100vw;
      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(100vw - 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(100vw - 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: 50%;
        width: 430px;
        transform: translateX(-50%);
      }
    }
    .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.jpg") 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;
      }
    }

    .gift-preview-card {
      overflow: hidden;
      background: #eadbd2;
      text-align: center;
    }

    .closing-credit-section {
      background: #eadbd2;
      text-align: center;
    }

    .gift-pattern-strip {
      height: 76px;
      background-color: #5f1110;
      background-image:
        linear-gradient(180deg, rgba(38, 3, 3, 0.48), rgba(38, 3, 3, 0.48)),
        url("assets/images/template/dragon02.webp");
      background-repeat: repeat;
      background-size: 520px auto;
    }

    .gift-pattern-strip.top {
      background-position: center 20%;
    }

    .gift-pattern-strip.bottom {
      background-position: center 52%;
    }

    .gift-preview-main {
      position: relative;
      display: grid;
      min-height: 310px;
      place-items: center;
      padding: 28px 24px 34px;
      background:
        linear-gradient(180deg, rgba(162, 151, 148, 0.78), rgba(162, 151, 148, 0.78)),
        url("assets/images/template/dragon02.webp") center / 520px auto repeat;
    }

    .gift-preview-main h2 {
      position: absolute;
      top: 31px;
      left: 0;
      right: 0;
      margin: 0;
      color: rgba(74, 73, 71, 0.86);
      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.25);
    }

    .wedding-certificates {
      position: relative;
      width: 136px;
      height: 120px;
      margin-top: 50px;
      animation: certificatePulse 1.45s ease-in-out infinite;
      transform-origin: center;
    }


    @keyframes certificatePulse {
      0%, 100% {
        transform: scale(0.92) rotate(0deg);
      }
      30% {
        transform: scale(1.2) rotate(0deg);
      }
      36% {
        transform: scale(1.22) rotate(-5deg) translateX(-4px);
      }
      42% {
        transform: scale(1.24) rotate(5deg) translateX(4px);
      }
      48% {
        transform: scale(1.22) rotate(-4deg) translateX(-3px);
      }
      54% {
        transform: scale(1.2) rotate(4deg) translateX(3px);
      }
      62% {
        transform: scale(1.12) rotate(0deg);
      }
    }

    .certificate {
      position: absolute;
      top: 10px;
      display: grid;
      width: 55px;
      height: 94px;
      place-items: center;
      padding: 10px 0;
      border-radius: 2px;
      color: #f7d33a;
      background: linear-gradient(145deg, #f0441f 0%, #c82718 66%, #9c160f 100%);
      box-shadow: 0 8px 14px rgba(90, 23, 17, 0.28);
      font-family: "Times New Roman", Cambria, serif;
      font-size: 18px;
      font-weight: 800;
      line-height: 1.1;
      text-align: center;
    }

    .certificate.left {
      left: 18px;
      transform: rotate(-11deg);
    }

    .certificate.right {
      right: 17px;
      transform: rotate(13deg);
    }
    .wedding-certificates.is-clickable {
      cursor: pointer;
    }

    .gift-preview-main.show-qr .wedding-certificates {
      display: none;
    }

    .gift-inline-qr[hidden] {
      display: none;
    }

    .gift-inline-qr {
      position: relative;
      z-index: 1;
      display: grid;
      width: min(100%, 330px);
      gap: 28px;
      margin-top: 58px;
    }

    .gift-inline-card {
      display: grid;
      grid-template-columns: 78px minmax(0, 1fr);
      align-items: center;
      gap: 14px;
      min-height: 84px;
    }

    .gift-inline-card:nth-child(2) {
      grid-template-columns: minmax(0, 1fr) 78px;
      margin-top: 2px;
    }

    .gift-inline-card:nth-child(2) .gift-inline-portrait {
      order: 2;
    }

    .gift-inline-card:nth-child(2) .gift-inline-panel {
      order: 1;
      grid-template-columns: 68px minmax(0, 1fr);
    }

    .gift-inline-card:nth-child(2) .gift-inline-code {
      order: -1;
    }

    .gift-inline-portrait {
      width: 78px;
      height: 78px;
      border-radius: 50%;
      object-fit: cover;
      padding: 5px;
      border: 6px dashed rgba(178, 73, 76, 0.28);
      background: rgba(255, 246, 244, 0.78);
      object-position: center 5%;
    }

    .gift-inline-panel {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 68px;
      align-items: center;
      gap: 9px;
      min-height: 76px;
      padding: 9px 10px 9px 17px;
      border-radius: 20px;
      background: rgba(246, 239, 237, 0.9);
      box-shadow: 0 10px 24px rgba(55, 25, 21, 0.16);
      text-align: center;
    }

    .gift-inline-info {
      min-width: 0;
      color: #4f3633;
      line-height: 1.25;
    }

    .gift-inline-info strong,
    .gift-inline-info span,
    .gift-inline-info small {
      display: block;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
    }

    .gift-inline-info strong {
      margin-bottom: 5px;
      font-size: 13px;
      font-weight: 500;
    }

    .gift-inline-info span {
      font-size: 13px;
    }

    .gift-inline-info small {
      margin-top: 5px;
      font-size: 9px;
      opacity: 0.78;
    }

    .gift-inline-code {
      width: 66px;
      height: 66px;
      padding: 5px;
      border-radius: 14px;
      background:
        linear-gradient(90deg, #111 10px, transparent 10px 14px, #111 14px 18px, transparent 18px 24px, #111 24px 28px, transparent 28px),
        linear-gradient(#111 8px, transparent 8px 12px, #111 12px 16px, transparent 16px 22px, #111 22px 26px, transparent 26px),
        repeating-linear-gradient(45deg, transparent 0 5px, rgba(0, 0, 0, 0.9) 5px 8px, transparent 8px 12px),
        #fff;
      background-clip: content-box, content-box, content-box, border-box;
      box-shadow: inset 0 0 0 1px rgba(90, 43, 39, 0.08);
    }

    .gift-inline-code.alt {
      background:
        linear-gradient(90deg, #111 8px, transparent 8px 13px, #111 13px 17px, transparent 17px 23px, #111 23px 30px, transparent 30px),
        linear-gradient(#111 10px, transparent 10px 15px, #111 15px 19px, transparent 19px 25px, #111 25px 29px, transparent 29px),
        repeating-linear-gradient(-45deg, transparent 0 4px, rgba(0, 0, 0, 0.9) 4px 7px, transparent 7px 11px),
        #fff;
      background-clip: content-box, content-box, content-box, border-box;
    }

    .gift-preview-note {
      margin: 0;
      padding: 55px 28px 8px;
      color: #982823;
      font-family: "Lobster", "Segoe Script", "Brush Script MT", cursive;
      font-size: 19px;
      font-weight: 800;
      line-height: 1.45;
    }

    @media (max-width: 380px) {
      .gift-pattern-strip {
        height: 70px;
      }

      .gift-preview-main {
        min-height: 286px;
      }

      .gift-preview-main h2 {
        font-size: 18px;
      }

      .gift-preview-note {
        padding: 46px 22px 28px;
        font-size: 17px;
      }
    }
    .music {
      position: fixed;
      right: 8px;
      top: max(5px, env(safe-area-inset-top));
      z-index: 30;
      width: 40px;
      height: 40px;
      min-width: 40px;
      min-height: 40px;
      aspect-ratio: 1;
      padding: 0;
      border-radius: 50%;
      border: 3px solid #b6201b;
      background: #f9d8b0;
      color: #9b1714;
      font-size: 17px;
      box-shadow: none;
      transform-origin: center;
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transition: opacity 0.35s ease, visibility 0.35s ease;
    }

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

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

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

    @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: 100%;
        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: max(8px, calc((100vw - 430px) / 2 + 8px));
      }

      body::after {
        right: max(9px, calc((100vw - 430px) / 2 + 9px));
      }
    }

    @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 (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;
      }
    }

