.piece-tag-page {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 80px;
}

.piece-tag-page-header {
  margin-bottom: 28px;
  text-align: center;
}

.piece-tag-page-kicker {
  margin: 0 0 7px;
  color: #8651a4;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.piece-tag-page-header h1 {
  margin: 0;
  color: #251d2b;
  font-size: clamp(1.65rem, 4vw, 2.45rem);
  line-height: 1.3;
}

.piece-tag-page-header > p:last-child {
  margin: 12px auto 0;
  color: #6f6873;
  font-size: 0.88rem;
  line-height: 1.7;
}

.piece-tag-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.piece-tag-card {
  min-width: 0;
  border: 1px solid #e5dfe9;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(42, 29, 50, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.piece-tag-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(42, 29, 50, 0.1);
}

.piece-tag-card-link {
  display: block;
  height: 100%;
  padding: 18px;
  color: inherit;
  text-decoration: none;
}

.piece-tag-card-composer {
  margin-bottom: 5px;
  color: #7b6f80;
  font-size: 0.78rem;
  font-weight: 700;
}

.piece-tag-card h2 {
  margin: 0;
  color: #302636;
  font-size: 1rem;
  line-height: 1.55;
  text-wrap: wrap;
}

.piece-tag-card-scores {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.piece-tag-card-scores .badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.piece-tag-card-scores .badge .k {
  opacity: 0.78;
  font-size: 10px;
  letter-spacing: 0.04em;
}

.piece-tag-card-scores .badge .v {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.piece-tag-card-scores .b-tech {
  border-color: rgba(255, 255, 255, 0.65);
  background: linear-gradient(180deg, #efe7ff 0%, #dccbff 100%);
  box-shadow: 0 8px 20px rgba(111, 47, 145, 0.16);
  color: #6f2f91;
}

.piece-tag-card-scores .b-music {
  border-color: rgba(255, 255, 255, 0.65);
  background: linear-gradient(180deg, #fde7f2 0%, #f8c8df 100%);
  box-shadow: 0 8px 20px rgba(139, 47, 98, 0.15);
  color: #8b2f62;
}

.piece-tag-empty {
  padding: 40px 20px;
  border: 1px solid #e8e2eb;
  border-radius: 12px;
  background: #faf9fb;
  color: #716a75;
  text-align: center;
}

.piece-tag-pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 30px;
}

.piece-tag-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border: 1px solid #ddd4e2;
  border-radius: 8px;
  background: #fff;
  color: #68427d;
  text-decoration: none;
}

.piece-tag-pagination .page-numbers.current {
  border-color: #7d4898;
  background: #7d4898;
  color: #fff;
}

@media (max-width: 800px) {
  .piece-tag-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  .piece-tag-page {
    width: min(100% - 20px, 1120px);
    padding: 30px 0 72px;
  }

  .piece-tag-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}
