/* Shared photographic paper: the approved scrapbook's sampled off-white
   and original varying contact shadow. Illustrations remain unframed. */
body .hf-mounted-photo {
 isolation:isolate;background:none!important;box-shadow:none!important;border:0;
 overflow:visible;
}
body .hf-mounted-photo > .hf-mount-shadow,
body .hf-mounted-photo > .hf-mount-surface {
 position:absolute!important;display:block!important;inset:-8% -5.633803%!important;
 width:auto!important;height:auto!important;min-width:0!important;margin:0!important;padding:0!important;
 border:0!important;pointer-events:none;background-position:center;background-size:100% 100%;
 background-repeat:no-repeat;transform:none!important;filter:none!important;box-shadow:none!important;
}
body .hf-mounted-photo > .hf-mount-shadow {z-index:-2;background-image:url('/scrapbook/art/mockup-shadow-v2.png');}
body .hf-mounted-photo > .hf-mount-surface {z-index:-1;background-image:url('/scrapbook/art/mockup-paper-v2.png');}
body .hf-mounted-photo img {border:0!important;box-shadow:none!important;border-radius:0;}
body .hf-mounted-photo::before,body .hf-mounted-photo .photo-tape {z-index:3;}
body .bio-photo-link.hf-mounted-photo {padding:7px;box-sizing:border-box;}
body .scrapbook-invitation-photo.hf-mounted-photo::before,
body .scrapbook-invitation-photo.hf-mounted-photo::after {content:none;}
body .scrapbook-invitation-photo.hf-mounted-photo {padding:4px;}
body .hf-mounted-single {
 border:6px solid #fef7ee!important;border-radius:0!important;box-sizing:border-box;
 box-shadow:1px 3px 4px #65472924,3px 7px 7px -4px #6547293b!important;
}
body .hf-lightbox-image.hf-mounted-single {width:auto;height:auto;max-width:100%;max-height:100%;}
body #large-photo.hf-mounted-single {background:#fef7ee;}

/* Replace the old portrait brush accent rather than layering over it. */
body .bio-photo-link.hf-mounted-photo::before {content:none;}
/* Bare trigger buttons need the same actual paper inset as other prints. */
body .bunny-postscript .photo-trigger.hf-mounted-photo {padding:7px;box-sizing:border-box;}
/* One paper surface around the enlarged image and caption, without an
   additional bordered print nested inside a rounded dialog panel. */
body :is(.photo-dialog,#photo-dialog).hf-mounted-photo {
 border-radius:0;padding:12px;overflow:visible;
}
body :is(.photo-dialog,#photo-dialog).hf-mounted-photo img {
 border:0!important;box-shadow:none!important;background:none;
}
body #large-photo {display:block;width:auto;height:auto;max-width:100%;max-height:min(65dvh,650px);margin-inline:auto;}
body #photo-dialog .gallery-bottom {padding:16px 12px 8px;}

/* Size the paper to the fitted photo, including portrait and wide originals. */
body #photo-dialog.hf-mounted-photo {
 width:min(94vw,1060px,calc(min(65dvh,650px) * var(--hf-photo-ratio,1.333333) + 24px));
}
body .photo-dialog.hf-mounted-photo {
 width:min(94vw,840px,calc(77dvh * var(--hf-photo-ratio,1.333333) + 24px));
}
body #photo-dialog.hf-mounted-photo #large-photo {width:100%;}
