.chat-image { position: relative; display: block; overflow: hidden; background: var(--surface-2); }
.message-bubble__album--single .chat-image { margin-inline: auto; }
.chat-image > .message-bubble__media-el { position: absolute; inset: 0; width: 100% !important; height: 100% !important; object-fit: contain; opacity: 0; }
.chat-image--loaded > .message-bubble__media-el { opacity: 1; }
.chat-image__skeleton { position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, color-mix(in srgb, var(--text-muted) 12%, transparent) 50%, transparent 80%); background-size: 200% 100%; animation: chat-image-shimmer 1.6s ease-in-out infinite; }
.chat-image__error { position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; color: var(--text-muted); font-size: 12px; overflow-wrap: anywhere; }
.message-bubble__album--grid .chat-image { width: 100% !important; height: 100%; aspect-ratio: auto !important; }
.message-bubble__album--grid .chat-image > .message-bubble__media-el { object-fit: cover; }
@keyframes chat-image-shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .chat-image__skeleton { animation: none; } }
