:root {
  --bg: #121015;
  --bg-2: #1b1820;
  --panel: #221e28;
  --panel-2: #2b2632;
  --line: #3a3443;
  --text: #f3eef6;
  --muted: #a69fae;
  --accent: #ffb547;      /* stage-light amber */
  --accent-ink: #241600;
  --rose: #ff5c8a;
  --green: #4fd18b;
  --spotify: #1ed760;
  --danger: #ff6b6b;
  --radius: 14px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Fraunces", Georgia, serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: radial-gradient(1200px 600px at 50% -200px, #2a1f33 0%, var(--bg) 60%) fixed, var(--bg);
  color: var(--text);
  font: 16px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: var(--accent); }
h1, h2, h3 { margin: 0 0 .4em; line-height: 1.15; }
h1 { font-family: var(--display); font-weight: 600; font-size: clamp(1.7rem, 5vw, 2.4rem); letter-spacing: -.01em; }
h2 { font-size: 1.15rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.hidden { display: none !important; }

.wrap { max-width: 640px; margin: 0 auto; padding: 24px 16px 80px; }
.wrap.wide { max-width: 1100px; }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; color: var(--muted); margin-bottom: 18px; }
.brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 14px var(--accent); }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.card.flat { background: var(--bg-2); }

label { display: block; font-size: .85rem; color: var(--muted); margin: 12px 0 6px; }
input[type=text], input[type=password], input[type=date], input[type=search], textarea, select {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg-2); color: var(--text); font: inherit;
}
textarea { resize: vertical; min-height: 64px; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 16px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); font: inherit; font-weight: 600;
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: #5a5165; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.spotify { background: var(--spotify); color: #062b14; border-color: var(--spotify); }
.btn.danger { color: var(--danger); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 7px 11px; font-size: .85rem; border-radius: 8px; }
.btn.block { width: 100%; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.grow { flex: 1; min-width: 0; }

.tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; margin: 6px 0 14px; }
.tab { padding: 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; }
.tab.active { color: var(--text); border-color: var(--accent); background: var(--panel-2); }

.drop {
  border: 2px dashed var(--line); border-radius: var(--radius); padding: 28px 16px; text-align: center;
  background: var(--bg-2); cursor: pointer; transition: border-color .15s, background .15s;
}
.drop.over { border-color: var(--accent); background: #2a2230; }
.drop strong { display: block; font-size: 1.05rem; margin-bottom: 4px; }

.list { list-style: none; margin: 0; padding: 0; }
.item {
  display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 12px;
  background: var(--bg-2); border: 1px solid var(--line); margin-bottom: 8px;
}
.item .thumb { width: 44px; height: 44px; border-radius: 8px; flex: none; background: var(--panel-2) center/cover; display: grid; place-items: center; font-size: 1.2rem; }
.item .meta { flex: 1; min-width: 0; }
.item .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .sub { color: var(--muted); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .note { color: var(--accent); font-size: .85rem; margin-top: 2px; }
.item.dragging { opacity: .4; }
.handle { cursor: grab; color: var(--muted); padding: 4px; user-select: none; touch-action: none; }

.progress { height: 6px; border-radius: 3px; background: var(--panel-2); overflow: hidden; margin-top: 6px; }
.progress > i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .2s; }

.badge { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 7px; border-radius: 6px; background: var(--panel-2); color: var(--muted); }
.badge.audio { color: var(--accent); }
.badge.video { color: #8ab4ff; }
.badge.image { color: var(--rose); }
.badge.spotify { color: var(--spotify); }
.badge.file { color: #c9a7ff; }
.badge.uploading { color: var(--muted); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--panel-2); border: 1px solid var(--line); padding: 12px 18px; border-radius: 12px; z-index: 100; box-shadow: 0 10px 30px #0008; max-width: calc(100% - 32px); }
.toast.error { border-color: var(--danger); }

dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; max-width: min(560px, calc(100% - 32px)); }
dialog::backdrop { background: #000a; }

.empty { text-align: center; color: var(--muted); padding: 24px 8px; }
.err { color: var(--danger); font-size: .9rem; margin-top: 8px; }
