/* A piece's own page needs the same "main column + sidebar of cards"
   shape shows.css/performance_groups.css already built — same grid
   rules, duplicated under a .piece- prefix the same way those two
   pages each keep their own copy rather than sharing one. */
.piece-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.piece-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.piece-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.piece-main,
.piece-aside {
  display: grid;
  gap: 1.5rem;
  min-width: 0;
}

@media (max-width: 960px) {
  .piece-shell {
    padding: 1.25rem;
  }

  .piece-layout {
    grid-template-columns: 1fr;
  }
}

.piece-header {
  margin-bottom: 1.5rem;
}

.piece-header__eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.piece-header h1 {
  margin: 0 0 0.35rem;
}

.piece-header__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 0.75rem 0;
}

/* Same pill shape as performance_groups.css's .pg-tag — duplicated
   rather than shared, matching that page's own precedent. */
.piece-tags {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.piece-tag {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: var(--secondary);
  color: var(--secondary-text);
  font-size: 0.8rem;
}

/* Movements card's numbered rows. */
.piece-movement-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--secondary);
  color: var(--secondary-text);
  font-size: 0.75rem;
  font-weight: 700;
  flex: 0 0 auto;
}

/* "Add to Your Library" turns into a small pop-down of edition cards
   once clicked (see pieces/show.html.erb) — its <summary> reads as the
   card's existing primary-button (that class already gives it the
   right look), so this just strips <summary>'s own browser-default
   disclosure triangle, the same way .cast-section's own summary does. */
.library-add-picker summary {
  list-style: none;
  cursor: pointer;
}

.library-add-picker summary::-webkit-details-marker {
  display: none;
}

.library-add-picker .card-grid {
  margin-top: 0.75rem;
}
