/* A changed product/story never keeps another photo visible during decode. Existing frames retain their geometry. */
body:not([data-menu-theme="modern-theme-18"]):not([data-menu-theme="modern-theme-21"]) img.mi-photo-pending,
body:not([data-menu-theme="modern-theme-18"]):not([data-menu-theme="modern-theme-21"]) img.mi-photo-failed{visibility:hidden!important}
.mi-photo-retry{position:absolute;z-index:3;inset:auto 12px 12px auto;min-height:40px;max-width:calc(100% - 24px);padding:8px 12px;border:1px solid currentColor;border-radius:10px;background:var(--mi-photo-retry-surface,#fff);color:var(--mi-photo-retry-ink,#222);font:inherit;font-size:13px;cursor:pointer;box-shadow:0 2px 10px #0002}
body[data-menu-theme="modern-theme-22"]:not(.light-mode){--mi-photo-retry-surface:#202329;--mi-photo-retry-ink:#fff}
body[data-menu-theme="modern-theme-19"][dark="dark"]{--mi-photo-retry-surface:#202329;--mi-photo-retry-ink:#fff}
.mi-photo-expand{position:absolute;right:12px;bottom:12px;z-index:2;display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;padding:8px;border:1px solid #ffffff70;border-radius:10px;background:#111b;color:#fff;cursor:pointer;box-shadow:0 2px 8px #0002}
.mi-photo-expand svg{width:20px;height:20px;display:block;pointer-events:none}
body:is([data-menu-theme="modern-theme-23"],[data-menu-theme="modern-theme-24"],[data-menu-theme="modern-theme-25"]) .mt23-item-modal-media,
body[data-menu-theme="modern-theme-20"] .dish-modal-image-wrapper:has(>.mi-photo-expand){position:relative}
/* Detail photos retain square originals without changing the native product grid/list. */
body:is([data-menu-theme="modern-theme-23"],[data-menu-theme="modern-theme-24"],[data-menu-theme="modern-theme-25"]) #mt23ItemModal .mt23-item-modal-media{width:100%;height:auto;aspect-ratio:1/1;flex:0 0 auto}
body:is([data-menu-theme="modern-theme-23"],[data-menu-theme="modern-theme-24"],[data-menu-theme="modern-theme-25"]) #mt23ItemModal .mt23-item-modal-media>img{display:block;width:100%;height:100%;object-fit:cover}
:is(.dish-modal-image-wrapper,.mt23-item-modal-media):has(>img:not([src]),>img[src=""],>img.mi-photo-pending,>img.mi-photo-failed)>.mi-photo-expand{display:none}
