:root{--bg:#f6f5fb;--fg:#15131f;--mut:#5d5a70;--card:#fff;--line:#e4e1ef;--acc:#6d3df5;--acc2:#e0477a}
*{box-sizing:border-box}html{-webkit-text-size-adjust:100%}
body{margin:0;font:16px/1.6 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;background:var(--bg);color:var(--fg)}
a{color:var(--acc)}
.wrap{max-width:1120px;margin:0 auto;padding:0 18px}
header.top{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px;max-width:1120px;margin:0 auto}
.logo{font-weight:800;font-size:20px;text-decoration:none;color:var(--fg);letter-spacing:-.02em}.logo b{color:var(--acc)}
header.top nav a{margin-left:14px;color:var(--mut);text-decoration:none;font-size:14px}
h1{font-size:clamp(28px,4.4vw,44px);line-height:1.12;letter-spacing:-.03em;margin:10px 0 8px}
.lede{font-size:18px;color:var(--mut);max-width:760px;margin:0 0 6px}
.badges{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 18px;padding:0;list-style:none}.badges li{background:#ece7ff;color:#3d2a8c;border-radius:99px;padding:3px 12px;font-size:13px;font-weight:600}
#st-tool{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.05fr);gap:18px;background:var(--card);border:1px solid var(--line);border-radius:18px;padding:16px;box-shadow:0 10px 30px rgba(40,20,90,.06)}
@media(max-width:820px){#st-tool{grid-template-columns:1fr;padding:12px}}
.st-stage{display:flex;flex-direction:column;gap:8px;position:sticky;top:10px;align-self:start}
@media(max-width:820px){.st-stage{position:static}}
.st-frame{background:#0b0d12;border-radius:12px;overflow:hidden;max-height:70vh;margin:0 auto;width:100%;display:flex;justify-content:center}
.st-frame canvas{display:block;height:100%;width:100%;object-fit:contain;max-height:70vh}
.st-ctl{display:flex;align-items:center;gap:10px}.st-ctl input[type=range]{flex:1}
#st-play{width:42px;height:42px;border-radius:50%;border:0;background:var(--acc);color:#fff;font-size:15px;cursor:pointer}
#st-time{font-variant-numeric:tabular-nums;font-size:13px;color:var(--mut);min-width:84px;text-align:right}
.st-side{display:flex;flex-direction:column;gap:12px;min-width:0}
#st-drop{border:2px dashed #c9c0ee;border-radius:14px;padding:18px;text-align:center;background:#faf9ff;transition:.15s}
#st-drop.over{border-color:var(--acc);background:#efeaff}
#st-drop p{margin:6px 0 0;font-size:13px;color:var(--mut)}
.st-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;border:1px solid var(--line);background:#fff;color:var(--fg);border-radius:10px;padding:9px 14px;font:600 15px system-ui,sans-serif;cursor:pointer;text-decoration:none}
.st-primary{background:var(--acc);border-color:var(--acc);color:#fff}
.st-big{font-size:17px;padding:12px 20px}
#st-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px;max-height:340px;overflow:auto}
.st-slide{display:flex;gap:10px;align-items:center;border:1px solid var(--line);border-radius:10px;padding:6px;background:#fff}
.st-slide.drag{opacity:.4}.st-slide.tgt{border-color:var(--acc);box-shadow:0 0 0 2px #d9ceff}
.st-slide img{width:56px;height:56px;object-fit:cover;border-radius:6px;cursor:grab;flex:none}
.st-sf{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}
.st-sf input[type=text]{width:100%;border:1px solid var(--line);border-radius:7px;padding:6px 8px;font:14px system-ui,sans-serif}
.st-sf label{font-size:12px;color:var(--mut)}.st-sf input[type=number]{width:64px;border:1px solid var(--line);border-radius:6px;padding:3px 5px;font-size:13px}
.st-sb{display:flex;flex-direction:column;gap:2px}.st-sb button{border:1px solid var(--line);background:#fff;border-radius:6px;width:30px;height:24px;cursor:pointer;font-size:13px;line-height:1}
.st-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.st-grid label,.st-row label{display:flex;flex-direction:column;font-size:12px;font-weight:600;color:var(--mut);gap:3px}
.st-grid select,.st-row select,.st-grid input[type=number]{font:15px system-ui,sans-serif;padding:7px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--fg)}
.st-row{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.st-chk{flex-direction:row!important;align-items:center;gap:6px!important;font-size:14px!important;color:var(--fg)!important}
.st-box{border:1px solid var(--line);border-radius:12px;padding:10px 12px}
.st-box h3{margin:0 0 8px;font-size:14px}
.st-msg{font-size:13px;color:var(--mut);min-height:1.2em;margin:0}.st-msg.err{color:#b4233c}
#st-prog{background:#eee9fb;border-radius:99px;height:10px;overflow:hidden}#st-bar{height:100%;width:0;background:linear-gradient(90deg,var(--acc),var(--acc2));transition:width .2s}
#st-ptxt,.st-small{font-size:12.5px;color:var(--mut);margin:4px 0}
#st-out video{width:100%;max-height:360px;border-radius:10px;background:#000;margin-top:6px}
.st-dl{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
.busy .st-side select,.busy .st-side input{pointer-events:none;opacity:.6}
section.copy{max-width:780px;margin:38px auto 0}
section.copy h2{font-size:24px;letter-spacing:-.02em;margin:30px 0 8px}
section.copy ol li,section.copy ul li{margin:4px 0}
details{border:1px solid var(--line);background:#fff;border-radius:10px;padding:10px 14px;margin:8px 0}summary{font-weight:700;cursor:pointer}
.rel{display:flex;flex-wrap:wrap;gap:8px;padding:0;list-style:none}.rel a{display:block;background:#fff;border:1px solid var(--line);border-radius:99px;padding:5px 12px;text-decoration:none;font-size:14px}
footer{margin:48px 0 0;padding:22px 18px;border-top:1px solid var(--line);color:var(--mut);font-size:14px;text-align:center}footer a{color:var(--mut);margin:0 8px}
.st-btn[hidden]{display:none}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
#st-beat:not([hidden]){display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;margin-top:10px}#st-beat-status{flex-basis:100%}
@media(max-width:768px){body{padding-bottom:84px}#st-export,.has-dl .st-dl{position:fixed;left:12px;right:12px;bottom:max(12px,env(safe-area-inset-bottom));z-index:50;margin:0;box-shadow:0 6px 24px rgba(40,20,90,.28)}#st-export{width:auto}.has-dl #st-export{position:static;box-shadow:none}.has-dl .st-dl{background:#fff;border-radius:14px;padding:8px}.has-dl .st-dl .st-btn{flex:1}}
