.overlay {
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4); 
    z-index: 99; 
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-santa {
    color: color-mix(in srgb, var(--title-primary) 60%, black 40%);
}

.modal-cozy {
    color: color-mix(in srgb, var(--title-secondary) 60%, black 40%);
}

.result-wrapper {
    padding: 1rem;
}

.card-container {
    width: 16rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 1rem;
    z-index: 100; /* 오버레이(99)보다 높게 설정 */
    position: relative;
}

.card-content {
    position: relative; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-image: url('../img/letter.png');
    background-repeat: no-repeat; 
    background-size: 100% auto;
    background-position: center center;
    width: 100%;
    height: auto;
    aspect-ratio: 3.1/4.4;
}

.card-content p {
    text-align: center;
    z-index: 200;
    font-family: "Noto Sans", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-variation-settings: "wdth" 100;
    font-size: 1rem;
    overflow-wrap: break-word;
    word-break: keep-all;
    color: var(--text-primary);
    padding: 1.5rem 2.5rem;
}

/* 150자 초과일 때 */
.card-content p.font-size-medium {
    font-size: 0.8rem; 
}

/* 200자 초과일 때 */
.card-content p.font-size-small {
    font-size: 0.75rem;
}

.stamp {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    width: 2.5rem;
    height: auto;
    z-index: 200;
}

.return {
    display: inline-block;
    font-family: "Noto Sans", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-variation-settings: "wdth" 100;
    color: var(--text-primary);
    background-color: #F9D769;
    padding: 0.5rem 3rem;
    text-decoration: none;
    border-radius: var(--radius-lg);
    text-align: center;
}

@media (min-width: 480px) {
    
    .card-container {
        width: 19rem;
    }

    .card-content p {
        font-size: 1rem;
    }
}

@media (min-width: 768px) {

    .card-container {
        width: 25rem;
    }

    .stamp {
        width: 3rem;
        bottom: 3.5rem;
        right: 3.5rem;
    }
}

@media (min-width: 1024px) {
    .card-container {
        width: 20rem;
    }

    .stamp {
        width: 2.5rem;
        bottom: 2rem;
        right: 2rem;
    }
}

@media (min-height: 1366px) {
    .card-container {
        width: 30rem;
    }

    .stamp {
        width: 3rem;
        bottom: 3.5rem;
        right: 3.5rem;
    }
}