.container{background:#fff;border-radius:16px;max-width:1200px;margin:20px auto 0;overflow:hidden;box-shadow:0 20px 40px #0000001a}.header{color:#fff;text-align:center;background:linear-gradient(90deg,#4f46e5,#7c3aed)}.upload-area{text-align:center;cursor:pointer;border:3px dashed #d1d5db;border-radius:12px;margin:20px;padding:40px;transition:all .3s}.upload-area:hover{background:#f8fafc;border-color:#4f46e5}.upload-area.dragover{background:#eff6ff;border-color:#4f46e5}.upload-area.loading{cursor:not-allowed;pointer-events:none;opacity:.8}.loading-spinner{border:4px solid #e5e7eb;border-top-color:#4f46e5;border-radius:50%;width:48px;height:48px;animation:1s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}.editor-section{padding:20px;display:none}.video-container{background:#000;border-radius:8px;justify-content:center;margin-bottom:20px;display:flex;position:relative;overflow:hidden}#videoPreview{object-fit:contain;width:auto;max-width:100%;height:auto;max-height:min(52vh,480px);display:block}.export-section{text-align:center;background:#f8fafc;border-top:1px solid #e2e8f0;padding:20px}.format-selector{justify-content:center;gap:20px;margin-bottom:20px;display:flex}.format-option{cursor:pointer;border-radius:6px;align-items:center;gap:8px;padding:8px 12px;transition:background-color .2s;display:flex}.format-option:hover{background-color:#e2e8f0}.format-option input[type=radio]{margin:0;transform:scale(1.2)}.progress-container{margin:20px 0;display:none}.progress-bar{background:#e2e8f0;border-radius:4px;width:100%;height:8px;overflow:hidden}.progress-fill{background:linear-gradient(90deg,#4f46e5,#7c3aed);width:0%;height:100%;transition:width .3s}.progress-text{color:#64748b;margin-top:10px;font-size:14px}.controls{grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:15px;margin-bottom:20px;display:grid}.control-group{background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:15px}.control-group h3{color:#374151;margin-bottom:10px;font-size:14px}.segments-list{background:#fff;border:1px solid #e2e8f0;border-radius:6px;max-height:200px;overflow-y:auto}.segment-item{cursor:pointer;border-bottom:1px solid #f1f5f9;justify-content:space-between;align-items:center;padding:8px 12px;transition:background-color .2s;display:flex}.segment-item:hover{background-color:#f8fafc}.segment-item.selected{background-color:#eff6ff;border-left:3px solid #3b82f6}.segment-item:last-child{border-bottom:none}.segment-times{color:#64748b;font-family:monospace;font-size:12px}.btn{color:#fff;cursor:pointer;background:#4f46e5;border:none;border-radius:6px;padding:10px 16px;font-size:14px;transition:all .2s}.btn:hover{background:#4338ca;transform:translateY(-1px)}.btn:disabled{cursor:not-allowed;background:#9ca3af;transform:none}.btn-small{padding:6px 10px;font-size:12px}.btn-danger{background:#ef4444}.btn-danger:hover{background:#dc2626}.btn-success{background:#10b981}.btn-success:hover{background:#059669}.time-input{gap:10px;margin:10px 0;display:flex}.time-input input{text-align:center;border:1px solid #d1d5db;border-radius:4px;width:80px;padding:8px;font-family:monospace}.segment-progress-item{background:#f8fafc;border:1px solid #e2e8f0;border-radius:6px;margin-bottom:8px;padding:12px}.segment-progress-header{justify-content:space-between;align-items:center;margin-bottom:8px;display:flex}.segment-progress-title{color:#374151;font-size:14px;font-weight:500}.segment-progress-status{color:#6b7280;font-family:monospace;font-size:12px}.segment-progress-status.pending{color:#6b7280}.segment-progress-status.processing{color:#3b82f6;font-weight:600}.segment-progress-status.completed{color:#10b981;font-weight:600}.segment-progress-status.error{color:#ef4444;font-weight:600}.segment-progress-bar{background:#e5e7eb;border-radius:3px;height:6px;overflow:hidden}.segment-progress-fill{background:#3b82f6;height:100%;transition:width .3s}.segment-result-item{background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;gap:10px;padding:15px;display:grid}.segment-result-header{justify-content:space-between;align-items:center;display:flex}.segment-result-title{color:#374151;font-size:14px;font-weight:600}.segment-result-info{color:#6b7280;font-family:monospace;font-size:12px}.segment-result-video{background:#000;border-radius:4px;width:100%;max-width:300px;margin:0 auto;display:block}.segment-result-actions{justify-content:center;gap:8px;display:flex}.segment-result-actions .btn{flex:1;max-width:150px}@media (width<=768px){.format-selector{flex-direction:column;align-items:center;gap:12px}.format-option{justify-content:center;min-width:200px;padding:12px 16px}.controls{grid-template-columns:1fr}.container{border-radius:8px;width:auto;margin:10px}.header{padding:16px}.timeline{height:100px;margin:35px 0 20px}.segment{height:92px;top:4px}.segment-handle{opacity:.8;background:#fffffff2;border-radius:4px;width:min(20px,50%);height:100%;position:absolute;top:0}.segment-handle.start{left:0}.segment-handle.end{right:0}.segment:hover .segment-handle,.segment.selected .segment-handle{opacity:1;background:#fff;width:min(24px,50%)}.segment-duration{padding:2px 6px;font-size:12px}.segment-label{padding:4px 8px;font-size:12px}.segment-label.start{top:-32px}.segment-label.end{top:104px}.segment:not(.selected) .segment-label{display:none}.segment-content{left:20px;right:20px}.segment-result-header{flex-direction:column;align-items:center;gap:2px}}@media (pointer:coarse){.btn,.format-option{min-height:44px}.time-input input{width:96px;min-height:44px;font-size:16px}}[data-tool=overlay] [hidden]{display:none!important}.overlay-workspace{grid-template-columns:minmax(0,1fr) 340px;align-items:start;gap:20px;margin-bottom:20px;display:grid}.overlay-preview{min-width:0}.overlay-stage-wrap{background:#0f172a;border-radius:8px;justify-content:center;display:flex;overflow:hidden}.overlay-stage{aspect-ratio:16/9;touch-action:none;-webkit-user-select:none;user-select:none;cursor:default;outline:none;width:100%;max-width:100%;position:relative}.overlay-stage:focus-visible{box-shadow:inset 0 0 0 3px #a5b4fc}.overlay-stage #videoPreview,.overlay-stage canvas{width:100%;height:100%;display:block;position:absolute;inset:0}.overlay-stage #videoPreview{object-fit:fill}.overlay-stage canvas{pointer-events:none}.overlay-stage.is-dragging{cursor:grabbing}.selection-box{box-sizing:border-box;pointer-events:none;border:2px solid #818cf8;outline:1px solid #0f172a99;position:absolute}.selection-box .handle{pointer-events:auto;touch-action:none;background:#fff;border:2px solid #4f46e5;border-radius:3px;width:14px;height:14px;margin:-8px;position:absolute}.selection-box .handle[data-corner=nw]{cursor:nwse-resize;top:0;left:0}.selection-box .handle[data-corner=ne]{cursor:nesw-resize;margin-right:-8px;top:0;right:0}.selection-box .handle[data-corner=sw]{cursor:nesw-resize;margin-bottom:-8px;bottom:0;left:0}.selection-box .handle[data-corner=se]{cursor:nwse-resize;margin-bottom:-8px;margin-right:-8px;bottom:0;right:0}.overlay-stage.is-resizing,.overlay-stage.is-resizing .handle{cursor:nwse-resize}.playback-bar{align-items:center;gap:12px;margin-top:10px;display:flex}.playback-bar .btn{min-width:84px}.playback-bar input[type=range]{accent-color:#4f46e5;flex:1;min-width:0}.time-label{color:#475569;white-space:nowrap;font-family:monospace;font-size:13px}.stage-hint{color:#64748b;margin-top:6px;font-size:12px}.file-notice{color:#92400e;background:#fef3c7;border-radius:6px;margin:0 0 12px;padding:8px 12px;font-size:14px}.export-hint{color:#64748b;margin-top:10px;font-size:13px}.privacy-note{color:#64748b;text-align:center;margin-top:16px;font-size:12px}@media (width<=900px){.overlay-workspace{grid-template-columns:1fr}}@media (pointer:coarse){.selection-box .handle{width:24px;height:24px;margin:-13px}.selection-box .handle[data-corner=ne]{margin-right:-13px}.selection-box .handle[data-corner=sw]{margin-bottom:-13px}.selection-box .handle[data-corner=se]{margin-bottom:-13px;margin-right:-13px}}.layer-panel{gap:15px;min-width:0;display:grid}.panel-section{background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;gap:12px;padding:15px;display:grid}.panel-section h3{color:#374151;font-size:14px;font-weight:600}.panel-section h4{color:#475569;font-size:13px;font-weight:600}.panel-heading{justify-content:space-between;align-items:center;gap:8px;display:flex}.panel-actions{gap:6px;display:flex}.panel-empty,.panel-status,.field-note{color:#64748b;font-size:12px}.panel-status.is-error,.field-note.is-error{color:#b91c1c}.layer-list{background:#fff;border:1px solid #e2e8f0;border-radius:6px;max-height:220px;margin:0;padding:0;list-style:none;overflow-y:auto}.layer-list:empty{display:none}.layer-item{border-bottom:1px solid #f1f5f9;border-left:3px solid #0000;align-items:center;gap:2px;padding:4px 6px;display:flex}.layer-item:last-child{border-bottom:none}.layer-item.is-selected{background:#eef2ff;border-left-color:#4f46e5}.layer-item.is-hidden .layer-name{opacity:.5}.layer-name{text-align:left;color:#1f2937;cursor:pointer;background:0 0;border:none;flex:1;align-items:center;gap:8px;min-width:0;padding:6px 4px;font-size:13px;display:flex}.layer-name>span:last-child{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.layer-kind{color:#3730a3;background:#e0e7ff;border-radius:4px;flex:none;justify-content:center;align-items:center;width:22px;height:22px;font-size:12px;font-weight:700;display:inline-flex}.layer-action{color:#475569;cursor:pointer;background:0 0;border:none;border-radius:4px;flex:none;width:28px;height:28px;font-size:12px}.layer-action:hover:not(:disabled){background:#e2e8f0}.layer-action:disabled{opacity:.3;cursor:default}.layer-action[data-action=delete]:hover{color:#b91c1c;background:#fee2e2}.prop-group{gap:10px;display:grid}.prop-group+.prop-group{border-top:1px solid #e2e8f0;padding-top:12px}.field{color:#475569;gap:4px;min-width:0;font-size:12px;display:grid}.field output{color:#64748b;font-variant-numeric:tabular-nums}.field input[type=number],.field select,.field textarea{color:#111827;background:#fff;border:1px solid #d1d5db;border-radius:4px;width:100%;padding:6px 8px;font-size:14px}.field textarea{resize:vertical;min-height:52px;font-family:inherit}.field input[type=range],.prop-group>input[type=range]{accent-color:#4f46e5;width:100%}.field input[type=color]{cursor:pointer;background:#fff;border:1px solid #d1d5db;border-radius:4px;width:100%;height:32px;padding:2px}.field-row{grid-template-columns:1fr 1fr;gap:10px;display:grid}.font-upload{flex-wrap:wrap;align-items:center;gap:8px;margin-top:-4px;display:flex}.btn-quiet{color:#4338ca;background:#fff;border:1px solid #c7d2fe}.btn-quiet:hover{background:#eef2ff}.toggle-row{flex-wrap:wrap;align-items:center;gap:6px;display:flex}.segmented{gap:2px;margin-left:auto;display:flex}.toggle{display:inline-flex;position:relative}.toggle input{opacity:0;cursor:pointer;width:100%;height:100%;margin:0;position:absolute}.toggle span{color:#374151;background:#fff;border:1px solid #d1d5db;border-radius:4px;justify-content:center;align-items:center;min-width:34px;height:32px;padding:0 8px;font-size:14px;display:inline-flex}.toggle input:checked+span{color:#fff;background:#4f46e5;border-color:#4f46e5}.toggle input:focus-visible+span{outline-offset:1px;outline:2px solid #a5b4fc}.subgroup{background:#fff;border:1px solid #e2e8f0;border-radius:6px;gap:8px;padding:8px 10px 10px;display:grid}.subgroup legend{color:#374151;padding:0 4px;font-size:13px}.subgroup legend label{cursor:pointer;align-items:center;gap:6px;display:inline-flex}.subgroup input:disabled{opacity:.5}.image-name{color:#475569;overflow-wrap:anywhere;font-size:12px}.position-row{align-items:center;gap:12px;display:flex}.anchor-grid{background:#e2e8f0;border-radius:6px;flex:none;grid-template-rows:repeat(3,26px);grid-template-columns:repeat(3,26px);gap:3px;padding:4px;display:grid}.anchor-grid button{cursor:pointer;background:#fff;border:1px solid #cbd5e1;border-radius:3px;position:relative}.anchor-grid button:after{content:"";background:#cbd5e1;border-radius:50%;position:absolute;inset:8px}.anchor-grid button:hover:after{background:#818cf8}.anchor-grid button[aria-pressed=true]{border-color:#4f46e5}.anchor-grid button[aria-pressed=true]:after{background:#4f46e5}.margin-fields{flex:1;gap:8px;min-width:0;display:grid}@media (pointer:coarse){.field input[type=number],.field select,.field textarea{min-height:44px;font-size:16px}.layer-action{width:40px;height:40px}.toggle span{min-width:44px;height:44px}.anchor-grid{grid-template-rows:repeat(3,36px);grid-template-columns:repeat(3,36px)}}
