/* TrailCut v2.6 — the PHONE editor layout (body.tcMob: touch phone, portrait or landscape, editor screen only).
   Computers never get body.tcMob, so nothing here can change the computer editor. */
body.tcMob[data-route="editor"]{overflow:hidden;overscroll-behavior:none}
body.tcMob[data-route="editor"] header.appbar,body.tcMob[data-route="editor"] .tabbar,body.tcMob[data-route="editor"] .siteFoot{display:none!important}
body.tcMob[data-route="editor"] main.wrap{padding:0!important;margin:0!important;max-width:none!important;z-index:auto!important}
body.tcMob #scrEditor{margin:0;padding:0}
/* the whole editor = the visible screen (dvh follows Safari's bars), nothing scrolls except inside the timeline/tool panel */
body.tcMob .ed{position:fixed;inset:0;margin:0!important;padding:calc(6px + env(safe-area-inset-top,0px)) max(8px,env(safe-area-inset-right,0px)) 0 max(8px,env(safe-area-inset-left,0px));
  height:100dvh;box-sizing:border-box;gap:6px!important;z-index:30;background:var(--bg,#081827);
  display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:auto auto minmax(0,1fr) auto auto auto!important;
  grid-template-areas:"top" "tabs" "center" "tl" "dock" "bar"!important}
body.tcMob .ed>.edRail{display:none!important}
body.tcMob .ed>.edTop{grid-area:top;flex-wrap:nowrap;gap:6px;min-height:40px}
body.tcMob .ed>.edTabs{grid-area:tabs;flex-wrap:nowrap;gap:6px;min-height:0}
body.tcMob .ed>.edCenter{grid-area:center;min-height:0;gap:4px}
body.tcMob .ed>#edTl{grid-area:tl;min-width:0;padding:0;gap:0}
body.tcMob .ed>#edPanel,body.tcMob .ed>#edInsp{grid-area:dock}
body.tcMob .ed>#mBar{grid-area:bar}
/* --- top bar: ‹ Projects · name · saved · Export --- */
.mobBack{display:none}
body.tcMob .mobBack{display:inline-flex;align-items:center;gap:2px;flex:none;min-height:40px;padding:0 8px 0 2px;border-radius:10px;color:var(--fg);text-decoration:none;font-weight:700;font-size:14px}
body.tcMob .mobBack svg{width:22px;height:22px}
body.tcMob .edTop #edMagic,body.tcMob .edTop #edProj,body.tcMob .edTop #edRedo,body.tcMob .edTop #edHist,body.tcMob .edTop #edUndo,body.tcMob .edTop .fmt{display:none!important}
body.tcMob .edTop .edName{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:6px}
body.tcMob .edTop .edName input{min-width:0;flex:1 1 auto;font-size:16px;padding:6px 8px}
body.tcMob .edTop .saveSt{flex:none;font-size:12px}
body.tcMob .edTop .edTopBtns{flex:none;gap:6px}
body.tcMob .edTop #edExport{min-height:40px;padding:0 16px;font-size:15px}
/* --- Movie: the timeline tabs row and its big "+ Add" tile are replaced by the tool bar's Add --- */
body.tcMob .ed[data-aspect="16:9"]>.edTabs{display:none}
body.tcMob .ed>.edTabs>*{flex:none}
/* --- preview: as big as the space allows, never covered --- */
body.tcMob .edCenter>.vTabs{display:none}
body.tcMob .edCenter #mvStrip{display:none!important}
body.tcMob .stage{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;gap:4px;padding:0!important;margin:0}
body.tcMob #edShortView{display:flex!important;flex-direction:column;flex:1 1 auto;min-height:0}
body.tcMob .pvWrap{flex:1 1 auto;min-height:0;width:100%!important;height:auto!important;max-width:none!important;display:flex;align-items:center;justify-content:center;background:#000;border-radius:12px;overflow:hidden;aspect-ratio:auto!important}
body.tcMob .pvWrap canvas{width:auto!important;height:auto!important;max-width:100%!important;max-height:100%!important;aspect-ratio:auto!important}
body.tcMob .stage .ctrl{flex:none;min-height:44px;gap:8px;padding:0 2px;margin:0}
body.tcMob .stage .ctrl .playB{width:44px;height:44px}
body.tcMob .fStep{display:none!important}
body.tcMob .srcV:not([hidden]){flex:1 1 auto;min-height:0;overflow:auto}
/* --- timeline: right under the preview, finger-sized clips, only zoom/fit kept in its bar --- */
body.tcMob #edTl .tlBar{min-height:34px;gap:6px;padding:0 2px;flex-wrap:nowrap}
body.tcMob #edTl .tlBar #tlSplit,body.tcMob #edTl .tlBar #tlDup,body.tcMob #edTl .tlBar #tlDel,body.tcMob #edTl .tlBar .tlSel{display:none}
body.tcMob #edTl .tlBar .zoom{font-size:12px}
body.tcMob #edTl .tlBar .zoom input{width:110px}
body.tcMob #edTl .tlScroll{max-height:none}
body.tcMob #edTl .trk{height:52px!important}
/* --- ONE tool panel (clip tool / music / text / footage), docked above the tool bar; never a sheet over the preview --- */
body.tcMob .ed>#edInsp,body.tcMob .ed>#edPanel{position:static!important;inset:auto!important;transform:none!important;animation:none!important;box-shadow:none!important;
  max-height:min(34dvh,300px)!important;width:auto!important;margin:0!important;border-radius:14px!important;overflow:auto!important;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;
  padding:8px 12px!important;z-index:auto!important}
body.tcMob .ed>#edInsp:not(.open),body.tcMob .ed>#edPanel:not(.open){display:none!important}
body.tcMob .edInsp.mCompact{max-height:min(34dvh,300px)!important;overflow:hidden!important}
body.tcMob .edInsp.mCompact .mTabs{display:none}
body.tcMob .edInsp.mCompact h3{min-height:32px;font-size:15px}
body.tcMob .edInsp.mCompact .mOpt{min-height:36px}
/* --- the tool bar --- */
.mBar{display:none}
body.tcMob .mBar:not([hidden]){display:flex;gap:2px;align-items:stretch;justify-content:space-between;margin:0 calc(-1 * max(8px,env(safe-area-inset-left,0px))) 0;padding:4px max(6px,env(safe-area-inset-right,0px)) calc(4px + env(safe-area-inset-bottom,0px)) max(6px,env(safe-area-inset-left,0px));
  background:var(--panel);border-top:1px solid var(--line2)}
.mB{position:relative;flex:1 1 0;min-width:0;min-height:52px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:4px 2px;border:0;border-radius:12px;background:none;color:var(--fg2,#c9d6e4);
  font:700 11.5px/1.1 inherit;font-family:inherit;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none;overflow:hidden}
.mB svg{width:23px;height:23px;flex:none}
.mB span{display:block;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mB:active{background:rgba(var(--accRGB),.16)}
.mB.on{background:var(--sun2);color:#111}
.mB.mDel{color:#ff8c8c}
.mB.mDone{color:var(--sun1)}
.mB[data-k=add]{color:var(--sun1)}
.mB input[type=file],.mB .mBarIn{position:absolute;inset:0;opacity:0;width:100%;height:100%;cursor:pointer}
/* --- More menu --- */
.mobMore{position:fixed;left:max(8px,env(safe-area-inset-left,0px));right:max(8px,env(safe-area-inset-right,0px));bottom:calc(66px + env(safe-area-inset-bottom,0px));z-index:80;display:flex;flex-direction:column;gap:2px;
  max-height:60dvh;overflow:auto;padding:6px;border-radius:16px;background:var(--panel);border:1px solid var(--line2);box-shadow:0 18px 50px -10px #000}
body.tcLand .mobMore{left:auto;width:min(420px,46vw)}
.mobMi{min-height:46px;padding:0 14px;border:0;border-radius:10px;background:none;color:var(--fg);font-weight:700;font-size:15px;font-family:inherit;text-align:left;cursor:pointer}
.mobMi:active{background:rgba(var(--accRGB),.16)}
.mobMi.mobMx{color:var(--muted);text-align:center}
/* --- messages float at the top so they never cover the tools --- */
body.tcMob .pxNote.pxFloat{top:calc(54px + env(safe-area-inset-top,0px))!important;bottom:auto!important;z-index:85}
/* ===== LANDSCAPE: preview on the left, timeline + tool panel + tool bar on the right ===== */
body.tcLand .ed{grid-template-columns:minmax(0,1.15fr) minmax(300px,1fr)!important;grid-template-rows:auto auto auto minmax(0,1fr) auto!important;
  grid-template-areas:"center top" "center tabs" "center tl" "center dock" "center bar"!important;column-gap:10px!important;padding-bottom:0}
body.tcLand .ed>.edCenter{padding-bottom:calc(4px + env(safe-area-inset-bottom,0px))}
body.tcLand .ed>#edInsp,body.tcLand .ed>#edPanel{max-height:none!important;min-height:0}
body.tcLand .edInsp.mCompact{max-height:none!important}
body.tcLand .mBar:not([hidden]){margin:0;border-radius:14px 14px 0 0;border:1px solid var(--line2);border-bottom:0}
body.tcLand .mB{min-height:46px}
body.tcLand #edTl .trk{height:42px!important}
body.tcLand .edTop .edName input{font-size:15px}
/* --- refinements after the first phone screenshots --- */
/* the tool bar says which tool is open: the panel's own title, file line and ✕ are not needed (tap the tool again to close) */
body.tcMob .edInsp.mCompact>h3,body.tcMob .edInsp.mCompact>.mInfo{display:none}
body.tcMob .edInsp.mCompact{padding-top:4px!important}
/* thin text and music lanes, a finger-sized video lane */
body.tcMob #edTl .trk.text,body.tcMob #edTl .trk.music{height:38px!important}
body.tcMob #edTl .trk.video{height:56px!important}
body.tcLand #edTl .trk.text,body.tcLand #edTl .trk.music{height:32px!important}
body.tcLand #edTl .trk.video{height:46px!important}
/* messages show over the top of the preview, never over the top bar or the tools */
body.tcMob[data-route="editor"] .toast{top:calc(52px + env(safe-area-inset-top,0px))!important;bottom:auto!important}
body.tcLand[data-route="editor"] .toast{top:calc(8px + env(safe-area-inset-top,0px))!important;left:calc(8px + env(safe-area-inset-left,0px));transform:none;max-width:52vw}
body.tcLand .ed{grid-template-columns:minmax(0,1fr) minmax(360px,1fr)!important}
body.tcLand .mB{font-size:11px}
/* label and slider share one row (portrait and landscape), so a whole tool fits above the tool bar */
body.tcMob .edInsp.mCompact .mSec .iRow{display:grid!important;grid-template-columns:minmax(92px,34%) minmax(0,1fr);align-items:center;column-gap:10px;row-gap:4px;margin:2px 0 6px}
body.tcMob .edInsp.mCompact .mSec .iRow>.iL{margin:0;flex-direction:column;align-items:flex-start;gap:1px}
body.tcMob .edInsp.mCompact .mSec .iRow>input[type=range]{grid-column:2;min-height:34px;margin:0}
body.tcMob .edInsp.mCompact .mSec .iRow>:not(.iL):not(input){grid-column:1/-1}
/* the smooth-preview button lives in More on phones (the tool panel stays small) */
body.tcMob .edInsp.mCompact>.mOpt,body.tcMob .edInsp.mCompact>.mOptOn{display:none}
/* while a tool panel is open, the timeline drops its zoom row (pinch/Fit stay in More) */
body.tcMob.mDock #edTl .tlBar{display:none}
body.tcLand #edTl .tlBar{min-height:30px}
body.tcPort .mB{font-size:11px;letter-spacing:-.01em;padding:4px 0}
body.tcMob .edInsp.mCompact .mSec .trimBox{padding:4px 8px!important;margin:0!important;border:0;background:none}
body.tcMob .edInsp.mCompact .mSec .trimBox>.iL,body.tcMob .edInsp.mCompact .mSec .trimBox .iHint{display:none!important}
body.tcMob .edInsp.mCompact .mSec .trimBox .iBtns button,body.tcMob .edInsp.mCompact .mSec .trimBox>button{min-height:36px;font-size:13px}
body.tcMob .edInsp.mCompact .mSec>.iHint{font-size:12px;margin:2px 0}
body.tcLand .edInsp.mCompact .mSec .iRow>.iL{flex-direction:row!important;align-items:baseline;gap:6px;white-space:nowrap}
body.tcLand .ed>.edTabs>*{min-height:0!important;padding-top:4px!important;padding-bottom:4px!important}
body.tcLand .ed>.edTabs{max-height:46px}
