#mzk-comment-toast-region {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  left: max(20px, env(safe-area-inset-left));
  z-index: 1000001;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

body:has(.player-bar[aria-hidden="false"]) #mzk-comment-toast-region {
  bottom: calc(var(--mzk-player-desktop-h, 68px) + 20px + env(safe-area-inset-bottom));
}

.mzk-comment-toast {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 32px;
  gap: 12px;
  width: min(720px, 100%);
  padding: 16px 16px 16px 18px;
  overflow: hidden;
  color: #111827;
  background: rgba(255, 248, 232, .98);
  border: 1px solid rgba(245, 158, 11, .2);
  border-radius: 12px;
  box-shadow: 0 18px 52px rgba(15, 23, 42, .2);
  box-sizing: border-box;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  pointer-events: auto;
  animation: mzk-comment-toast-in .24s ease-out both;
}

.mzk-comment-toast::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: #f59e0b;
  content: "";
}

.mzk-comment-toast.is-published::before {
  background: #22c55e;
}

.mzk-comment-toast__icon {
  grid-column: 1;
  grid-row: 1 / span 2;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #d97706;
}

.mzk-comment-toast.is-published .mzk-comment-toast__icon {
  color: #16a34a;
}

.mzk-comment-toast__icon svg {
  display: block;
  width: 22px;
  height: 22px;
}

.mzk-comment-toast__body {
  grid-column: 2;
  min-width: 0;
}

.mzk-comment-toast__heading {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 0 0 5px;
  line-height: 1.35;
}

.mzk-comment-toast__title {
  color: #d97706;
  font-size: 16px;
  font-weight: 800;
}

.mzk-comment-toast.is-published .mzk-comment-toast__title {
  color: #15803d;
}

.mzk-comment-toast__time {
  color: #374151;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.mzk-comment-toast__message {
  margin: 0;
  color: #111827;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
}

.mzk-comment-toast__close {
  grid-column: 3;
  grid-row: 1 / span 2;
  display: grid;
  width: 32px;
  height: 32px;
  margin: -5px -5px 0 0;
  padding: 0;
  place-items: center;
  align-self: start;
  color: #6b7280;
  background: transparent;
  border: 0;
  border-radius: 8px;
  font: 700 22px/1 Arial, sans-serif;
  cursor: pointer;
}

.mzk-comment-toast__close:hover,
.mzk-comment-toast__close:focus-visible {
  color: #111827;
  background: rgba(15, 23, 42, .08);
  outline: 0;
}

html[data-theme="dark"] .mzk-comment-toast {
  color: #f8fafc;
  background: rgba(17, 29, 41, .98);
  border-color: rgba(245, 158, 11, .28);
  box-shadow: 0 20px 56px rgba(0, 0, 0, .48);
}

html[data-theme="dark"] .mzk-comment-toast__title {
  color: #fbbf24;
}

html[data-theme="dark"] .mzk-comment-toast.is-published .mzk-comment-toast__title {
  color: #4ade80;
}

html[data-theme="dark"] .mzk-comment-toast__time {
  color: #cbd5e1;
}

html[data-theme="dark"] .mzk-comment-toast__message {
  color: #f1f5f9;
}

html[data-theme="dark"] .mzk-comment-toast__close {
  color: #94a3b8;
}

html[data-theme="dark"] .mzk-comment-toast__close:hover,
html[data-theme="dark"] .mzk-comment-toast__close:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, .08);
}

@media (max-width: 767px) {
  #mzk-comment-toast-region,
  body:has(.player-bar[aria-hidden="false"]) #mzk-comment-toast-region {
    right: 12px;
    bottom: calc(var(--mzk-bnav-h, 64px) + 12px + env(safe-area-inset-bottom));
    left: 12px;
  }

  .mzk-comment-toast {
    grid-template-columns: 24px minmax(0, 1fr) 28px;
    gap: 9px;
    padding: 14px 12px 14px 15px;
    border-radius: 11px;
  }

  .mzk-comment-toast__icon {
    width: 24px;
    height: 24px;
  }

  .mzk-comment-toast__icon svg {
    width: 20px;
    height: 20px;
  }

  .mzk-comment-toast__title {
    font-size: 14px;
  }

  .mzk-comment-toast__time,
  .mzk-comment-toast__message {
    font-size: 13px;
  }

  .mzk-comment-toast__close {
    width: 28px;
    height: 28px;
  }
}

@keyframes mzk-comment-toast-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .mzk-comment-toast { animation: none; }
}
