:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  background: #f3f2f8;
  color: #202035;
  --accent: #5134c8;
  --muted: #656479;
  --line: #dbdae7;
}
* { box-sizing: border-box; }
body { margin: 0; }
.studio { max-width: 1600px; padding: 28px clamp(16px, 4vw, 64px); margin: auto; }
.masthead { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.brand-mark { width: 43px; height: 43px; background: var(--accent); border-radius: 11px; display: flex; justify-content: center; align-items: center; gap: 3px; }
.brand-mark i { width: 3px; border-radius: 2px; height: 12px; background: white; }
.brand-mark i:nth-child(2) { height: 22px; }
.brand-mark i:nth-child(3) { height: 17px; }
.brand-mark i:nth-child(4) { height: 8px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.45rem, 3vw, 2rem); letter-spacing: -.045em; }
h1 span { color: var(--accent); }
.import-bar { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 24px; align-items: center; padding: 16px; background: white; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 22px; }
.upload { position: relative; cursor: pointer; background: var(--accent); color: white; padding: 11px 14px; border-radius: 8px; font-size: .94rem; font-weight: 650; white-space: nowrap; }
.upload span { margin-right: 4px; }
.upload input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.upload:hover { background: #4229af; }
.upload:focus-within, button:focus-visible, pre:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.progress-label { font-size: .875rem; display: flex; justify-content: space-between; gap: 8px; align-items: center; font-weight: 650; }
progress { appearance: none; display: block; width: 100%; height: 8px; margin-top: 7px; border: 0; border-radius: 8px; background: #eeedf6; color: var(--accent); overflow: hidden; }
progress::-webkit-progress-bar { background: #eeedf6; }
progress::-webkit-progress-value { background: var(--accent); border-radius: 8px; }
progress::-moz-progress-bar { background: var(--accent); border-radius: 8px; }
#status { grid-column: 1 / -1; font-size: .875rem; color: var(--muted); overflow-wrap: anywhere; }
#status.error { color: #a42237; }
.workspace { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, .95fr); gap: 14px; align-items: stretch; }
.panel { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 11px; }
.panel-heading { display: flex; min-height: 51px; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 13px; border-bottom: 1px solid var(--line); background: #faf9fe; border-radius: 10px 10px 0 0; }
h2 { font-size: .93rem; letter-spacing: -.01em; }
button { font: inherit; cursor: pointer; }
.copy { border: 1px solid #e1dcf4; color: #4731a9; font-size: .875rem; padding: 4px 7px; border-radius: 6px; background: #f3efff; }
.copy:disabled { color: #6e6c7d; border-color: var(--line); background: #f4f3f8; cursor: default; }
.copy:not(:disabled):hover { background: #e9e1ff; }
pre { margin: 0; padding: 15px 13px; font: inherit; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; overflow: auto; }
.lyrics pre { height: clamp(340px, 61vh, 660px); }
.style pre { min-height: 105px; max-height: 215px; }
.sidebar { display: grid; align-content: start; gap: 13px; }
.title-list, #track-empty { padding: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.title-list .song-title + .song-title { margin-top: 5px; }
.song-title:first-child { font-weight: 650; }
.placeholder { color: var(--muted); font-size: .875rem; }
.track-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 6px; padding: 13px; max-height: 210px; overflow: auto; }
.track-grid:empty { display: none; }
.track-grid button { border: 1px solid var(--line); min-height: 37px; border-radius: 6px; color: #372971; background: #faf8ff; font-size: .875rem; font-weight: 650; }
.track-grid button:hover { border-color: var(--accent); }
.track-grid button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: white; }
#count, footer { color: var(--muted); font-size: .875rem; }
footer { padding-top: 16px; }
@media (max-width: 1020px) {
  .workspace { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sidebar { grid-column: 1 / -1; grid-row: 1; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
}
@media (max-width: 620px) {
  .studio { padding-top: 18px; }
  .masthead { margin-bottom: 17px; }
  .import-bar { gap: 10px 12px; }
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .sidebar { grid-template-columns: minmax(0, 1fr); }
  .tracks { grid-row: 1; }
  .lyrics pre { height: auto; min-height: 120px; max-height: 400px; }
}
