.toast-host {
    position: fixed;
    inset: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) auto auto;
    width: min(380px, calc(100% - 2rem));
    max-height: calc(100dvh - 2rem);
    overflow-y: auto;
    display: grid;
    gap: .5rem;
    z-index: 250;
    pointer-events: none;
}

.toast-host > .toast {
    --tone: var(--ui-info);
    --surface: var(--ui-surface);
    --muted: var(--ui-secondary);
    border: 1px solid var(--ui-border);
    border-inline-start: 3px solid var(--tone);
    border-radius: .6rem;
    background: var(--surface);
    color: var(--ui-text);
    box-shadow: 0 6px 14px rgb(0 0 0 / .17);
    display: grid;
    grid-template-columns: 1.25rem minmax(0, 1fr) 2rem;
    align-items: start;
    gap: .65rem;
    margin: .125rem;
    padding: .7rem .5rem .7rem .75rem;
    font: .875rem/1.4 system-ui, sans-serif;
    text-align: start;
    overflow-wrap: anywhere;
    pointer-events: auto;
}

.toast-host > [data-level="error"] { --tone: var(--ui-danger); }
.toast-host > [data-level="warning"] { --tone: var(--ui-warning); }
.toast-host > [data-level="success"] { --tone: var(--ui-success); }
.toast-host p { margin: 0; }
.toast-host .toast-symbol {
    color: var(--tone);
    border: 1px solid currentColor;
    border-radius: 50%;
    display: grid;
    place-items: center;
    width: 1.15rem;
    height: 1.15rem;
    font: 600 .8rem/1 system-ui, sans-serif;
}
.toast-host .toast-label { color: var(--tone); font-size: .75rem; font-weight: 600; }
.toast-host .toast-title { font-weight: 600; }
.toast-host .toast-detail { color: var(--muted); margin-top: .15rem; }
.toast-host button {
    border: 0;
    border-radius: .25rem;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font: 1.2rem/2rem system-ui, sans-serif;
    padding: 0;
    width: 2rem;
    height: 2rem;
}
.toast-host button:hover { background: var(--ui-hover); }
.toast-host button:focus-visible { outline: 2px solid var(--tone); }
@media (pointer: coarse) {
    .toast-host > .toast { grid-template-columns: 1.25rem minmax(0, 1fr) 2.75rem; }
    .toast-host button { width: 2.75rem; height: 2.75rem; }
}
