:root {
  --bg: #0c0e12; --panel: #13161c; --panel2: #191d25; --line: #252b36; --text: #e8ebf1; --muted: #8b94a6;
  --acc: #e10a1e; --acc2: #ff3b4e; --ok: #10b26c; --warn: #d9a21b;
  --g1: #7c4dff; --g2: #1666ff; --g3: #00b3a4; --v1: #3b4a63; --a2: #10b26c;
  font: 13px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); overflow: hidden; }
body { display: grid; grid-template-rows: 48px minmax(0, 1fr) 248px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; cursor: pointer; white-space: nowrap; }
button:hover { border-color: #3a4352; background: #1f2430; }
button.primary { background: var(--acc); border-color: var(--acc); color: #fff; font-weight: 600; }
button.primary:hover { background: var(--acc2); }
button.ghost { background: transparent; }
button.wide { width: 100%; margin: 6px 0; }
button.rec { background: #2a1013; border-color: #5a1a22; color: #ff8a95; font-weight: 600; }
button.rec.on, button.on-rec { background: var(--acc); color: #fff; border-color: var(--acc); animation: pulse 1s infinite; }
button:disabled { opacity: .5; cursor: default; }
@keyframes pulse { 50% { opacity: .7; } }
input, select, textarea { background: #0e1116; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: #4a5568; }
textarea { width: 100%; resize: vertical; }
input[type=range] { padding: 0; accent-color: var(--acc); }
h4 { margin: 16px 0 6px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
h3 { margin: 0 0 10px; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 12px; margin: 4px 0; }
.pad { padding: 14px; }
.row { display: flex; gap: 6px; align-items: center; margin: 5px 0; }
.row > input:not([type=range]):not([type=checkbox]), .row > select, .row > textarea { flex: 1; }
.row > label { color: var(--muted); white-space: nowrap; }
.row > input[type=range] { flex: 1; }
.chk { display: flex; gap: 4px; align-items: center; color: var(--text) !important; }
.seg { gap: 0; }
.seg button { flex: 1; border-radius: 0; padding: 5px 4px; font-size: 12px; }
.seg button:first-child { border-radius: 6px 0 0 6px; } .seg button:last-child { border-radius: 0 6px 6px 0; }
.seg button.on { background: var(--acc); border-color: var(--acc); color: #fff; }

.top { display: flex; align-items: center; gap: 16px; padding: 0 12px; background: var(--panel); border-bottom: 1px solid var(--line); }
.brand { font-size: 15px; letter-spacing: .02em; display: flex; align-items: center; gap: 8px; }
.brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 10px var(--acc); }
.proj { display: flex; gap: 6px; align-items: center; flex: 1; }
.proj select { max-width: 200px; } .proj input { width: 220px; }
.right { display: flex; gap: 8px; align-items: center; }
.frame { display: flex; gap: 8px; align-items: center; }
.aspects { display: flex; background: #0e1116; border: 1px solid var(--line); border-radius: 8px; padding: 2px; }
.aspects button { border: 0; background: transparent; display: flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 6px; color: var(--muted); font-weight: 600; }
.aspects button i { display: inline-block; border: 1.5px solid currentColor; border-radius: 2px; }
.aspects button.on { background: var(--acc); color: #fff; }
.frame select { max-width: 170px; }
#aspectHint { font-size: 12px; white-space: nowrap; }
@media (max-width: 1350px) { #aspectHint, .proj input { display: none; } }
.badge { padding: 3px 8px; border-radius: 20px; background: #1d2230; color: var(--muted); font-size: 12px; }
.badge.gpu { background: #0d2a1d; color: #4be39b; } .badge.cpu { background: #2a230d; color: #f3c04a; } .badge.err { background: #2a0d10; color: #ff7a85; }

.main { display: grid; grid-template-columns: 330px minmax(0, 1fr) 290px; min-height: 0; }
.side { background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.tabs { display: flex; border-bottom: 1px solid var(--line); }
.tabs button { flex: 1; border: 0; border-radius: 0; background: transparent; padding: 10px; color: var(--muted); border-bottom: 2px solid transparent; }
.tabs button.on { color: var(--text); border-bottom-color: var(--acc); }
.pane { display: none; padding: 10px 12px 20px; overflow-y: auto; min-height: 0; flex: 1; }
.pane.on { display: block; }
.list .it { display: flex; gap: 8px; align-items: center; padding: 6px; border: 1px solid var(--line); border-radius: 6px; margin: 5px 0; background: var(--panel2); }
.list .it .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.themes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.themes button { height: 30px; padding: 0; border-radius: 6px; border: 2px solid transparent; }
.themes button.on { border-color: #fff; }
.styles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 6px 0; }
.styles button { padding: 3px; display: flex; flex-direction: column; gap: 2px; align-items: stretch; font-size: 11px; color: var(--muted); }
.styles button img { width: 100%; aspect-ratio: 1500/320; object-fit: cover; border-radius: 3px; background: #3a4250; }
.styles.tk button img { aspect-ratio: 1920/180; }
.styles button.on { border-color: var(--acc); color: var(--text); }

.stage { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #08090c; }
.viewer { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 12px; position: relative; }
.viewer canvas { max-width: 100%; max-height: 100%; aspect-ratio: 16/9; background: #000; box-shadow: 0 0 0 1px var(--line); }
.recbadge { position: absolute; top: 22px; left: 22px; background: var(--acc); color: #fff; padding: 4px 10px; border-radius: 4px; font-weight: 700; display: none; animation: pulse 1s infinite; }
.recbadge.on { display: block; }
.transport { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-top: 1px solid var(--line); background: var(--panel); }
.transport .sp { flex: 1; }
.transport .play { width: 44px; font-size: 15px; }
.transport input[type=range] { width: 120px; }
.tc { font: 600 14px ui-monospace, Menlo, monospace; letter-spacing: .04em; }

.insp { background: var(--panel); border-left: 1px solid var(--line); overflow-y: auto; padding: 10px 12px; }
.insp h3 { font-size: 14px; display: flex; align-items: center; gap: 8px; }
.insp h3 i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.insp .row label { width: 78px; }

.tl { display: grid; grid-template-columns: 120px minmax(0, 1fr); border-top: 1px solid var(--line); background: var(--panel); min-height: 0; user-select: none; }
.tl-heads { padding-top: 24px; border-right: 1px solid var(--line); }
.tl-heads div { height: 42px; display: flex; align-items: center; gap: 6px; padding: 0 10px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.tl-heads i { width: 8px; height: 8px; border-radius: 2px; }
.tl-scroll { overflow-x: auto; overflow-y: hidden; position: relative; }
.tl-inner { position: relative; min-width: 100%; }
.ruler { height: 24px; position: relative; border-bottom: 1px solid var(--line); cursor: pointer; background: #10131a; }
.ruler span { position: absolute; top: 0; height: 100%; border-left: 1px solid #2c3340; padding-left: 3px; font-size: 10px; color: var(--muted); line-height: 24px; }
.lane { height: 42px; position: relative; border-bottom: 1px solid var(--line); }
.lane:nth-child(odd) { background: #12151b; }
.clip { position: absolute; top: 4px; height: 34px; border-radius: 5px; overflow: hidden; cursor: grab; font-size: 11px; padding: 3px 8px; white-space: nowrap; text-overflow: ellipsis; color: #fff; border: 1px solid rgba(255,255,255,.18); }
.clip.sel { outline: 2px solid #fff; outline-offset: 0; z-index: 2; }
.clip .h { position: absolute; top: 0; bottom: 0; width: 7px; cursor: ew-resize; }
.clip .h.l { left: 0; } .clip .h.r { right: 0; }
.clip .h:hover { background: rgba(255,255,255,.3); }
.clip small { display: block; opacity: .7; }
.clip canvas.wave { position: absolute; left: 0; top: 0; width: 100%; height: 100%; opacity: .45; pointer-events: none; }
.clip.G1 { background: var(--g1); } .clip.G2 { background: var(--g2); } .clip.G3 { background: var(--g3); } .clip.V1 { background: var(--v1); } .clip.A2 { background: #0c6b45; }
.ph { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--acc); pointer-events: none; z-index: 5; }
.ph::before { content: ""; position: absolute; top: 0; left: -5px; border: 6px solid transparent; border-top: 8px solid var(--acc); }

.meter { height: 6px; background: #0e1116; border-radius: 3px; overflow: hidden; margin: 4px 0; }
.meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--ok), var(--warn) 75%, var(--acc)); transition: width .05s; }
.bar { height: 10px; background: #0e1116; border-radius: 5px; overflow: hidden; margin: 12px 0; }
.bar i { display: block; height: 100%; width: 0; background: var(--acc); transition: width .3s; }

dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 0; width: min(520px, 92vw); }
dialog::backdrop { background: rgba(0,0,0,.6); }
.dlg { padding: 18px; }
fieldset { border: 1px solid var(--line); border-radius: 8px; margin: 8px 0; display: grid; gap: 6px; }
legend { color: var(--muted); padding: 0 4px; }
menu { display: flex; justify-content: flex-end; gap: 8px; padding: 0; margin: 14px 0 0; }
code { background: #0e1116; padding: 1px 4px; border-radius: 3px; }
.toast { position: fixed; bottom: 260px; left: 50%; transform: translateX(-50%); background: #222836; border: 1px solid var(--line); padding: 8px 14px; border-radius: 8px; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 50; max-width: 70vw; }
.toast.on { opacity: 1; } .toast.err { background: #3a1015; border-color: #6a1a24; }

.drop { display: flex; gap: 10px; align-items: center; border: 1.5px dashed #3a4352; border-radius: 8px; padding: 10px; cursor: pointer; color: var(--muted); font-size: 12px; min-height: 64px; background: #0e1116; }
.drop:hover, .drop.over { border-color: var(--acc); color: var(--text); }
.drop img { width: 90px; height: 44px; object-fit: contain; background: repeating-conic-gradient(#2a2f3a 0 25%, #1c2029 0 50%) 0 0 / 12px 12px; border-radius: 4px; display: none; }
.drop img[src] { display: block; }
.row .sp { flex: 1; }
.presets { display: grid; gap: 5px; }
.presets .pr { display: flex; align-items: center; gap: 6px; background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; padding: 5px 6px 5px 10px; cursor: pointer; }
.presets .pr:hover { border-color: #3a4352; }
.presets .pr .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.presets .pr .t small { color: var(--muted); margin-left: 6px; }
.presets .pr .st { font-size: 10px; color: var(--muted); background: #0e1116; padding: 1px 6px; border-radius: 10px; }
.presets .pr button { padding: 2px 7px; font-size: 12px; }
.presets .pr.mine { border-left: 3px solid var(--warn); }
.steps { margin: 4px 0 6px; padding-left: 20px; color: var(--muted); font-size: 12px; }
.steps li { margin: 3px 0; } .steps b { color: var(--text); }
.warn { background: #2a230d; border: 1px solid #5a4a12; color: #f3c04a; border-radius: 6px; padding: 8px; font-size: 12px; margin: 4px 0; }
.more { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 10px; }
.more summary { cursor: pointer; color: var(--muted); font-size: 12px; margin-bottom: 6px; }
/* yuxarı panel: dar ekranda düymələr sıxılmasın */
.top { min-width: 0; }
.proj { min-width: 0; flex: 1 1 auto; }
.proj select { max-width: 170px; min-width: 0; }
.proj input { width: 170px; min-width: 0; }
.right, .frame { flex: none; }
#saveState { font-size: 12px; white-space: nowrap; }
@media (max-width: 1750px) { #aspectHint { display: none; } }
@media (max-width: 1450px) { .proj input, #saveState { display: none; } .brand b { display: none; } }

/* ================= Figma dizaynı (FMq6TQKIGglf54y1z9j8mG) — tokenlər və düzülüş ================= */
:root {
  --bg: #0b0d11; --panel: #12151b; --panel2: #181c24; --input: #0e1116; --hover: #1f2430;
  --line: #232935; --line2: #3a4352; --text: #e8ebf1; --muted: #8b94a6;
  --acc: #e10a1e; --acc2: #ff3b4e; --accsoft: #2a1013; --ok: #10b26c; --oksoft: #0d2a1d; --warn: #d9a21b; --warnsoft: #2a230d;
  --g1: #7c4dff; --g2: #1666ff; --v1: #3b4a63; --a2: #0c6b45;
  --r6: 6px; --r8: 8px; --r12: 12px;
  font: 13px/1.4 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
body { grid-template-rows: 56px minmax(0, 1fr) 236px; }
button { background: var(--panel2); border-color: var(--line); border-radius: var(--r6); padding: 7px 12px; font-weight: 500; }
button:hover { background: var(--hover); border-color: var(--line2); }
button.ghost { background: transparent; border-color: var(--line); }
button.ghost:hover { background: var(--hover); }
button.primary { font-weight: 600; }
input, select, textarea { background: var(--input); border-color: var(--line); border-radius: var(--r6); padding: 7px 10px; }
input:focus, select:focus, textarea:focus { border-color: var(--line2); box-shadow: 0 0 0 3px rgba(225,10,30,.15); }
h4 { margin: 22px 0 10px; font-weight: 600; }
.pane > h4:first-child { margin-top: 4px; }
.row { gap: 8px; margin: 8px 0; }

/* seçim düymələri — bir qutu içində «pill» kimi (dizayndakı Segment) */
.seg { gap: 2px; padding: 2px; background: var(--input); border: 1px solid var(--line); border-radius: var(--r8); }
.seg button, .seg button:first-child, .seg button:last-child { border: 0; border-radius: var(--r6); background: transparent; color: var(--muted); padding: 6px 4px; }
.seg button:hover { color: var(--text); background: var(--hover); }
.seg button.on { background: var(--acc); color: #fff; font-weight: 600; }

/* üst panel */
.top { gap: 16px; padding: 0 16px; }
.brand { font-size: 15px; font-weight: 700; } .brand b { font-weight: 400; color: var(--muted); }
.aspects { background: var(--input); border-radius: var(--r8); gap: 2px; }
.aspects button { padding: 5px 10px; font-weight: 500; }
.aspects button:hover { background: var(--hover); color: var(--text); }
.aspects button.on { font-weight: 600; }
.badge { padding: 5px 10px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.badge.gpu, .badge.cpu, .badge.err { background: var(--oksoft); }
.badge.gpu { color: var(--ok); } .badge.err { background: var(--accsoft); color: #ff7a85; } .badge.cpu { background: var(--warnsoft); color: var(--warn); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* sol panel */
.main { grid-template-columns: 320px minmax(0, 1fr) 288px; }
.tabs button { padding: 13px 8px 11px; font-weight: 500; }
.tabs button:hover { background: transparent; color: var(--text); }
.tabs button.on { font-weight: 600; }
.pane { padding: 18px 16px 24px; }
.drop { gap: 12px; padding: 12px; border: 1px dashed var(--line2); border-radius: var(--r8); background: var(--input); }
.drop img { width: 84px; height: 40px; border-radius: var(--r6); }
.themes { grid-template-columns: repeat(5, 1fr); }
.themes button { height: 29px; border-radius: var(--r6); }
.presets { gap: 6px; }
.presets .pr { padding: 8px 8px 8px 12px; background: var(--panel2); border-radius: var(--r8); gap: 8px; }
.presets .pr:hover { background: var(--hover); border-color: var(--line2); }
.presets .pr .t { font-weight: 500; }
.presets .pr .st { background: var(--input); border: 1px solid var(--line); padding: 2px 8px; }
.presets .pr button { border: 0; background: transparent; font-size: 16px; padding: 0 6px; }
.list .it { background: var(--panel2); border-radius: var(--r8); padding: 8px; }
.styles button { border-radius: var(--r8); }
.warn { background: var(--warnsoft); border-radius: var(--r8); padding: 10px; }

/* mərkəz */
.stage { background: var(--bg); }
.viewer { padding: 24px; }
.viewer canvas { border-radius: 4px; box-shadow: 0 12px 32px rgba(0,0,0,.5), 0 0 0 1px var(--line); }
.transport { gap: 8px; padding: 8px 16px; }
.transport .play { width: 40px; background: var(--acc); border-color: var(--acc); color: #fff; }
.transport .play:hover { background: var(--acc2); }
.tc { font: 500 15px "JetBrains Mono", ui-monospace, Menlo, monospace; }
#tcDur { font-size: 13px; }

/* sağ panel — sahələr: etiket yuxarıda, giriş altında (dizayndakı Field) */
.insp { padding: 18px 16px; }
.insp h3 { font-size: 15px; font-weight: 600; margin-bottom: 14px; }
.insp .row { margin: 0 0 12px; }
.insp .row:has(> label):not(:has(> input[type=range])) { flex-direction: column; align-items: stretch; gap: 6px; }
.insp .row:has(> label) > label { width: auto; font-size: 11px; }
.insp .row:has(> input[type=range]) > label { width: 60px; font-size: 12px; }
.insp .row:last-child button { flex: 1; }
.insp .row:last-child button:last-child { flex: none; }

/* timeline */
.tl { grid-template-columns: 140px minmax(0, 1fr); }
.tl-heads { padding-top: 28px; }
.tl-heads div { height: 48px; gap: 8px; padding: 0 14px; font-weight: 500; }
.ruler { height: 28px; background: var(--bg); }
.ruler span { line-height: 28px; border-left-color: var(--line); }
.lane { height: 48px; }
.lane:nth-child(odd) { background: #121419; }
.clip { top: 6px; height: 36px; border-radius: var(--r6); padding: 4px 8px; font-weight: 600; border-color: rgba(255,255,255,.14); }
.clip small { font-weight: 400; }
.clip.V1 { background: var(--v1); } .clip.A2 { background: var(--a2); }
.clip.sel { outline: 2px solid #fff; }

dialog { border-radius: var(--r12); }
.dlg { padding: 20px; }
fieldset { border-radius: var(--r8); }
.toast { bottom: 250px; border-radius: var(--r8); }

/* rəng dəstləri — Figma «Rəng dəstləri» kartlarının kiçik variantı */
.themes { grid-template-columns: repeat(6, 1fr); gap: 6px; }
.themes button { position: relative; height: 40px; padding: 0; border-radius: var(--r8); border: 2px solid transparent; background: var(--c2); overflow: hidden; }
.themes button i { position: absolute; left: 6px; top: 8px; width: 58%; height: 10px; border-radius: 2px; background: linear-gradient(90deg, var(--c1), color-mix(in srgb, var(--c1) 70%, transparent)); }
.themes button b { position: absolute; left: 6px; top: 23px; width: 46%; height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--c3), transparent); }
.themes button:hover { border-color: var(--line2); background: var(--c2); }
.themes button.on { border-color: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,.15); }
.thname { margin-top: 8px; font-weight: 600; min-height: 28px; }
.thown { flex-wrap: wrap; }
.cp { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted) !important; cursor: pointer; }
.cp input[type=color] { width: 26px; height: 26px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: none; cursor: pointer; }
.cp input[type=color]::-webkit-color-swatch-wrapper { padding: 2px; }
.cp input[type=color]::-webkit-color-swatch { border: 0; border-radius: 4px; }

/* Mənim şablonlarım */
.tpls { display: grid; gap: 6px; margin-bottom: 4px; }
.tpls .tp { display: flex; align-items: center; gap: 8px; padding: 8px 6px 8px 8px; background: var(--panel2); border: 1px solid var(--line); border-radius: var(--r8); cursor: pointer; }
.tpls .tp:hover { background: var(--hover); border-color: var(--line2); }
.tpls .tp.def { border-color: color-mix(in srgb, var(--warn) 55%, var(--line)); }
.tpls .tp i { flex: none; width: 34px; height: 26px; border-radius: 6px; background: linear-gradient(var(--c1), var(--c1)) 5px 6px / 60% 7px no-repeat, linear-gradient(90deg, var(--c3), transparent) 5px 16px / 45% 2px no-repeat, var(--c2); border: 1px solid rgba(255,255,255,.12); }
.tpls .tp .t { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpls .tp .t small { display: block; font-weight: 400; color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
.tpls .tp button { border: 0; background: transparent; padding: 2px 6px; font-size: 15px; color: var(--muted); }
.tpls .tp button:hover { color: var(--text); background: var(--input); }
.tpls .tp .star { color: var(--warn); }
.tplchk { font-size: 12px; margin: 2px 0 4px; }
.tpls { grid-template-columns: minmax(0, 1fr); }
.tpls .tp { min-width: 0; }

/* önizləmədə seçim çərçivəsi və ölçü tutacağı */
.selbox { position: absolute; pointer-events: none; border: 1.5px dashed rgba(255,255,255,.85); box-shadow: 0 0 0 1px rgba(0,0,0,.4); border-radius: 2px; z-index: 3; }
.selbox i { position: absolute; width: 12px; height: 12px; background: #fff; border: 2px solid var(--acc); border-radius: 3px; }
.selbox[data-h="rt"] i { right: -7px; top: -7px; } .selbox[data-h="rb"] i { right: -7px; bottom: -7px; }
.selbox[data-h="lt"] i { left: -7px; top: -7px; } .selbox[data-h="lb"] i { left: -7px; bottom: -7px; }

/* diskdə tapılmayan fayl */
.clip.missing { background: repeating-linear-gradient(135deg, #5a1218 0 8px, #3a0c10 8px 16px) !important; border-color: #ff4d5e; }
.clip.missing::after { content: "⚠ fayl tapılmadı"; position: absolute; right: 8px; top: 3px; color: #ffb3bb; font-weight: 600; }

/* ---- kənar alətlər paneli (rail) ---- */
.main { grid-template-columns: auto minmax(0, 1fr) 288px; }
.side { flex-direction: row; }
.rail { flex: none; width: 72px; display: flex; flex-direction: column; align-items: stretch; gap: 2px; padding: 8px 6px; background: var(--bg); border-right: 1px solid var(--line); overflow-y: auto; }
.rail button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 9px 2px 7px; border: 0; border-radius: var(--r8); background: transparent; color: var(--muted); font-size: 11px; font-weight: 500; line-height: 1.1; position: relative; }
.rail button svg { width: 22px; height: 22px; }
.rail button:hover { background: var(--hover); color: var(--text); }
.rail button.on { background: color-mix(in srgb, var(--acc) 16%, transparent); color: var(--text); }
.rail button.on::before { content: ""; position: absolute; left: -6px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--acc); }
.rail button.on svg { color: var(--acc); }
.rail .sp { flex: 1; }
.rail .fold { padding: 8px 2px; }
.side.folded .rail .fold svg { transform: rotate(180deg); }
.side.folded .rail button.on { background: transparent; }
.side.folded .rail button.on::before { display: none; }
.panes { width: 300px; display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.side.folded .panes { display: none; }
.pane .ptitle { margin: 0 0 14px; font-size: 15px; font-weight: 700; letter-spacing: .01em; }
.pane .ptitle + h4 { margin-top: 0; }

/* studio (brauzer) rejimi: lokal serverə bağlı hissələr gizlənir */
.web .nodeonly { display: none !important; }
.brand .back { color: var(--muted); text-decoration: none; font-size: 22px; line-height: 1; margin-right: 6px; padding: 0 4px; border-radius: 6px; }
.brand .back:hover { color: var(--text); background: var(--hover); }
.webonly { display: none; }
.web .webonly { display: block; }

/* ---------- Səs paneli: kartlar ---------- */
.acard { background: var(--panel2); border: 1px solid var(--line); border-radius: var(--r8, 8px); padding: 12px; margin: 0 0 12px; }
.acard__h { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 13px; }
.acard__ic { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: var(--input, #0e1116); border: 1px solid var(--line); font-size: 12px; flex: none; }
.acard__full { width: 100%; display: block; }
.acard select.acard__full { margin-bottom: 12px; }
.acard__lbl { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.acard__val { color: var(--text); font-variant-numeric: tabular-nums; }
.acard input[type=range].acard__full { margin: 0 0 6px; }
.acard button.wide { margin: 8px 0 0; white-space: normal; line-height: 1.3; text-wrap: balance; }
.acard .meter { margin: 8px 0 0; }
.acard .hint { margin: 8px 0 0; line-height: 1.45; }
.acard .warn { margin: 0 0 8px; line-height: 1.45; }
.acard .warn small { display: block; margin-top: 6px; opacity: .85; }
.acard__how { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.acard__how summary, .acard--more > summary { cursor: pointer; color: var(--muted); font-size: 12px; list-style-position: inside; }
.acard__how summary:hover, .acard--more > summary:hover { color: var(--text); }
.acard__how .steps { margin: 8px 0 0; line-height: 1.45; }
.acard--more[open] > summary { margin-bottom: 10px; }
.acard--more textarea { width: 100%; margin-top: 6px; }

/* ---------- Timeline v2: səliqəli və ağıllı ---------- */
.tl { position: relative; grid-template-columns: 148px minmax(0, 1fr); background: var(--bg); }
.tl.over::after { content: ""; position: absolute; inset: 4px; border: 2px dashed var(--acc); border-radius: var(--r8); background: rgba(225,10,30,.06); pointer-events: none; z-index: 20; }
.tl-heads { padding-top: 28px; background: var(--panel); }
.tl-heads div { height: 48px; padding: 0 12px; gap: 10px; color: var(--text); font-size: 12px; font-weight: 500; border-bottom: 1px solid var(--line); box-shadow: inset 3px 0 0 var(--tc); }
.tl-ic { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; font-size: 11px; color: #fff; background: color-mix(in srgb, var(--tc) 55%, #000); flex: none; }
.tl-scroll { scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }

/* xətkeş */
.ruler { height: 28px; background: var(--panel); border-bottom: 1px solid var(--line); }
.ruler span { top: 0; height: 100%; border-left: 1px solid var(--line2); padding-left: 4px; font-size: 10px; line-height: 16px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ruler i { position: absolute; bottom: 0; height: 5px; border-left: 1px solid var(--line); }

/* treklər */
.lane { height: 48px; border-bottom: 1px solid var(--line); background: transparent; }
.lane:nth-child(odd) { background: rgba(255,255,255,.015); }
.lane__empty { position: absolute; inset: 6px 8px; display: flex; align-items: center; padding: 0 12px; border: 1px dashed var(--line2); border-radius: var(--r6); color: var(--muted); font-size: 12px; pointer-events: none; }

/* kliplər */
.clip { top: 5px; height: 38px; padding: 0; border-radius: var(--r6); border: 1px solid rgba(255,255,255,.14); box-shadow: 0 1px 2px rgba(0,0,0,.35); overflow: hidden; cursor: grab; transition: box-shadow .12s; }
.clip:hover { border-color: rgba(255,255,255,.32); }
.clip.sel { outline: none; border-color: #fff; box-shadow: 0 0 0 1px #fff, 0 0 0 4px rgba(255,255,255,.18); z-index: 3; }
.clip.G1 { background: linear-gradient(180deg, #8c62ff, #6a3ff0); }
.clip.G2 { background: linear-gradient(180deg, #2f7bff, #1557e6); }
.clip.V1 { background: #232c3b; }
.clip.A2 { background: linear-gradient(180deg, #0f7d52, #0a5e3d); }
.clip__lbl { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: center; height: 100%; padding: 0 9px; min-width: 0; pointer-events: none; }
.clip__lbl b { font-size: 11px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.clip__lbl small { display: block; font-size: 10px; opacity: .8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.clip.tiny .clip__lbl { padding: 0 3px; } .clip.tiny .clip__lbl small { display: none; }
.clip.V1 .clip__lbl { justify-content: flex-start; padding-top: 3px; background: linear-gradient(180deg, rgba(0,0,0,.65), rgba(0,0,0,0) 70%); }
.clip.V1 .clip__lbl small { display: none; }
.clip__film { position: absolute; inset: 0; display: flex; pointer-events: none; opacity: .9; }
.clip__film i { flex: 0 0 64px; height: 100%; background: #1b222e center / cover no-repeat; border-right: 1px solid rgba(0,0,0,.35); }
.clip__film.img { background: center / auto 100% repeat-x; }
.clip__wave { position: absolute; left: 0; top: 0; height: 100%; pointer-events: none; }
.clip.A2 .clip__lbl { justify-content: flex-start; padding-top: 3px; }
/* kənar tutacaqları */
.clip .h { position: absolute; top: 0; bottom: 0; width: 8px; z-index: 2; cursor: ew-resize; background: transparent; }
.clip .h::after { content: ""; position: absolute; top: 50%; width: 3px; height: 16px; margin-top: -8px; border-radius: 2px; background: rgba(255,255,255,.85); opacity: 0; transition: opacity .12s; }
.clip .h.l::after { left: 2px; } .clip .h.r::after { right: 2px; }
.clip:hover .h::after, .clip.sel .h::after { opacity: .9; }
.clip .h:hover { background: rgba(255,255,255,.14); }
body.tl-moving, body.tl-moving * { cursor: grabbing !important; }
body.tl-trimming, body.tl-trimming * { cursor: ew-resize !important; }

/* boşluq (videoda qara kadr) */
.gap { position: absolute; top: 5px; height: 38px; border-radius: var(--r6); background: repeating-linear-gradient(135deg, rgba(225,10,30,.16) 0 6px, transparent 6px 12px); border: 1px dashed rgba(225,10,30,.45); display: grid; place-items: center; }
.gap__x { padding: 2px 8px; font-size: 12px; line-height: 1.2; border-radius: 999px; background: var(--panel); border: 1px solid rgba(225,10,30,.6); color: #ff8a95; opacity: 0; transition: opacity .12s; }
.gap:hover .gap__x { opacity: 1; }
.gap__x:hover { background: var(--acc); color: #fff; }

/* kursor, yapışma xətti, ipucu */
.ph { width: 2px; margin-left: -1px; background: var(--acc); box-shadow: 0 0 6px rgba(225,10,30,.5); }
.ph::before { top: 0; left: -6px; width: 14px; height: 14px; border: 0; border-radius: 3px 3px 7px 7px; background: var(--acc); }
.snapline { position: absolute; top: 28px; bottom: 0; width: 0; margin-left: -1px; border-left: 2px dashed #ffd23f; z-index: 6; pointer-events: none; }
.tl-tip { position: absolute; z-index: 30; padding: 4px 8px; border-radius: 6px; background: #0a0c10; border: 1px solid var(--line2); color: var(--text); font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; pointer-events: none; box-shadow: 0 4px 12px rgba(0,0,0,.4); }
.tl-tip span { color: var(--muted); }

/* miqyas idarəsi */
.zoomgrp { display: flex; align-items: center; gap: 2px; padding: 2px; background: var(--input); border: 1px solid var(--line); border-radius: var(--r8); }
.zoomgrp button { padding: 3px 9px; border: 0; background: transparent; color: var(--muted); font-size: 14px; line-height: 1.2; }
.zoomgrp button:hover { background: var(--hover); color: var(--text); }
.zoomgrp input[type=range] { width: 110px; }

/* inspektor: qısayollar */
.keys { padding: 4px 2px; }
.keys > b { display: block; margin: 6px 0 8px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.keys dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; margin: 0; font-size: 12px; }
.keys dt { justify-self: start; padding: 1px 6px; border: 1px solid var(--line2); border-bottom-width: 2px; border-radius: 5px; background: var(--input); color: var(--text); font-size: 11px; white-space: nowrap; }
.keys dd { margin: 0; color: var(--muted); align-self: center; }
body { grid-template-rows: 56px minmax(0, 1fr) 250px; } /* 4 trek + xətkeş + sürüşdürmə zolağı tam görünsün */
/* klip adı görünən hissənin solunda qalsın (klip ekrandan kənardan başlayanda da) */
.clip { overflow: clip; }
.clip__lbl { position: sticky; left: 0; width: fit-content; max-width: 100%; }
.clip.V1 .clip__lbl { padding-right: 14px; }
.transport .zoomgrp { flex: none; }
.transport .zoomgrp input[type=range] { width: 72px; }

/* ---------- keçidlər ---------- */
/* keçid zolağı kliplərin aşağı yarısında — yuxarı yarıda kənar tutacaqları işləməyə davam edir */
.tr { position: absolute; top: 22px; height: 18px; z-index: 4; display: grid; place-items: center; border-radius: 9px; cursor: pointer;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.75); box-shadow: 0 1px 4px rgba(0,0,0,.5); backdrop-filter: blur(2px); }
.tr span { font-size: 11px; line-height: 1; color: #fff; text-shadow: 0 1px 2px #000; }
.tr:hover { background: rgba(255,255,255,.3); }
.tr--cross { background: linear-gradient(90deg, rgba(255,255,255,.05), rgba(255,255,255,.4), rgba(255,255,255,.05)); }
.tr--black { background: linear-gradient(90deg, rgba(0,0,0,.2), rgba(0,0,0,.9), rgba(0,0,0,.2)); }
.tr--white { background: linear-gradient(90deg, rgba(255,255,255,.1), rgba(255,255,255,.85), rgba(255,255,255,.1)); }
.tr--white span { color: #111; text-shadow: none; }
.tr--push { background: repeating-linear-gradient(90deg, rgba(255,255,255,.08) 0 6px, rgba(255,255,255,.3) 6px 12px); }
.tr-add { position: absolute; top: 3px; z-index: 4; width: 18px; height: 18px; margin-left: -9px; padding: 0; border-radius: 50%; font-size: 13px; line-height: 16px; text-align: center;
  background: var(--panel); border: 1px solid var(--line2); color: var(--muted); opacity: 0; transition: opacity .12s, transform .12s; }
.tr-add.edge { width: 16px; height: 16px; margin-left: -8px; line-height: 14px; font-size: 12px; }
.lane[data-track="V1"]:hover .tr-add { opacity: 1; }
.tr-add:hover { background: var(--acc); border-color: var(--acc); color: #fff; transform: scale(1.12); }

/* keçid pəncərəsi */
.trpop { position: fixed; z-index: 60; width: 264px; padding: 12px; border-radius: var(--r12, 12px); background: var(--panel); border: 1px solid var(--line2); box-shadow: 0 12px 32px rgba(0,0,0,.55); }
.trpop__h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 13px; }
.trpop__x { padding: 2px 8px; }
.trpop__types { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 12px; }
.trpop__types button { display: flex; align-items: center; gap: 6px; padding: 7px 8px; font-size: 12px; text-align: left; white-space: normal; line-height: 1.2; }
.trpop__types button span { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 5px; background: var(--input); flex: none; }
.trpop__types button.on { border-color: var(--acc); background: rgba(225,10,30,.14); color: #fff; }
.trpop input[type=range] { width: 100%; margin: 2px 0 10px; }
.trpop__row { display: flex; gap: 6px; }
.trpop__row button { flex: 1; padding: 6px 8px; font-size: 12px; }
.trpop__del:hover { border-color: var(--acc); color: #ff8a95; }

/* şablonlar v2: kiçik şəkil, teqlər, aktiv şablon; kadr ölçüsündə öz düzülüş nöqtəsi */
.tpls .tp__th { flex: none; width: 64px; height: 36px; object-fit: contain; background: #0b0d11; border-radius: 6px; border: 1px solid rgba(255,255,255,.1); }
.tpls .tp.cur { border-color: color-mix(in srgb, var(--acc) 70%, var(--line)); background: color-mix(in srgb, var(--acc) 9%, var(--panel2)); }
.tpls .tp__n { display: block; overflow: hidden; text-overflow: ellipsis; }
.tpls .tp__tags { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 3px; }
.tpls .tp__tags:empty { display: none; }
.tag { font-style: normal; font-size: 10px; font-weight: 600; line-height: 1; padding: 3px 5px; border-radius: 4px; background: var(--input); color: var(--muted); }
.tag--cur { background: color-mix(in srgb, var(--acc) 22%, transparent); color: var(--text); }
.tag--def { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.tpls .tp button.upd { color: var(--acc); }
.aspects button { position: relative; }
.aspects button.own::after { content: ""; position: absolute; top: 3px; right: 3px; width: 5px; height: 5px; border-radius: 50%; background: var(--warn); }
.aspects button.on.own::after { background: #fff; }
.trpop__warn { margin: -4px 0 10px; padding: 7px 9px; border-radius: 8px; font-size: 11.5px; line-height: 1.35; color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); }

/* müstəqil redaktor (onairtv.site/redaktor/) */
.soloonly { display: none !important; }
.solo .soloonly { display: block !important; }
.soloinline { display: none !important; }
.solo .soloinline { display: inline-block !important; }
.solo .studioonly { display: none !important; }
