:root {
  --bg: #0a0c10;
  --panel: #12151a;
  --panel-2: #1a1e26;
  --panel-3: #222732;
  --line: #272c36;
  --text: #eef0f3;
  --muted: #8a92a0;
  --faint: #3d4450;
  --accent: #fb7299;
  --accent-2: #ff9d6b;
  --accent-soft: rgba(251, 114, 153, 0.14);
  --accent-border: rgba(251, 114, 153, 0.35);
  --accent-shadow: rgba(251, 114, 153, 0.28);
  --accent-focus: rgba(251, 114, 153, 0.12);
  --on-accent: #ffffff;
  --danger: #ff7b7b;
  --danger-border: rgba(255, 123, 123, 0.55);
  --danger-soft: rgba(255, 123, 123, 0.1);
  --shadow: rgba(0, 0, 0, 0.45);
  --knob: #ffffff;
  --scroll: #2c313b;
  --scroll-hover: #3a414d;
  --ambient-filter: blur(50px) saturate(1.5) brightness(0.4);
  --radius: 14px;
  --grid: 40px 46px minmax(0, 1fr) 160px 68px 44px;
  --row-h: 58px;
  --thumb: 44px;
  --name-size: 14px;
  --owner-size: 12px;
}
:root[data-theme="starry"] {
  --bg: #03132f; --panel: #072554; --panel-2: #0b326b; --panel-3: #12457f; --line: #0b2d61;
  --text: #edf8ff; --muted: #9bcbea; --faint: #1c5ca0;
  --accent: #7dd3fc; --accent-2: #38bdf8;
  --accent-soft: rgba(125, 211, 252, 0.16);
  --accent-border: rgba(125, 211, 252, 0.45);
  --accent-shadow: rgba(56, 189, 248, 0.34);
  --accent-focus: rgba(125, 211, 252, 0.16);
  --on-accent: #06243d;
  --danger: #fda4af; --danger-border: rgba(253, 164, 175, 0.55); --danger-soft: rgba(253, 164, 175, 0.12);
  --shadow: rgba(0, 6, 24, 0.5); --knob: #ffffff;
  --scroll: #12457f; --scroll-hover: #1c5ca0;
  --ambient-filter: blur(50px) saturate(1.4) brightness(0.42);
}
:root[data-theme="jade"] {
  --bg: #0b120e; --panel: #111d16; --panel-2: #1a2e22; --panel-3: #253d2e; --line: #1a2a20;
  --text: #ecefe6; --muted: #a8b4a7; --faint: #304e3b;
  --accent: #9fc5a8; --accent-2: #c5dac5;
  --accent-soft: rgba(159, 197, 168, 0.14);
  --accent-border: rgba(159, 197, 168, 0.45);
  --accent-shadow: rgba(159, 197, 168, 0.26);
  --accent-focus: rgba(159, 197, 168, 0.14);
  --on-accent: #102016;
  --danger: #dca1a0; --danger-border: rgba(220, 161, 160, 0.5); --danger-soft: rgba(220, 161, 160, 0.12);
  --shadow: rgba(0, 5, 2, 0.5); --knob: #ffffff;
  --scroll: #253d2e; --scroll-hover: #304e3b;
  --ambient-filter: blur(50px) saturate(1.3) brightness(0.4);
}
:root[data-theme="gold"] {
  --bg: #0d0d0f; --panel: #151518; --panel-2: #1e1e22; --panel-3: #2a2926; --line: #2c2b2b;
  --text: #f5f1e8; --muted: #a99b7b; --faint: #3b3830;
  --accent: #d4af37; --accent-2: #e7c75b;
  --accent-soft: rgba(212, 175, 55, 0.14);
  --accent-border: rgba(212, 175, 55, 0.45);
  --accent-shadow: rgba(212, 175, 55, 0.3);
  --accent-focus: rgba(212, 175, 55, 0.14);
  --on-accent: #1a1400;
  --danger: #ff9d95; --danger-border: rgba(255, 157, 149, 0.5); --danger-soft: rgba(255, 157, 149, 0.12);
  --shadow: rgba(0, 0, 0, 0.5); --knob: #ffffff;
  --scroll: #2a2926; --scroll-hover: #3b3830;
  --ambient-filter: blur(50px) saturate(1.3) brightness(0.4);
}
:root[data-theme="violet"] {
  --bg: #0f0b1a; --panel: #171226; --panel-2: #211a35; --panel-3: #2c2347; --line: #2a2140;
  --text: #efeaff; --muted: #a79bc4; --faint: #3a2f5c;
  --accent: #a78bfa; --accent-2: #f472b6;
  --accent-soft: rgba(167, 139, 250, 0.16);
  --accent-border: rgba(167, 139, 250, 0.45);
  --accent-shadow: rgba(167, 139, 250, 0.32);
  --accent-focus: rgba(167, 139, 250, 0.16);
  --on-accent: #1b1030;
  --danger: #fda4af; --danger-border: rgba(253, 164, 175, 0.5); --danger-soft: rgba(253, 164, 175, 0.12);
  --shadow: rgba(8, 4, 20, 0.5); --knob: #ffffff;
  --scroll: #2c2347; --scroll-hover: #3a2f5c;
  --ambient-filter: blur(50px) saturate(1.4) brightness(0.42);
}
:root[data-theme="paper"] {
  --bg: #eef1f4; --panel: #f8fafb; --panel-2: #ffffff; --panel-3: #e7ebef; --line: #dfe4e9;
  --text: #29313a; --muted: #56616c; --faint: #b9c3cd;
  --accent: #d84c76; --accent-2: #f0803c;
  --accent-soft: #fdebf1;
  --accent-border: rgba(216, 76, 118, 0.4);
  --accent-shadow: rgba(216, 76, 118, 0.26);
  --accent-focus: rgba(216, 76, 118, 0.14);
  --on-accent: #ffffff;
  --danger: #c83d49; --danger-border: rgba(200, 61, 73, 0.5); --danger-soft: #fae5e8;
  --shadow: rgba(24, 31, 38, 0.18); --knob: #ffffff;
  --scroll: #cdd5dd; --scroll-hover: #b9c3cd;
  --ambient-filter: blur(50px) saturate(1.05) brightness(1.12);
}
:root[data-density="loose"] { --row-h: 72px; --thumb: 56px; --name-size: 15px; --owner-size: 12.5px; }
:root[data-density="standard"] { --row-h: 58px; --thumb: 44px; --name-size: 14px; --owner-size: 12px; }
:root[data-density="dense"] { --row-h: 46px; --thumb: 34px; --name-size: 13px; --owner-size: 11.5px; }
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  overflow: hidden;
  transition: background 0.25s ease, color 0.25s ease;
}
.sprite { position: absolute; width: 0; height: 0; }
.i { width: 20px; height: 20px; flex-shrink: 0; display: block; }

