* { box-sizing: border-box; }

:root {
  --bg: #0a0a0a;
  --panel: #141414;
  --panel-2: #1c1c1c;
  --border: #2a2a2a;
  --text: #e6e6e6;
  --muted: #8a8a8a;
  --accent: #00ff88;
  --accent-dim: #1f4d3a;
  --danger: #ff5577;
}

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  overflow-x: hidden;
}

body {
  display: grid;
  grid-template-rows: 48px 1fr 80px;
  height: 100vh;
  height: 100dvh;
}

.top {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}
.logo {
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--accent);
}
.tabs { display: flex; gap: 4px; flex: 1; }
.tab {
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
  padding: 6px 12px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.tab:hover { color: var(--text); }
.tab.active {
  color: var(--accent);
  border-color: var(--accent-dim);
  background: var(--panel-2);
}
.actions button {
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 12px;
  cursor: pointer;
  font-family: inherit;
}

.main { overflow-y: auto; padding: 12px; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.toolbar input {
  flex: 1;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 10px;
  font-family: inherit;
  font-size: 13px;
}
.toolbar input:focus {
  outline: none;
  border-color: var(--accent);
}
.toolbar button {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  padding: 8px 16px;
  cursor: pointer;
  font-family: inherit;
}
.toolbar button:hover { background: var(--accent); color: #000; }

.count { color: var(--muted); align-self: center; padding-left: 4px; }

.track-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  background: var(--panel);
  max-width: 100%;
  overflow: hidden;
}
.track-row > *,
.download-row > *,
.import-track > * { min-width: 0; }
.track-row {
  display: grid;
  grid-template-columns: 1fr 200px 80px 120px;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  align-items: center;
  cursor: pointer;
}
.track-row:hover { background: var(--panel-2); }
.track-row.playing { color: var(--accent); }
.track-row .title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-row .meta { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-row .actions-cell { text-align: right; display: flex; gap: 6px; justify-content: flex-end; }
.track-row button {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: inherit;
  font-size: 11px;
  padding: 3px 8px;
  cursor: pointer;
}
.track-row button:hover { color: var(--accent); border-color: var(--accent-dim); }
.track-row button.danger:hover { color: var(--danger); border-color: var(--danger); }
.track-row button:disabled {
  color: var(--accent);
  border-color: var(--accent-dim);
  background: var(--accent-dim);
  cursor: default;
}
.track-row button[data-act="dl"] {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: var(--accent-dim);
}
.track-row button[data-act="dl"]:hover:not(:disabled) { background: var(--accent); color: #000; }

.section-h {
  margin: 20px 0 8px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 11px;
}

.downloads-list { display: flex; flex-direction: column; gap: 4px; }
.download-row {
  display: grid;
  grid-template-columns: 1fr 80px 120px;
  gap: 12px;
  padding: 6px 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  align-items: center;
  font-size: 12px;
}
.download-row .bar {
  height: 4px;
  background: var(--border);
  position: relative;
}
.download-row .bar > div {
  height: 100%;
  background: var(--accent);
  transition: width 0.3s;
}
.download-row .status {
  color: var(--muted);
  text-align: right;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.download-row .status.running { color: var(--accent); }
.download-row .status.failed { color: var(--danger); }
.download-row .status.completed { color: var(--accent); }
.download-row .del-dl {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  padding: 4px 8px;
  line-height: 1;
}
.download-row .del-dl:hover { color: var(--danger); border-color: var(--danger); }

.player {
  display: grid;
  grid-template-columns: 260px 140px 1fr 180px;
  gap: 16px;
  padding: 0 16px;
  align-items: center;
  background: var(--panel);
  border-top: 1px solid var(--border);
}
.np { overflow: hidden; }
.np-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-artist { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.controls { display: flex; justify-content: center; gap: 6px; }
.controls button {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border);
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 14px;
}
.controls button:hover { color: var(--accent); border-color: var(--accent-dim); }
.controls button.active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
}
#play-btn { width: 44px; height: 44px; font-size: 16px; }
#shuffle-btn, #repeat-btn { font-size: 12px; }

.scrub {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  gap: 8px;
  align-items: center;
}
.scrub span { color: var(--muted); font-size: 11px; text-align: center; }

.vol { display: flex; align-items: center; gap: 8px; }
.vol button {
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: var(--border);
  height: 4px;
  width: 100%;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: var(--accent);
  border: none;
  border-radius: 50%;
  cursor: pointer;
}

#toasts {
  position: fixed;
  bottom: 96px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 1000;
}
.toast {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  padding: 8px 12px;
  font-size: 12px;
  animation: fadeIn 0.2s;
}
.toast.error { border-left-color: var(--danger); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.import-track {
  display: grid;
  grid-template-columns: 1fr 70px 110px;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  align-items: center;
}
.import-track .meta-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.import-track .ititle {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.import-track .isub {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.import-track .kind {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.import-track .play-cell { text-align: right; }
.import-track.playing .ititle { color: var(--accent); }
.import-track button {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  font-family: inherit;
  padding: 4px 10px;
  cursor: pointer;
}
.import-track button:hover { background: var(--accent); color: #000; }

.view-toggle {
  display: flex;
  border: 1px solid var(--border);
}
.view-toggle button {
  background: var(--panel-2);
  color: var(--muted);
  border: none;
  border-right: 1px solid var(--border);
  padding: 8px 12px;
  cursor: pointer;
  font-family: inherit;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.view-toggle button:last-child { border-right: none; }
.view-toggle button:hover { color: var(--text); }
.view-toggle button.active {
  background: var(--accent-dim);
  color: var(--accent);
}

.folder-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  background: var(--panel);
}
.folder-row {
  display: grid;
  grid-template-columns: 16px 1fr auto;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  align-items: center;
  user-select: none;
  border-bottom: 1px solid var(--border);
}
.folder-row:last-child { border-bottom: none; }
.folder-row:hover { background: var(--panel-2); }
.folder-caret {
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}
.folder-name {
  font-weight: 600;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.folder-count {
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.folder-list .import-track {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.folder-list .import-track:last-child { border-bottom: none; }

@media (max-width: 700px) {
  body {
    grid-template-rows: 48px 1fr auto;
  }

  .top {
    padding: 0 8px;
    gap: 6px;
  }
  .logo { display: none; }
  .tabs {
    flex: 1;
    gap: 2px;
  }
  .tab {
    flex: 1;
    padding: 8px 4px;
    font-size: 10px;
    letter-spacing: 0.5px;
  }
  .actions button {
    padding: 8px 10px;
    font-size: 11px;
  }

  .main { padding: 8px; }

  .toolbar {
    flex-direction: column;
    gap: 6px;
  }
  .toolbar input {
    font-size: 16px;
    padding: 10px 12px;
  }
  .toolbar button {
    width: 100%;
    padding: 12px;
  }
  .count { padding: 0; }

  .view-toggle { width: 100%; }
  .view-toggle button { flex: 1; padding: 10px; }

  .track-row {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 2px 8px;
    padding: 10px 12px;
  }
  .track-row .title {
    grid-column: 1;
    grid-row: 1;
    white-space: normal;
    line-height: 1.3;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .download-row > div:first-child > div:first-child,
  .import-track > div:first-child {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .track-row .meta:nth-of-type(1) {
    grid-column: 1;
    grid-row: 2;
    font-size: 11px;
  }
  .track-row .meta:nth-of-type(2) { display: none; }
  .track-row .actions-cell {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
    flex-direction: column;
    gap: 4px;
  }
  .track-row button {
    padding: 10px 14px;
    font-size: 12px;
    min-width: 84px;
    min-height: 40px;
  }

  /* Queue row: 3 buttons (up/down/✕) — keep horizontal & compact */
  .track-row .queue-actions {
    flex-direction: row;
    gap: 4px;
  }
  .track-row .queue-actions button {
    min-width: 36px;
    min-height: 36px;
    padding: 6px 4px;
    font-size: 14px;
  }

  .section-h { margin-top: 16px; }

  .download-row {
    grid-template-columns: 1fr 50px;
    grid-template-rows: auto auto;
    gap: 4px 8px;
    padding: 8px 12px;
  }
  .download-row .status {
    grid-column: 1 / 3;
    grid-row: 2;
    text-align: left;
    font-size: 11px;
  }

  .import-track {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto;
    gap: 4px 8px;
    padding: 10px 12px;
  }
  .import-track .meta-block {
    grid-column: 1;
    grid-row: 1;
  }
  .import-track .ititle {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .import-track .isub {
    white-space: normal;
  }
  .import-track .play-cell {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
  }
  .import-track .kind { display: none; }

  .player {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 6px;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  }
  .np {
    text-align: center;
  }
  .controls {
    justify-content: center;
    gap: 8px;
  }
  .controls button {
    width: 44px;
    height: 44px;
    font-size: 16px;
  }
  #play-btn {
    width: 52px;
    height: 52px;
    font-size: 20px;
  }
  #shuffle-btn, #repeat-btn {
    width: 38px;
    height: 44px;
    font-size: 13px;
  }
  .scrub {
    grid-template-columns: 40px 1fr 40px;
    gap: 6px;
  }
  .vol { display: none; }

  input[type="range"] { height: 6px; }
  input[type="range"]::-webkit-slider-thumb {
    width: 20px;
    height: 20px;
  }
  input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
  }

  #toasts {
    bottom: auto;
    top: 56px;
    left: 8px;
    right: 8px;
  }
}

/* ============================================================
   CLASSIC RETRO WINAMP THEME
   Activated by setting body[data-theme="classic"]. The entire
   modern UI tree stays in the DOM; we just hide it and show the
   #classic-shell. All retro rules live below and are scoped so
   they cannot leak into the modern theme.
   ============================================================ */

#classic-shell { display: none; }

[data-theme="classic"] body {
  display: block;
  background: #16181b;
  font-family: "MS Sans Serif", "Pixelated MS Sans Serif", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 11px;
  color: #c0c4c8;
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: auto;
  text-rendering: geometricPrecision;
  overflow: hidden;
}
[data-theme="classic"] .top,
[data-theme="classic"] .main,
[data-theme="classic"] .player {
  display: none !important;
}
[data-theme="classic"] #classic-shell {
  display: grid;
  grid-template-columns: 340px 340px 1fr;
  grid-template-rows: 1fr;
  grid-template-areas: "main eq pl";
  gap: 4px;
  padding: 4px;
  box-sizing: border-box;
  height: 100vh;
  height: 100dvh;
  background: #16181b;
}

[data-theme="classic"] .cw-main { grid-area: main; align-self: start; }
[data-theme="classic"] .cw-eq { grid-area: eq; align-self: start; }
[data-theme="classic"] .cw-playlist {
  grid-area: pl;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

/* ---- Window chrome ---- */
.cw {
  background: linear-gradient(#3a4048, #262a30);
  border: 1px solid #0a0c0e;
  box-shadow:
    inset 1px 1px 0 #5a6068,
    inset -1px -1px 0 #1a1c20;
  color: #d0d4d8;
}
.cw-titlebar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 16px;
  padding: 0 4px;
  background: linear-gradient(#3b4654, #1d2530);
  border-bottom: 1px solid #0a0c0e;
  box-shadow: inset 0 1px 0 #4d5a6a;
  user-select: none;
  -webkit-user-select: none;
}
.cw-dots {
  flex: 0 0 auto;
  width: 38px;
  height: 8px;
  background-image: repeating-linear-gradient(
    to bottom,
    #4d5a6a 0 1px, transparent 1px 2px
  );
  border-top: 1px solid #5a6878;
  border-bottom: 1px solid #1a2028;
}
.cw-title {
  font-size: 9px;
  letter-spacing: 2px;
  color: #c8d0d8;
  text-transform: uppercase;
  font-weight: 700;
  flex: 1;
  text-align: center;
  font-family: "MS Sans Serif", Tahoma, sans-serif;
  text-shadow: 1px 1px 0 #0a0c0e;
}
.cw-tb-btns {
  display: flex;
  gap: 2px;
  margin-left: auto;
  flex: 0 0 auto;
}
.ctb {
  background: linear-gradient(#4a5260, #2a3038);
  border: 1px solid #0a0c0e;
  box-shadow: inset 1px 1px 0 #6a7280, inset -1px -1px 0 #1a1c20;
  color: #d0d4d8;
  font-family: inherit;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1px;
  width: 22px;
  height: 11px;
  padding: 0;
  cursor: pointer;
  line-height: 1;
}
.ctb:hover { color: #fff; }
.ctb:active,
.ctb.active {
  box-shadow: inset 1px 1px 0 #1a1c20, inset -1px -1px 0 #6a7280;
  background: linear-gradient(#2a3038, #4a5260);
}
.ctb-theme {
  width: auto;
  padding: 0 6px;
  color: #00ff66;
  text-shadow: 0 0 2px #00aa44;
  letter-spacing: 1.5px;
}
.ctb-theme:hover { color: #ffffff; }

/* ---- Buttons (transport, mode) ---- */
.cbtn {
  background: linear-gradient(#4d555f, #2a3038);
  border: 1px solid #0a0c0e;
  box-shadow: inset 1px 1px 0 #6a7280, inset -1px -1px 0 #1a1c20;
  color: #d8dce0;
  font-family: "MS Sans Serif", Tahoma, sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 0;
  cursor: pointer;
  line-height: 1;
}
.cbtn:hover { color: #ffffff; }
.cbtn:active,
.cbtn.pressed,
.cbtn.active {
  box-shadow: inset 1px 1px 0 #1a1c20, inset -1px -1px 0 #6a7280;
  background: linear-gradient(#22272c, #404a55);
  color: #00ff66;
}
.cbtn-tr {
  width: 32px;
  height: 20px;
  font-size: 10px;
}
.cbtn-mode {
  height: 14px;
  padding: 0 6px;
  font-size: 8px;
}

/* ---- Main player module ---- */
.cw-main-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
}
.cw-display {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 6px;
  background: #0a0c0e;
  border: 1px solid #000;
  box-shadow: inset 1px 1px 0 #1a1c20, inset -1px -1px 0 #2a3038;
  padding: 4px;
}
.cw-time {
  font-family: "VT323", "Courier New", ui-monospace, monospace;
  font-size: 32px;
  line-height: 1;
  color: #00ff66;
  text-shadow: 0 0 4px #00aa44, 0 0 1px #00ff66;
  letter-spacing: 1px;
  background: #000;
  padding: 2px 4px 0;
  border: 1px solid #1a1c20;
  text-align: center;
  align-self: center;
  font-variant-numeric: tabular-nums;
}
.cw-display-side {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.cw-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
}
.cw-leds {
  display: inline-flex;
  gap: 2px;
}
.led {
  font-family: "MS Sans Serif", Tahoma, sans-serif;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 1px 3px;
  color: #2a3038;
  background: #0a0c0e;
  border: 1px solid #1a1c20;
}
.led.on { color: #00ff66; text-shadow: 0 0 2px #00aa44; }
.cw-bitrate {
  color: #00ff66;
  font-family: "Courier New", ui-monospace, monospace;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}
.cw-track-strip {
  background: #000;
  border: 1px solid #1a1c20;
  height: 13px;
  overflow: hidden;
  position: relative;
}
.cw-track-text {
  display: inline-block;
  white-space: nowrap;
  color: #00ff66;
  font-family: "Courier New", ui-monospace, monospace;
  font-size: 10px;
  padding: 0 4px;
  line-height: 13px;
  text-shadow: 0 0 2px #00aa44;
}
.cw-track-strip.scrolling .cw-track-text {
  position: absolute;
  left: 0;
  animation: cw-marquee 14s linear infinite;
}
@keyframes cw-marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.cw-vis {
  display: flex;
  gap: 1px;
  align-items: flex-end;
  background: #000;
  border: 1px solid #1a1c20;
  height: 18px;
  padding: 1px;
}
.cw-vis span {
  flex: 1;
  height: 20%;
  background: linear-gradient(to top, #006622, #00ff66 60%, #ccff66);
  transition: height 0.12s linear;
}

/* ---- Slider rows ---- */
.cw-slider-row {
  display: grid;
  grid-template-columns: auto 1fr auto 60px;
  gap: 4px;
  align-items: center;
}
.cw-lbl {
  font-size: 8px;
  letter-spacing: 1px;
  color: #8a9098;
  font-weight: 700;
}
.cw-h-slider {
  -webkit-appearance: none;
  appearance: none;
  height: 10px;
  background: #0a0c0e;
  border: 1px solid #1a1c20;
  box-shadow: inset 1px 1px 0 #050505, inset -1px -1px 0 #2a3038;
  padding: 0;
  cursor: pointer;
}
.cw-h-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 8px;
  background: linear-gradient(#5a6270, #2a3038);
  border: 1px solid #0a0c0e;
  box-shadow: inset 1px 0 0 #7a8290, inset -1px 0 0 #1a1c20;
  border-radius: 0;
  cursor: grab;
}
.cw-h-slider::-moz-range-thumb {
  width: 14px;
  height: 8px;
  background: linear-gradient(#5a6270, #2a3038);
  border: 1px solid #0a0c0e;
  border-radius: 0;
  cursor: grab;
}
.cw-pos-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: #0a0c0e;
  border: 1px solid #1a1c20;
  box-shadow: inset 1px 1px 0 #050505, inset -1px -1px 0 #2a3038;
}
.cw-pos-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 6px;
  background: linear-gradient(#6a7280, #2a3038);
  border: 1px solid #0a0c0e;
  border-radius: 0;
}
.cw-pos-slider::-moz-range-thumb {
  width: 22px;
  height: 6px;
  background: linear-gradient(#6a7280, #2a3038);
  border: 1px solid #0a0c0e;
  border-radius: 0;
}

/* ---- Transport row ---- */
.cw-transport-row {
  display: flex;
  gap: 1px;
  align-items: center;
}
.cw-mode-grp {
  margin-left: auto;
  display: flex;
  gap: 2px;
}

/* ---- Equalizer ---- */
.cw-eq-body {
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.eq-top {
  display: flex;
  gap: 4px;
  align-items: center;
}
.cw-select {
  background: #0a0c0e;
  color: #00ff66;
  border: 1px solid #0a0c0e;
  box-shadow: inset 1px 1px 0 #1a1c20, inset -1px -1px 0 #2a3038;
  font-family: "Courier New", ui-monospace, monospace;
  font-size: 9px;
  height: 14px;
  padding: 0 4px;
  margin-left: auto;
  cursor: pointer;
}
.eq-grid {
  display: grid;
  grid-template-columns: 28px 6px 1fr;
  gap: 4px;
  background: #16181b;
  border: 1px solid #0a0c0e;
  box-shadow: inset 1px 1px 0 #050505;
  padding: 6px 4px 2px;
  min-height: 96px;
}
.eq-divider {
  background: linear-gradient(to right, #0a0c0e, #2a3038, #0a0c0e);
}
.eq-bands {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 2px;
}
.eq-band {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
}
.eq-slider {
  -webkit-appearance: slider-vertical;
  appearance: slider-vertical;
  writing-mode: vertical-lr;
  width: 14px;
  height: 64px;
  background: #0a0c0e;
  cursor: pointer;
  padding: 0;
  margin: 0;
}
.eq-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 6px;
  background: linear-gradient(#6a7280, #2a3038);
  border: 1px solid #0a0c0e;
  border-radius: 0;
  box-shadow: inset 1px 0 0 #8a9098, inset -1px 0 0 #1a1c20;
}
.eq-slider::-moz-range-thumb {
  width: 10px;
  height: 6px;
  background: linear-gradient(#6a7280, #2a3038);
  border: 1px solid #0a0c0e;
  border-radius: 0;
}
.eq-band-lbl {
  font-size: 7px;
  color: #8a9098;
  letter-spacing: 0;
  font-family: "Courier New", monospace;
}

/* ---- Playlist ---- */
.cw-pl-toolbar {
  display: flex;
  gap: 4px;
  padding: 3px;
  background: #16181b;
  border-bottom: 1px solid #0a0c0e;
}
.cw-pl-filter {
  flex: 1;
  background: #0a0c0e;
  color: #00ff66;
  border: 1px solid #0a0c0e;
  box-shadow: inset 1px 1px 0 #050505, inset -1px -1px 0 #2a3038;
  font-family: "Courier New", ui-monospace, monospace;
  font-size: 10px;
  padding: 1px 4px;
  height: 14px;
  outline: none;
}
.cw-pl-meter {
  font-family: "Courier New", ui-monospace, monospace;
  font-size: 9px;
  color: #00ff66;
  align-self: center;
  white-space: nowrap;
}
.cw-pl-hint { color: #6a7280; font-size: 8px; }
.cw-pl-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: #000;
  border-top: 1px solid #1a1c20;
  font-family: "Courier New", ui-monospace, monospace;
  font-size: 11px;
  line-height: 1.15;
  scrollbar-width: thin;
  scrollbar-color: #2a3038 #0a0c0e;
}
.cw-pl-list::-webkit-scrollbar { width: 10px; background: #0a0c0e; }
.cw-pl-list::-webkit-scrollbar-thumb {
  background: linear-gradient(#4a5260, #2a3038);
  border: 1px solid #0a0c0e;
}
.cw-pl-row {
  display: grid;
  grid-template-columns: 32px 1fr 52px;
  gap: 4px;
  padding: 0 6px;
  color: #00cc55;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
}
.cw-pl-row:hover { color: #00ff66; background: #0a1410; }
.cw-pl-row.playing {
  color: #ffd33a;
  background: #1a1505;
  text-shadow: 0 0 2px #aa8a00;
}
.cw-pl-row .cw-pl-num,
.cw-pl-row .cw-pl-dur {
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.cw-pl-row .cw-pl-title {
  overflow: hidden;
  text-overflow: ellipsis;
}
.cw-pl-footer {
  display: flex;
  justify-content: space-between;
  padding: 2px 6px;
  background: #16181b;
  border-top: 1px solid #0a0c0e;
  box-shadow: inset 0 1px 0 #2a3038;
}

/* Active toggle (LIB/QUE/IMP) inherits .active styling from .ctb */

/* ---- Responsive: stack modules vertically on narrow screens ---- */
@media (max-width: 880px) {
  [data-theme="classic"] #classic-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr;
    grid-template-areas:
      "main"
      "eq"
      "pl";
    height: 100dvh;
  }
}

