.marcus-toast-region {
    position: fixed;
    right: calc(24px + env(safe-area-inset-right, 0px));
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    z-index: 10000;
    display: grid;
    width: min(430px, calc(100vw - 32px));
    gap: 10px;
    pointer-events: none;
}

.marcus-toast {
    --marcus-toast-accent: #477866;
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) 36px;
    align-items: center;
    gap: 12px;
    min-height: 68px;
    padding: 14px 14px 14px 16px;
    color: #18211e;
    background: #fff;
    border: 1px solid #d9e1dd;
    border-left: 4px solid var(--marcus-toast-accent);
    border-radius: 16px;
    box-shadow: 0 18px 52px rgba(18, 37, 30, 0.18);
    box-sizing: border-box;
    pointer-events: auto;
    animation: marcus-toast-in 0.28s ease-out both;
    transition: opacity 0.36s ease, transform 0.36s ease;
}

.marcus-toast--success {
    --marcus-toast-accent: #4a9c62;
}

.marcus-toast--warning {
    --marcus-toast-accent: #d49a31;
}

.marcus-toast--error {
    --marcus-toast-accent: #c94a45;
}

.marcus-toast__status {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--marcus-toast-accent);
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--marcus-toast-accent) 13%, transparent);
}

.marcus-toast__message {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.45;
}

.marcus-toast__close {
    display: grid;
    width: 36px;
    height: 36px;
    padding: 0;
    place-items: center;
    color: #52615c;
    background: #f0f4f2;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.marcus-toast__close svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 2.2;
}

.marcus-toast__close:hover {
    color: #18211e;
    background: #e3ebe7;
    transform: scale(1.06);
}

.marcus-toast__close:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--marcus-toast-accent) 28%, transparent);
    outline-offset: 2px;
}

.marcus-toast.is-leaving {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
    pointer-events: none;
}

@keyframes marcus-toast-in {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.98);
    }
}

@media (max-width: 600px) {
    .marcus-toast-region {
        right: calc(16px + env(safe-area-inset-right, 0px));
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    }

    .marcus-toast {
        min-height: 64px;
        padding: 12px 12px 12px 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .marcus-toast {
        animation: none;
        transition-duration: 0.01ms;
    }

    .marcus-toast__close {
        transition-duration: 0.01ms;
    }
}
