.image-viewer { width: min(1100px, calc(100vw - 24px)); height: min(1000px, calc(100dvh - 24px)); max-width: none; max-height: none; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--text); }
.image-viewer[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.image-viewer::backdrop { background: #000a; }
.image-tools { display: flex; align-items: center; gap: 20px; padding: 8px 16px; border-bottom: 1px solid var(--line); font-size: 13px; }
.image-tools button { border: 0; padding: 8px 0; }
.image-tools .image-close { margin-left: auto; font-size: 28px; line-height: 1; padding: 4px 8px; }
.image-viewport { overflow: auto; min-height: 0; display: flex; padding: 12px; background: var(--soft); }
.image-viewport img { flex: none; display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; margin: auto; background: white; }
.image-viewer[data-zoomed="true"] img { max-width: none; max-height: none; }
.image-viewport:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.image-viewer > p { max-height: 18vh; overflow: auto; margin: 0; padding: 12px 16px; font-size: 12px; line-height: 1.6; border-top: 1px solid var(--line); }
