*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg0: #171a1c;
  --bg1: #1d2023;
  --bg2: #212426;
  --bg3: #272b2e;
  --bg4: #2e3336;
  --border: #2a2e31;
  --border2: #333a3e;
  --border3: #3d4548;
  --text0: #f2f0f8;
  --text1: #7a8186;
  --text2: #4a5258;
  --acc: #b4dbaf;
  --acc-h: #3cbc2c;
  --acc-dim: #0e1e0d;
  --acc-border: #2a5226;
  --acc-text: #0a1409;
  --star: #FBB03B;
  --mood-color: #3060c1;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,500;1,400&family=JetBrains+Mono:wght@400;500&display=swap');

html { font-size: 106%; }
html, body {
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg0);
  color: var(--text0);
  -webkit-font-smoothing: antialiased;
}

.app { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }

/* ── NAV ─────────────────────────────────── */
.topnav {
  display: flex; align-items: center;
  background: var(--bg0); padding: 0 28px; height: 80px;
  flex-shrink: 0; gap: 0;
}
.nav-left { display: flex; align-items: baseline; gap: 0; margin-right: auto; }
.nav-title {
  font-family: 'Playfair Display', serif;
  font-size: 36px; font-weight: 500; color: var(--text0);
  letter-spacing: -0.02em; font-style: italic;
}
.nav-sup {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px; font-weight: 400; color: var(--text2);
  vertical-align: super; margin-left: 6px; letter-spacing: 0.02em;
}
.nav-divider { width: 1px; height: 22px; background: var(--border2); margin: 0 24px; }
.nav-tab {
  height: 80px; padding: 0 16px;
  display: flex; align-items: center;
  font-size: 12px; font-weight: 500; color: var(--text2);
  cursor: pointer; border-bottom: 1.5px solid transparent;
  transition: color 0.2s; letter-spacing: 0.04em; text-transform: uppercase;
  position: relative; white-space: nowrap;
}
.nav-tab.active { color: var(--text0); }
.nav-tab:hover { color: var(--text1); }
.nav-tab-indicator {
  position: absolute; bottom: 0; height: 2px;
  background: var(--acc); border-radius: 2px 2px 0 0;
  transition: left 0.28s cubic-bezier(0.4,0,0.2,1),
              width 0.28s cubic-bezier(0.4,0,0.2,1),
              opacity 0.2s ease;
  pointer-events: none;
  opacity: 0;
}
.nav-tab-indicator.visible { opacity: 1; }
.nav-upload {
  height: 36px; padding: 0 20px; border-radius: 8px;
  background: var(--acc); color: var(--acc-text);
  border: none; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.18s;
  font-family: 'Inter', sans-serif;
}
.nav-upload:hover { background: var(--acc-h); color: #fff; transform: translateY(-1px); }

/* ── FILTER BAR ──────────────────────────── */
.filterbar {
  display: flex; align-items: center;
  background: var(--bg0); padding: 0 28px 16px;
  gap: 6px; flex-wrap: wrap; flex-shrink: 0;
  position: relative; z-index: 100;
}
.fd { position: relative; }
.fd-btn {
  height: 34px; padding: 0 14px;
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 500; color: var(--text0);
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: 8px; cursor: pointer; transition: all 0.15s;
  letter-spacing: 0.01em; white-space: nowrap;
  font-family: 'Inter', sans-serif;
}
.fd-btn:hover { background: var(--bg3); border-color: var(--border3); }
.fd-btn.open { background: var(--bg3); border-color: var(--border3); }
.fd-btn.hasval { border-color: var(--acc-border); color: var(--acc); }
.fd-sq { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }
.arrow { font-size: 6px; opacity: 0.4; transition: transform 0.15s; margin-left: 2px; }
.fd-btn.open .arrow { transform: rotate(180deg); }

/* Floating dropdown */
.dd {
  display: none;
  position: fixed;
  min-width: 340px;
  background: #1a1d20;
  border: 1px solid var(--border2);
  border-radius: 12px;
  padding: 12px;
  z-index: 9999;
  box-shadow: 0 24px 60px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.04);
}
.dd.open { display: block; animation: fadeUp 0.15s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.dd-hint { font-family: 'JetBrains Mono', monospace; font-size: 9px; color: var(--text2); padding: 0 2px 10px; letter-spacing: 0.1em; text-transform: uppercase; }
.dd-tags { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.dd-tag {
  font-size: 12px; font-weight: 500; padding: 10px 11px 9px;
  border-radius: 8px; cursor: pointer;
  border: 1px solid var(--border2); background: var(--bg3);
  color: var(--text0); transition: all 0.12s;
  font-family: 'Inter', sans-serif; display: flex;
  flex-direction: column; gap: 5px; min-width: 0;
}
.dd-tag:hover { background: var(--bg4); border-color: var(--border3); }
.dd-tag.active { background: var(--acc-dim); border-color: var(--acc-border); }
.dd-tag.active .dd-tag-name { color: var(--acc); }
.dd-tag.active .dd-tag-count { color: var(--acc); opacity: 0.7; }
.dd-tag-header { display: flex; align-items: center; gap: 6px; }
.dd-tag-sq { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }
.dd-tag-name { font-size: 12px; font-weight: 600; color: var(--text0); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.01em; }
.dd-tag-count { font-family: 'JetBrains Mono', monospace; font-size: 9px; color: var(--text2); letter-spacing: 0.08em; text-transform: uppercase; }

.key-modes { display: flex; gap: 4px; margin-bottom: 9px; }
.km-btn { flex: 1; font-size: 11px; padding: 6px; border-radius: 7px; border: 1px solid var(--border2); background: var(--bg3); color: var(--text1); cursor: pointer; text-align: center; transition: all 0.12s; font-family: 'Inter', sans-serif; font-weight: 500; }
.km-btn.active { background: var(--acc-dim); color: var(--acc); border-color: var(--acc-border); }
.key-grid-dd { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.kbtn { font-size: 12px; padding: 7px 4px; border-radius: 7px; cursor: pointer; border: 1px solid var(--border2); background: var(--bg3); color: var(--text0); transition: all 0.12s; font-family: 'JetBrains Mono', monospace; font-weight: 500; text-align: center; }
.kbtn.active { background: var(--acc-dim); color: var(--acc); border-color: var(--acc-border); }

.tempo-dd { min-width: 260px; }
.bpm-row { display: flex; align-items: flex-end; gap: 10px; margin-bottom: 10px; }
.bpm-field { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.bpm-mini { font-family: 'JetBrains Mono', monospace; font-size: 9px; color: var(--text2); letter-spacing: 0.1em; text-transform: uppercase; }
.bpm-input { width: 100%; font-family: 'JetBrains Mono', monospace; font-size: 18px; font-weight: 500; padding: 8px; border-radius: 7px; border: 1px solid var(--border2); background: var(--bg3); color: var(--text0); outline: none; text-align: center; }
.bpm-input:focus { border-color: var(--acc-border); }
.bpm-sep { font-size: 14px; color: var(--text2); padding-bottom: 8px; }
.bpm-track { height: 2px; background: var(--bg4); border-radius: 2px; overflow: hidden; }
.bpm-fill { height: 2px; background: var(--acc); border-radius: 2px; width: 100%; transition: all 0.2s; }

/* ── SPLIT ───────────────────────────────── */
.split {
  display: flex; flex: 1; overflow: hidden;
  padding: 0 16px 16px; gap: 14px;
}

/* ── PANELS (containers with rounded corners) ── */
.left-panel {
  display: flex; flex-direction: column;
  flex: 2.2; min-width: 0;
  background: var(--bg2);
  border-radius: 12px;
  overflow: hidden;
}
.right-panel {
  display: flex; flex-direction: column;
  flex: 1; min-width: 280px; max-width: 380px;
  background: var(--bg2);
  border-radius: 12px;
  overflow: hidden;
}

/* ── PANEL HEADERS ───────────────────────── */
.left-header {
  padding: 0 16px; height: 44px;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.panel-icon { font-size: 14px; color: var(--text2); flex-shrink: 0; }
.panel-label { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--text1); letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; flex: 1; }

/* Search + Sort icons */
.panel-actions { display: flex; align-items: center; gap: 4px; }
.panel-action-btn {
  width: 28px; height: 28px; border-radius: 6px;
  border: none; background: transparent; color: var(--text2);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 13px; transition: all 0.15s;
}
.panel-action-btn:hover { background: var(--bg3); color: var(--text0); }
.panel-action-btn.active { background: var(--bg3); color: var(--text0); }

/* Inline search (expands below header) */
.panel-search-row {
  display: none; padding: 8px 16px;
  border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.panel-search-row.open { display: flex; align-items: center; gap: 8px; }
.search {
  flex: 1; font-size: 12px; padding: 5px 10px; border-radius: 6px;
  border: 1px solid var(--border2); background: var(--bg3);
  color: var(--text0); outline: none; font-family: 'Inter', sans-serif;
}
.search::placeholder { color: var(--text2); }
.search:focus { border-color: var(--acc-border); }
.search-close { font-size: 12px; color: var(--text2); cursor: pointer; padding: 4px; }
.search-close:hover { color: var(--text0); }

/* Sort dropdown */
.sort-menu {
  display: none; position: absolute; right: 0; top: calc(100% + 4px);
  background: #1a1d20; border: 1px solid var(--border2);
  border-radius: 8px; padding: 6px; z-index: 200;
  box-shadow: 0 12px 32px rgba(0,0,0,0.5);
  min-width: 160px;
}
.sort-menu.open { display: block; }
.sort-opt {
  padding: 8px 12px; border-radius: 6px; cursor: pointer;
  font-size: 12px; color: var(--text1); font-family: 'Inter', sans-serif;
  transition: all 0.12s; display: flex; align-items: center; gap: 8px;
}
.sort-opt:hover { background: var(--bg3); color: var(--text0); }
.sort-opt.active { color: var(--acc); }
.sort-opt .sort-check { font-size: 10px; width: 14px; }
.panel-sort-wrap { position: relative; }

/* ── COL HEADERS ─────────────────────────── */


/* ── SAMPLE LIST ─────────────────────────── */
.sample-list { flex: 1; overflow-y: auto; }
.sample-list::-webkit-scrollbar { width: 3px; }
.sample-list::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }

.sc { display: flex; align-items: center; background: transparent; border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.1s; min-height: 60px; }
.sc:hover { background: var(--bg3); }
.sc.sel { background: #0d160c; }
.sc-check { width: 36px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cb { width: 14px; height: 14px; border-radius: 3px; border: 1px solid var(--border3); display: flex; align-items: center; justify-content: center; transition: all 0.15s; }
.sc.sel .cb { background: var(--acc); border-color: var(--acc); }
.chk { display: none; }
.sc.sel .chk { display: block; }
.sc-wave { width: 200px; flex-shrink: 0; height: 60px; display: flex; align-items: center; padding: 0 10px; position: relative; cursor: crosshair; }
.sc-time { position: absolute; bottom: 4px; right: 12px; font-family: 'JetBrains Mono', monospace; font-size: 9px; color: var(--text2); }
canvas.wf { width: 100%; height: 28px; }
.sc-pbtn { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border2); background: transparent; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin: 0 8px; transition: all 0.15s; cursor: pointer; }
.sc-pbtn:hover { border-color: var(--acc); background: var(--acc-dim); }
.sc-pbtn svg { width: 9px; height: 9px; fill: var(--text1); }
.sc-pbtn.playing { border-color: var(--acc); background: var(--acc-dim); }
.sc-pbtn.playing svg { fill: var(--acc); }
.sc-info { flex: 1; padding: 8px 10px 8px 2px; min-width: 0; }
.sc-name-row { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; }
.sc-name { font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 400; color: var(--text0); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: 0.02em; }
.sc-edit-btn { font-size: 11px; color: var(--text2); cursor: pointer; opacity: 0; transition: all 0.15s; flex-shrink: 0; line-height: 1; }
.sc:hover .sc-edit-btn { opacity: 1; }
.sc-edit-btn:hover { color: var(--acc); }
.sc-tags { display: flex; gap: 22px; align-items: center; flex-wrap: nowrap; overflow: hidden; }
.stag { font-family: 'JetBrains Mono', monospace; font-size: 9px; color: var(--text1); display: flex; align-items: center; gap: 3px; white-space: nowrap; letter-spacing: 0.02em; }
.stag-dot { width: 6px; height: 6px; border-radius: 2px; flex-shrink: 0; }
.badge { font-family: 'JetBrains Mono', monospace; font-size: 9px; padding: 2px 6px; border-radius: 4px; background: var(--bg3); border: 1px solid var(--border2); color: var(--text0); white-space: nowrap; letter-spacing: 0.03em; font-weight: 500; }
.sc-artists { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--text2); padding: 0 10px; flex-shrink: 0; white-space: nowrap; width: 140px; overflow: hidden; text-overflow: ellipsis; text-align: right; }
.sc-right { display: flex; align-items: center; gap: 2px; flex-shrink: 0; padding-right: 10px; }
.sc-fav { font-size: 13px; color: var(--text2); cursor: pointer; transition: all 0.15s; width: 24px; text-align: center; opacity: 0; }
.sc:hover .sc-fav, .sc-fav.active { opacity: 1; }
.sc-fav:hover, .sc-fav.active { color: var(--star); }
.sc-delete { width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text2); font-size: 10px; opacity: 0; transition: all 0.15s; border-radius: 4px; }
.sc:hover .sc-delete { opacity: 1; }
.sc-delete:hover { color: #FF6060; }
.sc-owner-badge { font-family: 'JetBrains Mono', monospace; font-size: 9px; padding: 2px 6px; border-radius: 3px; background: var(--acc-dim); border: 1px solid var(--acc-border); color: var(--acc); white-space: nowrap; letter-spacing: 0.04em; flex-shrink: 0; margin-left: 6px; }

/* ── EMPTY STATE ─────────────────────────── */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-icon { font-size: 32px; margin-bottom: 12px; opacity: 0.15; }
.empty-state p { font-size: 13px; color: var(--text1); margin-bottom: 4px; }
.empty-sub { font-size: 11px !important; color: var(--text2) !important; font-family: 'JetBrains Mono', monospace !important; letter-spacing: 0.04em; }

/* ── RIGHT PANEL ─────────────────────────── */
.right-header { padding: 0 14px; height: 44px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.right-title { font-family: 'JetBrains Mono', monospace; font-size: 9px; font-weight: 500; color: var(--text0); flex: 1; letter-spacing: 0.12em; text-transform: uppercase; }
.right-count { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--text2); }
.export-btn { height: 24px; padding: 0 10px; border-radius: 5px; background: #0052CC; color: #fff; border: none; font-size: 10px; font-weight: 600; cursor: pointer; transition: all 0.15s; white-space: nowrap; font-family: 'Inter', sans-serif; }
.export-btn:hover { background: #0061FF; transform: translateY(-1px); }
.export-btn:disabled { opacity: 0.3; cursor: default; transform: none; }
.dbx-list { flex: 1; overflow-y: auto; padding: 10px; }
.dbx-list::-webkit-scrollbar { width: 2px; }
.dbx-list::-webkit-scrollbar-thumb { background: var(--border2); }
.dbx-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 10px; padding: 20px; text-align: center; }
.dbx-empty-icon { width: 38px; height: 38px; border-radius: 8px; background: #0a1420; border: 1px solid #182840; display: flex; align-items: center; justify-content: center; }
.dbx-empty p { font-family: 'Inter', sans-serif; font-size: 12px; color: var(--text1); font-weight: 500; }
.dbx-empty small { font-family: 'JetBrains Mono', monospace; font-size: 9px; color: var(--text2); line-height: 1.7; letter-spacing: 0.03em; }
.dbx-item { display: flex; align-items: center; gap: 8px; padding: 7px 9px; background: var(--bg3); border: 1px solid var(--border); border-radius: 7px; margin-bottom: 4px; transition: border-color 0.12s; }
.dbx-item:hover { border-color: var(--border2); }
.dbx-item-wave { width: 54px; height: 22px; flex-shrink: 0; }
canvas.dbx-wf { width: 54px; height: 22px; }
.dbx-item-info { flex: 1; min-width: 0; }
.dbx-item-name { font-size: 11px; font-weight: 500; color: var(--text0); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 3px; font-family: 'Inter', sans-serif; letter-spacing: -0.01em; }
.dbx-item-tags { display: flex; gap: 4px; align-items: center; }
.dbx-remove { width: 18px; height: 18px; border-radius: 3px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text2); font-size: 10px; transition: all 0.12s; flex-shrink: 0; }
.dbx-remove:hover { background: rgba(255,80,80,0.1); color: #FF6060; }
.dbx-footer { padding: 10px 14px; border-top: 1px solid var(--border); flex-shrink: 0; }
.dbx-stats { display: flex; gap: 14px; margin-bottom: 8px; }
.dbx-stat { font-family: 'JetBrains Mono', monospace; font-size: 9px; color: var(--text2); letter-spacing: 0.04em; }
.dbx-stat span { color: var(--text0); }
.export-full { width: 100%; height: 30px; border-radius: 6px; background: #0052CC; color: #fff; border: none; font-size: 11px; font-weight: 500; cursor: pointer; transition: all 0.15s; font-family: 'Inter', sans-serif; }
.export-full:hover { background: #0061FF; }

/* ── MODAL ───────────────────────────────── */
.modal-wrap { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 999; align-items: center; justify-content: center; }
.modal-wrap.open { display: flex; animation: fadeUp 0.15s ease; }
.mbox { background: var(--bg2); border-radius: 12px; border: 1px solid var(--border2); padding: 26px; width: 480px; max-height: 90vh; overflow-y: auto; }
.mbox::-webkit-scrollbar { width: 2px; }
.mbox::-webkit-scrollbar-thumb { background: var(--border2); }
.mtitle { font-family: 'Playfair Display', serif; font-size: 22px; color: var(--text0); margin-bottom: 4px; font-style: italic; }
.msubtitle { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--text2); margin-bottom: 20px; letter-spacing: 0.06em; }
.dzone { border: 1px dashed var(--border2); border-radius: 8px; padding: 26px; text-align: center; margin-bottom: 14px; background: var(--bg3); transition: border-color 0.15s; cursor: pointer; }
.dzone:hover, .dzone.drag { border-color: var(--acc); }
.dzone-icon { font-size: 22px; color: var(--text2); margin-bottom: 9px; }
.dzone p { font-size: 13px; color: var(--text1); font-family: 'Inter', sans-serif; }
.dzone strong { color: var(--acc); cursor: pointer; }
.dzone-sub { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--text2); margin-top: 5px; letter-spacing: 0.04em; }
.file-queue { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; max-height: 130px; overflow-y: auto; }
.fq-item { display: flex; flex-direction: column; gap: 4px; padding: 8px 11px; background: var(--bg3); border-radius: 6px; border: 1px solid var(--border2); }
.fq-top { display: flex; align-items: center; gap: 8px; }
.fq-name { flex: 1; font-size: 12px; color: var(--text0); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: 'Inter', sans-serif; }
.fq-size { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--text2); flex-shrink: 0; }
.fq-rm { cursor: pointer; color: var(--text2); font-size: 13px; flex-shrink: 0; }
.fq-rm:hover { color: #FF6060; }
.fq-progress { height: 2px; background: var(--bg4); border-radius: 2px; overflow: hidden; }
.fq-progress-fill { height: 2px; border-radius: 2px; width: 0%; transition: width 0.25s ease; background: var(--acc); }
.bulk-note { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--text2); margin-bottom: 12px; padding: 8px 11px; background: var(--bg3); border-radius: 6px; border: 1px solid var(--border2); letter-spacing: 0.03em; }
.flb { font-size: 10px; color: var(--text1); margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.08em; font-family: 'JetBrains Mono', monospace; }
.frow { margin-bottom: 13px; }
.finput { width: 100%; font-size: 13px; padding: 8px 11px; border-radius: 7px; border: 1px solid var(--border2); background: var(--bg3); color: var(--text0); outline: none; font-family: 'Inter', sans-serif; }
.finput:focus { border-color: var(--acc-border); }
.finput::placeholder { color: var(--text2); }
.hrow { display: flex; gap: 10px; }
.hrow .frow { flex: 1; }
.tag-section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.tag-section-label { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--text1); text-transform: uppercase; letter-spacing: 0.08em; }
.tag-hint { font-size: 9px; color: var(--text2); }
.add-option-btn { font-size: 10px; padding: 2px 9px; border-radius: 5px; border: 1px solid var(--acc-border); background: var(--acc-dim); color: var(--acc); cursor: pointer; transition: all 0.12s; font-family: 'Inter', sans-serif; }
.add-option-btn:hover { background: var(--acc); color: var(--acc-text); }
.add-inline { display: none; flex-direction: row; gap: 6px; margin-bottom: 8px; }
.add-inline.open { display: flex; }
.add-inline input { flex: 1; font-size: 12px; padding: 6px 10px; border-radius: 6px; border: 1px solid var(--border2); background: var(--bg3); color: var(--text0); outline: none; font-family: 'Inter', sans-serif; }
.add-inline input:focus { border-color: var(--acc-border); }
.add-inline button { font-size: 12px; padding: 6px 12px; border-radius: 6px; border: none; background: var(--acc); color: var(--acc-text); cursor: pointer; font-weight: 600; }
.add-inline button:hover { background: var(--acc-h); color: #fff; }
.mtag-grid { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.mtag { font-size: 11px; padding: 4px 10px; border-radius: 5px; cursor: pointer; border: 1px solid var(--border2); background: var(--bg3); color: var(--text1); transition: all 0.12s; display: inline-flex; align-items: center; gap: 4px; font-family: 'Inter', sans-serif; }
.mtag:hover { color: var(--text0); background: var(--bg4); }
.mtag.active { background: var(--acc-dim); color: var(--acc); border-color: var(--acc-border); }
.mtag.custom .mtag-del { display: inline-flex; }
.mtag-del { display: none; width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,0.05); color: var(--text2); font-size: 9px; cursor: pointer; align-items: center; justify-content: center; }
.mtag-del:hover { background: rgba(255,80,80,0.2); color: #FF6060; }
.artist-iw { display: flex; gap: 8px; margin-bottom: 8px; }
.artist-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.achip { font-size: 11px; padding: 4px 10px 4px 12px; border-radius: 5px; background: var(--bg4); color: var(--text1); border: 1px solid var(--border2); display: flex; align-items: center; gap: 6px; font-family: 'Inter', sans-serif; }
.achip-x { cursor: pointer; color: var(--text2); line-height: 1; font-size: 13px; }
.achip-x:hover { color: var(--text0); }
.mfooter { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.mbtn { font-size: 12px; padding: 8px 18px; border-radius: 7px; border: 1px solid var(--border2); background: transparent; color: var(--text1); cursor: pointer; transition: all 0.12s; font-family: 'Inter', sans-serif; }
.mbtn:hover { color: var(--text0); background: var(--bg3); }
.mbtn-primary { background: var(--acc); color: var(--acc-text); border-color: var(--acc); font-weight: 600; }
.mbtn-primary:hover { background: var(--acc-h); color: #fff; border-color: var(--acc-h); }

/* ── USER NAV ────────────────────────────── */
.nav-user { display: flex; align-items: center; gap: 10px; font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text1); }
.nav-username { color: var(--text0); font-weight: 500; letter-spacing: 0.04em; }
.nav-logout { font-size: 10px; color: var(--text2); cursor: pointer; padding: 3px 8px; border-radius: 4px; border: 1px solid var(--border2); background: transparent; font-family: 'JetBrains Mono', monospace; letter-spacing: 0.06em; text-transform: uppercase; transition: all 0.15s; }
.nav-logout:hover { color: #FF8080; border-color: rgba(255,80,80,0.3); }

/* ── TOAST ───────────────────────────────── */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--bg3); color: var(--text0); border: 1px solid var(--border2); padding: 10px 20px; border-radius: 7px; font-size: 12px; opacity: 0; transition: all 0.25s; pointer-events: none; z-index: 9999; font-family: 'Inter', sans-serif; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { border-color: var(--acc-border); color: var(--acc); }
.toast.error { border-color: rgba(255,80,80,0.4); color: #FF8080; }

/* ── LIGHT MODE ──────────────────────────── */
body.light {
  --bg0: #edf5f5; --bg1: #e4eeee; --bg2: #dae7e7;
  --bg3: #cfdede; --bg4: #c4d4d4;
  --border: #cddada; --border2: #becccc; --border3: #aebebe;
  --text0: #1c1c1e; --text1: #5a5a60; --text2: #96969e;
  --acc: #b4dbaf; --acc-h: #3cbc2c; --acc-dim: #e8f5e6;
  --acc-border: #7aba74; --acc-text: #0a1a09; --star: #d4870a;
}
body.light .sc { background: transparent; }
body.light .sc:hover { background: var(--bg3); }
body.light .sc.sel { background: #e4f5e2; }
body.light .left-panel, body.light .right-panel { background: var(--bg2); }
body.light .dd { background: #d8e8e8; }

/* ── ANIMATIONS ──────────────────────────── */
.nav-count-digit { display: inline-block; animation: countUp 0.5s cubic-bezier(0.22,1,0.36,1) both; }
@keyframes countUp { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }

/* Theme toggle */
.theme-toggle { width: 40px; height: 22px; border-radius: 11px; background: var(--bg3); border: 1px solid var(--border2); position: relative; cursor: pointer; transition: background 0.25s; flex-shrink: 0; margin-left: 6px; }
.theme-toggle::after { content:''; position:absolute; top:2px; left:2px; width:16px; height:16px; border-radius:50%; background:var(--text1); transition:transform 0.25s, background 0.2s; }
body.light .theme-toggle::after { transform:translateX(18px); background:var(--acc); }
.theme-icon { position:absolute; top:50%; transform:translateY(-50%); font-size:9px; pointer-events:none; transition:opacity 0.2s; }
.theme-icon-dark { right:4px; opacity:1; }
.theme-icon-light { left:4px; opacity:0; }
body.light .theme-icon-dark { opacity:0; }
body.light .theme-icon-light { opacity:1; }

.stag-slash { color: var(--text2); margin: 0 1px; }

/* ── EXPORT SUCCESS POPUP ────────────────── */
.export-popup-wrap {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 9999; display: flex;
  align-items: center; justify-content: center;
  animation: fadeUp 0.2s ease;
}
.export-popup {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 14px;
  padding: 32px 36px;
  width: 420px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6);
}
.export-popup-icon {
  font-size: 32px; margin-bottom: 14px;
}
.export-popup-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px; font-style: italic;
  color: var(--text0); margin-bottom: 6px;
}
.export-popup-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; color: var(--text2);
  letter-spacing: 0.08em; margin-bottom: 22px;
}
.export-popup-link {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: 8px; padding: 10px 14px;
  margin-bottom: 16px; cursor: pointer;
  transition: border-color 0.15s;
}
.export-popup-link:hover { border-color: var(--acc-border); }
.export-popup-link-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; color: var(--text1);
  overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; flex: 1; text-align: left;
}
.export-popup-copy {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; color: var(--acc);
  flex-shrink: 0; letter-spacing: 0.06em;
}
.export-popup-close {
  font-size: 12px; padding: 8px 24px;
  border-radius: 7px; border: 1px solid var(--border2);
  background: transparent; color: var(--text1);
  cursor: pointer; font-family: 'Inter', sans-serif;
  transition: all 0.12s;
}
.export-popup-close:hover { color: var(--text0); background: var(--bg3); }
