:root {
  color-scheme: dark;
  --bg: #1c1410;
  --card: #2a211c;
  --ink: #f6efe6;
  --muted: #cbb8a4;
  --line: #4a3b32;
  --accent: #e8a15a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.4 "Segoe UI", sans-serif;
}

main {
  width: min(40rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 3rem;
}

.mark {
  margin: 0;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

h1 {
  margin: 0.25rem 0;
  font-size: 1.8rem;
}

.prompt, .meta p, label, #status {
  color: var(--muted);
}

.panel, .player {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem;
}

form { display: grid; gap: 0.4rem; }
form + form { margin-top: 1rem; }

label span { color: var(--muted); font-weight: normal; }

input, button {
  font: inherit;
  border-radius: 10px;
}

input {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  background: #140f0c;
  color: var(--ink);
}

button {
  padding: 0.7rem 1rem;
  border: 0;
  background: var(--accent);
  color: #2a1608;
  font-weight: 650;
  cursor: pointer;
}

button:disabled { opacity: 0.55; cursor: wait; }

.player, .panel { margin-top: 1rem; }
.player[hidden] { display: none; }

#cover {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
  background: #140f0c;
}

#now-title {
  margin: 0.8rem 0 0;
  color: var(--ink);
  font-size: 1.25rem;
}

#now-artist, #now-album, .row, .id-line { margin: 0.15rem 0; }

.row, .controls {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: center;
}

.controls, .library { margin-top: 0.8rem; }
.controls button, .library button { flex: 1; }
#delete, .library button, .controls.secondary button {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

#saved-panel { margin-top: 1rem; }
#saved-panel h2 { margin: 1rem 0 0.4rem; font-size: 1rem; }
#saved-panel h2:first-child { margin-top: 0; }
#saved-list, #playlist-list { list-style: none; padding: 0; margin: 0; }
#saved-list button, #playlist-list button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  margin-top: 0.4rem;
  text-align: left;
}
.entry-prompt { color: var(--muted); font-weight: 450; font-size: 0.9rem; }
#saved-panel[hidden], #saved-empty[hidden], #playlist-empty[hidden] { display: none; }

#player {
  width: 100%;
  margin-top: 0.8rem;
}

code { color: var(--ink); }

#status { min-height: 1.4rem; }
