body.gift-reveal-locked {
    overflow: hidden;
    overscroll-behavior: none;
}

.gift-reveal-stage {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100vh;
    height: 100svh;
    height: 100dvh;
    overflow: hidden;
    background: #fff;
    cursor: grab;
    touch-action: none;
    user-select: none;
    transition:
        opacity 320ms ease,
        visibility 320ms ease;
}

.gift-reveal-stage.is-ready {
    background: transparent;
}

.gift-reveal-stage:active {
    cursor: grabbing;
}

.gift-reveal-stage canvas {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
}

.gift-reveal-hint {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: min(470px, calc(100% - 48px));
    min-height: 146px;
    padding: 24px 28px 22px;
    border: 2px solid transparent;
    border-radius: 14px;
    color: #102819;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(234, 251, 240, 0.82)) padding-box,
        linear-gradient(115deg, rgba(171, 234, 67, 0.9), rgba(63, 154, 224, 0.72), rgba(255, 255, 255, 0.92), rgba(255, 121, 96, 0.68), rgba(171, 234, 67, 0.9)) border-box;
    background-size: 100% 100%, 200% 200%;
    box-shadow:
        0 18px 44px rgba(6, 40, 21, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    font-family: "Commissioner", Arial, sans-serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    pointer-events: none;
    transition:
        opacity 220ms ease,
        transform 220ms ease;
    animation: giftHintBorderFlow 8s ease-in-out infinite;
}

.gift-reveal-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 118px;
    max-width: 54%;
    min-height: 34px;
    margin-bottom: 2px;
}

.gift-reveal-logo img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 38px;
}

.gift-reveal-hint strong {
    display: block;
    max-width: 360px;
    font-size: 21px;
    font-weight: 800;
    line-height: 1.28;
}

.gift-reveal-hint small {
    display: block;
    max-width: 340px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    color: rgba(16, 40, 25, 0.74);
}

@keyframes giftHintBorderFlow {
    0% {
        background-position: 0 0, 0% 50%;
    }

    50% {
        background-position: 0 0, 100% 50%;
    }

    100% {
        background-position: 0 0, 0% 50%;
    }
}

.gift-reveal-stage.is-drawing .gift-reveal-hint,
.gift-reveal-stage.is-open .gift-reveal-hint {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
}

.gift-reveal-stage.is-open {
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
}

@media only screen and (max-width: 640px) {
    .gift-reveal-stage {
        inset: 0;
        width: 100vw;
        max-width: 100vw;
        height: 100vh;
        height: 100svh;
        height: 100dvh;
        min-height: 100vh;
        min-height: 100svh;
        min-height: 100dvh;
    }

    .gift-reveal-stage canvas {
        width: 100vw;
        height: 100%;
        min-height: 100%;
        object-fit: cover;
    }

    .gift-reveal-hint {
        width: calc(100% - 32px);
        min-height: 136px;
        padding: 20px 18px 18px;
        line-height: 1.42;
    }

    .gift-reveal-logo {
        width: 104px;
        min-height: 30px;
    }

    .gift-reveal-hint strong {
        font-size: 19px;
    }

    .gift-reveal-hint small {
        font-size: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gift-reveal-hint {
        animation: none;
    }
}
