.nym-mascot {
    position: fixed;
    left: 16px;
    bottom: 16px;
    width: 140px;
    height: 140px;
    border: none;
    padding: 0;
    margin: 0;
    background: transparent;
    cursor: pointer;
    z-index: 2147483500;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    transform-origin: 50% 100%;
    animation: nym-mascot-bob 3.5s ease-in-out infinite;
}

@media (max-width: 767px) {
    .nym-mascot {
        width: 110px;
        height: 110px;
        left: 10px;
        bottom: 10px;
    }
}

.nym-mascot__inner {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    background-position: center bottom;
    background-size: contain;
    transform: scaleX(-1);
}

.nym-mascot--santa .nym-mascot__inner {
    background-image: url('../img/mascot-santa.png');
}

.nym-mascot--snowman .nym-mascot__inner {
    background-image: url('../img/mascot-snowman.png');
}

.nym-mascot--santa_bag .nym-mascot__inner {
    background-image: url('../img/mascot-santa-bag.png');
}

.nym-mascot--santa_tree .nym-mascot__inner {
    background-image: url('../img/mascot-santa-tree.png');
}

.nym-mascot--santa_chimney .nym-mascot__inner {
    background-image: url('../img/mascot-santa-chimney.png');
}

.nym-mascot--gingerbread .nym-mascot__inner {
    background-image: url('../img/mascot-gingerbread.png');
}

.nym-mascot--tree .nym-mascot__inner {
    background-image: url('../img/mascot-tree.png');
}

.nym-mascot::before,
.nym-mascot::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 18%;
    width: 80%;
    height: 80%;
    transform: translateX(-50%) scale(0.8);
    transform-origin: 50% 50%;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.9);
    box-shadow:
        0 0 16px rgba(255, 255, 255, 0.9),
        0 0 32px rgba(255, 255, 255, 0.5);
    opacity: 0;
    pointer-events: none;
    z-index: 0;
    animation: nym-mascot-wave 3s ease-out infinite;
}

.nym-mascot::after {
    animation-delay: 1.5s;
}

@keyframes nym-mascot-wave {
    0% {
        transform: translateX(-50%) scale(0.8);
        opacity: 0.9;
    }
    60% {
        transform: translateX(-50%) scale(1.7);
        opacity: 0;
    }
    100% {
        transform: translateX(-50%) scale(1.7);
        opacity: 0;
    }
}

@keyframes nym-mascot-bob {
    0% { transform: translateY(0); }
    10% { transform: translateY(-4px); }
    20% { transform: translateY(0); }
    30% { transform: translateY(-3px); }
    40% { transform: translateY(0); }
    100% { transform: translateY(0); }
}

.nym-mascot:hover {
    animation-duration: 2.2s;
    transform: translateY(-2px);
}

.nym-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.nym-modal-overlay--visible {
    opacity: 1;
    pointer-events: auto;
}

.nym-modal {
    position: relative;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    max-width: none;
    max-height: none;
}

.nym-modal__frame {
    position: relative;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    width: 100%;
}

@media (min-width: 768px) {
    .nym-modal__frame {
        width: min(760px, 100vw - 64px);
        aspect-ratio: 16 / 9;
        padding: 12% 14% 16% 14%;
        background-image: url('../img/modal-frame-desktop.jpg');
    }
}

.nym-modal__content {
    max-height: 100%;
    overflow-y: auto;
    padding: 0 15px;
    font-size: 14px;
    line-height: 1.5;
    color: #222;
    text-align: left;
}

.nym-modal__content h1,
.nym-modal__content h2,
.nym-modal__content h3 {
    margin: 0 0 8px;
}

.nym-modal__content p {
    margin: 0 0 8px;
}

.nym-modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    padding: 0;
    background: #ffffff;
    color: #333;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.35);
    z-index: 5;
}

.nym-modal__close:hover {
    background: #f44336;
    color: #fff;
}

@media (max-width: 767px) {
    .nym-modal__frame {
        width: min(420px, 100vw - 32px);
        aspect-ratio: 9 / 16;
        padding: 18% 10% 20% 10%;
        background-image: url('../img/modal-frame-mobile.jpg');
    }
    .nym-modal__content {
        padding: 0 45px;
    }
}
