/* Setlist view (src/ui/views/setlist.js) */
.sl { display: flex; flex-direction: column; flex: 1; min-height: 0; background: var(--bg); container-type: inline-size; }
.sl-toolbar { gap: 6px; flex-wrap: wrap; }
.sl-field { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--text-2); }
.sl-field > span { text-transform: uppercase; letter-spacing: 0.04em; font-size: 10px; color: var(--text-3); }
.sl-status { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
/* the body scrolls as a whole (short windows / device panel open): the columns keep their full height */
.sl-body { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden; }
.sl-body[hidden], .sl-empty[hidden] { display: none; }
.sl-empty { flex: 1; display: flex; overflow: auto; }
.sl-empty .empty-state p { max-width: 560px; }

.sl-global { flex: none; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1.6fr); gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--panel); }
.sl-group { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sl-glabel { font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-3); }
.sl-row { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.sl-row.c { justify-content: center; flex-wrap: nowrap; }
.sl-now { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.sl-now-row { display: flex; align-items: baseline; gap: 8px; justify-content: space-between; font-size: 11.5px; }
.sl-sec-name { font-size: 20px; font-weight: 700; letter-spacing: 0.02em; color: var(--accent); }
.sl-sec-name[data-sec="drop"] { color: var(--accent-3); }
.sl-sec-name[data-sec="build"] { color: var(--warn); }
.sl-sec-name[data-sec="breakdown"] { color: var(--accent-2); }
.sl-key { font-family: var(--mono); font-size: 12px; color: var(--text); }
.sl-sec-next { text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sl-prog { height: 6px; border-radius: 3px; background: var(--bg-4); overflow: hidden; }
.sl-prog-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-3)); }

.sl-secbtn { height: 26px; padding: 0 9px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--bg-3); color: var(--text); font-size: 12px; cursor: pointer; }
.sl-secbtn:hover { background: var(--bg-4); }
.sl-secbtn.queued { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 25%, var(--bg-3)); box-shadow: 0 0 0 1px var(--accent) inset; }
.sl-energy-val { font-family: var(--mono); font-size: 11px; color: var(--text-2); min-width: 34px; }

.sl-keymoves { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 4px; }
.sl-keybtn { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 4px 6px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--bg-3); color: var(--text); cursor: pointer; text-align: left; min-width: 0; }
.sl-keybtn:hover { border-color: var(--accent); background: var(--bg-4); }
.sl-keybtn b { font-size: 10px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.sl-keybtn span { font-size: 12px; white-space: nowrap; }
.sl-keybtn small { font-family: var(--mono); font-size: 10px; color: var(--text-3); }
.sl-keyq { display: flex; align-items: center; gap: 6px; font-size: 11.5px; min-width: 0; }
.sl-keyq-on { color: var(--warn); font-weight: 600; }
.sl-x { border: 0; background: transparent; color: var(--text-2); cursor: pointer; font-size: 15px; line-height: 1; }

.sl-scroll { flex: none; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
.sl-cols { display: flex; gap: 6px; padding: 8px 10px 12px; width: max-content; min-width: 100%; align-items: stretch; }
.sl-col { width: 140px; flex: 0 0 auto; display: flex; flex-direction: column; gap: 6px; padding: 6px; border-radius: var(--radius); border: 1px solid var(--line); border-top: 3px solid var(--col); background: var(--bg-2); transition: opacity 0.2s; }
.sl-col.resting { opacity: 0.62; }
.sl-col.playing { background: color-mix(in srgb, var(--col) 7%, var(--bg-2)); }
.sl-col-top { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.sl-col-name { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.sl-col-name:hover { color: var(--col); }
.sl-col-state { font-size: 10.5px; color: var(--text-3); }
.sl-col.playing .sl-col-state { color: var(--good); }
.sl-prev-wrap { position: relative; height: 46px; border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--line); overflow: hidden; }
.sl-prev { width: 100%; height: 100%; display: block; }
.sl-prev-head { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--text); opacity: 0.8; left: 0; pointer-events: none; }
.sl-col-prog { height: 3px; border-radius: 2px; background: var(--bg-4); overflow: hidden; }
.sl-col-prog-fill { height: 100%; width: 0; background: var(--col); }
.sl-mode { height: 22px; min-width: 40px; padding: 0 5px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--bg-3); color: var(--text-2); font-size: 10px; font-weight: 700; cursor: pointer; }
.sl-mode[data-mode="on"] { color: #fff; background: var(--good); border-color: var(--good); }
.sl-mode[data-mode="off"] { color: #fff; background: var(--bad); border-color: var(--bad); }
.sl-ms { width: 24px; height: 22px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--bg-3); color: var(--text-2); font-size: 11px; font-weight: 700; cursor: pointer; }
.sl-ms.on { background: var(--warn); color: #111; border-color: var(--warn); }
.sl-ms.solo.on { background: var(--accent-2); border-color: var(--accent-2); }
.sl-col-mid { display: flex; align-items: center; justify-content: space-around; gap: 4px; }
.sl-knobs { display: flex; gap: 2px; align-items: flex-start; }
.sl-knobs .knob { width: 46px; }
.sl-knobs .knob-label { max-width: 46px; }
.sl-col .knob.sl-drift { width: auto; flex: none; }
.sl-col .toggle { height: 22px; font-size: 11px; padding: 0 6px; }
.sl-regen, .sl-edit { width: 26px; height: 22px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--bg-3); color: var(--text-2); cursor: pointer; }
.sl-regen.on { border-color: var(--accent); color: var(--accent); }
.sl-regen:hover, .sl-edit:hover { background: var(--bg-4); color: var(--text); }
.sl-sound { width: 100%; height: 24px; padding: 0 6px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--bg); color: var(--text); font-size: 11px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.sl-sound:hover { border-color: var(--col); }

/* by the view's own width (the side panels take part of the window) */
@container (max-width: 980px) {
  .sl-global { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .sl-keys { grid-column: 1 / -1; }
}
@container (max-width: 560px) {
  .sl-global { grid-template-columns: minmax(0, 1fr); padding: 8px; }
}
@media (max-width: 640px) {
  .sl-cols { padding: 8px; }
  .sl-col { width: 128px; }
}
/* sound freshness: rotate / keep, drift, next sound */
.sl-rot { flex: 1; min-width: 0; height: 22px; padding: 0 4px; overflow: hidden; text-overflow: ellipsis; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--bg-3); color: var(--text-2); font-size: 10px; cursor: pointer; white-space: nowrap; }
.sl-rot.on { border-color: var(--col, var(--accent)); color: var(--text); }
.sl-rot:disabled, .sl-regen:disabled { opacity: 0.4; cursor: default; }
.sl-next { font-size: 10px; line-height: 1.2; min-height: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
