/* BTB Social: no-paid-gate immersive photo editor, scoped to camera/feed/stories. */
body.btb-photo-editor-active{overflow:hidden!important}
.btb-photo-preview-stage{max-width:100%;display:flex;justify-content:center;align-items:center;overflow:hidden;border-radius:12px}
.btb-photo-preview-stage img{display:block;max-width:100%;max-height:54dvh;object-fit:contain}
.btb-photo-edit-actions{display:flex;align-items:center;gap:10px;margin:9px 0 2px;flex-wrap:wrap}
.btb-photo-edit-open{background:linear-gradient(135deg,#326ee8,#265db7);color:#fff;border:1px solid #83bbff;border-radius:999px;padding:10px 17px;font-size:14px;font-weight:750;min-height:42px;cursor:pointer;box-shadow:0 4px 18px #081f46a8}
.btb-photo-edit-badge{font-size:12px;color:#aee9c4;font-weight:700}
.btb-photo-edit-modal{position:fixed!important;inset:0!important;z-index:2147483000!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;background:#080d17!important;color:#fff!important;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;line-height:1.35!important;isolation:isolate;overscroll-behavior:contain}
.btb-photo-edit-modal [hidden]{display:none!important}
.btb-photo-edit-modal button,.btb-photo-edit-modal input{font:inherit}
.btb-photo-edit-top{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:calc(env(safe-area-inset-top) + 9px) 13px 10px;border-bottom:1px solid #263346;flex:none;background:#101b2b}
.btb-photo-edit-top strong{font-size:16px;font-weight:750}
.btb-photo-edit-top button{background:transparent;border:none;color:#eef4ff;font-weight:650;min-height:42px;padding:6px 10px;border-radius:9px;cursor:pointer;font-size:14px}
.btb-photo-edit-top [data-edit=done]{color:white;background:#247de8;padding:7px 16px;border-radius:999px;font-size:15px}
.btb-photo-edit-top button:disabled{opacity:.5}
.btb-photo-edit-stage{display:flex;align-items:center;justify-content:center;flex:1 1 auto;min-height:0;overflow:hidden;padding:8px;background:radial-gradient(circle at center,#263247,#090f18 75%)}
.btb-photo-edit-canvas-wrap{position:relative;flex:none;max-width:100%;max-height:100%;box-shadow:0 6px 38px #0009;overflow:hidden;touch-action:pan-y}
.btb-photo-edit-canvas-wrap canvas{display:block;max-width:100%;max-height:100%}
.btb-photo-edit-text{position:absolute;z-index:2;transform:translate(-50%,-50%);text-align:center;max-width:85%;min-width:50px;padding:3px 6px;line-height:1.26;font-weight:800;overflow-wrap:anywhere;word-break:normal;touch-action:none;cursor:grab;user-select:none;-webkit-user-select:none;white-space:normal}
.btb-photo-edit-text:active{cursor:grabbing}
.btb-photo-edit-tray{flex:0 0 auto;background:#121b2b;border-top:1px solid #344259;padding-bottom:max(env(safe-area-inset-bottom),12px);box-shadow:0 -6px 18px #0008}
.btb-photo-edit-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;padding:8px 10px}
.btb-photo-edit-tabs button{border:0;border-radius:10px;background:transparent;color:#b8c7dd;font-weight:700;font-size:12px;min-height:42px;cursor:pointer}
.btb-photo-edit-tabs button.is-active{background:#264a7b;color:white}
.btb-photo-edit-pane{min-height:97px;max-height:min(25dvh,205px);overflow:auto;padding:4px 13px 8px;scrollbar-width:thin}
.btb-photo-looks{display:flex;gap:9px;align-items:flex-start;overflow-x:auto;padding:2px 0 9px;scroll-snap-type:x proximity;scrollbar-width:thin}
.btb-photo-looks button{flex:0 0 65px;display:grid;gap:5px;justify-items:center;text-align:center;background:transparent;color:#c9d7e9;border:0;padding:4px 1px;border-radius:10px;cursor:pointer;font-size:11px}
.btb-photo-looks .btb-photo-look-thumb{display:block;width:59px;height:64px;border-radius:10px;border:2px solid #58677c;background-position:center;background-size:cover;background-color:#213149}
.btb-photo-looks button.is-active .btb-photo-look-thumb{border:3px solid #6db9ff;box-shadow:0 0 0 2px #b2ddff55}
.btb-photo-looks button.is-active{color:#fff;font-weight:800}
.btb-photo-edit-pane[data-pane=adjust] label{display:grid;grid-template-columns:85px 1fr 45px;align-items:center;gap:8px;font-size:12px;margin:8px 0}
.btb-photo-edit-pane[data-pane=adjust] label span{grid-column:3;grid-row:1;text-align:right;font-variant-numeric:tabular-nums}
.btb-photo-edit-pane[data-pane=adjust] label input{grid-column:2;grid-row:1;width:100%;accent-color:#63b2ff;height:29px}
.btb-photo-edit-pane [data-edit=resetAdjust]{padding:5px 10px;border:1px solid #526987;background:#1b314d;border-radius:9px;color:#e5f1ff;font-size:11px}
.btb-photo-edit-textlabel{display:block;font-size:12px;color:#b9d8ff;margin-bottom:5px}
.btb-photo-edit-pane[data-pane=text] input{display:block;width:100%;box-sizing:border-box;background:#1b2c45;color:white;border:1px solid #6486b5;border-radius:9px;min-height:39px;padding:8px 12px;outline-offset:2px}
.btb-photo-edit-pane[data-pane=text] small{display:block;color:#9cb1ca;margin-top:5px;font-size:11px}
.btb-photo-edit-choices{display:flex;align-items:center;justify-content:flex-start;flex-wrap:wrap;gap:7px;margin:8px 0}
.btb-photo-edit-choices button{border:1px solid #475e7b;background:#20324e;border-radius:999px;padding:7px 12px;color:#e6f1ff;cursor:pointer;font-size:12px;min-height:32px}
.btb-photo-edit-choices button.is-active{border-color:#80c4ff;background:#265789;color:#fff}
.btb-photo-edit-choices button[data-color]{background:#1e3049;font-size:24px;padding:1px 9px;min-width:36px}
.btb-photo-edit-status{margin:0;padding:3px 13px 6px;font-size:11px;color:#9dbad5;text-align:center;min-height:16px}
@media(min-width:700px){.btb-photo-edit-modal{max-width:730px!important;margin-inline:auto;border:1px solid #344860;border-radius:16px}.btb-photo-edit-pane{max-height:220px}}
@media(max-height:650px){.btb-photo-edit-pane{max-height:125px;min-height:70px}.btb-photo-edit-top{padding-top:calc(env(safe-area-inset-top) + 2px)}}
@media(prefers-reduced-motion:reduce){.btb-photo-edit-modal *{scroll-behavior:auto!important}}
