/* Edit tools toolbar + panels (Speed, Beats, Crop, Duplicate, Replace, Overlay). Loaded last. */
#etools,#etpanel{display:none}
body.etools #side{display:none}
body.etools:not(.etp):not(.aedit):not(.tedit) #etools{display:flex}
#etools{flex:none;background:var(--e-bg);overflow-x:auto;scrollbar-width:none;justify-content:flex-start;padding:8px 0 calc(8px + env(safe-area-inset-bottom))}
#etools::-webkit-scrollbar{display:none}
#etools button{flex:none;min-width:80px;min-height:64px;display:grid;place-items:center;align-content:center;gap:7px;border:0;border-radius:0;background:none;color:var(--e-tx);padding:0 4px}
#etools button svg{width:28px;height:28px}
#etools small{font-size:14px;line-height:1.2;font-weight:400;color:var(--e-tx)}
#etools button.dis{opacity:.38}
#etools button.back{min-width:56px;margin-right:4px;border-right:1px solid #2c2c2e}

body.etp #etpanel{display:block}
#etpanel{flex:none;background:var(--e-pn);border-top:1px solid #2c2c2e;padding:6px 16px calc(14px + env(safe-area-inset-bottom));color:var(--e-tx)}
.ep-h{display:flex;align-items:center;justify-content:space-between;min-height:44px}
.ep-h b{font-size:16px;font-weight:600}
.ep-h button{background:none;border:0;color:var(--e-tx);min-width:44px;min-height:44px;display:grid;place-items:center;border-radius:12px}
.ep-row{display:grid;grid-template-columns:96px 1fr 52px;gap:10px;align-items:center;min-height:44px;font-size:14px;color:var(--e-mu)}
.ep-row input{width:100%;accent-color:#aef3f0}
.ep-row b{text-align:right;font-weight:500;font-variant-numeric:tabular-nums;color:var(--e-tx)}
.ep-chips{display:flex;gap:8px;overflow-x:auto;padding:2px 0 8px;scrollbar-width:none}
.ep-chips::-webkit-scrollbar{display:none}
.ep-chips button{flex:none;min-height:40px;padding:0 16px;border-radius:10px;border:0;background:var(--e-chip);color:var(--e-tx);font-size:15px}
.ep-chips button.on{background:#e3e6ff;color:#14141a}
.ep-act{display:flex;gap:8px;flex-wrap:wrap}
.ep-btn{min-height:44px;padding:0 16px;border-radius:10px;border:0;background:var(--e-chip);color:var(--e-tx);font-size:15px;margin-top:6px}
.ep-hint{margin:8px 0 0;font-size:13px;line-height:1.4;color:var(--e-mu)}

/* timeline: beat marks, speed badge, overlay track */
.clip .bt{position:absolute;top:0;bottom:0;width:2px;margin-left:-1px;background:#ffd24a;text-decoration:none;pointer-events:none;z-index:2}
.clip .spd{position:absolute;right:20px;bottom:2px;font-style:normal;font-size:11px;font-weight:700;background:rgba(0,0,0,.6);color:#fff;padding:0 5px;border-radius:6px;pointer-events:none;z-index:2}
.clip.o{background-color:#8a5a1f}
.trk[data-t="o"]{height:30px}

@media(min-width:900px) and (min-height:560px){
 body.etools #etools{display:flex;grid-column:1;grid-row:2/4;flex-direction:column;overflow:hidden auto;border-right:1px solid var(--ln);padding:8px}
 body.etools.etp #etools,body.etools.aedit #etools,body.etools.tedit #etools{visibility:hidden}
 #etools button{min-width:0;min-height:56px}
 #etools button.back{border-right:0;margin:0 0 4px;border-bottom:1px solid #2c2c2e}
 #etpanel{grid-column:3;grid-row:2/4;width:360px;border-top:0;border-left:1px solid var(--ln)}
 body.etp #stage{grid-row:2/4}
}
#etools,#etpanel{order:3}
