body.bf-page-feeds .bf-photo-rotate{display:inline-grid!important;place-items:center;width:40px;height:40px;flex:0 0 40px;border:0;border-radius:13px;background:#eee7fa;color:#4b14a5;cursor:pointer;box-shadow:none;padding:0;}
body.bf-page-feeds .bf-photo-rotate:hover{background:#e2d4f5;color:#391080;}
body.bf-page-feeds .bf-publish-preview-stage>.bf-photo-rotate{position:absolute;bottom:10px;right:10px;z-index:5;}
body.bf-page-feeds .media-order-controls .bf-photo-rotate{width:34px;height:34px;flex-basis:34px;}
body.bf-page-feeds .bf-photo-editor{position:fixed;inset:0;margin:auto;width:min(680px,calc(100% - 32px));max-height:85dvh;border:0;border-radius:26px;padding:24px;box-sizing:border-box;background:#fff;color:#19151f;box-shadow:0 24px 80px #23104433;overflow:auto;font-family:inherit;}
.bf-photo-editor::backdrop{background:#18102388;backdrop-filter:blur(5px);}
.bf-photo-editor header{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:20px;}
.bf-photo-editor h2{font-size:21px;line-height:1.2;margin:0 0 7px;font-weight:750;letter-spacing:-.03em;}
.bf-photo-editor p{font-size:13px;color:#686270;margin:0;line-height:1.45;}
.bf-photo-editor .bf-editor-close{border:0;border-radius:50%;width:36px;height:36px;flex:0 0 36px;background:#f1eef5;color:#4b14a5;font-size:24px;cursor:pointer;}
.bf-editor-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
.bf-editor-card{min-width:0;border:1px solid #ece6f1;border-radius:17px;padding:10px;background:#fbf9fd;}
.bf-editor-preview{height:200px;display:grid;place-items:center;overflow:hidden;border-radius:10px;}
.bf-editor-preview img{display:block;max-width:none!important;max-height:none!important;object-fit:contain;image-orientation:from-image;transition:transform .15s ease;}
.bf-editor-controls{display:flex;justify-content:space-between;align-items:center;margin-top:8px;font-size:13px;font-weight:650;}
.bf-photo-editor footer{display:flex;gap:10px;justify-content:flex-end;margin-top:20px;position:sticky;bottom:0;background:#fff;padding:10px 0 0;}
.bf-photo-editor footer button{font:inherit;font-size:14px;font-weight:700;border:0;border-radius:14px;padding:13px 18px;cursor:pointer;}
.bf-editor-cancel{background:#f1eef5;color:#4b14a5;}.bf-editor-save{background:#4b14a5;color:#fff;}.bf-editor-save:hover{background:#391080;}.bf-editor-save:disabled{opacity:.45;cursor:default;}
.bf-photo-editor .bf-editor-status{margin-top:12px;}
@media(max-width:767px){body.bf-page-feeds .bf-photo-editor{inset:auto 0 0;margin:0;width:100%;max-width:none;max-height:88dvh;border-radius:24px 24px 0 0;padding:20px 16px max(16px,env(safe-area-inset-bottom));}.bf-editor-preview{height:160px;}.bf-photo-editor footer button{flex:1;}.bf-editor-grid{gap:9px;}}

/* Friends: aislar los estados del editor de los botones globales heredados. */
html body.bf-web-page.bf-page-feeds dialog.bf-photo-editor footer button.bf-editor-save {
  background: #4b14a5 !important; background-image: none !important;
  color: #fff !important; border: 1px solid #4b14a5 !important;
  box-shadow: none !important;
}
html body.bf-web-page.bf-page-feeds dialog.bf-photo-editor footer button.bf-editor-save:is(:hover,:active,:focus-visible):not(:disabled) {
  background: #391080 !important; border-color: #391080 !important; color: #fff !important;
}
html body.bf-web-page.bf-page-feeds dialog.bf-photo-editor footer button.bf-editor-save:disabled {
  background: #e2d4f5 !important; border-color: #e2d4f5 !important; color: #654696 !important; opacity: 1 !important; cursor: default !important;
}
html body.bf-web-page.bf-page-feeds dialog.bf-photo-editor footer button.bf-editor-cancel {
  background: #f1eef5 !important; background-image: none !important; color: #4b14a5 !important; border: 1px solid transparent !important; box-shadow: none !important;
}
html body.bf-web-page.bf-page-feeds dialog.bf-photo-editor footer button.bf-editor-cancel:is(:hover,:active,:focus-visible) {
  background: #e2d4f5 !important; color: #391080 !important;
}
html body.bf-web-page.bf-page-feeds dialog.bf-photo-editor footer button:focus-visible {
  outline: 2px solid #4b14a5 !important; outline-offset: 3px !important;
}
/* Encuadre interactivo */
html body.bf-page-feeds .bf-photo-editor .bf-crop-preview{position:relative!important;display:block!important;width:100%!important;height:auto!important;min-height:0!important;overflow:hidden!important;touch-action:none;cursor:grab;background:#f1eef5;}
html body.bf-page-feeds .bf-photo-editor .bf-crop-preview:active{cursor:grabbing;}
html body.bf-page-feeds .bf-photo-editor .bf-crop-preview img{position:absolute!important;max-width:none!important;max-height:none!important;min-width:0!important;min-height:0!important;object-fit:fill!important;transition:none!important;pointer-events:none;}
html body.bf-page-feeds .bf-photo-editor.bf-crop-dialog{width:min(440px,calc(100% - 24px));}
html body.bf-page-feeds .bf-crop-tools{display:grid;gap:10px;padding:12px 0 2px;}
html body.bf-page-feeds .bf-crop-tools label{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:13px;font-weight:650;}
html body.bf-page-feeds .bf-crop-tools select{max-width:70%;border:1px solid #e2d4f5;border-radius:9px;padding:8px;background:#fff;color:#391080;font:inherit;}
html body.bf-page-feeds .bf-crop-tools input[type=range]{width:65%;accent-color:#4b14a5;}
html body.bf-page-feeds .bf-crop-tools button.bf-crop-reset{border:0!important;background:#f1eef5!important;color:#4b14a5!important;border-radius:10px!important;padding:9px!important;box-shadow:none!important;font:inherit!important;font-size:13px!important;cursor:pointer;}
html body.bf-page-feeds .bf-photo-rotate svg,html body.bf-page-feeds .bf-edit-photos svg{width:20px!important;height:20px!important;flex:0 0 20px!important;fill:none!important;stroke:currentColor!important;stroke-width:1.9!important;stroke-linecap:round!important;stroke-linejoin:round!important;}
html body.bf-page-feeds .bf-publish-preview-stage>.bf-crop-trigger{right:58px!important;bottom:10px!important;}
@media(max-width:767px){html body.bf-page-feeds .bf-photo-editor.bf-crop-dialog{width:100%;}html body.bf-page-feeds .bf-editor-grid{grid-template-columns:1fr;}}

/* El marco del feed y el editor usan la proporción real del resultado. */
html body.bf-page-feeds > .feed > #feedPosts > article.post.post--with-media.post--photo-auto.bf-photo-frame-ready .post-media {
    position:relative!important;width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;
    aspect-ratio:var(--bf-moment-media-ratio)!important;overflow:hidden!important;background:transparent!important;flex-shrink:0!important;
}
html body.bf-page-feeds > .feed > #feedPosts > article.post.post--with-media.post--photo-auto.bf-photo-frame-ready .post-media-track {
    position:absolute!important;inset:0!important;width:100%!important;height:100%!important;min-height:0!important;max-height:none!important;
}
html body.bf-page-feeds > .feed > #feedPosts > article.post.post--with-media.post--photo-auto.bf-photo-frame-ready .post-media-item {
    height:100%!important;min-height:0!important;max-height:none!important;background:transparent!important;
}
html body.bf-page-feeds > .feed > #feedPosts > article.post.post--with-media.post--photo-auto.bf-photo-frame-ready .post-media-item > img {
    display:block!important;width:100%!important;height:100%!important;min-height:0!important;max-height:none!important;object-fit:contain!important;object-position:center!important;
}
html body.bf-page-feeds .bf-photo-editor .bf-live-preview-heading {font-size:12px;font-weight:700;color:#4b14a5;margin:0 0 8px;letter-spacing:0;}
html body.bf-page-feeds .bf-photo-editor .bf-live-feed-preview {width:min(100%,calc(52dvh * var(--bf-live-ratio,1)))!important;max-width:100%!important;margin-inline:auto!important;box-sizing:content-box!important;padding:0!important;border:0!important;background:transparent!important;border-radius:12px!important;}
html body.bf-page-feeds .bf-photo-editor .bf-live-feed-preview img {margin:0!important;padding:0!important;border:0!important;box-sizing:content-box!important;}
html body.bf-page-feeds #createSheet .media-preview-item .bf-draft-photo-frame {height:auto!important;min-height:0!important;max-height:none!important;aspect-ratio:var(--bf-live-ratio)!important;background:transparent!important;overflow:hidden!important;}
html body.bf-page-feeds #createSheet .media-preview-item .bf-draft-photo-frame > img {width:100%!important;height:100%!important;object-fit:contain!important;object-position:center!important;}
