* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    background: #1a0a12;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Lora', serif;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 1.5rem 1rem;
    padding-top: max(1.5rem, env(safe-area-inset-top));
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
}

.bg {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(180, 40, 80, .25) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(160, 60, 100, .2) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(100, 20, 40, .4) 0%, transparent 80%);
    z-index: 0;
}

canvas#bg-canvas {
    position: fixed;
    inset: 0;
    z-index: 20;
    pointer-events: none;
}

.card-wrap {
    position: relative;
    z-index: 10;
    perspective: 1200px;
}

.card {
    width: min(92vw, 480px);
    background: linear-gradient(160deg, #fff8f5 0%, #fdeef3 40%, #fff5f0 100%);
    border-radius: 1.6rem;
    padding: clamp(1.8rem, 6vw, 3rem) clamp(1.4rem, 5vw, 2.6rem) clamp(1.8rem, 6vw, 2.8rem);
    box-shadow:
        0 0 0 1px rgba(200, 80, 110, .15),
        0 8px 32px rgba(100, 10, 30, .35),
        0 30px 80px rgba(80, 5, 20, .45),
        inset 0 1px 0 rgba(255, 255, 255, .9);
    text-align: center;
    position: relative;
    animation: cardIn 1.2s cubic-bezier(.22, 1, .36, 1) both;
    transform-style: preserve-3d;
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(40px) scale(.94) rotateX(6deg);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0deg);
    }
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='.025'/%3E%3C/svg%3E");
    border-radius: 2rem;
    pointer-events: none;
    z-index: 0;
}

.arch-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg,
            transparent 0%,
            #d4637a 20%,
            #c8355a 50%,
            #d4637a 80%,
            transparent 100%);
    border-radius: 2rem 2rem 0 0;
}

.rose-wrap {
    position: relative;
    z-index: 10;
    margin-bottom: .4rem;
    animation: floatRose 4s ease-in-out infinite;
    transform: translateZ(70px);
}

@keyframes floatRose {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

.rose-wrap svg {
    width: clamp(80px, 22vw, 110px);
    height: clamp(80px, 22vw, 110px);
    filter: drop-shadow(0 8px 20px rgba(200, 53, 90, .35));
}

.ribbon {
    display: inline-block;
    font-family: 'Jost', sans-serif;
    font-size: clamp(.58rem, 2.2vw, .65rem);
    font-weight: 400;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: #b35070;
    background: rgba(200, 53, 90, .08);
    border: 1px solid rgba(200, 53, 90, .2);
    border-radius: 2rem;
    padding: .3rem 1rem;
    margin-bottom: 1.2rem;
    position: relative;
    z-index: 1;
    animation: fadeIn .8s .6s both;
}

.greeting {
    font-family: 'Great Vibes', cursive;
    font-size: clamp(2.8rem, 14vw, 4.4rem);
    color: #b5283e;
    line-height: 1.1;
    position: relative;
    z-index: 5;
    animation: fadeIn .9s .8s both;
    text-shadow: 0 2px 20px rgba(200, 53, 90, .15);
    transform: translateZ(40px);
}

.sub-greeting {
    font-family: 'Great Vibes', cursive;
    font-size: clamp(1.6rem, 8vw, 2.4rem);
    color: #c9a84c;
    margin-top: .2rem;
    position: relative;
    z-index: 5;
    animation: fadeIn .9s 1s both;
    transform: translateZ(30px);
}

.divider {
    display: flex;
    align-items: center;
    gap: .8rem;
    margin: 1.2rem 0;
    position: relative;
    z-index: 1;
    animation: fadeIn .8s 1.1s both;
}

.div-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(200, 53, 90, .3));
}

.div-line.r {
    background: linear-gradient(90deg, rgba(200, 53, 90, .3), transparent);
}

.div-dot {
    color: #c9a84c;
    font-size: .9rem;
}

.message {
    font-size: clamp(.92rem, 3.5vw, 1.08rem);
    font-style: italic;
    font-weight: 400;
    color: #5a2a36;
    line-height: 1.85;
    position: relative;
    z-index: 1;
    animation: fadeIn .9s 1.2s both;
}

.message strong {
    font-style: normal;
    font-weight: 500;
    color: #b5283e;
}

.flowers-row {
    font-size: clamp(1.2rem, 5vw, 1.4rem);
    letter-spacing: .3rem;
    margin: 1.2rem 0 .6rem;
    position: relative;
    z-index: 5;
    animation: fadeIn .8s 1.4s both;
    transform: translateZ(25px);
}

.stamp {
    font-family: 'Great Vibes', cursive;
    font-size: clamp(1.3rem, 4.5vw, 1.6rem);
    color: rgba(181, 40, 62, 0.85);
    position: relative;
    z-index: 1;
    animation: fadeIn .8s 1.6s both;
    margin-top: .4rem;
}

.signature {
    font-family: 'Great Vibes', cursive;
    font-size: clamp(1.6rem, 5.5vw, 2.2rem);
    color: #b5283e;
    position: relative;
    z-index: 1;
    animation: fadeIn .8s 1.7s both;
    margin-top: -0.2rem;
}

.corner {
    position: absolute;
    width: clamp(36px, 10vw, 54px);
    height: clamp(36px, 10vw, 54px);
    z-index: 2;
    opacity: .4;
}

.corner svg {
    width: 100%;
    height: 100%;
}

.corner.tl {
    top: 10px;
    left: 10px;
}

.corner.tr {
    top: 10px;
    right: 10px;
    transform: scaleX(-1);
}

.corner.bl {
    bottom: 10px;
    left: 10px;
    transform: scaleY(-1);
}

.corner.br {
    bottom: 10px;
    right: 10px;
    transform: scale(-1);
}

.sparkle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 3;
    animation: sparkleAnim var(--dur, 3s) var(--delay, 0s) infinite;
}

@keyframes sparkleAnim {

    0%,
    100% {
        opacity: 0;
        transform: scale(0);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}