body {
    margin: 0;
    font-family: Arial;
    background: url(d.jfif) center/cover fixed;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    overflow: hidden
}

#bg {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    backdrop-filter: blur(2.5px)
}

.card,
#end {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, .15);
    padding: 30px;
    border-radius: 20px;
    backdrop-filter: blur(15px);
    text-align: center;
    max-width: 650px
}

.hidden {
    display: none
}

button,
input {
    padding: 12px 20px;
    border-radius: 10px;
    border: 0;
    margin: 8px
}

#no {
    position: relative;
    transition: transform .15s ease-out
}

.watermark {
    position: fixed;
    right: 14px;
    bottom: 10px;
    z-index: 3;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.75);
    letter-spacing: 0.3px;
    pointer-events: none;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.heart-field {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 3;
}

.heart {
    position: absolute;
    bottom: -30px;
    display: inline-block;
    font-size: 1.4rem;
    animation: heartFly 5s ease-out forwards;
    opacity: 0;
    will-change: transform, opacity;
}

.heart-field.video-active {
    z-index: 9998;
}

.heart-field.thank-you-active {
    z-index: 1;
}

@keyframes heartFly {
    0% {
        transform: translate3d(0, 0, 0) scale(1.1) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    100% {
        transform: translate3d(var(--drift-x), -115vh, 0) scale(1.3) rotate(360deg);
        opacity: 0;
    }
}

.vidcont {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 20px;
}

.vidcont.hidden {
    display: none;
}

.vidbox {
    position: relative;
    width: min(520px, 90vw);
    aspect-ratio: 1/1;
    /* square */
    max-height: calc(100vh - 80px);
    max-width: 95vw;
    border-radius: 12px;
    overflow: hidden;
    background: transparent;
    z-index: 10001;
}

#vid {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: auto;
}

video::-webkit-media-controls,
video::-webkit-media-controls-panel,
video::-webkit-media-controls-play-button,
video::-webkit-media-controls-start-playback-button {
    display: none !important;
    -webkit-appearance: none;
}

@media (max-width: 768px) {
    body {
        height: 100dvh;
        padding: 16px;
        box-sizing: border-box;
        overflow-y: auto;
        justify-content: center;
        align-items: center;
    }

    .card,
    #end {
        width: min(100%, 92vw);
        max-width: 92vw;
        padding: 18px 14px;
        margin: auto;
        box-sizing: border-box;
    }

    .card h2 {
        margin: 0 0 12px 0;
        font-size: 18px;
    }

    .card p {
        margin: 0 0 8px 0;
        font-size: 12px;
    }

    #name {
        display: block;
        width: 100%;
        margin-bottom: 8px;
    }

    .btns {
        display: flex;
        flex-direction: row;
        gap: 6px;
        justify-content: center;
        flex-wrap: wrap;
        margin-top: 8px;
    }

    button,
    input {
        margin: 0;
        box-sizing: border-box;
        padding: 6px 12px;
        min-height: 32px;
        font-size: 12px;
    }

    .btns button {
        width: auto;
        flex: 0 1 auto;
        min-width: 80px;
    }

    .vidcont {
        padding: 12px;
    }

    .vidbox {
        width: min(100%, 92vw);
        max-width: 92vw;
    }
}