/* Transform UI stays outside the clipped slide; it is never part of exports. */
.stage-wrap{overflow:visible}
.stage-wrap>.slide,.stage-wrap>.native-slide{border-radius:4px;overflow:hidden}
.editor-grid{position:absolute;inset:0;z-index:15;pointer-events:none;border-radius:4px;background-image:linear-gradient(to right,#6d82b322 1px,transparent 1px),linear-gradient(to bottom,#6d82b322 1px,transparent 1px)}
.editor-guide{position:absolute;z-index:25;pointer-events:none;background:#e15ac9}
.guide-x{width:1px}.guide-y{height:1px}
.editor-guides{position:absolute;inset:0;z-index:25;overflow:hidden;pointer-events:none}
.editor-guide-anchor{position:absolute;width:7px;height:7px;transform:translate(-50%,-50%);color:#e15ac9}
.editor-guide-anchor:before,.editor-guide-anchor:after{content:'';position:absolute;background:currentColor}
.editor-guide-anchor:before{width:7px;height:1px;left:0;top:3px}
.editor-guide-anchor:after{width:1px;height:7px;top:0;left:3px}
.editor-transform{position:absolute;z-index:30;border:1px solid #5263ef;pointer-events:none;transform-origin:center}




.editor-handle{position:absolute;width:9px;height:9px;background:#fff;border:1.5px solid #5263ef;border-radius:0;pointer-events:auto;transform:translate(-50%,-50%);padding:0;touch-action:none}
.editor-handle:before{content:'';position:absolute;inset:-5px}
.handle-nw{left:0;top:0;cursor:nwse-resize}.handle-n{left:50%;top:0;cursor:ns-resize}.handle-ne{left:100%;top:0;cursor:nesw-resize}.handle-e{left:100%;top:50%;cursor:ew-resize}.handle-se{left:100%;top:100%;cursor:nwse-resize}.handle-s{left:50%;top:100%;cursor:ns-resize}.handle-sw{left:0;top:100%;cursor:nesw-resize}.handle-w{left:0;top:50%;cursor:ew-resize}
.editor-rotation-line{position:absolute;left:50%;top:-25px;height:24px;width:1px;background:#5263ef}
.editor-rotate{position:absolute;left:50%;top:-32px;transform:translate(-50%,-50%);width:22px;height:22px;border-radius:50%;background:white;border:1px solid #5263ef;color:#5263ef;pointer-events:auto;touch-action:none;cursor:grab;display:grid;place-items:center;padding:3px}
.editor-rotate svg{width:14px;height:14px}
#stage .native-selected{outline:none!important}#stage .native-editable:focus{outline:none}
#stage .native-photo-overlay{z-index:2;cursor:move;touch-action:none}
#stage .native-element img{user-select:none;-webkit-user-drag:none}
#stage .native-element[data-element]:not(.native-text){touch-action:none;cursor:move}
.editor-transforming,.editor-transforming *{user-select:none!important;cursor:grabbing!important}
.editor-tool-options{display:flex;align-items:center;justify-content:flex-end;gap:5px;flex-wrap:wrap}
.editor-tool-options .icon-btn{width:32px;height:32px;flex-shrink:0}.editor-tool-options .icon-btn.selected{background:#e9edff;color:#5263ef}
.editor-grid-step>span{position:absolute;clip-path:inset(50%);height:1px;width:1px;overflow:hidden}
.editor-grid-step select{width:64px;border:1px solid #e1e6f1;background:white;border-radius:5px;padding:6px 3px;color:#69758e;font-size:10px}
.editor-toolbar{flex-wrap:wrap}.editor-toolbar .toolbar-caption{display:none}
.editor-tool-hint{font-size:10px;line-height:1.6;color:#929bb0;margin:14px 0}
.editor-photo-modes{display:grid;gap:6px;margin:10px 0 16px}
.editor-photo-modes button{display:flex;align-items:center;gap:10px;border:1px solid #e2e7f2;border-radius:7px;padding:10px;text-align:left;background:#fff;color:#66738c}
.editor-photo-modes button.selected{border-color:#5263ef;background:#f0f3ff;color:#5263ef}
.editor-photo-modes strong{display:block;font-size:10px;font-weight:600}.editor-photo-modes small{display:block;font-size:8px;margin-top:4px;color:#95a0b5}
.photo-mode-icon{display:block;flex:0 0 26px;height:19px;border:1.5px solid currentColor;background:linear-gradient(145deg,transparent 45%,#bac9e766 45%);border-radius:0}
.photo-mode-icon.mode-original{height:23px;flex-basis:19px;margin:0 3.5px}.photo-mode-icon.mode-rounded{border-radius:5px}
.editor-properties .native-fields label{font-size:12px}.editor-properties .native-fields input{font-size:14px;min-height:42px}.editor-properties .editor-photo-modes strong{font-size:13px}.editor-properties .editor-photo-modes small{font-size:11px}
@media(max-width:700px){
  .editor-toolbar{gap:6px;padding:8px 10px}.editor-toolbar .toolbar-group{flex-wrap:wrap;gap:4px}.editor-tool-options{width:100%;justify-content:flex-start;gap:6px}.editor-tool-options .icon-btn{width:38px;height:38px}.editor-tool-options .btn{min-height:38px}.editor-grid-step select{font-size:12px;min-height:38px}
  .editor-handle{width:12px;height:12px}.editor-handle:before{inset:-7px}.editor-rotate{width:25px;height:25px;top:-34px}
  .slide-stage{padding:45px 18px 28px}
}

/* v3.8: drag objects directly; double click text to edit it. */
#stage .native-element[data-element]{touch-action:none;cursor:move;user-select:none}
#stage .native-text.editor-text-editing{touch-action:auto;cursor:text;user-select:text!important}
#stage .native-text.editor-text-editing:focus{outline:1px dashed #5263ef88!important}
.editor-radius{margin:12px 0 18px;padding:12px;border:1px solid #e2e7f2;border-radius:7px;background:#fafbff}
.editor-radius label{display:flex;align-items:center;gap:7px;font-size:11px;color:#66738c;flex-wrap:wrap}
.editor-radius label>span{font-size:10px;color:#97a2b7}
.editor-radius input[type=number]{margin-left:auto;width:76px;min-height:34px;padding:6px 8px;border:1px solid #dce2f0;border-radius:5px;background:#fff;color:#5263ef}
.editor-radius input[type=range]{display:block;width:100%;margin:14px 0 9px;accent-color:#5263ef;min-height:22px}
.editor-radius small{font-size:9px;color:#98a3b8}
@media(max-width:700px){.editor-radius label{font-size:13px}.editor-radius input[type=number]{min-height:42px;font-size:14px}.editor-radius input[type=range]{min-height:36px}.editor-radius small{font-size:11px}}

/* v3.19: a rotated selection must never change the canvas viewport. */
body.editing{overflow:hidden}
body.editing .main{height:100dvh;min-height:0;display:flex;flex-direction:column}
.editor-top{flex:0 0 auto}
.editor-shell{flex:1;min-height:0;height:auto;min-width:0;overflow:hidden;overflow:clip}
.editor-center{min-width:0;min-height:0;overflow:hidden;overflow:clip}
.editor-toolbar,.editor-bottom{flex-shrink:0}
.slide-stage{flex:1 1 0;min-width:0;min-height:0;padding:48px 28px;overflow:hidden;overflow:clip;container-type:size}
.slide-stage>.stage-wrap{flex:none;width:min(980px,100cqw,calc(100cqh * var(--studio-slide-ratio,1.777777778)));max-width:100%;height:auto}
.slide-rail{min-height:0;min-width:0;overscroll-behavior:contain;overflow-anchor:none;scroll-behavior:auto}
@media(max-width:700px){
 .editor-center{flex:1;min-height:0;overflow:hidden;overflow:clip}
 .slide-stage{flex:1 1 0;min-height:0;padding:44px 16px 24px}
 .slide-rail{flex:0 0 145px;height:145px;min-height:0}
}
@media(max-width:700px) and (max-height:540px){.slide-rail{flex-basis:100px;height:100px}.slide-stage{padding:38px 16px 16px}.editor-bottom{padding-bottom:8px}}
