.mley-toast-region {
  position: fixed; z-index: 2147483000; inset: auto;
  top: calc(var(--mley-toast-top, 0px) + max(16px, env(safe-area-inset-top, 0px)));
  right: calc(var(--mley-toast-right, 0px) + max(16px, env(safe-area-inset-right, 0px)));
  width: min(420px, calc(var(--mley-toast-width, 100vw) - 32px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
  max-height: calc(var(--mley-toast-height, 100dvh) - 32px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  margin: 0; padding: 0; border: 0; background: transparent; overflow: visible;
  display: grid; gap: 10px; pointer-events: none; font-family: inherit; text-align: left; color: inherit;
}
.mley-toast-region[hidden], [data-mley-notice-ready] { display: none !important; }
.mley-toast-region::backdrop { background: transparent; pointer-events: none; }
.mley-toast {
  --toast-accent: #286780; box-sizing: border-box; display: grid; grid-template-columns: 24px minmax(0, 1fr) 32px; align-items: start; gap: 10px;
  padding: 14px 12px 14px 16px; border: 1px solid var(--border-color, #d6e0e5); border-radius: 18px;
  background: var(--bg-surface, #fff); color: var(--text-primary, #233640); box-shadow: 0 8px 32px #13293622, 0 2px 6px #13293610;
  max-height: calc((var(--mley-toast-height, 100dvh) - 42px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) / 2);
  overflow: auto; overscroll-behavior: contain;
  pointer-events: auto; font-size: 13px; line-height: 1.5; touch-action: pan-y pinch-zoom;
  transform: translateX(var(--toast-drag-x, 0px)); opacity: var(--toast-drag-opacity, 1);
  transition: transform .22s cubic-bezier(.2,.8,.2,1), opacity .22s ease; animation: mley-toast-enter .22s ease-out;
}
.mley-toast.is-dragging { animation: none; transition: none; user-select: none; }
.mley-toast.is-leaving { animation: none; transform: translateX(var(--toast-exit-x, 115%)); opacity: 0; pointer-events: none; }
.mley-toast[data-kind="success"] { --toast-accent: #22735a; }
.mley-toast[data-kind="warning"] { --toast-accent: #966419; }
.mley-toast[data-kind="error"] { --toast-accent: #b54742; }
.mley-toast__icon { color: var(--toast-accent); margin-top: 3px; }
.mley-toast__icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.mley-toast__message { margin: 3px 0 0; padding: 0; font: inherit; color: inherit; overflow-wrap: anywhere; }
.mley-toast__action, .mley-toast__close { font: inherit; cursor: pointer; border: 0; background: transparent; border-radius: 6px; }
.mley-toast__action { display: inline-flex; align-items: center; min-height: 32px; margin: 5px 0 -3px; padding: 3px 0; color: var(--toast-accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.mley-toast__action[hidden] { display: none; }
.mley-toast__close { width: 32px; height: 32px; padding: 0; color: inherit; font-size: 22px; line-height: 1; opacity: .7; }
.mley-toast__close:hover { background: var(--bg-surface-2, #f0f4f5); opacity: 1; }
.mley-toast button:focus-visible { outline: 2px solid var(--toast-accent); outline-offset: 3px; }
@keyframes mley-toast-enter { from { opacity: 0; transform: translateY(-12px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (pointer: coarse) { .mley-toast { grid-template-columns: 24px minmax(0, 1fr) 44px; } .mley-toast__close { width: 44px; height: 44px; } .mley-toast__action { min-height: 44px; } }
@media (prefers-reduced-motion: reduce) { .mley-toast { animation: none; transition: none; } }
@media print { .mley-toast-region { display: none !important; } }
