/* LiteCMS v3.03 - desktop fullscreen media safe area.
   This only moves the rendered media under the transparent header; the
   rest of the portfolio UI and the infinite canvas are untouched. */
@media (min-width: 901px) {
  body.cory-home #postOverlay {
    --cory-media-start: calc(var(--cory-header-bottom, 86px) + 14px);
  }
  body.cory-home #postOverlay .post-media > .media-stage {
    top: var(--cory-media-start);
    bottom: 0;
    left: 0;
    right: 0;
  }
  body.cory-home #postOverlay .post-media .main-video,
  body.cory-home #postOverlay .post-media .main-frame {
    width: min(100%, calc((100dvh - var(--cory-media-start)) * 16 / 9));
    height: min(calc(100dvh - var(--cory-media-start)), calc(100vw * 9 / 16));
    max-height: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
  }
  body.cory-home #postOverlay .post-modal .modal-close {
    top: calc(var(--cory-media-start) + 8px) !important;
  }
  /* Title badge and close control belong in the media zone, not over the logo. */
  body.cory-home #postOverlay .media-caption {
    top: calc(var(--cory-media-start) + 12px);
  }
}
