@font-face{font-family:TolkienCyr;src:url('fonts/TolkienCyr-editor.ttf') format('truetype');font-display:swap}
.editor069{width:min(100%,680px);height:100dvh;max-width:100vw;max-height:100dvh;margin:auto;padding:0;border:0;border-radius:0;background:#09090b;color:#eee;display:none;overflow:hidden;grid-template-rows:auto minmax(120px,1fr) auto auto auto auto;box-sizing:border-box}.editor069[open]{display:grid}.editor069::backdrop{background:#000d}.editor069 header{display:flex;align-items:center;gap:6px;padding:calc(8px + env(safe-area-inset-top)) 8px 8px}.editor069 header strong{flex:1;text-align:center;min-width:0}.editor069 button,.editor069 select,.editor069 textarea{font:inherit;color:inherit;background:#242428;border:1px solid #48484d;border-radius:10px;padding:10px;min-height:42px}.editor069 button{transition:transform .12s,background .15s}.editor069 button:active{transform:scale(.96);background:#555}.editor069 button.selected{background:#ddd;color:#111;border-color:#fff}.editor069 .edit-primary{background:#eee;color:#111;font-weight:700;width:100%}.edit-stage{display:flex;align-items:center;justify-content:center;overflow:hidden;min-height:0;background:#000}.edit-stage canvas{max-height:100%;max-width:100%;width:auto;height:auto;touch-action:none;object-fit:contain}.edit-stage[data-mode=crop]{background:#161619}.edit-tools{display:flex;gap:5px;padding:8px;overflow-x:auto;flex:none}.edit-tools button{flex:1;white-space:nowrap;padding:10px 5px;font-size:13px}.edit-panel{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:0 10px;max-height:29dvh;overflow-y:auto;min-width:0}.edit-panel:empty{display:none}.edit-panel textarea{width:100%;box-sizing:border-box;min-height:46px;max-height:100px}.edit-panel input[type=range]{flex:1;min-width:100px;accent-color:#ddd;touch-action:pan-x}.edit-panel p{width:100%;margin:3px 0;font-size:13px}.edit-palette{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.edit-palette button{width:27px;height:27px;min-height:27px;padding:0;border:2px solid #777;border-radius:50%}.edit-palette input[type=color]{width:30px;height:30px;padding:0;border:0}.editor069 .editor-status{margin:5px 10px;font-size:12px;min-height:16px;color:#b6b6be;overflow-wrap:anywhere}.editor069 .editor-actions{display:flex;padding:8px 10px calc(10px + env(safe-area-inset-bottom));margin:0}.edit-filmstrip{display:flex;width:100%;height:54px;position:relative;overflow:hidden;border:2px solid #aaa;border-radius:7px}.edit-filmstrip canvas{width:12.5%;height:100%;object-fit:cover}.edit-filmstrip:after{content:'';position:absolute;inset:0;pointer-events:none;background:linear-gradient(to right,#000a 0 var(--trim-start),transparent var(--trim-start) var(--trim-end),#000a var(--trim-end) 100%)}.edit-trim-handles{width:100%;display:flex;gap:12px}.edit-trim-handles input{width:45%;accent-color:#fff}.editor069 input[type=range]::-webkit-slider-thumb{min-width:20px;min-height:22px}
@media(max-height:600px){.editor069 header{padding:3px}.editor069 .editor-status{font-size:11px;margin:1px 8px}.edit-panel{max-height:23dvh}.edit-tools{padding:3px}.editor069 button{padding:6px;min-height:34px}.editor069 .editor-actions{padding:4px 8px}}

.edit-filmstrip{overflow:visible}.edit-filmstrip>canvas:first-child{border-radius:6px 0 0 6px}.edit-filmstrip>canvas:nth-child(8){border-radius:0 6px 6px 0}.edit-filmstrip::after{z-index:1;border-radius:6px}.edit-filmstrip .edit-trim-handles{position:absolute;inset:0;display:block;pointer-events:none;z-index:2}.edit-filmstrip .edit-trim-handles input[type=range]{position:absolute;inset:0;width:100%;height:100%;margin:0;appearance:none;-webkit-appearance:none;background:transparent;border:0;padding:0;pointer-events:none;min-width:0}.edit-trim-handles input[type=range]::-webkit-slider-runnable-track{background:transparent;height:100%}.edit-trim-handles input[type=range]::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;pointer-events:auto;width:18px;height:54px;background:linear-gradient(90deg,#fff 0 40%,#444 40% 60%,#fff 60%);border:3px solid #fff;border-radius:4px;cursor:ew-resize;touch-action:none}.edit-trim-handles input[type=range]::-moz-range-track{background:transparent}.edit-trim-handles input[type=range]::-moz-range-thumb{pointer-events:auto;width:14px;height:50px;border-radius:4px;background:#fff;cursor:ew-resize}
