.toast-stack {
    position: fixed;
    z-index: 10000;
    top: max(1rem, env(safe-area-inset-top));
    right: max(1rem, env(safe-area-inset-right));
    display: grid;
    gap: .65rem;
    width: min(24rem, calc(100vw - 2rem));
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: .9rem 1rem;
    border: 1px solid rgba(61, 54, 44, .12);
    border-left: 4px solid #7f8f6d;
    border-radius: 10px;
    background: #fff;
    color: #3d362c;
    box-shadow: 0 12px 32px rgba(35, 30, 24, .18);
    font: 400 .92rem/1.45 Jost, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    pointer-events: auto;
    animation: toast-in .2s ease-out;
}

.toast--success { border-left-color: #4f8156; }
.toast--error { border-left-color: #b5533f; }
.toast--warn { border-left-color: #c28a2c; }
.toast--info { border-left-color: #6b8396; }
.toast__close {
    flex: 0 0 auto;
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
    font-size: 1.25rem;
    line-height: 1;
    opacity: .65;
}
.toast__close:hover { opacity: 1; }
.toast.is-leaving { opacity: 0; transform: translateY(-.35rem); transition: opacity .18s ease, transform .18s ease; }

@keyframes toast-in {
    from { opacity: 0; transform: translateY(-.35rem); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .toast { animation: none; }
    .toast.is-leaving { transition: none; }
}
