/* Toast/Field feedback follows the restrained shadcn/Base UI patterns. */
.cj-toasts {
  --toast-surface: #fff; --toast-ink: #253033; --toast-line: #dbe2e5; --toast-accent: #387e74;
  position: fixed; z-index: 10000; right: max(24px,env(safe-area-inset-right));
  bottom: max(24px,env(safe-area-inset-bottom)); width: min(400px,calc(100vw - 40px));
  display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0;
  pointer-events: none; font-family: -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
}
:is(html.dark,html[data-theme="dark"],body.dark) .cj-toasts {
  --toast-surface: #243033; --toast-ink: #eef3f2; --toast-line: #455558; --toast-accent: #98d0bf;
}
.cj-toast {
  display: flex; align-items: center; gap: 12px; box-sizing: border-box;
  padding: 14px 12px 14px 16px; border: 1px solid var(--toast-line); border-radius: 14px;
  background: var(--toast-surface); color: var(--toast-ink); box-shadow: 0 8px 32px rgb(20 35 30 / 12%);
  pointer-events: auto; animation: cj-toast-enter 180ms ease-out both;
}
.cj-toast-icon { display: grid; place-items: center; flex: 0 0 22px; width: 22px; height: 22px; border: 1px solid currentColor; border-radius: 50%; color: var(--toast-accent); font: 600 13px/1 sans-serif; }
.cj-toast[data-kind="error"] .cj-toast-icon { color: #bf4f54; }
.cj-toast-message { flex: 1; min-width: 0; margin: 0!important; font-size: 13px!important; font-weight: 500; line-height: 1.65!important; color: inherit!important; overflow-wrap: anywhere; }
.cj-toast-actions { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.cj-toast button { font: inherit; cursor: pointer; }
.cj-toast-undo { min-height: 36px; padding: 6px 10px; border: 1px solid var(--toast-line); border-radius: 8px; background: transparent; color: inherit; font-size: 12px; font-weight: 600; }
.cj-toast-close { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; background: transparent; color: inherit; opacity: .65; font-size: 23px!important; line-height: 1; border-radius: 8px; }
.cj-toast button:hover { background: color-mix(in srgb,var(--toast-accent) 9%,transparent); }
.cj-toast button:focus-visible { outline: 2px solid var(--toast-accent); outline-offset: 2px; }
.cj-toast button:disabled { opacity: .5; cursor: wait; }
@keyframes cj-toast-enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@media(max-width: 650px) {
  .cj-toasts { top: max(16px,env(safe-area-inset-top)); bottom: auto; right: 20px; width: calc(100vw - 40px); }
  .cj-toast { gap: 10px; padding: 12px 10px 12px 14px; border-radius: 12px; }
}
@media(prefers-reduced-motion: reduce) { .cj-toast { animation: none; } }
