/* remove theme chrome everywhere (front-end) */
:where(.wp-site-blocks) > header,
:where(.wp-site-blocks) > footer,
.site-header,
.site-footer,
#masthead,
#colophon,
.primary-navigation,
.main-navigation,
.wp-block-navigation { display: none !important; }

/* hide page/post titles */
.entry-title,
.wp-block-post-title { display: none !important; }

/* strip margins/padding so content is flush to edges */
html, body,
.wp-site-blocks, .site, main, #content,
.entry-content, .wp-block-post-content {
  margin: 0 !important;
  padding: 0 !important;
  max-width: none !important;
}

/* optional: make lone images scale nicely and center */
.entry-content > .wp-block-image img,
.wp-block-post-content > .wp-block-image img {
  display: block;
  max-width: 100vw;
  max-height: 100vh;
  width: auto;
  height: auto;
  margin: 0 auto;
}

/* center the page content */
html, body { height: 100%; }

.wp-site-blocks, .site, main, #content,
.entry-content, .wp-block-post-content {
  min-height: 100vh;         /* fill the viewport */
  display: grid;             /* easy centering */
  place-items: center;       /* center both ways */
}

/* remove extra margins around the image block */
.entry-content > .wp-block-image,
.wp-block-post-content > .wp-block-image {
  margin: 0;
}

/* keep the image centered and contained in the viewport */
.entry-content > .wp-block-image img,
.wp-block-post-content > .wp-block-image img {
  display: block;
  max-width: 90vw;   /* change to 100vw if you want edge-to-edge */
  max-height: 90vh;  /* change to 100vh to touch top/bottom */
  width: auto;
  height: auto;
  margin: 0 auto;
}

/* optional: if you're logged in, account for the WP admin bar */
body.admin-bar .wp-site-blocks { min-height: calc(100vh - 32px); }

