/* ══════════════════════════════════════
   CSS VARIABLES — Default (Midnight dark)
══════════════════════════════════════ */
:root {
  --bg:       #0e0e10;
  --surface:  #18181c;
  --border:   rgba(255,255,255,0.08);
  --text:     #f0efea;
  --muted:    #888786;
  --accent:   #c8a96e;
  --radius:   12px;
  --card-w:   180px;
  --player-h: 64px;
}

/* ── All themes ── */
body[data-theme="midnight"],
body[data-theme="midnight-dark"]  { --bg:#0e0e10; --surface:#18181c; --border:rgba(255,255,255,0.08); --text:#f0efea; --muted:#888786; --accent:#c8a96e; }
body[data-theme="midnight-light"] { --bg:#f6f3ed; --surface:#ffffff; --border:rgba(0,0,0,0.09); --text:#1a1916; --muted:#7a7875; --accent:#9a7a3e; }
body[data-theme="gruvbox-dark"]   { --bg:#282828; --surface:#3c3836; --border:rgba(255,255,255,0.1); --text:#ebdbb2; --muted:#a89984; --accent:#d79921; }
body[data-theme="gruvbox-light"]  { --bg:#fbf1c7; --surface:#f2e5bc; --border:rgba(0,0,0,0.1); --text:#3c3836; --muted:#7c6f64; --accent:#b57614; }
body[data-theme="dracula-dark"]   { --bg:#282a36; --surface:#44475a; --border:rgba(255,255,255,0.1); --text:#f8f8f2; --muted:#6272a4; --accent:#bd93f9; }
body[data-theme="dracula-light"]  { --bg:#f8f8ff; --surface:#ededff; --border:rgba(68,71,90,0.15); --text:#282a36; --muted:#6272a4; --accent:#7c5cbf; }
body[data-theme="nord-dark"]      { --bg:#2e3440; --surface:#3b4252; --border:rgba(255,255,255,0.08); --text:#eceff4; --muted:#7b88a1; --accent:#88c0d0; }
body[data-theme="nord-light"]     { --bg:#eceff4; --surface:#e5e9f0; --border:rgba(46,52,64,0.12); --text:#2e3440; --muted:#4c566a; --accent:#5e81ac; }
body[data-theme="solarized-dark"] { --bg:#002b36; --surface:#073642; --border:rgba(255,255,255,0.08); --text:#839496; --muted:#586e75; --accent:#2aa198; }
body[data-theme="solarized-light"]{ --bg:#fdf6e3; --surface:#eee8d5; --border:rgba(0,43,54,0.1); --text:#657b83; --muted:#93a1a1; --accent:#2aa198; }
body[data-theme="catppuccin-dark"] { --bg:#1e1e2e; --surface:#313244; --border:rgba(255,255,255,0.08); --text:#cdd6f4; --muted:#7f849c; --accent:#cba6f7; }
body[data-theme="catppuccin-light"]{ --bg:#eff1f5; --surface:#e6e9ef; --border:rgba(0,0,0,0.08); --text:#4c4f69; --muted:#8c8fa1; --accent:#8839ef; }
body[data-theme="rose-pine-dark"] { --bg:#191724; --surface:#26233a; --border:rgba(255,255,255,0.08); --text:#e0def4; --muted:#6e6a86; --accent:#ebbcba; }
body[data-theme="rose-pine-light"]{ --bg:#faf4ed; --surface:#fffaf3; --border:rgba(0,0,0,0.07); --text:#575279; --muted:#9893a5; --accent:#d7827a; }
body[data-theme="tokyonight-dark"] { --bg:#1a1b26; --surface:#24283b; --border:rgba(255,255,255,0.08); --text:#c0caf5; --muted:#565f89; --accent:#7aa2f7; }
body[data-theme="tokyonight-light"]{ --bg:#d5d6db; --surface:#cbccd1; --border:rgba(0,0,0,0.1); --text:#343b58; --muted:#6c6f93; --accent:#2e7de9; }
body[data-theme="retro-green-dark"] { --bg:#0a0f0a; --surface:#0f1a0f; --border:rgba(57,255,20,0.2); --text:#39ff14; --muted:#1e7a10; --accent:#39ff14; font-family:'Courier New',monospace; }
body[data-theme="retro-green-light"]{ --bg:#e8ffe4; --surface:#d0f5c8; --border:rgba(0,80,0,0.15); --text:#0a3d00; --muted:#2d7a10; --accent:#1a8f00; font-family:'Courier New',monospace; }

/* ══════════════════════════════════════
   RESET
══════════════════════════════════════ */
*, *::before, *::after { box-sizing:border-box; margin:0; padding:0; }
body {
  background:var(--bg); color:var(--text);
  font-family:'DM Sans',sans-serif; font-size:14px;
  line-height:1.5; min-height:100vh;
  transition:background 0.3s, color 0.3s;
  padding-bottom:calc(var(--player-h) + 8px);
  -webkit-app-region: no-drag;
}

/* ══════════════════════════════════════
   SCROLLBARS — slim, theme-adaptive
══════════════════════════════════════ */
/* Firefox */
* { scrollbar-width:thin; scrollbar-color:var(--border) transparent; }

/* Chromium / Electron (WebKit) */
::-webkit-scrollbar { width:5px; height:5px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb {
  background:var(--border);
  border-radius:99px;
  transition:background 0.2s;
}
::-webkit-scrollbar-thumb:hover { background:var(--muted); }
::-webkit-scrollbar-corner { background:transparent; }

/* ══════════════════════════════════════
   HEADER
══════════════════════════════════════ */
.header {
  display:flex; align-items:center; justify-content:space-between;
  padding:28px 32px 0; gap:16px;
  -webkit-app-region: drag;
}
.header * { -webkit-app-region: no-drag; }
.header-left  { display:flex; align-items:center; gap:12px; }
.header-right { display:flex; align-items:center; gap:8px; }
.logo {
  width:36px; height:36px; border-radius:50%;
  background:var(--text); flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
  transition:background 0.3s;
}
.logo::after { content:''; width:11px; height:11px; border-radius:50%; background:var(--bg); transition:background 0.3s; }
h1 { font-family:'DM Serif Display',serif; font-size:22px; font-weight:400; letter-spacing:-0.02em; color:var(--text); }

/* ══════════════════════════════════════
   STATS ROW
══════════════════════════════════════ */
.stats-row { display:flex; gap:10px; padding:20px 32px 0; }
.stat { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:12px 20px; min-width:90px; }
.stat-num   { font-family:'DM Serif Display',serif; font-size:22px; color:var(--text); line-height:1; }
.stat-label { font-size:12px; color:var(--muted); margin-top:3px; }

/* ══════════════════════════════════════
   CONTROLS
══════════════════════════════════════ */
.controls { display:flex; gap:8px; padding:20px 32px 0; flex-wrap:wrap; align-items:center; }
.search-wrap { flex:1; min-width:200px; position:relative; }
.search-icon { position:absolute; left:12px; top:50%; transform:translateY(-50%); color:var(--muted); font-size:16px; pointer-events:none; }
input[type="text"] {
  width:100%; padding:9px 12px 9px 36px;
  font-family:'DM Sans',sans-serif; font-size:13px;
  border-radius:99px; border:1px solid var(--border);
  background:var(--surface); color:var(--text);
  outline:none; transition:border-color 0.2s;
}
input[type="text"]::placeholder { color:var(--muted); }
input[type="text"]:focus { border-color:var(--accent); }
select {
  padding:9px 28px 9px 14px;
  font-family:'DM Sans',sans-serif; font-size:13px;
  border-radius:99px; border:1px solid var(--border);
  background:var(--surface); color:var(--text);
  cursor:pointer; outline:none; appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23888786' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 10px center;
  transition:border-color 0.2s;
}
select:focus { border-color:var(--accent); }

/* Zoom slider */
.zoom-slider {
  width:80px; accent-color:var(--accent);
  cursor:pointer; flex-shrink:0;
}

/* ══════════════════════════════════════
   ICON BUTTONS
══════════════════════════════════════ */
.icon-btn {
  width:36px; height:36px; border-radius:99px;
  border:1px solid var(--border); background:var(--surface);
  color:var(--muted); cursor:pointer; font-size:15px;
  display:flex; align-items:center; justify-content:center;
  transition:border-color 0.2s, color 0.2s;
  flex-shrink:0;
}
.icon-btn:hover  { border-color:var(--accent); color:var(--accent); }
.icon-btn.active { border-color:var(--accent); color:var(--accent); }

/* ══════════════════════════════════════
   FILTER BARS (format + decade)
══════════════════════════════════════ */
.filter-bar, .decade-bar {
  display:flex; flex-wrap:wrap; align-items:center;
  gap:6px; padding:14px 32px 0;
}
.filter-label { font-size:11px; color:var(--muted); margin-right:4px; text-transform:uppercase; letter-spacing:0.06em; }
.filter-chip {
  padding:4px 12px; border-radius:99px; font-size:11px; font-weight:600;
  border:1px solid var(--border); background:var(--surface);
  color:var(--muted); cursor:pointer; letter-spacing:0.04em;
  transition:border-color 0.15s, background 0.15s, color 0.15s;
  font-family:'DM Sans',sans-serif;
}
.filter-chip:hover  { border-color:var(--accent); color:var(--text); }
.filter-chip.active { border-color:var(--accent); background:color-mix(in srgb,var(--accent) 15%,var(--surface)); color:var(--accent); }

/* ══════════════════════════════════════
   SEARCH TABS
══════════════════════════════════════ */
.search-tabs {
  display:flex; gap:4px;
}
.search-tab {
  padding:5px 14px; border-radius:20px; border:1px solid var(--border);
  background:transparent; color:var(--muted); font-size:12px; font-family:'DM Sans',sans-serif;
  cursor:pointer; transition:all 0.15s;
}
.search-tab:hover { border-color:var(--accent); color:var(--text); }
.search-tab.active {
  background:var(--accent); border-color:var(--accent);
  color:var(--darkBg,#0e0e10); font-weight:600;
}

/* ══════════════════════════════════════
   TRACK SEARCH RESULTS
══════════════════════════════════════ */
#track-results-container {
  padding:8px 32px 40px;
}
.track-search-hint {
  padding:32px; text-align:center; color:var(--muted); font-size:13px;
}
.track-search-count {
  font-size:11px; color:var(--muted); text-transform:uppercase;
  letter-spacing:0.06em; padding:0 0 10px;
}
.track-search-row {
  display:flex; align-items:center; gap:12px;
  padding:8px 12px; border-radius:10px;
  border:1px solid transparent;
  cursor:pointer; transition:background 0.12s, border-color 0.12s;
}
.track-search-row:hover { background:var(--surface); border-color:var(--border); }
.track-search-art {
  width:40px; height:40px; border-radius:7px; flex-shrink:0;
  background:var(--bg); display:flex; align-items:center; justify-content:center;
  font-family:'DM Serif Display',serif; font-size:12px; color:rgba(255,255,255,0.2);
  overflow:hidden; position:relative;
}
.track-search-img {
  position:absolute; inset:0; width:100%; height:100%;
  object-fit:cover; opacity:0; transition:opacity 0.3s; border-radius:7px;
}
.track-search-img.loaded { opacity:1; }
.track-search-info { flex:1; min-width:0; }
.track-search-info:hover .track-search-name { color:var(--accent); }
.track-search-name {
  font-size:13px; font-weight:500; color:var(--text);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  transition:color 0.15s;
}
.track-search-name mark {
  background:transparent; color:var(--accent); font-weight:700;
}
.track-search-meta {
  font-size:11px; color:var(--muted);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.track-search-play {
  width:28px; height:28px; border-radius:50%; flex-shrink:0;
  border:1px solid var(--border); background:transparent;
  color:var(--accent); font-size:10px; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  transition:border-color 0.15s, background 0.15s; opacity:0;
}
.track-search-row:hover .track-search-play { opacity:1; }
.track-search-play:hover { background:var(--accent); border-color:var(--accent); color:var(--darkBg,#0e0e10); }
.track-search-play.no-preview { opacity:0 !important; cursor:default; }
.track-search-dur { font-size:11px; color:var(--muted); width:32px; text-align:right; flex-shrink:0; }

/* ══════════════════════════════════════
   KEYBOARD HINT
══════════════════════════════════════ */
.kb-hint {
  padding:10px 32px 0;
  font-size:11px; color:var(--muted);
  display:flex; gap:14px; flex-wrap:wrap;
}
.kb-hint kbd {
  display:inline-block; background:var(--surface);
  border:1px solid var(--border); border-radius:4px;
  padding:1px 5px; font-size:10px; font-family:'DM Sans',sans-serif;
  color:var(--muted); margin-right:3px;
}

/* ══════════════════════════════════════
   DIVIDER
══════════════════════════════════════ */
.divider { height:1px; background:var(--border); margin:16px 32px 0; }

/* ══════════════════════════════════════
   SCROLL-TO-TOP BUTTON
══════════════════════════════════════ */
.scroll-top-btn {
  position:fixed; bottom:calc(var(--player-h) + 16px); right:20px; z-index:120;
  width:36px; height:36px; border-radius:50%;
  border:1px solid var(--border); background:var(--surface);
  color:var(--muted); cursor:pointer; font-size:16px;
  display:flex; align-items:center; justify-content:center;
  opacity:0; pointer-events:none;
  transition:opacity 0.25s, border-color 0.2s, color 0.2s;
}
.scroll-top-btn.visible { opacity:1; pointer-events:auto; }
.scroll-top-btn:hover { border-color:var(--accent); color:var(--accent); }

/* ══════════════════════════════════════
   GRID VIEW
══════════════════════════════════════ */
.grid {
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(var(--card-w),1fr));
  gap:16px; padding:24px 32px 40px;
}

/* ══════════════════════════════════════
   LIST VIEW
══════════════════════════════════════ */
.list { display:flex; flex-direction:column; padding:16px 32px 40px; }
.list-row {
  display:flex; align-items:center; gap:14px;
  padding:10px 14px; border-radius:8px; cursor:pointer;
  transition:background 0.15s; border-bottom:1px solid var(--border);
}
.list-row:last-child { border-bottom:none; }
.list-row:hover { background:var(--surface); }
.list-thumb {
  width:44px; height:44px; border-radius:6px; flex-shrink:0;
  background:var(--surface); position:relative; overflow:hidden;
  display:flex; align-items:center; justify-content:center;
  font-family:'DM Serif Display',serif; font-size:14px; color:rgba(255,255,255,0.2);
}
.list-thumb img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; opacity:0; transition:opacity 0.3s; border-radius:6px; }
.list-thumb img.loaded { opacity:1; }
.list-info   { flex:1; min-width:0; }
.list-album  { font-size:13px; font-weight:500; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.list-artist { font-size:12px; color:var(--muted); margin-top:1px; }
.list-meta   { display:flex; align-items:center; gap:6px; flex-shrink:0; margin-right:4px; }
.list-year   { font-size:11px; color:var(--muted); font-variant-numeric:tabular-nums; }
.list-num    { font-size:12px; color:var(--muted); flex-shrink:0; font-variant-numeric:tabular-nums; width:28px; text-align:right; }

/* ══════════════════════════════════════
   CARD
══════════════════════════════════════ */
.card {
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--radius); overflow:hidden; cursor:pointer;
  transition:transform 0.2s, border-color 0.2s;
}
.card:hover { transform:translateY(-5px); border-color:var(--accent); }
.art { width:100%; aspect-ratio:1; position:relative; overflow:hidden; background:var(--bg); }
.art-placeholder {
  width:100%; height:100%; display:flex; align-items:center; justify-content:center;
  font-family:'DM Serif Display',serif; font-size:36px;
  color:rgba(255,255,255,0.18); position:absolute; inset:0;
}
.art img { width:100%; height:100%; object-fit:cover; position:absolute; inset:0; opacity:0; transition:opacity 0.4s; }
.art img.loaded { opacity:1; }
.skeleton {
  position:absolute; inset:0;
  background:linear-gradient(90deg,var(--surface) 25%,var(--border) 50%,var(--surface) 75%);
  background-size:200% 100%; animation:shimmer 1.4s infinite; transition:opacity 0.3s;
}
.skeleton.hide { opacity:0; pointer-events:none; }
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }
.art-overlay {
  position:absolute; inset:0; background:rgba(0,0,0,0.6);
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:7px; opacity:0; transition:opacity 0.2s;
}
.card:hover .art-overlay { opacity:1; }
.overlay-btn {
  display:block; width:115px; padding:7px 0; text-align:center;
  font-family:'DM Sans',sans-serif; font-size:12px; color:#fff;
  text-decoration:none; border:1px solid rgba(255,255,255,0.4);
  border-radius:99px; background:rgba(255,255,255,0.12);
  cursor:pointer; transition:background 0.2s;
}
.overlay-btn:hover { background:rgba(255,255,255,0.25); }
.card-info    { padding:10px 12px 13px; }
.card-album   { font-size:13px; font-weight:500; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.card-artist  { font-size:12px; color:var(--muted); margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* ══════════════════════════════════════
   FORMAT BADGES
══════════════════════════════════════ */
.format-badge {
  position:absolute; top:8px; left:8px;
  font-size:9px; font-weight:700; letter-spacing:0.06em;
  padding:3px 7px; border-radius:4px;
  line-height:1; pointer-events:none;
  font-family:'DM Sans',sans-serif; text-transform:uppercase;
  backdrop-filter:blur(4px); z-index:2;
}
.format-badge.fmt-inline       { position:static; display:inline-flex; align-items:center; backdrop-filter:none; }
.format-badge.modal-fmt-badge  { position:static; display:inline-flex; align-items:center; backdrop-filter:none; }
.fmt-vinyl    { background:rgba(30,20,50,0.82);  color:#d4b8ff; border:1px solid rgba(180,130,255,0.4); }
.fmt-cd       { background:rgba(10,30,50,0.82);  color:#7fd4ff; border:1px solid rgba(80,180,255,0.4); }
.fmt-cassette { background:rgba(50,30,10,0.82);  color:#ffcc66; border:1px solid rgba(255,180,50,0.4); }
.fmt-digital  { background:rgba(10,40,20,0.82);  color:#5ddb7c; border:1px solid rgba(50,200,90,0.4); }
.fmt-sacd     { background:rgba(50,10,10,0.82);  color:#ff9090; border:1px solid rgba(255,100,100,0.4); }
.fmt-bluray   { background:rgba(10,20,55,0.82);  color:#80aaff; border:1px solid rgba(80,130,255,0.4); }
.fmt-dvd      { background:rgba(30,30,10,0.82);  color:#e0d060; border:1px solid rgba(200,180,50,0.4); }
.fmt-other    { background:rgba(40,40,40,0.82);  color:#cccccc; border:1px solid rgba(180,180,180,0.35); }
body[data-theme$="-light"] .fmt-vinyl    { background:rgba(60,20,120,0.88); }
body[data-theme$="-light"] .fmt-cd       { background:rgba(10,60,120,0.88); }
body[data-theme$="-light"] .fmt-cassette { background:rgba(120,70,10,0.88); }
body[data-theme$="-light"] .fmt-digital  { background:rgba(10,90,30,0.88); }
body[data-theme$="-light"] .fmt-sacd     { background:rgba(120,20,20,0.88); }
body[data-theme$="-light"] .fmt-other    { background:rgba(60,60,60,0.88); }

/* ══════════════════════════════════════
   OWNERSHIP BADGE
══════════════════════════════════════ */
.own-badge {
  position:absolute; top:8px; right:8px;
  font-size:9px; font-weight:700; letter-spacing:0.06em;
  padding:3px 7px; border-radius:4px;
  line-height:1; pointer-events:none;
  font-family:'DM Sans',sans-serif; text-transform:uppercase;
  backdrop-filter:blur(4px); z-index:2;
}
.own-badge.own-inline {
  position:static; display:inline-flex; align-items:center; backdrop-filter:none;
}
.own-badge-own  { background:rgba(10,50,20,0.85);  color:#6eefaa; border:1px solid rgba(60,200,110,0.4); }
.own-badge-want { background:rgba(50,20,10,0.85);  color:#ffaa6e; border:1px solid rgba(220,120,50,0.4); }
body[data-theme$="-light"] .own-badge-own  { background:rgba(10,100,40,0.88); }
body[data-theme$="-light"] .own-badge-want { background:rgba(140,60,10,0.88); }

/* Ownership filter chips */
.own-bar { padding:6px 32px 0; display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.own-chip-own.filter-chip  { border-color:rgba(60,200,110,0.4); color:#6eefaa; }
.own-chip-own.filter-chip.active  { background:rgba(10,50,20,0.85); border-color:rgba(60,200,110,0.6); color:#6eefaa; }
.own-chip-want.filter-chip { border-color:rgba(220,120,50,0.4);  color:#ffaa6e; }
.own-chip-want.filter-chip.active { background:rgba(50,20,10,0.85); border-color:rgba(220,120,50,0.6);  color:#ffaa6e; }

/* ══════════════════════════════════════
   EMPTY / LOADING
══════════════════════════════════════ */
.empty { grid-column:1/-1; text-align:center; padding:60px 20px; color:var(--muted); }
.empty-icon { font-size:40px; margin-bottom:12px; opacity:0.4; }
.empty p    { font-size:15px; }
.empty .hint { margin-top:12px; font-size:12px; color:var(--muted); max-width:440px; margin-left:auto; margin-right:auto; line-height:1.8; }
.empty .hint code { font-family:monospace; font-size:11px; background:var(--surface); padding:2px 6px; border-radius:4px; border:1px solid var(--border); }
.loading-msg { grid-column:1/-1; text-align:center; padding:60px 20px; color:var(--muted); font-size:14px; }

/* ══════════════════════════════════════
   MODAL BACKDROP
══════════════════════════════════════ */
.modal-backdrop {
  position:fixed; inset:0; z-index:100;
  background:rgba(0,0,0,0.7);
  display:flex; align-items:center; justify-content:center; padding:24px;
  opacity:0; pointer-events:none; transition:opacity 0.25s;
}
.modal-backdrop.open { opacity:1; pointer-events:all; }

/* ══════════════════════════════════════
   MODAL PANEL
══════════════════════════════════════ */
.modal {
  background:var(--bg); border:1px solid var(--border);
  border-radius:16px; width:100%; max-width:640px; max-height:88vh;
  overflow:hidden; display:flex; flex-direction:column;
  transform:translateY(20px) scale(0.97); transition:transform 0.25s; position:relative;
}
.modal-backdrop.open .modal { transform:translateY(0) scale(1); }
.modal-hero   { display:flex; flex-shrink:0; }
.modal-art    { width:180px; height:180px; flex-shrink:0; position:relative; overflow:hidden; background:var(--surface); border-radius:16px 0 0 0; }
.modal-art img { width:100%; height:100%; object-fit:cover; opacity:0; transition:opacity 0.4s; }
.modal-art img.loaded { opacity:1; }
.modal-art-placeholder { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-family:'DM Serif Display',serif; font-size:52px; color:rgba(255,255,255,0.15); }
.modal-meta   { flex:1; padding:22px 20px 18px; display:flex; flex-direction:column; justify-content:space-between; min-width:0; border-bottom:1px solid var(--border); }
.modal-album  { font-family:'DM Serif Display',serif; font-size:20px; color:var(--text); line-height:1.25; margin-bottom:3px; }
.modal-artist { font-size:13px; color:var(--muted); margin-bottom:6px; }
.modal-meta-row { display:flex; flex-wrap:wrap; align-items:center; gap:5px; margin-bottom:8px; }
.modal-year   { display:inline-flex; align-items:center; font-size:11px; font-weight:600; padding:2px 9px; border-radius:99px; background:var(--surface); border:1px solid var(--border); color:var(--muted); font-variant-numeric:tabular-nums; }
.modal-tags   { display:flex; flex-wrap:wrap; gap:5px; margin-bottom:8px; }
.modal-tag    { font-size:11px; padding:3px 10px; border-radius:99px; background:var(--surface); border:1px solid var(--border); color:var(--muted); }
.source-badge { background:color-mix(in srgb,var(--accent) 15%,var(--surface)); border-color:var(--accent); color:var(--accent); }
.modal-similar { display:flex; flex-wrap:wrap; gap:5px; margin-bottom:8px; }
.similar-chip { font-size:11px; padding:3px 10px; border-radius:99px; background:var(--surface); border:1px solid var(--accent); color:var(--accent); cursor:pointer; transition:background 0.15s; }
.similar-chip:hover { background:var(--border); }
.modal-actions { display:flex; gap:6px; flex-wrap:wrap; }
.modal-btn {
  padding:6px 12px; border-radius:99px; font-size:11px;
  font-family:'DM Sans',sans-serif; cursor:pointer;
  border:1px solid var(--border); background:var(--surface); color:var(--text);
  text-decoration:none; transition:border-color 0.2s;
  display:inline-flex; align-items:center; gap:4px;
}
.modal-btn:hover { border-color:var(--accent); }
.modal-btn.primary { background:var(--accent); border-color:var(--accent); color:#111; }
.modal-btn-spotify { border-color:rgba(30,215,96,0.5); color:#1ed760; }
.modal-btn-spotify:hover { border-color:#1ed760; background:rgba(30,215,96,0.1); color:#1ed760; }
.overlay-btn-spotify { border-color:rgba(30,215,96,0.7); color:#1ed760; background:rgba(0,0,0,0.35); }
.overlay-btn-spotify:hover { background:rgba(30,215,96,0.18); }
.modal-remove-btn { margin-left:auto; border-color:rgba(220,60,60,0.4); color:#e05555; }
.modal-remove-btn:hover { border-color:#e05555; background:rgba(220,60,60,0.12); color:#ff6b6b; }
.modal-close {
  position:absolute; top:12px; right:14px; width:28px; height:28px; border-radius:50%;
  border:1px solid var(--border); background:var(--surface); color:var(--muted);
  cursor:pointer; font-size:16px; display:flex; align-items:center; justify-content:center;
  transition:background 0.2s, color 0.2s; z-index:2; line-height:1;
}
.modal-close:hover { background:var(--border); color:var(--text); }
.modal-summary { display:flex; border-bottom:1px solid var(--border); flex-shrink:0; }
.modal-summary-item { flex:1; padding:12px 16px; text-align:center; border-right:1px solid var(--border); }
.modal-summary-item:last-child { border-right:none; }
.modal-summary-num   { font-family:'DM Serif Display',serif; font-size:18px; color:var(--text); }
.modal-summary-label { font-size:11px; color:var(--muted); margin-top:2px; }

/* ══════════════════════════════════════
   TRACKLIST
══════════════════════════════════════ */
.modal-tracklist { overflow-y:auto; flex:1; padding:8px 0; }
.track {
  display:flex; align-items:center; padding:8px 16px; gap:10px;
  transition:background 0.15s; cursor:pointer; border-bottom:1px solid var(--border);
  position:relative; overflow:hidden;
}
.track:last-child { border-bottom:none; }
.track:hover  { background:var(--surface); }
.track.playing { background:var(--surface); }
.track.playing .track-name { color:var(--accent); }
.track.playing .track-num  { color:var(--accent); }
.track-progress { position:absolute; left:0; top:0; bottom:0; width:0%; background:var(--accent); opacity:0.08; pointer-events:none; transition:width 0.5s linear; }
.track-play {
  width:26px; height:26px; border-radius:50%;
  border:1px solid var(--border); background:transparent;
  color:var(--muted); cursor:pointer; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
  font-size:10px; transition:background 0.15s, border-color 0.15s, color 0.15s; opacity:0;
}
.track:hover .track-play { opacity:1; }
.track.playing .track-play { opacity:1; border-color:var(--accent); color:var(--accent); }
.track-play:hover { background:var(--surface); border-color:var(--accent); color:var(--accent); }
.track-play.no-preview { opacity:0 !important; cursor:default; }
.track-num  { font-size:12px; color:var(--muted); width:20px; text-align:right; flex-shrink:0; font-variant-numeric:tabular-nums; transition:color 0.15s; }
.track-name { flex:1; font-size:13px; color:var(--text); min-width:0; transition:color 0.15s; }
.track-dur  { font-size:12px; color:var(--muted); flex-shrink:0; font-variant-numeric:tabular-nums; }
.track-loading { padding:32px 20px; text-align:center; color:var(--muted); font-size:13px; }
.track-error   { padding:20px; text-align:center; color:var(--muted); font-size:13px; }

/* ══════════════════════════════════════
   WIKI BLURB
══════════════════════════════════════ */
.modal-wiki { padding:14px 20px 16px; font-size:12px; color:var(--muted); line-height:1.7; border-top:1px solid var(--border); flex-shrink:0; }
.modal-wiki a { color:var(--accent); text-decoration:none; }
.modal-wiki a:hover { text-decoration:underline; }
.modal-notes { padding:14px 20px 16px; border-top:1px solid var(--border); flex-shrink:0; }
.modal-notes-label { font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:1.5px; color:var(--muted); margin-bottom:6px; }
.modal-notes-text { font-size:12px; color:var(--text); line-height:1.7; font-style:italic; opacity:0.85; }
.modal-tags-list { display:flex; flex-wrap:wrap; gap:6px; }
.modal-tag { font-size:11px; padding:3px 10px; border-radius:12px; background:rgba(200,169,110,0.1); color:var(--accent); border:1px solid rgba(200,169,110,0.2); }
.tag-chip { border-color:var(--accent) !important; color:var(--accent) !important; }
.tag-chip.active { background:var(--accent) !important; color:var(--bg) !important; }

/* ══════════════════════════════════════
   NOW-PLAYING BAR
══════════════════════════════════════ */
.now-playing {
  position:fixed; bottom:0; left:0; right:0; z-index:150;
  height:var(--player-h);
  background:var(--surface); border-top:1px solid var(--border);
  display:flex; align-items:center; padding:0 20px; gap:14px;
  transform:translateY(100%); transition:transform 0.3s;
}
.now-playing.visible { transform:translateY(0); }
.np-art {
  width:40px; height:40px; border-radius:6px; flex-shrink:0;
  background:var(--bg); overflow:hidden; position:relative;
  display:flex; align-items:center; justify-content:center;
  font-family:'DM Serif Display',serif; font-size:13px; color:rgba(255,255,255,0.2);
}
.np-art img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; opacity:0; transition:opacity 0.3s; }
.np-art img.loaded { opacity:1; }
.np-info { flex:1; min-width:0; }
.np-track  { font-size:13px; font-weight:500; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.np-artist { font-size:11px; color:var(--muted); margin-top:1px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.np-progress-wrap { flex:1; max-width:240px; display:flex; flex-direction:column; gap:4px; }
.np-progress-bar  { height:3px; background:var(--border); border-radius:2px; overflow:hidden; }
.np-progress-fill { height:100%; background:var(--accent); width:0%; transition:width 0.5s linear; border-radius:2px; }
.np-time { font-size:10px; color:var(--muted); display:flex; justify-content:space-between; }
.np-controls { display:flex; align-items:center; gap:6px; flex-shrink:0; }
.np-btn {
  width:30px; height:30px; border-radius:50%; flex-shrink:0;
  border:1px solid var(--border); background:transparent;
  color:var(--muted); cursor:pointer; font-size:13px;
  display:flex; align-items:center; justify-content:center;
  transition:border-color 0.2s, color 0.2s;
}
.np-btn:hover { border-color:var(--accent); color:var(--accent); }
.np-stop-btn { font-size:11px; }
.np-vol-slider { width:60px; accent-color:var(--accent); cursor:pointer; }

/* ══════════════════════════════════════
   STATS DASHBOARD
══════════════════════════════════════ */
.dash-backdrop {
  position:fixed; inset:0; z-index:200;
  background:rgba(0,0,0,0.7);
  display:flex; align-items:center; justify-content:center; padding:24px;
  opacity:0; pointer-events:none; transition:opacity 0.25s;
}
.dash-backdrop.open { opacity:1; pointer-events:all; }
.dash-panel {
  background:var(--bg); border:1px solid var(--border);
  border-radius:18px; width:100%; max-width:680px; max-height:90vh;
  overflow-y:auto; display:flex; flex-direction:column;
  transform:translateY(20px) scale(0.97); transition:transform 0.25s;
}
.dash-backdrop.open .dash-panel { transform:translateY(0) scale(1); }
.dash-header {
  display:flex; align-items:center; justify-content:space-between;
  padding:22px 26px 18px; border-bottom:1px solid var(--border);
  position:sticky; top:0; background:var(--bg); z-index:1;
}
.dash-title { font-family:'DM Serif Display',serif; font-size:20px; color:var(--text); }
.dash-body  { padding:24px 26px; }
.dash-summary { display:flex; gap:12px; margin-bottom:28px; flex-wrap:wrap; }
.dash-stat { background:var(--surface); border:1px solid var(--border); border-radius:12px; padding:14px 20px; flex:1; min-width:100px; }
.dash-stat-num   { font-family:'DM Serif Display',serif; font-size:26px; color:var(--accent); line-height:1; }
.dash-stat-label { font-size:11px; color:var(--muted); margin-top:4px; }
.dash-charts { display:grid; grid-template-columns:1fr 1fr; gap:20px; margin-bottom:28px; }
.dash-chart-block { background:var(--surface); border:1px solid var(--border); border-radius:12px; padding:16px; }
.dash-chart-title { font-size:12px; font-weight:500; color:var(--muted); margin-bottom:12px; text-transform:uppercase; letter-spacing:0.06em; }
.dash-chart-block canvas { display:block; width:100% !important; height:auto; }
.dash-section { margin-bottom:24px; }
.dash-section-title { font-size:12px; font-weight:500; color:var(--muted); text-transform:uppercase; letter-spacing:0.06em; margin-bottom:12px; }
.dash-artist-list { display:flex; flex-direction:column; gap:6px; }
.dash-artist-row  { display:flex; align-items:center; gap:10px; }
.dash-artist-rank { font-size:11px; color:var(--muted); width:18px; text-align:right; flex-shrink:0; font-variant-numeric:tabular-nums; }
.dash-artist-name { font-size:13px; color:var(--text); width:160px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; flex-shrink:0; }
.dash-artist-bar-wrap { flex:1; height:8px; background:var(--border); border-radius:4px; overflow:hidden; }
.dash-artist-bar  { height:100%; background:var(--accent); border-radius:4px; transition:width 0.6s ease; }
.dash-artist-count { font-size:12px; color:var(--muted); width:24px; text-align:right; flex-shrink:0; font-variant-numeric:tabular-nums; }
.dash-duplicates  { display:flex; flex-direction:column; gap:6px; }
.dash-dupe-row    { display:flex; align-items:center; gap:10px; padding:8px 12px; background:var(--surface); border:1px solid var(--border); border-radius:8px; flex-wrap:wrap; }
.dash-dupe-album  { font-size:13px; font-weight:500; color:var(--text); flex:1; min-width:120px; }
.dash-dupe-artist { font-size:12px; color:var(--muted); }
.dash-dupe-fmts   { font-size:11px; color:var(--accent); font-weight:600; flex-shrink:0; }
.dash-no-dupes    { font-size:13px; color:var(--muted); padding:12px 0; }

/* ══════════════════════════════════════
   SETTINGS PANEL
══════════════════════════════════════ */
.settings-backdrop {
  position:fixed; inset:0; z-index:200;
  background:rgba(0,0,0,0.65);
  display:flex; align-items:center; justify-content:center; padding:24px;
  opacity:0; pointer-events:none; transition:opacity 0.25s;
}
.settings-backdrop.open { opacity:1; pointer-events:all; }
.settings-panel {
  background:var(--bg); border:1px solid var(--border);
  border-radius:18px; width:100%; max-width:520px; max-height:90vh;
  overflow-y:auto; display:flex; flex-direction:column; padding:0 0 24px;
  transform:translateY(24px) scale(0.97); transition:transform 0.25s;
}
.settings-backdrop.open .settings-panel { transform:translateY(0) scale(1); }
.settings-header {
  display:flex; align-items:center; justify-content:space-between;
  padding:22px 26px 18px; border-bottom:1px solid var(--border);
  flex-shrink:0; position:sticky; top:0; background:var(--bg); z-index:1;
}
.settings-title { font-family:'DM Serif Display',serif; font-size:20px; color:var(--text); }
.settings-section { padding:20px 26px 0; }
.settings-section-title { font-size:11px; font-weight:500; letter-spacing:0.08em; text-transform:uppercase; color:var(--muted); margin-bottom:12px; }
.settings-field  { margin-bottom:14px; }
.settings-label  { display:block; font-size:13px; color:var(--text); margin-bottom:6px; font-weight:500; }
.settings-input  {
  width:100%; padding:10px 14px;
  font-family:'DM Sans',sans-serif; font-size:13px;
  border-radius:10px; border:1px solid var(--border);
  background:var(--surface); color:var(--text);
  outline:none; transition:border-color 0.2s;
}
.settings-input:focus { border-color:var(--accent); }
.settings-hint   { font-size:11px; color:var(--muted); margin-top:5px; line-height:1.5; }
.settings-hint a { color:var(--accent); text-decoration:none; }
.settings-hint a:hover { text-decoration:underline; }
.theme-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:8px; }
.theme-option {
  display:flex; align-items:center; gap:10px;
  padding:10px 14px; border-radius:10px;
  border:1px solid var(--border); background:var(--surface);
  cursor:pointer; transition:border-color 0.15s;
}
.theme-option:hover { border-color:var(--accent); }
.theme-option.active { border-color:var(--accent); background:color-mix(in srgb,var(--accent) 10%,var(--surface)); }
.theme-swatch { width:28px; height:28px; border-radius:50%; flex-shrink:0; border:2px solid transparent; }
.theme-option.active .theme-swatch { border-color:var(--accent); }
.theme-option-info    { min-width:0; }
.theme-option-name    { font-size:13px; color:var(--text); font-weight:500; }
.theme-option-variant { font-size:11px; color:var(--muted); }
.settings-footer {
  display:flex; justify-content:flex-end; gap:8px;
  padding:22px 26px 0; border-top:1px solid var(--border); margin-top:22px;
}
.settings-btn { padding:9px 20px; border-radius:99px; font-size:13px; font-family:'DM Sans',sans-serif; cursor:pointer; border:1px solid var(--border); transition:background 0.15s, border-color 0.15s; }
.settings-btn.secondary { background:var(--surface); color:var(--text); }
.settings-btn.secondary:hover { border-color:var(--accent); }
.settings-btn.primary { background:var(--accent); border-color:var(--accent); color:#111; font-weight:500; }
.settings-btn.primary:hover { opacity:0.88; }

/* ══════════════════════════════════════
   CONTEXT MENU
══════════════════════════════════════ */
.ctx-menu {
  position:fixed; z-index:500;
  background:var(--surface); border:1px solid var(--border);
  border-radius:10px; padding:4px 0; min-width:170px;
  box-shadow:0 8px 32px rgba(0,0,0,0.4);
  animation:ctx-appear 0.12s ease;
}
@keyframes ctx-appear { from{opacity:0;transform:scale(0.95)} to{opacity:1;transform:scale(1)} }
.ctx-item {
  padding:8px 16px; font-size:13px; color:var(--text);
  cursor:pointer; transition:background 0.1s;
}
.ctx-item:hover { background:var(--border); color:var(--accent); }
.ctx-sep { height:1px; background:var(--border); margin:4px 0; }

/* ══════════════════════════════════════
   LIGHT THEME OVERRIDES
══════════════════════════════════════ */
body[data-theme$="-light"] .art-placeholder,
body[data-theme$="-light"] .modal-art-placeholder,
body[data-theme$="-light"] .list-thumb,
body[data-theme$="-light"] .np-art,
body[data-theme$="-light"] .format-badge { backdrop-filter:none; }

/* ══════════════════════════════════════
   IMPORT PANEL & FILE DROP ZONE
══════════════════════════════════════ */
.import-hint {
  font-size:12px; color:var(--muted); margin-bottom:12px; line-height:1.6;
}
.file-drop-zone {
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:6px; padding:28px 20px; border-radius:12px;
  border:2px dashed var(--border); background:var(--bg);
  cursor:pointer; transition:border-color 0.2s, background 0.2s;
  text-align:center;
}
.file-drop-zone:hover { border-color:var(--accent); background:color-mix(in srgb,var(--accent) 6%,var(--bg)); }
.file-drop-icon { font-size:28px; }
.file-drop-text { font-size:13px; font-weight:500; color:var(--text); }
.file-drop-sub  { font-size:11px; color:var(--muted); }
.import-status  { font-size:12px; margin-top:10px; min-height:18px; }
.import-status.success { color:#6eefaa; }
.import-status.error   { color:#ff7070; }

/* Column map table in import panel */
.col-map-grid {
  display:grid; grid-template-columns:auto 1fr; gap:4px 12px;
  margin:8px 0 10px; font-size:11px;
}
.col-map-field { color:var(--accent); font-weight:600; }
.col-map-vals  { color:var(--muted); }

/* Danger button */
.settings-btn.danger {
  background:rgba(200,60,60,0.15); border-color:rgba(200,60,60,0.4); color:#ff8080;
}
.settings-btn.danger:hover { background:rgba(200,60,60,0.28); }

/* ══════════════════════════════════════
   ADD ALBUM PANEL
══════════════════════════════════════ */
.add-form-grid {
  display:grid; grid-template-columns:1fr 1fr; gap:0 16px;
}
.add-field-full { grid-column:1/-1; }

/* ── Autocomplete dropdown ── */
.autocomplete-dropdown {
  display:none;
  position:absolute;
  left:0; right:0; top:100%;
  z-index:50;
  background:var(--surface);
  border:1px solid var(--border);
  border-top:none;
  border-radius:0 0 10px 10px;
  max-height:200px;
  overflow-y:auto;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.autocomplete-dropdown.open { display:block; }
.autocomplete-item {
  padding:8px 12px;
  cursor:pointer;
  font-size:13px;
  color:var(--text);
  border-bottom:1px solid var(--border);
  transition:background 0.1s;
}
.autocomplete-item:last-child { border-bottom:none; }
.autocomplete-item:hover, .autocomplete-item.selected {
  background:rgba(200,169,110,0.08);
}
.autocomplete-item .ac-main {
  font-weight:500;
}
.autocomplete-item .ac-sub {
  font-size:11px;
  color:var(--muted);
  margin-top:1px;
}
.autocomplete-item .ac-meta {
  font-size:10px;
  color:var(--muted);
  float:right;
  margin-top:2px;
}

.add-art-wrap {
  display:flex; align-items:flex-start; gap:14px; margin-top:10px;
}
#add-art-preview {
  width:80px; height:80px; border-radius:10px; object-fit:cover;
  border:1px solid var(--border); flex-shrink:0;
}
.add-status-wrap { flex:1; }

/* ══════════════════════════════════════
   HEADER IMPORT / ADD BUTTONS
══════════════════════════════════════ */
#add-btn {
  font-size:20px; font-weight:400; line-height:1;
}
#import-btn {
  font-size:16px;
}

/* ══════════════════════════════════════
   MODAL EDIT BUTTON
══════════════════════════════════════ */
.modal-edit-btn {
  background: rgba(var(--accent-rgb, 200,169,110), 0.12);
  border-color: var(--accent);
  color: var(--accent);
}
.modal-edit-btn:hover {
  background: rgba(var(--accent-rgb, 200,169,110), 0.22);
}

/* ══════════════════════════════════════
   AUTO-FETCH PANEL
══════════════════════════════════════ */
.autofetch-summary {
  display: flex; gap: 16px; margin-bottom: 4px;
}
.autofetch-stat {
  display: flex; flex-direction: column; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 18px; flex: 1; text-align: center;
}
.autofetch-num {
  font-size: 24px; font-weight: 700; color: var(--accent); line-height: 1;
}
.autofetch-lbl {
  font-size: 11px; color: var(--muted); margin-top: 4px;
}
.autofetch-progress-wrap {
  margin-top: 12px;
}
.autofetch-bar-track {
  height: 6px; background: var(--border); border-radius: 99px; overflow: hidden;
}
.autofetch-bar-fill {
  height: 100%; background: var(--accent); border-radius: 99px;
  transition: width 0.3s ease; width: 0%;
}
.autofetch-progress-label {
  font-size: 11px; color: var(--muted); text-align: right; margin-top: 4px;
}
.autofetch-result-row {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px;
  padding: 6px 8px; border-radius: 6px; font-size: 12px;
  border-bottom: 1px solid var(--border);
}
.autofetch-updated { background: rgba(110,239,170,0.05); }
.autofetch-row-album  { font-weight: 600; color: var(--text); }
.autofetch-row-artist { color: var(--muted); }
.autofetch-row-changes { color: var(--accent); font-size: 11px; }
.autofetch-row-changes strong { color: var(--text); }

/* ══════════════════════════════════════
   IMPORT SOURCE TABS
══════════════════════════════════════ */
.import-source-tabs {
  display: flex; gap: 6px; margin-bottom: 16px;
}
.import-tab {
  flex: 1; padding: 8px 12px; border-radius: 8px;
  border: 1px solid var(--border); background: transparent;
  color: var(--muted); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all 0.15s; font-family: inherit;
}
.import-tab:hover { border-color: var(--accent); color: var(--text); }
.import-tab.active {
  background: rgba(200,169,110,0.12); border-color: var(--accent);
  color: var(--accent);
}
.import-source-pane { animation: fadeIn 0.15s ease; }
@keyframes fadeIn { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:none; } }

/* ══════════════════════════════════════
   GOOGLE SHEETS STEPS
══════════════════════════════════════ */
.gsheet-steps {
  display: flex; flex-direction: column; gap: 10px; margin-bottom: 4px;
}
.gsheet-step {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 12px;
}
.gsheet-step-num {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: #111;
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
}
.gsheet-step-title {
  font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 2px;
}
.gsheet-step-desc {
  font-size: 12px; color: var(--muted); line-height: 1.5;
}
.gsheet-step-desc code {
  font-size: 11px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 4px; padding: 1px 5px; color: var(--accent);
  word-break: break-all;
}

/* ══════════════════════════════════════
   GOOGLE SHEETS LIVE SYNC UI
══════════════════════════════════════ */

/* Toggle switch */
.settings-toggle-wrap {
  position: relative; display: inline-block;
  width: 40px; height: 22px; cursor: pointer; flex-shrink: 0;
}
.settings-toggle-wrap input { opacity: 0; width: 0; height: 0; position: absolute; }
.settings-toggle-track {
  position: absolute; inset: 0; background: var(--border);
  border-radius: 99px; border: 1px solid var(--border);
  transition: background 0.2s, border-color 0.2s;
}
.settings-toggle-wrap input:checked + .settings-toggle-track {
  background: var(--accent); border-color: var(--accent);
}
.settings-toggle-thumb {
  position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.settings-toggle-wrap input:checked + .settings-toggle-track .settings-toggle-thumb {
  transform: translateX(18px);
}

/* Sync status row inside settings */
.sync-status-row {
  display: flex; align-items: center; gap: 8px;
  margin-top: 10px; padding: 8px 10px;
  background: var(--bg); border-radius: 8px;
  border: 1px solid var(--border);
}
.sync-status-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.sync-dot-on  { background: #6eefaa; box-shadow: 0 0 6px #6eefaa88; }
.sync-dot-off { background: var(--muted); }
.sync-status-text { font-size: 12px; color: var(--muted); flex: 1; }
.sync-now-btn { font-size: 11px; padding: 4px 10px; margin: 0; }

/* Sync pill in header */
.sync-pill {
  display: flex; align-items: center; gap: 6px;
  padding: 0 10px; height: 34px; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 12px; color: var(--muted); white-space: nowrap;
  transition: border-color 0.2s;
}
.sync-pill:hover { border-color: var(--accent); }
.sync-pill-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #6eefaa; box-shadow: 0 0 5px #6eefaa88;
  flex-shrink: 0;
}
.sync-pill.syncing .sync-pill-dot {
  animation: syncPulse 0.8s ease-in-out infinite alternate;
}
@keyframes syncPulse {
  from { opacity: 0.3; transform: scale(0.8); }
  to   { opacity: 1;   transform: scale(1.2); }
}

/* Toast notification */
.sync-toast {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%) translateY(16px);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 18px;
  font-size: 13px; color: var(--text);
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 9999; white-space: nowrap;
}
.sync-toast.visible {
  opacity: 1; transform: translateX(-50%) translateY(0);
}
.sync-toast-success { border-color: #6eefaa55; color: #6eefaa; }
.sync-toast-error   { border-color: #ff707055; color: #ff7070; }
.sync-toast-info    { border-color: var(--accent); color: var(--accent); }

/* ══════════════════════════════════════
   EXPORT WEB PAGE — settings section
══════════════════════════════════════ */
.export-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
@media (max-width: 480px) {
  .export-options-grid { grid-template-columns: 1fr; }
}
.export-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.export-check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}
.export-check-row input[type="checkbox"] {
  width: 15px; height: 15px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

/* ── Custom Theme Builder ── */
.custom-theme-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.custom-theme-colors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
}
.ct-color-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ct-color-label {
  font-size: 12px;
  color: var(--muted);
  width: 64px;
  flex-shrink: 0;
}
.ct-color-swatch {
  width: 36px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border);
  cursor: pointer;
  padding: 0;
  background: none;
  flex-shrink: 0;
}
.ct-color-swatch::-webkit-color-swatch-wrapper { padding: 0; }
.ct-color-swatch::-webkit-color-swatch { border: none; border-radius: 4px; }
.ct-preview-wrap {
  margin-top: 4px;
}
.ct-preview {
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: background 0.2s, border-color 0.2s;
}
.ct-preview-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  transition: background 0.2s;
}
.ct-preview-art {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  flex-shrink: 0;
  transition: background 0.2s;
}
.ct-preview-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ct-preview-album {
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s;
}
.ct-preview-artist {
  font-size: 11px;
  transition: color 0.2s;
}
.ct-preview-accent {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: color 0.2s;
}

/* ══════════════════════════════════════
   NEW v2 STYLES
══════════════════════════════════════ */

/* App font variable */
:root { --app-font: 'DM Sans', sans-serif; }
body { font-family: var(--app-font) !important; }
.card-album, .card-artist, .list-album, .list-artist,
.modal-album, .modal-artist, .settings-label, .settings-input,
.filter-chip, .dash-stat-label, .dash-stat-num { font-family: var(--app-font); }

/* Hide now-playing bar (player removed) */
.now-playing { display: none !important; }

/* Filters container — collapsible */
.filters-container {
  max-height: 500px;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s;
  opacity: 1;
}
.filters-container.collapsed {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

.filter-toggle-btn {
  font-size: 11px !important;
  width: 28px !important;
  height: 28px !important;
}

/* Streaming links in modal */
.modal-streaming {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 8px 0;
}

.streaming-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all 0.2s;
  font-family: var(--app-font);
}

.streaming-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.streaming-icon {
  font-size: 8px;
  line-height: 1;
}

.streaming-spotify .streaming-icon  { color: #1DB954; }
.streaming-tidal .streaming-icon    { color: #00FFFF; }
.streaming-apple .streaming-icon    { color: #FC3C44; }
.streaming-youtube .streaming-icon  { color: #FF0000; }
.streaming-lastfm .streaming-icon   { color: #D51007; }
.streaming-discogs .streaming-icon  { color: #333; }
.streaming-mb .streaming-icon       { color: #BA478F; }
.streaming-musicmap .streaming-icon { color: #FF6B35; }

body[data-theme$="-light"] .streaming-discogs .streaming-icon { color: #999; }

/* Rating display */
.rating-display {
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 1px;
}
.card-rating {
  margin-top: 2px;
}
.card-rating .rating-display { font-size: 10px; }

/* Rating input */
.rating-input {
  display: flex;
  align-items: center;
  gap: 4px;
}
.rating-star {
  font-size: 22px;
  color: var(--border);
  cursor: pointer;
  transition: color 0.15s, transform 0.15s;
  user-select: none;
}
.rating-star:hover,
.rating-star.hover { color: var(--accent); transform: scale(1.15); }
.rating-star.active { color: var(--accent); }
.rating-clear {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  padding: 4px;
  margin-left: 4px;
}
.rating-clear:hover { color: var(--accent); }

/* Modal rating */
.modal-rating {
  margin-top: 4px;
}
.modal-rating .rating-display {
  font-size: 14px;
  letter-spacing: 2px;
}

/* Modal label & genre pills */
.modal-label, .modal-genre {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  margin-right: 4px;
}

/* List view label */
.list-label {
  font-size: 11px;
  color: var(--muted);
  padding: 1px 6px;
  border-radius: 3px;
  background: var(--surface);
  border: 1px solid var(--border);
}

/* Genre & Label filter bars */
.genre-bar, .label-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 32px;
  align-items: center;
}

/* Discogs import progress */
.discogs-progress {
  margin-top: 12px;
}
.discogs-progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.discogs-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  width: 0%;
  transition: width 0.3s;
}
.discogs-progress-text {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

/* Supabase status */
.supabase-status {
  font-size: 12px;
  padding: 6px 0;
  color: var(--muted);
}
.supabase-status.connected { color: #4ade80; }
.supabase-status.error { color: #f87171; }

/* Duplicate resolution panel */
.dupe-panel {
  max-width: 620px;
}
.dupe-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.dupe-item:last-child { border-bottom: none; }
.dupe-album {
  font-weight: 500;
  color: var(--text);
  font-size: 14px;
}
.dupe-diff {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.dupe-field {
  font-size: 12px;
  color: var(--muted);
  background: var(--surface);
  padding: 2px 8px;
  border-radius: 4px;
}
.dupe-field em { color: var(--muted); }
.dupe-field strong { color: var(--accent); }
.dupe-actions {
  display: flex;
  gap: 16px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.dupe-radio {
  font-size: 12px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.dupe-radio input { accent-color: var(--accent); }

/* Embed preview */
.embed-preview {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 14px;
  margin-top: 8px;
  overflow-x: auto;
}
.embed-preview code {
  font-size: 12px;
  color: var(--accent);
  word-break: break-all;
  font-family: 'Courier New', monospace;
}

/* Dashboard tag cloud */
.dash-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 0;
}
.dash-tag {
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}
.dash-tag em {
  color: var(--muted);
  font-style: normal;
  font-size: 11px;
}

/* Remove overlay buttons on card art (streaming links moved to modal) */
.art-overlay {
  display: none !important;
}

/* Track row without play button */
.track {
  position: relative;
}
.track-play, .track-progress {
  display: none !important;
}
.track .track-num {
  margin-left: 0;
}

/* Import tab for discogs */
.import-tab {
  white-space: nowrap;
}

/* ══════════════════════════════════════
   STICKY HEADER
══════════════════════════════════════ */
.sticky-top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

/* Remove logo from header */
.logo { display: none !important; }

/* Remove keyboard hints */
.kb-hint { display: none !important; }

/* ══════════════════════════════════════
   SETTINGS TABS
══════════════════════════════════════ */
.settings-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  background: var(--surface);
}

.settings-tab {
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  font-family: 'DM Sans', sans-serif;
}

.settings-tab:hover {
  color: var(--text);
}

.settings-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.settings-tab-content {
  display: none;
}

.settings-tab-content.active {
  display: block;
}

/* Sync pill hidden since no auto-sync in settings */
.sync-pill { display: none !important; }

/* ══════════════════════════════════════
   MODAL INTERACTIVE RATING
══════════════════════════════════════ */
.modal-rating-stars {
  display: inline-flex;
  gap: 2px;
}
.modal-star {
  font-size: 20px;
  color: var(--border);
  cursor: pointer;
  transition: color 0.15s, transform 0.15s;
  user-select: none;
}
.modal-star:hover,
.modal-star.active {
  color: var(--accent);
}
.modal-star:hover {
  transform: scale(1.2);
}
.modal-rating-clear {
  margin-left: 8px;
  vertical-align: middle;
}

/* ══════════════════════════════════════
   AUTH SCREEN
══════════════════════════════════════ */
.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px 32px 32px;
  text-align: center;
}

.auth-title {
  font-family: 'DM Serif Display', serif;
  font-size: 36px;
  color: var(--accent);
  margin: 0 0 4px;
  letter-spacing: 1px;
}

.auth-subtitle {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 28px;
}

.auth-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.auth-tab {
  flex: 1;
  padding: 10px 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  font-family: 'DM Sans', sans-serif;
}

.auth-tab:hover { color: var(--text); }
.auth-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-field {
  text-align: left;
}

.auth-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 4px;
  font-family: 'DM Sans', sans-serif;
}

.auth-input {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
  font-family: 'DM Sans', sans-serif;
  box-sizing: border-box;
}

.auth-input:focus {
  border-color: var(--accent);
}

.auth-btn {
  width: 100%;
  padding: 11px 0;
  font-size: 14px;
  font-weight: 500;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  font-family: 'DM Sans', sans-serif;
}

.auth-btn:hover { opacity: 0.9; }
.auth-btn:active { transform: scale(0.98); }

.auth-btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.auth-btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.auth-btn-google:hover {
  border-color: var(--muted);
}

.auth-google-icon {
  flex-shrink: 0;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--muted);
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-status {
  margin-top: 12px;
  font-size: 13px;
  min-height: 20px;
}

.auth-status.error { color: #f87171; }
.auth-status.success { color: #4ade80; }

/* User display in header */
.user-display {
  font-size: 11px;
  color: var(--muted);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s;
}
.user-display:hover {
  color: var(--accent);
}

/* ══════════════════════════════════════
   USER IDENTITY & AVATAR
══════════════════════════════════════ */
.user-identity {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: opacity 0.2s;
}
.user-identity:hover { opacity: 0.8; }

.user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

/* Avatar upload in settings */
.avatar-upload-section {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 8px 0;
}

.avatar-preview-wrap {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-placeholder {
  font-size: 24px;
  font-weight: 600;
  color: var(--muted);
  font-family: 'DM Serif Display', serif;
}

.avatar-controls {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.avatar-upload-btn {
  cursor: pointer;
  text-align: center;
}

/* Similar artist chip styling for external links */
.similar-chip[data-in-collection="false"] {
  opacity: 0.7;
  border-style: dashed;
}
.similar-chip[data-in-collection="false"]::after {
  content: ' ↗';
  font-size: 10px;
}

/* ══════════════════════════════════════
   FORMAT CHECKBOX GRID
══════════════════════════════════════ */
.format-checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.format-check {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text);
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  transition: border-color 0.2s, background 0.2s;
  user-select: none;
}
.format-check:has(input:checked) {
  border-color: var(--accent);
  background: var(--surface);
}
.format-check input[type="checkbox"] {
  accent-color: var(--accent);
  margin: 0;
  width: 14px;
  height: 14px;
}

/* Multiple format badges on cards — stack down left edge */
.art .format-badge:nth-of-type(1) { top: 8px; left: 8px; }
.art .format-badge:nth-of-type(2) { top: 28px; left: 8px; }
.art .format-badge:nth-of-type(3) { top: 48px; left: 8px; }
.art .format-badge:nth-of-type(4) { top: 68px; left: 8px; }

/* ══════════════════════════════════════
   VISUAL POLISH
══════════════════════════════════════ */

/* Card hover — lift with shadow */
.card {
  transition: transform 0.25s ease, border-color 0.25s, box-shadow 0.25s;
}
.card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 12px 32px rgba(0,0,0,0.25), 0 2px 8px rgba(0,0,0,0.15);
}
body[data-theme$="-light"] .card:hover {
  box-shadow: 0 12px 32px rgba(0,0,0,0.1), 0 2px 8px rgba(0,0,0,0.06);
}

/* Card appear animation */
@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.card, .list-row {
  animation: cardFadeIn 0.35s ease both;
}
.card:nth-child(1)  { animation-delay: 0s; }
.card:nth-child(2)  { animation-delay: 0.03s; }
.card:nth-child(3)  { animation-delay: 0.06s; }
.card:nth-child(4)  { animation-delay: 0.09s; }
.card:nth-child(5)  { animation-delay: 0.12s; }
.card:nth-child(6)  { animation-delay: 0.15s; }
.card:nth-child(7)  { animation-delay: 0.18s; }
.card:nth-child(8)  { animation-delay: 0.21s; }
.card:nth-child(9)  { animation-delay: 0.24s; }
.card:nth-child(10) { animation-delay: 0.27s; }
.card:nth-child(n+11) { animation-delay: 0.3s; }

/* Stats row — accent numbers */
.stat-num {
  font-family: 'DM Serif Display', serif;
  font-size: 28px !important;
  color: var(--accent) !important;
  line-height: 1;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 24px !important;
}

/* Card info tighter */
.card-info {
  padding: 8px 12px 12px;
}
.card-album {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}
.card-artist {
  font-size: 11px;
  line-height: 1.3;
  margin-top: 1px;
}

/* ── Modal hero blurred background ── */
.modal-hero {
  position: relative;
  overflow: hidden;
}
.modal-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(28px) saturate(1.3) brightness(0.4);
  transform: scale(1.3);
  opacity: 0.5;
  z-index: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}
.modal-art, .modal-meta {
  position: relative;
  z-index: 1;
}
.modal-meta {
  border-bottom: none !important;
}
.modal-hero {
  border-bottom: 1px solid var(--border);
}
body[data-theme$="-light"] .modal-hero-bg {
  filter: blur(28px) saturate(1.2) brightness(0.85);
  opacity: 0.35;
}

/* ── Auth screen polish ── */
.auth-screen {
  background: radial-gradient(ellipse at 50% 30%, color-mix(in srgb, var(--accent) 8%, var(--bg)), var(--bg) 70%);
}
.auth-logo {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  margin-bottom: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.auth-card {
  background: color-mix(in srgb, var(--surface) 95%, transparent);
  backdrop-filter: blur(12px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.3), 0 0 0 1px var(--border);
}
.auth-title {
  font-size: 32px;
  margin-top: 4px;
}

/* ── Empty state polish ── */
.empty {
  padding: 80px 24px !important;
}
.empty-logo {
  width: 80px;
  height: 80px;
  border-radius: 18px;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  opacity: 0.8;
}
.empty-title {
  font-family: 'DM Serif Display', serif;
  font-size: 24px;
  color: var(--text);
  margin: 0 0 8px;
}
.empty .hint {
  font-size: 14px;
  color: var(--muted);
  max-width: 360px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ── Filters container smoother animation ── */
.filters-container {
  transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s;
}
.filters-container.collapsed {
  padding-top: 0;
  padding-bottom: 0;
}

/* ── List row hover ── */
.list-row {
  transition: background 0.2s, border-color 0.2s;
}
.list-row:hover {
  background: color-mix(in srgb, var(--accent) 5%, var(--surface));
  border-color: color-mix(in srgb, var(--accent) 30%, var(--border));
}

/* ── Track row hover in modal ── */
.track {
  transition: background 0.15s;
}
.track:hover {
  background: color-mix(in srgb, var(--accent) 6%, var(--bg));
}

/* ── Scroll-to-top button polish ── */
.scroll-top-btn {
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  transition: transform 0.2s, opacity 0.3s, box-shadow 0.2s;
}
.scroll-top-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.35);
}

/* ── Header title polish ── */
.header h1 {
  font-family: 'DM Serif Display', serif;
  letter-spacing: 0.5px;
  color: var(--accent);
}

/* ── Fix-artwork picker ─────────────────────────────────────────── */
.art-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}
.art-cand {
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 0;
  background: none;
  cursor: pointer;
  text-align: left;
  overflow: hidden;
}
.art-cand:hover, .art-cand:focus-visible { border-color: var(--accent, #c8a96e); outline: none; }
.art-cand img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; border-radius: 6px; }
.art-cand .art-cand-title {
  font-size: 11px; line-height: 1.3; margin-top: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.art-cand .art-cand-sub { font-size: 10px; opacity: .6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.art-cand.is-current { border-color: var(--accent, #c8a96e); }

/* ── Artwork + visibility block in the edit panel ───────────────── */
.edit-extras { display: flex; gap: 14px; align-items: flex-start; }
.edit-art-thumb {
  width: 72px; height: 72px; flex: none; border-radius: 6px;
  object-fit: cover; background: rgba(255,255,255,.05);
}
.edit-art-thumb:not([src]), .edit-art-thumb[src=""] { visibility: hidden; }
.edit-extras-controls { display: flex; flex-direction: column; }
