```css
/* ---------------- GLOBAL ---------------- */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: radial-gradient(circle at top, #f8f5ff, #c8b3ff);
    color: #332826;
}

/* ---------------- INDEX PAGE ---------------- */

.index-page {
    min-height: 100vh;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    overflow: hidden;
    font-family: Arial, sans-serif;
}

#cow {
    width: 200px;
    display: block;
    margin-bottom: 28px;
    cursor: pointer;

    transition: transform 0.3s ease;
}

#cow:hover {
    transform: scale(1.05);
}

.password-card {
    width: min(360px, 90vw);
    padding: 26px 22px;

    background: #fcfbff;
    border: 1px solid rgba(107, 75, 182, 0.25);
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(72, 46, 120, 0.25);

    text-align: center;
}

.password-card h1 {
    margin: 0 0 10px;

    color: #6b4bb6;
    font-size: 26px;
}

.password-card p {
    margin: 0 0 18px;

    color: #4c3b73;
    font-size: 16px;
    line-height: 1.5;
}

.password-card input {
    width: 100%;
    padding: 13px 14px;

    color: #3a285f;
    background: #f8f5ff;
    border: 1px solid rgba(107, 75, 182, 0.35);
    border-radius: 12px;
    outline: none;

    font-size: 16px;
    text-align: center;
}

.password-card input:focus {
    border-color: #7b4bc4;
    box-shadow: 0 0 0 3px rgba(123, 75, 196, 0.15);
}

.password-card button {
    width: 100%;
    margin-top: 14px;
    padding: 13px 16px;

    color: white;
    background: #7b4bc4;
    border: none;
    border-radius: 12px;

    cursor: pointer;
    font-size: 16px;
    font-weight: bold;

    transition: transform 0.2s ease, background 0.2s ease;
}

.password-card button:hover {
    background: #6b4bb6;
    transform: translateY(-2px);
}

.message {
    min-height: 22px;
    margin-top: 14px;

    color: #6b4bb6;
    font-size: 15px;
}

/* ---------------- LETTER PAGE ---------------- */

.letter-page {
    min-height: 100vh;

    display: flex;
    justify-content: center;
    align-items: center;

    overflow-x: hidden;
    overflow-y: auto;

    font-family: "Cormorant Garamond", serif;
}

.letter-page.letter-open {
    display: block;
    padding: 24px 0 110px;
}

.scene {
    position: relative;

    width: 340px;
    height: 300px;

    cursor: pointer;
    perspective: 1000px;
}

.letter-page.letter-open .scene {
    width: 100%;
    height: auto;

    cursor: default;
    perspective: none;
}

.intro {
    position: absolute;
    top: -60px;

    width: 100%;

    color: #6b4bb6;
    text-align: center;
}

.intro h2 {
    margin: 0 0 8px;

    font-family: "Caveat", cursive;
    font-size: 34px;
}

.intro p {
    margin: 0;

    font-size: 17px;
    opacity: 0.8;
}

.envelope {
    position: absolute;
    right: 0;
    bottom: 40px;
    left: 0;

    width: 340px;
    height: 220px;

    animation: arrive 0.8s ease forwards, gentleRock 3s ease-in-out 1.2s infinite;
}

@keyframes arrive {
    from {
        transform: translateY(40px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes gentleRock {
    0%, 100% {
        transform: rotate(0deg);
    }

    50% {
        transform: rotate(-1.5deg);
    }
}

.back {
    position: absolute;
    bottom: 0;

    width: 100%;
    height: 180px;

    background: #d9c6ff;
    border-radius: 16px;
    box-shadow: 0 18px 35px rgba(72, 46, 120, 0.25);

    z-index: 1;
}

.flap {
    position: absolute;
    top: 40px;

    width: 100%;
    height: 135px;

    background: #b79df4;
    clip-path: polygon(0 0, 100% 0, 50% 70%);

    transform-origin: top center;

    z-index: 6;
    transition: transform 1s ease, opacity 0.7s ease;
}

.left-fold,
.right-fold,
.front {
    position: absolute;
    bottom: 0;

    width: 100%;
    height: 180px;

    border-radius: 0 0 16px 16px;
}

.left-fold {
    background: #ccb8ff;
    clip-path: polygon(0 0, 50% 50%, 0 100%);
    z-index: 3;
}

.right-fold {
    background: #c4adff;
    clip-path: polygon(100% 0, 50% 50%, 100% 100%);
    z-index: 3;
}

.front {
    background: #e3d6ff;
    clip-path: polygon(0 40%, 50% 78%, 100% 40%, 100% 100%, 0 100%);
    z-index: 4;
}

.seal {
    position: absolute;
    top: 125px;
    left: 50%;

    width: 54px;
    height: 54px;

    overflow: hidden;

    background: #7b4bc4;
    border-radius: 50%;
    box-shadow: 0 6px 12px rgba(72, 46, 120, 0.35);

    transform: translateX(-50%);

    z-index: 8;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.seal::before {
    content: "";

    position: absolute;
    top: -40%;
    left: -80%;

    width: 50%;
    height: 180%;

    background: rgba(255, 255, 255, 0.35);
    transform: rotate(25deg);

    animation: sealShine 3s ease-in-out infinite;
}

.seal::after {
    content: "❤";

    position: absolute;
    inset: 0;

    display: flex;
    justify-content: center;
    align-items: center;

    color: white;
    font-size: 22px;
}

@keyframes sealShine {
    0%, 65% {
        left: -80%;
    }

    100% {
        left: 130%;
    }
}

.letter {
    position: absolute;
    bottom: 85px;
    left: 50%;

    width: 275px;
    max-height: 120px;
    padding: 20px;

    overflow: hidden;

    background:
        linear-gradient(rgba(255, 255, 255, 0.35), rgba(248, 245, 255, 0.4)),
        repeating-linear-gradient(
            0deg,
            rgba(120, 100, 170, 0.04) 0px,
            rgba(120, 100, 170, 0.04) 1px,
            transparent 1px,
            transparent 6px
        ),
        #fcfbff;

    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(72, 46, 120, 0.2);

    transform: translateX(-50%) translateY(90px);

    opacity: 0;
    z-index: 2;

    transition: all 1s ease;
}

.letter h3 {
    margin-top: 0;

    color: #6b4bb6;
    font-family: "Caveat", cursive;
    font-size: 38px;
}

.letter p {
    color: #332826;
    font-size: 20px;
    line-height: 1.7;
}

.audio-box {
    margin: 20px 0 30px;
    padding: 18px;

    background: rgba(248, 245, 255, 0.8);
    border: 1px solid rgba(107, 75, 182, 0.25);
    border-radius: 14px;

    text-align: center;
}

.audio-box p {
    margin: 0 0 12px;

    color: #6b4bb6;
    font-family: "Caveat", cursive;
    font-size: 26px;
}

.audio-box audio {
    width: 100%;
}

.signature {
    margin-top: 36px;

    color: #6b4bb6;
    font-family: "Caveat", cursive;
    font-size: 30px;
    text-align: right;
}

.ps-note {
    margin-top: 50px;
    padding: 20px 22px;

    background: #f6f1ff;
    border: 1px dashed rgba(107, 75, 182, 0.45);
    border-radius: 12px;

    cursor: pointer;
    text-align: center;

    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ps-note:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(107, 75, 182, 0.16);
}

.ps-title {
    color: #6b4bb6;
    font-family: "Caveat", cursive;
    font-size: 30px;
}

.ps-message {
    max-height: 0;
    overflow: hidden;

    color: #332826;
    font-size: 20px;
    line-height: 1.6;

    opacity: 0;
    transition: max-height 0.6s ease, opacity 0.6s ease, margin-top 0.6s ease;
}

.ps-note.open-ps .ps-message {
    max-height: 200px;
    margin-top: 12px;
    opacity: 1;
}

/* ---------------- SHARED ANIMATIONS ---------------- */

.shake {
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    50% {
        transform: translateX(5px);
    }

    75% {
        transform: translateX(-3px);
    }
}

.open .envelope {
    animation: none;
}

.open .seal {
    transform: translateX(-50%) scale(0) rotate(160deg);
    opacity: 0;
}

.open .flap {
    transform: rotateX(180deg);
    opacity: 0;
}

.open .envelope,
.open .intro {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.open .letter {
    position: relative;
    top: auto;
    bottom: auto;
    left: auto;

    width: min(850px, calc(100vw - 28px));
    max-height: none;
    min-height: 92vh;

    margin: 30px auto 80px;
    padding: 46px 38px;

    overflow: visible;

    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(72, 46, 120, 0.25);

    transform: none;

    opacity: 1;
    z-index: 20;

    animation: unfoldLetter 0.9s ease forwards;
}

@keyframes unfoldLetter {
    from {
        transform: translateY(60px) scaleY(0.45);
        transform-origin: top center;
        opacity: 0.4;
    }

    to {
        transform: translateY(0) scaleY(1);
        transform-origin: top center;
        opacity: 1;
    }
}

.cards-button {
    position: fixed;
    bottom: 22px;
    left: 50%;

    transform: translateX(-50%);

    padding: 13px 24px;

    background: #7b4bc4;
    color: white;

    border-radius: 999px;
    box-shadow: 0 10px 25px rgba(72, 46, 120, 0.28);

    text-decoration: none;
    font-family: "Cormorant Garamond", serif;
    font-size: 19px;

    opacity: 0;
    pointer-events: none;

    z-index: 9999;

    transition:
        opacity 0.4s ease,
        transform 0.25s ease,
        background 0.25s ease;
}

.letter-page.letter-open .cards-button {
    opacity: 1;
    pointer-events: auto;
}

.cards-button:hover {
    background: #6b4bb6;
    transform: translateX(-50%) translateY(-3px);
}

/* ---------------- CARDS PAGE ---------------- */

.cards-page {
    min-height: 100vh;
    padding: 36px 18px 60px;

    background: radial-gradient(circle at top, #f8f5ff, #c8b3ff);
    font-family: "Cormorant Garamond", serif;
    color: #332826;
}

.page-header {
    max-width: 900px;
    margin: 0 auto 34px;

    text-align: center;
}

.page-header h1 {
    margin: 0 0 10px;

    color: #6b4bb6;
    font-family: "Caveat", cursive;
    font-size: 46px;
}

.page-header p {
    margin: 0;

    color: #4c3b73;
    font-size: 20px;
    line-height: 1.5;
}

.card-grid {
    max-width: 1000px;
    margin: 0 auto;

    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 22px;
}

.flip-card {
    height: 360px;
    perspective: 1000px;
    cursor: pointer;
}

.flip-card-inner {
    position: relative;

    width: 100%;
    height: 100%;

    transition: transform 0.8s ease;
    transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.card-face {
    position: absolute;
    inset: 0;

    display: flex;
    flex-direction: column;
    align-items: center;

    padding: 22px;

    border-radius: 20px;
    box-shadow: 0 16px 34px rgba(72, 46, 120, 0.22);

    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;

    text-align: center;
}

.card-front {
    justify-content: center;

    background:
        linear-gradient(rgba(255, 255, 255, 0.4), rgba(248, 245, 255, 0.45)),
        #fcfbff;

    border: 1px solid rgba(107, 75, 182, 0.22);
}

.card-back {
    justify-content: flex-start;

    overflow-y: auto;
    -webkit-overflow-scrolling: touch;

    background:
        linear-gradient(rgba(255, 255, 255, 0.35), rgba(248, 245, 255, 0.35)),
        repeating-linear-gradient(
            0deg,
            rgba(120, 100, 170, 0.04) 0px,
            rgba(120, 100, 170, 0.04) 1px,
            transparent 1px,
            transparent 6px
        ),
        #fffdf8;

    border: 1px dashed rgba(107, 75, 182, 0.35);

    transform: rotateY(180deg);
}

.card-icon {
    margin-bottom: 14px;

    font-size: 34px;
}

.card-front h2,
.card-back h2 {
    margin: 0;

    color: #6b4bb6;
    font-family: "Caveat", cursive;
    font-size: 31px;
    line-height: 1.1;
}

.card-back h2 {
    margin-bottom: 12px;
}

.card-back p {
    margin: 0;

    color: #332826;
    font-size: 17px;
    line-height: 1.4;
}

.footer-note {
    max-width: 700px;
    margin: 36px auto 0;

    color: #4c3b73;
    font-size: 18px;
    text-align: center;
    line-height: 1.5;
}

.back-link {
    display: inline-block;

    margin-top: 22px;
    padding: 12px 18px;

    color: white;
    background: #7b4bc4;
    border-radius: 999px;

    text-decoration: none;
    font-size: 16px;

    transition: transform 0.2s ease, background 0.2s ease;
}

.back-link:hover {
    background: #6b4bb6;
    transform: translateY(-2px);
}

/* ---------------- FLOATING HEARTS + SPARKLES ---------------- */

.heart,
.sparkle {
    position: fixed;

    pointer-events: none;
    z-index: 30;
}

.heart {
    bottom: -30px;

    color: #9b7cff;
    font-size: 22px;

    animation: floatUp 4s linear forwards;
}

.sparkle {
    color: #f5edff;
    font-size: 16px;

    animation: sparkleFloat 2.8s ease-out forwards;
}

@keyframes floatUp {
    from {
        transform: translateY(0) scale(1);
        opacity: 1;
    }

    to {
        transform: translateY(-110vh) scale(1.6);
        opacity: 0;
    }
}

@keyframes sparkleFloat {
    from {
        transform: translateY(0) scale(0.8) rotate(0deg);
        opacity: 1;
    }

    to {
        transform: translateY(-160px) scale(1.5) rotate(160deg);
        opacity: 0;
    }
}

/* ---------------- MOBILE ---------------- */

@media (max-width: 480px) {
    .open .letter {
        padding: 34px 24px;
    }

    .letter p,
    .ps-message {
        font-size: 18px;
    }

    .letter h3 {
        font-size: 34px;
    }

    .cards-page {
        padding: 28px 14px 50px;
    }

    .page-header h1 {
        font-size: 38px;
    }

    .page-header p {
        font-size: 18px;
    }

    .flip-card {
        height: 390px;
    }

    .card-front h2,
    .card-back h2 {
        font-size: 29px;
    }

    .card-back p {
        font-size: 16.5px;
    }

    .cards-button {
        width: calc(100vw - 32px);

        text-align: center;
        font-size: 17px;
    }
}
```
