:root{color-scheme:dark;--bg:#101319;--panel:#191e26;--edge:#303743;--muted:#a1a9b7;--text:#f6f7fb;--accent:#f2f4f8;--radius:17px;font-family:-apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,sans-serif;font-synthesis:none}
*{box-sizing:border-box}html{background:var(--bg);-webkit-text-size-adjust:100%}body{margin:0;color:var(--text);background:var(--bg);min-height:100dvh}button,input,label{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer;color:inherit}button:disabled{cursor:default;opacity:.38}button:focus-visible,input:focus-visible,label:focus-visible{outline:2px solid #96bffc;outline-offset:3px}input[type=range]{accent-color:#f3f5fc;touch-action:pan-x;cursor:pointer}input[type=range]:disabled{opacity:.3}h1,h2,p{margin:0}.app{max-width:510px;padding:0 22px calc(32px + env(safe-area-inset-bottom));margin:auto}.topbar{height:80px;display:flex;align-items:center;justify-content:space-between}.brand{display:flex;gap:10px;align-items:center;font-size:12px;letter-spacing:.13em;font-weight:700}.brand b{font-weight:400;color:#bac2ce}.brand-mark{width:26px;height:26px;display:flex;justify-content:center;align-items:center;gap:3px;transform:skew(-12deg)}.brand-mark i{background:#e9edf5;width:3px;border-radius:3px}.brand-mark i:nth-child(1),.brand-mark i:nth-child(4){height:10px}.brand-mark i:nth-child(2){height:23px}.brand-mark i:nth-child(3){height:17px}.import-button{border:1px solid var(--edge);border-radius:20px;padding:9px 13px;display:flex;align-items:center;gap:5px;cursor:pointer;font-size:13px;font-weight:650}.import-button svg{width:16px;height:16px}.now-playing{display:flex;flex-direction:column;align-items:center}.artwork{width:min(100%,320px);aspect-ratio:1;border:1px solid #353c47;border-radius:13px;overflow:hidden;background:radial-gradient(circle at 62% 35%,#384253,#202632 50%,#131820);display:grid;place-items:center;box-shadow:0 12px 42px #0004}.artwork img{display:block;width:100%;height:100%;object-fit:cover}.artwork-empty{display:flex;flex-direction:column;align-items:center;gap:5px;color:#c9d0dd;letter-spacing:.34em;font-size:13px;font-weight:800}.artwork-graphic{font-size:110px;line-height:1;opacity:.35;letter-spacing:0;font-weight:200}.title-section{text-align:center;margin:21px 0 4px;width:100%;min-height:81px}.title-section h1{font-size:20px;letter-spacing:-.02em;overflow-wrap:anywhere}.title-section p{color:var(--muted);font-size:13px;margin-top:7px;overflow-wrap:anywhere}.album-line{font-size:12px!important;color:#737e90!important}.playback{margin-top:12px}.playback input{display:block;width:100%;margin:0;min-height:22px}.time-row{display:flex;justify-content:space-between;color:var(--muted);font-size:12px;margin-top:0;font-variant-numeric:tabular-nums}.controls{display:flex;align-items:center;justify-content:center;gap:36px;margin:17px 0 24px}.small-button{background:none;border:0;width:43px;height:43px;display:grid;place-items:center}.small-button svg{width:28px;height:28px}.play-button{width:64px;height:64px;border-radius:50%;background:#f5f6fa;color:#13171c;border:0;display:grid;place-items:center}.play-button svg{width:29px;height:29px}.mix-panel{background:var(--panel);border:1px solid #2a303b;border-radius:var(--radius);padding:17px 15px 16px}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.panel-head h2{font-size:10px;letter-spacing:.16em;color:#a7afbd;font-weight:750}.panel-head>span{font-size:11px;color:#758090}.mode-switch{display:grid;grid-template-columns:1fr 1fr;gap:5px;background:#10151b;border:1px solid #2a313b;border-radius:12px;padding:5px;margin:14px 0 26px}.mode-switch button{padding:10px 5px;border:0;background:transparent;border-radius:8px;font-size:13px;color:#a4adbb}.mode-switch button.selected{background:#343d49;color:#fff;font-weight:650;opacity:1}.mixer-head{margin-bottom:11px}.mixer-head button{font-size:12px;border:0;background:none;color:#c5ceda;text-decoration:underline;text-underline-offset:3px;padding:4px}.stem-rows{display:grid;gap:8px}.empty-message{padding:19px 7px;text-align:center;line-height:1.5;color:#7e8999;font-size:13px}.stem-row{border:1px solid #303946;border-radius:12px;padding:12px 11px;--stem-color:#798595;transition:opacity .15s}.stem-row.is-muted{opacity:.58}.stem-row.is-master-mode{opacity:.46}.stem-row.is-master-mode button,.stem-row.is-master-mode input{pointer-events:none}.stem-top{display:flex;align-items:center;gap:9px;min-width:0}.stem-dot{width:9px;height:22px;border-radius:4px;background:var(--stem-color);flex:none}.stem-label{font-weight:650;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;flex:1}.stem-db{font-variant-numeric:tabular-nums;font-size:11px;color:#a0aaba;min-width:48px;text-align:right}.stem-bottom{display:flex;align-items:center;gap:13px;margin-top:10px}.stem-bottom input{flex:1;min-width:0}.stem-actions{display:flex;gap:5px}.stem-actions button{min-width:38px;padding:6px 8px;border:1px solid #455060;background:#252d37;border-radius:7px;font-weight:700;font-size:10px;letter-spacing:.04em}.stem-actions button[aria-pressed=true]{background:#eceff5;color:#181d25;border-color:#eceff5}.stem-actions button.muted[aria-pressed=true]{background:#b96565;color:white;border-color:#b96565}.mix-hint{font-size:11px;line-height:1.45;color:#768293;margin:14px 2px 0}.status{margin:16px 4px 0;color:#8f9caa;font-size:12px;line-height:1.4;min-height:18px;overflow-wrap:anywhere}.status.error{color:#ff9b96}.status.ok{color:#9dbea5}
@media(max-width:370px){.app{padding-left:15px;padding-right:15px}.topbar{height:73px}.artwork{max-width:270px}.controls{margin-top:12px}.mix-panel{padding:14px 11px}.stem-bottom{gap:8px}.stem-actions button{min-width:32px;padding:6px}.title-section h1{font-size:18px}}
@media(max-height:740px){.artwork{max-width:260px}.topbar{height:68px}.title-section{margin-top:14px;min-height:70px}.controls{margin:8px 0 18px}}

.edit-panel{background:var(--panel);border:1px solid #2a303b;border-radius:var(--radius);padding:17px 15px;margin-bottom:14px}
.mix-panel{margin-bottom:14px}.edit-panel .panel-head{margin-bottom:14px}.edit-panel .panel-head span{font-size:11px;color:#788393}.meta-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px 10px}.meta-grid label,.stem-details label{display:flex;flex-direction:column;gap:5px;color:#bfc7d3;font-size:11px;font-weight:650;min-width:0}.meta-grid .span-2{grid-column:1/-1}.meta-grid input,.stem-details input,.preset-row input,.preset-row select{width:100%;min-width:0;min-height:39px;border-radius:9px;background:#111720;border:1px solid #3c4653;color:#fff;font:inherit;font-size:14px;padding:9px 10px;outline:none}.meta-grid input:focus,.stem-details input:focus,.preset-row input:focus,.preset-row select:focus{border-color:#9cafc9}.meta-grid input[type=file]{font-size:12px;padding:6px}.meta-grid input[type=file]::file-selector-button{border:1px solid #657083;background:#303c4b;color:#fff;border-radius:6px;padding:5px 6px;margin-right:8px}.tool-row{display:flex;align-items:center;gap:10px;margin-top:11px}.tool-row button,.preset-row button,.output-buttons button,.output-link{background:#2c3541;border:1px solid #546173;border-radius:9px;padding:10px 12px;font-size:12px;min-height:40px;text-align:center;color:#f2f5fb;text-decoration:none;white-space:nowrap}.tool-row .small-note{font-size:11px;color:#8594a7;line-height:1.4;min-width:0;overflow-wrap:anywhere}.preset-row{display:flex;gap:8px;margin:9px 0}.preset-row input,.preset-row select{flex:1}.preset-row button{flex:none}.output-buttons{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:10px 0}.output-buttons button{white-space:normal;font-weight:650;min-height:51px}.output-buttons button:first-child{background:#e7ebf2;color:#17202c;border:0}.output-buttons[hidden],.tool-row [hidden]{display:none!important}.output-link{display:grid;place-items:center}.stem-details{border-top:1px solid #37404c;margin-top:12px;padding-top:8px}.stem-details summary{font-size:12px;color:#bdc8d7;padding:5px 0;cursor:pointer}.stem-details .stem-meta-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px}.stem-meta-grid .span-2{grid-column:1/-1}.stem-meta-grid input[type=color]{padding:3px;height:39px}.status{position:relative}@media(max-width:370px){.edit-panel{padding:14px 11px}.output-buttons button,.preset-row button{font-size:11px;padding:8px}.preset-row{gap:5px}}

/* Output name is a separate file property, never a song metadata edit. */
.output-name-label{display:block;color:#bfc7d3;font-size:12px;font-weight:650;margin:2px 0 7px}
.output-name-input{width:100%;min-width:0;min-height:44px;border-radius:9px;background:#111720;border:1px solid #3c4653;color:#fff;font:inherit;font-size:14px;padding:10px 11px;outline:none}
.output-name-input:focus{border-color:#9cafc9}
.output-name-input:disabled{opacity:.55}
.output-name-hint{font-size:11px;color:#8594a7;line-height:1.4;margin:7px 0 15px;overflow-wrap:anywhere}

/* Native panel hosts preserve original light-DOM form and responsive styles. */
stem-app-panel { display:block; min-width:0; }
stem-app-panel[hidden] { display:none!important; }
