/* Studio: sound for picture. Built on the tools design system (assets/css/tools.css). */
body[data-tool="studio"] .foot { display: none; }
body[data-tool="studio"] { overflow: hidden; }
.stu { --headw: 196px; --rowh: 66px; --tbh: 54px; height: calc(100vh - var(--hdr)); height: calc(100dvh - var(--hdr)); display: grid; grid-template-rows: var(--tbh) minmax(220px, 1fr) minmax(250px, 44%); background: var(--bg); border-top: 1px solid var(--line); }

/* toolbar */
.tb { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 0 14px; border-bottom: 1px solid var(--line); background: var(--bg2); }
.tb-l, .tb-r { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tb-r { justify-content: flex-end; }
.tb-c { display: flex; align-items: center; gap: 6px; }
.pname { background: none; border: 1px solid transparent; border-radius: 8px; padding: 6px 8px; font: 400 22px/1 var(--serif); color: var(--ink); min-width: 0; width: 100%; max-width: 300px; }
.pname:hover { border-color: var(--line); } .pname:focus { outline: none; border-color: var(--line2); background: var(--bg3); }
.ib { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--soft); }
.ib:hover { color: var(--ink); background: var(--bg3); }
.ib svg { width: 17px; height: 17px; }
.ib:disabled { opacity: .3; pointer-events: none; }
.play { width: 42px; height: 42px; border-radius: 50%; background: var(--ink); color: #141312; display: grid; place-items: center; margin: 0 2px; }
.play:hover { background: var(--accent); }
.play svg { width: 16px; height: 16px; }
.tc { font: 400 20px/1 var(--mono); letter-spacing: .02em; color: var(--ink); padding: 0 10px 0 12px; min-width: 150px; text-align: center; font-variant-numeric: tabular-nums; }
.fps { background: var(--bg3); border: 1px solid var(--line); color: var(--soft); border-radius: 8px; padding: 5px 6px; }
.tog { font-size: 12px; padding: 7px 12px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); }
.tog[aria-pressed="true"] { color: var(--ink); border-color: var(--line2); background: var(--bg3); }
.hp-ico { width: 8px; height: 8px; background: var(--accent); transform: rotate(45deg); display: inline-block; }

