[data-image-preview] { cursor: zoom-in; }
.image-preview-trigger { display: block; width: 100%; padding: 0; border: 0; border-radius: 6px; background: transparent; color: inherit; font: inherit; text-align: inherit; }
.image-preview-trigger:focus-visible { outline: 2px solid #7da9d7; outline-offset: 4px; }
html.image-preview-open, html.image-preview-open body { overflow: hidden; }
.image-preview-dialog { width: fit-content; max-width: calc(100% - 32px); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); margin: auto; padding: 16px; border: 1px solid var(--border, #4a5c70); border-radius: 12px; background: var(--panel, #101720); color: var(--text, #edf2f7); box-shadow: 0 24px 100px #0009; overflow: auto; }
.image-preview-dialog::backdrop { background: #03080fde; backdrop-filter: blur(4px); }
.image-preview-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.image-preview-heading h2 { margin: 0; font-size: 1rem; line-height: 1.3; font-weight: 500; }
.image-preview-close { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; padding: 0; border: 1px solid var(--border, #425367); border-radius: 8px; background: transparent; color: inherit; font: inherit; font-size: 2rem; line-height: 1; cursor: pointer; }
.image-preview-close:hover { background: #7da9d726; }
.image-preview-dialog img { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(100vh - 180px); max-height: calc(100dvh - 180px); margin: auto; border-radius: 8px; object-fit: contain; }
.image-preview-caption { max-width: 72ch; margin: 12px auto 0; color: var(--muted, #b2bfcd); font-size: .875rem; line-height: 1.5; overflow-wrap: anywhere; }
