[data-project-image]{width:100%;padding:0;border:0;cursor:zoom-in;color:inherit}
.project-image-dialog{width:fit-content;max-width:calc(100vw - 48px);max-height:calc(100dvh - 48px);margin:auto;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;overflow:visible;outline:none}
.project-image-dialog::backdrop{background:#101514cf}
body:has(.project-image-dialog[open]){overflow:hidden}
.project-image-dialog form{position:absolute;right:6px;top:6px;z-index:1;margin:0}
.close-project-image{display:grid;place-items:center;width:40px;height:40px;padding:0;border:0;border-radius:0;background:transparent;color:#fff;cursor:pointer;outline:none;opacity:.85;transition:opacity 160ms ease}
.close-project-image:hover,.close-project-image:focus-visible{opacity:1;outline:none}
.close-project-image svg{display:block;width:22px;height:22px;padding:0;border:0;border-radius:0;background:none;filter:drop-shadow(0 1px 3px #0008)}
.project-image-dialog img{display:block;width:auto;height:auto;max-width:min(1400px,calc(100vw - 48px));max-height:calc(100dvh - 48px);object-fit:contain;margin:0}

/* Transparent artwork gets a compact white presentation surface, not a fullscreen logo. */
.project-image-dialog[data-surface="white"] img{box-sizing:border-box;background:#fff;padding:clamp(20px,4vw,40px);max-width:min(640px,calc(100vw - 48px));max-height:min(600px,65dvh)}
.project-image-dialog[data-surface="white"] .close-project-image{color:#454b48}
.project-image-dialog[data-surface="white"] .close-project-image svg{filter:none}

.project-image-dialog[data-inspect] img{cursor:zoom-in}
.project-image-dialog[data-inspect] img:focus-visible{outline:2px solid #fff;outline-offset:-2px}
.project-image-dialog[data-inspect][data-zoomed]{overflow:auto}
.project-image-dialog[data-inspect][data-zoomed] img{max-width:none;max-height:none;cursor:zoom-out}
.project-image-dialog[data-inspect][data-zoomed] form{position:sticky;top:6px;right:auto;height:0;display:flex;justify-content:end;padding-right:6px}
