.flash-notices {
    position: fixed;
    top: max(var(--flash-top, 12px), calc(env(safe-area-inset-top, 0px) + 12px));
    left: max(12px, env(safe-area-inset-left, 0px));
    right: max(12px, env(safe-area-inset-right, 0px));
    z-index: 1035; /* Below dialogs and their backdrop. */
    width: auto;
    max-width: 520px;
    margin-inline: auto;
    pointer-events: none;
}
.flash-notices .flash-notice {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) 44px;
    gap: 12px;
    align-items: start;
    padding: 16px 10px 16px 18px;
    border: 1px solid #b7d9d8;
    border-radius: 18px;
    background: #f3fbfa;
    color: #143c57;
    box-shadow: 0 12px 36px #123b5730;
    font-size: 1rem;
    line-height: 1.45;
    max-height: 45vh;
    max-height: 45dvh;
    overflow-y: auto;
    overflow-wrap: anywhere;
    pointer-events: auto;
    animation: flash-notice-enter 180ms ease-out;
}
.flash-notice-icon { color: #147467; font-size: 22px; }
.flash-notice-action {
    display: block;
    width: fit-content;
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    background: #17417e;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}
.flash-notice-action:hover, .flash-notice-action:focus { background: #102f5b; color: #fff; }
.flash-notice-close {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-top: -8px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #143c57;
}
.flash-notice-close:hover { background: #dcefed; }
.flash-notice-close:focus-visible, .flash-notice-action:focus-visible { outline: 3px solid #147467; outline-offset: 3px; }
.flash-notice [hidden], [data-flash-success] [hidden], [data-flash-success][hidden] { display: none !important; }
@keyframes flash-notice-enter {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .flash-notices .flash-notice { animation: none; }
}