/* picture + side */
.top { display: grid; grid-template-columns: 1fr 360px; min-height: 0; border-bottom: 1px solid var(--line); }
.viewer { position: relative; background: #050504; display: grid; place-items: center; min-height: 0; overflow: hidden; }
.viewer video { max-width: calc(100% - 60px); max-height: calc(100% - 24px); width: auto; height: auto; background: #000; box-shadow: 0 0 0 1px var(--line); }
.viewer.empty video { display: none; }
.vdrop { position: absolute; inset: 14px 44px 14px 14px; border: 1px dashed var(--line2); border-radius: var(--r); display: none; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; }
.viewer.empty .vdrop { display: flex; }
.vdrop p { font-size: 34px; line-height: 1; }
.vdrop-b { display: flex; gap: 8px; margin-top: 12px; }
.viewer.drag .vdrop { display: flex; background: rgba(15,154,150, .06); border-color: var(--accent); }
.vinfo { position: absolute; left: 14px; bottom: 10px; color: var(--muted); }
.meter { position: absolute; right: 12px; top: 14px; bottom: 14px; width: 16px; display: flex; gap: 3px; }
.meter i { flex: 1; background: var(--bg3); border-radius: 2px; position: relative; overflow: hidden; }
.meter i::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: var(--v, 0%); background: linear-gradient(to top, #7fbf8a 0, #7fbf8a 70%, #f0c23a 86%, #e0705a 97%); background-size: 100% var(--full, 300px); background-position: bottom; }
.sidep { border-left: 1px solid var(--line); background: var(--bg2); display: flex; flex-direction: column; min-height: 0; }
.stabs { display: flex; border-bottom: 1px solid var(--line); padding: 0 8px; }
.stabs button { padding: 12px 10px 11px; font-size: 13px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.stabs button[aria-selected="true"] { color: var(--ink); border-color: var(--accent); }
.pane { flex: 1; overflow-y: auto; padding: 14px; min-height: 0; }
.pane[hidden] { display: none; }

/* sound effects pane */
.types { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.types button { font-size: 11.5px; padding: 5px 9px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); }
.types button.on { color: #141312; background: var(--ink); border-color: var(--ink); }
.plist { display: grid; gap: 4px; }
.pr { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; padding: 9px 10px; border-radius: 10px; text-align: left; cursor: grab; border: 1px solid transparent; }
.pr:hover { background: var(--bg3); }
.pr.on { border-color: var(--line2); background: var(--bg3); }
.pr b { font-weight: 400; color: var(--ink); font-size: 14px; }
.pr span { grid-column: 1; font-size: 11px; }
.pr .len { grid-row: 1 / 3; grid-column: 2; font-size: 11px; color: var(--muted); }
.ed { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.ed h4 { font: 400 24px/1.05 var(--serif); margin-bottom: 2px; }
.ed .sub { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.prm { margin: 10px 0; }
.prm .l { display: flex; justify-content: space-between; font-size: 12px; color: var(--soft); }
.prm .l b { font-weight: 400; color: var(--ink); font-family: var(--mono); font-size: 11px; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: none; }
input[type=range]::-webkit-slider-runnable-track { height: 3px; background: var(--line2); border-radius: 2px; }
input[type=range]::-moz-range-track { height: 3px; background: var(--line2); border-radius: 2px; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%; background: var(--ink); margin-top: -5px; }
input[type=range]::-moz-range-thumb { width: 13px; height: 13px; border-radius: 50%; background: var(--ink); border: 0; }
.ed-b { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.ed-b .btn { flex: 1 1 auto; }
.ed .why { font-size: 12px; color: var(--muted); margin-top: 8px; }

/* media + clip panes */
.mlist { display: grid; gap: 4px; margin-top: 10px; }
.mi { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; cursor: grab; }
.mi:hover { background: var(--bg3); }
.mi canvas { width: 70px; height: 26px; flex: none; }
.mi b { font-weight: 400; font-size: 13px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mi span { font-size: 11px; color: var(--muted); }
.empty-p { color: var(--muted); font-size: 13px; padding: 10px 0; }
.kv { display: grid; grid-template-columns: 90px 1fr; gap: 8px 10px; align-items: center; font-size: 13px; margin: 12px 0; }
.kv span { color: var(--muted); font-size: 12px; }
.num { width: 80px; background: var(--bg3); border: 1px solid var(--line); border-radius: 8px; padding: 5px 7px; color: var(--ink); font-family: var(--mono); font-size: 12px; }

/* timeline */
.tl { display: grid; grid-template-rows: 1fr auto; min-height: 0; background: var(--bg); }
.tlscroll { overflow: auto; position: relative; min-height: 0; overscroll-behavior: contain; }
.tlgrid { position: relative; min-height: 100%; }
.tlr { display: flex; position: relative; align-items: stretch; }
.hcell { position: sticky; left: 0; z-index: 4; width: var(--headw); flex: none; background: var(--bg2); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.rulerrow { position: sticky; top: 0; z-index: 6; height: 30px; }
.rulerrow .hcell { z-index: 7; display: flex; align-items: center; padding: 0 12px; }
.ruler { position: relative; flex: 1; background: var(--bg2); border-bottom: 1px solid var(--line); cursor: text; height: 30px; }
.tick { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--line); }
.tick.min { top: 20px; }
.tick span { position: absolute; left: 4px; top: 4px; font: 400 10px var(--mono); color: var(--muted); white-space: nowrap; }
.striprow { height: 44px; }
.striprow .hcell { display: flex; align-items: center; padding: 0 12px; font-size: 12px; color: var(--muted); }
.strip { flex: 1; position: relative; border-bottom: 1px solid var(--line); background: #0d0d0c; overflow: hidden; }
.strip canvas { position: absolute; top: 3px; height: 38px; }
.trk { height: var(--rowh); }
.trk .hcell { padding: 7px 10px 6px 12px; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto 1fr; gap: 2px 6px; }
.trk .hcell::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--tc); }
.trk.sel .hcell { background: var(--bg3); }
.tname { background: none; border: 0; color: var(--ink); font-size: 13px; padding: 2px 0; min-width: 0; width: 100%; }
.tname:focus { outline: none; border-bottom: 1px solid var(--line2); }
.tbtns { display: flex; gap: 3px; }
.tbtns button { width: 22px; height: 20px; border-radius: 5px; font: 500 10px var(--mono); color: var(--muted); border: 1px solid var(--line); }
.tbtns button[aria-pressed="true"].m { background: #e0705a; color: #141312; border-color: #e0705a; }
.tbtns button[aria-pressed="true"].s { background: var(--accent); color: #141312; border-color: var(--accent); }
.tctl { grid-column: 1 / 3; display: grid; grid-template-columns: 1fr 52px; gap: 8px; align-items: center; }
.tctl input { height: 18px; }
.tctl .db { font: 400 10px var(--mono); color: var(--muted); text-align: right; }
.lane { flex: 1; position: relative; border-bottom: 1px solid var(--line); }
.lane.over { background: rgba(15,154,150, .05); }
.clip { position: absolute; top: 4px; bottom: 4px; border-radius: 6px; background: color-mix(in srgb, var(--tc) 24%, #121211); border: 1px solid color-mix(in srgb, var(--tc) 55%, transparent); overflow: hidden; cursor: grab; touch-action: none; }
.clip.sel { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); z-index: 2; }
.clip canvas { position: absolute; left: 0; top: 16px; height: calc(100% - 18px); pointer-events: none; }
.clip .cn { position: absolute; left: 7px; top: 2px; right: 7px; font-size: 11px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.clip .cn i { font-style: normal; color: var(--accent2); margin-right: 4px; }
.clip .fade { position: absolute; top: 0; bottom: 0; pointer-events: none; }
.clip .fade svg { width: 100%; height: 100%; }
.clip .fh { position: absolute; top: 1px; width: 9px; height: 9px; border-radius: 2px; background: var(--ink); opacity: 0; cursor: ew-resize; }
.clip:hover .fh, .clip.sel .fh { opacity: .85; }
.clip.busy::after { content: 'Rendering…'; position: absolute; inset: 0; display: grid; place-items: center; font: 400 10px var(--mono); color: var(--muted); background: rgba(20, 19, 18,.6); }
.ph { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--ink); z-index: 5; pointer-events: none; }
.ph::before { content: ''; position: absolute; top: 0; left: -6px; border: 6px solid transparent; border-top: 8px solid var(--ink); }
.mk { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(15,154,150, .55); z-index: 3; pointer-events: none; }
.mkf { position: absolute; top: 2px; z-index: 8; transform: translateX(-6px); display: flex; align-items: center; gap: 5px; cursor: grab; touch-action: none; }
.mkf i { width: 11px; height: 11px; background: var(--accent); transform: rotate(45deg); border-radius: 2px; flex: none; }
.mkf span { font: 400 10px var(--mono); color: var(--accent2); background: var(--bg2); padding: 1px 4px; border-radius: 3px; white-space: nowrap; }
.mkf.sel i { box-shadow: 0 0 0 2px var(--ink); }
.dropline { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--accent); z-index: 9; pointer-events: none; display: none; }
.tlfoot { display: flex; align-items: center; gap: 14px; padding: 6px 12px; border-top: 1px solid var(--line); background: var(--bg2); }
.tlhint { flex: 1; text-align: center; font-size: 10px; }
.zoom { display: flex; align-items: center; gap: 8px; width: 220px; }
.emptytl { position: absolute; left: calc(var(--headw) + 24px); top: 92px; color: var(--muted); font-size: 13px; pointer-events: none; }

/* dialogs */
.sdlg { border: 1px solid var(--line2); border-radius: 18px; background: var(--bg2); color: var(--ink); padding: 22px; width: min(520px, calc(100% - 24px)); }
.sdlg::backdrop { background: rgba(0, 0, 0, .6); }
.sdlg h3 { font-size: 32px; line-height: 1; margin-bottom: 14px; }
.dlg-b { display: flex; gap: 8px; margin-top: 18px; }
.prow { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.prow b { font-weight: 400; flex: 1; }
.prow span { font-size: 11px; color: var(--muted); }
.prow.cur b::after { content: ' · open'; color: var(--accent); font-size: 11px; }
.exp-rows { display: grid; gap: 12px; }
.exp-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.exp-row > .mono:first-child { width: 60px; }
.exp-note { font-size: 12px; margin-top: 12px; min-height: 1.4em; }
.small-note { position: fixed; inset: var(--hdr) 0 0; z-index: 50; background: var(--bg); display: none; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 24px; }
.small-note p { font-size: 34px; line-height: 1.05; }
@media (max-width: 900px) { .small-note { display: flex; } .small-note.off { display: none; } }
