html:has(.portfolio-image-viewer[open]){overflow:hidden}
.portfolio-image-viewer{
 box-sizing:border-box;width:min(94vw,90rem);max-width:none;max-height:96dvh;margin:auto;padding:.6rem;
 border:0;border-radius:.55rem;background:#151413;color:#fff;font-family:var(--portfolio-type,monospace);
}
.portfolio-image-viewer[open]{display:grid;grid-template-rows:auto minmax(0,1fr);gap:.6rem}
.portfolio-image-viewer::backdrop{background:#0d0c0ce8}
.portfolio-image-viewer-bar{display:flex;justify-content:flex-end}
/* Match the ZoomMate prototype dismiss control without loading the case styles. */
.portfolio-image-viewer button{
 display:inline-grid;place-items:center;inline-size:44px;block-size:44px;padding:0;
 border:1px solid #424242;border-radius:50%;background:#2c2c2c;color:#fefefe;
 box-shadow:0 8px 18px rgb(0 0 0 / .4);cursor:pointer;
}
.portfolio-image-viewer button:hover{background:color-mix(in srgb,#2c2c2c,#fefefe 10%)}
.portfolio-image-viewer button:focus-visible{outline:2px solid #d6d6d6;outline-offset:2px}
.portfolio-image-viewer img{display:block;max-width:100%;max-height:calc(96dvh - 5rem);height:auto;width:auto;object-fit:contain;justify-self:center}
