:root{color-scheme:dark;--bg:#0b0c10;--panel:#161920;--card:#20242d;--edge:#30353e;--muted:#9aa4b3;--cyan:#08c5d3;--gold:#f9cf53;--red:#fb5268;--mint:#46d4a1;--txt:#f3f4f6}*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:var(--bg);color:var(--txt);font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;font-size:14px;overscroll-behavior:none}button,input,select,textarea{font:inherit}button{cursor:pointer;background:transparent;color:inherit;border:0;touch-action:manipulation}button:active{filter:brightness(1.25)}button:disabled{opacity:.35;cursor:not-allowed}#app{height:100%;height:100dvh;display:flex;flex-direction:column;padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom);min-height:0}.app-header{height:53px;min-height:53px;display:flex;align-items:center;justify-content:space-between;background:#11141a;padding:0 13px;border-bottom:1px solid #242832;gap:5px}.brand{display:flex;align-items:center;gap:9px;min-width:0}.logo{width:32px;height:32px;background:linear-gradient(135deg,#0be0e2,#035d80);border-radius:9px;text-align:center;font-weight:950;font-size:20px;line-height:32px;color:#101820}.logo span{color:#fff}.brand b{font-size:14px;letter-spacing:.7px;white-space:nowrap}.brand small{display:block;font-size:9px;color:var(--muted);letter-spacing:1px;margin-top:2px}.header-actions{display:flex;align-items:center;gap:2px}.icon-btn{min-width:31px;height:32px;border-radius:8px;color:#d5dae4;font-size:24px}.export-btn{background:var(--cyan);color:#08242b;font-weight:800;border-radius:9px;padding:9px 12px;white-space:nowrap;font-size:12px}.preview-area{flex:1;min-height:190px;display:flex;flex-direction:column;align-items:center;overflow:hidden;background:radial-gradient(ellipse at 50% 40%,#252a36,#0b0d12 65%)}.preview-title{width:100%;padding:9px 13px 5px;display:flex;justify-content:space-between;align-items:center;color:#9ca6b4;font-size:10px;letter-spacing:.6px}.ready-dot{display:inline-block;width:5px;height:5px;border-radius:50%;background:var(--mint)}.preview-canvas-wrap{position:relative;flex:1;min-height:0;display:flex;align-items:center;justify-content:center;width:100%}#preview{height:100%;max-height:100%;max-width:100%;aspect-ratio:9/16;object-fit:contain;display:block;touch-action:none;box-shadow:0 0 22px #000a;background:#10151b}.transport{min-height:44px;height:44px;width:100%;display:flex;align-items:center;justify-content:center;gap:12px;padding:4px 10px}.transport button{font-size:16px;color:#d5dbe6;height:30px;min-width:30px}.transport .play-btn{font-size:20px;background:#d9eef4;color:#162331;width:34px;height:34px;border-radius:100%}.timecode{font-size:11px;color:#a9b6c5;font-variant-numeric:tabular-nums;margin-left:8px;white-space:nowrap}.timeline-area{flex:0 0 216px;background:#12151b;border-top:1px solid #2b303a;border-bottom:1px solid #2b303a;display:flex;flex-direction:column;min-height:0}.timeline-top{min-height:39px;display:flex;align-items:center;justify-content:space-between;padding:4px 11px;gap:5px}.timeline-label{min-width:0}.timeline-label b{font-size:11px;letter-spacing:1px}.timeline-label small{display:block;font-size:10px;color:var(--muted);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;max-width:160px}.timeline-tools{display:flex;align-items:center;gap:3px}.timeline-tools button{border:1px solid #343b45;border-radius:7px;padding:4px 7px;font-weight:bold}.timeline-tools span{font-size:10px;color:var(--muted);white-space:nowrap}.timeline-tools .split-btn{color:#172127;background:var(--gold);margin-left:4px;padding:6px 8px}.timeline-shell{position:relative;flex:1;min-height:0}.timeline-viewport{height:100%;width:100%;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;touch-action:pan-x;overscroll-behavior-x:contain}.timeline-viewport::-webkit-scrollbar{display:none}.timeline-content{height:100%;position:relative;min-width:100%}.ruler{height:24px;position:relative;background:#191c24;touch-action:pan-x}.tick{position:absolute;top:4px;height:11px;border-left:1px solid #77818d;color:#a1adbb;font-size:9px;white-space:nowrap;padding-left:4px}.tick.sub{height:6px;top:15px;border-color:#414954}.tl-track{position:relative;height:32px;border-bottom:1px solid #282c35;background:repeating-linear-gradient(90deg,#171a20,#171a20 36px,#191c23 37px);}.video-track{height:47px}.overlay-track{height:26px}.audio-track{height:31px}.tl-clip{position:absolute;top:4px;height:calc(100% - 7px);border-radius:6px;border:1px solid #fff2;overflow:hidden;display:flex;align-items:center;justify-content:center;white-space:nowrap;touch-action:none;user-select:none;-webkit-user-select:none}.tl-clip video{display:none}.tl-clip.is-selected{outline:2px solid #fff;outline-offset:-1px;z-index:10}.tl-clip .clip-inner{display:flex;align-items:center;justify-content:center;gap:4px;padding:0 10px;font-size:10px;font-weight:700;pointer-events:none;overflow:hidden;text-overflow:ellipsis;flex:1}.tl-clip.video-c{background:linear-gradient(90deg,#176e99b8,#265783bf),var(--clip-thumb,linear-gradient(90deg,#173c50,#3786ab));background-blend-mode:multiply;color:white}.tl-clip.text-c{background:#a4812f;color:#fff}.tl-clip.sticker-c{background:#a33349;color:#fff}.tl-clip.audio-c{background:#197e65;color:#fff}.trim-handle{position:absolute;top:0;bottom:0;width:13px;background:#e9edf2;z-index:20;display:flex;align-items:center;justify-content:center;cursor:ew-resize;color:#4b5360;touch-action:none;font-size:10px}.trim-handle::after{content:"";height:13px;border-left:2px solid #5b6470}.trim-handle.left{left:0;border-radius:5px 0 0 5px}.trim-handle.right{right:0;border-radius:0 5px 5px 0}.tl-clip:not(.is-selected) .trim-handle{display:none}.fixed-playhead{pointer-events:none;position:absolute;top:0;bottom:0;left:50%;z-index:15;border-left:2px solid #f9f9fc;filter:drop-shadow(0 0 2px #000);transform:translateX(-1px)}.fixed-playhead span{position:absolute;top:-1px;left:-6px;border-top:10px solid #f8f8fb;border-left:6px solid transparent;border-right:6px solid transparent}.track-legend{height:25px;min-height:25px;padding:5px 11px;display:flex;gap:13px;align-items:center;overflow:hidden}.track-legend span{font-size:9px;color:#8f9baa;white-space:nowrap;display:flex;align-items:center;gap:4px}.track-legend i{height:6px;width:6px;border-radius:2px}.drag-hint{margin-left:auto}.bottom-studio{flex:0 0 156px;min-height:0;background:#171a22;display:flex;flex-direction:column}.tool-nav{height:61px;min-height:61px;display:flex;gap:1px;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;border-bottom:1px solid #303642;padding:2px 6px;touch-action:pan-x}.tool-nav::-webkit-scrollbar{display:none}.tool-tab{min-width:67px;flex:0 0 67px;height:56px;display:flex;flex-direction:column;gap:4px;align-items:center;justify-content:center;color:#aeb5bf;font-size:11px;border-bottom:3px solid transparent}.tool-tab span{font-size:21px;line-height:22px}.tool-tab.active{color:#05d0df;border-bottom-color:var(--cyan)}.tool-content{flex:1;min-height:0;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;touch-action:pan-x}.tool-content::-webkit-scrollbar{display:none}.tool-strip{height:100%;display:flex;align-items:stretch;gap:8px;padding:10px 12px;min-width:max-content}.tool-btn{min-width:78px;max-width:134px;background:#242936;border:1px solid #343b4c;border-radius:12px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:5px 10px;text-align:center;font-size:11px;color:#e8ecf2}.tool-btn .b-icon{font-size:22px;line-height:24px;color:#41d4e0}.tool-btn.strong{background:#07555d;border-color:#0e9aab}.tool-btn.red .b-icon{color:var(--red)}.tool-btn.gold .b-icon{color:var(--gold)}.tool-btn.green .b-icon{color:var(--mint)}.tool-btn:disabled{opacity:.3}.preview-caption{display:flex;align-items:center;color:#acb4c4;font-size:11px;padding:0 9px;max-width:220px;white-space:normal}.import-progress{position:absolute;inset:15%;background:#111b26ec;z-index:12;border-radius:16px;border:1px solid #3e6674;display:flex;align-items:center;justify-content:center;gap:10px;flex-direction:column;padding:20px;text-align:center}.import-progress small{color:#acbeca;font-size:11px}.progress-line{width:100%;height:5px;background:#273e4a;border-radius:4px;overflow:hidden}.progress-line span{display:block;height:100%;width:40%;background:var(--cyan);animation:indeterminate 1.2s ease-in-out infinite}@keyframes indeterminate{0%{transform:translateX(-120%)}100%{transform:translateX(270%)}}.spin{border:3px solid #47616a;border-top-color:var(--cyan);border-radius:50%;width:29px;height:29px;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.sheet-backdrop{position:fixed;inset:0;background:#000a;z-index:70}.sheet{position:fixed;left:0;right:0;bottom:0;z-index:71;background:#1c2029;border:1px solid #3b424f;border-radius:18px 18px 0 0;max-height:76dvh;min-height:230px;padding-bottom:calc(8px + env(safe-area-inset-bottom));display:flex;flex-direction:column;box-shadow:0 -10px 40px #0008}.sheet-grip{width:42px;height:5px;background:#556071;border-radius:3px;margin:8px auto 4px}.sheet-heading{display:flex;align-items:center;justify-content:space-between;padding:4px 16px 10px;border-bottom:1px solid #373d49}.sheet-heading strong{font-size:16px}.sheet-body{overflow-y:auto;overscroll-behavior:contain;padding:13px 16px 30px;display:grid;gap:12px}.sheet-body label{display:grid;gap:6px;font-size:12px;color:#cdd5dd}.sheet-body input:not([type=color]):not([type=range]),.sheet-body select,.sheet-body textarea{width:100%;background:#131720;color:white;border:1px solid #43505c;border-radius:9px;padding:11px 9px;min-height:40px}.sheet-body input[type=range]{accent-color:var(--cyan);width:100%}.sheet-body input[type=color]{width:100%;height:40px;background:#222;border:1px solid #444;border-radius:6px}.setting-grid{display:grid;grid-template-columns:1fr 1fr;gap:11px}.sheet-actions{display:flex;gap:8px;flex-wrap:wrap}.sheet-actions button,.sheet-body .action{background:#2f3948;padding:10px 14px;border-radius:9px;font-weight:650}.sheet-actions button.primary,.sheet-body .action.primary{background:var(--cyan);color:#091921}.sheet-actions button.warn{background:#6b2931;color:#fff}.sheet-note{color:#a6b5c4;font-size:11px;line-height:1.5}.button-row{display:flex;gap:8px;align-items:center}.check-row{display:flex;gap:8px;align-items:center}.toast{position:fixed;z-index:110;left:50%;bottom:calc(16px + env(safe-area-inset-bottom));transform:translateX(-50%);max-width:calc(100vw - 30px);min-width:170px;background:#263942;padding:11px 18px;border:1px solid #356b74;border-radius:13px;font-size:12px;text-align:center;opacity:0;pointer-events:none;transition:opacity .2s}.toast.show{opacity:1}.export-overlay{position:fixed;inset:0;z-index:90;background:#06090de9;display:flex;align-items:center;justify-content:center;padding:24px}.export-card{width:min(360px,100%);background:#252b35;border:1px solid #48515c;padding:30px;border-radius:18px;display:flex;flex-direction:column;align-items:center;gap:12px;text-align:center}.export-card p{font-size:13px;color:#b8c4cf}.export-meter{height:7px;background:#3b4452;width:100%;border-radius:8px;overflow:hidden}.export-meter>div{height:100%;width:0;background:var(--cyan);transition:width .15s}.flat.danger{background:#522b35;padding:10px 20px;border-radius:8px}.export-overlay[hidden],.sheet[hidden],.sheet-backdrop[hidden],.import-progress[hidden],.drop-target[hidden]{display:none!important}input[type=file]{display:none}.mini-pill{display:inline-block;border-radius:6px;background:#293741;padding:5px 8px;color:#8fe5ef;font-size:11px}
@media(max-height:790px){.app-header{height:45px;min-height:45px}.timeline-area{flex-basis:187px}.bottom-studio{flex-basis:143px}.tool-nav{height:55px;min-height:55px}.tool-tab{height:50px}.preview-title{padding:3px 12px}.transport{height:35px;min-height:35px}.timeline-top{min-height:32px}.track-legend{height:19px;min-height:19px}}@media(max-height:690px){.app-header{height:41px;min-height:41px}.timeline-area{flex-basis:160px}.bottom-studio{flex-basis:125px}.tool-nav{height:47px;min-height:47px}.tool-tab{height:43px}.preview-title{display:none}.transport{height:32px;min-height:32px}.timeline-top{min-height:27px}.track-legend{display:none}}@media(min-width:800px){#app{max-width:1400px;margin:auto}.preview-area{flex:1}.preview-canvas-wrap{min-height:0}.timeline-area{flex:0 0 235px}.bottom-studio{flex:0 0 156px}.tool-btn{min-width:105px}.sheet{left:50%;right:auto;transform:translateX(-50%);width:min(560px,94vw);border-radius:18px 18px 0 0}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;animation-duration:.01s!important}}

/* Large touch target for moving the playhead itself. */
.fixed-playhead span{pointer-events:auto;touch-action:none;cursor:ew-resize;width:28px;height:28px;top:-6px;left:-15px;border:0;background:transparent;filter:drop-shadow(0 1px 2px #000)}.fixed-playhead span:before{content:"";position:absolute;left:8px;top:3px;border-top:12px solid #fff;border-left:6px solid transparent;border-right:6px solid transparent}
