.bag-image-slot{display:block;position:relative;width:116px;height:116px;border-radius:14px;overflow:hidden;background:#f2ecdf;flex:none}
.bag-image-slot .bag-thumbnail{display:block;width:100%;height:100%;margin:0;object-fit:cover}
.catalog-art.media-loading,.bag-image-slot.media-loading{position:relative;isolation:isolate}
.media-loading::before{content:"";position:absolute;inset:0;z-index:0;border-radius:inherit;background:linear-gradient(100deg,#eee7d9 20%,#fffaf0 48%,#eee7d9 76%);background-size:250% 100%;animation:happi-image-shimmer 1.25s ease-in-out infinite;pointer-events:none}
.media-image-pending{opacity:0!important}
.media-image-error{visibility:hidden}
.bag-image-slot img{transition:opacity 180ms ease}
.catalog-art.media-error::after,.bag-image-slot.media-error::after{content:"Image unavailable";position:absolute;inset:0;display:grid;place-items:center;padding:8px;text-align:center;font-size:.6875rem;line-height:1.4;color:#8a7160;background:#f2ecdf;border-radius:inherit}
@keyframes happi-image-shimmer{from{background-position:100% 0}to{background-position:0 0}}
@media(max-width:760px){.bag-image-slot{width:84px;height:84px;border-radius:12px}}
@media(prefers-reduced-motion:reduce){.media-loading::before{animation:none}.bag-image-slot img{transition:none}}

.event-banner-media.media-loading,.event-post-cover.media-loading,.event-story-media{position:relative;isolation:isolate;overflow:hidden}
.event-banner-media img,.event-post-cover img,.event-story-media img{transition:opacity 180ms ease}
.event-story-media{display:block;width:100%;border-radius:24px;margin:28px 0;background:#f2ecdf}
.event-story-media .event-story-cover{display:block;width:100%;height:auto;max-height:none;object-fit:contain;border-radius:inherit;margin:0}
.event-story-media.media-error::after,.event-banner-media.media-error::after,.event-post-cover.media-error::after{content:"Image unavailable";position:absolute;inset:0;display:grid;place-items:center;color:#8a7160;background:#f2ecdf}
@media(max-width:760px){.event-story-media{border-radius:16px;margin:22px 0}}
@media(prefers-reduced-motion:reduce){.event-banner-media img,.event-post-cover img,.event-story-media img{transition:none}}

#event-story>.event-story-media{margin:0 0 24px;border-radius:18px}
#event-story.event-brand-story>.event-story-media{border-radius:22px;margin-bottom:0}
@media(max-width:760px){#event-story>.event-story-media{border-radius:14px;margin-bottom:20px}}

.gallery-stage.media-loading,.gallery-thumbs button.media-loading{position:relative;isolation:isolate}
.gallery-stage.media-loading::before,.gallery-thumbs button.media-loading::before{z-index:1}
.gallery-stage.media-loading .gallery-nav,.gallery-stage.media-loading .gallery-counter,.gallery-stage.media-loading .gallery-expand{z-index:3}
.gallery-thumbs button{overflow:hidden}
.gallery-stage.media-error::after,.gallery-thumbs button.media-error::after{content:"Image unavailable";position:absolute;inset:0;display:grid;place-items:center;pointer-events:none;color:#8a7160;background:#f2ecdf;font-size:.75rem}

.favorite-image-slot{display:block;position:relative;isolation:isolate;width:64px;height:64px;flex:0 0 64px;border-radius:10px;overflow:hidden;background:#f2ecdf}
.favorite-open .favorite-image-slot img{display:block;width:100%;height:100%;margin:0;object-fit:contain;transition:opacity 180ms ease}
.favorite-image-slot.media-error::after{content:"Image unavailable";position:absolute;inset:0;display:grid;place-items:center;text-align:center;font-size:.625rem;padding:4px;color:#8a7160;background:#f2ecdf}
@media(max-width:760px){.favorite-image-slot{width:56px;height:56px;flex-basis:56px}.favorite-saved .favorite-open .favorite-image-slot img{width:100%;height:100%}}
@media(prefers-reduced-motion:reduce){.favorite-open .favorite-image-slot img{transition:none}}

.gallery-stage.gallery-switch-loading::after,.gallery-stage.gallery-switch-error::after{content:"Loading photo…";position:absolute;left:12px;bottom:12px;z-index:4;border-radius:999px;background:#fffaf0ed;color:#634b3b;padding:8px 12px;font-size:.75rem;line-height:1.4;box-shadow:0 2px 10px #4b342218;pointer-events:none}
.gallery-stage.gallery-switch-loading::after{animation:gallery-loading-pulse 1s ease-in-out infinite alternate}
.gallery-stage.gallery-switch-error::after{content:"Photo unavailable · Please try again"}
@keyframes gallery-loading-pulse{to{opacity:.65}}
@media(prefers-reduced-motion:reduce){.gallery-stage.gallery-switch-loading::after{animation:none}}

/* Shared media loading for Home, Friends and all event / gift artwork. */
.cast-art.media-loading,.merch-photo.media-loading{position:relative;isolation:isolate}
.psb-background.media-loading{isolation:isolate}
.cast-art.media-loading::before,.merch-photo.media-loading::before,.psb-background.media-loading::before{z-index:0}
.psb-background.media-loading{display:block}
img.skeleton-image-loading{color:transparent;background:linear-gradient(100deg,#eee7d9 20%,#faf6eb 48%,#eee7d9 76%);background-size:250% 100%;animation:happi-image-shimmer 1.4s ease-in-out infinite;border-radius:inherit}
img.skeleton-image-error{color:#816c60;background:#f2ecdf;font-size:12px;line-height:1.4}
.cast-art.media-error::after,.merch-photo.media-error::after{content:"Image unavailable";position:absolute;inset:0;display:grid;place-items:center;color:#816c60;background:#f2ecdf;font-size:12px;border-radius:inherit;pointer-events:none}
/* Keep dimensions stable while postcard / tote images are being decoded. */
.gift-front,.gift-back{aspect-ratio:1240/1748}
.gift-tote-object{aspect-ratio:1}
@media(prefers-reduced-motion:reduce){img.skeleton-image-loading{animation:none}}
