.crosspost-delivery-tracker {
  position: fixed;
  z-index: 1200;
  right: 18px;
  bottom: max(18px, env(safe-area-inset-bottom));
  width: min(360px, calc(100vw - 36px));
  padding: 12px;
  color: var(--text, #f7f4ff);
  background: color-mix(in srgb, var(--bg2, #292839) 94%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent, #af7cf4) 50%, var(--border, #59566e));
  border-radius: 14px;
  box-shadow: 0 16px 42px rgba(0, 0, 0, .32);
  backdrop-filter: blur(12px);
}
.crosspost-delivery-tracker[hidden],
.crosspost-delivery-toast[hidden] { display: none; }
.crosspost-delivery-tracker-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: .86rem;
  font-weight: 800;
}
.crosspost-delivery-spinner {
  width: .82rem;
  height: .82rem;
  box-sizing: border-box;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: crosspost-delivery-spin .72s linear infinite;
}
@keyframes crosspost-delivery-spin { to { transform: rotate(360deg); } }
.crosspost-delivery-item + .crosspost-delivery-item {
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid color-mix(in srgb, var(--border, #59566e) 75%, transparent);
}
/*
 * The tracker is mounted outside a page's card hierarchy. Its rows must stay
 * transparent so they inherit this tracker surface, rather than becoming a
 * second, differently coloured card under any selected application theme.
 * The explicit themed selector also fixes a still-cached script that created
 * these rows as <article> elements before the semantic markup correction.
 */
html[data-theme-preference] .crosspost-delivery-tracker .crosspost-delivery-item {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  color: inherit !important;
}
.crosspost-delivery-copy {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: .8rem;
  line-height: 1.35;
}
.crosspost-delivery-platform { font-weight: 750; }
.crosspost-delivery-phase { color: var(--text3, #b6b2c7); text-align: right; }
.crosspost-delivery-progress {
  height: 5px;
  margin-top: 7px;
  overflow: hidden;
  background: color-mix(in srgb, var(--border, #59566e) 72%, transparent);
  border-radius: 999px;
}
.crosspost-delivery-progress > span {
  display: block;
  height: 100%;
  min-width: 6%;
  background: var(--accent, #af7cf4);
  border-radius: inherit;
  transition: width .25s ease;
}
.crosspost-delivery-progress.is-indeterminate > span {
  width: 36% !important;
  animation: crosspost-delivery-pulse 1.1s ease-in-out infinite alternate;
}
@keyframes crosspost-delivery-pulse { to { transform: translateX(145%); } }
.crosspost-delivery-item.is-failed .crosspost-delivery-platform,
.crosspost-delivery-item.is-failed .crosspost-delivery-phase { color: var(--red, #ff7a9b); }
.crosspost-delivery-item.is-failed .crosspost-delivery-progress > span { background: var(--red, #ff7a9b); }
.crosspost-delivery-reason {
  margin: 5px 0 0;
  color: var(--text3, #b6b2c7);
  font-size: .74rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.crosspost-delivery-toast {
  position: fixed;
  z-index: 1201;
  right: 18px;
  bottom: max(18px, env(safe-area-inset-bottom));
  width: min(360px, calc(100vw - 36px));
  padding: 12px 42px 12px 13px;
  color: var(--text, #f7f4ff);
  background: var(--bg2, #292839);
  border: 1px solid var(--accent, #af7cf4);
  border-radius: 14px;
  box-shadow: 0 16px 42px rgba(0, 0, 0, .32);
}
.crosspost-delivery-toast.is-error { border-color: var(--red, #ff7a9b); }
.crosspost-delivery-toast strong,
.crosspost-delivery-toast p { display: block; margin: 0; }
.crosspost-delivery-toast p { margin-top: 3px; color: var(--text3, #b6b2c7); font-size: .8rem; overflow-wrap: anywhere; }
.crosspost-delivery-toast-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}
.crosspost-delivery-toast-close:hover { background: color-mix(in srgb, var(--text, #fff) 12%, transparent); }
@media (max-width: 680px) {
  .crosspost-delivery-tracker,
  .crosspost-delivery-toast {
    right: 12px;
    bottom: calc(72px + env(safe-area-inset-bottom));
    width: calc(100vw - 24px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .crosspost-delivery-spinner,
  .crosspost-delivery-progress.is-indeterminate > span { animation: none; }
}
