/* MusicStudio V2：Studio Shell 布局 */
:root{
  --rail-w:232px;--agent-w:430px;--player-h:440px;
  --stroke:rgba(151,196,191,.15);--stroke-strong:rgba(151,196,191,.28);
  --shell:#070d12;--shell-2:#0b161d;
}
body{
  background:
    radial-gradient(1200px 620px at 16% -12%,rgba(132,227,214,.09),transparent 60%),
    radial-gradient(900px 520px at 104% 112%,rgba(255,138,91,.06),transparent 62%),
    #070d12;
}

/* 顶栏 */
.topbar{height:64px;padding:0 18px;background:rgba(9,18,24,.9);backdrop-filter:blur(16px);border-bottom:1px solid var(--stroke)}
.logo{gap:10px;font-size:17px}
.logo .glyph{width:20px;height:20px}
.logo .sub{font-size:11px;color:var(--dim)}
.top-right{gap:6px}
.top-right .chip{height:30px;padding:0 11px;border-radius:999px;border-color:var(--stroke);background:rgba(255,255,255,.02);font-size:11px}
.top-right .chip:hover{border-color:var(--stroke-strong);color:var(--text)}
.top-right .chip.version{color:var(--muted)}
.top-right .user-trigger{height:34px;padding:0 8px 0 5px;gap:8px;border-radius:999px}
.top-right .user-trigger:hover{border-color:var(--stroke-strong)}

/* 工作区 */
.workspace{
  height:calc(100vh - 64px - 34px);
  padding:10px 12px;
  grid-template-columns:var(--rail-w) 10px minmax(0,1fr) 10px var(--agent-w);
}
.panel{
  border:1px solid var(--stroke);
  border-radius:14px;
  overflow:hidden;
  background:linear-gradient(180deg,rgba(18,33,42,.96),rgba(11,22,29,.99));
  box-shadow:0 20px 54px rgba(0,0,0,.28);
}
.splitter,.splitter.v{border:0;background:transparent}
.splitter.v::after{left:4px;width:2px;height:30px;border-radius:2px;background:transparent}
.splitter.v:hover::after{background:var(--accent)}
.panel-head{height:52px;padding:0 16px;border-bottom:1px solid var(--stroke);background:rgba(8,16,21,.35)}
.panel-head h2{font-size:14px;letter-spacing:.01em}

/* 任务栏 */
.task-list{display:flex;flex-direction:column;gap:6px;padding:8px 8px 10px}
.task{margin:0;padding:12px 13px;border:1px solid transparent;border-radius:10px;background:rgba(255,255,255,.014)}
.task:hover{background:rgba(132,227,214,.05);border-color:var(--stroke)}
.task.active{
  background:linear-gradient(90deg,rgba(132,227,214,.13),rgba(132,227,214,.03));
  border-color:rgba(132,227,214,.28);
  box-shadow:inset 3px 0 0 var(--accent);
}
.task .nm{font-size:13.5px;margin:3px 0 7px}
.task .no{font-size:9.5px}
.taskrail .panel-head .add{
  width:30px;height:30px;border-radius:8px;
  background:rgba(132,227,214,.08);border-color:var(--stroke);color:var(--accent);
}
.taskrail .foot{height:34px;padding:0 14px;border-top:1px solid var(--stroke);background:transparent;font-size:9.5px}
.batchbar{background:rgba(8,16,21,.6);border-top:1px solid var(--stroke)}

/* 舞台 */
.stage{background:linear-gradient(180deg,rgba(16,30,39,.97),rgba(9,18,24,.99))}
.stage-head{height:76px;padding:0 20px;border-bottom:1px solid var(--stroke)}
.tt .k{font-size:10px;color:var(--dim)}
.tt h1{font-size:22px;font-weight:600;letter-spacing:-.02em}
.timecode b{font-size:22px}
.timecode span{font-size:11px}
.viewport{
  margin:0 14px 12px;border:1px solid var(--stroke);border-radius:12px;
  background:
    radial-gradient(90% 110% at 50% 20%,rgba(132,227,214,.07),transparent 58%),
    radial-gradient(80% 90% at 50% 100%,rgba(255,138,91,.05),transparent 60%),
    #0b161d;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04);
}
.viewport::after{background:radial-gradient(120% 100% at 50% 50%,transparent 58%,rgba(0,0,0,.42))}
.empty-stage{inset:0;justify-content:center;align-items:center;text-align:center;gap:6px;padding:0 10%;background:transparent}
.empty-stage h2{margin:0;font-size:22px;letter-spacing:-.03em}
.empty-stage p{max-width:46ch;margin:0;font-size:13px;line-height:1.65;color:var(--text-2)}
.empty-notes{position:absolute;inset:0;pointer-events:none;overflow:hidden}
.empty-notes .note{position:absolute;left:var(--x);top:var(--y);width:var(--s);height:auto;color:var(--note-c,var(--accent));opacity:.3;animation:noteJump var(--dur,2.8s) cubic-bezier(.34,1.3,.5,1) infinite;animation-delay:var(--d,0s);will-change:transform,opacity}
@keyframes noteJump{
  0%,58%,100%{transform:translateY(0) rotate(var(--r,0deg)) scale(1);opacity:.34}
  8%{transform:translateY(-4px) rotate(var(--r,0deg)) scale(1.04);opacity:.5}
  22%{transform:translateY(-22px) rotate(calc(var(--r,0deg) + 4deg)) scale(1.12);opacity:.85}
  38%{transform:translateY(0) rotate(var(--r,0deg)) scale(.95);opacity:.6}
  46%{transform:translateY(-3px) rotate(var(--r,0deg)) scale(1.02);opacity:.45}
}
.viewport.is-empty #bars,.viewport.is-empty .vp-tag{opacity:0;pointer-events:none}
.transport{
  margin:0 14px 14px;height:54px;padding:0 14px;
  border:1px solid var(--stroke);border-radius:12px;background:rgba(8,16,21,.55);
}
.play{width:38px;height:34px;border-radius:9px;background:var(--accent);border-color:var(--accent);color:var(--on-accent);font-size:12px}
.play:hover{background:var(--accent-hover);color:var(--on-accent)}
.scope{height:5px;background:rgba(255,255,255,.07)}

