.ct-photo-editor *{box-sizing:border-box}
.ct-photo-editor button,.ct-photo-editor input,.ct-photo-editor a{border:0;outline:0;box-shadow:none;font:inherit;color:inherit}
.ct-photo-editor button{cursor:pointer;touch-action:manipulation;transition:background-color .16s,color .16s;min-height:44px}
.ct-photo-editor button:focus-visible{outline:0;box-shadow:none;background-color:#ffe1e8!important;color:#992440!important;text-decoration:underline;text-underline-offset:4px}
.ct-photo-editor button:disabled{cursor:default;opacity:.55}
.ct-photo-editor input:focus-visible{outline:0;box-shadow:none;background-color:#ffe1e8}
.ct-photo-editor [hidden]{display:none!important}
.ct-photo-editor{--photo-settings-height:300px;--photo-filter-gap:16px;--photo-filter-heading-gap:10px;--photo-intensity-gap:14px;overflow-anchor:none;display:grid;grid-template-areas:"toolbar" "photo" "settings" "footer";grid-template-columns:minmax(0,1fr);grid-template-rows:32px minmax(0,1fr) min(var(--photo-settings-height),max(90px,calc(100dvh - 260px))) auto;gap:0;width:100%;max-width:1440px;height:100dvh;min-height:0;padding:8px 24px max(16px,env(safe-area-inset-bottom));margin:0 auto}
.ct-photo-editor .photo-toolbar{grid-area:toolbar;width:100%;display:flex;justify-content:flex-end;align-items:center;gap:12px;min-height:0}
.ct-photo-editor .photo-stage{grid-area:photo;display:flex;align-items:flex-start;justify-content:center;min-width:0;min-height:0;overflow:hidden;padding:16px 16px 28px}
.ct-photo-editor .photo-toolbar button{flex-shrink:0;min-height:32px;padding:3px 10px;background:transparent;color:#626262;font-size:12px;border-radius:6px}
.ct-photo-editor .photo-toolbar button:hover{background:#dedede}
.ct-photo-editor .image-area{position:relative;flex:none;max-width:100%;overflow:visible;background-color:#f4f4f4;background-image:conic-gradient(#e5e5e5 25%,#f4f4f4 0 50%,#e5e5e5 0 75%,#f4f4f4 0);background-size:18px 18px;isolation:isolate}
.ct-photo-editor #photo-image{display:block;width:100%;height:100%;user-select:none;-webkit-user-drag:none;object-fit:contain}
.ct-photo-editor .crop-overlay{position:absolute;inset:0;touch-action:none;user-select:none}
.ct-photo-editor .photo-canvas{position:absolute;inset:0;width:100%;height:100%;z-index:1;outline:0;pointer-events:none}
.ct-photo-editor .image-area[data-ready=true] #photo-image{visibility:hidden}
.ct-photo-editor .crop-overlay{z-index:2}
.ct-photo-editor .crop-overlay[aria-disabled=true]{pointer-events:none}
.ct-photo-editor .crop-shade{position:absolute;background:rgba(0,0,0,.36);pointer-events:none}
.ct-photo-editor .crop-selection{position:absolute;touch-action:none;cursor:move;outline:0;border:0;box-shadow:none}
.ct-photo-editor .crop-guide{position:absolute;inset:0;pointer-events:none;overflow:visible}
.ct-photo-editor .crop-selection:focus-visible{background:rgba(255,65,108,.13);outline:0}
.ct-photo-editor .crop-handle{position:absolute;display:grid;place-items:center;width:24px;height:24px;min-height:24px;padding:0;transform:translate(-50%,-50%);background:transparent;border-radius:0;touch-action:none}
.ct-photo-editor .crop-handle span{display:block;width:8px;height:8px;background:#929292}
.ct-photo-editor .crop-handle:hover span,.ct-photo-editor .crop-handle:focus-visible span{background:#ff416c}
.ct-photo-editor .crop-handle:focus-visible{background:rgba(255,255,255,.4)!important}
.ct-photo-editor .crop-handle.nw{left:0;top:0;cursor:nwse-resize}
.ct-photo-editor .crop-handle.n{left:50%;top:0;cursor:ns-resize}
.ct-photo-editor .crop-handle.ne{left:100%;top:0;cursor:nesw-resize}
.ct-photo-editor .crop-handle.e{left:100%;top:50%;cursor:ew-resize}
.ct-photo-editor .crop-handle.se{left:100%;top:100%;cursor:nwse-resize}
.ct-photo-editor .crop-handle.s{left:50%;top:100%;cursor:ns-resize}
.ct-photo-editor .crop-handle.sw{left:0;top:100%;cursor:nesw-resize}
.ct-photo-editor .crop-handle.w{left:0;top:50%;cursor:ew-resize}
.ct-photo-editor .photo-actions{grid-area:settings;width:100%;max-width:560px;justify-self:center;min-width:0;min-height:0;display:flex;flex-direction:column;align-items:center;overflow:hidden;padding:4px;margin:0}
.ct-photo-editor .photo-actions>*{flex-shrink:0}
.ct-photo-editor .photo-actions>.photo-options{flex:0 1 auto;width:100%;max-width:438px;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;padding:0 4px;touch-action:pan-y}
.ct-photo-editor .background-controls{display:grid;grid-template-columns:116px minmax(0,1fr);gap:16px;align-items:center;width:100%}
.ct-photo-editor .background-controls:has(.refinement[hidden]){grid-template-columns:1fr}
.ct-photo-editor .background-controls .remove-background{justify-self:center;max-width:100%;min-height:44px;padding:0 8px;gap:6px;font-size:12px;white-space:nowrap}
.ct-photo-editor .background-controls .remove-background svg{width:16px;height:16px}
.ct-photo-editor .photo-footer{grid-area:footer;width:100%;max-width:560px;justify-self:center;min-width:0;display:flex;flex-direction:column;align-items:center;padding-top:8px}
.ct-photo-editor .photo-toolbar .status{flex:1;min-width:0;max-width:none;max-height:32px;overflow:auto;margin:0;text-align:left}
.ct-photo-editor .status:empty{display:none}
.ct-photo-editor .remove-background{display:inline-flex;gap:8px;align-items:center;justify-content:center;padding:0 19px;min-height:42px;font-weight:600;font-size:13px;color:#454545;background:#e8e8e8;border-radius:9px}
.ct-photo-editor .remove-background:hover:not(:disabled){background:#f2f2f2}
.ct-photo-editor .remove-background svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linejoin:round;stroke-linecap:round}
.ct-photo-editor .remove-background[data-removed=true]{background:#e5ece1;color:#465a3d}
.ct-photo-editor .refinement{width:100%;min-width:0;text-align:left}
.ct-photo-editor .refinement .range-heading{gap:6px;font-size:12px;flex-wrap:wrap}
.ct-photo-editor .refinement .range-heading output{font-size:11px}
.ct-photo-editor .refinement .range-captions{gap:8px}
.ct-photo-editor .refinement .range-captions span{max-width:50%}
.ct-photo-editor .refinement .range-captions span:last-child{text-align:right}
.ct-photo-editor .range-heading{display:flex;align-items:center;gap:9px;font-size:13px;font-weight:600}
.ct-photo-editor .range-heading output{font-size:12px;font-weight:400;color:#666;font-variant-numeric:tabular-nums}
.ct-photo-editor .text-button{padding:0 5px;min-height:30px;border-radius:5px;background:transparent;color:#565656;font-size:11px;text-decoration:underline;text-underline-offset:3px}
.ct-photo-editor .text-button:hover{background:#dedede}
.ct-photo-editor .range-heading .text-button{margin-left:auto}
.ct-photo-editor .range{display:block;appearance:none;-webkit-appearance:none;width:100%;height:28px;margin:0;background:transparent;cursor:pointer;border-radius:5px}
.ct-photo-editor .range::-webkit-slider-runnable-track{height:5px;border:0;border-radius:5px;background:#a9a9a9}
.ct-photo-editor .range::-moz-range-track{height:5px;border:0;border-radius:5px;background:#a9a9a9}
.ct-photo-editor .range::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;border:0;outline:0;box-shadow:none;width:18px;height:18px;margin-top:-6.5px;border-radius:50%;background:#ff416c}
.ct-photo-editor .range::-moz-range-thumb{border:0;outline:0;box-shadow:none;width:18px;height:18px;border-radius:50%;background:#ff416c}
.ct-photo-editor .range:disabled{opacity:.5;cursor:default}
.ct-photo-editor .range-captions{display:flex;justify-content:space-between;color:#555;font-size:10px;margin-top:0}
.ct-photo-editor .refinement-hint{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;margin:0}
.ct-photo-editor .photo-filters{width:100%;margin-top:var(--photo-filter-gap)}
.ct-photo-editor .filter-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:32px;margin-bottom:var(--photo-filter-heading-gap)}
.ct-photo-editor .photo-filters h2{margin:0;font-size:13px;font-weight:600}
.ct-photo-editor .auto-enhance-actions{display:flex;align-items:center;gap:8px;flex-shrink:0}
.ct-photo-editor .auto-enhance-reset{min-height:32px;padding:0 4px}
.ct-photo-editor .auto-enhance{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:32px;padding:0 8px;border-radius:7px;background:#e8e8e8;font-size:11px;font-weight:600;white-space:nowrap}
.ct-photo-editor .auto-enhance-value{width:4.5ch;flex-shrink:0;font-variant-numeric:tabular-nums;text-align:right}
.ct-photo-editor .auto-enhance[aria-disabled=true]{cursor:default}
.ct-photo-editor .auto-enhance:hover:not(:disabled):not([aria-disabled=true]){background:#f2f2f2}
.ct-photo-editor .auto-enhance[aria-pressed=true]{background:#ffe1e8;color:#91223c}
.ct-photo-editor .filter-list{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}
.ct-photo-editor .filter-button{min-width:0;padding:4px 4px 6px;border-radius:8px;background:#dedede;font-size:10px;line-height:1.4;text-align:center}
.ct-photo-editor .filter-button:hover:not(:disabled){background:#eaeaea}
.ct-photo-editor .filter-button[aria-pressed=true]{background:#ffe1e8;color:#91223c}
.ct-photo-editor .filter-button canvas{display:block;width:42px;max-width:100%;height:42px;object-fit:cover;border-radius:5px;margin:0 auto 4px;background:#c4c4c4;pointer-events:none}
.ct-photo-editor .filter-button span{display:block;white-space:nowrap}
.ct-photo-editor .filter-strength{width:100%;max-width:430px;margin-top:var(--photo-intensity-gap)}
.ct-photo-editor .filter-strength .range-heading output{margin-left:auto}
.ct-photo-editor .filter-strength[data-inactive=true]{opacity:.5}
.ct-photo-editor .intensity-captions{display:grid;grid-template-columns:1fr 1fr 1fr}
.ct-photo-editor .intensity-captions span:nth-child(2){text-align:center}
.ct-photo-editor .intensity-captions span:last-child{text-align:right}
.ct-photo-editor .status{min-height:21px;margin:6px 0 9px;text-align:center;font-size:11px;color:#5c5c5c;line-height:1.6;max-width:470px}
.ct-photo-editor .status[data-tone=error]{color:#8d2840}
.ct-photo-editor .status[data-tone=success]{color:#3d5835}
.ct-photo-editor .main-actions{display:flex;gap:18px;justify-content:center;width:100%}
.ct-photo-editor .cancel-button,.ct-photo-editor .save-button{min-height:58px;font-size:18px;font-weight:600;border-radius:11px;padding:0 28px;min-width:190px}
.ct-photo-editor .cancel-button{background:white}
.ct-photo-editor .cancel-button:hover:not(:disabled){background:#f6f6f6}
.ct-photo-editor .save-button{background:linear-gradient(100deg,#ff416c,#ff8b77);color:white}
.ct-photo-editor .save-button:hover:not(:disabled){background:linear-gradient(100deg,#eb305b,#ef7667)}
.ct-photo-editor .processing{position:absolute;inset:0;z-index:3;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:13px;background:rgba(232,232,232,.8);color:#383838;font-weight:600;pointer-events:none}
.ct-photo-editor .spinner{width:30px;height:30px;border-radius:50%;background:conic-gradient(transparent,#ff416c);mask:radial-gradient(farthest-side,transparent calc(100% - 3px),#000 0);animation:sm-photo-spin 1s linear infinite}
@keyframes sm-photo-spin{to{transform:rotate(360deg)}}
@media(max-width:899px){.ct-photo-editor{padding:8px 16px max(12px,env(safe-area-inset-bottom))}
.ct-photo-editor .photo-toolbar button{font-size:11px}
.ct-photo-editor .remove-background{font-size:12px;min-height:44px}
.ct-photo-editor .main-actions{gap:12px}
.ct-photo-editor .cancel-button,.ct-photo-editor .save-button{min-width:0;flex:1;min-height:50px;font-size:16px;padding:0 20px}
.ct-photo-editor .status{font-size:10px;max-width:100%}
.ct-photo-editor .crop-handle{width:28px;height:28px;min-height:28px}
.ct-photo-editor .crop-handle span{width:7px;height:7px}
}
@media(min-width:560px) and (max-width:899px) and (max-height:540px){.ct-photo-editor{grid-template-areas:"toolbar toolbar" "photo settings" "footer footer";grid-template-columns:minmax(0,1fr) 320px;grid-template-rows:32px minmax(0,1fr) auto;gap:0 12px}
.ct-photo-editor .photo-stage{padding-bottom:16px}
}
@media(max-width:359px){.ct-photo-editor{--photo-settings-height:308px}
.ct-photo-editor .filter-heading{gap:4px}
.ct-photo-editor .auto-enhance{padding-inline:6px}
.ct-photo-editor .auto-enhance-actions{gap:4px}
}
@media(max-width:359px), (min-width:560px) and (max-width:899px) and (max-height:540px){.ct-photo-editor{--photo-filter-gap:8px;--photo-filter-heading-gap:6px;--photo-intensity-gap:8px}
.ct-photo-editor .background-controls{gap:8px}
.ct-photo-editor .filter-list{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.ct-photo-editor .filter-button{display:flex;align-items:center;justify-content:center;gap:4px;padding:4px}
.ct-photo-editor .filter-button canvas{width:24px;height:24px;flex-shrink:0;margin:0}
}
@media(max-height:540px){.ct-photo-editor{padding-top:8px;padding-bottom:max(8px,env(safe-area-inset-bottom))}
.ct-photo-editor .photo-footer{padding-top:4px}
.ct-photo-editor .cancel-button,.ct-photo-editor .save-button{min-height:44px;font-size:15px}
}
@media(prefers-reduced-motion:reduce){.ct-photo-editor button{transition:none}
.ct-photo-editor .spinner{animation-duration:3s}
}

/* Only index3 opens this isolated dialog; the original editor CSS is untouched. */
body.sm-photo-editing{overflow:hidden}
.ct-jcrop_wrapper.ct-photo-editor{position:fixed;inset:0;max-width:none;margin:0;transform:none;background:#cecece;backdrop-filter:none;color:#383838;font:14px/1.5 'Open Sans',sans-serif;z-index:100001}
.ct-photo-editor p,.ct-photo-editor h2{padding:0}
.ct-photo-editor .ct-jcrop{position:relative;inset:auto;transform:none;flex:none;background-color:#f4f4f4;background-image:conic-gradient(#e5e5e5 25%,#f4f4f4 0 50%,#e5e5e5 0 75%,#f4f4f4 0);background-size:18px 18px;overflow:visible;isolation:isolate}
.ct-photo-editor .ct-jcrop img{max-width:none}
.ct-photo-editor .jcrop-holder{z-index:2;background:transparent!important}
.ct-photo-editor .jcrop-holder img{visibility:hidden!important}

.ct-photo-editor .jcrop-holder>div:first-child>div{overflow:hidden}
.ct-photo-editor .jcrop-vline,.ct-photo-editor .jcrop-hline{background:none;border-color:white;border-style:dashed;opacity:1!important}
.ct-photo-editor .jcrop-hline{border-width:1px 0 0;height:0}
.ct-photo-editor .jcrop-vline{border-width:0 0 0 1px;width:0}
.ct-photo-editor .jcrop-handle{background:#929292;border:0;opacity:1!important;width:8px;height:8px}
.ct-photo-editor .jcrop-handle:hover{background:#ff416c}
.ct-photo-editor .photo-canvas{z-index:1}
.ct-photo-editor .processing{z-index:600}
.ct-photo-editor .photo-stage{position:relative}
.ct-photo-editor .photo-toolbar .status{display:block}
.ct-photo-editor .photo-toolbar button{line-height:1.5}
.ct-photo-editor button{letter-spacing:normal;text-transform:none}
.ct-photo-editor .main-actions{max-width:430px}
.ct-jcrop_wrapper.ct-photo-editor{outline:0}

.ct-photo-editor .photo-crop-shades{position:absolute;inset:0;z-index:2;pointer-events:none}
.ct-photo-editor .photo-crop-shades>div{position:absolute;background:rgba(0,0,0,.36)}
.ct-photo-editor .jcrop-holder{z-index:3}
.ct-photo-editor #ct-crop_preview{display:block}
.ct-photo-editor #ct-crop_preview:not([src]){visibility:hidden}
.ct-photo-editor input[type=range]{padding:0;min-height:28px;box-sizing:border-box}
.ct-photo-editor input[type=file][hidden]{display:none!important}
.ct-photo-editor .processing{font-size:13px;text-align:center;padding:12px}
