/* Prompt reference numbers are UI annotations, separate from batch/item labels. */
.upstream-reference-anchor,
:is(.creative-main-image,.creative-variation-image,.main-aspect-upload-item,.product-white-sample-card,.attachment-thumbnail-wrap,.video-reference-item,.logo-remove-thumb,.motion-pair-cell,.mm-upload) { position:relative; }
.upstream-reference-badge {
  position:absolute !important; top:6px !important; left:6px !important;
  right:auto !important; bottom:auto !important; z-index:3;
  display:inline-flex !important; align-items:center; justify-content:center;
  width:auto !important; height:auto !important; min-width:32px;
  padding:3px 7px !important; margin:0 !important; border:1px solid #ffffffd9 !important;
  border-radius:7px !important; background:#155bd5 !important; color:#fff !important;
  box-shadow:0 1px 5px #0f245233; font:700 12px/18px system-ui,sans-serif !important;
  text-align:center; white-space:nowrap; letter-spacing:0; max-width:calc(100% - 12px);
}
.upstream-reference-badge.is-inactive { background:#576579 !important; }
.tryon-item-order.upstream-source-label { top:36px; max-width:calc(100% - 12px); }
.upstream-reference-note { margin:8px 0; color:#53647c; font-size:12px; line-height:1.5; }
.upstream-reference-strip { display:flex; flex-wrap:wrap; gap:6px; margin:8px 0; }
.upstream-reference-strip > strong { flex-basis:100%; font-size:11px; color:#53647c; }
.upstream-reference-thumb { position:relative; width:72px; min-height:64px; margin:0; overflow:hidden; border:1px solid #dae3ef; border-radius:8px; background:#f6f8fc; }
.upstream-reference-thumb img { display:block; width:100%; height:64px; object-fit:contain; }
.upstream-reference-thumb figcaption { padding:3px; color:#53647c; font-size:10px; text-align:center; }
.flow-image-loader > .upstream-reference-badge { pointer-events:none; }
.attachment-thumbnail-wrap > .upstream-reference-badge { top:3px !important; left:3px !important; padding:1px 4px !important; min-width:28px; }
.motion-pair-cell > .upstream-reference-badge { top:33px !important; }
