/* One shell-owned stack, below both pinned navigation rows. */
.evie-notifications {
  position: fixed;
  z-index: 80;
  top: calc(var(--shell-top-offset, 0px) + 12px);
  right: max(16px, env(safe-area-inset-right));
  width: min(420px, calc(100% - 32px));
  max-height: calc(100dvh - var(--shell-top-offset, 0px) - 24px);
  overflow: auto;
  overscroll-behavior: contain;
  display: grid;
  gap: 8px;
  pointer-events: none;
  scrollbar-gutter: stable;
}
.evie-notifications [hidden], .evie-notifications[hidden] { display: none !important; }
.evie-notifications-stack { display: grid; gap: 8px; min-width: 0; max-height: 40dvh; overflow: auto; overscroll-behavior: contain; pointer-events: none; }
.evie-notification {
  --notification-accent: var(--blue, #8ebeff);
  display: flex;
  gap: 8px;
  min-width: 0;
  padding: 10px 8px 10px 14px;
  background: var(--panel, #171e19);
  color: var(--text, #f2f5f2);
  border: 1px solid var(--line, #28312c);
  border-left: 3px solid var(--notification-accent);
  border-radius: 10px;
  box-shadow: 0 8px 24px #0005;
  pointer-events: auto;
  animation: evie-notification-enter 140ms ease-out;
}
.evie-notification[data-tone="success"] { --notification-accent: var(--green, #b6f46b); }
.evie-notification[data-tone="error"] { --notification-accent: var(--red, #ff988d); }
.evie-notification-content { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.evie-notification-label { display: block; color: var(--notification-accent); font-size: .78rem; }
.evie-notification-message { margin: 3px 0 0; font-size: .9rem; line-height: 1.45; white-space: pre-wrap; }
.evie-notifications .evie-notification-dismiss {
  flex: 0 0 44px;
  align-self: flex-start;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text, #f2f5f2);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.evie-notifications .evie-notifications-review-button {
  min-height: 44px;
  width: 100%;
  padding: 10px 14px;
  white-space: normal;
  overflow-wrap: anywhere;
  color: var(--text, #f2f5f2);
  background: var(--panel, #171e19);
  border: 1px solid var(--line, #28312c);
  border-radius: 10px;
  font-size: .85rem;
  pointer-events: auto;
  cursor: pointer;
}
.evie-notifications button:hover { background: var(--panel-2, #202a24); }
.evie-notifications button:focus-visible { outline: 2px solid var(--blue, #8ebeff); outline-offset: -3px; }
.evie-notifications-review {
  display: grid;
  gap: 8px;
  min-width: 0;
  max-height: min(50dvh, 360px);
  overflow: auto;
  overscroll-behavior: contain;
  pointer-events: auto;
}
.evie-notifications-live {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
@keyframes evie-notification-enter { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 760px) {
  /* Keep the shell's bottom navigation reachable even while reviewing errors. */
  .evie-shell .evie-notifications { max-height: calc(100dvh - var(--shell-top-offset, 0px) - 104px - env(safe-area-inset-bottom)); }
}
@media (max-width: 480px) {
  .evie-notifications { right: max(8px, env(safe-area-inset-right)); width: calc(100% - 16px); top: calc(var(--shell-top-offset, 0px) + 8px); }
}
@media (prefers-reduced-motion: reduce) {
  .evie-notification { animation: none; transition: none; }
}
@media (max-width: 760px) {
  /* Keep the shell's fixed bottom navigation reachable even with error review open. */
  .evie-shell .evie-notifications { max-height: calc(100dvh - var(--shell-top-offset, 0px) - 128px - env(safe-area-inset-bottom)); }
}
