/* ---------- студия: бит или тейп ---------- */
.fmt{display:inline-grid;grid-template-columns:1fr 1fr;padding:3px;gap:2px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}
.fmt button{height:38px;padding:0 16px;border-radius:9px;display:flex;align-items:center;justify-content:center;gap:8px;font-size:14px;font-weight:600;color:var(--muted);white-space:nowrap}
.fmt button:hover{color:var(--text)}
.fmt button.on{background:var(--raised-2);color:var(--text)}
.st-top .fmt{margin-left:12px}
/* заголовок студии одной ширины в обоих режимах, чтобы переключатель не ездил */
.st-h{display:grid}
.st-h>span{grid-area:1/1;white-space:nowrap}
.st-h>span[aria-hidden]{visibility:hidden}
.fmt-hint{max-width:250px;font-size:13px;line-height:18px;color:var(--muted)}
.ms-page>.fmt{display:grid;width:100%;margin-bottom:12px}
.ms-page>.fmt button{height:44px;font-size:15px}
.ed-list{list-style:none;margin:14px 0 0;padding:0;display:flex;flex-direction:column;gap:6px}
.ed-row{display:grid;grid-template-columns:20px 22px 40px minmax(0,1fr) 150px 100px 96px 44px 120px 44px;align-items:center;column-gap:12px;row-gap:10px;padding:10px 4px 10px 8px;border:1px solid var(--line);border-radius:12px;background:var(--surface);cursor:pointer}
.ed-row:hover{border-color:var(--line-strong)}
.ed-row.on{background:var(--raised);border-color:var(--line-strong)}
.ed-row.drag{opacity:.4}
.ed-row.ov-t{box-shadow:inset 0 3px 0 var(--text)}
.ed-row.ov-b{box-shadow:inset 0 -3px 0 var(--text)}
.ed-h{display:grid;place-items:center;height:40px;color:var(--muted);cursor:grab}
.ed-h:hover{color:var(--text)}
.ed-n{text-align:center;font-weight:600;font-size:15px;color:var(--muted)}
.ed-row.on .ed-n{color:var(--text)}
.ed-row .tl-play[disabled]{opacity:.3;cursor:default}
.ed-row.on .tl-play:not([disabled]){background:var(--text);border-color:var(--text);color:var(--bg)}
.ed-t{width:100%;min-width:0;height:44px;padding:0 12px;border:1px solid transparent;border-radius:10px;background:none;color:var(--text);font-family:var(--fd);font-weight:900;font-size:15px;text-transform:uppercase;outline:0;cursor:text}
.ed-t::placeholder{color:var(--muted);font-weight:700}
.ed-t:hover{border-color:var(--line-strong)}
.ed-t:focus{border-color:var(--text);background:var(--bg)}
.ed-row .ctl{height:40px;background:var(--bg)}
.ed-row .ctl input,.ed-row .ctl select{font-size:15px;padding:0 10px}
.ed-row .ctl select{padding-right:30px}
.ed-row .ctl>svg{right:9px}
.ed-row .ctl .suf{padding-right:10px;font-size:13px}
.ctl.wait{border-style:dashed;border-color:var(--line);background:none}
.ctl.wait span{padding:0 10px;font-size:13px;color:var(--muted)}
.ed-dur{text-align:right;font-size:14px;color:var(--muted)}
.ed-st{display:inline-flex;align-items:center;gap:8px;font-size:13px;line-height:18px;color:var(--muted);white-space:nowrap}
.ed-st.ok svg{color:var(--ok)}
.ed-st .up-bar{width:52px;background:var(--line)}
.ed-st .up-bar i{background:var(--text)}
.ed-st.err{color:#FF6B62;font-weight:600}
.ed-row.err{background:rgba(200,30,42,.12);border-color:rgba(255,70,64,.45)}
.ed-err{grid-column:4 / -1;margin:0;display:flex;align-items:center;gap:12px;font-size:14px;line-height:20px;color:rgba(243,239,239,.85)}
.ed-err span{flex:1;min-width:0}
.ed-sub,.ed-mv{display:none}
.ed-add{width:100%;display:flex;align-items:center;gap:14px;padding:14px 16px;border:1.5px dashed var(--line-strong);border-radius:12px;color:var(--muted);text-align:left}
.ed-add:hover{border-color:var(--text);color:var(--text)}
.ed-add-ic{width:44px;height:44px;flex:none;border-radius:50%;display:grid;place-items:center;background:var(--raised-2);color:var(--text)}
.ed-add b{display:block;font-weight:600;font-size:15px;line-height:20px;color:var(--text)}
.ed-add small{display:block;font-size:13px;line-height:18px}
.bund-row{margin-top:14px;display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:15px;font-weight:600}
.bund-calc{margin:12px 0 0;display:flex;flex-direction:column}
.bund-calc div{display:flex;justify-content:space-between;align-items:baseline;gap:12px;padding:9px 0;border-top:1px solid var(--line);font-size:14px;line-height:20px}
.bund-calc dt{color:var(--muted)}
.bund-calc dd{margin:0;display:flex;align-items:baseline;gap:8px;white-space:nowrap}
.bund-calc b{font-family:var(--fd);font-weight:800;font-size:15px}
.bund-calc s{color:var(--muted);font-size:13px}
@container (max-width:1460px){.ed-row{grid-template-columns:20px 22px 40px minmax(0,1fr) 96px 92px 44px 112px 44px}.ed-g{display:none}}
@container (max-width:1020px){.ed-row{grid-template-columns:20px 22px 40px minmax(0,1fr) 92px 44px 108px 44px}.ed-key{display:none}}
.m .ed-row{grid-template-columns:24px 44px minmax(0,1fr) 44px;padding:8px 4px 8px 6px;cursor:default}
.m .ed-h,.m .ed-g,.m .ed-bpm,.m .ed-key,.m .ed-dur,.m .ed-row>.ed-st{display:none}
.m .ed-row .tl-play{width:44px;height:44px}
.m .ed-t{height:40px;padding:0 8px;font-size:14px}
.m .ed-row .inq-mq{left:9px;right:9px;font-size:14px;line-height:40px}
.m .ed-sub{display:flex;grid-column:3 / 5;align-items:center;gap:10px;min-width:0;padding:0 0 0 8px;margin-top:-6px;font-size:13px;line-height:18px;color:var(--muted)}
.m .ed-sub>span:not(.ed-mv){white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.m .ed-mv{display:flex;margin-left:auto;gap:2px;flex:none}
.m .ed-mv button{width:40px;height:36px;display:grid;place-items:center;border-radius:8px;color:var(--muted)}
.m .ed-mv button:disabled{opacity:.3}
.m .ed-err{grid-column:1 / -1;flex-wrap:wrap}
.m .tl-head .sec-h{flex:1}
@media (prefers-reduced-motion:reduce){.tp-l{transition:none}.tp-eq i{animation:none;transform:scaleY(.7)}}
.m .ed-sub .ed-st.ok{font-size:0;gap:0}