/* 音轨 */
.tracks-head{height:30px;padding:0 16px;border-bottom:1px solid var(--stroke);color:var(--dim)}
.time-axis{height:24px;padding:0 16px 4px;border-bottom:1px solid var(--stroke)}
.track-scroll .row{height:34px;padding:0 16px;border-bottom:1px solid rgba(255,255,255,.035)}
.track-scroll .row:hover{background:rgba(132,227,214,.05)}
.track-scroll .row .role{
  justify-self:start;padding:2px 7px;border:1px solid var(--stroke);
  border-radius:999px;font-size:9.5px;color:var(--muted);
}
.tracks-foot{height:38px;padding:0 16px;border-top:1px solid var(--stroke);background:rgba(8,16,21,.45);font-size:9.5px}

/* 创作助手 */
.agent{background:linear-gradient(180deg,rgba(15,28,37,.98),rgba(9,18,24,.99))}
.agent .panel-head{background:rgba(8,16,21,.45)}
.agent .panel-head .model{padding:4px 8px;border:1px solid var(--stroke);border-radius:999px;font-size:9px;color:var(--text-2)}
.thread{padding:18px 16px;gap:14px}
.msg .who{font-size:9px;color:var(--dim)}
.msg .body{padding:11px 13px;border-radius:12px;border-color:var(--stroke);background:rgba(255,255,255,.035);font-size:13px;line-height:1.65}
.msg.user .body{background:rgba(132,227,214,.1);border-color:rgba(132,227,214,.24)}
.composer{margin:0 12px 12px;padding:12px;max-height:52vh;border:1px solid var(--stroke);border-radius:14px;background:rgba(8,16,21,.55)}
.input-wrap{padding:10px 12px;border-radius:11px;border-color:var(--stroke);background:rgba(5,12,16,.55)}
.input-wrap:focus-within{border-color:rgba(132,227,214,.45);box-shadow:0 0 0 3px rgba(132,227,214,.08)}
textarea{min-height:58px;font-size:13px;line-height:1.6}
.send{width:auto;min-width:66px;height:32px;padding:0 14px;border-radius:8px;font-size:12px;font-weight:600}
.hint{font-size:10px;line-height:1.55;color:var(--dim)}

/* 状态栏 */
.statusbar{height:34px;padding:0 18px;border-top:1px solid var(--stroke);background:rgba(7,14,19,.92);font-size:9.5px;color:var(--dim)}
.statusbar .right{gap:18px}

/* 登录门：跟随 V2 面板风格 */
.auth-gate{background:#0b161b}
.auth-visual{border-right-color:var(--stroke)}
.auth-panel{background:#0e1821}
.auth-card h2{letter-spacing:-.04em}
.auth-card .btn.primary{border-radius:9px}

@media(max-width:1320px){
  .top-right .chip[href="/batch.html"],.top-right #btnPerformance{display:none}
}
@media(max-width:1180px){
  :root{--rail-w:212px;--agent-w:380px}
}
@media(max-width:1010px){
  body{overflow:auto}
  .workspace{display:flex;flex-direction:column;height:auto;padding:8px;gap:10px}
  .splitter{display:none}
  .panel{border-radius:12px}
  .stage-top{height:auto}
  .viewport{flex:none;height:300px;min-height:300px}
  .agent{min-height:560px}
  .taskrail{max-height:42vh}
  .task-list{flex-direction:row;overflow-x:auto;padding:8px}
  .task{min-width:200px}
  .topbar{height:auto;min-height:64px;padding:10px 14px}
  .empty-stage h2{font-size:19px}
  .empty-stage p{font-size:12.5px;max-width:34ch}
  .empty-notes .note:nth-child(n+7){display:none}
}
@media(max-width:600px){
  .top-right{gap:4px}
  .statusbar span:nth-child(3),.statusbar .sep{display:none}
}
