/* Top feedback flies between this stable surface and the visible inbox bell. */
#toast {
  top: max(var(--toast-top,16px),calc(env(safe-area-inset-top,0px) + 12px)) !important;
  bottom: auto !important;
  left: 50%;
  transform: translate(-50%,0);
  transform-origin: center;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: max-content;
  max-width: min(560px,calc(100vw - 32px));
  min-height: 60px;
  padding: 14px 10px 16px 18px;
  gap: 10px;
  border-radius: 20px !important;
  font-size: 15px;
  text-align: start;
  white-space: normal;
  visibility: hidden;
  pointer-events: none;
  opacity: 0;
  transition: none;
  z-index: 100;
  overflow: visible;
}
#toast.show { visibility: visible; pointer-events: auto; opacity: 1; transform: translate(-50%,0); }
#toast .v59-toast-message { min-width: 0; line-height: 1.4; overflow-wrap: anywhere; flex: 1; }
#toast .textbutton { min-height: 44px; padding-inline: 4px; flex: none; }
#toast .toast-countdown { order: 1; flex: none; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--text-secondary,#655773); min-width: 18px; text-align: center; }
#toast [data-toast-close] { order: 2; --icon-button-size: 28px; width: 28px; min-width: 28px; height: 28px; min-height: 28px; flex: 0 0 28px; position: relative; }
/* Compact visual with a larger touch target. */
#toast [data-toast-close]::before { content: ''; position: absolute; inset: -8px -3px; }
#toast [data-toast-close]>svg { width: 14px; height: 14px; }
#toast .toast-progress { position: absolute; bottom: 0; left: 18px; right: 18px; height: 3px; overflow: hidden; border-radius: 999px; background: #7254f91a; pointer-events: none; }
#toast .toast-progress>span { display: block; width: 100%; height: 100%; background: var(--primary-action-bg,#7254f9); transform-origin: left; border-radius: inherit; }
@media(prefers-reduced-motion:reduce) { #toast { transition:none; } }

.taily-notifications {
  padding-block: 12px;
}

.taily-notice-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.taily-notice {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 16px;
  border-radius: 18px;
  background: var(--mist);
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

.taily-notice-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--icon-purple);
}

.taily-notice div {
  display: grid;
  gap: 4px;
}

.taily-notice span:not(.taily-notice-icon),
.taily-notice time,
.taily-notice-empty {
  color: var(--text-secondary);
}

.taily-notice time {
  font-size: 13px;
}

.taily-notice-empty {
  text-align: center;
  padding: 20px 12px;
}

button.taily-icon-button[data-unread-count] {
  position: relative;
}

button.taily-icon-button[data-unread-count]::after {
  position: absolute;
  inset: -3px -3px auto auto;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  min-width: 20px;
  height: 20px;
  padding-inline: 4px;
  border: 1px solid var(--surface);
  border-radius: 999px;
  background: #6334cf;
  color: #fff;
  content: attr(data-unread-count);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}
