.feedback-stack {
  position: fixed;
  top: 88px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100dvh - 108px);
  overflow-y: auto;
  padding: 2px 4px 12px;
  pointer-events: none;
  scrollbar-width: thin;
}

.feedback-toast {
  --feedback-accent: #6d54e9;
  --feedback-soft: #f0ecff;
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 26px;
  align-items: start;
  gap: 12px;
  min-height: 84px;
  padding: 17px 16px 21px;
  overflow: hidden;
  border: 1px solid #e8e8f1;
  border-left: 5px solid var(--feedback-accent);
  border-radius: 16px;
  background: #fff;
  color: #25243b;
  box-shadow: 0 20px 48px #25214427, 0 3px 12px #2521440d;
  pointer-events: auto;
  animation: feedback-enter .28s cubic-bezier(.2,.8,.2,1) both;
}

.feedback-toast.success { --feedback-accent: #168561; --feedback-soft: #e7f8f0; }
.feedback-toast.error { --feedback-accent: #ce4c5e; --feedback-soft: #fff0f1; }
.feedback-toast.warning { --feedback-accent: #a9670d; --feedback-soft: #fff5df; }
.feedback-toast.info, .feedback-toast.debug { --feedback-accent: #6650d9; --feedback-soft: #f0ecff; }

.feedback-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--feedback-soft);
  color: var(--feedback-accent);
  font: 800 22px 'Plus Jakarta Sans', sans-serif;
}

.feedback-copy { min-width: 0; padding-top: 1px; }
.feedback-copy strong {
  display: block;
  margin-bottom: 4px;
  color: #24223d;
  font: 800 15px 'Plus Jakarta Sans', sans-serif;
  letter-spacing: -.2px;
}
.feedback-copy span {
  display: block;
  color: #51546b;
  font: 500 14px/1.5 'DM Sans', sans-serif;
  overflow-wrap: anywhere;
}
.feedback-close {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #74778b;
  font: 400 24px/1 Arial, sans-serif;
}
.feedback-close:hover, .feedback-close:focus-visible { background: #f1f0f7; color: #25243b; }
.feedback-progress {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 4px;
  background: var(--feedback-accent);
  transform-origin: left;
  opacity: .78;
  animation: feedback-countdown var(--feedback-duration, 8s) linear forwards;
}
.feedback-toast.is-paused .feedback-progress { animation-play-state: paused; }
.feedback-toast.is-leaving { animation: feedback-exit .2s ease-in forwards; }

@keyframes feedback-enter { from { opacity: 0; transform: translateY(-12px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes feedback-exit { to { opacity: 0; transform: translateX(18px) scale(.97); } }
@keyframes feedback-countdown { to { transform: scaleX(0); } }

@media (max-width: 760px) {
  .feedback-stack {
    top: 68px;
    right: 12px;
    left: 12px;
    width: auto;
    max-height: calc(100dvh - 88px);
  }
  .feedback-toast { min-height: 78px; padding: 14px 13px 18px; gap: 10px; }
  .feedback-copy span { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .feedback-toast, .feedback-toast.is-leaving { animation-duration: .01ms; }
}
