/* Five desktop cards per row; the legend uses the same status badges. */
.persona-page .person-editor .person-materials-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.persona-page .person-editor .person-materials-grid .person-material-card {
  height: 100%;
}
.persona-page .person-editor .material-status-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin: 10px 0 12px;
  color: #6f7d6c;
  font-size: 12px;
}
.persona-page .person-editor .material-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.persona-page .person-editor .material-status-legend .pm-lipsync-badge {
  position: static;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}
.persona-page .person-editor .material-status-legend .pm-lipsync-persona,
.persona-page .person-editor .material-status-legend .pm-lipsync-general {
  background: #287a43;
}
.persona-page .person-editor .material-status-legend .pm-lipsync-review {
  background: #b63d35;
}
.persona-page .person-editor .material-status-legend .pm-lipsync-running {
  display: inline-flex;
  gap: 5px;
  width: auto;
  height: 25px;
  padding: 0 8px;
  border-radius: 14px;
  background: #246c78;
  font-size: 12px;
}
.persona-page .person-editor .material-status-legend .pm-lipsync-running::before {
  content: '';
  width: 11px;
  height: 11px;
  border: 2px solid #ffffff66;
  border-top-color: #fff;
  border-radius: 50%;
  animation: persona-legend-spin 1s linear infinite;
}
@keyframes persona-legend-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (max-width: 1120px) {
  .persona-page .person-editor .person-materials-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (prefers-reduced-motion: reduce) {
  .persona-page .person-editor .material-status-legend .pm-lipsync-running::before {
    animation: none;
  }
}
