.nba-toast-stack {
    position: fixed;
    right: 24px;
    top: 80px;
    z-index: 2147483647;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 360px;
    max-width: calc(100vw - 48px);
    pointer-events: none;
}

.nba-toast-stack.is-bottom {
    top: auto;
    bottom: 24px;
    flex-direction: column-reverse;
}

.nba-toast {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    overflow: hidden;
    padding: 14px 15px 17px;
    border: 1px solid #e7ebe2;
    border-left: 4px solid var(--toast-accent, #16683a);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(28, 42, 26, .16);
    color: #22301f;
    font-family: "Plus Jakarta Sans", Arial, sans-serif;
    pointer-events: auto;
    animation: nbaToastIn .26s cubic-bezier(.2, .7, .3, 1);
}

.nba-toast.is-leaving {
    animation: nbaToastOut .18s ease forwards;
}

.nba-toast__icon {
    width: 34px;
    height: 34px;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--toast-soft, #e3f3e8);
    color: var(--toast-accent, #16683a);
}

.nba-toast__content {
    flex: 1;
    min-width: 0;
}

.nba-toast__title {
    color: #1c2a1a;
    font-family: "Sora", "Plus Jakarta Sans", Arial, sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.nba-toast__message {
    margin-top: 2px;
    color: #5a6857;
    font-size: 12px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.nba-toast__close {
    width: 24px;
    height: 24px;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #9aa896;
    cursor: pointer;
    transition: background .14s, color .14s;
}

.nba-toast__close:hover {
    background: rgba(0, 0, 0, .05);
    color: #46563f;
}

.nba-toast__bar {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 100%;
    border-radius: 0 0 0 12px;
    background: var(--toast-accent, #16683a);
    transform-origin: left;
    animation: nbaToastBar var(--toast-duration, 4000ms) linear forwards;
}

.nba-toast__bar.is-static {
    opacity: .4;
    animation: none;
}

@keyframes nbaToastIn {
    from {
        opacity: 0;
        transform: translateX(40px) scale(.96);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes nbaToastOut {
    to {
        opacity: 0;
        transform: translateX(24px) scale(.98);
    }
}

@keyframes nbaToastBar {
    from {
        transform: scaleX(1);
    }

    to {
        transform: scaleX(0);
    }
}

@media (max-width: 520px) {
    .nba-toast-stack {
        left: 12px;
        right: 12px;
        top: 12px;
        right: max(12px, env(safe-area-inset-right));
        top: max(12px, env(safe-area-inset-top));
        width: auto;
        max-width: none;
        left: max(12px, env(safe-area-inset-left));
        gap: 10px;
    }

    .nba-toast-stack.is-bottom {
        top: auto;
        bottom: 12px;
        bottom: max(12px, env(safe-area-inset-bottom));
    }

    .nba-toast {
        width: 100%;
        box-sizing: border-box;
        gap: 10px;
        padding: 12px 12px 15px;
        border-radius: 10px;
        box-shadow: 0 10px 26px rgba(28, 42, 26, .18);
        animation-name: nbaToastInMobile;
    }

    .nba-toast.is-leaving {
        animation-name: nbaToastOutMobile;
    }

    .nba-toast__icon {
        width: 30px;
        height: 30px;
        border-radius: 8px;
    }

    .nba-toast__title {
        font-size: 13px;
    }

    .nba-toast__message {
        font-size: 11.5px;
    }

    .nba-toast__close {
        width: 28px;
        height: 28px;
        margin: -3px -3px 0 0;
    }

    @keyframes nbaToastInMobile {
        from {
            opacity: 0;
            transform: translateY(-12px) scale(.98);
        }

        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }

    @keyframes nbaToastOutMobile {
        to {
            opacity: 0;
            transform: translateY(-10px) scale(.98);
        }
    }
}
