@font-face{font-family:Caveat;src:url("fonts/caveat.ttf");font-weight:400 700;font-display:swap}
@font-face{font-family:Manrope;src:url("fonts/manrope-Manrope[wght].ttf");font-weight:200 800;font-display:swap}@font-face{font-family:Oswald;src:url("fonts/oswald-Oswald[wght].ttf");font-weight:200 700;font-display:swap}@font-face{font-family:"Playfair Display";src:url("fonts/playfairdisplay-PlayfairDisplay[wght].ttf");font-weight:400 900;font-display:swap}@font-face{font-family:"Playfair Display";src:url("fonts/playfairdisplay-PlayfairDisplay-Italic[wght].ttf");font-weight:400 900;font-style:italic;font-display:swap}
:root{--bg:#0b0b0b;--panel:#191919;--line:#303030;--paper:#f4f4f4;--muted:#939393;--accent:#ff6300;--lime:#ff6300}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--paper);font:12px Manrope,Arial,sans-serif}button,input,select,textarea{font:inherit;color:inherit}button,a,summary,.upload{cursor:pointer}button{border:1px solid var(--line);background:#202020;border-radius:6px;padding:9px 12px}button:hover,.upload:hover{border-color:#626262}button:disabled{opacity:.35;cursor:not-allowed}button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--accent);outline-offset:3px}a{color:inherit;text-decoration:none}.topbar{height:64px;margin:10px 14px 8px;padding:0 18px;display:flex;align-items:center;gap:24px;background:linear-gradient(120deg,#1c1c1c,#111);border:1px solid #242424;border-radius:10px}.brand{font:700 24px Oswald,Impact,sans-serif;white-space:nowrap;display:flex;align-items:center;gap:5px}.brand b{color:var(--accent)}.brand-icon{position:relative;display:inline-block;width:33px;height:32px;margin-right:16px}.brand-icon:before,.brand-icon:after{content:'';position:absolute;width:21px;height:23px;border:2px solid var(--accent);border-radius:2px}.brand-icon:before{top:0;left:0}.brand-icon:after{top:9px;left:10px}.project-name{display:flex;align-items:center;gap:14px;min-width:0;font-size:11px;color:var(--muted);border-left:1px solid var(--line);padding-left:20px}.project-name strong{color:var(--paper);max-width:170px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.project-name i{font-style:normal}.project-actions{margin-left:auto;display:flex;align-items:center;gap:8px;white-space:nowrap}.primary{background:var(--accent);color:#111;font-weight:800;border-color:var(--accent)}.secondary{background:linear-gradient(#252525,#1c1c1c);border:1px solid var(--line)}.icon-button{background:none;border-color:transparent;font-size:20px;padding:4px 8px}.project-actions .icon-button{font-size:23px}.project-actions .primary,.project-actions .secondary{padding:10px 12px;font-size:10px;display:flex;gap:8px;align-items:center}.upload input{position:absolute;width:1px;height:1px;opacity:0}.upload:focus-within{outline:2px solid var(--accent);outline-offset:3px}.upload{border-radius:6px}.workspace{display:grid;grid-template-columns:132px 260px minmax(280px,1fr) 300px;grid-template-rows:minmax(400px,calc(100dvh - 310px)) 178px auto;gap:10px;margin:0 14px 12px}.toolbox,.library,.viewer,.inspector,.timeline{background:linear-gradient(145deg,#1d1d1d,#151515);border:1px solid #242424;border-radius:12px;min-width:0}.toolbox{padding:12px 8px;display:flex;flex-direction:column}#modules{display:flex;flex-direction:column;gap:5px}#modules button{display:flex;align-items:center;gap:13px;background:transparent;border:1px solid transparent;padding:12px 9px;text-align:left;font-size:11px}#modules button small{font:22px Oswald,sans-serif;width:20px;text-align:center;flex-shrink:0}#modules button.active{background:var(--accent);color:#111;font-weight:800}#modules button:hover:not(.active){background:#252525}.toolbox-note{margin:16px 6px;border-top:1px solid var(--line);padding-top:16px;color:var(--muted);font-size:10px;line-height:1.8}.toolbox-note p{margin:7px 0}.toolbox-note b{background:#303030;border-radius:4px;padding:2px 7px;font-size:9px;font-weight:400}.local-badge{margin:auto 8px 4px;color:var(--muted);font-size:10px}.local-badge:first-letter{color:var(--accent)}h2{font:600 19px Oswald,Arial,sans-serif;margin:0 0 12px}.library{padding:14px;overflow:auto;display:flex;flex-direction:column}.styles{display:grid;grid-template-columns:1fr 1fr;gap:9px}.style-card{height:112px;background:radial-gradient(ellipse at center,#202020,#111);padding:10px 3px;display:flex;flex-direction:column;align-items:center;justify-content:center;border-radius:7px}.style-card.active{border-color:var(--accent);box-shadow:inset 0 0 0 1px #ff630030}.style-card strong{font:700 28px/.98 Oswald,Impact,sans-serif;display:block;transform:rotate(-7deg);letter-spacing:-.8px}.style-card strong span{display:block}.style-card[data-style=clean] strong span{color:var(--accent)}.style-card small{display:block;font-size:10px;color:#b6b6b6;margin-top:12px}.style-card .condensed{font-style:normal}.style-card .serif{font-style:italic}.style-card .outline{-webkit-text-stroke:1px #fff;color:transparent}.style-card .ink{background:var(--accent);color:#0b0b0b;padding:2px 10px;transform:rotate(-7deg) skew(-6deg)}.style-card .neon{color:white;text-shadow:0 0 4px #ff6300,0 0 12px #ff6300,0 0 25px #ff6300}.library-note{margin:18px 0;color:var(--muted);font-size:10px;line-height:1.7}.library-note>span{color:var(--paper);font-weight:600}.import-button{margin-top:auto;width:100%;border-color:var(--accent);display:flex;justify-content:center;gap:16px;align-items:center}.import-button b{font-size:21px;line-height:1}.library>.small{margin-top:10px;text-align:center;font-size:9px;line-height:1.7}.viewer{display:flex;flex-direction:column;padding:10px 12px}.viewer-top{display:flex;gap:10px;align-items:center;height:32px;color:#bcbcbc;font-size:10px}.viewer-top select{width:auto;padding:4px 6px;font-size:10px}.viewer-top .icon-button{margin-left:auto}.preview-area{display:flex;align-items:center;justify-content:center;flex:1;min-height:0;padding:6px 0;overflow:hidden}.stage{aspect-ratio:9/16;height:100%;max-height:100%;max-width:100%;position:relative;background:#0b0b0b;border:1px solid #282828;overflow:hidden}.stage video{width:100%;height:100%;object-fit:contain;display:none}.stage.loaded video{display:block}.stage.loaded #placeholder{display:none}#overlay{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.stage:not(.loaded) #overlay{display:none}#placeholder{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:15px;color:var(--muted)}.empty-icon{width:48px;height:48px;border:1px solid #ff630070;border-radius:12px;font-size:33px;color:var(--accent);line-height:44px}#placeholder h3{font:600 22px Oswald,sans-serif;color:var(--paper);margin:20px 0 6px}#placeholder p{font-size:11px;line-height:1.8}#placeholder .upload{padding:10px 20px;margin:12px 0}#placeholder small{font-size:9px;margin-top:10px}.transport{display:flex;align-items:center;gap:5px;height:38px;border-top:1px solid var(--line);font-size:10px}.transport .icon-button{font-size:15px;padding:5px 7px}.transport #play{font-size:21px}.volume{margin-left:auto;display:flex;align-items:center;gap:8px}.volume input{width:65px}.hint{color:var(--muted);font-size:9px;line-height:1.6;margin:4px 0 0;min-height:15px}.inspector{padding:14px;overflow:auto}.panel-title{border-bottom:1px solid var(--line);margin-bottom:12px}.panel-title h2{margin-bottom:10px}label.field{display:flex;flex-direction:column;gap:6px;color:#bebebe;font-size:10px;margin:12px 0}input,textarea,select{background:#141414;border:1px solid var(--line);padding:8px;border-radius:6px;width:100%}select{color:var(--paper)}textarea{resize:vertical;min-height:55px;line-height:1.6}input[type=color]{height:34px;padding:3px;cursor:pointer}input[type=range]{padding:0;border:0;accent-color:var(--accent);height:14px;cursor:pointer}.row{display:grid;grid-template-columns:1fr 1fr;gap:10px}.choices{display:flex;flex-wrap:wrap;gap:5px;margin:8px 0}.choices button{font-size:10px;padding:7px 9px;background:#151515}.choices button.active{color:var(--accent);border-color:var(--accent);background:#ff630010}.section-label{font-size:9px;letter-spacing:.5px;color:var(--muted);margin:18px 0 9px}.small{font-size:10px;color:var(--muted);line-height:1.7}.panel-action{width:100%;margin-top:10px}.ai-status{color:var(--accent);font-size:9px;letter-spacing:.5px}.ai-intro{font-size:12px;line-height:1.8}.reference-preview{display:none;max-width:100%;max-height:150px;margin-top:10px}.caption-list{max-height:170px;overflow:auto;margin-top:10px}.caption-item{display:flex;gap:4px;border:1px solid var(--line);border-radius:5px;margin-top:5px}.caption-item.active{border-color:var(--accent)}.cue-select{flex:1;text-align:left;border:0;font-size:10px;background:none}.cue-delete{border:0;background:none;color:var(--accent)}.cue-tools{display:flex;gap:6px;margin-top:10px}.cue-tools button{font-size:9px;padding:7px}.export-settings{margin-top:18px;border-top:1px solid var(--line);padding-top:12px;color:var(--muted);font-size:10px}.export-controls{display:grid;gap:10px;margin-top:12px}.export-controls select{margin-top:6px}.timeline{grid-column:1/-1;padding:8px 10px;overflow:hidden}.timeline-top{height:25px;display:flex;align-items:center;gap:16px;font-size:10px;color:var(--muted)}.timeline-top>span:first-child{color:var(--paper)}.timeline-top label{margin-left:auto;display:flex;align-items:center;gap:12px}.timeline-top input{width:100px}.timeline-scroll{overflow-x:auto;overflow-y:hidden;margin-top:4px}.timeline-scroll::-webkit-scrollbar{height:5px}.timeline-scroll::-webkit-scrollbar-thumb{background:#555;border-radius:4px}#timeline-inner{display:grid;grid-template-columns:94px minmax(0,1fr);grid-template-rows:20px 37px 33px 33px;position:relative}.track-label{font-size:10px;color:#bcbcbc;display:flex;align-items:center;gap:12px;background:#1b1b1b;padding-left:7px;border-top:1px solid #2a2a2a;position:sticky;left:0;z-index:2}.ruler-label{border:0;color:var(--muted);font-size:9px}.track-content{position:relative;min-width:0;border-top:1px solid #303030;background:repeating-linear-gradient(90deg,transparent 0,transparent calc(10% - 1px),#ffffff04 calc(10% - 1px),#ffffff04 10%);overflow:hidden}.ruler{border-top:0;cursor:crosshair}.ruler span{position:absolute;font-size:9px;color:var(--muted);top:3px}.clip{position:absolute;top:4px;bottom:4px;min-width:2px;border:1px solid #484848;background:#333;border-radius:4px;padding:2px 8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px;text-align:left}.text-clip{background:#7e2e00;border-color:#a44105;color:white}.text-clip.active{background:var(--accent);color:#111}.video-clip{background:#292929;color:#bababa;display:flex;align-items:center}.caption-clip{background:#333}.caption-clip.active{border-color:var(--accent)}.empty-track{color:#656565;font-size:9px;padding:10px}.video-clip img{height:100%;flex:1;min-width:0;object-fit:cover}.video-clip.has-thumbnails{padding:0;gap:1px}.video-clip.has-thumbnails span{position:absolute;bottom:2px;left:8px;text-shadow:0 1px 3px #000;color:white}#playhead{position:absolute;top:12px;bottom:0;left:94px;width:1px;background:var(--accent);pointer-events:none;z-index:3}#playhead span{position:absolute;top:-5px;left:-4px;width:9px;height:9px;background:var(--accent);border-radius:50%}.statusbar{grid-column:1/-1;display:flex;gap:15px;align-items:center;font-size:9px;color:var(--muted);padding:0 4px;min-height:20px}.version{margin-left:auto;white-space:nowrap;letter-spacing:.7px}#export-progress{color:var(--accent)}#cancel-export{font-size:9px;padding:3px 8px}#message{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);background:#262626;color:white;border:1px solid var(--accent);padding:14px 20px;border-radius:8px;box-shadow:0 10px 40px #0008;z-index:10;display:none;max-width:90vw;line-height:1.7}#message.visible{display:block}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.desktop-mode #download-app{display:none}#stage.dragging{outline:2px solid var(--accent)}::-webkit-scrollbar{width:5px}::-webkit-scrollbar-thumb{background:#494949;border-radius:4px}
@media(min-width:1600px){.workspace{grid-template-columns:150px 300px minmax(280px,1fr) 340px}.style-card{height:135px}.style-card strong{font-size:34px}.topbar{height:70px}.workspace{grid-template-rows:minmax(480px,calc(100dvh - 316px)) 178px auto}}
@media(max-width:1200px){.workspace{grid-template-columns:105px 210px minmax(220px,1fr) 270px;gap:8px}.project-name{display:none}.topbar{gap:12px}.style-card{height:100px}.style-card strong{font-size:26px}#modules button{font-size:10px;gap:7px;padding:10px 4px}.library,.inspector{padding:12px}.library-note{margin:12px 0;font-size:9px}}
@media(max-width:950px){.workspace{grid-template-columns:85px 180px minmax(200px,1fr) 230px;margin:0 8px 8px;gap:6px}.topbar{margin:8px;height:58px;padding:0 12px}.brand{font-size:21px}.brand-icon{margin-right:7px}.project-actions .secondary span{display:none}.windows span{display:none}#modules button{flex-direction:column;gap:3px;font-size:9px;padding:9px 0}.toolbox-note{font-size:9px;margin:15px 0}.style-card{height:95px}.style-card strong{font-size:24px}.library-note{display:none}.inspector{padding:10px}.transport{gap:0}.transport .icon-button{padding:4px}.volume input{width:40px}}
@media(max-width:760px){.topbar{height:auto;min-height:60px;flex-wrap:wrap;padding:12px;gap:10px}.brand{font-size:23px}.project-actions{gap:5px}.project-actions .primary span{display:none}.project-actions .primary,.project-actions .secondary{padding:8px}.project-actions .icon-button{padding:3px;font-size:19px}.workspace{grid-template-columns:1fr;grid-template-rows:none;grid-auto-rows:auto;gap:8px}.toolbox{padding:4px;order:0}#modules{flex-direction:row;justify-content:space-between;gap:0}#modules button{flex:1;padding:8px 2px}.toolbox-note,.local-badge{display:none}.library{order:2;padding:12px;display:block}.styles{grid-template-columns:repeat(6,minmax(88px,1fr));overflow:auto;gap:6px}.style-card{height:98px}.library>.small{display:block}.import-button{margin-top:12px}.viewer{order:1;height:480px}.inspector{order:3;max-height:none}.timeline{order:4;grid-column:1;height:178px}.statusbar{order:5;grid-column:1;flex-wrap:wrap;line-height:1.7}.version{display:none}.volume input{width:70px}.choices button{padding:9px 12px}.row{gap:15px}.library-note{display:none}}
@media(prefers-reduced-motion:no-preference){button{transition:border-color .15s,background-color .15s}}
@media(min-width:761px) and (max-height:850px){.library-note{display:none}.style-card{height:clamp(78px,calc((100dvh - 440px)/3),112px)}.library>.small{font-size:8px;margin-top:7px}.library{padding:12px}.library h2{margin-bottom:8px}.import-button{padding:7px 9px}.inspector label.field{margin:8px 0;gap:5px}.inspector .section-label{margin-top:12px}.inspector .small{font-size:9px;line-height:1.5;margin:8px 0}.inspector textarea{min-height:44px}.inspector .choices button{padding:5px 7px}.inspector .choices{margin:6px 0}.panel-title{margin-bottom:8px}#placeholder .empty-icon{display:none}#placeholder h3{font-size:20px;margin:0 0 5px}#placeholder p{font-size:10px}#placeholder small{font-size:8px}}
.palette{display:flex;gap:7px;align-items:center;margin:8px 0 12px}.palette button{width:20px;height:20px;border-radius:50%;background:var(--swatch);border:1px solid #ffffff30;padding:0;flex-shrink:0}.palette button[aria-pressed=true]{outline:1px solid var(--accent);outline-offset:3px}.palette span{font-size:9px;color:var(--accent);margin-left:auto}.stage:fullscreen{width:100vw!important;height:100dvh!important;border:0}.stage:fullscreen video{object-fit:contain}

#timeline-duration{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.timeline-top label{flex-shrink:0}.toolbox{overflow:hidden}
.viewer:fullscreen{height:100dvh;width:100vw;border-radius:0;background:#111;padding:12px 24px}
#modules button:last-child{order:-1}.toolbox-note{margin-top:8px}.toolbox-note p{margin:3px 0}#modules button{padding-top:9px;padding-bottom:9px}.seek-bar{width:100%;height:6px!important;margin:3px 0 6px}.media-list{display:flex;flex-direction:column;gap:8px}.media-card{display:flex;gap:10px;text-align:left;padding:12px 9px;align-items:center;background:#171717;min-width:0}.media-card.active{border-color:var(--accent);background:#ff630010}.media-card>span:last-child{min-width:0}.media-card strong{display:block;font-size:11px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.media-card small{display:block;font-size:9px;color:var(--muted);margin-top:6px;line-height:1.5}.media-number{font:20px Oswald;color:var(--accent)}.clip-heading{display:flex;flex-direction:column;gap:8px}.clip-heading strong{font-size:12px;word-break:break-word}.clip-heading span{font-size:10px;color:var(--muted)}.edit-tools{margin:10px 0}.edit-tools button{padding:8px 3px;font-size:10px}.mute-choice{display:flex;gap:8px;align-items:center;font-size:11px;margin:17px 0}.mute-choice input{width:14px;accent-color:var(--accent)}.danger{background:#ff630008;border-color:#65311c;color:#ff9454}.relink-note{font-size:11px;color:#ff9454;line-height:1.6}.video-clip{cursor:pointer}.video-clip.active{border:2px solid var(--accent);z-index:1}.timeline-top button{padding:3px 8px;font-size:10px;border-color:#6c3b20;background:#ff63000a}.library .library-note{margin-top:14px}
@media(max-width:760px){#modules button{padding:7px 1px;font-size:8px}#modules button small{font-size:20px}.timeline-top>span:first-child{display:none}.media-list{max-height:240px;overflow:auto}.timeline-top{gap:8px}.timeline-top label{gap:5px}.timeline-top input{width:60px}}
:root{color-scheme:dark}.workspace{grid-template-rows:minmax(400px,calc(100dvh - 358px)) 226px auto}.timeline{padding:8px 10px}.timeline-top{height:27px}.timeline-actions{display:flex;align-items:center;gap:5px;height:38px;overflow-x:auto;white-space:nowrap}.timeline-actions button{font-size:10px;padding:6px 9px;flex-shrink:0}.timeline-actions button[aria-pressed=true]{background:var(--accent);color:#111;border-color:var(--accent)}.timeline-actions i{height:18px;border-left:1px solid var(--line);margin:0 4px}.timeline-actions #shortcut-help{margin-left:auto}.timeline-actions #selection-count{font-size:9px;color:var(--muted);margin-left:6px}#timeline-inner{grid-template-rows:22px 62px 33px 33px}.timeline-scroll{touch-action:pan-y;outline-offset:-2px}.video-clip{touch-action:none;user-select:none;-webkit-user-select:none;padding:6px 16px;overflow:visible;min-width:4px}.video-clip>span:not(.trim-handle){max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none}.video-clip.has-thumbnails{overflow:hidden}.video-clip img{pointer-events:none;user-select:none;-webkit-user-drag:none}.video-clip.has-thumbnails>span:not(.trim-handle){left:16px;right:14px;text-align:left}.trim-handle{position:absolute;top:0;bottom:0;width:14px;background:#19191970;z-index:4;cursor:ew-resize;touch-action:none;border:1px solid #ffffff30;display:flex;align-items:center;justify-content:center}.trim-handle:after{content:'';width:2px;height:20px;border-left:2px solid white;border-right:2px solid white;padding:1px}.trim-handle.start{left:0;border-radius:4px 0 0 4px}.trim-handle.end{right:0;border-radius:0 4px 4px 0}.gesture-active{z-index:8!important;box-shadow:0 2px 16px #0008}.drop-marker{position:absolute;top:0;bottom:0;width:3px;background:var(--accent);z-index:10;pointer-events:none}.gesture-tooltip{position:fixed;background:var(--accent);color:#111;font-size:11px;padding:7px 10px;border-radius:5px;z-index:30;pointer-events:none;transform:translateX(-50%)}.timeline-scroll[data-tool=razor] .video-clip{cursor:crosshair}#stage{transform-origin:center;touch-action:none}#stage[data-tool=hand]{cursor:grab}#stage[data-tool=hand]:active{cursor:grabbing}#selection-outline{position:absolute;border:1px solid var(--accent);pointer-events:none;z-index:3}#selection-outline span{position:absolute;right:-7px;bottom:-7px;width:14px;height:14px;background:var(--accent);border:2px solid #fff;border-radius:50%;pointer-events:auto;cursor:nwse-resize;touch-action:none}#selection-outline[hidden]{display:none}.viewer-top{flex-shrink:0}.preview-area{touch-action:pan-y}.viewer-top select{max-width:145px}.viewer-top #preview-zoom{max-width:110px}dialog{background:#1a1a1a;color:var(--paper);border:1px solid #484848;border-radius:12px;max-width:min(620px,calc(100vw - 24px));max-height:85dvh;padding:20px;box-shadow:0 15px 80px #000a}dialog::backdrop{background:#000a;backdrop-filter:blur(3px)}.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:20px}.dialog-heading button{font-size:22px;background:transparent;border:0;padding:0 8px}.dialog-heading h2{margin:0;font-size:24px}dialog p{font-size:12px;line-height:1.8}.shortcut-grid{display:grid;grid-template-columns:1fr 1.5fr;gap:8px 15px;font-size:11px}.shortcut-grid dt{color:var(--accent)}.shortcut-grid dd{margin:0;color:#d4d4d4}.export-dialog-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:20px}#browser-export-bar{width:100%;height:10px;accent-color:var(--accent)}.platform-install{font-size:10px}.desktop-mode #install-app{display:none}button,[role=button]{-webkit-tap-highlight-color:transparent}
@media(min-width:1600px){.workspace{grid-template-rows:minmax(400px,calc(100dvh - 366px)) 226px auto}}
@media(max-width:1380px){.project-name{display:none}.project-actions{gap:5px}}
@media(max-width:760px){.workspace{grid-template-rows:none;grid-auto-rows:auto}.toolbox{order:0}.viewer{order:1;height:min(40dvh,340px);min-height:290px}.timeline{order:2;height:238px}.inspector{order:3}.library{order:4}.statusbar{order:5}.timeline-actions{height:42px}.timeline-actions button{padding:9px 10px;font-size:10px}#timeline-inner{grid-template-rows:22px 65px 33px 33px}.trim-handle{width:20px}.trim-handle:after{height:26px}.viewer-top #preview-zoom{max-width:88px}.transport{height:40px;flex-shrink:0}.transport .icon-button{padding:7px;font-size:18px}.topbar{padding:10px 12px}.topbar .project-actions .primary,.topbar .project-actions .secondary{min-height:34px;min-width:34px}dialog{padding:16px}.shortcut-grid{grid-template-columns:1fr 1.3fr;font-size:10px}.export-dialog-actions button{min-height:42px}}

.video-clip .trim-handle.start{left:0;right:auto;top:0;bottom:0}.video-clip .trim-handle.end{left:auto;right:0;top:0;bottom:0}

#media-reconnect{display:flex;gap:8px;align-items:center;flex-wrap:wrap;background:#382314;padding:10px;border:1px solid #ff630077;border-radius:6px;margin:0 0 8px}#media-reconnect[hidden]{display:none}#media-reconnect span{flex:1;color:#ddd;font-size:11px;overflow-wrap:anywhere}#media-reconnect strong{font-size:12px}#media-reconnect button{padding:8px}.viewer:has(#media-reconnect:not([hidden])){min-height:370px}

.video-clip .thumbnail-strip{position:absolute;inset:0;overflow:hidden;pointer-events:none}.video-clip .thumbnail-strip img{position:absolute;top:0;height:100%;flex:none;max-width:none;min-width:0;object-fit:contain;background:#111}.timeline-label{z-index:8}

.timeline-zoom-tools{margin-left:auto;display:flex;align-items:center;gap:6px;white-space:nowrap}.timeline-top .timeline-zoom-tools button{padding:5px 9px;font-size:11px}.timeline-zoom-tools label{margin-left:0}.timeline-zoom-tools input{width:100px}#zoom-detail,#frame-position{font-size:10px;color:#ff8a40;white-space:nowrap}.ruler{background-image:linear-gradient(to right,#555 1px,transparent 1px);background-position:left bottom;background-repeat:repeat-x}.timeline-top{overflow-x:auto;flex-shrink:0}@media(max-width:760px){.timeline-top{min-height:48px;height:48px}.timeline{height:254px}.timeline-zoom-tools input{width:65px}.timeline-zoom-tools label{font-size:0}.timeline-zoom-tools label input{font-size:12px}}

.nav-soon{font:normal 8px Arial,sans-serif;color:#bbb;margin-left:auto}.library-note[hidden]{display:none}.caption-item .cue-select{white-space:pre-line}.topbar .project-actions{overflow-x:auto}#browser-profile{overflow-wrap:anywhere}

#project-conflict{margin:8px 14px;padding:10px;background:#382314;border:1px solid #ff630077;display:flex;align-items:center;flex-wrap:wrap;gap:10px}#project-conflict[hidden]{display:none}

/* Media originals and timeline instances are separate entities. */
.source-card{border:1px solid #414141;border-radius:8px;background:#171717;padding:8px;margin-bottom:10px;cursor:grab}.source-card.active{border-color:var(--accent);background:#272019}.source-card:active{cursor:grabbing}.source-preview{display:flex;align-items:center;gap:10px;width:100%;text-align:left;border:0;background:transparent;padding:4px 0}.source-preview>span:last-child{min-width:0}.source-preview strong,.source-preview small{display:block;overflow-wrap:anywhere}.source-preview strong{font-size:12px}.source-preview small{font-size:10px;color:#aaa;margin-top:5px}.source-add{margin-top:8px;width:100%;border-color:#ff630077;background:#292019;font-size:11px;min-height:34px}.media-summary{font-size:11px;color:#aaa;margin-bottom:12px}.source-preview-mode #overlay,.source-preview-mode #selection-outline{visibility:hidden}.library-drop{outline:2px dashed var(--accent);outline-offset:-2px}.library-drop-marker{position:absolute;top:0;bottom:0;width:3px;background:var(--accent);pointer-events:none;z-index:12}.ruler{touch-action:none;cursor:crosshair}.video-clip.active{outline:2px solid var(--accent);outline-offset:-2px}#snapping[aria-pressed=true]{border-color:var(--accent);color:var(--accent)}#viewer-mode{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:40%}button:focus-visible,[tabindex]:focus-visible{outline:2px solid #91bfff;outline-offset:2px}

.source-drag-ghost{position:fixed;z-index:100;pointer-events:none;background:#ff6300;color:#111;padding:8px 12px;border-radius:6px;max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;box-shadow:0 4px 20px #0008;font-size:12px}[data-library-grip]{touch-action:none;cursor:grab}

/* PARALLAX graphite UI. Canvas text/subtitle colors remain project data. */
:root{--bg:#141517;--panel:#1c1e22;--surface:#25282e;--line:#505762;--paper:#f3f4f6;--muted:#b0b6c0;--accent:#ff9a62;--on-accent:#1a1b1e;--focus:#91bfff;--control-border:#7a8390;--lime:#ff9a62}
body{background:var(--bg);color:var(--paper)}.topbar,.toolbox,.library,.viewer,.inspector,.timeline{background:var(--panel);border-color:#363b43}.primary,#modules button.active,.timeline-actions button[aria-pressed=true]{background:var(--accent);color:var(--on-accent);border-color:var(--accent)}button,input,textarea,select{border-color:var(--control-border)}button,.secondary{background:var(--surface);color:var(--paper)}button:hover:not(:disabled){border-color:var(--accent);background:#343941}.primary:hover:not(:disabled){background:#ffb084;color:var(--on-accent)}.icon-button{background:transparent;border-color:transparent}.source-card,.media-card,.choices button,.style-card{background:var(--bg);border-color:#505762}.source-card.active,.media-card.active,.choices button.active{background:#352a24;border-color:var(--accent)}.source-add,.timeline-top button{background:var(--surface);border-color:var(--control-border);color:var(--paper)}input,textarea,select{background:#181a1e}.viewer .preview-area,.stage,.video-clip .thumbnail-strip img{background:#141414}.track-label{background:var(--panel);color:var(--muted)}.hint,.small,.source-preview small,.section-label,.timeline-top,.export-settings{color:var(--muted)}.text-clip{background:#47332a;border-color:#a96b48;color:#fff}.text-clip.active{background:var(--accent);color:var(--on-accent)}.caption-clip{background:#303b49;color:#f3f4f6;border-color:#7a8390}.caption-clip.active{border:2px solid var(--accent)}.video-clip.active{border-color:var(--accent)}.danger,.relink-note{color:#ffb084}.danger{background:#30251f;border-color:#b77c5b}.choices button.active,#frame-position,#zoom-detail,#export-progress,.media-number,.brand b{color:var(--accent)}#snapping[aria-pressed=true]{color:var(--on-accent)}button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,[tabindex]:focus-visible,.upload:focus-within{outline:2px solid var(--focus);outline-offset:2px}.style-card canvas{display:block;width:100%;height:80px}.style-card small{margin-top:2px;color:var(--muted)}.preset-heading{display:flex;justify-content:space-between;align-items:center;margin-top:20px}.preset-heading h3{font-size:13px}.saved-presets{display:grid;gap:8px}.saved-preset{padding:5px 8px;display:flex;flex-direction:column;align-items:center;font-size:11px;background:var(--bg)}.saved-preset canvas{width:100%;height:60px}.saved-preset.active,.text-block-list button.active{border-color:var(--accent);background:#352a24}.preset-tools{margin-top:18px;border-top:1px solid var(--line);padding-top:12px}.preset-tools summary{font-size:12px}.preset-tools>button{margin-top:8px;width:100%}.text-block-list{display:grid;gap:5px;max-height:170px;overflow:auto;margin:12px 0}.text-block-list button{padding:8px;text-align:left;font-size:11px;overflow-wrap:anywhere}.check-field{display:flex;gap:8px;align-items:center;color:var(--paper);font-size:11px;margin:12px 0}.check-field input{width:16px;height:16px;accent-color:var(--accent)}.caption-list{max-height:300px}.caption-item{display:grid;grid-template-columns:1fr 30px;padding:8px;gap:6px;background:var(--bg)}.caption-item textarea,.caption-item>.row{grid-column:1/-1}.caption-item textarea{font-size:12px;white-space:pre-wrap;min-height:64px}.caption-item label{font-size:10px;color:var(--muted)}.caption-item input{margin-top:4px;font-size:11px}.caption-item.active{border-color:var(--accent)}.text-clip,.caption-clip{touch-action:none;padding-left:14px;padding-right:14px}.text-clip>span:first-child,.caption-clip>span:first-child{pointer-events:none;white-space:pre}.content-handle{position:absolute;top:0;bottom:0;width:10px;z-index:2;cursor:ew-resize;background:#ffffff14}.content-handle:after{content:'';position:absolute;top:5px;bottom:5px;left:4px;width:1px;background:#ffffffa0}.content-handle.start{left:0}.content-handle.end{right:0}#timeline-inner{grid-template-rows:22px 62px var(--text-track-height,34px) 34px}.timeline-scroll{height:calc(100% - 70px);overflow-y:auto}.timeline{min-height:260px}#message,dialog{background:var(--panel);color:var(--paper)}#media-reconnect,#project-conflict{background:#352a24;border-color:#b77c5b}.source-drag-ghost,.gesture-tooltip{background:var(--accent);color:var(--on-accent)}
@media(min-width:761px){.workspace{grid-template-rows:minmax(400px,calc(100dvh - 392px)) 270px auto}}
@media(max-width:760px){.workspace{grid-template-rows:none}.timeline{height:280px}.style-card canvas{height:65px}.saved-presets{display:flex;overflow:auto}.saved-preset{min-width:150px}.caption-list{max-height:360px}.timeline-scroll{height:calc(100% - 90px)}.content-handle{width:14px}.content-handle:after{left:6px}.text-block-list{max-height:210px}}

.source-card,.media-card,.choices button,.style-card{border-color:var(--control-border)}label.field{font-size:11px}.section-label{font-size:10px}.preset-tools summary{color:var(--paper)}

.build-badge{font:600 10px Manrope,sans-serif;color:var(--muted);border:1px solid var(--line);padding:3px 5px;border-radius:4px;margin-left:8px}#editor-update{margin:8px 14px;background:var(--surface);border:1px solid var(--focus);padding:10px;display:flex;gap:14px;align-items:center}#editor-update[hidden]{display:none}
#frame-position{display:inline-flex;align-items:center;justify-content:center;flex:0 0 16ch;inline-size:16ch;min-inline-size:16ch;max-inline-size:16ch;overflow:hidden;font-variant-numeric:tabular-nums;font-feature-settings:"tnum";font-family:ui-monospace,Consolas,monospace}
.brand-heading{display:flex;justify-content:space-between;font:600 15px Oswald,sans-serif}.brand-heading small{color:var(--muted)}.brand-card{height:144px;min-width:0;padding:4px 6px}.brand-card canvas{width:100%;height:78px;object-fit:contain}.brand-card small{font-size:10px;line-height:1.25;min-height:28px;white-space:normal}.brand-card em{font-size:9px;color:var(--accent);font-style:normal}.basic-styles,.reference-styles{margin:16px 0;font-size:11px}.basic-styles>summary,.reference-styles>summary{padding:10px 0;color:var(--muted)}.reference-styles>div{padding:10px;border:1px solid var(--line);border-radius:6px;margin:6px 0}.reference-styles p{font-size:10px;color:var(--muted);line-height:1.5}
.style-guide{font-size:10px;color:var(--muted);margin:10px 0}.style-search{display:block;font-size:10px;color:var(--muted);margin-bottom:12px}.style-search input{width:100%;margin-top:5px;padding:8px}.brand-card[hidden]{display:none}
.fx-tools{border:1px solid var(--line);padding:10px;border-radius:8px;margin:12px 0}.fx-tools h3{font-size:13px}.fx-tools>button{width:100%;margin:5px 0}#fx-status{font-size:11px;line-height:1.5;color:var(--muted)}#fx-guide{position:absolute;inset:0;z-index:5;pointer-events:none}#fx-guide svg{width:100%;height:100%;overflow:visible}#fx-guide polygon{fill:#ff9a6215;stroke:#ff9a62;stroke-width:3;stroke-dasharray:8 5}#fx-guide circle{fill:#ff9a62;stroke:#141517;stroke-width:2}#fx-guide text{fill:#ff9a62;stroke:#141517;stroke-width:1;font:bold 30px sans-serif}
@font-face{font-family:"Cormorant Garamond";src:url("fonts/cormorant-regular.ttf");font-weight:300 700;font-display:swap}@font-face{font-family:"Cormorant Garamond";src:url("fonts/cormorant-italic.ttf");font-weight:300 700;font-style:italic;font-display:swap}
#fx-guide svg{position:absolute;inset:0}#fx-guide polygon{vector-effect:non-scaling-stroke;stroke-width:1.5}#fx-guide>span{position:absolute;transform:translate(-50%,-50%);min-width:18px;height:18px;line-height:16px;border:1px solid var(--accent);border-radius:50%;font-size:11px;font-weight:700;text-align:center;background:#141517;color:var(--accent)}.fx-track-state{font-size:11px;color:var(--paper);line-height:1.5}

/* User-selected 0.14 palette: black/burgundy surfaces, neon yellow actions. */
:root{--bg:#090407;--panel:#1b0b13;--surface:#2b111e;--line:#583141;--paper:#fff7fb;--muted:#cfb7c2;--accent:#f3ff00;--on-accent:#160810;--focus:#f3ff00;--control-border:#815061;--lime:#f3ff00}
body{background:radial-gradient(ellipse at top right,#290a1a 0,transparent 65%),var(--bg)}
.topbar{background:linear-gradient(110deg,#300d1e,#13070d);border-color:var(--line)}
.toolbox,.library,.viewer,.inspector,.timeline{background:linear-gradient(140deg,#270e1b,#160911);border-color:var(--line)}
button,.secondary,summary,.upload{border-color:var(--control-border)}
button{background:#301021}.primary,.import-button,.source-add,.project-actions .secondary,.project-actions .upload,.panel-action,.timeline-actions>button:not(.icon-button){background:var(--accent);color:var(--on-accent);border-color:var(--accent);font-weight:700}
.primary:hover,.import-button:hover,.source-add:hover,.project-actions .secondary:hover,.panel-action:hover,.timeline-actions>button:hover{background:#fbff72;color:#160810;box-shadow:0 0 16px #f3ff0020}
#modules button.active,.choices button.active,.timeline-actions button[aria-pressed=true]{background:var(--accent);color:var(--on-accent);border-color:var(--accent);box-shadow:0 0 14px #f3ff0020}
#modules button:hover:not(.active){background:#391226;color:var(--paper)}
input,textarea,select{background:#13080f;border-color:var(--control-border)}
.source-card,.media-card,.text-block-list button,.saved-preset,.caption-item{background:#210b17}.source-card.active,.media-card.active,.saved-preset.active,.text-block-list button.active{background:#401229;border-color:var(--accent)}
.choices button{background:#2b101e}.style-card,.brand-card{background:#160a11;color:var(--paper)}.style-card.active{border-color:var(--accent);box-shadow:inset 0 0 0 1px #f3ff0050}
.track-label{background:#200c17}.track-content{border-color:#4a2334}.text-clip,.caption-clip{background:#641b3e;border-color:#9c3c66;color:#fff7fb}.text-clip.active,.caption-clip.active{background:var(--accent);color:var(--on-accent);border-color:var(--accent)}
#media-reconnect,#project-conflict{background:#3a1025;border-color:var(--accent)}#fx-guide polygon{fill:#f3ff0015;stroke:var(--accent)}.stage,.preview-area{background:#100c0f}
.speech-tools{padding:12px 0 16px;border-bottom:1px solid var(--line);margin-bottom:16px}.speech-tools h3{font-size:16px;margin:0 0 8px}.speech-tools button{width:100%;margin:6px 0;min-height:38px}.speech-error{padding:10px;border:1px solid var(--accent);color:var(--paper);font-size:12px;overflow-wrap:anywhere}#speech-dialog{width:min(460px,90vw);background:var(--panel);border:1px solid var(--line);color:var(--paper)}#speech-progress{width:100%;accent-color:var(--accent)}#speech-phase{overflow-wrap:anywhere;min-height:3em;font-variant-numeric:tabular-nums}#caption-scope{border-color:var(--accent)}#reset-style{width:100%;margin:12px 0;font-size:11px}.timeline-actions button[aria-pressed=true]{outline:2px solid var(--paper);outline-offset:2px}.caption-item:has(textarea:focus){border-color:var(--accent)}
.brand-card.active{background:#401229}#modules .future-tool{display:none}#modules.show-future .future-tool{display:flex}#toggle-future-tools{width:100%;font-size:10px;padding:8px 5px;white-space:normal}#modules{justify-content:flex-start}
@media(max-width:760px){.project-actions{flex-wrap:wrap;width:100%;overflow:visible;gap:6px}.project-actions #save span,.project-actions #export span{display:inline;font-size:10px}#download-app{display:none}.viewer{height:min(50dvh,430px);min-height:350px}.speech-tools .panel-action{min-height:44px}}

/* Reels risk guide: DOM only; excluded from rendered/exported frames. */
.safe-zone-toggle{display:flex;align-items:center;gap:5px;white-space:nowrap;margin-left:auto;font-size:10px;color:#abf58e;cursor:pointer}.safe-zone-toggle input{width:15px;height:15px;margin:0;accent-color:#83ed56}.viewer-top:has(.safe-zone-toggle){height:auto;min-height:32px;flex-wrap:wrap}.viewer-top .safe-zone-toggle~.icon-button{margin-left:0}
#safe-zone-guide{position:absolute;inset:0;z-index:4;pointer-events:none;user-select:none;overflow:hidden}#safe-zone-guide[hidden]{display:none}.safe-zone{position:absolute;display:flex;align-items:center;justify-content:center;text-align:center;background:#67ef372b;border:1px solid #83ed5680;color:#b7ff93;font:600 clamp(7px,1.1vh,10px)/1.2 Manrope,Arial,sans-serif;text-shadow:0 1px 2px #000,0 0 3px #000;padding:2px}.safe-zone-left,.safe-zone-right,.safe-zone-icons{writing-mode:vertical-rl}.safe-zone-left{transform:rotate(180deg)}.safe-zone-bottom{align-items:flex-start;padding-top:6px}.safe-zone-note,.safe-zone-warning{flex-shrink:0;margin:3px 0;font-size:10px;line-height:1.45;overflow-wrap:anywhere}.safe-zone-note{color:#b1dc9e}.safe-zone-warning{color:#e1ffce;background:#25401d;border:1px solid #6eaa51;border-radius:4px;padding:4px 6px}.safe-zone-note[hidden],.safe-zone-warning[hidden]{display:none}

.safe-zone-notices{position:relative;flex-shrink:0;min-height:34px}.safe-zone-notices:has(#safe-zone-warning:not([hidden])) #safe-zone-note{visibility:hidden}.safe-zone-warning{position:absolute;top:0;left:0;right:0}#placeholder .empty-icon{display:none}#placeholder h3{font-size:16px;margin:6px 0}#placeholder p{font-size:10px;line-height:1.5}#placeholder .upload{padding:7px 9px;margin:7px 0}#placeholder small{font-size:8px;margin-top:5px}

.typography-tools{margin:14px 0;padding:12px;border:1px solid var(--line);border-radius:8px;background:#190d16}.typography-tools h3{margin:0;font-size:14px}.typography-sample{padding:10px;font-size:22px;text-align:center;background:#100c0f;border-radius:5px}.typography-sample em{color:var(--accent)}
/* Compact controls keep their hit area and accessible names on every screen. */
.timeline-actions .timeline-icon,.timeline-top .timeline-icon{display:inline-flex;align-items:center;justify-content:center;flex:0 0 36px;width:36px;height:36px;padding:7px;position:relative}.timeline-icon svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}.timeline-actions{gap:6px}.timeline-zoom-tools{gap:6px}.timeline-icon[aria-pressed=true]{box-shadow:inset 0 0 0 2px currentColor}.timeline-zoom-tools>label{font-size:0}.timeline-zoom-tools>label input{font-size:12px}#frame-position{min-width:9ch;flex:0 0 9ch;font-variant-numeric:tabular-nums;white-space:nowrap;text-align:center}#timeline-tooltip{position:fixed;z-index:10000;max-width:min(330px,calc(100vw - 16px));padding:7px 10px;border:1px solid #6c4657;border-radius:6px;background:#23131d;color:#fff8fc;box-shadow:0 4px 18px #0009;font:12px/1.4 Manrope,sans-serif;pointer-events:none}#timeline-tooltip[hidden]{display:none}.compositing-tools{padding:10px 12px;margin:12px 0;border:1px solid var(--line);border-radius:8px}.compositing-tools h3{margin:0 0 8px;font-size:14px}.typography-tools output{display:block;font-variant-numeric:tabular-nums;text-align:right;font-size:11px}.typography-tools input[type=range]{width:100%}@media(pointer:coarse){.timeline-actions .timeline-icon,.timeline-top .timeline-icon{width:44px;height:44px;flex-basis:44px}.timeline-actions{flex-wrap:wrap}}

/* Overlay tracks appear above their source video. */
#timeline-inner{grid-template-rows:22px var(--text-track-height,34px) 34px 62px}
@media(max-width:650px){.timeline-actions{flex-wrap:wrap;overflow:visible}.timeline-actions .timeline-icon,.timeline-top .timeline-icon{width:44px;height:44px;flex-basis:44px}.timeline{overflow:visible}.timeline-actions #shortcut-help{margin-left:0}.timeline-top{flex-wrap:wrap}.timeline-top #timeline-duration{white-space:normal;flex:1 1 100%}}
@media(max-width:650px){.timeline-actions{height:auto;min-height:44px;align-content:flex-start}.timeline{height:auto;min-height:300px}}

/* The hit target is larger than the visible grip; it always edits the layer. */
#selection-outline span{right:-14px;bottom:-14px;width:28px;height:28px;border:0;background:transparent;display:grid;place-items:center}#selection-outline span:after{content:'';width:13px;height:13px;border:2px solid #fff;background:var(--accent);border-radius:50%;box-shadow:0 1px 5px #0009;pointer-events:none}@media(pointer:coarse){#selection-outline span{width:40px;height:40px;right:-20px;bottom:-20px}#selection-outline span:after{width:17px;height:17px}}

.source-heading{display:flex;align-items:flex-start;gap:8px}.source-heading .source-preview{flex:1;min-width:0}.source-remove{flex:0 0 36px;min-width:36px;min-height:36px;padding:7px;border-radius:8px;color:var(--muted);touch-action:manipulation}.source-remove svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.source-remove:hover{color:var(--paper);border-color:var(--accent)}
