.msg-toast-stack {
  position: fixed;
  top: 64px;
  right: 16px;
  width: min(320px, calc(100vw - 32px));
  z-index: 10050;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-height: calc(100vh - 80px);
}
.msg-toast-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.msg-toast {
  pointer-events: auto;
  position: relative;
  background: #fff;
  color: #1f2937;
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
  padding: 12px 36px 12px 14px;
  cursor: pointer;
  max-height: 132px;
  overflow: hidden;
  animation: msg-toast-in 0.28s ease;
}
.msg-toast.is-leaving {
  animation: msg-toast-out 0.26s ease forwards;
}
.msg-toast__kind {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #1769ff;
}
.msg-toast__title {
  margin-top: 2px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}
.msg-toast__summary {
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.45;
  color: #6b7280;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.msg-toast__close {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 0;
  background: transparent;
  color: #9ca3af;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
}
.msg-toast-rest {
  pointer-events: auto;
  align-self: flex-end;
  border: 0;
  background: rgba(17, 24, 39, 0.72);
  color: #fff;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}
.msg-critical {
  position: fixed;
  inset: 0;
  z-index: 10060;
  background: rgba(15, 23, 42, 0.46);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.msg-critical__panel {
  width: min(440px, 100%);
  max-height: min(70vh, 560px);
  overflow: auto;
  background: #fff7f7;
  color: #1f2937;
  border: 1px solid #fecaca;
  border-radius: 16px;
  padding: 20px 20px 16px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.28);
}
.msg-critical__kicker {
  color: #b91c1c;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
}
.msg-critical__title {
  margin: 6px 0 10px;
  font-size: 20px;
  line-height: 1.3;
}
.msg-critical__body { font-size: 14px; line-height: 1.7; }
.msg-critical__body .notification-btn {
  display: inline-block;
  margin: 4px 6px 4px 0;
  padding: 4px 9px;
  border-radius: 8px;
  background: #b91c1c;
  color: #fff;
  text-decoration: none;
  font-weight: 650;
}
.msg-critical__ok {
  margin-top: 14px;
  border: 0;
  background: #b91c1c;
  color: #fff;
  border-radius: 10px;
  padding: 8px 16px;
  font-weight: 700;
  cursor: pointer;
}
.theme--dark .msg-toast,
[data-theme="dark"] .msg-toast {
  background: #1c212b;
  color: #e8eef8;
  border-color: #334155;
}
.theme--dark .msg-toast__kind,
[data-theme="dark"] .msg-toast__kind { color: #93b4ff; }
.theme--dark .msg-toast__summary,
[data-theme="dark"] .msg-toast__summary { color: #9aa6b8; }
.theme--dark .msg-critical__panel,
[data-theme="dark"] .msg-critical__panel {
  background: #2a1416;
  color: #f8e8e8;
  border-color: #7f1d1d;
}
@keyframes msg-toast-in {
  from { transform: translateY(-18px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes msg-toast-out {
  to { transform: translateY(14px); opacity: 0; }
}
