
/* ===== softtech editor v5 — pro dark look + timeline editor ===== */
:root{--bg:#0b0b0e;--s1:#141419;--s2:#1c1c23;--s3:#26262f;--line:#24242c;--tx:#f4f4f6;--mu:#9a9aa6;--ac:#f2f2f5;--ac2:#d9d9de;--grad:linear-gradient(135deg,#f2f2f5 0%,#d9d9de 55%,#e6e6ea 100%)}
svg{display:block}
/* home */
#home .topbar{border-bottom:0;background:linear-gradient(#0b0b0e,rgba(11,11,14,.85));backdrop-filter:blur(10px)}
#home .brand span{font-weight:800;letter-spacing:-.3px}
.hero{padding-top:6px}
.newProj{width:100%;border:0;border-radius:22px;padding:22px 18px;display:flex;align-items:center;gap:16px;text-align:left;background:var(--grad);color:#0c0c0f;box-shadow:0 8px 26px rgba(0,0,0,.45);position:relative;overflow:hidden}
.newProj:after{content:"";position:absolute;right:-40px;top:-50px;width:170px;height:170px;border-radius:50%;background:rgba(12,12,15,.05)}
.newProj .np{width:54px;height:54px;border-radius:16px;background:#0c0c0f;color:#fff;display:grid;place-items:center;flex:0 0 auto}
.newProj .np svg{width:30px;height:30px;stroke-width:2.4}
.newProj b{display:block;font-size:21px;font-weight:800;letter-spacing:-.3px}.newProj small{display:block;font-size:13.5px;opacity:.9;margin-top:2px}
.quick{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:12px}
.quick button{border:1px solid var(--line);background:var(--s1);border-radius:16px;padding:14px 6px 12px;display:flex;flex-direction:column;align-items:center;gap:8px;font-size:12.5px;font-weight:600;color:var(--tx)}
.quick i{width:42px;height:42px;border-radius:13px;display:grid;place-items:center}
.quick i svg{width:24px;height:24px}
.quick .q1 i{background:rgba(255,255,255,.18);color:#c9c9ce}.quick .q2 i{background:rgba(255,255,255,.16);color:var(--ac2)}.quick .q3 i{background:rgba(62,207,142,.15);color:#3ecf8e}
.sec{display:flex;align-items:baseline;gap:8px;font-size:17px;font-weight:800;letter-spacing:-.2px}
.projRow{display:flex;gap:10px;overflow-x:auto;scrollbar-width:none;padding-bottom:4px}.projRow::-webkit-scrollbar{display:none}
.projIt{flex:0 0 auto;width:104px;position:relative}
.projTh{width:104px;height:138px;border-radius:14px;border:1px solid var(--line);background:var(--s2) center/cover no-repeat;display:block;position:relative;padding:0}
.projDur{position:absolute;right:6px;bottom:6px;background:rgba(0,0,0,.65);font-size:11px;padding:2px 6px;border-radius:6px}
.projIt>b{display:block;font-size:11.5px;font-weight:500;color:var(--mu);margin-top:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.projDel{position:absolute;top:5px;right:5px;width:26px;height:26px;border-radius:50%;border:0;background:rgba(0,0,0,.6);color:#fff;padding:5px}
/* timeline editor */
.tl{background:#000}
.tlTop{display:flex;align-items:center;gap:4px;padding:8px 8px 6px;padding-top:max(8px,env(safe-area-inset-top));flex:0 0 auto;background:#000}
.tlTop .sp{flex:1}
.ib svg{width:22px;height:22px}
.tlTop .ib{width:42px;height:42px;border:0;background:none;border-radius:12px;display:grid;place-items:center;color:var(--tx)}
.tlTop .ib:disabled{opacity:.3}
.tlRatioBtn{border:1px solid #2c2c35;background:#121217;border-radius:9px;padding:6px 10px;font-size:13px;font-weight:700;color:var(--tx);margin-left:2px}
.tlExp{display:flex;align-items:center;gap:6px;border:0;border-radius:11px;padding:9px 14px;background:var(--grad);color:#0c0c0f;font-weight:800;font-size:14px;margin-left:4px}
.tlExp svg{width:18px;height:18px;stroke-width:2.3}.tlExp:disabled{opacity:.4}
.tlStage{flex:1 1 auto;min-height:150px;display:flex;align-items:center;justify-content:center;position:relative;background:#000}
#tlCv{border-radius:4px;touch-action:none;background:#000;box-shadow:0 0 0 1px #1d1d24}
.tlEmpty{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;color:var(--mu)}
.tlEmpty .btn{display:flex;align-items:center;gap:8px}.tlEmpty .btn svg{width:20px;height:20px}
.tlCtl{display:flex;align-items:center;justify-content:space-between;padding:4px 12px;flex:0 0 auto;font-size:12.5px;color:#b9b9c3;font-variant-numeric:tabular-nums;background:#000}
.tlCtl>span:first-child{min-width:110px}
.tlPlay{width:42px;height:42px;border-radius:50%;border:0;background:#fff;color:#000;display:grid;place-items:center}.tlPlay svg{width:20px;height:20px}
.tlZoom{display:flex;gap:2px;min-width:110px;justify-content:flex-end}
.ib.sm{width:34px;height:34px;border:0;background:none;color:#b9b9c3;display:grid;place-items:center;border-radius:10px}.ib.sm svg{width:19px;height:19px}
.tlTW{position:relative;flex:0 0 auto;height:208px;background:#101014;border-top:1px solid #1c1c22}
.tlTL{position:absolute;inset:0;overflow-x:auto;overflow-y:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch}.tlTL::-webkit-scrollbar{display:none}
.tlIn{position:relative;min-height:100%;padding-bottom:10px}
.tlRuler{position:relative;height:22px}
.tlRuler span{position:absolute;top:5px;font-size:10px;color:#6e6e7a;transform:translateX(-50%)}
.tlRuler i{position:absolute;top:10px;width:3px;height:3px;border-radius:50%;background:#3a3a44;margin-left:-1.5px}
.tlRow{position:relative;height:54px;margin:2px 0 6px}
.tlClip{position:absolute;top:0;height:54px;border-radius:7px;background:#23232b left center/auto 100% repeat-x;overflow:hidden;cursor:pointer}
.tlClip.sel{outline:2px solid #fff;outline-offset:0;overflow:visible;z-index:3}
.tlClip .lab{position:absolute;left:4px;bottom:3px;display:flex;align-items:center;gap:3px;background:rgba(0,0,0,.62);font-size:10px;font-weight:600;padding:1px 5px;border-radius:5px;white-space:nowrap}
.tlClip .lab em{font-style:normal;display:flex;color:var(--ac2)}.tlClip .lab svg{width:11px;height:11px}
.h{position:absolute;top:-2px;bottom:-2px;width:20px;background:#fff;touch-action:none;z-index:4;cursor:ew-resize}
.h:after{content:"";position:absolute;left:8px;top:35%;bottom:35%;width:3px;border-radius:2px;background:#111}
.hL{left:-20px;border-radius:7px 0 0 7px}.hR{right:-20px;border-radius:0 7px 7px 0}
.tlItem .h{width:14px}.tlItem .h:after{left:5.5px}.tlItem .hL{left:-14px}.tlItem .hR{right:-14px}
.tlTr{position:absolute;top:15px;width:24px;height:24px;margin-left:-12px;border-radius:7px;border:0;background:#fff;color:#111;z-index:5;padding:3px;box-shadow:0 2px 6px rgba(0,0,0,.5)}
.tlTr.on{background:var(--ac);color:#0c0c0f}.tlTr svg{width:18px;height:18px;stroke-width:2.3}
.tlLanes{position:relative;margin-bottom:4px}
.tlItem{text-align:left;position:absolute;height:27px;border-radius:7px;font-size:12px;line-height:27px;padding:0 8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#fff;cursor:pointer}
.tlItem.text{background:#5a5a64}.tlItem.sticker{background:#9a9aa3}.tlItem.music{background:#16805e;display:flex;align-items:center;gap:6px;height:30px}
.tlItem.music svg{width:15px;height:15px;flex:0 0 auto}.tlItem.music span{overflow:hidden;text-overflow:ellipsis}
.tlItem.sel{outline:2px solid #fff;overflow:visible;z-index:3}
.arow{height:32px;margin:0}
.tlGhost{position:absolute;height:27px;border:1px dashed #3a3a46;background:#15151b;border-radius:7px;color:#9a9aa6;font-size:12px;display:flex;align-items:center;gap:6px;padding:0 10px;white-space:nowrap}
.tlGhost svg{width:15px;height:15px}
.tlPH{position:absolute;top:0;bottom:0;left:50%;width:2px;margin-left:-1px;background:#fff;pointer-events:none;z-index:8;box-shadow:0 0 6px rgba(0,0,0,.6)}
.tlPH:before{content:"";position:absolute;top:0;left:-4px;width:10px;height:10px;border-radius:0 0 5px 5px;background:#fff}
.tlPlus{position:absolute;right:10px;top:31px;width:40px;height:40px;border-radius:11px;border:0;background:#fff;color:#000;z-index:9;display:grid;place-items:center;box-shadow:0 4px 14px rgba(0,0,0,.6)}
.tlPlus svg{width:24px;height:24px;stroke-width:2.6}
.tlBar{display:flex;overflow-x:auto;gap:0;padding:6px 4px calc(6px + var(--safe-b));background:#0b0b0e;border-top:1px solid #1c1c22;flex:0 0 auto;scrollbar-width:none;min-height:70px}
.tlBar::-webkit-scrollbar{display:none}
.tlBar button{flex:0 0 auto;min-width:66px;display:flex;flex-direction:column;align-items:center;gap:5px;background:none;border:0;color:#e9e9ee;font-size:11px;padding:6px 4px;border-radius:12px}
.tlBar button svg{width:24px;height:24px}.tlBar button:active{background:#1a1a21}
.tlBar .bk{min-width:46px;border-right:1px solid #24242c;border-radius:0;margin-right:4px;justify-content:center}
.tlBar button.on{color:var(--ac2)}
.tlPanel{position:relative;flex:0 0 auto;max-height:50%;background:#141419;border-radius:18px 18px 0 0;transform:translateY(105%);transition:transform .24s cubic-bezier(.2,.8,.2,1);z-index:30;display:flex;flex-direction:column;box-shadow:0 -12px 40px rgba(0,0,0,.6);border-top:1px solid #26262f}
.tlPanel.open{transform:none}
.tlPanelH{display:flex;align-items:center;justify-content:space-between;padding:12px 14px 8px}
.tlPanelH b{font-size:15px}
.tlOk{width:40px;height:34px;border-radius:10px;border:0;background:var(--grad);color:#0c0c0f;display:grid;place-items:center}.tlOk svg{width:20px;height:20px;stroke-width:2.6}
.tlPanelB{overflow-y:auto;padding:2px 14px calc(16px + var(--safe-b))}
.tlSl{display:grid;grid-template-columns:1fr auto;gap:2px 8px;margin:10px 0 4px;font-size:13px;color:#c9c9d2}
.tlSl b{font-weight:600;color:#fff;font-variant-numeric:tabular-nums}
.tlSl input{grid-column:1/3;width:100%;accent-color:var(--ac);height:28px}
.tlChips{display:flex;gap:8px;overflow-x:auto;padding:4px 0 6px;scrollbar-width:none}.tlChips::-webkit-scrollbar{display:none}
.tlChips.grid{flex-wrap:wrap}
.tlChip{flex:0 0 auto;border:1px solid #2c2c36;background:#1b1b22;border-radius:11px;padding:9px 13px;font-size:13px;color:#e9e9ee;display:flex;align-items:center;gap:7px}
.tlChip.on{border-color:var(--ac);background:rgba(255,255,255,.14);color:#fff}
.tlChips.tabs .tlChip{border-radius:99px;padding:7px 14px}
.tlChips.ratio .tlChip{flex-direction:column;gap:5px;min-width:86px;padding:10px 8px;font-weight:700}
.tlChips.ratio i{display:block;border:2px solid currentColor;border-radius:3px}.tlChips.ratio small{font-weight:400;font-size:10px;color:var(--mu);text-align:center}
.tlChips.swatch{flex-wrap:wrap}.tlChips.swatch .tlChip{padding:4px;border-radius:50%}
.tlChips.swatch .tlChip:has(span),.tlChips.swatch .tlChip{min-width:0}
.tlChips.swatch i{display:block;width:28px;height:28px;border-radius:50%;border:1px solid rgba(255,255,255,.25)}
.tlChips.swatch i.no{background:linear-gradient(135deg,transparent 45%,#ff5d5d 45%,#ff5d5d 55%,transparent 55%),#222}
.tlChips.swatch i.bl{background:radial-gradient(circle at 35% 35%,#e6e6ea,#6e6e78);filter:blur(1px)}
.tlChips.swatch .tlChip:not(:has(i.no)):not(:has(i.bl)):first-child{padding:4px}
.tlChips.swatch .tlChip{color:#ddd;font-size:12px}
.tlNote{font-size:12.5px;color:var(--mu);margin:8px 0}
.tlSec{font-size:12px;text-transform:uppercase;letter-spacing:.6px;color:#8a8a96;margin:12px 0 4px;font-weight:700}
.tlBtns{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.tlBtns .btn{display:flex;align-items:center;gap:6px;flex:1 1 auto;justify-content:center}.tlBtns svg{width:18px;height:18px}
.tlPanelB .btn.wide{display:flex;align-items:center;justify-content:center;gap:8px;margin-top:10px}.tlPanelB .btn.wide svg{width:19px;height:19px}
.tlFilters{display:flex;gap:10px;overflow-x:auto;padding:4px 0 8px;scrollbar-width:none}.tlFilters::-webkit-scrollbar{display:none}
.tlFil{flex:0 0 auto;border:0;background:none;padding:0;display:flex;flex-direction:column;align-items:center;gap:5px;font-size:11.5px;color:#c9c9d2}
.tlFil canvas{width:64px;height:64px;border-radius:12px;border:2px solid transparent;background:#222}
.tlFil.on canvas{border-color:var(--ac)}.tlFil.on{color:#fff;font-weight:700}
.tlTa{width:100%;background:#0e0e12;border:1px solid #2c2c36;border-radius:12px;color:#fff;font:600 17px Heebo,sans-serif;padding:11px 12px;resize:none;margin-top:6px}
.tlFonts{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:6px 0}
.tlFont{border:1px solid #2c2c36;background:#1b1b22;border-radius:12px;padding:10px 4px 7px;font-size:19px;color:#fff;display:flex;flex-direction:column;align-items:center;gap:3px}
.tlFont small{font:400 10px Heebo,sans-serif;color:var(--mu)}.tlFont.on{border-color:var(--ac);background:rgba(255,255,255,.12)}
.tlEmo{display:grid;grid-template-columns:repeat(6,1fr);gap:6px;padding:4px 0}
.tlEmo button{border:0;background:#1b1b22;border-radius:12px;font-size:28px;aspect-ratio:1;line-height:1;padding:0}
.tlReo{display:flex;flex-wrap:wrap;gap:10px;padding:8px 0;touch-action:none}
.tlReoIt{width:72px;height:72px;border-radius:12px;background:#23232b center/cover;position:relative;touch-action:none;cursor:grab;transition:box-shadow .15s}
.tlReoIt b{position:absolute;left:5px;top:4px;font-size:11px;background:rgba(0,0,0,.65);border-radius:6px;padding:1px 6px}
.tlReoIt.drag{z-index:5;box-shadow:0 10px 24px rgba(0,0,0,.7),0 0 0 2px #fff;transition:none}
.toast{z-index:60}.sheetBg{z-index:50}.sheet{z-index:51}.busy{z-index:70}
@media (max-height:700px){.tlTW{height:182px}}
/* design editor + template screens: SVG toolbar icons */
.toolbar button span svg{width:23px;height:23px;margin:0 auto}

.tl.pOpen .tlTW,.tl.pOpen .tlBar{display:none}
.tlPanel{padding-bottom:0}
body:has(#tl.active) .toast{top:70px;bottom:auto}

/* ===== v6: multi-track audio rows + audio picker + record voice ===== */
.tl.hasAud .tlTW{height:252px}
@media (max-height:700px){.tl.hasAud .tlTW{height:214px}}
.tlAud{position:relative;margin:2px 0 6px}
.tlAud.empty .tlGhost{top:2px}
.tlAudLab{position:absolute;width:56px;display:flex;align-items:center;justify-content:flex-end;gap:3px;font-size:10px;color:#6e6e7a;font-weight:600;pointer-events:none;white-space:nowrap}
.tlAudLab svg{width:11px;height:11px;flex:0 0 auto}
.tlItem.aud{height:28px;padding:0;line-height:normal;border-radius:6px}
.tlItem.aud.k-music{background:#13795a}.tlItem.aud.k-voice{background:#2a5bc4}.tlItem.aud.k-sound{background:#a23a6a}.tlItem.aud.k-extract{background:#1b7f8e}
.tlItem.aud canvas.wv{position:absolute;left:0;top:3px;width:100%;height:22px;opacity:.6;pointer-events:none}
.tlItem.aud .an{position:absolute;left:4px;top:2px;display:flex;align-items:center;gap:3px;font-size:10px;font-weight:600;background:rgba(0,0,0,.42);padding:0 5px;border-radius:5px;line-height:15px;max-width:calc(100% - 8px);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;pointer-events:none}
.tlItem.aud .an svg{width:10px;height:10px;flex:0 0 auto}
.tlItem.aud .fi,.tlItem.aud .fo{position:absolute;top:0;bottom:0;pointer-events:none}
.tlItem.aud .fi{left:0;background:linear-gradient(to top right,transparent 50%,rgba(0,0,0,.45) 50%)}
.tlItem.aud .fo{right:0;background:linear-gradient(to top left,transparent 50%,rgba(0,0,0,.45) 50%)}
.tlItem.aud.sel{overflow:visible;z-index:4}
.tlRecBig{width:100%;display:grid;grid-template-columns:auto 1fr;column-gap:12px;row-gap:1px;align-items:center;text-align:left;border-radius:16px;padding:11px 14px;background:linear-gradient(135deg,#3a1517,#1b1b22);color:#fff;margin:2px 0 10px;border:1px solid #4a2124}
.tlRecBig span{grid-row:1/3;width:44px;height:44px;border-radius:50%;background:#e5383b;display:grid;place-items:center;box-shadow:0 0 0 4px rgba(229,56,59,.2)}
.tlRecBig span svg{width:22px;height:22px}
.tlRecBig b{font-size:15px}.tlRecBig small{font-size:12px;color:#c7aaab;line-height:1.3}
.atabs{margin-bottom:6px}
.tlAudBody .mitem{background:#0f0f13;border-color:#24242c}
.tlAudBody .mplay{flex:0 0 auto;width:38px;height:38px;border-radius:50%;background:#22222a;display:grid;place-items:center;padding:0;border:0;color:#fff}
.tlAudBody .mplay svg{width:16px;height:16px}
.tlAudBody .mtx{flex:1;min-width:0}.tlAudBody .mtx b{display:block;font-size:13.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tlAudBody .mtx small{display:block;font-size:11.5px;color:var(--mu)}
.tlAudBody .mchips{margin:8px 0}
.tlRec{display:flex;flex-direction:column;align-items:center;padding:6px 0 4px}
.tlRecT{font-size:36px;font-weight:800;font-variant-numeric:tabular-nums;letter-spacing:-.5px}
.tlRecM{width:80%;height:8px;border-radius:4px;background:#26262f;overflow:hidden;margin:10px 0 4px}
.tlRecM i{display:block;height:100%;width:0;background:linear-gradient(90deg,#3ecf8e,#ffd400 70%,#e5383b);transition:width .08s}
.tlRec .tlNote{text-align:center;max-width:300px}
.tlRecGo{width:76px;height:76px;border-radius:50%;border:4px solid #fff;background:transparent;display:grid;place-items:center;margin-top:6px;padding:0}
.tlRecGo span{width:56px;height:56px;border-radius:50%;background:#e5383b;transition:all .2s}
.tlRecGo.on span{width:28px;height:28px;border-radius:7px}
.tlNote.err{color:#ff8080}

/* ===== v18 AI tools (matches the existing look) ===== */
.tlBar button.aiB{color:var(--ac2)}
.tlBar button.aiB svg{filter:drop-shadow(0 0 6px rgba(255,255,255,.45))}
.aiNote{margin:2px 0 10px;font-size:13px;line-height:1.4;color:#c9c9d2}
.aiNote.sm{font-size:12px;color:var(--mu);margin-top:8px}
.aiGrid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:6px}
.aiTile{display:flex;flex-direction:column;align-items:flex-start;gap:3px;text-align:left;border:1px solid #2c2c36;background:#1b1b22;border-radius:16px;padding:13px 12px 12px;color:#e9e9ee;min-height:104px}
.aiTile i{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;background:rgba(255,255,255,.14);color:var(--ac2);margin-bottom:6px}
.aiTile i svg{width:23px;height:23px}
.aiTile b{font-size:14px;font-weight:700}.aiTile small{font-size:11.5px;color:var(--mu)}
.aiTile:active{transform:scale(.98);background:#22222b}
.aiTile.dis{opacity:.45}
.aiBack{display:inline-flex;align-items:center;gap:4px;border:0;background:none;color:var(--mu);font-size:13px;padding:0 0 8px;margin-left:-4px}
.aiBack svg{width:18px;height:18px}
.aiGo{min-height:50px;font-size:16px;font-weight:800;margin-top:4px}
