.entry-text img.note-inline-image{cursor:zoom-in}
/* Modal dialogs have opposing inset edges. Auto height stretches to the viewport;
   fit-content keeps the shell to the toolbar and the image stage only. */
.note-image-viewer{box-sizing:border-box;width:620px;max-width:calc(100vw - 48px);height:fit-content;min-height:0;max-height:calc(100vh - 80px);margin:auto;padding:0;border:1px solid #d6d8d5;border-radius:14px;background:#fff;color:#363c38;box-shadow:0 20px 70px #0003;overflow:hidden}
.note-image-viewer[open]{display:flex;flex-direction:column}
.note-image-viewer::backdrop{background:#24292599;backdrop-filter:blur(3px)}
.niv-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:13px 16px;border-bottom:1px solid #e6e8e4;background:#fff;flex:none}
.niv-toolbar strong{font:600 14px/1.4 -apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif}.niv-caption{flex:1;font:12px/1.5 -apple-system,sans-serif;color:#7a817a;min-width:145px}
.niv-toolbar button{border:1px solid #dce1d9;border-radius:8px;background:#fafbf9;padding:7px 10px;color:inherit;font:13px/1.3 -apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif;cursor:pointer}
.niv-toolbar button:hover{background:#eff3eb}.niv-toolbar button:focus-visible{outline:2px solid #648568;outline-offset:2px}
.niv-stage{box-sizing:border-box;flex:0 1 auto;min-height:48px;overflow:auto;background:repeating-conic-gradient(#f4f5f2 0 25%,#eceee9 0 50%) 0/20px 20px;padding:16px;overscroll-behavior:contain}
.niv-stage img{display:block;max-width:none;max-height:none;object-fit:contain;margin:auto;background:transparent;user-select:none;-webkit-user-drag:none}

@media(max-width:520px){.note-image-viewer{max-width:calc(100vw - 24px);max-height:calc(100dvh - 32px)}.niv-toolbar{padding:10px;gap:6px}.niv-caption{flex-basis:100%}.niv-toolbar button{padding:7px 8px}}