.layout {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  height: 100vh;
}

/* ---------- 侧边栏：歌单 ---------- */
.sidebar {
  background: var(--panel);
  border-right: 1px solid var(--line);
  padding: 22px 16px 16px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 6px 20px; }
.brand-gear { margin-left: auto; }
.brand-logo {
  width: 42px; height: 42px; border-radius: 13px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--on-accent); display: grid; place-items: center;
  box-shadow: 0 6px 18px var(--accent-shadow);
}
.brand-logo .i { width: 22px; height: 22px; }
.brand-text h1 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: 0.5px; }
.brand-text p { margin: 1px 0 0; font-size: 12px; color: var(--muted); }

.pl-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 6px 8px; font-size: 12px; color: var(--muted); letter-spacing: 1px;
}
.pl-nav { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding-right: 2px; }
.pl-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 10px; cursor: pointer;
  color: var(--text); border: 1px solid transparent; position: relative;
}
.pl-item:hover { background: var(--panel-2); }
.pl-item .pl-ico { color: var(--muted); }
.pl-item .pl-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-item .pl-num { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pl-item.active { background: var(--accent-soft); border-color: var(--accent-border); }
.pl-item.active .pl-ico, .pl-item.active .pl-num { color: var(--accent); }
.pl-item .pl-playing { display: none; color: var(--accent); }
.pl-item.playing .pl-playing { display: block; }
.pl-item.playing .pl-num { display: none; }

.pl-editor { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.pl-name-wrap { display: none; align-items: center; gap: 6px; margin-bottom: 8px; }
.pl-name-wrap.show { display: flex; }
.pl-name-input {
  flex: 1; min-width: 0; background: var(--panel-2);
  border: 1px solid var(--accent); color: var(--text);
  border-radius: 10px; padding: 9px 12px; font-size: 13px; outline: none;
}
.pl-editor-actions { display: flex; gap: 8px; }
.pl-editor-actions .btn { flex: 1; justify-content: center; }

/* ---------- 配色设置面板 ---------- */
.modal { position: fixed; inset: 0; z-index: 40; display: none; align-items: center; justify-content: center; }
.modal.show { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.58); backdrop-filter: blur(3px); }
.modal-card {
  position: relative; width: min(960px, 94vw); max-height: 86vh; display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 24px 60px var(--shadow); overflow: hidden;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; font-size: 16px; font-weight: 600; }
.modal-body { display: grid; grid-template-columns: 300px minmax(0, 1fr); min-height: 0; overflow: hidden; }
.theme-col { padding: 16px 18px; overflow-y: auto; min-height: 0; }
.theme-col:first-child { border-right: 1px solid var(--line); }
.theme-col h4 { margin: 0 0 10px; font-size: 12px; color: var(--muted); letter-spacing: 1px; font-weight: 500; }
.theme-col h4:not(:first-child) { margin-top: 18px; }
.theme-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.theme-empty { color: var(--muted); font-size: 12px; padding: 8px 2px; }
.theme-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 9px 10px; border-radius: 10px; cursor: pointer;
  background: transparent; border: 1px solid transparent; color: var(--text);
  font-family: inherit; transition: background 0.15s, border-color 0.15s;
}
.theme-item:hover { background: var(--panel-2); }
.theme-item.active { background: var(--accent-soft); border-color: var(--accent-border); }
.theme-swatch { width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0; border: 1px solid var(--line); }
.theme-item-main { flex: 1; min-width: 0; }
.theme-item-name { font-size: 13px; }
.theme-item-codes {
  margin-top: 3px; display: flex; flex-wrap: wrap; gap: 6px;
  font-size: 11px; color: var(--muted);
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
.theme-item-actions { display: flex; gap: 4px; flex-shrink: 0; }
.var-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.var-row { display: flex; align-items: center; gap: 9px; padding: 7px 9px; background: var(--panel-2); border-radius: 9px; }
.var-chip { width: 20px; height: 20px; border-radius: 6px; border: 1px solid var(--line); flex-shrink: 0; }
.var-meta { min-width: 0; flex: 1; }
.var-name { font-size: 11.5px; color: var(--muted); }
.var-code {
  font-size: 12px; font-family: ui-monospace, Menlo, Consolas, monospace;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer;
}
.var-code:hover { color: var(--accent); }
#detailBox.hide, .editor-box { display: none; }
.editor-box.show { display: block; }
.field { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.field span { font-size: 12px; color: var(--muted); width: 40px; flex-shrink: 0; }
.field input {
  flex: 1; min-width: 0; background: var(--panel-2); border: 1px solid var(--line);
  color: var(--text); border-radius: 9px; padding: 8px 11px; font-size: 13px; outline: none;
}
.field input:focus { border-color: var(--accent); }
.var-editor { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.editor-row { display: flex; align-items: center; gap: 8px; padding: 6px 9px; background: var(--panel-2); border-radius: 9px; }
.editor-row.wide { grid-column: 1 / -1; }
.editor-row label { font-size: 11.5px; color: var(--muted); width: 78px; flex-shrink: 0; }
.editor-row input[type=color] { width: 28px; height: 28px; border: 0; padding: 0; background: transparent; cursor: pointer; flex-shrink: 0; }
.editor-row input[type=range].alpha {
  width: 52px; height: 4px; flex-shrink: 0; cursor: pointer; outline: none;
  -webkit-appearance: none; appearance: none; border-radius: 4px; background: var(--panel-3);
}
.editor-row input[type=range].alpha::-webkit-slider-thumb { -webkit-appearance: none; width: 11px; height: 11px; border-radius: 50%; background: var(--knob); }
.editor-row input[type=range].alpha::-moz-range-thumb { width: 11px; height: 11px; border: 0; border-radius: 50%; background: var(--knob); }
.editor-row input[type=text] {
  flex: 1; min-width: 0; background: transparent; border: 1px solid var(--line); color: var(--text);
  border-radius: 7px; padding: 5px 7px; font-size: 12px; outline: none;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
.editor-row input[type=text]:focus { border-color: var(--accent); }
.editor-row input[type=text].invalid { border-color: var(--danger); background: var(--danger-soft); }
.editor-error {
  display: none; margin-bottom: 12px; padding: 8px 11px; border-radius: 9px;
  font-size: 12px; line-height: 1.6; color: var(--danger);
  background: var(--danger-soft); border: 1px solid var(--danger-border);
}
.editor-error.show { display: block; }
.editor-actions {
  position: sticky; bottom: 0; z-index: 2;
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  background: var(--panel); padding: 12px 0 2px; margin-top: 4px;
}
.editor-actions .btn.danger[hidden] { display: none; }
.editor-actions .spacer { flex: 1; }

.sidebar-foot {
  margin-top: 12px; padding: 10px 6px 0; border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted);
}
.sidebar-foot .i { width: 16px; height: 16px; }

/* ---------- 主区域 ---------- */
.main { min-height: 0; overflow-y: auto; padding: 14px 20px 14px; display: flex; flex-direction: column; gap: 12px; }
.addbar { display: flex; gap: 12px; }
.add-input {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 0 14px;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.25s;
}
.add-input .i { color: var(--muted); }
.add-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-focus); }
.add-input input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--text); font-size: 14px; padding: 10px 0; }
.add-input input::placeholder { color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  border-radius: 12px; padding: 11px 18px; cursor: pointer; font-size: 14px;
  transition: background 0.15s, border-color 0.15s, transform 0.1s, color 0.15s;
}
.btn:hover { border-color: var(--accent); }
.btn:active { transform: scale(0.98); }
.btn .i { width: 16px; height: 16px; }
.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent; color: var(--on-accent); font-weight: 600; padding: 10px 20px;
  box-shadow: 0 6px 18px var(--accent-shadow);
}
.btn.primary:hover { filter: brightness(1.06); }
.btn.primary:disabled { opacity: 0.55; cursor: wait; }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--panel-2); }
.btn.ghost.danger:hover { color: var(--danger); border-color: var(--danger-border); }
.btn.sm { padding: 7px 11px; font-size: 12px; border-radius: 10px; }
.btn.armed { color: var(--danger); border-color: var(--danger-border); background: var(--danger-soft); }

