html.viewer-open { overflow: hidden; }
.image-viewer { width: min(1440px, calc(100vw - 40px)); max-width: none; height: calc(100dvh - 48px); max-height: none; padding: 0; border: 1px solid transparent; border-radius: 14px; color: var(--ink, #24313b); background: #fff; box-shadow: 0 0 0 1px rgb(0 0 0 / .1), 0 24px 80px rgb(0 0 0 / .24); overflow: hidden; }
.image-viewer::backdrop { background: rgb(20 30 40 / .65); }
.viewer-toolbar { min-height: 65px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 20px; border-bottom: 1px solid #e2e6e9; }
.viewer-heading { min-width: 0; display: flex; align-items: center; gap: 12px; }
.viewer-heading h2 { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#viewer-dimensions { color: #707b83; font-size: 11px; white-space: nowrap; }
.viewer-actions { display: flex; align-items: center; gap: 5px; }
.viewer-actions button { min-height: 36px; border-color: transparent; font-size: 12px; padding: 7px 10px; white-space: nowrap; }
.viewer-actions [aria-pressed="true"] { background: #edf3f6; color: #365e76; border-color: #c1cfd8; }
.viewer-actions .viewer-close { font-size: 23px; line-height: 1; width: 38px; margin-left: 8px; }
.viewer-scroll { height: calc(100% - 65px); overflow: auto; overscroll-behavior: contain; background: #f6f7f8; }
.viewer-grid { display: flex; align-items: flex-start; gap: 20px; width: max-content; min-width: 100%; min-height: 100%; padding: 20px 24px; }
.viewer-grid figure { margin: auto; flex: 0 0 auto; }
.viewer-grid figcaption { margin: 0 0 10px; font-size: 12px; color: #707b83; }
.viewer-image { position: relative; }
.viewer-image img { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.viewer-image .viewer-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
@media (hover: hover) { .viewer-actions button:hover { background: #edf3f6; } }
@media (max-width: 600px) { .image-viewer { width: calc(100vw - 12px); height: calc(100dvh - 20px); border-radius: 10px; } .viewer-toolbar { flex-wrap: wrap; gap: 6px; padding: 8px 12px; height: 96px; } .viewer-heading { width: 100%; } .viewer-actions { margin-left: auto; } .viewer-scroll { height: calc(100% - 96px); } }
