.now-playing-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 0 1.2rem;
  padding-bottom: env(safe-area-inset-bottom);
  height: 90px;
  background: #181818;
  border-top: 1px solid #282828;
  color: #f5f5f1;
  font-family: -apple-system, "Helvetica Neue", Arial, sans-serif;
}

.now-playing-bar[hidden] { display: none; }

.np-track { display: flex; align-items: center; gap: .8rem; width: 260px; min-width: 0; flex: 0 0 auto; }

.np-track img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 4px;
  background: #282828;
  flex: 0 0 auto;
}

.np-meta { min-width: 0; }
.np-title { font-size: .9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-artist { font-size: .8rem; color: #b3b3b3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.now-playing-bar audio { flex: 1; min-width: 0; color-scheme: dark; }

.np-close {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  color: #b3b3b3;
  border: 1px solid rgba(255, 255, 255, .15);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.np-close:hover { background: rgba(255, 255, 255, .16); color: #fff; }

body.cb-player-active:not(.spotify-body) { padding-bottom: 90px; }

@media (max-width: 700px) {
  .now-playing-bar {
    height: auto;
    flex-direction: column;
    align-items: stretch;
    gap: .4rem;
    padding: .5rem .8rem calc(.6rem + env(safe-area-inset-bottom));
  }
  .now-playing-bar .np-track { width: auto; }
  .np-track img { width: 40px; height: 40px; }
  .now-playing-bar audio { width: 100%; max-width: none; flex: none; }
  .np-close { position: absolute; top: .4rem; right: .5rem; }

  body.cb-player-active:not(.spotify-body) { padding-bottom: 140px; }
}
