.editor{--stage-pad:24px;--grip:36px;z-index:70;background:var(--bg);overscroll-behavior:contain;outline:none;flex-direction:column;display:flex;position:fixed;inset:0}.editor .button,.viewer-head .viewer-edit{height:36px}.viewer-head .viewer-edit{margin-left:4px;padding:0 12px;font-size:13px}.editor-head{flex:none;align-items:center;gap:8px;height:52px;padding:0 20px 0 12px;font-size:13px;display:flex}.editor-head .icon-button{width:36px;height:36px}.editor-head .icon-button:disabled{opacity:.4}.editor-head h2{white-space:nowrap;text-overflow:ellipsis;flex:1;min-width:0;font-size:13px;font-weight:600;overflow:hidden}.editor-stage{min-width:0;min-height:0;padding:var(--stage-pad);flex:1;justify-content:center;align-items:center;display:flex;position:relative}.editor-state{color:var(--muted)}.editor-bar{padding:4px 20px max(16px, env(safe-area-inset-bottom));flex-direction:column;flex:none;align-items:center;gap:10px;font-size:13px;display:flex}.editor-row{flex-wrap:wrap;justify-content:center;align-items:center;gap:8px 12px;width:100%;max-width:880px;display:flex}.editor-segment{scrollbar-width:none;background:var(--fill);border-radius:12px;gap:2px;max-width:100%;padding:2px;display:inline-flex;overflow-x:auto}.editor-segment::-webkit-scrollbar{display:none}.editor-segment button,.editor-icon{white-space:nowrap;min-width:36px;height:36px;color:var(--muted);border-radius:10px;flex:none;justify-content:center;align-items:center;padding:0 12px;font-size:13px;transition:background .12s,color .12s;display:inline-flex}.editor-segment button.icon,.editor-icon{width:36px;padding:0}.editor-icon{color:var(--fg)}.editor-segment button:hover:not(:disabled),.editor-icon:hover:not(:disabled){color:var(--fg);background:var(--fill-strong)}.editor-segment button[aria-pressed=true]{color:var(--fg);background:var(--bg);box-shadow:0 0 0 1px var(--line), 0 1px 2px #0000000f}.editor-segment button:active:not(:disabled),.editor-icon:active:not(:disabled){background:var(--fill-strong)}.editor-segment button:focus-visible{outline-offset:-2px}.editor-segment button:disabled,.editor-icon:disabled{opacity:.4;cursor:default}.editor-action{background:var(--fill);height:40px;color:var(--fg);white-space:nowrap;border-radius:12px;flex:none;align-items:center;gap:6px;padding:0 14px;font-size:13px;transition:background .12s;display:inline-flex}.editor-action:hover:not(:disabled),.editor-action:active:not(:disabled){background:var(--fill-strong)}.editor-action:disabled{opacity:.4;cursor:default}.editor-action-note{color:var(--muted);margin-left:2px}.editor .button:active:not(:disabled){background:var(--fill-strong)}.editor .button.primary:active:not(:disabled){background:var(--fg);opacity:.78}.editor-row.sliders{flex-wrap:nowrap;gap:8px 20px}.editor-slider{flex:1 1 0;align-items:center;gap:8px;min-width:0;height:36px;display:flex}.editor-slider label{color:var(--muted);flex:none}.editor-slider input[type=range]{cursor:pointer;flex:1;min-width:0;height:36px;margin:0}.editor-slider input[type=range]:disabled{cursor:default;opacity:.4}.editor-value{text-align:center;font-variant-numeric:tabular-nums;border-radius:10px;flex:none;width:40px;height:36px}.editor-value:hover:not(:disabled){background:var(--fill)}.editor-value:disabled{color:var(--muted);cursor:default}.editor-error{color:var(--danger);text-align:center}.editor-note{color:var(--muted);text-align:center}.editor-progress{font-variant-numeric:tabular-nums;align-items:center;gap:12px;display:flex}.crop-fit{inset:var(--stage-pad);justify-content:center;align-items:center;display:flex;position:absolute}.crop-frame{touch-action:none;-webkit-user-select:none;user-select:none;flex:none;position:relative}.crop-frame canvas{width:100%;height:100%;display:block}.crop-dim{pointer-events:none;position:absolute;inset:0;overflow:hidden}.crop-dim i{position:absolute;box-shadow:0 0 0 100vmax #00000080}.crop-box{cursor:move;touch-action:none;border:1px solid #ffffffe6;position:absolute}.crop-box:focus-visible{outline:2px solid var(--fg);outline-offset:4px}.crop-thirds{pointer-events:none;opacity:0;--third:#fff9;background:linear-gradient(to right, transparent calc(33.333% - .5px), var(--third) 0, var(--third) calc(33.333% + .5px), transparent 0, transparent calc(66.667% - .5px), var(--third) 0, var(--third) calc(66.667% + .5px), transparent 0), linear-gradient(to bottom, transparent calc(33.333% - .5px), var(--third) 0, var(--third) calc(33.333% + .5px), transparent 0, transparent calc(66.667% - .5px), var(--third) 0, var(--third) calc(66.667% + .5px), transparent 0);transition:opacity .15s;position:absolute;inset:0}.crop-box.dragging .crop-thirds{opacity:1}.crop-handle{width:var(--grip);height:var(--grip);touch-action:none;position:absolute}.crop-handle:before{content:"";background:#fff;border-radius:2px;position:absolute;box-shadow:0 0 2px #00000080}.crop-handle.nw,.crop-handle.ne,.crop-handle.sw,.crop-handle.se{--at:calc(var(--grip) / -2)}.crop-handle.nw{left:var(--at);top:var(--at);cursor:nwse-resize}.crop-handle.ne{right:var(--at);top:var(--at);cursor:nesw-resize;transform:scaleX(-1)}.crop-handle.sw{left:var(--at);bottom:var(--at);cursor:nesw-resize;transform:scaleY(-1)}.crop-handle.se{right:var(--at);bottom:var(--at);cursor:nwse-resize;transform:scale(-1)}.crop-handle.nw:before,.crop-handle.ne:before,.crop-handle.sw:before,.crop-handle.se:before{left:calc(var(--grip) / 2 - 2px);top:calc(var(--grip) / 2 - 2px);width:18px;height:18px;box-shadow:none;filter:drop-shadow(0 0 1px #0009);background:0 0;border-top:3px solid #fff;border-left:3px solid #fff;border-radius:0}.crop-handle.n{top:calc(var(--grip) / -2);left:calc(50% - var(--grip) / 2);cursor:ns-resize}.crop-handle.s{bottom:calc(var(--grip) / -2);left:calc(50% - var(--grip) / 2);cursor:ns-resize;transform:scaleY(-1)}.crop-handle.w{left:calc(var(--grip) / -2);top:calc(50% - var(--grip) / 2);cursor:ew-resize}.crop-handle.e{right:calc(var(--grip) / -2);top:calc(50% - var(--grip) / 2);cursor:ew-resize;transform:scaleX(-1)}.crop-handle.n:before,.crop-handle.s:before{left:calc(var(--grip) / 2 - 11px);top:calc(var(--grip) / 2 - 2px);width:22px;height:3px}.crop-handle.w:before,.crop-handle.e:before{left:calc(var(--grip) / 2 - 2px);top:calc(var(--grip) / 2 - 11px);width:3px;height:22px}@media (pointer:coarse){.editor{--grip:44px}}.editor-video{object-fit:contain;cursor:pointer;border-radius:10px;max-width:100%;max-height:100%}.trim{--edge:12px;width:calc(100% - 2 * var(--edge));touch-action:none;-webkit-user-select:none;user-select:none;cursor:pointer;max-width:880px;height:48px;margin:6px 0 2px;position:relative}.trim[aria-disabled=true]{cursor:default}.trim-frames{background:var(--fill-strong);border-radius:8px;display:flex;position:absolute;inset:0;overflow:hidden}.trim-frames img{object-fit:cover;pointer-events:none;flex:1 1 0;min-width:0;height:100%}.trim-shade{pointer-events:none;background:#00000080;position:absolute;top:0;bottom:0}.trim-range{margin:0 calc(var(--edge) / 2);border-top:2px solid var(--fg);border-bottom:2px solid var(--fg);pointer-events:none;position:absolute;top:-2px;bottom:-2px}.trim-handle{cursor:ew-resize;touch-action:none;outline:none;width:36px;position:absolute;top:-2px;bottom:-2px}.trim-handle.start{margin-left:calc(-1 * var(--edge))}.trim-handle.end{margin-left:calc(-36px + var(--edge))}.trim-handle:before{content:"";width:var(--edge);background:var(--fg);position:absolute;top:0;bottom:0}.trim-handle.start:before{left:var(--edge);border-radius:10px 3px 3px 10px}.trim-handle.end:before{right:var(--edge);border-radius:3px 10px 10px 3px}.trim-handle:after{content:"";background:var(--bg);border-radius:1px;width:2px;height:14px;position:absolute;top:calc(50% - 7px)}.trim-handle.start:after{left:calc(var(--edge) * 1.5 - 1px)}.trim-handle.end:after{right:calc(var(--edge) * 1.5 - 1px)}.trim-handle:focus-visible:before{box-shadow:0 0 0 2px var(--bg), 0 0 0 4px var(--fg)}.trim-playhead{background:var(--fg);width:2px;box-shadow:0 0 0 1px var(--bg);pointer-events:none;border-radius:1px;margin-left:-1px;position:absolute;top:-6px;bottom:-6px}.editor-row.video{flex-wrap:nowrap;justify-content:flex-start;width:calc(100% - 24px)}.editor-length{white-space:nowrap;font-variant-numeric:tabular-nums}.editor-spacer{flex:1}.editor-switch{cursor:pointer;white-space:nowrap;align-items:center;gap:8px;height:36px;padding:0 4px;display:inline-flex}@media (max-width:600px){.editor{--stage-pad:24px 16px}.editor-head{padding:0 16px 0 8px}.editor-bar{padding-inline:16px}.editor-segment button:not(.icon){padding:0 10px}.editor-row.sliders{flex-direction:column;gap:0}.editor-slider{flex:none;width:100%}.editor-slider label{width:76px}.editor-row.video{flex-wrap:wrap}.editor-row.video .button{flex:100%}}@media (prefers-reduced-motion:reduce){.editor *,.editor :before,.editor :after{transition:none!important}}
