.tg-pm-notify-stack {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 100050;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: min(360px, calc(100vw - 24px));
    pointer-events: none;
}

.tg-pm-notify {
    pointer-events: auto;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    padding: 14px 14px 12px;
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(18, 25, 44, 0.98), rgba(14, 20, 35, 0.99));
    border: 1px solid rgba(82, 211, 178, 0.22);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    color: #e8f4f2;
    transform: translateX(calc(100% + 24px));
    opacity: 0;
    transition: transform 0.32s ease, opacity 0.32s ease;
}

.tg-pm-notify.is-visible {
    transform: translateX(0);
    opacity: 1;
}

.tg-pm-notify__avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(32, 223, 143, 0.14);
    border: 1px solid rgba(32, 223, 143, 0.28);
    color: #20df8f;
    font-size: 1.05rem;
    flex-shrink: 0;
}

.tg-pm-notify__body {
    min-width: 0;
}

.tg-pm-notify__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.tg-pm-notify__title {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 700;
    color: #f4fffc;
}

.tg-pm-notify__close {
    border: 0;
    background: transparent;
    color: rgba(232, 244, 242, 0.55);
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    line-height: 1;
    font-size: 1rem;
}

.tg-pm-notify__close:hover {
    color: #20df8f;
}

.tg-pm-notify__from {
    margin: 0 0 4px;
    font-size: 0.84rem;
    color: #20df8f;
}

.tg-pm-notify__subj {
    margin: 0 0 6px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #f4fffc;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tg-pm-notify__preview {
    margin: 0 0 10px;
    font-size: 0.82rem;
    line-height: 1.45;
    color: rgba(232, 244, 242, 0.68);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tg-pm-notify__actions {
    display: flex;
    gap: 8px;
}

.tg-pm-notify__open,
.tg-pm-notify__dismiss {
    min-height: 32px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 0.82rem;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(8, 13, 27, 0.72);
    color: rgba(232, 244, 242, 0.88);
}

.tg-pm-notify__open {
    background: var(--gradient-blue);
    border-color: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-weight: 600;
}

.tg-pm-notify__open:hover {
    filter: brightness(1.06);
}

.tg-pm-notify__dismiss:hover {
    color: #20df8f;
    border-color: rgba(32, 223, 143, 0.35);
}

@media screen and (max-width: 480px) {
    .tg-pm-notify-stack {
        right: 10px;
        left: 10px;
        bottom: 10px;
        max-width: none;
    }
}
