:root{--bg: #111827;--panel: #1f2937;--panel2: #273244;--line: #374151;--text: #e5e7eb;--muted: #9ca3af;--accent: #f59e0b;--blue: #60a5fa;--green: #34d399;--red: #f87171;color-scheme:dark;font:15px/1.4 system-ui,-apple-system,Segoe UI,Roboto,sans-serif;background:var(--bg);color:var(--text)}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit;color:inherit}button{background:var(--panel2);border:1px solid var(--line);border-radius:8px;padding:.35rem .7rem;cursor:pointer}button:hover{border-color:var(--muted)}button.primary{background:var(--accent);color:#111827;border-color:var(--accent);font-weight:600}button.on{background:var(--accent);color:#111827;border-color:var(--accent)}button.solo.on{background:var(--blue);border-color:var(--blue)}button.mute.on{background:var(--red);border-color:var(--red)}button:disabled{opacity:.4;cursor:default}input[type=number],input[type=text],select{background:var(--bg);border:1px solid var(--line);border-radius:6px;padding:.25rem .4rem}input[type=number]{width:4.5rem}input[type=range]{accent-color:var(--accent)}input[type=range].hot{accent-color:var(--red)}input[type=range].pan{appearance:none;background:transparent;height:1.2rem}input[type=range].pan::-webkit-slider-runnable-track{height:.3rem;border-radius:2px;background:var(--line)}input[type=range].pan::-webkit-slider-thumb{appearance:none;width:.9rem;height:.9rem;border:none;border-radius:50%;background:var(--accent);margin-top:-.3rem}input[type=range].pan::-moz-range-track{height:.3rem;border-radius:2px;background:var(--line)}input[type=range].pan::-moz-range-progress{height:.3rem;border-radius:2px;background:var(--line)}input[type=range].pan::-moz-range-thumb{width:.9rem;height:.9rem;border:none;border-radius:50%;background:var(--accent)}label{display:inline-flex;align-items:center;gap:.35rem}.app{max-width:1100px;margin:0 auto;padding:1rem;display:grid;gap:1rem}header.top{display:flex;align-items:center;gap:1rem;flex-wrap:wrap}header.top h1{font-size:1.25rem;margin:0;flex:1}.panel{background:var(--panel);border-radius:12px;padding:.45rem 1rem;display:grid;gap:.75rem;align-content:start}.panel h2{font-size:1rem;margin:0;color:var(--muted);font-weight:600}.row{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap}.muted{color:var(--muted)}.warn{color:var(--accent)}.small{font-size:.85rem}.dropzone{border:2px dashed var(--line);border-radius:12px;padding:2rem;text-align:center;color:var(--muted)}.dropzone.over{border-color:var(--accent);color:var(--text)}.pieces{display:grid;gap:.5rem}.piece{display:flex;align-items:center;gap:.75rem;background:var(--panel2);border-radius:8px;padding:.6rem .8rem}.piece .name{flex:1;font-weight:600;cursor:pointer}.display{display:flex;align-items:baseline;gap:1.5rem;flex-wrap:wrap}.display .bar{font-size:3rem;font-weight:700;font-variant-numeric:tabular-nums;line-height:1}.display .bar small{font-size:1rem;color:var(--muted);font-weight:400;margin-right:.3rem}.display .bar .num{display:inline-block;min-width:3ch}.display .beat{font-size:1.4rem;font-variant-numeric:tabular-nums}.beats{display:inline-flex;gap:.3rem;vertical-align:middle;min-width:6.3rem}.beats i{width:.8rem;height:.8rem;border-radius:50%;background:var(--line);display:inline-block}.beats i.first{outline:1px solid var(--muted)}.beats i.now{background:var(--accent)}.display .time,.display .bpm{color:var(--muted);font-variant-numeric:tabular-nums}.display .bpm{min-width:7.2rem}.display .time{min-width:8rem}.display .countin{color:var(--accent);font-weight:700;min-width:7rem}canvas.timeline{width:100%;height:54px;border-radius:8px;cursor:pointer;touch-action:none;display:block;margin-bottom:.4rem}.transport button{min-width:2.6rem}.transport .play{min-width:4rem}.mixer{display:grid;gap:.4rem}.track{display:grid;grid-template-columns:1.6rem minmax(6rem,1fr) auto auto minmax(6rem,2fr) minmax(5rem,1fr);align-items:center;gap:.5rem;background:var(--panel2);border-radius:8px;padding:.4rem .6rem}.track.unloaded{opacity:.55}.track .tname{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.track.thead{font-size:.85rem;font-weight:600;color:var(--muted);background:none;padding:0 .8rem}.track.thead>span{justify-self:center}.track.off{opacity:.45}.track.solo-on .tname{color:var(--blue)}.msec{display:grid;gap:.5rem;align-content:start}.msec h3{margin:0;font-size:.9rem;color:var(--muted);font-weight:600}.mixer-hint{min-height:2.6em}.barfield{position:relative;display:inline-flex;align-items:center}.barfield input{width:3.05rem;padding-right:.5rem}.barstep{position:absolute;right:.2rem;top:0;bottom:0;display:flex;flex-direction:column;justify-content:center;opacity:0;pointer-events:none;transition:opacity .1s}.barfield:hover .barstep,.barfield:focus-within .barstep{opacity:1;pointer-events:auto}.barstep button{padding:0;border:none;background:none;font-size:.55rem;line-height:1;min-height:0;color:var(--muted);cursor:pointer}.barstep button:hover{color:var(--text)}.track .tname small{color:var(--muted);font-weight:400;margin-left:.3rem}.track input[type=range]{width:100%}.slider{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:.3rem;font-size:.8rem;color:var(--muted)}.markers{display:grid;gap:.3rem}.marker{display:flex;gap:.5rem;align-items:center}.marker input[type=text]:not(.barin){width:6rem}.sections{display:grid;grid-template-columns:repeat(auto-fill,minmax(11rem,1fr));gap:.3rem;font-variant-numeric:tabular-nums}.sections div{background:var(--panel2);border-radius:6px;padding:.2rem .5rem;font-size:.9rem}progress{width:12rem;accent-color:var(--accent)}.grid2{display:grid;grid-template-columns:1fr 1fr;gap:1rem}details summary{cursor:pointer;color:var(--muted)}kbd{background:var(--panel2);border:1px solid var(--line);border-radius:4px;padding:0 .3rem;font-size:.85em}.shortcuts{display:grid;grid-template-columns:auto 1fr;gap:.2rem .8rem;font-size:.9rem}@media(max-width:760px){.track.thead{display:none}.grid2{grid-template-columns:1fr}.track{grid-template-columns:1.6rem 1fr auto auto}.track .slider{grid-column:2 / -1}.display .bar{font-size:2.4rem}}.chips{display:flex;flex-wrap:wrap;gap:.3rem}.chip{display:inline-flex;align-items:center;gap:.3rem;background:var(--panel2, #374151);border-radius:999px;padding:.1rem .2rem .1rem .6rem;font-size:.85rem}.chip button{padding:0 .4rem;min-height:0}.subpanel{display:grid;gap:.6rem;border-top:1px solid rgba(255,255,255,.08);padding-top:.6rem}.subpanel h3{margin:0;font-size:.9rem;color:var(--muted);font-weight:600}.help{font-size:.8rem;color:var(--muted)}.exc{display:grid;gap:.3rem}.exc-row{display:grid;grid-template-columns:8rem 4rem auto;align-items:center;gap:.5rem;font-size:.9rem}.exc-row button{justify-self:start;padding:0 .5rem}.tempo-panel{max-height:none;overflow-y:visible}details.panel>summary{cursor:pointer;display:flex;align-items:center;gap:.8rem;flex-wrap:wrap;list-style:none;color:inherit}details.panel>summary::-webkit-details-marker{display:none}details.panel:not([open]){gap:0}details.panel>summary:before{content:"▸";color:var(--muted);width:1.2rem;font-size:1.5em;line-height:1}details.panel[open]>summary:before{content:"▾"}details.panel>summary h2{display:inline;margin:0}details.panel[open]>summary{margin-bottom:.6rem}.rate-badge{margin-left:.5rem;padding:.05rem .45rem;border-radius:999px;background:var(--accent);color:#111827;font-weight:700;display:inline-block;min-width:4ch;text-align:center}.marker.active{outline:1px solid var(--accent);border-radius:6px}.controls{display:grid;gap:.5rem;margin-top:.7rem;padding-top:.7rem;border-top:1px solid #374151}.loop-sym{font-family:Segoe UI Symbol,"Noto Sans Symbols 2",Noto Music,Bravura,sans-serif;font-size:1.35rem;line-height:1;padding:.2rem .55rem}.note-sym{font-size:1.25em}.ctl-head{width:3.6rem;color:var(--muted);font-size:.85rem}.sections .unsure{background:#ef444438;outline:1px solid var(--red)}.reset-mixer{margin-left:auto;border:none;border-radius:4px;padding:.1rem .55rem;font-size:1rem;line-height:1.4;background:#c0392b;color:#fff;cursor:pointer}.reset-mixer:hover{filter:brightness(1.2)}
