/* --- Part 7: Gift Scene --- */

.gift-stage {
    position: absolute;
    inset: 0;
    z-index: 80;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.gift-drop {
    position: absolute;
    left: 50%;
    bottom: 120vh;
    width: clamp(180px, 23vw, 310px);
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translateX(-50%);
}

.pink-balloon {
    position: relative;
    z-index: 2;
    width: clamp(76px, 8vw, 116px);
    aspect-ratio: 0.82;
    border-radius: 50% 50% 48% 48%;
    background:
        radial-gradient(circle at 32% 25%, rgba(255, 255, 255, 0.86) 0 7%, transparent 8%),
        radial-gradient(circle at 35% 30%, #ffb2d1 0 20%, #fa78aa 58%, #e94f8b 100%);
    box-shadow:
        inset -12px -14px 22px rgba(181, 31, 95, 0.2),
        0 10px 20px rgba(117, 32, 72, 0.18);
    animation: balloon-float 2.8s ease-in-out infinite;
}

.pink-balloon::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -9px;
    width: 17px;
    height: 15px;
    background: #e94f8b;
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    transform: translateX(-50%);
}

.balloon-string {
    z-index: 1;
    width: 2px;
    height: 48px;
    margin-top: -4px;
    background: linear-gradient(#e985ad, #d95490);
    transform: rotate(3deg);
    transform-origin: top;
}

.gift-box {
    position: relative;
    width: 100%;
    cursor: pointer;
    filter: drop-shadow(0 15px 14px rgba(81, 41, 65, 0.27));
}

.gift-box img {
    display: block;
    width: 100%;
    height: auto;
}

#gift-open-image {
    position: absolute;
    inset: 0;
}

.gift-instruction {
    position: absolute;
    left: 50%;
    bottom: 5vh;
    width: min(440px, 84vw);
    padding: 13px 22px;
    border: 2px solid rgba(255, 184, 216, 0.92);
    border-radius: 24px;
    background: rgba(92, 57, 84, 0.76);
    box-shadow: 0 8px 24px rgba(31, 18, 31, 0.22);
    color: #fff2f8;
    font-family: 'Fredoka', sans-serif;
    font-size: clamp(1rem, 1.5vw, 1.22rem);
    font-weight: 600;
    text-align: center;
    transform: translateX(-50%);
}

.gift-note {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(540px, 82vw);
    transform: translate(-50%, -50%);
    filter: drop-shadow(0 15px 20px rgba(38, 23, 39, 0.3));
}

.gift-note img {
    display: block;
    width: 100%;
    height: auto;
}

.gift-note p {
    position: absolute;
    top: 30%;
    right: 12%;
    bottom: 13%;
    left: 12%;
    margin: 0;
    overflow-y: auto;
    color: #704b59;
    font-family: 'Galada', cursive;
    font-size: clamp(0.83rem, 1.3vw, 1.16rem);
    line-height: 1.35;
    text-align: center;
}

@keyframes balloon-float {
    0%, 100% {
        transform: translateY(0) rotate(-2deg);
    }

    50% {
        transform: translateY(-10px) rotate(2deg);
    }
}

@media (max-width: 768px) {
    .gift-drop {
        bottom: 16vh;
        width: min(240px, 62vw);
    }

    .gift-note {
        width: min(440px, 90vw);
    }

    .gift-note p {
        top: 15%;
        right: 10%;
        bottom: 11%;
        left: 10%;
        font-size: clamp(0.73rem, 3vw, 0.96rem);
        line-height: 1.26;
    }
}
.gift-focus-blur {
    position: absolute;
    inset: 0;
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    background: rgba(40, 29, 45, 0.18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.gift-drop {
    z-index: 10;
}

.gift-instruction {
    z-index: 20;
}

.gift-note {
    z-index: 100;
    width: min(650px, 88vw);
}

.gift-note p {
    top: 14%;
    right: 11%;
    bottom: 23%;
    left: 11%;
    font-size: clamp(0.95rem, 1.45vw, 1.25rem);
    line-height: 1.38;
}

.go-final-part-button {
    position: absolute;
    bottom: 8%;
    left: 50%;
    z-index: 2;
    padding: 11px 24px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #ff6fa8, #d8377c);
    box-shadow: 0 6px 15px rgba(154, 31, 89, 0.3);
    color: white;
    cursor: pointer;
    font-family: 'Fredoka', sans-serif;
    font-size: clamp(0.85rem, 1.2vw, 1rem);
    font-weight: 700;
    transform: translateX(-50%);
}

.go-final-part-button:hover {
    transform: translateX(-50%) scale(1);
}
.gift-note p {
    top: 30% !important;      /* bigger = moves text down */
    right: 10% !important;    /* bigger = moves text left */
    bottom: 22% !important;
    left: 10% !important;     /* bigger = moves text right */
}
.balloon-string {
    height: 60px !important;
    margin-top: -4px !important;
    margin-bottom: -40px !important;
    position: relative !important;
    z-index: 0 !important;
}

.gift-box {
    position: relative;
    z-index: 1;
}