/* music tuning: hand-written fixes and the mode's own design go here (loaded after music.css). */

/* MUSIC CARD FIX: square covers, no crop, no wasted space */

/* Desktop: 170px wide cards, square covers showing ALL pixels */
html[data-plate][data-shelf="music"] .bk.bk-plate[data-kind="music"] {
  height: 294px;
}

html[data-plate][data-shelf="music"] .bk.bk-plate[data-kind="music"] .bk-cover {
  height: 199px;
}

/* Force square cover mount - show ALL pixels, no crop */
html[data-plate][data-shelf="music"] .bk.bk-plate[data-kind="music"] .c-cov {
  height: 190px;
  width: 190px;
  max-width: 190px;
  aspect-ratio: 1;
  margin: 0 auto;
}

html[data-plate][data-shelf="music"] .bk.bk-plate[data-kind="music"] .c-cov img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

/* Phone: 156px wide cards */
@media (max-width: 767px) {
  html[data-plate][data-shelf="music"] .bk.bk-plate[data-kind="music"] {
    height: 271px;
  }

  html[data-plate][data-shelf="music"] .bk.bk-plate[data-kind="music"] .bk-cover {
    height: 175px;
  }

  html[data-plate][data-shelf="music"] .bk.bk-plate[data-kind="music"] .c-cov {
    height: 156px;
    width: 156px;
    max-width: 156px;
  }
}

/* Now panel: square mount showing full cover */
html[data-plate][data-shelf="music"] .np-mount {
  width: 190px;
  height: 190px;
  max-width: 190px;
  max-height: 190px;
  flex-shrink: 0;
}

html[data-plate][data-shelf="music"] .np-mount img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 1;
}

@media (max-width: 767px) {
  html[data-plate][data-shelf="music"] .np-mount {
    width: 156px;
    height: 156px;
    max-width: 156px;
    max-height: 156px;
  }
}

/* Details: square mount showing full cover */
html[data-plate][data-shelf="music"] .ob-mount {
  width: 240px;
  height: 240px;
  max-width: 240px;
  max-height: 240px;
  flex-shrink: 0;
}

html[data-plate][data-shelf="music"] .ob-mount img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 1;
}

@media (max-width: 767px) {
  html[data-plate][data-shelf="music"] .ob-mount {
    width: 200px;
    height: 200px;
    max-width: 200px;
    max-height: 200px;
  }
}

/* HOME ARTIST TILES: SQUARE tiles with square collages */
html[data-plate][data-shelf="music"] [data-part="artists"] .bk.bk-plate[data-kind="music"] {
  height: 294px;
  width: 170px;
}

html[data-plate][data-shelf="music"] [data-part="artists"] .bk-cover {
  height: 199px;
}

html[data-plate][data-shelf="music"] [data-part="artists"] .grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

html[data-plate][data-shelf="music"] [data-part="artists"] .bk-author {
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.05em;
}

html[data-plate][data-shelf="music"] .mu-collage {
  position: absolute;
  inset: 9px;
  overflow: hidden;
  display: grid;
  gap: 3px;
}

html[data-plate][data-shelf="music"] .mu-collage img {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

@media (max-width: 767px) {
  html[data-plate][data-shelf="music"] [data-part="artists"] .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  html[data-plate][data-shelf="music"] [data-part="artists"] .bk.bk-plate[data-kind="music"] {
    height: 271px;
    width: 156px;
  }

  html[data-plate][data-shelf="music"] [data-part="artists"] .bk-cover {
    height: 175px;
  }

  html[data-plate][data-shelf="music"] .mu-collage {
    inset: 6px;
  }
}

/* LIBRARY DRAWER ARTIST FILTER */
html[data-plate][data-shelf="music"] .mu-artist-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  padding: 0 16px;
}

html[data-plate][data-shelf="music"] .mu-artist-key {
  height: 48px;
  padding: 0 16px;
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: 14px;
  background: var(--plate-dark);
  color: var(--jade);
  border: 1px solid rgba(132, 204, 173, 0.4);
  cursor: pointer;
  white-space: nowrap;
  border-radius: 0;
}

html[data-plate][data-shelf="music"] .mu-artist-key-active {
  background: var(--jade);
  color: var(--ink-dark);
  border: none;
}

html[data-plate][data-shelf="music"] .mu-artist-count {
  opacity: 0.7;
  margin-left: 4px;
}

@media (max-width: 767px) {
  html[data-plate][data-shelf="music"] .mu-artist-strip {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 0 8px;
  }
}

/* ARTIST PAGE: Remove SVG texture, fix card spacing */
html[data-plate][data-shelf="music"] .creator-panel {
  background: var(--brushed),
    radial-gradient(80% 70% at 20% 0%, rgba(127, 176, 105, 0.14) 0%, transparent 60%),
    linear-gradient(155deg, #2a3a2a 0%, #1d2a1d 60%, #141914 100%) !important;
}

html[data-plate][data-shelf="music"] .creator-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 16px;
  padding: 20px;
}

@media (max-width: 767px) {
  html[data-plate][data-shelf="music"] .creator-grid {
    grid-template-columns: repeat(auto-fill, minmax(156px, 1fr));
    gap: 12px;
    padding: 16px;
  }
}