.icon-btn {
  width: 40px; height: 40px; border-radius: 12px;
  border: 1px solid transparent; background: transparent; color: var(--text);
  display: grid; place-items: center; cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.1s, border-color 0.15s;
}
.icon-btn:hover { background: var(--panel-2); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn.sm { width: 30px; height: 30px; border-radius: 9px; color: var(--muted); }
.icon-btn.sm:hover { color: var(--text); }
.icon-btn.loading { opacity: 0.55; pointer-events: none; }
.icon-btn.armed { color: var(--danger); background: var(--danger-soft); }

/* ---------- 当前播放信息（位于底部播放条左侧） ---------- */
.pb-track { position: relative; display: flex; align-items: center; gap: 16px; min-width: 0; }
.pb-cover-wrap {
  width: 84px; height: 84px; border-radius: 12px; overflow: hidden; flex-shrink: 0;
  background: var(--panel-2); display: grid; place-items: center;
  box-shadow: 0 10px 26px var(--shadow);
}
.pb-cover { width: 100%; height: 100%; object-fit: cover; display: none; }
.pb-cover.show { display: block; }
.pb-placeholder { color: var(--faint); }
.pb-placeholder .i { width: 36px; height: 36px; }
.pb-placeholder.hide { display: none; }
.pb-info { min-width: 0; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--accent);
  background: var(--accent-soft); border-radius: 999px; padding: 3px 10px;
}
.hero-tag .i { width: 14px; height: 14px; }
.pb-info h2 {
  margin: 8px 0 4px; font-size: 16px; font-weight: 600; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pb-info p { margin: 0; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 列表 ---------- */
.list-section {
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 14px 10px 10px;
  flex: 1 0 auto; display: flex; flex-direction: column; min-height: 240px;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 12px 10px; }
.list-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.density-switch { display: inline-flex; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 2px; gap: 2px; }
.seg { border: 0; background: transparent; color: var(--muted); font-size: 12px; padding: 5px 11px; border-radius: 8px; cursor: pointer; transition: background 0.15s, color 0.15s; }
.seg:hover { color: var(--text); }
.seg.active { background: var(--accent-soft); color: var(--accent); }
.list-title { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.list-title h3 { margin: 0; font-size: 17px; font-weight: 600; }
.count { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-cols, .track-item {
  display: grid; grid-template-columns: var(--grid); align-items: center; gap: 12px; padding: 0 12px;
}
.list-cols { height: 30px; color: var(--muted); font-size: 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.c-dur, .dur { text-align: right; }
.track-list { display: flex; flex-direction: column; gap: 2px; padding-top: 4px; flex: 1; }
.track-item { height: var(--row-h); border-radius: 10px; cursor: pointer; border: 1px solid transparent; }
.track-item:hover { background: var(--panel-2); }
.track-item.active { background: var(--accent-soft); border-color: var(--accent-border); }
.idx { color: var(--muted); font-size: 12px; text-align: center; font-variant-numeric: tabular-nums; }
.track-item.active .idx { color: var(--accent); }
.thumb { width: var(--thumb); height: var(--thumb); border-radius: 7px; object-fit: cover; background: var(--panel-2); display: block; }
.meta { min-width: 0; }
.meta .name { font-size: var(--name-size); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-item.active .meta .name { color: var(--accent); font-weight: 600; }
.owner { color: var(--muted); font-size: var(--owner-size); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dur { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.del {
  width: 30px; height: 30px; border-radius: 8px; border: 0; background: transparent; color: var(--muted);
  display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity 0.15s, color 0.15s, background 0.15s;
}
.del .i { width: 16px; height: 16px; }
.track-item:hover .del { opacity: 1; }
.del:hover { color: var(--danger); background: var(--danger-soft); }
.bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.bars i { width: 3px; border-radius: 2px; background: var(--accent); animation: bar 0.9s ease-in-out infinite; }
.bars i:nth-child(1) { height: 6px; animation-delay: 0s; }
.bars i:nth-child(2) { height: 13px; animation-delay: 0.22s; }
.bars i:nth-child(3) { height: 9px; animation-delay: 0.44s; }
.track-list.is-paused .bars i { animation-play-state: paused; }
@keyframes bar { 0%, 100% { transform: scaleY(0.45); } 50% { transform: scaleY(1); } }
.empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; color: var(--muted); padding: 40px 20px; line-height: 1.9; }
.empty .i { width: 34px; height: 34px; margin: 0 auto 10px; color: var(--faint); }

/* ---------- 底部播放条 ---------- */
.playbar {
  grid-column: 1 / -1;
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 400px) minmax(0, 1fr);
  align-items: center;
  gap: 28px;
  padding: 12px 22px 10px;
  background: var(--panel);
  border-top: 1px solid var(--line);
  overflow: hidden;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.playbar-bg {
  position: absolute; inset: -50px; width: calc(100% + 100px); height: calc(100% + 100px);
  object-fit: cover; filter: var(--ambient-filter); opacity: 0;
  transition: opacity 0.5s ease; pointer-events: none;
}
.playbar-bg.show { opacity: 1; }
.pb-main {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "controls progress extra" "hint hint hint";
  align-items: center;
  gap: 6px 22px;
}
.pb-controls { grid-area: controls; display: flex; align-items: center; gap: 6px; }
.icon-btn.play {
  width: 48px; height: 48px; border-radius: 50%; color: var(--on-accent);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 20px var(--accent-shadow);
}
.icon-btn.play:hover { filter: brightness(1.08); background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.icon-btn.play .i { width: 24px; height: 24px; }
.pb-progress { grid-area: progress; display: flex; align-items: center; gap: 12px; min-width: 0; }
.time { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; min-width: 38px; text-align: center; }
.seek-wrap { position: relative; flex: 1; height: 20px; display: flex; align-items: center; }
.seek-wrap::before { content: ""; position: absolute; left: 0; right: 0; height: 5px; border-radius: 5px; background: var(--panel-3); }
.seek-fill {
  position: absolute; left: 0; height: 5px; width: 0; border-radius: 5px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.seek-fill::after {
  content: ""; position: absolute; right: -6px; top: 50%; transform: translateY(-50%);
  width: 13px; height: 13px; border-radius: 50%; background: var(--knob);
  box-shadow: 0 2px 8px var(--shadow); opacity: 0; transition: opacity 0.15s;
}
.seek-wrap:hover .seek-fill::after { opacity: 1; }
#seek { position: absolute; inset: 0; width: 100%; height: 20px; margin: 0; opacity: 0; cursor: pointer; }
.pb-extra { grid-area: extra; display: flex; align-items: center; gap: 6px; }
.pb-hint { grid-area: hint; text-align: center; font-size: 12px; color: var(--muted); }
input[type=range].volume { -webkit-appearance: none; appearance: none; width: 84px; height: 5px; border-radius: 5px; background: var(--panel-3); outline: none; cursor: pointer; }
input[type=range].volume::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%; background: var(--knob); box-shadow: 0 1px 5px var(--shadow); }
input[type=range].volume::-moz-range-thumb { width: 13px; height: 13px; border: 0; border-radius: 50%; background: var(--knob); }

/* ---------- 提示 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 110px; transform: translateX(-50%) translateY(14px);
  display: flex; align-items: center; gap: 14px; max-width: min(560px, 92vw);
  background: var(--panel-3); border: 1px solid var(--line); color: var(--text);
  padding: 10px 14px 10px 18px; border-radius: 12px; font-size: 13px;
  box-shadow: 0 12px 30px var(--shadow);
  opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; z-index: 60;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.toast-text { min-width: 0; }
.toast-action {
  flex-shrink: 0; border: 1px solid var(--accent-border); background: var(--accent-soft);
  color: var(--accent); border-radius: 9px; padding: 5px 12px; font-size: 12.5px; cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.toast-action:hover { background: var(--accent); color: var(--on-accent); }

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--scroll); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--scroll-hover); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  :root { --grid: 40px 46px minmax(0, 1fr) 68px 44px; }
  .c-owner, .owner { display: none; }
}
@media (max-width: 820px) {
  body { overflow: auto; }
  .layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; height: auto; min-height: 100vh; }
  .sidebar { border-right: 0; border-bottom: 1px solid var(--line); padding: 16px 14px 12px; }
  .brand { padding-bottom: 12px; }
  .pl-nav { flex-direction: row; overflow-x: auto; overflow-y: hidden; gap: 8px; padding-bottom: 4px; }
  .pl-item { flex-shrink: 0; }
  .pl-editor { margin-top: 10px; padding-top: 10px; }
  .sidebar-foot { display: none; }
  .main { overflow: visible; padding: 16px 14px 20px; }
  .playbar { position: sticky; bottom: 0; z-index: 10; grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 12px 14px; }
  .pb-cover-wrap { width: 64px; height: 64px; }
  .pb-info h2 { font-size: 15px; }
  .pb-main { grid-template-columns: minmax(0, 1fr); grid-template-areas: "controls" "progress" "extra" "hint"; gap: 8px; }
  .pb-controls { justify-content: center; }
  .pb-extra { justify-content: center; }
  .toast { bottom: 260px; }
  .modal-card { max-height: 92vh; }
  .modal-body { grid-template-columns: minmax(0, 1fr); overflow-y: auto; }
  .theme-col { overflow: visible; }
  .theme-col:first-child { border-right: 0; border-bottom: 1px solid var(--line); }
  .var-list, .var-editor { grid-template-columns: minmax(0, 1fr); }
}
